Hi Babuchi! This is an interesting macro. I haven’t really messed around with these sorts of macros before, so I wasn’t immediately sure what you meant, and had to play around a bit, but I think I’ve figured out what’s going on.
I did a bit of a search online to find similar macros, and realized (I guess what’s pretty obvious from your title also) that you just want to be able to mouseover a stack of items in inventory, click a macro and have it place 1 from the stack in inventory separately, each time it is clicked.
Anyway, I tried assigning some variables and printing them to the console via a macro, and wasn’t getting any output for GetMouseFocus()
, and I found some interesting information that the API had been updated/changed to now use GetMouseFoci()
.
You can pretty much just replace GetMouseFocus
in your macro with a function call to GetMouseFoci
at the first item returned in that list GetMouseFoci()[1]
, which means something like this should work for you:
/run local x=GetMouseFoci()[1]; local b,s,c=x:GetParent():GetID(), x:GetID(), C_Container; c.SplitContainerItem(b,s,1) for i=0,4 do for j=1, c.GetContainerNumSlots(i) do if not c.GetContainerItemID(i,j) then c.PickupContainerItem(i,j) end end end
There is a UI & Macros section on the forums where knowledgeable people may be of help, for future reference.
Here’s some information about the API changes that came with patch 11.0.0, if you’re interested:
https://warcraft.wiki.gg/wiki/Patch_11.0.0/API_changes