20 lines
618 B
Plaintext
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);
|
|
}
|