Nice macro, I'v been trying to get the Consecration to pop 1st on this one but cant seem to get it right. what do i have to change here to get it poping 1st?Code:/run if vProtTS==nil then vProtTS=GetTime() end; if vProtJudge==nil then vProtJudge=0 end; if vProt6==nil then vProt6=0 end; if vProt9==nil then vProt9=0 end; if vProt969==nil then vProt969=9 end; /run if GetTime()-vProtTS>9 then vProt6=0; vProt9=0; vProt969=9; end; vProtTS=GetTime(); /run if vProt969==9 and vProt9==2 and GetSpellCooldown("Consecration")==0 then CastSpellByName("Consecration"); vProt9=0; vProt969=6; end; /run if type(vPlea)~="function" then vPlea=function(m) if GetSpellCooldown("Divine Plea")==0 and UnitPower("player")/UnitPowerMax("player")<=m then CastSpellByName("Divine Plea") end end end; /run if vProt969==9 and vProt9==0 and (UnitHealth("target")/UnitHealthMax("target")>0.2 or vProtJudge==1) and GetSpellCooldown("Judgement of Wisdom")==0 then CastSpellByName("Judgement of Wisdom"); vProt9=1; vProt969=6; vProtJudge=0; end; /run if vProt969==9 and vProt9==0 and UnitHealth("target")/UnitHealthMax("target")<=0.2 and vProtJudge==0 and GetSpellCooldown("Hammer of Wrath")==0 then CastSpellByName("Hammer of Wrath"); vProt9=1; vProt969=6; vProtJudge=1; end; /run if vProt969==9 and vProt9==1 and GetSpellCooldown("Holy Shield")==0 then CastSpellByName("Holy Shield"); vProt9=2; vProt969=6; end; /run if vProt969==6 and vProt6==0 and GetSpellCooldown("Hammer of the Righteous")==0 then CastSpellByName("Hammer of the Righteous"); vProt6=1; vProt969=9; end; /run if vProt969==6 and vProt6==1 and GetSpellCooldown("Shield of Righteousness")==0 then CastSpellByName("Shield of Righteousness"); vProt6=0; vProt969=9; end; /run vPlea(0.75) /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
It's controlled by the variables...not the ordering of hte lines...this will change the 9-second cooldowns to be CONS->HS->JoW:
Code:/run if vProtTS==nil then vProtTS=GetTime() end; if vProtJudge==nil then vProtJudge=0 end; if vProt6==nil then vProt6=0 end; if vProt9==nil then vProt9=0 end; if vProt969==nil then vProt969=9 end; /run if GetTime()-vProtTS>9 then vProt6=0; vProt9=0; vProt969=9; end; vProtTS=GetTime(); /run if type(vPlea)~="function" then vPlea=function(m) if GetSpellCooldown("Divine Plea")==0 and UnitPower("player")/UnitPowerMax("player")<=m then CastSpellByName("Divine Plea") end end end; /run if vProt969==9 and vProt9==2 and (UnitHealth("target")/UnitHealthMax("target")>0.2 or vProtJudge==1) and GetSpellCooldown("Judgement of Wisdom")==0 then CastSpellByName("Judgement of Wisdom"); vProt9=1; vProt969=6; vProtJudge=0; end; /run if vProt969==9 and vProt9==2 and UnitHealth("target")/UnitHealthMax("target")<=0.2 and vProtJudge==0 and GetSpellCooldown("Hammer of Wrath")==0 then CastSpellByName("Hammer of Wrath"); vProt9=1; vProt969=6; vProtJudge=1; end; /run if vProt969==9 and vProt9==1 and GetSpellCooldown("Holy Shield")==0 then CastSpellByName("Holy Shield"); vProt9=2; vProt969=6; end; /run if vProt969==9 and vProt9==0 and GetSpellCooldown("Consecration")==0 then CastSpellByName("Consecration"); vProt9=0; vProt969=6; end; /run if vProt969==6 and vProt6==0 and GetSpellCooldown("Hammer of the Righteous")==0 then CastSpellByName("Hammer of the Righteous"); vProt6=1; vProt969=9; end; /run if vProt969==6 and vProt6==1 and GetSpellCooldown("Shield of Righteousness")==0 then CastSpellByName("Shield of Righteousness"); vProt6=0; vProt969=9; end; /run vPlea(0.75) /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
ViralFly-by
Affliction macro works fine. It obviously wont work on the lvl 80 dummies they have 1 health and the boss ones I believe are at 99999k? Youll either need to adjust the HP variables to much lower to test on a boss dummy or just jump into a raid.
+rep for the thread great work
The reason I was going to check remaining cooldown time is because hunters GCD cannot drop below 1.5 seconds. I agree on the health check I just always want my readiness/rapid fire up at the start of a boss fight since I can Rapid/Readiness/Rapid then both should be back up by the end of most boss fights to use again.
Would this work to also do a check and only click readiness after Rapid Fire has been used?
Sorry to clutter up your thread Viral awsome work on the macros so far.Code:/run if GetSpellCooldown("Readiness")==0 and UnitHealthMax("target")>1000000 and GetSpellCooldown("Rapid Fire")>0 then CastSpellByName("Readiness") end
Last edited by Blehbot; 01-06-2010 at 03:27 PM.
You insult me sir by assuming I would not check for GCD cap!
Sell != Spell =)
Yes that should work...but you're better off saying ~=0 for not equal 0 rather than >0. This is because GetSpellCooldown doesn't actually return the cooldown time remaining...I think it will work either way but I'd feel safer doing not equal 0 rather than greater than 0.
On that note though...should you not also check that you currently have Rapid Fire? So like this...
Code:/run if GetSpellCooldown("Readiness")==0 and UnitHealthMax("target")>1000000 and GetSpellCooldown("Rapid Fire")~=0 and not UnitBuff("player","Rapid Fire") then CastSpellByName("Readiness") end
Never any worries...glad I can help. =)
ViralFly-by
Ok, was playing around at work trying to build something that should work tonight.
Code:/run if GetSpellCooldown("Tranquilizing Shot")==0 and UnitDebuff("target", "Vampiric Might") and IsSpellInRange("Tranquilizing Shot", "target")==1 then CastSpellByName("Tranquilizing Shot") end /run if GetSpellCooldown("Tranquilizing Shot")==0 and UnitDebuff("target", "Frothing Rage") and IsSpellInRange("Tranquilizing Shot", "target")==1 then CastSpellByName("Tranquilizing Shot") end /run if GetSpellCooldown("Call of the Wild")==0 and UnitBuff("player", "Bloodlust")then CastSpellByName("Call of the Wild") end /run if UnitPower("player")<1000 and not UnitBuff("player", "Aspect of the Viper") then CastSpellByName("Aspect of the Viper") end /run if UnitPower("player")>8000 and not UnitBuff("player", "Aspect of the Dragonhawk") then CastSpellByName("Aspect of the Dragonhawk") end /run if not UnitBuff("player", "Trueshot Aura") and not unitBuff("player", "Abomination's Strength") and not unitBuff("player", "Unleashed Rage") then CastSpellByName("Trueshot Aura") end; /run i=1 d=120 while(i<=40)do a={UnitDebuff("target",i)} if a[1]=="Serpent Sting" and a[8]=="player" and IsUsableSpell("Serpent Sting") and IsSpellInRange("Serpent Sting", "target")==1 then d=a[7]-GetTime(); break end i=i+1 end if i>40 or d<2 then CastSpellByName("Serpent Sting") end /run if UnitExists("pet") and UnitHealth("pet")/UnitHealthMax("pet")<0.35 and IsUsableSpell("Mend Pet")==1 and UnitBuff("pet", "Mend Pet")==nil then RunMacroText("/cast Mend Pet") end /run if GetSpellCooldown("Kill Command")==0 then CastSpellByName("Kill Command") end /run if GetSpellCooldown("Furious Howl")==0 then CastSpellByName("Furious Howl") end /run if GetSpellCooldown("Silencing Shot")==0 and IsUsableSpell("Silencing Shot") and IsSpellInRange("Silencing Shot", "target")==1 then CastSpellByName("Silencing Shot") end /run if UnitBuff("player", "Trueshot Aura") then RunMacroText("/use 10") end /run if GetSpellCooldown("Rapid Fire")==0 and UnitHealthMax("target")>1000000 and UnitHealth("target")>200000 and not UnitBuff("player", "Rapid Fire") then CastSpellByName("Rapid Fire") end /run if GetSpellCooldown("Kill Shot")==0 and UnitHealth('target')/UnitHealthMax('target')<0.20 and IsUsableSpell("Kill Shot") and IsSpellInRange("Kill Shot", "target")==1 then CastSpellByName("Kill Shot") end /run if GetSpellCooldown("Chimera Shot")==0 and IsUsableSpell("Chimera Shot") and IsSpellInRange("Chimera Shot", "target")==1 then CastSpellByName("Chimera Shot") end /run if GetSpellCooldown("Aimed Shot")==0 and IsUsableSpell("Aimed Shot") and IsSpellInRange("Aimed Shot", "target")==1 then CastSpellByName("Aimed Shot") end /run if GetSpellCooldown("Rapid Fire")==0 and UnitHealthMax("target")>2000000 and UnitHealth("target")>500000 and not UnitBuff("player", "Rapid Fire") then CastSpellByName("Rapid Fire") end /run if GetSpellCooldown("Readiness")==0 and UnitHealthMax("target")>1000000 and UnitHealth("target")>200000 and UnitBuff("player", "Rapid Fire") then CastSpellByName("Readiness") end /run if not UnitDebuff("target", "Hunter's Mark") and UnitHealthMax("target")>1000000 and UnitHealth("target")>500000 then CastSpellByName("Hunter's Mark") end /run if GetSpellCooldown("Steady Shot")==0 and IsUsableSpell("Steady Shot") and IsSpellInRange("Steady Shot", "target")==1 then CastSpellByName("Steady Shot") end /run StaticPopup_Hide("MACRO_ACTION_FORBIDDEN");
1. Uses Tranqilizing Shot on Icemaw and Deathwhisper adds if needed.
2. Uses Call of the Wild when you get Bloodlust - For the Horde, change to Heroism if ally.
3. Uses Aspect of the Viper if less than 1k mana.
4. Uses Aspect of the Dragonhawk when above 8k mana.
5. Uses Trueshot Aura if you don't have it or one of the similar buff falls off. Thx Blehbot
6. Keeps Serpent Sting on target.
7. Heals pet if it's under 35% health and in range.
8. Uses Kill Command on cd.
9. Uses Furious Howl on cd. - Wolf pet only, remove line if not using a wolf.
10. Uses Silencing Shot on cd.
11. Uses Engineer hand enchant. Remove if not Engineer.
12. Uses Rapid Fire on any target that has 2 million+ total health and 500k health remaining and you do not have the buff.
13. Uses Kill Shot, Chimera Shot & Aimed shot on cd.
14. Uses Readiness on any target that has 1 million+ total health and you have the Rapid Fire buff.
15. Uses Hunter's Mark if not on any target that has more than 1million total and total health of 500k+.
16. Uses steady Shot.
The red can be changed to have less/more use of selected abilities.
I'll be testing it tonight, thanks again to Viral & Elitetech for the help with this.
I am also trying to add a line that will use Berserking only when Readiness is on cd and I don't have the Rapid Fire buff. I'll try and figure that out when I get home from work.
Edit - I have tested this on the training dummies and it works great, going to give it a try tonight in raid and see how it handles there.
Last edited by Sensisativa; 01-07-2010 at 11:34 AM.
"A friend in need is a friend indeed, but a friend with weed is better"
Not at all I'm just swiming in uncharted waters for myself and thought it would be easier to check this way since I know its a hard number.
Ok I understand, that makes alot of sence. It stumps me on how to do a cooldown check for the steady shot part I want to do if it doesnt report time remaining so I may have to wait for your macro there.Sell != Spell =)
Yes that should work...but you're better off saying ~=0 for not equal 0 rather than >0. This is because GetSpellCooldown doesn't actually return the cooldown time remaining...I think it will work either way but I'd feel safer doing not equal 0 rather than greater than 0.
Yes the rapid fire buff check is going to be needed as well. I am going to also add that to the rapid fire part of the macro as well.On that note though...should you not also check that you currently have Rapid Fire? So like this...
Code:/run if GetSpellCooldown("Readiness")==0 and UnitHealthMax("target")>1000000 and GetSpellCooldown("Rapid Fire")~=0 and not UnitBuff("player","Rapid Fire") then CastSpellByName("Readiness") end
EDIT. Come to think of it I dont want Rediness to wait on the rapid fire buff to fall off I want it to fire right after so its comes off cooldown faster so the buff check on Rapid fire should be good enough.
Last edited by Blehbot; 01-06-2010 at 03:46 PM.
I'm working on something that will make your life much easier...but for now, you do this:
After that, the variable "cd" will contain the amount of time left on the cooldown in seconds.Code:/run local cd={GetSpellCooldown("MY SPELL")}; if cd[1]==0 then cd=0 else cd=cd[1]+cd[2]-GetTime() end;
Then if you want the cast time for something (adjusted for haste), you use GetSpellInfo like this:
After that, ct will contain the cast time...so for your steady shot, you can just add after that "if ct<1.5 then ct=1.5 end" to cap it.Code:/run local ct=({GetSpellCooldown("MY SPELL")})[7]/1000;
Last edited by Viral Fly-by; 01-06-2010 at 05:40 PM.
ViralFly-by
As an aside, this is the kind of stuff I was going to put into the Miscellaneous post on the first page...what do you guys think? I was also thinking of starting a new thread for "Lua Tidbits and How-tos" for this kind of information. In that case, I would use the Miscellaneous post in this thread for some smaller macros or parts of macros such as dispelling, using trinkets, buffing, etc.
Thoughts?
Last edited by Viral Fly-by; 01-06-2010 at 05:40 PM.
ViralFly-by
Yes Viral a how to would be awsome. This thread is the first one I read through that really helped me understand what everything was doing. Being a complete novice I would say you helped a ton.