PGCC_PRC8/_module/nss/arx_cleanup.nss
Jaysyn904 e51634d39b Initial upload
Initial upload.
2024-10-09 14:17:22 -04:00

27 lines
785 B
Plaintext

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);
}
}
}