Does anybody know what the ResRef or tag of these things are? The treasure containers that are created when a creature is killed.
I don't know what the tag is but heres a script I wrote to destroy all the trash littering up areas on my module.
It cycles through all the objects in the area and deletes it's contents and then deletes the container. I used the GetName(oTrash) == "Remains" because that's the name of the remains so it works
// Destroy all items/remains in area of oWP.
void DespawnTrash(string sWP)
oWP = GetWaypointByTag(sWP);
lLocation = GetLocation(oWP);
oArea = GetAreaFromLocation(lLocation);
oTrash = GetFirstObjectInArea(oArea);
string sTagPrefix = GetStringLeft(GetTag(oTrash), 15);
if(GetObjectType(oTrash) == OBJECT_TYPE_ITEM || GetName(oTrash) == "Remains")
oInvItem = GetFirstItemInInventory(oTrash);
oInvItem = GetNextItemInInventory(oTrash);
oTrash = GetNextObjectInArea(oArea);
Zool last edited by
Thanks buddy. We already have a script for this, I don't know if it was cancelled or doesnt run in some places or what. There are some issues with running it, like checking it really -should- run right then, so people don't lose out on loot they are about to pick up,m but those can be negated with further checks.