[LuaNinja] BM Hunter Macro menu

Shout-Out

User Tag List

Results 1 to 15 of 15
  1. #1
    MrMemento's Avatar Corporal
    Reputation
    9
    Join Date
    Jan 2010
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [LuaNinja] BM Hunter Macro

    Yo,

    Here's my macro for when I'm leveling my hunter. The logic used is:

    1. if the pet exists make the pet attack your current target.
    2. if the pet is active and has under 90% health or the talent Improved Mend Pet have atleast 1 point and the pet have a Curse, Disease, Magic or Poison effect, try to cast Mend pet.
    3. if the target don't have Hunter's mark, cast Hunter's Mark.
    4. if target isn't in melee range and current aspect is Aspect of the Monkey
      1. if player's mana is under 25%, change to Aspect of the Viper
      2. if player's mana is over or equal to 25%, change ot Aspect of the Hawk (Will prio Dragonhawk)
    5. if the player's mana is
      1. Under 25%, change to Aspect of the Viper.
      2. Over 90%, change to Aspect of the Hawk (Will prio Dragonhawk)
    6. if the target's health is 20% or under, try to cast Kill Shot.
    7. if the target is within 11yrds but not melee range, try to cast Concussive Shot
    8. if the target can be affected by Serpent Sting, and don't have it, try to cast Serpent Sting. (At the moment it will not cast Serpent Sting on Elementals or Mechanical targets)
    9. if the player is standing still and Multi-Shot is ready, try to cast Multi-Shot.
    10. if Arcane Shot is ready and in range, try to cast Arcane Shot.
    11. if the pet is active and alive and Kill Command is ready, try to cast Kill Command.
    12. if the player is standing still and Steady Shot is ready, try to cast Steady Shot.
    13. if the target is in melee range and...
      1. Player's health is under 20%, try to cast Deterrence
      2. Target don't have Wing Clip, try to cast Wing Clip.
      3. Raptor Strike is ready, try to cast Raptor Strike.
      4. Mongoose Bite is ready, try to cast Mongoose Bite.
      5. Change to Aspect of the Monkey if its not the current Aspect.


    Code:
    /run if IsUsableSpell("Aspect of the Dragonhawk")==1 then vAotH="Aspect of the Dragonhawk" else vAotH="Aspect of the Hawk" end
    /run cA={"/cast ","/cast [exists,harm,nodead] "};
    /run tA={"target","player","pet","focus"};
    /run mA={"Raptor Strike","Mongoose Bite","Wing Clip","Deterrence"};
    /run rA={"Concussive Shot","Arcane Shot","Steady Shot","Multi-Shot","Kill Shot","Serpent Sting"};
    /run oA={"Kill Command","Intimidation","Mend Pet","Hunter's Mark"};
    /run aA={"Aspect of the Monkey","Aspect of the Viper",vAotH};
    /run lT={"Improved Mend Pet"};
    /run dT={"Curse","Disease","Magic","Poison"};
    /run tT=UnitCreatureType(tA[1]);tL=UnitLevel(tA[1]);
    /run numBMTalents=GetNumTalents(1,false,false);
    /run aBSS=1;if (tT=="Elemental" or tT=="Mechanical") then aBSS=0 end
    /run hSS=0;i=1;while(i<=40) do a={UnitDebuff(tA[1],i)} if(a[1]==rA[6] and a[8]==tA[2]) then hSS=1 break else i=i+1 end end
    /run hHM=0;i=1;while(i<=40) do a={UnitDebuff(tA[1],i)} if(a[1]==oA[4] and a[8]==tA[2]) then hHM=1 break else i=i+1 end end
    /run hWC=0;i=1;while(i<=40) do a={UnitDebuff(tA[1],i)} if(a[1]==mA[3] and a[8]==tA[2]) then hWC=1 break else i=i+1 end end
    /run hPD=0;i=1;while(i<=40) do a={UnitDebuff(tA[3],i)} if(a[5]==dT[1] or a[5]==dT[2] or a[5]==dT[3] or a[5]==dT[4]) then hPD=1 break else i=i+1 end end
    /run hIMP=0;i=1;while(i<=numBMTalents) do t={GetTalentInfo(1,i,false,false)} if(t[1]==lT[1] and t[5]>0) then hIMP=1 break else i=i+1 end end
    /run playerMana=UnitMana(tA[2])/UnitManaMax(tA[2]);playerHealth=UnitHealth(tA[2])/UnitHealthMax(tA[2]);playerSpeed=GetUnitSpeed(tA[2]);
    /run petHealth=UnitHealth(tA[3])/UnitHealthMax(tA[3]);_,petActive=HasPetUI();petIsDead=UnitIsDeadOrGhost(tA[3]);
    /run targetHealth=UnitHealth(tA[1])/UnitHealthMax(tA[1]);
    /petattack [exists,harm,nodead]
    /run if petActive==1 and (petHealth<0.9 or (hPD==1 and hIMP==1)) and not UnitBuff(tA[3],oA[3]) and IsSpellInRange(oA[3],tA[3])==1 and IsUsableSpell(oA[3])==1 and GetSpellCooldown(oA[3])==0 then RunMacroText(cA[1]..oA[3]) end
    /run if hHM==0 and IsSpellInRange(oA[4],tA[1])==1 and GetSpellCooldown(oA[4])==0 and IsUsableSpell(oA[4])==1 then RunMacroText(cA[2]..oA[4]) end
    /run if not (UnitBuff(tA[2],aA[3]) or UnitBuff(tA[2],aA[2])) and IsSpellInRange(mA[2],tA[1])==0 and IsUsableSpell(aA[3])==1 and GetSpellCooldown(aA[3])==0 and playerMana>=0.25 then RunMacroText(cA[1]..aA[3]) end
    /run if not (UnitBuff(tA[2],aA[3]) or UnitBuff(tA[2],aA[2])) and IsSpellInRange(mA[2],tA[1])==0 and IsUsableSpell(aA[3])==1 and GetSpellCooldown(aA[3])==0 and playerMana<0.25 then RunMacroText(cA[1]..aA[2]) end
    /run if playerMana<0.25 and not UnitBuff(tA[2],aA[2]) and IsSpellInRange(mA[2],tA[1])==0 and IsUsableSpell(aA[2])==1 and GetSpellCooldown(aA[2])==0 then RunMacroText(cA[1]..aA[2]) end
    /run if playerMana>0.90 and not UnitBuff(tA[2],aA[3]) and IsSpellInRange(mA[2],tA[1])==0 and IsUsableSpell(aA[3])==1 and GetSpellCooldown(aA[3])==0 then RunMacroText(cA[1]..aA[3]) end
    /run if targetHealth<0.21 and IsSpellInRange(rA[5],tA[1]) and IsUsableSpell(rA[5])==1 and GetSpellCooldown(rA[5])==0 then RunMacroText(cA[2]..rA[5]) end
    /run if IsUsableSpell(rA[1])==1 and GetSpellCooldown(rA[1])==0 and IsSpellInRange(mA[2],tA[1])==0 and CheckInteractDistance(tA[1],2) then RunMacroText(cA[2]..rA[1]) end
    /run if hSS==0 and aBSS==1 and IsSpellInRange(rA[6],tA[1])==1 and GetSpellCooldown(rA[6])==0 and IsUsableSpell(rA[6])==1 then RunMacroText(cA[2]..rA[6]) end
    /run if playerSpeed==0 and IsUsableSpell(rA[4])==1 and GetSpellCooldown(rA[4])==0 and IsSpellInRange(rA[4],tA[1])==1 then RunMacroText(cA[2]..rA[4]) end
    /run if IsUsableSpell(rA[2])==1 and GetSpellCooldown(rA[2])==0 and IsSpellInRange(rA[2],tA[1])==1 then RunMacroText(cA[2]..rA[2]) end
    /run if petActive==1 and petIsDead==0 and IsUsableSpell(oA[1])==1 and GetSpellCooldown(oA[1])==0 then RunMacroText(cA[2]..oA[1]) end
    /run if playerSpeed==0 and IsUsableSpell(rA[3])==1 and GetSpellCooldown(rA[3])==0 and IsSpellInRange(rA[3],tA[1])==1 then RunMacroText(cA[2]..rA[3]) end
    /run if playerHealth<0.20 and IsUsableSpell(mA[4])==1 and GetSpellCooldown(mA[4])==0 and IsSpellInRange(mA[2],tA[1])==1 then RunMacroText(cA[2]..mA[4]) end
    /run if hWC==0 and IsSpellInRange(mA[3],tA[1])==1 and GetSpellCooldown(mA[3])==0 and IsUsableSpell(mA[3])==1 then RunMacroText(cA[2]..mA[3]) end
    /run if IsUsableSpell(mA[1])==1 and GetSpellCooldown(mA[1])==0 and IsSpellInRange(mA[2],tA[1])==1 then RunMacroText(cA[2]..mA[1]) end
    /run if IsUsableSpell(mA[2])==1 and GetSpellCooldown(mA[2])==0 and IsSpellInRange(mA[2],tA[1])==1 then RunMacroText(cA[2]..mA[2]) end
    /run if IsUsableSpell(aA[1])==1 and GetSpellCooldown(aA[1])==0 and IsSpellInRange(mA[2],tA[1])==1 and not UnitBuff(tA[2],aA[1]) then RunMacroText(cA[1]..aA[1]) end
    /petfollow [exists,help,nodead]
    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
    Expanded code
    Code:
    /run if IsUsableSpell("Aspect of the Dragonhawk")==1 then vAotH="Aspect of the Dragonhawk" else vAotH="Aspect of the Hawk" end
    /run cA={"/cast ","/cast [exists,harm,nodead] "};numBMTalents=GetNumTalents(1,false,false);
    /run aBSS=1;if (UnitCreatureType("target")=="Elemental" or UnitCreatureType("target")=="Mechanical") then aBSS=0 end
    /run hSS=0;i=1;while(i<=40) do a={UnitDebuff("target",i)} if(a[1]=="Serpent Sting" and a[8]=="player") then hSS=1 break else i=i+1 end end
    /run hHM=0;i=1;while(i<=40) do a={UnitDebuff("target",i)} if(a[1]=="Hunter's Mark" and a[8]=="player") then hHM=1 break else i=i+1 end end
    /run hWC=0;i=1;while(i<=40) do a={UnitDebuff("target",i)} if(a[1]=="Wing Clip" and a[8]=="player") then hWC=1 break else i=i+1 end end
    /run hPD=0;i=1;while(i<=40) do a={UnitDebuff("pet",i)} if(a[5]=="Curse" or a[5]=="Disease" or a[5]=="Magic" or a[5]=="Poison") then hPD=1 break else i=i+1 end end
    /run hIMP=0;i=1;while(i<=numBMTalents) do t={GetTalentInfo(1,i,false,false)} if(t[1]=="Improved Mend Pet" and t[5]>0) then hIMP=1 break else i=i+1 end end
    /run playerMana=UnitMana("player")/UnitManaMax("player");playerHealth=UnitHealth("player")/UnitHealthMax("player");playerSpeed=GetUnitSpeed("player");
    /run petHealth=UnitHealth("pet")/UnitHealthMax("pet");_,petActive=HasPetUI();petIsDead=UnitIsDeadOrGhost("pet");
    /run targetHealth=UnitHealth("target")/UnitHealthMax("target");
    /petattack [exists,harm,nodead]
    /run if petActive==1 and (petHealth<0.9 or (hPD==1 and hIMP==1)) and not UnitBuff("pet","Mend Pet") and IsSpellInRange("Mend Pet","pet")==1 and IsUsableSpell("Mend Pet")==1 and GetSpellCooldown("Mend Pet")==0 then RunMacroText(cA[1].."Mend Pet") end
    /run if hHM==0 and IsSpellInRange("Hunter's Mark","target")==1 and GetSpellCooldown("Hunter's Mark")==0 and IsUsableSpell("Hunter's Mark")==1 then RunMacroText(cA[2].."Hunter's Mark") end
    /run if not (UnitBuff("player",vAotH) or UnitBuff("player","Aspect of the Viper")) and IsSpellInRange("Mongoose Bite","target")==0 and IsUsableSpell(vAotH)==1 and GetSpellCooldown(vAotH)==0 and playerMana>=0.25 then RunMacroText(cA[1]..vAotH) end
    /run if not (UnitBuff("player",vAotH) or UnitBuff("player","Aspect of the Viper")) and IsSpellInRange("Mongoose Bite","target")==0 and IsUsableSpell(vAotH)==1 and GetSpellCooldown(vAotH)==0 and playerMana<0.25 then RunMacroText(cA[1].."Aspect of the Viper") end
    /run if playerMana<0.25 and not UnitBuff("player","Aspect of the Viper") and IsSpellInRange("Mongoose Bite","target")==0 and IsUsableSpell("Aspect of the Viper")==1 and GetSpellCooldown("Aspect of the Viper")==0 then RunMacroText(cA[1].."Aspect of the Viper") end
    /run if playerMana>0.90 and not UnitBuff("player",vAotH) and IsSpellInRange("Mongoose Bite","target")==0 and IsUsableSpell(vAotH)==1 and GetSpellCooldown(vAotH)==0 then RunMacroText(cA[1]..vAotH) end
    /run if targetHealth<0.21 and IsSpellInRange("Kill Shot","target") and IsUsableSpell("Kill Shot")==1 and GetSpellCooldown("Kill Shot")==0 then RunMacroText(cA[2].."Kill Shot") end
    /run if IsUsableSpell("Concussive Shot")==1 and GetSpellCooldown("Concussive Shot")==0 and IsSpellInRange("Mongoose Bite","target")==0 and CheckInteractDistance("target",2) then RunMacroText(cA[2].."Concussive Shot") end
    /run if hSS==0 and aBSS==1 and IsSpellInRange("Serpent Sting","target")==1 and GetSpellCooldown("Serpent Sting")==0 and IsUsableSpell("Serpent Sting")==1 then RunMacroText(cA[2].."Serpent Sting") end
    /run if playerSpeed==0 and IsUsableSpell("Multi-Shot")==1 and GetSpellCooldown("Multi-Shot")==0 and IsSpellInRange("Multi-Shot","target")==1 then RunMacroText(cA[2].."Multi-Shot") end
    /run if IsUsableSpell("Arcane Shot")==1 and GetSpellCooldown("Arcane Shot")==0 and IsSpellInRange("Arcane Shot","target")==1 then RunMacroText(cA[2].."Arcane Shot") end
    /run if petActive==1 and petIsDead==0 and IsUsableSpell("Kill Command")==1 and GetSpellCooldown("Kill Command")==0 then RunMacroText(cA[2].."Kill Command") end
    /run if playerSpeed==0 and IsUsableSpell("Steady Shot")==1 and GetSpellCooldown("Steady Shot")==0 and IsSpellInRange("Steady Shot","target")==1 then RunMacroText(cA[2].."Steady Shot") end
    /run if playerHealth<0.20 and IsUsableSpell("Deterrence")==1 and GetSpellCooldown("Deterrence")==0 and IsSpellInRange("Mongoose Bite","target")==1 then RunMacroText(cA[2].."Deterrence") end
    /run if hWC==0 and IsSpellInRange("Wing Clip","target")==1 and GetSpellCooldown("Wing Clip")==0 and IsUsableSpell("Wing Clip")==1 then RunMacroText(cA[2].."Wing Clip") end
    /run if IsUsableSpell("Raptor Strike")==1 and GetSpellCooldown("Raptor Strike")==0 and IsSpellInRange("Mongoose Bite","target")==1 then RunMacroText(cA[2].."Raptor Strike") end
    /run if IsUsableSpell("Mongoose Bite")==1 and GetSpellCooldown("Mongoose Bite")==0 and IsSpellInRange("Mongoose Bite","target")==1 then RunMacroText(cA[2].."Mongoose Bite") end
    /run if IsUsableSpell("Aspect of the Monkey")==1 and GetSpellCooldown("Aspect of the Monkey")==0 and IsSpellInRange("Mongoose Bite","target")==1 and not UnitBuff("player","Aspect of the Monkey") then RunMacroText(cA[1].."Aspect of the Monkey") end
    /petfollow [exists,help,nodead]
    /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
    Last edited by MrMemento; 01-07-2010 at 04:51 AM. Reason: Added the expanded code. With less variables ;)

    [LuaNinja] BM Hunter Macro
  2. #2
    kakamonster's Avatar Member
    Reputation
    3
    Join Date
    Aug 2008
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice one, thanks for sharing! +rep

  3. #3
    Viral Fly-by's Avatar Contributor
    Reputation
    136
    Join Date
    Dec 2009
    Posts
    376
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for including the logic!

    I must say you have an obsession with variables and an apparent dislike for readability in your code. =)
    ViralFly-by

  4. #4
    Elitetech's Avatar Contributor
    Reputation
    98
    Join Date
    Oct 2008
    Posts
    279
    Thanks G/R
    3/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice one. Thanks for sharing mate. +rep
    Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.

  5. #5
    MrMemento's Avatar Corporal
    Reputation
    9
    Join Date
    Jan 2010
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Viral Fly-by View Post
    Thanks for including the logic!

    I must say you have an obsession with variables and an apparent dislike for readability in your code. =)
    Haha, it's true. Mostly for messing with Kakamonster (my mate).
    I could post a cleaned up version with all the strings in place.

    btw, once I reach 80 with this huntard, I will make Surv/MM macros.. fyi

  6. #6
    MrMemento's Avatar Corporal
    Reputation
    9
    Join Date
    Jan 2010
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Added the expanded code with less variables

  7. #7
    DragoHorse's Avatar Contributor
    Reputation
    153
    Join Date
    May 2009
    Posts
    223
    Thanks G/R
    10/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is it possible you could add Chimera Shot?
    i tryed myself but i couldent make it to work XD

  8. #8
    MrMemento's Avatar Corporal
    Reputation
    9
    Join Date
    Jan 2010
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DragoHorse View Post
    is it possible you could add Chimera Shot?
    i tryed myself but i couldent make it to work XD
    I will make a MM macro once I reach level 80 and have somewhat decent gear.

  9. #9
    DragoHorse's Avatar Contributor
    Reputation
    153
    Join Date
    May 2009
    Posts
    223
    Thanks G/R
    10/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MrMemento View Post
    I will make a MM macro once I reach level 80 and have somewhat decent gear.
    that would be cool, love your macro

    whats ur lvl btw? ^^

    +Rep

  10. #10
    MrMemento's Avatar Corporal
    Reputation
    9
    Join Date
    Jan 2010
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    level 72ish :P

  11. #11
    chaoszerorush's Avatar Member
    Reputation
    1
    Join Date
    Dec 2009
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ohhh... BM Macro! I could use this for my BM Hunter although she is only level 44.

    Would that pose a problem?

  12. #12
    MrMemento's Avatar Corporal
    Reputation
    9
    Join Date
    Jan 2010
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not at all, I used this Macro from level 47 and up. Works like a charm

  13. #13
    chaoszerorush's Avatar Member
    Reputation
    1
    Join Date
    Dec 2009
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MrMemento View Post
    Not at all, I used this Macro from level 47 and up. Works like a charm
    Nice. Gonna try once I get home. Maybe this will spark my love for my hunter again

    +Rep for the contribution

  14. #14
    MrMemento's Avatar Corporal
    Reputation
    9
    Join Date
    Jan 2010
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    gl and happy shooting mate

  15. #15
    DragoHorse's Avatar Contributor
    Reputation
    153
    Join Date
    May 2009
    Posts
    223
    Thanks G/R
    10/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lost my hunter now XD

Similar Threads

  1. PVP hunter macros !
    By savion1 in forum World of Warcraft Guides
    Replies: 10
    Last Post: 03-26-2008, 02:23 AM
  2. Hunter macro
    By Morlok in forum World of Warcraft Guides
    Replies: 3
    Last Post: 12-28-2007, 11:48 PM
  3. Hunter Macro
    By rgames in forum WoW UI, Macros and Talent Specs
    Replies: 1
    Last Post: 11-21-2007, 01:52 PM
  4. Hunter macros
    By bossmansmith in forum World of Warcraft Guides
    Replies: 5
    Last Post: 10-30-2007, 05:46 PM
  5. Hunter Macro
    By Bioerrior in forum WoW UI, Macros and Talent Specs
    Replies: 0
    Last Post: 05-27-2007, 11:37 PM
All times are GMT -5. The time now is 03:49 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search