generated from Jaysyn/ModuleTemplate
Initial upload
Initial upload.
This commit is contained in:
26
_module/nss/arx_cleanup.nss
Normal file
26
_module/nss/arx_cleanup.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
void main()
|
||||
{
|
||||
object oExiting = GetExitingObject();
|
||||
|
||||
if (GetIsPC(oExiting))
|
||||
{
|
||||
//SendMessageToPC(oExiting, "Area cleanup event fired.");
|
||||
object oObjectToClean = GetFirstObjectInArea(OBJECT_SELF);
|
||||
while (GetIsObjectValid(oObjectToClean))
|
||||
{
|
||||
if (
|
||||
!GetIsPC(oObjectToClean) &&
|
||||
!GetIsDM(oObjectToClean) &&
|
||||
!GetPlotFlag(oObjectToClean) &&
|
||||
GetObjectType(oObjectToClean) == OBJECT_TYPE_CREATURE
|
||||
)
|
||||
{
|
||||
//SendMessageToPC(oExiting, "Destroying " + GetName(oObjectToClean));
|
||||
DestroyObject(oObjectToClean, 0.1);
|
||||
}
|
||||
|
||||
oObjectToClean = GetNextObjectInArea(OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user