wow gold

MACROS - How To
Credit: Drubbed of Eldre'Thalas-US, GreenRose of Dath'Remar-US

Macros
The purpose of a Macro is to allow you to create some very simple custom actions or tasks, based on the existing game actions. A macro is just a sequence of slash commands, which are executed in order when you execute the macro. To create a new macro, either type "/macro" (without the quotes), or click on the speech bubble next to the chat box and select macro. You can then give a macro a name, an icon and type in a few lines of slash commands. The macro is created in the form of an action that you can drag onto your hotbar. You can activate the macro by clicking on the resulting button on the hotbar.

An example macro would be:

/cast Fireball(Rank 1) /yell "I am frying it!" This macro merely casts a fireball, and then yells for everyone to hear that you have done so.

Macros have some severe limitations, and are only intended for very very simple tasks. The most important limitation is that it is difficult to cast more than one spell at a time using a macro (although it is possible, using API_SpellStopCasting). This limitation exists so that macros can't automate too much for you. You can have as many other commands within the 256 character limit as you like.

Here is a quick guide on how to make macros:

 

type /macro to open the menu in game.
Create a New macro for all your alts or the current toon by click on the General/Charactor tab
Click on New Macro.
Choose a name an icon for your macro.
Type your command in the text box. (note, it doesn't have a save button, thus be careful on wha you edit.)

Drag your macro to the action bar.
Click to use!

Learning about Macros

Standard slash commands that you type in the chat window can be used in macros. Blizzard has made additional commands available (which can be run in the chat window, BTW) called API commands.
Alternatively, a series of commands can be saved in a Macro, and executed one-after-the-other.

Syntax
/command [option] action; [option1,option2] action

The command format for '/cast' is:

/cast [<first set of options>] <first spellname>; [<second set of options>] <second spellname> ; [<third set of options>] <third spellname>; ...

Some additional tricks you can do with the options: You can add 'no' to the beginning of any option (except target) to invert it, i.e. 'nocombat' will only work if you are NOT in combat. Separating options with a comma ',' will act like an 'and' statement; if both options are true, it executes. Separating options with a slash '/' will act like an 'or' statement; if either option is true, it executes.

Macro Icon
Selecting the Icon in the Macro Editor will force the macro to present the icon of the current spell that spell feedback is being given for.

Macro Feedback
# and - are comment prefixes in macros
A macro that starts with # show <item or spell> shows feedback for that spell, # show none shows no feedback.
Otherwise the first /cast, /castrandom, /castsequence, /use, or /userandom command is used to select the feedback spell
Sequences actually cycle the item/spell they show feedback for to match the next in seqence.
A question mark macro icon is available, selecting that will cause the feedback spell/item's icon to be used.
Spell Casting
When casting a ranked buff spell that's too high a level for a friendly target the game will automatically use the highest appropriate rank of the spell instead.
Toggleable abilities will have a 1.5 second delay after being cast before they can be cancelled by clicking on them, to prevent accidentally canceling them. You can still right click a buff to cancel it anytime.
Logic
The way a macro works now is like this: The first set of options are checked. If they are true, then the first spell is cast. If they are false, the next set of options are evaluated, and if true, the next spell is cast, and so on. However, you must keep in mind that only one spell will be cast. As soon as a set of options evaluates to true, the game will cast the corresponding spell, and that line of the macro will be done.

The first attempted cast in a macro that fails (for whatever reason - e.g. cooldown not available, out of range, line of sight, nothing to dispel, can't cast harmful spell on friendly taret) will prevent further casts in the macro. Only some of those may be checked in the macro condition.

Abilities that do not trigger a global cooldown do not trigger the "no more spells in the macro may cast" rule, provided a /stopcasting follows them. This is true even if the cooldown (trinket or spell) isn't available. Further, these UI errors can be surpressed temporarily in the macro.

The /cast, /use, /cancelaura, /changeactionbar, /equip, /target, /focus, /assist, /targetenemy, /targetfriend, /targetparty, and /targetraid commands can be given multiple actions and conditions on which to use those actions. The first matching action will be used.

Item names can be used interchangeably with spell names in /cast, /castrandom, and /castsequence.

Poisons, feeding your pet, etc. will be even easier to macro: /cast Feed Pet then /use Dry Pork Ribs. You will also be able to click on food in your action bar when you are targeting Feed Pet and other item targeting spells.

If you have multiple spells you want to cast with a single button, you should use /castsequence and hit the button multiple times. They cast one after another, with cooldown of course. Naturally you can also mix in /use commands.

Commands
General
/cancelaura <auraname> - Cancels buff with corresponding name i.e. /cancelaura Lifebloom would remove the Lifebloom buff from you
/focus - sets your focus target to your current target
#showtooltip <spell> - Shows Tooltip for the listed spell
#show <spell> - Shows macro feedback for the listed spell
/stopmacro - terminates a macro's execution
Action bar
/changeactionbar <num> and
/swapactionbar <num1> <num2>
Attacking
/startattack [unit]
/stopattack
Buffs/Auras
/cancelaura name - cancels an aura as if it were right clicked
/dismount - dismounts you from any kind of mount
Buttons
/click ButtonName [mousebutton]
Casting
/cast <spell>
/castrandom <spell1>, <spell2>, <spell3> will attempt to cast a randomly selected one of the specified spells
/castsequence <spell1>, <spell2>, <spell3> will cast spells sequentially
/stopcasting will cancel the animation of item use, abilities, and spells, allowing for more than one of these to be used simultaneously depending on global cooldown
Items and Equipment
/equip <itemname>
/equipslot <slot> <itemname>
1 is Head, 2 is Neck, 3 is Shoulder, 4 is Shirt, 5 is Chest, 6 is Waist, 7 is Legs, 8 is Feet, 9 is Wrist, 10 is Hands, 11 is Top Finger, 12 is Bottom Finger, 13 is Top Trinket, 14 is Bottom Trinket, 15 is Back, 16 is Main Hand, 17 is Off-Hand, 18 is Ranged, 19 is Tabard, 20 is Ammo,

/use <itemname>
/use <slot>
/use <bagid> <bagslot>
/userandom <item1>, <item2>, <item3> will attempt to use a randomly selected one of the specified items
list all equipped items (remove line breaks):
/script for s=1,23 do l=GetInventoryItemLink("player",s); if (l) then a,b,c,d,e,f,g,h,i,j=GetItemInfo(l); DEFAULT_CHAT_FRAME:AddMessage( format("Slot %s: %s (%s/%s), level %s, rarity %s;", s, b, f, g, d, c)); end; end;

Pet control
/petaggressive
/petattack
/petautocaston <spell>
/petautocastoff <spell>
/petdefensive
/petfollow
/petpassive
/petstay
Targeting
/assist
/clearfocus
/cleartarget
/targetlasttarget
Target Cycling
/targetenemy
/targetfriend
/targetparty
/targetraid
Castsequence
It allows you to set up a series of spells to cast one after another, on each subsequent click of the macro. When it gets to the end, it goes back to the beginning. The format is:

/castsequence [<options>] reset=<#>/target/combat <spell1>, <spell2>, <spell3>
The reset line can specify a number of seconds after which a sequence resets, or if it should reset on target change or leaving combat.
The sequence tracks the 'next' spell in the sequence until it resets, the next spell only advances on a successful cast.
You can specify a conditional at the start of the command before the reset to filter whether the sequence is used (You cannot use per-spell conditionals)
You can specify items as well as spells
If the spell fails to cast (due to cooldown, out of range, not enough mana, whatever) then the sequence does NOT go to the next spell. The next time you click the macro, it'll try to cast again. (NOTE: A resist, dodge, parry, etc does NOT count as a failed cast. The spell/ability successfully went off, it just missed.)

Castsequence Examples:

/castsequence Frost Nova, Blink

The first time you click it, you Frost Nova, then you click again and Blink away.

/castsequence [combat] Frost Nova, Blink

Same as above, but only if you are in combat.

/castsequence reset=24 Frost Nova, Blink

The first time you click it, you Frost Nova. If you decide not to Blink, after 24 seconds it will reset back to Frost Nova. Since Frost Nova's cooldown also happens to be 24 seconds, it'll be ready to use again.

/castsequence Corruption, Immolate, Curse of Agony

You can just push that button three times and cast all three DoTs.

/castsequence reset=combat/target Corruption, Immolate, Curse of Agony

Any time you change targets (like, if the old target is almost dead and you want to start on a new one), or any time you leave combat (perhaps the critter died before you finished casting all the dots), it resets your sequence for you, leaving you ready to start over.

Options
Note: "," combines options by boolean And; "/" combines by boolean Or; prefacing an option with "no" e.g. "nochanneling" from "channeling", negates it.

actionbar:<number> - Evaluates 'true' if the current actionbar is the same as the listed one.
button:<#> - Evaluates 'true' if the selected button was used to 'click' the spell, defaults to 1 (see below).
channeling:<spell> - Evaluates true if you are channeling the spell listed. With no spell listed, it evaluates true if any spell is being channeled.
combat - Evaluates 'true' if you are in combat.
dead - Evaluates 'true' if your target is dead.
equipped:<invslot>|<itemclass>|<itemsubclass> - Evaluates 'true' if item is equipped. Item can be any valid inventory slot, item class or item subclass.
exists - Evaluates 'true' if your target exists.
group - evaluates true if you are in a group
group:party/raid - evaluates true if you are in the specified type of group
help - Evaluates 'true' if target is friendly
harm - Evaluates 'true' if target is hostile
indoors, outdoors - Evaluates 'true' if you are indoors or outdoors, respectively.
modifier or modifier:shift|ctrl|alt - Evaluates 'true' if the selected key is held down when the command is executed.
mounted, swimming, flying - Evaluates 'true' if you are mounted, swimming, or flying, respectively.
party - evaluates true if the target is a member of your party
pet:<pet type OR pet name> - Evaluates 'true' if the pet exists. Takes pet type (Owl, Bear, Imp) or pet name (Fluffy, MrBigglesworth). With no modifier (i.e. just [pet]) it evaluates 'true' if ANY pet exists.
raid - evaluates true if the target is a member of your party or raid.
show <spell>- Shows macro feedback for the listed spell
stance or stance:# - Evaluates 'true' if you are in a stance, or are in a particular stance (see below)
stealth - Evaluates 'true' if you are stealthed.
target=<unit> - Special option. It changes the target from the default of "target" to any valid UnitId.

 

Equipped Option
The [equipped] option also works the same way, but it's a bit trickier. The argument can be either an Inventory Slot (see below), an item type, or an item subtype. For a list of item types and subtypes, check ItemType.

A List of Inventory Slots:

Two-Hand
Bag
Shirt
Chest
Back
Feet
Finger
Hands
Head
Held In Off-hand
Legs
Neck
Ranged
Chest
Off Hand
Shoulder
Tabard
Thrown (ranged slot items like thrown daggers)
Trinket
Waist
One-Hand
Main Hand
Off Hand
Wrist
Some equipped examples:

/cast [equipped:Two-Handed Swords] Mortal Strike; Heroic Strike

This will cast Mortal Strike if you are using a 2hand sword.

/cast [equipped:Two-Handed Swords/Two-Handed Maces/Two-Handed Axes/Polearms] Mortal Strike

This uses the '/' modifier to set up an 'or' condition. This macro will cast Mortal Strike if ANY of those types are equipped.

/cast [equipped:Shields] Shield Bash

This will cast Shield Bash if you have a shield equipped.

/cast [equipped:Shields, equipped:Daggers] Shield Slam

This will cast Shield slam only if you have a dagger AND a shield equipped.

/cast [noequipped:Shields, equipped:Off Hand] Rampage

This will cast Rampage if you do NOT have a shield equipped, AND you have something in the Off Hand slot. In theory, this macro will only activate if you are dual-wielding.

Button Options
The option [button:<x>] works similarly to the modifier button. Normally, if you left-click a button, it performs whatever action is in that spell, in our case a macro. However, if you set the button option, you can change the behavior of a particular macro.

The default button is 1, the Left Mouse button. Note that when you activate a macro via a keybinding, it treats it like a Left Mouse button click. The numbered buttons are:

- 1 or LeftButton
- 2 or RightButton
- 3 or MiddleButton
- 4 or Button4
- 5 or Button5

... or any of the buttons remapped by the secure state headers. I don't know what this last bit means, to be honest, I'm simply quoting slouken.

/cast [button:2,target=player] Flash Heal; [help] Flash Heal

This macro would cast Flash Heal on a friendly target, OR if you clicked it with the right mouse button, it would cast Flash Heal on you.

Focus
Focus is a feature allowing you to save a target. Example:

/focus target

...will save your current target as your focus. This means that at any time you can use "/target focus" to target the unit you designated with "/focus target."

Focus supports option parameters. Example macro:

/cast [target=focus,exists] Polymorph
/castrandom [target=focus,exists] Polymorph, Polymorph: Pig, Polymorph: Turtle

If you want a random Polymorph

This works like your "personal" raid icon which makes it easy to keep track of sheeps etc.

Another useful example of using focus is a follow macro. Example:

/focus [help] target /target focus /f

this will focus on a friendly target and follow them, but if the target isn't friendly or there is no target it will follow your last target.

Assist Focus
If no focus has been set and the macro is Clicked, you will receive a UI message stating "Unknown Unit."
If you click the macro while holding down the ALT key, your target will receive a white glow around their picture frame.
If you have set your Focus and just Click the macro, you will assist the MT/MA and target his or her target.
/focus [modifier:alt]
/stopmacro [modifier:alt]
/assist focus

Hover Targeting
Here is an example of how to dynamically cast spells on different players without having to target them, but by just hovering your mouse cursor over a protected unit frame (in this case a party/raid/target/targettarget unitframe). Example:

/cast [target=mouseover,exists] Healing Touch; Healing Touch

This macro will cast Healing Touch on the party member whos unitframe is being hovered over by your mouse, regardless of your current target. This works with modifier keys and can do different stuff if you are not hovering over a unitframe.

Macros have a 255 character limit, so the example here is not enterable. For illustration, however, here is an example of a more advanced macro:

/cast [target=mouseover,exists,nomodifier:shift/ctrl/alt] Swiftmend; [target=mouseover,exists,modifier:shift] Healing Touch; [target=mouseover,exists,modifier:ctrl] Rejuvenation; [target=mouseover,exists,modifier:alt] Regrowth; [modifier:ctrl] Cat Form; [modifier:shift] Dire Bear Form; [noswimming] Travel Form; [swimming] Aquatic Form

This macro would cast Swiftmend/Rejuvenation/Regrowth/Healing Touch if your mouse is hovering over a UnitFrame depending on which modifier keys you have pressed down. If your mouse, however, is NOT over a Unit Frame (but some other random place on the screen) it will shapeshift depending on the options you specified. In other words, you will technically have put all your standard healing spells and shapeshifts into a single button who acts differently depending on if your mouse is over a unitframe or not and depending on which modifier keys you use.

Modifier
Modified clicks by default are not set up to do anything, so that addons can easily extend them.

This predates the conversion of the unit frames and action buttons to secure action buttons, so now it's easy to extend them to support modified clicks.

/script PlayerFrame:SetAttribute("*type", "target");

... etc.

Shift click defaults to picking up actions from the action bar, so if you want to use the shift key, you'll need to explicitly enable it:

/script ActionButton1:SetAttribute("shift-type", "action"); ... etc.

It would be very easy to make an addon that does this for all of the unit frames and action buttons. In 2.0.2, the modified clicks work the same as unmodified clicks, but I wanted everyone to know how to do it themselves if they wanted to do it sooner.

Remember that for key bindings, SHIFT-N and CTRL-N are already bound by default in the keybinding UI.

Stance Options
Stances work the same way. If no stance number is given, then it evaluates to 'true' if the player is in any stance. (Note that for Warriors, you are ALWAYS in some stance). If a number is given, it checks to see if that form is currently active.

Each class has different numbers for it's stances. Here is a list of stances and their numbers:

Stances Class: Warrior Priest Druid Rogue Shaman
Stance:1 Battle Shadowform Bear Stealth Ghost Wolf
Stance:2 Defensive Aquatic
Stance:3 Berserker Cat
Stance:4 Travel
Stance:5 Moonkin/Tree/Flight Form
Stance:6 Flight Form

/cast [stance:1] <Battle Stance Ability>; [stance:2] <Defense Stance Ability>; [stance:3] <Berserker Stance Ability>

Generic Stance Macro: Replace <* Stance Ability> with whatever you want.

Paladin Auras are no longer treated as Stances by the Macro Option system.

Keep in mind that if you skip a stance (like a Warrior who never does the Defensive Stance quest) then your stance numbers will drop down, i.e. Berserker Stance would be stance 2.

Some stance examples.

/cast [nostance] Bear Form

If you are not in a form, this will shift you into bear form.

/cast [stance:1] Overpower; [stance:2] Sunder Armor; [stance:3] Whirlwind

Will cast Overpower in Battle stance, Sunder Armor in Defensive, and Whirlwind in Berserker stance

/cast [stance:1] Growl; [stance:3] Claw
Will cast Growl in Bear form, or Claw in Cat form.

/cast [nostance:3] Cat Form

If you are not in a form, this will shift you into Cat Form. If you are currently in Cat form, this will NOT shift you out.

Target Options
The [target=unit] is a special option. Instead of evaluating to 'true' or 'false', it changes the target of the following spell AND the target of the other options. "Unit" can be any valid unit type, i.e. "player", "target", "targettarget", "party1", "party1target", etc etc.

Keep in mind that every spell has a default target of "target". So, for example:

/cast [help] Greater Heal

is the same as:

/cast [target=target, help] Greater Heal

Unless you add in a [target=unit] option, the default will be your current target.

Possible examples of [target=unit]:

/cast [target=player] Flash Heal

This spell will always cast flash heal on yourself. Note that your current target will be unchanged.

/cast [help] Flash Heal; [target=targettarget] Flash Heal

This will cast Flash heal on your target if it is friendly, OR it will cast Flash Heal on your target's target.

/cast [help, combat] Flash Heal; [help, nocombat] Greater Heal; [target=targettarget, help, combat] Flash Heal; [target=player] Greater Heal

This will either 1) Cast flash heal if the target is friendly and you are in combat, 2) cast greater heal if the target is friendly and you are NOT in combat, 3) cast Flash Heal on your target's target if you are in combat and that unit is friendly, or if none of those conditions is true, it will cast Greater Heal on yourself.

If you use the unitid "none" it acts as if you had NO target. For example:

/cast [target=none] Dispel Magic

This would cast Dispel Magic and then ask for a target, regardless of whom you have targetted currently.

 
 
Copyright © 2007-2008 www.wowgold-buy.org All rights Reserved. replica handbags Terms of Service   Privacy Policy
Welcome to wowgold-buy.org's Burning Crusade beta coverage! buy wow gold sell wow gold contact us