MACRO target

Sets your current target to a nearby unit.
 /target [conditional] name
== Usage ==
== 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 ==
* /targetenemy
* /targetenemyplayer
* /targetexact
* /targetfriend
* /targetfriendplayer
* /targetparty
* /targetraid