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

32 lines
1009 B
Plaintext

void main()
{
if ( GetLocalInt( OBJECT_SELF, "m_bActivated" ) == TRUE )
{
SetLocalInt( OBJECT_SELF, "m_bActivated", FALSE );
PlayAnimation( ANIMATION_PLACEABLE_DEACTIVATE );
}
else
{
SetLocalInt( OBJECT_SELF, "m_bActivated", TRUE );
PlayAnimation( ANIMATION_PLACEABLE_ACTIVATE );
}
object oArea = GetArea(OBJECT_SELF);
object oObjectToClean = GetFirstObjectInArea(oArea);
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(oArea);
}
}