Mykoplazma
Members
-
Joined
-
Last visited
Solutions
-
Mykoplazma's post in Can i set the 'timer' with lua? was marked as the answerif vUAflag==nil then vUAflag=0 end; -- If we're CURRENTLY casting UA and the timestamp isn't already set... if ({UnitCastingInfo("player")})[1]=="Unstable Affliction" and vUAts==nil then -- Record that UA is being cast and record the time at which we observed the ongoing cast. -- Setting the flag to 1 will prevent UA from being cast again. vUAflag=1 vUAts=GetTime() end; -- If the flag is set...but the time at which it was set was more than 2 seconds ago... if vUAflag==1 and GetTime()-vUAts>2 then -- Reset the flag and timestamp to allow UA again. vUAflag=0 vUAts=nil end Ripped example - here you see how to cast Unstable Affliction when the time difference between start and now is > 2.
If vUaFlag=0 then cast