27 lines
785 B
Plaintext
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);
|
|
}
|
|
}
|
|
}
|
|
|