Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------Timer and Stack count.-----------
- --Display code: This is what actually displays the aura information
- function()
- if WA_RES_MONITOR_Timer ~= nil then
- local timeToCountUpFrom = GetTime() - WA_RES_MONITOR_Timer -- Timer is current time when we started, which then is subtracted by Gettime. Result is this timer counts up.
- local countDownTimer = WA_RES_MONITOR_Res_CD - timeToCountUpFrom --Subtract time since last 0 from the CD of the battle resurrections. Results in a countdown timer.
- local resCharges = GetSpellCharges(20484) -- Get the charges of 'Rebirth'
- if resCharges == nil then -- if rebirth has 'nil' charges, then we are not in a boss encounter. Set it to 0 to avoid errors.
- resCharges = 0
- end
- if countDownTimer < 0 then -- When the timer reaches 0.
- WA_RES_MONITOR_Timer = GetTime() -- Resets the timer to the currect time, so it counts up from 0.
- end
- if resCharges == 0 then -- Aesthetics changes (a red 0, white otherwise)
- resCharges = "|cFFFF0001" .. resCharges .. "|r"
- else
- resCharges ="|cFFFFFFFF" .. resCharges .. "|r"
- end
- return resCharges .. " " .. ("%02d:%02d"):format(countDownTimer/60, countDownTimer%60) .. "\n" -- Output the information.
- else
- return "1 Test Text!" -- This is here to avoid errors.
- end
- end
- --EVENTS: that trigger - ENCOUNTER_START, ENCOUNTER_END, COMBAT_LOG_EVENT_UNFILTERED
- --Custom Trigger Code: This is how the aura is triggered.
- function(event, ...)
- local _, _, _, raidSize = ...
- if event == "ENCOUNTER_START" and raidSize >= 10 then
- local numGroup = GetNumGroupMembers()
- if GetNumGroupMembers() == 0 then -- check for 0 to avoid divide by 0 case
- numGroup = 1
- end
- -- if the encounter has started, we're going to display the aura and reset all values
- WA_RES_MONITOR_Res_CD = ((90/numGroup)*60) -- 90/RaidSize multipied by 60 seconds.
- WA_RES_MONITOR_Timer = GetTime() -- This will get our current time in seconds to count up from
- WA_RES_MONITOR_Res_List = ""
- return true
- elseif event == "ENCOUNTER_END" then -- When an encounter ends, stop the timer and untrigger the aura.
- WA_RES_MONITOR_Timer = nil -- set the timer to nil so there is no counting in the background.
- return false
- end
- end
- --Custom Untrigger: This makes the aura untrigger
- function(event)
- --Triggers when a raid encounter ends (from Custom Trigger)
- return WA_RES_MONITOR_Timer == nil
- end
- -----------------------RESURRECTION LIST: This displays a list of people who used a res spell and on who (reincarnation unsupported atm--------------------------
- --Display Code: This is the code that is actually displayed
- function()
- if WA_RES_MONITOR_Res_List ~= nil then
- --WA_RES_MONITOR_Timer ~= nil ? -- Use this if the above check does not work.
- return WA_RES_MONITOR_Res_List -- Output the information.
- else
- return "|cFFFF7D0AKrazyito|r -> SomeBad-Gnomeregan\n" -- This is here to avoid errors.
- end
- end
- --Events that trigger: ENCOUNTER_START, ENCOUNTER_END, COMBAT_LOG_EVENT_UNFILTERED
- --Custom Trigger: this code triggers the aura
- function(event, ...)
- --@Author: Krazyito-Mal'ganis, US
- --@Version: v3.1
- local _, _, _, raidSize = ...
- local _, subevent, _, _, sourceName, _, _, _, destName, _, _, _, spellName= ... -- Stores the variables passed in from the event
- local setClassColor = function(playerName) -- local function to determine the player class and color it
- local _, playerClass = UnitClass(playerName) -- Determines the player class
- if playerClass == "DEATHKNIGHT" then
- return "|cFFC41F3B" .. playerName .. "|r" -- Place color tags based on class colors on http://www.wowwiki.com/Class_colors
- elseif playerClass == "DRUID" then
- return "|cFFFF7D0A" .. playerName .. "|r"
- elseif playerClass == "HUNTER" then
- return "|cFFABD473" .. playerName .. "|r"
- elseif playerClass == "MAGE" then
- return "|cFF69CCF0" .. playerName .. "|r"
- elseif playerClass == "MONK" then
- return "|cFF00FF96" .. playerName .. "|r"
- elseif playerClass == "PALADIN" then
- return "|cFFF58CBA" .. playerName .. "|r"
- elseif playerClass == "PRIEST" then
- return "|cFFFFFFFF" .. playerName .. "|r"
- elseif playerClass == "ROGUE" then
- return "|cFFFFF569" .. playerName .. "|r"
- elseif playerClass == "SHAMAN" then
- return "|cFF0070DE" .. playerName .. "|r"
- elseif playerClass == "WARLOCK" then
- return "|cFF9482C9" .. playerName .. "|r"
- elseif playerClass == "WARRIOR" then
- return "|cFFC79C6E" .. playerName .. "|r"
- else
- return "|cFFF900FF" .. playerName .. "|r"
- end
- end
- if event == "ENCOUNTER_START" and raidSize >= 10 then
- -- if the encounter has started, we're going to display the aura and reset all values
- WA_RES_MONITOR_Res_List = ""
- return true
- elseif event == "COMBAT_LOG_EVENT_UNFILTERED" and subevent == "SPELL_RESURRECT" and spellName ~= "Mass Resurrection" then
- --Take the current Resurrection list and append the new line under it.
- WA_RES_MONITOR_Res_List = WA_RES_MONITOR_Res_List .. setClassColor(sourceName) .. " -> " .. setClassColor(destName) .. "\n"
- elseif event == "COMBAT_LOG_EVENT_UNFILTERED" and subevent == "SPELL_CAST_SUCESS" and spellName == "Reincarnation" then
- --Take the current Resurrection list and append reincarnation as a new line.
- WA_RES_MONITOR_Res_List = WA_RES_MONITOR_Res_List .. "Reincarnation -> " .. setClassColor(sourceName) .. "\n"
- end
- end
- --custom untrigger
- function(event)
- --Triggers when a raid encounter ends
- --if event == "ENCOUNTER_END" then return true end -- When an encounter ends, untrigger the aura
- return false -- Switch this with the above code to have the display go away when combat ends.
- end
Advertisement
Add Comment
Please, Sign In to add comment