Advertisement
j311yf1sh

Untitled

Sep 20th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Spare space start
  2. local CHARACTER_NAME = UnitName("player")
  3. --Start
  4. SLASH_GGLYPHS1 = '/gglyphs'; -- Define the "/" Command.
  5. function SlashCmdList.GGLYPHS(msg, editbox)-- Handle the "/"
  6.     for GuildTab=1, 3 do    -- Start loop to iterate over bank tabs 3 = max tab you want to check
  7.         for GuildTabSlot=1, 98 do   -- Loop over tab slots
  8.             PlayerAuctionsDB = TSMAPI:GetData("playerauctions", CHARACTER_NAME)
  9.             ItemLink = GetGuildBankItemLink(GuildTab, GuildTabSlot)
  10.             ItemLinkID = TSMAPI:GetItemID(ItemLink, true)   -- convert item link into item ID
  11.             print(ItemLinkID)
  12.             for ItemInDB, _ in pairs(PlayerAuctionsDB) do
  13.                 print(ItemInDB)
  14.                 if ItemInDB ~= ItemLinkID then
  15.                     print("item "..ItemLinkID.." not found on AH")
  16.                     AutoStoreGuildBankItem(GuildTab, GuildTabSlot)
  17.                 else
  18.                     print("Item Not Found") -- Print if the item is not found
  19.                 end
  20.             end
  21.         end
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement