generated from Jaysyn/ModuleTemplate
Initial upload
Initial upload
This commit is contained in:
26
_mod/_module/nss/prison_ox.nss
Normal file
26
_mod/_module/nss/prison_ox.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
// prison_ox
|
||||
void main()
|
||||
{
|
||||
object oWP=GetWaypointByTag("POST_PRISONERS");
|
||||
object oPC=GetExitingObject();
|
||||
object oOb=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC,oWP,1);
|
||||
int nN=1;
|
||||
if (oOb!=oPC&&GetIsObjectValid(oOb))
|
||||
{ // PC detected
|
||||
if (GetIsPC(oOb)&&GetArea(oOb)==GetArea(oWP))
|
||||
{ // pcs
|
||||
// do nothing
|
||||
} // pcs
|
||||
else
|
||||
{ // cleanup prisoners
|
||||
oOb=GetNearestObjectByTag("PRISONERS",oWP,nN);
|
||||
while(GetIsObjectValid(oOb))
|
||||
{ // remove prisoners
|
||||
DelayCommand(1.0,DestroyObject(oOb));
|
||||
nN++;
|
||||
oOb=GetNearestObjectByTag("PRISONERS",oWP,nN);
|
||||
} // remove prisoners
|
||||
} // cleanup prisoners
|
||||
} // PC detected
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user