Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CompletelyEmptyInventory(object creature)
- {
- // clear held/worn items
- int i;
- object stuff;
- for (i = 0; i < NUM_INVENTORY_SLOTS; ++i)
- {
- stuff = GetItemInSlot(i, creature);
- DestroyObject(stuff);
- }
- // clear items in general inventory
- stuff = GetFirstItemInInventory(creature);
- while (GetIsObjectValid(stuff))
- {
- DestroyObject(stuff);
- stuff = GetNextItemInInventory(creature);
- }
- }
Advertisement