Well gosh, glad you guys took to helping me optimize it
Also looks like
Code:
SlashCmdList["DEADLYBOSSMODS"]("pull ".. seconds)
Will simulate the /pull command for DBM
So the current script stands at
Lua Code:
local pull, seconds, onesec
local frame = CreateFrame("Frame")
frame:Hide()
frame:SetScript("OnUpdate", function(self, elapsed)
--Start DBM pull timer
onesec = onesec - elapsed
pull = pull - elapsed
if pull <= 0 then
SendChatMessage("Pulling!", "SAY")
self:Hide()
elseif onesec <= 0 then
SendChatMessage(seconds, "SAY")
seconds = seconds - 1
onesec = 1
end
if IsAddOnLoaded("DBM-Core") then
SlashCmdList["DEADLYBOSSMODS"]("pull ".. seconds)
end
end)
SlashCmdList["COUNTDOWN"] = function(t)
t = tonumber(t) or 6
pull = t + 1
seconds = t
onesec = 1
frame:Show()
end
SLASH_COUNTDOWN1 = "/inc"
course running that will cause 50 million DBM timer bars