Jump to content
meridaw

Vanilla Macros

Recommended Posts

General macros

 

Action button/Spellbook ID

Spoiler

Mouseover a action bar button  and use this macro to get the ID

Quote

/run local a=GetMouseFocus()message(ActionButton_GetPagedID(a))

Action Bar/Inventory Slots

Quote

IbP6QK0.jpg

 

You can find the SpellBookID by counting your spells in the spellbook this way.

Quote

PP5Et7s.jpg

 

 

Macro problems

Spoiler

Get the addon SUPERMACRO (you will need it for some of the macros)
Make sure you are under the "super" tab not regular when you type /macro.
If you cant drag it onto your action bars you also just need to have at least 1 "regular" macro saved.

 

Stil having issue?

1. Disable ALL your add-ons
2. Login to game
3. Type /macro
4. Create this macro and call it reload:

Quote

/script ReloadUI()

5. Drag macro to bar and test
6. If it works then logout and re-enable SuperMacro
7. Login to game, create a SuperMacro and drag it to your bar and test
8. If it works, re-enable all your addons and retest to make sure issue is still resolved

*LAST RESORT* - this will reset all your settings and add-ons:
If none of this works, disable all your add-ons, delete WTF and WDB directories and start over.

 

Getname

Spoiler

Mouseover and type the line to get name of an interface/addon object

Quote

/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName())

 

 

Sound channels

Spoiler

Enter each of these commands in-game and then restart your client.

Quote

/console SoundMemoryCache 128
/console SoundMaxHardwareChannels 128
/console SoundSoftwareChannels 128

 

Set in game:

Quote

/run SetCVar("Sound_NumChannels",128)

Confirm its done:

Quote

/dump GetCVar("Sound_NumChannels")

 

You can add 2 lines to your config.wtf - that way you dont need a modified .exe - the lines to add are SET SoundMaxHardwareChannels "256" and "SET SoundSoftwareChannels "256" - change the number 256 to the channels you want. I have it set to the max of 256.

 

PlaySoundFile

Spoiler

Check that you have proper druid HoTs on you

Quote

/script local i=0 g=GetPlayerBuff while not(g(i) == -1)do if(strfind(GetPlayerBuffTexture(g(i)), "Spell_Nature_Rejuvenation"))then PlaySoundFile("Sound\Creature\Ossirian\OssirianIAmRejuvenated.wav")end i=i+1 end

Macro by Leland

 

Target's stats

Spoiler

Display target's armor and resist in chat (only works on self and NPCs)

Quote

/run local b={"Armor","Holy","Fire","Nature","Frost","Shadow","Arcane"} a=UnitName("target").."'s stats: " for i=0,6 do a = a..b[i+1]..": "..UnitResistance("target", i)..", " end SendChatMessage(a)

 

Display target's armor and resist in say

Quote

/script u=UnitResistance y="target" a=u(y ,0) h=u(y ,1) f=u(y ,2) n=u(y ,3) fr=u(y ,4) s=u(y ,5) z=u(y ,6) SendChatMessage(UnitName(y).." has "..a.." Armor, "..h.." HR, "..f.." FR, "..n.." NR, "..fr.." FrR, "..s.." SR and "..z.." AR.", SAY)

 

Display target's Attack power in say

Quote

/script u=UnitAttackPower y="target" a=u(y ,0) SendChatMessage(UnitName(y).." has "..a.." Attack Power. ", SAY)

 

Display target's armor and dps in say

Quote

/run lowDmg, highDmg=UnitDamage("target") SendChatMessage("%t hits for "..math.ceil((lowDmg+highDmg)/2).." damage every "..tostring(math.floor(UnitAttackSpeed("target")*100)/100).." seconds and has "..UnitResistance("target",0).." Armor.","SAY")

 

 

Mouseover

Spoiler

Checks to see if your mouse cursor is hovering over an applicable target (party frames and nameplates work also) and casts the spell on said target if so. If your cursor is not hovering over an applicable target, it just casts the spell normally as it would if you weren't using a macro.

 

Offensive abilities (debuffs, CC, interrupts, DoTs, taunts, etc):

Quote

/run c=CastSpellByName s="SPELLNAME" if UnitExists("mouseover") and UnitReaction("mouseover","player")<5 then TargetUnit("mouseover") c(s) TargetLastTarget() else c(s) end

 

Friendly abilities (heals, cleanse, Rebirth, etc):

Quote

/run c=CastSpellByName s="SPELLNAME" if UnitExists("mouseover") and UnitReaction("mouseover","player")>4 then TargetUnit("mouseover") c(s) TargetLastTarget() else c(s) end

 

Both (ex: Paladin's Holy Shock - heals friendlies, hurts enemies):

Quote

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

replace SPELLNAME with the name of the spell. Example: Rejuvenation

 

Quote

/run TargetUnit("mouseover")
/cast spellname
/run TargetLastTarget()

 

 

#showtooltip

Spoiler

#showtooltip behavior with 1.12 syntax (SuperMacro)

Quote

/run if nil then CastSpellByName("SPELLNAMEHERE") end

Or

/run --CastSpellByName("Spell Name")

Or

/run --/cast Spell Name

Just add one of these lines to the start of the macro

 

whisper

Spoiler

Doesn't whisper yourself

Quote

/run if not UnitIsUnit("player","target") then SendChatMessage("hi!","WHISPER",nil,UnitName("target"))end

 

 

SendChatMessage

Spoiler

/run local s,m,c,=SendChatMessage,"<My Message Here>";if UnitInRaid("player")then c="RAID" elseif UnitExists("party1")then c="PARTY" end;s(m,c)

 

LFG/LFM Group Finder

Spoiler
About
This is a macro that aims to slightly enhance "/who whispering".

What is "/who whispering"?
"/who whispering" is where you get a list of players using the /who command and whisper them. I've always found this method to be the quickest and easiest way to build a group, especially when you're looking for specific roles; notably tanks and healers.


Setup
 
  1. Create the "set message & reset" macro, and edit the message between the " ":
    Quote

    /run lfm_msg=     "LF3M RFC: Lv.14+ Tank, Heal, RDPS"     ;lfm_i=1;message(lfm_msg);

  2. Create the "send message" macro:
    Quote

    /run if(lfm_i<=GetNumWhoResults()) then lfm_target=GetWhoInfo(lfm_i);SendChatMessage(lfm_msg,"WHISPER",nil,lfm_target);lfm_i=lfm_i+1;else message("Finished who list.");end;


Usage
 
  1. Use /who to get a list of players to recruit (ex. /who 18 c-"warrior")
  2. Run the "set message & reset" macro once
  3. Run the "send message" macro repeatedly to whisper each player in the /who list
    • A message will appear when you've finished the list
  4. When you finish the list, repeat steps 1-3 with a new list of different players
    • * Important * If the /who list contains previously whispered names, it will rewhisper them
    • New /who list example: /who 16 c-"warrior"
    • Step 2 must be repeated to reset the macro's list position

 

Increase your tab target range

Spoiler
Quote

/console targetNearestDistance 50

or add this line in your config.wtf :
SET targetNearestDistance "50"

(max value is 50 yards)

 

Increase max camera distance

Spoiler

/script SetCVar ("cameraDistancemax" ,50)

 

Fishing

Spoiler

Enchants Aquadynamic Fish Attractor to fishing pole

Quote

/run for b=0,4 do for s=1,18 do local i=GetContainerItemLink if not(i(b,s)==nil)then if strfind(i(b,s), "Aquadynamic Fish Attractor")then  UseContainerItem(b,s)PickupInventoryItem(16)ReplaceEnchant()end end end end

 

While holding shift, toggles between the named rod and weapon. While not holding shift, casts fishing. (Doesn't take offhands into account)

Quote

/run local p,w,z,c,u,l="Fishing Pole","Gnarled Short Staff",string,CastSpellByName,UseItemByName,GetInventoryItemLink("player",16)local s,e=z.find(l,"%[.+%]")l=z.sub(l,s+1,e-1)if IsShiftKeyDown() then if l~=p then u(p)else u(w)end else c("Fishing")end

 

Fishing/Mount/Dismount (put mount in action slot 12)

Quote

/run local i=GetInventoryItemTexture("player",GetInventorySlotInfo("MainHandSlot")) if i and string.find(i,"INV_Fishingpole")then CastSpellByName("Fishing") else UseAction(12)end

Keybinding this one to a mouse button like middleclick for easy fishing/mounting/dismounting with one hand

 

Reset Instance

Spoiler

Reset Instance

Quote

/script ResetInstances()

 

Log out of the dungeon, have it reset and get ported back to the entrence

Quote

/script ResetInstances()
/camp

 

 

Party

Spoiler

Leave Party

Quote

/run LeaveParty()

 

Invite target to party

Quote

/run InviteToParty("target")

 

Accept group invite

Quote

/run AcceptGroup()

 

 

Debuff Check

Spoiler

Check what important debuff is missing on the raid boss

Quote

/run str=UnitName("target") b=UnitExists("target") CoS=false for i=1,16,1 do db=UnitDebuff("target",i) if(db~=nil and string.find(db,"Spell_Shadow_CurseOfAchimonde")) then CoS=true end end;
/run if CoS then print("COS true") else if b then str=str .. " has no Curse Of Shadow!" end end;
/run CoE=false for i=1,16,1 do db=UnitDebuff("target",i) if(db~=nil and string.find(db,"Spell_Shadow_ChillTouch")) then CoE=true end end;
/run if CoE then print("COE true") else if b then str=str .. " has no Curse of Elements!" end end;
/run CoR=false for i=1,16,1 do db=UnitDebuff("target",i) if(db~=nil and string.find(db,"Spell_Shadow_UnholyStrength")) then CoR=true end end;  
/run FF=false for i=1,16,1 do db=UnitDebuff("target",i) if(db~=nil and string.find(db,"Spell_Nature_FaerieFire")) then FF=true end end;  
/run if CoR then print("COR true") else if b then str=str .. " has no Curse Of Recklessness!" end end;
/run if FF then print("FF true") else if b then str=str .. " has no Faerie Fire!" end end;
/run --SW=false for i=1,16,1 do db=UnitDebuff("target",i) if(db~=nil and string.find(db,"Spell_Shadow_BlackPlague")) then SW=true end end;
/run --if SW then print("SW true") else if b then str=str .. " has no Shadow Weaving!" end end;
/run SendChatMessage(str, "yell") --made by Imwithstupid

 

 

Stopcast

Spoiler

/script SpellStopCasting()

 

Target

Spoiler

Cast spell on enemy that matches name below EXACTLY. Useful when lvling to tag mobs first.

Quote

/run TargetByName("REPLACE THIS TO NPC NAME", true) CastSpellByName("REPLACE THIS WITH INSTANT CAST SPELL")

 

Target last target

Quote

/run TargetLastTarget()

 

Target last enemy

Quote

/run TargetLastEnemy()

 

Target Nearest Friend

Quote

/run TargetNearestFriend()

 

Target nearest enemy

Quote

/target NearestEnemy();

 

If no target, friendly target, or dead target, then target nearest enemy

Quote

/script if UnitExists("target") == nil or not UnitIsEnemy("target", "player") or UnitIsDead("target") ~= nil then TargetNearestEnemy() end

 

targettarget

Quote

/run TargetUnit("targettarget") CastSpellByName(spell) TargetLastTarget()

 

Put these lines ahead of your existing macro for auto-targeting

Quote

/script if UnitHealth("target")==0 and UnitExists("target") then ClearTarget(); end
/run if GetUnitName("target")==nil then TargetNearestEnemy() end

 

Spammable Wand Shoot w/ Auto Targeting

Quote

/run --CastSpellByName("Shoot") end
/run if GetUnitName("target")==nil or UnitExists("target") and UnitReaction("target","player")>4 then TargetNearestEnemy() end
/script if not IsAutoRepeatAction(#) then CastSpellByName("Shoot"); end

 

Autoshot and melee w/ Auto Targeting

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/run if CheckInteractDistance("target", 3) and (not PlayerFrame.inCombat) then AttackTarget() elseif not IsAutoRepeatAction(3) then CastSpellByName("Auto Shot") end

 

 

Raid mark

Spoiler

Raid marks

Quote

/run SetRaidTarget("target", 😎 = Skull

/run SetRaidTarget("target", 7) = Cross

/run SetRaidTarget("target", 6) = Square

/run SetRaidTarget("target", 5) = Moon

/run SetRaidTarget("target", 4) = Triangle

/run SetRaidTarget("target", 3) = Purple

/run SetRaidTarget("target", 2) = Circle

/run SetRaidTarget("target", 1) = Star

/run SetRaidTarget("target", 0) = Removes the mark

 

Target raid marked enemy

Quote

/run for i=1,13 do TargetNearestEnemy();if GetRaidTargetIndex("target")==X then do return;end;end;end;

Underlined characters: 13 represents the number of mobs to cycle through. Increase it to suit your needs. X represents the number of the raid target index. (8 is skull etc)

 

This one is for skull, change the 8 to something else for different marks.

Quote

/run for i=1,18 do if GetRaidTargetIndex('target') == 8 then break end; TargetNearestEnemy(); end

 

 

Hide Error

Spoiler

Disable Error Speech

Quote

/run SetCVar("EnableErrorSpeech", 0) UIErrorsFrame:UnregisterEvent"UI_ERROR_MESSAGE" CastSpellByName"SPELLNAME" UIErrorsFrame:RegisterEvent"UI_ERROR_MESSAGE" SetCVar("EnableErrorSpeech", 1)

or

/console EnableErrorSpeech 0
/run UIErrorsFrame:UnregisterEvent"UI_ERROR_MESSAGE"
/run CastSpellByName"SPELLNAME"
/run UIErrorsFrame:RegisterEvent"UI_ERROR_MESSAGE"
/console EnableErrorSpeech 1

 

Error sound

Quote

/Console MasterSoundEffects 0

/Console MasterSoundEffects 1

 

Hide UIErrorsFrame

Quote

/script UIErrorsFrame:Hide()

 

Disable audio for macro to cast spell

Quote

/console Sound_EnableSFX 0
/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/cast Fireball
/console Sound_EnableSFX 1
/script UIErrorsFrame:Clear();

 

 

Food/drink

Spoiler

Uses any Conjured water/food (press it quick twice, to eat when you drink)

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Conjured"))then UseContainerItem(b,s,1)end end end

 

Food/Drink

Spoiler

1. Drag your food in an action button and your drink in another.

2. Use /run local a=GetMouseFocus()message(ActionButton_GetPagedID(a)) this command in your chat while hovering your mouse over the "food button" and then the "drink button" and make a note of the numbers it prints.

3.

Quote

/run local e,d,s,u,a,p,x,z,f,b,_="INV_Misc_Fork&Knife","INV_Drink_07",strfind,UnitBuff,UseAction,"player",115,116;for i=1,32 do f=(s((u(p,i))or"",e))if(f)then x=nil end;b=(s((u(p,i))or"",d))if(b)then z=nil end;end;_=((x)and a(x))or((z)and a(z))

This (all one line) will be your actual food/drink macro after you replace 115,116 with the food button id and drink button id you found above. This will drink if you're not already drinking and eat if you're not already eating.

 

Macro made by Road-block

 

Drink and Eat with 1 button SuperMacro (press it twice)

Quote

/script UseItemByName("Conjured Cinnamon Roll"); UseItemByName("Conjured Crystal Water");

 

 

Pet

Spoiler

Pet bar macro (the skills are 1,2,3,4,5 from left to right)

Quote

/script CastPetAction(5);

Pet attack

Quote

/script PetAttack()

Passive pet

Quote

/script PetPassiveMode();

Pet follow

Quote

/script PetFollow();

Toggle Autocast (the skills are 1,2,3,4,5 from left to right)

Quote

/script TogglePetAutocast(5)

 

 

Disenchanting

Spoiler

Just mouse over the item you want to disenchant (in your bags only) and run the macro.

Quote

/run SpellStopTargeting(); local f=GetMouseFocus(); if strfind(tostring(f:GetName()), 'ContainerFrame') then CastSpellByName('Disenchant'); f:Click(); end SpellStopTargeting(); ClearCursor();

The way I made it was for default ui, as bagnon uses its own frames. You just simply need to change it to what bagnon frames use.

Just mouse over a slot in the bags and type

Quote

/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName())

..In this case.. you get something along the lines of 'BagnonItem19' or so.

So just replace 'ContainerFrame' with 'Bagnon',

Quote

/run SpellStopTargeting(); local f=GetMouseFocus(); if strfind(tostring(f:GetName()), 'Bagnon') then CastSpellByName('Disenchant'); f:Click(); end SpellStopTargeting(); ClearCursor();


or just simply remove the if statement which will allow it to be used in any frame which might cause unforeseen issues. (Will cause errors to appear on non-clickable/non-existent frames)

Quote

/run SpellStopTargeting(); local f=GetMouseFocus(); CastSpellByName('Disenchant'); f:Click(); SpellStopTargeting(); ClearCursor();

 

 

Herb/mineral tracking

Spoiler

Find Herbs, else Minerals

Quote

/run if n~= 1 then CastSpellByName("Find Herbs") n=1 else CastSpellByName("Find Minerals") n=0 ;end

 

Find Minerals, else Herbs

Quote

/run local g,h=GetTrackingTexture(),"INV_Misc_Flower_02";if strfind(g,h)then CastSpellByName("Find Minerals")else CastSpellByName("Find Herbs")end

 

Find Treasure/Minerals

Quote

/run local s,t,c={'Find Treasure','Find Minerals'},{'Racial_Dwarf_FindTreasure','Spell_Nature_Earthquake'},GetTrackingTexture()foreach(t,function(k,v)if not c or strfind(c,v) then CastSpellByName(k<getn(t)and s[k+1]or s[1]) end end)

 

Switches between Find Herbs/Minerals every 1 second

Quote

/run local f, t, e  = CreateFrame("FRAME"), GetTime(), 0; f:SetScript("OnUpdate", function() e = GetTime() - t; if e > 1 then t = GetTime(); if UnitBuff("player", "Find Herbs") then CastSpellByName("Find Minerals"); else CastSpellByName("Find Herbs"); end; end; end;);

 

If the code above is too big for regular macros, try this one

Quote

/run local f,t,e,c,g  = CreateFrame("FRAME"),GetTime(),0,CastSpellByName,GetTime f:SetScript("OnUpdate", function() e = g - t if e > 1 then t = g if UnitBuff("player", "Find Herbs") then c("Find Minerals") else c("Find Herbs") end end end)

 

 

Find "BUFF_TEXTURE"

Spoiler

To find "BUFF_TEXTURE" in certain macros use this macro (Target yourself while you have the buff)

Quote

/script function m(s) DEFAULT_CHAT_FRAME:AddMessage(s); end for i=1,16 do s=UnitBuff("target", i); if(s) then m("B "..i..": "..s); end s=UnitDebuff("target", i); if(s) then m("D "..i..": "..s); end end

 

Print GetShapeshiftFormInfo(1) in say

Quote

/run local t,n,a=GetShapeshiftFormInfo(1)DEFAULT_CHAT_FRAME:AddMessage(t..","..n..","..(a and "active" or ""))

 

Use the script to get the current Tracking Texture

Quote

/run icon= GetTrackingTexture() DEFAULT_CHAT_FRAME:AddMessage(icon)

 

 

Smart Buff Swap

Spoiler

Uses BUFF_1 if the main buff is active, or else uses SPELL_2

Quote

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

You need to replace "BUFF_TEXTURE" with the TEXTURE of a particular buff and NOT it's name. For example A Rogue's Stealth skill and a Druid's Prowl skill both use the little icon texture called "Ability_Ambush".
Use this site to lookup your buff's texture:
http://wowwiki.wikia.com/Queriable_buff_effects

 

Auto Attack (Melee, Ranged and Wand)

Spoiler

Spammable Auto Attack Macro w/ Melee and Ranged swapping (put Shoot or Auto Shot into action slot 1)

Quote

/run if CheckInteractDistance("target", 3) and (not PlayerFrame.inCombat) then AttackTarget() elseif not IsAutoRepeatAction(1) then CastSpellByName("Auto Shot OR Shoot") end

Replace Auto Shot or Shoot with your classes ranged auto attack

 

Start Melee Attack

Quote

/script if (not PlayerFrame.inCombat) then AttackTarget() end

 

Auto Shot

Quote

/script if not IsAutoRepeatAction(xx) then CastSpellByName("Auto Shot"); end

 

Auto attack

Quote

/run for z=1,172 do if IsAttackAction(z)then if not IsCurrentAction(z)then UseAction(z);end;end;end;

 

Shoot (wand)

Quote

/script if not IsAutoRepeatAction(X) then CastSpellByName("Shoot"); end

Replace X with the Slot id of the skill on your hotbar



Complete/Accept quests

Spoiler

Complete/Accept quests with a keybind - not 100% effective if there are more than 1 quest reward

Quote

/run AcceptQuest()
/run CompleteQuest()
/run i=GetNumQuestChoices() if i<2 then GetQuestReward(1) end
/run SelectAvailableQuest(1)
/run SelectGossipAvailableQuest(1)
/run SelectActiveQuest(1)
/run SelectGossipActiveQuest(1)

 



Extreme Graphics Settings

Spoiler

more than MAX graphics settings can be applied to the Config.wtf file however, depending on your server's restrictions this may or may not have an effect.

Quote

/console groundEffectDensity 256
/console groundEffectDist 170
/console detailDoodadAlpha 100
/console farclip 777
/console horizonfarclip 6226
/console smallcull 0
/console maxLOD 3
/console SkyCloudLOD 3
/console characterAmbient 1

 

 

QuickSwap

Spoiler

Weapons/Shield quickswap

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (string.find(n,"InsertMainHandName") or string.find(n,"InsertOffHandName"))then PickupContainerItem(b,s)EquipCursorItem(16, 17)break end end end

One item got to be mainhand/offhand only, and swap 16 for 17 if both weapons go into main hand slot.

 

Swap offhand's (Skull of Impending Doom and Misplaced Servo Arm)

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (string.find(n,"Skull of Impending Doom") or string.find(n,"Misplaced Servo Arm"))then PickupContainerItem(b,s)EquipCursorItem(17)break end end end

strfind can replace string.find, using just a part of the item name works, and i don't think you need break.

 

Use Juju/Potion/Bandage

Spoiler

Use any Juju on yourself, or friendly target (add full name if you want a specific Juju)

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Juju"))then UseContainerItem(b,s)SpellTargetUnit("player")end end end

 

Use any bandage

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Bandage"))then UseContainerItem(b,s)SpellTargetUnit("player")end end end

 

Use any Healthstone/Healing Potion

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Healthstone") or strfind(n,"Healing Potion"))then UseContainerItem(b,s,1)end end end

 

Use any Mana Potion

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Mana Potion"))then UseContainerItem(b,s)end end end

 

 

Use Trinket/Offhand

Spoiler

Use trinket

Quote

/script UseInventoryItem(13);

/script UseInventoryItem(14);

 

Use trinket if no cooldown

Quote

/run if  GetInventoryItemCooldown("player", 13)==0 then UseInventoryItem(13)end

 

Use offhand

Quote

/script UseInventoryItem(17);

 

 

Shadowmeld

Spoiler

/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")end

 

Heal in range

Spoiler

Will heal anyone in range who is low on hp(Set to react on < 90%)

Quote

/script for i=1,40 do TargetNearestFriend(); if UnitHealth("target")/UnitHealthMax("target") < 0.9 then if UnitIsPlayer("target") then CastSpellByName("EnterYourHealspellHere"); end end end; TargetLastEnemy();

 

 

Heal enemy target's target

Spoiler

/run if UnitCanAttack("player","target") and not UnitCanAttack("player","targettarget") then TargetUnit("targettarget") CastSpellByName("Heal") TargetLastTarget() end

 

Loot

Spoiler

Rolls the raidmembers and announce to the chat "Loot goes to X in grp Y !"

Quote

/run local w = math.random(1,GetNumRaidMembers()) local n, _, g = GetRaidRosterInfo(w) SendChatMessage(format("Loot goes to %s in group %d", n, g),"RAID")

 

Set to common loot (white)

Quote

/script SetLootMethod("group", 0)

 

 

Summon random mount

Spoiler

If youve got your 4 mounts in the first 4 slots of your first bag it would look like this

Quote

/script UseContainerItem(0,math.random(1,4));

 

Dismount, summon random mount

Quote

/run local i=0 g=GetPlayerBuff while not(g(i) == -1)do if(strfind(GetPlayerBuffTexture(g(i)), "Ability_Mount"))then CancelPlayerBuff(g(i))end i=i+1 end
/run UseContainerItem(0,math.random(1,4));

 

BagID

50381010-d7a26900-067b-11e9-9295-2bb8258

 

Sell grey junk

Spoiler

/run for bag=0,4,1 do for slot=1,GetContainerNumSlots(bag),1 do local name=GetContainerItemLink(bag,slot) if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("- Selling "..name) UseContainerItem(bag,slot) end end end

 

Change actionbar

Spoiler

/run if (CURRENT_ACTIONBAR_PAGE == 1) then CURRENT_ACTIONBAR_PAGE = 2; ChangeActionBarPage();  elseif(CURRENT_ACTIONBAR_PAGE == 2) then CURRENT_ACTIONBAR_PAGE = 1; ChangeActionBarPage(); end;

 

Countdown to pull

Spoiler

(Extended lua)


if CountdownMacro == nil then
    CountdownMacro = CreateFrame("frame")
    CountdownMacro.cds = {}
end

local function update()
    for k,cd in this.cds do
        cd.timer = cd.timer + arg1
        if cd.timer >= 1 then
            if cd.n == 0 then
                SendChatMessage(cd.final,cd.chat,nil,cd.target)
            else
                SendChatMessage(format(cd.text,cd.n),cd.chat,nil,cd.target)
            end
            cd.timer = 1 - cd.timer
            cd.n = cd.n - 1
            if cd.n < 0 then
                this.cds[k] = nil
            end
        end
    end
end

CountdownMacro:SetScript("OnUpdate", update)

function CountdownMacro:Start(name, text, final, chat, counts, target)
    self.cds[name] = {text = text, final = final, chat = chat, n = counts, target = target, timer = 1}
end

function CountdownMacro:Stop(name, aborted, chat, target)
    self.cds[name] = nil
    SendChatMessage(aborted,chat,nil,target)
end

function CountdownMacro:Toggle(name, text, final, aborted, chat, counts, target)
    if self.cds[name] then
        self:Stop(name, aborted, chat, target)
    else
        self:Start(name, text, final, chat, counts, target)
    end
end

Countdown macro (re-clickable to abort the countdown)

/run CountdownMacro:Toggle("pull","Pulling in %d secs!","=== PULLING ===","ABORTED","SAY",5)

 

 

Trainer

Spoiler

mass learn from trainer

Quote

/script n=GetNumTrainerServices(); i = 1; while n >= i do BuyTrainerService(i); i=i+1; end;

 

 

SuperMacro for modified actions (shift, ctrl, alt)

Spoiler

This achieves the something similar as patch 2.0 (and beyond) [mod: <modifier>] syntax in macros. I have two versions, one more advanced than the other. The usual rules apply, so if you add this macro to your 1 button but have shift + 1 bound to another button, holding shift + 1 will use that action rather than the one in this macro. Clicking does bypass this for ctrl and alt modifiers, however.

Extended LUA for spells / abilities only:

function ModifySpellAction(options)
	local shiftDown = IsShiftKeyDown();
	local ctrlDown = IsControlKeyDown();
	local altDown = IsAltKeyDown();
	local cast = CastSpellByName;
	
	if(shiftDown and options.shift ~= nil) then cast(options.shift);
	elseif(ctrlDown and options.ctrl ~= nil) then cast(options.ctrl);
	elseif(altDown and options.alt ~= nil) then cast(options.alt);
	elseif (options.unmod ~= nil) then cast(options.unmod);
	end;
end;

 

Let's say a mage wants to use this in a macro to create water, food and 2 gems (note the {brackets} instead of (parenthesis)):

Quote

/script ModifySpellAction{unmod="Conjure Water(Rank 7)", shift="Conjure Food(Rank 6)", ctrl="Conjure Mana Ruby", alt="Conjure Mana Citrine"};

 

One advantage of this is you don't have to pass every parameter to the macro. So if the same mage only wants to create food and water and not worry about having modifiers for the gems they can create the macro like this:

Quote

/script ModifySpellAction{unmod="Conjure Water(Rank 7)", ctrl="Conjure Food(Rank 6)"};

 


The more advanced version of the Extended LUA requires more input than just the name of the spells or abilities. It actually runs any script (including spells/abilities, using/equipping items, calling other macros) you normally would create in a macro.

Extended LUA for advanced version:

function ModifyKeyAction(options)
	local shiftDown = IsShiftKeyDown();
	local ctrlDown = IsControlKeyDown();
	local altDown = IsAltKeyDown();
	
	if(shiftDown and options.shift ~= nil) then RunScript(options.shift);
	elseif(ctrlDown and options.ctrl ~= nil) then RunScript(options.ctrl);
	elseif(altDown and options.alt ~= nil) then RunScript(options.alt);
	elseif (options.unmod ~= nil) then RunScript(options.unmod);
	end;
end;

 

Let's say the previous mage wants to switch between rank 1 and max rank of Fire Blast, and use an Iron Grenade, and use another macro named "MountBoots" to equip boots with attached mithril spurs. (note the {brackets} instead of (parenthesis))

Quote

/script ModifyKeyAction{unmod = 'CastSpellByName("Fire Blast")', shift = 'CastSpellByName("Fire Blast(Rank 1)")', alt = 'use("Iron Grenade")', ctrl = 'Macro("MountBoots")'};

 

Please note the use of outside (single) quotes, since we are now passing a string of a script to be run, it is necessary to include. You can also use double quotes on the outside instead, but the inner quotes will then need to be single quotes.

For example, the following will not work and will throw an error:

Quote

/script ModifyKeyAction{unmod = "CastSpellByName("Fire Blast")"};

 

Macros by Cernie

 

Loatheb Supermacro

Spoiler

This requires SuperMacro

Copy/Paste into the Extended LUA:

function createLoathebHealFrame(spell, healer)
	if loathebHealFrame == nil then
		loathebHealFrame = CreateFrame("FRAME");
		loathebHealFrame:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF");
		local function eventHandler(self, event, ...)
			if string.find (arg1, "Your "..spell.." heals") then
			SendChatMessage("I have casted "..spell..". Next Healer: "..healer.."!", "SAY");
			end;
		end;
		loathebHealFrame:SetScript("OnEvent", eventHandler);
	else
		if(isAssistTargetLoatheb() == true) then
			loathebHealFrame:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF");
		else loathebHealFrame:UnregisterAllEvents();
		end;
	end;
end;

function LoathebHeal(spell, nextHealer)
	local rankIndex = string.find(string.lower(spell), "%(rank");
	local spellName;
	if(rankIndex ~= nil) then 
		spellName = string.sub(tostring(spell), 1, rankIndex - 1);
	else spellName = spell;
	end;
	createLoathebHealFrame(spellName, nextHealer);
	CastSpellByName(spell);
end;

function isAssistTargetLoatheb()
	if(UnitExists("target")) then
		AssistUnit("target");
		if(UnitName("target") == "Loatheb") then AssistUnit("player"); return true; end;
	else return false;
	end;
end;

 

And call the macro like this:

Quote

/script LoathebHeal("Greater Heal(Rank 5)", "wickedfruit");

Where the first input is the spell and the second is the name of the next healer.

 

Macro made by Cernie

 

Detox clean

Spoiler

/run SpellStopCasting();
/detox clean

 

PVP macros

 

Drop WSG flag

Spoiler

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

 

Battlefield Minimap

Spoiler

Show the Battlefield Minimap outside of BGs

Quote

/run if(not BattlefieldMinimap)then BattlefieldMinimap_LoadUI()BattlefieldMinimap:Show()else BattlefieldMinimap:Show()end;SHOW_BATTLEFIELD_MINIMAP="1";

If you want to make it bigger append this at the end of the macro. 1.5 = 50% bigger, adjust as needed. All should be one line.

Quote

BattlefieldMinimap:SetScale(1.5);

 

 

Announce to Grab the Flag

Spoiler
Quote

/tf Enemy
/script if (UnitHealth('target')/UnitHealthMax('target')<0.20) then SendChatMessage("target has under 20 % Health, BE READY TO GRAB FLAG","PARTY"); end

This Macro recuires to have "targetFC",
it Will simply target the enemy Flag Carrier, check if the target is HP is below 20 % and then keep shoutin to remind the people to Grab the flag, and not only kill it!

 

Calculate RP

Spoiler
Quote

/script P=(math.floor(GetPVPRankProgress(target)*10000))/100 W=UnitPVPRank("player") N=(W-6)*5000+5000*P/100 Q=(W-5)*5000-N*0.8 SendChatMessage("Rank Progress: "..P.."% ".."Current RP: "..N.." RP to next rank "..Q.."")

 

Quote

/script P=(math.floor(GetPVPRankProgress(target)*10000))/100 W=UnitPVPRank("player") N=(W-6)*5000+5000*P/100 Q=(W-5)*5000-N*0.8 SendChatMessage("Rank Progress: "..P.."% ".."Current RP: "..N.." RP to next rank "..Q.."","emote")

 

 

Skull of Impending Doom

Spoiler

Equip if not equipped, use if equipped, unbuff if active (SuperMacro)

Quote

/script UseItemByName ("Skull of Impending Doom")
/Unbuff Flee

 

Use offhand or cancel buff

Quote

/script UseInventoryItem(17);
/run SpellStopCasting()
/script local i=0 g=GetPlayerBuff while not(g(i) == -1)do if(strfind(GetPlayerBuffTexture(g(i)), "Spell_Magic_PolymorphChicken"))then CancelPlayerBuff(g(i))end i=i+1 end

You can also swap the offhand to remove this buff

 

Use helmet

Spoiler

Use helmet

Quote

/run UseInventoryItem(1)

 

 

Itemrack "trigger event"

Spoiler

First of all a quick explanation of what ItemRack is, for those of you who aren't familiar with it: 
ItemRack is an addon that lets you swap gear faster. Whats interesting about it is that it has a queue function and can equip items automatically, pretty much similar to TrinketMenu. With ItemRack you can use wow's API events to set a "trigger event" for a set of gear that you've made and also make it run a script when that trigger event is met. To give a quick example:

Quote

Trigger: PLAYER_REGEN_ENABLED
Delay: 0.5 sec
Script: EquipSet("PvP Gear")


So what that tells me is that it should automatically equip my set "PvP Gear" 0.5 seconds after PLAYER_REGEN_ENABLED (i.e. when i'm out of combat).

Now this feature allows for some interesting stuff. For example:
 

Goblin Rocket Helmet:

Quote

Trigger: ITEMRACK_ITEMUSED
Delay: 0.5
Script: if arg1=="Goblin Rocket Helmet" and GetInventoryItemCooldown("player",1)>0 then EquipSet("PvP HELM") end

What this does is, equipping my set "PvP Helm" 0.5 seconds after I have used Goblin Rocket Helmet.

 

Skull of Impending Doom:

Quote

Trigger: ITEMRACK_ITEMUSED
Delay: 10
Script: if arg1=="Skull of Impending Doom" and GetInventoryItemCooldown("player",17)>0 then EquipSet("PvP OFFHAND")end

Inventory slot number can also be swapped out for arg2

 

Spider Belt:

Quote

Trigger: ITEMRACK_ITEMUSED
Delay: 6
Script: if arg1=="Spider Belt" and GetInventoryItemCooldown("player",6)>0 then EquipSet("PvP BELT")end

 

ItemRack v1.975 : https://wow.curseforge.com/projects/itemrack/files?sort=game-version

 

Healing Potion if in BG, else regular

Spoiler

Put potions in 2 different slots, replace `p1` with the BG potion slot id, `p2` with the normal one

Quote

/run for _,b in {"Warsong Gulch", "Arathi Basin", "Alterac Valley"} do if GetZoneText() == b then UseAction(p1) return end end UseAction(p2)

 

 

Healthstone/healing potion

Spoiler

Use any Healthstone/Healing Potion

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Healthstone") or strfind(n,"Healing Potion"))then UseContainerItem(b,s,1)end end end

 

Put stone and pot in two different slots, then using a third to activate them with the macro, replace `#` with slot id

Quote

/run stoneId=# potId=# if IsUsableAction(stoneId) and GetActionCooldown(stoneId) == 0 then UseAction(stoneId) else UseAction(potId) end

 

 

Bandage

Spoiler

Uses any bandage without losing target

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Bandage"))then UseContainerItem(b,s)SpellTargetUnit("player")end end end

 

Bandage without losing target (Put bandage in action slot 53)

Quote

/script p="player";t="target";if(not UnitCanAttack(t, p))then ot=UnitName(t);TargetUnit(p); else ot=nil;end;UseAction(53);if(SpellIsTargeting())then SpellTargetUnit(p); end if(ot) then TargetByName(ot);end

 

Bandage self, then TargetLastTarget (Put bandage in action slot 47)

Quote

/run UseAction(47) SpellTargetUnit("player") local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\INV_Misc_Bandage_08" then x=1 end i=i+1 end if x==1 then TargetLastTarget()end

 

Bandage, else TargetLastTarget (SuperMacro)

Quote

/run TargetUnit("player")
/run UseAction(47)
/run if buffed("Recently Bandaged", 'player') then TargetLastTarget() end

 

Targets player, use Heavy Runecloth Bandage, then TargetLastTarget (SuperMacro)

Quote

/run TargetUnit("player")
/use Heavy Runecloth Bandage
/run if buffed("Recently Bandaged", 'player') then TargetLastTarget() end

 

BGBandage

Spoiler

Extended Lua:


local bgbandage = {};

bgbandage['Alterac Heavy Runecloth Bandage']='Alterac Valley';
bgbandage['Warsong Gulch Runecloth Bandage']='Warsong Gulch';
bgbandage['Highlander\'s Runecloth Bandage']='Arathi Basin';

function BGBandage()
    local used = false; 
    for k,v in pairs(bgbandage) do 
        if string.find(GetRealZoneText(), v) then 
            UseItemByName(k)
            used = true;
        end
    end
    if not used then 
        UseItemByName("Heavy Runecloth Bandage")
    end 
end

 

Macro:

Quote

/run BGBandage()

 

Macro by Johnlars

 

 

WSG marks

Spoiler

Hey guys, I just wanted to share these macros I made a while ago to really speed up the turn in of the 20 WSG marks, since you have to move the mouse around a lot when you turn them in manually.
(The following 2 macros works perfectly for turning in the AB marks as well)


Macro 1 (click 1 selects the quest, click 2 accepts the quest):

Quote

/script SelectGossipAvailableQuest(1); AcceptQuest();



Macro 2 (click 1 selects the quest, click 2 completes the quest, click 3 gets the quest reward):

Quote

/script SelectGossipActiveQuest(1);CompleteQuest(); GetQuestReward();



Since there is no way to start the gossip with the NPC you'll have to rightclick the mob to start the gossip.
so basically: Right click mob, press macro 1 twice, right click the npc, press macro 2 three times. Repeat.
You'll want to replace your spells at actionbutton 1 and 2 or similar while doing this.


I made macros for taking the marks from your mailbox as well

mail-macro 1: (picks up the item at the first spot in your mailbox)

Quote

/script TakeInboxItem(1)


mail-macro 2: (deletes the empty mail after have taken the marks)

Quote

/script DeleteInboxItem(1)

Be careful when using these two macros guys since you will not get an notification if you accidentally click delete on a mail where you have not yet picked up the marks.
 

I just wanted to add that you can use this macro for any turn in quests, I just used it to turn in coins at Yojamba Isla.

To turn in the 3 different quests at the coin NPC you'll have to use these three different macros:

 

Turn-in macro 1:

Quote

/script SelectGossipActiveQuest(1);CompleteQuest(); GetQuestReward();



Turn-in Macro 2:

Quote

/script SelectGossipActiveQuest(2);CompleteQuest(); GetQuestReward();



Turn-in Macro 3:

Quote

/script SelectGossipActiveQuest(3);CompleteQuest(); GetQuestReward();



Here is a video of me showing off the mark turn-in and mailbox macros. 
http://www.youtube.com/watch?v=BQLAK0RL3aw

Enjoy !

 

Shaman macros

 

Top/Bottom Rank Spell

Spoiler

Top/Bottom Rank Spell (SuperMacro)

Quote

/script if ((UnitMana("Player")>mana cost top rank spell) or (buffed("Clearcasting")=="buff"))then cast ("Spell"); else cast ("Spell(Rank 1)");end

This macro helps you remove unnecessary clutter on your bars. No seperate rank 1 Frost Shock for slows, no seperate rank 1 Earth Shock to interrupt casts, etc. etc. Can also be slotted in on your self heal macro to ensure atleast a heal goes off.

 

Earth Shock rank1, if Clearcasting then max rank (SuperMacro)

Quote

/run if ((UnitMana("Player")>405) or (buffed("Clearcasting")=="buff"))then cast ("Earth Shock(Rank 7)"); else cast ("Earth Shock(Rank 1)");end

 

 

Weapon Swap

Spoiler

Swap one hander and shield, cast Flametongue Weapon

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Name One Hander") or strfind(n,"Name Shield"))then PickupContainerItem(b,s)EquipCursorItem(16, 17)end end end
/cast Flametongue Weapon

 

Weapon Swap to Shield + One Hander (SuperMacro)

Quote

/equip Name One Hander
/equip Name Shield
/cast Flametongue Weapon (Rank 6)

 

 

Lightning/healing

Spoiler

Lightning bolt/healing wave

Quote

/run if UnitCanAttack("player","target") == 1 then CastSpellByName("lightning bolt") else CastSpellByName("healing wave") end

 

Purge/Healing wave(Rank 4)

Quote

/run if UnitCanAttack("player","target") == 1 then CastSpellByName("Purge") else CastSpellByName("Healing Wave(Rank 4)") end

 

Elemental Mastery, Chain Lightning/Chain Heal

Quote

/run if UnitCanAttack("player","target") == 1 then CastSpellByName("Elemental Mastery")CastSpellByName("Chain Lightning")else CastSpellByName("Chain Heal") end

 

Nature's Swiftness, Lightning bolt/Healing Wave

Quote

/run CastSpellByName("Nature's Swiftness") if UnitCanAttack("player","target") == 1 then CastSpellByName("lightning bolt") else CastSpellByName("healing wave")end

 

 

Nature's Swiftness/Healing wave

Spoiler

/script local x=0;for i=1,90 do if IsCurrentAction(i) then x=1 end end if x==0 then CastSpellByName("Nature's Swiftness");SpellStopCasting();CastSpellByName("Healing wave") end

 

Heal in range

Spoiler

Will heal anyone in range who is low on hp(Set to react on < 40%)

Quote

/script for i=1,40 do TargetNearestFriend(); if UnitHealth("target")/UnitHealthMax("target") < 0.4 then if UnitIsPlayer("target") then CastSpellByName("Lesser Healing Wave(Rank 3)"); end end end; TargetLastEnemy();

 

 

Totem

Spoiler

Mana Tide Totem, Healing Wave(Rank 4)

Quote

/run if UnitMana("player")< 1000 then CastSpellByName("Mana Tide Totem")CastSpellByName("Healing Wave(Rank 4)") else CastSpellByName("Healing Wave(Rank 4)")end

 

Re-popping totems using the cheapest rank 1 spells. (Clicking faster than the global cooldown will skip totems)

Quote

/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])

 

Castsequence Windfury, Strenght of Earth, Mana Spring

Quote

/run local _gspells = { "Windfury Totem", "Strength of Earth Totem", "Mana Spring Totem"} if GetSpellCooldown(4,"BOOKTYPE_SPELL")==0 then _gi=_gi and _gi > 0 and _gi or 1 CastSpellByName(_gspells[_gi]) _gi = math.mod(1+_gi, 1+table.getn(_gspells))end

 

Windfury, Strenght of Earth, Mana Spring

Quote

/run s={"Windfury Totem","Strength of Earth Totem","Mana Spring Totem"} if q==nil then q=0 end q=q+1 if q>getn(s) then q=1 end CastSpellByName(s[q])

 

MS/WF/SoE Totem (SuperMacro)

Quote

/script if not buffed("Mana Spring", 'player') then cast("Mana Spring Totem")end;
/script if not buffed("Windfury", 'player') then cast("Windfury Totem")end;
/script if not buffed("Strength of Earth", 'player') then cast("Strength of Earth Totem")end;

 

Start attack, Searing Totem

Quote

/run for z=1,172 do if IsAttackAction(z)then if not IsCurrentAction(z)then UseAction(z);end;end;end;
/cast Searing Totem

 

Low rank Magma Totem, max rank if combat

Quote

/run if not UnitAffectingCombat("player") then CastSpellByName("Magma Totem(Rank 1)") else CastSpellByName("Magma Totem") end

 

 

Mouseover Healing Wave

Spoiler

/script if UnitExists("mouseover") then TargetUnit("mouseover"); CastSpellByName("Healing Wave"); TargetUnit("playertarget") else CastSpellByName("Healing Wave") end

 

Shock

Spoiler

Frost Shock rank 1, max rank if clearcasting

Quote

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

 

Flame Shock, attack Target, or target nearest enemy

Quote

/run if not PlayerFrame.inCombat then AttackTarget() end
/cast Flame Shock
/target NearestEnemy();

 

Target enemy, Start attack, cast Flame Shock

Quote

/run if not PlayerFrame.inCombat then AttackTarget() end if UnitExists("target") == nil or not UnitIsEnemy("target", "player") or UnitIsDead("target") ~= nil then TargetNearestEnemy() end
/cast Flame Shock

 

Start attack, Earth Shock, Purge

Quote

/run for z=1,172 do if IsAttackAction(z)then if not IsCurrentAction(z)then UseAction(z);end;end;end;
/cast Earth Shock
/cast Purge

 

Earth Shock, Start attack, target nearest enemy

Quote

/run if not PlayerFrame.inCombat then AttackTarget() end
/cast Earth Shock
/target NearestEnemy();

 

Earth Shock rank 1, max rank if clearcasting

Quote

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

 

Clearcasting/Earth Shock (SuperMacro)

Quote

/run if buffed("Clearcasting", 'player') then cast ("Earth Shock(Rank 7)") else cast ("Earth Shock(Rank 1)") end if GetUnitName("target")==nil then TargetNearestEnemy() end

 

 

Totem Twisting

Spoiler

If you got Windfury on mainhand cast Grace of Air Totem, else Windfury Totem

Quote

/run hasMainHandEnchant = GetWeaponEnchantInfo() if  not hasMainHandEnchant then CastSpellByName("Windfury Totem")else CastSpellByName("Grace of Air Totem")end

 

If you got Windfury on mainhand cast Tranquil Air Totem, else Windfury Totem

Quote

/run hasMainHandEnchant = GetWeaponEnchantInfo() if  not hasMainHandEnchant then CastSpellByName("Windfury Totem")else CastSpellByName("Tranquil Air Totem")end

 

If you got Windfury on mainhand cast Grounding Totem, else Windfury Totem

Quote

/run hasMainHandEnchant = GetWeaponEnchantInfo() if  not hasMainHandEnchant then CastSpellByName("Windfury Totem")else CastSpellByName("Grounding Totem")end

 

 

Lightning Shield

Spoiler

Earth Shock/Lightning Shield

Quote

/run CastSpellByName("Earth Shock") local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Nature_LightningShield" then x=1 end i=i+1 end if x==0 then CastSpellByName("Lightning Shield")end

 

Frost Shock/Lightning Shield

Quote

/run CastSpellByName("Frost Shock") local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Nature_LightningShield" then x=1 end i=i+1 end if x==0 then CastSpellByName("Lightning Shield")end

 

Flame Shock/Lightning Shield

Quote

/run CastSpellByName("Flame Shock") local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Nature_LightningShield" then x=1 end i=i+1 end if x==0 then CastSpellByName("Lightning Shield")end

 

 

Shaman macros

Spoiler

The SuperMacro addon might be needed for a few of these macros

 

Lightning Shield Macro
Checks if you have the Lightning Shield buff.
If not, it will cast Lightning Shield. If you do, nothing happens.
Great for when fighting Rogues.

Quote

/script if not buffed("Lightning Shield") then CastSpellByName("Lightning Shield") end

 

Totem keybind
I got my four primary totems keybinded to Shift+1,2,3,4.
This macro allows for a second totem to be attached to the same key, while ALT is being hold down aswell.
Example:
Shift + 1 casts Searing Totem
Shift + Alt + 1 casts Fire Nova Totem

Quote

/script if (IsAltKeyDown())then CastSpellByName("TOTEM NAME FOR SHIFT+ALT") else CastSpellByName("TOTEM NAME FOR SHIFT") end

 

Weapon swap + weapon imbue (Thanks to LYQ for this macro)
This macro will switch from for example 1h + shield to a 2h on first click and buff the weapon with a weapon imbue on second click. Macro needs to be updated with specific weapon name to work.

Quote

/equip NameOfWeapon
/run if string.find(GetInventoryItemLink("player",16), "NameOfWeapon") then CastSpellByName("WeaponImbueSpellName") end

 

Mouseover heal
Prior Healing Wave to be cast on friendly target that you have your mouse over.
If no mouseover, it'll cast on your target.
If no target, it'll cast on self.
Requires ClassicMouseover addon to work

Quote

/cmcast Healing Wave
/run if UnitIsFriend("player", "target") then CastSpellByName("Healing Wave"); else CastSpellByName("Healing Wave", 1); end

 

 

Missing Windfury

Spoiler

Whispers shamans who are in your group for windfury if WF is not up.

Extended Lua:

function WheresWindfury()
if not lastcall then lastcall = 0 end
    if not(buffed("windfury"))then
        if(lastcall+1 < GetTime())then
            for i=1,5 do
                if(UnitClass("party"..i) == "Shaman" and not(UnitIsDead("party"..i)) and UnitIsConnected("party"..i) and UnitIsVisible("party"..i))then
                        lastcall = GetTime();
                        SendChatMessage("MISSING WINDFURY", WHISPER, nil, UnitName("party"..i))
                end
            end
        end
    end
end

Macro:

Quote

/run WheresWindfury()

 

Macro by Einherjarn

 

Healing Macros

Spoiler

All healing spells including shields, instants and dispell/remove disease/remove poison should be made as macros with luna mouseover feature ( example: /lunamo Chain Heal(Rank 1)  ) and consumables like Greater Fire Prot. Potion, Runes, Healthstone/pot, trinkets should be on your bars and key binded. You can access the macro panel by typing /macro
 
Lunamouseover macros (each is a separate macro and requires LUNA addon to work)
These macro basically give you the ability to hover your mouse cursor over a LUNA frame such as group , raid, player, target etc. and use a heal without having to select the person as target or "using" the heal on the target frame enabling you to replace either of these 2 actions with one which saves incredible amount of time in the long run and will definitely impact your overall results.

Quote

/lunamo Chain Heal(Rank 1)

/lunamo Chain Heal(Rank 2)

/lunamo Chain Heal(Rank 3)

/lunamo Cure Disease

/lunamo Cure Poison

/lunamo Healing Wave(Rank 1)

/lunamo Healing Wave(Rank 4)

/lunamo Healing Wave(Rank 5)

/lunamo Healing Wave(Rank 7)

/lunamo Healing Wave(Rank 9)

/lunamo Lesser Healing Wave(Rank 4)

/lunamo Lesser Healing Wave(Rank 6)


Autoattack check and use auto attack if not on after spell cast and this can be used for every shock spell. 99 represents the position of your auto attack ability on your action bar (in this case auto attack is on the 99th cell/slot of the action bar - if each bar has 10 cells or slots then 99th position would be 9th on 10th bar)

Quote

/cast Earth Shock
/script if not IsCurrentAction(99) then UseAction(99) end;

add /target NearestEnemy(); or /target [MobName] to this on top. I find it good for tagging mobs.
 

Bandage without losing target
- 53 is the position of the bandage on your action bars same as the auto attack macro

Quote

/script p="player";t="target";if(not UnitCanAttack(t, p))then ot=UnitName(t);TargetUnit(p); else ot=nil;end;UseAction(53);if(SpellIsTargeting())then SpellTargetUnit(p); end if(ot) then TargetByName(ot);end

 

WeaponQuickSwap macro example (change weapon names to fit your needs, there is a possibility to put in more than two weapons into one macro so it does a rotation of the ones in it - check WeaponQuickSwap addon for details)

Quote

/script WeaponSwap("Aurastone Hammer", "Malistar's Defender");

 

Trinket use macros (or use trinket menu addon)

Quote

/script UseInventoryItem(13);

/script UseInventoryItem(14);

 

Berserking macro (Trolls only)

Quote

/aftercast +done /5 DO NOT HEAL "yourname" ! Berserking used!
/script CastSpellByName("Berserking")

 

Swap between mining and herbalism on one button

Quote

/run c=CastSpellByName;if(_t_f==nil)then _t_f=CreateFrame("frame");end;if (_t_f.h) then c"Find Minerals";_t_f.h=false;else c"Find Herbs";_t_f.h=true;end

 

Party chat notifications (These require the addon called aftercast)

 

Mana tide totem
- inform your party members that you used mana tide and they should move closer if they don't have the buff

Quote

/aftercast +done /run SendChatMessage("Mana Tide Totem up!","PARTY",nil,"5")
/script CastSpellByName("Mana Tide Totem(Rank 3)")

 
 
Tremor Totem
Quote

/script SpellStopCasting()
/aftercast +done /run SendChatMessage("Tremor Totem up!","PARTY",nil,"5")
/script CastSpellByName("Tremor Totem")

 

Nature's Swiftness

Quote

/script SpellStopCasting()
/aftercast +done /5 NS USED!
/script CastSpellByName("Nature's Swiftness")

 

Grounding Totem

Quote

/script SpellStopCasting()
/aftercast +done /run SendChatMessage("Grounding Totem up!","PARTY",nil,"5")
/script CastSpellByName("Grounding Totem")

 

Made by Kailas

 

Rogue Macros

 

ONE thing while in stealth and ANOTHER while not in stealth

Spoiler

A macro that will allow you to do ONE thing while in stealth and ANOTHER while not in stealth is like this...

Quote

/script i=1;m=0;while(UnitBuff("player",i)~=nil) do if(strfind(UnitBuff("player",i),"Ability_Stealth")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==1) then c("SPELL_1");else c("SPELL_2");end;

You can use this for any Buff/Aura aswell if you simply replace "Ability_Stealth" with the appropriate buff icon texture. eg. "Ability_Stealth" = the little icon of the guy peaking from leaves.

Use this site for a list of Buff Textures:
http://wowwiki.wikia.com/Queriable_buff_effects

 

MH/OH weapon swap for ambush

Spoiler

Switch weapons between main-hand and off-hand

Quote

/script PickupInventoryItem(17); PickupInventoryItem(16);

both weapons should be one-handed (i mean one-handed weapon marked with "main-hand" label won't be placed in off-hand slot)

 

The same function but more safe method

Quote

/script local a,b=CursorHasItem,PickupInventoryItem;if(not a())then CloseMerchant();b(17);if(a())then b(16);end end

 

 

Ambush Weapon change

Spoiler

Ambush and Weapon change

Quote

/cast Ambush(rank 6)
/script PickupContainerItem (x, y)
/script PickupInventoryItem (16)
/script PickupContainerItem (x, y)
/script PickupInventoryItem (17)
/script AttackTarget();



x = The bag
y = The slot of the bag

After you used Ambush you can switch weapons back to Swords or maces (Kinda useful for enormous burst attacks)(this is meant for bosses NOT FOR PVP)


How i use

Quote

/cast Ambush(rank 2)
/script PickupContainerItem (4, 10)
/script PickupInventoryItem (16)

 

 

Expose Armor without doing DMG

Spoiler

Expose Armor without doing DMG

Quote

/script CastSpellByName("Expose Armor")
/script ClearTarget();

you could use that in Duels, when you Gauge an enemy, using this makro to reduce his armor without getting him out of the CC and than go into stealth, BÄM AMBUSH
now thats going to hurt

 

Quote

/cast Expose Armor
/script ClearTarget();

 

 

Poisons & sharpening Stones

Spoiler

This will apply Instant poison VI on your mainhand if you press on no modifier, and on your offhand if shift is pressed

Quote

/run for i=0,4 do for j=1,18 do local h=GetContainerItemLink if not(h(i,j)==nil)then if strfind(h(i,j), "Instant Poison VI")then p=PickupInventoryItem UseContainerItem(i,j)if IsShiftKeyDown()then p(17)else p(16)end ReplaceEnchant()end end end end

There is also a addon for it named WeaponRebuff

 

Poisons & sharpening Stones

Mainhand :

Quote

/script UseContainerItem(x, y)
/script PickupInventoryItem(16)


 Offhand :

Quote

/script UseContainerItem(x, y)
/script PickupInventoryItem(17)

 

Both weapons (2 click) :

Quote

/run if not a then UseContainerItem(0,2);PickupInventoryItem(16);ReplaceEnchant();ClearCursor();a=1;else UseContainerItem(0,2);PickupInventoryItem(17);ReplaceEnchant();ClearCursor();a=nil;end;

 

x = The bag
y = The slot of the bag

 

Bandage

Spoiler

Uses any bandage without losing target

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Bandage"))then UseContainerItem(b,s)SpellTargetUnit("player")end end end

 

Bandage self without losing combo points. My bandages are located in slot 1 of my backpack.

Quote

/script UseContainerItem(0, 1)
/script SpellTargetUnit("player")

 

Pvp Bandage macro

Quote

/script TargetUnit("Player")
/script UseContainerItem(x,y)
/script TargetLastEnemy();


 Pve Bandage macro

Quote

/script TargetUnit("Player")
/script UseContainerItem(x,y)
/assist TargetUnit("Maintank")    <----- replace Maintank with the name of you tank

x = The bag
y = The slot of the bag

 

Riposte & Sinister Strike

Spoiler

Riposte & Sinister Strike

Quote

/script local isUsable, IsUsable = IsUsableAction (n);
if (isUsable) CastSpellByName("Riposte()") else CastSpellByName("Sinister Strike()");
end

a really simple macro for PvP Rogues, when you are spamming Sinister strike and dont watch for Reposte, this macro does the work for you.
it will use riposte when ever possible instead of Sinister strike, if its not possible, he keeps using sinister Strike, Simple or? xD
[it is necessary that Riposte is binded to the key n]

Alternative :

Quote

/script if (IsUsableAction(61)) then CastSpellByName("Riposte"); elseif not (IsUsableAction(61)) then CastSpellByName("Sinister Strike()");end

Button 61 is on the Blizzard Standart frame the first button on the right bar, Riposte has to be there

 

Backstab/Gouge

Spoiler

If stealthed cast Gouge, else cast Backstab

Quote

/script if not(string.find(GetShapeshiftFormInfo(1), "Invis" )) then CastSpellByName("Backstab") else CastSpellByName("Gouge"); end

 

If target is Gouged cast Backstab, else cast Gouge

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Ability_Gouge" then x=1 end i=i+1 end if x==0 then CastSpellByName("Gouge") else CastSpellByName("Backstab")end

 

 

Sap

Spoiler

Sap if target is in range, else clear target

Quote

/run TargetNearestEnemy()if CheckInteractDistance("target", 3) then CastSpellByName("sap")ClearTarget()else ClearTarget() end

 

Sap

Quote

/script ClearTarget();
/script TargetNearestEnemy();
/cast sap

PvP Alternative

Quote

/script ClearTarget()
/script TargetNearestEnemyPlayer()
/cast sap

 

 

Sinister + Auto Attack

Spoiler

Sinister + Auto Attack

Quote

/cast Sinister Strike
/script if not IsCurrentAction(9) then UseAction(9) end;

 

Sinister strike until 5 combo points then use Eviscerate.

Quote

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

 

Same as above but with auto targeting + auto attack

Quote

/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

 

Sinister/SnD/Eviscerate + Auto Attack

Quote

/script if not IsCurrentAction(37) then UseAction(37) end
/script if not buffed("Slice and Dice", 'player') then cast("Slice and Dice") end
/script if GetComboPoints("player", 'target') == 5 then cast("Eviscerate"); end
/cast Sinister Strike

 

 

Trinket

Spoiler

Trinket Button

Quote

/script UseInventoryItem(13);

/script UseInventoryItem(14);

 

Use trinket if no cooldown

Quote

/run if  GetInventoryItemCooldown("player", 13)==0 then UseInventoryItem(13)end

 

Trinket/Rupture

Quote

/run if  GetInventoryItemCooldown("player", 13)==0 then UseInventoryItem(13)end
/run if  GetInventoryItemCooldown("player", 14)==0 then UseInventoryItem(14)end
/cast Rupture

 

 

Vanish/Stealth

Spoiler

Vanish/Stealth

Quote

/script if UnitAffectingCombat("player") then CastSpellByName("Vanish") else CastSpellByName("Stealth") end

 

Vanish/Spammable stealth

Quote

/run if UnitAffectingCombat("player") then CastSpellByName("Vanish")end local _, _, active = GetShapeshiftFormInfo(1) if not active then CastShapeshiftForm(1)end

 

 

Stealth

Spoiler

Spammable stealth, if shift key down cancel stealth

Quote

/run local i,a,sn sn="Stealth" i=0 while a~=sn do i=i+1 a=GetSpellName(i,"spell")end if ({GetSpellCooldown(i,"spell")})[3]~=0 == not IsShiftKeyDown() then CastSpellByName(sn)end

 

Spammable stealth

Quote

/run local _, _, active = GetShapeshiftFormInfo(1) if not active then CastShapeshiftForm(1)end

 

Stealth + Kidney/Cheap Shot

Quote

/script if UnitAffectingCombat("player")then CastSpellByName("Kidney Shot")else local _, _, active = GetShapeshiftFormInfo(1) if not active then CastShapeshiftForm(1)end end
/cast Cheap Shot

 

Stealth (Put Stealth in action slot 37)

Quote

/script if not IsCurrentAction(37) then UseAction(37) end;

 

Unstealth:

Quote

/script if IsCurrentAction(37) then UseAction(37) end;

 

Spam stealth + ambush + equip dagger (Ambush after you gouge somebody, before he can do anything). You need SuperMacro for /equip

Quote

/run if not IsCurrentAction(37) then UseAction(37) end;
/run CastSpellByName("Ambush")
/equip Kingsfall



Spam stealth + cheap shot (cheap shot before your enemy can do anything during the 0,5s out of combat you can get while your enemy is under gouge)

Quote

/run if not IsCurrentAction(37) then UseAction(37) end;
/run CastSpellByName("Cheap Shot")



Spam stealth + garrote

Quote

/run if not IsCurrentAction(37) then UseAction(37) end;
/run CastSpellByName("Garrote")



Spam stealth + sap

Quote

/run if not IsCurrentAction(37) then UseAction(37) end;
/run CastSpellByName("Sap")



Auto attack + hemo + equip weapon (Put Auto attack in action slot 38)

Quote

/run if not IsCurrentAction(38) then UseAction(38) end;
/run CastSpellByName("Hemorrhage")
/equip Gressil%, Dawn of Ruin

 

here you can see where the actionID slots in your actionbars are:

ActionBar page 1: slots 1 to 12
ActionBar page 2: slots 13 to 24
ActionBar page 3 (Right ActionBar): slots 25 to 36
ActionBar page 4 (Right ActionBar 2): slots 37 to 48
ActionBar page 5 (Bottom Right ActionBar): slots 49 to 60
ActionBar page 6 (Bottom Left ActionBar): slots 61 to 72

 

Dismount

Spoiler

Dismount, Stealth, Cheap shot

Quote

/script a,b,c=GetShapeshiftFormInfo(1);if (c) then CastSpellByName("Cheap Shot") else CastSpellByName("Stealth");end
/run i=1 while UnitBuff("player",i)do if string.find(UnitBuff("player",i),"Mount")then UseAction(58)end i=i+1 end

 

 

Evasion

Spoiler

/run if (UnitIsUnit("targettarget","player")) then CastSpellByName("Evasion") end

 

Rotation

Spoiler

A simple Rotation

Quote

/run SnD=false for i=1,16,1 do db=UnitBuff("player",i) if(db~=nil and string.find(db,"SliceDice")) then SnD=true end end
/run if GetComboPoints("target")==5 then CastSpellByName("Eviscerate()");elseif SnD then CastSpellByName("Sinister Strike()");elseif GetComboPoints("target")==0 then CastSpellByName("Sinister Strike()"); else CastSpellByName("Slice and Dice()"); end

it Checks if Slice and Dice is up, if not he casts slice and dice.
if the Target has 5 combo points and SnD is up, he uses eviscerate
only pressing one button, a simple beginning, but more is following !

This Rotation is meant for Pve Sword Rogues who got improved SnD
you als no need SuperMacro because it exceeds the 255 char limit


Improved Rotation

Quote

/run RuP=false for r=1,16,1 do db=UnitDebuff("target",r) if(db~=nil and string.find(db,"Rupture")) then RuP=true end end
/run SnD=false for i=1,16,1 do db=UnitBuff("player",i) if(db~=nil and string.find(db,"SliceDice")) then SnD=true end end
/run if GetComboPoints("target")==5 then CastSpellByName("Eviscerate()"); end
/run if GetComboPoints("target")==0 then CastSpellByName("Sinister Strike()"); end
/run if SnD then CastSpellByName("Sinister Strike()"); else CastSpellByName("Slice and Dice()"); end
/run if RuP then CastSpellByName("Sinister Strike()"); else CastSpellByName("Rupture()"); end

Almost the same as above, but in this case it Checks if you have SnD up, if you dont he recasts it, but also checks if you have Rupture on the Enemy if not he recasts it if he has the Combopoints for it. if Rupture and SnD are up and you reach 5 Cp he does Eviscerate.

This Rotation is meant for Pve Sword Rogues who got improved SnD
you als no need SuperMacro because it exceeds the 255 char limit

If you actually combine this macro with "IsUsableSpell" and insert a spellreaction like Bladefury or Adrenaline Rush, you would have a complete rotation where you dont have to watch for CD's or keeping up your at all. just concentrate on movement and do the best of dps while u move, BUT this is just a theory! (alot of things would still be missing like Autoattack for switching targets and a macro if the current target is not a Boss to use something else, in order to do also MAX dps @trash)


Ambush, Coldblood & eviscerate

Quote

/run Stl=false for i=1,16 do db=UnitBuff("player",i) if(db~=nil and string.find(db,"Stealth")) then Stl=true end end
/script if Stl then CastSpellByName("Ambush()"); elseif not Stl then CastSpellByName("Cold Blood()"); elseif GetComboPoints("target")<0 then CastSpellByName("Eviscerate()"); end

After using Ambush, instant pop Cold Blood and do eviscerate. Normaly i would like to add Trinkets like the AQ40 trashmob trinket or Ramsteins L Bolt trinket in order to make a oneshot macro, but since i dont have these items, it wont happen :3

-- Request from Confined :3 --


Rotation to keep every debuff on the Enemy up

Quote

/run SnD=false for i=1,32,1 do db=UnitBuff("player",i) if(db~=nil and string.find(db,"SliceDice")) then SnD=true end end
/run RuP=false for r=1,16,1 do ddb1=UnitDebuff("target",r) if(ddb1~=nil and string.find(ddb1,"Rupture")) then RuP=true end end
/run ExP=False for e=1,16,1 do ddb2=UnitDebuff("target",e) if(ddb2~=nil and string.find(ddb2,"Warrior_Riposte")) then ExP=true end end
/script AttackTarget();
/run if GetComboPoints("target")==0 then CastSpellByName("Sinister Strike()"); end
/run if SnD then CastSpellByName("Sinister Strike()"); else CastSpellByName("Slice and Dice()"); end
/run if ExP then CastSpellByName("Sinister Strike()"); else CastSpellByName("Expose Armor()"); end
/run if RuP then CastSpellByName("Sinister Strike()"); else CastSpellByName("Rupture()"); end

This Rotation is only desired to keep every debuff on the Enemy up, aswell SnD on yourself, the Priority is : "SnD > Expose Armor > Rupture" as Finisher.
Kinda Interessting Idea.

-- Request from LoGyMW --

 

SnD/Eviscerate/SS

Spoiler
function SM_doesSomething
    SnD=false
    for i=1,16,1 do
        db=UnitBuff("player",i)
        if(db~=nil and string.find(db,"SliceDice")) then
            SnD=true
        end
    end
    if GetComboPoints("target")==5 then
        CastSpellByName("Eviscerate()")
    elseif SnD then
        CastSpellByName("Sinister Strike()")
    elseif GetComboPoints("target")==0 then
        CastSpellByName("Sinister Strike()")
    else
        CastSpellByName("Slice and Dice()")
    end
end


Macro:

Quote

/run SM_doesSomething

 

 

Mouseover Blind

Spoiler

/run if UnitExists("mouseover")then TargetUnit("mouseover") CastSpellByName("Blind") TargetLastTarget() else CastSpellByName("Blind") end

 

Junkbox

Spoiler

/run for b = 0,4 do for s=1,GetContainerNumSlots(b) do l=GetContainerItemLink(b,s) if l~=nil then if string.find(l,"Junkbox") then CastSpellByName("Pick Lock") PickupContainerItem(b,s) ClearCursor() end end end end

 

Rapid Pickpocketing

Spoiler

Rapid Pickpocketing AHK Script

Note: this script only functions correctly with an addon that causes the loot window to be generated at the X,Y coordinates of the mouse cursor every time that loot is gained, thereby causing loot to "move up" the list on the loot window, for example, XLoot (https://github.com/Road-block/XLoot_AddOns). What this script does is: targets your mouse over, casts pickpocket, and then spams leftclicks on the loot window at a very fast rate--almost instantly looting all pickpocketed loot. Where (x) is the keybinding that activate this script (I use middle-mouse button); where (y) is the keybinding in WoW for pickpocketing:

#IfWinActive ahk_class GxWindowClassD3d
    (x):: 
        Sleep 50
        Send {click left} ; target enemy
        
        Sleep 50
        Send {(y)} ; cast pickpocket
        
        Sleep 500 ; wait for loot window to generate
        Send {click left} ; loot 5 times, add more lines if necessary
        Send {click left}
        Send {click left}
        Send {click left}
        Send {click left}
    
    return

Made by Hatedream

 

Kick

Spoiler

Kick, and emote you kicking target by name

Quote

/cast Kick
/e Kicked %t

 

Simple kick macro

Quote

/cast Kick
/7 %t Kicked

With 7 The channel for posting (1 = general, 2 = trade, say, yell, party, raid, etc.)

 

Kick macro, to announce the kick after its executed

Spoiler

Extended Lua

function createKickFrame()
    if kickFrame == nil then
        kickFrame = CreateFrame("FRAME");
        kickFrame:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE");
        local function eventHandler(self, event, ...)
            if string.find (arg1, "Your Kick hits") 
				or string.find (arg1, "Your Kick crits")
				then SendChatMessage("Kicked!", "SAY")
			end;
			if string.find (arg1, "Your Kick is parried")
				then SendChatMessage("Kick parried!", "SAY")
			end;
			if string.find (arg1, "Your Kick was dodged")
				then SendChatMessage("Kick dodged!", "SAY")
			end;
			if string.find (arg1, "Your Kick missed")
				then SendChatMessage("Kick missed!", "SAY")
			end;
        end
        kickFrame:SetScript("OnEvent", eventHandler);
    end;
end;

function Kick()

createKickFrame()
CastSpellByName("Kick()");

end;

Macro

Quote

/script Kick()

 

 

Druid macros

 

Healing Touch

Spoiler

Smart Touch

Quote

/script r=10;H=UnitHealthMax("target")-UnitHealth("target");SR={140,350,640,1100,1500,1799,2004,2385,2600,3100};for i=r,1,-1 do if (H>(SR)) then CastSpellByName("Healing Touch(Rank "..i..")");break;end;end;

 

Wrath/Healing Touch

Quote

/run if UnitCanAttack("player","target") == 1 then CastSpellByName("Wrath") else CastSpellByName("Healing Touch") end

 

 

Innervate weapon swap

Spoiler

This will work if you put your +spirit staff in the 1st slot of your backpack

Quote

/script UseContainerItem(0,1)
/script TargetUnit("player")
/cast Innervate
/script TargetLastTarget()

When you swap the weapon back, you just hit the macro again - you will receive the message "Spell is not ready yet" on your screen, there's probably a way to suppress that.

 

Nature's Grace

Spoiler

If buffed Nature's Grace cast HT4, else cast HT3

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Nature_NaturesBlessing" then x=1 end i=i+1 end if x==0 then CastSpellByName("Healing Touch(Rank 3)") else CastSpellByName("Healing Touch(Rank 4)")end

 

If buffed Nature's Grace cast HT3, else cast Regrowth 4

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\Icons\Spell_Nature_NaturesBlessing" then x=1 end i=i+1 end if x==0 then CastSpellByName("Regrowth(Rank 4)") else CastSpellByName("Healing Touch(Rank 3)")end

 

 

Rejuvenation/Swiftmend

Spoiler

/script i=1;x=0;m=0;c=CastSpellByName;while(UnitBuff("target",i)~=nil) do if(strfind(UnitBuff("target",i),"Spell_Nature_Rejuvenation")) then m=1;end;i=i+1;end;if (m~=1) then c"Rejuvenation";else c"Swiftmend";end;

 

Rejuvenatio/healing Touch

Spoiler

If you have this on your bar instead of rejuvination, you will NEVER replace another druid's (or your own) rejuv, conserving mana and making you a more efficient healer.

Quote

/script i=1;x=0;m=0;c=CastSpellByName;while(UnitBuff("target",i)~=nil) do if(strfind(UnitBuff("target",i),"Spell_Nature_Rejuvenation")) then m=1;end;i=i+1;end;if (m~=1) then c"Rejuvenation";else c"Healing Touch(rank 3)";end;

 

 

Rejuv/NS/Swiftmend

Spoiler

Keeps rejuv up, uses different ranks depending on the target health, uses NS if needed, uses swiftmend, uses innervate when low on mana and mana pot before.

Quote

/script if UnitMana("Player") < 880 then use("Major Mana Potion") end;
/script i=1;x=0;m=0;c=CastSpellByName;while(UnitBuff("target",i)~=nil) do if(strfind(UnitBuff("target",i),"Rejuvenation")) then m=1;end;i=i+1;end;if UnitMana"player"<500 then c("Innervate",1) c"Healing Touch(Rank 2)";elseif(m~=1) then c"Rejuvenation";elseif (m==1)and((UnitHealthMax"target")-(UnitHealth"target"))>4000then c"Nature's Swiftness" c"Healing Touch";elseif (m==1) and((UnitHealthMax"target")-(UnitHealth"target"))>3000then c"Swiftmend" c"Healing Touch(Rank 8 )";elseif (m==1) and((UnitHealthMax"target")-(UnitHealth"target"))>1500 then c"Swiftmend" c"Healing Touch(Rank 6)";elseif(m==1) and((UnitHealthMax"target")-(UnitHealth"target"))>1000then c"Healing Touch(rank 4)";else c"Healing Touch(rank 2)";end;

 

 

Heal yourself

Spoiler

Rejuvenation on yourself without losing target

Quote

/run CastSpellByName("Rejuvenation",1)

 

 

Heal in range

Spoiler

Heal friends in range who is low on hp(Set to react on < 90%)

Quote

/script for i=1,40 do TargetNearestFriend(); if UnitHealth("target")/UnitHealthMax("target") < 0.9 then if UnitIsPlayer("target") then CastSpellByName("Healing Touch(Rank 3)"); end end end; TargetLastEnemy();

 

 

Mob tagging

Spoiler

Moonfire closest mob

Quote

/script ClearTarget();
/run TargetNearestEnemy()
/run for z=1,172 do if IsAttackAction(z)then if not IsCurrentAction(z)then UseAction(z);end;end;end;
/cast Moonfire

 

 

Cat

Spoiler

Spammable cat form

Quote

/run local _, _, active = GetShapeshiftFormInfo(3) if not active then CastShapeshiftForm(3)end

 

Spammable cat form/prowl, track humanoids

Quote

/script if not buffed("prowl", 'player') then CastSpellByName("prowl")end;
/script if not buffed("cat Form", 'player') then cast("cat Form(Shapeshift)")end;
/script CastSpellByName("Track Humanoids")

 

One button pounce/rake

Quote

/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==1 then CastSpellByName("Pounce") else CastSpellByName("Rake")end

 

One button Rake/Claw

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Ability_Druid_Disembowel" then x=1 end i=i+1 end if x==0 then CastSpellByName("Rake") else CastSpellByName("Claw")end

 

One button Prowl/Ravage

Quote

/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("Prowl") else CastSpellByName("Ravage")end

 

One button ravage/shred

Quote

/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==1 then CastSpellByName("Ravage") else CastSpellByName("Shred")end

 

Rip/rake

Quote

/run if ( GetComboPoints() >= 3 ) then CastSpellByName("Rip"); else if (UnitMana("player") >= 40 ) then CastSpellByName("Rake")end end

 

Powershift/shred

Quote

/script u=UnitMana('Player'); c=CastSpellByName; f=UnitPowerType("Player"); if (u<=30) and (f==3) then c"Cat Form"; elseif (f==0) then c"Cat Form"; end;
/cast Shred

 

 

Bear

Spoiler

Bear Form from any form, 2 clicks.

Quote

/script local s,_ for i=1,5 do _,_,s=GetShapeshiftFormInfo(i)if s then CastShapeshiftForm(i)break end end if not s then CastShapeshiftForm(1) end

 

Spammable bear form/feral charge

Quote

/run local _, _, active = GetShapeshiftFormInfo(1) if not active or IsControlKeyDown() then CastShapeshiftForm(1) else CastSpellByName("Feral Charge")end

 

Switch from any stance to Bear form, cast Bush

Quote

/run local _, _, active = GetShapeshiftFormInfo(1) if not active or IsControlKeyDown() then for i = 2, 4 do _, _, active = GetShapeshiftFormInfo(i) if active then CastShapeshiftForm(i) return end end CastShapeshiftForm(1) else CastSpellByName"Bash" end

 

 

Feral Faerie Fire/Faerie Fire

Spoiler

Feral Faerie Fire when shapeshifted, Faerie Fire if not

Quote

/script i=1;m=0;while(UnitBuff("player",i)~=nil) do if(strfind(UnitBuff("player",i),"Form")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==1) then c("Faerie Fire (Feral)()");else c("Faerie Fire");end;

 

 

Insect Swarm/Moonfire

Spoiler

If missing cast Insect Swarm, else cast Moonfire

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Nature_InsectSwarm" then x=1 end i=i+1 end if x==0 then CastSpellByName("Insect Swarm") else CastSpellByName("Moonfire")end

 

 

Quick self innervate

Spoiler

/script TargetUnit("player")
/script CastSpellByName("Innervate");
/run TargetLastTarget()

 

Mark of the Wild

Spoiler

Adjust buff ranks due to target level

Quote

/script Pre="Mark of the Wild(Rank " Sp={1,2,14,26,38,50} if (UnitLevel("target") ~= nil and UnitIsFriend("player","target")) then for i=5,1,-1 do if (UnitLevel("target") >= Sp) then CastSpellByName(Pre..i..")") return end end end

 

Mark of the Wild, else Thorns

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Nature_Regeneration" then x=1 end i=i+1 end if x==0 then CastSpellByName("Mark of the Wild") else CastSpellByName("Thorns") end

 

Mark of the Wild/Faerie Fire

Quote

/run if UnitCanAttack("player","target") == 1 then CastSpellByName("Faerie Fire")else CastSpellByName("Mark of the Wild")end

 

 

Shift

Spoiler

Caster Form

Quote

/run for i = 1, GetNumShapeshiftForms() do local _, _, active = GetShapeshiftFormInfo(i) if active then CastShapeshiftForm(i) return end end

Bear Form / Charge

Quote

/run local _, _, active = GetShapeshiftFormInfo(1) if not active or IsControlKeyDown() then CastShapeshiftForm(1) else CastSpellByName"Feral Charge" end

Cat Form / Prowl

Quote

/run local _, _, active = GetShapeshiftFormInfo(3) if not active or IsControlKeyDown() then CastShapeshiftForm(3) else CastSpellByName"Prowl" end

Aquatic / Travel Form

Quote

/run UIErrorsFrame:UnregisterEvent"UI_ERROR_MESSAGE" for i = 2, GetNumShapeshiftForms(), 2 do local _, _, active = GetShapeshiftFormInfo(i) if not active then CastShapeshiftForm(i) end if i == 2 then UIErrorsFrame:RegisterEvent"UI_ERROR_MESSAGE" end end

 

 

Unshift

Spoiler

Unshift

Quote

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

 

Unshift+Regrowth self/target

Quote

/run local c,r,a,_=CastSpellByName,"Regrowth";for i=1,GetNumShapeshiftForms()do _,_,a=GetShapeshiftFormInfo(i)if(a)then CastShapeshiftForm(i)break end end if UnitIsFriend("player","target")then c(r)else c(r,1)end

 

Unshift+self heal (SuperMacro)

Quote

/unbuff bear form
/unbuff dire bear form
/unbuff cat form
/unbuff travel form
/unbuff aquatic form
/target "player"
/cast Regrowth

 

Unshift + cat + dash

Quote

/run local f=0 for i=1,GetNumShapeshiftForms()do if({GetShapeshiftFormInfo(i)})[3]then f=i end end if f ~= 0 and f ~= 3 then CastShapeshiftForm(f) else if f == 3 then CastSpellByName("Dash") else CastShapeshiftForm(3) end end

 

Unshift + cat + prowl

Quote

/run local f=0 for i=1,GetNumShapeshiftForms()do if({GetShapeshiftFormInfo(i)})[3]then f=i end end if f ~= 0 and f ~= 3 then CastShapeshiftForm(f) else if f == 0 then CastShapeshiftForm(3) end end /cast [stance:3, nostealth] Prowl

 

 

Feral

Spoiler

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.

Quote

/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.

Quote

/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")

 

tigersfuryravage 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.

Quote

/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:

Quote

/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_rakeability_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.

Quote

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

 

Same as above but with auto targeting + auto attack.

Quote

/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

 

 

Healing

Spoiler

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.

Quote

/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_faeriefireinsectswarmDruid 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:

Quote

/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!

Quote

/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:

Quote

/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

Quote

/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

Quote

/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

Quote

/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

Quote

/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

Quote

/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

Quote

/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

 

 

Cancel form on spellcast

Spoiler

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:

Quote

/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).

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:

Quote

/run UseAction(37)

 

And then we combine it with a healing spell:

Quote

/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.

 

Druid macros

Spoiler

Innervate and whisper to target

Quote

/cast Innervate
/run if UnitExists"target"then SendChatMessage("flavor text","WHISPER",nil,UnitName"target")end


 

Rebirth and yell

Quote

/cast Rebirth(Rank 5)
/y Casting Rebirth on %T!


 

Nature's Swiftness and Max Healing Touch combo

Quote

/cast Nature's Swiftness
/cast Healing Touch(Rank 11)


 

Healing Touch with AQ Idol equipped

Quote

/equip Idol of Health
/cast Healing Touch(Rank 4)


 

Rejuvination with Rejuvination Idol plus overwrite protection

Quote

/equip Idol of Rejuvenation
/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

This only works if you click on the healing target BEFORE casting Rejuvination. It will not work if you hover or click cast.


 

Barkskin with auto remove

Quote

/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")

Clicking once casts Barkskin. Clicking again will remove it.


 

Faerie Fire in any form

Quote

/script i=1;m=0;while(UnitBuff("player",i)~=nil) do if(strfind(UnitBuff("player",i),"Form")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==1) then c("Faerie Fire (Feral)()");else c("Faerie Fire(Rank 4)");end;


 

Bear, Cat, and Shapeshift Macros
 

Enrage with auto remove

Quote

/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")

Clicking once casts Enrage. Clicking again will remove it.


 

Ravage and Shred auto select

Quote

/script i=1;m=0;while(UnitBuff("player",i)~=nil) do if(strfind(UnitBuff("player",i),"Ability_Ambush")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==1) then c("Ravage(rank 4)");else c("Shred(rank 5)");end;


 

Claw and Ferocious Bite combo

Quote

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

Change 4 to 5 if you want it to build to 5 combo points before Ferocious Bite casts

 

Shred and Ferocious Bite combo

Quote

/run if GetComboPoints()>=4 then CastSpellByName("Ferocious Bite") else CastSpellByName("Shred") end

Change 4 to 5 if you want it to build to 5 combo points before Ferocious Bite casts

 

Shred and Powershifting

Quote

/cast Shred(Rank 5)
/script u=UnitMana('Player'); c=CastSpellByName; f=UnitPowerType("Player"); if (u<=30) and (f==3) then c"Cat Form"; elseif (f==0) then c"Cat Form"; end;

Energy level is set to 30. Change to a different number for a different cutoff for when you shift to caster

 

Shred, Ferocious Bite, and Powershifting one button brainless option

Quote

/run if GetComboPoints()>=4 then CastSpellByName("Ferocious Bite") else CastSpellByName("Shred") end
/script u=UnitMana('Player'); c=CastSpellByName; f=UnitPowerType("Player"); if (u<=30) and (f==3) then c"Cat Form"; elseif (f==0) then c"Cat Form"; end;


 

Spammable Bear form to Feral Charge (requires SuperMacro)

Quote

/unbuff Cat Form
/unbuff Aquatic Form
/unbuff Travel Form
/script CastSpellByName("Feral Charge");
/script if not buffed("Dire Bear Form", 'player') then cast("Dire Bear Form(Shapeshift)")end;
/script UIErrorsFrame:Clear()


 

Spammable Cat form to Stealth (requires SuperMacro)

Quote

/unbuff Dire Bear Form, Travel Form, Aquatic Form()
/script if not buffed("prowl", 'player') then cast("prowl")end;
/script if not buffed("Cat Form", 'player') then cast("Cat Form(Shapeshift)")end;
/script UIErrorsFrame:Clear()


 

Spammable Aquatic or Travel Form (requires SuperMacro)

Quote

/unbuff Dire Bear Form
/unbuff Cat Form
/script if not buffed("Travel Form", 'player') then cast("Travel Form(Shapeshift)")end;
/script if not buffed("Aquatic Form", 'player') then cast("Aquatic Form(Shapeshift)")end;
/script UIErrorsFrame:Clear()

 

Innervate

Spoiler

Innervate with whisper and safety against warriors and rogues plus 75% mana cutoff and combat check (requires Supermacro)

 

Extended lua:


function Innervate(target, msg)
    local cast = CastSpellByName;
    local _, innervateCooldown, _ = nil;
    
    if(Innervate_getSpellId("Innervate") ~= nil) then 
        _, innervateCooldown, _ = GetSpellCooldown(Innervate_getSpellId("Innervate"), BOOKTYPE_SPELL); end;
    if(UnitExists(target) ~= 1) then target = "player"; end;
    if(UnitAffectingCombat(target) == 1 and UnitClass(target) ~= "Warrior" and UnitClass(target) ~= "Rogue" and (UnitMana(target) / UnitManaMax(target)) < 0.75 and innervateCooldown == 0 and CastingBarFrame.casting ~= 1) then
        if(target == "target") then
            cast("Innervate");
            SendChatMessage(msg ,"WHISPER" , nil, UnitName("target"));
        elseif(target == "player") then
            cast("Innervate", 1);
            DEFAULT_CHAT_FRAME:AddMessage(msg);
        end;
    end;
end;

function Innervate_getSpellId(spell)
    local i = 1
    while true do
       local spellName, spellRank = GetSpellName(i, BOOKTYPE_SPELL)
       if not spellName then
          do break end
       end
       if spellName == spell then
       return i; end;
       i = i + 1
    end
end;

 

Macro:

Quote

/script Innervate("target", "I'm Innervating you!"):

 

Or use this for specifying yourself

Quote

/script Innervate("player", "I'm Innervating myself!");

 

 

Made by Taladril

 

Smart hots/Swiftmend

Spoiler

Mouseover Rejuvenation, or Regrowth if missing, Swiftmend if target is below 65% (SuperMacro)

Quote

/script s1="Rejuvenation" s2="Regrowth" s3="Swiftmend" if (VGRT_TLTP == nil) then CreateFrame("GameTooltip","VGRT_TLTP",nil,"GameTooltipTemplate") VGRT_TLTP:SetOwner(WorldFrame,"ANCHOR_NONE") end function VGRT_CastSpellWithCheck(tar) c=0 i=1 while (UnitBuff(tar,i) ~= nil) do VGRT_TLTP:SetUnitBuff(tar,i) if (strfind(VGRT_TLTPTextLeft1:GetText(),s1) ~= nil) then c=1 break elseif (strfind(VGRT_TLTPTextLeft1:GetText(),s2) ~= nil) then c=2 end i=i+1 end local smOffCd = false local j=1 local _, smCd, _ while true do local spellName, spellRank = GetSpellName(j, BOOKTYPE_SPELL) if not spellName then do break end end if spellName == s3 then _, smCd, _ = GetSpellCooldown(j, BOOKTYPE_SPELL) if(smCd == 0) then smOffCd = true end break end j = j + 1 end if (c==0) then CastSpellByName(s1) elseif(UnitHealth(tar)/UnitHealthMax(tar)<=0.65) then if(smOffCd) then CastSpellByName("Swiftmend") elseif(c~=1) then CastSpellByName(s1) end elseif (c==2) then CastSpellByName(s1) end end if GetMouseFocus().unit then if UnitIsUnit("target", GetMouseFocus().unit) then VGRT_CastSpellWithCheck("target") else TargetUnit(GetMouseFocus().unit) VGRT_CastSpellWithCheck("target") TargetLastTarget() end else if (UnitName("target")==nil) then VGRT_CastSpellWithCheck("player") else VGRT_CastSpellWithCheck("target") end end

https://pastebin.com/Ug1WhqEm

Macro by Cernie and Erminn

 

Cat DPS SuperMacro

Spoiler

This macro requires the SuperMacro addon to use (and optionally either Druidbar or Luna Unit Frames). It also requires Auto Attack to be somewhere on your action bars to avoid losing auto attack dps when powershifting. When you go to create a new macro copy/paste the following in the Extended LUA Code panel:

function CatDruidDPS(mainDamage, opener, finisher, isPowerShift, druidBarAddon)
	local abilities = {"Ferocious Bite", "Rip", "Shred", "Claw", "Rake", "Ravage", "Pounce"};
	local cp = GetComboPoints();
	local cast = CastSpellByName;
	local energy = UnitMana("player");
	local cpMain = nil;
	local cpFinisher = nil;
	local clearcast = isBuffTextureActive("Spell_Shadow_ManaBurn");
	local minEnergy = nil;
	local openerEnergy = 101;
	local ferocityNameTalent, ferocityIcon, ferocityTier, ferocityColumn, ferocityCurrRank, ferocityMaxRank = GetTalentInfo(2,1);
	local impShredNameTalent, impShredIcon, impShredTier, impShredColumn, impShredCurrRank, impShredMaxRank = GetTalentInfo(2,9);
	local natShifterNameTalent, natShifterIcon, natShifterTier, natShifterColumn, natShifterCurrRank, natShifterMaxRank = GetTalentInfo(1,7);
	local slotId = GetInventorySlotInfo("RangedSlot");
	local itemLink = GetInventoryItemLink("player", slotId);
	local idolFerocity = "Idol of Ferocity";
	local idolCostReduction = 0;
	local canPowerShift = true;
	local shiftCost;
	local currentMana;
	local runeOfMetamorphosis = isBuffTextureActive("INV_Misc_Rune_06");
	local _, formName, active = nil;
	local catForm = nil;
	
	if(itemLink ~=nil) then
		if(string.find(itemLink, idolFerocity)) then idolCostReduction = 3; end;
	end;
	
	if (isPowerShift ~= false) then isPowershift = true; end;
	if (druidBarAddon == "DruidBar") then
		shiftCost = DruidBarKey.subtractmana;
		currentMana = DruidBarKey.keepthemana;
		if(shiftCost <= currentMana or runeOfMetamorphosis == true) then canPowerShift = true;
		else canPowerShift = false; end;
	elseif (druidBarAddon == "Luna") then 
		local baseMana;
		local maxMana;
		local baseint, int = UnitStat("player", 4);
		currentMana, maxMana = LunaUF.DruidManaLib:GetMana();
		baseMana = maxMana - ( min(20, int) + 15*(int - min(20, int) ) );
		shiftCost = math.floor((baseMana * .55) * (1 - (natShifterCurrRank * .10)));
		if(shiftCost <= currentMana or runeOfMetamorphosis == true) then canPowerShift = true;
		else canPowerShift = false; end;
	end;
	
	if (mainDamage == abilities[3]) then
		cpMain = 60 - (impShredCurrRank * 6);
	elseif (mainDamage == abilities[5]) then
		cpMain = 40 - ferocityCurrRank - idolCostReduction;
	elseif (mainDamage == abilities[4]) then
		cpMain = 45 - ferocityCurrRank - idolCostReduction;
	else cpMain = 40;
	end;
	minEnergy = cpMain - 20;
	
	if(opener == abilities[6]) then openerEnergy = 60;
	elseif (opener == abilities[7]) then openerEnergy = 50;
	end;
	
	if (finisher == abilities[1]) then cpFinisher = 35;
	else cpFinisher = 30;
	end;
	
	local currentForm = 0;
	for i = 1, GetNumShapeshiftForms(), 1
		do
			_,formName,active = GetShapeshiftFormInfo(i);
			if(formName == "Cat Form") then catForm = i; end;
			if(active ~= nil) then currentForm = i; end;
	end;
	
	if (currentForm == catForm and buffed("Prowl") ~= nil and (energy >= openerEnergy or clearcast == true)) then cast(opener);
	elseif (currentForm == catForm and cp >= 4 and (energy >= cpFinisher or clearcast == true)) then 
		if(finisher == "Rip" and isTargetDebuff("target", "Ability_GhoulFrenzy") == true) then finisher = "Ferocious Bite"; end;
		cast(finisher); 
		if (currentForm == catForm and findAttackActionSlot() == 0) then AttackTarget(); end;
	else if (currentForm == catForm and (energy >= cpMain or clearcast == true)) then 
		cast(mainDamage);
		if (currentForm == catForm and findAttackActionSlot() == 0) then AttackTarget(); end;
	elseif (currentForm == catForm and energy < minEnergy and isPowerShift == true and canPowerShift == true) then 
		if(findAttackActionSlot() ~= 0) then AttackTarget(); end;
		CastShapeshiftForm(currentForm);
	elseif (currentForm ~= catForm and currentForm ~= 0) then CastShapeshiftForm(currentForm);
	elseif (currentForm == 0) then CastShapeshiftForm(catForm);
	end; end;	
end;
function findAttackActionSlot()
	for i = 1, 120, 1
		do
		if(IsAttackAction(i) == 1 and IsCurrentAction(i) == 1) then
		return i; end;
	end;
	return 0;
end;
function isTargetDebuff(target, debuff)
	local isDebuff = false;
	for i = 1, 40
		do
		if(strfind(tostring(UnitDebuff(target,i)), debuff)) then isDebuff = true; end;
	end;
	return isDebuff;
end;
function isBuffTextureActive(texture)
	local i=0;
	local g=GetPlayerBuff;
	local isBuffActive = false;

	while not(g(i) == -1)
	do
		if(strfind(GetPlayerBuffTexture(g(i)), texture)) then isBuffActive = true; end;
		i=i+1
	end;	
	return isBuffActive;
end;

 

Your macro should then look like the following if you want powershifting and have the Druidbar addon:

Quote

/script CatDruidDPS("Shred", "Pounce", "Rip", true, "DruidBar");

 

Your macro should then look like the following if you want powershifting and have the Luna Unit Frames addon:

Quote

/script CatDruidDPS("Shred", "Ravage", "Rip", true, "Luna");

 

Or if you don't want powershifting (and don't have Druidbar or Luna addons):

Quote

/script CatDruidDPS("Shred", "Ravage", "Ferocious Bite", false, false);

 

The first parameter is your main Combo Point builder, so change it to "Claw" (or "Rake" if that's your thing). The second parameter is your opener move, which can be either "Ravage" or "Pounce". The third parameter is your finishing move, which can be either "Rip" or "Ferocious Bite". The fourth parameter is a true or false that determines if you want powershifting or not. The fifth parameter is a string for which addon you have, either "DruidBar" or "Luna". When both the addon parameter is set and powershifting are set to true, the macro will prevent you from powershifting when you no longer have the mana to do so.

This macro now detects and adjusts energy requirements based on your talents (or lack of) in Ferocity and Improved Shred. It also accounts for Omen of Clarity procs if you have that as well.

How the macro works:

  • If you are currently in a different form, it will cancel your form.

If you are in humanoid form, shift you into cat form. If you are prowling with enough energy, use your opener. If you have 4 or more combo points and have enough energy for your finisher (based on current energy or if you have an Omen of Clarity proc), use your finisher. If you do not have 4 or more combo points and have enough energy for your main damage (based on current energy or if you have an Omen of Clarity proc), use your main damage. If you are below (main damage ability - 20) current energy and have no Omen of Clarity proc (and if powershifting is enabled), will shift you out of cat form and back into humanoid form.

If you couldn't tell already, this macro will run through your mana quickly (unless you set the powershifting to false), so you will still need to monitor that.

 

Macro by Cernie

 

Cat consumable

Spoiler

Cat Juju Flurry Usage Macro

 

Extended lua:

Spoiler

function CatJuJuFlurry()	
	createCatJuJuFrame();
	
	local juju = "Juju Flurry";
	local isJujuFlurryActive, jujuIndex, numBuffs = CatJuJuFlurry_isBuffNameActive(juju);
	local jujuBag, jujuSlot = CatJuJuFlurry_getSlotItemInBag(juju);
	local catForm = nil;
	numBuffs = numBuffs - 1;
	
	local currentForm = 0;
	for i = 1, GetNumShapeshiftForms(), 1
		do
			_,formName,active = GetShapeshiftFormInfo(i);
			if(formName == "Cat Form") then catForm = i; end;
			if(active ~= nil) then currentForm = i; end;
	end;
	
	if(isJujuFlurryActive == false and numBuffs >= 32) then
		DEFAULT_CHAT_FRAME:AddMessage("CatJuJuFlurry: Cannot use "..juju.." due to buff limit!");
	elseif(currentForm == 0) then
		if(isJujuFlurryActive == false and jujuBag ~= nil) then
			UseContainerItem(jujuBag, jujuSlot);
			DEFAULT_CHAT_FRAME:AddMessage("CatJuJuFlurry: Attempting to use "..juju..".");
		elseif(isJujuFlurryActive == true) then
			CastShapeshiftForm(catForm);
			CatJuJuFlurry_ToggleAutoAttack("on");
			DEFAULT_CHAT_FRAME:AddMessage("CatJuJuFlurry: "..juju.." in use.");
		elseif(jujuBag == nil) then
			CastShapeshiftForm(catForm);
			CatJuJuFlurry_ToggleAutoAttack("on");
			DEFAULT_CHAT_FRAME:AddMessage("CatJuJuFlurry: No "..juju.." found in bags.");
		end;
	elseif(isJujuFlurryActive == false and jujuBag ~= nil) then
		CastShapeshiftForm(currentForm);
		CatJuJuFlurry_ToggleAutoAttack("off");
	end;
end;

function createCatJuJuFrame()
    if catJujuFrame == nil then
        catJujuFrame = CreateFrame("GameTooltip", "catJujuTooltip", nil, "GameTooltipTemplate");
    end;
end;

function CatJuJuFlurry_isBuffNameActive(buff)
	isActive = false;
	index = -1;
	local i = 1;
	local g=UnitBuff;
	local textleft1 = nil;
	while not(g("player", i) == -1 or g("player", i) == nil)
		do
		catJujuTooltip:SetOwner( WorldFrame, "ANCHOR_NONE" );
		catJujuTooltip:SetUnitBuff("player", i);
		textleft1 = getglobal(catJujuTooltip:GetName().."TextLeft1");		

		if(textleft1 ~= nil and string.find(string.lower(textleft1:GetText()), string.lower(buff))) then 
			isActive = true;
			index = i;
			catJujuTooltip:Hide();
			break;
		end;
		catJujuTooltip:Hide();
		i=i+1;
	end;
	return isActive, index, i;
end;

function CatJuJuFlurry_getSlotItemInBag(itemName)
	local id1 = nil;
	local id2 = nil;
	local name = nil;
	for bag = 0, 4, 1
		do 
			for slot = 1, GetContainerNumSlots(bag), 1
				do name = GetContainerItemLink(bag,slot);
				if (name and string.find(name, itemName)) then
					id1 = bag; id2 = slot; break;
				end;
			end;
		end;
	return id1, id2;	
end;

function CatJuJuFlurry_findAttackActionSlot()
	for i = 1, 120, 1
		do
		if(IsAttackAction(i) == 1 and IsCurrentAction(i) == 1) then
		return i; end;
	end;
	return 0;
end;

function CatJuJuFlurry_ToggleAutoAttack(switch)
	if(switch == "off") then
		if(CatJuJuFlurry_findAttackActionSlot() ~= 0) then
			AttackTarget();
		end;
	elseif(switch == "on") then
		if(CatJuJuFlurry_findAttackActionSlot() == 0) then
			AttackTarget();
		end;
	end;
end;

 

Macro:

Quote

/script CatJuJuFlurry();

 

Consumable Usage Macro

 

Extended lua:

Spoiler

CatConsumable_GAME_TIME_LAST_USED = 0; function CatConsumable(options) local currentMana = UnitMana("player"); local maxMana = UnitManaMax("player"); local manaDiff = maxMana - currentMana; local manaPct = currentMana / maxMana; local percent = 0.5; local minimum = nil; local canConsume = false; local willConsume = false; local catForm = nil; local _,formName,active = nil; local currentTime = GetTime(); local lastTime = math.floor(currentTime - CatConsumable_GAME_TIME_LAST_USED); local timeBetweenUses = 3;  if(options.percent) then percent = options.percent; end; if(options.minimum) then minimum = options.minimum; end;  local currentForm = 0; for i = 1, GetNumShapeshiftForms(), 1 do _,formName,active = GetShapeshiftFormInfo(i); if(formName == "Cat Form") then catForm = i; end; if(active ~= nil) then currentForm = i; end; end;  if(CatConsumable_canUseConsumable("potion") ~= nil or CatConsumable_canUseConsumable("rune") ~= nil or CatConsumable_canUseConsumable("lily root") ~= nil or CatConsumable_canUseConsumable("nightdragon") ~= nil) then canConsume = true; if(minimum ~= nil and currentMana <= minimum) then willConsume = true; elseif(manaPct <= percent) then willConsume = true; end; end;  if(currentForm == 0) then if(willConsume == true and lastTime > timeBetweenUses) then CatConsumable_consume(); else CastShapeshiftForm(catForm); CatConsumable_ToggleAutoAttack("on"); end; elseif(canConsume == true and lastTime > timeBetweenUses) then CastShapeshiftForm(currentForm); CatConsumable_ToggleAutoAttack("off"); end; end;  function CatConsumable_consume() if (CatConsumable_canUseConsumable("potion")) then CatConsumable_UseManaPotion(); CatConsumable_GAME_TIME_LAST_USED = GetTime(); elseif (CatConsumable_canUseConsumable("rune")) then CatConsumable_UseNightDragonOrRune("rune"); CatConsumable_GAME_TIME_LAST_USED = GetTime(); elseif (CatConsumable_canUseConsumable("lily root")) then CatConsumable_UseNightDragonOrRune("lily root"); CatConsumable_GAME_TIME_LAST_USED = GetTime(); elseif (CatConsumable_canUseConsumable("nightdragon")) then CatConsumable_UseNightDragonOrRune("nightdragon"); CatConsumable_GAME_TIME_LAST_USED = GetTime(); end; end;  function CatConsumable_canUseConsumable(consumableType) local currentHealth = UnitHealth("player"); local manaPotion = {'Superior Mana Draught', 'Major Mana Potion', 'Combat Mana Potion', 'Superior Mana Potion', 'Greater Mana Potion', 'Mana Potion', 'Lesser Mana Potion', 'Minor Mana Potion'}; local nightDragon = "Night Dragon's Breath"; local demonRune = {"Demonic Rune", "Dark Rune"}; local lilyRoot = "Lily Root";  if(consumableType == "potion") then for i = 1, table.getn(manaPotion), 1 do bag, slot = CatConsumable_getSlotItemInBag(manaPotion[i]); if(bag ~= nil and slot ~= nil) then _, duration, _ = GetContainerItemCooldown(bag, slot); if(duration == 0) then return tostring(manaPotion[i]); end; end; end; elseif(consumableType == "nightdragon") then bag, slot = CatConsumable_getSlotItemInBag(nightDragon); if(bag ~= nil and slot ~= nil) then _, duration, _ = GetContainerItemCooldown(bag, slot); if(duration == 0) then return tostring(nightDragon); end; end; elseif(consumableType == "lily root") then bag, slot = CatConsumable_getSlotItemInBag(lilyRoot); if(bag ~= nil and slot ~= nil) then _, duration, _ = GetContainerItemCooldown(bag, slot); if(duration == 0) then return tostring(lilyRoot); end; end; elseif(consumableType == "rune") then for i = 1, table.getn(demonRune), 1 do bag, slot = CatConsumable_getSlotItemInBag(demonRune[i]); if(bag ~= nil and slot ~= nil) then _, duration, _ = GetContainerItemCooldown(bag, slot); if(duration == 0 and currentHealth > 1502) then return tostring(demonRune[i]); end; end; end; end; return nil; end;  function CatConsumable_getSlotItemInBag(itemName) local id1 = nil; local id2 = nil; local name = nil; for bag = 0, 4, 1 do for slot = 1, GetContainerNumSlots(bag), 1 do name = GetContainerItemLink(bag,slot); if (name and string.find(name, itemName)) then id1 = bag; id2 = slot; break; end; end; end; return id1, id2; end;  function CatConsumable_UseManaPotion() local zone = GetRealZoneText(); local msg = nil; local bag, slot = nil; local _, duration, _ = nil; local manaPotion = {'Superior Mana Draught', 'Major Mana Potion', 'Combat Mana Potion', 'Superior Mana Potion', 'Greater Mana Potion', 'Lesser Mana Potion', 'Minor Mana Potion', 'Mana Potion'};  if (CatConsumable_getSlotItemInBag(manaPotion[1]) ~= nil and (zone == "Warsong Gulch" or zone == "Alterac Valley" or zone == "Arathi Basin")) then use(manaPotion[1]); msg = tostring(manaPotion[1]);  else for i = 2, table.getn(manaPotion), 1 do bag, slot = CatConsumable_getSlotItemInBag(manaPotion[i]); if(bag ~= nil and slot ~= nil) then _, duration, _ = GetContainerItemCooldown(bag, slot); if(duration == 0) then use(manaPotion[i]); msg = tostring(manaPotion[i]); break; end; end; end; if(msg == nil) then msg = "No Mana Potion"; end; end;  DEFAULT_CHAT_FRAME:AddMessage("CatConsumable: "..msg.." used!"); end;  function CatConsumable_UseNightDragonOrRune(consumableType) local nightDragon = "Night Dragon's Breath"; local lilyRoot = "Lily Root"; local demonRune = {"Demonic Rune", "Dark Rune"}; local msg = nil;  if(consumableType == "lily root") then use(lilyRoot); msg = tostring(lilyRoot); elseif(consumableType == "nightdragon") then use(nightDragon); msg = tostring(nightDragon); elseif(consumableType == "rune") then if(CatConsumable_getSlotItemInBag(demonRune[1]) ~= nil) then use(demonRune[1]); msg = tostring(demonRune[1]); elseif(CatConsumable_getSlotItemInBag(demonRune[2]) ~= nil) then use(demonRune[2]); msg = tostring(demonRune[2]); end; else msg = "No Night Dragon's Breath nor Rune"; end; DEFAULT_CHAT_FRAME:AddMessage("CatConsumable: "..msg.." used!"); end;  function CatConsumable_findAttackActionSlot() for i = 1, 120, 1 do if(IsAttackAction(i) == 1 and IsCurrentAction(i) == 1) then return i; end; end; return 0; end;  function CatConsumable_ToggleAutoAttack(switch) if(switch == "off") then if(CatConsumable_findAttackActionSlot() ~= 0) then AttackTarget(); end; elseif(switch == "on") then if(CatConsumable_findAttackActionSlot() == 0) then AttackTarget(); end; end; end;

 

Call the script in a macro with an option:

Quote

/script CatConsumable({percent = 0.75});

Or with a minimum mana value:

Quote

/script CatConsumable({minimum = 478});

 

Macros by Cernie

 

Manual Crowd Pummeler

Spoiler

This macro requires SuperMacro or enough knowledge of packaging LUA code into your own addon. This macro will use charges on your equipped Manual Crowd Pummeler, without overriding itself if the buff is active (since there is no CD, spamming it normally will eat through charges) and will display how much time is left on the Haste buff. It also displays a chat message when it is used and shows the number of charges left on the equipped Pummeler. In the event of a different weapon being equipped, or if the current equipped Pummeler's charge is 0, the macro will attempt to find and equip the first Pummeler with charges found in your bags.

Copy/Paste the following in the Extended LUA:

Pummeler_Start_HasteBuff_Time = 0;
function Pummeler()
	createPummelerFrame();
	local haste, hasteIndex = isBuffNameActive("Haste");
	local slotId = GetInventorySlotInfo("MAINHANDSLOT");
	local itemLink = GetInventoryItemLink("player", slotId);
	local pummelerWeapon = GetItemInfo(9449);
	local weaponTimer, weaponCd = GetInventoryItemCooldown("player", 16);
	local gameTime = GetTime();
	local timeLeft = 0;
	local chargesText = nil;
	local charge = 0;
	local buffTimeLeft = nil;
	local bagPummeler, slotPummeler = nil;
	
	chargesText = getChargesText{};
	charge = getChargeNumber(chargesText);
	
	if(haste == true) then
		buffTimeLeft = 30 - math.floor(gameTime - Pummeler_Start_HasteBuff_Time);
		DEFAULT_CHAT_FRAME:AddMessage("Pummeler: "..itemLink.." Is active for "..buffTimeLeft.." more seconds!");
	elseif(haste == false) then 
		if(weaponCd ~= 0) then
			timeLeft = weaponCd - math.floor(gameTime - weaponTimer);
			DEFAULT_CHAT_FRAME:AddMessage("Pummeler: "..itemLink.." On cooldown, "..timeLeft.." seconds left!");
		elseif(itemLink ~= nil and string.find(itemLink, pummelerWeapon) and charge ~= 0 and weaponCd == 0) then 
			charge = charge - 1;
			UseInventoryItem(16);
			Pummeler_Start_HasteBuff_Time = gameTime;
			DEFAULT_CHAT_FRAME:AddMessage("Pummeler: Using "..itemLink..": "..charge.." charges left!");
		else
			bagPummeler, slotPummeler = isPummelerInBag("Manual Crowd Pummeler");
			if(bagPummeler ~= nil and slotPummeler ~= nil) then
				UseContainerItem(bagPummeler, slotPummeler, 1);
				DEFAULT_CHAT_FRAME:AddMessage("Pummeler: Equipping a "..pummelerWeapon..".");
			end;
		end;
	end;
end;

function getChargesText(options)
	pummelerTooltip:SetOwner( WorldFrame, "ANCHOR_NONE" );
	if(options.bag and options.slot) then 
		pummelerTooltip:SetBagItem(options.bag, options.slot);
	else
		pummelerTooltip:SetInventoryItem("player", 16);
	end;
	local charges = nil;
	local i = 1;
	while (true)
		do
			text = getglobal("pummelerTooltipTextLeft"..i):GetText();
			if(not text) then break;
			elseif(string.find(text, "Charge")) then
				charges = text;
				pummelerTooltip:Hide();
				return charges;
			end;
			i=i+1;
	end;
	pummelerTooltip:Hide();
	return charges;
end;

function getChargeNumber(chargesText)
	local charge = 0;
	if(chargesText ~= nil) then
		for i = 0, 3, 1
			do
				if(chargesText ~= nil and string.find(chargesText, i)) then 
					charge = i; break;
				end;
		end;
	end;
	return charge;
end;

function isBuffTextureActive(texture)
	local i=0;
	local g=GetPlayerBuff;
	local isBuffActive = false;

	while not(g(i) == -1)
	do
		if(strfind(GetPlayerBuffTexture(g(i)), texture)) then isBuffActive = true; end;
		i=i+1
	end;	
	return isBuffActive;
end;

function createPummelerFrame()
    if pummelerFrame == nil then
        pummelerFrame = CreateFrame("GameTooltip", "pummelerTooltip", nil, "GameTooltipTemplate");
    end;
end;

function isBuffNameActive(buff)
	isActive = false;
	index = -1;
	local i = 1;
	local g=UnitBuff;
	local textleft1 = nil;
	while not(g("player", i) == -1 or g("player", i) == nil)
		do
		pummelerTooltip:SetOwner( WorldFrame, "ANCHOR_NONE" );
		pummelerTooltip:SetUnitBuff("player", i);
		textleft1 = getglobal(pummelerTooltip:GetName().."TextLeft1");		

		if(textleft1 ~= nil and string.find(string.lower(textleft1:GetText()), string.lower(buff))) then 
			isActive = true;
			index = i;
			pummelerTooltip:Hide();
			break;
		end;
		pummelerTooltip:Hide();
		i=i+1;
	end;
	return isActive, index;
end;

function isPummelerInBag(itemName)
    local itemBag, itemSlot = nil;
	local charges = nil;
    for bag = 0, 4, 1
        do 
            for slot = 1, GetContainerNumSlots(bag), 1
                do local name = GetContainerItemLink(bag,slot)
                if name and string.find(name, itemName) then
                    if string.find(name, itemName) then 
						charges = getChargeNumber(getChargesText{bag = bag, slot = slot});
						if(charges > 0) then
							itemBag = bag; itemSlot = slot; 
							break;
						end;
					end;
                end;
            end;
        end;
    return itemBag, itemSlot;   
end;

 

And to call the macro:

Quote

/script Pummeler();

 

Macro by Cernie

 

Powershift macro

Spoiler

Here my macro for cat (it's designed to remove snares in PvP)

1) removes Prowling (rarely useful)

2) shift to cat form if in caster form

3) remove current form if cat form is not on GCD

I'm using Super Macro, but I guess you could squeeze it in a couple of macros

Quote

/run if IsActive('Prowl') then CastSpellByName("Prowl") else local a=GetActiveForm() if a==0 then CastShapeshiftForm(3) else if not IsSpellOnCD('Cat Form') then CastShapeshiftForm(a)end end end

 

Support lua:
 

function GetSpellID(sn)
  local i,a
  i=0
  while a~=sn do
    i=i+1
    a=GetSpellName(i,"spell")
  end
  return i
end

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

function IsSpellOnCD(sn)
 return GetSpellCooldown(GetSpellID(sn),"spell")~=0
end

function GetActiveForm()
  for i=1,GetNumShapeshiftForms() do
    if  ({GetShapeshiftFormInfo(i)})[3]
    then return i end
  end
  return 0
end

function CancelForm()
  local f = GetActiveForm()
  if f ~= 0 then
    CastShapeshiftForm(f)
  end
end

 

Macro by Woblight

 

PVP macros

Spoiler

Here the macros I'm using for PvP (requires SuperMacro):

Extended LUA, common to all macros, no need of duplication it, just putting into one will do.

Spoiler


local function CoreInit() end

function GetSpellID(sn)
  local i,a
  i=0
  while a~=sn do
    i=i+1
    a=GetSpellName(i,"spell")
  end
  return i
end

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

function IsSpellOnCD(sn)
 return GetSpellCooldown(GetSpellID(sn),"spell")~=0
end

function GetActiveForm()
  for i=1,GetNumShapeshiftForms() do
    if  ({GetShapeshiftFormInfo(i)})[3]
    then return i end
  end
  return 0
end

function CancelForm()
  local f = GetActiveForm()
  if f ~= 0 then
    CastShapeshiftForm(f)
  end
end
function toString(a)
  if a == nil then return "nil" end
  if a == true then return "TRUE" end
  if a == false then return "FALSE" end
  if type(a) == "string" then return "\""..a.."\"" end
  if type(a) == "table" then
      local out
      out = "{"
      for k,v in a do
          out = out..(out~="{"and", "or"")..toString(k)..": "..toString(v)
      end
      return out.."}"
    end
    return a
end
function debug(a)
  DEFAULT_CHAT_FRAME:AddMessage(toString(a))
end

function HasBuffNamed(unit, name)
    if BuffScanner == nill then
        CreateFrame("GameTooltip","BuffScanner",UIParent,"GameTooltipTemplate")
    end
    for i = 1,16 do
        BuffScanner:SetOwner(UIParent,"ANCHOR_NONE")
        BuffScanner:SetUnitBuff(unit,i)
        if BuffScannerTextLeft1:GetText() == name then
            return true
        end
    end
    return false
end

function RaidBuff(name)
    if name == nill or name == "" then return end
    local num = GetNumRaidMembers()
    local root = "raid"
    if num == 0 then
        num = GetNumPartyMembers()
        root = "party"
    end
    if num == 0 then return end
    if RaidBufferLast == nill then
        RaidBufferLast = 0
    end
    for i = RaidBufferLast,RaidBufferLast + num do
        local unit = root .. math.mod(i, num) + 1
        if not HasBuffNamed(unit, name) then
            local re = UnitExists("target")
            local sc = GetCVar("autoSelfCast")
            if sc == "1" then
                SetCVar("autoSelfCast",0)
            end
            ClearTarget()
            CastSpellByName(name)
            if sc == "1" then
                SetCVar("autoSelfCast",1)
            end
            if not SpellIsTargeting() then
                if re then TargetLastTarget() end
                return false
            end
            local can = SpellCanTargetUnit(unit)
            if can then
                SpellTargetUnit(unit)
                RaidBufferLast = math.mod(i, num) +1
                if re then
                    TargetLastTarget()
                end
                return false
            else
                SpellStopTargeting()
                if re then
                    TargetLastTarget()
                end
            end
        end
    end
    return true
end

 

Cancel form:

Quote

/run CancelForm()

Pounce/Claw:

Quote

/run if not IsActive("Prowl") then CastSpellByName("Claw") else CastSpellByName("Pounce") end

Ravage/Shred:

Quote

/run if not IsActive("Prowl") then CastSpellByName("Shred") else CastSpellByName("Ravage") end

Safe Prowl:

Quote

/run if not IsActive("Prowl") then CastSpellByName("Prowl")end

Safe Shadowmeld:

Quote

/run if not IsActive("Shadowmeld") then CastSpellByName("Shadowmeld")end

Safe Bearform (any→bear):

Quote

/run local a=GetActiveForm() if a==0 then CastShapeshiftForm(1) else if a ~= 1 then CastShapeshiftForm(a) end end

Quick Catform (Prowl→unprowl, cat→caster, anything else→cat, no unshift during GCD):

Quote

/run if IsActive('Prowl') then CastSpellByName("Prowl") else local a=GetActiveForm() if a==0 then CastShapeshiftForm(3) else if not IsSpellOnCD('Cat Form') then CastShapeshiftForm(a)end end end

Quick Travel/Aquatic (no unshift during GCD):

Quote

/run if  not IsSpellOnCD('Travel Form') then if GetActiveForm() == 0 then CastShapeshiftForm(2) CastShapeshiftForm(4) else CancelForm() end end

Raid Buff (buffs MotW, if everyone nearby has it and Ctrl is hold, buff Thorns):

Quote

/run if RaidBuff("Mark of the Wild") and IsControlKeyDown() then RaidBuff("Thorns") end

 

Macros by Woblight

 

Dismount/Shift

Spoiler

1. Dismount macro - not very useful by itself, but is used for other macros. I placed it into slot №27, see the action bar slot reference:

  Hide contents

VGArn.jpg

 

Quote

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

2. Dismount + switch to caster form - somewhat useful, but still mainly used by other macros. I placed it into slot №37.

Quote

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

3. Cat form.

It will dismount/cancel any other form and then switch to the cat form, and if you're already there, it will activate "Track Humanoids".

Quote

/script c=CastSpellByName; f=UnitPowerType("Player"); if not (f==3) then UseAction(37); else c"Track Humanoids"; end; if (f==0) then c"Cat Form"; end;

4. Bear form.
Same as above, but for dire bear form. You have to edit it if you only have normal bear form. 

Quote

/script c=CastSpellByName; f=UnitPowerType("Player"); if not (f==1) then UseAction(37); else end; if (f==0) then c"Dire Bear Form"; end;

5. Travel form.

Unlike other macros, it won't cancel any other form, so you have to use it while you're in caster form already.

Quote

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

You can place all those macros whenever you want, just make sure that commands like UseAction() link to a correct macro.

 

Made by Oakenlix

 

Mage macros

 

Food/drink

Spoiler

Uses any Conjured water/food (press it quick twice, to eat when you drink)

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Conjured"))then UseContainerItem(b,s,1)end end end

 

 

Water trade

Spoiler

This macro will open trade, put in two stacks of water, and accept trade in 1 button(click it few times)

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s) do local n=GetContainerItemLink(b,s) if n and string.find(n,"Conjured Crystal Water") then PickupContainerItem(b,s); DropItemOnUnit("target"); AcceptTrade(); break; end; end; end;

 

Water trade super macro

Spoiler

Clicking it multiple times, first opens up the trade window, then it places the water, and after that it "click" the trade button.
Feel free to replace "Conjured Fresh Water" with whatever quality you prefer.

Extended Lua:

Spoiler


function TradeWater(stacks)
  for bag=0,4,1 do
    for slot=1,GetContainerNumSlots(bag),1 do
      name=GetContainerItemLink(bag,slot)
      if name and string.find(name, "Conjured Fresh Water") then
        PickupContainerItem(bag,slot)
        if GetUnitName("target") and CheckInteractDistance("target",2) then
          DropItemOnUnit("target")
          stacks=stacks-1
          if stacks==0 then return end
        end
      end
    end
  end
end

 

In the macro you can replace "2" with any amount of stacks you want to trade.

Quote

/run TradeWater(2); AcceptTrade();

 

Made by Eucharn

 

 

Mana gems

Spoiler

Macro for conjuring

Quote

/script local c=function(a) local f,d a="Mana "..a for i=0,4 do for k=1,GetContainerNumSlots(i) do d=GetContainerItemLink(i,k) or "" if strfind(d,a) then f = 1 end end end if not f then CastSpellByName("Conjure "..a) end end c "Ruby" c "Citrine" c "Jade"

 

Cycling through Conjure Mana

Quote

/run s={"Conjure Mana Ruby","Conjure Mana Jade","Conjure Mana Citrine","Conjure Mana Agate"} if q==nil then q=0 end q=q+1 if q>getn(s) then q=1 end CastSpellByName(s[q])

 

Use Mana Ruby, Mana Citrine, or Mana Jade

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Mana Ruby") or strfind(n,"Mana Citrine") or strfind(n,"Mana Jade"))then UseContainerItem(b,s,1)end end end

 

Use mana gems (SuperMacro)

Quote

/script if FindItem("Mana Ruby") ~= nil then use("Mana Ruby") elseif FindItem("Mana Citrine") ~= nil then use("Mana Citrine") elseif FindItem("Mana Jade") ~= nil then use("Conjure Mana Jade") elseif FindItem("Mana Agate") ~= nil then use("Conjure Mana Agate") end

 

 

Portal/Teleport

Spoiler

Portal

Quote

/run if IsAltKeyDown() then CastSpellByName("Portal: Stormwind") elseif IsControlKeyDown() then CastSpellByName("Portal: Darnassus") else CastSpellByName("Portal: Ironforge") end

 

Teleport

Quote

/run if IsAltKeyDown() then CastSpellByName("Teleport: Stormwind") elseif IsControlKeyDown() then CastSpellByName("Teleport: Darnassus") else CastSpellByName("Teleport: Ironforge") end

 

Teleport when solo and portal when in group

Quote

/run if GetNumPartyMembers()==0 and GetNumRaidMembers()==0 then CastSpellByName("Teleport: Ironforge") else CastSpellByName("Portal: Ironforge") end

 

Combined together

Quote

/run local a,b="Portal: ","Ironforge"; if GetNumPartyMembers()==0 and GetNumRaidMembers()==0 then a="Teleport: " end; if IsAltKeyDown() then b="Stormwind" elseif IsControlKeyDown() b="Darnassus" end; CastSpellByName(a..b);

 

Macros by Garkin

 

Mouseover Polymorph

Spoiler

Mouseover Polymorph without changing target

Quote

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

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

 

Polymorph turtle:   

Quote

/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.   

Quote

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

 

 

Cone of Cold

Spoiler

Cone of Cold rank1, if Clearcasting, then max rank Cone of Cold

Quote

/run SpellStopCasting() local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Shadow_ManaBurn" then x=1 end i=i+1 end if x==1 then CastSpellByName("Cone of Cold")else CastSpellByName("Cone of Cold(Rank 1)")end

 

Cast Fire Blast, else cast Cone of Cold if target in range

Quote

/run CastSpellByName("Fire Blast") if CheckInteractDistance("target", 2) then CastSpellByName("Cone of Cold")end

 

 

Frostbolt

Spoiler

Cast Frostbolt rank 1 if shift key, else max rank

Quote

/script if IsShiftKeyDown() then CastSpellByName("Frostbolt (Rank 1)") else CastSpellByName("Frostbolt") end

 

 

Detect Magic

Spoiler

Cast Detect magic  if enemy, else cast Arcane Intellect

Quote

/run if UnitCanAttack("player","target") == 1 then CastSpellByName("Detect Magic")else CastSpellByName("Arcane Intellect")end

 

 

Blizzard

Spoiler

Blizzard

Quote

/run local s=SpellIsTargeting if not (s()) then CastSpellByName("Blizzard") end

 

Cast rank 1 if out of combat, else cast max rank

Quote

/run if not UnitAffectingCombat("player") then CastSpellByName("Blizzard(Rank 1)") else CastSpellByName("Blizzard") end

 

 

Arcane Missiles

Spoiler

Throw rank 1 unless clear casting is active then cast max rank

Quote

/run local i = 1 while UnitBuff("player", i) do if UnitBuff("player", i) == "Interface\\Icons\\Spell_Shadow_ManaBurn" then return CastSpellByName"Arcane Missiles" end i = i + 1 end CastSpellByName"Arcane Missiles(Rank 1)"

 

 

Stopcasting

Spoiler

Immediate Counterspell

Quote

/script SpellStopCasting()
/cast Counterspell

 

Immediate Blink

Quote

/script SpellStopCasting()
/cast Blink

 

Immediate Polymorph

Quote

/script SpellStopCasting()
/cast Polymorph(Rank 1)

 

 

Slow Fall

Spoiler

Buff Slow Fall, or cancel buff

Quote

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

 

 

Arcane Explosion

Spoiler

Low rank Arcane Explosion, max rank if Clearcasting

Quote

/run SpellStopCasting() local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Shadow_ManaBurn" then x=1 end i=i+1 end if x==1 then CastSpellByName("Arcane Explosion")else CastSpellByName("Arcane Explosion(Rank 1)")end

 

Low rank arcane explosion, max rank if combat

Quote

/run if not UnitAffectingCombat("player") then CastSpellByName("Arcane Explosion(Rank 1)") else CastSpellByName("Arcane Explosion") end

 

 

AP / ZHC/ PoM

Spoiler

Arcane Power

Quote

/script i=1;m=0;while(UnitBuff("player",i)~=nil) do if(strfind(UnitBuff("player",i),"Spell_Nature_Lightning")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==0) then c("Arcane Power"); end;

 

AP / ZHC/ PoM

Quote

/run if  GetInventoryItemCooldown("player", 13)==0 then UseInventoryItem(13)else s={"Arcane Power","Presence of Mind","Frostbolt"} if q==nil then q=0 end q=q+1 if q>getn(s) then q=1 end CastSpellByName(s[q]) end

 

Arcane Power spammable

Quote

/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!

Quote

/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


Presence of Mind spammable

Quote

/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

 

 

Blink

Spoiler

Cancel Ice Block, then Blink

Quote

/run local z=0 for i=1,27 do t=UnitBuff("player",i) if (t and string.find(t,"Frost")) then z=1 break end end if z==1 then CastSpellByName("Ice Block")end
/cast Blink

 

Cancel Ice Block, then Blink

Quote

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

 

Ice Block, else cancel Ice Block, then Blink

Quote

/cast Ice Block
/cast Blink

 

 

Counterspell

Spoiler

Counterspell unless target Ice Block

Quote

/run SpellStopCasting() local z=0 for i=1,27 do t=UnitBuff("target",i) if (t and string.find(t,"Frost")) then z=1 break end end if z==0 then CastSpellByName("Counterspell")end

 

 

Iceblock

Spoiler

StopCasting, then Ice Block

Quote

/run SpellStopCasting() local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Frost_Frost" then x=1 end i=i+1 end if x==0 then CastSpellByName("Ice Block")end

 

Spammable Ice Block

Quote

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

 

Ice Block, else cancel Ice Block

Quote

/run local i,a,sn sn="Ice Block" i=0 while a~=sn do i=i+1 a=GetSpellName(i,"spell")end if ({GetSpellCooldown(i,"spell")})[3]~=0 == not IsShiftKeyDown() then CastSpellByName(sn)end

 

Cold Snap if Ice Block on cooldown, else Ice Block (put Ice Block in action slot 42)

Quote

/run enable = GetActionCooldown(42) if enable==0 then CastSpellByName("Ice Block") else CastSpellByName("Cold Snap")end

 

 

Evocation/Ice Barrier

Spoiler

Use evocation if mana is low, and keeping ice barrier up

Quote

/run if UnitMana("player")< 500 then CastSpellByName("Evocation")end local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Ice_Lament" then x=1 end i=i+1 end if x==0 then CastSpellByName("Ice Barrier")end

 

 

Wand

Spoiler

Prevent toggling of wand/autoattack

Quote

/run GGUseAction=GGUseAction or UseAction;UseAction=function(id,a,b)if not IsCurrentAction(id)and not IsAutoRepeatAction(id)then GGUseAction(id,a,b)end end
/cast Shoot

 

 

Buffs

Spoiler

Castsequence macro for buffing

Quote

/run local _gspells = { "Ice Armor", "Dampen Magic", "Arcane Intellect"} if GetSpellCooldown(4,"BOOKTYPE_SPELL")==0 then _gi=_gi and _gi > 0 and _gi or 1 CastSpellByName(_gspells[_gi]) _gi = math.mod(1+_gi, 1+table.getn(_gspells))end

 

 

Casting rank depending on target's level

Spoiler

AI:

 
Quote

/run a="Arcane Intellect" b={1,4,18,32,47} c="target" d="(Rank " e=CastSpellByName if (UnitLevel(c) ~= nil and UnitIsFriend("player",c)) then for i=5,1,-1 do if (UnitLevel(c) >= b) then e(a..d..i..")") return end end else e(a,1) end

 

Quote

/run local a,b,c,d,e,u="Arcane Intellect",{1,4,18,32,47},"target","(Rank ",CastSpellByName,UnitLevel if u(c)~=nil and UnitIsFriend("player",c)then for i=5,1,-1 do if(u(c)>=b)then e(a..d..i..")")return end end else e(a,1) end
/run UIErrorsFrame:Hide()

 


Conjure Water:

Quote

/run a="Conjure Water" b={1,5,15,25,35,45,55} c="target" d="(Rank " e=CastSpellByName if (UnitLevel(c) ~= nil and UnitIsFriend("player",c)) then for i=7,1,-1 do if (UnitLevel(c) >= b) then e(a..d..i..")") return end end else e(a,1) end



Conjure Food:

Quote

/run a="Conjure Food" b={1,5,15,25,35,45,55} c="target" d="(Rank " e=CastSpellByName if (UnitLevel(c) ~= nil and UnitIsFriend("player",c)) then for i=7,1,-1 do if (UnitLevel(c) >= b) then e(a..d..i..")") return end end else e(a,1) end



If you just have 45 water/food change it to
b={1,5,15,25,35,45}
i=6,1,-1

 

Mage macros

Spoiler
Fakecasting without having to move character:
Quote

/run SpellStopCasting()

 
Cast fireblast on enemy that matches name below EXACTLY. Useful when lvling to tag mobs first:
Quote

/run TargetByName("REPLACE THIS TO NPC NAME", true) CastSpellByName("Fire Blast")

 
 
Script to prevent toggling of wand/autoattack + green targeting reticle.
You only need to run this once every login. Remove "/run" and copy into an addon lua file if you're lazy.:
Quote

/run local _UseAction = UseAction;UseAction=function(id,a,b)if not IsCurrentAction(id)and not IsAutoRepeatAction(id)and not SpellIsTargeting()then _UseAction(id, a, b)end end

 
 
Fast Counterspell (stops your cast before using ability):
Quote

/run SpellStopCasting() CastSpellByName("Counterspell")

 
 
Fast Cold Snap:
Quote

/run SpellStopCasting() CastSpellByName("Cold Snap")

 
 
Fast Ice Block
Quote

/run SpellStopCasting() CastSpellByName("Ice Block")

 
Fast blink:
Quote

/run SpellStopCasting() CastSpellByName("Blink")

 
 
Use rank1 Fire Blast if target is totem, else highest rank. (UNTESTED):
Quote

/run local target=GetUnitName("target")if target and string.find(target,"Totem")then CastSpellByName("Fire Blast(rank 1)") else CastSpellByName("Fire Blast")end

 
 
Focus macros. *These require ClassicFocus addon*
 
    Focus target
Quote

/focus

 
    Focus Counterspell    
Quote

/run SpellStopCasting()
/fcast Counterspell

 
    Focus Polymorph
Quote

/fcast Polymorph(rank 1)

 
    Focus r1 Frostbolt
Quote

/fcast Frostbolt(rank 1)

 
 
 
 
** Macros below are mostly useful for saving actionbar space **
 
1 Button Fireball/scorch (will also use wand when locked on fire school)
If you don't have a wand, I think this macro will bug out, but you can just remove "/cast Shoot" at the end.
SHIFT + KEYBINDING = Fireball
KEYBINDING = Scorch
Quote
/run CastSpellByName(IsShiftKeyDown() and "Fireball" or "Scorch")
/cast Shoot
 
Note that if modifier + keybinding is already keybound to something different, this macro won't work. You'll need to unbind it first.
Also pressing modifier + modifier + keybinding wont work. So you can't keybind this macro to "SHIFT+1" for example, but "1" would work.
 
 
1 Button wards
SHIFT + KEYBINDING = Fire Ward
KEYBINDING = Frost Ward
Quote

/run CastSpellByName(IsShiftKeyDown() and "Fire Ward" or "Frost Ward")

 
 
Frostbolt with downrank
SHIFT + KEYBINDING = rank1 frostbolt for fast slow
KEYBINDING = highest frostbolt rank available
Will also retarget last enemy if u lose it (i.e when a hunter uses feign death)
Quote

/run if not UnitExists("target")then TargetLastEnemy()end CastSpellByName(IsShiftKeyDown() and "Frostbolt(rank 1)" or "Frostbolt")

 
 
Arcane Explosion with downrank (great for catching stealthers)
SHIFT + KEY = r1 Arcane Explosion
KEY = highest rank
Quote

/run CastSpellByName(IsShiftKeyDown() and "Arcane Explosion(rank 1)" or "Arcane Explosion")

 
I also recommend copying the above macro and creating seperate versions for Fireball, Cone of Cold, Flamestrike and Blizzard.
You might also want to do it with certain buffs for dispel protection when playing with pom/ice barrier.
 
 
1 Button Buff (except Amplify Magic)
SHIFT + KEYBINDING = Ice Armor (not frost armor!)
CTRL + KEYBINDING = Dampen Magic
ALT + KEYBINDING = Mage Armor
KEYINDING = Arcane Intellect
Quote

/run CastSpellByName(IsShiftKeyDown() and "Ice Armor" or IsControlKeyDown() and "Dampen Magic" or IsAltKeyDown() and "Mage Armor" or "Arcane Intellect")

 

 

ConjurerHelper

Spoiler

[SuperMacro][Auto-Drink][Auto-Standup] ConjurerHelper 0.01f: https://pastebin.com/nFrgRmrm

A little spammable helper, conjuring refreshments for larger groups. The macro will conjure the amount specified in the settings, regenerate mana and continues conjuring until you have the specified amount of conjureables. This does not use any of the SuperMacro builtin functionalities so i'm pretty sure you could save it as a .lua file to use it as a standalone addon.

Usage: (to put in your macro.)

Quote

/run Conjure_Click({water_rank = 7; water_amount = 20*20; food_rank = 6; food_amount = 20*20; regeneration_rank = 7; outofmana_margin = 100; })

Absolutely free to modify/redistribute/claim as your own.
Feel free to contact me, for bugs, feature requests, addon help or a friendly message.
Have fun. - A gnomish mage.

 

Paladin macros  

 

Seal/Judgement

Spoiler

Seal of Righteousness + Judgement

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_ThunderBolt" then x=1 end i=i+1 end if x==0 then CastSpellByName("Seal of Righteousness") else CastSpellByName("Judgement")end

 

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.

Quote

/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")end

 

Seal of Wisdom + Judgement

Quote

/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")else c(j) end

 

Seal of the Crusader + Judgement

Quote

/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")else c(j) end

 

Seal of Light + Judgement

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Holy_HealingAura" then x=1 end i=i+1 end if x==0 then CastSpellByName("Seal of Light") else CastSpellByName("Judgement")end

 

Seal of Command

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Warrior_InnerRage" then x=1 end i=i+1 end if x==0 then CastSpellByName("Seal of Command") else CastSpellByName("Judgement")end

 

 

Flash of Light

Spoiler

Flash of Light/SpellStopCasting

Quote

/run if (UnitHealth('target')/UnitHealthMax('target')>0.99) then SpellStopCasting() end
/cast Flash of Light(Rank 4)

 

Flash of Light nearest target

Quote

/run for i=1,40 do TargetNearestFriend() if UnitHealth("target")/UnitHealthMax("target") < 0.9 then if UnitIsPlayer("target") then CastSpellByName("Flash of Light") end end end

 

Heals you based on how much hp missing

Quote

/run x="player";d=UnitHealthMax(x)-UnitHealth(x);if (d>200) then if (d<400) then CastSpellByName("Flash of Light(Rank 3)") else CastSpellByName("Holy Light(Rank 5)") end;SpellTargetUnit(x);else DEFAULT_CHAT_FRAME:AddMessage("Health is good"); end;

 

 

Blessing

Spoiler

If Warrior or Rogue cast Blessing of Might, else cast Blessing of Wisdom

Quote

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

 

Blessing of Wisdom if target got mana, else Blessing of Might

Quote

/run power = UnitPowerType("target"); if ( power == 0 ) then CastSpellByName("Blessing of Wisdom") else CastSpellByName("Blessing of Might") end; if ( SpellIsTargeting() ) then CastSpellByName("Blessing of Might"); TargetUnit("player"); end

 

 

Redemption

Spoiler

Redemption, else Holy Light

Quote

/run if UnitIsDead("target") then CastSpellByName("Redemption") else CastSpellByName("Holy Light") end

 

 

Hammer of Wrath

Spoiler

Hammer of Wrath if target have 20% hp, else Judgement

Quote

/run if UnitHealth("target")/UnitHealthMax("target") < 0.2 then CastSpellByName("Hammer of Wrath")CastSpellByName("Judgement")else CastSpellByName("Judgement")end

 

 

Lay on Hands

Spoiler

/Cast Lay on Hands
/emote casts Lay on Hands on %t

 

Lazy tank

Spoiler

Start attack, Seal of Righteousness, Judgement of the Crusader, Holy Shield (SuperMacro)

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;
/script if not buffed("Seal of Righteousness") then if buffed("Judgement of the Crusader", 'target') then CastSpellByName("Seal of Righteousness") else if not buffed("Judgement of the Crusader", 'target') then if not buffed("Seal of the Crusader") then CastSpellByName("Seal of the Crusader") else if not buffed("Judgement of the Crusader", 'target') then CastSpellByName("Judgement") end end end end end
/cast Holy Shield

 

 

Bubblestone

Spoiler

Divine Shield, else Hearthstone (Put Hearthstone in the first slot of your backpack)

Quote

/run local i,g=0,GetPlayerBuff; CastSpellByName("Divine Shield(Rank 2)");while not (g(i)==-1) do if (strfind(GetPlayerBuffTexture(g(i)),"Interv")) then UseContainerItem(0,1);end;i=i+1;end

 

Divine Shield, else Hearthstone (SuperMacro)

Quote

/run if not buffed("Divine Shield", 'player') then cast("Divine Shield(Rank 2)") else UseItemByName ("Hearthstone")end
/wave

 

 

Taunt

Spoiler

Seal of the Righteousness, Judgement (SuperMacro)

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;
/script if not buffed("Seal of Righteousness") then CastSpellByName("Seal of Righteousness") else if buffed("Seal of Righteousness") then CastSpellByName("Judgement") end end

This is good when you AoE tank with Seal of Wisdom and you lose aggro on one mob because single nuke from DPS

 

All in One AoE farm

Spoiler

Seal of Wisdom, Judgement of Wisdom, Consecration, Holy Shield, Blessing of Sanctuary (SuperMacro)

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;
/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if not buffed("Judgement of Wisdom", 'target') then if not buffed("Seal of Wisdom") then CastSpellByName("Seal of Wisdom") end end
/script if not buffed("Judgement of Wisdom", 'target') then CastSpellByName("Judgement") end
/script if not buffed("Seal of Wisdom") then CastSpellByName("Seal of Wisdom") end
/script if not buffed("Blessing of Sanctuary") then CastSpellByName("Blessing of Sanctuary") end
/cast Consecration
/cast Holy Shield

 

 

Divine Protection 

Spoiler

Max rank Divine Protection (cast + unbuff)

Quote

/cast Divine Protection
/script local i=0 g=GetPlayerBuff while not (g(i) == -1) do if(strfind(GetPlayerBuffTexture(g(i)), "Spell_Holy_Restoration"))then CancelPlayerBuff(g(i))end i = i + 1; end

 

Rank 1 Divine Protection (cast + unbuff)

Quote

/script local i=0 g=GetPlayerBuff while not (g(i) == -1) do if (strfind(GetPlayerBuffTexture(g(i)), "Spell_Holy_Restoration")) then CancelPlayerBuff(g(i)) end i = i + 1; end
/cast Divine Protection(Rank 1)

 

 

Consecration
Spoiler

Rank 1 Consecration, max rank if combat

Quote

/run if not UnitAffectingCombat("player") then CastSpellByName("Consecration(Rank 1)") else CastSpellByName("Consecration") end

 


Cleanse
Spoiler

Self cast Cleanse

Quote

/run C=CastSpellByName; A="Cleanse" if UnitIsFriend("player","target") then C(A) else if not UnitIsFriend("player","target") then C(A, 1) end; end;

 

 

Exorcism

Spoiler

Exorcism if unded or demon, else Holy Light

Quote

/run if UnitCreatureType("target")=="Undead" or UnitCreatureType("target")=="Demon" then CastSpellByName("Exorcism")else CastSpellByName("Holy Light")end

 

 

Summon Warhorse

Spoiler

Turn Undead if combat, else Summon Warhorse

Quote

/run if UnitAffectingCombat("player") and UnitCreatureType("target")=="Undead" then CastSpellByName("Turn Undead") else CastSpellByName("Summon Warhorse")end

 

 

Blessing macros

Spoiler

Here some macros that paladins leveling up might find useful:

Quote

/run local a,b="Blessing of Might",UnitName("target")if b==nil then return end if BuffMem==nil then BuffMem={}end if not IsControlKeyDown() then BuffMem=a end CastSpellByName(a)

 

Quote

/run local a=UnitName("target")or"<no target>"if BuffMem and BuffMem[a]then if IsControlKeyDown()then UIErrorsFrame:AddMessage(BuffMem[a],1,1,0)else CastSpellByName(BuffMem[a])end else UIErrorsFrame:AddMessage(format("No bless saved for %s.",a),1,0,0)end

Explanation:

The first macro will cast "Blessing of Might" (you can replace it with whatever bless you want) and save it for the current target. If you hold Control key it will cast the bless without saving it. Note that saving isn't persistent and will reset upon reloading interface or logging out.

The second macro will cast the saved bless for your current target, or display the saved bless if you're holding Control key.

     

Note that you could actually have these working for greater blessings by replacing `UnitName` with `UnitClass` in these functions.

 

JCarrill0: Nice, if I recall, there once was a macro that would bless based on class, can you do that too?

WobLight: Ummm actually it's already stated in the last line of the post, but I'll make the work for you:

Quote

/run local a,b="Greater Blessing of Might",UnitClass("target")if b==nil then return end if BuffMem==nil then BuffMem={}end if not IsControlKeyDown() then BuffMem=a end CastSpellByName(a)

 

Quote

/run local a=UnitClass("target")or"<no target>"if BuffMem and BuffMem[a]then if IsControlKeyDown()then UIErrorsFrame:AddMessage(BuffMem[a],1,1,0)else CastSpellByName(BuffMem[a])end else UIErrorsFrame:AddMessage(format("No bless saved for %s.",a),1,0,0)end

same as before, the first memorize the class of the target and save the blessing for that class, the second cast the saved blessing based on the target class.

   

JCarrill0: so this does it all in one macro? buffs all classes might/wisdom? (Depending on class)

WobLight: This works like that:

- Make a macro for each bless (using the first macro as template) plus the second one in my post.
- Use bless macro once for each class, the bless you will use will be memorized for it (only for current session though)
- Use the second macro of my post to refresh blessings, it will cast the saved bless depending upon target's class

You can make a macro to load a preset, like this:

Quote

/run BuffMem = {Mage = "Blessing of Wisdom", Warrior = "Blessing of Might" ...}

If you really want a static macro use the following instead:

Quote

/run local b={Mage="Blessing of Wisdom",Warrior="Blessing of Might",...}if UnitExists("target")then CastSpellByName(b[UnitClass("target")])end

 

Macros by WobLight

 

Paladin macros

Spoiler

Action Bar Slots:

 

1 - 12 : Action Bar 1

13 - 24 : Action Bar 2

25 - 36 : Action Bar 3 (Right)

37 - 48 : Action Bar 4 (Right-2)

49 - 60 : Action Bar 5 (Bottom Right)

61 - 72 : Action Bar 6 (Bottom Left)

 

Example: https://i.imgur.com/yVEPNXb.png

 

Also you will need the addon  ***SUPERMACRO***  (http://addons.us.to/addon/supermacro)

 

Now this is the auto-attack macro:

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;

you simple need to put your attack ability to the button you like and set the correct number. For example, in the screenshot above I have mine to button 48. This is spammable... you can spam it and will not toggle the attack off...

 

Now there is a macro that gets a target for you, If you dont already have one!

Quote

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

So the combination of the above 2 macros, will auto-target for you, if you dont have target and also will start the auto-attack

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;
/script if GetUnitName("target")==nil then TargetNearestEnemy() end

 
 
I use these on all my macros, as is very convenient and harmless to have 🙂
 
Now lets go to my actual macros!
 
Seal of Righteousness + target + Auto-attack

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;
/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if not buffed("Seal of Righteousness") then cast("Seal of Righteousness")end;

 
It will target for you, if you dont have target, will start auto attack and will cast Seal of Righteousness, only if you don't have Seal of Righteousness up already! You can spam this and will not toggle off your auto attack and will not cast Seal more than once (and waste you mana).
 
Similar to the above you can set up your other Seals too:
 
Seal of Wisdom + taret + Auto-attack

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;
/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if not buffed("Seal of Wisdom") then cast("Seal of Wisdom")end;

 
Seal of the Crusader + taret + Auto-attack

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;
/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if not buffed("Seal of the Crusader") then cast("Seal of the Crusader")end;

 
Next, I have a macro for lazy AoE grind/farm with my prot pala. It will use Seal of Wisdom, Holy Shield and Consecration. Seal of Wisdom First, then Holy Shield and then Consecration. You can spam this, as it first checks if you have the Seal and holy shield up before it casts it.
 
Seal of Wisdom + Holy Shield + Consecration (Lazy AoE)

Quote

/script if buffed("Seal of Wisdom") and buffed("Holy Shield") then CastSpellByName("Consecration"); end
/script if buffed("Seal of Wisdom") then cast("Holy Shield") else cast("Seal of Wisdom"); end

 
you can also add auto target and auto-attack on this too, but it exceeds the 255 characters you can use. So you are gonna need to make it in the supermacro tab as seen below:
 
https://i.imgur.com/GltDqZF.png
 

Quote

/script if not IsCurrentAction(48) then AttackTarget() end;
/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if buffed("Seal of Wisdom") and buffed("Holy Shield") then CastSpellByName("Consecration"); end
/script if buffed("Seal of Wisdom") then cast("Holy Shield") else cast("Seal of Wisdom"); end

 
Clear all debuffs (Cast Divine Shield and immediately remove it)

Quote

/cast Divine Shield
/unbuff Divine Shield

 
Will cast Divine Shield on first push and will cancel it on second. Simple spam this, to clear debuffs fast 🙂
 
Stopcasting if target % health is above 95% (Prevent overheal)

Quote

/script CastSpellByName("Flash of Light"); if (UnitHealth('target')/UnitHealthMax('target')>0.95) then SpellStopCasting() end

 
This will cancel your spell if your target gets above 95% HP to avoid overhealing. Attention: you need to have the unit targeted, so it does not use for yourself when auto-self casting heal. It will work only if you target yourself first and then heal.

 

Made by Rohirrim

 

Hunter macros  

 

Pet macros

Spoiler

Pet bar macro (the skills are 1,2,3,4,5 from left to right)

Quote

/script CastPetAction(5);

 

Pet attack

Quote

/script PetAttack()

 

Passive pet

Quote

/script PetPassiveMode();

 

Pet follow

Quote

/script PetFollow();

 

Toggle Autocast (the skills are 1,2,3,4,5 from left to right)

Quote

/script TogglePetAutocast(5)

 

Insta dismiss

Quote

/Script PetDismiss()

 

One button pet follow/stay

Quote

/run local _,_,_,_,x = GetPetActionInfo(2); if x then PetWait() else PetFollow() end

 

Target/Tame Beast (edit Lupos for next pet name)

Quote

/run TargetByName("Lupos", true) local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Ability_Hunter_BeastTaming" then x=1 end i=i+1 end if x==0 then CastSpellByName("Tame Beast")end

 

 

Aspect

Spoiler

Aspect of the Hawk if not buffed, else Aimed Shot

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Nature_RavenForm" then x=1 end i=i+1 end if x==0 then CastSpellByName("Aspect of the Hawk") else CastSpellByName("Aimed Shot")end

 

Aspect of the Hawk if not buffed, else Auto Shot (Put Auto Shot into action slot 48)

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Nature_RavenForm" then x=1 end i=i+1 end if x==0 then CastSpellByName("Aspect of the Hawk")else if not IsAutoRepeatAction(48) then UseAction(48)end end

 

Aspect of the Monkey/Raptor Strike

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Hunter_AspectOfTheMonkey" then x=1 end i=i+1 end if x==0 then CastSpellByName("Aspect of the Monkey") else CastSpellByName("Raptor Strike")end

 

Aspect of the Monkey if melee, else Aspect of the Hawk

Quote

/run if CheckInteractDistance("target",3) then CastSpellByName("Aspect of the Monkey") else CastSpellByName("Aspect of the Hawk")end

 

Aspect of the Cheetah, else Aspect of the Pack

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Mount_JungleTiger" then x=1 end i=i+1 end if x==0 then CastSpellByName("Aspect of the Cheetah") else CastSpellByName("Aspect of the Pack") end

 

Aspects to Monkey if melee, Hawk if ranged, Cheetah if target is slowed by Wing Clip, or Concusive Shot for kiting. (SuperMacro)

Quote

/script if UnitAffectingCombat("player") and GetUnitName("target") and CheckInteractDistance("target",3) and not buffed("Aspect of the Monkey","player") then CastSpellByName("Aspect of the Monkey") else if buffed("Concussive Shot","target") or buffed("Wing Clip","target") and not buffed("Aspect of the Cheetah","player") then CastSpellByName("Aspect of the Cheetah") else if not buffed("Aspect of the Hawk","player") then CastSpellByName("Aspect of the Hawk") end end end
/script if not UnitAffectingCombat("player") then CastSpellByName("Aspect of the Cheetah") end

Out of combat it switches between Cheetah and Hawk

 

Tranq

Spoiler

Tranq macro, to announce the Tranq after its executed

 

Extended Lua:

function createTranqFrame()
    if tranqFrame == nil then
        tranqFrame = CreateFrame("FRAME");
        tranqFrame:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE");
        local function eventHandler(self, event, ...)
            if string.find (arg1, "Your Tranquilizing Shot hits") 
				or string.find (arg1, "Your Tranquilizing Shot crits") then
				SendChatMessage("Tranq Shot landed!", "SAY")
			end;
			if string.find (arg1, "Your Tranquilizing Shot was resisted") then
				SendChatMessage("Tranq Shot resisted!", "SAY")
			end;
			if string.find (arg1, "Your Tranquilizing Shot was dodged") then
				SendChatMessage("Tranq Shot dodged!", "SAY")
			end;
			if string.find (arg1, "Your Tranquilizing Shot missed") then
				SendChatMessage("Tranq Shot missed!", "SAY")
			end;
        end
        tranqFrame:SetScript("OnEvent", eventHandler);
    end;
end;

function TranqShot()
	createTranqFrame();
	CastSpellByName("Tranquilizing Shot");
end;

Macro

Quote

/script TranqShot()

 

 

Actionbar page

Spoiler

Aspect actionbar change

Quote

/cast Aspect of the Hawk
/script CURRENT_ACTIONBAR_PAGE = Y;
/script ChangeActionBarPage();
/script UIErrorsFrame:Clear()

Set number of action bar u wanna switch to insted of Y letter.

 

Swap to bar 2 if you got a target in melee range, else use Auto Shot (Put Auto Shot in action slot 48)

Quote

/run if CheckInteractDistance("target",3) then CURRENT_ACTIONBAR_PAGE = 2; ChangeActionBarPage(); else if not IsAutoRepeatAction(48) then CastSpellByName("Auto Shot"); end end

 

Swap to bar 2 if you got a target in melee range, else cast Concussive Shot

Quote

/run if CheckInteractDistance("target",3) then CURRENT_ACTIONBAR_PAGE = 2; ChangeActionBarPage(); end
/cast Concussive Shot

 

Swap to bar 1 if you don't have a target in melee range, else cast Raptor Strike and Mongoose Bite

Quote

/run if not CheckInteractDistance("target",3) then CURRENT_ACTIONBAR_PAGE = 1; ChangeActionBarPage(); else if (not PlayerFrame.inCombat) then AttackTarget() end end
/cast Raptor Strike
/cast Mongoose Bite

 

Swap to bar 1 if you don't have a melee target, else cast Wing clip

Quote

/run if not CheckInteractDistance("target",3) then CURRENT_ACTIONBAR_PAGE = 1; ChangeActionBarPage(); end
/cast Wing clip

 

 

Hunter Vanish

Quote

NE Hunter Vanish

Quote

/run PetFollow() PetPassiveMode() ClearTarget() if UnitAffectingCombat("player") then CastSpellByName("Feign Death") else CastSpellByName("Shadowmeld") CastSpellByName("Prowl")end

 

Use any Invisibility potion, Feign Death if combat

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Invisibility Potion"))then UseContainerItem(b,s,1)end end end
/run if UnitAffectingCombat("player") then CastSpellByName("Feign Death") end

 

 

Hunter's Mark

Spoiler

Hunter's Mark

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Ability_Hunter_SniperShot" then x=1 end i=i+1 end if x==0 then CastSpellByName("Hunter's Mark")end

 

Hunter's Mark/Pet Attack

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Ability_Hunter_SniperShot" then x=1 end i=i+1 end if x==0 then CastSpellByName("Hunter's Mark") else PetAttack()end

 

Hunter's Mark/Aimed Shot

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Ability_Hunter_SniperShot" then x=1 end i=i+1 end if x==0 then CastSpellByName("Hunter's Mark") else CastSpellByName("Aimed Shot")end

 

 

Cycle through spells

Spoiler

Cycle Hunter's Mark, Serpent Sting, and Concussive Shot

Quote

/run s={"Hunter's Mark","Serpent Sting","Concussive Shot"} if q==nil then q=0 end q=q+1 if q>getn(s) then q=1 end CastSpellByName(s[q])

 

 

Scatter Shot

Spoiler

Targets nearest enemy, Scatter shot and Hunter's Mark if rogue

Quote

/run TargetNearestEnemy(); if (UnitClass("target")=="rogue") then CastSpellByName("Scatter Shot"); CastSpellByName("Hunter's Mark");end

 

 

ArcaneShot/Auto

Spoiler

/run if not GetUnitName("target")then TargetNearestEnemy()end
/cast Arcane Shot(rank 1)
/run if CheckInteractDistance("target", 3)and not PlayerFrame.inCombat then AttackTarget()elseif not IsAutoRepeatAction(3)then CastSpellByName("Auto Shot")end

 

Tracking

Spoiler

Flare, else Track Hidden (Put Flare in action slot 45)

Quote

/run if GetActionCooldown(45)==0 then CastSpellByName("Flare") else CastSpellByName("Track Hidden")end

 

Humanoids/Hidden/Undead/Giants

Quote

/run c=CastSpellByName t=GetTrackingTexture() if t and strfind(t,"Prayer") then c("Track Hidden") elseif t and strfind(t,"Stealth") then c("Track Undead") elseif t and strfind(t,"Dark") then c("Track Giants") else c("Track Humanoids") end

 

Beasts/Dragonkin/Demons/Elementals

Quote

/run c=CastSpellByName t=GetTrackingTexture() if t and strfind(t,"_Tracking") then c("Track Dragonkin") elseif t and strfind(t,"Dragon") then c("Track Demons") elseif t and strfind(t,"Fel") then c("Track Elementals") else c("Track Beasts") end

 

Use the script to get the current Tracking Texture

Quote

/run icon= GetTrackingTexture() DEFAULT_CHAT_FRAME:AddMessage(icon)

 



All-In-One Pet

Spoiler

Call/dismiss/revive/heal/feed

Quote

/run c=CastSpellByName p="pet" h=UnitHealth(p)if not UnitExists(p)then c("Call Pet")elseif h<1 then c("Revive Pet")elseif GetPetHappiness()<3 then c("Feed Pet")PickupContainerItem(3, 12)elseif h<UnitHealthMax(p)then c("Mend Pet")else c("Dismiss Pet")end

 

Feeds, Dismisses, Calls or Revives Pet according to whatever is appropriate

Quote

/run local c=CastSpellByName if UnitExists("pet") then if UnitHealth("pet")==0 then c("Revive Pet") elseif GetPetHappiness()~=nil and GetPetHappiness()~=3 then c("Feed Pet") PickupContainerItem(3, 1) else c("Dismiss Pet") end else c("Call Pet") end

The bags are numbered starting at 0 for the blizzard bag 1, 2 3 4 for the remaining. So if you wanted to use the first slot in the blizzard bag you would change (3,1) to "(0, 1)" or if you wanted to use the 2nd slot in the 3rd bag it would be "(2, 2)"

 

Call Pet, Revive Pet or Mend Pet

Quote

/run if not UnitExists("pet") then CastSpellByName("Call Pet") else if UnitIsDead("pet") then CastSpellByName("Revive Pet") else CastSpellByName("Mend Pet") end end

 

 

Mouseover pet attack

Spoiler

If you're targeting a mob and you dont have a mouseover target then the pet will attack your main target and if you do have a mouseover target the pet will attack that target instead so you dont have to switch your own main target and lose DPS

Quote

/script if UnitCanAttack("player","mouseover") then TargetUnit("mouseover");PetAttack();TargetUnit("playertarget"); else PetAttack(); end

 

Quote

/run local a=UnitExists("mouseover")and"mouseover"or"target"if UnitIsFriend("player",a)then a=a.."target"end;if UnitCanAttack("player",a)then if not UnitIsUnit(a,"pettarget")then TargetUnit(a)PetAttack()return end end;PetFollow()

 

 

Petattack/Hunter's Mark

Spoiler

Target nearest enemy, Hunter`s Mark and Pet Attack

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end; CastSpellByName("Hunter's Mark); PetAttack()

 

Petattack+Hunter's Mark+autoshot (Put Auto Shot in action slot 1)

Quote

/run PetDefensiveMode() PetAttack() if CheckInteractDistance("target",3) and (not PlayerFrame.inCombat) then AttackTarget() elseif not IsAutoRepeatAction(1) then cast("Auto Shot") end if not buffed("Hunter's Mark",'target') then cast("Hunter's Mark")end 

 

This will find a target and send your pet to attack while keeping him in passive mode, second click will bring pet back to you.

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script CastPetAction(10);
/script if UnitExists("target") then if a==0 then PetAttack(target) a=1 else if UnitExists("pettarget") and UnitIsUnit("target", "pettarget") then PetFollow("YOURNAMEHERE") a=0 else PetAttack(target) end;end; else PetFollow("YOURNAMEHERE") a=0 end;

 

Modfied the above to also cast Hunter's Mark (just once, will not apply it if the mob is already marked)

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script CastPetAction(10);
/script if UnitExists("target") then if a==0 then PetAttack(target) a=1 else if UnitExists("pettarget") and UnitIsUnit("target", "pettarget") then PetFollow("YOURNAMEHERE") a=0 else PetAttack(target) end;end; else PetFollow("YOURNAMEHERE") a=0 end
/script if not buffed("Hunter's Mark","target") then CastSpellByName("Hunter's Mark") end

 

 

Wing clip/Concussion shot

Spoiler

Wing Clip if melee range, else Concussion shot

Quote

/run if CheckInteractDistance("target",3) then CastSpellByName("Wing Clip") else CastSpellByName("Concussion Shot"); end

 

Wing Clip if missing on target

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Ability_Rogue_Trip" then x=1 break end i=i+1 end if x==0 then CastSpellByName("Wing Clip") CastSpellByName("Wing Clip(Rank 1)") end

 


Raptor Strike/Mongoose Bite

Spoiler

/script if (not PlayerFrame.inCombat) then AttackTarget() end
/cast Raptor Strike
/cast Mongoose Bite

 

Hunter trap

Spoiler

Trap/Feign Death

Quote

/script if UnitAffectingCombat("player") then CastSpellByName("Feign Death") end
/cast Freezing Trap

 

Pet on passive/follow/Trap/Feign Death

Quote

/script PetPassiveMode();
/script PetFollow();
/script if (UnitAffectingCombat("player")) then CastSpellByName("Feign Death") else if not (UnitAffectingCombat("player")) then CastSpellByName("Freezing Trap"); end

 

Feign Death/Trap/Put pet on passive

Quote

/cast Freezing Trap
/script if UnitAffectingCombat("player") then CastSpellByName("Feign Death") end
/script if UnitExists("pettarget") and CheckInteractDistance("target", 3) and UnitIsUnit("target", "pettarget") then PetPassiveMode(); else end

 

 

Viper sting

Spoiler

Viper sting on trap target without auto shot

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Frost_ChainsOfIce" then x=1 end i=i+1 end if x==1 then CastSpellByName("Viper Sting")ClearTarget() else CastSpellByName("Viper Sting")end

 

Viper sting/Scorpid sting

Quote

/run class=UnitClass("target"); if ((class=="Rogue") or (class=="Warrior")) then CastSpellByName("Scorpid Sting"); else CastSpellByName("Viper Sting")end

 

Target is player controlled and has mana cast Viper Sting, else cast Serpent Sting

Quote

/run if (UnitPowerType('target')==0) and UnitPlayerControlled("target") then CastSpellByName("Viper Sting")else CastSpellByName("Serpent Sting")end

 

 

Wyvern Sting

Spoiler

Pet passive, Feign Death if combat, else Wyvern Sting

Quote

/run PetPassiveMode() if UnitAffectingCombat("player") then CastSpellByName("Feign Death")end
/cast Wyvern Sting

 

 

Nefarian macro

Spoiler

Make sure the very first slot in your backpack is open for this to work, your ranged weapon will be put there.

Quote

/script PickupInventoryItem(18) if ( CursorHasItem() ) then PickupContainerItem(0, 1); else PickupContainerItem(0, 1); PickupInventoryItem(18);end

 

 

Trueshot Aura/Aspect of the Hawk

Spoiler

/script if not buffed("Trueshot Aura") then CastSpellByName("Trueshot Aura") else if not buffed("Aspect of the Hawk") then CastSpellByName("Aspect of the Hawk") else if not buffed("Track Humanoids") then CastSpellByName("Track Humanoids") end end end;

 

Hunter macros

Spoiler

MACROS
I'm quite fond of macros and used them religiously on retail. Unfortunately, many of the commands I was so familiar with didn't function on Nostalrius, and I've had quite a hard time finding reliable sources of Vanilla macros online. Thankfully, though, I'm familiar with scripting, so I put together a few useful macros with bits and pieces I found all over the net.

Even if you're not a hunter, you may benefit from this list of macros with a little bit of modification. So, browse at your leisure. None of the macros listed below require SuperMacro or some other addon to function.

THE GOAL OF MACROS
In this section, we'll go over what we aim to accomplish by studying and using macros.

WHY THEY'RE IMPORTANT
Macros essentially allow you to automate parts of your game. When you keep two keybinds which you could do through a single macro, you're wasting time by hitting a redundant keybind. They also allow you to act with precision in an intense situation, reducing the likelihood of human error. Whether you're new to the game or a veteran player, macros can improve your performance, often with little more hassle than copy + paste, and that is why they're important.

WHAT THEY CAN DO
As stated, macros can reduce the number of keybinds you need, which can help to keep all your abilities within reach on a class that has a lot of abilities, like a hunter. They can make use of conditions to be situational, like only firing off in combat or when your enemy is a certain class, which saves you more time and thought. They can issue commands to pets so that you can coordinate your attacks with them. And, there's a lot more that macros can do, but let's just continue and get on to the specifics as soon as possible.

HOW THIS PERTAINS TO A HUNTER
As I said a moment ago, hunters have a ton of keybinds. Macros, being able to reduce keybinds, are thus great for hunters. They'll improve your efficiency without a doubt, enabling you to target enemies faster, control your pet better, and improve your crowd control.

BASIC HUNTER MACROS
Here we'll go over some basic macros. The scripts below can be lumped into other macros, increasing their functionality. I'll try to explain what each part does so you know what to copy into other macros, if you wish to do so.

AUTO SHOT
As strange as it might sound to have a macro for something as simple as Auto Shot, this is actually pretty important. Auto Shot is the core of your abilities, used for everything from initiating on a new target (before Aimed Shot) to doing most of your damage in dungeons and raids. 
 

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/run if CheckInteractDistance("target", 3) and (not PlayerFrame.inCombat) then AttackTarget() elseif not IsAutoRepeatAction(3) then CastSpellByName("Auto Shot") end



This two-line macro will:
- Automatically target anything in front of you if you don't have a target.
- Begin using Auto Shot if you're at the appropriate distance to strike.
- Prevent Auto Shot from being toggled off if you hit the key again.
- Swap to melee auto attack if you're too close to Auto Shot.

Two important functions in particular are added: The automatic targeting, which will allow you to basically point and shoot with your right mouse and Auto Shot keybind, and the function that prevents Auto Shot from being toggled off. Auto Shot is on its own cooldown, independent of the GCD, so it's important to be able to enable it on demand.

You will need to modify this macro if you place it on any key other than 3 on your primary action bar. Please reference this screenshot:
http://i.imgur.com/VGArn.jpg

And change the 3 in THIS part of the script:
IsAutoRepeatAction(3)

To the key corresponding with the location of the macro on your own interface.

MELEE ATTACKS
This is just a basic macro to lump all of your offensive melee skills onto one bind.
 

Quote

/script if (not PlayerFrame.inCombat) then AttackTarget() end
/cast Raptor Strike
/cast Counterattack
/cast Mongoose Bite



The first line will begin your melee attack, regardless of distance to target. The next three lines cast abilities. Because Raptor Strike and Mongoose Bite function differently, they can be used simultaneously. Counterattack and Mongoose Bite cannot be used simultaneously, but Counterattack is a priority, so it's listed first.

GENERAL SHOTS
Consider the macro below to be a default for all of your skill shots. This example casts Serpent Sting.
 

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/cast Serpent Sting



The first line is automatic targeting. The second line will cast your ability.

If you also wish to initiate your Auto Shot alongside your other shots, as I prefer, use the following macro instead... if you have an addon that allows longer than 255 characters.
 

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/cast Arcane Shot(rank 1)
/run if CheckInteractDistance("target", 3) and (not PlayerFrame.inCombat) then AttackTarget() elseif not IsAutoRepeatAction(3) then CastSpellByName("Auto Shot") end



Just don't forget to change "IsAutoRepeatAction(3)" to correspond with your interface again.

If you don't have an addon like that, use this one instead. The following shorter script will attempt to enable your Auto Shot, but will not switch to melee attack if you're too close to your target.
 

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/cast Arcane Shot(rank 1)
/script if not IsAutoRepeatAction(3) then CastSpellByName("Auto Shot"); end



BASIC PET MACROS
Controlling your pet effectively is quite important. Your pet can aggro mobs, establish CC or break it, and ought to be doing damage on just the right target, or be in the right place to do that damage. So, this section will go over a few basic pet control macros and what you can do with them.

PET ATTACK
The following macro is a simple macro that'll send your pet at your target.
 

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script CastPetAction(2);
/script CastPetAction(10);
/script PetAttack(target)
/cast Charge
/cast Dash



This macro's six lines do the following:
- Automatic targeting.
- Pet will follow you when disengaged from combat.
- Pet will act passively when disengaged from combat.
- Pet will attack the target specified.
- If available, your boar will Charge the target specified.
- If Charge isn't available or possible, Dash will be enabled instead.

One of the most useful scripts in this macro is the CastPetAction script. Your pet's action bar has 10 abilities on it, and Follow is on 2 by default and Passive is on 10 by default. Since Attack is ordered after these two lines, your pet will attack your target. The reason for setting your pet to follow and passive is that direct control over your pet's actions will help to prevent mistakes. When you need to give orders to your pet, it's best to have it under your complete control, so setting it to Follow and Passive every time you give an order is a safe default.

The final two lines contribute to your control. If you leave Dash on auto cast, your pet will spam it on cooldown, and that wastes focus and is likely to either prevent your pet from catching up to a target you need to catch, or get your pet killed if you need Dash to pull it back to you faster. By ordering Dash on attack, you ensure that your pet will make the fastest run to a new enemy target.

PET FOLLOW
When you loose your pet on something, you're going to want some way to bring it back to you, for instance if the enemy flees and your pet will attract more enemies if it stays on that enemy. This macro does that:
 

Quote

/script PetFollow("Raziya")
/script CastPetAction(10);
/cast Dash



It's a very straightforward macro. Just change "Raziya" in between the parentheses to your name. The second line causes your pet to be passive, provided the passive command is in its default position on your pet's action bar, at 10. The third line will make your pet Dash back to you, which is convenient if you need to pull it out of danger quickly.

PET STAY
Telling your pet to stay has various uses. You can use it to guard a flag, or fool people by Shadowmelding in a different bush than the one your pet is in, or maybe you need to leave it behind while you go pull the acolytes out of a Ziggurat in Strath UD. Whatever the case, having a keybind for your pet to stay is useful. Here it is:
 

Quote

/script CastPetAction(3);
/script CastPetAction(10);



The first line will tell your pet to stay. The second line will make your pet act passively.

PET GROWL
You'll probably have your Growl turned off sometimes, like in a dungeon or for PvP. If an enemy rushes for your healer, you can send your pet at the enemy, order it to Growl, and then send it back at the mobs near the tank, effectively bringing the mob back to the tank spot without having to stop your DPS.
 

Quote

/cast Growl
/run local i,g=1,0 while GetSpellName(i,"pet") do if GetSpellName(i,"pet")=="Growl" then g=i end i=i+1 end local _,y = GetSpellAutocast(g,"pet") if not y then ToggleSpellAutocast(g,"pet") end



The first line commands your pet to Growl. The second line turns its auto cast on. If you want a script to turn Growl's auto cast off, one contributor posted this in the comments on this thread:
 

Etrigan wrote:
/script local i,g=1,0 while GetSpellName(i,"pet") do if GetSpellName(i,"pet")=="Growl" then g=i end i=i+1 end local _,y = GetSpellAutocast(g,"pet") if (y and UnitFactionGroup("target")) then ToggleSpellAutocast(g,"pet") end



MISCELLANEOUS MACROS
Here are just a couple of macros which don't fall under other categories. One of them is Night Elf-specific.

FEIGN DEATH
This macro will ensure that the only time you ever use Feign Death is while you're in combat.
 

Quote

/script if UnitAffectingCombat("player") then CastSpellByName("Feign Death") end



On its own, it's nothing special, but this script will be used in combination with other abilities later.

SHADOWMELD
Shadowmeld is a great skill that can help you stay alive or set up kills, especially as a hunter.
 

Quote

/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



This will prevent you from toggling your Shadowmeld off. I don't know any sort of macro that would do the same for Prowl, so... sorry!

DETERRENCE / MONKEY

 

Quote

/cast Deterrence
/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Hunter_AspectOfTheMonkey" then x=1 end i=i+1 end if x==0 then CastSpellByName("Aspect of the Monkey") else end



This Deterrence macro will cast Aspect of the Monkey and Deterrence. Aspect of the Monkey will not be toggled off.
 

FRIEND OR FOE
This script will cast one spell if your target is friendly. It'll cast a different spell if your target is hostile.
 

Quote

/script if UnitIsFriend("player", "target") then CastSpellByName("Aspect of the Pack") else CastSpellByName("Aspect of the Cheetah") end



This example will cast Pack if your target is friendly, but Cheetah under any other circumstances. That way, if you're in a group and you want to give Pack to people, just click an ally and you don't have to reserve another keybind for Pack!

You can modify this to use items. For instance, here's my Scare Beast macro:
 

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if UnitIsFriend("player", "target") then UseContainerItem(0, 16) else CastSpellByName("Scare Beast") end



If targeting an ally, this will use the item in the lower-right corner of my backpack. That's where I keep my bandages. Experiment with the UseContainerItem parameters as needed.

CC MACROS
Hunters have incredible crowd control, but several of our abilities can be tricky to use, such as traps, which require we be out of combat. I put together these macros to help make CC more easily maintained.

SCATTER SHOT MACRO
This macro is awesome for abilities like Scatter Shot or Wyvern Sting.
 

Quote

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



After auto targeting, this macro will check if you and your pet are attacking the same target. If so, your pet will be set to passive and stay at its current position. If not, your pet will continue attacking its target.

Just remember to give the attack order again after your enemy has recovered.

FEIGN DEATH / TRAP
Since hunters can't use traps in combat, we need to rely on Feign Death to drop a trap in a pinch. This macro has proven to be very useful:
 

Quote

/cast Immolation Trap
/script if UnitAffectingCombat("player") then CastSpellByName("Feign Death") end



You need to hit this macro at least twice regardless of script order, so you might as well have your trap as the first line so your macro shows the tooltip for the trap, rather than Feign Death.

FREEZING TRAP
The Freezing Trap can be broken by your pet too, so I went ahead and did this to mine:
 

Quote

/cast Freezing Trap
/script if UnitAffectingCombat("player") then CastSpellByName("Feign Death") end
/script if UnitExists("pettarget") and CheckInteractDistance("target", 3) and UnitIsUnit("target", "pettarget") then PetPassiveMode(); else end



Feign Death will be used if you're in combat. If you and your pet are targeting the same thing, and the enemy is close to you, then your pet will be pulled off of the enemy. The only drawback is that you'd need to be targeting the enemy you intend to trap, but in a 1v1 this works nicely. So, world PvP.

ADVANCED MACROS
Here we get into some longer, cooler macros than the basic ones mentioned before this point. All of them will be focused on reducing keybinds based on situational parameters.

COMBAT ASPECT SWAP / ASPECT SITUATIONAL
Aspect of the Hawk and Aspect of the Monkey are both important abilities to have bound, especially for a PvPer or a Ravager, but you'd need two keybinds. The following macros put them in one keybind.

The first solution I came up with was a swap macro:
 

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Nature_RavenForm" then x=1 end i=i+1 end if x==0 then CastSpellByName("Aspect of the Hawk") else CastSpellByName("Aspect of the Monkey") end



This macro uses a similar structure to the Shadowmeld macro. If you're in no aspect or in any other aspect, it'll toggle on Aspect of the Hawk. If you're in Aspect of the Hawk, it'll switch to Aspect of the Monkey.

The second solution I came up with was a distance check:
 

Quote

/run if CheckInteractDistance("target", 3) then CastSpellByName("Aspect of the Monkey") else CastSpellByName("Aspect of the Hawk") end



This macro uses a similar structure to the Auto Shot macro. If you have no target or if your target is far away from you, it'll cast Aspect of the Hawk. If your target is close to you, it'll cast Aspect of the Monkey.

Both macros function differently, but to the same end. Take whichever you like, if either.

SITUATIONAL STING
You're never going to use Scorpid Sting on a mage, right? Or Viper Sting on a rogue. So, here's a macro that casts the right sting depending on the class of your target:
 

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script class=UnitClass("target"); if ((class=="Rogue") or (class=="Warrior")) then CastSpellByName("Scorpid Sting"); else CastSpellByName("Viper Sting"); end



It also seems to work on NPCs. NPCs with mana get Viper Sting, and NPCs without mana get Scorpid Sting. Reportedly a few people have had trouble with it on druids shapeshifted into cat or bear form, but I think that may have been an issue on Nostalrius only. On Kronos II I've confirmed that this works properly all the time.

ALL-IN-ONE PET MAINTENANCE
We have a lot of abilities that affect our pet. The following macro combines feed pet, call pet, dismiss pet, and revive pet.
 

Quote

/run local c=CastSpellByName if UnitExists("pet") then if UnitHealth("pet")==0 then c("Revive Pet") elseif GetPetHappiness()~=nil and GetPetHappiness()~=3 then c("Feed Pet") PickupContainerItem(0, 13) else c("Dismiss Pet") end else c("Call Pet") end



If your pet is dismissed, this macro will call it. If your pet is called and happy, this macro will dismiss it. If your pet is called and unhappy, this macro will feed it the item in the bottom left corner of your backpack. If your pet's dead, it'll be revived.

You can change the bagslot this macro checks for food in by changing the "PickupContainerItem(0, 13)" part. The bags count from 0-4, starting from the Backpack, so 0, 13 there means the 13th slot in the backpack.

MY PERSONAL MACROS
Due to popular demand, I'm dropping a few of my own personal macros here. See details below:

MULTI-SHOT

 

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/cast Multi-Shot(rank 1)
/cast Volley
/script if not IsAutoRepeatAction(3) then CastSpellByName("Auto Shot"); end



This is a simple fall-through macro. If you hit it once, you target anything up to 40 yards in front of you, cast Multi-Shot, and toggle your Auto Shot on. Hit it again while Multi-Shot is on cooldown, and you'll cast Volley. Alternatively, if Multi never goes off, Volley will be selected immediately.

Unless your Flare is on cooldown and you have the mana to spare to take a rogue out of invisibility, I don't really think you'll have any urgency to use Volley until you're AoEing something, and Multi-Shot is often the priority, hence the use of this macro.

Remember to adjust the Auto Shot script according to your interface. See section 2.2.1 for more information.

WING CLIP

 

Quote

/script if (not PlayerFrame.inCombat) then AttackTarget() end
/cast Counterattack(Rank 1)
/cast Wing Clip
/cast Wing Clip(Rank 2)
/cast Wing Clip(Rank 1)



This is a fall-through macro for Wing Clip. If you happen to be super low on mana for some reason and can't use maximum rank Wing Clip, a lower rank will be used instead. Counterattack is a priority over all ranks of Wing Clip.

COORDINATES

 

Quote

/script SetMapToCurrentZone() local x,y=GetPlayerMapPosition("player") DEFAULT_CHAT_FRAME:AddMessage(format("%s, %s: %.1f, %.1f",GetZoneText(),GetSubZoneText(),x*100,y*100))

This macro tells you your current coordinates. I keep it around to help mark locations on my map using Cartographer's note system.

 

Macros by Raziya

 

Use Furious Howl properly

Spoiler
Many hunters are using wolves, because that pet can be both a perfect melee dps booster (if you're using MM build, you'll always have 4 melee dps in your raid party) and a ranged dps booster (buff your shots on encounters, where pet can't do damage). Melee boost works fine, because melee abilities don't have delay (they're instant) and most of your party members (rogues\fury warriors) will be grateful for a slight dps bonus.

The problem is about ranged boost. The delay between your shots (aka fly time) ruins everything. And the casting shots too.

Okay, there are a few annoying things about Furious Howl that you should know about:
PROBLEMS:
1)FH just gives you an extra ~50 damage for your next attack (it won't increase your Aimed Shot damage significantly, it just adds a ~50 dmg to it), so there's no difference between buffing Auto Shot and Aimed Shot. Still, if your shot crits, that little damage bonus will crit too (+~100 dmg). Overall FH's damage in melee raid party is about 250-500, which is very nice.
2)If the hunter receives FH buff when any of his shots is in the fly time - FH buff will disappear from hunter without any effect, because that shot hasn't been buffed, but it counts like your next attack. In this situation you ll just waste FH without reason.
3)Do not buff FH during shot cast - FH buff will disappear from hunter without any effect, because that shot must be buffed before you managed to cast it. For example, if you buff FH during Aimed Shot cast - you ll just waste FH without reason.
4)There's a slight delay between when a wolf casts FH and hunter receives that buff. That makes macro
Quote

/cast Furious Howl
/cast Aimed Shot


a very dependable from latency. Sometimes it will work like this - you start to cast Aimed Shot, and receive FH right after, because of this delay(shamans have the same problem with grounding totem btw).That leads to problem 3.
SOLUTIONS:
1) Use your FH to buff your Auto Shots, while your Multi-Shot and Aimed Shot are on cd. But wait until the previous shot hits the target!
2)Using this macro
Quote

/cast Furious howl
/script a = buffed("Furious Howl", 'player') if a then cast("Aimed Shot") end


will help to avoid delay. But I don't recommend to use it in PvE rotation, because in most cases FH will fade from fly-timed Auto-Shots.

 

Macro by Issir

 

Beast o' Melee

Spoiler

Okay, since I've been working on improving my Hunter macros for this build, and since there's enough of a modification to them to be worthy of an update, I figured it would be easiest to just consolidate everything here for easy reference (and to time capsule them). At the present time, I'm using 9 macros specifically on my Hunter, while most of my other 7 Alliance characters have either one or none. Hunters are VERY macro hungry as a class for effective character management.

For ease of reference for everything that follows in the macro scripting below, this is NOW (as a result of writing up this posting which resulted in a lot of general housekeeping on top of everything else) what my Pet Skills Bar looks like in-game by default when using my Screech Pet.

Image

For anyone new to playing a Hunter, these slots from left to right are:

  1. Attack

Follow Stay Cower (toggled ON while Growl is OFF) Screech (toggled on) Dive (toggled off) Growl (toggled OFF while Cower is ON) Aggressive Defensive Passive

Screech is toggled on at all times because if my Pet is attacking I want it to be Screeching. Dive is toggled off because I really only want Dive to be invoked when there is distance to target for my Pet to travel. No point in using Dive while in melee range of a target. Cower and Growl "oppose" each other in their toggle states, such that when one is on the other is off (until they both switch). Because of this, and to avoid "Mode Confusion" I've moved Cower and Growl to be as far apart from each other as is possible within slots 4 to 7, thereby placing Cower in slot 4 and Growl in slot 7. This then makes it very easy to tell at a glance which "mode" my Pet is in with respect to either autocasting Cower or autocasting Growl.



First up, the melee attack macros. All three of these, coincidentally enough, use 164/255 characters each for casting Raptor Strike, Mongoose Bite and Counterattack respectively.

Quote

/cast Raptor Strike
/run CastPetAction(2);
/run CastPetAction(10);
/run PetAttack(target);
/run if not CheckInteractDistance("target", 3) then CastPetAction(6) end

 

Quote

/cast Mongoose Bite
/run CastPetAction(2);
/run CastPetAction(10);
/run PetAttack(target);
/run if not CheckInteractDistance("target", 3) then CastPetAction(6) end

 

Quote

/cast Counterattack
/run CastPetAction(2);
/run CastPetAction(10);
/run PetAttack(target);
/run if not CheckInteractDistance("target", 3) then CastPetAction(6) end

 

All three of these macros are designed to make use of Raziya's formulation of Pet Attack macros for lines 2-4, although I'm using /run instead of /script in order to save on character counts just in case I ever want to add even more functions to these macros later on. Beyond that, I'm simply pairing those functions (Pet Follow in line 2, Pet Passive in line 3, attack my target in line 4) with using either Raptor Strike, Mongoose Bite or Counterattack in line 1. The last of code determines if the target is 10+ yards away from my Hunter, and if the target is 10+ yards away to have my Pet use their slot 6 Skill, which I've standardized on being either Dash or Dive ... but if the target is less than 10 yards away from my Hunter then Dash/Dive does not need to be cast by my Pet, which will often be the case when my Pet is fighting beside me while my Hunter melee tanks. This makes these macros functionally "Pet agnostic" with respect to use of Dash or Dive so long as I reserve slot 6 for either of those Skills, which I was planning to do anyway. Note also that this particular formulation automatically gives me the proper tooltips and cooldown graphics for Raptor Strike, Mongoose Bite and Counterattack icon on my action hotbar.



Technically, my Disengage macro is part of the melee group of macros, since all of the skills it references are melee range skills (both for my Hunter and my Pet) but it can also be used at range and without a target selected simply to flip the toggles on Cower and Growl. This macro weighs in at a hefty 245/255 characters used, so not much leeway to do much more with this one.

Quote

/run if UnitIsEnemy("player", "targettarget") then CastSpellByName("Disengage") end
/run CastPetAction(10);
/run TogglePetAutocast(4);
/run TogglePetAutocast(7);
/run if UnitIsEnemy("player", "target") then PetAttack(target) CastPetAction(6) end

 

At first I was using UnitIsUnit for this one, but then I noticed in the Vanilla APIs that Raziya was so kind to link to that there is a UnitIsEnemy function, which when parsed right with "target" as the second parameter will return a nil value if there is no target selected. For my purposes, this basically does the job of UnitIsUnit for checking to determine targeting matches AND limiting the valid matches to enemies only. This means that if I have an ally or nothing targeted then the dependency prevents spells/skills from being cast. This then guards against an edge case of two allied Players targeting each other (for whatever reason) and getting a complaint that I can't use Disengage on that target, or using the macro while targeting an allied NPC and getting a complaint that I can't attack that target (even though it would be the Pet attacking). I can do this because both Disengage and PetAttack are fundamentally "enemy only" uses of abilities that are not germane to use on allies.

So line 1 determines both if my target is targeting me AND if my target is hostile or friendly ... and if my target is targeting me and hostile will cast Disengage (if my Hunter is in melee range of my target, otherwise Disengage will fail to cast due to range) ... else nothing happens. Because line 1 contains Disengage in it, that then determines the tooltip and cooldown appearance of the hotbar icon. Line 2 puts my Pet into Passive stance. Lines 3 and 4 toggle switch Cower and Growl on my Pet. Line 5 is a "sanity check" for whether or not my Hunter has an enemy target selected, and if so send my Pet to attack that enemy using Dash or Dive regardless of tactical positioning or distance. If I'm switching aggro between my Hunter and my Pet, I want my Pet getting into melee range with my target to potentially Growl as fast as possible.

Incidentally, I was mildly surprised that the PetAttack(target) CastPetAction(6) combination appears to work just fine, and I suspect that there are no issues simply because commanding your Pet to attack your target does not invoke any global cooldowns, making it possible to "fall through" directly to the next call for an executable (in this case, slot 6 holding either Dash or Dive). I tested this macro on a hostile Ashenvale Wolf at beyond Bow range to see if my Pet would attack and use Dive correctly, which they did, so this functionality is tested and working at this point.

The purpose of the Disengage macro is to "change postures" on my Pet between Cower and Growl, with use of Disengage thrown in conditionally to help facilitate transfer of aggro from my Hunter to my Pet (when my Hunter would be the target of my target) but to NOT use Disengage when trying to transfer aggro from my Pet to my Hunter. The utility of this macro is that it allows my Hunter to switch from melee tanking to ranged spanking (and back again) whenever circumstances warrant it. This should make my melee tanking (Cower ON/Growl OFF) much more successful and versatile, since I'll be able to shed aggro onto my Pet (Disengage+Cower OFF/Growl ON), Bandage and then after I'm done bandaging, switch back into melee tanking (Cower ON/Growl OFF) using a single macro. Additionally, this macro can even be used while at range as a sort of (poor man's) "Kill Command" for my Pet to go into fast pursuit of a runner, or to attack from either a preset Stay position away from my Hunter or from Following at my side, regardless of range to target (due to the distance conditionals I've implemented on my Raptor Strike, Mongoose Bite and Counterattack macros to prevent use of Dash or Dive while within 10 yards of my target) with the intent of keeping the aggro on my Pet through use of Growl, instead of on my Hunter through use of Cower. This then lets me One Button Switch from being a Melee Hunter to being a (in my case) Bow Hunter with ease in situations where I don't necessarily want to Face Pull hostiles myself or need to keep distance between myself and my Pet.



I use Raziya's Follow and Stay macros for what amounts to secondary Pet controls, usually to prevent my Pet from "going rogue" to attack something I wasn't intending for them to attack. In both cases I substitute /run for /script again to keep the character count down, saving 3 characters per line and simply reserve slot 6 on the Pet Skills Bar for either Dash or Dive. These two macros are 107/255 and 207/255 characters respectively.

Quote

/run CastPetAction(10);
/run CastPetAction(2);
/run if UnitAffectingCombat("pet") then CastPetAction(6) end

 

Line 1 commands my Pet to go into Passive mode, so stop whatever you're doing Pet. Line 2 commands my Pet to Follow my Hunter without needing to edit in my Hunter's name. Lines 3 tests to see if my Pet is in Combat or not, and if so, to have my Pet cast Dash or Dive (in slot 6 of the Pet Skills Bar) to return to my Hunter at best possible speed.

Quote

/run if not UnitAffectingCombat("pet") then CastPetAction(3) end
/run if UnitIsUnit("target", "pet") then CastPetAction(3) elseif UnitAffectingCombat("pet") then CastPetAction(6) end
/run CastPetAction(10)

 

This is basically Raziya's Stay macro for Pets, which will tell them to Stay. If your Pet is not in combat, it tells your Pet to Stay where they are. If your Hunter is targeting your Pet, it tells them to Stay where they are also, allowing you to "park" your Pet in a particular spot, even in combat. But if you're NOT targeting your Pet and your Pet is in combat, then it will have them Dash/Dive in Passive mode back to the point you originally had them Stay at as a sort of Retreat From Combat to a preset location. The only meaningful change from Raziya's macro is that I'm assigning a specific Pet Skills slot to either Dash or Dive, in this case slot 6, so that I can tighten up the macro scripting by calling for a Skill slot instead of calling for a specific named pair of abilities from the Pet Spellbook.

Additionally, this also means that my Pet(s) have 3 of their 4 Skill slots taken up with Cower (4), Dash/Dive (6) and Growl (7) ... leaving only a single Skill slot open (5) for that particular Pet type's "signature" Skill. Since the vanilla Stable is extremely small, where you're never going have more than 2-3 Pets under any circumstances, this isn't really a problem, since a broad diversity of Pets isn't much of an issue. At the present time, I've still got my original Owl from atop Teldrassil, gained at Level 10, which is my mainline "all around" combat Pet for leveling ... but I also managed to find and Tame none other than Lupos in the past week, who I've now got at Loyalty 5. Both Owls and Wolves can Dash/Dive, so "reserving" a slot for these skills on "all" of the Pets I have isn't exactly an issue. I'm sure that once I reach Level 60 and have learned all of the Pet Skills and don't need to Tame anything else in vanilla, I'll almost certainly pick up a 3rd Pet which can also Dash or Dive, so again ... non-issue for me to reserve a Skill slot for this particular class of skill on all Pets. You can see all of this on the image of my Pet Skill Bar posted above.



I use this macro for Scare Beast, and it weighs in at 63/255 characters, which by the standards of what I've been writing about until now is positively petite.

Quote

/run CastPetAction(10);
/run CastPetAction(2);
/cast Scare Beast

 

Pretty straightforward here action here really. Line 1 puts my Pet into Passive mode. Line 2 commands my Pet to Follow my Hunter. Line 3 has my Hunter cast Scare Beast. This then coordinates my Pet such that they don't keep attacking any Beasts that I've Scared so as to protect against edge cases of having my Pet "accidentally" do damage to my target and break the Fear effect of Scare Beast prematurely.



Last but certainly not least is everyone's favorites ... Feign Death and Ice Trap, which really pair together in too many ways. Rather than combine these two into a single macro, I've simply made separate macros for each and then cleverly put them "functionally adjacent" to each other in terms of keybind locations on my hotbars so that I can easily invoke one or the other or both very simply/reliably. This Feign Death macro uses 77/255 characters.

Quote

/run if UnitAffectingCombat("player") then CastSpellByName("Feign Death") end

 

Line 1 determines if my Hunter is in Combat, and only if I'm in combat will Feign Death be used. This helps prevent "accidental" use of Feign Death out of combat when it shouldn't have been used, wasting the cooldown (and generally being a DERP move). If I really need to Feign Death while out of combat (for like a roleplay or something?) I'll just open my spellbook and cast it from the spellbook "manually" and very deliberately.



This is the macro I'll be using for Freezing Trap, modified from Raziya's Freezing Trap macro to remove the proximity distance conditional, and it costs 116/255 characters.

Quote

/run if UnitExists("pettarget") and UnitIsUnit("target", "pettarget") then CastPetAction(10) end
/cast Freezing Trap

 

Line 1 checks to determine if my Pet has a target at all, and if my Pet and my Hunter are sharing the same target. If my Pet and my Hunter share the same target then my Pet is put into Passive mode. Line 2 casts Freezing Trap after making sure that my Pet won't (keep) attack(ing) the target my Hunter has selected and break the Freezing Trap effect prematurely on the target I've got selected. This formulation then allows for a "directing traffic" situation where if my Pet is attacking something other than what I'm intending to Freeze, my Pet can keep right on attacking that target. This means that I need to have selected the target that I do want to Freeze in order to keep my Pet from attacking THAT target specifically. I agree with Raziya that it's by no means a perfect solution, but it's certainly better than nothing.



As you can see, an awful lot of the character count "crushing" on these macros has come from "standardizing" what Pet Skills I want to have on any (and every?) Pet that I Tame for use in combat, and where those skills will appear on the Pet Skills Bar. That then allows me to, in effect, be more flexible on casting spells by name at the expense of needing to cast spells by skill bar slot. Still, when you've got macros running over 200+ characters long, staying under 255/255 while being able to shoehorn in as much functionality as you need in a single macro can sometimes push you to make compromises outside the macro text itself. In this case I've opted for a "structural" response to the challenge of not having enough room to "name (spell) names" in my macros to fit them under the 255 character limit otherwise.

 

Made by Roxanne Flowers

 

Scorpid solver

Spoiler

Ok, let's take a look on something more complex.

I suppose anyone who played serious PvP \ TBC arenas understand that Broken Tooth is useless against heal classes, druid flag carrier and etc. Scorpids are the best in such situations. We all know that.

If you want a great PvP pet for some serious stuff - move to Durotar and tame Death Flayer. He's lvl 11 and he has only 30min timer. Use old "arena" build with Bestial Swiftness so your scorpid may chase any target.
Why Death Flayer?
That's why:
Image

All others scorpids have 2.0 attack speed. 1.6 attack speed is better for pushback spellcasts.

Okay, moving next.
Scorpids are way much harder to control, since their DoT must both protect ViperSting and not break our CC when it's need to be applied. Here comes absurdly insane macro to solve that problem:

Extension(requires SuperMacro):

function ScorpidSolver() class1 = UnitClass("mouseover"); class2 = UnitClass("target"); autocastable1, autostate1=GetSpellAutocast(A,"pet"); autocastable2, autostate2=GetSpellAutocast(B,"pet"); if ( ( ( class1 == "Druid" ) or ( class1 == "Shaman" ) or ( class1 == "Paladin" ) ) and ( autostate1==nil ) and ( autostate2==1 ) and ( UnitCanAttack("player","mouseover") ) ) then TogglePetAutocast(D); TogglePetAutocast(C); TargetUnit("mouseover");PetAttack();TargetLastTarget(); else if ( ( ( class1 == "Druid" ) or ( class1 == "Shaman" ) or ( class1 == "Paladin" ) ) and ( autostate1==nil ) and ( autostate2==nil ) and ( UnitCanAttack("player","mouseover") ) ) then TogglePetAutocast(D); TargetUnit("mouseover");PetAttack();TargetLastTarget(); else if ( ( ( class1 == "Druid" ) or ( class1 == "Shaman" ) or ( class1 == "Paladin" ) ) and ( autostate1==1 ) and ( autostate2==1 ) and ( UnitCanAttack("player","mouseover") ) ) then TargetUnit("mouseover");TogglePetAutocast(C);PetAttack();TargetLastTarget(); else if ( ( ( class1 == "Druid" ) or ( class1 == "Shaman" ) or ( class1 == "Paladin" ) ) and ( autostate1==1 ) and ( autostate2==nil ) and ( UnitCanAttack("player","mouseover") ) ) then TargetUnit("mouseover");PetAttack();TargetLastTarget(); else if ( ( ( not ( class1 == "Druid" ) ) and ( not ( class1 == "Shaman" ) ) and ( not ( class1 == "Paladin" ) ) ) and ( autostate1==1 ) and ( autostate2==nil ) and ( UnitCanAttack("player","mouseover") ) ) then TogglePetAutocast(D);TogglePetAutocast(C); TargetUnit("mouseover");PetAttack();TargetLastTarget(); else if ( ( ( not ( class1 == "Druid" ) ) and ( not ( class1 == "Shaman" ) ) and ( not ( class1 == "Paladin" ) ) ) and ( autostate1==1 ) and ( autostate2==1 ) and ( UnitCanAttack("player","mouseover") ) ) then TogglePetAutocast(D); TargetUnit("mouseover");PetAttack();TargetLastTarget(); else if ( ( ( not ( class1 == "Druid" ) ) and ( not ( class1 == "Shaman" ) ) and ( not ( class1 == "Paladin" ) ) ) and ( autostate1==nil ) and ( autostate2==nil ) and ( UnitCanAttack("player","mouseover") ) ) then TargetUnit("mouseover"); TogglePetAutocast(C); PetAttack(); TargetLastTarget(); else if ( ( ( not ( class1 == "Druid" ) ) and ( not ( class1 == "Shaman" ) ) and ( not ( class1 == "Paladin" ) ) ) and ( autostate1==nil ) and ( autostate2==1 ) and ( UnitCanAttack("player","mouseover") ) ) then TargetUnit("mouseover"); PetAttack(); TargetLastTarget(); else if ( ( ( class2 == "Druid" ) or ( class2 == "Shaman" ) or ( class2 == "Paladin" ) ) and ( autostate1==nil ) and ( autostate2==1 ) and ( UnitCanAttack("player","target") ) ) then TogglePetAutocast(D);TogglePetAutocast(C);PetAttack(); else if ( ( ( class2 == "Druid" ) or ( class2 == "Shaman" ) or ( class2 == "Paladin" ) ) and ( autostate1==nil ) and ( autostate2==nil ) and ( UnitCanAttack("player","target") ) ) then TogglePetAutocast(D);PetAttack(); else if ( ( ( class2 == "Druid" ) or ( class2 == "Shaman" ) or ( class2 == "Paladin" ) ) and ( autostate1==1 ) and ( autostate2==1 ) and ( UnitCanAttack("player","target") ) ) then TogglePetAutocast(C);PetAttack(); else if ( ( ( class2 == "Druid" ) or ( class2 == "Shaman" ) or ( class2 == "Paladin" ) ) and ( autostate1==1 ) and ( autostate2==nil ) and ( UnitCanAttack("player","target") ) ) then PetAttack(); else if ( ( ( not ( class2 == "Druid" ) ) and ( not ( class2 == "Shaman" ) ) and ( not ( class2 == "Paladin" ) ) ) and ( autostate1==1 ) and ( autostate2==1 ) and ( UnitCanAttack("player","target") ) ) then TogglePetAutocast(D); PetAttack(); else if ( ( ( not ( class2 == "Druid" ) ) and ( not ( class2 == "Shaman" ) ) and ( not ( class2 == "Paladin" ) ) ) and ( autostate1==1 ) and ( autostate2==nil ) and ( UnitCanAttack("player","target") ) ) then TogglePetAutocast(D); TogglePetAutocast(C);PetAttack(); else if ( ( ( not ( class2 == "Druid" ) ) and ( not ( class2 == "Shaman" ) ) and ( not ( class2 == "Paladin" ) ) ) and ( autostate1==nil ) and ( autostate2==nil ) and ( UnitCanAttack("player","target") ) ) then TogglePetAutocast(C);PetAttack(); else if ( ( ( not ( class2 == "Druid" ) ) and ( not ( class2 == "Shaman" ) ) and ( not ( class2 == "Paladin" ) ) ) and ( autostate1==nil ) and ( autostate2==1 ) and ( UnitCanAttack("player","target") ) ) then PetAttack(); else PetAttack(); end end end end end end end end end end end end end end end end end;

Call:

Quote

/script ScorpidSolver();


-----------------------------------------------------------------------------------------------------------------------------------
How to set this stuff:
Image
A - index of Scorpid Poison in pet's spellbook. In my case it's 6.
B - index of Claw in pet's spellbook. In my case it's 2.

Image
C - index of Claw at the PetAuctionBar. In my case it's 4.
D - index of Scorpid Poison at the PetAuctionBar. In my case it's 6.

Replace all variables in extension to set it on.
------------------------------------------------------------------------------------------------------------------------------------
Summary:
-If mouseover exists pet will attack mousover. Otherwise it will attack target.
-If current pet target is a druid, shaman or paladin - claw will be set off and scorpid poison will be set on(we set off claw because it has bigger autocast priority and because all we need is as much stacks as possible). Otherwise - the reverse: claw will be set on and scorpid poison will be set off.

##################################################################################
Okay, we have a great protection from dispel. Dispeller must dispel annoying stacks, he must waste his GCDs and waste mana for dispel, otherwise he'll lose all his mana because of Viper Sting. So now we need some Viper Sting plague, something smart and convenient.

Extension(requires SuperMacro):

function ViperStingSolver() x1=UnitMana("mouseover"); x2=UnitMana("target"); x3=UnitMana("player");if ( (UnitCanAttack("player","mouseover") ) and (x1>700) and (x3>=206) ) then TargetUnit("mouseover");CastSpellByName("Viper Sting(Rank 3)");TargetLastTarget(); else if ( (UnitCanAttack("player","mouseover") ) and (x1<=700) and (x1>500) and (x3>=168) ) then TargetUnit("mouseover");CastSpellByName("Viper Sting(Rank 2)");TargetLastTarget(); else if ( (UnitCanAttack("player","mouseover") ) and (x1<=500) and (x3>=129) ) then TargetUnit("mouseover");CastSpellByName("Viper Sting(Rank 1)");TargetLastTarget(); else if ( (UnitCanAttack("player","target") ) and (x2>700) and (x3>=206) ) then CastSpellByName("Viper Sting(Rank 3)"); else if ( (UnitCanAttack("player","target") ) and (x2<=700) and (x2>500) and (x3>=168) ) then CastSpellByName("Viper Sting(Rank 2)"); else CastSpellByName("Viper Sting(Rank 1)"); end end end end end end;

Call:

Quote

/script ViperStingSolver();


Macro by Issir

 

Aspect dance

Spoiler

PvP edition (requires SuperMacro):

Extension:

function AspectDance() a = buffed("Aspect of the Hawk", 'player'); b = buffed("Aspect of the Cheetah", 'player') and ( buffed("Polymorph",'player') or buffed("Frost Nova",'player') or buffed("Fear",'player') or buffed("Seduction",'player') or buffed("Death Coil",'player') or buffed("Physic Scream",'player') or buffed("Bash",'player') or buffed("Feral Charge",'player') or buffed("Cheap Shot",'player') or buffed("Kidney Shot",'player') or buffed("Sap",'player') or buffed("Blind",'player') or buffed("Gouge",'player') or buffed("Scatter Shot",'player') or buffed("Freezing Trap",'player') or buffed("Hammer of Justice",'player') or buffed("Charge Stun",'player') or buffed("Intercept Stun",'player') or buffed("Improved Concussive Shot",'player')); start, duration, enabled = GetSpellCooldown("21", "spell"); if a then cast("Aspect of the Cheetah") else if b then CancelBuff("Aspect of the Cheetah") else if buffed("Aspect of the Cheetah", 'player') and ( duration > 0 ) then CancelBuff("Aspect of the Cheetah") else cast("Aspect of the Hawk") end end end end;

Call:

Quote

/script AspectDance();


Macro by Issir

 

Warlock macros

 

Pet macros

Spoiler

Pet bar macro (the skills are 1,2,3,4,5 from left to right)

Quote

/script CastPetAction(5);

 

Pet attack

Quote

/script PetAttack()

 

Passive pet

Quote

/script PetPassiveMode();

 

Pet follow

Quote

/script PetFollow();

 

Toggle Autocast (the skills are 1,2,3,4,5 from left to right)

Quote

/script TogglePetAutocast(5)

 

Rename demon

Quote

/script PetAbandon();

 

 

Life Tap/Demon Armor

Spoiler

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Shadow_RagingScream" then x=1 end i=i+1 end if x==0 then CastSpellByName("Demon Armor") else CastSpellByName("Life Tap")end

 

Drain Soul

Spoiler

Drain Soul, pet passive, delete Soul Shard

Quote

/cast Drain Soul(Rank 1)
/run PetPassiveMode()local a=GetBagName(4); if a=="Core Felcloth Bag" or a=="Felcloth Bag" or a=="Soul Pouch" or a=="Box of Souls" or a=="Small Soul Pouch" then PickupContainerItem(4,GetContainerNumSlots(4))DeleteCursorItem()end

 

Replace X in the macro with your current version of Drain Soul

Quote

/cast Drain Soul(Rank X)
/run local a=GetBagName(4); if a=="Core Felcloth Bag" or a=="Felcloth Bag" or a=="Soul Pouch" or a=="Box of Souls" or a=="Small Soul Pouch" then PickupContainerItem(4,GetContainerNumSlots(4)) DeleteCursorItem()end

 

Improved Drain Soul spirit regeneration bonus without competing with pet or having to manually call him off. Keeps him on another target if juggling multiple enemies too.  

Quote

/run CastSpellByName("Drain Soul(Rank 1)") if UnitIsUnit("playertarget","pettarget") then PetPassiveMode() end

 

Drain Soul, pet passive if pet has player target, delete Soul Shard (edit Soul Pouch)

Quote

/run CastSpellByName("Drain Soul(Rank 1)") if (UnitIsUnit("playertarget", "pettarget")) then PetPassiveMode()end
/run if GetBagName(4)=="Soul Pouch" then PickupContainerItem(4,GetContainerNumSlots(4))DeleteCursorItem()end

 

Drain Soul rank based on target health and player mana

Quote

/run if (UnitHealth("target") < 20 || UnitMana("player")) < 1000 then CastSpellByName("Drain Soul(Rank 1)") else CastSpellByName("Drain Soul")end

 

Simple Drain Macro, recalls your pet so DS finishes the target (use pre lvl 20)

Quote

/cast Drain Soul(Rank 1)
/script CastPetAction(2)

 

 

Fear

Spoiler

Spammable fear with stopcasting (# being the id of the action bar where you put Fear)

Quote

/script if GetUnitName("target")==nil then TargetNearestEnemy() end
/script if not IsCurrentAction(#) then SpellStopCasting() end;
/cast Fear(Rank 3)

 

Fear with stop casting

Quote

/script SpellStopCasting()
/cast Fear

 

 

All in one pet spells

Spoiler

Fire Shield, or Devour Magic if friendly target, else Sacrifice, Seduce target, or Devour Magic self

Quote

/run if UnitIsFriend("player", "target")then CastSpellByName("Devour Magic")CastSpellByName("Fire Shield")else CastSpellByName("Sacrifice")CastSpellByName("Seduction") CastSpellByName("Devour Magic",1)end

 

Cast the pet skill that is available if target, if no target pet follows you and casts the pet skill that is available on you

Quote

/run if(UnitExists("target")) then CastSpellByName("Devour Magic")CastSpellByName("Sacrifice")CastSpellByName("Seduction")CastSpellByName("Fire Shield")else PetFollow() CastSpellByName("Devour Magic",1)CastSpellByName("Sacrifice")end

 

Devour magic

Spoiler

Self dispel without losing target

Quote

/run CastSpellByName('Devour Magic', 1)

 

Casts devour magic on your self if target is hostile

Quote

/run if UnitExists("pettarget")==1 then if UnitIsFriend("player","pettarget") then CastSpellByName("Devour Magic") else CastSpellByName("Devour Magic", 1)end else TargetLastEnemy()end 

 

Casts Devour Magic on the target, or on mouseover target (without losing current target)

Quote

/run c=CastSpellByName s="Devour Magic(Rank 4)" if IsShiftKeyDown() then c(s,1) else if UnitExists("mouseover") then TargetUnit("mouseover") c(s) TargetLastTarget() else c(s) end end

 

Cast as normal if friendly target, else self cast

Quote

/script c=CastSpellByName t=UnitExists f=UnitIsFriend if t("target") and not f("player", "target") then c("Devour Magic", 1) elseif not t("target") then c("Devour Magic", 1) else c("Devour Magic") end;

 

 

Mob tagging

Spoiler

Named mob tagging

Quote

/script ClearTarget();
/target Verog
/run for z=1,172 do if IsAttackAction(z)then if not IsCurrentAction(z)then UseAction(z);end;end;end;
/cast Shadowburn

 

Tagging closest mob

Quote

/script ClearTarget();
/run TargetNearestEnemy()
/run for z=1,172 do if IsAttackAction(z)then if not IsCurrentAction(z)then UseAction(z);end;end;end;
/cast Shadowburn

 

Macro by Lighthammer

 

Snare melee classes and Curse of Shadow everyone else

Spoiler

/run local c,u=CastSpellByName,UnitClass('target') if u == 'Druid' then c('Curse of Shadow') elseif UnitPowerType('target') ~= 0 or u == 'Paladin' then c('Curse of Exhaustion') else c('Curse of Shadow') end

 

Curse of Tongues

Spoiler

Curse of Tongues if target got mana, else Curse of Weakness

Quote

/run if (UnitMana("target")>0) then CastSpellByName("Curse of Tongues") else CastSpellByName("Curse of Weakness") end

 

 

Summon/Sacrifice Voidwalker

Spoiler

/cast Fel Domination
/cast Summon Voidwalker(Summon)
/cast Sacrifice(Rank 6)

 

Soul Fire/CoE

Spoiler

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Shadow_ChillTouch" then x=1 end i=i+1 end if x==0 then CastSpellByName("Curse of the Elements") else CastSpellByName("Soul Fire") end

 

Shadow bolt

Spoiler

Life tap when low on mana, else Shadowbolt.

Quote

/run if UnitMana("Player") < 500 then CastSpellByName("Life Tap")end
/cast Shadow Bolt

 

Curse of Shadow, else Shadow Bolt

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Shadow_CurseOfAchimonde" then x=1 end i=i+1 end if x==0 then CastSpellByName("Curse of Shadow") else CastSpellByName("Shadow Bolt")end

 

Curse of the Elements, else Shadow Bolt

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Shadow_ChillTouch" then x=1 end i=i+1 end if x==0 then CastSpellByName("Curse of the Elements") else CastSpellByName("Shadow Bolt")end

 

Curse of Recklessness, else Shadow Bolt

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Shadow_UnholyStrength" then x=1 end i=i+1 end if x==0 then CastSpellByName("Curse of Recklessness") else CastSpellByName("Shadow Bolt")end

 

 

Dot rotation

Spoiler

Spell_Shadow_AbominationExplosionSpell_Shadow_CurseOfSargerasSpell_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

Quote

/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

Quote

/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

Quote

/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)

Quote

/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])

 

 

1 button Dots

Spoiler

Castsequence Siphon Life, CoA, Corruption, Immolate

Quote

/run local _gspells = { "Siphon Life", "Curse of Agony", "Corruption", "Immolate"} if GetSpellCooldown(4,"BOOKTYPE_SPELL")==0 then _gi=_gi and _gi > 0 and _gi or 1 CastSpellByName(_gspells[_gi]) _gi = math.mod(1+_gi, 1+table.getn(_gspells))end

 

1 button Dots (SuperMacro)

Quote

/script if not buffed("Corruption", 'target') then cast("Corruption") else if not buffed("Curse of Agony", 'target') then cast("Curse of Agony") else if not buffed("Immolate",'target') then cast("Immolate") end end end

 

 

One Button PET ATTACK / FOLLOW / SWITCH TARGET

Spoiler

One Button PET ATTACK / FOLLOW / SWITCH TARGET (Replace YouNameHere, which is featured twice in the script, with your in game name)

Quote

/run if UnitExists("target") then if a==0 then PetAttack() a=1 else if UnitExists("pettarget") and UnitIsUnit("target", "pettarget") then PetFollow("YourNameHere") a=0 else PetAttack() end end else PetFollow("YourNameHere") a=0 end

 

 

Ritual of Summoning

Spoiler

Ritual of Summoning and emote "Summoning %t" if friendly target, else Banish

Quote

/run if UnitIsFriend("player", "target") then SendChatMessage("Summoning %t" ,"emote") CastSpellByName("Ritual of Summoning") else CastSpellByName("Banish")end

 

Summoning macro

Quote

/script local a = " - 2 people pls click the portal."; local b = UnitName("target"); if (GetNumRaidMembers() > 0) then SendChatMessage("Summoning "..b..a, "RAID"); else SendChatMessage("Summoning "..b..a, "PARTY"); end
/cast Ritual of Summoning

 

Ritual of Summoning, and say who you Summon

Quote

/say Summoning %t
/cast Ritual of Summoning

 

 

Healthstone

Spoiler

Use any Healthstone/Healing Potion

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Healthstone") or strfind(n,"Healing Potion"))then UseContainerItem(b,s,1)end end end

 

Healthstone, else healing potion. Put stone and pot in two different slots, then activate them using the macro. (replace `#` with slot id)

Quote

/run stoneId=# potId=# if IsUsableAction(stoneId) and GetActionCooldown(stoneId) == 0 then UseAction(stoneId) else UseAction(potId) end

 

If Healthstone is on cooldown it uses healing pot, else it uses healthstone. Substitute "slotOfHealthstone" with the numerical slot ID in your actionbar. (SuperMacro)

Quote

/script if (GetActionCooldown(slotOfHealthstone) ~= 0) then use("Healing Potion") else use("Minor Healthstone") end

 

Trade Healthstone

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s) do local n=GetContainerItemLink(b,s) if n and string.find(n,"Healthstone") then PickupContainerItem(b,s); DropItemOnUnit("target"); AcceptTrade(); break; end; end; end;

 

Trade healthstone

Quote

/run for i=0,4 do for x=1,GetContainerNumSlots(i) do y=GetContainerItemLink(i,x) if y then if GetItemInfo(y)=="Healthstone" then PickupContainerItem(i,x); DropItemOnUnit("target"); return; end end end end

 

 

Imp Fire Shield

Spoiler
Quote

/run local c=CastSpellByName if UnitExists("target")then c("Fire Shield")else TargetUnit("player")c("Fire Shield")end ClearTarget()

else I'd recommend using TargetLastTarget() instead of ClearTarget() at the end

 

Buffing made easy

Spoiler

Lua:

function WarlockBuff()
  __bufflist={"Unending Breath","Detect Greater Invisibility"}
  if not buffed("Demon Armor","player") then CastSpellByName("Demon Armor") end
  if __buff==nil then __buff=0 end
  __buff=__buff+1
  if __buff>getn(__bufflist) then __buff=1 end
  CastSpellByName(__bufflist[__buff])
end

Macro:

Quote

/run WarlockBuff()

 

 

SynCurse

Spoiler

Macro thanks to Synek, that allows to Sync up your curses to allways apply the highest priority first.
Removing the hassle with curse assignments. *Does Require SuperMacro

Extended lua:

Spoiler

function SynCurse()
                                            --Essences can be converted (between 3 lesser and 1 greater instantly while in combat without initiating the global cooldown.
                                            --These will be used to track the current state. There are 4 states: CoR, CoS, CoE, and default.
                                                                --Essence type 1 to be used for CoR state, using slots 61 and 62 on my action bars.
                                                                --Essence type 2 to be used for CoS state, using slots 65 and 66 on my action bars.
                                                                --Essence type 3 to be used for CoE state, using slots 69 and 70 on my action bars.
 
    if (IsUsableAction(61) == 1) then                           --Checking for CoR state
        SynCurse_Corbolt()
    elseif (IsUsableAction(65) == 1) then                       --Checking for CoS state
        SynCurse_Cosbolt()
    elseif (IsUsableAction(69) == 1) then                       --Checking for CoE state
        SynCurse_Coebolt()
    elseif (not buffed("Curse of Recklessness", "Target")) then --default state, start checking for missing curses. State change when a curse is found missing and cast.
        UseAction(62)                                           --CoR state 'on'
        UseAction(65)                                           --CoS state 'off'
        UseAction(69)                                           --CoE state 'off'
        CastSpellByName("Curse of Recklessness")
        --print("Casting CoR")
    elseif (not buffed("Curse of Shadow", "Target")) then
        UseAction(61)
        UseAction(66)
        UseAction(69)
        CastSpellByName("Curse of Shadow")
        --print("Casting CoS")
    elseif (not buffed("Curse of the Elements", "Target")) then
        UseAction(61)
        UseAction(65)
        UseAction(70)
        CastSpellByName("Curse of the Elements")
        --print("Casting CoE")
    else
        CastSpellByName("Shadow Bolt")                          --cast shadow bolt if you are in default state after checking for all curses
        SynCurse_Reset()                                        --reset to default state just in case
    end
end
 
 
function SynCurse_Corbolt()
    if (not buffed("Curse of Recklessness", "Target")) then
        SynCurse_Reset()                                        --if the curse was resisted or failed to apply after casting then return to default state
    else
        CastSpellByName("Shadow Bolt")
    end
end
 
 
function SynCurse_Cosbolt()
    if (not buffed("Curse of Shadow", "Target")) then
        SynCurse_Reset()
    else
        CastSpellByName("Shadow Bolt")
    end
end
 
 
function SynCurse_Coebolt()
    if (not buffed("Curse of the Elements", "Target")) then
        SynCurse_Reset()
    else   
        CastSpellByName("Shadow Bolt")
    end
end
 
 
function SynCurse_ResetCheck()                                  --return to default state on dropping combat, dropping target, or changing target
    if ((not UnitAffectingCombat("player")) or (UnitName("target") == nil)) then
        SynCurse_Reset()
    end
   
    TargetLastTarget()                                          --target previous target
   
    if (UnitIsUnit("Player", "Target") == 1) then               --if current target is me then target previous target
        TargetLastTarget()
    else                                                        --otherwise set previous target as me and reset to default state
        TargetLastTarget()
        TargetByName("Synek", true)
        TargetLastTarget()
        SynCurse_Reset()
    end
end
 
 
function SynCurse_Reset()                                       --resets essences to default state, setting all other states to 'off'
    UseAction(61)
    UseAction(65)
    UseAction(69)
end

 

Macro:

Quote

/run SynCurse()

 

--TO DO:

--1) Resetting on target swap can still not working perfectly

--2) Change cor state to coe state + cos state to reduce required number of action bar slots

--3) Add intelligent use of lifetap, major mana pots, and dark/demonic runes

--4) Add SynBuff functionality when out of combat

 

https://pastebin.com/dTWwkre4

 

Mouseover and one-button-macro

Spoiler

You will need the SuperMacro addon for this to work

 

Mouseover pet attack macro:

Quote

/run m="mouseover" if UnitExists(m) and UnitReaction(m,"player")<5 then TargetUnit(m) PetAttack() TargetLastTarget() else PetAttack() end

 

Onebutton macro for pet attack on mouseover target, CoA, Corruption and wanding. In the SuperMacro frame, type this into the "Enter Macro Commands:"

Quote

/run DotItUp()

Copy & paste this into the right editbox (Extended LUA code)

function DotItUp()
  m="mouseover"
  t="target"
  p="player"
  if UnitExists(m) and UnitReaction(m,p) < 5  then
    TargetUnit(m) PetAttack() else TargetNearestEnemy() PetAttack() end
  if not buffed("Curse of Agony",t) then 
    CastSpellByName("Curse of Agony") 
  else if not buffed("Corruption",t) then 
    CastSpellByName("Corruption") else 
    CastSpellByName("Shoot") 
    end
  end
end

It will target the mob you're hovering the cursor over, or if you just spam it mindlessly it will target the nearest attackable target (use with caution..)

 

If you use Drain Soul to finish off mobs (and get that Mana regen buff) you will sooner or later end up with Soul Shards just about everywhere - and if you don't have a Soul Pouch you can't easily fix this. But fear not! This macro/script will sort all your shards into the leftmost bag, it will also delete the shard in the last slot of the 4th bag so it will never overflow from that bag. But beware - it's quite stupid - don't keep any epics in bag #4, it will silently destroy them too.

Macro command:

Quote

/cast Drain Soul
/run SoulSorter()
/run PickupContainerItem(4,GetContainerNumSlots(4)) DeleteCursorItem()

LUA code

function SoulSorter()
  for bag=0,4,1 do 
    for slot=1,GetContainerNumSlots(bag),1 do 
      local name=GetContainerItemLink(bag,slot) 
      if name and string.find(name,"Soul Shard") then
        PickupContainerItem(bag,slot) 
        PutItemInBag(ContainerIDToInventoryID(4)) 
      end
    end
  end
end

 

Made by Televinken

 

One hand leveling

Spoiler

Hello my dear friends, Warlocks!

I am also levelling a warlock and as you all know, levelling takes a long time in vanilla...
So we have to spam our dots again and again. Also managing pet. It's like a piano :)

I am a lazy person and I wanted to make my life simple, so I decided to write a macro which automatically selects a target if it is not selected, sends a pet at this target, cast all the dots and than drains life. All in one macro.

At first I wanted to use /castsequesnce but than I realised that this command is not present in wow 1.12

So I had to use /script.

The macro is very long, so you need to download and install addon - supermacro to be able to use it.

Than go in game and write /macro

You will see a supermacro window. Create there new supermacro and copy this macro and save.

1. Macro for affliction warlocks with Siphon Life:
 

Quote

/script if (UnitName('target') == nil) then TargetNearestEnemy() PetAttack(target) else if not buffed("Curse of Agony", 'target') then PetAttack(target) cast("Curse of Agony") else if not buffed("Corruption", 'target') then cast("Corruption") else if not buffed("Siphon Life", 'target') then cast("Siphon Life") else if not buffed("Drain Life", 'target') then cast("Drain Life") end end end end end



2. Macro for demo warlocks without:
 

Quote

/script if (UnitName('target') == nil) then TargetNearestEnemy() PetAttack(target) else if not buffed("Curse of Agony", 'target') then PetAttack(target) cast("Curse of Agony") else if not buffed("Corruption", 'target') then cast("Corruption") else if not buffed("Immolate", 'target') then cast("Immolate") else if not buffed("Drain Life", 'target') then cast("Drain Life") end end end end end



I have the following setup:

1. I bound Life Tap spell for Mouse Wheel Scroll Up
1. I bound "lazy macro" for Mouse Wheel Scroll Down


All you need to do after this is:

1. Scroll your mouse down - until all dots are up.
2. Scroll your mouse up - to do 1 life tap
3. Scroll you mouse down - it will check if all the dots are still up and will drain life

Very helpful :) You can really play with 1 hand :)

There is one hint - use this macro only in solo play, because in a group or in raid, if you have second warlock, macro will count his dots as yours, as it is not possible to see if this dot was cast by you.

P.S. in future I want to extend this macro so it is really 1 button macro. I want to include 1 more check: if all the dots are up and if you health is > than 90% automatically do life tap and than Life tap. I'll update this thread with a new version of macro if you will have interest.


Hope this was helpful. Wish you faster levelling and better drops. See you around.

 

Made by DieselPower

 

 Warrior macros  

 

Sharpening Stone

Spoiler

Enchant any sharpening stone to mainhand, offhand if shift keybind

Quote

/run for b=0,4 do for s=1,18 do local i=GetContainerItemLink if not(i(b,s)==nil)then if strfind(i(b,s), "Sharpening Stone")then  p=PickupInventoryItem UseContainerItem(b,s)if IsShiftKeyDown()then p(17)else p(16)end ReplaceEnchant()end end end end

 

 

KTM Sunder Armor

Spoiler

The mod has a slight problem with Sunder Armor. The difficulty is that no message comes up in the combat log to tell when sunder has been cast. At present, the mod instead detects when you have pressed sunder armor from your action bars, then gives you a sunder. It then checks for sunder fail messages, e.g. "Your Sunder Armor was parried by x." or "not enough rage" messages, etc. If you are just using a sunder button, the mod will work fine, so stop reading!

The point is, the mod can't tell when you cast Sunder inside a macro. If you are using a macro to cast sunder, the mod will only be able to detect the events where sunder fails (e.g. is on the cooldown, or not enough rage, etc). As a result, your threat will be large and negative if you tend to spam the button. So you have to modify your macros slightly to tell the mod you are casting sunder.

In general:

Quote

/script CastSpellByName("Sunder Armor")
or
/cast Sunder Armor


becomes

Quote

/script KLHTM_Sunder()



e.g. suppose your macro was previously the following, to cast revenge, and if not sunder armor:

Quote

/cast Revenge
/cast Sunder Armor


the new version would be

Quote

/cast Revenge
/script KLHTM_Sunder()



Or suppose you used this macro to cast shield slam or sunder:

Quote

/script if UnitMana("player") > 19 then CastSpellByName("Shield Slam") else CastSpellByName("Sunder Armor") end


The new macro would be

Quote

/script if UnitMana("player") > 19 then CastSpellByName("Shield Slam") else KLHTM_Sunder() end


 

 

Battle Shout

Spoiler

Battle Shout, else Heroic Strike

Quote

/run local z=0 for i=1,27 do t=UnitBuff("player",i) if (t and string.find(t,"BattleShout")) then z=1 break end end if z==1 then CastSpellByName("Heroic Strike") else CastSpellByName("Battle Shout") end

 

Battle shout if not active

Quote

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

 

 

Demoralizing Shout

Spoiler

Cast Bloodrage if you have less then 10 rage, else demo shout

Quote

/script if UnitMana("Player")>=10 then CastSpellByName("Demoralizing Shout"); else CastSpellByName("Bloodrage"); end;

 

 

Bloodthirst

Spoiler

Bloodthirst

Quote

/run if not IsCurrentAction(24) then UseAction(24) end;
/run CastSpellByName("bloodthirst")

 

Prioritize BT  over execute when AP breaks 2k (change if BTDmg to 820 if you don't use imp exe)

Quote

/script local a,b,c=UnitAttackPower("player"); local AP=a+b+c; local BTDmg=AP*0.45; if BTDmg>=900 and UnitMana("player")>=30 then CastSpellByName("Bloodthirst") end
/cast execute

 

Bloodthirst/Execute (SuperMacro)

Quote

/script base, posBuff, negBuff = UnitAttackPower("player");
/script effective = base + posBuff + negBuff;
/script if UnitMana("player") >= 30 and effective >= 2000 then DoOrder("Bloodthirst","Execute") else CastSpellByName("Execute") end

 

 

Charge

Spoiler

Charge

Quote

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Charge"); else CastSpellByName("Battle Stance()"); end;

 

Intercept if combat, else Charge

Quote

/run if  not UnitAffectingCombat("player")then CastSpellByName("Battle Stance")else CastSpellByName("Berserker Stance")end
/cast Intercept
/cast Charge

 



OverPower

Spoiler

OverPower

Quote

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Overpower"); else CastSpellByName("Battle Stance()"); end;

 

Smart OverPower (SuperMacro, WHUD)

Quote

/run if not OnCooldown("Overpower") and WHUD_Overpower_IsUseable() and MyRage() <15 and MyStance() ~= 1 then StanceCast("Battle Stance") else cast("Overpower") end

 

Better OverPower for PVE (MacroToolTip)

Quote

/setspelltooltip Overpower
/script texture,name,isActive = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Overpower"); end
/run local start, duration, enabled = GetSpellCooldown(32, BOOKTYPE_SPELL) if duration - ( GetTime() - start) > 1.5 then CastSpellByName("Battle Stance") else cast("Bloodthirst");end

 



Sunder on sheep

Spoiler

/cast sunder armor
/script ClearTarget();

 

Intercept

Spoiler

Intercept

Quote

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Intercept"); else CastSpellByName("Berserker Stance()"); end;

 

Casts berserker stance if intercept is off cooldown, i have more than 10 rage, and my target further than 8 yards

Quote

/run local s,d=GetSpellCooldown(40, BOOKTYPE_SPELL) if d~=30 and IsActionInRange(56)==1 and (UnitMana("player")>=10)then CastSpellByName("Berserker Stance")end

 

This macro will use the appropriate ability and change stances depending if youre in or out of combat.

Quote

/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

 

Charge/Intercept

Spoiler

function Smitcharge()
if not InCombat() and not InMeleeRange() and not OnCooldown("Charge") then
      if MyStance() ~= 1 then StanceCast("Battle Stance"); end
      cast("Charge")
    elseif (CooldownTime("Charge")==0 or CooldownTime("Charge")>2) and not InMeleeRange() and not OnCooldown("Intercept") then
      if (MyRage() < 8 and not OnCooldown("Bloodrage") ) or MyRage() >= 8 then
       if not InMeleeRange() then StanceCast("Berserker Stance"); end
       if not InMeleeRange() and MyRage() < 8 then cast("Bloodrage") end
       if not InMeleeRange() then cast("Intercept") ;end
      end
    end
  end

Macro:

Quote

/run Smitcharge()

 

 


Thunderclap

Spoiler

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Thunder Clap"); else CastSpellByName("Battle Stance()"); end;


Whirlwind

Spoiler

Whirlwind

Quote

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Whirlwind"); else CastSpellByName("Berserker Stance()"); end;

 

Casts berserker stance if whirlwind is off cooldown, i have more than 25 rage, and my target is within 8 yards

Quote

/run local s,d=GetSpellCooldown(46, BOOKTYPE_SPELL) if d~=10 and CheckInteractDistance("target", 3)and (UnitMana("player")>=25)then CastSpellByName("Berserker Stance")end

 


Sit

Spoiler

If not enraged /sit else /stand

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if string.find(UnitBuff("player",i),"Spell_Shadow_UnholyFrenzy")then x=1 end i=i+1 end if x==1 then DoEmote("STAND")end if x==0 then SpellStopCasting() DoEmote("SIT")end

 

 

Bloodrage

Spoiler

Bloodrage + cancel buff

Quote

/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")

 

 

BerserkerRage

Spoiler

BerserkerRage

Quote

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Berserker Rage"); else CastSpellByName("Berserker Stance()"); end;

 

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.

Quote

/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

 


Mocking blow

Spoiler

Mocking blow/Battle Stance

Quote

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Mocking Blow"); else CastSpellByName("Battle Stance()"); end;

 

Mocking Blow/LIP potion

Spoiler

function MBLIP()
    if not MBLIPFRAME then
        MBLIPFRAME = CreateFrame('FRAME');
        MBLIPFRAME:RegisterEvent('CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS');
        MBLIPFRAME:RegisterEvent('CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE');
        MBLIPFRAME:SetScript('OnEvent', function ()
            if arg1 == (UnitName('target') or '') .. ' is afflicted by Mocking Blow.' then
                MBLIPTS = GetTime()
            elseif arg1 == 'You gain Invulnerability.' then
                MBLIPTS = nil
            end
        end)
    end
    if (not MBLIPTS) or (GetTime() > MBLIPTS + 2) then
        local _, _, battle = GetShapeshiftFormInfo(1);
        if battle then
            cast('Mocking Blow');
        else
            cast('Battle Stance');
        end
    else
        use('Limited Invulnerability Potion');
    end
end

Macro:

Quote

/run MBLIP()

 

 


Disarm

Spoiler

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(2); if isActive then CastSpellByName("Disarm()"); else CastSpellByName("Defensive Stance()"); end;



Universal interupt

Spoiler

Pummel and Shieldbash in same button

Quote

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Pummel"); else CastSpellByName("Shield Bash()"); end;

 


Taunt

Spoiler

Taunt

Quote

/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(2); if isActive then CastSpellByName("Taunt"); else CastSpellByName("Defensive Stance()"); end;

 

Taunt your current target if it does not target you

Quote

/run if not UnitIsUnit('player', 'targettarget') then CastSpellByName('Taunt'); end

 



PanicButton

Spoiler

PanicButton (no need to use full name of items)

Quote

/run for b=0,4 do for s=1,GetContainerNumSlots(b,s)do local n=GetContainerItemLink(b,s)if n and (strfind(n,"Quel") or strfind(n,"Draconian"))then PickupContainerItem(b,s)EquipCursorItem(16, 17)end end end
/cast Defensive Stance
/cast Shield Wall

 

PanicButton (SuperMacro)

Quote

/eq [Quel'Serrar]
/eq [Draconian Deflector]
/cast defensive stance
/cast shield wall

 



Berserker stance 

Spoiler

Berserker stance if you are in combat, else Cast Charge

Quote

/run if UnitAffectingCombat("player") then CastSpellByName("Berserker Stance"); else CastSpellByName("Charge"); end;

 



Battle/Berserker stance

Spoiler

Will change you to zerk or battlestance depending on your combat situation

Quote

/run if UnitAffectingCombat("player") then CastSpellByName("Berserker Stance"); else CastSpellByName("Battle Stance"); end;

 

 

Intercept/Battle Stance

Spoiler

Intercept if combat, else Battle Stance

Quote

/run if UnitAffectingCombat("player") then CastSpellByName("Intercept"); else CastSpellByName("Battle Stance"); end;

 

 

Utility

Spoiler

Berserker Rage:

Quote

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Berserker Rage"); else CastSpellByName("Berserker Stance"); end;

What this macro does, is that it change your current stance to Berserker Stance regardless of which stance you are and it will cast Berserker Rage. (Note: You have to press it twice)

 

Charge:

Quote

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Charge(Rank 3)"); else CastSpellByName("Battle Stance"); end;
/script if not IsCurrentAction(36) then UseAction(36) end;

This macro will swap your stance to Battle Stance regardless of which stance you are in and it will cast Charge if the charge ability conditions are met. (Note: You have to press it twice)
Also the last line will make you start attacking instantly while you are charging.

 

Disarm:

Quote

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(2); if isActive then CastSpellByName("Disarm"); else CastSpellByName("Defensive Stance"); end;

This will change your stance to Defensive Stance, regardless of which stance you are in and it will attempt to cast Disarm if the disarm ability conditions are met. (Note: You have to press it twice)

 

Overpower:

Quote

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Overpower(Rank 4)"); else CastSpellByName("Battle Stance"); end;

This will change your stance to Battle Stance regardless of which stance you are in and it will attempt to cast Overpower if the overpower ability conditions are met. (Note: You have to press it twice)

 

Pummel:

Quote

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Pummel(Rank 2)"); else CastSpellByName("Berserker Stance"); end;

This will change your stance to Berserker Stance regardless of which stance you are in and it will attempt to cast Pummel if the pummel ability conditions are met. (Note: You have to press it twice)

 

Recklessness:

Quote

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Recklessness"); else CastSpellByName("Berserker Stance"); end;

 

 

Kick

Spoiler

Kick macro, to announce the kick after its executed

 

Extended Lua:

function createKickFrame()
    if kickFrame == nil then
        kickFrame = CreateFrame("FRAME");
        kickFrame:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE");
        local function eventHandler(self, event, ...)
            if string.find (arg1, "Your Pummel hits") 
				or string.find (arg1, "Your Pummel crits")
				or string.find (arg1, "Your Shield Bash hits")
				or string.find (arg1, "Your Shield Bash crits") then
				SendChatMessage("Kicked!", "SAY")
			end;
			if string.find (arg1, "Your Pummel is parried")
				or string.find (arg1, "Your Shield Bash is parried") then
				SendChatMessage("Kick parried!", "SAY")
			end;
			if string.find (arg1, "Your Pummel was dodged")
				or string.find (arg1, "Your Shield Bash was dodged") then
				SendChatMessage("Kick dodged!", "SAY")
			end;
			if string.find (arg1, "Your Pummel missed")
				or string.find (arg1, "Your Shield Bash missed") then
				SendChatMessage("Kick missed!", "SAY")
			end;
        end
        kickFrame:SetScript("OnEvent", eventHandler);
    end;
end;

function Kick()

createKickFrame()

local _,_,isBattle,_ = GetShapeshiftFormInfo(1); 
local _,_,isDef,_ = GetShapeshiftFormInfo(2);

if isDef then
    CastSpellByName("Shield Bash()"); 
elseif isBattle then
    CastSpellByName("Berserker Stance()"); 
    CastSpellByName("Pummel()"); 
else
    CastSpellByName("Pummel()"); 
end;

end;

macro

Quote

/script Kick()

 

 

Warrior DPS macros

Spoiler

I've seen alot of fury warriors in my discord channel asking about fury macros, so I decided to make a post linking some of the Macros I have made and gathered up to this day.

I'm not an expert in lua-coding, but I have developed a decent enough skill to make some really good ones worth sharing.

Fury Theorycrafting Discord

 

Before I get to the actual macros I have to explain some basics:

Quote

/script if not IsCurrentAction(36) then UseAction(36) end;

 

Some of the Macros I link will have the line above, this line is a simple start attack macro, and to make it work you have to place the spell "Attack" on ActionSlotID 36, here is a picture showing all the ActionSlotIDs.

Quote

IbP6QK0.jpg

(InsertXXSpellID,BOOKTYPE_SPELL)

Some of the macros I link will have the part above in them, its important here that you set the correct SpellBookID, you find the SpellBookID by counting your spells in the spellbook this way, for me BT have the ID 34 and WW have the ID 45:

Quote

PP5Et7s.jpg

Quote

/script function m(s) DEFAULT_CHAT_FRAME:AddMessage(s); end for i=1,16 do s=UnitBuff("target", i); if(s) then m("B "..i..": "..s); end s=UnitDebuff("target", i); if(s) then m("D "..i..": "..s); end end

This is a macro you can click while targeting yourself when having a buff, it will then tell you the Icon-Name of that buff, you can then use that name to make macros like:

Quote

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

Replacing Interface\\Icons\\Ability_Warrior_BattleShout with the Icon-Name for the buff you want to track, it will then cast spell if the buff isn't up, in this case it cast Battle Shout if not already buffed with Battle Shout.

 

Some good Addons that will improve your macros:

 

Macro Tooltip
This addon allows you to add tooltips to your macros, you can do this with either of this lines:

Quote

/setspelltooltip InsertSpellName
or
/sstt InsertSpellName

 

WeaponQuickSwap
This addon allows you to add short and effective lines for Swapping Weapons, you can do it this way:

Quote

/script WeaponSwap("InsertMainHandName","InsertOffHandName/ShieldName")

 

SuperMacro
This addon allows you to make really big macros.

 

SP_SwingTimer
This addon allows you to add Swing timer conditions to your macros, like this:

Quote

/script if st_timer>UnitAttackSpeed"player"*0.85 then CastSpellByName"InsertSpell" end
or
/run if st_timer >=X.X then CastSpellByName"InsertSpell" end

 


Some basic Macros:

 

Berserker Stance -> Berserker Rage

Quote

/setspelltooltip Berserker Rage
/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Berserker Rage"); else CastSpellByName("Berserker Stance()"); end;

 

Battle Stance -> Charge or Hamstring if in melee range of the target

Quote

/setspelltooltip Charge
/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Charge"); else CastSpellByName("Battle Stance"); end;
/script if not IsCurrentAction(36) then UseAction(36) end;
/cast Hamstring

 

Defensive Stance -> Disarm

Quote

/setspelltooltip Disarm
/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(2); if isActive then CastSpellByName("Disarm"); else CastSpellByName("Defensive Stance()"); end;

 

Start attack, Hamstring and queue HS if enough rage

Quote

/setspelltooltip Hamstring
/cast Hamstring
/script if not IsCurrentAction(36) then UseAction(36) end;
/run if UnitMana("player") >=68 then cast("Heroic Strike") else cast("Hamstring");end

 

Berserker Stance -> Intercept or Hamstring if in melee range of the target

Quote

/setspelltooltip Intercept
/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Intercept(Rank 3)"); else CastSpellByName("Berserker Stance()"); end;
/cast Hamstring

 

Battle Stance -> Overpower

Quote

/setspelltooltip Overpower
/script texture,name,isActive = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Overpower"); end
/cast Battle Stance

 

If in Berserker Stance then Pummel, any other stance then Shield Bash

Quote

/setspelltooltip Pummel
/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Pummel"); else CastSpellByName("Shield Bash()"); end;

 

Berserker Stance -> Pummel

Quote

/setspelltooltip Pummel
/run local texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Pummel"); else CastSpellByName("Berserker Stance()"); end;

 

Berserker Stance -> Recklessness

Quote

/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(3); if isActive then CastSpellByName("Recklessness"); else CastSpellByName("Berserker Stance()"); end;

 

Weapon swap Defensive Stance and Shield Wall (Panic Button), you need the addon called WeaponQuickSwap for this one.

Quote

/setspelltooltip Shield Wall
/script WeaponSwap("InsertMainHandName","InsertShieldName")
/cast Defensive Stance
/cast Shield Wall

 

Battle Stance -> Thunder Clap

Quote

/setspelltooltip Thunder Clap
/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Thunder Clap(Rank 6)"); else CastSpellByName("Battle Stance()"); end;

 

Challenging Shout swap weapons and Defensive Stance, you need the addon called WeaponQuickSwap for this one.

Quote

/setspelltooltip Challenging Shout
/script WeaponSwap("InsertMainHandName","InsertShieldName")
/cast Challenging Shout
/cast defensive stance

 

Battle Stance -> Mocking Blow

Quote

/setspelltooltip Mocking Blow
/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Mocking Blow(Rank 5)"); else CastSpellByName("Battle Stance()"); end;

 

Shoot no matter Ranged weapon (nobody uses Throw)

Quote

/cast Shoot Gun
/cast Shoot Bow
/cast Shoot Crossbow

 

Bloodrage -> Battle Stance -> Sweeping Strikes

Quote

/setspelltooltip Sweeping Strikes
/cast Bloodrage
/script texture,name,isActive,isCastable = GetShapeshiftFormInfo(1); if isActive then CastSpellByName("Sweeping Strikes"); else CastSpellByName("Battle Stance()"); end;

 

Put Revenge on action slot 48 and you have:
use revenge if revenge is useable else cast Shield Block

Quote

/script if not IsUsableAction(48) and GetActionCooldown(48)==0 then CastSpellByName("Shield Block") else CastSpellByName("Revenge") end

 

Slam on White Swing (requires SP_Swing Timer)

Quote

/script if st_timer>UnitAttackSpeed"player"*0.85 then CastSpellByName"Slam()" end

 


Advanced Lazy macros:

 

I don't advocate using this lazy macros all the time, as an example it can sometimes be better to save that WW some milliseconds instead of using it right away, because you get to hit more target saving it that millisecond, or you get to place yourself better for it.
They can however be good in certain scenarios, like the single target rotation can be good against Ebonroc, since you don't move on that boss at all.

You have to use CDs and Overpower yourself for all of this macros, best way is to use them on a moment the macro otherwise would have used an Hamstring or when the macro does nothing at all, the points is that you don't want to delay BT or WW.


Single Target Rotation DW (horde) includes Hamstring spam, important here that you change Spell IDs (this requires Super Macro)

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Warrior_BattleShout" then x=1 end i=i+1 end if x==0 then CastSpellByName("Battle Shout")end
/cast Bloodthirst
/script if (UnitHealth('target')/UnitHealthMax('target')<0.20) then CastSpellByName("Execute()");end
/run local start, duration, enabled = GetSpellCooldown(InsertBTSpellID, BOOKTYPE_SPELL) if duration - ( GetTime() - start) > 1.5 then CastSpellByName("Whirlwind") end
/cast Berserker Stance
/run if UnitMana("player") >=68 then cast("Heroic Strike") else cast("Bloodthirst");end
/script local btstart,btdur,bte=GetSpellCooldown(InsertBTSpellID,BOOKTYPE_SPELL); local wwstart,wwdur,wwe=GetSpellCooldown(InsertWWSpellID,BOOKTYPE_SPELL); if (btdur-(GetTime()-btstart)>1.5 and wwdur-(GetTime()-wwstart)>1.5) and UnitMana("player")>=40 then CastSpellByName("Hamstring") end
/script if not IsCurrentAction(36) then UseAction(36) end;

 

Single Target Rotation DW (alliance) excludes Hamstring spam, important here that you change Spell IDs (this requires Super Macro)

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Warrior_BattleShout" then x=1 end i=i+1 end if x==0 then CastSpellByName("Battle Shout")end
/cast Bloodthirst
/script if (UnitHealth('target')/UnitHealthMax('target')<0.20) then CastSpellByName("Execute()");end
/run local start, duration, enabled = GetSpellCooldown(InsertBTSpellID, BOOKTYPE_SPELL) if duration - ( GetTime() - start) > 1.5 then CastSpellByName("Whirlwind") end
/cast Berserker Stance
/run if UnitMana("player") >=68 then cast("Heroic Strike") else cast("Bloodthirst");end
/script if not IsCurrentAction(36) then UseAction(36) end;

 

Multi Target Rotation DW (this requires Super Macro)

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Warrior_BattleShout" then x=1 end i=i+1 end if x==0 then CastSpellByName("Battle Shout")end
/script if (UnitHealth('target')/UnitHealthMax('target')<0.20) then CastSpellByName("Execute()");end
/cast Berserker Stance
/cast Whirlwind
/cast Bloodthirst
/run if UnitMana("player") >=75 then cast("Cleave") else cast("Whirlwind");end
/script if not IsCurrentAction(36) then UseAction(36) end;

 

No AoE allowed includes Hamstring spam, important here that you change Spell IDs (this requires Super Macro)

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Warrior_BattleShout" then x=1 end i=i+1 end if x==0 then CastSpellByName("Battle Shout")end
/cast Bloodthirst
/script if (UnitHealth('target')/UnitHealthMax('target')<0.20) then CastSpellByName("Execute()");end
/cast Berserker Stance
/run local start, duration, enabled = GetSpellCooldown(InsertBTSpellID, BOOKTYPE_SPELL) if duration - ( GetTime() - start) > 1.5 and UnitMana("player")>=30 then CastSpellByName("Hamstring") end
/run if UnitMana("player") >=43 then cast("Heroic Strike") else cast("Bloodthirst");end
/script if not IsCurrentAction(36) then UseAction(36) end;

 

No AoE allowed Excludes Hamstring spam (this requires Super Macro)

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Ability_Warrior_BattleShout" then x=1 end i=i+1 end if x==0 then CastSpellByName("Battle Shout")end
/cast Bloodthirst
/script if (UnitHealth('target')/UnitHealthMax('target')<0.20) then CastSpellByName("Execute()");end
/cast Berserker Stance
/run if UnitMana("player") >=43 then cast("Heroic Strike") else cast("Bloodthirst");end
/script if not IsCurrentAction(36) then UseAction(36) end;

 

Attempt on a slam macro (not perfect), important here that you change Spell IDs (this requires Super Macro and SP_Swing Timer)

Quote

/script local btstart,btdur,bte=GetSpellCooldown(32,BOOKTYPE_SPELL); if (btdur-(GetTime()-btstart)>1.5) and UnitMana("player")>=45 and st_timer>UnitAttackSpeed"player"*0.85 then CastSpellByName"Slam()" end
/run if st_timer >=1.5 then CastSpellByName("Bloodthirst") end
/script if (UnitHealth('target')/UnitHealthMax('target')<0.20) then CastSpellByName("Execute()");end
/run local start, duration, enabled = GetSpellCooldown(InsertBTSpellID, BOOKTYPE_SPELL) if duration - ( GetTime() - start) > 1.5 then CastSpellByName("Whirlwind") end
/cast Berserker Stance
/script local btstart,btdur,bte=GetSpellCooldown(InsertBTSpellID,BOOKTYPE_SPELL); local wwstart,wwdur,wwe=GetSpellCooldown(InsertWWSpellID,BOOKTYPE_SPELL); if (btdur-(GetTime()-btstart)>1.5 and wwdur-(GetTime()-wwstart)>1.5) and UnitMana("player")>=30 and st_timer >=1.5 then CastSpellByName("Hamstring") end
/script if not IsCurrentAction(36) then UseAction(36) end;

 


Other useful and fun macros:

 

Teabag macro

Quote

/run if(_g_g_f == nil)then _g_g_f = CreateFrame("frame"); end function _gg() SitOrStand();end; if(_g_g_b == nil) then _g_g_b = 1; _g_g_f:SetScript("OnUpdate", _gg); else _g_g_b = nil; _g_g_f:SetScript("OnUpdate", nil); end

 

Reset all instances

Quote

/script ResetInstances()

 

Stack sunder on sheep without breaking it

Quote

/cast sunder armor
/script ClearTarget();

 

Target last target

Quote

/script TargetLastTarget();

 

 

Made by Omak

 

Warrior macros

Spoiler

Dont waste consumables macro: (Only use in Combat) (4 => Last bag, 10 slot counting from topleft to bottom right)

Quote

/script if UnitAffectingCombat("player") then UseContainerItem(4,10) end

 

Startattack macro: (41 being the actionslot)

Quote

/script if not IsCurrentAction(41) then UseAction(41) end

 

Berserker Rage + Startattack:

Quote

/cast Berserker Stance
/cast Berserker Rage
/script if not IsCurrentAction(41) then UseAction(41) end

 

Charge macro:

Quote

/script if not UnitAffectingCombat("player") then CastSpellByName("Battle Stance"); CastSpellByName("Charge"); end

 

Cleave + Startattack:

Quote

/cast Cleave
/script if not IsCurrentAction(41) then UseAction(41) end

 

Bloodthirst + Startattack:

Quote

/cast Bloodthirst
/script if not IsCurrentAction(41) then UseAction(41) end

 

Disarm + Startattack:

Quote

/cast Defensive Stance
/cast Disarm
/script if not IsCurrentAction(41) then UseAction(41) end

 

Execute macro:

Quote

/script local p=100*UnitHealth("target")/UnitHealthMax("target");if (p>5 or UnitHealth("target")>25000) and UnitMana("player")<26 then CastSpellByName("Berserker Stance"); end; CastSpellByName("Execute");if not IsCurrentAction(41) then UseAction(41) end

 

Juju flurry macro: (Cast self without untargeting the boss)

Quote

/script UseContainerItem(3,16); SpellTargetUnit("player");

 

Bandage macro:

Quote

/script UseContainerItem(0,1); SpellTargetUnit("player");

 

Heoric Strike + Startattack:

Quote

/cast Heroic Strike
/script if not IsCurrentAction(41) then UseAction(41) end

 

Intercept macro + Startattack:

Quote

/cast Berserker Stance
/cast Intercept
/script if not IsCurrentAction(41) then UseAction(41) end

 

Mocking Blow:

Quote

/cast Battle Stance
/cast Mocking Blow

 

Overpower:

Quote

/cast Battle Stance
/cast Overpower
/script if not IsCurrentAction(41) then UseAction(41) end

 

Pummel macro:

Quote

/cast Berserker Stance
/cast Pummel

 

Switch mainhand weapon macro:

Quote

/script UseContainerItem(0,2)

 

Thunderclap + Startattack:

Quote

/cast Battle Stance
/cast Thunder Clap
/script if not IsCurrentAction(41) then UseAction(41) end

 

Whirlwind + Startattack:

Quote

/cast Berserker Stance
/cast Whirlwind
/script if not IsCurrentAction(41) then UseAction(41) end

 

Shield Bash macro: (22 being the actionslot of your shield)

Quote

/script UseAction(22); CastSpellByName("Defensive Stance"); CastSpellByName("Shield Bash"); if not IsCurrentAction(41) then AttackTarget() end

 

Battle Stance to Berserker Stance Whirlwind macro:
It does Bloodthirst if you have enough rage and its off cd or getting of cd and then switches stance in order to not waste any rage.

Quote

/script local a,h,b,c=CastSpellByName,UnitMana("player"),GetActionCooldown(75); if h<=25 or (b+c-GetTime())>1.5 then a("Berserker Stance"); a("Whirlwind") else a("Bloodthirst") end; if not IsCurrentAction(41) then UseAction(41) end

 

Autoattack macro with check for Shadow Command at Nef:

Quote

/script zu=true;for i=1,2 do GameTooltip:SetUnitDebuff("target", i);if (GameTooltipTextLeft1:GetText() or "")=="Shadow Command" then zu=false end;end if zu then CastSpellByName("Bloodthirst");if not IsCurrentAction(41) then AttackTarget() end;end

 

Made by Shino

 

One Button Tanking

Spoiler

Per a request, I am working on a one button Warrior tank macro. Since I do not have a warrior for testing, I need your help! The macro requires Super Macro and KTM(threat meter) addons.

What does it do?

  • If current rage is greater than or equal to 60, uses Heroic Strike.

Else if current rage is greater than or equal to 10 AND Shield Block is not active AND Shield Block is not on cooldown, uses Shield Block. Else if current rage is greater than or equal to <31 point talent rage requirement> AND <31 point talent> is not on cooldown, uses <31 point talent> Else if current rage is greater than or equal to 5 AND Revenge is useable, uses Revenge. Else if current rage is greater than or equal to <Sunder rage>, uses Sunder Armor (and doesn't break KTM).

There is one caveat, the Revenge ability needs to be somewhere on your action bars AND no other macro can use the Revenge Icon.

How to create the macro, copy/paste the following into Super Macro's extended LUA window:

function WarriorTank()	
	local msNameTalent, msIcon, msTier, msColumn, msCurrRank, msMaxRank = GetTalentInfo(1,18);
	local btNameTalent, btIcon, btTier, btColumn, btCurrRank, btMaxRank = GetTalentInfo(2,17);
	local mainDamage = "Shield Slam";
	if (msCurrRank == 1) then mainDamage = "Mortal Strike";
	elseif (btCurrRank == 1) then mainDamage = "Bloodthirst"; end;
	local abilities = {"Shield Block", "Revenge", "Sunder Armor", "Heroic Strike", mainDamage};
	local ids = {};
	local sunder = KLHTM_Sunder;
	local cast = CastSpellByName;
	local rage = UnitMana("player");
	local sbTexture = "Ability_Defend";
	local revengeTexture = "Ability_Warrior_Revenge";
	local mainCost = 30;
	local impSunderNameTalent, impSunderIcon, impSunderTier, impSunderColumn, impSunderCurrRank, impSunderMaxRank = GetTalentInfo(3,10);
	local sunderRage = 15 - impSunderCurrRank;
	
	if(mainDamage == "Shield Slam") then mainCost = 20; end;
	
	for i = 1, 5, 1
		do
			if(getSpellId(abilities[i]) ~= nil) then
				ids[i] = getSpellId(abilities[i]);
			end;
	end;
	
	local sbStart, sbDuration, sbEnabled = GetSpellCooldown(ids[1], BOOKTYPE_SPELL);
	local mainStart, mainDuration, mainEnabled = GetSpellCooldown(ids[5], BOOKTYPE_SPELL);
	local reveStart, revDuration, revEnabled = GetSpellCooldown(ids[2], BOOKTYPE_SPELL);
	local revengeUsable = IsUsableAction(findActionSlot(revengeTexture));
	
	--if shield block not active and not on cd then shield block
	if (isBuffTextureActive(sbTexture) == false and sbDuration == 0 and rage >= 10) then cast(abilities[1]);
	--if enough rage for mainDamage and mainDamage not on cd then mainDamage
	elseif (rage >= mainCost and mainDuration == 0) then cast(abilities[5]);
	--if enough rage for revenge and revenge can be cast and random roll less than 7 then revenge
	elseif (rage >= 5 and revengeUsable == 1 and revDuration == 0) then cast(abilities[2]);
	--if enough rage for sunder then sunder
	elseif (rage >= sunderRage) then sunder(); end;
	
	--if rage >= 60 then heroic strike
	if (rage >= 60) then cast(abilities[4]); end;

end;

function getSpellId(spell)
	local i = 1
	while true do
	   local spellName, spellRank = GetSpellName(i, BOOKTYPE_SPELL)
	   if not spellName then
		  do break end
	   end
	   if spellName == spell then
	   return i; end;
	   i = i + 1
	end
end;

function isBuffTextureActive(texture)
	local i=0;
	local g=GetPlayerBuff;
	local isBuffActive = false;

	while not(g(i) == -1)
	do
		if(strfind(GetPlayerBuffTexture(g(i)), texture)) then isBuffActive = true; end;
		i=i+1
	end;	
	return isBuffActive;
end;

function findActionSlot(spellTexture)	
	for i = 1, 120, 1
		do
		if(GetActionTexture(i) ~= nil) then 
		if(strfind(GetActionTexture(i), spellTexture)) then return i; end; end;
	end;
	return 0;
end;

 

And in your macro text, simply call the WarriorTank function like so:

Quote

/script WarriorTank();

 

Where the first input is the 31 point talent ability, fury tanks will use "Bloodthirst" and arms tanks will use "Mortal Strike". The second input is the rage cost of Sunder Armor (default is 15, improved sunder talent reduces this). No more inputs required, the macro will auto detect necessary talents.

I really need feedback, please let me know if you run into any issues or have ideas for improvement. Thanks!

Edit1: Fixed an issue where GetSpellCooldown was breaking the macro.
Edit2: Improvements to the way Revenge and Heroic Strike are used.
Edit3: Macro now auto detects talents, thus removing the need to send parameters in the macro call.

 

Macro by Cernie

 

One Macro: Warrior

Spoiler

687474703a2f2f692e696d6775722e636f6d2f7a

*No addons required

 

Install

THIS WILL OVERWRITE ANY PREEXISTING MACROS. PLEASE BACKUP YOUR WTF FOLDER
  1. Download WTF.zip from the current release.

Unzip WTF.zip

Rename WTF/Account/ACCOUNT_NAME

e.g. WTF/Account/gcom

  1. Rename WTF/Account/ACCOUNT_NAME/SERVER_NAME

e.g. WTF/Account/gcom/Arthas_EU

  1. Rename WTF/Account/ACCOUNT_NAME/SERVER_NAME/CHARACTER_NAME

e.g. WTF/Account/gcom/Arthas_EU/Gradify

  1. Copy WTF

Paste & Merge WTF into your World of Warcraft Folder's main directory

/World of Warcraft

 

1. SETUP

Each macro/spell is given its own action bar # in the macro. We need to put the appropriate macro/spell in the appropriate spot (image below). Place CLIK1-6, MT/(aoe), mount anywhere!

687474703a2f2f692e696d6775722e636f6d2f4c

2. HOW TO

  1. Each login you need to click (CLIK1-6)
  1. Use MT/MT(aoe), this is your main macro.

687474703a2f2f692e696d6775722e636f6d2f4c

REFERENCE

This project is a derivative of Kokkolar's work

Thank you Kiha for providing us with each action bar's #.

68747470733a2f2f6c68332e676f6f676c657573

 

Priest macros

 

Power Infusion

Spoiler

Cast power infusion, send a tell to the target notifying them

Quote

/cast Power Infusion
/run if UnitExists"target"then SendChatMessage("PI on YOU!! 20% spellpower for 15secs","WHISPER",nil,UnitName"target")end

 

 

Dispel

Spoiler

Mouseover dispel

Quote

/script if UnitExists("mouseover") then TargetUnit("mouseover"); CastSpellByName("Dispel Magic(Rank 2)"); TargetUnit("playertarget") else CastSpellByName("Dispel Magic(Rank 2)") end

 

Dispel self-cast modifier, replace IsAltKeyDown() with IsShiftKeyDown() or IsControlKeyDown() if you want to use another modifier

Quote

/run if IsAltKeyDown()then CastSpellByName("Dispel Magic",1)else CastSpellByName("Dispel Magic")end

 

Dispel Magic/Disease

Quote

/run local s,p,i,d,t,_={["Magic"]="Dispel Magic",["Disease"]="Abolish Disease"};for i=1,40 do p="raid"..i;if CheckInteractDistance(p,4) then d,_,t=UnitDebuff(p,1,1);if d then TargetUnit(p);CastSpellByName(s[t]);TargetLastTarget();break;end;end;end

 

 

Silence

Spoiler

Stopcast/Silence

Quote

/script SpellStopCasting()
/cast Silence

 

 

Casting rank depending on target's level 

Spoiler

  Fortitude

Quote

/run local a,b,c,d,e,u="Power Word: Fortitude",{1,10,20,30,40,50},"target","(Rank ",CastSpellByName,UnitLevel if u(c)~=nil and UnitIsFriend("player",c)then for i=6,1,-1 do if(u(c)>=b)then e(a..d..i..")")return end end else e(a,1) end

 

Shield

Quote

/run local a,b,c,d,e,u="Power Word: Shield",{1,6,12,18,24,30,36,42,48,54},"target","(Rank ",CastSpellByName,UnitLevel if u(c)~=nil and UnitIsFriend("player",c)then for i=10,1,-1 do if(u(c)>=b)then e(a..d..i..")")return end end else e(a,1) end

 

 

Shadow Word: Pain

Spoiler

Cast Shadow Word: Pain if it's not already on the target

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Shadow_ShadowWordPain" then x=1 end i=i+1 end if x==0 then CastSpellByName("Shadow Word: Pain")end

 

Shadow Word: Pain, else Mind Blast

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Shadow_ShadowWordPain" then x=1 end i=i+1 end if x==0 then CastSpellByName("Shadow Word: Pain")else CastSpellByName("Mind Blast")end

 

Shadow Word: Pain, else Power Word: Shield

Quote

/run local i,x=1,0 while UnitDebuff("target",i) do if UnitDebuff("target",i)=="Interface\\Icons\\Spell_Shadow_ShadowWordPain" then x=1 end i=i+1 end if x==0 then CastSpellByName("Shadow Word: Pain")else CastSpellByName("Power Word: Shield")end

 



Renew

Spoiler

Cast Renew if your target doesn't already have the renew buff

Quote

/run local check=true; for i=1,32 do if UnitBuff("target",i)~=nil then if string.find(UnitBuff("target",i),"Spell_Holy_Renew") then check=false; end end end if check==true then CastSpellByName("Renew"); end

 

Don't double up on Renew

Quote

/script UIErrorsFrame:Hide()
/script if UnitExists("target") and UnitIsFriend("target", "player") then if not buffed("Renew", 'target') then CastSpellByName("Renew") end return end if not buffed("Renew", 'player') then cast("Renew",1) end

 



Self-Buffs

Spoiler

/script if not buffed("Inner Fire", 'player') then CastSpellByName("Inner Fire") else if not buffed("Power Word: Fortitude", 'player') then CastSpellByName("Power Word: Fortitude",1) end;end



Rotation

Spoiler

/script UIErrorsFrame:Hide()
/script if not buffed("Shadow Word: Pain", 'target') then CastSpellByName("Shadow Word: Pain") end DoOrder("Mind Blast", "Smite")



Mind flay spammable

Spoiler

This macro will cast Mind Flay only if your current target is not already a victim to the spell.

Quote

/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

 

Quote

/run while nil do CastSpellByName"Mind Flay" end
/run k=0 local i=1 while UnitBuff("target",i) ~= nil do if string.find(UnitBuff("target",i),"Shadow_SiphonMana") then k=1 end i=i+1 end if k==0 then CastSpellByName"Mind Flay" end

 

 

Spammable Wand

Spoiler

Cast Inner Fire, else spammable Wand "Shoot" (Put Shoot in action slot 37)

Quote

/run local i,x=1,0 while UnitBuff("player",i) do if UnitBuff("player",i)=="Interface\\Icons\\Spell_Holy_InnerFire" then x=1 end i=i+1 end if x==0 then CastSpellByName("Inner Fire") else UseAction(37) end

 

Target/Mashable Wand (Put Shoot in action slot 12)

Quote

/script UIErrorsFrame:Hide()
/script if (UnitName('target')==nil) then TargetNearestEnemy() else if not IsAutoRepeatAction(12) then CastSpellByName("Shoot") end;end

 



Desperate Prayer

Spoiler

/script UIErrorsFrame:Hide()
/script SpellStopCasting()
/script CastSpellByName("Desperate Prayer",1)

 

Fade

Spoiler

/script UIErrorsFrame:Hide()
/script SpellStopCasting()
/script CastSpellByName("Fade",1)

 

Power Word: Shield

Spoiler

Self Shield

Quote

/script UIErrorsFrame:Hide()
/script SpellStopCasting()
/script CastSpellByName("Power Word: Shield",1)

 

Stopcast/Self Shield

Quote

/script SpellStopCasting()
/script CastSpellByName('Power word: Shield', 1)

 



Renew/Shield

Spoiler

Will use Major Mana Potion if low on mana, keep renew up and use shield if target gets below 30%hp else cast flash heal.

Quote

/script if UnitMana("Player") < 380 then use("Major Mana Potion") end;
/script i=1;x=0;m=0;c=CastSpellByName;while(UnitBuff("target",i)~=nil) do if(strfind(UnitBuff("target",i),"Renew")) then m=1;end;i=i+1;end;if(m~=1) then c"Renew";elseif (m==1)and(UnitHealth("target")/UnitHealthMax("target")) < 0.3 then c"Power Word: Shield" c"Flash Heal";else c"Flash Heal(rank 4)";end;

 

 

Cast heals based on health percentages

Spoiler
Quote

/script if(UnitHealth("target")/UnitHealthMax("target")<0.50) then CastSpellByName("Flash Heal(Rank 3)")else CastSpellByName("Flash Heal(Rank 1)"); end

This one should cast Rank 1 until the target is under 50% health, then cast Rank 3. Adjustments can be made to the percentage.

 

Self Heal/Heal target

Spoiler

Self Flash Heal/Flash Heal target

Quote

/script UIErrorsFrame:Hide()
/script SpellStopCasting()
/script if UnitExists("target") then CastSpellByName("Flash Heal") else CastSpellByName("Flash Heal",1) end

 

Self Heal/Heal target

Quote

/script UIErrorsFrame:Hide()
/script SpellStopCasting()
/script if UnitExists("target") then CastSpellByName("Heal") else CastSpellByName("Heal",1) end

 

Self Lesser Heal/Lesser heal target

Quote

/script UIErrorsFrame:Hide()
/script SpellStopCasting()
/script if UnitExists("target") then CastSpellByName("Lesser Heal") else CastSpellByName("Lesser Heal",1) end

 

 

Mind Control
Spoiler

Cancel Mind Control

Quote

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

 


Priest Grinding
Spoiler

Extended Lua:

function OneButtonPriestGrinding()
	local cast = CastSpellByName;
	local spells = {"Power Word: Shield", "Mind Blast", "Shadow Word: Pain", "Shoot"};	
	local ids = {getSpellId(spells[1]), getSpellId(spells[2])};
	local hasMindFlay = getSpellId("Mind Flay");
	if(hasMindFlay ~= nil) then table.insert(spells, "Mind Flay"); end;
	local targetHealthpct = UnitHealth("target") / UnitHealthMax("target");
	local shieldBuff = "Spell_Holy_PowerWordShield";
	local painDebuff = "Spell_Shadow_ShadowWordPain";
	local shieldDebuff = "Spell_Holy_AshesToAshes";
	local shieldStart, shieldDuration, shieldEnabled = GetSpellCooldown(ids[1], BOOKTYPE_SPELL);
	local mbStart, mbDuration, mbEnabled = GetSpellCooldown(ids[2], BOOKTYPE_SPELL);
	
	if(isSelfBuff(shieldBuff) == false and shieldDuration == 0 and isTargetDebuff("player", shieldDebuff) == false) then cast(spells[1], 1);
	elseif(targetHealthpct <= .3) then 
		if(isTargetDebuff("target", painDebuff) == true) then spamWand();
		else cast(spells[3]); end;
	else
		if(mbDuration == 0) then cast(spells[2]);
		elseif(isTargetDebuff("target", painDebuff) == false) then cast(spells[3]);
		elseif(hasMindFlay ~= nil) then spamMindFlay(); end;
	end;
end;

function spamMindFlay()
	if(CastingBarFrame.casting ~= 1 and CastingBarFrame.channeling ~= 1) then CastSpellByName("Mind Flay"); end;
end;

function spamWand()
	if(findWandActionSlot() == 0) then CastSpellByName("Shoot"); end;
end;

function isTargetDebuff(target, debuff)
	local isDebuff = false;
	for i = 1, 40
		do
		if(strfind(tostring(UnitDebuff(target,i)), debuff)) then isDebuff = true; end;
	end;
	return isDebuff;
end;

function isSelfBuff(buff)
	local isBuff = false;
	for i = 1, 40
		do
		if(strfind(tostring(UnitBuff("player", i)), buff)) then isBuff = true; end;
	end;
	return isBuff;
end;

function getSpellId(spell)
	local i = 1
	while true do
	   local spellName, spellRank = GetSpellName(i, BOOKTYPE_SPELL)
	   if not spellName then
		  do break end
	   end
	   if spellName == spell then
	   return i; end;
	   i = i + 1
	end
end;

function findWandActionSlot()
	for i = 1, 120, 1
		do
		if(IsAutoRepeatAction(i) == 1) then
		return i; end;
	end;
	return 0;
end;

Macro:

Quote

/script OneButtonPriestGrinding();

Make sure you have Shoot (wand) somewhere on your action bars. This button is spam-able so you won't unnecessarily recast Mind Flay or mess up shoot wand.

 

Macro made by Cernie

 

 Lua tips, chat and raid

 

Run/Script

Spoiler

/run and /script are interchangeable so if you want more characters (max 255) use /run

 

Castsequence

Spoiler

This will cast spells in the specified order separated by comma. You can add more until you reach the 255 character limit. It does not respect global cooldown so if you click it faster than 1,5 seconds you will skip a step. Keep that in mind! The following example will cast the following:
1. Mark of the Wild(Rank 7)
2. Thorns(Rank 6)
3. Rejuvenation(Rank 10)

Quote

/run s={"Mark of the Wild(Rank 7)","Thorns(Rank 6)","Rejuvenation(Rank 10)"} if q==nil then q=0 end q=q+1 if q>getn(s)then q=1 end CastSpellByName(s[q])

 

 

Chat/messages

Spoiler

Print a string of your current target to chat log

Quote

/run DEFAULT_CHAT_FRAME:AddMessage("Hello world! my target name is "..GetUnitName("target"))

 

If your current target is a player then send a chat whisper to him/her

Quote

/run if UnitExists("target") then SendChatMessage("This is a test but insert whatever you are casting here","WHISPER",nil,UnitName("target")) end

 

The following will send your current location into PARTY chat:

Quote

/run local x,y=GetPlayerMapPosition("player") SendChatMessage("I'm at "..GetZoneText().." - "..GetMinimapZoneText().." - "..math.floor((x*100)+0,5).." "..math.floor((y*100)+0,5),"PARTY")

 

The following will do the same into BATTLEGROUND chat:

Quote

/run local x,y=GetPlayerMapPosition("player") SendChatMessage("I'm at "..GetZoneText().." - "..GetMinimapZoneText().." - "..math.floor((x*100)+0,5).." "..math.floor((y*100)+0,5),"BATTLEGROUND")

 

 

Unit info

Spoiler

Check if a unit is dead or ghost. Returns nil if alive and 1 if dead

Quote

/run DEFAULT_CHAT_FRAME:AddMessage(tostring(UnitIsDeadOrGhost("target")))

 

 

Buffs/debuffs

Spoiler

 

Buffs in vanilla use interface names from the icon they have. That means you use the names of the icons to check instead of the actual buff name. Any more advanced checking wont fit inside a single macro. This is fairly confusing so in order to get the icon name you need to figure it out first.

List all icon names of buffs of your target.

Quote

/run for i=1,40 do if UnitBuff("target",i) then DEFAULT_CHAT_FRAME:AddMessage(tostring(i.."="..UnitBuff("target",i)),0.4,1,1) end end

 

List all icon names of debuffs of your target.

Quote

/run for i=1,40 do if UnitDebuff("target",i) then DEFAULT_CHAT_FRAME:AddMessage(tostring(i.."="..UnitDebuff("target",i)),0.4,1,1) end end

 

Check if a target has a certain buff icon name

Quote

/run for i=1,40 do if(strfind(tostring(UnitBuff("target",i)),"MyBuffName")) then c="Yes" end end if not c="Yes" then c="No" end DEFAULT_CHAT_FRAME:AddMessage(c)

 

Check if a target has a certain debuff icon name

Quote

/run for i=1,40 do if(strfind(tostring(UnitDebuff("target",i)),"MyBuffName")) then c="Yes" end end if not c="Yes" then c="No" end DEFAULT_CHAT_FRAME:AddMessage(c)

 

There is another way to check proper buff names and buff descriptions by exploiting the tooltip information but it’s unwieldy and requires long bouts of code. This is very unsuitable to be used in macros. Here are some examples if you want to try anyway:

 

List all the buff names of your target:

Quote

/run g=GameTooltip g:SetOwner(WorldFrame) t=GameTooltipTextLeft1 for i=1,32 do g:SetUnitBuff("target",i) if t:GetText() then DEFAULT_CHAT_FRAME:AddMessage(i.."="..t:GetText(),0.4,1,1) g:ClearLines() end end g:Hide()

 

List all the buff descriptions of your target:

Quote

/run g=GameTooltip g:SetOwner(WorldFrame) t=GameTooltipTextLeft2 for i=1,32 do g:SetUnitBuff("target",i) if t:GetText() then DEFAULT_CHAT_FRAME:AddMessage(i.."="..t:GetText(),0.4,1,1) g:ClearLines() end end g:Hide()

 

List all player buff names:

Quote

/run g=GameTooltip g:SetOwner(WorldFrame) t=GameTooltipTextLeft1 for i=1,32 do g:SetPlayerBuff(i) if t:GetText() then DEFAULT_CHAT_FRAME:AddMessage(i.."="..t:GetText(),0.4,1,1) end end

 

List all player buff descriptions:

Quote

/run g=GameTooltip g:SetOwner(WorldFrame) t=GameTooltipTextLeft2 for i=1,32 do g:SetPlayerBuff(i) if t:GetText() then DEFAULT_CHAT_FRAME:AddMessage(i.."="..t:GetText(),0.4,1,1) end end

 

 

Raid buffs/debuffs

Spoiler

 

Combining the above we can do a for loop to check all the players in the raid for a specific debuff. In this example the Brood Affliction: Bronze from the boss Chromaggus in Blackwing Lair. After this boss theres usually a delay of trading Hourglass sand to get rid of the debuff. This macro will list all players in chat who has it.

Quote

/run b="n_Bronze" n="" r="raid" for i=1,GetNumRaidMembers()do for j=1,40 do if(strfind(tostring(UnitDebuff(r..i,j)),b))then n=UnitName(r..i)..", "..n break end end end if n==""then else SendChatMessage("Players with bronze debuff: "..n,"SAY",nil)end

 

The following is similar to above but will whisper to each player instead. Depending on server spam protection, this might not work.

Quote

/run b="n_Bronze" r="raid"for i=1,GetNumRaidMembers()do for j=1,40 do if(strfind(tostring(UnitDebuff(r..i,j)),b))then SendChatMessage("You've got Bronze debuff from Chromaggus use a Hourglass Sand.","WHISPER",nil,UnitName(r..i))break end end end

 

The following will instead check for players lacking a certain buff using a tiny function. In this example we’re checking for players who have NOT popped Fire Protection Potions and list them in chat. Remember that this conflicts with the warlock Imp fire resistance buff.

Quote

/run n=""r="raid"function b(k,l)for i=1,32 do if strfind(tostring(UnitBuff(r..l,i)),k)then return 1 end end end for l=1,GetNumRaidMembers() do if not b("e_FireA",l)then n=UnitName(r..l)..","..n end end SendChatMessage("Pop Fire pot:"..n,"SAY",nil)

 

Whisper each player lacking Fire Protection Potion instead:

Quote

/run n=""r="raid"function b(k,l)for i=1,32 do if strfind(tostring(UnitBuff(r..l,i)),k)then return 1 end end end for l=1,GetNumRaidMembers() do if not b("e_FireA",l)then SendChatMessage("Pop Fire prot potion!","WHISPER",nil,UnitName(r..l)) end end

 

List players lacking Nature Protection Potion:

Quote

/run n=""r="raid"function b(k,l)for i=1,32 do if strfind(tostring(UnitBuff(r..l,i)),k)then return 1 end end end for l=1,GetNumRaidMembers() do if not b("e_SpiritA",l)then n=UnitName(r..l)..","..n end end SendChatMessage("Pop Nature pot:"..n,"SAY",nil)

 

Whisper each player lacking Nature Protection Potion:

Quote

/run n=""r="raid"function b(k,l)for i=1,32 do if strfind(tostring(UnitBuff(r..l,i)),k)then return 1 end end end for l=1,GetNumRaidMembers() do if not b("e_SpiritA",l)then SendChatMessage("Pop Nature prot potion!","WHISPER",nil,UnitName(r..l)) end end

 

List players lacking Shadow Protection Potion:

Quote

/run n=""r="raid"function b(k,l)for i=1,32 do if strfind(tostring(UnitBuff(r..l,i)),k)then return 1 end end end for l=1,GetNumRaidMembers() do if not b("w_RagingSc",l)then n=UnitName(r..l)..","..n end end SendChatMessage("Pop Shadow pot:"..n,"SAY",nil)

 

Whisper each player lacking Shadow Protection Potion:

Quote

/run n=""r="raid"function b(k,l)for i=1,32 do if strfind(tostring(UnitBuff(r..l,i)),k)then return 1 end end end for l=1,GetNumRaidMembers() do if not b("w_RagingSc",l)then SendChatMessage("Pop Shadow prot potion!","WHISPER",nil,UnitName(r..l)) end end

 

 

Raid

Spoiler

 

Go through the whole raid list and demote and kick every player character that is offline.

Quote

/run for i=1,GetNumRaidMembers() do u="raid"..i n=UnitName(u)if not UnitIsConnected(u) then DemoteAssistant(n)UninviteByName(n)end end

 

Similar to above but will promote every player character.

Quote

/run for i=1,GetNumRaidMembers() do u="raid"..i n=UnitName(u)if UnitIsConnected(u) then PromoteToAssistant(n)end end

 

Combine both above and promote everyone online but demote and kick everyone that is offline.

Quote

/run for i=1,GetNumRaidMembers() do u="raid"..i n=UnitName(u)if UnitIsConnected(u) then PromoteToAssistant(n) else DemoteAssistant(n)UninviteByName(n)end end

 

 

Frames

Spoiler

To retrieve the name of the interface/addon frame you currently have your mousecursor hovered over

Quote

/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName())

 

 

GMTicket

Spoiler

Some UI add-ons may not show the help request button. If so, you can use the script below:

Quote

/script NewGMTicket(1,"text")

The average response to tickets are 24-48 hours, sometimes longer depending on your inquiry and workload. The system message in the ticket UI is arbitrary and does not mean anything, so disregard it.

 

Main menu

Spoiler

Open the main menu

Quote

/run ToggleGameMenu();

 

Keybind Esc to toggle the main menu

Quote

/run SetBinding("ESCAPE","TOGGLEGAMEMENU")SaveBindings(1)

 

 

Macro writing guides

 

Auto Target + Auto Attack + Cast Spell

Spoiler

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.

Quote

/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.

Quote

/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)

attackactionbarslots

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:

Quote

/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 😎 will not work but Moonfire(Rank 😎 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 😎 ranks will not work in a macro but Heroic Strike without the parenthesis and rank will.

 

 
 

 

Auto Self Cast

Spoiler

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 :

Quote

/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 :

Quote

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

 

rejuveRejuvenation auto self cast macro :

Quote

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

 

 

Instant casting / Cancel spell

Spoiler

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.

Quote

/run SpellStopCasting()

 

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

Quote

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

 

As a Tauren it’s really useful in combination with War Stomp

Quote

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

 

 

Shoot Gun/Bow/Crossbow

Spoiler

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:
    

Quote

/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

Spoiler

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:

Quote

/run UseInventoryItem(13)

 

InventorySlots

To use an item in your bags you must know the inventory slotID there as well.

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

Quote

/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

Spoiler

inv_misc_bandage_12.jpg?w=590Bandage 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:
bandage.png?w=590

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

   

Quote

/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

Spoiler

inv_misc_qirajicrystal_04.jpg?w=590AQ40 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

Quote

/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

Quote

/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

Quote

/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!

 

Useful macros (1.0)

Spoiler

This guide is from WoWWiki, so all credits go to them!

 

Spells

Casting spells no longer requires the (Rank x). So you can now have a macro that says: /cast Holy Light, and it’ll cast your highest rank of Holy Light. This macro will always cast the highest rank spell, and you will not be able to cast it on lower-level targets.
Self Cast Any Spell (without losing your target)

Quote

/script CastSpellByName(‘Holy Light’, 1)

 

Casting buffs

Adapted from the above code, this is designed to cast buffs. If an enemy is selected, you will cast the buff on yourself, if nothing is selected, you will cast the buff on yourself, if you are selected, you will cast the buff on yourself but if your ally is selected they will be buffed.

 

Example

This macro will cast buffs on you unless an ally is selected (Mark of the Wild):

Quote

/script if (UnitIsFriend(“player”, “target”) ) then CastSpellByName(“Mark of the Wild”)
else CastSpellByName(“Mark of the Wild”, 1); end

 

Cast a spell based on target’s class

You’ll need to target the person you want to buff first. Here’s an example for a paladin to use; note that it should all be on one line:

Quote

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

 

Cast a spell based on target’s level

You’ll need to target the person you want to buff first. Here’s an example for a priest to use on an English language server. You have to alter the spell name according to the spell you want to cast and change i=6 by the number of ranks you currently have for that spell; note that it should all be on one line:

Quote

/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) then CastSpellByName(Pre..i..”)”) return end end end

 

Cast a healing spell on nearby friends

This will target all your nearby friendly player characters in turn and cast a heal on the first one it comes to with a health level that is below a certain percentage of maximum (in this example 70%). Repeated calls

to the macro will step through all nearby friends needing heals until it targets you. The macro checks the health of up to 40 nearby friendly player characters. If a call to this macro casts no heal then neither nearby friendly player characters nor yourself have a health level below the threshold of 70% of maximum.

Quote

/script for i=1,40 do TargetNearestFriend();
if UnitHealth(“target”)/UnitHealthMax(“target”) < 0.7 then
if UnitIsPlayer(“target”) then CastSpellByName(“Lesser Healing Wave”) end end end; TargetLastEnemy();

 

Announcing spells and targets to your party

Good for healing and crowd control spells. Example with a healing spell (Party member must be targeted first to make the party announcement work):

Quote

/cast Healing Touch
/party Healing %t in 3.5 seconds

 

Cast a spell on party member based on his location in party

This will target the “first” member of your party, cast a healing spell on him, then return you to your previous target. To use on 2nd member of party change “party1″ to “party2″.

Quote

/script TargetUnit(“party1″)
/cast Flash Heal
/script TargetLastTarget()

 

Cast multiple buffs with smart buff recognition

This script checks whether the target has a buff, if not you cast it, if so you cast a different buff.

Quote

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

Modify the spell names to change the buff.

 

Cast even more buffs with smart buff recognition

A lightweight “smart buff” script allowing auto casting of 3 buffs based on your target’s buffs – Buff 3 is cast if you have no target. Requires knowledge of buff names and spell numbers (see Find Buff Name and Search For Spell Number).

Quote

/script F,C,i,b,t,m,n=strfind,CastSpell,1,”",”target” if UnitName(t)~=nil then repeat
if F(b,”BNa1″) then m=1 elseif F(b,”BNa2″) then n=1 end b,i=UnitBuff(t,i),i+1 until b==nil if m==nil then
C(BNo1,0) elseif n==nil then C(BNo2,0) end end C(BNo3,0)

 

Find Buff Name

Smart buff recognition requires knowledge of the icon name of the appropriate buff, which may differ from the spell name significantly. The script below lists all buffs currently affecting your target, and these names can be used to modify a smart buffing script for better flexibility.

Quote

/script i=1; while UnitBuff(“target”,i)~=nil do DEFAULT_CHAT_FRAME:AddMessage(UnitBuff(“target”,i));
i=i+1; end

Alternatively, this script taken from the Queriable buff effects page also lists debuffs present on your target.

Quote

/script function m(s) DEFAULT_CHAT_FRAME:AddMessage(s); end for i=1,16 do s=UnitBuff(“target”, i); if(s)
then m(“B “..i..”: “..s); end s=UnitDebuff(“target”, i); if(s) then m(“D “..i..”: “..s); end end

 

Find Spell Number

Sometimes using the CastSpellByName function causes the script to exceed the 255 character limit. In such cases, it may be useful to reference the spell number as found within your spellbook and abilities. This script allows you to poke around looking for the spell number associated with a given spell.

Spells are numbered beginning with all pages found in your general abilities, followed by all pages of your first talent tree then all pages of the second talent tree etc. If you learn new spells and have referenced spells by their number in a script, you may need to revisit this script to ensure you are casting the correct spell and rank.

Guestimate approximately what the spell number might be and modify the number assigned to SpellNumber (26 in the example).

Click the script to view a local display of the spell number, name and rank “Spell 26: Arcane Explosion Rank 6″.

Line breaks (carriage returns or ) have been added for legibility only. When copied into WoW, make sure the script is one line only.

Quote

/script SpellNumber=26; SpellName,SpellRank=GetSpellName(SpellNumber,”spell”);
M=format(“Spell %d: %s %s”,SpellNumber,SpellName,SpellRank); DEFAULT_CHAT_FRAME:AddMessage(M);

Once you have the spell number, use CastSpell(spellnumber,0) to cast it. For example if Inner Fire was spell number 17 in your spellbook (as determined using the script above), you could use /script CastSpell(17,0) to cast it.

If you want to ensure that it casts only on yourself, use /script CastSpell(17,0,1).

 

Search For Spell Number

This modified version of the above script searches for spell numbers that contain a substring defined by the variable f.

Quote

/script i,s,S=1,”spell”,GetSpellName; f=”Shadow”; n,r=S(i,”spell”) repeat if strfind(n,f)~=nil
then m=format(“Spell %d: %s %s”,i,n,r); DEFAULT_CHAT_FRAME:AddMessage(m); end i=i+1; n,r=S(i,”spell”)
until n==nil

 

Immediate Cast non-global cooldown Spell

Some spells, such as Amplify Curse and Divine Favor, don’t activate the global cooldown, so it’s possible to immediately follow them with another spell. However, the user interface waits for confirmation of the spellcasting action before allowing you to cast a second spell, which can result in a pause if your connection has some lag. This macro avoids the need for a confirmation by following up with SpellStopCasting, so you can cast a second spell immediately, regardless of lag. Note that if you don’t have the listed spell (Divine Favor, in this example) in your spellbook, running this script will hang your client.

Quote

/run –CastSpellByName(“Divine Favor”)
/run local a,i,s,t,j=CastSpellByName,0,”spell”,”Divine Favor”repeat
i=i+1;j=GetSpellName(i,s)until(j==t)j=GetSpellCooldown(i,s)if(j==0)then
a(t)SpellStopCasting()end

The reason for the first line is so that the icon will show the current cooldown state for the spell correctly.

This macro can be easily modified to allow following it with another spell – append ;CastSpellByName(name_of_spell), and change the starting CastSpellByName to match so you get the cooldown and in-range information for the final spell.

Quote

/run –CastSpellByName(“Curse of Agony”)
/run local a,i,s,t,j=CastSpellByName,0,”spell”,”Amplify Curse”repeat
i=i+1;j=GetSpellName(i,s)until(j==t)j=GetSpellCooldown(i,s)if(j==0)then
a(t)SpellStopCasting()end;CastSpellByName(“Curse of Agony”)

 

Equip an item

Quote

/script PickupContainerItem(bag, slot);

bag goes from 0 to 4, and slot from 1 to 20 (depending on bag size).

For more information, go to Item equipping to see how to use items from backpacks, etc., and information on how to prevent accidental vendoring of items due to macros.
 

Change your boots to Globin Rocket Boots (by Gk-s2-)

A really simple script made by myself who changes your boots anyboot you are using to Globin Rocket Boots. Note: Change the MainHandBag and MainBagSlot to where your item are located Note: This macro should be on one line.

Quote

/script if ( not CursorHasItem() ) then PickupContainerItem(MainHandBag, MainBagSlot);
PickupInventoryItem(8); PickupInventoryItem(8); PickupContainerItem(MainHandBag, MainBagSlot); end

 

Quick Self-Bandage (by Domandred)

Quote

/target [Player Name]
/script UseContainerItem(#, #);
/script TargetLastEnemy();

Use: Really nice macro for duels or 1v1 pvp. You can stun/fear your enemy, press this and it’ll automatically bandage you without losing your target.

Problem with macro above is losing combo points for rogues. This one will do the same thing without making you lose your combo points

Quote

/script UseContainerItem(#, #)
/script SpellTargetUnit(“player”)

Another quick self-bandage from me, Kingoomie. Remember, one line.

Quote

/script if (not GetContainerItemLink(x,x)) then OpenBag([same bag number as before]); else
TargetUnit(“player”);UseContainerItem(3,15);TargetUnit(“playertarget”);if (UnitIsPlayer(“target”))
then ClearTarget() end end

Checks for an item in the slot, opens the bag if there isn’t one, uses the item (bandage, in this case) on you, targets your last target, or targets nothing if you either didn’t have a target or were targeting yourself.

 

Quick Self-Bandage (by sjefen6)

Quote

/script TargetUnit(“Player”)
/script UseAction(ActionID);
/script TargetLastEnemy();

For the ActionID, check out the table on the bottom of this chapter. In Basic this does the same as “Quick Self-Bandage by Domandred”, but finds the player automatically and uses ActionID instead of ContainerItem.
 

Use a Bandage

Quote

/script UseAction(ActionID, 0, 1);
/script if( SpellIsTargeting() ) then SpellTargetUnit(“player”); end

Bandage must be placed in the action bar at the slot given by ActionID. ActionID is a number from 1 to 120. Slot1-ActionBar1 is ActionID1, Slot12 is ActionID12, Slot1-ActionBar2 is ActionID13 and so on up to Slot12 of ActionBar10. This will bandage your target, or yourself if your current target is not a friendly target.

Here’s a different version courtesy of post by Sarf on the forums. This one will always self-bandage, even if you have a friendly player targeted. It will also re-target your original target. Note that this must all be on one line, its just split up for readability:

Quote

/script p=”player”;t=”target”;if(not UnitCanAttack(t, p))then ot=UnitName(t);TargetUnit(p);
else ot=nil;end;UseAction(ActionID);if(SpellIsTargeting())then SpellTargetUnit(p);
end if(ot) then TargetByName(ot);end

Following is another example of self bandaging that does not use scripting. THIS WILL WORK FOR COSMOS USERS ONLY. Shift-clicking on the bandage (or other item in inventory) while editing your macro will insert its name into your macro. Placing the “target” command after the “use” command maintains your primary target and also maintains your combo points for that target if you’re a Rogue.

Quote

/use Heavy Linen Bandage
/target player

Quote

/script for b=0,4 do for s=1,GetContainerNumSlots(b) do if (string.find(GetContainerItemLink(b,s) or ” “, “Heavy Runecloth Bandage”))
then TargetUnit(“player”); UseContainerItem(b,s, onSelf); TargetUnit(“playertarget”) b=4 break end end end

Note: As of WoW UI version 1300, when you use the /target command use player not “player” to target yourself. Script command /target does NOT require Cosmos mod, but the /use command does.

You may experience problems with the script above, because it uses non-standard commands. If you place your Heavy bandage in the second ActionBar slot 5 you can use this small macro to use the bandage on your self. This works regardless of whether Cosmos (or any other mod) is installed.

Quote

/script TargetUnit(“player”);
/script UseAction(17);

You have to use 17, because it is 2nd Actionbar and 5th slot ((2-1)*12+5=17).

Reference ActionID’s:

Quote

Actionbar Slot number
1: 1 2 3 4 5 6 7 8 9 10 11 12
2: 13 14 15 16 17 18 19 20 21 22 23 24
3: 25 26 27 28 29 30 31 32 33 34 35 36
4: 37 38 39 40 41 42 43 44 45 46 47 48
5: 49 50 51 52 53 54 55 56 57 58 59 60
6: 61 62 63 64 65 66 67 68 69 70 71 72

 

Use a Trinket/Item

Quote

/script UseInventoryItem(13)

Use: Pops the trinket you have equipped in the first trinket slot. This way if you have several “on use” trinkets you can control any of them with a single button instead of creating multiple buttons for each trinket, as long as the trinket is in the appropriate slot.

For the second trinket slot, substitute (14).

For other “on use” inventory items, substitute the number corresponding to the InventorySlotId.

 

Sharpen / Apply Poison to Weapon (by Arag)

Quote

/script UseContainerItem (#,#);
/script PickupInventoryItem (16);

Use: Simply press a button and use a Sharpening or Weight stone, or apply a poison. Example: Press a button, sharpen your weapon. Change the 16 or 17 to do it for a secondary weapon. For the #’s on the first line, please refer to “Understanding Location” in section 6.

Sell all the poor items in your bags (by Haw)

 

This macro will sell your poor items, when used at a vendor. Rember to put it in one line.

Quote

/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag),
1 do local name = GetContainerItemLink(bag,slot); if name and
string.find(name,”ff9d9d9d”) then DEFAULT_CHAT_FRAME:AddMessage(“Selling “..name);
UseContainerItem(bag,slot) end; end; end

 

Clean bags of poor items (by Flowers)

This will delete all poor quality items from your bags. There will be no confirmation dialog – the items will simply vanish. Note that it needs to be on one line, as usual. (/run is a synonym for /script.)

Quote

/run ClearCursor()local g,i,j,s,a,b=gsub;for i=0,4 do for
j=1,GetContainerNumSlots(i)do s=GetContainerItemLink(i,j)if(s)then
a,b,s=GetItemInfo(g(g(s,”.*\124H”,”"),”\124h.*”,”"))if(s==0)then
PickupContainerItem(i,j)DeleteCursorItem()end;end;end;end

 

Strip all gear with durability (by Flowers)

For those times when you’re not in combat, but about to die anyway (like falling a long distance), this will at least protect your gear (or as much of it as there’s room for in your bags (your backpack will not be used)). Also useful at the right sort of parties. Optimizers can rearrange the slot list to put the most expensive to repair items first. As usual, it needs to be one (really long) line – be careful entering it, as it’s exactly 255 characters long.

Quote

/run ClearCursor()local k;for i=1,4 do for j=1,GetContainerNumSlots(i)do if(not
GetContainerItemLink(i,j))then repeat k,l=next({1,3,5,6,7,8,9,10,16,17,18},k)if(not
k)then return;end;PickupInventoryItem(l)until(CursorHasItem())
PutItemInBag(i+19)end;end;end

 

Switching Hotbars

Quote

/script CURRENT_ACTIONBAR_PAGE = X;
/script ChangeActionBarPage();

Where X is the Hotbar number

Example

Quote

/script CURRENT_ACTIONBAR_PAGE = 1;
/script ChangeActionBarPage(); == Macro Frame Toggling ==
/script if ( not MacroFrame:IsVisible() ) then ShowUIPanel(MacroFrame);
else HideUIPanel(MacroFrame); end;

 

Set Video World Environment Variables

Sometimes when you are in a high-traffic area (Ironforge or Orgrimmar in particular), RAM and processors get bogged down. One way to help your computer is to adjust the video settings to improve performance. You can put these macros into hot bars and bind to keys for easy switching, e.g. Shift-\, \, and Ctrl-\ for High, Medium, and Low Res. These don’t change the actual resolution of the screen, only the level of detail. low res is very good for the Auction House / Bank areas. Also, if your UI needs reset (the rendering isn’t working), just switch from one to another.

HighRes:

Quote

/z SetFarclip(777)
/z SetWorldDetail(2)
/z SetBaseMip(1)

MediumRes:

Quote

/z SetFarclip(477)
/z SetWorldDetail(1)
/z SetBaseMip(1)

LowRes:

Quote

/z SetFarclip(177)
/z SetWorldDetail(0)
/z SetBaseMip(0)

 

Full-screen to windowed mode

I found this handy for working on macros/scripts while having reference material next to me (ie these web pages and others ;). This will switch your game between full-screen, full-colour, and a smaller windowed mode. There are some assumptions, you need to replace the index numbers for your own setting – for me, I run WoW in 1600×1200 32bit full anti-aliasing when full-screen, 1024×768 16bit 1xanti-aliasing when in window. The index numbers can be calculated by going to video options and counting the items on the drop-down.

Note: The bit between “/script” and “/console” must all be on one line (ie there should be a line starting “/script” and a line starting “/console” and that’s it), it’s broken up for readability.

SwitchMode:

Quote

/script currentRes = GetCurrentResolution(); if (currentRes == 3)
then SetScreenResolution(15); SetCVar(“gxWindow”, 0); SetMultisampleFormat(16);
else SetCVar(“gxWindow”, 1); SetScreenResolution(3); SetMultisampleFormat(1); end;

Replace the “15″ in SetScreenResolution with your selected high-res index, the “16″ in SetMultisampleFormat with your selected colour depth/anti-aliasing, and the “3″ in Set/GetScreenResolution with your preferred windowed res. To finish this one off, drop it into a popup button and go to key bindings, link in “alt-enter”. That way, alt-enter will alternate between windowed and full-screen. You can also work in any of the above Farclip etc calls to further alter the settings between windowed and full-screen, depending on how your machine behaves – experiment and see.

Note also, I’m using GetCurrentResolution. I’d rather use GetCVar(“gxWindow”), but I got very unreliable results from that – not sure why.
 

Toggle Name Display

I like to shut off player names when I take screen shots, so here is what I use:

Quote

/script if ( GetCVar(“UnitNamePlayer”) == “1″ ) then SetCVar(“UnitNamePlayer”,0) else SetCVar(“UnitNamePlayer”,1) end

And for shutting off the NPC names I use this:

Quote

/script if ( GetCVar(“UnitNameNPC”) == “1″ ) then SetCVar(“UnitNameNPC”,0) else SetCVar(“UnitNameNPC”,1) end

 

Global Tell Variable

If you have multiple scripts that send tells (“Sheeping Lynk”, “Heal Lynk”, etc.) it may be useful to have each script reference a global variable that is changed by a single script. Kind of a click once, change em all scenario.

This script sets a global variable PR (Party/Raid) to an appropriate channel based on raid, party or solo membership.

Just click the script to set a global variable that can be referenced by other scripts.

Line breaks (carriage returns or ) have been added for legibility only. When copied into WoW, make sure the script is one line only.

Quote

/script if (GetNumRaidMembers() > 0) then PR = “Raid”; elseif (GetNumPartyMembers() > 0)
then PR = “Party”; else PR = “Say”; end;

In your scripts, transpose “Say”, “Raid”, “Party” for PR.

Quote

/script SendChatMessage(“Lynk is a noob”,PR);

Lynk – Gilneas

 

Select and Auto-attack nearest enemy

This macro is useful for all melee classes. Useful for selecting and auto attacking nearest target, equivalent of pressing Tab, then T by default key bindings with just one key stroke. Hit it multiple times to switch between engaged enemies. It’s useful enough to rebind Tab or Space bar to it.

Quote

/script AttackTarget();
/script TargetNearestEnemy();

 

Help Tank Character

If you are in a group and fighting a larger group of enemies, and your group tank character is already fighting an enemy, you may not want to attack one which did not have Aggro yet. Select your group tank via key [F] and execute the following macro.

Quote

/assist %t
/script AttackTarget();

If you’re a beginning macro user the above is ok, Better to skip the ‘F’ key and type in the player name in the above. Not sure the AttackTarget(); is safe. But that’s getting into Tactics, so see the Instance Grouping Guide Main Assist page.

A more advanced method of this is to pre-select a player as the “main assist” and have your macro assist that player throughout the duration of the party. The simple method is to replace %t with the name of that player and edit your macro when needed.

Main assist also works for everyday group play, but editing a macro and typing in a player’s name may not be possible in all situations. If you are willing to sacrifice two macros and action bar slots, you can automate things with the following two macros:

—- Set Main Assist —-

Quote

/script LeaderPlayerName = UnitName(“target”) or UnitName(“party1″) or “”;
/script DEFAULT_CHAT_FRAME:AddMessage(“######## Set main assist to: ” .. LeaderPlayerName);

—- Assist Main Assist Player —-

Quote

/script AssistByName(LeaderPlayerName or UnitName(“party1″) or UnitName(“player”));
/script DEFAULT_CHAT_FRAME:AddMessage(“######## Assisting “.. LeaderPlayerName .. ” with target ” .. (UnitName(“target”) or “NO TARGET”));

Use the “Set” macro when you have your main assist player selected and want to switch your assist macro to use that player. If no player is selected and you are in a party, the first other party member will be selected. If you are not in a party and not target is selected, you will assist yourself, which is somewhat redundant, but harmless.

To save macro and action bar space, you can combine the two macros in the following script. To set the main assist player, hold down the control key while activating this macro. The version that fits into a 255 character macro is given below and it is somewhat obfuscated:

Quote

/script p=PAsi or”"u=UnitName;t=”target”c=IsControlKeyDown()if(c)then p=u(t)or u(“party1″)or”"else AssistByName(p)end;DEFAULT_CHAT_FRAME:AddMessage(“######## “..(c and(“Set assist: “..p)or(“Assisting “..p..” with “..(u(t)or”NO TARGET”))))PAsi=p

Here’s the same script with extra spacing and punctuation added for clarity:

—- Main Assist Utility (Version 1.0.1 by Tiga) —-

/script
p=PAsi or"";
u=UnitName;
t="target";
c=IsControlKeyDown();

if(c) then
  p=u(t) or u("party1") or ""
else
 AssistByName(p)
end;

DEFAULT_CHAT_FRAME:AddMessage("######## "..
    (c and
        ("Set assist: "..p)
     or
        ("Assisting "..p.." with "..(u(t) or "NO TARGET"))));

PAsi=p;

 

Assist Main Tank/Main Assist

This script sets your Main Tank or Main Assist for assists and assists the MT/MA all-in-one.

If no MT/MA has been set and you Click the script, you will receive a message stating so “Set MT Noob!”.

If you click the script while holding down the Alt key, you will receive a message stating the MT/MA has been set: “MT Set: [Bob]“.

If you have set your MT/MA and click the script, you will target your MT/MA’s target.

(This macro should be on one line.)

Quote

/script if (IsAltKeyDown() and UnitIsFriend(“player”,”target”)) then MT=UnitName(“target”);
DEFAULT_CHAT_FRAME:AddMessage(‘MT Set: ['..MT..']‘); elseif (MT ~= nil) then AssistByName(MT);
else DEFAULT_CHAT_FRAME:AddMessage(‘Set MT Noob!’); end;

Lynk – Gilneas

 

Target Memory

The following macro memorizes players and mobs by name. Remembering mobs by name can be a problem if there are several with the exact same name in the area (you will often target the wrong mob). Because of this, this macro should only be used in PvP and when you are fighting a unique boss mob with unique sidekicks.

Hold down control to memorize a target.

To recall a memorized target, use the key without modifiers.

Hold down shift to cast a Polymorph spell on the memorized target.

Alt is ignored, so you can bind this to an alt key combination.

To have multiple memorized targets, edit the Tg1 variable name in the three places where it is mentioned. Note that the short version below uses “ChatFrame1″ instead of “DEFAULT_CHAT_FRAME” to save a few characters to allow for longer spell and skill names than Polymorph. The human-readable version is given below the compact/obfuscated version.

Quote

/script t=Tg1 or”"c=IsControlKeyDown()if(c)then t=UnitName(“target”)or”"else TargetByName(t)if(IsShiftKeyDown())then CastSpellByName(‘Polymorph’)end end ChatFrame1:AddMessage(“######## “..(c and(“Tg1 set to: “..t)or(“Targeting: “..t)))Tg1=t

—- Target Memory Utility (Version 1.0.1 by Tiga) —-

/script
t=Tg1 or""
c=IsControlKeyDown()

if(c) then
  t=UnitName("target")or""
else
  TargetByName(t)

  if(IsShiftKeyDown()) then
    CastSpellByName('Polymorph')
  end
end

DEFAULT_CHAT_FRAME:AddMessage("######## "..
    (c and
       ("Tg1 set to: "..t)
     or
       ("Targeting: "..t)))

Tg1=t

 

Kill totems

This can be used to destroy any totem, and is obviously designed for druids. Naturally you can change the last line to /shoot which is especially good for someone with a wand. Whether it will fit in the same macro or not, I’m not certain, but you might also want to add lines to target Dark Iron Dwarf mines as well. I can’t think of anything else like it. The following is from Talashandy, cited by Alex .

Quote

/target Totem
/cast Moonfire(Rank 1)

Here is a bit more programmy way of doing the same thing. Remember to remove the lines breaks.

/script u=UnitName;
s=strfind;
t="target";
for i = 1,10,1 do TargetNearestEnemy()
if (not UnitCanAttack("player",t))then 
break;
end;
if ((s(u(t),"Totem") or s(u(t),"Ward")) and not s(UnitCreatureType(t),"Human")) then 
CastSpellByName("Shoot");
break;
end;
end;

 

Timer

Simple script to track the time elapsed from a set point in time.

1. Clicking the script while holding the Alt key down will begin the timer and state so.
E.g. "Timer Set: [Instance Start]".

2. Clicking the script without any additional keys thereafter will yield the time elapsed.
E.g. "Time Elapsed - [Instance Start]: 00h:01m19s".

If you click the script without holding the Alt key first, you will receive an interface error. If you log off for whatever reason,

your timer will be erased. Change "Say" to whatever channel you want "Party", "Raid", "Guild", etc.

Quote

/script if IsAltKeyDown() then L1=”Instance Start”; T1=GetTime(); M=format(“Timer Set [%s]“,L1); else N=GetTime(); D=N-T1; M=format(“Time Elapsed – [%s]: %02dh:%02dm:%02ds”,L1, D/3600,mod((D/60),60), mod(D,60)); end; SendChatMessage(M,”SAY”);

About script variables

L1 (Label) – Holds the label for the timer. If you have script space, you can copy this script and change L1 to L2, L3 etc. creating multiple timers each with different labels (Core Hound 1, Core Hound 2 etc.)

T1 (Time) – Holds the base time from which time elapsed is computed. For multiple scripts, change T1 to T2, T3 etc.

M (Message) – Temporary variable to hold message formatting.

N (Now) – Temporary variable to hold the current time. Used in computation.

 

Pet Attack

Quote

/script PetAttack();

A useful extension of this is to have your pet begin assisting your main tank with one button. You could also add a fourth line that casts one of your spells so that you begin fighting too.

Quote

/target player
/assist
/script PetAttack();

Attack with Dash:
(where Dash is the 4th icon on the pet bar)

Quote

/script PetAttack(); CastPetAction(4);

 

Pet Passive

Quote

/script PetPassiveMode();

This is really useful in a Scatter Shot macro:

Quote

/script PetPassiveMode();
/cast Scatter Shot

If you use above macro when 5 mobs are attacking your pet at the same time, you pet just comes running to you, so all the mobs will be out of gun/bow range.

If you use the following macro, your pet will start attacking the first mob that attacks him (not the scattershotted one) and he should stay virtually in place.

Quote

/script PetPassiveMode();
/cast Scatter Shot
/script PetDefensiveMode();

 

Summary of Commands

Quote

/script PetAggressiveMode();
/script PetDefensiveMode();
/script PetPassiveMode();
/script PetFollow();
/script PetAttack();
/script PetStopAttack();

and

Quote

/script CastPetAction(X);

with X being a number on the pet’s action bar (1, 2, 3…)

 

Local Server time

Quote

/script hour,min=GetGameTime()
/script DEFAULT_CHAT_FRAME:AddMessage(format(“Server time is %s:%s”,hour,min));

 

Location

Quote

/script px,py=GetPlayerMapPosition(“player”)
/script DEFAULT_CHAT_FRAME:AddMessage(format(“[ %s ] %s , %s”,GetZoneText(),px,py));

Value will be between 0,0 (Top Left corner of current map) and 1,1 (Bottom Right)

A variant that gives a value between 0 and 100, and reduces it to 1 decimal place:

Quote

/script px,py=GetPlayerMapPosition(“player”)
/script DEFAULT_CHAT_FRAME:AddMessage(format(“%s: %.1f, %.1f”,GetZoneText(),px*100,py*100));

 

Change Action Bar Page

Quote

/script CURRENT_ACTIONBAR_PAGE = X;
/script ChangeActionBarPage();

Use: Replace “X” with the action bar page number, and by pressing this, it’ll automatically change. Example: You have two of these, both set on the “=” on page 1 and 2, and have page 1′s set to change to page 2, and vice versa. Whenever you press “=”, it’ll toggle between page 1 and 2.

The below macro one does the same thing as the one above, but without the need for two separate macros. It will just switch back and forth between action bar 1 and action bar 4.

Quote

/script if (CURRENT_ACTIONBAR_PAGE == 1) then CURRENT_ACTIONBAR_PAGE = 4; else CURRENT_ACTIONBAR_PAGE = 1; end; ChangeActionBarPage();

 

Say Quest Objectives

Quote

/script i = GetNumQuestLeaderBoards(); for j = 1, i, 1 do a1, a2, a3 = GetQuestLogLeaderBoard(j); SendChatMessage(a1, “PARTY”); end;

Use: Sends your current quest objectives to your party. This way, you don’t have to constantly type to party members how many of each creature you need to complete a quest.

 

Turn In Quest Items

Quote

/script SelectGossipAvailableQuest(1); CompleteQuest(); GetQuestReward();

Use: This is usable at almost any quest giver with a blue question mark. It’s especially useful for doing Dark Iron Residue turn ins for Thorium Brotherhood faction. Some of these quest givers offer multiple quests. To have the macro select a quest besides the first one, simply change the number in the parentheses.

 

Useful links

 

TBC and above like conditionals for cast macros

LUA tips, chat & raid macros

Vanilla wow macros

Macros For Dummies

Complete list of every addon or macro function

Edited by meridaw

Share this post


Link to post
Share on other sites

I'd add

https://forum.elysium-project.org/topic/51074-blessings-macros/

https://forum.elysium-project.org/topic/49250-dr-druidmacros/#comment-412309

Also a nice countdown macro some asked me some time ago on discord:
Extended lua:

Spoiler
if CountdownMacro == nil then
    CountdownMacro = CreateFrame("frame")
    CountdownMacro.cds = {}
end

local function update()
    for k,cd in this.cds do
        cd.timer = cd.timer + arg1
        if cd.timer >= 1 then
            if cd.n == 0 then
                SendChatMessage(cd.final,cd.chat,nil,cd.target)
            else
                SendChatMessage(format(cd.text,cd.n),cd.chat,nil,cd.target)
            end
            cd.timer = 1 - cd.timer
            cd.n = cd.n - 1
            if cd.n < 0 then
                this.cds[k] = nil
            end
        end
    end
end

CountdownMacro:SetScript("OnUpdate", update)

function CountdownMacro:Start(name, text, final, chat, counts, target)
    self.cds[name] = {text = text, final = final, chat = chat, n = counts, target = target, timer = 1}
end

function CountdownMacro:Stop(name, aborted, chat, target)
    self.cds[name] = nil
    SendChatMessage(aborted,chat,nil,target)
end

function CountdownMacro:Toggle(name, text, final, aborted, chat, counts, target)
    if self.cds[name] then
        self:Stop(name, aborted, chat, target)
    else
        self:Start(name, text, final, chat, counts, target)
    end
end

 

 

Macro (re-clickable to abort the countdown)

/run CountdownMacro:Toggle("pull","Pulling in %d secs!","=== PULLING ===","ABORTED","SAY",5)

 

Share this post


Link to post
Share on other sites

DRUID

Is there a way (with ext lua supermacro) to do something like below

Macro1:
(1)Ravage/Shred (if stealthed/behind target)
(2)Claw and Ferocious Bite (at 4 points)
(3)if targets is unbuffed and energy lower than 35 cast FFF 

(or maybe limit it down to 2 macros? Ravage/Shred + FFF (if lower than 35 Energy) or fff in claw/bite macro

so it really becomes a 1buttonmash used for pve grind

and maybe a diffrent macro for bear
Macro2:
(1)Charge
(2)Maul
(3)Faerie Fire (if unbuffed)


and 
Macro3:
(1)Cast MotW on yourself if no target if unbuffed
(2)Cast Thorns on yourself if no target if unbuffed
 

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

and
Faerie Fire in any form
/script i=1;m=0;while(UnitBuff("player",i)~=nil) do if(strfind(UnitBuff("player",i),"Form")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==1) then c("Faerie Fire (Feral)()");else c("Faerie Fire(Rank 4)");end;

and 

Ravage and Shred auto select
/script i=1;m=0;while(UnitBuff("player",i)~=nil) do if(strfind(UnitBuff("player",i),"Ability_Ambush")~=nil) then m=1; end;i=i+1;end; c=CastSpellByName; if(m==1) then c("Ravage(rank 4)");else c("Shred(rank 5)");end;

Edited by LFMilk91

Share this post


Link to post
Share on other sites

Be sure to remove all "?" in the macro text, after you copy a macro over to the macro window.

Share this post


Link to post
Share on other sites

Hello there,

 

Im running in to Problems trying to use this Macro in Vanilla:

/script if UnitPowerType(“target”)==0 then CastSpellByName(“Viper Sting”) else CastSpellByName(“Serpent Sting”); end

 

its supposed to check if the target has Mana if yes it is supposed to cast Viper Sting, if not it is supposed to cast Serpent Sting. When i try to use this Macro i get this error message:

0PEL1Bx.png

anyone got a clue what im doing wrong?

 

thankx in advance!

 

Share this post


Link to post
Share on other sites

try this

/script if UnitPowerType("target")==0 then CastSpellByName("Viper Sting") else CastSpellByName("Serpent Sting"); end

 

Share this post


Link to post
Share on other sites
1 hour ago, meridaw said:

try this

/script if UnitPowerType("target")==0 then CastSpellByName("Viper Sting") else CastSpellByName("Serpent Sting"); end

 

wow thankx for the quick response!

now i dont get the error message anymore but it still doesnt work and in my chat log it says "type `/help` for a listing of a few commands"

i cant identify my mistake

 

5I1cZTG.png

Share this post


Link to post
Share on other sites

maybe this

/run if (UnitPowerType('target')==0)then CastSpellByName("Viper Sting")else CastSpellByName("Serpent Sting");end

 

Share this post


Link to post
Share on other sites
1 hour ago, meridaw said:

maybe this

/run if (UnitPowerType('target')==0)then CastSpellByName("Viper Sting")else CastSpellByName("Serpent Sting");end

 

this worked like a charm! thankx!

any clue why it has to be "run" instead of "script"?

 

now a minor problem i could live with is that it only works 100% on actual players. on mobs without ressource it allways casts viper sting aswel

this would be no biggie as i use this mainly for pvp anyways but is there any smart way to go about this to make it work on mobs too? would even be fine if it alllways used serpent sting on mobs.

anyways my main problem is solved. thankx again!

Share this post


Link to post
Share on other sites
1 hour ago, meridaw said:

run and script is the same

now after it worked with run i replaced run with script again and it still works. no clue what went wrong there in the first place but whatever.

in case you can be bothered for another question:

so this is working fine now on players:

/script if UnitPowerType("target")==0 then CastSpellByName("Viper Sting") else CastSpellByName("Serpent Sting") end

now im thinking about if there is a way to modify it so it doesnt only check if the target has mana but also if it is a player. something like this:

if the target is a Player -and- has Mana cast "Viper Sting" -else- cast "Serpent Sting"

is there a command that checks the target for wether it is an actual player or an npc ? i googled for good 30 minutes but couldnt find anything.

 

edit:

i found

(UnitIsPlayer(UnitId))

 

but not sure how to work it in.

 

Edited by maomao

Share this post


Link to post
Share on other sites
/run if (UnitPowerType('target')==0) and UnitPlayerControlled("target") then CastSpellByName("Viper Sting")else CastSpellByName("Serpent Sting")end

 

Share this post


Link to post
Share on other sites
10 hours ago, meridaw said:
/run if (UnitPowerType('target')==0) and UnitPlayerControlled("target") then CastSpellByName("Viper Sting")else CastSpellByName("Serpent Sting")end

  

that worked like a charm. thankx again!

Share this post


Link to post
Share on other sites
Quote

/run if n == nil then n=0 end if n==0 then CastSpellByName("Demon Armor") n=n+1 elseif n==1 then CastSpellByName("Soul Link") n=n+1 else CastSpellByName("Life Tap) n=0 end

Tried to use this and I get this lua.error when I press it 

 

Message: [string "if n == nil then n=0 end if n==0 then CastSpellByName("Demon Ar..."]:1: unfinished string near `<eof>'
Time: 02/11/19 14:52:01
Count: 1
Stack: [C]: ?
[C]: in function `RunScript'
Interface\FrameXML\ChatFrame.lua:1075: in function `value'
Interface\FrameXML\ChatFrame.lua:2170: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:1941: in function `ChatEdit_SendText'
Interface\AddOns\SuperMacro\SuperMacro.lua:768: in function `RunLine'
Interface\AddOns\SuperMacro\SuperMacro.lua:721: in function `RunSuperMacro'
Interface\AddOns\SuperMacro\SM_Super.lua:78: in function `UseAction'
...ns\LunaUnitFrames\libs\HealComm-1.0\HealComm-1.0.lua:1720: in function <...ns\LunaUnitFrames\libs\HealComm-1.0\HealComm-1.0.lua:1715>
(tail call): ?
[string "ActionButton9:OnClick"]:8: in main chunk
Interface\AddOns\SuperMacro\SuperMacro.lua:988: in function <Interface\AddOns\SuperMacro\SuperMacro.lua:986>

 

No exp in .lua or vanilla macro writing. Would really appreciate some help in getting this macro to work. I am using supermacro.

 

 
Quote

/script if not buffed("Corruption", 'target') then cast("Corruption") else if not buffed("Curse of Agony", 'target') then cast("Curse of Agony") else if not buffed("Immolate",'target') then cast("Immolate") end end end

Also, is there anyway to make this work with another WL in group?

Edited by Hexxagon
Further question

Share this post


Link to post
Share on other sites

This one should work with SuperMacro:

Quote

/run if not buffed("Demon Armor", 'player') then cast("Demon Armor") else if not buffed("Soul Link", 'player') then cast("Soul Link") else cast("Life Tap")end end

Sadly macros can't check if debuffs are from you or another warlock in vanilla.

Share this post


Link to post
Share on other sites

Ok, thanks. Another question then. Is there any way to make this reset on a new target or after X seconds? Or was that not a thing in vanilla either? Appreciate the speedy reply!

On 8/1/2017 at 5:12 PM, meridaw said:
Quote

/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])

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×