Hey everyone (mainly profile devs, lol) , I was making this code for a little bit of a better Overpower logic for PvP arms warrior. I know it wont be the same in 5.0.4 but I was just wondering how to accomplish this task for further reference.
What I am attempting to accomplish is let the taste for blood buff tick down to 4 seconds or less, then cast the first overpower. If the first overpower is successful, and a taste for blood proc happens immediately (which it can and will, since the old taste for blood happened every 5 seconds) then cast the 2nd overpower immediately and not wait for the buff to tick down any seconds, if possible.
here is the code:
Code:
local op, _, _, _, _, _, optimer = UnitBuffID("player", 60503)
if op
and UnitExists("target")
and UnitCanAttack("player", "target")
and IsSpellInRange(GetSpellInfo(7384), "target") == 1
and not PQR_IsOutOfSight("target")
then
if optimer - GetTime() <= 4
and not opCount
then
CastSpellByID("7384","target")
opCount = 1
end
if opCount == 1
then
CastSpellByID("7384","target")
opCount = nil
end
end
end
it seems as though this allows you to cast the overpower the first time correctly but when a second taste for blood procc'ed immediatly afterwards it wouldnt cast another overpower, it will just keep waiting until that one is down to 4 seconds or less. can someone help with what i am trying to accomplish please?
i know this wont be the same in 5.0.4, probably in 5.0.4 the code will just be to spam it whenever possible.
in fact it could have been very simple and if a taste for blood buff was on, i just do a overpower everytime ASAP, but this logic if done correctly would have made it more bursty and better for pvping
