Get an Epic Experience with Premium

Cooldowns

Combat Login to Add Favorites
  • 19 Likes
  • World of Warcraft
  • 52,650 Monthly Downloads
  • Supports: 5.2.0
  • 1,662,513 Total Downloads
  • Updated 04/21/2013
  • Created 12/12/2008
  • 1,144 Favorites
  • Project Site
  • Comments
  • Release Type: Release
  • License: All Rights Reserved
  • Newest File: 4.2.3
or
Support development! **
Donate

About Cooldowns

A World of Warcraft add-on that displays numeric cooldown counters on buttons and other icons with cooldowns.

*** Having Problems? ***

Before posting a problem report, please make sure you are using the most recent release and try resetting all Cooldowns settings using the Defaults button in the Interface Configuration window. If your settings got messed up somehow during the recent updates, setting them to defaults may solve the problem. If that doesn't help, and you still don't see cooldown text, try adjusting the pixel width setting to a smaller number (default should be 27). If that doesn't help, post a problem report and make sure to include which other addons you run and any special configuration changes you make so I can try to replicate the problem. Also, if you run an older version because newer ones are not working for you, let me know. Otherwise, until scientists invent the teleporter and I can port to your computer, there isn't much else I can do for you. ;)

*** NEW FEATURES IN 4.2 ****

- Users can now set the minimum pixel width for cooldown text display. Cooldown counters will not appear on buttons or other cooldown icons that have a width smaller than the number chosen (except for the quest watch buttons which always show cooldown text). The default is 27 which is between the size of the standard player buff icon and the standard unit frame debuff icon. The standard action button width is 36 pixels. Scaling a cooldown icon using another addon until it is smaller than the selected minimum width will cause the cooldown text to stop displaying on that icon.
- Now checks higher up the frame hierarchy for a named frame for filtering. Should allow filtering for addons with buttons that had nameless immediate parent frames.

*** NEW FEATURE IN 4.1 – FILTERING ***

Too many cooldown texts all over the place now? What happened? I made Cooldowns work with any visible cooldown in any addon (bigger than width of 27 pixels). But now there is also… Filtering! Check out the Filtering tab in the Cooldowns configuration panel. You will see a list of all the UI frames that Cooldowns is aware of and you can uncheck the ones that you don’t want to see cooldown text on. Don’t want to see cooldown text on Bartender4 bar 6? Uncheck BT4Bar6. Don’t want to see text on WeakAuras icons? Uncheck WeakAurasFrame.

*** NEW FEATURES IN 4.0 ***

- Can now configure the minimum cooldown time for cooldown text to appear. Used to be hard-coded to 1.5 seconds. (thanks OptimusSupernova)
- Better support for other addons including TellMeWhen.

*** NEW FEATURES IN 3.0 ***

- Can now select whether cooldown numbers flash the alternate color or display it as solid as the cooldown nears zero.
- Can now select fonts in the addon options panel from a dropdown list containing all known in-game font names.
- Text file in the addon folder contains list of known in-game fonts.
- Cooldown counters now displayed on the spell button flyout frame (e.g. priest chakra).

Configure colors, fonts, and other options through the Cooldowns interface options panel.

Please see the readme.txt file for a tutorial on how to configure fonts in Cooldowns.

* 4.2.3
- Fixed problem caused when rebooting computer while long cooldown is running

Comments

First Previous Page 10 of 22 Next Last
  • #500

    thanks a lot ccc_guy, for those who dont understand what ccc_guy meant . He posted an update to the cooldowns.lua found on your wow addon folder you just need to open it using wordpad copy paste what he posted and it will work out fine :D

     

    Last edited by izeley on 12/27/2011 2:44:50 AM
  • #499

    I really loved this addon. I waited as long as I could to see if updated.  Cooldown Count seems to do the same thing, and I ahve had no complaints with it. 

    I hope this gets updated one day, I prefer this addon....  BRING IT BACK!

  • #498

    Uninstalled. Now using CooldownCount which works just fine and has been updated by the developer.

  • #497

    I can't update it, but for those who read the comments, here is the entire cooldowns.lua that I use now, 80% of the code is the same, I just created 2 special functions that does what Blizzard use to do CooldownSetSlotTimers() and  ResetCooldownTimer(), and updated the other functions to call/handle it I put changes in bold:

    YarkoCooldowns = {}

    YarkoCooldowns.DefaultMainColor = NORMAL_FONT_COLOR;
    YarkoCooldowns.DefaultFlashColor = { r = 1.0, g = 0, b = 0 };
    YarkoCooldowns.DefaultFontLocation = "Fonts";
    YarkoCooldowns.DefaultFontFile = "FRIZQT__.TTF";
    YarkoCooldowns.DefaultFontHeight = 18;
    YarkoCooldowns.DefaultShadow = "Y";
    YarkoCooldowns.DefaultOutline = 1;
    YarkoCooldowns.DefaultTenths = "N";
    YarkoCooldowns.DefaultBelowTwo = "N";
    YarkoCooldowns.DefaultSeconds = 60;
    YarkoCooldowns.CounterFrames = {};


    local Counters = {};

    local Scales = {
        [1] = 1.3,
        [2] = 1.2,
        [3] = .8,
        [4] = .6
    };

    local TimeSinceLastUpdate = 1;    
    local UpdateInterval = 1;        -- update every .1 second
    local MinInterval = .05;        -- used to slowdown the usage when no cooldowns active

    local ButtonWidth = 28;
    local OutlineList = {nil, "OUTLINE", "THICKOUTLINE"};


    function YarkoCooldowns.OnLoad(self)
        self:RegisterEvent("PLAYER_LOGIN");
    end


    function YarkoCooldowns.OnEvent(self, event, ...)
        if (event == "PLAYER_LOGIN") then
            print("Cooldowns for 4.3 Loaded");
                YarkoCooldowns.OptionsSetup();
              YarkoCooldowns.ResetCooldownTimers(self)

            hooksecurefunc("CooldownFrame_SetTimer",   YarkoCooldowns.ResetCooldownTimers);
              --hooksecurefunc('ACTIONBAR_UPDATE_COOLDOWN',   YarkoCooldowns.ResetCooldownTimers);
              --hooksecurefunc('ACTIONBAR_PAGE_CHANGED',    YarkoCooldowns.ResetCooldownTimers);
              hooksecurefunc("SetActiveTalentGroup", YarkoCooldowns.ResetCooldownTimers);
              hooksecurefunc("LearnTalent", YarkoCooldowns.ResetCooldownTimers);
        end
    end


    function YarkoCooldowns.OnUpdate(self, elapsed)
        TimeSinceLastUpdate = TimeSinceLastUpdate + elapsed;
        
        if (TimeSinceLastUpdate > UpdateInterval) then
            --print("Cooldown: Updating timer: " .. TimeSinceLastUpdate .. " " .. UpdateInterval);
            YarkoCooldowns.CooldownSetSlotTimers(self)

            for k, v in pairs(Counters) do
                local timeleft = v.start + v.duration - GetTime();
                local countertext = _G["YarkoCooldowns_"..k.."CounterText"];
                local counter = _G["YarkoCooldowns_"..k.."Counter"];
                counter.timeleft = timeleft;
                
                -- if there is time remaining on cooldown

                if (timeleft > 0 and v.enable > 0) then
                    if (_G[k]:IsVisible()) then
                        local timeleftstr;
                        timeleftstr, counter.length = YarkoCooldowns.GetTimeFormat(timeleft);
                        counter.timeleftstr = timeleftstr;
                        
                        if (timeleft <= 3) then
                            if (not v.flash) then
                                v.flash = true;
                                v.flag = false;
                                v.accum = 0;
                            end
                        else
                            if (v.flash) then
                                v.flash = false;
                            end
                        end
                        
                        if (timeleftstr ~= countertext:GetText() or v.flash) then
                            countertext:SetTextColor(YarkoCooldowns_SavedVars.MainColor.r,
                                YarkoCooldowns_SavedVars.MainColor.g, YarkoCooldowns_SavedVars.MainColor.b);
                            YarkoCooldowns.DrawCooldown(counter);
                            
                            if (v.flash) then
                                if (v.accum <= 0) then
                                    if (not v.flag) then
                                        v.flag = true;
                                    else
                                        v.flag = false;
                                    end
                                    
                                    v.accum = 3;
                                else
                                    v.accum = v.accum - 1;
                                end
                            end
                            
                            if (v.flag) then
                                countertext:SetTextColor(YarkoCooldowns_SavedVars.FlashColor.r,
                                    YarkoCooldowns_SavedVars.FlashColor.g, YarkoCooldowns_SavedVars.FlashColor.b);
                            end
                        end
                    else
                        countertext:SetText("");
                    end
                else
                    Counters[k] = nil;
                    countertext:SetText("");
                end
            end

            TimeSinceLastUpdate = 0;
        end
    end

    function YarkoCooldowns.CooldownSetSlotTimers(self)
        --print("CD slot timers");
        UpdateInterval = 1;

            for i, frame in pairs(ActionBarButtonEventsFrame.frames) do
            --print("CD frame: " .. i );
            local cooldown = frame.cooldown;
            local button = cooldown:GetParent();
                
            local start, duration, enable = GetActionCooldown( button.action );
            if ((start > 0 or duration > 1.5) and enable > 0) then
                --print("Found: " .. start .. " - " .. duration .. " - " .. enable);
                  YarkoCooldowns.CooldownSetTimer(button, start-0.1, duration, enable)
                UpdateInterval = MinInterval;
            end
        end
    end

    function YarkoCooldowns.ResetCooldownTimers(self)
        --print( "Cooldown: ResetTimers");
            for i, frame in pairs(ActionBarButtonEventsFrame.frames) do
            --print("CD frame: " .. i );
            local cooldown = frame.cooldown;
            local button = cooldown:GetParent();
                
            local start, duration, enable = GetActionCooldown( button.action );
              YarkoCooldowns.CooldownSetTimer(button, start, duration, enable)
        end
    end


    function YarkoCooldowns.CooldownSetTimer(self, start, duration, enable)
        if (self.mark == 0 or not start) then
            return;
        end

        local name = self:GetName();
        if (not self.mark) then
            if (not name) then
                self.mark = 0;
                return;
            end
            
            self.mark = (((self:GetParent():GetWidth() >= ButtonWidth
                or self:GetParent():GetParent():GetName() == "WatchFrameLines")
                and 1) or 0);
        end
        
        if (self.mark == 0 or enable == 0) then
            return;
        end
        
        local countername = "YarkoCooldowns_"..name.."Counter";
        --print("Cooldowns Tracking: " .. countername .. " - " .. " - " .. start .. " - " .. duration .. " - " .. enable);

        -- track spells with a cooldown (more than 1.5s)
        if (start > 0 and duration > 1.5 and enable > 0) then
            if (not _G[countername]) then
                local specialaddon = (ButtonFacade or Bartender4);
                
                -- create a Frame with the found cooldown name
                local frame = CreateFrame("Frame", countername, ((not specialaddon) and self) or nil, "YarkoCooldowns_CounterTemplate");
                frame:SetPoint("CENTER", self, "CENTER", 0, 0);
                --frame:SetPoint("CENTER", self:GetParent(), "CENTER", 0, 0);
                
                if (specialaddon) then
                    frame:SetFrameStrata(self:GetParent():GetFrameStrata());
                end
                    
                -- set this frame to be a higher view level
                frame:SetFrameLevel(self:GetFrameLevel() + 5);
                frame:SetToplevel(true);
                frame.cooldown = self;
                self.yarkocounter = frame;
                    
                self:HookScript("OnShow", function(self) self.yarkocounter:Show(); end);
                self:HookScript("OnHide", function(self) self.yarkocounter:Hide(); end);
                    
                tinsert(YarkoCooldowns.CounterFrames, countername);
                YarkoCooldowns.UpdateFont(countername);
                frame:Show();
            end
                
            Counters[name] = {};
            Counters[name].start = start;
            Counters[name].duration = duration;
            Counters[name].enable = enable;
            Counters[name].flash = false;
            Counters[name].flag = false;
            Counters[name].accum = 0;
        else
            if (_G[countername]) then
                _G[countername.."Text"]:SetText("");
            end
            
            Counters[name] = nil;
        end
    end


    function YarkoCooldowns.GetTimeFormat(timeleft)
        local str1;
        local str2;
        
        if (timeleft > 3600) then
            str1 = ((YarkoCooldowns_SavedVars.Tenths == "Y"
                and YarkoCooldowns.TrimZeros(format("%.1f", (timeleft + 180) / 3600)))
                or format("%d", ceil(timeleft / 3600)));
            str2 = str1..((strlen(str1) > 2 and "\n") or "").."h";
        elseif (timeleft > YarkoCooldowns_SavedVars.Seconds) then
            str1 = ((YarkoCooldowns_SavedVars.Tenths == "Y"
                and YarkoCooldowns.TrimZeros(format("%.1f", (timeleft + 3) / 60)))
                or format("%d", ceil(timeleft / 60)));
            str2 = str1..((strlen(str1) > 2 and "\n") or "").."m";
        else
            str1 = ((timeleft <= 2 and YarkoCooldowns_SavedVars.BelowTwo == "Y"
                and format("%.1f", timeleft + 0.05))
                or format("%d", ceil(timeleft)));
            str2 = str1;
        end
        
        return str2, strlen(str1);
    end


    function YarkoCooldowns.TrimZeros(instr)
        local outstr = "";
        local str = "";
        local i;
        
        for i = 1, strlen(instr) do
            if (strsub(instr, i, i) ~= "0") then
                str = strsub(instr, i);
                break;
            end
        end
        
        for i = strlen(str), 1, -1 do
            if (strsub(str, i, i) == ".") then
                outstr = strsub(str, 1, i - 1);
                break;
            end
            
            if (strsub(str, i, i) ~= "0") then
                outstr = strsub(str, 1, i);
                break;
            end
        end
        
        return outstr;
    end


    function YarkoCooldowns.UpdateFont(cooldownframename)
        local cooldownframe = _G[cooldownframename];
        local cooldowntext = _G[cooldownframename.."Text"];
        
        if (YarkoCooldowns_SavedVars.Shadow == "Y") then
            cooldowntext:SetShadowOffset(1, -1);
        else
            cooldowntext:SetShadowOffset(0, 0);
        end
        
        cooldowntext:SetFont(YarkoCooldowns_SavedVars.FontLocation.."\\"..YarkoCooldowns_SavedVars.FontFile,
            YarkoCooldowns_SavedVars.FontHeight, OutlineList[YarkoCooldowns_SavedVars.Outline]);
        cooldowntext:SetTextColor(YarkoCooldowns_SavedVars.MainColor.r, YarkoCooldowns_SavedVars.MainColor.g,
            YarkoCooldowns_SavedVars.MainColor.b);
        
        if (cooldownframe:IsVisible() and cooldownframe.timeleft) then
            cooldownframe.timeleftstr, cooldownframe.length = YarkoCooldowns.GetTimeFormat(cooldownframe.timeleft);
            YarkoCooldowns.DrawCooldown(cooldownframe);
        end
    end


    function YarkoCooldowns.DrawCooldown(cooldownframe)
        local str = cooldownframe.timeleftstr;
        local len = cooldownframe.length;
        
        if (len > 4) then
            len = 4;
        end
        
        cooldownframe:SetScale(Scales[len] * (cooldownframe.cooldown:GetWidth() / ActionButton1:GetWidth()));
        _G[cooldownframe:GetName().."Text"]:SetText(cooldownframe.timeleftstr);
    end

     

    Last edited by cccc_guy on 12/17/2011 8:16:37 AM
  • #510

    THANK YOU THANK YOU THANK YOU!!!!!   That worked like a charm!

  • #496

    I have a fix for this, I just need to upload it.  It tracks all the cooldowns the same way, I'm just trying to find all the ways cooldowns can be reset.

    Who can tell me how to upload a version?

  • #495

    Update already :D i feel weird in raids without this :D

  • #494

    When comes the update? ;'(

  • #493
    Quote from Kratfrotz »

    http://www.curse.com/addons/wow/cooldowncount works

    Works for me, too.

  • #491

    UPDATE IT OMG OMG OMG i feel blind without this lol

  • #492

    Me too! :(

  • #490

    worked in 4.2 update for 4.3 plz wont work anymore

     

  • #488

    Yea I have to agree. You need to update this add on. It was perfect until 4.3 came out, and I don't think you updated it, but it's just not doing as well as it used to.

  • #487

    Am I the only one that the CD show once in a while? Sometime the CD start, other time not and on rare case it start late. Any fix to this?

    I hope you will update soon, because I hate omniCC, it show the GCD of every ability on your bar...

    This addons was perfect for my need!

  • #489

    no your not the only one mate. Ever since 4.3 came out it is only coming up every now and then, its not reliable to show the cool down timers.

    Hoping they are working on the addon to fix the problem

  • To post a comment, please login or register a new account.
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Infinite Crisis NA

Get Your Preferred Access Code!