Page 1 of 1

Cast a spell depending if Enemy or Ally

PostPosted: Thu Jan 07, 2016 4:14 pm
by Kwayzie
I have this macro in retail, /cast [mod:alt, target=player] [help] Healing Wave; [harm] Lava Burst; Healing Wave.

That would cast Healing wave if I target an ally, lava burst if enemy, and healing on myself if I hold shift.

Is there anyway to make this work in Vanilla?

Re: Cast a spell depending if Enemy or Ally

PostPosted: Thu Jan 07, 2016 8:19 pm
by Dreez
Code: Select all
/run local c=CastSpellByName if IsShiftKeyDown()then TargetUnit("player")c("Healing Wave")TargetLastTarget()else if UnitCanAttack("player", "target")then c("Lava Burst")else c("Healing Wave")end end

Re: Cast a spell depending if Enemy or Ally

PostPosted: Thu Jan 07, 2016 9:20 pm
by Kwayzie
ty works perfectly :D