need help with GetEffectTimeRemaining Func

02/14/2022 17:11 rictas#1
Hi, id like to have a working Function, that gives me the actual skill cooldown

Code:
Func GetEffectTimeRemaining($aEffect)
	If Not IsDllStruct($aEffect) Then $aEffect = GetEffect($aEffect)
	If IsArray($aEffect) Then Return 0
	Return DllStructGetData($aEffect, 'Duration') * 1000 - (GetSkillTimer() - DllStructGetData($aEffect, 'TimeStamp'))
EndFunc   ;==>GetEffectTimeRemaining

GetSkillTimer() and DllStructGetData($aEffect, 'TimeStamp') have confusing returning values.

Code:
Func GetSkillTimer()
	Return MemoryRead($mSkillTimer, "long")
EndFunc   ;==>GetSkillTimer

Code:
$mSkillTimer = MemoryRead(GetScannedAddress('ScanSkillTimer', -3))

thanks in advance