Destroy complete inventory

What it does
Destroys all items (including equipped) and gold on a PC.

The Script
/****************************** Script: Clear Inventory Created By: Jaden Wagener Created On: 08/28/02 void main { //Set variables int xGold, xCount; object xItem, xPC; //Let's see who we're ripping off today.. xPC = GetEnteringObject; //Destroy the inventory items xItem = GetFirstItemInInventory(xPC); while(GetIsObjectValid(xItem)) { DestroyObject(xItem); xItem = GetNextItemInInventory(xPC); } // Empty all inventory slots // Change 18 to 14 to not strip creature slots for (xCount = 0; xCount < 18; xCount++) DestroyObject( GetItemInSlot( xCount, xPC)); //Now let's get greedy and take the gold! xGold = GetGold(xPC); AssignCommand(xPC, TakeGoldFromCreature( xGold,xPC,TRUE)); }