I want the addon to track the time left on
overkill with a Deadly Boss Mods timer.
my question is this:
DBM.StartStatusBarTimer(6, "Overkill",nil,false);
how do I check for loss of stealth and then use the above code if that condition is met. I'm actually a noob at luascript but i figure i'd try to learn a little and get this cool first-time done addon made (not even by me :P)
function OverkillTimer_OnLoad()
--Register Events
this:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF");
end
function OverkillTimer_OnEvent()
--message we are looking for
if (arg1 == self.L 'Stealth fades from you.') then
--create a DBM timer for 6 seconds
DBM.StartStatusBarTimer(6, "Overkill",nil,false);
end
end
edit: tandanu gave me this code to try
local mod = DBM:NewBossMod("Overkill", "Overkill Timer", nil, DBM_OTHER, DBM_NO_GUI_TAB, 0)
mod:RegisterEvents(
"SPELL_AURA_REMOVED",
)
function mod:OnEvent(event, args)
if event == "SPELL_AURA_REMOVED" then
if args.spellId == 1787 then
self:StartStatusBarTimer(6, "Overkill", 58427, false)
end
end
end
|
but that won't seem to work either.