Files
wow-weakauras/Complete Projects/Legion/Ilterendi Uptime.lua
2024-08-24 22:43:07 +02:00

21 lines
653 B
Lua

DISPLAY
function()
if aura_env.startTime ~= nil and aura_env.buffTime ~= nil then
local localTime = GetTime() - aura_env.startTime
local buff = UnitBuff("player", "Ilterendi, Crown Jewel of Silvermoon")
if buff ~= nil then
aura_env.buffTime = aura_env.buffTime + (GetTime() - aura_env.lastTime)
end
aura_env.lastTime = GetTime()
aura_env.uptime = (math.floor((aura_env.buffTime / localTime) * 100))
return aura_env.uptime .. "%%"
end
end
ON SHOW
aura_env.startTime = GetTime()
aura_env.buffTime = 0
ON HIDE
print("20% god uptime", aura_env.uptime .. "%")