// ASSASSIN - Script int fnDeadTest(object oTarget) { // returns TRUE is PC is dead or in Outer planes int nRet=FALSE; string sTag; if (GetIsDead(oTarget)==TRUE) nRet=TRUE; if (oTarget==OBJECT_INVALID) nRet=TRUE; if (nRet==FALSE) { // test area sTag=GetTag(GetArea(oTarget)); if (sTag=="ThePlaneofInBetween"||sTag=="TheRealmofShadows") nRet=TRUE; } // test area return nRet; } // fnDeadTest() void main() { object oMe=OBJECT_SELF; int nSpeed=GetLocalInt(oMe,"nSpeed"); int nState=GetLocalInt(oMe,"nState"); int nTarget=GetLocalInt(oMe,"nTarget"); object oMod=GetModule(); string sTID; object oTarget; object oDest; object oFinal; if (nTarget==1) sTID="UNC"; else if (nTarget==2) sTID="SPID"; else if (nTarget==3) sTID="UND"; else if (nTarget==4) sTID="DWF"; oFinal=GetWaypointByTag("ASS_SKULK"+IntToString(nTarget)); oTarget=GetLocalObject(oMod,"oTeamLead"+sTID); if (oTarget!=OBJECT_INVALID||fnDeadTest(oTarget)!=TRUE) { // target still lives switch(nState) { // Mage AI State case 0: { // go to rally point oDest=GetWaypointByTag("ASS_RALLY"); if(GetCurrentAction()!=ACTION_MOVETOPOINT) { // move ActionForceMoveToObject(oDest,TRUE,1.0,60.0); ActionDoCommand(SetLocalInt(oMe,"nState",1)); } // move break; } // go to rally point case 1: { // go to skulk point if(GetCurrentAction()!=ACTION_MOVETOPOINT) { // move ActionForceMoveToObject(oFinal,TRUE,1.0,120.0); ActionDoCommand(SetLocalInt(oMe,"nState",2)); ActionDoCommand(SetLocalInt(oMe,"nSpeed",4)); } // move break; } // go to skulk point case 2: { // skulk if(GetArea(oTarget)==GetArea(oMe)&&GetDistanceBetween(oTarget,oMe)<30.0) { // same area ActionUseSkill(SKILL_MOVE_SILENTLY,oMe); ActionUseSkill(SKILL_HIDE,oMe); SetLocalInt(oMe,"nState",3); } // same area break; } // skulk case 3: { // setup hostile ChangeToStandardFaction(oMe,STANDARD_FACTION_HOSTILE); SetLocalInt(oMe,"nState",4); break; } // setup hostile default: break; } // Mage AI State DelayCommand(IntToFloat(nSpeed),ExecuteScript("cg_assassin",oMe)); } // target still lives else { // my job is done AssignCommand(oMe,SpeakString("My job is done.")); DelayCommand(10.0,SendMessageToPC(oTarget,"You had a contract placed on your head with the mages' guild. That contract has been met.")); DelayCommand(5.0,DestroyObject(oMe)); } // my job is done }