nkXtdMacro - cooldown in macro

  • I’m looking for a way to add the read back cooldown to a macro, it would be the best if it would read back the cooldown from the skill used in this macro. I couldn’t find the strict macro, only some addons. I’ve already checked MacroCooldowns and ExtraActionBars but they don’t fulfill the task in this case. Macro has got conditions and even if it doesn’t use the skill it still counts the cooldown. nkXtdMacro worked the best here and it would be perfect but it’s got one big disadvantage: it causes micro lags while using skills and not only macros.


    The addon itself is not long, so maybe I can find some programmer here, who can catch where the problem is and how to change it. All I know is that after clicking any skill the addon reacts to it and checks all 80 fields on action bars searching for ‘names’ and that causes the micro lags.


    And this is the exact macro that should show the cooldown:

    Code: Use Sapping Arrow if the target is not already influenced by Withering Seed or Sapping Arrow debuff.
    1. /script i=1;Buff = false;while UnitDebuff("target", i) ~= nil do if UnitDebuff("target", i) == "Withering Seed" or UnitDebuff("target", i) == "Sapping Arrow" then Buff = true;break;end;i=i+1;end;if (not Buff) then CastSpellByName("Sapping Arrow");end;

    [Ukończone misje: 7277] [Zdobyte tytuły: 763] [Zdobyte karty: 1969]


    RAScrn-Shot-20221112-17523236-cleanupoy.jpg

  • I did not fully understand what you want to do - do you want to get the cooldown of one of your skills or the duration of an enemy buff?


    For the first part you can use cd, remaining = GetSkillCooldown(page,skill) where cd is the total cooldown, remaining the remaining cooldown, page is the skillbookpage (e.g. 3 for secondary class skills) and skill is the number of the skill in that section (e.g. GetSkillCooldown(3,5) for the "Silence" spell of a Warlock/Mage).


    For the second objective you can use UnitDebuffLeftTime("target",i) where you can replace "target" by another UnitID if you want and i is the number of the (de)buff, so you have to iterate over it.


    I wrote this without checking and testing it, thats just what I remember. Read more in the wiki.




    PS: @Mods: We need a place in the forum for this kind of questions, this does not fit into guides!

    The ships hung in the sky in much the same way that bricks don’t.


    Douglas Adams in The Hitchhiker's Guide to the Galaxy

  • Diogenes

    Added the Label Other
  • I did not fully understand what you want to do - do you want to get the cooldown of one of your skills or the duration of an enemy buff?

    I want it to check the cooldown of the given skill and display it on the macro's icon, exactly what the addon nkXtdMacro does. But as I mentioned before, the nkXtdMacro addon causes micro lags while using whichever skill that has global cooldown.



    As a small bonus also the cooldown handling will be applied on the actionbar slot the macro is put on. If the skill it is named after has a CD you'll see the numbers ticking down on the action bar like for the regular skill.

    Macro with nkXtdMacro


    macro.jpg

    [Ukończone misje: 7277] [Zdobyte tytuły: 763] [Zdobyte karty: 1969]


    RAScrn-Shot-20221112-17523236-cleanupoy.jpg

  • I want it to check the cooldown of the given skill and display it on the macro's icon, exactly what the addon nkXtdMacro does. But as I mentioned before, the nkXtdMacro addon causes micro lags while using whichever skill that has global cooldown.

    I am using the Addon MacroCooldowns for this, you could give it a try.

    The ships hung in the sky in much the same way that bricks don’t.


    Douglas Adams in The Hitchhiker's Guide to the Galaxy

  • I want it to check the cooldown of the given skill and display it on the macro's icon, exactly what the addon nkXtdMacro does. But as I mentioned before, the nkXtdMacro addon causes micro lags while using whichever skill that has global cooldown.

    I am using the Addon MacroCooldowns for this, you could give it a try.

    I’ve already checked MacroCooldowns and ExtraActionBars but they don’t fulfill the task in this case. Macro has got conditions and even if it doesn’t use the skill it still counts the cooldown :(

    [Ukończone misje: 7277] [Zdobyte tytuły: 763] [Zdobyte karty: 1969]


    RAScrn-Shot-20221112-17523236-cleanupoy.jpg

  • Novar

    Closed the thread.