I currently use this script I found to run a coundown timer, but I'm wondering if there's a way I can call DBM's countdown function with this script as well
Lua Code:
local defaultcdtime = 6
local channel = "RAID_WARNING"
local frame = CreateFrame("frame", nil)
SlashCmdList['COUNTDOWN'] = function(newtime)
if newtime ~= "" then
cdtime = newtime+1
else
cdtime = defaultcdtime+1
end
local ending = false
local start = floor(GetTime())
local throttle = cdtime
frame:SetScript("OnUpdate", function()
if ending == true then return end
local countdown = (start - floor(GetTime()) + cdtime)
if (countdown + 1) == throttle and countdown >= 0 then
if countdown == 0 then
SendChatMessage('Pulling', channel)
throttle = countdown
ending = true
else
SendChatMessage(countdown, channel)
throttle = countdown
end
end
end)
end
SLASH_COUNTDOWN1 = "/inc"