此站点大量使用JavaScript。
请在您的浏览器中启用JavaScript。
正式服
PTR
10.2.5
PTR
10.2.6
Macro Guide
来自 Anshlun
[Last Updated]:
2021/08/03
变更日志
补丁:10.2.6
目录
评分:4.7/5
(
45
投票)
指南导航
评分:4.7/5
(
45
投票)
Macro is a tool that has been present in World of Warcraft since its inception. The base concept of a macro is to perform more than one action at a time, in order to easier accomplish a task or really for any reason. All macro commands start with a forward slash ( / ) to separate them from normal text actions. In this guide, we will go over the basics of macros and how to start creating your own macros! We also list the most popular macro constructions so you can build more advanced macros by yourself.
Basics
Macros have a screen dedicated to themselves. This screen is accessible via the Game Menu (Shortcut
Esc
) and then selecting
Macros
or by typing
/macro
and hitting
enter
in chat. From this screen, you can access all the main information about your macros.
All macros you create are saved in Blizzard's server and are bound to your account or character, meaning you can access it from different computers and still retain all macros created. At any given time, an account might have
120 macros
saved, plus
18 macros
saved for each character. Account macros, as the name indicates, are shared by all your characters, while character ones aren't visible by other characters in your account once saved.
Creating a Macro
In order to create a macro you must enter the
Macro Screen
, then press the
New
button. By doing so you open a new window in which you must name your macro and select an icon for it. You can select any icon from the icons present in the game.
There are some macro directives that we will cover below that allow you to override both name and icon shown by the macro, so you don't need to stay too long picking them, you can name every macro just with a blank space and have the icon be the default question mark without any problems. if you ever want to
rename
your macro, just select it in your macro list and click on
Change Name/Icon
After selecting a name and an icon, you can drag the macro from the Macro Screen to your action bars to use it when you hit a keybind, like a normal spell. The next step is to write your macro!
Your First Macro
One of the most basic macros you can write is to announce which spell you are using, which can be useful for interrupts and can be written as
/say I'm casting Mind Blast
/cast Mind Blast
Another type of useful macros can be for both using a spell and cancel it with the same button, used normally with defensive spells like
寒冰屏障
or
消散
, that reduce or remove your ability to deal damage. Hitting the macro button once will cast the spell, hitting it again will cancel it. Take care, if you spam that button you may cancel it immediately after the cast!
/cancelaura Ice Block
/cast Ice Block
Another useful macro is to cast a certain spell only on a given target. For instance, you may want to be damaging one main target and interrupt another. For that, you can set this interrupt target on
Focus
, by typing
/focus
while targeting that target (which can be done by a macro!). Then you can write the macro
/cast Kick
In later sections, we will cover more about macro modifiers!
Capabilities and Limitations
A macro can home many different commands and functions, including, but not limited to, emoting functions, spell casts, UI calls, and addon functions. However, there are some limitations, macros cannot use tools not accessible to players normally, plus they can only trigger one global cooldown, which, when done, cancels the remainder of the macro. Macros also cannot be programmed, that is, they cannot make smart decisions for the player, like "heal the target with least HP".
Most used Slash Commands and Modifiers
Here you will find a list of the most popular slash commands supported on macros and their functionalities! A little trick you can do is to add
#showtooltip
to the start of a macro to have the macro behave as if it was the ability from the spellbook itself, overriding names and adding result spell's tooltip shown in the macro.
Chat/Emote Commands
These actions do not perform any actions, thus not causing combat and only have cosmetic value.
/e
- (or /emote) Prints the message after as if your character had emoted it.
/s
- (or /say) Your character will say the message after the command.
Combat Commands
These commands execute actions that are used mostly in combat-focused macros.
/stopcasting
- Immediately stops your current spell cast or channel, if happening.
/targetlasttarget
- Changes your target to the last unit you had targeted.
/cast
- casts the spell with the name input after it from your spell book. (i.e. /cast Fireball )
You can also have modifiers on spell casts, which will appear between the
/cast
command and the spell name within brackets ( Kick. You can have multiple modifiers, linked by commas (,) , which need all to be true to happen, or have different groups of modifiers, in different brackets. For instance /cast will cast the
火球术
at your focus target if it
exists
, if it
isn't dead
and it is
an enemy
, otherwise the cast will happen on your current target.
Target Modifiers
Adding a target modifier to your macro will change your current target to the one specified if its
conditional
is true.
@
(read 'at') can be replaced by
target=
in every command.
@player
- Targets the player.
@target
- Targets the player's current target.
@mouseover
- Targets the spell on the target that the mouse is currently hovering.
@cursor
- Targets the spell in the terrain the mouse is currently hovering (only available for spells with reticle targeting, like
群体驱散
or
暴风雪
).
@focus
- Targets the focus target.
@targettarget
- Targets the target's target. For instance, when used targeting a Boss, it will target the tank or whoever the boss has targeted in that instant.
@boss1
- Targets the first unit in the Boss frames. Usually only available during
Dungeon and Raid
encounters. There are more variants like boss2, boss3, etc.
@arena1
- Targets the first unit in the Arena frames. This is a
PvP
-only modifier, usually only available during arena matches. There are more variants like arena2, arena3, etc.
@pet
- Target the player's pet.
Conditionals
All these conditionals can be used to decide which action to be taken. You can add
no
in front of all of them to have them have them behave the
exact
opposite. For instance,
noharm
is true for any target that isn't an enemy, but that could include targets that you can't
help
, like neutral NPCs.
pet
- true if the player has a current pet.
combat
- true if you're in combat.
harm
- true if the target for the cast is an enemy.
help
- true if you can aid the target for the cast.
dead
- true if the target for the cast is dead.
exists
- true if the target for the cast exists.
channeling
- true if you are currently channeling a spell.
button:number
- (or
btn
) used to check with which mouse button you activated the macro. is the default, left button, right, middle. For mouses with more buttons the number of them button follows the pattern for the option.
talent:Row/Column
- true if you have the talent for the Row/Column combination selected. For instance, will be true if you have the middle talent selected for the final row of talents.
equipped:slot
- (or
worn
) true if you have an item equipped in the slot. For instance will be true if you have a chest piece equipped.
spec:number
- true if you're currently in the specialization given by the number. Specializations are ordered in alphabetical order and can be checked in the Specializations Menu.
group
- true if you are currently in a group. Can be specialized to or .
indoors
- true if you are currently in a position that is considered indoors.
outdoors
- true if you are currently in a position that is considered outdoors.
flyable
- true if you are currently somewhere you can fly.
mounted
- true if you are currently mounted.
flying
- true if you are currently flying.
swimming
- true if you are currently swimming.
Key Modifiers
mod:shift
- true if the keybind was pressed while the
SHIFT
key was pressed.
mod:alt
- true if the keybind was pressed while the
ALT
key was pressed.
mod:ctrl
- true if the keybind was pressed while the
CTRL
key was pressed.
General Commands
These commands can be used for both combat and non-combat situations.
/run
- (or /script) Execute the message after it as a LUA script (scripting language present in WoW addons and scripts.
/use
- uses the item with the name written after the command. Can also be used with numbers, which will cause it to use the item equipped in the slot of that number.
(i.e.
/use Potion of Prolonged Power
or
/use 14
to use your second trinket)
1 - Head
2 - Neck
3 - Shoulder
4 - Shirt
5 - Chest
6 - Waist
7 - Legs
8 - Feet
9 - Wrist
10 - Hands
11 - Finger 1
12 - Finger 2
13 - Trinket 1
14 - Trinket 2
15 - Back
16 - Main hand
17 - Off hand
19 - Tabard
Advanced Guides
This guide covers the basics you need to know about to create your own macros, but, if you would like to read more about them, make sure to check out Adreaver's guide on the
Official WoW Forums
. If you would like example of macros for your class, you can check Elvenbane's
post on the Official Forums
.
[Get Wowhead]
高级会员
[$2]
[A Month]
[Enjoy an ad-free experience, unlock premium features, & support the site!]
评论
评论来自
mymy379
Excellent guide! All the basic info conveniently placed in 1 place (instead of digging through wowpedia pages like I normally do), in an easy to read format.
Also, Macro Menu can be accessed with just '/m' for maximum lazyness :P
Edit: Just noticed the guide is missing some specialized conditionals, full list can be found
https://wow.gamepedia.com/Macro_conditionals
, in addition to links already present at the bottom of the guide.
Edit2: WoWwiki moved,
https://warcraft.wiki.gg/wiki/Macro_conditionals
is far likelier to receive any further updates.
评论来自
bleuwolfe
thank you thank you THANK YOU for this guide, you have no idea how long I've been wanting one so I can make up my own (working!) macros instead of having to search for someone else posting one for something I want to do.
And anyone who's never tried a macro should really give it a spin, they make life so much easier :)
评论来自
Aprune
Nice guide, but missing some elements :
Could explain the meaning of
brackets
, especially the consecutive ones. Same for the use of consecutive options, separated with a
semicolon
.
Missing the
form
condition, which is greatly useful for Druids
(but for Shadow Priests too, and Warriors if stances are getting back)
One error though :
pet
- true if the player has no pet currently.
should be the other way around.
评论来自
Gothy
Saving this and coming back to it later. :D
评论来自
Shurai
why no druid form's under conditions?
评论来自
509794
/focus command does not work in the current Classic patch
评论来自
Aerynsun8449
I have been trying to get the nodead to work with /target with no success. I've tried;
/target Shadow Panther
/target Shadow Panther
/target Shadow Panther
Everything I try targets the Shadow Panther I just killed. How do I get it to ignore the dead ones?
评论来自
ArxonHavenloft
So is there a way in Classic to format a Talisman of Ephemeral Power macro in this manner:?:
-If Cooldown(TOEP) = 0
then /Use TOEP
else /Cast ShadowBolt(Rank 9).
评论来自
kelitaur
Can an "instant" from the Heart of Azeroth neck piece be macro'd?
评论来自
EatFish
Hi Lovely guide
I tried and tried.. but no cigar-
Any chance anyone could help me out with a macro for my rouge=?
I tried to make a countdown macro for using my Shroud of Concealment, but alas no luck.
no problem in getting.
/s Shroud up
/cast Shroud of Concealment
to work
But I cannot get a countdown timer to say when shroud is running out.
I do not want an addon for just this.
In advance.
Thanks for any help/suggestions
评论来自
Boondoggles
/cast ' is doing.
In another comment, someone asked about having multiple sets of brackets, semicolons, etc. I will try to explain that here:
/use spell1; spell2;spell3;spell4
- In any set of 'conditions', you are looking at an all-or-nothing. In the case of 'moreconditions', spell2 will only be /used if ALL of the 'moreconditions' are met.
- Inside a 'set of conditions'/square-brackets, you can view the commas as the word 'AND'. E.g. "/use Rejuvenation" essentially means "use rejuvenation @ a-target-if-I-have-one AND I can help said target"
- However, spell1 has two sets of conditions, which is essentially two chances at an 'all-or-nothing', or in logical/coding terms, an 'or'. If either 'setofconditions' is evaluated to 'true', or 'anothersetofconditions' is evaluated to true, spell1 will be /used, otherwise, it will go on to check further into the macro
- The semicolons can be largely viewed as 'else' or 'else if'... in the example above, the macro is going to always/eventually try 'else spell4' if all of the previous conditionals in the same line had failed
tl;dr if there multiple sets of without semicolons before a spell/item/whatever name, it is saying if ANY of these are true, do the thing, otherwise a semicolon denotes an 'else' or 'else if', indicating a new set of evaluations will commence for the next (IF ANY!) conditions
评论来自
Unaffiliated
(Tested 9.1 Shadowlands) on a hunch I tried and confirmed that there is currently a macro conditional for Warmode, but only as a generalised spec, so you can’t have it change automatically with your talent selections.
/cast ability
Also
/cast ability
I hope this helps anyone else searching for macro solutions.
评论来自
alanwelch91
can you add a bit on castsequence macros?
评论来自
RealRevChris
I do not know what Dragonflight has broken, but I can not get the
/cast SPELL1, SPELL2, SPELL3, SPELL4
or &several others. The changes the macro button, but just shows a "?" & no spell. Anyone figure this out?
评论来自
Kessyra
Can anyone help me. I would like both spells to work @mouseover but I'm not sure how to do this. This one doesn't work. Barbed shot will cast at mouseover but that overrides Kill Shot.
Thank you
/use Barbed Shot
/castKill Shot
评论来自
morituri
Please excuse my ignorance. Why many macros begin with the "showtooltip" line?
评论来自
Raffo42
Something I just spent way too long on:
When turning a targetable AoE into an instant @cursor, it of course works with
/cast Ring of Peace
It even works just like that with most modifiers:
/cast Ring of Peace
But sometimes, the cast with one specific modifier (for me it was alt) is cast @player, even tho the macro still says @cursor?
/cast Ring of Peace
Go to menu > options > gameplay: combat > set the "self cast key" to "none" and free your modifier!
贡献
在发表评论前,请留心以下提示:
您的评论必须为简体中文,否则将会被删除。
不知道如何发评论?参考我们的
格式指南
!
发表前最好先自行校对一次。
有问题可以访问我们的
论坛
来寻求帮助。
发表评论
你没有登录。
请登录
或者
注册账号
来添加你的评论。
使用下面的表格浏览您的截屏。
[Screenshots containing UI elements are generally declined on sight, the same goes for screenshots from the modelviewer or character selection screen.]
质量越高越好!
[Please review our
Screenshot Guidelines
before submitting!]
您没有登录。请
登录
后提交截屏。
将视频URL输入下列表格即可。
URL:
支持:仅限 YouTube
说明:您的视频需通过审核才能在站点上显示。
我们用
Wowhead 客户端
保证数据库的及时更新,向您提供额外的有趣的功能!
两大目的:
它还维护WoW的一个插件
Wowhead Looter
, 在您游戏时采集数据!
它将
采集所得数据
上传至Wowhead,保证数据库时刻掌握最新信息!
您可以用它追踪完成的任务、配方、坐骑、伙伴宠物以及头衔!
您还在等什么?立即
下载客户端
整装待发吧。