ContainerIDToInventoryID
Jump to navigation
Jump to search
inventoryID = ContainerIDToInventoryID(containerID)
Arguments
- containerID
- number - BagID between 1 and
NUM_BAG_SLOTS + NUM_BANKBAGSLOTS
Returns
- inventoryID
- number - InventorySlotId used in functions like PutItemInBag() and GetInventoryItemLink()
Example
Prints all bag container IDs and their respective inventory IDs
(You need to be at the bank for bank inventory IDs to return valid results)
for i = 1, NUM_BAG_SLOTS + NUM_BANKBAGSLOTS do local invID = ContainerIDToInventoryID(i) print(i, invID, GetInventoryItemLink("player", invID)) end