Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:Making a macro
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Targeting == Targeting is another common task in macros. This is accomplished either by using dedicated targeting slash commands which actually change your target or by using the [@''unit''] macro option on commands that accept them. When you use the macro option, you are actually casting the spell or using the item directly on the unit without changing targets. Macro options will be covered in great detail in Part II. For now, here's how to use the targeting commands. A shotcut of <code>/target</code> is <code>/tar</code> so (<code>/target</code> ... = <code>/tar</code> ...). The most basic targeting command (unsurprisingly) is /target. Its use is as simple as /target Cogwheel /target does a closest match which means if you do /target Cog and someone is standing near you (and no one named Cog is) it will target that someone named "Cogwheel". This is a plus or a minus depending on your situation. Unfortunately, it will also target irrelevant units (like corpses). This makes macros like the following much less useful than they might first appear. /target Blackwing Mage /cast Curse of Agony If no Blackwing Mages are around, this might target someone in your raid who happens to have the letters B and L in their name. While they're safe from the wrath of your curse, it's still a bit disconcerting. Another problem is that it may target something 100 yards behind you that you don't really care about. (Patch 2.3 added the [[#targetexact|/targetexact]] command to eliminate part of the problem.) In addition to specifying the name of someone you would like to target, you can also provide a unit ID. Unit IDs are a way to identify a particular character, mob, NPC, etc. For instance, your current target can always be accessed by the "target" unit ID (obviously not the most useful for the command we're discussing at the moment :P). You yourself are accessed by the "player" ID, and if you have a pet it would be referenced by "pet." You can also append "target" to the end of any valid unit ID to arrive at that unit's target. There is a joke about Kevin Bacon involving a macro like: /target targettargettargettargettargettarget [[UnitId]] has a full list of allowed IDs. ===Other targeting commands=== Here is a brief overview of the other targeting commands: ====/assist==== By itself, assist targets your target's target (e.g. if you are targeting someone, and that someone is targeting Iriel, /assist would make you target Iriel). You can also provide a name or unit to /assist and you will assist the specified entity: /assist Cogwheel There is an interface option which will automatically start you attacking if you end up with a hostile target. ====/cleartarget==== Leaves you with no target ==== /targetexact==== Targets a unit with the exact name listed. If the name is spelled wrong or that unit is not near you, your target will not be changed. ====/targetlasttarget, /targetlastfriend, /targetlastenemy==== As the names suggest, these commands will target your previous target, your last targeted friend, or your last targeted enemy. If you previously had no target, this command will do nothing. ==== /targetenemy, /targetfriend ==== These commands cycle through the specified type of unit. /targetenemy is like pressing TAB, and /targetfriend is like pressing CTRL-TAB. You can also add a parameter of 1 which reverses the direction of the cycle (/targetenemy 1 is like pressing SHIFT-TAB). '''Note:''' You can only use these commands '''once per macro'''. /targetenemy /targetenemy 1 /targetfriend /targetfriend 1 ==== /targetenemyplayer, /targetfriendplayer ==== These commands cycle through the specified type of player controlled units. They behave just like /targetfriend and /targetenemy except they will only target other players, ingnoring computer controlled units like NPC's mobs, pets, minions, creations, etc. They're mostly useful for PvP. Like /targetenemy, you can add a 1 to reverse the direction. /targetenemyplayer /targetenemyplayer 1 /targetfriendplayer /targetfriendplayer 1 '''Note:''' You can only use these commands '''once per macro'''. ====/targetparty, /targetraid==== Cycles through your nearest party or raid members. Like /targetenemy, you can add a 1 to reverse the direction. /targetparty /targetparty 1 /targetraid /targetraid 1
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)