This macro is for those of you, like me, who use Pitbull to sort your party members alphabetically, and then have your healing macros target characters by name.
If you change your party members, you have to change your macros. This does it for you.
I have 5 macros in my F1-F5 keybinds. The macros (using blizz interface, not addon macros) are called Party1 - Party5.
This macro looks at your party, and changes those macros based on who is in your party.
This only works OUT OF COMBAT!
Code:
/run a={} a[1] = UnitName("player") n=GetNumPartyMembers()+1
/run for i=1,n do a[i+1] = UnitName("party"..i) end
/run table.sort(a)
/run for i = 1,n do EditMacro(GetMacroIndexByName("Party"..i),"Party"..i,1,"#showtooltip\n/stopcasting [target="..a[i]..",nodead]\n/cast [target="..a[i]..",help,nodead,exists] Lesser Healing Wave; [target="..a[i]..",dead] Ancestral Spirit",1,1) end
/run for i = (n+1),5 do EditMacro(GetMacroIndexByName("Party"..i),"Party"..i,1,"",1,1) end
The end results are 5 macros that look like this:
#showtooltip
/stopcasting [target=Toon1,nodead]
/cast [target=Toon1,help,nodead,exists] Lesser Healing Wave; [target=Toon1,dead] Ancestral Spirit
With the Party1 macro healing the first character in your party (alphabetically), Party2 healing the second, etc.
To customize your own macro, change the relevant part in the 4th /run line to what you want.
I added this with a /click command to my smartbuff macro, so I never forget to change my macros anymore when changing group members (which is very high on my 'reasons why you wipe' list).
Also, if anyone knows how I can edit Macaroon macros with a script, that knowledge would be very welcome!
Connect With Us