--<{Useful Vanilla Macros}>--

Post Reply
User avatar
Posts: 7

--<{Useful Vanilla Macros}>--

Post by Naito » Thu Dec 12, 2019 12:24 am

Given the amount of searching that I had to do in order to recreate the very useful macros that made life so much easier during BC and beyond for Vanilla and the existent but super spread out resources for it on the web; I've decided to create a thread consolidating the way to make the kind of macros that everyone might want. If you have a useful macro, that has been tested and works fine in Turtle Wow with only the SuperMacro addon thrown in, post it below and I'll include it for people to reference in this post.

Also, this post assumes you have supermacro installed and working correctly. You can download supermacro from https://github.com/isitLoVe/SuperMacro Click clone or download and then click download as zip. It will download as zip "SuperMacro-master.zip" unzip this and you get the SuperMacro-master folder. Inside this folder is the Supermacro folder this is what you want to put in the addons directory, not the SuperMacro-master folder. Do that and when you launch the game you should have a supermacro button on the right side of your escape menu. This far more often than the macro section will be where you do macro work, simply because the benefits are great. Much bigger input area, ability to do extended functions, and the ability to make the macro display proper tooltips since the #showtooltip isn't a thing in vanilla. More importantly though, supermacro adds important action commands that were otherwise completely missing from macros in Vanilla.

Easy weapon swap macro.
Here is one I've heard of all the time. A weapon switching macro. Simply type the command where you want in the macro and shift click the item it will put the name in for you.

/equipoff Stinging Viper
/equip Leaden Mace of Power
/unequip Daryl's Hunting Rifle

The first equips the item to the offhand. The second equips the item to an appropriate slot. The third removes the item you are wearing and puts it in your inventory. Simple easy. Have fun.
Attack if not attacking target when spamming spam skill.
Next you know how annoying it is when you are out of energy or rage and are wanting to attack the target but want to do it faster than using your mouse to right click it but don't want to dedicate a spam button space to your attack skill? This will do it. First in interface options make sure the 4 extra action bars are on, then put your attack skill in the slot on the right most slot on the bar just above your experience bar.

/run if not IsCurrentAction(60) then UseAction(60) end;
/run CastSpellByName("Sinister Strike")

Replace Sinister Strike with whatever spam skill you want and when you spam it it will always check to see that the skill in that slot is active, and if not activate it before going on to using the skill. This is huge as a tank as we tab target a lot and this makes it so much easier to attack what you want that way without relying on the mouse for speed.
Auto-Self-Cast replacement for skills.
Next, you know how if you use healbot or another addon that casts things on others not targeted, you generally have to turn off auto-self cast in interface options right? But it makes healing yourself more time consuming, or casting abilities on yourself also more time consuming. No more, replace them on your bar with macros of these so you don't have to keep turning it off and on again depending on group status yet still have both the healbot / pallypower benefit and the ability to use skills on yourself without targeting yourself or losing your current target.

/script if UnitIsFriend("player", "target") then CastSpellByName("Lesser Heal"); else CastSpellByName("Lesser Heal", 1); end

Simply replace lesser heal with the spell you need. Remember if you don't include a rank it will always default to the highest rank, so no more having to swap out spells as you level unless you are downranking.
Druid Ravage when prowling shred otherwise.
You a druid who wants to not have to have different buttons for shred and ravage since you use the same action bar when stealthed unlike a rogue? Look no further. This macro will ravage if you are stealthed and shred if not. No extra buttons.

In the normal macro part in supermacro put:

/run if ({GetSpellCooldown(GetSpellID("Prowl"),"spell")})[3]~=0 then CastSpellByName("Shred") else CastSpellByName("Ravage") end

In the Enter Extended Lua section of supermacro put:

function GetSpellID(sn)
local i,a
while a~=sn do
return i

function IsActive(sn)
return ({GetSpellCooldown(GetSpellID(sn),"spell")})[3]==0

Remember to save extend in addition to the save macro.
Reset Instances.
Want to reset instances but are totally confused by the fact that there is no right click portrait option in vanilla to do so? I mean you could leave group, or you could use this easy macro.

/script ResetInstances()
Check Rested Experience.
This one was created by an awesome Enhance Shammy by the name of Xok. You know how tents give you rested beyond your exp bar right? So you can never know when you are full without addons? Just slip this macro into your macro section and when clicked it will display your current rested experience amount. Click again and it will display the new total, when it stops going up then your rested is full.

/script DEFAULT_CHAT_FRAME:AddMessage("Rested:".. GetXPExhaustion());

That is all for now. If you have any you would like to share that work fine on this server with nothing more than supermacro addon installed please post them below and I will include them. If you have requests, mention them and I will see if I can find it for inclusion.

-Knight Soryen

User avatar
Posts: 831

Re: --<{Useful Vanilla Macros}>--

Post by Sinrek » Thu Dec 12, 2019 10:09 am

Nice post. I hope to see more additions for other classes.
satisfied_turtle Slowly turtling my way up.

User avatar
Posts: 78

Re: --<{Useful Vanilla Macros}>--

Post by Xerron » Thu Dec 12, 2019 1:09 pm

I posted some in the priest section but here are my hunter ones

Hawk/Monkey based on target distance

Code: Select all

/run if CheckInteractDistance("target", 3) then CastSpellByName("Aspect of the Monkey") else CastSpellByName("Aspect of the Hawk") end
Wingclip / Concussive based on distance

Code: Select all

/run if CheckInteractDistance("target", 3) then CastSpellByName("Wing Clip") else CastSpellByName("Concussive Shot") end
Trap / Feign, you have to spam it

Code: Select all

/cast Freezing Trap
/script PetFollow("---ADD YOUR NAME HERE---");
/script if UnitAffectingCombat("player") then CastSpellByName("Feign Death") end
Safe scatter shot

Code: Select all

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if UnitExists("pettarget") and UnitIsUnit("target", "pettarget") then PetPassiveMode() CastPetAction(2); else end
/cast Scatter Shot
Safe shadowmeld

Code: Select all

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Ambush" then x=1 end i=i+1 end if x==0 then CastSpellByName("Shadowmeld") else end

User avatar
Posts: 7

Re: --<{Useful Vanilla Macros}>--

Post by Naito » Sun Jan 05, 2020 1:49 pm

Will be posting more shortly. Thanks for the ones you contributed Xer it is quite helpful.

Posts: 28

Re: --<{Useful Vanilla Macros}>--

Post by Snigery » Tue Mar 03, 2020 4:01 am

Here are some of my own hunter macros I just wrote up. I was going for a scenario/personality based macros rather than action-specific macros. One example is the Pet Assist macro with the idea of the pet being called to assist the hunter. My Engage macro was greatly helped by Xerron, knowing that the CheckInteractDistance() will work on npcs.

I thought it would not work as you cannot duel/trade enemy mobs, and I had trouble learning how to get other functions to work. I instead tried to hack my way to make a macro that would allow me to toggle state to swap between melee and ranged attack. My first solution was to query the who list with my name. If one result was present (it should be) then use Attack A and query who for my name + my name again. If no results (there should not be) then use Attack B. However, this spammed my chat with the who results. I also tried using my player currency as a means ot tracking state (ie even/odds) but I did not want to lose money when fighting. My final solution I found RegisterCVar(), which lets you store data in your console. This was quite amazing, but it required that you register the variable you want first when you log-in, and you still had to spam it to swap between melee and ranged. Thank you Xerron!

Alright, so here are my macros for hunter. (I'm having trouble with SuperMacro, so my macros try to stay within the 255 limit)


Hunter & Pet attack/enage target together. If Hunter is far away, uses ranged, otherwise melee. Targets nearest enemy if no unit already targeted.

Code: Select all

/run local t='target'if UnitExists(t) and UnitCanAttack('player',t) then PetAttack(t)if CheckInteractDistance('target',3) then CastSpellByName('Attack') else CastSpellByName('Auto Shot') end else TargetNearestEnemy() end
Pamper Pet

Revive/Heal/Feed pet. The following conditions only trigger if pet is summoned. If the pet is dead, revive pet. If the pet is hurt (less than 75% hp), cast Mend Pet. If pet is alive and healthy, cast Feed Pet on the first item slot in your backpack. I determined 75% was a good indicator of a pet actively engaging in combat as pet regen out-of-combat is quite high, and if you're sending your pet in-and-out of combat, you would not be feeding them which interupts the feeding buff.

Code: Select all

/run if HasPetUI() then if UnitIsDead('pet') then CastSpellByName('Revive Pet') elseif (UnitHealth('pet')/UnitHealthMax('pet')*100)<75 then CastSpellByName('Mend Pet') else CastSpellByName('Feed Pet') PickupContainerItem(0,1) end end
Pet Assist

Has pet attack Hunter current target and cast 7th action of pet action bar. I have my pet controls and pet states one after another on action bar followed by pet spells. So that is 3 + 3 + 4. The 7th action for me is Growl, useful for having pet come to help me and then draw aggro if I spam the button. This macro is a great low-key replacement for the default pet attack action. Modify to suite your own needs and pet skills. If not target present, has pet follow hunter.

Code: Select all

/run local t='target'if UnitExists(t) and UnitCanAttack('player',t) then CastPetAction(7) PetAttack(t) else PetFollow() end
Pet Dessist

This macro is mostly working the way I intended. So if you have 2-3 mobs on pet and you are peeling them with ranged, you might want pet to move on to another target while you finish off one with ranged, yknow to build up that aggro without need for taunting. This macro will target that next enemy, have pet attack, and target last target. What this does is it makes the pet not attack your current target, so the pet is effectively un-assisting you. Sometimes it will have the hunter target another target. I think this depends on how you got your first target (ie clicking it) or the distance of enemies in relation to the hunter. If only it worked from pet perspective.

Code: Select all

/run TargetNearestEnemy()if UnitExists('target') and UnitCanAttack('player','target') then PetAttack() TargetLastTarget() end
Pet Switch

Similar to Pet Dessist, makes pet attack next target, and hunter attack pet previous target. The idea is hunter finishes off target of pet while pet moves on to next target. Use more than once to have pet & hunter swap targets.

Code: Select all

/run TargetNearestEnemy()if UnitExists('target') and UnitCanAttack('player','target') then TargetNearestEnemy() PetAttack() TargetNearestEnemy(true) end

Posts: 1

Re: --<{Useful Vanilla Macros}>--

Post by Odissa » Tue Feb 23, 2021 10:37 pm

For anyone like me, missing mouse over macros for healing here is something that seems to work (Just substitute Arcane Intellect for any spell you want). This will cast the desired spell on your mouseover target without deselecting your current one. If you do not have a mouseover then it will be cast on your target if friendly. If you have a hostile target or no target it will cast it on yourself. (This will not work on ui frames).

Code: Select all

/script pt='mouseover' t='target' p='player' s='Arcane Intellect' if UnitExists(pt) and UnitIsFriend(p, pt) then TargetUnit(pt) CastSpellByName(s) TargetLastTarget() elseif UnitExists(t) then CastSpellByName(s) else CastSpellByName(s) end
The bellow one would work on party frames:

Code: Select all

/run s='Arcane Intellect' f=GetMouseFocus():GetName() t="party"..string.gsub(f, "PartyMemberFrame", "") if UnitExists(t) then TargetUnit(t) CastSpellByName(s) TargetLastTarget() else CastSpellByName(s) end

User avatar
Posts: 97

Re: --<{Useful Vanilla Macros}>--

Post by Jimmicz » Thu Feb 25, 2021 8:37 pm

I find Roids macro better, it brings #showtooltip and translates these /run scripts into something more user friendly.


Posts: 1

Re: --<{Useful Vanilla Macros}>--

Post by Mrplanitia » Fri Aug 13, 2021 2:12 pm

Odissa wrote:
Tue Feb 23, 2021 10:37 pm
The bellow one would work on party frames:
Does not work for me. However, the other one for direct mouseover the character does. Is it maybe because of party interface addons? I'm using X-Perl for that, not the Vanilla ones.

User avatar
Posts: 267

Re: --<{Useful Vanilla Macros}>--

Post by Merikkinon » Wed Nov 24, 2021 3:41 am

Jimmicz wrote:
Thu Feb 25, 2021 8:37 pm
I find Roids macro better, it brings #showtooltip and translates these /run scripts into something more user friendly.

It is useful, but there are but only so many commands that work with Roid Macros. I use it, but find I need to use some 1.0 scripts in addition. Neither gets the job quite done by itself.

Post Reply