Alangara_PRC8/_module/nss/mn_removeitems.nss

26 lines
607 B
Plaintext
Raw Normal View History

2024-06-05 21:21:06 -04:00
void main()
{
object oPC = OBJECT_SELF;
object oStuff = GetFirstItemInInventory(oPC);
while (oStuff != OBJECT_INVALID)
{
SetPlotFlag(oStuff, FALSE);
DestroyObject(oStuff);
oStuff = GetNextItemInInventory(oPC);
}
// Destroy PC's equipped items.
int i;
for(i = 0; i < NUM_INVENTORY_SLOTS; i++)
{
oStuff = GetItemInSlot(i, oPC);
if(GetIsObjectValid(oStuff))
{
SetPlotFlag(oStuff, FALSE);
DestroyObject(oStuff);
}
}
// Remove gold
TakeGoldFromCreature( GetGold(oPC), oPC, TRUE );
}