Advertisement
Bleckpan

Query AH Prob.

Jul 30th, 2011
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.46 KB | None | 0 0
  1. local numBatchAuctions, totalAuctions
  2. local Glyph_Number = 1
  3. local name, _, count, _, _, _, minBid, _, buyoutPrice, _, _, _, _
  4. local Glyphs_Called = 0
  5.  
  6. local GlyphMaster = CreateFrame ("FRAME", "GlyphMaster", UIParent, nil)
  7. GlyphMaster:RegisterEvent("AUCTION_ITEM_LIST_UPDATE")
  8. GlyphMaster:RegisterEvent("ADDON_LOADED")
  9. GlyphMaster:SetScript("OnEvent",
  10.  
  11. function (self, event)
  12. if event == "ADDON_LOADED" then
  13. if not Glyph_List_Names then
  14. Glyph_List_Names = {}
  15. elseif not Glyph_Count then
  16. Glyph_Count = 0
  17. elseif not Glyph_List_Count then
  18. Glyph_List_Count = {}
  19. elseif not Glyph_List_MinBid then
  20. Glyph_List_MinBid = {}
  21. elseif not Glyph_List_MinBO then
  22. Glyph_List_MinBO = {}
  23. end
  24.  
  25. elseif event == "AUCTION_ITEM_LIST_UPDATE" then
  26. if Glyphs_Called ~= 1 then return end
  27. numBatchAuctions, totalAuctions = GetNumAuctionItems("list")
  28. Glyph_Count = totalAuctions
  29. for Glyph_Number = 1, Glyph_Count do
  30. local name, _, count, _, _, _, minBid, _, buyoutPrice, _, _, _, _ = GetAuctionItemInfo("list", Glyph_Number)
  31. -- if string.find (name, "Glyph") == nil then return end
  32. Glyph_List_Names [Glyph_Number] = name
  33. Glyph_List_Count [Glyph_Number] = count
  34. Glyph_List_MinBid [Glyph_Number] = minBid
  35. Glyph_List_MinBO [Glyph_Number] = buyoutPrice
  36. end
  37. Glyphs_Called = 0
  38. end
  39. end
  40. )
  41.  
  42. SLASH_GlyphMaster1 = "/GMaster"
  43. SLASH_GlyphMaster2 = "/GlyphM"
  44.  
  45. function SlashCmdList.GlyphMaster ()
  46. QueryAuctionItems("Glyph", nil, nil, nil, 5, nil, nil, false, nil, true)
  47. Glyphs_Called = 1
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement