Advertisement
j311yf1sh

Untitled

Sep 20th, 2012
74
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.  
  4. --Start
  5.  
  6.  
  7. SLASH_GGLYPHS1 = '/gglyphs'; -- Define the "/" Command.
  8. function SlashCmdList.GGLYPHS(msg, editbox)-- Handle the "/"
  9.     for GuildTab=1, 3 do    -- Start loop to iterate over bank tabs 3 = max tab you want to check
  10.         for GuildTabSlot=1, 98 do   -- Iterate over tab slots
  11.             PlayerAuctionsDB = TSMAPI:GetData("playerauctions", CHARACTER_NAME) -- Load Character auctions
  12.             ItemLink = GetGuildBankItemLink(GuildTab, GuildTabSlot)     -- Get item in Tab/Spot
  13.             ItemLinkID = TSMAPI:GetItemID(ItemLink, true)   -- convert item link into item ID
  14.             print(ItemLinkID)
  15.             for ItemInDB, _ in pairs(PlayerAuctionsDB) do       -- Add the key value to ItemInDB
  16.                 print(ItemInDB)         -- Checking to see if it actually recieved a key, Not needed
  17.                 if ItemInDB ~= ItemLinkID then      -- Comparing if the itemid is in the table
  18.                     print("item "..ItemLinkID.." not found on AH")
  19.                     AutoStoreGuildBankItem(GuildTab, GuildTabSlot)  -- Grab the item from the guildbank tab / slots
  20.                 else
  21.                     print("Item Not Found") -- Print if the item is not found
  22.                 end
  23.             end
  24.         end
  25.     end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement