In my profile i have a custom function to check for cds:
For this exemple lets ASSUME that Seraphim SPELLID is 12345
Code:
--CDCheck
function CdCheck(spellid)
Sstart, Sduration, Senabled = GetSpellCooldown(spellid)
Scooldown = (Sstart + Sduration - GetTime())
if Sstart == 0
then
Scooldown = 0
end
return Scooldown
end
Since PE only accepts true or false statements, i did a new function to test exactly what i wanted.
Since we need to know the GCD, as far as i know we usually use a DUMMY SPELL available to all classes to check for GCD (61304).
Code:
function Rubim.SeraphimCheck()
if CdCheck(12345) > CdCheck(61304) * 6 then return true
else return false
end
end
This should work. But still wierd, assuming the CD on Seraphim is 2 and we have no GCD, 2 > 0 it will be true but it wont cast, No ideia if that's the right way to do it. But its solvable. I dont have a pally so i wont be able to test it.
To implement that on your rotation:
{ "Seraphim" , "@Rubim.SeraphimCheck()" },
You still have to load those functions from another file, editing the toc file.
Mine for example is:
Code:
#Spelllist
libs\spelllist.lua
#Frame
libs\pqi.lua
libs\frame.lua
#Rotacao
rotations\blood.lua
rotations\frost2h.lua
rotations\frostdw.lua
rotations\unholy.lua
#Funcao
libs\rubim.lua
As you can see a loaded my libs\rubim.lua.
Inside rubim.lua
We have to declare Rubim for the rotation:
Code:
-- Init
if not Rubim then Rubim = {} end
Then i put all my functions there.
There are more to it, and my connection is superslow and im working right now, probably will have more time saturday.
"Your" rubim.lua would like like this.
Code:
-- Init
if not Rubim then Rubim = {} end
--RubyOne Super Awesome Custom Rotations
--CDCheck
function CdCheck(spellid)
Sstart, Sduration, Senabled = GetSpellCooldown(spellid)
Scooldown = (Sstart + Sduration - GetTime())
if Sstart == 0
then
Scooldown = 0
end
return Scooldown
end
function Rubim.SeraphimCheck()
if CdCheck(12345) > CdCheck(61304) * 6 then return true
else return false
end
end
-- Well well well
ProbablyEngine.library.register("Rubim", Rubim)