View Single Post
06/22/15, 10:50 AM   #3
Argusus
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 120
Great, thank you!

Originally Posted by ahmetertem View Post
I can't tell "best practice" but any function will do same thing in background. Will reach to bag, bank etc and search item in your conditions...

Code:
local bagId = BAG_BACKPACK
-- check: http://wiki.esoui.com/Constant_Values#BAG_BACKPACK
local bagSlots = GetBagSize(bagId) -1
for slotIndex = 0, bagSlots do
    local itemType = GetItemType(bagId, slotIndex)
    local link = GetItemLink(bagId, slotId)
    local itemID = select(4,ZO_LinkHandler_ParseLink(link))
    if itemID == xxxx and itemType == blabla then
    -- code goes here
    end
end
Sorry for bad English, but basically any function will do this in background like i said.

Regards
  Reply With Quote