script to predict cooldown

2 posts Page 1 of 1
Posts: 1
Joined: 29 Sep 2018, 17:43

I am trying to figure out how I can write a conditional statement for an upcoming cooldown.

example: As an affliction lock I would like to stop spending soul shards 45 seconds before dark glare is off cooldown so that I have full shards going into that cooldown to burn on unstable affliction.

I was trying to add and subtract from timeshift like so:
Code: Select all
	-- 9. Remain 1 Unstable Afflicton on target
	if SoulShards >= 1 and not MaxDps:TargetAura(_UnstableAfflictionAura, timeShift + 3) and MaxDps:SpellAvailable(_SummonDarkglare, timeShift - 45)
		and currentSpell ~= _UnstableAffliction then
		return _UnstableAffliction;
but every version of this I've tried hasn't been effective... some help would be appreciated, I may be able to do some work on the affliction lock rotation.
Site Admin
Posts: 403
Joined: 25 Jun 2017, 03:45

subtracting anything from timeshift does not make sense.

You can either get raw cooldown amount with raw timeShift or add something to it.

Adding numbers to timeShift you advance time to future. Subtracting will make time go to the past.

local ghostlyStrikeReady, ghostlyStrikeRemains = MaxDps:SpellAvailable(_GhostlyStrike, timeShift);
if ghostlyStrikeRemains > 45 then -- make sure cooldown doesnt come of within next 45s
2 posts Page 1 of 1
drogie łóżka stolik kawowy stół dębowy rozkładany