generated from Jaysyn/ModuleTemplate
41 lines
1.1 KiB
Plaintext
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));
|
|
}
|
|
}
|
|
}
|