Initial commit. Updated release archive.
This commit is contained in:
21
_module/nss/ro_p_trashcan.nss
Normal file
21
_module/nss/ro_p_trashcan.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user