Advertisement

How to customize a macro icon for each character

How to change a macro icon for each character

Senjira recently asked on the European Interface and Macros forum:

Hey guys i was wondering if i could create a targeting arena1-2-3 macro where i can add several #showtooltips, where the tooltip alters depending on which character i am playing, for example it shows block when i am on mage and link when i am on shaman etc. etc.

I would like this as i like to keep a clean UI, and would like to avoid making 5x Tar 1-2-3 macros..
Thanks in advance!

Community manager Taepsilum responded with a solution involving using the items in bags:

#showtooltip 0 1
/target Arena1

This will change the icon and tooltip of the macro to be whatever is in the first spot of the character's main backpack. The macro works, but I find it confusing if a consumable or something else you can use is in that bag slot, since not just the icon changes. The tooltip lies so I can't tell if it's my macro or a stack of stamina scrolls.



A more elegant solution came from player Kazureus:

/run local G=GetSpellInfo SetMacroSpell("MACRO_NAME", G"SPELL1" or G"SPELL2")

where

MACRO NAME is the name of the macro that should change it's icon for example XYZ if you named macro XYZ

SPELLx is spell by name for example Ice Block

This should require macro use after logging on character to take effect.

So, for example, let's say I want a macro for both my monk and my paladin that targets any nearby NPC with the title Brewmaster. But I want it to look monkish for my monk and paladinish for my pally. I call the macro Iconchange and use the question mark icon.

/run local G=GetSpellInfo SetMacroSpell("Iconchange", G"Chi wave" or G"cleanse")
/target brew

Once I log on to my monk, I have to use the macro once to change it from the question mark to my chi wave icon. It remains the chi wave icon until I log off. I have to do the same with my paladin to get it to use the cleanse spell icon. If I try to use it on my mage, I get an error box.

Do you have a different way to customize the macros you use for each of your characters? Enlighten us.