Master's hammer macro

I haven’t been able to figure out anything that works for this.

#showtooltip master’s hammer
/use master’s hammer
/castsequence 3, 5, 6, 8, 9, 10, 16, 17

this just fizzles after the first. I left out the 2 slots that I can’t repair yet.

this would work if there was a lua script way to use a slot, but I think that’s protected.

#showtooltip master’s hammer
/use master’s hammer
/run slots={1,3,5,6,7,8,9,10,16,17};
/run if(ns == nil ) or (ns >= table.getn(slots)) then ns = 1; else ns = ns + 1; end; print("repairing "…slots[ns]);
/use %nextSlot%

Does the macro on wowhead not work or something?

Not familiar with the %var name% notation and I don’t know if it is valid syntax at all and if it is how it works, but I can see that there’s nothing that assigns a value to “nextSlot” and your var names are global which could cause problems but maybe that’s needed for nextSlot?

Maybe if you made these change?

#showtooltip
/use master's hammer
/run nextSlot, ns =1,1 local slots=1,{1,3,5,6,7,8,9,10,16,17} if(ns >= table.getn(slots)) then ns = 1 else ns = ns + 1 end nextSlot = slots[ns] print("repairing "..nextSlot);
/use %nextSlot%

I’ve been using

/use item:201366
/use 1
/use item:201366
/use 3
/use item:201366
/use 5
/use item:201366
/use 9
/use item:201366
/use 10
/use item:201366
/use 6
/use item:201366
/use 7
/use item:201366
/use 8
/use item:201366
/use 16
/use item:201366
/use 17

it’s ugly, and has a bunch of errors as it goes, but it works