MACRO target

From Warcraft Wiki
Jump to navigation Jump to search

Sets your current target to a nearby unit.

/target [conditional] name

You can also use /tar.

Usage

This command accepts secure command options. The value associated with the first satisfied condition will be interpreted as described below. If no conditions are satisfied, no action will be performed.

If the first satisfied condition explicitly specifies a target that is not exactly "target", that target (and not the associated value) will be interpreted as described below.

Arguments

name
unitId or (the start of a) name of something you wish to target.

Examples

To target Deathwing (assuming Deathwing is in range):

/tar Deathwing

To target Deathwing if you have no target, or if your target is dead:

/tar [noexists][dead] Deathwing

To target Deathwing if Deatwing is dead:

/tar [@Deathwing, dead] 

To target Deathwing if you have no target, but target yourself if you already have a hostile target (such as Deathwing):

/tar [noexists] Deathwing; [harm] player

Notes

  • This performs a search for all nearby units whose name begins with name. If multiple targets correspond to the given name, this will select the nearest of the targets. The macro will only select the player himself if no other targets match the given name.
  • Only searches units in your current 'area of interest', i.e. those that are currently drawn-in. This is generally approximately 90 yards, however in some cases (such as battlegrounds) units may be drawn-in at far greater distances, allowing for more long-range targeting.

See also