deltreey icon

nwscript CompletelyEmptyInventory

deltreey | PRO | 10/05/23 06:52:16 PM UTC | 0 ⭐ | 7648 👁️ | Never ⏰ | []
C++ |

460 B

|

Gaming

|

0 👍

/

0 👎

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);
    }
}
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎