Macros: Vanilla WoW Macros

Return to parent page for addons or more wow stuff

The following macros are useful as replacements for spells or abilities which adds some extra features. It goes without saying but please note that auto targeting can be risky in instances if you’re the spamming type. Some of the these macros are not for everyone and not always applicable in raids! You have been warned πŸ™‚

Best regards from Sandsten on Kronos!

Last updated: 2017-06-19

For chat lua tips, raid & party related macros check here!

Class specific vanilla macros index:

  1. Druid Feral Macros
  2. Druid Healing Macros
  3. Druid Cancel form on spellcast/shapeshifting macro guide
  4. Warrior Macros
  5. Mage Macros
  6. Priest Macros
  7. Rogue Macros
  8. Warlock Macros
  9. Paladin Macros
  10. Shaman Macros

Misc macro writing guides for vanilla:

  1. Auto Attack + Auto Target + Cast Spell / Use Ability – combination macro guide
  2. Self casting without “Auto Self Cast” guide
  3. Instant casting / abort current spellcasting guide
  4. Shoot Gun/Bow/Crossbow combined (warriors and rogues) macro
  5. Use Trinkets, Equipment or items in Inventory macro guide
  6. Bandage self macro with autoselfcasting disabled
  7. AQ40/Regular mount combined macro

 

Druid Feral Macros

enrage Druid Enrage + cancel buff

The spell Enrage causes you to take more damage but is really nice when tanking if you’ve specced into it in talents. In order for it to be useful while tanking you have to remove the buff quickly enough. This is annoying when you have to click the buff with your mouse to cancel. This can be done quickly in one macro where you press it once to cast, and second to cancel the buff.

/run local i=0 g=GetPlayerBuff while not (g(i) == -1) do if(strfind(GetPlayerBuffTexture(g(i)),"Ability_Druid_Enrage"))then CancelPlayerBuff(g(i)) end i=i+1 end CastSpellByName("Enrage")

enrage Druid Barkskin + cancel buff

The spell Barkskin reduces damage taken but increases casting speed. Its useful if you accidentally catch aggro but can be dangerous when you need to heal, its a tradeoff. This macro helps you quickly cancel it.

/run local i=0 g=GetPlayerBuff while not (g(i) == -1) do if(strfind(GetPlayerBuffTexture(g(i)),"Spell_Nature_StoneClawTotem"))then CancelPlayerBuff(g(i)) end i = i + 1; end; CastSpellByName("Barkskin")

tigersfury ravage Druid Tiger’s Fury + Ravage combo spammable macro

This macro will prevent accidentally overwriting Tiger’s Fury if its already active and also if it is active, attempt to use Ravage.

/run i=0 m=0 c=CastSpellByName while not (GetPlayerBuff(i)==-1) do if (strfind(GetPlayerBuffTexture(GetPlayerBuff(i)),"Ability_Mount_JungleTiger")) then m=1 end i=i+1 end if m==0 then c("Tiger's Fury") else c("Ravage") end

If you only want the Tiger’s Fury spammable without ravage you can get this one instead:

/run i=0 m=0 c=CastSpellByName while not (GetPlayerBuff(i)==-1) do if (strfind(GetPlayerBuffTexture(GetPlayerBuff(i)),"Ability_Mount_JungleTiger")) then m=1 end i=i+1 end if m==0 then c("Tiger's Fury") end

ability_druid_rake ability_druid_ferociousbiteDruid Claw / Ferocious Bite spammable macro

This macro serves as a replacement for your claw ability. When you have 5 combo points on your target it will cast Ferocious bite instead.

/run if GetComboPoints()>=5 then CastSpellByName("Ferocious Bite") else CastSpellByName("Claw") end

Same as above but with auto targeting + auto attack if you’ve followed my guide below.

/run if GetUnitName("target")==nil then TargetNearestEnemy() end if not IsCurrentAction(25) then UseAction(25) end if GetComboPoints()>=5 then CastSpellByName("Ferocious Bite") else CastSpellByName("Claw") end

 
 

Druid Healing Macros

spell_nature_faeriefireDruid Faerie Fire spammable macro

This will only cast if your current target is not already a victim to the spell. That way you can spam the spell without accidentally overwriting your fellow druids casting it. Always keep Faerie Fire up on raid bosses! This applies to the non-feral version. Don’t use this macro for casting Faerie Fire (Feral) from the feral talent tree.

/run m=0 for i=1,40 do if(strfind(tostring(UnitDebuff("target",i)),"Spell_Nature_FaerieFire"))then m=1 end end if m==0 then CastSpellByName("Faerie Fire(Rank 4)") end

spell_nature_faeriefire insectswarmDruid Combined Faerie Fire + Insect Swarm spammable macro

The above can be compacted down into a combined macro for both Faerie Fire and Insect Swarm for resto druids:

/run c=CastSpellByName function b(k)for i=1,16 do if strfind(tostring(UnitDebuff("target",i)),k)then return 1 end end end if not b("e_FaerieF")then c("Faerie Fire(Rank 4)")elseif not b("e_InsectSw")then c("Insect Swarm(Rank 1)")end

spell_nature_lightning.jpg Innervate overwrite prevention

Allows you to check if Innervate is already active on your target. This does conflict with mage arcane power as it uses the same spell icon. It’s not a big issue though but keep it in mind.

Really useful if you’re raiding together with several druids. Make sure that everyone use it and you will never waste an innervate again!

/run n=0 for i=1,40 do if(strfind(tostring(UnitBuff("target",i)),"Spell_Nature_Lightning"))then n=1 end end if n==0 then CastSpellByName("Innervate")end

Its also useful to combine with a whisper or a broadcast in your guild healing channel or raid chat. Unfortunately using LUA functions will far surpass the 255 character limit so just add this:

/w %t <<INNERVATING>> you!
/5 <<INNERVATING>> %t!

spell_nature_rejuvenationDruid Rejuvenation overwrite prevention macro

Same as above but you can use this to spam heal your party/raid members without accidentally overwriting any active Rejuvenations heal over time buffs (HOTs).

NOTE! It only works if you already have a target when clicking the spell. Clicking the spell first and then selecting your target wont work as this depends on checking initial conditions for any specific raidframe addon that you use. Know about this limitation and choose your target first. πŸ™‚

Rank 10

/run m=0 for i=1,40 do if(strfind(tostring(UnitBuff("target",i)),"Spell_Nature_Rejuvenation"))then m=1 end end if m==0 then CastSpellByName("Rejuvenation(Rank 10)") end

Rank 4

/run m=0 for i=1,40 do if(strfind(tostring(UnitBuff("target",i)),"Spell_Nature_Rejuvenation"))then m=1 end end if m==0 then CastSpellByName("Rejuvenation(Rank 4)") end

Rank 5

/run m=0 for i=1,40 do if(strfind(tostring(UnitBuff("target",i)),"Spell_Nature_Rejuvenation"))then m=1 end end if m==0 then CastSpellByName("Rejuvenation(Rank 5)") end

spell_nature_rejuvenationinv_relics_idolofrejuvenationDruid Rejuvenation / Swiftmend Combo

Same as the above but instead of doing nothing when Rejuvenation is already active, it will cast Swiftmend (If you have learned it from the restoration talent tree)

Rank 10

/run c=CastSpellByName m=0 for i=1,40 do if(strfind(tostring(UnitBuff("target",i)),"Spell_Nature_Rejuvenation"))then m=1 end end if m==0 then c("Rejuvenation(Rank 10)") else c("Swiftmend")end

Rank 4

/run c=CastSpellByName m=0 for i=1,40 do if(strfind(tostring(UnitBuff("target",i)),"Spell_Nature_Rejuvenation"))then m=1 end end if m==0 then c("Rejuvenation(Rank 4)") else c("Swiftmend")end

Rank 5

/run c=CastSpellByName m=0 for i=1,40 do if(strfind(tostring(UnitBuff("target",i)),"Spell_Nature_Rejuvenation"))then m=1 end end if m==0 then c("Rejuvenation(Rank 5)") else c("Swiftmend")end

 

Druid cancel form on spellcast (shapeshifting)

cancelform

There are addons that help you with automatically canceling shapeshifting when casting spells. A good one is Ezdismount.

However this can be a bit risky, especially when tanking in Bear form. With Ezdismount it’s easy to accidentally cancel bearform while tanking which can be fatal for your party. I prefer to only use shapeshift canceling when casting healing spells.

Copy and paste the following into a macro to cancel form of any shapeshifting:

/run for i=1, GetNumShapeshiftForms() do _, name, active = GetShapeshiftFormInfo(i) if( active ~= nil ) then CastShapeshiftForm(i) break end end

Unfortunately we only get 255 characters inside a macro and this one takes up a lot of space (151 out of 255).

As in the previous example with autoattacking above instead we can call this macro from another macro if we place it in an action bar slotID.

In the following example I will place it in action bar slotID 37.

actionbarslots

After placing the macro you can reference it in other macros with the following:

/run UseAction(37)

And then we combine it with a healing spell:

/run UseAction(37) CastSpellByName("Regrowth(Rank 8)")

This is the trick required to bypass the 255 character limitation in macros. It does take up extra action bars and macro slots though, so keep that in mind!

Because of limitations in the vanilla API you have to press this macro twice. First to cancel shapeshifting, second to start casting the spell.

 

Warrior Macros

ability_warrior_defensivestance.jpgspell_nature_ancestralguardian.jpgWarrior Tanking, Berserker Rage stance dance macro

This macro will change to berserker stance if youre not in it, use Berserker rage to become immune to fear and then change back to defensive stance as fast as possible if you spam it.
Side note: Don’t push it again after returning to defensive stance, if you do it will go back to berserker stance which is bad. (The reason for this is because further conditionals was not possible to fit within 255 characters) The macro is 252 chars long phew

/run i=0 g=GetPlayerBuff b="Berserker " f=GetShapeshiftFormInfo c=CastSpellByName t,n,q=f(3)while not(g(i)==-1)do if(strfind(GetPlayerBuffTexture(g(i)),"re_Ance"))then c("Defensive Stance")else if q then c(b.."Rage")else c(b.."Stance")end end i=i+1 end

ability_racial_bloodrage.pngWarrior Bloodrage + cancel buff

This macro is pretty much the same as the one I made for druid Enrage buff except changed for warrior Bloodrage. In difference to Enrage, Bloodrage also gets you into combat.
As you know, you can’t charge while in combat and canceling bloodrage in an emergency requires that you move your mouse and click the buff to cancel it. With this macro you dont need to do that. Just click once to enter bloodrage, and click it again to cancel the buff and get out of combat.

/script local i=0 g=GetPlayerBuff while not (g(i) == -1) do if(strfind(GetPlayerBuffTexture(g(i)),"Ability_Racial_BloodRage"))then CancelPlayerBuff(g(i)) end i=i+1 end CastSpellByName("Bloodrage")

ability_warrior_charge.jpgability_rogue_sprint.jpgWarrior one button Charge / Intercept macro

This macro will use the appropriate ability and change stances depending if youre in or out of combat. Out of combat -> Battle stance and charge. In combat -> Berserker stance and Intercept.
What it doesn’t do is check for cooldowns or available rage. It would be cool but couldn’t possibly fit withing a 255 character space.

/run g=GetShapeshiftFormInfo c=CastSpellByName t,n,bas=g(1) t,n,ber=g(3) if UnitAffectingCombat("player") then if ber then c("Intercept")else c("Berserker Stance")end else if bas then c("Charge")else c("Battle Stance")end end

 

Mage Macros

spell_nature_polymorph.jpgMouseover Polymorph without changing target

You can replace s=”mySpellName(Rank X)” with any other spell of you’re choice.

/run c=CastSpellByName s="Polymorph(Rank 4)" if UnitExists("mouseover") then TargetUnit("mouseover") c(s) TargetLastTarget() else c(s) end

Polymorph turtle:

/run c=CastSpellByName s="Polymorph: Turtle" if UnitExists("mouseover") then TargetUnit("mouseover") c(s) TargetLastTarget() else c(s) end

Alternative less compact version if you want it to register cooldowns etc using Addons like Bongos.

/run if UnitExists("mouseover") then TargetUnit("mouseover") CastSpellByName("Polymorph(Rank 4)") TargetLastTarget() else CastSpellByName("Polymorph(Rank 4)") end

spell_nature_lightning.jpg Mage Arcane Power spammable

Arcane Power cancels itself if cast again. I don’t know if this is intended or just a server side bug but this macro works around it.

/run local i=0 c=0 for i=1,40 do if strfind(tostring(GetPlayerBuffTexture(GetPlayerBuff(i))),"Spell_Nature_Lightning") then c=1 end end if c==0 then CastSpellByName("Arcane Power") end

Optional edit with the addition of also casting Frostbolt if the buff is active!

/run local i=0 t=0 c=CastSpellByName for i=1,40 do if strfind(tostring(GetPlayerBuffTexture(GetPlayerBuff(i))),"Spell_Nature_Lightning") then t=1 end end if t==0 then c("Arcane Power") else c("Frostbolt(Rank 10)") end

spell_nature_enchantarmor.jpg Mage Presence of Mind spammable

Same as above but for Presence of Mind

/run local i=0 t=0 c=CastSpellByName for i=1,40 do if strfind(tostring(GetPlayerBuffTexture(GetPlayerBuff(i))),"Spell_Nature_EnchantArmor") then t=1 end end if t==0 then c("Presence of Mind") else c("Frostbolt(Rank 10)") end

 

Priest Macros

manaShadow Priest Mind flay spammable macro

This macro will cast Mind Flay only if your current target is not already a victim to the spell. That way you can spam the spell without accidentally interrupting yourself. There is a limitation to this that you should know about: If you are 2 or more shadow priests in the same group and if one is already casting mind flay on your target, you will not be able to cast it at the same time.

/run m=0 for i=1,40 do if(strfind(tostring(UnitDebuff("target",i)),"Spell_Shadow_SiphonMana"))then m=1 end end if m==0 then CastSpellByName("Mind Flay(Rank 6)") end

 

Rogue Macros

sinister ability_rogue_eviscerate

Rogue Sinister strike until 5 combo points then use Eviscerate.

/script if GetComboPoints()>=5 then CastSpellByName("Eviscerate") else CastSpellByName("Sinister Strike") end

Same as above but with auto targeting + auto attack if you’ve followed my guide below.

/script if GetUnitName("target")==nil then TargetNearestEnemy() end if not IsCurrentAction(25) then UseAction(25) end if GetComboPoints()>=5 then CastSpellByName("Eviscerate") else CastSpellByName("Sinister Strike") end

 

Warlock Macros

Spell_Shadow_AbominationExplosion Spell_Shadow_CurseOfSargeras Spell_Shadow_RequiemWarlock DoT rotation – Apply dots when needed

This macro will apply DoT debuffs when needed. There are the same drawbacks to this as Priest Mind Flay above that it can’t distinguish between your own debuffs and fellow warlocks. Still, its quite useful for grinding or when you’re the lone warlock in group. Another limitation is the length of the macro. In order to fit the 255 character limit the debuff names have to be shortened, this could cause conflicts in case a debuff with a similar name is already applied.

Example:

Curse of Agony = Spell_Shadow_CurseOfSargeras
Corruption = Spell_Shadow_AbominationExplosion
Siphon Life = Spell_Shadow_Requiem

Order Alternative a) 1) Corruption, 2) Curse of Agony, 3) Siphon Life

/run c=CastSpellByName function b(k)for i=1,16 do if strfind(tostring(UnitDebuff("target",i)),k)then return 1 end end end if not b("ionExp")then c("Corruption(Rank 6)")elseif not b("eOfSar")then c("Curse of Agony(Rank 6)")else c("Siphon Life(Rank 4)")end

Order alternative b) 1) Siphon Life, 2) Corruption, 3) Curse of agony

/run c=CastSpellByName function b(k)for i=1,16 do if strfind(tostring(UnitDebuff("target",i)),k)then return 1 end end end if not b("w_Requ")then c("Siphon Life(Rank 4)")elseif not b("ionExp")then c("Corruption(Rank 6)")else c("Curse of Agony(Rank 6)")end

Order alternative c) 1) Siphon Life, 2) Curse of agony, 3) Corruption

/run c=CastSpellByName function b(k)for i=1,16 do if strfind(tostring(UnitDebuff("target",i)),k)then return 1 end end end if not b("w_Requ")then c("Siphon Life(Rank 4)")elseif not b("eOfSarg")then c("Curse of Agony(Rank 6)")else c("Corruption(Rank 6)")end

If you dislike all the above theres always the “dumb” rotation. This doesn’t take anything into account, it simply rotates everytime you click. Don’t click faster than the global cooldown and keep in mind your mana.

Dumb dot rotation
1. Siphon Life(Rank 4)
2. Curse of Agony(Rank 6)
3. Corruption(Rank 6)
4. Immolate(Rank 4)

/run s={"Siphon Life(Rank 4)","Curse of Agony(Rank 6)","Corruption(Rank 6)","Immolate(Rank 4)"} if q==nil then q=0 end q=q+1 if q>getn(s)then q=1 end CastSpellByName(s[q])

 

Paladin Macros

The following combine seals followed by Judgement in single macros. This enables you to spam one button instead of having to press two.

Seal of Righteousness + Judgement

This one checks for both Seal of the Crusader and Seal of Righteousness and only recasts Seal of Righteousness if none of them are active. This helps a lot when tanking.

/run c=CastSpellByName j="Judgement" q="y_ThunderB" r="y_HolyS" function b(k)for i=1,32 do if strfind(tostring(UnitBuff("player",i)),k)then return 1 end end end if b(r)or b(q) then c(j)end if not b(q) and not b(r)then c("Seal of Righteousness(Rank 8)")end

Seal of Wisdom + Judgement

/run c=CastSpellByName j="Judgement" q="y_Righteou" function b(k)for i=1,32 do if strfind(tostring(UnitBuff("player",i)),k)then return 1 end end end if not b(q) then c("Seal of Wisdom(Rank 3)")else c(j) end

Seal of the Crusader + Judgement

/run c=CastSpellByName j="Judgement" q="y_HolySmite" function b(k)for i=1,32 do if strfind(tostring(UnitBuff("player",i)),k)then return 1 end end end if not b(q) then c("Seal of the Crusader(Rank 6)")else c(j) end

 

Shaman Macros

Repopping toems

This is a macro for re-popping totems using the cheapest rank 1 spells. You have to click it 4 times with 1 second wait between each click and not faster than the global cooldown. Clicking too quickly will skip one. Its not perfect but great in a pickle when you have move your totems.

/run s={"Fire Resistance Totem(Rank 1)","Nature Resistance Totem(Rank 1)","Stoneskin Totem(Rank 1)","Frost Resistance Totem(Rank 1)"} if q==nil then q=0 end q=q+1 if q>getn(s) then q=1 end CastSpellByName(s[q])

 

Auto Target + Auto Attack + Cast Spell – combination macro guide

autoattack+autotarget

In vanilla when you use your “Attack” ability or press the keybinding for attacking (default: T) this is toggled on/off. Spamming T is really bad if you want to maximize hits. In most situations you don’t want to stop auto attacking, you just want to start!

Here is a step by step walkthrough with explanation of how to write this into any other ability/spell or macro. It is important to understand the different sections in order to adapt this to your preference. You can’t just copy and paste.

Please keep note that in order for the following to work you must make a macro that replaces your spell. You can only do this from inside a macro.

When done editing the macro it should look like the image above. The semicolon “;” separators are not necessary, they are only visual aids.

1. Auto targeting part

The following part of the script will check if you currently have no target (nil). If this is the case then target nearest enemy. You can copy and paste this script directly into chat to test it.

/run if GetUnitName("target")==nil then TargetNearestEnemy() end

2. Auto attacking part

The next part of the script will attempt to use action in action slot 25 if it is not currently active. This is how we enable auto attacking without accidentally stopping the auto attack.

/run if not IsCurrentAction(25) then UseAction(25) end

Optional: Hiding the autoattack on macro

If you want you can replace slotID 25 with 13 which is located in the second page of the hidden action bar and place the macro there instead!

3. Dragging attack into the action bar

All action bars have a unique slotID. In this example we will use actionbar slot 25. You can change this later if you want.
Click and drag the Attack ability from your spell book into slot 25. (Se images below)

attack actionbarslots

4. Casting a spell from a macro

This is quite easy. In order to properly cast a spell in your macro you should not use /cast as this will call a different function. In order to use it in combination with other scripts you should use this function instead:

/run CastSpellByName("Moonfire(Rank 10)")

Please note the following, this is important:

  • Functions are CaSeSeNsItIvE! You can’t mix lowercase with UPPERCASE letters.
  • Don’t have any space between the name of the spell and the rank of the spell Moonfire_(Rank 8) will not work but Moonfire(Rank 8) will.
  • You need to manually edit the rank to cast. If your level is lower than 60 you will have to manually edit the macro to your desired rank.
  • For abilities that overwrite lower ranks like Heroic Strike(Rank 8) ranks will not work in a macro but Heroic Strike without the parenthesis and rank will.

Optional: If you want to show spell cooldowns and tooltips over macros you need an addon to do this in vanilla. #showtooltip does not work. Either use a custom UI action bar addon like Bongos, Bartender or Anarons MacroTooltip for vanilla. If you use the addon MacroTooltip add /setspelltooltip Moonfire or more compacted /sstt Moonfire to show tooltip and cooldown.

5. Combining the different features into the final macro

moonfireMoonfire auto target + auto attack macro:

/run if GetUnitName("target")==nil then TargetNearestEnemy() end if not IsCurrentAction(25) then UseAction(25) end CastSpellByName("Moonfire(Rank 8)")

 

Auto Self Cast with the interface option disabled

Some addons are essential but also annoying. One especially that you can have a heard time healing without is Clique. It’s amazing to use and enables you to bind spells directly when mouse clicking players in your raid interface. The drawback is that in order for it to work you have to disable Auto Self Cast in interface options:

autoselfcastdisabled

autoselfcastwith disabled

It can quickly get annoying to have to toggle this option on and off everytime you’re going to heal. This is possible to “workaround” using macros. Unfortunately you have to make a macro for each spell. In the following examples I will be using Healing Touch, Regrowth and Rejuvenation but you can replace them with whichever spell you wish to cast.

healtouchHealing Touch auto self cast macro :

/run s="Healing Touch(Rank 10)" c=CastSpellByName() if (UnitIsFriend("player", "target") ) then c(s) else c(s, 1) end

regrowth Regrowth auto self cast macro :

/run s="Regrowth(Rank 8)" c=CastSpellByName() if (UnitIsFriend("player", "target") ) then c(s) else c(s, 1) end

rejuveRejuvenation auto self cast macro :

/run s="Rejuvenation(Rank 10)" c=CastSpellByName() if (UnitIsFriend("player", "target") ) then c(s) else c(s, 1) end

Showing spell tooltips

If you want the addon MacroTooltips by Anaron to work you can’t use the above as it wont recognize the compact syntax s=”myspell”. You have to use the full spell name inside CastSpellByHealing(“MySpell”) instead as in the following macro examples:

Healing Touch auto self cast macro :

/setspelltooltip Healing Touch
/run if (UnitIsFriend("player", "target")) then CastSpellByName("Healing Touch(Rank 10)") else CastSpellByName("Healing Touch(Rank 10)", 1) end

Regrowth auto self cast macro :

/setspelltooltip Regrowth
/run if (UnitIsFriend("player", "target")) then CastSpellByName("Regrowth(Rank 9)") else CastSpellByName("Healing Touch(Rank 9)", 1) end

Rejuvenation auto self cast macro :

/setspelltooltip Rejuvenation
/run if (UnitIsFriend("player", "target")) then CastSpellByName("Rejuvenation(Rank 10)") else CastSpellByName("Rejuvenation(Rank 10)", 1) end

Cancel form + auto self cast

If you want to combine the above spells with cancel shapeshifting add /script UseAction(37) to the macros.

Rejuvenation auto self cast + Cancel shapeshift macro :

/setspelltooltip Rejuvenation
/run UseAction(37)
/run if (UnitIsFriend("player", "target")) then CastSpellByName("Rejuvenation(Rank 10)") else CastSpellByName("Rejuvenation(Rank 10)", 1) end

 

Instant casting / Cancel any active channeling spell

This is really important to know for all casting classes as it helps you when you change your mind when casting something. Add it to your macros where timing is important.

/run SpellStopCasting()

To combine it with a macro that casts another spell simply add it to the beginning of the macro:

/run SpellStopCasting() CastSpellByName("Moonfire(Rank 8)") 

As a Tauren it’s really useful in combination with War Stomp πŸ™‚

/run SpellStopCasting() CastSpellByName("War Stomp") 

 

Shoot Gun/Bow/Crossbow macro

This macro will combine the abilities Shoot Bow, Shoot Crossbow and Shoot Gun into one button to get rid of the annoyance that Warriors and Rogues are having in vanilla.

1Dyy01w

Copy and paste the following into a macro:

/run s="Shoot "r="Crossbow"c=CastSpellByName _,_,i= string.find(GetInventoryItemLink("player",18),"item:(%d+).+%[(.+)%]")_,_,_,_,_,w=GetItemInfo(i)if w==r.."s"then c(s..r)elseif w=="Bows"then c(s.."Bow")else c(s.."Gun")end --CastSpellByName("Shoot Gun")

More info:

  • You still need to equip ammo.
  • It wont handle thrown weapons because nobody uses that :>
  • This might not work if you’re using and addon called Supermacro.
  • To get the “in range” color change if you’re using the Addon Bongos or Bartender you need to keep –CastSpellByName(“Shoot Gun”) inside the macro. It doesn’t have any effect on the actual macro. It just “tricks” the addon that it’s a regular spell macro.

If you don’t know what the in range thing is it’s when text of an ability becomes red when you’re out of range of your target:

yZCqJhh

 

Using Trinkets / Inventory Items

Vanilla doesn’t have support for /use command etc. that exists in retail unless you use an addon for it. To use equipment with right click functionality you need to know the slotID.

This example will use the trinket in your top slot:

/run UseInventoryItem(13) 

InventorySlots

To use an item in your bags you must know the inventory slotID there as well. You can’t use the item by name. For that you need an addon. My addon Nirklars Keybindings has this functionality with /use added.

The command for using an item in your first bag slot (for example a bandage) on yourself is the following:

/run UseContainerItem(1, 1, 1) 

The syntax for the UseContainerItem function is as follows:

UseContainerItem(bagID, slotNumber, UseOnSelf?)

BagID bagID

SlotNumber slotNumber

UseOnSelf can be true, false, 0, 1

 

Bandage self with Autoselfcasting disabled

This macro works without any addons and you can have the bandage placed anywhere in your bags.

It looks for items with the word “Bandage” in your bags starting in bag 0 so if the macro uses the wrong bandage before the Heavy Runecloth, move Heavy Runecloth into bag 0 (your backpack). Here is a list with bandages it should work with:

It works with autoselfcasting disabled in options (for the addon Clique to function) and will keep your current target.

/run TargetUnit("player")function u(n)for b=0,4 do for s=1,GetContainerNumSlots(b)do a=GetContainerItemLink(b,s)if a then if string.find(a,n)then UseContainerItem(b,s,1)return end end end end end u("Bandage")TargetLastTarget()

 

AQ40 Mount combined with regular mount – all in one macro

This macro will look for the name “Qiraji Res” through your bags and use that if you’re currently in the zone Ahn’Qiraj. As there are a lot of mounts to choose from you will need to edit the name of your regular mount that you want it to use when outside the instance. Here are some examples.

Macro to copy and paste if you have a Raptor Mount

/run function u(n)for b=0,4 do for s=1,GetContainerNumSlots(b)do a=GetContainerItemLink(b,s)if a then if string.find(a,n)then UseContainerItem(b,s)return end end end end end if GetZoneText()=="Ahn'Qiraj"then u("Qiraji Res")else u("Whistle of")end

Macro to copy and paste if you have a Wolf Mount

/run function u(n)for b=0,4 do for s=1,GetContainerNumSlots(b)do a=GetContainerItemLink(b,s)if a then if string.find(a,n)then UseContainerItem(b,s)return end end end end end if GetZoneText()=="Ahn'Qiraj"then u("Qiraji Res")else u("Horn of")end

Macro to copy and paste if you have an Undead Horse

/run function u(n)for b=0,4 do for s=1,GetContainerNumSlots(b)do a=GetContainerItemLink(b,s)if a then if string.find(a,n)then UseContainerItem(b,s)return end end end end end if GetZoneText()=="Ahn'Qiraj"then u("Qiraji Res")else u("Skeletal War")end

For Kodos or other you mounts you need to edit the last part of the macro
You need to edit u(“Teal Kodo“) part to for example u(“Brown Kodo“) or u(“Reins of“) or u(“Skeletal Hors“).

The whole name probably wont fit in the 255 character limit unless you have a long macro addon like Supermacro installed.

WARNING BE VERY CAREFUL not to add something that might match the name of an important consume like “Distilled” or “Supreme” or the like!

Advertisements

5 Comments on “Macros: Vanilla WoW Macros”

  1. Jakub says:

    mate, great job; only one problem here: with Warlock DoT rotation – with 3 Dots active pressing the button still makes my lock casting rotation and loosing mana; just after first Dot disappears it works well – it reapply proper Dot.

  2. Grimluck says:

    Druid spammable stealth macro:

    /run –CastSpellByName(“Prowl”)
    /run i=0 m=0 c=CastSpellByName while not (GetPlayerBuff(i)==-1) do if (strfind(GetPlayerBuffTexture(GetPlayerBuff(i)),”Ability_Ambush”)) then m=1 end i=i+1 end if m==0 then c(“Prowl”) else c(“Track Humanoid”) end

    If no stealthed then cast Prowl, otherwise cast Track Humanoid. You can replace it with any other ability.

  3. Skoo says:

    Can someone make a moonfire / insect swarm macro?

  4. Skoo says:

    Nvm figured it out

    /run c=CastSpellByName function b(k)for i=1,16 do if strfind(tostring(UnitDebuff(“target”,i)),k)then return 1 end end end if not b(“e_InsectSw”)then c(“Insect Swarm(Rank 5)”) else cast(“Moonfire(Rank 10)”)end

  5. Sir Camealot says:

    Nice macros, can u help with the Seal/Judgement macros?
    There is no Seal of Light macro and the macros seem to be so complicated, that I cant change it on my own, so it would work with Seal of Light


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s