Created
April 23, 2014 17:05
-
-
Save CapsAdmin/11223727 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment