HiddenTradition_PRC8/_module/nss/ro_p_trashcan.nss
2024-06-20 15:47:42 -04:00

22 lines
638 B
Plaintext

void main()
{
// Trash Eater Script by Tim Stursma October 6, 2002
// Delete All Contents Of Container When Closed
// Place on the "On Close" handle
// Start by defining oObject
object oObject = OBJECT_INVALID;
// Actions cleared
ClearAllActions();
// Get the first object in the container
oObject = GetFirstItemInInventory();
// Make sure the object is valid else end the script
while(oObject != OBJECT_INVALID)
{
// Destroy the object with a slight delay
DestroyObject(oObject, 0.1);
// Get the next item in the container
oObject = GetNextItemInInventory();
// Return to the valid object check
}
}