Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
1.8K
Active cooldown print (onSpellCast) #11
This will print in chat the number of any active cooldowns when you cast a spell
I used this for my spell caster to get all the IDs of unknown spells on custom servers such as Evolunia
912b | 24 lines.
 --[[
  Script made by Lee (Discord: l33_) - www.trainorcreations.com
  If you want to support my work, feel free to donate at https://trainorcreations.com/donate
  PS. Stop ripping off my work and selling it as your own.
 ]]--
local cdDebug = macro(2000, "Cooldown print", function() end)
onTalk(function(name, level, mode, text, channelId, pos)
    if cdDebug.isOff() then return end
    if name ~= player:getName() then return end
    if mode ~= 34 then return end

    local cStr = {}
    local gStr = {}
    for i = 1, 255 do
        if (modules.game_cooldown.isCooldownIconActive(i)) then table.insert(cStr, i) end
        if i <= 4 then
            if (modules.game_cooldown.isGroupCooldownIconActive(i)) then
                table.insert(gStr, i)
            end
        end
    end

    if table.getn(cStr) >= 1 or table.getn(gStr) >= 1 then
        modules.game_textmessage.displayGameMessage('Active Cooldowns: ' .. table.concat(cStr, ', ')..
                '\nGroup Cooldowns: ' .. table.concat(gStr, ', '))
    else
        modules.game_textmessage.displayGameMessage('No active cooldowns')
    end
end)

01 Jan 2020
Ads