LoT_PRC8/_module/nss/treasueclean.nss
Jaysyn904 ec287507a1 Initial upload
Initial upload.
2023-09-25 21:32:17 -04:00

36 lines
673 B
Plaintext

void TrashObject(object oItem)
{
if(GetHasInventory(oItem) == FALSE)
{
DestroyObject(oItem);
}
else
{
object oItem2 = GetFirstItemInInventory(oItem);
while(GetIsObjectValid(oItem2))
{
TrashObject(oItem2);
oItem2 = GetNextItemInInventory(oItem);
}
DestroyObject(oItem);
}
}
void main()
{
object oItem = GetFirstObjectInArea();
while(GetIsObjectValid(oItem))
{
int oItemtype = GetObjectType(oItem);
if (oItemtype == OBJECT_TYPE_PLACEABLE)
{
string oItemtag = GetTag(oItem);
if (oItemtag == "BodyBag")
{
TrashObject(oItem);
}
}
oItem = GetNextObjectInArea();
}
}