12-03-2004, 09:11 PM
Stumbled across this while trying to come up with a working self-cast macro, and it works really well for characters who need to cast spells on themselves during fights (Priests, Druids, others I would guess). Make your macro as normal (naming, choosing symbol) and in the text field, enter:
/script CastSpellByName('<spellname>(Rank <x>)')
/script SpellTargetUnit("player")
Substitute tha name and rank of the spell you want in there at the appropriate places.
What this macro does:
- If you have an enemy/mob targeted, you'll cast the spell on yourself without detargetting the mob and without toggling out of 'attack' mode, so you'll go right back to whacking afterwards.
- If you have nothing targetted, you cast on yourself.
- If you have another player targetted, you'll cast it on them.
So, for example, a Druid's Rejuvenation macro would look like this:
/script CastSpellByName('Rejuvenation(Rank 1)')
/script SpellTargetUnit("player")
This would allow you to refresh your HOT in combat without having to fumble with Alt-keys or retargetting.
I just realised that I didn't check to see how it would act with an NPC targetted, but still, I think it's a very handy macro. :ph34r:
/script CastSpellByName('<spellname>(Rank <x>)')
/script SpellTargetUnit("player")
Substitute tha name and rank of the spell you want in there at the appropriate places.
What this macro does:
- If you have an enemy/mob targeted, you'll cast the spell on yourself without detargetting the mob and without toggling out of 'attack' mode, so you'll go right back to whacking afterwards.
- If you have nothing targetted, you cast on yourself.
- If you have another player targetted, you'll cast it on them.
So, for example, a Druid's Rejuvenation macro would look like this:
/script CastSpellByName('Rejuvenation(Rank 1)')
/script SpellTargetUnit("player")
This would allow you to refresh your HOT in combat without having to fumble with Alt-keys or retargetting.
I just realised that I didn't check to see how it would act with an NPC targetted, but still, I think it's a very handy macro. :ph34r: