//****************************************************************************** // This is the onExit script for a SnoopTrigger. This script cancels the attack // if one has begun and sets up some stuff so it won't start an attack until the // the PC moves back into the trigger. // Created By: Jeremiah Teague //****************************************************************************** void main() { object oPC = GetLocalObject(OBJECT_SELF, "PC"); object oAttacker = GetLocalObject(OBJECT_SELF, "ATTACKER"); object oExiter = GetExitingObject(); location lPost = GetLocalLocation(OBJECT_SELF, "GUARD_POST"); if(oPC == oExiter)//the exiting object is the PC { //once the PC leaves the trigger, the fight is stopped AdjustReputation(oPC, oAttacker, 100); AdjustReputation(oAttacker, oPC, 100); AssignCommand(oAttacker, ClearAllActions(TRUE)); AssignCommand(oPC, ClearAllActions(TRUE)); AdjustReputation(oPC, oAttacker, 100); AdjustReputation(oAttacker, oPC, 100); SetLocalInt(OBJECT_SELF, "IS_PC_IN_TRIGGER", FALSE); //oAttacker moves back to his/her post AssignCommand(oAttacker, ActionForceMoveToLocation(lPost)); } }