Files
HeroesStone_PRC8/_module/nss/l404_trig_goaway.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

41 lines
1.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Trigger Enter Event
//:: FileName l404_trig_goaway
//:: Copyright (c) 2003 Red Golem
//:://////////////////////////////////////////////
/*
Makes creatures move away from the waypoint if they enter
*/
//:://////////////////////////////////////////////
//:: Created By: Red Golem
//:: Created On: 7/11/2003
//:://////////////////////////////////////////////
void main()
{
object oMod = GetModule();
object oEntering = GetEnteringObject();
if (GetIsPC(oEntering) || GetIsDM(oEntering) || GetIsPossessedFamiliar(oEntering))
{
return;
}
else
{
string wayPointName = GetName(OBJECT_SELF);
object wayPoint = GetNearestObjectByTag(wayPointName, oEntering);
AssignCommand(oEntering, ClearAllActions());
if (GetIsObjectValid(wayPoint))
{
AssignCommand(oEntering, ActionMoveAwayFromLocation(GetLocation(wayPoint), FALSE, 30.0f));
}
else
{
object this = OBJECT_SELF;
AssignCommand(oEntering, ActionMoveAwayFromLocation(GetLocation(this), FALSE, 30.0f));
}
}
}