LuaScript (Inventory Player)
NOTE: You need declare function by aIndex example:
playerWarehouse = Warehouse.new(aIndex)
playerTargetWarehouse = Warehouse.new(TargetIndex)playerWarehouse:isItem(1)
playerTargetWarehouse:isItem(1)
OBS: in the example above, it is not mandatory to use with TargetIndex, I just left an example as I would use for 2 or 3 or 4 index! you can use it only for an aIndex or within a FOR you need to use ":" for every trade function you want to use, see the examples below
getIndex(slot) -> return ItemIndex on item by slot, if return -1 don't have item
isItem(slot) -> return 1 if this slot have item
isExc(slot) -> return 1 if this slot have item exc
getLevel(slot) -> returns level of the item through the slot
getName(slot) -> returns name of the item through the slot
getSection(slot) -> returns section of the item through the slot
getIndex2(slot) -> returns index of the item through the slot
getSerial(slot) -> returns serial of the item through the slot
getDurability(slot) -> returns durability of the item through the slot (max: 255)
setDurability(slot, value) -> set durability of the item through the slot (max: 255)
convertItem(slot) -> update the item after you modify the excellent or something of the same
getIsPeriodic(slot) -> return 1 if this slot have item periodic
getPeriodicTime(slot) -> return time if this slot have item periodic
getItemTable(slot, type) -> returns options of item through the slot
setItemTable(slot, type, value) -> set options of item through the slot
ItemTable Types:
type: 1 -> exc value
type: 2 -> option1 value
type: 3 -> option2 value
type: 4 -> option3 value
type: 5 -> ancient value
type: 6 -> JoH value
type: 7 -> Ex option
type: 8 -> socket bonus option
type: 9 -> socket option 1
type: 10 -> socket option 2
type: 11 -> socket option 3
type: 12 -> socket option 4
type: 13 -> socket option 5