Posted by: innerfire | March 8, 2006

Macro Examples and Specifics

I wrote none of these. My macroing skills are limited to randomizing text and begging my friend to make me macros. Listed below are macros I use or feel might be useful to my readers. There’ll be a healer/priest bias, I can’t help that, get over it. *grin* Some of these may need to be edited for the rank of a spell, names, etc. But it should be fairly obvious what to change, like in the first macro.

1. Announcing a Shackle by level, sex, and name. This can be modified for any kind of Crowd Control. (By Wikiwocket, apparently a CCer!)

/script if UnitCanAttack(“player”, “target”) then t={” Male”,” Female”,””}; SendChatMessage(“Shackling “..UnitLevel(“target”)..t[UnitSex(“target”)+1]..” %t”,”SAY”); CastSpellByName(“Shackle Undead(Rank 3)”); end

You can replace SAY with PARTY, RAID, GUILD, EMOTE, etc.

2. 5 Point Sinister Strike/Riposte/Eviscerate for a level 60 rogue (Devla of Destromath)

/script CN=CastSpellByName;GCP=GetComboPoints();if (GCP>=5) then CN(“Eviscerate(Rank 8)”);end;if (UnitMana(“Player”)>=10) and (IsUsableAction(6)) then CN(“Riposte”);end;if UnitMana(“Player”)>=40 then CN(“Sinister Strike(Rank 8)”);end

Change GCP value, replace Eviscerate with whatever skill you like, and change the Sinister Strike rank….also you can change the button where Riposte is if you’d like.

Example of my 2 point S&D Macro:
/script CN=CastSpellByName;GCP=GetComboPoints();if (GCP>=2) then CN(“Slice and Dice(Rank 2)”);end;if (UnitMana(“Player”)>=10) and (IsUsableAction(6)) then CN(“Riposte”);end;if UnitMana(“Player”)>=40 then CN(“Sinister Strike(Rank 8)”);end

3. 1H/shield (or dual wield) to 2H weapon macro. Put the 2H in the top slot of your last bag. Leave the next slot (to the right) open (if doing a 1h/2h swap) or filled with the other dual set if you’re doing dual to dual. (Raes of Llane)

/script CloseMerchant();if GetContainerItemLink(4,2) then UseContainerItem(4,1);UseContainerItem(4,2);else PickupInventoryItem(17);PickupContainerItem(4,2);PickupInventoryItem(16);PickupContainerItem(4,1);end;

4. If my pet is not out, or dead it will cast “Revive Pet”, if my pet is in combat it will cast “Mend Pet” and if my pet is alive and out of combat it will cast “Feed Pet”(optionally put your food in a specific bag slot every time to have it feed automatically…”PickupContainerItem()”).

/script if (not UnitExists(“pet”) or UnitHealth(“pet”)==0) then CastSpellByName(“Revive Pet”); else if (UnitAffectingCombat(“pet”)) then CastSpellByName(“Mend Pet”); else CastSpellByName(“Feed Pet”); PickupContainerItem(2,16); end; end;

5. Self-Casting while Targetting an Enemy (WoW Wiki)

/script if ( not UnitIsFriend(“player”, “target”) ) then CastSpellByName(“Spell”); end
/script if ( SpellIsTargeting() ) then SpellTargetUnit(“player”); end

6. Casting based on target’s class (Paladins, mostly) (WoW Wiki)

/script class = UnitClass(“target”); if ( ( class == “Rogue” ) or ( class == “Warrior” ) ) then
CastSpellByName(“Blessing of Might”); else CastSpellByName(“Blessing of Wisdom”); end

7. Spell Based on Target’s Level

/script Pre=”Power Word: Fortitude(Rank ” Sp={1,2,14,26,38,50} if (UnitLevel(“target”) ~= nil and UnitIsFriend(“player”,”target”)) then
for i=6,1,-1 do if (UnitLevel(“target”) >= Sp[i]) then CastSpellByName(Pre..i..”)”) return end end end

8. Healing Nearby Friends

/script for i=1,40 do TargetNearestFriend(); if UnitHealth(“target”)/UnitHealthMax(“target”)

9. Smart Buffing (checks if buffed and, if not, buffs with selected spells)

/script i=0;m=0;while(UnitBuff(“target”,i)~=nil) do if(STRING.find(UnitBuff(“target”,i),”Regeneration”)~=nil) then m=1; end;i=i+1;end; if(m==1) then CastSpellByName(“Mark of the Wild(Rank 10)”);else CastSpellByName(“Thorns(Rank 10)”);end;

10. For Priests! Shield, Renew, Power Word, Shadow Protection.

Shield to a target’s level:

/script r=10;l={6,12,18,24,30,36,42,48,54,60};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10)then CastSpellByName(“Power Word: Shield(Rank “..i..”)”);break;end;end;

Renew to a target’s level:

/script r=9;l={8,14,20,26,32,38,44,50,56};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Renew(Rank “..i..”)”);break;end;end;

Power Word: Fortitude to a target’s level:

/script r=6;l={1,12,24,36,48,60};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Power Word: Fortitude(Rank “..i..”)”);break;end;end

Shadow Protection to a unit’s level (if possible):

/script r=3;l={30,42,56};if not UnitIsFriend(“player”,”target”)then TargetUnit(“player”);end;t=UnitLevel(“target”);for i=r,1,-1 do if (t>=l[i]-10) then CastSpellByName(“Shadow Protection(Rank “..i..”)”);break;end;end

11. Warlock Fears, Pet Stays

/cast Fear(Rank #) /script PetFollow()



  1. Holy cow!! Nice priest macros for unit level appropriate buffs and heals. I’ll be starting those right away.

    Do you hot-key those, or put them on a bar somewhere?

  2. I generally pop them on a secondary bar that I’ll scroll to if I’m going to be with low level friends, that way I don’t have to worry about messing with my basic stuff (heal by spell rank by HP missing) for raiding and such. I’ll post up the basic stuff once I remember how to get it all back. I lost a ton of stuff when I reformatted my computer. >_o

  3. Well, I tried them last night, and they popped up with error messages. I selected a nearby friendly and hit by macro button on a floating toolbar. The error runs off the end of the window so I can’t read it.

    Are there things in there that need to be filled in or are they simply copy/paste macros? I was also assuming that I could make a new macro for Lesser Heal if I entered the correct levels into the macro.


  4. Check if the R value is still the same: the r value needs to be the number of different spell levels (for example – /script r=10;l={6,12,18,24,30,36,42,48,54,60} has 10 values in the { }. The first r=# is all that you need to change, along with the numbers in brackers. Make sure you aren’t spacing between them either, just have the commas between them.

    On the subject of spacing (I do this constantly) make sure the “…if not UnitIsFriend(”player”,”target”)then…” has a space between the not and UnitIsFriend. It’s modifying a function, and needs to be seperate from the actual UnitIsFriend. Macros can get wonky going from one place to another. *grin*

    I was also wandering around, and found this mod if you’re interested.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s


%d bloggers like this: