From 72c319d50ddeccc8585a16c43dd7c7c8389c0c3a Mon Sep 17 00:00:00 2001 From: atomaka Date: Mon, 25 Jul 2011 16:33:29 -0400 Subject: [PATCH] Use CHAT_MSG_TRADESKILLS and ITEM_PUSH to track and stack gems. --- GemStacker.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/GemStacker.lua b/GemStacker.lua index 5392086..17e9ee6 100644 --- a/GemStacker.lua +++ b/GemStacker.lua @@ -12,16 +12,13 @@ function core:OnEnable() end function core:TrackGems(_,message) - --LOOT_ITEM_CREATED_SELF = "You create: %s."; /dump TRADESKILL_LOG_FIRSTPERSON:gsub("%%s", "(.-)") lastGem = message:match(TRADESKILL_LOG_FIRSTPERSON:gsub("%%s", "(.+)")) if lastGem == nil or lastGem == "" then return end - print('TrackGems found',lastGem) self:RegisterEvent('ITEM_PUSH','StackGems') end function core:StackGems() - print('StackGems stacking',lastGem) local sourceContainer,sourceSlot,destContainer,destSlot = -1,-1,-1,-1; for bag = 0,NUM_BAG_SLOTS do for slot = 1,GetContainerNumSlots(bag) do @@ -42,7 +39,6 @@ function core:StackGems() end end - print(sourceContainer,sourceSlot,destContainer,destSlot) if sourceContainer ~= -1 and destContainer ~= -1 then PickupContainerItem(sourceContainer,sourceSlot) PickupContainerItem(destContainer,destSlot)