InventoryManagerService
This service allows you to get information about your inventory aswell as using items.
Inventory slot object
As response to some of the requests you will get objects with the following structure:
{
"inv_tab": 0,
"index": 4,
"vnum": 452,
"quantity": 999,
"name": "Angel's feather"
}The inv_tab specifies in which inventory tab the slot is in.
EQUIP:
0MAIN:
1ETC:
2
The index is the position inside the tab. It starts from 0.
getGold
Returns the gold you have in the inventory.
getEquipTab
Returns a list of the inventory slots from your EQUIP tab.
getMainTab
Returns a list of the inventory slots from your MAIN tab.
getEtcTab
Returns a list of the inventory slots from your ETC tab.
getInventorySlot
Returns an inventory slot from the specified tab and index.
findItem
Searchs for the item with the given vnum. Returns the inventory slot if found, otherwise returns an error.
useItem
Uses an item from the inventory with the given vnum. If the item is not found it returns an error.
useItemOnTarget
Uses an item from the inventory with the given vnum on the specified target. If the item is not found or the target is not found it returns an error.
Last updated
