HoS_PRC8/_mod/_module/nss/oe_op_npcexpell.nss

23 lines
735 B
Plaintext
Raw Permalink Normal View History

2024-11-25 19:36:07 -05:00
void main()
{
object oEnter=GetEnteringObject();
string sID;
object oWP;
if(GetIsPC(oEnter)==FALSE)
{ // NPC
if (GetStringLeft(GetName(oEnter),9)=="Summoned ")
{ // destroy
AssignCommand(oEnter,SetIsDestroyable(TRUE,FALSE,FALSE));
DelayCommand(1.0,DestroyObject(oEnter));
} // destroy
sID=GetLocalString(oEnter,"sTeamID");
if ((sID=="SPID"||sID=="DWF"||sID=="UND"||sID=="UNC")&&!GetLocalInt(oEnter,"bChampion"))
{ // not allowed to follow
oWP=GetWaypointByTag(sID+"_START");
AssignCommand(oEnter,ClearAllActions(TRUE));
AssignCommand(oEnter,JumpToObject(oWP));
} // not allowed to follow
} // NPc
ExecuteScript("area_visit",OBJECT_SELF);
}