Skip to content

Instantly share code, notes, and snippets.

@Asynchronousx
Last active July 22, 2021 00:10
Show Gist options
  • Select an option

  • Save Asynchronousx/cb1fe962da8d4a4957589f345277c772 to your computer and use it in GitHub Desktop.

Select an option

Save Asynchronousx/cb1fe962da8d4a4957589f345277c772 to your computer and use it in GitHub Desktop.
World of Warcraft Classic Macro script: Item stack Splitter
-- WoW Classic LUA Macro that allows SPLITING ITEM STACK fast.
-- Usage: Just positionate the cursor on the item stack you want to divide, and spam the macro
local pos=GetMouseFocus()
local x,y=pos:GetParent():GetID(), pos:GetID()SplitContainerItem(x,y,1)
for i=0,4 do for j=1, -- change j if want more than one item splitted each time
GetContainerNumSlots(i)
do
if not GetContainerItemID(i,j)
then PickupContainerItem(i,j)
end
end
end
-- How to get it to work:
-- Press Esc -> Macros -> New Macro -> Copy the below line into the text box:
-- /run local pos=GetMouseFocus()local x,y=pos:GetParent():GetID(),pos:GetID()SplitContainerItem(x,y,1)for i=0,4 do for j=1,GetContainerNumSlots(i)do if not GetContainerItemID(i,j)then PickupContainerItem(i,j)end end end
-- Assign name/icon, save and assign the macro to a slot/hotkey.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment