27 lines
616 B
Plaintext
27 lines
616 B
Plaintext
|
|
||
|
//This script goes in an OnEnter event to kill
|
||
|
//encounter NPCs that don't belong
|
||
|
void main()
|
||
|
{
|
||
|
object oTrespasser = GetEnteringObject();
|
||
|
string spectre = GetTag(oTrespasser);
|
||
|
if (spectre == "RogueSpectre"){return;}
|
||
|
if (GetIsEncounterCreature(oTrespasser))
|
||
|
{
|
||
|
object area = GetArea(oTrespasser);
|
||
|
|
||
|
object oPC = GetFirstPC();
|
||
|
object area2 = GetArea(oPC);
|
||
|
while (oPC != OBJECT_INVALID){
|
||
|
if (area == area2){
|
||
|
DelayCommand(1.0, SetCommandable(TRUE, oPC));
|
||
|
}
|
||
|
oPC = GetNextPC();
|
||
|
|
||
|
|
||
|
}
|
||
|
DestroyObject(oTrespasser);
|
||
|
}
|
||
|
}
|
||
|
|