SHOW:
|
|
- or go back to the newest paste.
1 | --Spare space start | |
2 | local CHARACTER_NAME = UnitName("player") | |
3 | ||
4 | --Start | |
5 | ||
6 | - | --function ContainCheck(table, element) -- Unused function currently |
6 | + | |
7 | - | --for Value, _ in pairs(table) do |
7 | + | SLASH_GGLYPHS1 = '/gglyphs'; -- Define the "/" Command. |
8 | - | --if value == element then |
8 | + | function SlashCmdList.GGLYPHS(msg, editbox)-- Handle the "/" |
9 | - | --return true |
9 | + | for GuildTab=1, 3 do -- Start loop to iterate over bank tabs 3 = max tab you want to check |
10 | - | --end |
10 | + | for GuildTabSlot=1, 98 do -- Iterate over tab slots |
11 | - | --end |
11 | + | PlayerAuctionsDB = TSMAPI:GetData("playerauctions", CHARACTER_NAME) -- Load Character auctions |
12 | - | --return false |
12 | + | ItemLink = GetGuildBankItemLink(GuildTab, GuildTabSlot) -- Get item in Tab/Spot |
13 | - | --end |
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 | - | SLASH_GGLYPHS1 = '/gglyphs'; -- Define the "/" Command. |
16 | + | print(ItemInDB) -- Checking to see if it actually recieved a key, Not needed |
17 | - | function SlashCmdList.GGLYPHS(msg, editbox) -- Handle the "/" |
17 | + | if ItemInDB ~= ItemLinkID then -- Comparing if the itemid is in the table |
18 | - | for GuildTab=1, 3 do -- Start loop to iterate over bank tabs 3 = max tab you want to check |
18 | + | print("item "..ItemLinkID.." not found on AH") |
19 | - | for GuildTabSlot=1, 98 do -- Iterate over tab slots |
19 | + | AutoStoreGuildBankItem(GuildTab, GuildTabSlot) -- Grab the item from the guildbank tab / slots |
20 | - | PlayerAuctionsDB = TSMAPI:GetData("playerauctions", CHARACTER_NAME) -- Load Character auctions |
20 | + | |
21 | - | ItemLink = GetGuildBankItemLink(GuildTab, GuildTabSlot) -- Get item in Tab/Spot |
21 | + | print("Item Not Found") -- Print if the item is not found |
22 | - | ItemLinkID = TSMAPI:GetItemID(ItemLink, true) -- convert item link into item ID |
22 | + | |
23 | end | |
24 | - | for ItemInDB, _ in pairs(PlayerAuctionsDB) do -- Add the key value to ItemInDB |
24 | + | |
25 | - | print(ItemInDB) -- Checking to see if it actually recieved a key, Not needed |
25 | + | |
26 | - | if ItemInDB ~= ItemLinkID then -- Comparing if the itemid is in the table |
26 | + |