earelith wrote:Hello. Is there any macro that auto-target the nearest enemy (like if you hit tab) only if you don't have target or if your target is dead...
On live this macro is /targetenemy [noexists][dead]
Would it be possible to have a similar one?
Thanks
Put these lines ahead of your existing macro for auto-targeting:
- Code: Select all
/script if UnitHealth("target")==0 and UnitExists("target") then ClearTarget(); end
/run if GetUnitName("target")==nil then TargetNearestEnemy() end
Also, for those who want the cooldown to show, make this the very first line of any macro:
- Code: Select all
/run if 1==0 then CastSpellByName("Judgement");end
((insert the spell who's cooldown you want to see)) This won't change the icon, but will show the spell in tooltip and show it's cooldown.
Both in action:
- Code: Select all
/run if 1==0 then CastSpellByName("Judgement");end
/script if UnitHealth("target")==0 and UnitExists("target") then ClearTarget(); end
/run if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if buffed("Seal of") then c("Judgement") elseif (uh("player")/uhm("player")<0.5) and not buffed("Judgement of L", "target") then c("Seal of Light") elseif (uh("player")/uhm("player")>0.5) and not buffed("Judgement of the Cr", "target") then c("Seal of the Crusader") elseif (uh("target")/uhm("target")<0.15) then c("Seal of Justice") else c("Seal of Righteousness") end
/script if not IsCurrentAction(48) then UseAction(48) end
Just something I threw together for my Holy Pally.
Join #macrochat text channel for macro assistance (no sign-up required):
Discord.
I'm not a pro, but I love building macros, sharing what I know, and learning more.