//:://///////////////////////////////////////////// //:: Custom User Defined Event //:: FileName //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* */ //::////////////////////////////////////////////// //:: Created By: //:: Created On: //::////////////////////////////////////////////// #include "NW_I0_GENERIC" #include "jw_privates_inc" void main() { ExecuteScript("prc_npc_userdef", OBJECT_SELF); int nUser = GetUserDefinedEventNumber(); if(nUser == 1001) //HEARTBEAT { } else if(nUser == 1002) // PERCEIVE { } else if(nUser == 1003) // END OF COMBAT { object oTarget=GetTarget(); if ((!GetIsObjectValid(oTarget))||(GetIsDead(oTarget))||(GetArea(oTarget)!=(GetArea(OBJECT_SELF)))) { SetTarget(GetNearestCreature(CREATURE_TYPE_REPUTATION,REPUTATION_TYPE_ENEMY,OBJECT_SELF,1,CREATURE_TYPE_IS_ALIVE,TRUE)); } } else if(nUser == 1004) // ON DIALOGUE { } else if(nUser == 1005) // ATTACKED { } else if(nUser == 1006) // DAMAGED { } else if(nUser == 1007) // DEATH { } else if(nUser == 1008) // DISTURBED { } }