Macro lessons · Lesson 2 of 5
TopBuilds.gg
Lesson 2 Targeting
Cast on the unit under your mouse, your focus or yourself without retargeting.
WoW Macro Targeting
The @ part of a condition aims the line at a specific unit and leaves your real target alone. It is how mouseover healing, focus interrupts and self casts work.
By TopBuilder · Updated November 24, 2026
The units you can aim at
- @target: your current target (the default when you write no @).
- @mouseover: the unit under your mouse pointer, such as a raid frame, a nameplate or a character in the world.
- @focus: your focus target. Set it with /focus while you target an enemy.
- @player: yourself.
- @pet and @targettarget: your pet, and the target of your target.
- @party1 to @party4 and @raid1 and up: group members by position.
Fallbacks make it reliable
If nothing is under your mouse, [@mouseover] is false, so the game moves to the next option. Chain the options from most to least specific: mouseover, then target, then yourself. Add help or harm so the spell never lands on the wrong kind of unit, and nodead so a press is never wasted on a corpse.
/cast [@mouseover,help,nodead][@target,help,nodead][@player] SpellTargeting commands
- /target sets your target, /targetenemy picks the nearest enemy.
- /focus sets your focus target and /clearfocus removes it. Use a condition to set it from the mouseover: /focus [@mouseover,harm,nodead].
- /petattack also takes a [@unit] condition, for example /petattack [@mouseover,harm,nodead].
Examples
Heal under the mouse
Mouseover friend first, then your target, then yourself.
#showtooltip
/cast [@mouseover,help,nodead][@target,help,nodead][@player] Flash HealInterrupt your focus
Uses your focus if it is a living enemy, otherwise your current target.
#showtooltip
/cast [@focus,harm,nodead][harm,nodead] CounterspellSet focus from the mouseover
Marks the enemy under your mouse as your focus.
/focus [@mouseover,harm,nodead]Try it yourself
Try it yourself
#showtooltipShows the icon and tooltip of the spell the macro would cast, so the button changes with your conditions.
/cast [@mouseover,help,nodead][@target,help,nodead][@player] RenewCasts Renew on the unit under your mouse, if it is a friend you can help and it is alive; otherwise on your target, if it is a friend you can help and it is alive; otherwise on you.
/cast- Casts
@mouseover- Aims at the unit under your mouse
help- The unit is a friend you can help
nodead- The unit is alive
@target- Aims at your target
help- The unit is a friend you can help
nodead- The unit is alive
@player- Aims at you
Renew- Spell name
Tested in the game
WoW Forever
8 of 8 parts here were tried in the WoW Forever client.
/cast· tested/focus· tested[@mouseover]· tested[@focus]· tested[@player]· tested[@target]· tested[help]· tested[harm]· tested
WoW Retail
8 of 8 parts here were tried in the WoW Retail client.
/cast· tested/focus· tested[@mouseover]· tested[@focus]· tested[@player]· tested[@target]· tested[help]· tested[harm]· tested
FAQ
Why does my @mouseover macro cast on my target?
That is the fallback working. When nothing friendly is under the mouse, the first option fails and the game uses the next one.
Does @mouseover change my target?
No. The @ part only aims that one line. Your real target stays the same.