Page 1 of 1

Imp Fire Shield Macro

PostPosted: Sat Feb 06, 2016 7:41 am
by Azzaria
Hi, just started up on the server this week, and it has been extremely nostalgic and fun!

I made a Warlock and am looking to get into some dungeons at the weekend. That being said, I was trying to come up with a macro for Fire Shield so that I don't leave it on autocast and spend mana. The more I tried to figure this out, the more I realized I was wasting my time, but I was wondering if a macro was possible for this scenario.

The macro would:

1. Cast Fire Shield on my target
2. If I have no target, cast Fire Shield on me
3. Drop my current target if possible

From what I understand (or at least what I was able to attempt on my own) step 3 may or may not be possible, no biggie, when people cast buffs they usually don't drop target as is. But when I use:

/cast Fire Shield rank x
/target Azzaria
/cast Fire Shield rank x

The macro automatically switches targets and casts it on myself. Obviously, I can also just use a /cast macro and target myself each time as well as a tank or other party member I wish to buff, but I was trying to figure out if the macro of my dreams was possible. Not practical, but now the question is bugging me!

Thanks, and good luck!

Re: Imp Fire Shield Macro

PostPosted: Sat Feb 06, 2016 1:03 pm
by Dreez
Code: Select all
/run local c=CastSpellByName if UnitExists("target")then c("Fire Shield")else TargetUnit("player")c("Fire Shield")end ClearTarget()


else I'd recommend using TargetLastTarget() instead of ClearTarget() at the end

Re: Imp Fire Shield Macro

PostPosted: Sun Feb 07, 2016 7:33 pm
by Azzaria
Worked like a charm, thanks!

Re: Imp Fire Shield Macro

PostPosted: Wed Mar 02, 2016 1:24 pm
by monteo
And whether it is possible to make here so
If target=Enemy then target of target cast Fire Shield
else UnitExists("target")then ("Fire Shield")?