Originally Posted by
Thelovefool
Hello together,
can someone make an addon for me which can withdraw a predefinied anmount of an item from a guild vault?
(the reward will be 14$ over paypal)
what i found out so far:
Code:
WITHDRAW ALL FROM GUILD BANK (SPECIFIED ITEM)
/run for t=1,GetNumGuildBankTabs()do for s=1,98 do local l=GetGuildBankItemLink(t,s)if l and strfind(l,"YOURITEM")then SetCurrentGuildBankTab(t)_G[format("GuildBankColumn%dButton%d", ceil(s/14),s%14)]:Click("RightButton")end end end
Untested, but assuming your snippet actually works you'd want something like..
Code:
local N=20 -- Number of items
local I = "Your Item"
-- Don't edit past here.
local count = 0
for t=1,GetNumGuildBankTabs() do
for s=1,98 do
if count >= n then
break
end
local l=GetGuildBankItemLink(t,s)
if l and strfind(l,I) then
SetCurrentGuildBankTab(t)_G[format("GuildBankColumn%dButton%d", ceil(s/14),s%14)]:Click("RightButton")
count = count + 1
end
end
end