/
## Title: CoolLine |
## Notes: Shows cooldowns on a single bar. |
## Author: TotalPackage |
## Version: 3.3.002 |
## Version: 3.3.003 |
## SavedVariables: CoolLineDB |
## SavedVariablesPerCharacter: CoolLineCharDB |
tick0 = createfs(tick0, "0", 0, "LEFT") |
tick1 = createfs(tick1, "1", section) |
tick10 = createfs(tick10, "10", section * 2) |
tick30 = createfs(tick30, "30", section * 3) |
tick10 = createfs(tick10, "3", section * 2) |
tick30 = createfs(tick30, "10", section * 3) |
tick60 = createfs(tick60, "60", section * 4) |
tick120 = createfs(tick120, "2m", section * 5) |
tick300 = createfs(tick300, "6m", section * 6, "RIGHT") |
isactive, throt = false, 1.5 |
for index, frame in pairs(cooldowns) do |
local remain = frame.endtime - ctime |
if remain < 10 then |
if remain < 3 then |
if remain > 1 then |
SetupIcon(frame, section * (remain + 8) * 0.111, 0.03, true, dofl) -- 1 + (remain - 1) / 9 |
SetupIcon(frame, section * (remain + 1) * 0.5, 0.02, true, dofl) -- 1 + (remain - 1) / 2 |
elseif remain > 0.3 then |
SetupIcon(frame, section * remain, 0, true, dofl) |
elseif remain > 0 then |
isactive = true |
ClearCooldown(frame) |
end |
elseif remain < 30 then |
SetupIcon(frame, section * (remain + 30) * 0.05, remain > 11 and 0.06 or 0.02, true, dofl) -- 2 + (remain - 10) / 20 |
elseif remain < 10 then |
SetupIcon(frame, section * (remain + 11) * 0.143, remain > 4 and 0.05 or 0.02, true, dofl) -- 2 + (remain - 3) / 7 |
elseif remain < 60 then |
SetupIcon(frame, section * (remain + 60) * 0.03333, 0.12, true, dofl) -- 3 + (remain - 30) / 30 |
SetupIcon(frame, section * (remain + 140) * 0.02, 0.12, true, dofl) -- 3 + (remain - 10) / 50 |
elseif remain < 120 then |
SetupIcon(frame, section * (remain + 180) * 0.01666, 0.25, true, dofl) -- 4 + (remain - 60) / 60 |
elseif remain < 360 then |