Inventory Methods (Lua)
Lua
1
inventory:CalcBagIdx(int slot_id); -- int
2
inventory:CalcMaterialFromSlot(int equipslot); -- int
3
inventory:CalcSlotFromMaterial(int material); -- int
4
inventory:CalcSlotId(int slot_id); -- int
5
inventory:CalcSlotId(int slot_id, int bag_slot); -- int
6
inventory:CanItemFitInContainer(Lua_Item item, Lua_Item container); -- bool
7
inventory:CheckNoDrop(int slot_id); -- bool
8
inventory:DeleteItem(int slot_id); -- bool
9
inventory:DeleteItem(int slot_id, int quantity); -- bool
10
inventory:FindFreeSlot(bool for_bag, bool try_cursor); -- int
11
inventory:FindFreeSlot(bool for_bag, bool try_cursor, int min_size); -- int
12
inventory:FindFreeSlot(bool for_bag, bool try_cursor, int min_size, bool is_arrow); -- int
13
inventory:GetItem(int slot_id); -- Lua_ItemInst
14
inventory:GetItem(int slot_id, int bag_slot); -- Lua_ItemInst
15
inventory:GetSlotByItemInst(Lua_ItemInst inst); -- int
16
inventory:HasItem(int item_id); -- int
17
inventory:HasItem(int item_id, int quantity); -- int
18
inventory:HasItem(int item_id, int quantity, int where); -- int
19
inventory:HasItemByLoreGroup(uint32 loregroup); -- int
20
inventory:HasItemByLoreGroup(uint32 loregroup, int where); -- int
21
inventory:HasItemByUse(int use); -- int
22
inventory:HasItemByUse(int use, uint8 quantity); -- int
23
inventory:HasItemByUse(int use, uint8 quantity, uint8 where); -- int
24
inventory:HasSpaceForItem(Lua_Item item, int quantity); -- bool
25
inventory:PopItem(int slot_id); -- Lua_ItemInst
26
inventory:PushCursor(Lua_ItemInst item); -- int
27
inventory:PutItem(int slot_id, Lua_ItemInst item); -- int
28
inventory:SupportsContainers(int slot_id); -- bool
29
inventory:SwapItem(int source_slot, int destination_slot); -- bool
Copied!
Last modified 2yr ago
Copy link