HoS_PRC8/_mod/_module/nss/watermother_hb.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

20 lines
618 B
Plaintext

// watermother_hb = handle regeneration
void main()
{
object oMod=GetModule();
int nLevel=GetLocalInt(oMod,"nTempleWaterLevel");
effect eHeal;
if (nLevel==1) eHeal=EffectHeal(2);
else if (nLevel==2) eHeal=EffectHeal(6);
else if (nLevel==3) eHeal=EffectHeal(12);
if (nLevel>0) ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,OBJECT_SELF);
oMod=GetWaypointByTag("TEGODS_WATER");
if (GetDistanceBetween(oMod,OBJECT_SELF)>30.0)
{ // go back
ClearAllActions(TRUE);
ActionMoveToObject(oMod,TRUE,20.0);
} // go back
ExecuteScript("nw_c2_default1", OBJECT_SELF);
}