Have anyone made a boomkin rotation yet?
Have anyone made a boomkin rotation yet?
Xelper, I have PM'd you psuedo code for hunter MM shots.
If you could help that would be great.
any dk tank rotation ?
This is an interim fix for the MM rotation. This will fix the MM arcane shot so that it actually fires.
local csStart, csDuration, csEnabled = GetSpellCooldown(53209)
local csCooldown = (csStart + csDuration - GetTime())
local playerFocus = UnitPower("player")
if csCooldown <= 1 then
return false --Chimera Shot is off CD
end
if playerFocus < 80 then
return false --We have less than 80 focus
end
return true
Thank you for double checking the code, I'm not a very good coder, so any help is appreciated.
I was hoping that this code makes Aimed Shot hard cast when you have dynamic haste and above 90% health, but something is not working. Instead it opts for firing off arcane shots when those haste effects are up.
Code:local playerFocus = UnitPower("player") local unithealth = 100 * UnitHealth("target") / UnitHealthMax("target") sBL = UnitBuffID("player", 2825)--check for Bloodlust & more than 70 focus if sBL ~= nil and playerFocus >= 70 then return true end sAH = UnitBuffID("player", 90355)--check for Ancient Hysteria & more than 70 focus if sAH ~= nil and playerFocus >= 70 then return true end sTW = UnitBuffID("player", 80353)--check for Timewarp & more than 70 focus if sTW ~= nil and playerFocus >= 70 then return true end sRF = UnitBuffID("player", 3045)--check for Rapid Fire & more than 70 focus if sRF ~= nil and playerFocus >= 70 then return true end sHO = UnitBuffID("player", 32182)--check for Heroism & more than 70 focus if sHO ~= nil and playerFocus >= 70 then return true end if unithealth >= 90 then --check for greater than 90% health return true end
Last edited by kickmydog; 07-30-2011 at 09:12 PM.
to me thats a jumbled mess but an easy fix.
1. declare locals first. you have 2 locals but many more that need the word 'local' in front and need to be moved up.
2. you can chain buff checks to reduce the amount of if then statements
try this:
It should check for the Fire! Buff and cast it, as well as cast it if the target is above 90% with player focus at or above 70, and do the same check for your focus levels before it checks for lust/rapid fire effects.Code:local playerFocus = UnitPower("player") local unithealth = 100 * UnitHealth("target") / UnitHealthMax("target") local sBL = UnitBuffID("player", 2825)--check for Bloodlust & more than 70 focus local sAH = UnitBuffID("player", 90355)--check for Ancient Hysteria & more than 70 focus local sTW = UnitBuffID("player", 80353)--check for Timewarp & more than 70 focus local sRF = UnitBuffID("player", 3045)--check for Rapid Fire & more than 70 focus local sHO = UnitBuffID("player", 32182)--check for Heroism & more than 70 focus local hasMM = UnitBuffID("player", 82926) --fire! buff check if hasMM ~= nil then return true end if Unithealth >= 90 and playerFocus >= 70 then return true end if playerFocus >= 70 then if sBL ~= nil or sAH ~= nil or sTW ~= nil or sHO~= nil or sRF ~= nil then return true end end
Could go another step forward with the code and do this:
just note I haven't tested the code yet. I'm working on my BM hunter spec right now then I was going to do MM.Code:local playerFocus = UnitPower("player") local unithealth = 100 * UnitHealth("target") / UnitHealthMax("target") local sBL = UnitBuffID("player", 2825)--check for Bloodlust & more than 70 focus local sAH = UnitBuffID("player", 90355)--check for Ancient Hysteria & more than 70 focus local sTW = UnitBuffID("player", 80353)--check for Timewarp & more than 70 focus local sRF = UnitBuffID("player", 3045)--check for Rapid Fire & more than 70 focus local sHO = UnitBuffID("player", 32182)--check for Heroism & more than 70 focus local hasMM = UnitBuffID("player", 82926) --fire! buff check if hasMM ~= nil then return true end if playerFocus >= 70 then if Unithealth >= 90 then return true elseif sBL ~= nil or sAH ~= nil or sTW ~= nil or sHO~= nil or sRF ~= nil then return true else return false end end
Last edited by crystal_tech; 07-30-2011 at 10:58 PM.
Thanks very much for cleaning that up for me. However, I tested the code, the "Fire!" part works great, and enables removing that extra "Aimed Shot if Fire! entry from the rotation edit. The part that does not work is the checking for the dynamic haste part. Since i only had rapid fire to check with, it never once cast aimed shot while rapid fire was up. Not sure as to why. Also checked with bloodlust.just note I haven't tested the code yet. I'm working on my BM hunter spec right now then I was going to do MM.
After doublechecking it looks like the "Fire!" part does not work.
Last edited by kickmydog; 07-31-2011 at 12:26 AM. Reason: double checked.
Love to see a druid bear and a combat rogue.
Any way to add a lot of healing spells at ones? Coz I have a text document with all spells, but they are NOT named its only IDs. Can I add IDs instead of spell names?
Hi,
I was trying to get an Arms PVE rotation with stance dancing included. Wouldn't be too hard I suppose, having the Taste of Blood buff timer as indicator to when to return to battle stance, but I have some problems regarding the code to stances...
How can I keep track of which stance I am right now in lua code?
My intention was to do something like this (pseudocode):
if taste of blood is active, cast Battle Stance
if battle stance, cast Overpower
if taste of blood is not active, cast Berserker Stance
if berserker stance, return false
It's just an initial idea, I will improve it later, but first... How do I write in lua the sentence "if battle stance, cast Overpower"?
Thanks a lot.
yea i'm still fine tuning it but making my MM rotation the main focus right now.