25 lines
532 B
Plaintext
25 lines
532 B
Plaintext
|
|
//This script goes in an OnEnter event to kill
|
|
//encounter NPCs that don't belong
|
|
void main()
|
|
{
|
|
object oTrespasser = GetEnteringObject();
|
|
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);
|
|
}
|
|
}
|
|
|