I am actually trying to merge two mouse over macros, but I can figure out how
/use [@mouseover,help,nodead][help,nodead][@player] Spell Name
if my cursor is above a friendly unit it casts the spell on that, otherwise it cast it on my target
/use [@mouseover,nodead,help] Healing Spell Name; Damaging Spell Name
this one, if my cursor is on a friendly unit it uses the healing spell if it’s on an enemy it uses the damaging spell.
Is it possible to create a macro that, a) If my cursor is over a friendly unit it will use a healing spell, b) if it’s on an enemy unit it will use the damaging spell, c) if nothing of these happens it will cast the proper spell on my target (Healing - friendly, damaging - enemy) ?
Or there is no way to make a triple argue using macros, so all of my efforts are pointless?
This would be a base to work on: /cast [@mouseover,harm,nodead] damaging spell; /cast [@mouseover,help,nodead] healing spell; /cast [@target,help] healing spell
The only thing that is missing now is how to handle the additional “/cast” statements and the else conditions. For this you can use the default “else”-condition which is empty brackets: /cast [@mouseover,harm,nodead] damaging spell; [@mouseover,help,nodead][] healing spell
The thing about the empty brackets is basically this: If all other conditions fail (so no harmfull or friendly target beneath your cursor) it will instead simply use “/cast healing spell”. This has the effect that if you have a friendly target it will heal that target, if your target is an enemy instead it will cast that spell on yourself (this is a default mechanism of the game for healing spells).
Now, the last factor is of course the damaging spell on your target. The problem is that this will restrict the use of the default case (which I do not like but you can change that) and also, more importantly, introducing a “@target” condition before another “@mouseover” condition will basically render that mouseover-condition useless. I have not tested this but you could try to either chain another condition or you try to abuse the gcd to basically only cast the damaging spell if all other conditions fail, something like this:
This should work: /cast [@mouseover,harm,nodead] damaging spell; [@mouseover,help,nodead][@target,help] healing spell; damaging spell
If it does not try this (gcd abuse): /cast [@mouseover,harm,nodead] damaging spell; [@mouseover,help,nodead][@target,help] healing spell /cast damaging spell
The cost of this macro is that you cannot use the default mechanic of the healing spell.
This one worked exactly as I wanted to!! Thanks a lot!
Also thank you for the detailed explanation instead of just writing down the macro. I was really wondering if there was any “else” command.