Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-17-17, 12:09 PM   #1
wille480
A Wyrmkin Dreamwalker
Join Date: Jan 2017
Posts: 56
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
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » UnitDebuff() + GetSpellInfo()


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off