I've been trying to fix the Arcane Shot code so that it will work properly. However, it is beyond my poor skills as a coder.
Basically I'm trying to get the bot to cast arcane shot under the following conditions.
1. Explosive Shot is on cooldown
2. Black Arrow is on cooldown
3. Player Focus is 80+
4. Not to cast Arcane Shot if Lock and Load buff is active. (although if that proc is active Explosive Shot should be avialable automatically so maybe this code is redundant?)
The current code for it is as follows;
local sLnL, _, _, countLnL = UnitBuff("player", "Lock and Load")
local _, _, _, esCost = GetSpellInfo(53301)
local esStart, esDuration, esEnabled = GetSpellCooldown(53301)
local esCooldown = (esStart + esDuration - GetTime())
local baStart, baDuration, baEnabled = GetSpellCooldown(3674)
local baCooldown = (baStart + baDuration - GetTime())
local _, _, _, asCost = GetSpellInfo(3044)
if sLnL ~= nil then
if countLnL == 1 then
return true
end
end
Right now however it never casts arcane shot regardless of any of the above. Any suggestions would be appreciated.
Black arrow ID is 3674
Explosive Shot ID is 53301
Last edited by kickmydog; 07-28-2011 at 03:13 PM.
Has anyone made a Elemental Shaman yet?
The warlock code seems nice, but I made some suggestions.
BoA gets refreshed 0.5 seconds before it expires, this is not ideal as the last tick of BoA occurs right at the end and is the strongest tick, you should not refresh this before it expires.
BoD can be refreshed 15 seconds before it expires.
When soul swapping, you do not want to cast it if your target has BoD, it will remove it off your main target once you exhale onto your focus.
That should do the trick for Arcane Shot. We use <= 1 because when the ability is put on GCD the function tells us that the ability is on CD, so we compare the cooldown against our maximum possible GCD. You could do some trickery to see if ArS is on CD (GCD) and then subtract the current GCD from the cooldown for Exp Shot to be 100% sure that it is not on CD if you wanted to be 100% sure that you can get an ArS in before Exp shot is off CD.Code:local esStart, esDuration, esEnabled = GetSpellCooldown(53301) local esCooldown = (esStart + esDuration - GetTime()) local baStart, baDuration, baEnabled = GetSpellCooldown(3674) local baCooldown = (baStart + baDuration - GetTime()) local buffLnL = UnitBuffID("player", 56453) local playerFocus = UnitPower("player") if esCooldown <= 1 then return false --Explosive Shot is off CD end if baCooldown <= 1 then return false --Black Arrow is off CD. end if buffLnL ~= nil then return false --We have Lock and Load end if playerFocus < 80 then return false --We have less than 80 focus end return true
But really, as long as you never hit 100 focus you are not really losing long-term DPS, and the code I provided should work well 99% of the time.
Last edited by Xelper; 07-28-2011 at 10:07 PM.
that .5 sec is there for lag issues. In my testing it falls off while Your casting something and reapplies. If this isn't the case for you and other people I'll change it to wait after it drops off. it just will be a 99% uptime. As for the soul swap, I'm not sure how I want to mess with that issue.
some options I could do:
cast agony before swap, exhale, cast doom and burn an extra gcd.
leave as is and miss out on doom on the main target until bot recasts it.
put up unstable, corrupt, swap, then doom and focus gets less damage.
with these changes just note that it will mess with the rotation when it comes to casting spells.
Last edited by crystal_tech; 07-28-2011 at 10:19 PM.
The way Ive solved it is to just create different profiles. Since we can choose up to 4 rotations to keybind, why not make full use of all of them.
Personally the 3 I have are:
Standard boss affliction which uses demon soul and BoD
Two target affliction which uses demon soul and soul swaps BoA
Trash affliction which uses BoA and not demon soul
I find it to be a much more elegant solution although I guess it can be a bit confusing for a new warlock.
been working on improving all warrior rotations, still refineing the prot rotation the aoe is alot better now, fury I haven't touched yet but only needs to be changed in regards to execution, arms needs some mods due to not being optiimal will release soon
but pretty sure code you are looking for is
Code:local csdebuff = UnitDebuffID("target", 86346, "PLAYER|HARMFUL") local css, csd, cse = GetSpellCooldown(86346) local cscd = (css + csd - GetTime()) if csdebuff == not nil then if cscd >0 then return false else return true end end
Last edited by me28791; 07-29-2011 at 03:06 AM.
Since I suck at LUA and I dont know how to fix it myself heres my list of improvements;
Your rotation is good but as you pointed out yourself it has some flaws, I have some ideas;
Make it cast arcane power BEFORE Mirror Images, its a wasted Global :/
The bot casts Arcane Missiles @ X stacks of AB and another AM procs, the bot casts it straight way - maybe look into making it only cast if you have atleast 2 AB stacks
Also can you make it dump arcane missiles BEFORE it does evocation in burn phase - it seems like a VERY tight fit if you dont have enough haste.
I think once you got it fixed to where it can restart itself after casting evocation its perfect ;D
Gave you a little something for you effoct and helping me be more lazy in raids
- R0w4n
Thanks for the help fixing the SV rotation Xelper. Now I'm trying to get the logic for MM to work correctly.
At the first 90% of a mob's health
Serpent Sting (opener)
Aimed Shot!
Aimed Shot (if focus is over 80)
Steady shot (forced if 2s or less is left on Improved Steady Shot buff)
Chimera Shot if 2s left on Serpent Sting
Ideally we want to keep enough focus at all times to Chimera Shot just to refresh serpent sting, otherwise using steady shot, and aimed shot which benefit from 60% bonus crit during the first 90%
If dynamically hasted heroism/bloodlust/timewarp/ancient hysteria/rapid fire are up and boss health is NOT greater than 90%
Serpent Sting (if it drops off only)
Chimera Shot (whenever off cool down)
Aimed Shot!
Kill Shot
Aimed Shot (if focus is over 80)
Steady Shot (forced if 2s or less is left on Improved Steady Shot buff)
Normal rotation
Serpent Sting (if it drops off only)
Chimera Shot (whenever off cool down)
Aimed Shot!
Kill Shot
Arcane Shot (if focus is over 50)
Steady Shot (forced if 2s or less is left on Improved Steady Shot buff)
A couple special cases.
Kill Command (only if Resistance is futile buff is up and focus greater than 40)
Readiness should only be used if Chimera Shot, Rapid Fire and Kill Shot are on cool down. However, if there is say less than 30s left on the Rapid fire cool down it should hold off on readiness, and the Kill Shot criteria only if the mob health is below 20%
t12 bonus "Burning Adrenaline" if this buff is up then Aimed Shot or Kill Command should be used, in that order of preference.
Thanks for tips R0w4n i will look into fixing things, this is my first try at this stuff, thanks to everyones examples.
This change to the Arcane Shot BM should fix the BM rotation.
local esStart, esDuration, esEnabled = GetSpellCooldown(34026)
local esCooldown = (esStart + esDuration - GetTime())
local playerFocus = UnitPower("player")
if esCooldown <= 1 then
return false --Kill Command is off CD
end
if playerFocus < 35 then
return false --We have less than 35 focus
end
The BM rotation still needs a few tweaks in the logic, but this is still a pretty decent rotation for now. Right now it doesn't use Fervor intelligently, neither is it restraining use of Focus Fire while Bestial Wrath is up. Ideally it would need to wait until 5 stacks of frenzy before using Bestial Wrath to get the most out of it.
OK i have fixed a few problems with the Arcane rotation. Still think there can be some improvements. During Burn phase i can peak at about 25k dps the that drops to 15k in conserve phase, this is with 359 gear and only self buffs 3 t-11 pieces. The rotation has been fixed to cast an Arcane Missile before it casts Evocation, and to only cast Arcane Power if on a boss and Mirror Image is available to cast next. Also Got Arcane Missile to only cast is atleast two Arcane Blasts have been cast. No more AM casting from and AM proc.
I have also renamed a few abilities to hopefully make it a little more clearer.
MAGE_Abilities
MAGE_RotationsCode:<?xml version="1.0" encoding="utf-8" ?><MAGE><Ability><Name>B - Arcane Missile</Name><Default>false</Default><SpellID>5143</SpellID><Actions>/startattack</Actions><Lua>local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;) local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) if manapercent &lt;= 36 then return true end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Buff - Arcane Power</Name><Default>false</Default><SpellID>12042</SpellID><Actions></Actions><Lua>local MirrorImageStart, MirrorImageDuration = GetSpellCooldown(12051) local MirrorImageCooldown = (MirrorImageStart + MirrorImageDuration - GetTime()) if MirrorImageCooldown &gt;= 3 then return false else return true end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>Use - Mana Gem</Name><Default>false</Default><SpellID>0</SpellID><Actions>/use Mana Gem</Actions><Lua>local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) local ManaGemStart, ManaGemDuration = GetItemCooldown(36799) local ManaGemCooldown = (ManaGemStart + ManaGemDuration - GetTime()) if ManaGemCooldown &lt; 3 then if manapercent &lt; 95 then return true end end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>Flame Orb</Name><Default>false</Default><SpellID>82731</SpellID><Actions>/startattack</Actions><Lua>return true</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Mirror Image</Name><Default>false</Default><SpellID>55342</SpellID><Actions></Actions><Lua>local levelCheck = UnitLevel(&quot;target&quot;) if levelCheck ~= -1 then return false else return true end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>Make - Mana Gem</Name><Default>false</Default><SpellID>759</SpellID><Actions></Actions><Lua>local gemcount = GetItemCount(&quot;Mana Gem&quot;) if gemcount &lt; 1 then return true end</Lua><RecastDelay>12000</RecastDelay><Target>Player</Target></Ability><Ability><Name>Evocation</Name><Default>false</Default><SpellID>12051</SpellID><Actions></Actions><Lua>local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) if manapercent &lt; 35 then return true end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability><Ability><Name>B - Arcane Blast</Name><Default>false</Default><SpellID>30451</SpellID><Actions>/startattack|/use 10|/use 13|/use 14</Actions><Lua>local manapercent = 100 * UnitPower(&quot;player&quot;) / UnitPowerMax(&quot;player&quot;) local EvocationStart, EvocationDuration = GetSpellCooldown(12051) local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime()) if EvocationCooldown &lt; 3 then --evocation will be off CD within 3 seconds or is off CD. if manapercent &gt; 35 then return true end end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Buff - Arcane Brilliance</Name><Default>false</Default><SpellID>1459</SpellID><Actions></Actions><Lua>sABr = UnitBuffID(&quot;player&quot;, 1459) if sABr == nil then return true end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>T - Arcane Blast Filler</Name><Default>false</Default><SpellID>30451</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;) if AB == nil then return true end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>C - Arcane Blast</Name><Default>false</Default><SpellID>30451</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;) local EvocationStart, EvocationDuration = GetSpellCooldown(12051) local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime()) if EvocationCooldown &gt; 3 then if AB &gt;= 2 then return false else return true end end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>T - Arcane Missile</Name><Default>false</Default><SpellID>5143</SpellID><Actions></Actions><Lua>local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;) local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;) if AB &gt;= 2 then if AM ~= nil then return true end end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>C - Arcane Missile</Name><Default>false</Default><SpellID>5143</SpellID><Actions>/startattack</Actions><Lua>local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;) local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;) local EvocationStart, EvocationDuration = GetSpellCooldown(12051) local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime()) if EvocationCooldown &gt; 3 then if AB &gt;= 2 then if AM ~= nil then return true end end end</Lua><RecastDelay>14000</RecastDelay><Target>Target</Target></Ability><Ability><Name>T - Arcane Barrage</Name><Default>false</Default><SpellID>44425</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;) local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;) if AB == nil then if AM == nil then return true end end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>C - Arcane Barrage</Name><Default>false</Default><SpellID>44425</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;) local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;) local EvocationStart, EvocationDuration = GetSpellCooldown(12051) local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime()) if EvocationCooldown &gt; 3 then if AB &gt;= 3 then if AM == nil then return true end end end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>C - Arcane Blast - Filler</Name><Default>false</Default><SpellID>30451</SpellID><Actions>/startattack</Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;) local EvocationStart, EvocationDuration = GetSpellCooldown(12051) local EvocationCooldown = (EvocationStart + EvocationDuration - GetTime()) if EvocationCooldown &gt; 3 then if AB == nil then return true end end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>T - Arcane Blast</Name><Default>false</Default><SpellID>30451</SpellID><Actions></Actions><Lua>local _,_,_,AB = UnitDebuff(&quot;player&quot;, &quot;Arcane Blast&quot;) local AM = UnitBuff(&quot;player&quot;, &quot;Arcane Missiles!&quot;) if AB &lt;= 1 then return true end</Lua><RecastDelay>0</RecastDelay><Target>Target</Target></Ability><Ability><Name>Buff - Mage Armor</Name><Default>false</Default><SpellID>6117</SpellID><Actions></Actions><Lua>sMA = UnitBuffID(&quot;player&quot;, 6117) if sMA == nil then return true end</Lua><RecastDelay>0</RecastDelay><Target>Player</Target></Ability></MAGE>
Please let me know how this works and what can be done to make better.Code:<?xml version="1.0" encoding="utf-8" ?><MAGE><Rotation><RotationName>Arcane</RotationName><RotationDefault>false</RotationDefault><RotationList>Make - Mana Gem|Buff - Mage Armor|Buff - Arcane Brilliance|Flame Orb|Buff - Arcane Power|Mirror Image|Use - Mana Gem|B - Arcane Blast|B - Arcane Missile|Evocation|C - Arcane Blast - Filler|C - Arcane Blast|C - Arcane Barrage|C - Arcane Missile</RotationList></Rotation><Rotation><RotationName>Arcane - Trash</RotationName><RotationDefault>false</RotationDefault><RotationList>T - Arcane Blast Filler|T - Arcane Blast|T - Arcane Barrage|T - Arcane Missile</RotationList></Rotation></MAGE>
Last edited by n1bl3r; 07-29-2011 at 04:00 PM.
This works well for the initial burn phase in beginning, but after the evo it only cast two Arcane Blasts, and then Arcane missiles if up, which kills dps.
So first burn phase 25k dps, after evo and only casting 2 maybe 3 AB before Arcane Missiles, it dropped to 12-13k dps.