/run for i=0,4 do for j=1,GetContainerNumSlots(i) do if GetContainerItemLink(i,j) then if string.find(GetContainerItemLink(i,j),"Dagger") then PickupContainerItem(i,j) AutoEquipCursorItem() break end end end end
Automatic equipment, case sensitive exact or partial item names
equipslot (offhand)
/run for i=0,4 do for j=1,GetContainerNumSlots(i) do if GetContainerItemLink(i,j) then if string.find(GetContainerItemLink(i,j),"Dagger") then PickupContainerItem(i,j) EquipCursorItem(17) break end end end end
/run if not IsCurrentAction(60) then UseAction(60) end if UnitHealth("target")==0 then ClearTarget() end
60 is Attack spell placed in Action Bar Slot 60 (at the end of Buttom Right Action Bar)
Action bar slots
ActionBar page 1: slots 1 to 12 -- Note exceptions below for other classes
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
Warrior Bonus Action Bars
ActionBar page 1 Battle Stance: slots 73 to 84
ActionBar page 1 Defensive Stance: slots 85 to 96
ActionBar page 1 Berserker Stance: slots 97 to 108
Druid Bonus Action Bars
ActionBar page 1 Cat Form: slots 73 to 84
ActionBar page 1 Prowl: slots 85 to 96
ActionBar page 1 Bear Form: slots 97 to 108
ActionBar page 1 Moonkin Form: slots 109 to 120
Rogue Bonus Action Bars
ActionBar page 1 Stealth: slots 73 to 84
ActionBar page 1 Shadow Dance: slots 85 to 96
Priest Bonus Action Bars
ActionBar page 1 Shadowform: slots 73 to 84
Target Possessed Action Bar
ActionBar page 1 Possess: slots 121-132
spammable Hunter Auto Shot/auto attack
/run if not IsAutoRepeatAction(3) then if not IsCurrentAction(1) then AttackTarget() end UseAction(3) end
1 is Attack spell placed in Action Bar Slot 1
3 is for Auto Shot spell being placed in Action Bar Slot 3
shift out of any Druid form
/run for i=1, GetNumShapeshiftForms() do if ({GetShapeshiftFormInfo(i)})[3] then CastShapeshiftForm(i) end end
spammable Druid forms
/run for i=1,5 do if not ({GetShapeshiftFormInfo(2)})[3] then if ({GetShapeshiftFormInfo(i)})[3] then CastShapeshiftForm(i) end CastShapeshiftForm(2) end end
Shapeshift Forms go from left to right: 1 is Bear, 2 is Cat, etc
mass delete item
/run for i=0,4 do for j=1,GetContainerNumSlots(i) do if GetContainerItemLink(i,j) then if string.find(GetContainerItemLink(i,j),"Torch") then PickupContainerItem(i,j) DeleteCursorItem() end end end end
Thanks for that hunter attack macro, not used to this macro system yet. :)
/run if not IsAutoRepeatAction(3) then if not IsCurrentAction(1) then AttackTarget() end UseAction(3) end
Is it possible via Macro check existing spell in the spellbook and according to that to cast coresponding spell?
For example if I as a mage with frost spec have Ice Barrier in spell book, I will cast Frostbolt, otherwise cast Scroch.
Is it possible via Macro check existing spell in the spellbook and according to that to cast coresponding spell?
For example if I as a mage with frost spec have Ice Barrier in spell book, I will cast Frostbolt, otherwise cast Scroch.
You are doing it wrong. Use addons such as SimpleActionSets or ActionBarProfiles for what you want to achieve.
/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), "Torch")then PickupContainerItem(b,s)DeleteCursorItem();end end end end
/run CastSpellByName("Survival") for r=1,GetNumTradeSkills() do if GetTradeSkillInfo(r) == "Traveler's Tent" then DoTradeSkill(r,1) break end end CloseTradeSkill()
Hello,
I didnt find any macro post to ask for this, sorry if i offtopic a bit.
I need a macro to cast a buff on my toon UNLESS i already have that buff.
E.g. I press the macro for battle shout, it will cast it unless i already have it on me
Thanks
/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
/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