Retrieve the item in a given inventory slot of a creature.
object oCreature = OBJECT_SELF
- Target creature. (Default: OBJECT_SELF)
Returns the object which is in oCreature's specified inventory slot (nInventorySlot).
Returns OBJECT_INVALID if oCreature is not a valid creature or there is no item in nInventorySlot.
Remember that the INVENTORY_SLOT_* constants are actually integers from 0 to 17 (or, if Bioware ever decides to add more slots, 0 to NUM_INVENTORY_SLOTS - 1). Thus, you can create a for loop to cycle through somebody's equipped items. See example.
Also while creature weapons and items cannot be seen in the UI (even by DMs) they can still be equipped - and even used - by players, especially the "Creature Armor" one commonly used to store "permanent" effects.
for (nSlot=0; nSlot < NUM_INVENTORY_SLOTS; nSlot++)
//unequip if valid
author: Jason Harris, editor: Lilac Soul, additional contributor(s): Lilac Soul