@trulygangster:
Try using something like this for buffs:
Code:
local spell, _, _, _, _, _, spellTimer = UnitBuffID("target", spellID)
if spell ~= nil then
if spellTimer - GetTime() <= seconds then
-- Do something if the spell is under or equal to X seconds
end
else
-- Do something if the Debuff isn't on target
end
and this for debuffs:
Code:
local spell, _, _, _, _, _, spellTimer = UnitDebuffID("target", spellID)
if spell ~= nil then
if spellTimer - GetTime() < seconds then
-- Do something if the spell is under or equal to X seconds
end
else
-- Do something if the Debuff isn't on target
end
You can abbrivate spell and spellTimer to whatever you want. To check if a Buff/Debuff is over X seconds then just replace <= with >= or >.
For a reference, I've got this placed on my Devouring Plague to see if I have DP up already or not cast by me;
Code:
local DP, _, _, _, _, _, timer = UnitDebuffID("target", 2944, "PLAYER")
if DP ~= nil then
if timer - GetTime() <= 4.3 then
return true
else return false end
else return true end
That being said, I'll try using MoveForwardStart()/MoveForwardStop() as soon as I get home today. The thing is though; Should I use it on the abilities I want to cast (while channeling Mind Flay) or attach it to the Mind Flay spell?
I was maybe thinking I could create a new ability called ClipMF at the very top of the rotation with the checks in.