UnitDebuff() + GetSpellInfo()
Hello fellas! i am new here so if the thread is posted wrong in anyway that will be why!
On to the question.
So i am progressing helya mythic and decided to make a addon, not going that well..
-----------------------------------------------------------------------------------------------------------
local total = 0
local added = 1
local TaintOfTheSea = GetSpellInfo(228054)
if UnitDebuff("player", TaintOfTheSea) then
function onUpdate(self,elapsed)
repeat
C_Timer.After(1.2, function() SendChatMessage("{moon} MOVE TO MOON {moon}", "Yell", nil, name) end)
total = total + added
until total == 2
end
end
if total == 2 then
C_Timer.After(1, function() SendChatMessage("Dispell on {moon} in 5", "Yell", nil, name) end)
C_Timer.After(2, function() SendChatMessage("Dispell on {moon} in 4", "Yell", nil, name) end)
C_Timer.After(3.2, function() SendChatMessage("Dispell on {moon} in 3", "Yell", nil, name) end)
C_Timer.After(4.2, function() SendChatMessage("Dispell on {moon} in 2", "Yell", nil, name) end)
C_Timer.After(5.2, function() SendChatMessage("Dispell on {moon} in 1", "Yell", nil, name) end)
end
-----------------------------------------------------------------------------------------------------------------------
Okay so here is my code , It does not give any error inside world of warcraft at all but when i get Taint of The sea" debuff on my characther it doesn't do the following code i want to!
What am i doing wrong? what do i have to add to tell the program that if i get "Taint of the sea" i want to do the fellowing code after the if statement!
kty<3
Best regards
wille480
|