Sie sind auf Seite 1von 7

Beginners Macro resources

WowWikis Intro to Macros WowWiki: Howto Make a Macro WowWikis useful macros for every class EpicAdvice.com macros wiki Spellbinder addon GCD (Global Cooldown) explained LUA scripting language Macro Explain
How to build a macro

This is a brief guide that demonstrates how to make the most commonly used action-bar macros by building one up from basic to full-featured, with explanations at each step, using programming conventions designed to conserve as much of the 255 macro character limit as possible. But first, what exactly are macros? Macros are small, simple programs* written in Blizzards chosen scripting language, LUA, that solve several problems: Every class in WoW has many more abilities than fit on the main action bar. Macros let you consolidate these abilities into single action bar buttons, and access those abilities using modifer keys (Shift, Alt, Ctrl). Using macros you can consolidate up to 24 abilities on the easy-to-reach 1-6 keys. Macros let you combine multiple abilities so that one button push activates both, saving time. Note that this only works when no more than one of those abilities has a cast time, or is instant-cast but on the GCD (Global Cooldown). Macros let you do other things, like calculate your tanks avoidance in current gear, or find the Time-Lost Protodrake as you fly through Storm Peaks. (These are relatively complex and beyond the scope of this intro, though Ive included both examples at the end for the curious.) Step 1: Open the in-game Macro editor Hit the Game Menu button, or press Escape to open the Game Menu. Select Macro from the menu, and the Macro editor window will open. Create a macro by selecting New in the bottom right of the macro editor. Select an icon for it. Always select the red ?. Reason for that explained below. Name it anything you want, as long as it is not the same name as an ability. For example, dont name your macro Shadowbolt, name it Shdwblt, or Shadow_bolt, or Macro_Shadowbolt, or something like that. Click OK, now enter the code in the editor box. Copy and paste from one of the macros below just to see how it works.

When youve finished entering the code in the editor, save it by simply clicking the New button again, or click on any other macro icons you may have. There is no Save Button. Drag the macro onto an action bar slot, and either click it, or use the Game Menu -> Keybindings control panel to bind a key to that action bar button (or the excellent Spellbinder addon to bypass the action bar entirely and bind that macro directly to any key, even one not on the actionbar). Test it out. Step 2: The basic (useless) template The most basic macro template is this:
#showtooltip /use Shadowbolt

#showtooltip makes the red ? icon turn into the Shadowbolt icon. The red ? is just a placeholder, and will display

the icon of whatever #showtooltip instructs it to. Use /use instead of /cast to save a character, which can add up on long macros that approach the 255 character limit. This macro looks and works exactly the same as the Shadowbolt spell in your spellbook does. Drag it to your action bar, click it, and it fires a shadowbolt (if youre a warlock). Since it has no other functionality beyond the Shadowbolt spell in your spellbook, there is no point to making a macro this simple, it is only for demonstration purposes. Step 3: The basic (useful) template Now for a more useful template, that extends the basic one to include 4 levels of modifiers. This is what most action-bar ability macros share:
#showtooltip /use [mod:ctrl] ability 4;[mod:alt] ability 3;[mod:shift] ability 2;[nomod] ability 1

or without the [nomod] at the end, which is equally correct and saves a few characters (max is 255 characters for any macro):
#showtooltip /use [mod:ctrl] ability 4;[mod:alt] ability 3;[mod:shift] ability 2;ability 1

(there are some cases where inserting [nomod] is required, one of which is covered below. But most of the time it makes no difference, and you can leave it out to save character space) Hold Ctrl and press this macro, and two things will happen: #showtooltipo will convert the red ? into the ability 4 icon for as long as Ctrl is held, and ability 4 will trigger. Same with Alt and Shift. With no modifier key held, the icon for ability 1 will display on the macro, and ability 1 will trigger. If you have mispelled an ability, or do not have it in your spellbook, the red ? will display instead of the abilitys icon, alerting you to an error in your macro. You can make 6 macros with this basic template, and replace your spells on your 1-6 action bar, and it will allow you to access 24 abilities instead of 6 from that action bar, without using WoWs more clunky action bar paging function. You can further create additional macros with this template, and use the Spellbinder addon addon to bind them to any keys on your keyboard, for example those near and around your WASD or ESDF movement keys, for quick access to even more than 24 abilities. Here is an example of a real macro, using warlock abilities. The concepts demonstrated are universally applicable to all classes:
#showtooltip /use [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Summon Felguard;[nomod] Shadowbolt

Or without [nomod]:
#showtooltip /use [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Summon Felguard;Shadowbolt

Ctrl + macro : displays Bronze Drake icon, and mounts you on your bronze drake Alt + macro : displays Ritual icon, and casts Ritual Shift + macro: displays Felguard icon, and summons Felguard No modifiers + macro: : displays Shadowbolt icon, and casts Shadowbolt

Generally its best to put the lesser-used and/or the non-combat abilities with the modifier that is hardest to reach. For me, the hardest to reach modifier is Ctrl, so I put my least critical abilities, like my mount, there. Alt is the next hardest to reach, so it gets the next least-critical abilities. Nomod is obviously easy to reach, so it gets the most critical abilities. Any left over critical abilities I couldnt fit into the nomod position on all my macros go with Shift, the next easiest-to-reach modifier. Step 4: Multi-line macros You can also make macros that cast multiple abilities with a single button push, as long as no more than one has a cast time, or is instant-cast but on the GCD (Global Cooldown). For example, heres an emergency Warlock macro for when the demon is killed. Warlock minions take up to 10 seconds to resummon, which can sometimes mean the difference b/t life and death (especially in PvP). However, there is a talent in the Demonology tree called Fel Domination that reduces summoning cast time. When combined with another Demonology Talent, Master Summoner, the Warlock can FelDom summon a demon in .5s. This is a nice oh-shit button for Warlocks, however the lock has to hit 2 buttons to do this, and if they arent quick about it, the time it takes to do that can be costly. This macro combines Fel Domination and Summon Felguard into a single macro:
#showtooltip /use Fel Domination /use Summon Felguard

Instead of having to hit the Fel Domination button, and then the Summon Felguard button, the warlock can just hit this single macro to accomplish both abilities. To add to this example, if youre an Orc warlock, you can add the Orc racial ability Blood Fury to give your newly summoned Felguard a little more oomph for a few seconds:
#showtooltip /use Blood Fury /use Fel Domination /use Summon Felguard

This works b/c both Blood Fury and Fel Domination are instant-cast and off the GCD, meaning they can be instantly cast one right after the other. Summon Felguard has a cast time, meaning it has to be the last line in the macro, since anything that comes after cast-time spells or GCD instant spells are ignored by the macro. Another simple, but extremely useful for dps, example of this is the Assist Macro. It enables a dps to quickly target and focus-fire the tanks target:
/target TankName /assist

Line 1 targets the tank (you have to edit this macro with the tanks name for every run). Line 2 targets the tanks current target. Keep using it throughout the fight to make sure you stay on the tanks target. The only exception is if the tank has raid-marked the mobs in a kill order. In that case, follow the kill order, not the tanks target (sometimes the tank has to briefly target another mob besides the Skull to hold aggro on the adds). Step 5: Combine modifier and multi-line macros Now, lets combine modifier macros and multiline macros into a single macro. Doing this can cause problems if you dont construct it correctly. For example, there are several problems with the basic combined macro below, what do you think they may be?
#showtooltip /use Fel Domination /use [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Ritual of Souls;Summon Felguard

The problem is that when you use this macro, you cast Fel Domination even when youre holding Ctrl, Alt, or Shift. You dont want to blow the crucial cooldown on Fel Domination when you just want to mount your drake, or summon a party, or create healthstones, only when you summon your Felguard. To fix this, you also have to add a modifier to the Fel Domination line:
#showtooltip /use [nomod] Fel Domination /use [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Ritual of Souls;Summon Felguard

and/or
#showtooltip /use [nomod] Fel Domination /use [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Ritual of Souls;[nomod] Summon Felguard

Both of these work correctly. The key is adding [nomod] in front of Fel Domination. Whether Summon Felguard also has *nomod+ does not matter in this case. There are some rare edge cases where it does matter, but thats beyond the scope of this intro. However, there is another problem with this macro, albeit only an aesthetic one. The problem is that #showtooltip will now show the icon for Fel Domination instead of Summon Felguard when nomod is used. When there are multiple lines in a macro like this, #showtooltip always displays the icon of the first line. This can be fixed by copying the main line of the macro to the #showtooltip line:
#showtooltip [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Ritual of Souls;[nomod] Summon Felguard /use [nomod] Fel Domination /use [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Ritual of Souls;[nomod] Summon Felguard

Finally, there is one last problem. This macro will always use Fel Domination to summon a Felguard, even when you dont need it to. In fact you want to save FelDom only for emergencies. So you can modify this macro to provide two Summon Felguard options, one with FelDom and one without:
#showtooltip /use [mod:shift] Fel Domination /use [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Summon Felguard;[nomod] Summon Felguard

The above macro displays the icon for Fel Domination when Shift is held. If you prefer it to display the icon for Summon Felguard when shift is held, copy the main line of the macro to the #showtooltip line:
#showtooltip [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Summon Felguard;[nomod] Summon Felguard /use [mod:shift] Fel Domination /use [mod:ctrl] Bronze Drake;[mod:alt] Ritual of Summoning;[mod:shift] Summon Felguard;[nomod] Summon Felguard

Using this macro with nomod will summon a Felguard normally, using it while holding Shift will insta-summon the minion w/ Fel Domination.

Step 6: Target modifier macros You can also create macros that cast a spell on a specific target. Well use a Pally healing spell to demonstrate. This casts Flash of Light on the current target:
#showtooltip /use Flash of Light

This casts Flash of Light on yourself (if youre a pally), even if you have another player currently targeted:
#showtooltip /use [target=player] Flash of Light

This casts Flash of Light on your focus, even if you have someone else targetted:
#showtooltip /use [target=focus] Flash of Light

This casts Flash of Light on whoever your game cursor is hovering over (the mouseover target), even if you have someone else targeted:
#showtooltip /use [target=mouseover] Flash of Light

You can combine all into a single macro with modifiers:


#showtooltip /use [mod:ctrl,target=player] Flash of Light;[mod:alt,target=focus] Flash of Light;[mod:shift,target=mouseover] Flash of Light;[nomod] Flash of Light

Step 7: Other examples Macro Rune Strike into every combat ability macro. Since youre spamming these constantly throughout the fight, youll always activate Rune Strike whenever it procs:
#showtooltip [mod:ctrl] ability 4;[mod:alt] Obliterate /use [nomod] !Rune Strike /use [mod:ctrl] ability 4;[mod:alt] ability #showtooltip [mod:ctrl] ability 4;[mod:alt] Strike /use [nomod] !Rune Strike /use [mod:ctrl] ability 4;[mod:alt] ability #showtooltip [mod:ctrl] ability 4;[mod:alt] Strike /use [nomod] !Rune Strike /use [mod:ctrl] ability 4;[mod:alt] ability #showtooltip [mod:ctrl] ability 4;[mod:alt] Strike /use [nomod] !Rune Strike /use [mod:ctrl] ability 4;[mod:alt] ability #showtooltip [mod:ctrl] ability 4;[mod:alt] Strike /use [nomod] !Rune Strike /use [mod:ctrl] ability 4;[mod:alt] ability ability 3;[mod:shift] ability 2;[nomod] 3;[mod:shift] ability 2;[nomod] Obliterate ability 3;[mod:shift] ability 2;[nomod] Death 3;[mod:shift] ability 2;[nomod] Death Strike ability 3;[mod:shift] ability 2;[nomod] Blood 3;[mod:shift] ability 2;[nomod] Blood Strike ability 3;[mod:shift] ability 2;[nomod] Heart 3;[mod:shift] ability 2;[nomod] Heart Strike ability 3;[mod:shift] ability 2;[nomod] Scourge 3;[mod:shift] ability 2;[nomod] Scourge Strike

Why is the ! used? When Rune Strike procs, if you hit the Rune Strike button to cast it, it does not instantly cast but waits till your next melee strike to cast. However, if you accidentally hit the Rune Strike button again b/f your next melee strike, it will deactivate Rune Strike and you may miss the proc. Adding the !Rune Strike instructs the game to ignore the button press if Rune Strike is already activated and just waiting on the next melee hit, so it wont be accidentally deactivated. Having said that, this may have been changed by a recent patch, and the ! is no longer needed for these kind of abilities. However I havent tested that myself yet, dont know for sure, and still use !Rune Strike. 2. One final example of multi-line macro, is my DK Blood tank oh-shit button. When I take big damage spikes, this macro buffs my self-healing with Vampiric Blood and then uses a Runic Healing Potion. I follow up with a Rune Tap and Death Strike. This can usually get me from 20% hp to 80% in a few GCDs, and is one of the few tanking abilities in the game able to mitigate spike dmg after it happens:
#showtooltip /use [mod:ctrl] whatever;[mod:alt] whatever;[mod:shift] whatever;[nomod] Vampiric Blood /use [nomod] Runic Healing Potion

Step 8: Advanced Macros & Scripts Here are several examples of more advanced macros. These are actually scripts, rather than macros, and are more complex than the prior examples. If youre interested in learning more, I suggest starting at WoWwikis macro page. EpicAdvice.com also has a good thread on macro resources. 1. Trying for Ruby + Emerald Void in Occulus and need a macro that helps your group time your timestops? Hit this one a the start of the fight:
/in /in /in /in /in /in /in /in 12 /rw Timestop #1 NAME1 27 /rw Timestop #2 NAME2 42 /rw Timestop #3 NAME3 57 /rw Timestop #4 NAME4 72 /rw Timestop #5 NAME5 87 /rw Timestop #6 NAME1 102 /rw Timestop #7 NAME2 117 /rw Timestop #8 NAME3

2. Are you a tank and need to know what your total avoidance is? These macros will query your stats and tell you: DK: /run ChatFrame1:AddMessage(format("Avoidance with Stoneskin Gargoyle: %.2f%%",
GetDodgeChance() + GetParryChance() + 6 + 1/(0.0625 + 0.956/(floor(GetCombatRatingBonus(CR_DEFENSE_SKILL))*0.04))))

Druid: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + 5 +


1/(0.0625 + 0.956/(GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04))))

Pally: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() +


GetParryChance() + 5 + 1/(0.0625 + 0.956/(GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04))))

War: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() +


GetParryChance() + 5 + 1/(0.0625 + 0.956/(GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04))))

Find the TLPD:


/tar Dirkee /tar Vyra /tar Time /stopmacro [noexists] /w Your Name %t Is watching you! /run RaidNotice_AddMessage(RaidBossEmoteFrame,"THERE IT IS! KILL IT!", ChatTypeInfo["RAID_WARNING"]) /script PlaySoundFile("Sound\\interface\\RaidWarning.wav")

Many more at WoWwikis Macro pages.


Summary

Create multilevel ability macros with modifiers:


#showtooltip /use [mod:ctrl] ability 4;[mod:alt] ability 3;[mod:shift] ability 2;[nomod] ability 1

Cast more than one ability at a time with multi-line, multilevel macros, as long as no more than one has a cast time, or is instant-cast but on the GCD. The cast-time or GCD ability must be on the last line of the macro, since everything after that ability is ignored:
#showtooltip /use [mod:shift] non-GCD ability 1;[nomod] non-GCD ability 2 /use [mod:shift] non-GCD ability 3;[nomod] non-GCD ability 4 /use [mod:ctrl] GCD ability 4;[mod:alt] GCD ability 3;[mod:shift] GCD ability 2;[nomod] GCD ability 1

Copy the last line after #showtooltip to display the icons for the main abilities used in the addon:
#showtooltip [mod:ctrl] GCD ability 4;[mod:alt] GCD ability 3;[mod:shift] GCD ability 2;[nomod] GCD ability 1 /use [mod:shift] non-GCD ability 1;[nomod] non-GCD ability 2 /use [mod:shift] non-GCD ability 3;[nomod] non-GCD ability 4 /use [mod:ctrl] GCD ability 4;[mod:alt] GCD ability 3;[mod:shift] GCD ability 2;[nomod] GCD ability 1

*Macros are technically not programs at all, since they cannot run on their own, can only be run inside Warcraft. Which is why theyre called macros instead of programs. Related Articles: Healing with Addons: Bad Practice? Church of Macrotology: Where to Begin Welcome to the Church of Macrotology