Add new code snippets
This commit is contained in:
16
Complete Projects/BFA Freakz/Grand Crusader Proc.lua
Normal file
16
Complete Projects/BFA Freakz/Grand Crusader Proc.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
--COMBAT_LOG_EVENT_UNFILTERED UNIT_AURA
|
||||
function(e, ...)
|
||||
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||
local se = select(2, CombatLogGetCurrentEventInfo())
|
||||
local sid = select(12, CombatLogGetCurrentEventInfo())
|
||||
local caster = select(5, CombatLogGetCurrentEventInfo())
|
||||
if caster == UnitName("player") and se == "SPELL_CAST_SUCCESS" and sid == 53595 then
|
||||
WeakAurasSaved.CustomTrash.ProcShit.casts = WeakAurasSaved.CustomTrash.ProcShit.casts + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--DISPLAY
|
||||
function()
|
||||
return WeakAurasSaved.CustomTrash.ProcShit.procs .. " / " .. WeakAurasSaved.CustomTrash.ProcShit.casts .. "\n" .. WeakAurasSaved.CustomTrash.ProcShit.procs / WeakAurasSaved.CustomTrash.ProcShit.casts
|
||||
end
|
||||
34
Complete Projects/BFA Freakz/RareAlert.lua
Normal file
34
Complete Projects/BFA Freakz/RareAlert.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
--Custom text
|
||||
function()
|
||||
output = ""
|
||||
for k, v in pairs(aura_env.elites) do
|
||||
output = output .. aura_env.eliteColor .. k .. " " .. v .. "\124r\n"
|
||||
end
|
||||
for k, v in pairs(aura_env.rares) do
|
||||
output = output .. aura_env.rareColor .. k .. " " .. v .. "\124r\n"
|
||||
end
|
||||
return output
|
||||
end
|
||||
|
||||
--NAME_PLATE_UNIT_ADDED
|
||||
function(e, u)
|
||||
class = UnitClassification(u)
|
||||
-- use date() for time
|
||||
if class == "elite" then
|
||||
aura_env.elites[UnitName(u)] = aura_env.GetTime()
|
||||
return true
|
||||
elseif class == "rare" or class == "rareelite" then
|
||||
aura_env.rares[UnitName(u)] = aura_env.GetTime()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
--INIT
|
||||
aura_env.elites = {}
|
||||
aura_env.rares = {}
|
||||
aura_env.eliteColor = "\124c" .. "ff3e3e3e"
|
||||
aura_env.rareColor = "\124c" .. "ffffe72e"
|
||||
|
||||
aura_env.GetTime = function()
|
||||
return string.match(date(), "%d%d:%d%d:%d%d")
|
||||
endee
|
||||
Reference in New Issue
Block a user