Cast on nearest enemy, macro?

UI and Macro

On my dk, sometimes when im getting kited to no end, I like to target the nearest enemy target that I can whack and death strike it for some hp. Is there a macro to /cast at nearest enemy?

something like

/cast [@nearestenemy] Death Strike

any input? Also i do not want it to switch my current target, hence the cast @
You can only use macros to direct casts at certain units - see for more details.

"nearest enemy" is not one of them.

You can use macro commands to get close to what you're after, but I don't know if it will work as intended due to possible delays between registering changes in target and cast successes:

/cast Death Strike

Be advised that this does technically switch your target, albeit briefly, which may result in a reset swing timer. Not crucial for PVP.
"/targetnearestenemy" isn't a valid command. You haven't been able to target based on range since like, 2.0.
It is funny that this "topic" was brought about. There would have to be something that could be done.

Currently now and again, especially in raids, I experience what I dubbed "Blizzards Broken Targeting" system. When tabbing through I was under the impression the target would grab the closest target to the player. However there is also sometimes a need to swap to a target briefly then swap back. Without using a focus target, how is it accomplished?

I am wanting to add functionality into an addon I am developing and this will be on the hurdles.
/use Death Strike
/tar [@focus]

Will set target as focus, drop target, tabtarget (hopefully the closest enemy), use Death Strike, target your focus, drop focus, in 1 keystroke.

May or may not work properly depending on latency. YMMV.

Join the Conversation

Return to Forum