Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function()
- local buffName = "Twilight Ward"
- local buff = UnitAura("player", buffName)
- local timeRemain = ""
- if buff then
- local timeNow = GetTime()
- local timeExpires = select(7, UnitAura("player", buffName))
- local timeLeft = timeExpires - timeNow
- if timeLeft < 5 then
- timeRemain = math.floor(timeLeft)
- if lastTime ~= timeRemain then
- if timeRemain == 5 then
- PlaySoundFile("Interface/AddOns/WeakAuras/Media/Sounds/blast.mp3")
- elseif timeRemain == 4 then
- PlaySoundFile("Interface/AddOns/WeakAuras/Media/Sounds/blast.mp3")
- elseif timeRemain == 3 then
- PlaySoundFile("Interface/AddOns/WeakAuras/Media/Sounds/blast.mp3")
- elseif timeRemain == 2 then
- PlaySoundFile("Interface/AddOns/WeakAuras/Media/Sounds/blast.mp3")
- elseif timeRemain == 1 then
- PlaySoundFile("Interface/AddOns/WeakAuras/Media/Sounds/blast.mp3")
- elseif timeRemain == 0 then
- PlaySoundFile("Interface/AddOns/WeakAuras/Media/Sounds/blast.mp3")
- end
- lastTime = timeRemain
- end
- end
- end
- return tostring(timeRemain)
- end
Advertisement
Add Comment
Please, Sign In to add comment