GetItemPossessedBy(object, string)
From NWN Lexicon
Jump to navigationJump to search
Get an item with a specific tag in a given objects inventory.
object GetItemPossessedBy(
object oCreature,
string sItemTag
);
Parameters
- oCreature
- Target creature, item container (bag), placeable, or store. Note: While it does say oCreature and the description says creature this is incorrect.
- sItemTag
- Tag of item to be retrieved.
Description
Returns the first item possessed by the given object with the tag sItemTag.
Returns OBJECT_INVALID if the target object is invalid or does not possess the specified item.
Remarks
For creatures it checks the inventory first and then equipped slots, returning whatever it finds first.
It can be used on creatures, item containers (bags), placeables and stores.
Known Bugs
The description erroneously suggests it is only applicable to creatures, instead of creatures, item containers (bags), placeables and stores.
See Also
| functions: |
author: Jason Harris, editor: Lilac Soul, additional contributor(s): Blackrazor, Lilac Soul