Container disappear's when empty
From NWNWiki
Tired of looting containers and walking past them later just to forget you already looted them? This script causes a container to vanish after it has been emptied of its loot.
[edit] The Script
/*******************************
Script: Container Disappear When Empty
Created By: Jaden Wagener
Created On: 08/30/02
*******************************/
//Causes a container to be destroyed once the loot inside is taken.
//Should be placed in a placeable container's OnClose slot.
void main()
{
if (GetIsObjectValid(GetFirstItemInInventory(OBJECT_SELF)) == FALSE)
{
DestroyObject(OBJECT_SELF,0.0f);
}
}
[edit] Notes
Script should be placed in the OnClose slot for the placeable container.
