luaworld-of-warcraft

LUA command to move items to bank from bags in WoW Classic


I have this nifty little lua command to move all ore to my bank:

/run for b=0,4 do for s=1,GetContainerNumSlots(b)do if strmatch(GetContainerItemLink(b,s),"Ore")then UseContainerItem(b,s);end; end; end;

But I can't figure out how to make it move Ore and Stone. I am still pretty new to lua, and "or" statements have me pretty flummoxed. Thanks :-)


Solution

  • /run for b = 0, 4 do for s = 1, GetContainerNumSlots(b) do local link = GetContainerItemLink(b, s) if link:match("Ore") or link:match("Stone") then UseContainerItem(b, s) end end end