-
Notifications
You must be signed in to change notification settings - Fork 52
Inventory
Andrew Teets edited this page Jun 28, 2015
·
15 revisions
Inventory returns a lua table, that contains a table of Items
- The Inventory can be called with several filters, seperated by comma, which can be combined to get the Items wanted. Make sure you use a combination of filters which can be logically combined.
- NOTE: The index value of items in a returned result-table is just a random counter and is unlike the EntityList NOT representing the itemID!
- Example:
-- this will return all currently equipped items
local inv= Inventory("type=FFXIV.INVENTORYTYPE.INV_EQUIPPED")
if ( inv ) then
local i,item= next(inv)
while (i~=nil and item~=nil) do
-- the 'd' command is a global command for printing out information into the console
d("itemid: ".. tostring(item.id).. " ItemName: "..item.name)
local i,item= next(inv,i)
end
end
- type=INVENTORYTYPE
- Returns all items with the type INVENTORYTYPE. Can do multiple types by separating them with a ";".
- Inventory("type=1;2;45678;banana") forum post
- itemid=number
- Returns items with the given id.
- category=ITEMCATEGORY
- Returns items of ITEMCATEGORY.
- :Get(itemid)
- Returns the Item from the Inventory which has the !itemid". If that Item does not exist, an empty table will be returned.
- :MaxSlots()
- Returns the maximum slots of your main inventory
- :FreeSlots()
- Returns the amount of free slots in your main inventory
- :UsedSlots
- Returns the amount of used slots in your main inventory.