Ancordia_PRC8/_module/nss/outofwater.nss

30 lines
549 B
Plaintext
Raw Permalink Normal View History

2023-09-21 19:51:32 -04:00
void main()
{
object oCreature = GetEnteringObject();
if (GetLocalInt(oCreature, "UNDER_WATER_IMMUNE")!= 1)
return;
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("horseunsummon");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oCreature, ClearAllActions());
AssignCommand(oCreature, ActionJumpToLocation(lTarget));
oTarget = oCreature;
effect eEffect;
eEffect = EffectDeath();
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget));
}