Guest User

Untitled

a guest
Apr 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1.         while count > 0 do
  2.             for bag = 0, 4 do              
  3.                 for slot = 1, GetContainerNumSlots(bag) do
  4.  
  5.                     local link = GetContainerItemLink(bag, slot)
  6.  
  7.                     if link then
  8.                         local id = tonumber(string.match(link, "item:(%d+)"))
  9.                        
  10.                         if var == "Prospecting" or var == "Milling" then
  11.                             if count < 5 then break end
  12.                         end
  13.  
  14.                         if id == ItemID then
  15.                             local name = (select(1, GetItemInfo(id)))
  16.                             print(labelColor.."Disenchanting:|cffffffff "..link.." - location: bag: "..bag..", slot: "..slot)
  17.  
  18.                             f.icon = _G["EasyDisenchantButtonIcon"]
  19.                             f.icon:SetTexture((select(1, GetContainerItemInfo(bag, slot))))
  20.                             f.icon:Show()
  21.  
  22.                             f:SetAttribute("type", "item")
  23.                             f:SetAttribute("target-bag", bag)
  24.                             f:SetAttribute("target-slot", slot)
  25.  
  26.                             UIFrameFadeOut(f, 3, 1, 0)
  27.                             return
  28.                         end
  29.                     end
  30.                 end
  31.             end
  32.         end
Add Comment
Please, Sign In to add comment