45 lines
1.4 KiB
Lua
45 lines
1.4 KiB
Lua
--START DEPOSIT GUILDBANKFRAME_CLOSED
|
|
function(e)
|
|
local interval = 0.5
|
|
local item = "U'taka"
|
|
if e == "START" then
|
|
for t = 1, GetNumGuildBankTabs() do
|
|
for s = 1, 98 do
|
|
local l = GetGuildBankItemLink(t, s)
|
|
if l then
|
|
local name = GetItemInfo(l)
|
|
if name:match(item) then
|
|
SetCurrentGuildBankTab(t)
|
|
aura_env.tab = t
|
|
break
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if not aura_env.tab then print("NO FISH FOUND CUNT") else
|
|
local s = 1
|
|
local aura_env = aura_env
|
|
aura_env.ticker = C_Timer.NewTicker(interval, function()
|
|
print(aura_env.tab, s)
|
|
AutoStoreGuildBankItem(aura_env.tab, s)
|
|
s = s + 1
|
|
end)
|
|
end
|
|
elseif e == "DEPOSIT" then
|
|
local b = 0
|
|
local s = 1
|
|
local bs = 1
|
|
local stage = 1
|
|
local aura_env = aura_env
|
|
aura_env.ticker = C_Timer.NewTicker(interval, function()
|
|
if stage == 1 then SplitContainerItem(b, s, 1); print(stage); stage = stage + 1
|
|
elseif stage == 2 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
|
|
elseif stage == 3 then PickupContainerItem(b, s); print(stage); stage = stage + 1
|
|
elseif stage == 4 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
|
|
elseif stage == 5 then s = s + 1; bs = bs + 1; stage = 1 end
|
|
if s >= GetContainerNumSlots(b) then s = 1; b = b + 1 end
|
|
end)
|
|
elseif e == "GUILDBANKFRAME_CLOSED" then
|
|
if aura_env.ticker then aura_env.ticker:Cancel() end
|
|
end
|
|
end |