This commit is contained in:
2024-08-24 22:41:08 +02:00
parent 77f1ac5d7a
commit c21f59778f
431 changed files with 68581 additions and 68581 deletions

View File

@@ -1,55 +1,55 @@
--Guess attack speed by taking entire data set and comparing 2 - 4 intervals then storing the n into seperate array and incrementing it --Guess attack speed by taking entire data set and comparing 2 - 4 intervals then storing the n into seperate array and incrementing it
--Attack speed with most counts in latter array is the best guess by m% --Attack speed with most counts in latter array is the best guess by m%
--Correct this by repeating step on exit combat maybe? --Correct this by repeating step on exit combat maybe?
--Look at tolerances as well --Look at tolerances as well
local dataSet2s = { local dataSet2s = {
[1]=540390408.9506, [1]=540390408.9506,
[2]=540392394.9163, [2]=540392394.9163,
[3]=540394398.5326, [3]=540394398.5326,
[4]=540396409.5288, [4]=540396409.5288,
[5]=540398396.6414, [5]=540398396.6414,
[6]=540400397.0754, [6]=540400397.0754,
[7]=540402384.8113, [7]=540402384.8113,
[8]=540404385.3304, [8]=540404385.3304,
[9]=540406398.99, [9]=540406398.99,
[10]=540408386.472, [10]=540408386.472,
[11]=540410386.9851, [11]=540410386.9851,
[12]=540412374.8497, [12]=540412374.8497,
[13]=540414375.1427, [13]=540414375.1427,
[14]=540416373.0995, [14]=540416373.0995,
[15]=540418376.9931, [15]=540418376.9931,
[16]=540420390.6971 [16]=540420390.6971
} }
local dataSet1p5s = { local dataSet1p5s = {
[1]=541651364.1916, [1]=541651364.1916,
[2]=541652857.9058, [2]=541652857.9058,
[3]=541654365.8491, [3]=541654365.8491,
[4]=541655858.3292, [4]=541655858.3292,
[5]=541657352.4962, [5]=541657352.4962,
[6]=541658846.2963, [6]=541658846.2963,
[7]=541660354.015, [7]=541660354.015,
[8]=541661847.0112, [8]=541661847.0112,
[9]=541663340.6759, [9]=541663340.6759,
[10]=541664861.3772, [10]=541664861.3772,
[11]=541666354.9449, [11]=541666354.9449,
[12]=541667848.8308, [12]=541667848.8308,
[13]=541669343.2332, [13]=541669343.2332,
[14]=541670849.9777, [14]=541670849.9777,
[15]=541672344.0613, [15]=541672344.0613,
[16]=541673851.2346 [16]=541673851.2346
} }
local tolerance = 50 local tolerance = 50
local tempAverages = {} local tempAverages = {}
-- rounds .5 to 0 or 1; want to round to .5 or .2 or alike -- rounds .5 to 0 or 1; want to round to .5 or .2 or alike
for k,v in ipairs(dataSet1p5s) do for k,v in ipairs(dataSet1p5s) do
if k > 1 then if k > 1 then
local tempAvg = (dataSet1p5s[k] - dataSet1p5s[k - 1]) local tempAvg = (dataSet1p5s[k] - dataSet1p5s[k - 1])
print(((math.floor(tempAvg / 1000) - (tempAvg / 1000)) * 1000), (math.ceil(tempAvg / 1000) - (tempAvg / 1000)) * 1000) print(((math.floor(tempAvg / 1000) - (tempAvg / 1000)) * 1000), (math.ceil(tempAvg / 1000) - (tempAvg / 1000)) * 1000)
if not tempAverages[tempAvg] then tempAverages[tempAvg] = 0 end if not tempAverages[tempAvg] then tempAverages[tempAvg] = 0 end
tempAverages[tempAvg] = tempAverages[tempAvg] + 1 tempAverages[tempAvg] = tempAverages[tempAvg] + 1
end end
end end
for k,v in pairs(tempAverages) do for k,v in pairs(tempAverages) do
print(k,v) print(k,v)
end end

View File

@@ -1,16 +1,16 @@
--COMBAT_LOG_EVENT_UNFILTERED UNIT_AURA --COMBAT_LOG_EVENT_UNFILTERED UNIT_AURA
function(e, ...) function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, CombatLogGetCurrentEventInfo()) local se = select(2, CombatLogGetCurrentEventInfo())
local sid = select(12, CombatLogGetCurrentEventInfo()) local sid = select(12, CombatLogGetCurrentEventInfo())
local caster = select(5, CombatLogGetCurrentEventInfo()) local caster = select(5, CombatLogGetCurrentEventInfo())
if caster == UnitName("player") and se == "SPELL_CAST_SUCCESS" and sid == 53595 then if caster == UnitName("player") and se == "SPELL_CAST_SUCCESS" and sid == 53595 then
WeakAurasSaved.CustomTrash.ProcShit.casts = WeakAurasSaved.CustomTrash.ProcShit.casts + 1 WeakAurasSaved.CustomTrash.ProcShit.casts = WeakAurasSaved.CustomTrash.ProcShit.casts + 1
end end
end end
end end
--DISPLAY --DISPLAY
function() function()
return WeakAurasSaved.CustomTrash.ProcShit.procs .. " / " .. WeakAurasSaved.CustomTrash.ProcShit.casts .. "\n" .. WeakAurasSaved.CustomTrash.ProcShit.procs / WeakAurasSaved.CustomTrash.ProcShit.casts return WeakAurasSaved.CustomTrash.ProcShit.procs .. " / " .. WeakAurasSaved.CustomTrash.ProcShit.casts .. "\n" .. WeakAurasSaved.CustomTrash.ProcShit.procs / WeakAurasSaved.CustomTrash.ProcShit.casts
end end

View File

@@ -1,34 +1,34 @@
--Custom text --Custom text
function() function()
output = "" output = ""
for k, v in pairs(aura_env.elites) do for k, v in pairs(aura_env.elites) do
output = output .. aura_env.eliteColor .. k .. " " .. v .. "\124r\n" output = output .. aura_env.eliteColor .. k .. " " .. v .. "\124r\n"
end end
for k, v in pairs(aura_env.rares) do for k, v in pairs(aura_env.rares) do
output = output .. aura_env.rareColor .. k .. " " .. v .. "\124r\n" output = output .. aura_env.rareColor .. k .. " " .. v .. "\124r\n"
end end
return output return output
end end
--NAME_PLATE_UNIT_ADDED --NAME_PLATE_UNIT_ADDED
function(e, u) function(e, u)
class = UnitClassification(u) class = UnitClassification(u)
-- use date() for time -- use date() for time
if class == "elite" then if class == "elite" then
aura_env.elites[UnitName(u)] = aura_env.GetTime() aura_env.elites[UnitName(u)] = aura_env.GetTime()
return true return true
elseif class == "rare" or class == "rareelite" then elseif class == "rare" or class == "rareelite" then
aura_env.rares[UnitName(u)] = aura_env.GetTime() aura_env.rares[UnitName(u)] = aura_env.GetTime()
return true return true
end end
end end
--INIT --INIT
aura_env.elites = {} aura_env.elites = {}
aura_env.rares = {} aura_env.rares = {}
aura_env.eliteColor = "\124c" .. "ff3e3e3e" aura_env.eliteColor = "\124c" .. "ff3e3e3e"
aura_env.rareColor = "\124c" .. "ffffe72e" aura_env.rareColor = "\124c" .. "ffffe72e"
aura_env.GetTime = function() aura_env.GetTime = function()
return string.match(date(), "%d%d:%d%d:%d%d") return string.match(date(), "%d%d:%d%d:%d%d")
endee endee

View File

@@ -1,10 +1,10 @@
if not aura_env.region.text then if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, aura_env.region) local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text aura_env.region.text = text
print("ok!") print("ok!")
end end
aura_env.region.text:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE, MONOCHROME") aura_env.region.text:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE, MONOCHROME")
aura_env.region.text:SetTextColor(0, 1, 0, 0.8) aura_env.region.text:SetTextColor(0, 1, 0, 0.8)
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 1, 0) aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 1, 0)
aura_env.region.text:SetText("SW") aura_env.region.text:SetText("SW")
aura_env.region.text:Show() aura_env.region.text:Show()

View File

@@ -1,27 +1,27 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED --NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(e, unit) function(e, unit)
if e == "NAME_PLATE_UNIT_ADDED" then if e == "NAME_PLATE_UNIT_ADDED" then
if aura_env.altlist[UnitName(unit)] then if aura_env.altlist[UnitName(unit)] then
local plate = C_NamePlate.GetNamePlateForUnit(unit) local plate = C_NamePlate.GetNamePlateForUnit(unit)
if plate then if plate then
aura_env.region:SetAnchor("CENTER", plate, "CENTER") aura_env.region:SetAnchor("CENTER", plate, "CENTER")
aura_env.region:SetOffset(0, 50) aura_env.region:SetOffset(0, 50)
aura_env.region:Color(1, 1, 1, 1) aura_env.region:Color(1, 1, 1, 1)
return true return true
end end
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" then elseif e == "NAME_PLATE_UNIT_REMOVED" then
if aura_env.altlist[UnitName(unit)] then if aura_env.altlist[UnitName(unit)] then
aura_env.region:ClearAllPoints() aura_env.region:ClearAllPoints()
aura_env.region:Color(1, 1, 1, 0) aura_env.region:Color(1, 1, 1, 0)
return false return false
end end
end end
end end
--INIT --INIT
aura_env.altlist = aura_env.altlist =
{ {
["Elna"] = 1, ["Elna"] = 1,
["Melna"] = 1, ["Melna"] = 1,
} }

View File

@@ -1,22 +1,22 @@
--TRADE_SHOW --TRADE_SHOW
function() function()
if UnitName("target") == "Melna" then if UnitName("target") == "Melna" then
local items = 0 local items = 0
for i = 0, 4 do for i = 0, 4 do
for j = 1, GetContainerNumSlots(i) do for j = 1, GetContainerNumSlots(i) do
local link = select(7, GetContainerItemInfo(i, j)) local link = select(7, GetContainerItemInfo(i, j))
if link then if link then
local type = select(7, GetItemInfo(link)) local type = select(7, GetItemInfo(link))
if (type == "Cooking" or type == "Cloth") and items < 6 then if (type == "Cooking" or type == "Cloth") and items < 6 then
UseContainerItem(i, j) UseContainerItem(i, j)
items = items + 1 items = items + 1
elseif items >= 6 then elseif items >= 6 then
AcceptTrade() AcceptTrade()
return return
end end
end end
end end
end end
AcceptTrade() AcceptTrade()
end end
end end

File diff suppressed because it is too large Load Diff

View File

@@ -1,27 +1,27 @@
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED --COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED
function(e, ...) function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...) local se = select(2, ...)
if se == "SPELL_ENERGIZE" then if se == "SPELL_ENERGIZE" then
local caster = select(9, ...) local caster = select(9, ...)
if caster == UnitName("player") then if caster == UnitName("player") then
local spell = select(13, ...) local spell = select(13, ...)
if spell == "Lucid Dreams" then if spell == "Lucid Dreams" then
local amount = select(15, ...) local amount = select(15, ...)
aura_env.amount = aura_env.amount + amount aura_env.amount = aura_env.amount + amount
return true return true
end end
end end
end end
elseif e == "PLAYER_REGEN_DISABLED" then elseif e == "PLAYER_REGEN_DISABLED" then
aura_env.amount = 0 aura_env.amount = 0
end end
end end
--DISPLAY --DISPLAY
function() function()
return aura_env.amount return aura_env.amount
end end
--INIT --INIT
aura_env.amount = 0 aura_env.amount = 0

View File

@@ -1,64 +1,64 @@
--COMBAT_LOG_EVENT_UNFILTERED --COMBAT_LOG_EVENT_UNFILTERED
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "SWING_DAMAGE" then if se == "SWING_DAMAGE" then
local dest = select(10, ...) local dest = select(10, ...)
if dest == UnitName("player") then if dest == UnitName("player") then
aura_env.nummelee = aura_env.nummelee + 1 aura_env.nummelee = aura_env.nummelee + 1
local bloq = select(17, ...) local bloq = select(17, ...)
if bloq then if bloq then
aura_env.numbloq = aura_env.numbloq + 1 aura_env.numbloq = aura_env.numbloq + 1
local amount = select(13, ...) local amount = select(13, ...)
local total = amount + bloq local total = amount + bloq
local pbloq = bloq / total * 100 local pbloq = bloq / total * 100
aura_env.bloqs[#aura_env.bloqs + 1] = pbloq aura_env.bloqs[#aura_env.bloqs + 1] = pbloq
local count = 1 local count = 1
for k,v in ipairs(aura_env.bloqs) do for k,v in ipairs(aura_env.bloqs) do
aura_env.pbloq = aura_env.pbloq + v aura_env.pbloq = aura_env.pbloq + v
count = count + 1 count = count + 1
end end
aura_env.pbloq = aura_env.pbloq / count aura_env.pbloq = aura_env.pbloq / count
return true return true
end end
end end
elseif se == "SPELL_DAMAGE" then elseif se == "SPELL_DAMAGE" then
local dest = select(10, ...) local dest = select(10, ...)
if dest == UnitName("player") then if dest == UnitName("player") then
aura_env.nummelee = aura_env.nummelee + 1 aura_env.nummelee = aura_env.nummelee + 1
local bloq = select(20, ...) local bloq = select(20, ...)
if bloq then if bloq then
aura_env.numbloq = aura_env.numbloq + 1 aura_env.numbloq = aura_env.numbloq + 1
local amount = select(16, ...) local amount = select(16, ...)
local total = amount + bloq local total = amount + bloq
local pbloq = bloq / total * 100 local pbloq = bloq / total * 100
aura_env.bloqs[#aura_env.bloqs + 1] = pbloq aura_env.bloqs[#aura_env.bloqs + 1] = pbloq
local count = 1 local count = 1
for k,v in ipairs(aura_env.bloqs) do for k,v in ipairs(aura_env.bloqs) do
aura_env.pbloq = aura_env.pbloq + v aura_env.pbloq = aura_env.pbloq + v
count = count + 1 count = count + 1
end end
aura_env.pbloq = aura_env.pbloq / count aura_env.pbloq = aura_env.pbloq / count
return true return true
end end
end end
end end
end end
--DISPLAY --DISPLAY
function() function()
return aura_env.round(aura_env.pbloq, 2) .. "\n" .. aura_env.round((aura_env.numbloq / aura_env.nummelee) * 100, 2) return aura_env.round(aura_env.pbloq, 2) .. "\n" .. aura_env.round((aura_env.numbloq / aura_env.nummelee) * 100, 2)
end end
--INIT --INIT
aura_env.bloqs = {} aura_env.bloqs = {}
aura_env.numbloq = 0 aura_env.numbloq = 0
aura_env.nummelee = 0 aura_env.nummelee = 0
aura_env.pbloq = 0 aura_env.pbloq = 0
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end

View File

@@ -1,162 +1,162 @@
--COMBAT_LOG_EVENT_UNFILTERED --COMBAT_LOG_EVENT_UNFILTERED
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "SWING_DAMAGE" then if se == "SWING_DAMAGE" then
local dest = select(10, ...) local dest = select(10, ...)
if dest == UnitName("player") then if dest == UnitName("player") then
local amount = select(13, ...) local amount = select(13, ...)
local block = select(17, ...) or 0 local block = select(17, ...) or 0
local absorb = select(18, ...) or 0 local absorb = select(18, ...) or 0
if amount then if amount then
local output = amount local output = amount
local total = amount local total = amount
total = total + block + absorb total = total + block + absorb
local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0 local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0
output = output .. " " .. block .. " " .. absorb .. " " .. rel output = output .. " " .. block .. " " .. absorb .. " " .. rel
if #aura_env.melee == aura_env.lines then if #aura_env.melee == aura_env.lines then
table.remove(aura_env.melee, 1) table.remove(aura_env.melee, 1)
table.insert(aura_env.melee, output) table.insert(aura_env.melee, output)
else else
table.insert(aura_env.melee, output) table.insert(aura_env.melee, output)
end end
return true return true
end end
end end
elseif se == "SPELL_DAMAGE" then elseif se == "SPELL_DAMAGE" then
local dest = select(10, ...) local dest = select(10, ...)
if dest == UnitName("player") then if dest == UnitName("player") then
local amount = select(16, ...) local amount = select(16, ...)
local block = select(20, ...) or 0 local block = select(20, ...) or 0
local absorb = select(21, ...) or 0 local absorb = select(21, ...) or 0
if amount then if amount then
local output = amount local output = amount
local total = amount local total = amount
total = total + block + absorb total = total + block + absorb
local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0 local rel = aura_env.round(((absorb + block) / total) * 100, 2) or 0
output = output .. " " .. block .. " " .. absorb .. " " .. rel output = output .. " " .. block .. " " .. absorb .. " " .. rel
if #aura_env.melee == aura_env.lines then if #aura_env.melee == aura_env.lines then
table.remove(aura_env.melee, 1) table.remove(aura_env.melee, 1)
table.insert(aura_env.melee, output) table.insert(aura_env.melee, output)
else else
table.insert(aura_env.melee, output) table.insert(aura_env.melee, output)
end end
return true return true
end end
end end
end end
end end
--DISPLAY --DISPLAY
function() function()
local meleeT, blockT, absorbT, perT = "", "", "", "" local meleeT, blockT, absorbT, perT = "", "", "", ""
local melee, block, absorb, per = 0, 0, 0, 0 local melee, block, absorb, per = 0, 0, 0, 0
for i = #aura_env.melee, 1, -1 do for i = #aura_env.melee, 1, -1 do
melee = aura_env.melee[i]:match("(%d+)") melee = aura_env.melee[i]:match("(%d+)")
if melee then if melee then
melee = tonumber(melee) melee = tonumber(melee)
block = aura_env.melee[i]:match("%d+ (%d+)") or 0 block = aura_env.melee[i]:match("%d+ (%d+)") or 0
block = tonumber(block) block = tonumber(block)
absorb = aura_env.melee[i]:match("%d+ %d+ (%d+)") or 0 absorb = aura_env.melee[i]:match("%d+ %d+ (%d+)") or 0
absorb = tonumber(absorb) absorb = tonumber(absorb)
if block or absorb then if block or absorb then
per = aura_env.melee[i]:match("%d+ %d+ %d+ (%d+%.?%d*)") or 0 per = aura_env.melee[i]:match("%d+ %d+ %d+ (%d+%.?%d*)") or 0
per = tonumber(per) per = tonumber(per)
end end
meleeT = meleeT .. aura_env.shorten(melee) .. "\n" meleeT = meleeT .. aura_env.shorten(melee) .. "\n"
blockT = blockT .. aura_env.shorten(block) .. "\n" blockT = blockT .. aura_env.shorten(block) .. "\n"
absorbT = absorbT .. aura_env.shorten(absorb) .. "\n" absorbT = absorbT .. aura_env.shorten(absorb) .. "\n"
perT = perT .. aura_env.shorten(per) .. "\n" perT = perT .. aura_env.shorten(per) .. "\n"
end end
end end
aura_env.region.melee:SetText(meleeT) aura_env.region.melee:SetText(meleeT)
aura_env.region.block:SetText(blockT) aura_env.region.block:SetText(blockT)
aura_env.region.absorb:SetText(absorbT) aura_env.region.absorb:SetText(absorbT)
aura_env.region.percentage:SetText(perT) aura_env.region.percentage:SetText(perT)
end end
--INIT --INIT
aura_env.lines = 10 aura_env.lines = 10
---------------------------------------- ----------------------------------------
-- PLEASE DO NOT EDIT BELOW THIS LINE -- -- PLEASE DO NOT EDIT BELOW THIS LINE --
---------------------------------------- ----------------------------------------
local fontsize = select(2, aura_env.region.text:GetFont()) local fontsize = select(2, aura_env.region.text:GetFont())
aura_env.region:SetWidth(fontsize * 20) aura_env.region:SetWidth(fontsize * 20)
aura_env.region:SetHeight(fontsize * aura_env.lines) aura_env.region:SetHeight(fontsize * aura_env.lines)
aura_env.melee = {""} aura_env.melee = {""}
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
if not aura_env.region.melee then if not aura_env.region.melee then
local melee = aura_env.region:CreateFontString(nil, aura_env.region) local melee = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.melee = melee aura_env.region.melee = melee
end end
aura_env.region.melee:SetFont(aura_env.region.text:GetFont()) aura_env.region.melee:SetFont(aura_env.region.text:GetFont())
aura_env.region.melee:SetTextColor(1, 1, 1) aura_env.region.melee:SetTextColor(1, 1, 1)
aura_env.region.melee:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 7.5, 0) aura_env.region.melee:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 7.5, 0)
aura_env.region.melee:SetWidth(fontsize * 5) aura_env.region.melee:SetWidth(fontsize * 5)
aura_env.region.melee:SetJustifyH("LEFT") aura_env.region.melee:SetJustifyH("LEFT")
aura_env.region.melee:SetText("") aura_env.region.melee:SetText("")
aura_env.region.melee:Show() aura_env.region.melee:Show()
if not aura_env.region.block then if not aura_env.region.block then
local block = aura_env.region:CreateFontString(nil, aura_env.region) local block = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.block = block aura_env.region.block = block
end end
aura_env.region.block:SetFont(aura_env.region.text:GetFont()) aura_env.region.block:SetFont(aura_env.region.text:GetFont())
aura_env.region.block:SetTextColor(0.75, 0.23, 0.23) aura_env.region.block:SetTextColor(0.75, 0.23, 0.23)
aura_env.region.block:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 2.5, 0) aura_env.region.block:SetPoint("CENTER", aura_env.region, "CENTER", -fontsize * 2.5, 0)
aura_env.region.block:SetWidth(fontsize * 5) aura_env.region.block:SetWidth(fontsize * 5)
aura_env.region.block:SetJustifyH("LEFT") aura_env.region.block:SetJustifyH("LEFT")
aura_env.region.block:SetText("") aura_env.region.block:SetText("")
aura_env.region.block:Show() aura_env.region.block:Show()
if not aura_env.region.absorb then if not aura_env.region.absorb then
local absorb = aura_env.region:CreateFontString(nil, aura_env.region) local absorb = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.absorb = absorb aura_env.region.absorb = absorb
end end
aura_env.region.absorb:SetFont(aura_env.region.text:GetFont()) aura_env.region.absorb:SetFont(aura_env.region.text:GetFont())
aura_env.region.absorb:SetTextColor(0.1227, 0.4089, 0.65) aura_env.region.absorb:SetTextColor(0.1227, 0.4089, 0.65)
aura_env.region.absorb:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 2.5, 0) aura_env.region.absorb:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 2.5, 0)
aura_env.region.absorb:SetWidth(fontsize * 5) aura_env.region.absorb:SetWidth(fontsize * 5)
aura_env.region.absorb:SetJustifyH("LEFT") aura_env.region.absorb:SetJustifyH("LEFT")
aura_env.region.absorb:SetText("") aura_env.region.absorb:SetText("")
aura_env.region.absorb:Show() aura_env.region.absorb:Show()
if not aura_env.region.percentage then if not aura_env.region.percentage then
local percentage = aura_env.region:CreateFontString(nil, aura_env.region) local percentage = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.percentage = percentage aura_env.region.percentage = percentage
end end
aura_env.region.percentage:SetFont(aura_env.region.text:GetFont()) aura_env.region.percentage:SetFont(aura_env.region.text:GetFont())
aura_env.region.percentage:SetTextColor(0.32, 0.32, 0.34) aura_env.region.percentage:SetTextColor(0.32, 0.32, 0.34)
aura_env.region.percentage:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 7.5, 0) aura_env.region.percentage:SetPoint("CENTER", aura_env.region, "CENTER", fontsize * 7.5, 0)
aura_env.region.percentage:SetWidth(fontsize * 5) aura_env.region.percentage:SetWidth(fontsize * 5)
aura_env.region.percentage:SetJustifyH("LEFT") aura_env.region.percentage:SetJustifyH("LEFT")
aura_env.region.percentage:SetText("") aura_env.region.percentage:SetText("")
aura_env.region.percentage:Show() aura_env.region.percentage:Show()
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val <= 1e3 then if val <= 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end

View File

@@ -1,89 +1,89 @@
--COMBAT_LOG_EVENT_UNFILTERED --COMBAT_LOG_EVENT_UNFILTERED
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "SPELL_CAST_SUCCESS" then if se == "SPELL_CAST_SUCCESS" then
local dest = select(6, ...) local dest = select(6, ...)
if dest == UnitName("player") then if dest == UnitName("player") then
local name = select(14, ...) local name = select(14, ...)
if name == "Shield Block" or name == "Ignore Pain" then if name == "Shield Block" or name == "Ignore Pain" then
local c1, c2, c3, c4 = "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF" local c1, c2, c3, c4 = "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF", "|cFFFFFFFF"
local Avatar = GetSpellCooldown("Avatar") local Avatar = GetSpellCooldown("Avatar")
local AvatarD = select(2, GetSpellCooldown("Avatar")) local AvatarD = select(2, GetSpellCooldown("Avatar"))
local LastStand = GetSpellCooldown("Last Stand") local LastStand = GetSpellCooldown("Last Stand")
local ShieldWall = GetSpellCooldown("Shield Wall") local ShieldWall = GetSpellCooldown("Shield Wall")
local DemoralizingShout = GetSpellCooldown("Demoralizing Shout") local DemoralizingShout = GetSpellCooldown("Demoralizing Shout")
local DemoralizingShoutD = select(2, GetSpellCooldown("Demoralizing Shout")) local DemoralizingShoutD = select(2, GetSpellCooldown("Demoralizing Shout"))
if Avatar > 0 and AvatarD > 2 then if Avatar > 0 and AvatarD > 2 then
if name == "Shield Block" then if name == "Shield Block" then
aura_env.AvatarCD = aura_env.AvatarCD + 3 aura_env.AvatarCD = aura_env.AvatarCD + 3
else else
aura_env.AvatarCD = aura_env.AvatarCD + 4 aura_env.AvatarCD = aura_env.AvatarCD + 4
end end
end end
if LastStand > 0 then if LastStand > 0 then
if name == "Shield Block" then if name == "Shield Block" then
aura_env.LastStandCD = aura_env.LastStandCD + 3 aura_env.LastStandCD = aura_env.LastStandCD + 3
else else
aura_env.LastStandCD = aura_env.LastStandCD + 4 aura_env.LastStandCD = aura_env.LastStandCD + 4
end end
end end
if ShieldWall > 0 then if ShieldWall > 0 then
if name == "Shield Block" then if name == "Shield Block" then
aura_env.ShieldWallCD = aura_env.ShieldWallCD + 3 aura_env.ShieldWallCD = aura_env.ShieldWallCD + 3
else else
aura_env.ShieldWallCD = aura_env.ShieldWallCD + 4 aura_env.ShieldWallCD = aura_env.ShieldWallCD + 4
end end
end end
if DemoralizingShout > 0 and DemoralizingShoutD > 2 then if DemoralizingShout > 0 and DemoralizingShoutD > 2 then
if name == "Shield Block" then if name == "Shield Block" then
aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 3 aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 3
else else
aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 4 aura_env.DemoralizingShoutCD = aura_env.DemoralizingShoutCD + 4
end end
end end
if AvatarD < 2 then c1 = "|cFF0080FF" end if AvatarD < 2 then c1 = "|cFF0080FF" end
if LastStand == 0 then c2 = "|cFF0080FF" end if LastStand == 0 then c2 = "|cFF0080FF" end
if ShieldWall == 0 then c3 = "|cFF0080FF" end if ShieldWall == 0 then c3 = "|cFF0080FF" end
if DemoralizingShoutD < 2 then c4 = "|cFF0080FF" end if DemoralizingShoutD < 2 then c4 = "|cFF0080FF" end
aura_env.region.text2:SetText(c1 .. aura_env.AvatarCD .. "|r\n" .. c2 .. aura_env.LastStandCD .. "|r\n" .. c3 .. aura_env.ShieldWallCD .. "|r\n" .. c4 .. aura_env.DemoralizingShoutCD .. "|r") aura_env.region.text2:SetText(c1 .. aura_env.AvatarCD .. "|r\n" .. c2 .. aura_env.LastStandCD .. "|r\n" .. c3 .. aura_env.ShieldWallCD .. "|r\n" .. c4 .. aura_env.DemoralizingShoutCD .. "|r")
elseif name == "Avatar" then elseif name == "Avatar" then
aura_env.AvatarCD = 0 aura_env.AvatarCD = 0
elseif name == "Last Stand" then elseif name == "Last Stand" then
aura_env.LastStandCD = 0 aura_env.LastStandCD = 0
elseif name == "Shield Wall" then elseif name == "Shield Wall" then
aura_env.ShieldWallCD = 0 aura_env.ShieldWallCD = 0
elseif name == "Demoralizing Shout" then elseif name == "Demoralizing Shout" then
aura_env.DemoralizingShoutCD = 0 aura_env.DemoralizingShoutCD = 0
end end
end end
end end
end end
--INIT --INIT
aura_env.AvatarCD, aura_env.LastStandCD, aura_env.ShieldWallCD, aura_env.DemoralizingShoutCD = 0, 0, 0, 0 aura_env.AvatarCD, aura_env.LastStandCD, aura_env.ShieldWallCD, aura_env.DemoralizingShoutCD = 0, 0, 0, 0
local fontsize = 16 local fontsize = 16
local font, size, flags = aura_env.region.text:GetFont() local font, size, flags = aura_env.region.text:GetFont()
if not aura_env.region.text then if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, aura_env.region) local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text aura_env.region.text = text
print("ok!") print("ok!")
end end
aura_env.region:SetWidth(128) aura_env.region:SetWidth(128)
aura_env.region.text:SetFont(font, size, flags) aura_env.region.text:SetFont(font, size, flags)
aura_env.region.text:SetTextColor(1,1,1,1) aura_env.region.text:SetTextColor(1,1,1,1)
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER") aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
aura_env.region.text:SetJustifyH("LEFT") aura_env.region.text:SetJustifyH("LEFT")
aura_env.region.text:SetText("Avatar\nLast Stand\nShield Wall\nDemoralizing Shout") aura_env.region.text:SetText("Avatar\nLast Stand\nShield Wall\nDemoralizing Shout")
aura_env.region.text:Show() aura_env.region.text:Show()
if not aura_env.region.text2 then if not aura_env.region.text2 then
local text2 = aura_env.region:CreateFontString(nil, aura_env.region) local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text2 = text2 aura_env.region.text2 = text2
print("ok!") print("ok!")
end end
aura_env.region.text2:SetFont(font, size, flags) aura_env.region.text2:SetFont(font, size, flags)
aura_env.region.text2:SetTextColor(1,1,1,1) aura_env.region.text2:SetTextColor(1,1,1,1)
aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0) aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0)
aura_env.region.text2:SetJustifyH("LEFT") aura_env.region.text2:SetJustifyH("LEFT")
aura_env.region.text2:SetText("0" .. "\n" .. "0" .. "\n" .. "0" .. "\n" .. "0") aura_env.region.text2:SetText("0" .. "\n" .. "0" .. "\n" .. "0" .. "\n" .. "0")
aura_env.region.text2:Show() aura_env.region.text2:Show()

View File

@@ -1,50 +1,50 @@
--COMBAT_LOG_EVENT_UNFILTERED --COMBAT_LOG_EVENT_UNFILTERED
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "SPELL_CAST_SUCCESS" then if se == "SPELL_CAST_SUCCESS" then
local caster = select(6, ...) local caster = select(6, ...)
if caster == UnitName("player") then if caster == UnitName("player") then
local name = select(14, ...) local name = select(14, ...)
if name == "Rampage" then if name == "Rampage" then
local c1 = "|cFFFFFFFF" local c1 = "|cFFFFFFFF"
local Recklessness = GetSpellCooldown("Recklessness") local Recklessness = GetSpellCooldown("Recklessness")
local RecklessnessD = select(2, GetSpellCooldown("Recklessness")) local RecklessnessD = select(2, GetSpellCooldown("Recklessness"))
if Recklessness > 0 and RecklessnessD > 2 then if Recklessness > 0 and RecklessnessD > 2 then
aura_env.RecklessnessCD = aura_env.RecklessnessCD + 3.75 aura_env.RecklessnessCD = aura_env.RecklessnessCD + 3.75
end end
if RecklessnessD < 2 then c1 = "|cFF0080FF" end if RecklessnessD < 2 then c1 = "|cFF0080FF" end
aura_env.region.text2:SetText(c1 .. aura_env.RecklessnessCD .. "|r") aura_env.region.text2:SetText(c1 .. aura_env.RecklessnessCD .. "|r")
elseif name == "Recklessness" then elseif name == "Recklessness" then
aura_env.RecklessnessCD = 0 aura_env.RecklessnessCD = 0
end end
end end
end end
end end
--INIT --INIT
aura_env.RecklessnessCD = 0 aura_env.RecklessnessCD = 0
local font, size, flags = aura_env.region.text:GetFont() local font, size, flags = aura_env.region.text:GetFont()
if not aura_env.region.text then if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, aura_env.region) local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text aura_env.region.text = text
print("ok!") print("ok!")
end end
aura_env.region:SetWidth(128) aura_env.region:SetWidth(128)
aura_env.region.text:SetFont(font, size, flags) aura_env.region.text:SetFont(font, size, flags)
aura_env.region.text:SetTextColor(1,1,1,1) aura_env.region.text:SetTextColor(1,1,1,1)
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER") aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
aura_env.region.text:SetJustifyH("LEFT") aura_env.region.text:SetJustifyH("LEFT")
aura_env.region.text:SetText("Recklessness") aura_env.region.text:SetText("Recklessness")
aura_env.region.text:Show() aura_env.region.text:Show()
if not aura_env.region.text2 then if not aura_env.region.text2 then
local text2 = aura_env.region:CreateFontString(nil, aura_env.region) local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text2 = text2 aura_env.region.text2 = text2
print("ok!") print("ok!")
end end
aura_env.region.text2:SetFont(font, size, flags) aura_env.region.text2:SetFont(font, size, flags)
aura_env.region.text2:SetTextColor(1,1,1,1) aura_env.region.text2:SetTextColor(1,1,1,1)
aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0) aura_env.region.text2:SetPoint("RIGHT", aura_env.region, "RIGHT", 128, 0)
aura_env.region.text2:SetJustifyH("LEFT") aura_env.region.text2:SetJustifyH("LEFT")
aura_env.region.text2:SetText("0") aura_env.region.text2:SetText("0")
aura_env.region.text2:Show() aura_env.region.text2:Show()

View File

@@ -1,15 +1,15 @@
/click ChatFrame1Tab RightButton /click ChatFrame1Tab RightButton
DropDownList1Button4 DropDownList1Button4
/click ChatFrame3Tab RightButton /click ChatFrame3Tab RightButton
/click DropDownList1Button10 /click DropDownList1Button10
/click ChatConfigChatSettingsLeftCheckBox2Check /click ChatConfigChatSettingsLeftCheckBox2Check
/click ChatConfigChatSettingsLeftCheckBox4Check /click ChatConfigChatSettingsLeftCheckBox4Check
/click ChatConfigChatSettingsLeftCheckBox12Check /click ChatConfigChatSettingsLeftCheckBox12Check
/click ChatConfigChatSettingsLeftCheckBox13Check /click ChatConfigChatSettingsLeftCheckBox13Check
/click ChatConfigChatSettingsLeftCheckBox14Check /click ChatConfigChatSettingsLeftCheckBox14Check
/click ChatConfigChatSettingsLeftCheckBox15Check /click ChatConfigChatSettingsLeftCheckBox15Check
/click ChatConfigChatSettingsLeftCheckBox16Check /click ChatConfigChatSettingsLeftCheckBox16Check
/run local c="ChatConfigChatSettingsLeftCheckBox2Check";c:Click();c=c:gsub("%d","4");c:Click();for i=12,14 do c=c:gsub("%d", i); c:Click() end --no work /run local c="ChatConfigChatSettingsLeftCheckBox2Check";c:Click();c=c:gsub("%d","4");c:Click();for i=12,14 do c=c:gsub("%d", i); c:Click() end --no work

View File

@@ -1,20 +1,20 @@
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE --PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
function(e) function(e)
if e == "PLAYER_REGEN_DISABLED" then if e == "PLAYER_REGEN_DISABLED" then
if not aura_env.seconds then aura_env.seconds = 0 end if not aura_env.seconds then aura_env.seconds = 0 end
if not aura_env.minutes then aura_env.minutes = 0 end if not aura_env.minutes then aura_env.minutes = 0 end
local aura_env = aura_env local aura_env = aura_env
aura_env.ticker = C_Timer.NewTicker(1, function() aura_env.seconds = aura_env.seconds + 1; if aura_env.seconds > 59 then aura_env.seconds = 0; aura_env.minutes = aura_env.minutes + 1 end; WeakAuras.ScanEvents("UPDATE") end) aura_env.ticker = C_Timer.NewTicker(1, function() aura_env.seconds = aura_env.seconds + 1; if aura_env.seconds > 59 then aura_env.seconds = 0; aura_env.minutes = aura_env.minutes + 1 end; WeakAuras.ScanEvents("UPDATE") end)
return true return true
elseif e == "PLAYER_REGEN_ENABLED" then elseif e == "PLAYER_REGEN_ENABLED" then
aura_env.minutes = 0; aura_env.seconds = 0 aura_env.minutes = 0; aura_env.seconds = 0
if aura_env.ticker then aura_env.ticker:Cancel() end if aura_env.ticker then aura_env.ticker:Cancel() end
elseif e == "UPDATE" then return true end elseif e == "UPDATE" then return true end
end end
--DISPLAY --DISPLAY
function() function()
if aura_env.seconds and aura_env.minutes then if aura_env.seconds and aura_env.minutes then
return aura_env.minutes .. ":" .. aura_env.seconds return aura_env.minutes .. ":" .. aura_env.seconds
end end
end end

View File

@@ -1,27 +1,27 @@
--ANIMATION --ANIMATION
function() function()
if GetSpellCooldown("Memory of Lucid Dreams") then if GetSpellCooldown("Memory of Lucid Dreams") then
local start, dur = GetSpellCooldown("Memory of Lucid Dreams") local start, dur = GetSpellCooldown("Memory of Lucid Dreams")
local remcd = start + dur - GetTime() local remcd = start + dur - GetTime()
if remcd > 0 then if remcd > 0 then
remcd = 1 - aura_env.range(remcd, 0, 120, 1) remcd = 1 - aura_env.range(remcd, 0, 120, 1)
return aura_env.grad(remcd) return aura_env.grad(remcd)
end end
end end
end end
--INIT --INIT
aura_env.grad = function(c) aura_env.grad = function(c)
--c expected as [0, 1] --c expected as [0, 1]
if c > 0.5 then if c > 0.5 then
c = 1 - (2 * (c - 0.5)) c = 1 - (2 * (c - 0.5))
return c, 1, 0, 1 return c, 1, 0, 1
else else
c = c * 2 c = c * 2
return 1, c, 0, 1 return 1, c, 0, 1
end end
end end
aura_env.range = function(val, min, max, max2) aura_env.range = function(val, min, max, max2)
val = 1 - (((max - val) / (max - min)) * max2) val = 1 - (((max - val) / (max - min)) * max2)
return val return val
end end

View File

@@ -1,17 +1,17 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED --NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(e, unit) function(e, unit)
local LCG = LibStub("LibCustomGlow-1.0") local LCG = LibStub("LibCustomGlow-1.0")
if e == "NAME_PLATE_UNIT_ADDED" then if e == "NAME_PLATE_UNIT_ADDED" then
local name = UnitName(unit) or "" local name = UnitName(unit) or ""
if name == "Deepcoral Bud" then if name == "Deepcoral Bud" then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4) LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" then elseif e == "NAME_PLATE_UNIT_REMOVED" then
local name = UnitName(unit) or "" local name = UnitName(unit) or ""
if name == "Deepcoral Bud" then if name == "Deepcoral Bud" then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Stop(nameplate) LCG.PixelGlow_Stop(nameplate)
end end
end end
end end

View File

@@ -1,19 +1,19 @@
--COMBAT_LOG_EVENT_UNFILTERED --COMBAT_LOG_EVENT_UNFILTERED
function(e, ...) function(e, ...)
local se = select(2, ...) local se = select(2, ...)
if se == "SWING_MISSED" or se == "SPELL_MISSED" then if se == "SWING_MISSED" or se == "SPELL_MISSED" then
local target = select(9, ...) local target = select(9, ...)
local misstype = select(12, ...) local misstype = select(12, ...)
if misstype == "DODGE" and target == UnitName("player") then if misstype == "DODGE" and target == UnitName("player") then
if not aura_env.dodg then aura_env.dodg = 0 end if not aura_env.dodg then aura_env.dodg = 0 end
aura_env.dodg = aura_env.dodg + 1 aura_env.dodg = aura_env.dodg + 1
return true return true
end end
end end
end end
--DISPLAY --DISPLAY
function() function()
if not aura_env.dodg then aura_env.dodg = 0 end if not aura_env.dodg then aura_env.dodg = 0 end
return aura_env.dodg return aura_env.dodg
end end

View File

@@ -1,40 +1,40 @@
--CLEU --CLEU
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "PARTY_KILL" then if se == "PARTY_KILL" then
local name = select(10, ...) local name = select(10, ...)
if aura_env.mobs[name] then if aura_env.mobs[name] then
Garbage.baqcrap.count = Garbage.baqcrap.count + aura_env.mobs[name] Garbage.baqcrap.count = Garbage.baqcrap.count + aura_env.mobs[name]
return true return true
end end
end end
end end
--DISPLAY --DISPLAY
function() function()
return Garbage.baqcrap.count .. "%" return Garbage.baqcrap.count .. "%"
end end
--INIT --INIT
if not Garbage.baqcrap then Garbage.baqcrap = {} end if not Garbage.baqcrap then Garbage.baqcrap = {} end
if not Garbage.baqcrap.count then Garbage.baqcrap.count = 0 end if not Garbage.baqcrap.count then Garbage.baqcrap.count = 0 end
aura_env.mobs = aura_env.mobs =
{ {
["Tidemistress Ethendriss"] = 3, ["Tidemistress Ethendriss"] = 3,
["Shirakess Starseeker"] = 1.2, ["Shirakess Starseeker"] = 1.2,
["Azsh'ari Siegemistress"] = 0.9, ["Azsh'ari Siegemistress"] = 0.9,
["Shirakess Voidtwister"] = 0.7, ["Shirakess Voidtwister"] = 0.7,
["Shadowbinder Athissa"] = 0.6, ["Shadowbinder Athissa"] = 0.6,
["Azsh'ari Invoker"] = 0.5, ["Azsh'ari Invoker"] = 0.5,
["Shirakess Apprentice"] = 0.5, ["Shirakess Apprentice"] = 0.5,
["Shirakess Overseer"] = 0.5, ["Shirakess Overseer"] = 0.5,
["Incantatrix Vazina"] = 0.5, ["Incantatrix Vazina"] = 0.5,
["Lady Naz'jess"] = 0.5, ["Lady Naz'jess"] = 0.5,
["Herald of the Queen"] = 0.5, ["Herald of the Queen"] = 0.5,
["Shirakess Apprentice"] = 0.4, ["Shirakess Apprentice"] = 0.4,
["Azsh'ari Stormsurger"] = 0.3, ["Azsh'ari Stormsurger"] = 0.3,
["Azsh'ari Stormsurger"] = 0.3, ["Azsh'ari Stormsurger"] = 0.3,
["Theurgist Nitara"] = 0.2, ["Theurgist Nitara"] = 0.2,
["Azsh'ari Oracle"] = 0.13, ["Azsh'ari Oracle"] = 0.13,
["Tidebinder Sarjezi"] = 0.09, ["Tidebinder Sarjezi"] = 0.09,
} }

View File

@@ -1,40 +1,40 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED --NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(e, unit) function(e, unit)
--handle death exception --handle death exception
local LCG = LibStub("LibCustomGlow-1.0") local LCG = LibStub("LibCustomGlow-1.0")
if e == "NAME_PLATE_UNIT_ADDED" then if e == "NAME_PLATE_UNIT_ADDED" then
local name = UnitName(unit) or "" local name = UnitName(unit) or ""
if aura_env.mobs[name] then if aura_env.mobs[name] then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4) LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" then elseif e == "NAME_PLATE_UNIT_REMOVED" then
local name = UnitName(unit) or "" local name = UnitName(unit) or ""
if aura_env.mobs[name] then if aura_env.mobs[name] then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Stop(nameplate) LCG.PixelGlow_Stop(nameplate)
end end
end end
end end
--INIT --INIT
aura_env.mobs = aura_env.mobs =
{ {
["Tidemistress Ethendriss"] = 3, ["Tidemistress Ethendriss"] = 3,
["Shirakess Starseeker"] = 1.2, ["Shirakess Starseeker"] = 1.2,
["Azsh'ari Siegemistress"] = 0.9, ["Azsh'ari Siegemistress"] = 0.9,
["Shirakess Voidtwister"] = 0.7, ["Shirakess Voidtwister"] = 0.7,
["Shadowbinder Athissa"] = 0.6, ["Shadowbinder Athissa"] = 0.6,
["Azsh'ari Invoker"] = 0.5, ["Azsh'ari Invoker"] = 0.5,
["Shirakess Apprentice"] = 0.5, ["Shirakess Apprentice"] = 0.5,
["Shirakess Overseer"] = 0.5, ["Shirakess Overseer"] = 0.5,
["Incantatrix Vazina"] = 0.5, ["Incantatrix Vazina"] = 0.5,
["Lady Naz'jess"] = 0.5, ["Lady Naz'jess"] = 0.5,
["Herald of the Queen"] = 0.5, ["Herald of the Queen"] = 0.5,
["Shirakess Apprentice"] = 0.4, ["Shirakess Apprentice"] = 0.4,
["Azsh'ari Stormsurger"] = 0.3, ["Azsh'ari Stormsurger"] = 0.3,
["Azsh'ari Stormsurger"] = 0.3, ["Azsh'ari Stormsurger"] = 0.3,
["Theurgist Nitara"] = 0.2, ["Theurgist Nitara"] = 0.2,
["Azsh'ari Oracle"] = 0.13, ["Azsh'ari Oracle"] = 0.13,
["Tidebinder Sarjezi"] = 0.09, ["Tidebinder Sarjezi"] = 0.09,
} }

View File

@@ -1,51 +1,51 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED --NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(e, unit) function(e, unit)
--handle death exception --handle death exception
local LCG = LibStub("LibCustomGlow-1.0") local LCG = LibStub("LibCustomGlow-1.0")
if e == "NAME_PLATE_UNIT_ADDED" then if e == "NAME_PLATE_UNIT_ADDED" then
local name = UnitName(unit) or "" local name = UnitName(unit) or ""
if aura_env.mobs[name] then if aura_env.mobs[name] then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Start(nameplate, {0,1,0,1}, nil, 0, 8, 2, 0, -4) LCG.PixelGlow_Start(nameplate, {0,1,0,1}, nil, 0, 8, 2, 0, -4)
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" then elseif e == "NAME_PLATE_UNIT_REMOVED" then
local name = UnitName(unit) or "" local name = UnitName(unit) or ""
if aura_env.mobs[name] then if aura_env.mobs[name] then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Stop(nameplate) LCG.PixelGlow_Stop(nameplate)
end end
end end
end end
--INIT --INIT
aura_env.mobs = aura_env.mobs =
{ {
["Barnacled Reefwalker"] = 1.6, ["Barnacled Reefwalker"] = 1.6,
["Gloomchasm Reefwalker"] = 1.4, ["Gloomchasm Reefwalker"] = 1.4,
["Whitewave Reefwalker"] = 1.2, ["Whitewave Reefwalker"] = 1.2,
["Staghorn Reefwalker"] = 1.2, ["Staghorn Reefwalker"] = 1.2,
["Deep Reefwalker"] = 1.2, ["Deep Reefwalker"] = 1.2,
["Sunbleached Reefwalker"] = 1, ["Sunbleached Reefwalker"] = 1,
["Kelpwillow"] = 1, ["Kelpwillow"] = 1,
["Anemonar"] = 0.9, ["Anemonar"] = 0.9,
["Seashelf Reefwalker"] = 0.8, ["Seashelf Reefwalker"] = 0.8,
["Murkbloom Reefwalker"] = 0.7, ["Murkbloom Reefwalker"] = 0.7,
["Oronu"] = 0.6, ["Oronu"] = 0.6,
["Urduu"] = 0.6, ["Urduu"] = 0.6,
["Emorneth"] = 0.5, ["Emorneth"] = 0.5,
["Sandclaw Stoneshell"] = 6, ["Sandclaw Stoneshell"] = 6,
["Chitterspine Ambusher"] = 0.8, ["Chitterspine Ambusher"] = 0.8,
["Chitterspine Crab"] = 0.5, ["Chitterspine Crab"] = 0.5,
["Chitterspine Lurker"] = 0.5, ["Chitterspine Lurker"] = 0.5,
["Iridescent Glimmershell"] = 0.5, ["Iridescent Glimmershell"] = 0.5,
["Needlespine"] = 0.5, ["Needlespine"] = 0.5,
["Chitterspine Encroacher"] = 0.4, ["Chitterspine Encroacher"] = 0.4,
["Glimmershell Crab"] = 0.4, ["Glimmershell Crab"] = 0.4,
["Sandclaw Crab"] = 0.4, ["Sandclaw Crab"] = 0.4,
["Chitterspine Ambusher"] = 0.4, ["Chitterspine Ambusher"] = 0.4,
["Crackleclaw Crab"] = 0.3, ["Crackleclaw Crab"] = 0.3,
["Glimmershell Hulk"] = 0.3, ["Glimmershell Hulk"] = 0.3,
["Chitterspine Crab"] = 0.3, ["Chitterspine Crab"] = 0.3,
["Braxicus"] = 0.3, ["Braxicus"] = 0.3,
["Chitterspine Guillotine"] = 0.16, ["Chitterspine Guillotine"] = 0.16,
} }

View File

@@ -1,51 +1,51 @@
--CLEU --CLEU
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "PARTY_KILL" then if se == "PARTY_KILL" then
local name = select(10, ...) local name = select(10, ...)
if aura_env.mobs[name] then if aura_env.mobs[name] then
Garbage.baqcrap.count3 = Garbage.baqcrap.count3 + aura_env.mobs[name] Garbage.baqcrap.count3 = Garbage.baqcrap.count3 + aura_env.mobs[name]
return true return true
end end
end end
end end
--DISPLAY --DISPLAY
function() function()
return Garbage.baqcrap.count3 .. "%" return Garbage.baqcrap.count3 .. "%"
end end
--INIT --INIT
if not Garbage.baqcrap then Garbage.baqcrap = {} end if not Garbage.baqcrap then Garbage.baqcrap = {} end
if not Garbage.baqcrap.count3 then Garbage.baqcrap.count3 = 0 end if not Garbage.baqcrap.count3 then Garbage.baqcrap.count3 = 0 end
aura_env.mobs = aura_env.mobs =
{ {
["Barnacled Reefwalker"] = 1.6, ["Barnacled Reefwalker"] = 1.6,
["Gloomchasm Reefwalker"] = 1.4, ["Gloomchasm Reefwalker"] = 1.4,
["Whitewave Reefwalker"] = 1.2, ["Whitewave Reefwalker"] = 1.2,
["Staghorn Reefwalker"] = 1.2, ["Staghorn Reefwalker"] = 1.2,
["Deep Reefwalker"] = 1.2, ["Deep Reefwalker"] = 1.2,
["Sunbleached Reefwalker"] = 1, ["Sunbleached Reefwalker"] = 1,
["Kelpwillow"] = 1, ["Kelpwillow"] = 1,
["Anemonar"] = 0.9, ["Anemonar"] = 0.9,
["Seashelf Reefwalker"] = 0.8, ["Seashelf Reefwalker"] = 0.8,
["Murkbloom Reefwalker"] = 0.7, ["Murkbloom Reefwalker"] = 0.7,
["Oronu"] = 0.6, ["Oronu"] = 0.6,
["Urduu"] = 0.6, ["Urduu"] = 0.6,
["Emorneth"] = 0.5, ["Emorneth"] = 0.5,
["Sandclaw Stoneshell"] = 6, ["Sandclaw Stoneshell"] = 6,
["Chitterspine Ambusher"] = 0.8, ["Chitterspine Ambusher"] = 0.8,
["Chitterspine Crab"] = 0.5, ["Chitterspine Crab"] = 0.5,
["Chitterspine Lurker"] = 0.5, ["Chitterspine Lurker"] = 0.5,
["Iridescent Glimmershell"] = 0.5, ["Iridescent Glimmershell"] = 0.5,
["Needlespine"] = 0.5, ["Needlespine"] = 0.5,
["Chitterspine Encroacher"] = 0.4, ["Chitterspine Encroacher"] = 0.4,
["Glimmershell Crab"] = 0.4, ["Glimmershell Crab"] = 0.4,
["Sandclaw Crab"] = 0.4, ["Sandclaw Crab"] = 0.4,
["Chitterspine Ambusher"] = 0.4, ["Chitterspine Ambusher"] = 0.4,
["Crackleclaw Crab"] = 0.3, ["Crackleclaw Crab"] = 0.3,
["Glimmershell Hulk"] = 0.3, ["Glimmershell Hulk"] = 0.3,
["Chitterspine Crab"] = 0.3, ["Chitterspine Crab"] = 0.3,
["Braxicus"] = 0.3, ["Braxicus"] = 0.3,
["Chitterspine Guillotine"] = 0.16, ["Chitterspine Guillotine"] = 0.16,
} }

View File

@@ -1,80 +1,80 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED --NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(e, unit) function(e, unit)
--handle death exception --handle death exception
local LCG = LibStub("LibCustomGlow-1.0") local LCG = LibStub("LibCustomGlow-1.0")
if e == "NAME_PLATE_UNIT_ADDED" then if e == "NAME_PLATE_UNIT_ADDED" then
local name = UnitName(unit) or "" local name = UnitName(unit) or ""
if aura_env.mobs[name] then if aura_env.mobs[name] then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Start(nameplate, {0,0,1,1}, nil, 0, 8, 2, 0, -4) LCG.PixelGlow_Start(nameplate, {0,0,1,1}, nil, 0, 8, 2, 0, -4)
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" then elseif e == "NAME_PLATE_UNIT_REMOVED" then
local name = UnitName(unit) or "" local name = UnitName(unit) or ""
if aura_env.mobs[name] then if aura_env.mobs[name] then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Stop(nameplate) LCG.PixelGlow_Stop(nameplate)
end end
end end
end end
--INIT --INIT
aura_env.mobs = aura_env.mobs =
{ {
["Herald of Salgos"] = 33, ["Herald of Salgos"] = 33,
["Spawn of Salgos"] = 33, ["Spawn of Salgos"] = 33,
["Osgen"] = 30, ["Osgen"] = 30,
["Ungormath"] = 30, ["Ungormath"] = 30,
["Burning Amalgamation"] = 29, ["Burning Amalgamation"] = 29,
["Moghiea"] = 29, ["Moghiea"] = 29,
["Salgos the Eternal"] = 28, ["Salgos the Eternal"] = 28,
["Zomera"] = 27, ["Zomera"] = 27,
["Arcane Amalgamation"] = 25, ["Arcane Amalgamation"] = 25,
["Xue"] = 25, ["Xue"] = 25,
["Aldrantiss"] = 22, ["Aldrantiss"] = 22,
["Watery Amalgamation"] = 22, ["Watery Amalgamation"] = 22,
["Dusty Amalgamation"] = 22, ["Dusty Amalgamation"] = 22,
["Alzana"] = 21, ["Alzana"] = 21,
["Vyz'olgo the Mind-Taker"] = 20, ["Vyz'olgo the Mind-Taker"] = 20,
["Qalina"] = 19, ["Qalina"] = 19,
["Omus"] = 19, ["Omus"] = 19,
["Voice in the Deeps"] = 13, ["Voice in the Deeps"] = 13,
["King Gakula"] = 11, ["King Gakula"] = 11,
["Chasm-Haunter"] = 11, ["Chasm-Haunter"] = 11,
["Scale Matriarch Vynara"] = 11, ["Scale Matriarch Vynara"] = 11,
["Anemonar"] = 10, ["Anemonar"] = 10,
["Sandcastle"] = 9, ["Sandcastle"] = 9,
["Shiz'narasz the Consumer"] = 9, ["Shiz'narasz the Consumer"] = 9,
["Toxigore the Alpha"] = 9, ["Toxigore the Alpha"] = 9,
["Needlespine"] = 9, ["Needlespine"] = 9,
["Siltstalker the Packmother"] = 9, ["Siltstalker the Packmother"] = 9,
["Urduu"] = 9, ["Urduu"] = 9,
["Tidemistress Leth'sindra"] = 9, ["Tidemistress Leth'sindra"] = 9,
["Banescale the Packfather"] = 9, ["Banescale the Packfather"] = 9,
["Sandclaw Stoneshell"] = 8, ["Sandclaw Stoneshell"] = 8,
["Garnetscale"] = 8, ["Garnetscale"] = 8,
["Allseer Oma'kil"] = 8, ["Allseer Oma'kil"] = 8,
["Vor'koth"] = 8, ["Vor'koth"] = 8,
["Elder Unu"] = 8, ["Elder Unu"] = 8,
["Caverndark Terror"] = 8, ["Caverndark Terror"] = 8,
["Blindlight"] = 8, ["Blindlight"] = 8,
["Shassera"] = 8, ["Shassera"] = 8,
["Soundless"] = 8, ["Soundless"] = 8,
["Scale Matriarch Gratinax"] = 8, ["Scale Matriarch Gratinax"] = 8,
["Tidelord Aquatus"] = 8, ["Tidelord Aquatus"] = 8,
["Tidelord Dispersius"] = 8, ["Tidelord Dispersius"] = 8,
["Carnivorous Lasher"] = 7, ["Carnivorous Lasher"] = 7,
["Mirecrawler"] = 7, ["Mirecrawler"] = 7,
["Daggertooth Terror"] = 7, ["Daggertooth Terror"] = 7,
["Amethyst Spireshell"] = 7, ["Amethyst Spireshell"] = 7,
["Prince Typhonus"] = 7, ["Prince Typhonus"] = 7,
["Alga the Eyeless"] = 7, ["Alga the Eyeless"] = 7,
["Prince Vortran"] = 7, ["Prince Vortran"] = 7,
["Kelpwillow"] = 7, ["Kelpwillow"] = 7,
["Deepglider"] = 7, ["Deepglider"] = 7,
["Scale Matriarch Zodia"] = 7, ["Scale Matriarch Zodia"] = 7,
["Rockweed Shambler"] = 7, ["Rockweed Shambler"] = 7,
["Avarius"] = 6, ["Avarius"] = 6,
["Iridescent Glimmershell"] = 6, ["Iridescent Glimmershell"] = 6,
["Oronu"] = 6, ["Oronu"] = 6,
["Elderspawn Nalaada"] = 5, ["Elderspawn Nalaada"] = 5,
} }

View File

@@ -1,80 +1,80 @@
--CLEU --CLEU
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "PARTY_KILL" then if se == "PARTY_KILL" then
local name = select(10, ...) local name = select(10, ...)
if aura_env.mobs[name] then if aura_env.mobs[name] then
Garbage.baqcrap.count2 = Garbage.baqcrap.count2 + aura_env.mobs[name] Garbage.baqcrap.count2 = Garbage.baqcrap.count2 + aura_env.mobs[name]
return true return true
end end
end end
end end
--DISPLAY --DISPLAY
function() function()
return Garbage.baqcrap.count2 .. "%" return Garbage.baqcrap.count2 .. "%"
end end
--INIT --INIT
if not Garbage.baqcrap then Garbage.baqcrap = {} end if not Garbage.baqcrap then Garbage.baqcrap = {} end
if not Garbage.baqcrap.count2 then Garbage.baqcrap.count2 = 0 end if not Garbage.baqcrap.count2 then Garbage.baqcrap.count2 = 0 end
aura_env.mobs = aura_env.mobs =
{ {
["Herald of Salgos"] = 33, ["Herald of Salgos"] = 33,
["Spawn of Salgos"] = 33, ["Spawn of Salgos"] = 33,
["Osgen"] = 30, ["Osgen"] = 30,
["Ungormath"] = 30, ["Ungormath"] = 30,
["Burning Amalgamation"] = 29, ["Burning Amalgamation"] = 29,
["Moghiea"] = 29, ["Moghiea"] = 29,
["Salgos the Eternal"] = 28, ["Salgos the Eternal"] = 28,
["Zomera"] = 27, ["Zomera"] = 27,
["Arcane Amalgamation"] = 25, ["Arcane Amalgamation"] = 25,
["Xue"] = 25, ["Xue"] = 25,
["Aldrantiss"] = 22, ["Aldrantiss"] = 22,
["Watery Amalgamation"] = 22, ["Watery Amalgamation"] = 22,
["Dusty Amalgamation"] = 22, ["Dusty Amalgamation"] = 22,
["Alzana"] = 21, ["Alzana"] = 21,
["Vyz'olgo the Mind-Taker"] = 20, ["Vyz'olgo the Mind-Taker"] = 20,
["Qalina"] = 19, ["Qalina"] = 19,
["Omus"] = 19, ["Omus"] = 19,
["Voice in the Deeps"] = 13, ["Voice in the Deeps"] = 13,
["King Gakula"] = 11, ["King Gakula"] = 11,
["Chasm-Haunter"] = 11, ["Chasm-Haunter"] = 11,
["Scale Matriarch Vynara"] = 11, ["Scale Matriarch Vynara"] = 11,
["Anemonar"] = 10, ["Anemonar"] = 10,
["Sandcastle"] = 9, ["Sandcastle"] = 9,
["Shiz'narasz the Consumer"] = 9, ["Shiz'narasz the Consumer"] = 9,
["Toxigore the Alpha"] = 9, ["Toxigore the Alpha"] = 9,
["Needlespine"] = 9, ["Needlespine"] = 9,
["Siltstalker the Packmother"] = 9, ["Siltstalker the Packmother"] = 9,
["Urduu"] = 9, ["Urduu"] = 9,
["Tidemistress Leth'sindra"] = 9, ["Tidemistress Leth'sindra"] = 9,
["Banescale the Packfather"] = 9, ["Banescale the Packfather"] = 9,
["Sandclaw Stoneshell"] = 8, ["Sandclaw Stoneshell"] = 8,
["Garnetscale"] = 8, ["Garnetscale"] = 8,
["Allseer Oma'kil"] = 8, ["Allseer Oma'kil"] = 8,
["Vor'koth"] = 8, ["Vor'koth"] = 8,
["Elder Unu"] = 8, ["Elder Unu"] = 8,
["Caverndark Terror"] = 8, ["Caverndark Terror"] = 8,
["Blindlight"] = 8, ["Blindlight"] = 8,
["Shassera"] = 8, ["Shassera"] = 8,
["Soundless"] = 8, ["Soundless"] = 8,
["Scale Matriarch Gratinax"] = 8, ["Scale Matriarch Gratinax"] = 8,
["Tidelord Aquatus"] = 8, ["Tidelord Aquatus"] = 8,
["Tidelord Dispersius"] = 8, ["Tidelord Dispersius"] = 8,
["Carnivorous Lasher"] = 7, ["Carnivorous Lasher"] = 7,
["Mirecrawler"] = 7, ["Mirecrawler"] = 7,
["Daggertooth Terror"] = 7, ["Daggertooth Terror"] = 7,
["Amethyst Spireshell"] = 7, ["Amethyst Spireshell"] = 7,
["Prince Typhonus"] = 7, ["Prince Typhonus"] = 7,
["Alga the Eyeless"] = 7, ["Alga the Eyeless"] = 7,
["Prince Vortran"] = 7, ["Prince Vortran"] = 7,
["Kelpwillow"] = 7, ["Kelpwillow"] = 7,
["Deepglider"] = 7, ["Deepglider"] = 7,
["Scale Matriarch Zodia"] = 7, ["Scale Matriarch Zodia"] = 7,
["Rockweed Shambler"] = 7, ["Rockweed Shambler"] = 7,
["Avarius"] = 6, ["Avarius"] = 6,
["Iridescent Glimmershell"] = 6, ["Iridescent Glimmershell"] = 6,
["Oronu"] = 6, ["Oronu"] = 6,
["Elderspawn Nalaada"] = 5, ["Elderspawn Nalaada"] = 5,
} }

View File

@@ -1,33 +1,33 @@
--DEBUG_UPDATE DEBUG_ADD --DEBUG_UPDATE DEBUG_ADD
function(e, m, t, c) function(e, m, t, c)
if e == "DEBUG_UPDATE" then if e == "DEBUG_UPDATE" then
return true return true
elseif e == "DEBUG_ADD" and m and t then elseif e == "DEBUG_ADD" and m and t then
if c then aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t, c} else aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t} end if c then aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t, c} else aura_env.DebugTextArray[#aura_env.DebugTextArray + 1] = {m, t} end
WeakAuras.ScanEvents("DEBUG_UPDATE") WeakAuras.ScanEvents("DEBUG_UPDATE")
end end
end end
--DISPLAY --DISPLAY
function() function()
if aura_env.DebugTextArray then if aura_env.DebugTextArray then
aura_env.output = "" aura_env.output = ""
if #aura_env.DebugTextArray > 0 then if #aura_env.DebugTextArray > 0 then
for k,v in ipairs(aura_env.DebugTextArray) do for k,v in ipairs(aura_env.DebugTextArray) do
if v[3] then aura_env.output = aura_env.output .. "|c" .. v[3] end if v[3] then aura_env.output = aura_env.output .. "|c" .. v[3] end
aura_env.output = aura_env.output .. v[1] aura_env.output = aura_env.output .. v[1]
if v[3] then aura_env.output = aura_env.output .. "|r" end if v[3] then aura_env.output = aura_env.output .. "|r" end
aura_env.output = aura_env.output .. "\n" aura_env.output = aura_env.output .. "\n"
if v[2] > 0 then if v[2] > 0 then
local aura_env = aura_env local aura_env = aura_env
C_Timer.After(v[2], function() table.remove(aura_env.DebugTextArray, k); WeakAuras.ScanEvents("DEBUG_UPDATE") end) C_Timer.After(v[2], function() table.remove(aura_env.DebugTextArray, k); WeakAuras.ScanEvents("DEBUG_UPDATE") end)
end end
end end
end end
return aura_env.output return aura_env.output
end end
end end
--INIT --INIT
--DevTools_Dump nice --DevTools_Dump nice
if not aura_env.DebugTextArray then aura_env.DebugTextArray = {} end if not aura_env.DebugTextArray then aura_env.DebugTextArray = {} end

View File

@@ -1,25 +1,25 @@
--[05:42 PM] [G] [Whispa]: <Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons --[05:42 PM] [G] [Whispa]: <Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons
--/run WeakAuras.ScanEvents("BULLSHIT_BEGIN") --/run WeakAuras.ScanEvents("BULLSHIT_BEGIN")
--BULLSHIT_BEGIN BULLSHIT_STOP PLAYER_ENTERING_WORLD --BULLSHIT_BEGIN BULLSHIT_STOP PLAYER_ENTERING_WORLD
function(e) function(e)
if e == "BULLSHIT_BEGIN" then if e == "BULLSHIT_BEGIN" then
if IsInInstance() == false then if IsInInstance() == false then
aura_env.ticker = C_Timer.NewTicker(600, function() SendChatMessage("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons", "CHANNEL", _, "1") end) aura_env.ticker = C_Timer.NewTicker(600, function() SendChatMessage("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons", "CHANNEL", _, "1") end)
--aura_env.ticker = C_Timer.NewTicker(0.60, function() print("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons") end) --aura_env.ticker = C_Timer.NewTicker(0.60, function() print("<Nights hope> is a newly created guild, we are looking for fun and social members. we are trying to get members to come into discord and we accept any levels. we are planning on making a raid team and hoping to get multiple teams for mythic dungeons") end)
else else
if aura_env.ticker then if aura_env.ticker then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
end end
end end
elseif e == "BULLSHIT_STOP" then elseif e == "BULLSHIT_STOP" then
if aura_env.ticker then if aura_env.ticker then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
end end
elseif e == "PLAYER_ENTERING_WORLD" then elseif e == "PLAYER_ENTERING_WORLD" then
if IsInInstance() == true then if IsInInstance() == true then
if aura_env.ticker then if aura_env.ticker then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
end end
end end
end end
end end

View File

@@ -1,38 +1,38 @@
--MERCHANT_SHOW PLAYER_ALIVE CHAT_MSG_LOOT --MERCHANT_SHOW PLAYER_ALIVE CHAT_MSG_LOOT
function(e, msg) function(e, msg)
if e == "PLAYER_ALIVE" then if e == "PLAYER_ALIVE" then
for c = 0, 5 do for c = 0, 5 do
for s = 1, GetContainerNumSlots(c) do for s = 1, GetContainerNumSlots(c) do
if GetContainerItemLink(c, s) then if GetContainerItemLink(c, s) then
local name = GetItemInfo(GetContainerItemLink(c, s)) local name = GetItemInfo(GetContainerItemLink(c, s))
local icon = select(10, GetItemInfo(GetContainerItemLink(c, s))) local icon = select(10, GetItemInfo(GetContainerItemLink(c, s)))
local link = GetContainerItemLink(c, s) local link = GetContainerItemLink(c, s)
local id = link:match("item:(%d+):") local id = link:match("item:(%d+):")
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
end end
end end
end end
elseif e == "MERCHANT_SHOW" then elseif e == "MERCHANT_SHOW" then
local i = 1 local i = 1
C_Timer.After(0.2, function() C_Timer.After(0.2, function()
while GetMerchantItemInfo(i) do while GetMerchantItemInfo(i) do
local name, icon = GetMerchantItemInfo(i) local name, icon = GetMerchantItemInfo(i)
local link = GetMerchantItemLink(i) local link = GetMerchantItemLink(i)
local id = link:match("item:(%d+):") local id = link:match("item:(%d+):")
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
i = i + 1 i = i + 1
end end
end) end)
elseif e == "CHAT_MSG_LOOT" then elseif e == "CHAT_MSG_LOOT" then
local itemID, icon, name local itemID, icon, name
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
itemID = itemLink:match("item:(%d+):") itemID = itemLink:match("item:(%d+):")
icon = select(10, GetItemInfo(itemLink)) icon = select(10, GetItemInfo(itemLink))
name = GetItemInfo(itemLink) name = GetItemInfo(itemLink)
end end
if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end if not WeakAurasSaved.CustomTrash.IconDatabase[name] and name and icon then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end if not WeakAurasSaved.CustomTrash.IDDatabase[name] and name and id then WeakAurasSaved.CustomTrash.IDDatabase[name] = id; print("Adding|cff3366ff ", name, " |rto the id database") end
end end
end end

View File

@@ -1,28 +1,28 @@
--CLEU PLAYER_TARGET_CHANGED --CLEU PLAYER_TARGET_CHANGED
function(e, ...) function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
if (select(2, ...) == "SPELL_AURA_APPLIED" or select(2, ...) == "SPELL_AURA_REFRESH" or select(2, ...) == "SPELL_PERIODIC_DAMAGE") and select(5, ...) == UnitName("player") and select(13, ...) == "Ignite" then if (select(2, ...) == "SPELL_AURA_APPLIED" or select(2, ...) == "SPELL_AURA_REFRESH" or select(2, ...) == "SPELL_PERIODIC_DAMAGE") and select(5, ...) == UnitName("player") and select(13, ...) == "Ignite" then
return true return true
end end
elseif e == "PLAYER_TARGET_CHANGED" then elseif e == "PLAYER_TARGET_CHANGED" then
return true return true
end end
end end
--DISPLAY --DISPLAY
function() function()
local function UnitDebuffC(unit, spell) local function UnitDebuffC(unit, spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitDebuff(unit, i, PLAYER) local name = UnitDebuff(unit, i, PLAYER)
if name then if name then
if name == spell then if name == spell then
return UnitDebuff(unit, i, PLAYER) return UnitDebuff(unit, i, PLAYER)
end end
else else
return nil return nil
end end
end end
end end
local thing = select(16, UnitDebuffC("target", "Ignite")) local thing = select(16, UnitDebuffC("target", "Ignite"))
if thing then return thing else return 0 end if thing then return thing else return 0 end
end end

View File

@@ -1,79 +1,79 @@
--UNIT_AURA:player UNIT_POWER_UPDATE:player --UNIT_AURA:player UNIT_POWER_UPDATE:player
function(e, ...) function(e, ...)
if e == "UNIT_AURA" then if e == "UNIT_AURA" then
if aura_env.UnitBuffC("Ignore Pain") then if aura_env.UnitBuffC("Ignore Pain") then
local expTime = math.floor((select(6, aura_env.UnitBuffC("Ignore Pain")) * 100)) local expTime = math.floor((select(6, aura_env.UnitBuffC("Ignore Pain")) * 100))
local ctime = math.floor((GetTime() * 100)) local ctime = math.floor((GetTime() * 100))
if ctime + 1200 == expTime then aura_env.absorb = select(16, aura_env.UnitBuffC("Ignore Pain")) end if ctime + 1200 == expTime then aura_env.absorb = select(16, aura_env.UnitBuffC("Ignore Pain")) end
end end
elseif e == "UNIT_POWER_UPDATE" then elseif e == "UNIT_POWER_UPDATE" then
local rage = UnitPower("player") local rage = UnitPower("player")
local time = GetTime() local time = GetTime()
if rage < 40 then if rage < 40 then
aura_env.region:Hide() aura_env.region:Hide()
return false return false
elseif rage >= 40 and rage < 90 and not aura_env.UnitBuffC("player", "Ignore Pain") then elseif rage >= 40 and rage < 90 and not aura_env.UnitBuffC("player", "Ignore Pain") then
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain")) aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
aura_env.region:SetOffset(128, 200) aura_env.region:SetOffset(128, 200)
aura_env.region:SetGlow(true) aura_env.region:SetGlow(true)
aura_env.region:Color(1, 1, 1, 1) aura_env.region:Color(1, 1, 1, 1)
aura_env.region:Show() aura_env.region:Show()
return true return true
elseif rage >= 40 and rage < 90 and aura_env.UnitBuffC("player", "Ignore Pain") then elseif rage >= 40 and rage < 90 and aura_env.UnitBuffC("player", "Ignore Pain") then
local absorb = select(16, aura_env.UnitBuffC("player", "Ignore Pain")) or 0 local absorb = select(16, aura_env.UnitBuffC("player", "Ignore Pain")) or 0
local expTime = select(6, aura_env.UnitBuffC("player", "Ignore Pain")) or 0 local expTime = select(6, aura_env.UnitBuffC("player", "Ignore Pain")) or 0
if absorb > 0 and expTime > 0 then if absorb > 0 and expTime > 0 then
if expTime - time <= 3 then if expTime - time <= 3 then
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain")) aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
aura_env.region:SetOffset(128, 200) aura_env.region:SetOffset(128, 200)
aura_env.region:SetGlow(false) aura_env.region:SetGlow(false)
aura_env.region:Color(1, 1, 1, 1) aura_env.region:Color(1, 1, 1, 1)
aura_env.region:Show() aura_env.region:Show()
return true return true
elseif absorb <= 0.2 * aura_env.absorb then elseif absorb <= 0.2 * aura_env.absorb then
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain")) aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
aura_env.region:SetOffset(128, 200) aura_env.region:SetOffset(128, 200)
aura_env.region:SetGlow(false) aura_env.region:SetGlow(false)
aura_env.region:Color(1, 1, 1, 1) aura_env.region:Color(1, 1, 1, 1)
aura_env.region:Show() aura_env.region:Show()
return true return true
else else
aura_env.region:Hide() aura_env.region:Hide()
return false return false
end end
end end
elseif rage >= 90 and not aura_env.UnitBuffC("player", "Shield Block") then elseif rage >= 90 and not aura_env.UnitBuffC("player", "Shield Block") then
aura_env.region:SetIcon(GetSpellTexture("Shield Block")) aura_env.region:SetIcon(GetSpellTexture("Shield Block"))
aura_env.region:SetOffset(-128, 200) aura_env.region:SetOffset(-128, 200)
aura_env.region:SetGlow(false) aura_env.region:SetGlow(false)
aura_env.region:Color(1, 1, 1, 0.33) aura_env.region:Color(1, 1, 1, 0.33)
aura_env.region:Show() aura_env.region:Show()
return true return true
elseif rage >= 90 and aura_env.UnitBuffC("player", "Shield Block") then elseif rage >= 90 and aura_env.UnitBuffC("player", "Shield Block") then
aura_env.region:SetIcon(GetSpellTexture("Ignore Pain")) aura_env.region:SetIcon(GetSpellTexture("Ignore Pain"))
aura_env.region:SetOffset(128, 200) aura_env.region:SetOffset(128, 200)
aura_env.region:SetGlow(false) aura_env.region:SetGlow(false)
aura_env.region:Color(1, 1, 1, 0.5) aura_env.region:Color(1, 1, 1, 0.5)
aura_env.region:Show() aura_env.region:Show()
return true return true
else else
aura_env.region:Hide()() aura_env.region:Hide()()
return false return false
end end
end end
end end
--INIT --INIT
aura_env.absorb = 0 aura_env.absorb = 0
aura_env.UnitBuffC = function(unit, spell) aura_env.UnitBuffC = function(unit, spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitBuff(unit, i) local name = UnitBuff(unit, i)
if name then if name then
if name == spell then if name == spell then
return UnitBuff(unit, i) return UnitBuff(unit, i)
end end
else else
return nil return nil
end end
end end
end end

View File

@@ -1,65 +1,65 @@
--UNIT_COMBAT:player UNIT_AURA:player --UNIT_COMBAT:player UNIT_AURA:player
function(e, ...) function(e, ...)
if e == "UNIT_AURA" then if e == "UNIT_AURA" then
if aura_env.CUnitBuff("Ignore Pain") then if aura_env.CUnitBuff("Ignore Pain") then
aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain")) aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain"))
local expTime = math.floor((select(6, aura_env.CUnitBuff("Ignore Pain")) * 100)) local expTime = math.floor((select(6, aura_env.CUnitBuff("Ignore Pain")) * 100))
local ctime = math.floor((GetTime() * 100)) local ctime = math.floor((GetTime() * 100))
if ctime + 1200 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Ignore Pain")) end if ctime + 1200 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Ignore Pain")) end
aura_env.region.text:SetText(aura_env.shorten(aura_env.amount)) aura_env.region.text:SetText(aura_env.shorten(aura_env.amount))
aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount)) aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount))
else else
aura_env.region.text:SetText("") aura_env.region.text:SetText("")
aura_env.region.timer:SetText("") aura_env.region.timer:SetText("")
aura_env.maxamount = 0 aura_env.maxamount = 0
end end
return true return true
elseif e == "UNIT_COMBAT" then elseif e == "UNIT_COMBAT" then
if aura_env.CUnitBuff("Ignore Pain") then if aura_env.CUnitBuff("Ignore Pain") then
aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain")) aura_env.amount = select(16, aura_env.CUnitBuff("Ignore Pain"))
aura_env.region.text:SetText(aura_env.shorten(aura_env.amount)) aura_env.region.text:SetText(aura_env.shorten(aura_env.amount))
aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount)) aura_env.region.timer:SetText(aura_env.shorten(aura_env.maxamount))
end end
return true return true
end end
end end
--DURATION --DURATION
function() function()
return aura_env.amount, aura_env.maxamount, 1 return aura_env.amount, aura_env.maxamount, 1
end end
--INIT --INIT
aura_env.absorb = 0 aura_env.absorb = 0
aura_env.CUnitBuff = function(spell) aura_env.CUnitBuff = function(spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitBuff("player", i) local name = UnitBuff("player", i)
if name then if name then
if name == spell then if name == spell then
return UnitBuff("player", i) return UnitBuff("player", i)
end end
else else
break break
end end
end end
end end
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end

View File

@@ -1,24 +1,24 @@
--CLEU SPELL_UPDATE_COOLDOWN --CLEU SPELL_UPDATE_COOLDOWN
function(e, ...) function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
if select(2, ...) == "SPELL_DAMAGE" and select(5, ...) == UnitName("player") and (select(13, ...) == "Fireball" or select(13, ...) == "Fire Blast" or select(13, ...) == "Pyroblast") and select(21, ...) == true and GetSpellCooldown("Combustion") > 0 then if select(2, ...) == "SPELL_DAMAGE" and select(5, ...) == UnitName("player") and (select(13, ...) == "Fireball" or select(13, ...) == "Fire Blast" or select(13, ...) == "Pyroblast") and select(21, ...) == true and GetSpellCooldown("Combustion") > 0 then
if not aura_env.cd then aura_env.cd = 0 end if not aura_env.cd then aura_env.cd = 0 end
aura_env.cd = aura_env.cd + 1 aura_env.cd = aura_env.cd + 1
return true return true
end end
if select(2, ...) == "SPELL_CAST_SUCCESS" and select(5, ...) == UnitName("player") and select(13, ...) == "Combustion" then if select(2, ...) == "SPELL_CAST_SUCCESS" and select(5, ...) == UnitName("player") and select(13, ...) == "Combustion" then
aura_env.cd = 0 aura_env.cd = 0
end end
elseif e == "SPELL_UPDATE_COOLDOWN" then return true elseif e == "SPELL_UPDATE_COOLDOWN" then return true
end end
end end
--DISPLAY --DISPLAY
function() function()
if not aura_env.cd then aura_env.cd = 0 end if not aura_env.cd then aura_env.cd = 0 end
if GetSpellCooldown("Combustion") > 0 then if GetSpellCooldown("Combustion") > 0 then
return "|cfffd477b" .. aura_env.cd return "|cfffd477b" .. aura_env.cd
else else
return "|cff78cb00" .. aura_env.cd return "|cff78cb00" .. aura_env.cd
end end
end end

View File

@@ -1,34 +1,34 @@
--CHAT_MSG_LOOT --CHAT_MSG_LOOT
function(_,msg,who) function(_,msg,who)
local who = who:match(UnitName("player")) local who = who:match(UnitName("player"))
local what = msg:match("%[([a-zA-Z ' -]+)%]") local what = msg:match("%[([a-zA-Z ' -]+)%]")
if who == UnitName("player") then if who == UnitName("player") then
local link = "" local link = ""
for i = 0, 4 do for i = 0, 4 do
for j = 1, GetContainerNumSlots(i) do for j = 1, GetContainerNumSlots(i) do
if GetContainerItemLink(i,j) then if GetContainerItemLink(i,j) then
if GetItemInfo(GetContainerItemLink(i, j)) == what then if GetItemInfo(GetContainerItemLink(i, j)) == what then
link = GetContainerItemLink(i, j) link = GetContainerItemLink(i, j)
end end
end end
end end
end end
table.insert(aura_env.loot, {["Who"] = who, ["What"] = what, ["When"] = GetTime() + 2.5, ["Link"] = link}) table.insert(aura_env.loot, {["Who"] = who, ["What"] = what, ["When"] = GetTime() + 2.5, ["Link"] = link})
end end
end end
--DISPLAY --DISPLAY
function() function()
local output = "" local output = ""
for k,v in ipairs(aura_env.loot) do for k,v in ipairs(aura_env.loot) do
if v.When < GetTime() then if v.When < GetTime() then
table.remove(aura_env.loot, k) table.remove(aura_env.loot, k)
else else
output = output .. v.Link .. "\n" output = output .. v.Link .. "\n"
end end
end end
return output return output
end end
--INIT --INIT
aura_env.loot = {} aura_env.loot = {}

View File

@@ -1,121 +1,121 @@
--EVERY FRAME (Throttled) --EVERY FRAME (Throttled)
function() function()
if aura_env.lastscan < GetTime() then if aura_env.lastscan < GetTime() then
if UnitExists("focus") then if UnitExists("focus") then
if UnitInParty("focus") then if UnitInParty("focus") then
--Get MapID for both --Get MapID for both
local myMapID = C_Map.GetBestMapForUnit("player") local myMapID = C_Map.GetBestMapForUnit("player")
local focusMapID = C_Map.GetBestMapForUnit("focus") local focusMapID = C_Map.GetBestMapForUnit("focus")
--Get Coordinates for both within same map --Get Coordinates for both within same map
local pX, pY, fX, fY = 0, 0, 0, 0 local pX, pY, fX, fY = 0, 0, 0, 0
if myMapID == focusMapID then if myMapID == focusMapID then
pX, pY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").y, 4) * 10000 pX, pY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "player").y, 4) * 10000
fX, fY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").y, 4) * 10000 fX, fY = aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").x, 4) * 10000, aura_env.round(C_Map.GetPlayerMapPosition(myMapID, "focus").y, 4) * 10000
end end
if pX > 0 and pY > 0 and fX > 0 and fY > 0 then if pX > 0 and pY > 0 and fX > 0 and fY > 0 then
--Get player direction facing and convert to angle --Get player direction facing and convert to angle
local playerFace = GetPlayerFacing() or 0 local playerFace = GetPlayerFacing() or 0
local playerA = math.floor(playerFace * 100) local playerA = math.floor(playerFace * 100)
playerA = aura_env.range(playerA, 0, 630, 360) - 1 playerA = aura_env.range(playerA, 0, 630, 360) - 1
playerA = - playerA playerA = - playerA
playerA = math.floor(playerA) playerA = math.floor(playerA)
playerA = playerA - 90 playerA = playerA - 90
if playerA < 0 then playerA = playerA + 360 end if playerA < 0 then playerA = playerA + 360 end
--Get relative Coordinates --Get relative Coordinates
local X = fX - pX local X = fX - pX
local Y = fY - pY local Y = fY - pY
local hyp = math.sqrt((X ^ 2) + (Y ^ 2)) local hyp = math.sqrt((X ^ 2) + (Y ^ 2))
local a = math.atan2(Y, X) local a = math.atan2(Y, X)
a = a - math.rad(playerA) a = a - math.rad(playerA)
local Y2, X2 = hyp * math.cos(a), hyp * math.sin(a) local Y2, X2 = hyp * math.cos(a), hyp * math.sin(a)
local zoomout, zoomin = 100, 50 local zoomout, zoomin = 100, 50
if (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom > 0.3 then if (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom > 0.3 then
aura_env.zoom = aura_env.zoom - 0.2 aura_env.zoom = aura_env.zoom - 0.2
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.3 and aura_env.zoom > 0.1 then elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.3 and aura_env.zoom > 0.1 then
aura_env.zoom = aura_env.zoom - 0.05 aura_env.zoom = aura_env.zoom - 0.05
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.1 and aura_env.zoom > 0.0005 then elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom <= 0.1 and aura_env.zoom > 0.0005 then
aura_env.zoom = aura_env.zoom - 0.0005 aura_env.zoom = aura_env.zoom - 0.0005
elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom < 0.001 then elseif (math.abs((X2 * aura_env.zoom)) > zoomout or math.abs((Y2 * aura_env.zoom)) > zoomout) and aura_env.zoom < 0.001 then
aura_env.zoom = 1 aura_env.zoom = 1
end end
if (math.abs((X2 * aura_env.zoom)) < zoomin and math.abs((Y2 * aura_env.zoom)) < zoomin) and aura_env.zoom < 50 then if (math.abs((X2 * aura_env.zoom)) < zoomin and math.abs((Y2 * aura_env.zoom)) < zoomin) and aura_env.zoom < 50 then
aura_env.zoom = aura_env.zoom + 0.2 aura_env.zoom = aura_env.zoom + 0.2
end end
aura_env.region.text:SetText("Zoom: " .. aura_env.zoom .. "\nDistance: " .. aura_env.round(hyp, 0)) aura_env.region.text:SetText("Zoom: " .. aura_env.zoom .. "\nDistance: " .. aura_env.round(hyp, 0))
aura_env.region.playerTexture:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0) aura_env.region.playerTexture:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
aura_env.region.focusTexture:SetPoint("CENTER", aura_env.region, "CENTER", X2 * aura_env.zoom, Y2 * aura_env.zoom) aura_env.region.focusTexture:SetPoint("CENTER", aura_env.region, "CENTER", X2 * aura_env.zoom, Y2 * aura_env.zoom)
--Get class to color --Get class to color
local pclass, fclass = select(3, UnitClass("player")), select(3, UnitClass("focus")) local pclass, fclass = select(3, UnitClass("player")), select(3, UnitClass("focus"))
aura_env.region.playerTexture:SetVertexColor(aura_env.classColor(pclass)) aura_env.region.playerTexture:SetVertexColor(aura_env.classColor(pclass))
aura_env.region.focusTexture:SetVertexColor(aura_env.classColor(fclass)) aura_env.region.focusTexture:SetVertexColor(aura_env.classColor(fclass))
return true return true
else else
print("Focus not in map!") print("Focus not in map!")
end end
aura_env.lastscan = GetTime() + aura_env.throttle / 1000 aura_env.lastscan = GetTime() + aura_env.throttle / 1000
else print("Focus not in party!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end else print("Focus not in party!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
else print("No focus found!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end else print("No focus found!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
end end
end end
--INIT --INIT
aura_env.throttle = 250 aura_env.throttle = 250
aura_env.lastscan = 0 aura_env.lastscan = 0
aura_env.zoom = 1 aura_env.zoom = 1
aura_env.range = function(val, min, max, max2) aura_env.range = function(val, min, max, max2)
val = 1 - (((max - val) / (max - min)) * max2) val = 1 - (((max - val) / (max - min)) * max2)
return val return val
end end
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == 1 then return 0.78, 0.61, 0.43, 0.75 elseif if class == 1 then return 0.78, 0.61, 0.43, 0.75 elseif
class == 2 then return 0.96, 0.55, 0.73, 0.75 elseif class == 2 then return 0.96, 0.55, 0.73, 0.75 elseif
class == 3 then return 0.67, 0.83, 0.45, 0.75 elseif class == 3 then return 0.67, 0.83, 0.45, 0.75 elseif
class == 4 then return 1, 0.96, 0.41, 0.75 elseif class == 4 then return 1, 0.96, 0.41, 0.75 elseif
class == 5 then return 1, 1, 1, 0.75 elseif class == 5 then return 1, 1, 1, 0.75 elseif
class == 6 then return 0.77, 0.12, 0.23, 0.75 elseif class == 6 then return 0.77, 0.12, 0.23, 0.75 elseif
class == 7 then return 0, 0.44, 0.87, 0.75 elseif class == 7 then return 0, 0.44, 0.87, 0.75 elseif
class == 8 then return 0.25, 0.78, 0.92, 0.75 elseif class == 8 then return 0.25, 0.78, 0.92, 0.75 elseif
class == 9 then return 0.53, 0.53, 0.93, 0.75 elseif class == 9 then return 0.53, 0.53, 0.93, 0.75 elseif
class == 10 then return 0, 1, 0.59, 0.75 elseif class == 10 then return 0, 1, 0.59, 0.75 elseif
class == 11 then return 1, 0.49, 0.04, 0.75 elseif class == 11 then return 1, 0.49, 0.04, 0.75 elseif
class == 12 then return 0.64, 0.19, 0.79, 0.75 else class == 12 then return 0.64, 0.19, 0.79, 0.75 else
return 1, 1, 1, 1 end return 1, 1, 1, 1 end
end end
if not aura_env.region.playerTexture then if not aura_env.region.playerTexture then
local playerTexture = aura_env.region:CreateTexture(nil, "OVERLAY") local playerTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
aura_env.region.playerTexture = playerTexture aura_env.region.playerTexture = playerTexture
end end
aura_env.region.playerTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72") aura_env.region.playerTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
aura_env.region.playerTexture:SetHeight(16) aura_env.region.playerTexture:SetHeight(16)
aura_env.region.playerTexture:SetWidth(16) aura_env.region.playerTexture:SetWidth(16)
aura_env.region.playerTexture:Show() aura_env.region.playerTexture:Show()
if not aura_env.region.focusTexture then if not aura_env.region.focusTexture then
local focusTexture = aura_env.region:CreateTexture(nil, "OVERLAY") local focusTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
aura_env.region.focusTexture = focusTexture aura_env.region.focusTexture = focusTexture
end end
aura_env.region.focusTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72") aura_env.region.focusTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
aura_env.region.focusTexture:SetHeight(16) aura_env.region.focusTexture:SetHeight(16)
aura_env.region.focusTexture:SetWidth(16) aura_env.region.focusTexture:SetWidth(16)
aura_env.region.focusTexture:Show() aura_env.region.focusTexture:Show()
if not aura_env.region.text then if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, aura_env.region) local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text aura_env.region.text = text
end end
aura_env.region.text:ClearAllPoints() aura_env.region.text:ClearAllPoints()
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 0, 500) aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER", 0, 500)
aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Medium.ttf", 16, "OUTLINE") aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Medium.ttf", 16, "OUTLINE")
aura_env.region.text:SetJustifyH("CENTER") aura_env.region.text:SetJustifyH("CENTER")
aura_env.region.text:Show() aura_env.region.text:Show()

View File

@@ -1,108 +1,108 @@
--QUEST_LOG_UPDATE --QUEST_LOG_UPDATE
function(e, unit) function(e, unit)
if e == "QUEST_LOG_UPDATE" then if e == "QUEST_LOG_UPDATE" then
local entries = GetNumQuestLogEntries() local entries = GetNumQuestLogEntries()
for i = 1, entries do for i = 1, entries do
if GetQuestLogLeaderBoard(1, i) then if GetQuestLogLeaderBoard(1, i) then
for j = 1, 40 do for j = 1, 40 do
local text, type, finished = GetQuestLogLeaderBoard(1, i) local text, type, finished = GetQuestLogLeaderBoard(1, i)
if not text then if not text then
break break
elseif text and not finished then elseif text and not finished then
if type == "monster" and text:match("slain") then if type == "monster" and text:match("slain") then
local count, mcount = text:match("(%d*)%/(%d*)") local count, mcount = text:match("(%d*)%/(%d*)")
local rem = mcount - count local rem = mcount - count
local mob = text:match("%d*%/%d* (.+) slain") local mob = text:match("%d*%/%d* (.+) slain")
aura_env.mobs[mob] = rem aura_env.mobs[mob] = rem
end end
elseif finished and aura_env.mobs[mob] then elseif finished and aura_env.mobs[mob] then
local mob = text:match("%d*%/%d* (.+) slain") local mob = text:match("%d*%/%d* (.+) slain")
table.remove(aura_env.mobs, mob) table.remove(aura_env.mobs, mob)
end end
end end
end end
end end
end end
end end
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED --NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
--TSU --TSU
function(allstates, e, unit) function(allstates, e, unit)
if e == "NAME_PLATE_UNIT_ADDED" then if e == "NAME_PLATE_UNIT_ADDED" then
if UnitExists(unit) then if UnitExists(unit) then
if aura_env.mobs[UnitName(unit)] then if aura_env.mobs[UnitName(unit)] then
local name = UnitName(unit) local name = UnitName(unit)
allstates[unit] = allstates[unit] =
{ {
show = true, show = true,
changed = true, changed = true,
unit = unit, unit = unit,
name = name, name = name,
count = aura_env.mobs[name], count = aura_env.mobs[name],
} }
return true return true
end end
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" then elseif e == "NAME_PLATE_UNIT_REMOVED" then
if allstates[unit] then if allstates[unit] then
allstates[unit] = allstates[unit] =
{ {
show = false, show = false,
changed = true, changed = true,
} }
return true return true
end end
end end
end end
--ON SHOW --ON SHOW
if not aura_env.region.text then if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, "OVERLAY") local text = aura_env.region:CreateFontString(nil, "OVERLAY")
aura_env.region.text = text aura_env.region.text = text
end end
aura_env.region:SetHeight(128) aura_env.region:SetHeight(128)
aura_env.region:SetWidth(512) aura_env.region:SetWidth(512)
aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Regular.ttf", 18, "OUTLINE") aura_env.region.text:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Regular.ttf", 18, "OUTLINE")
aura_env.region.text:SetTextColor(1,1,1,1) aura_env.region.text:SetTextColor(1,1,1,1)
aura_env.region.text:SetText(aura_env.state.count) aura_env.region.text:SetText(aura_env.statee.count)
if not aura_env.region.texture then if not aura_env.region.texture then
local texture = aura_env.region:CreateTexture(nil, "OVERLAY") local texture = aura_env.region:CreateTexture(nil, "OVERLAY")
aura_env.region.texture = texture aura_env.region.texture = texture
end end
aura_env.region.texture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura51") aura_env.region.texture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura51")
aura_env.region.texture:SetHeight(32) aura_env.region.texture:SetHeight(32)
aura_env.region.texture:SetWidth(32) aura_env.region.texture:SetWidth(32)
local plate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit) local plate = C_NamePlate.GetNamePlateForUnit(aura_env.statee.unit)
if plate then if plate then
print("found plate pls work") print("found plate pls work")
aura_env.region.texture:ClearAllPoints() aura_env.region.texture:ClearAllPoints()
aura_env.region.texture:SetPoint("TOP", plate, "TOP", 0, 32) aura_env.region.texture:SetPoint("TOP", plate, "TOP", 0, 32)
aura_env.region.texture:Show() aura_env.region.texture:Show()
aura_env.region.text:ClearAllPoints() aura_env.region.text:ClearAllPoints()
aura_env.region.text:SetPoint("CENTER", plate, "CENTER", 32, 48) aura_env.region.text:SetPoint("CENTER", plate, "CENTER", 32, 48)
aura_env.region.text:Show() aura_env.region.text:Show()
end end
--INIT --INIT
aura_env.mobs = {} aura_env.mobs = {}
local entries = GetNumQuestLogEntries() local entries = GetNumQuestLogEntries()
for i = 1, entries do for i = 1, entries do
if GetQuestLogLeaderBoard(1, i) then if GetQuestLogLeaderBoard(1, i) then
for j = 1, 40 do for j = 1, 40 do
local text, type, finished = GetQuestLogLeaderBoard(1, i) local text, type, finished = GetQuestLogLeaderBoard(1, i)
if not text then if not text then
break break
elseif text and not finished then elseif text and not finished then
if type == "monster" and text:match("slain") then if type == "monster" and text:match("slain") then
local count, mcount = text:match("(%d*)%/(%d*)") local count, mcount = text:match("(%d*)%/(%d*)")
local rem = mcount - count local rem = mcount - count
local mob = text:match("%d*%/%d* (.+) slain") local mob = text:match("%d*%/%d* (.+) slain")
aura_env.mobs[mob] = rem aura_env.mobs[mob] = rem
end end
elseif finished and aura_env.mobs[mob] then elseif finished and aura_env.mobs[mob] then
local mob = text:match("%d*%/%d* (.+) slain") local mob = text:match("%d*%/%d* (.+) slain")
table.remove(aura_env.mobs, mob) table.remove(aura_env.mobs, mob)
end end
end end
end end
end end

View File

@@ -1,67 +1,67 @@
--UNIT_COMBAT:player UNIT_AURA:player --UNIT_COMBAT:player UNIT_AURA:player
function(e, ...) function(e, ...)
if e == "UNIT_AURA" then if e == "UNIT_AURA" then
if aura_env.CUnitBuff("Null Barrier") then if aura_env.CUnitBuff("Null Barrier") then
aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier")) aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier"))
local expTime = math.floor((select(6, aura_env.CUnitBuff("Null Barrier")) * 100)) local expTime = math.floor((select(6, aura_env.CUnitBuff("Null Barrier")) * 100))
local ctime = math.floor((GetTime() * 100)) local ctime = math.floor((GetTime() * 100))
if ctime + 1000 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Null Barrier")) end if ctime + 1000 == expTime then aura_env.lastTime = GetTime(); aura_env.maxamount = select(16, aura_env.CUnitBuff("Null Barrier")) end
end end
return true return true
elseif e == "UNIT_COMBAT" then elseif e == "UNIT_COMBAT" then
if aura_env.CUnitBuff("Null Barrier") then if aura_env.CUnitBuff("Null Barrier") then
aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier")) aura_env.amount = select(16, aura_env.CUnitBuff("Null Barrier"))
end end
return true return true
end end
end end
--DURATION --DURATION
function() function()
if aura_env.CUnitBuff("Null Barrier") then if aura_env.CUnitBuff("Null Barrier") then
aura_env.region:SetInverse(false) aura_env.region:SetInverse(false)
aura_env.region:Color(0.5, 0, 0.5, 1) aura_env.region:Color(0.5, 0, 0.5, 1)
return aura_env.amount, aura_env.maxamount, 1 return aura_env.amount, aura_env.maxamount, 1
else else
aura_env.region:SetInverse(true) aura_env.region:SetInverse(true)
aura_env.region:Color(0.5, 0.5, 0.5, 1) aura_env.region:Color(0.5, 0.5, 0.5, 1)
return 15, aura_env.lastTime + 15 return 15, aura_env.lastTime + 15
end end
end end
--INIT --INIT
aura_env.maxamount = 0 aura_env.maxamount = 0
aura_env.amount = 0 aura_env.amount = 0
aura_env.lastTime = GetTime() aura_env.lastTime = GetTime()
aura_env.CUnitBuff = function(spell) aura_env.CUnitBuff = function(spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitBuff("player", i) local name = UnitBuff("player", i)
if name then if name then
if name == spell then if name == spell then
return UnitBuff("player", i) return UnitBuff("player", i)
end end
else else
break break
end end
end end
end end
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end

View File

@@ -1,20 +1,20 @@
--QUEST_POI_UPDATE UPDATE_Q_ITEM --QUEST_POI_UPDATE UPDATE_Q_ITEM
function() function()
if InCombatLockdown() ~= 1 then if InCombatLockdown() ~= 1 then
for i = 0, 4 do for i = 0, 4 do
for j = 1, GetContainerNumSlots(i) do for j = 1, GetContainerNumSlots(i) do
local link = select(7, GetContainerItemInfo(i, j)) local link = select(7, GetContainerItemInfo(i, j))
if link then if link then
local type = select(6, GetItemInfo(link)) local type = select(6, GetItemInfo(link))
if type == "Quest" then if type == "Quest" then
PickupContainerItem(i, j) PickupContainerItem(i, j)
if CursorHasItem() then if CursorHasItem() then
PickupAction(22) PickupAction(22)
ClearCursor() ClearCursor()
end end
end end
end end
end end
end end
end end
end end

View File

@@ -1,100 +1,100 @@
--CHAT_MSG_CHANNEL --CHAT_MSG_CHANNEL
function(e, msg, _, _, channel) function(e, msg, _, _, channel)
if channel:match("General") and (channel:match("Nazjatar") or channel:match("Mechagon")) then if channel:match("General") and (channel:match("Nazjatar") or channel:match("Mechagon")) then
if msg:match("(KX%-T57 (%d+%.?%d*))") then msg = msg:gsub("(KX%-T57 (%d+%.?%d*))", "") end if msg:match("(KX%-T57 (%d+%.?%d*))") then msg = msg:gsub("(KX%-T57 (%d+%.?%d*))", "") end
local x, y = msg:match("(%d+%.?%d*)[ ,/]+(%d+%.?%d*)") local x, y = msg:match("(%d+%.?%d*)[ ,/]+(%d+%.?%d*)")
if x and y then if x and y then
local command = x .. " " .. y local command = x .. " " .. y
aura_env.waypoints[#aura_env.waypoints + 1] = {["x"] = x, ["y"] = y,} aura_env.waypoints[#aura_env.waypoints + 1] = {["x"] = x, ["y"] = y,}
WeakAuras.ScanEvents("NEW_ID") WeakAuras.ScanEvents("NEW_ID")
end end
end end
end end
--EVERY FRAME --EVERY FRAME
function() function()
if not aura_env.noidee then if not aura_env.noidee then
local function range (val, min, max, max2) local function range (val, min, max, max2)
val = 1 - (((max - val) / (max - min)) * max2) val = 1 - (((max - val) / (max - min)) * max2)
return val return val
end end
if not aura_env.idee then WeakAuras.ScanEvents("NEW_ID") if not aura_env.idee then WeakAuras.ScanEvents("NEW_ID")
else else
local hX, hY = aura_env.waypoints[aura_env.idee]["x"], aura_env.waypoints[aura_env.idee]["y"] local hX, hY = aura_env.waypoints[aura_env.idee]["x"], aura_env.waypoints[aura_env.idee]["y"]
local myMapID = C_Map.GetBestMapForUnit("player") local myMapID = C_Map.GetBestMapForUnit("player")
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100 local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
local X = pX - hX local X = pX - hX
local Y = pY - hY local Y = pY - hY
local playerFace = GetPlayerFacing() or 0 local playerFace = GetPlayerFacing() or 0
local playerA = math.floor(playerFace * 100) local playerA = math.floor(playerFace * 100)
playerA = range(playerA, 0, 630, 360) - 1 playerA = range(playerA, 0, 630, 360) - 1
playerA = - playerA playerA = - playerA
playerA = playerA - 90 playerA = playerA - 90
if playerA < 0 then playerA = playerA + 360 end if playerA < 0 then playerA = playerA + 360 end
aura_env.hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2))) * 100 aura_env.hyp = math.sqrt((math.abs(X ^ 2)) + (math.abs(Y ^ 2))) * 100
aura_env.region.distance:SetText(math.floor(aura_env.hyp)) aura_env.region.distance:SetText(math.floor(aura_env.hyp))
aura_env.angle = math.deg(math.atan2(Y, X)) aura_env.angle = math.deg(math.atan2(Y, X))
aura_env.angle = aura_env.angle - playerA aura_env.angle = aura_env.angle - playerA
aura_env.angle = aura_env.angle - 180 aura_env.angle = aura_env.angle - 180
if aura_env.hyp < aura_env.wipeDistance then if aura_env.hyp < aura_env.wipeDistance then
table.remove(aura_env.waypoints, aura_env.idee) table.remove(aura_env.waypoints, aura_env.idee)
aura_env.idee = nil aura_env.idee = nil
WeakAuras.ScanEvents("NEW_ID") WeakAuras.ScanEvents("NEW_ID")
end end
return true return true
end end
end end
end end
--NEW_ID REMOVE_ID --NEW_ID REMOVE_ID
function(e) function(e)
if e == "NEW_ID" then if e == "NEW_ID" then
if not IsInInstance() then if not IsInInstance() then
local maxhyp = 100000 local maxhyp = 100000
local myMapID = C_Map.GetBestMapForUnit("player") local myMapID = C_Map.GetBestMapForUnit("player")
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100 local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
for k,v in ipairs(aura_env.waypoints) do for k,v in ipairs(aura_env.waypoints) do
local hX, hY = aura_env.waypoints[k].x, aura_env.waypoints[k].y local hX, hY = aura_env.waypoints[k].x, aura_env.waypoints[k].y
local X, Y = pX - hX, pY - hY local X, Y = pX - hX, pY - hY
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2))) local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2)))
if hyp < maxhyp then if hyp < maxhyp then
maxhyp = hyp maxhyp = hyp
aura_env.idee = k aura_env.idee = k
end end
end end
if not aura_env.idee then aura_env.noidee = true end if not aura_env.idee then aura_env.noidee = true end
if aura_env.idee then aura_env.noidee = nil end if aura_env.idee then aura_env.noidee = nil end
end end
elseif e == "REMOVE_ID" then elseif e == "REMOVE_ID" then
if aura_env.idee then if aura_env.idee then
table.remove(aura_env.waypoints, aura_env.idee) table.remove(aura_env.waypoints, aura_env.idee)
aura_env.idee = nil aura_env.idee = nil
WeakAuras.ScanEvents("NEW_ID") WeakAuras.ScanEvents("NEW_ID")
else else
end end
end end
end end
--ANIMATION --ANIMATION
function() function()
if aura_env.angle then if aura_env.angle then
return - aura_env.angle return - aura_env.angle
else else
return 0 return 0
end end
end end
--INIT --INIT
aura_env.waypoints = {} aura_env.waypoints = {}
if not aura_env.region.distance then if not aura_env.region.distance then
local distance = aura_env.region:CreateFontString(nil, aura_env.region) local distance = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.distance = distance aura_env.region.distance = distance
end end
aura_env.region.distance:ClearAllPoints() aura_env.region.distance:ClearAllPoints()
aura_env.region.distance:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE") aura_env.region.distance:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE")
aura_env.region.distance:SetPoint("CENTER", aura_env.region, "CENTER") aura_env.region.distance:SetPoint("CENTER", aura_env.region, "CENTER")
aura_env.region.distance:SetJustifyH("CENTER") aura_env.region.distance:SetJustifyH("CENTER")
aura_env.region.distance:SetJustifyV("CENTER") aura_env.region.distance:SetJustifyV("CENTER")
aura_env.region.distance:Show() aura_env.region.distance:Show()
aura_env.wipeDistance = 50 aura_env.wipeDistance = 50
WeakAuras.ScanEvents("NEW_ID") WeakAuras.ScanEvents("NEW_ID")

View File

@@ -1,4 +1,4 @@
--PLAYER_ALIVE --PLAYER_ALIVE
function() function()
WeakAurasSaved["CustomTrash"] = "" WeakAurasSaved["CustomTrash"] = ""
end end

View File

@@ -1,42 +1,42 @@
--CLEU UPDATE_TEXT --CLEU UPDATE_TEXT
function(e, ...) function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...) local se = select(2, ...)
local aura_env = aura_env local aura_env = aura_env
if se == "SPELL_DAMAGE" or se == "SPELL_PERIODIC_DAMAGE" then if se == "SPELL_DAMAGE" or se == "SPELL_PERIODIC_DAMAGE" then
local _, _, _, _, caster, _, _, _, target, _, _, sID, sName, sSchool, amount, overkill, school, resisted, blocked, absorbed, critical = ... local _, _, _, _, caster, _, _, _, target, _, _, sID, sName, sSchool, amount, overkill, school, resisted, blocked, absorbed, critical = ...
if caster == UnitName("player") and critical == false then if caster == UnitName("player") and critical == false then
if not aura_env.hits then aura_env.hits = {} end if not aura_env.hits then aura_env.hits = {} end
local ID = #aura_env.hits + 1 local ID = #aura_env.hits + 1
aura_env.hits[ID] = aura_env.hits[ID] =
{ {
["sID"] = sID, ["sID"] = sID,
["sName"] = sName, ["sName"] = sName,
["sSchool"] = sSchool, ["sSchool"] = sSchool,
["amount"] = amount, ["amount"] = amount,
["resisted"] = resisted, ["resisted"] = resisted,
["blocked"] = blocked, ["blocked"] = blocked,
["absorbed"] = absorbed, ["absorbed"] = absorbed,
["target"] = target, ["target"] = target,
["time"] = GetTime(), ["time"] = GetTime(),
} }
WeakAuras.ScanEvents("UPDATE_TEXT") WeakAuras.ScanEvents("UPDATE_TEXT")
C_Timer.After(2, function() table.remove(aura_env.hits, ID); WeakAuras.ScanEvents("UPDATE_TEXT") end) C_Timer.After(2, function() table.remove(aura_env.hits, ID); WeakAuras.ScanEvents("UPDATE_TEXT") end)
return true return true
end end
end end
elseif e == "UPDATE_TEXT" then elseif e == "UPDATE_TEXT" then
aura_env.output = "" aura_env.output = ""
print(#aura_env.hits) print(#aura_env.hits)
for k,v in ipairs(aura_env.hits) do for k,v in ipairs(aura_env.hits) do
print(k, v.amount) print(k, v.amount)
aura_env.output = aura_env.output .. v.amount .. "\n" aura_env.output = aura_env.output .. v.amount .. "\n"
end end
print("") print("")
end end
end end
--DISPLAY --DISPLAY
function() function()
return aura_env.output return aura_env.output
end end

View File

@@ -1,22 +1,22 @@
--UNIT_COMBAT --UNIT_COMBAT
function(_, target, event, _, amount) function(_, target, event, _, amount)
if target == "player" and event ~= "HEAL" and amount then if target == "player" and event ~= "HEAL" and amount then
aura_env.lasthit = GetTime() aura_env.lasthit = GetTime()
return true return true
end end
end end
--UNTRIGGER --UNTRIGGER
function() function()
if aura_env.lasthit + 5 < GetTime() then if aura_env.lasthit + 5 < GetTime() then
return true return true
end end
end end
--DURATION --DURATION
function() function()
return 5, aura_env.lasthit + 5 return 5, aura_env.lasthit + 5
end end
--INIT --INIT
aura_env.lasthit = 0 aura_env.lasthit = 0

View File

@@ -1,132 +1,132 @@
--CHAT_MSG_WHISPER --CHAT_MSG_WHISPER
--/run SendChatMessage("hi", "WHISPER",_, UnitName("player")) --/run SendChatMessage("hi", "WHISPER",_, UnitName("player"))
function(e,msg,sender) function(e,msg,sender)
sender = sender:gsub("-.+", "") sender = sender:gsub("-.+", "")
msg = msg:lower() msg = msg:lower()
print(sender,msg) print(sender,msg)
if msg == "setup party" and sender == UnitName("player") then if msg == "setup party" and sender == UnitName("player") then
aura_env.party() aura_env.party()
end end
if msg == "setup general" and sender == UnitName("player") then if msg == "setup general" and sender == UnitName("player") then
aura_env.general() aura_env.general()
end end
end end
--INIT --INIT
aura_env.party = function() aura_env.party = function()
print("Setting party up") print("Setting party up")
print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked()) print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == false then --Say if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == false then --Say
ChatConfigChatSettingsLeftCheckBox1Check:Click() ChatConfigChatSettingsLeftCheckBox1Check:Click()
end end
print("Check4 " .. ChatCOnfigChatSettingsLeftCheckBox4Check:GetChecked()) print("Check4 " .. ChatCOnfigChatSettingsLeftCheckBox4Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == false then --Emote if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == false then --Emote
ChatConfigChatSettingsLeftCheckBox2Check:Click() ChatConfigChatSettingsLeftCheckBox2Check:Click()
end end
print("Check5 " .. ChatCOnfigChatSettingsLeftCheckBox5Check:GetChecked()) print("Check5 " .. ChatCOnfigChatSettingsLeftCheckBox5Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == false then --Yell if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == false then --Yell
ChatConfigChatSettingsLeftCheckBox3Check:Click() ChatConfigChatSettingsLeftCheckBox3Check:Click()
end end
print("Check6 " .. ChatCOnfigChatSettingsLeftCheckBox6Check:GetChecked()) print("Check6 " .. ChatCOnfigChatSettingsLeftCheckBox6Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat
ChatConfigChatSettingsLeftCheckBox4Check:Click() ChatConfigChatSettingsLeftCheckBox4Check:Click()
end end
print("Check7 " .. ChatCOnfigChatSettingsLeftCheckBox7Check:GetChecked()) print("Check7 " .. ChatCOnfigChatSettingsLeftCheckBox7Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat
ChatConfigChatSettingsLeftCheckBox5Check:Click() ChatConfigChatSettingsLeftCheckBox5Check:Click()
end end
print("Check8 " .. ChatCOnfigChatSettingsLeftCheckBox8Check:GetChecked()) print("Check8 " .. ChatCOnfigChatSettingsLeftCheckBox8Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce
ChatConfigChatSettingsLeftCheckBox6Check:Click() ChatConfigChatSettingsLeftCheckBox6Check:Click()
end end
print("Check9 " .. ChatCOnfigChatSettingsLeftCheckBox9Check:GetChecked()) print("Check9 " .. ChatCOnfigChatSettingsLeftCheckBox9Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce
ChatConfigChatSettingsLeftCheckBox7Check:Click() ChatConfigChatSettingsLeftCheckBox7Check:Click()
end end
print("Check 10 " .. ChatCOnfigChatSettingsLeftCheckBox10Check:GetChecked()) print("Check 10 " .. ChatCOnfigChatSettingsLeftCheckBox10Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == false then --Whisper if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == false then --Whisper
ChatConfigChatSettingsLeftCheckBox8Check:Click() ChatConfigChatSettingsLeftCheckBox8Check:Click()
end end
print("Check 11 " .. ChatCOnfigChatSettingsLeftCheckBox11Check:GetChecked()) print("Check 11 " .. ChatCOnfigChatSettingsLeftCheckBox11Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == false then --Blizzard whisper if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == false then --Blizzard whisper
ChatConfigChatSettingsLeftCheckBox9Check:Click() ChatConfigChatSettingsLeftCheckBox9Check:Click()
end end
print("Check 12 " .. ChatCOnfigChatSettingsLeftCheckBox12Check:GetChecked()) print("Check 12 " .. ChatCOnfigChatSettingsLeftCheckBox12Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == false then --Party if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == false then --Party
ChatConfigChatSettingsLeftCheckBox10Check:Click() ChatConfigChatSettingsLeftCheckBox10Check:Click()
end end
print("Check 13 " .. ChatCOnfigChatSettingsLeftCheckBox13Check:GetChecked()) print("Check 13 " .. ChatCOnfigChatSettingsLeftCheckBox13Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == false then --Party leader if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == false then --Party leader
ChatConfigChatSettingsLeftCheckBox11Check:Click() ChatConfigChatSettingsLeftCheckBox11Check:Click()
end end
print("Check 14 " .. ChatCOnfigChatSettingsLeftCheckBox14Check:GetChecked()) print("Check 14 " .. ChatCOnfigChatSettingsLeftCheckBox14Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == false then --Raid if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == false then --Raid
ChatConfigChatSettingsLeftCheckBox12Check:Click() ChatConfigChatSettingsLeftCheckBox12Check:Click()
end end
print("Check 15 " .. ChatCOnfigChatSettingsLeftCheckBox15Check:GetChecked()) print("Check 15 " .. ChatCOnfigChatSettingsLeftCheckBox15Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == false then --Raid leader if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == false then --Raid leader
ChatConfigChatSettingsLeftCheckBox13Check:Click() ChatConfigChatSettingsLeftCheckBox13Check:Click()
end end
print("Check 16 " .. ChatCOnfigChatSettingsLeftCheckBox16Check:GetChecked()) print("Check 16 " .. ChatCOnfigChatSettingsLeftCheckBox16Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == false then --Raid Warning if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == false then --Raid Warning
ChatConfigChatSettingsLeftCheckBox14Check:Click() ChatConfigChatSettingsLeftCheckBox14Check:Click()
end end
print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked()) print("Check1 " .. ChatCOnfigChatSettingsLeftCheckBox1Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == false then --Instance if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == false then --Instance
ChatConfigChatSettingsLeftCheckBox15Check:Click() ChatConfigChatSettingsLeftCheckBox15Check:Click()
end end
print("Check2 " .. ChatCOnfigChatSettingsLeftCheckBox2Check:GetChecked()) print("Check2 " .. ChatCOnfigChatSettingsLeftCheckBox2Check:GetChecked())
if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == false then --Instance leader if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == false then --Instance leader
ChatConfigChatSettingsLeftCheckBox16Check:Click() ChatConfigChatSettingsLeftCheckBox16Check:Click()
end end
end end
aura_env.general = function() aura_env.general = function()
if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == true then --Say if ChatConfigChatSettingsLeftCheckBox1Check:GetChecked() == true then --Say
ChatConfigChatSettingsLeftCheckBox1Check:Click() ChatConfigChatSettingsLeftCheckBox1Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == true then --Emote if ChatConfigChatSettingsLeftCheckBox2Check:GetChecked() == true then --Emote
ChatConfigChatSettingsLeftCheckBox2Check:Click() ChatConfigChatSettingsLeftCheckBox2Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == true then --Yell if ChatConfigChatSettingsLeftCheckBox3Check:GetChecked() == true then --Yell
ChatConfigChatSettingsLeftCheckBox3Check:Click() ChatConfigChatSettingsLeftCheckBox3Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat if ChatConfigChatSettingsLeftCheckBox4Check:GetChecked() == true then --Guild chat
ChatConfigChatSettingsLeftCheckBox4Check:Click() ChatConfigChatSettingsLeftCheckBox4Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat if ChatConfigChatSettingsLeftCheckBox5Check:GetChecked() == true then --Officer chat
ChatConfigChatSettingsLeftCheckBox5Check:Click() ChatConfigChatSettingsLeftCheckBox5Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce if ChatConfigChatSettingsLeftCheckBox6Check:GetChecked() == true then --Guild announce
ChatConfigChatSettingsLeftCheckBox6Check:Click() ChatConfigChatSettingsLeftCheckBox6Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce if ChatConfigChatSettingsLeftCheckBox7Check:GetChecked() == true then --Achievement announce
ChatConfigChatSettingsLeftCheckBox7Check:Click() ChatConfigChatSettingsLeftCheckBox7Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == true then --Whisper if ChatConfigChatSettingsLeftCheckBox8Check:GetChecked() == true then --Whisper
ChatConfigChatSettingsLeftCheckBox8Check:Click() ChatConfigChatSettingsLeftCheckBox8Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == true then --Blizzard whisper if ChatConfigChatSettingsLeftCheckBox9Check:GetChecked() == true then --Blizzard whisper
ChatConfigChatSettingsLeftCheckBox9Check:Click() ChatConfigChatSettingsLeftCheckBox9Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == true then --Party if ChatConfigChatSettingsLeftCheckBox10Check:GetChecked() == true then --Party
ChatConfigChatSettingsLeftCheckBox10Check:Click() ChatConfigChatSettingsLeftCheckBox10Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == true then --Party leader if ChatConfigChatSettingsLeftCheckBox11Check:GetChecked() == true then --Party leader
ChatConfigChatSettingsLeftCheckBox11Check:Click() ChatConfigChatSettingsLeftCheckBox11Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == true then --Raid if ChatConfigChatSettingsLeftCheckBox12Check:GetChecked() == true then --Raid
ChatConfigChatSettingsLeftCheckBox12Check:Click() ChatConfigChatSettingsLeftCheckBox12Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == true then --Raid leader if ChatConfigChatSettingsLeftCheckBox13Check:GetChecked() == true then --Raid leader
ChatConfigChatSettingsLeftCheckBox13Check:Click() ChatConfigChatSettingsLeftCheckBox13Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == true then --Raid Warning if ChatConfigChatSettingsLeftCheckBox14Check:GetChecked() == true then --Raid Warning
ChatConfigChatSettingsLeftCheckBox14Check:Click() ChatConfigChatSettingsLeftCheckBox14Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == true then --Instance if ChatConfigChatSettingsLeftCheckBox15Check:GetChecked() == true then --Instance
ChatConfigChatSettingsLeftCheckBox15Check:Click() ChatConfigChatSettingsLeftCheckBox15Check:Click()
end end
if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == true then --Instance leader if ChatConfigChatSettingsLeftCheckBox16Check:GetChecked() == true then --Instance leader
ChatConfigChatSettingsLeftCheckBox16Check:Click() ChatConfigChatSettingsLeftCheckBox16Check:Click()
end end
end end

View File

@@ -1,110 +1,110 @@
--COMBAT_LOG_EVENT_UNFILTERED --COMBAT_LOG_EVENT_UNFILTERED
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "SWING_DAMAGE" then if se == "SWING_DAMAGE" then
local dest = select(10, ...) local dest = select(10, ...)
if dest == UnitName("player") then if dest == UnitName("player") then
local bloq = select(17, ...) local bloq = select(17, ...)
if bloq then if bloq then
aura_env.dmgbloq = aura_env.dmgbloq + bloq aura_env.dmgbloq = aura_env.dmgbloq + bloq
aura_env.numbloq = aura_env.numbloq + 1 aura_env.numbloq = aura_env.numbloq + 1
aura_env.region.blocks:SetText(aura_env.numbloq) aura_env.region.blocks:SetText(aura_env.numbloq)
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq)) aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
end end
end end
elseif se == "SPELL_DAMAGE" then elseif se == "SPELL_DAMAGE" then
local dest = select(10, ...) local dest = select(10, ...)
if dest == UnitName("player") then if dest == UnitName("player") then
local bloq = select(20, ...) local bloq = select(20, ...)
if bloq then if bloq then
aura_env.dmgbloq = aura_env.dmgbloq + bloq aura_env.dmgbloq = aura_env.dmgbloq + bloq
aura_env.numbloq = aura_env.numbloq + 1 aura_env.numbloq = aura_env.numbloq + 1
aura_env.region.blocks:SetText(aura_env.numbloq) aura_env.region.blocks:SetText(aura_env.numbloq)
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq)) aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
end end
end end
elseif se == "SPELL_AURA_APPLIED" then elseif se == "SPELL_AURA_APPLIED" then
local dest = select(6, ...) local dest = select(6, ...)
if dest == UnitName("player") then if dest == UnitName("player") then
local name = select(14, ...) local name = select(14, ...)
if name == "Shield Block" or name == "Last Stand" then if name == "Shield Block" or name == "Last Stand" then
aura_env.numbloq = 0 aura_env.numbloq = 0
aura_env.dmgbloq = 0 aura_env.dmgbloq = 0
aura_env.region.blocks:SetText(aura_env.numbloq) aura_env.region.blocks:SetText(aura_env.numbloq)
aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq)) aura_env.region.damag:SetText(aura_env.color(aura_env.dmgbloq) .. aura_env.shorten(aura_env.dmgbloq))
end end
end end
end end
end end
--INIT --INIT
aura_env.numbloq = 0 aura_env.numbloq = 0
aura_env.dmgbloq = 0 aura_env.dmgbloq = 0
aura_env.color = function(damag) aura_env.color = function(damag)
local damagcolor = "|cFFFFFFFF" local damagcolor = "|cFFFFFFFF"
if damag <= 0.25 * UnitHealth("player") then damagcolor = "|cFFFF0000" if damag <= 0.25 * UnitHealth("player") then damagcolor = "|cFFFF0000"
elseif damag > 0.25 * UnitHealth("player") and damag <= 0.5 * UnitHealth("player") then damagcolor = "|cFFFF8000" elseif damag > 0.25 * UnitHealth("player") and damag <= 0.5 * UnitHealth("player") then damagcolor = "|cFFFF8000"
elseif damag > 0.5 * UnitHealth("player") and damag <= 0.75 * UnitHealth("player") then damagcolor = "|cFF00FF00" elseif damag > 0.5 * UnitHealth("player") and damag <= 0.75 * UnitHealth("player") then damagcolor = "|cFF00FF00"
elseif damag > 0.75 * UnitHealth("player") and damag <= UnitHealth("player") then damagcolor = "|cFF00FFFF" elseif damag > 0.75 * UnitHealth("player") and damag <= UnitHealth("player") then damagcolor = "|cFF00FFFF"
elseif damag > UnitHealth("player") and damag <= 1.33 * UnitHealth("player") then damagcolor = "|cFFFF00FF" elseif damag > UnitHealth("player") and damag <= 1.33 * UnitHealth("player") then damagcolor = "|cFFFF00FF"
elseif damag > 1.33 * UnitHealth("player") and damag <= 1.66 * UnitHealth("player") then damagcolor = "|cFFFFFF00" elseif damag > 1.33 * UnitHealth("player") and damag <= 1.66 * UnitHealth("player") then damagcolor = "|cFFFFFF00"
elseif damag > 1.66 * UnitHealth("player") then damagcolor = "|c" end elseif damag > 1.66 * UnitHealth("player") then damagcolor = "|c" end
return damagcolor return damagcolor
end end
local fontsize = 32 local fontsize = 32
if not aura_env.region.blocks then if not aura_env.region.blocks then
local text = aura_env.region:CreateFontString(nil, aura_env.region) local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.blocks = text aura_env.region.blocks = text
print("ok!") print("ok!")
end end
aura_env.region.blocks:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", fontsize, "OUTLINE") aura_env.region.blocks:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", fontsize, "OUTLINE")
aura_env.region.blocks:SetTextColor(1,1,1,1) aura_env.region.blocks:SetTextColor(1,1,1,1)
aura_env.region.blocks:SetPoint("CENTER", aura_env.region, "CENTER") aura_env.region.blocks:SetPoint("CENTER", aura_env.region, "CENTER")
aura_env.region.blocks:SetJustifyH("LEFT") aura_env.region.blocks:SetJustifyH("LEFT")
aura_env.region.blocks:SetText("0") aura_env.region.blocks:SetText("0")
aura_env.region.blocks:Show() aura_env.region.blocks:Show()
if not aura_env.region.damag then if not aura_env.region.damag then
local text = aura_env.region:CreateFontString(nil, aura_env.region) local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.damag = text aura_env.region.damag = text
print("ok!") print("ok!")
end end
aura_env.region.damag:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE") aura_env.region.damag:SetFont("Interface\\AddOns\\SharedMedia_MyMedia\\font\\FiraCode-Bold.ttf", 16, "OUTLINE")
aura_env.region.damag:SetTextColor(1,1,1,1) aura_env.region.damag:SetTextColor(1,1,1,1)
aura_env.region.damag:SetPoint("CENTER", aura_env.region, "CENTER", 0, -32) aura_env.region.damag:SetPoint("CENTER", aura_env.region, "CENTER", 0, -32)
aura_env.region.damag:SetJustifyH("LEFT") aura_env.region.damag:SetJustifyH("LEFT")
aura_env.region.damag:SetText("0") aura_env.region.damag:SetText("0")
aura_env.region.damag:Show() aura_env.region.damag:Show()
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val <= 1e3 then if val <= 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end
aura_env.auraID = function(spell) aura_env.auraID = function(spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitBuff("player", i) local name = UnitBuff("player", i)
if name then if name then
if name == spell then if name == spell then
return i return i
end end
else else
break break
end end
end end
end end

View File

@@ -1,54 +1,54 @@
--COMBAT_LOG_EVENT_UNFILTERED UPDATE REMOVE PLAYER_ALIVE --COMBAT_LOG_EVENT_UNFILTERED UPDATE REMOVE PLAYER_ALIVE
function(e, ...) function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...) local se = select(2, ...)
if se == "UNIT_DIED" then if se == "UNIT_DIED" then
local name = select(9, ...) local name = select(9, ...)
if name:match(aura_env.farmanimal) then if name:match(aura_env.farmanimal) then
local date = date() local date = date()
local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0 local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][#WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] + 1] = {["h"] = h, ["m"] = m, ["s"] = s} WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][#WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] + 1] = {["h"] = h, ["m"] = m, ["s"] = s}
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count + 1 WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count + 1
return true return true
end end
end end
elseif e == "UPDATE" then elseif e == "UPDATE" then
return true return true
elseif e == "REMOVE" then elseif e == "REMOVE" then
for i = 1, #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] do for i = 1, #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] do
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][i] = nil WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][i] = nil
end end
return true return true
elseif e == "PLAYER_ALIVE" and IsInInstance() == false then elseif e == "PLAYER_ALIVE" and IsInInstance() == false then
ResetInstances() ResetInstances()
return true return true
end end
end end
--DISPLAY --DISPLAY
function() function()
local output = #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count * aura_env.prob .. "%\n" local output = #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count .. " " .. WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count * aura_env.prob .. "%\n"
local date = date() local date = date()
local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0 local h, m, s = date:match("%w+ %w+ %d* (%d*)%:(%d*)%:(%d*)") or 0, 0, 0
for k,v in ipairs(WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal]) do for k,v in ipairs(WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal]) do
output = output .. v.h .. ":" .. v.m .. ":" .. v.s .. " -" .. aura_env.round((s - v.s + (m - v.m) * 60 + (h - v.h) * 3600) / 60, 0) .. "m" .. "\n" output = output .. v.h .. ":" .. v.m .. ":" .. v.s .. " -" .. aura_env.round((s - v.s + (m - v.m) * 60 + (h - v.h) * 3600) / 60, 0) .. "m" .. "\n"
end end
return output return output
end end
--INIT --INIT
aura_env.farmanimal = "Altairus" aura_env.farmanimal = "Altairus"
aura_env.prob = 0.8 aura_env.prob = 0.8
if not WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] then WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] = {}; WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = 0 end if not WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] then WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] = {}; WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count = 0 end
aura_env.ticker = C_Timer.NewTicker(10, function() WeakAuras.ScanEvents("UPDATE") end) aura_env.ticker = C_Timer.NewTicker(10, function() WeakAuras.ScanEvents("UPDATE") end)
if WeakAuras.IsOptionsOpen() then if WeakAuras.IsOptionsOpen() then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
end end
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end

View File

@@ -1,77 +1,77 @@
--EVERY FRAME --EVERY FRAME
function() function()
local crit, haste, mastery = aura_env.round(GetCritChance(), 2), aura_env.round(GetHaste(), 2), aura_env.round(GetMastery(), 2) local crit, haste, mastery = aura_env.round(GetCritChance(), 2), aura_env.round(GetHaste(), 2), aura_env.round(GetMastery(), 2)
aura_env.region.crit:SetText(crit); aura_env.region.haste:SetText(haste); aura_env.region.mastery:SetText(mastery) aura_env.region.crit:SetText(crit); aura_env.region.haste:SetText(haste); aura_env.region.mastery:SetText(mastery)
if crit >= 15 and crit < 20 then aura_env.region.crit:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1) if crit >= 15 and crit < 20 then aura_env.region.crit:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
elseif crit >= 20 and crit < 25 then aura_env.region.crit:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1) elseif crit >= 20 and crit < 25 then aura_env.region.crit:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
elseif crit >= 25 and crit < 30 then aura_env.region.crit:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1) elseif crit >= 25 and crit < 30 then aura_env.region.crit:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
elseif crit >= 30 and crit < 35 then aura_env.region.crit:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1) elseif crit >= 30 and crit < 35 then aura_env.region.crit:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
elseif crit >= 35 and crit < 40 then aura_env.region.crit:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1) elseif crit >= 35 and crit < 40 then aura_env.region.crit:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
elseif crit >= 40 then aura_env.region.crit:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1) elseif crit >= 40 then aura_env.region.crit:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
end end
if haste >= 10 and haste < 20 then aura_env.region.haste:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1) if haste >= 10 and haste < 20 then aura_env.region.haste:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
elseif haste >= 20 and haste < 30 then aura_env.region.haste:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1) elseif haste >= 20 and haste < 30 then aura_env.region.haste:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
elseif haste >= 30 and haste < 40 then aura_env.region.haste:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1) elseif haste >= 30 and haste < 40 then aura_env.region.haste:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
elseif haste >= 40 and haste < 50 then aura_env.region.haste:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1) elseif haste >= 40 and haste < 50 then aura_env.region.haste:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
elseif haste >= 50 and haste < 60 then aura_env.region.haste:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1) elseif haste >= 50 and haste < 60 then aura_env.region.haste:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
elseif haste >= 60 then aura_env.region.haste:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1) elseif haste >= 60 then aura_env.region.haste:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
end end
if mastery >= 15 and mastery < 20 then aura_env.region.mastery:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1) if mastery >= 15 and mastery < 20 then aura_env.region.mastery:SetTextColor(aura_env.c11, aura_env.c12, aura_env.c13, 1)
elseif mastery >= 20 and mastery < 25 then aura_env.region.mastery:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1) elseif mastery >= 20 and mastery < 25 then aura_env.region.mastery:SetTextColor(aura_env.c21, aura_env.c22, aura_env.c23, 1)
elseif mastery >= 25 and mastery < 35 then aura_env.region.mastery:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1) elseif mastery >= 25 and mastery < 35 then aura_env.region.mastery:SetTextColor(aura_env.c31, aura_env.c32, aura_env.c33, 1)
elseif mastery >= 35 and mastery < 40 then aura_env.region.mastery:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1) elseif mastery >= 35 and mastery < 40 then aura_env.region.mastery:SetTextColor(aura_env.c41, aura_env.c42, aura_env.c43, 1)
elseif mastery >= 40 and mastery < 45 then aura_env.region.mastery:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1) elseif mastery >= 40 and mastery < 45 then aura_env.region.mastery:SetTextColor(aura_env.c51, aura_env.c52, aura_env.c53, 1)
elseif mastery >= 45 then aura_env.region.mastery:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1) elseif mastery >= 45 then aura_env.region.mastery:SetTextColor(aura_env.c61, aura_env.c62, aura_env.c63, 1)
end end
return "Crit\nHaste\nMastery" return "Crit\nHaste\nMastery"
end end
--INIT --INIT
local font, size, flags = aura_env.region.text:GetFont() local font, size, flags = aura_env.region.text:GetFont()
if not aura_env.region.crit then if not aura_env.region.crit then
local crit = aura_env.region:CreateFontString(nil, aura_env.region) local crit = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.crit = crit aura_env.region.crit = crit
print("ok!") print("ok!")
end end
aura_env.region.crit:SetFont(font, size, flags) aura_env.region.crit:SetFont(font, size, flags)
aura_env.region.crit:SetTextColor(1,1,1,1) aura_env.region.crit:SetTextColor(1,1,1,1)
aura_env.region.crit:SetPoint("RIGHT", aura_env.region, "CENTER", 96, size) aura_env.region.crit:SetPoint("RIGHT", aura_env.region, "CENTER", 96, size)
aura_env.region.crit:SetJustifyH("RIGHT") aura_env.region.crit:SetJustifyH("RIGHT")
aura_env.region.crit:SetText("11111111") aura_env.region.crit:SetText("11111111")
aura_env.region.crit:Show() aura_env.region.crit:Show()
if not aura_env.region.haste then if not aura_env.region.haste then
local haste = aura_env.region:CreateFontString(nil, aura_env.region) local haste = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.haste = haste aura_env.region.haste = haste
print("ok!") print("ok!")
end end
aura_env.region.haste:SetFont(font, size, flags) aura_env.region.haste:SetFont(font, size, flags)
aura_env.region.haste:SetTextColor(1,1,1,1) aura_env.region.haste:SetTextColor(1,1,1,1)
aura_env.region.haste:SetPoint("RIGHT", aura_env.region, "CENTER", 96, 0) aura_env.region.haste:SetPoint("RIGHT", aura_env.region, "CENTER", 96, 0)
aura_env.region.haste:SetJustifyH("RIGHT") aura_env.region.haste:SetJustifyH("RIGHT")
aura_env.region.haste:SetText("22222222") aura_env.region.haste:SetText("22222222")
aura_env.region.haste:Show() aura_env.region.haste:Show()
if not aura_env.region.mastery then if not aura_env.region.mastery then
local mastery = aura_env.region:CreateFontString(nil, aura_env.region) local mastery = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.mastery = mastery aura_env.region.mastery = mastery
print("ok!") print("ok!")
end end
aura_env.region.mastery:SetFont(font, size, flags) aura_env.region.mastery:SetFont(font, size, flags)
aura_env.region.mastery:SetTextColor(1,1,1,1) aura_env.region.mastery:SetTextColor(1,1,1,1)
aura_env.region.mastery:SetPoint("RIGHT", aura_env.region, "CENTER", 96, - size) aura_env.region.mastery:SetPoint("RIGHT", aura_env.region, "CENTER", 96, - size)
aura_env.region.mastery:SetJustifyH("RIGHT") aura_env.region.mastery:SetJustifyH("RIGHT")
aura_env.region.mastery:SetText("33333333") aura_env.region.mastery:SetText("33333333")
aura_env.region.mastery:Show() aura_env.region.mastery:Show()
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
aura_env.c11, aura_env.c12, aura_env.c13 = 1, 0, 0 aura_env.c11, aura_env.c12, aura_env.c13 = 1, 0, 0
aura_env.c21, aura_env.c22, aura_env.c23 = 1, 0.5, 0 aura_env.c21, aura_env.c22, aura_env.c23 = 1, 0.5, 0
aura_env.c31, aura_env.c32, aura_env.c33 = 0, 1, 0 aura_env.c31, aura_env.c32, aura_env.c33 = 0, 1, 0
aura_env.c41, aura_env.c42, aura_env.c43 = 0, 1, 1 aura_env.c41, aura_env.c42, aura_env.c43 = 0, 1, 1
aura_env.c51, aura_env.c52, aura_env.c53 = 1, 0, 1 aura_env.c51, aura_env.c52, aura_env.c53 = 1, 0, 1
aura_env.c61, aura_env.c62, aura_env.c63 = 1, 1, 0 aura_env.c61, aura_env.c62, aura_env.c63 = 1, 1, 0

View File

@@ -1,160 +1,160 @@
--COMBAT_LOG_EVENT_UNFILTERED RESET GROUP_ROSTER_UPDATE --COMBAT_LOG_EVENT_UNFILTERED RESET GROUP_ROSTER_UPDATE
function(...) function(...)
local e = select(1, ...) local e = select(1, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(3, ...) local se = select(3, ...)
if se == "SPELL_CAST_SUCCESS" then if se == "SPELL_CAST_SUCCESS" then
local caster = select(6, ...) local caster = select(6, ...)
if UnitName(caster) then if UnitName(caster) then
if UnitInParty(caster) or UnitName(caster) == UnitName("player") then if UnitInParty(caster) or UnitName(caster) == UnitName("player") then
local spell = select(14, ...) local spell = select(14, ...)
if aura_env.spells[spell] then if aura_env.spells[spell] then
caster = caster:gsub("%-.+", "") caster = caster:gsub("%-.+", "")
caster = caster:gsub(" ", "") caster = caster:gsub(" ", "")
if not aura_env.stuns[caster] then aura_env.stuns[caster] = 1 else aura_env.stuns[caster] = aura_env.stuns[caster] + 1 end if not aura_env.stuns[caster] then aura_env.stuns[caster] = 1 else aura_env.stuns[caster] = aura_env.stuns[caster] + 1 end
local output1, output2 = "", "" local output1, output2 = "", ""
for k,v in pairs(aura_env.stuns) do for k,v in pairs(aura_env.stuns) do
local class = UnitClass(k) or "" local class = UnitClass(k) or ""
output1 = output1 .. aura_env.classColor(class) .. k .. "|r\n" output1 = output1 .. aura_env.classColor(class) .. k .. "|r\n"
output2 = output2 .. aura_env.classColor(class) .. v .. "|r\n" output2 = output2 .. aura_env.classColor(class) .. v .. "|r\n"
end end
aura_env.region.text2:SetText(output1) aura_env.region.text2:SetText(output1)
aura_env.region.text3:SetText(output2) aura_env.region.text3:SetText(output2)
end end
end end
end end
end end
elseif e == "GROUP_ROSTER_UPDATE" then elseif e == "GROUP_ROSTER_UPDATE" then
aura_env.stuns = nil aura_env.stuns = nil
aura_env.stuns = {} aura_env.stuns = {}
aura_env.region.text2:SetText("") aura_env.region.text2:SetText("")
aura_env.region.text3:SetText("") aura_env.region.text3:SetText("")
elseif e == "RESET" then elseif e == "RESET" then
aura_env.stuns = nil aura_env.stuns = nil
aura_env.stuns = {} aura_env.stuns = {}
aura_env.region.text2:SetText("") aura_env.region.text2:SetText("")
aura_env.region.text3:SetText("") aura_env.region.text3:SetText("")
end end
end end
--INIT --INIT
if not aura_env.region.text2 then if not aura_env.region.text2 then
local text2 = aura_env.region:CreateFontString(nil, "OVERLAY") local text2 = aura_env.region:CreateFontString(nil, "OVERLAY")
aura_env.region.text2 = text2 aura_env.region.text2 = text2
end end
aura_env.region.text2:SetFont(aura_env.region.text:GetFont()) aura_env.region.text2:SetFont(aura_env.region.text:GetFont())
aura_env.region.text2:SetTextColor(1,1,1,1) aura_env.region.text2:SetTextColor(1,1,1,1)
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0) aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
aura_env.region.text2:SetJustifyH("LEFT") aura_env.region.text2:SetJustifyH("LEFT")
aura_env.region.text2:SetText("") aura_env.region.text2:SetText("")
aura_env.region.text2:Show() aura_env.region.text2:Show()
if not aura_env.region.text3 then if not aura_env.region.text3 then
local text3 = aura_env.region:CreateFontString(nil, "OVERLAY") local text3 = aura_env.region:CreateFontString(nil, "OVERLAY")
aura_env.region.text3 = text3 aura_env.region.text3 = text3
end end
aura_env.region.text3:SetFont(aura_env.region.text:GetFont()) aura_env.region.text3:SetFont(aura_env.region.text:GetFont())
aura_env.region.text3:SetTextColor(1,1,1,1) aura_env.region.text3:SetTextColor(1,1,1,1)
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", 100, 0) aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", 100, 0)
aura_env.region.text3:SetJustifyH("LEFT") aura_env.region.text3:SetJustifyH("LEFT")
aura_env.region.text3:SetText("") aura_env.region.text3:SetText("")
aura_env.region.text3:Show() aura_env.region.text3:Show()
aura_env.stuns = {} aura_env.stuns = {}
aura_env.spells = aura_env.spells =
{ {
--DK --DK
["Asphyxiate"] = 1, ["Asphyxiate"] = 1,
["Gnaw"] = 1, ["Gnaw"] = 1,
["Monstrous Blow"] = 1, ["Monstrous Blow"] = 1,
["Blinding Sleet"] = 1, ["Blinding Sleet"] = 1,
["Death Grip"] = 1, ["Death Grip"] = 1,
["Gorefiend's Grasp"] = 1, ["Gorefiend's Grasp"] = 1,
["Mind Freeze"] = 1, ["Mind Freeze"] = 1,
["Shambling Rush"] = 1, ["Shambling Rush"] = 1,
--DH --DH
["Chaos Nova"] = 1, ["Chaos Nova"] = 1,
["Fel Eruption"] = 1, ["Fel Eruption"] = 1,
["Sigil of Misery"] = 1, ["Sigil of Misery"] = 1,
["Sigil of Chains"] = 1, ["Sigil of Chains"] = 1,
["Disrupt"] = 1, ["Disrupt"] = 1,
--Druid --Druid
["Maim"] = 1, ["Maim"] = 1,
["Mighty Bash"] = 1, ["Mighty Bash"] = 1,
["Rake"] = 1, ["Rake"] = 1,
["Typhoon"] = 1, ["Typhoon"] = 1,
["Ursol's Vortex"] = 1, ["Ursol's Vortex"] = 1,
["Skull Bash"] = 1, ["Skull Bash"] = 1,
--Hunter --Hunter
["Intimidation"] = 1, ["Intimidation"] = 1,
["Bursting Shot"] = 1, ["Bursting Shot"] = 1,
["Muzzle"] = 1, ["Muzzle"] = 1,
["Counter Shot"] = 1, ["Counter Shot"] = 1,
--Monk --Monk
["Leg Sweep"] = 1, ["Leg Sweep"] = 1,
["Song of Chi-ji"] = 1, ["Song of Chi-ji"] = 1,
["Ring of Peace"] = 1, ["Ring of Peace"] = 1,
["Spear Hand Strike"] = 1, ["Spear Hand Strike"] = 1,
--Mage --Mage
["Dragon's Breath"] = 1, ["Dragon's Breath"] = 1,
["Blast Wave"] = 1, ["Blast Wave"] = 1,
["Supernova"] = 1, ["Supernova"] = 1,
--Paladin --Paladin
["Hammer of Justice"] = 1, ["Hammer of Justice"] = 1,
["Blinding Light"] = 1, ["Blinding Light"] = 1,
["Avenger's Shield"] = 1, ["Avenger's Shield"] = 1,
["Rebuke"] = 1, ["Rebuke"] = 1,
--Priest --Priest
["Holy Word: Chastise"] = 1, ["Holy Word: Chastise"] = 1,
["Psychic Horror"] = 1, ["Psychic Horror"] = 1,
["Mind Bomb"] = 1, ["Mind Bomb"] = 1,
["Psychic Scream"] = 1, ["Psychic Scream"] = 1,
["Silence"] = 1, ["Silence"] = 1,
--Rogue --Rogue
["Between the Eyes"] = 1, ["Between the Eyes"] = 1,
["Cheap Shot"] = 1, ["Cheap Shot"] = 1,
["Kidney Shot"] = 1, ["Kidney Shot"] = 1,
["Blind"] = 1, ["Blind"] = 1,
["Kick"] = 1, ["Kick"] = 1,
--Shaman --Shaman
["Capacitor Totem"] = 1, ["Capacitor Totem"] = 1,
["Pulverize"] = 1, ["Pulverize"] = 1,
["Thunderstorm"] = 1, ["Thunderstorm"] = 1,
["Wind Shear"] = 1, ["Wind Shear"] = 1,
--Warlock --Warlock
["Axe Toss"] = 1, ["Axe Toss"] = 1,
["Shadowfury"] = 1, ["Shadowfury"] = 1,
["Summon Infernal"] = 1, ["Summon Infernal"] = 1,
["Seduction"] = 1, ["Seduction"] = 1,
["Spell Lock"] = 1, ["Spell Lock"] = 1,
--Warrior --Warrior
["Shockwave"] = 1, ["Shockwave"] = 1,
["Storm Bolt"] = 1, ["Storm Bolt"] = 1,
["Intimidating Shout"] = 1, ["Intimidating Shout"] = 1,
["Pummel"] = 1, ["Pummel"] = 1,
} }
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == "Death Knight" then return "|cFFC41F3B" elseif if class == "Death Knight" then return "|cFFC41F3B" elseif
class == "Demon Hunter" then return "|cFFA330C9" elseif class == "Demon Hunter" then return "|cFFA330C9" elseif
class == "Druid" then return "|cFFFF7D0A" elseif class == "Druid" then return "|cFFFF7D0A" elseif
class == "Hunter" then return "|cFFABD473" elseif class == "Hunter" then return "|cFFABD473" elseif
class == "Mage" then return "|cFF40C7EB" elseif class == "Mage" then return "|cFF40C7EB" elseif
class == "Monk" then return "|cFF00FF96" elseif class == "Monk" then return "|cFF00FF96" elseif
class == "Paladin" then return "|cFFF58CBA" elseif class == "Paladin" then return "|cFFF58CBA" elseif
class == "Priest" then return "|cFFFFFFFF" elseif class == "Priest" then return "|cFFFFFFFF" elseif
class == "Rogue" then return "|cFFFFF569" elseif class == "Rogue" then return "|cFFFFF569" elseif
class == "Shaman" then return "|cFF0070DE" elseif class == "Shaman" then return "|cFF0070DE" elseif
class == "Warlock" then return "|cFF8787ED" elseif class == "Warlock" then return "|cFF8787ED" elseif
class == "Warrior" then return "|cFFC79C6E" else class == "Warrior" then return "|cFFC79C6E" else
return "|cFFFFFFFF" end return "|cFFFFFFFF" end
end end

View File

@@ -1,137 +1,137 @@
--CLEU --CLEU
function(...) function(...)
local se = select(3, ...) local se = select(3, ...)
if se == "SPELL_CAST_SUCCESS" then if se == "SPELL_CAST_SUCCESS" then
local spell = select(14, ...) local spell = select(14, ...)
if aura_env.spells[spell] then if aura_env.spells[spell] then
local caster = select(6, ...) local caster = select(6, ...)
caster = caster:gsub("%-.+", "") caster = caster:gsub("%-.+", "")
caster = caster:gsub(" ", "") caster = caster:gsub(" ", "")
if #aura_env.stuns == 5 then if #aura_env.stuns == 5 then
table.remove(aura_env.stuns, 1) table.remove(aura_env.stuns, 1)
table.insert(aura_env.stuns, caster .. " - " .. spell) table.insert(aura_env.stuns, caster .. " - " .. spell)
else else
table.insert(aura_env.stuns, caster .. " - " .. spell) table.insert(aura_env.stuns, caster .. " - " .. spell)
end end
local output = "" local output = ""
for k,v in ipairs(aura_env.stuns) do for k,v in ipairs(aura_env.stuns) do
local name = v:match("(.-) ") local name = v:match("(.-) ")
local class = UnitClass(name) or "" local class = UnitClass(name) or ""
output = output .. aura_env.classColor(class) .. v .. "|r\n" output = output .. aura_env.classColor(class) .. v .. "|r\n"
end end
aura_env.region.text2:SetText(output) aura_env.region.text2:SetText(output)
aura_env.region.text2:Show() aura_env.region.text2:Show()
end end
end end
end end
--INIT --INIT
if not aura_env.region.text2 then if not aura_env.region.text2 then
local text2 = aura_env.region:CreateFontString(nil, "OVERLAY") local text2 = aura_env.region:CreateFontString(nil, "OVERLAY")
aura_env.region.text2 = text2 aura_env.region.text2 = text2
end end
aura_env.region.text2:SetFont(aura_env.region.text:GetFont()) aura_env.region.text2:SetFont(aura_env.region.text:GetFont())
aura_env.region.text2:SetTextColor(1,1,1,1) aura_env.region.text2:SetTextColor(1,1,1,1)
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0) aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", 0, 0)
aura_env.region.text2:SetJustifyH("CENTER") aura_env.region.text2:SetJustifyH("CENTER")
aura_env.region.text2:SetText("") aura_env.region.text2:SetText("")
aura_env.region.text2:Show() aura_env.region.text2:Show()
aura_env.stuns = {} aura_env.stuns = {}
aura_env.spells = aura_env.spells =
{ {
--DK --DK
["Asphyxiate"] = 1, ["Asphyxiate"] = 1,
["Gnaw"] = 1, ["Gnaw"] = 1,
["Monstrous Blow"] = 1, ["Monstrous Blow"] = 1,
["Blinding Sleet"] = 1, ["Blinding Sleet"] = 1,
["Death Grip"] = 1, ["Death Grip"] = 1,
["Gorefiend's Grasp"] = 1, ["Gorefiend's Grasp"] = 1,
["Mind Freeze"] = 1, ["Mind Freeze"] = 1,
["Shambling Rush"] = 1, ["Shambling Rush"] = 1,
--DH --DH
["Chaos Nova"] = 1, ["Chaos Nova"] = 1,
["Fel Eruption"] = 1, ["Fel Eruption"] = 1,
["Sigil of Misery"] = 1, ["Sigil of Misery"] = 1,
["Sigil of Chains"] = 1, ["Sigil of Chains"] = 1,
["Disrupt"] = 1, ["Disrupt"] = 1,
--Druid --Druid
["Maim"] = 1, ["Maim"] = 1,
["Mighty Bash"] = 1, ["Mighty Bash"] = 1,
["Rake"] = 1, ["Rake"] = 1,
["Typhoon"] = 1, ["Typhoon"] = 1,
["Ursol's Vortex"] = 1, ["Ursol's Vortex"] = 1,
["Skull Bash"] = 1, ["Skull Bash"] = 1,
--Hunter --Hunter
["Intimidation"] = 1, ["Intimidation"] = 1,
["Bursting Shot"] = 1, ["Bursting Shot"] = 1,
["Muzzle"] = 1, ["Muzzle"] = 1,
["Counter Shot"] = 1, ["Counter Shot"] = 1,
--Monk --Monk
["Leg Sweep"] = 1, ["Leg Sweep"] = 1,
["Song of Chi-ji"] = 1, ["Song of Chi-ji"] = 1,
["Ring of Peace"] = 1, ["Ring of Peace"] = 1,
["Spear Hand Strike"] = 1, ["Spear Hand Strike"] = 1,
--Mage --Mage
["Dragon's Breath"] = 1, ["Dragon's Breath"] = 1,
["Blast Wave"] = 1, ["Blast Wave"] = 1,
["Supernova"] = 1, ["Supernova"] = 1,
--Paladin --Paladin
["Hammer of Justice"] = 1, ["Hammer of Justice"] = 1,
["Blinding Light"] = 1, ["Blinding Light"] = 1,
["Avenger's Shield"] = 1, ["Avenger's Shield"] = 1,
["Rebuke"] = 1, ["Rebuke"] = 1,
--Priest --Priest
["Holy Word: Chastise"] = 1, ["Holy Word: Chastise"] = 1,
["Psychic Horror"] = 1, ["Psychic Horror"] = 1,
["Mind Bomb"] = 1, ["Mind Bomb"] = 1,
["Psychic Scream"] = 1, ["Psychic Scream"] = 1,
["Silence"] = 1, ["Silence"] = 1,
--Rogue --Rogue
["Between the Eyes"] = 1, ["Between the Eyes"] = 1,
["Cheap Shot"] = 1, ["Cheap Shot"] = 1,
["Kidney Shot"] = 1, ["Kidney Shot"] = 1,
["Blind"] = 1, ["Blind"] = 1,
["Kick"] = 1, ["Kick"] = 1,
--Shaman --Shaman
["Capacitor Totem"] = 1, ["Capacitor Totem"] = 1,
["Pulverize"] = 1, ["Pulverize"] = 1,
["Thunderstorm"] = 1, ["Thunderstorm"] = 1,
["Wind Shear"] = 1, ["Wind Shear"] = 1,
--Warlock --Warlock
["Axe Toss"] = 1, ["Axe Toss"] = 1,
["Shadowfury"] = 1, ["Shadowfury"] = 1,
["Summon Infernal"] = 1, ["Summon Infernal"] = 1,
["Seduction"] = 1, ["Seduction"] = 1,
["Spell Lock"] = 1, ["Spell Lock"] = 1,
--Warrior --Warrior
["Shockwave"] = 1, ["Shockwave"] = 1,
["Storm Bolt"] = 1, ["Storm Bolt"] = 1,
["Intimidating Shout"] = 1, ["Intimidating Shout"] = 1,
["Pummel"] = 1, ["Pummel"] = 1,
} }
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == "Death Knight" then return "|cFFC41F3B" elseif if class == "Death Knight" then return "|cFFC41F3B" elseif
class == "Demon Hunter" then return "|cFFA330C9" elseif class == "Demon Hunter" then return "|cFFA330C9" elseif
class == "Druid" then return "|cFFFF7D0A" elseif class == "Druid" then return "|cFFFF7D0A" elseif
class == "Hunter" then return "|cFFABD473" elseif class == "Hunter" then return "|cFFABD473" elseif
class == "Mage" then return "|cFF40C7EB" elseif class == "Mage" then return "|cFF40C7EB" elseif
class == "Monk" then return "|cFF00FF96" elseif class == "Monk" then return "|cFF00FF96" elseif
class == "Paladin" then return "|cFFF58CBA" elseif class == "Paladin" then return "|cFFF58CBA" elseif
class == "Priest" then return "|cFFFFFFFF" elseif class == "Priest" then return "|cFFFFFFFF" elseif
class == "Rogue" then return "|cFFFFF569" elseif class == "Rogue" then return "|cFFFFF569" elseif
class == "Shaman" then return "|cFF0070DE" elseif class == "Shaman" then return "|cFF0070DE" elseif
class == "Warlock" then return "|cFF8787ED" elseif class == "Warlock" then return "|cFF8787ED" elseif
class == "Warrior" then return "|cFFC79C6E" else class == "Warrior" then return "|cFFC79C6E" else
return "|cFFFFFFFF" end return "|cFFFFFFFF" end
end end

View File

@@ -1,106 +1,106 @@
--UNIT_HEALTH NAME_PLATE_UNIT_REMOVED NAME_PLATE_UNIT_ADDED UNIT_THREAT_LIST_UPDATE PLAYER_TARGET_CHANGED --UNIT_HEALTH NAME_PLATE_UNIT_REMOVED NAME_PLATE_UNIT_ADDED UNIT_THREAT_LIST_UPDATE PLAYER_TARGET_CHANGED
function(allstates, e, u) function(allstates, e, u)
if e == "PLAYER_TARGET_CHANGED" then if e == "PLAYER_TARGET_CHANGED" then
return true return true
elseif e == "UNIT_HEALTH" or e == "UNIT_THREAT_LIST_UPDATE" then elseif e == "UNIT_HEALTH" or e == "UNIT_THREAT_LIST_UPDATE" then
if u then if u then
print(UnitDetailedThreatSituation("player", u)) print(UnitDetailedThreatSituation("player", u))
if UnitExists(u) and u:match("nameplate") and UnitDetailedThreatSituation("player", u) then if UnitExists(u) and u:match("nameplate") and UnitDetailedThreatSituation("player", u) then
local threat = select(5, UnitDetailedThreatSituation("player", u)) local threat = select(5, UnitDetailedThreatSituation("player", u))
local tank = UnitDetailedThreatSituation("player", u) local tank = UnitDetailedThreatSituation("player", u)
local hp = UnitHealth(u) local hp = UnitHealth(u)
local maxhp = UnitHealthMax(u) local maxhp = UnitHealthMax(u)
local php = aura_env.round((hp / maxhp) * 100, 1) local php = aura_env.round((hp / maxhp) * 100, 1)
local name = UnitName(u) local name = UnitName(u)
local target = false local target = false
if UnitIsUnit(u, "target") then target = true end if UnitIsUnit(u, "target") then target = true end
allstates[u] = allstates[u] =
{ {
show = true, show = true,
changed = true, changed = true,
name = name, name = name,
unit = u, unit = u,
value = hp, value = hp,
total = maxhp, total = maxhp,
index = php, index = php,
shp = aura_env.shorten(hp), shp = aura_env.shorten(hp),
tank = tank, tank = tank,
target = target, target = target,
resort = true, resort = true,
progressType = "static", progressType = "static",
} }
return true return true
end end
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" then elseif e == "NAME_PLATE_UNIT_REMOVED" then
if allstates[u] then allstates[u].changed = true; allstates[u].show = false; return true end if allstates[u] then allstates[u].changed = true; allstates[u].show = false; return true end
elseif e == "NAME_PLATE_UNIT_ADDED" then elseif e == "NAME_PLATE_UNIT_ADDED" then
if not allstates[u] then if not allstates[u] then
if u then if u then
if UnitExists(u) and UnitDetailedThreatSituation("player", u) then if UnitExists(u) and UnitDetailedThreatSituation("player", u) then
local threat = select(5, UnitDetailedThreatSituation("player", u)) local threat = select(5, UnitDetailedThreatSituation("player", u))
local tank = UnitDetailedThreatSituation("player", u) local tank = UnitDetailedThreatSituation("player", u)
local hp = UnitHealth(u) local hp = UnitHealth(u)
local maxhp = UnitHealthMax(u) local maxhp = UnitHealthMax(u)
local php = aura_env.round((hp / maxhp) * 100, 1) local php = aura_env.round((hp / maxhp) * 100, 1)
local name = UnitName(u) local name = UnitName(u)
local target = false local target = false
if UnitIsUnit(u, "target") then target = true end if UnitIsUnit(u, "target") then target = true end
allstates[u] = allstates[u] =
{ {
show = true, show = true,
changed = true, changed = true,
name = name, name = name,
unit = u, unit = u,
value = hp, value = hp,
total = maxhp, total = maxhp,
index = php, index = php,
shp = aura_env.shorten(hp), shp = aura_env.shorten(hp),
tank = tank, tank = tank,
target = target, target = target,
resort = true, resort = true,
progressType = "static", progressType = "static",
} }
return true return true
end end
end end
end end
end end
end end
--ADDITIONAL INFO --ADDITIONAL INFO
{ {
tank = "bool", tank = "bool",
target = "bool", target = "bool",
index = "number", index = "number",
} }
--INIT --INIT
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end

View File

@@ -1,121 +1,121 @@
--TSU --TSU
--UNIT_HEALTH NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED --UNIT_HEALTH NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(allstates) function(allstates)
for _,v in pairs(allstates) do for _,v in pairs(allstates) do
v.show = false v.show = false
v.changed = true v.changed = true
end end
for i = 1, 40 do for i = 1, 40 do
local unit = "nameplate" .. i local unit = "nameplate" .. i
if UnitExists(unit) then if UnitExists(unit) then
if UnitIsPlayer(unit) then if UnitIsPlayer(unit) then
print("3", unit) print("3", unit)
if UnitIsEnemy("player", unit) then if UnitIsEnemy("player", unit) then
print("4", unit) print("4", unit)
local hp = UnitHealth(unit) local hp = UnitHealth(unit)
local maxHp = UnitHealthMax(unit) local maxHp = UnitHealthMax(unit)
local hppp = aura_env.round(hp / maxHp * 100, 2) local hppp = aura_env.round(hp / maxHp * 100, 2)
local shortHP = aura_env.shorten(hp) local shortHP = aura_env.shorten(hp)
local shortmaxHP = aura_env.shorten(maxHp) local shortmaxHP = aura_env.shorten(maxHp)
local name = UnitName(unit) local name = UnitName(unit)
local class = UnitClass(unit) local class = UnitClass(unit)
print(hp, maxHp, hppp, shortHP, shortmaxHP, name, class) print(hp, maxHp, hppp, shortHP, shortmaxHP, name, class)
allstates[unit] = allstates[unit] =
{ {
changed = true, changed = true,
show = true, show = true,
resort = true, resort = true,
progressType = "static", progressType = "static",
value = hp, value = hp,
total = maxHp, total = maxHp,
index = hppp, index = hppp,
name = name, name = name,
hppp = hppp, hppp = hppp,
shortHP = shortHP, shortHP = shortHP,
shortmaxHP = shortmaxHP, shortmaxHP = shortmaxHP,
class = class, class = class,
} }
end end
end end
else else
break break
end end
end end
return true return true
end end
--INIT --INIT
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == "Death Knight" then return 0.77, 0.12, 0.23, 1 elseif if class == "Death Knight" then return 0.77, 0.12, 0.23, 1 elseif
class == "Demon Hunter" then return 0.64, 0.19, 0.79, 1 elseif class == "Demon Hunter" then return 0.64, 0.19, 0.79, 1 elseif
class == "Druid" then return 1, 0.49, 0.04, 1 elseif class == "Druid" then return 1, 0.49, 0.04, 1 elseif
class == "Hunter" then return 0.67, 0.83, 0.45, 1 elseif class == "Hunter" then return 0.67, 0.83, 0.45, 1 elseif
class == "Mage" then return 0.25, 0.78, 0.92, 1 elseif class == "Mage" then return 0.25, 0.78, 0.92, 1 elseif
class == "Monk" then return 0, 1, 0.59, 1 elseif class == "Monk" then return 0, 1, 0.59, 1 elseif
class == "Paladin" then return 0.96, 0.55, 0.73, 1 elseif class == "Paladin" then return 0.96, 0.55, 0.73, 1 elseif
class == "Priest" then return 1, 1, 1, 1 elseif class == "Priest" then return 1, 1, 1, 1 elseif
class == "Rogue" then return 1, 0.96, 0.41, 1 elseif class == "Rogue" then return 1, 0.96, 0.41, 1 elseif
class == "Shaman" then return 0, 0.44, 0.87, 1 elseif class == "Shaman" then return 0, 0.44, 0.87, 1 elseif
class == "Warlock" then return 0.53, 0.53, 0.93, 1 elseif class == "Warlock" then return 0.53, 0.53, 0.93, 1 elseif
class == "Warrior" then return 0.78, 0.61, 0.43, 1 else class == "Warrior" then return 0.78, 0.61, 0.43, 1 else
return 1, 1, 1, 1 end return 1, 1, 1, 1 end
end end
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
aura_env.grad = function(c) aura_env.grad = function(c)
--c expected as [0, 1] --c expected as [0, 1]
if c > 0.5 then if c > 0.5 then
c = 1 - (2 * (c - 0.5)) c = 1 - (2 * (c - 0.5))
return c, 1, 0, 1 return c, 1, 0, 1
else else
c = c * 2 c = c * 2
return 1, c, 0, 1 return 1, c, 0, 1
end end
end end
aura_env.range = function(val, min, max, max2) aura_env.range = function(val, min, max, max2)
val = 1 - (((max - val) / (max - min)) * max2) val = 1 - (((max - val) / (max - min)) * max2)
return val return val
end end
--ANIMATION --ANIMATION
function() function()
if aura_env.state then if aura_env.statee then
-- print(aura_env.state.class) -- print(aura_env.state.class)
return aura_env.classColor(aura_env.state.class) return aura_env.classColor(aura_env.statee.class)
end end
end end

View File

@@ -1,58 +1,58 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED REMOVE_UNIT --NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED REMOVE_UNIT
function(allstates, e, unit) function(allstates, e, unit)
if e == "NAME_PLATE_UNIT_ADDED" and unit then if e == "NAME_PLATE_UNIT_ADDED" and unit then
if UnitIsPlayer(unit) then if UnitIsPlayer(unit) then
if UnitIsEnemy("player", unit) then if UnitIsEnemy("player", unit) then
local _, _, class = UnitClass(unit) local _, _, class = UnitClass(unit)
allstates[unit] = allstates[unit] =
{ {
changed = true, changed = true,
show = true, show = true,
unit = unit, unit = unit,
class = class, class = class,
} }
return true return true
end end
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" and unit then elseif e == "NAME_PLATE_UNIT_REMOVED" and unit then
if allstates[unit] then if allstates[unit] then
local LCG = LibStub("LibCustomGlow-1.0") local LCG = LibStub("LibCustomGlow-1.0")
allstates[unit].show = false allstates[unit].show = false
allstates[unit].changed = true allstates[unit].changed = true
local nameplate = C_NamePlate.GetNamePlateForUnit(unit) local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Stop(nameplate) LCG.PixelGlow_Stop(nameplate)
return true return true
end end
elseif e == "REMOVE_UNIT" then elseif e == "REMOVE_UNIT" then
if allstates[unit] then if allstates[unit] then
allstates[unit].show = false allstates[unit].show = false
allstates[unit].changed = true allstates[unit].changed = true
return true return true
end end
end end
end end
--ON SHOW --ON SHOW
local LCG = LibStub("LibCustomGlow-1.0") local LCG = LibStub("LibCustomGlow-1.0")
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit) local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.statee.unit)
local aura_env = aura_env local aura_env = aura_env
local unit = aura_env.state.unit local unit = aura_env.statee.unit
LCG.PixelGlow_Start(nameplate, {aura_env.classColor(aura_env.state.class)}, nil, 0, 8, 4, 0, -4) LCG.PixelGlow_Start(nameplate, {aura_env.classColor(aura_env.statee.class)}, nil, 0, 8, 4, 0, -4)
C_Timer.After(4, function() WeakAuras.ScanEvents("REMOVE_UNIT", unit); LCG.PixelGlow_Stop(nameplate) end) C_Timer.After(4, function() WeakAuras.ScanEvents("REMOVE_UNIT", unit); LCG.PixelGlow_Stop(nameplate) end)
--INIT --INIT
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == 1 then return 0.78, 0.61, 0.43, 1 elseif if class == 1 then return 0.78, 0.61, 0.43, 1 elseif
class == 2 then return 0.96, 0.55, 0.73, 1 elseif class == 2 then return 0.96, 0.55, 0.73, 1 elseif
class == 3 then return 0.67, 0.83, 0.45, 1 elseif class == 3 then return 0.67, 0.83, 0.45, 1 elseif
class == 4 then return 1, 0.96, 0.41, 1 elseif class == 4 then return 1, 0.96, 0.41, 1 elseif
class == 5 then return 1, 1, 1, 1 elseif class == 5 then return 1, 1, 1, 1 elseif
class == 6 then return 0.77, 0.12, 0.23, 1 elseif class == 6 then return 0.77, 0.12, 0.23, 1 elseif
class == 7 then return 0, 0.44, 0.87, 1 elseif class == 7 then return 0, 0.44, 0.87, 1 elseif
class == 8 then return 0.25, 0.78, 0.92, 1 elseif class == 8 then return 0.25, 0.78, 0.92, 1 elseif
class == 9 then return 0.53, 0.53, 0.93, 1 elseif class == 9 then return 0.53, 0.53, 0.93, 1 elseif
class == 10 then return 0, 1, 0.59, 1 elseif class == 10 then return 0, 1, 0.59, 1 elseif
class == 11 then return 1, 0.49, 0.04, 1 elseif class == 11 then return 1, 0.49, 0.04, 1 elseif
class == 12 then return 0.64, 0.19, 0.79, 1 else class == 12 then return 0.64, 0.19, 0.79, 1 else
return 1, 1, 1, 1 end return 1, 1, 1, 1 end
end end

View File

@@ -1,64 +1,64 @@
--BAG_UPDATE UPDATE --BAG_UPDATE UPDATE
function(allstates, e, id) function(allstates, e, id)
if e == "BAG_UPDATE" then if e == "BAG_UPDATE" then
if id then if id then
for i = 1, GetContainerNumSlots(id) do for i = 1, GetContainerNumSlots(id) do
local iid = GetContainerItemID(id, i) local iid = GetContainerItemID(id, i)
if aura_env.herbIDs[iid] then if aura_env.herbIDs[iid] then
local texture = select(1, GetContainerItemInfo(id, i)) local texture = select(1, GetContainerItemInfo(id, i))
local amount = GetItemCount(iid, false) local amount = GetItemCount(iid, false)
local bank = GetItemCount(iid, true) - amount local bank = GetItemCount(iid, true) - amount
allstates[iid] = allstates[iid] =
{ {
show = true, show = true,
changed = true, changed = true,
amount = amount, amount = amount,
bank = bank, bank = bank,
index = amount, index = amount,
icon = texture, icon = texture,
itemId = iid, itemId = iid,
resort = true, resort = true,
} }
return true return true
end end
end end
end end
elseif e == "UPDATE" then elseif e == "UPDATE" then
for i = 0, 4 do for i = 0, 4 do
for j = 1, GetContainerNumSlots(i) do for j = 1, GetContainerNumSlots(i) do
local iid = GetContainerItemID(i, j) local iid = GetContainerItemID(i, j)
if aura_env.herbIDs[iid] then if aura_env.herbIDs[iid] then
local texture = select(1, GetContainerItemInfo(i, j)) local texture = select(1, GetContainerItemInfo(i, j))
local amount = GetItemCount(iid, false) local amount = GetItemCount(iid, false)
local bank = GetItemCount(iid, true) - amount local bank = GetItemCount(iid, true) - amount
allstates[iid] = allstates[iid] =
{ {
show = true, show = true,
changed = true, changed = true,
amount = amount, amount = amount,
bank = bank, bank = bank,
index = amount, index = amount,
icon = texture, icon = texture,
itemId = iid, itemId = iid,
resort = true, resort = true,
} }
end end
end end
end end
return true return true
end end
end end
--INIT --INIT
aura_env.herbIDs = aura_env.herbIDs =
{ {
[168487] = "Zin'anthid", [168487] = "Zin'anthid",
[152511] = "Sea Stalk", [152511] = "Sea Stalk",
[152505] = "Riverbud", [152505] = "Riverbud",
[152506] = "Star Moss", [152506] = "Star Moss",
[152507] = "Akunda's Bite", [152507] = "Akunda's Bite",
[152508] = "Winter's Kiss", [152508] = "Winter's Kiss",
[152509] = "Siren's Pollen", [152509] = "Siren's Pollen",
[152510] = "Anchor Weed", [152510] = "Anchor Weed",
} }
WeakAuras.ScanEvents("UPDATE") WeakAuras.ScanEvents("UPDATE")

View File

@@ -1,371 +1,371 @@
--REMOVE_ITEM_SHOW ADD_ITEM_SHOW --REMOVE_ITEM_SHOW ADD_ITEM_SHOW
function(allstates, e, what, howmuch, looted) function(allstates, e, what, howmuch, looted)
if e == "ADD_ITEM_SHOW" then if e == "ADD_ITEM_SHOW" then
if what then if what then
--Get info about item --Get info about item
local icon = 0 local icon = 0
local name = GetItemInfo(what) local name = GetItemInfo(what)
--Save icon to databases --Save icon to databases
if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end
if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
--Get ID for tooltip --Get ID for tooltip
local indexid = #allstates + 1 local indexid = #allstates + 1
local ID local ID
if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end
allstates[indexid] = allstates[indexid] =
{ {
show = true, show = true,
changed = true, changed = true,
index = GetTime(), index = GetTime(),
resort = true, resort = true,
icon = icon, icon = icon,
name = what, name = what,
amount = howmuch, amount = howmuch,
looted = looted, looted = looted,
} }
if ID then if ID then
allstates[indexid].itemId = ID allstates[indexid].itemId = ID
end end
C_Timer.After(5, function() WeakAuras.ScanEvents("REMOVE_ITEM_SHOW", indexid) end) C_Timer.After(5, function() WeakAuras.ScanEvents("REMOVE_ITEM_SHOW", indexid) end)
return true return true
end end
elseif e == "REMOVE_ITEM_SHOW" then elseif e == "REMOVE_ITEM_SHOW" then
if allstates[what] then if allstates[what] then
allstates[what].show = false allstates[what].show = false
allstates[what].changed = true allstates[what].changed = true
return true return true
end end
end end
end end
--ON SHOW --ON SHOW
if aura_env.state.looted == true then if aura_env.statee.looted == true then
if not aura_env.region.texture then if not aura_env.region.texture then
local texture = aura_env.region:CreateTexture(nil, aura_env.region) local texture = aura_env.region:CreateTexture(nil, aura_env.region)
aura_env.region.texture = texture aura_env.region.texture = texture
end end
aura_env.region.texture:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\ok-icon.tga") aura_env.region.texture:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\ok-icon.tga")
aura_env.region.texture:ClearAllPoints() aura_env.region.texture:ClearAllPoints()
aura_env.region.texture:SetPoint("CENTER", aura_env.region, "CENTER") aura_env.region.texture:SetPoint("CENTER", aura_env.region, "CENTER")
aura_env.region.texture:Show() aura_env.region.texture:Show()
end end
--ON HIDE --ON HIDE
if aura_env.region.texture then aura_env.region.texture:Hide() end if aura_env.region.texture then aura_env.region.texture:Hide() end
--INIT --INIT
aura_env.skills = aura_env.skills =
{ {
--Warrior --Warrior
[1] = [1] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 0, ["Leather"] = 0,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 1, ["Plate"] = 1,
["Shields"] = 1, ["Shields"] = 1,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 1, ["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 1, ["Two-Handed Axes"] = 1,
["Bows"] = 1, ["Bows"] = 1,
["Guns"] = 1, ["Guns"] = 1,
["One-Handed Maces"] = 1, ["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 1, ["Two-Handed Maces"] = 1,
["Polearms"] = 1, ["Polearms"] = 1,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 1, ["Two-Handed Swords"] = 1,
["Warglaives"] = 1, ["Warglaives"] = 1,
["Staves"] = 1, ["Staves"] = 1,
["Fist Weapons"] = 1, ["Fist Weapons"] = 1,
["Daggers"] = 1, ["Daggers"] = 1,
["Crossbows"] = 1, ["Crossbows"] = 1,
["Wands"] = 0, ["Wands"] = 0,
}, },
--Paladin --Paladin
[2] = [2] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 0, ["Leather"] = 0,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 1, ["Plate"] = 1,
["Shields"] = 1, ["Shields"] = 1,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 1, ["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 1, ["Two-Handed Axes"] = 1,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 1, ["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 1, ["Two-Handed Maces"] = 1,
["Polearms"] = 1, ["Polearms"] = 1,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 1, ["Two-Handed Swords"] = 1,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 0, ["Staves"] = 0,
["Fist Weapons"] = 0, ["Fist Weapons"] = 0,
["Daggers"] = 0, ["Daggers"] = 0,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 0, ["Wands"] = 0,
}, },
--Hunter --Hunter
[3] = [3] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 0, ["Leather"] = 0,
["Mail"] = 1, ["Mail"] = 1,
["Plate"] = 0, ["Plate"] = 0,
["Shields"] = 0, ["Shields"] = 0,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 1, ["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 1, ["Two-Handed Axes"] = 1,
["Bows"] = 1, ["Bows"] = 1,
["Guns"] = 1, ["Guns"] = 1,
["One-Handed Maces"] = 0, ["One-Handed Maces"] = 0,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 1, ["Polearms"] = 1,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 1, ["Two-Handed Swords"] = 1,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 1, ["Staves"] = 1,
["Fist Weapons"] = 1, ["Fist Weapons"] = 1,
["Daggers"] = 1, ["Daggers"] = 1,
["Crossbows"] = 1, ["Crossbows"] = 1,
["Wands"] = 0, ["Wands"] = 0,
}, },
--Rogue --Rogue
[4] = [4] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 1, ["Leather"] = 1,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 0, ["Plate"] = 0,
["Shields"] = 0, ["Shields"] = 0,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 1, ["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 0, ["Two-Handed Axes"] = 0,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 1, ["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 0, ["Polearms"] = 0,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0, ["Two-Handed Swords"] = 0,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 0, ["Staves"] = 0,
["Fist Weapons"] = 1, ["Fist Weapons"] = 1,
["Daggers"] = 1, ["Daggers"] = 1,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 0, ["Wands"] = 0,
}, },
--Priest --Priest
[5] = [5] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 1, ["Cloth"] = 1,
["Leather"] = 0, ["Leather"] = 0,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 0, ["Plate"] = 0,
["Shields"] = 0, ["Shields"] = 0,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 0, ["One-Handed Axes"] = 0,
["Two-Handed Axes"] = 0, ["Two-Handed Axes"] = 0,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 1, ["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 0, ["Polearms"] = 0,
["One-Handed Swords"] = 0, ["One-Handed Swords"] = 0,
["Two-Handed Swords"] = 0, ["Two-Handed Swords"] = 0,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 1, ["Staves"] = 1,
["Fist Weapons"] = 0, ["Fist Weapons"] = 0,
["Daggers"] = 1, ["Daggers"] = 1,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 1, ["Wands"] = 1,
}, },
--Death Knight --Death Knight
[6] = [6] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 0, ["Leather"] = 0,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 1, ["Plate"] = 1,
["Shields"] = 0, ["Shields"] = 0,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 1, ["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 1, ["Two-Handed Axes"] = 1,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 1, ["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 1, ["Two-Handed Maces"] = 1,
["Polearms"] = 1, ["Polearms"] = 1,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 1, ["Two-Handed Swords"] = 1,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 0, ["Staves"] = 0,
["Fist Weapons"] = 0, ["Fist Weapons"] = 0,
["Daggers"] = 0, ["Daggers"] = 0,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 0, ["Wands"] = 0,
}, },
--Shaman --Shaman
[7] = [7] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 0, ["Leather"] = 0,
["Mail"] = 1, ["Mail"] = 1,
["Plate"] = 0, ["Plate"] = 0,
["Shields"] = 1, ["Shields"] = 1,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 1, ["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 0, ["Two-Handed Axes"] = 0,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 1, ["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 0, ["Polearms"] = 0,
["One-Handed Swords"] = 0, ["One-Handed Swords"] = 0,
["Two-Handed Swords"] = 0, ["Two-Handed Swords"] = 0,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 1, ["Staves"] = 1,
["Fist Weapons"] = 1, ["Fist Weapons"] = 1,
["Daggers"] = 1, ["Daggers"] = 1,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 0, ["Wands"] = 0,
}, },
--Mage --Mage
[8] = [8] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 1, ["Cloth"] = 1,
["Leather"] = 0, ["Leather"] = 0,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 0, ["Plate"] = 0,
["Shields"] = 0, ["Shields"] = 0,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 0, ["One-Handed Axes"] = 0,
["Two-Handed Axes"] = 0, ["Two-Handed Axes"] = 0,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 0, ["One-Handed Maces"] = 0,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 0, ["Polearms"] = 0,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0, ["Two-Handed Swords"] = 0,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 1, ["Staves"] = 1,
["Fist Weapons"] = 0, ["Fist Weapons"] = 0,
["Daggers"] = 1, ["Daggers"] = 1,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 1, ["Wands"] = 1,
}, },
--Warlock --Warlock
[9] = [9] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 1, ["Cloth"] = 1,
["Leather"] = 0, ["Leather"] = 0,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 0, ["Plate"] = 0,
["Shields"] = 0, ["Shields"] = 0,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 0, ["One-Handed Axes"] = 0,
["Two-Handed Axes"] = 0, ["Two-Handed Axes"] = 0,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 0, ["One-Handed Maces"] = 0,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 0, ["Polearms"] = 0,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0, ["Two-Handed Swords"] = 0,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 1, ["Staves"] = 1,
["Fist Weapons"] = 0, ["Fist Weapons"] = 0,
["Daggers"] = 1, ["Daggers"] = 1,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 1, ["Wands"] = 1,
}, },
--Monk --Monk
[10] = [10] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 1, ["Leather"] = 1,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 1, ["Plate"] = 1,
["Shields"] = 1, ["Shields"] = 1,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 1, ["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 0, ["Two-Handed Axes"] = 0,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 1, ["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 1, ["Polearms"] = 1,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0, ["Two-Handed Swords"] = 0,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 1, ["Staves"] = 1,
["Fist Weapons"] = 1, ["Fist Weapons"] = 1,
["Daggers"] = 0, ["Daggers"] = 0,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 0, ["Wands"] = 0,
}, },
--Druid --Druid
[11] = [11] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 1, ["Leather"] = 1,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 0, ["Plate"] = 0,
["Shields"] = 0, ["Shields"] = 0,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 0, ["One-Handed Axes"] = 0,
["Two-Handed Axes"] = 0, ["Two-Handed Axes"] = 0,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 1, ["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 1, ["Polearms"] = 1,
["One-Handed Swords"] = 0, ["One-Handed Swords"] = 0,
["Two-Handed Swords"] = 0, ["Two-Handed Swords"] = 0,
["Warglaives"] = 0, ["Warglaives"] = 0,
["Staves"] = 1, ["Staves"] = 1,
["Fist Weapons"] = 1, ["Fist Weapons"] = 1,
["Daggers"] = 1, ["Daggers"] = 1,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 0, ["Wands"] = 0,
}, },
--Demon Hunter --Demon Hunter
[12] = [12] =
{ {
--Armor Skills --Armor Skills
["Cloth"] = 0, ["Cloth"] = 0,
["Leather"] = 1, ["Leather"] = 1,
["Mail"] = 0, ["Mail"] = 0,
["Plate"] = 0, ["Plate"] = 0,
["Shields"] = 0, ["Shields"] = 0,
--Weapon Skills --Weapon Skills
["One-Handed Axes"] = 1, ["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 0, ["Two-Handed Axes"] = 0,
["Bows"] = 0, ["Bows"] = 0,
["Guns"] = 0, ["Guns"] = 0,
["One-Handed Maces"] = 0, ["One-Handed Maces"] = 0,
["Two-Handed Maces"] = 0, ["Two-Handed Maces"] = 0,
["Polearms"] = 0, ["Polearms"] = 0,
["One-Handed Swords"] = 1, ["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0, ["Two-Handed Swords"] = 0,
["Warglaives"] = 1, ["Warglaives"] = 1,
["Staves"] = 0, ["Staves"] = 0,
["Fist Weapons"] = 1, ["Fist Weapons"] = 1,
["Daggers"] = 0, ["Daggers"] = 0,
["Crossbows"] = 0, ["Crossbows"] = 0,
["Wands"] = 0, ["Wands"] = 0,
}, },
} }

View File

@@ -1,58 +1,58 @@
--CHAT_MSG_LOOT REMOVE_ITEM ADD_ITEM --CHAT_MSG_LOOT REMOVE_ITEM ADD_ITEM
function(allstates, e, msg, howmuch) function(allstates, e, msg, howmuch)
if e == "CHAT_MSG_LOOT" then if e == "CHAT_MSG_LOOT" then
if msg then if msg then
local who = msg:match("%w+") local who = msg:match("%w+")
if who == "You" then if who == "You" then
local howmuch = msg:match("(x%d+).$") local howmuch = msg:match("(x%d+).$")
local what local what
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
what = itemLink what = itemLink
end end
--WeakAuras.ScanEvents("ADD_ITEM", what, howmuch) --WeakAuras.ScanEvents("ADD_ITEM", what, howmuch)
C_Timer.After(0.05, function() WeakAuras.ScanEvents("ADD_ITEM", what, howmuch) end) C_Timer.After(0.05, function() WeakAuras.ScanEvents("ADD_ITEM", what, howmuch) end)
end end
end end
elseif e == "ADD_ITEM" then elseif e == "ADD_ITEM" then
local what = msg local what = msg
if what then if what then
local rarity = select(3, GetItemInfo(what)) local rarity = select(3, GetItemInfo(what))
local icon = 0 local icon = 0
local name = GetItemInfo(what) local name = GetItemInfo(what)
if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end if not WeakAurasSaved.CustomTrash.IconDatabase[name] then icon = select(10, GetItemInfo(name)) else icon = WeakAurasSaved.CustomTrash.IconDatabase[name] end
if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end if name and icon and not WeakAurasSaved.CustomTrash.IconDatabase[name] then WeakAurasSaved.CustomTrash.IconDatabase[name] = icon; print("Adding|cff78cb00 ", name, " |rto the icon database") end
local color = "ffffffff" local color = "ffffffff"
if rarity then if rarity then
color = select(4, GetItemQualityColor(rarity)) color = select(4, GetItemQualityColor(rarity))
end end
color = "|c" .. color color = "|c" .. color
local indexid = #allstates + 1 local indexid = #allstates + 1
local ID local ID
if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end if WeakAurasSaved.CustomTrash.IDDatabase[name] then ID = WeakAurasSaved.CustomTrash.IDDatabase[name] end
allstates[indexid] = allstates[indexid] =
{ {
show = true, show = true,
changed = true, changed = true,
expirationTime = GetTime() + 1, expirationTime = GetTime() + 1,
index = GetTime(), index = GetTime(),
autoHide = true, autoHide = true,
resort = true, resort = true,
icon = icon, icon = icon,
name = what, name = what,
color = color, color = color,
amount = howmuch, amount = howmuch,
} }
if ID then if ID then
allstates[indexid].itemId = ID allstates[indexid].itemId = ID
end end
C_Timer.After(1, function() WeakAuras.ScanEvents("REMOVE_ITEM", indexid) end) C_Timer.After(1, function() WeakAuras.ScanEvents("REMOVE_ITEM", indexid) end)
return true return true
end end
elseif e == "REMOVE_ITEM" then elseif e == "REMOVE_ITEM" then
if allstates[msg] then if allstates[msg] then
allstates[msg].show = false allstates[msg].show = false
allstates[msg].changed = true allstates[msg].changed = true
return true return true
end end
end end
end end

File diff suppressed because it is too large Load Diff

View File

@@ -1,69 +1,69 @@
--COMBAT_LOG_EVENT_UNFILTERED GROUP_ROSTER_UPDATE UNTRIGGER --COMBAT_LOG_EVENT_UNFILTERED GROUP_ROSTER_UPDATE UNTRIGGER
function(e, ...) function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then --CLEU if e == "COMBAT_LOG_EVENT_UNFILTERED" then --CLEU
if not aura_env.tank then aura_env.tank = "" end if not aura_env.tank then aura_env.tank = "" end
local se = select(2, ...) local se = select(2, ...)
if se == "SPELL_AURA_APPLIED" then if se == "SPELL_AURA_APPLIED" then
local type = select(15, ...) local type = select(15, ...)
if type == "DEBUFF" then if type == "DEBUFF" then
local caster = select(5, ...) local caster = select(5, ...)
local target = select(9, ...) local target = select(9, ...)
local name = select(13, ...) local name = select(13, ...)
--If selected debuff is cast on other tank, get other tank from other trigger --If selected debuff is cast on other tank, get other tank from other trigger
if (target == aura_env.tank or target == UnitName("player")) and aura_env.auras[name] then if (target == aura_env.tank or target == UnitName("player")) and aura_env.auras[name] then
--Get stacks duration and expiry time for duration control and trigger --Get stacks duration and expiry time for duration control and trigger
local stacks, dur = select(3, aura_env.unitDebuffC(target, name)), select(5, aura_env.unitDebuffC(target, name)) local stacks, dur = select(3, aura_env.unitDebuffC(target, name)), select(5, aura_env.unitDebuffC(target, name))
if stacks > aura_env.auras[name] then if stacks > aura_env.auras[name] then
--If I have too many stacks and I am tanking then -- other taunts --If I have too many stacks and I am tanking then -- other taunts
if target == UnitName("player") and select(1, UnitDetailedThreatSituation("player", "target")) then if target == UnitName("player") and select(1, UnitDetailedThreatSituation("player", "target")) then
aura_env.returnName = "DEBIL TAUNT" aura_env.returnName = "DEBIL TAUNT"
aura_env.region:Color(0.3715, 0.6285, 0, 1) aura_env.region:Color(0.3715, 0.6285, 0, 1)
--If other tank has too many stacks and other tank is tanking then -- I taunt --If other tank has too many stacks and other tank is tanking then -- I taunt
elseif target == aura_env.tank and select(1, UnitDetailedThreatSituation(target, "target")) then elseif target == aura_env.tank and select(1, UnitDetailedThreatSituation(target, "target")) then
aura_env.returnName = "TAUNT DEBIL" aura_env.returnName = "TAUNT DEBIL"
aura_env.region:Color(0.5660, 0.1588, 0.2752, 1) aura_env.region:Color(0.5660, 0.1588, 0.2752, 1)
end end
if aura_env.timer then aura_env.timer:Cancel() end if aura_env.timer then aura_env.timer:Cancel() end
aura_env.timer = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("UNTRIGGER") end) aura_env.timer = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("UNTRIGGER") end)
return true return true
end end
end end
end end
end end
elseif e == "GROUP_ROSTER_UPDATE" then --Find other tank elseif e == "GROUP_ROSTER_UPDATE" then --Find other tank
if IsInRaid() then if IsInRaid() then
for i = 1, GetNumGroupMembers() do for i = 1, GetNumGroupMembers() do
if UnitGroupRolesAssigned("raid" .. i) == "TANK" and UnitName("raid" .. i) ~= UnitName("player") then if UnitGroupRolesAssigned("raid" .. i) == "TANK" and UnitName("raid" .. i) ~= UnitName("player") then
aura_env.tank = UnitName("raid" .. i) aura_env.tank = UnitName("raid" .. i)
end end
end end
end end
elseif e == "UNTRIGGER" then elseif e == "UNTRIGGER" then
return false return false
end end
end end
--NAME INFO --NAME INFO
function() function()
return aura_env.returnName return aura_env.returnName
end end
--INIT --INIT
aura_env.UnitDebuffC = function(unit, spell) aura_env.UnitDebuffC = function(unit, spell)
for i = 1, 40 do for i = 1, 40 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name then if name then
if name == spell then if name == spell then
return UnitDebuff(unit, i) return UnitDebuff(unit, i)
end end
else else
return nil return nil
end end
end end
end end
aura_env.auras = aura_env.auras =
{ {
["Rimefrost"] = 5, ["Rimefrost"] = 5,
["Septic Taint"] = 5, ["Septic Taint"] = 5,
} }

View File

@@ -1,33 +1,33 @@
--UNIT_AURA --UNIT_AURA
function(_,unit) function(_,unit)
if UnitGroupRolesAssigned(unit) == "TANK" and UnitName(unit) ~= UnitName("player") then if UnitGroupRolesAssigned(unit) == "TANK" and UnitName(unit) ~= UnitName("player") then
local tank = UnitDetailedThreatSituation(unit, "boss1") local tank = UnitDetailedThreatSituation(unit, "boss1")
if not tank then if not tank then
for k,v in pairs(aura_env.debuffs) do for k,v in pairs(aura_env.debuffs) do
if aura_env.UnitDebuffC(k, unit) then if aura_env.UnitDebuffC(k, unit) then
return true return true
end end
end end
else else
return false return false
end end
end end
end end
--INIT --INIT
aura_env.debuffs = aura_env.debuffs =
{ {
["Sacred Blade"] = 1 ["Sacred Blade"] = 1
} }
aura_env.UnitDebuffC = function(spell, unit) aura_env.UnitDebuffC = function(spell, unit)
for i = 1, 40 do for i = 1, 40 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name then if name then
if name == spell then if name == spell then
return UnitDebuff(unit, i) return UnitDebuff(unit, i)
end end
else else
return nil return nil
end end
end end
end end

View File

@@ -1,62 +1,62 @@
--COMBAT_LOG_EVENT_UNFILTERED UPDATE_TAUNT_GOD --COMBAT_LOG_EVENT_UNFILTERED UPDATE_TAUNT_GOD
function(...) function(...)
local e = select(1, ...) local e = select(1, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local spellName = select(14, ...) local spellName = select(14, ...)
if (spellName == "Taunt" if (spellName == "Taunt"
or spellName == "Provoke" or spellName == "Provoke"
or spellName == "Dark Command" or spellName == "Dark Command"
or spellName == "Torment" or spellName == "Torment"
or spellName == "Hand of Reckoning" or spellName == "Hand of Reckoning"
or spellName == "Growl") or spellName == "Growl")
and subEvent == "SPELL_CAST_SUCCESS" then and subEvent == "SPELL_CAST_SUCCESS" then
local target = select(10, ...) local target = select(10, ...)
local source = select(6, ...) local source = select(6, ...)
local subEvent = select(3, ...) local subEvent = select(3, ...)
aura_env.spellName = spellName aura_env.spellName = spellName
aura_env.caster = source aura_env.caster = source
aura_env.target = target aura_env.target = target
aura_env.cast_time = GetTime() aura_env.cast_time = GetTime()
if aura_env.ticker then aura_env.ticker:Cancel() end if aura_env.ticker then aura_env.ticker:Cancel() end
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE_TAUNT_GOD") end) if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE_TAUNT_GOD") end)
return true return true
else else
return false return false
end end
end end
elseif e == "UPDATE_TAUNT_GOD" then elseif e == "UPDATE_TAUNT_GOD" then
return true return true
end end
end end
--DISPLAY --DISPLAY
function() function()
if aura_env.caster then if aura_env.caster then
local source_class = UnitClass(aura_env.caster) local source_class = UnitClass(aura_env.caster)
local source_class_color = "|cFFFFFFFF" local source_class_color = "|cFFFFFFFF"
local time_color = "|cFFFFFFFF" local time_color = "|cFFFFFFFF"
local target_color = "|cFFFFFFFF" local target_color = "|cFFFFFFFF"
if aura_env.spellName == "Taunt" if aura_env.spellName == "Taunt"
or aura_env.spellName == "Provoke" or aura_env.spellName == "Provoke"
or aura_env.spellName == "Hand of Reckoning" or aura_env.spellName == "Hand of Reckoning"
or aura_env.spellName == "Dark Command" or aura_env.spellName == "Dark Command"
or aura_env.spellName == "Torment" or aura_env.spellName == "Torment"
or aura_env.spellName == "Growl" or aura_env.spellName == "Growl"
then cooldown_time = aura_env.cast_time + 8 else cooldown_time = 0 end then cooldown_time = aura_env.cast_time + 8 else cooldown_time = 0 end
if (cooldown_time / GetTime()) < 1 then time_color = "|cFF00FF00" else time_color = "|cFFFF0000" end if (cooldown_time / GetTime()) < 1 then time_color = "|cFF00FF00" else time_color = "|cFFFF0000" end
if source_class == "Death Knight" then source_class_color = "|cFFC41F3B" if source_class == "Death Knight" then source_class_color = "|cFFC41F3B"
elseif source_class == "Demon Hunter" then source_class_color = "|cFFA330C9" elseif source_class == "Demon Hunter" then source_class_color = "|cFFA330C9"
elseif source_class == "Druid" then source_class_color = "|cFFFF7D0A" elseif source_class == "Druid" then source_class_color = "|cFFFF7D0A"
elseif source_class == "Hunter" then source_class_color = "|cFFABD473" elseif source_class == "Hunter" then source_class_color = "|cFFABD473"
elseif source_class == "Mage" then source_class_color = "|cFF40C7EB" elseif source_class == "Mage" then source_class_color = "|cFF40C7EB"
elseif source_class == "Monk" then source_class_color = "|cFF00FF96" elseif source_class == "Monk" then source_class_color = "|cFF00FF96"
elseif source_class == "Paladin" then source_class_color = "|cFFF58CBA" elseif source_class == "Paladin" then source_class_color = "|cFFF58CBA"
elseif source_class == "Priest" then source_class_color = "|cFFFFFFFF" elseif source_class == "Priest" then source_class_color = "|cFFFFFFFF"
elseif source_class == "Rogue" then source_class_color = "|cFFFFF569" elseif source_class == "Rogue" then source_class_color = "|cFFFFF569"
elseif source_class == "Shaman" then source_class_color = "|cFF0070DE" elseif source_class == "Shaman" then source_class_color = "|cFF0070DE"
elseif source_class == "Warlock" then source_class_color = "|cFF8787ED" elseif source_class == "Warlock" then source_class_color = "|cFF8787ED"
elseif source_class == "Warrior" then source_class_color = "|cFFC79C6E" end elseif source_class == "Warrior" then source_class_color = "|cFFC79C6E" end
if aura_env.target == UnitName("target") then target_color = "|cFF00FF00" else target_color = "|cFFFF0000" end if aura_env.target == UnitName("target") then target_color = "|cFF00FF00" else target_color = "|cFFFF0000" end
return source_class_color .. aura_env.caster .. "\n" .. target_color .. aura_env.target .. "\n" .. source_class_color .. aura_env.spellName .. "\n" .. time_color .. math.floor(GetTime() - aura_env.cast_time) return source_class_color .. aura_env.caster .. "\n" .. target_color .. aura_env.target .. "\n" .. source_class_color .. aura_env.spellName .. "\n" .. time_color .. math.floor(GetTime() - aura_env.cast_time)
end end
end end

View File

@@ -1,58 +1,58 @@
--UNIT_AURA COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED --UNIT_AURA COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED
function(e, unit, ...) function(e, unit, ...)
if e == "UNIT_AURA" then if e == "UNIT_AURA" then
if UnitExists(unit) then if UnitExists(unit) then
if aura_env.UnitDebuffC(aura_env.debuff, unit) and not aura_env.auras[UnitGUID(unit)] and select(7, aura_env.UnitDebuffC(aura_env.debuff, unit)) == "player" then if aura_env.UnitDebuffC(aura_env.debuff, unit) and not aura_env.auras[UnitGUID(unit)] and select(7, aura_env.UnitDebuffC(aura_env.debuff, unit)) == "player" then
aura_env.auras[UnitGUID(unit)] = 1 aura_env.auras[UnitGUID(unit)] = 1
aura_env.count = aura_env.count + 1 aura_env.count = aura_env.count + 1
return true return true
elseif not aura_env.UnitDebuffC(aura_env.debuff, unit) and aura_env.auras[UnitGUID(unit)] then elseif not aura_env.UnitDebuffC(aura_env.debuff, unit) and aura_env.auras[UnitGUID(unit)] then
aura_env.auras[UnitGUID(unit)] = nil aura_env.auras[UnitGUID(unit)] = nil
aura_env.count = aura_env.count - 1 aura_env.count = aura_env.count - 1
return true return true
end end
end end
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(1, ...) local se = select(1, ...)
if se == "UNIT_DIED" then if se == "UNIT_DIED" then
local GUID = select(7, ...) local GUID = select(7, ...)
if aura_env.auras[GUID] then if aura_env.auras[GUID] then
aura_env.auras[GUID] = nil aura_env.auras[GUID] = nil
aura_env.count = aura_env.count - 1 aura_env.count = aura_env.count - 1
return true return true
end end
end end
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
for k,v in pairs(aura_env.auras) do for k,v in pairs(aura_env.auras) do
k = nil k = nil
v = nil v = nil
end end
end end
end end
--UNTRIGGER --UNTRIGGER
function() function()
if aura_env.count == 0 then return true end if aura_env.count == 0 then return true end
end end
--DISPLAY --DISPLAY
function() function()
if aura_env.count > 0 then return aura_env.count else return "" end if aura_env.count > 0 then return aura_env.count else return "" end
end end
--INIT --INIT
aura_env.debuff = "Dagger in the Back" aura_env.debuff = "Dagger in the Back"
aura_env.count = 0 aura_env.count = 0
aura_env.auras = {} aura_env.auras = {}
aura_env.UnitDebuffC = function(spell, unit) aura_env.UnitDebuffC = function(spell, unit)
for i = 1, 40 do for i = 1, 40 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name then if name then
if name == spell then if name == spell then
return UnitDebuff(unit, i) return UnitDebuff(unit, i)
end end
else else
return nil return nil
end end
end end
end end

View File

@@ -1,33 +1,33 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED PLAYER_REGEN_DISABLED PLAYER_TARGET_CHANGED --NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED PLAYER_REGEN_DISABLED PLAYER_TARGET_CHANGED
function(e, u) function(e, u)
--local mname = "Armored Vaultbot" --local mname = "Armored Vaultbot"
local mname = "Sickly Saurid" local mname = "Sickly Saurid"
local LCG = LibStub("LibCustomGlow-1.0") local LCG = LibStub("LibCustomGlow-1.0")
if e == "NAME_PLATE_UNIT_ADDED" then if e == "NAME_PLATE_UNIT_ADDED" then
local name = UnitName(u) local name = UnitName(u)
if name == mname then if name == mname then
PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master") PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master")
aura_env.ticker = C_Timer.NewTicker(1, function() PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master"); end) aura_env.ticker = C_Timer.NewTicker(1, function() PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master"); end)
local nameplate = C_NamePlate.GetNamePlateForUnit(u) local nameplate = C_NamePlate.GetNamePlateForUnit(u)
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4) LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
end end
elseif e == "NAME_PLATE_UNIT_REMOVED" then elseif e == "NAME_PLATE_UNIT_REMOVED" then
local name = UnitName(u) local name = UnitName(u)
if name == mname then if name == mname then
if aura_env.ticker then if aura_env.ticker then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
aura_env.ticker = nil aura_env.ticker = nil
end end
local nameplate = C_NamePlate.GetNamePlateForUnit(u) local nameplate = C_NamePlate.GetNamePlateForUnit(u)
LCG.PixelGlow_Stop() LCG.PixelGlow_Stop()
end end
elseif e == "PLAYER_REGEN_DISABLED" and aura_env.ticker then elseif e == "PLAYER_REGEN_DISABLED" and aura_env.ticker then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
aura_env.ticker = nil aura_env.ticker = nil
elseif e == "PLAYER_TARGET_CHANGED" and aura_env.ticker then elseif e == "PLAYER_TARGET_CHANGED" and aura_env.ticker then
if UnitName("target") == mname then if UnitName("target") == mname then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
aura_env.ticker = nil aura_env.ticker = nil
end end
end end
end end

View File

@@ -1,72 +1,72 @@
local baseUrl = "https://www.wowhead.com/" local baseUrl = "https://www.wowhead.com/"
local keybind = "CTRL-C" local keybind = "CTRL-C"
local popupText = "Wowhead %s Link\n" .. keybind .. " to copy" local popupText = "Wowhead %s Link\n" .. keybind .. " to copy"
local typeAttributeMap = { local typeAttributeMap = {
quest = {"id", "questId", "questID"}, quest = {"id", "questId", "questID"},
item = {info = {"id"}} item = {info = {"id"}}
} }
local function ShowUrlPopup(id, type) local function ShowUrlPopup(id, type)
if not (id or type) then return end if not (id or type) then return end
local url = baseUrl .. type .. "=" .. id local url = baseUrl .. type .. "=" .. id
StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url) StaticPopup_Show("WowheadQuestLinkUrl", type:sub(1, 1):upper() .. type:sub(2), _, url)
end end
local function getIdAndType(focus) local function getIdAndType(focus)
local function loop(focus, keys) local function loop(focus, keys)
if not focus then return end if not focus then return end
for key, value in pairs(keys) do for key, value in pairs(keys) do
if type(value) == "table" then if type(value) == "table" then
return loop(focus[key], value) return loop(focus[key], value)
end end
local id = focus[value] local id = focus[value]
if id then if id then
return id return id
end end
end end
end end
if not focus then return end if not focus then return end
for type, keys in pairs(typeAttributeMap) do for type, keys in pairs(typeAttributeMap) do
local id = loop(focus, keys) local id = loop(focus, keys)
if id then if id then
return id, type return id, type
end end
end end
return getIdAndType(focus:GetParent()) return getIdAndType(focus:GetParent())
end end
local function run() local function run()
local focus = GetMouseFocus() local focus = GetMouseFocus()
local id, type = getIdAndType(focus) local id, type = getIdAndType(focus)
ShowUrlPopup(id, type) ShowUrlPopup(id, type)
end end
StaticPopupDialogs["WowheadQuestLinkUrl"] = { StaticPopupDialogs["WowheadQuestLinkUrl"] = {
text = popupText, text = popupText,
button1 = "Close", button1 = "Close",
OnShow = function(self, data) OnShow = function(self, data)
local function HidePopup(self) self:GetParent():Hide() end local function HidePopup(self) self:GetParent():Hide() end
self.editBox:SetScript("OnEscapePressed", HidePopup) self.editBox:SetScript("OnEscapePressed", HidePopup)
self.editBox:SetScript("OnEnterPressed", HidePopup) self.editBox:SetScript("OnEnterPressed", HidePopup)
self.editBox:SetMaxLetters(0) self.editBox:SetMaxLetters(0)
self.editBox:SetText(data) self.editBox:SetText(data)
self.editBox:HighlightText(0, self.editBox:GetNumLetters()) self.editBox:HighlightText(0, self.editBox:GetNumLetters())
end, end,
hasEditBox = true, hasEditBox = true,
editBoxWidth = 233, editBoxWidth = 233,
timeout = 0, timeout = 0,
whileDead = true, whileDead = true,
hideOnEscape = true, hideOnEscape = true,
preferredIndex = 3, preferredIndex = 3,
} }
local btn = CreateFrame("BUTTON", "KeybindBtn") local btn = CreateFrame("BUTTON", "KeybindBtn")
SetBindingClick(keybind, btn:GetName()) SetBindingClick(keybind, btn:GetName())
btn:SetScript("OnClick", run) btn:SetScript("OnClick", run)

View File

@@ -1,45 +1,45 @@
function(event,addonName) function(event,addonName)
if event == "ADDON_LOADED" and addonName == "Blizzard_Communities" then if event == "ADDON_LOADED" and addonName == "Blizzard_Communities" then
--create overlay --create overlay
local f = CreateFrame("Button",nil,UIParent) local f = CreateFrame("Button",nil,UIParent)
f:SetFrameStrata("HIGH") f:SetFrameStrata("HIGH")
f.tex = f:CreateTexture(nil, "BACKGROUND") f.tex = f:CreateTexture(nil, "BACKGROUND")
f.tex:SetAllPoints() f.tex:SetAllPoints()
f.tex:SetColorTexture(0.1,0.1,0.1,1) f.tex:SetColorTexture(0.1,0.1,0.1,1)
f.text = f:CreateFontString() f.text = f:CreateFontString()
f.text:SetFontObject("GameFontNormalMed3") f.text:SetFontObject("GameFontNormalMed3")
f.text:SetText("Chat Hidden. Click to show") f.text:SetText("Chat Hidden. Click to show")
f.text:SetTextColor(1, 1, 1, 1) f.text:SetTextColor(1, 1, 1, 1)
f.text:SetJustifyH("CENTER") f.text:SetJustifyH("CENTER")
f.text:SetJustifyV("CENTER") f.text:SetJustifyV("CENTER")
f.text:SetHeight(20) f.text:SetHeight(20)
f.text:SetPoint("CENTER",f,"CENTER",0,0) f.text:SetPoint("CENTER",f,"CENTER",0,0)
f:EnableMouse(true) f:EnableMouse(true)
f:RegisterForClicks("AnyUp") f:RegisterForClicks("AnyUp")
f:SetScript("OnClick",function(...) f:SetScript("OnClick",function(...)
f:Hide() f:Hide()
end) end)
--toggle --toggle
local function toggleOverlay() local function toggleOverlay()
if CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.CHAT then if CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.CHAT then
f:SetAllPoints(CommunitiesFrame.Chat.InsetFrame) f:SetAllPoints(CommunitiesFrame.Chat.InsetFrame)
f:Show() f:Show()
elseif CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.MINIMIZED then elseif CommunitiesFrame:GetDisplayMode() == COMMUNITIES_FRAME_DISPLAY_MODES.MINIMIZED then
f:SetAllPoints(CommunitiesFrameInset) f:SetAllPoints(CommunitiesFrameInset)
f:Show() f:Show()
else else
f:Hide() f:Hide()
end end
end end
local function hideOverlay() local function hideOverlay()
f:Hide() f:Hide()
end end
toggleOverlay() --run once toggleOverlay() --run once
--hook --hook
hooksecurefunc(CommunitiesFrame,"SetDisplayMode", toggleOverlay) hooksecurefunc(CommunitiesFrame,"SetDisplayMode", toggleOverlay)
hooksecurefunc(CommunitiesFrame,"Show",toggleOverlay) hooksecurefunc(CommunitiesFrame,"Show",toggleOverlay)
hooksecurefunc(CommunitiesFrame,"Hide",hideOverlay) hooksecurefunc(CommunitiesFrame,"Hide",hideOverlay)
hooksecurefunc(CommunitiesFrame,"OnClubSelected", toggleOverlay) hooksecurefunc(CommunitiesFrame,"OnClubSelected", toggleOverlay)
end end
end end

View File

@@ -1,45 +1,45 @@
--START DEPOSIT GUILDBANKFRAME_CLOSED --START DEPOSIT GUILDBANKFRAME_CLOSED
function(e) function(e)
local interval = 0.5 local interval = 0.5
local item = "U'taka" local item = "U'taka"
if e == "START" then if e == "START" then
for t = 1, GetNumGuildBankTabs() do for t = 1, GetNumGuildBankTabs() do
for s = 1, 98 do for s = 1, 98 do
local l = GetGuildBankItemLink(t, s) local l = GetGuildBankItemLink(t, s)
if l then if l then
local name = GetItemInfo(l) local name = GetItemInfo(l)
if name:match(item) then if name:match(item) then
SetCurrentGuildBankTab(t) SetCurrentGuildBankTab(t)
aura_env.tab = t aura_env.tab = t
break break
end end
end end
end end
end end
if not aura_env.tab then print("NO FISH FOUND CUNT") else if not aura_env.tab then print("NO FISH FOUND CUNT") else
local s = 1 local s = 1
local aura_env = aura_env local aura_env = aura_env
aura_env.ticker = C_Timer.NewTicker(interval, function() aura_env.ticker = C_Timer.NewTicker(interval, function()
print(aura_env.tab, s) print(aura_env.tab, s)
AutoStoreGuildBankItem(aura_env.tab, s) AutoStoreGuildBankItem(aura_env.tab, s)
s = s + 1 s = s + 1
end) end)
end end
elseif e == "DEPOSIT" then elseif e == "DEPOSIT" then
local b = 0 local b = 0
local s = 1 local s = 1
local bs = 1 local bs = 1
local stage = 1 local stage = 1
local aura_env = aura_env local aura_env = aura_env
aura_env.ticker = C_Timer.NewTicker(interval, function() aura_env.ticker = C_Timer.NewTicker(interval, function()
if stage == 1 then SplitContainerItem(b, s, 1); print(stage); stage = stage + 1 if stage == 1 then SplitContainerItem(b, s, 1); print(stage); stage = stage + 1
elseif stage == 2 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1 elseif stage == 2 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
elseif stage == 3 then PickupContainerItem(b, s); print(stage); stage = stage + 1 elseif stage == 3 then PickupContainerItem(b, s); print(stage); stage = stage + 1
elseif stage == 4 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1 elseif stage == 4 then PickupGuildBankItem(6, bs); print(stage); stage = stage + 1
elseif stage == 5 then s = s + 1; bs = bs + 1; stage = 1 end elseif stage == 5 then s = s + 1; bs = bs + 1; stage = 1 end
if s >= GetContainerNumSlots(b) then s = 1; b = b + 1 end if s >= GetContainerNumSlots(b) then s = 1; b = b + 1 end
end) end)
elseif e == "GUILDBANKFRAME_CLOSED" then elseif e == "GUILDBANKFRAME_CLOSED" then
if aura_env.ticker then aura_env.ticker:Cancel() end if aura_env.ticker then aura_env.ticker:Cancel() end
end end
end end

View File

@@ -1,7 +1,7 @@
--UPDATE_RAGE --UPDATE_RAGE
function(e, ...) function(e, ...)
if e == "UPDATE_RAGE" then if e == "UPDATE_RAGE" then
local hs = IsCurrentSpell("Cleave") local hs = IsCurrentSpell("Cleave")
if hs == true then return true else return false end if hs == true then return true else return false end
end end
end end

View File

@@ -1,36 +1,36 @@
--UPDATE_RAGE --UPDATE_RAGE
function(e, ...) function(e, ...)
if e == "UPDATE_RAGE" then if e == "UPDATE_RAGE" then
return true return true
elseif e == "PLAYER_REGEN_DISABLED" then elseif e == "PLAYER_REGEN_DISABLED" then
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end
end end
end end
--DURATION --DURATION
function() function()
local rage, maxrage = UnitPower("player"), UnitPowerMax("player") local rage, maxrage = UnitPower("player"), UnitPowerMax("player")
WeakAurasSaved.CustomTrash.CustomRage = rage WeakAurasSaved.CustomTrash.CustomRage = rage
return rage, maxrage, 1 return rage, maxrage, 1
end end
--DURATION2 --DURATION2
--Other aura --Other aura
function() function()
local hs = IsCurrentSpell("Heroic Strike") local hs = IsCurrentSpell("Heroic Strike")
local cleave = IsCurrentSpell("Cleave") local cleave = IsCurrentSpell("Cleave")
if hs then return WeakAurasSaved.CustomTrash.CustomRage - 15, UnitPowerMax("player"), 1 elseif cleave then return WeakAurasSaved.CustomTrash.CustomRage - 20, UnitPowerMax("player"), 1 else return WeakAurasSaved.CustomTrash.CustomRage, UnitPowerMax("player"), 1 end if hs then return WeakAurasSaved.CustomTrash.CustomRage - 15, UnitPowerMax("player"), 1 elseif cleave then return WeakAurasSaved.CustomTrash.CustomRage - 20, UnitPowerMax("player"), 1 else return WeakAurasSaved.CustomTrash.CustomRage, UnitPowerMax("player"), 1 end
end end
--TEXT --TEXT
function() function()
return WeakAurasSaved.CustomTrash.CustomRage return WeakAurasSaved.CustomTrash.CustomRage
end end
--INIT --INIT
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if WeakAuras.IsOptionsOpen() and aura_env.ticker then if WeakAuras.IsOptionsOpen() and aura_env.ticker then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
else else
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.05, function() WeakAuras.ScanEvents("UPDATE_RAGE") end) end
end end

View File

@@ -1,199 +1,199 @@
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE --PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
-- look for auras every frame -- look for auras every frame
-- or maybe look for combatlog ? -- or maybe look for combatlog ?
-- get time when each aura is applied/expires -- get time when each aura is applied/expires
-- calculate uptime based on the log ? -- calculate uptime based on the log ?
-- alternatively sample each frame and add up # of frames aura was active and # of frames combat was ongoing -- alternatively sample each frame and add up # of frames aura was active and # of frames combat was ongoing
-- bad solution though -- bad solution though
function(e) function(e)
if e == "PLAYER_REGEN_DISABLED" then if e == "PLAYER_REGEN_DISABLED" then
local aura_env = aura_env local aura_env = aura_env
aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE") end) aura_env.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("UPDATE") end)
aura_env.startCombat = debugprofilestop() aura_env.startCombat = debugprofilestop()
aura_env.buffs = {} aura_env.buffs = {}
aura_env.debuffs = {} aura_env.debuffs = {}
return true return true
elseif e == "PLAYER_REGEN_ENABLED" then elseif e == "PLAYER_REGEN_ENABLED" then
if aura_env.ticker then aura_env.ticker:Cancel() end if aura_env.ticker then aura_env.ticker:Cancel() end
elseif e == "UPDATE" then return true end elseif e == "UPDATE" then return true end
end end
--CLEU --CLEU
--COMBAT_LOG_EVENT_UNFILTERED --COMBAT_LOG_EVENT_UNFILTERED
function(e) function(e)
if not aura_env.buffs then aura_env.buffs = {} end if not aura_env.buffs then aura_env.buffs = {} end
if not aura_env.debuffs then aura_env.debuffs = {} end if not aura_env.debuffs then aura_env.debuffs = {} end
local timestamp, subEvent, _, _, caster, _, _, _, target = CombatLogGetCurrentEventInfo() local timestamp, subEvent, _, _, caster, _, _, _, target = CombatLogGetCurrentEventInfo()
-- print(CombatLogGetCurrentEventInfo()) -- print(CombatLogGetCurrentEventInfo())
-- if "buff" is selected in the menu and -- if "buff" is selected in the menu and
-- there has been an aura applied or removed and -- there has been an aura applied or removed and
-- the aura has been cast by the player on the player then -- the aura has been cast by the player on the player then
-- do fancy data stuff pls -- do fancy data stuff pls
if InCombatLockdown() ~= false then if InCombatLockdown() ~= false then
local targetUnit = "boss1" local targetUnit = "boss1"
if UnitExists(targetUnit) == false then targetUnit = "target" end if UnitExists(targetUnit) == false then targetUnit = "target" end
if (aura_env.config.menu == 1 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == target and caster == UnitName("player")) then if (aura_env.config.menu == 1 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == target and caster == UnitName("player")) then
local spell = select(12, CombatLogGetCurrentEventInfo()) local spell = select(12, CombatLogGetCurrentEventInfo())
print("SPell", spell) print("SPell", spell)
if not aura_env.buffs[spell] then if not aura_env.buffs[spell] then
aura_env.buffs[spell] = { aura_env.buffs[spell] = {
["timeActive"] = 0, ["timeActive"] = 0,
["timeInactive"] = 0, ["timeInactive"] = 0,
["active"] = false, ["active"] = false,
["lastSwitch"] = debugprofilestop(), ["lastSwitch"] = debugprofilestop(),
} }
-- print("OPA; NEW SPELL") -- print("OPA; NEW SPELL")
end end
if subEvent == "SPELL_AURA_APPLIED" and aura_env.buffs[spell] then if subEvent == "SPELL_AURA_APPLIED" and aura_env.buffs[spell] then
aura_env.buffs[spell].active = true aura_env.buffs[spell].active = true
aura_env.buffs[spell].timeInactive = aura_env.buffs[spell].timeInactive + debugprofilestop() - aura_env.buffs[spell].lastSwitch aura_env.buffs[spell].timeInactive = aura_env.buffs[spell].timeInactive + debugprofilestop() - aura_env.buffs[spell].lastSwitch
aura_env.buffs[spell].lastSwitch = debugprofilestop() aura_env.buffs[spell].lastSwitch = debugprofilestop()
elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.buffs[spell] then elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.buffs[spell] then
aura_env.buffs[spell].active = false aura_env.buffs[spell].active = false
aura_env.buffs[spell].timeActive = aura_env.buffs[spell].timeActive + debugprofilestop() - aura_env.buffs[spell].lastSwitch aura_env.buffs[spell].timeActive = aura_env.buffs[spell].timeActive + debugprofilestop() - aura_env.buffs[spell].lastSwitch
aura_env.buffs[spell].lastSwitch = debugprofilestop() aura_env.buffs[spell].lastSwitch = debugprofilestop()
end end
elseif (aura_env.config.menu == 2 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == UnitName("player") and target == UnitName(targetUnit)) then elseif (aura_env.config.menu == 2 or aura_env.config.menu == 3) and (subEvent == "SPELL_AURA_REMOVED" or subEvent == "SPELL_AURA_APPLIED") and (caster == UnitName("player") and target == UnitName(targetUnit)) then
local spell = select(12, CombatLogGetCurrentEventInfo()) local spell = select(12, CombatLogGetCurrentEventInfo())
if not aura_env.debuffs[spell] then if not aura_env.debuffs[spell] then
aura_env.debuffs[spell] = { aura_env.debuffs[spell] = {
["timeActive"] = 0, ["timeActive"] = 0,
["timeInactive"] = 0, ["timeInactive"] = 0,
["active"] = false, ["active"] = false,
["lastSwitch"] = debugprofilestop(), ["lastSwitch"] = debugprofilestop(),
} }
-- print("OPA; NEW SPELL") -- print("OPA; NEW SPELL")
end end
if subEvent == "SPELL_AURA_APPLIED" and aura_env.debuffs[spell] then if subEvent == "SPELL_AURA_APPLIED" and aura_env.debuffs[spell] then
aura_env.debuffs[spell].active = true aura_env.debuffs[spell].active = true
aura_env.debuffs[spell].timeInactive = aura_env.debuffs[spell].timeInactive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch aura_env.debuffs[spell].timeInactive = aura_env.debuffs[spell].timeInactive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch
aura_env.debuffs[spell].lastSwitch = debugprofilestop() aura_env.debuffs[spell].lastSwitch = debugprofilestop()
elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.debuffs[spell] then elseif subEvent == "SPELL_AURA_REMOVED" and aura_env.debuffs[spell] then
aura_env.debuffs[spell].active = false aura_env.debuffs[spell].active = false
aura_env.debuffs[spell].timeActive = aura_env.debuffs[spell].timeActive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch aura_env.debuffs[spell].timeActive = aura_env.debuffs[spell].timeActive + debugprofilestop() - aura_env.debuffs[spell].lastSwitch
aura_env.debuffs[spell].lastSwitch = debugprofilestop() aura_env.debuffs[spell].lastSwitch = debugprofilestop()
end end
end end
end end
-- debug print pls -- debug print pls
for k,v in pairs(aura_env.buffs) do for k,v in pairs(aura_env.buffs) do
-- print(k,v) -- print(k,v)
if type(v) == "table" then if type(v) == "table" then
for k2,v2 in pairs(v) do for k2,v2 in pairs(v) do
-- print(k2,v2) -- print(k2,v2)
if type(v2) == "table" then if type(v2) == "table" then
for k3,v3 in pairs(v2) do for k3,v3 in pairs(v2) do
-- print(k3,v3) -- print(k3,v3)
end end
end end
end end
end end
end end
end end
--DISPLAY --DISPLAY
function() function()
aura_env.combatTime = (debugprofilestop() - aura_env.startCombat) / 1000 aura_env.combatTime = (debugprofilestop() - aura_env.startCombat) / 1000
local output = aura_env.formatTime(aura_env.combatTime) .. "\n" local output = aura_env.formatTime(aura_env.combatTime) .. "\n"
aura_env.getColor(1) aura_env.getColor(1)
for k,v in pairs(aura_env.buffs) do for k,v in pairs(aura_env.buffs) do
-- DEBUG -- DEBUG
-- print(k) -- print(k)
-- for k2,v2 in pairs(v) do -- for k2,v2 in pairs(v) do
-- print(k2, v2) -- print(k2, v2)
-- end -- end
-- print("DEBUG TIME", debugprofilestop()) -- print("DEBUG TIME", debugprofilestop())
-- print("END" .. "\n") -- print("END" .. "\n")
local totalActiveTime = 0 local totalActiveTime = 0
if v.active == true then if v.active == true then
totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive
else else
totalActiveTime = totalActiveTime + v.timeActive totalActiveTime = totalActiveTime + v.timeActive
end end
output = string.format("%s %s%20s %10s %10s\n", output, aura_env.getColor(1), GetSpellInfo(k), aura_env.formatTime(totalActiveTime / 1000), string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100)) output = string.format("%s %s%20s %10s %10s\n", output, aura_env.getColor(1), GetSpellInfo(k), aura_env.formatTime(totalActiveTime / 1000), string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100))
-- output = output .. aura_env.getColor(1) .. GetSpellInfo(k) .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n" -- output = output .. aura_env.getColor(1) .. GetSpellInfo(k) .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n"
end end
for k,v in pairs(aura_env.debuffs) do for k,v in pairs(aura_env.debuffs) do
-- DEBUG -- DEBUG
-- print(k) -- print(k)
for k2,v2 in pairs(v) do for k2,v2 in pairs(v) do
-- print(k2, v2) -- print(k2, v2)
end end
-- print("DEBUG TIME", debugprofilestop()) -- print("DEBUG TIME", debugprofilestop())
-- print("END" .. "\n") -- print("END" .. "\n")
local totalActiveTime = 0 local totalActiveTime = 0
if v.active == true then if v.active == true then
totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive totalActiveTime = totalActiveTime + debugprofilestop() - v.lastSwitch + v.timeActive
else else
totalActiveTime = totalActiveTime + v.timeActive totalActiveTime = totalActiveTime + v.timeActive
end end
output = output .. aura_env.getColor(2) output = output .. aura_env.getColor(2)
if k == 233490 or (k >= 233496 and k <= 233499) then if k == 233490 or (k >= 233496 and k <= 233499) then
if k == 233490 then if k == 233490 then
output = output .. GetSpellInfo(k) .. " 1" output = output .. GetSpellInfo(k) .. " 1"
elseif k >= 233496 and k <= 233499 then elseif k >= 233496 and k <= 233499 then
output = output .. GetSpellInfo(k) .. " " .. (k % 233496) + 2 output = output .. GetSpellInfo(k) .. " " .. (k % 233496) + 2
end end
else else
output = output .. GetSpellInfo(k) output = output .. GetSpellInfo(k)
end end
output = output .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n" output = output .. " " .. aura_env.formatTime(totalActiveTime / 1000) .. " " .. string.format("%.2f%%", ((totalActiveTime / 1000) / aura_env.combatTime) * 100) .. "\n"
end end
return output return output
end end
--INIT --INIT
aura_env.buffs = {} aura_env.buffs = {}
aura_env.debuffs = {} aura_env.debuffs = {}
aura_env.combatTime = 0 aura_env.combatTime = 0
aura_env.startCombat = 0 aura_env.startCombat = 0
aura_env.formatTime = function(time) aura_env.formatTime = function(time)
local res, m, s = tonumber(string.format("%d", time)), 0, 0 local res, m, s = tonumber(string.format("%d", time)), 0, 0
while res >= 60 do while res >= 60 do
m = m + 1 m = m + 1
res = res - 60 res = res - 60
end end
s = res s = res
if s < 10 then if s < 10 then
s = string.format("0%d", s) s = string.format("0%d", s)
end end
if type(s) ~= "string" then tostring(s) end if type(s) ~= "string" then tostring(s) end
return string.format("%d:%s", m, s) return string.format("%d:%s", m, s)
end end
aura_env.getColor = function(mode) aura_env.getColor = function(mode)
-- ff78cb00 -- ff78cb00
local output = "\124c" local output = "\124c"
local colors = {} local colors = {}
if mode == 1 then if mode == 1 then
colors = {aura_env.config.bcolor[4], aura_env.config.bcolor[1], aura_env.config.bcolor[2], aura_env.config.bcolor[3]} colors = {aura_env.config.bcolor[4], aura_env.config.bcolor[1], aura_env.config.bcolor[2], aura_env.config.bcolor[3]}
elseif mode == 2 then elseif mode == 2 then
colors = {aura_env.config.dcolor[4], aura_env.config.dcolor[1], aura_env.config.dcolor[2], aura_env.config.dcolor[3]} colors = {aura_env.config.dcolor[4], aura_env.config.dcolor[1], aura_env.config.dcolor[2], aura_env.config.dcolor[3]}
end end
local a, r, g, b = "00", "00", "00", "00" local a, r, g, b = "00", "00", "00", "00"
a = string.format("%x", colors[1] * 255) a = string.format("%x", colors[1] * 255)
r = string.format("%x", colors[2] * 255) r = string.format("%x", colors[2] * 255)
g = string.format("%x", colors[3] * 255) g = string.format("%x", colors[3] * 255)
b = string.format("%x", colors[4] * 255) b = string.format("%x", colors[4] * 255)
if string.len(a) == 1 then a = "0" .. a end if string.len(a) == 1 then a = "0" .. a end
if string.len(r) == 1 then r = "0" .. r end if string.len(r) == 1 then r = "0" .. r end
if string.len(g) == 1 then g = "0" .. g end if string.len(g) == 1 then g = "0" .. g end
if string.len(b) == 1 then b = "0" .. b end if string.len(b) == 1 then b = "0" .. b end
output = output .. a .. r .. g .. b output = output .. a .. r .. g .. b
return output return output
end end

View File

@@ -1,127 +1,127 @@
--COMBAT_LOG_EVENT_UNFILTERED ADD_BUFF REMOVE_BUFF --COMBAT_LOG_EVENT_UNFILTERED ADD_BUFF REMOVE_BUFF
--https://pastebin.com/4xyHRftN --https://pastebin.com/4xyHRftN
function(e, ...) function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...) local se = select(2, ...)
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_REMOVED" then if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_REMOVED" then
aura_env.scanBuffs() aura_env.scanBuffs()
end end
elseif e == "ADD_BUFF" then elseif e == "ADD_BUFF" then
local msg = select(1, ...) local msg = select(1, ...)
local arg = select(2, ...) local arg = select(2, ...)
if msg then if msg then
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = {["active"] = false} WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = {["active"] = false}
if arg then if arg then
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg].group = arg WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg].group = arg
if not WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] then WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] = {["active"] = 0, ["shown"] = true} end if not WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] then WeakAurasSaved.CustomTrash.BuffButtons.Groups[arg] = {["active"] = 0, ["shown"] = true} end
end end
print(msg, "added") print(msg, "added")
else else
print(msg, "already exists") print(msg, "already exists")
end end
end end
aura_env.scanBuffs() aura_env.scanBuffs()
elseif e == "REMOVE_BUFF" then elseif e == "REMOVE_BUFF" then
local msg = select(1, ...) local msg = select(1, ...)
if msg and WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then if msg and WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] then
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = nil WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg] = nil
print(msg, "removed") print(msg, "removed")
else else
print(msg, WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg]) print(msg, WeakAurasSaved.CustomTrash.BuffButtons.Buffs[msg])
print("Cannot remove", msg) print("Cannot remove", msg)
end end
aura_env.scanBuffs() aura_env.scanBuffs()
end end
end end
--INIT --INIT
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if not WeakAurasSaved.CustomTrash.BuffButtons then WeakAurasSaved.CustomTrash.BuffButtons = {} end if not WeakAurasSaved.CustomTrash.BuffButtons then WeakAurasSaved.CustomTrash.BuffButtons = {} end
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs then WeakAurasSaved.CustomTrash.BuffButtons.Buffs = {} end if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs then WeakAurasSaved.CustomTrash.BuffButtons.Buffs = {} end
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons then WeakAurasSaved.CustomTrash.BuffButtons.Buttons = {} end if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons then WeakAurasSaved.CustomTrash.BuffButtons.Buttons = {} end
if not WeakAurasSaved.CustomTrash.BuffButtons.Groups then WeakAurasSaved.CustomTrash.BuffButtons.Groups = {} end if not WeakAurasSaved.CustomTrash.BuffButtons.Groups then WeakAurasSaved.CustomTrash.BuffButtons.Groups = {} end
aura_env.buttons = 0 aura_env.buttons = 0
aura_env.scanBuffs = function() aura_env.scanBuffs = function()
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
v.active = false v.active = false
end end
for i = 1, 40 do for i = 1, 40 do
local name = UnitBuff("player", i) local name = UnitBuff("player", i)
print(name) print(name)
if WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name] then if WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name] then
WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name].active = true WeakAurasSaved.CustomTrash.BuffButtons.Buffs[name].active = true
end end
if not name then break end if not name then break end
end end
aura_env.refreshButtons() aura_env.refreshButtons()
end end
aura_env.resortButtons = function() aura_env.resortButtons = function()
aura_env.buttons = 0 aura_env.buttons = 0
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do
if v:IsShown() == true then if v:IsShown() == true then
if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[k] then if not WeakAurasSaved.CustomTrash.BuffButtons.Buffs[k] then
v:Hide() v:Hide()
else else
v:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0) v:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0)
aura_env.buttons = aura_env.buttons + 1 aura_env.buttons = aura_env.buttons + 1
end end
end end
end end
end end
aura_env.refreshButtons = function() aura_env.refreshButtons = function()
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] or not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k][0] then if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] or not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k][0] then
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate") WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate")
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("type", "macro") WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("type", "macro")
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:RegisterForClicks("LeftButtonDown") WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:RegisterForClicks("LeftButtonDown")
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show() WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show()
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0) WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.buttons * aura_env.config.size, 0)
end end
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("macrotext", format("/use %s", k)) WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetAttribute("macrotext", format("/use %s", k))
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetSize(aura_env.config.size, aura_env.config.size) WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetSize(aura_env.config.size, aura_env.config.size)
end end
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buffs) do
if v.active == false then if v.active == false then
local texture = GetItemIcon(k) or GetSpellTexture(k) local texture = GetItemIcon(k) or GetSpellTexture(k)
if not GetSpellTexture(k) then if not GetSpellTexture(k) then
local count = GetItemCount(k) local count = GetItemCount(k)
if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text then WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text = WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:CreateFontString("ItemCount", "ARTWORK") end if not WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text then WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text = WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:CreateFontString("ItemCount", "ARTWORK") end
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetFont("Fonts\\FRIZQT__.TTF", aura_env.config.size / 2, "OUTLINE, MONOCHROME") WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetFont("Fonts\\FRIZQT__.TTF", aura_env.config.size / 2, "OUTLINE, MONOCHROME")
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetPoint("CENTER", WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k], "CENTER") WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetPoint("CENTER", WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k], "CENTER")
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetText(count) WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:SetText(count)
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:Show() WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k].Text:Show()
end end
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetNormalTexture(texture) WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:SetNormalTexture(texture)
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show() WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Show()
ActionButton_ShowOverlayGlow(WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]) ActionButton_ShowOverlayGlow(WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k])
else else
WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Hide() WeakAurasSaved.CustomTrash.BuffButtons.Buttons[k]:Hide()
end end
end end
aura_env.resortButtons() aura_env.resortButtons()
end end
for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do for k,v in pairs(WeakAurasSaved.CustomTrash.BuffButtons.Buttons) do
if k[0] then if k[0] then
print(k,v) print(k,v)
v:SetSize(aura_env.config.size, aura_env.config.size) v:SetSize(aura_env.config.size, aura_env.config.size)
ActionButton_HideOverlayGlow(k) ActionButton_HideOverlayGlow(k)
end end
end end
aura_env.scanBuffs() aura_env.scanBuffs()
--INIT --INIT
local xsize, ysize = aura_env.region:GetSize() local xsize, ysize = aura_env.region:GetSize()
if not aura_env.button then aura_env.button = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate") end if not aura_env.button then aura_env.button = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate") end
if aura_env.button then if aura_env.button then
aura_env.button:SetPoint("CENTER", aura_env.region, "CENTER") aura_env.button:SetPoint("CENTER", aura_env.region, "CENTER")
aura_env.button:SetSize(xsize, ysize) aura_env.button:SetSize(xsize, ysize)
aura_env.button:SetAttribute("type", "macro") aura_env.button:SetAttribute("type", "macro")
aura_env.button:RegisterForClicks("LeftButtonDown") aura_env.button:RegisterForClicks("LeftButtonDown")
aura_env.button:SetAttribute("macrotext", format("/use %s", aura_env.id)) aura_env.button:SetAttribute("macrotext", format("/use %s", aura_env.id))
end end

View File

@@ -1,357 +1,357 @@
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED --CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
function(e, ...) function(e, ...)
if aura_env.config.tsuenable == false then if aura_env.config.tsuenable == false then
local se = select(2, ...) local se = select(2, ...)
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
aura_env.damagepercentage = 0 aura_env.damagepercentage = 0
local unit = "target" local unit = "target"
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
local bossmax = UnitHealthMax(unit) local bossmax = UnitHealthMax(unit)
if aura_env.config.pdmg == true then if aura_env.config.pdmg == true then
for i = 1, 200 do for i = 1, 200 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name == "Conductive Ink" then if name == "Conductive Ink" then
local caster = select(7, UnitDebuff(unit, i)) local caster = select(7, UnitDebuff(unit, i))
local stacks = select(3, UnitDebuff(unit, i)) local stacks = select(3, UnitDebuff(unit, i))
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
aura_env.myTooltip:SetUnitDebuff(unit, i) aura_env.myTooltip:SetUnitDebuff(unit, i)
local text = _G["MyAddOnTooltipTextLeft2"]:GetText() local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
if text:match("Falling below %d*%% health will cause") then if text:match("Falling below %d*%% health will cause") then
local damage = text:match("inflict (%d+%,?%d*)") local damage = text:match("inflict (%d+%,?%d*)")
damage = damage:gsub("%,", "") damage = damage:gsub("%,", "")
damage = damage:gsub(" ", "") damage = damage:gsub(" ", "")
damage = tonumber(damage) damage = tonumber(damage)
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage
if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end
end end
elseif not name then break end elseif not name then break end
end end
else else
for i = 1, 200 do for i = 1, 200 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name == "Conductive Ink" then if name == "Conductive Ink" then
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i)) aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i))
aura_env.myTooltip:SetUnitDebuff(unit, i) aura_env.myTooltip:SetUnitDebuff(unit, i)
local text = _G["MyAddOnTooltipTextLeft2"]:GetText() local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
if text:match("Falling below %d*%% health will cause") then if text:match("Falling below %d*%% health will cause") then
aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)") aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)")
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "") aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "")
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "") aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "")
aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage) aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage)
end end
break break
elseif not name then break end elseif not name then break end
end end
end end
aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2) aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2)
return true return true
end end
end end
end end
--TSU --TSU
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED --CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
function(allstates, e, ...) function(allstates, e, ...)
if aura_env.config.tsuenable == true then if aura_env.config.tsuenable == true then
if InCombatLockdown() == true then if InCombatLockdown() == true then
--Base setup --Base setup
local unit = "target" local unit = "target"
if not aura_env.data then aura_env.data = {} end if not aura_env.data then aura_env.data = {} end
local crit = false local crit = false
local function update_allstates(data, unit) local function update_allstates(data, unit)
local maxdmg, maxstack = 0, 0 local maxdmg, maxstack = 0, 0
local totaldmg, totalstack = 0, 0 local totaldmg, totalstack = 0, 0
--Get max and total damage --Get max and total damage
for k,v in pairs(data) do for k,v in pairs(data) do
if v.d > maxdmg then if v.d > maxdmg then
maxdmg = v.d maxdmg = v.d
end end
if v.s > maxstack then if v.s > maxstack then
maxstack = v.s maxstack = v.s
end end
totaldmg = totaldmg + v.d totaldmg = totaldmg + v.d
totalstack = totalstack + v.s totalstack = totalstack + v.s
end end
--Get damage in boss % --Get damage in boss %
local perc = 0 local perc = 0
local pp = 0 local pp = 0
local islow = false local islow = false
if UnitExists(unit) then if UnitExists(unit) then
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit) local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
pp = hp/maxhp pp = hp/maxhp
if pp < 0.3 then islow = true end if pp < 0.3 then islow = true end
perc = aura_env.round(((totaldmg / maxhp) * 100), 2) perc = aura_env.round(((totaldmg / maxhp) * 100), 2)
end end
--Store all members in allstates --Store all members in allstates
for k,v in pairs(data) do for k,v in pairs(data) do
allstates[k] = { allstates[k] = {
show = true, show = true,
changed = true, changed = true,
resort = true, resort = true,
progressType = "static", progressType = "static",
caster = k, caster = k,
class = v.c, class = v.c,
value = v.d, value = v.d,
total = maxdmg, total = maxdmg,
index = v.d, index = v.d,
stacks = v.s, stacks = v.s,
crit = v.cr, crit = v.cr,
} }
end end
--Total bar control --Total bar control
if UnitExists(unit) then if UnitExists(unit) then
allstates[1] = { allstates[1] = {
show = true, show = true,
changed = true, changed = true,
resort = true, resort = true,
progressType = "static", progressType = "static",
caster = "Total", caster = "Total",
class = 5, --priest; White class = 5, --priest; White
value = totaldmg, value = totaldmg,
total = totaldmg, total = totaldmg,
index = totaldmg + 1, index = totaldmg + 1,
stacks = totalstack, stacks = totalstack,
percent = perc, percent = perc,
} }
if islow == true then if islow == true then
allstates[1].class = 15 allstates[1].class = 15
end end
end end
end end
--Debug and options --Debug and options
local command = UnitDebuff; if aura_env.config.debug == true then command = aura_env.UnitDebuffC end local command = UnitDebuff; if aura_env.config.debug == true then command = aura_env.UnitDebuffC end
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
--Trying to store info of debuff into data table from <unit>, looking for damage, stacks and caster, also included debug --Trying to store info of debuff into data table from <unit>, looking for damage, stacks and caster, also included debug
if UnitExists(unit) then if UnitExists(unit) then
if e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then if e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then
for k,v in pairs(allstates) do for k,v in pairs(allstates) do
v.show = false v.show = false
v.changed = true v.changed = true
end end
aura_env.data = {} aura_env.data = {}
if UnitExists(unit) then if UnitExists(unit) then
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit) local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
for i = 1, 100 do for i = 1, 100 do
local name = command(unit, i) local name = command(unit, i)
if name == "Conductive Ink" then if name == "Conductive Ink" then
local caster = select(7, command(unit, i)) local caster = select(7, command(unit, i))
caster = UnitName(caster) caster = UnitName(caster)
local stacks = select(3, command(unit, i)) local stacks = select(3, command(unit, i))
if aura_env.config.debug == false then if aura_env.config.debug == false then
aura_env.myTooltip:SetUnitDebuff(unit, i) aura_env.myTooltip:SetUnitDebuff(unit, i)
local text = _G["MyAddOnTooltipTextLeft2"]:GetText() local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
if text:match("Falling below %d*%% health will cause") then if text:match("Falling below %d*%% health will cause") then
local damage = text:match("inflict (%d+%,?%d*)") local damage = text:match("inflict (%d+%,?%d*)")
damage = damage:gsub("%,", "") damage = damage:gsub("%,", "")
damage = damage:gsub(" ", "") damage = damage:gsub(" ", "")
damage = tonumber(damage) damage = tonumber(damage)
aura_env.data[caster] = { aura_env.data[caster] = {
["d"] = damage, ["d"] = damage,
["s"] = stacks, ["s"] = stacks,
["c"] = select(3, UnitClass(caster)), ["c"] = select(3, UnitClass(caster)),
} }
end end
else else
local damage = i * 523427 local damage = i * 523427
aura_env.data[caster] = { aura_env.data[caster] = {
["d"] = damage, ["d"] = damage,
["s"] = stacks, ["s"] = stacks,
["c"] = select(4, command(unit, i)), ["c"] = select(4, command(unit, i)),
} }
end end
elseif not name then elseif not name then
break break
end end
end end
update_allstates(aura_env.data, unit) update_allstates(aura_env.data, unit)
end end
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...) local se = select(2, ...)
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit) local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
--Looking for debuff info upon applying new stack, to update data table --Looking for debuff info upon applying new stack, to update data table
if se == "SPELL_AURA_APPLIED_DOSE" then if se == "SPELL_AURA_APPLIED_DOSE" then
for i = 1, 100 do for i = 1, 100 do
local name = command(unit, i) local name = command(unit, i)
if name == "Conductive Ink" then if name == "Conductive Ink" then
local caster = select(7, command(unit, i)) local caster = select(7, command(unit, i))
caster = UnitName(caster) caster = UnitName(caster)
local stacks = select(3, command(unit, i)) local stacks = select(3, command(unit, i))
if aura_env.config.debug == false then if aura_env.config.debug == false then
aura_env.myTooltip:SetUnitDebuff(unit, i) aura_env.myTooltip:SetUnitDebuff(unit, i)
local text = _G["MyAddOnTooltipTextLeft2"]:GetText() local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
if text:match("Falling below %d*%% health will cause") then if text:match("Falling below %d*%% health will cause") then
local damage = text:match("inflict (%d+%,?%d*)") local damage = text:match("inflict (%d+%,?%d*)")
damage = damage:gsub("%,", "") damage = damage:gsub("%,", "")
damage = damage:gsub(" ", "") damage = damage:gsub(" ", "")
damage = tonumber(damage) damage = tonumber(damage)
aura_env.data[caster] = { aura_env.data[caster] = {
["d"] = damage, ["d"] = damage,
["s"] = stacks, ["s"] = stacks,
["c"] = select(3, UnitClass(caster)), ["c"] = select(3, UnitClass(caster)),
} }
end end
else else
local damage = i * 12312 local damage = i * 12312
aura_env.data[caster] = { aura_env.data[caster] = {
["d"] = damage, ["d"] = damage,
["s"] = stacks, ["s"] = stacks,
["c"] = select(4, command(unit, i)), ["c"] = select(4, command(unit, i)),
} }
end end
elseif not name then elseif not name then
break break
end end
update_allstates(aura_env.data, unit) update_allstates(aura_env.data, unit)
end end
--Looking for damage done by debuff at 30% and storing into data as new damage --Looking for damage done by debuff at 30% and storing into data as new damage
elseif se == "SPELL_DAMAGE" and select(13, ...) == "Conductive Ink" then elseif se == "SPELL_DAMAGE" and select(13, ...) == "Conductive Ink" then
local caster = select(5, ...) local caster = select(5, ...)
local hit = select(15, ...) local hit = select(15, ...)
local crit = select(21, ...) local crit = select(21, ...)
if aura_env.data[caster] then if aura_env.data[caster] then
aura_env.data[caster].d = hit aura_env.data[caster].d = hit
aura_env.data[caster].cr = crit aura_env.data[caster].cr = crit
update_allstates(aura_env.data, unit) update_allstates(aura_env.data, unit)
end end
end end
end end
end end
return true return true
end end
end end
end end
--CUSTOM TRIGGER --CUSTOM TRIGGER
function(t) function(t)
if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end
end end
--COLOR ANIMATION --COLOR ANIMATION
function() function()
if aura_env.state then if aura_env.statee then
return aura_env.classColor(aura_env.state.class) return aura_env.classColor(aura_env.statee.class)
end end
end end
--DISPLAY --DISPLAY
function() function()
if aura_env.config.tsuenable == false then if aura_env.config.tsuenable == false then
if aura_env.config.pdmg == true then if aura_env.config.pdmg == true then
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%") aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
else else
if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%") aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
end end
else else
if aura_env.state.caster == "Total" then if aura_env.statee.caster == "Total" then
return aura_env.shorten(aura_env.state.value) .. " - " .. aura_env.state.stacks .. " - " .. aura_env.state.percent .. "%" return aura_env.shorten(aura_env.statee.value) .. " - " .. aura_env.statee.stacks .. " - " .. aura_env.statee.percent .. "%"
else else
if aura_env.state.crit == true then if aura_env.statee.crit == true then
return aura_env.state.stacks .. " - " .. aura_env.shorten(aura_env.state.value) .. "(C)" return aura_env.statee.stacks .. " - " .. aura_env.shorten(aura_env.statee.value) .. "(C)"
else else
return aura_env.state.stacks .. " - " .. aura_env.shorten(aura_env.state.value) return aura_env.statee.stacks .. " - " .. aura_env.shorten(aura_env.statee.value)
end end
end end
end end
end end
--INIT --INIT
aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate") aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE") aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
if aura_env.config.tsuenable == false then if aura_env.config.tsuenable == false then
if not aura_env.region.text2 then if not aura_env.region.text2 then
local text2 = aura_env.region:CreateFontString(nil, aura_env.region) local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text2 = text2 aura_env.region.text2 = text2
end end
local font, size, flags = aura_env.region.text:GetFont() local font, size, flags = aura_env.region.text:GetFont()
aura_env.region.text2:SetFont(font, size, flags) aura_env.region.text2:SetFont(font, size, flags)
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4]) aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0) aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
aura_env.region.text2:SetText("") aura_env.region.text2:SetText("")
aura_env.region.text2:Show() aura_env.region.text2:Show()
if not aura_env.region.text3 then if not aura_env.region.text3 then
local text3 = aura_env.region:CreateFontString(nil, aura_env.region) local text3 = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text3 = text3 aura_env.region.text3 = text3
end end
local font, size, flags = aura_env.region.text:GetFont() local font, size, flags = aura_env.region.text:GetFont()
aura_env.region.text3:SetFont(font, size, flags) aura_env.region.text3:SetFont(font, size, flags)
aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4]) aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0) aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0)
aura_env.region.text3:SetText("") aura_env.region.text3:SetText("")
aura_env.region.text3:Show() aura_env.region.text3:Show()
aura_env.region.bar:Hide() aura_env.region.bar:Hide()
end end
if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end
if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end
if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() end if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() end
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == 1 then return 0.78, 0.61, 0.43 if class == 1 then return 0.78, 0.61, 0.43
elseif class == 2 then return 0.96, 0.55, 0.73 elseif class == 2 then return 0.96, 0.55, 0.73
elseif class == 3 then return 0.67, 0.83, 0.45 elseif class == 3 then return 0.67, 0.83, 0.45
elseif class == 4 then return 1, 0.96, 0.41, 1 elseif class == 4 then return 1, 0.96, 0.41, 1
elseif class == 5 then return 1, 1, 1 elseif class == 5 then return 1, 1, 1
elseif class == 6 then return 0.77, 0.12, 0.23 elseif class == 6 then return 0.77, 0.12, 0.23
elseif class == 7 then return 0, 0.44, 0.87 elseif class == 7 then return 0, 0.44, 0.87
elseif class == 8 then return 0.25, 0.78, 0.92 elseif class == 8 then return 0.25, 0.78, 0.92
elseif class == 9 then return 0.53, 0.53, 0.93 elseif class == 9 then return 0.53, 0.53, 0.93
elseif class == 10 then return 0, 1, 0.59 elseif class == 10 then return 0, 1, 0.59
elseif class == 11 then return 1, 0.49, 0.04 elseif class == 11 then return 1, 0.49, 0.04
elseif class == 12 then return 0.64, 0.19, 0.79 elseif class == 12 then return 0.64, 0.19, 0.79
elseif class == 15 then return 0, 1, 0 elseif class == 15 then return 0, 1, 0
else return 1, 1, 1 end else return 1, 1, 1 end
end end
--TESTING --TESTING
--Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1 --Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1
aura_env.UnitDebuffC = function(unit, i) aura_env.UnitDebuffC = function(unit, i)
if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko" if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko"
elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy" elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy"
elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary" elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary"
elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna" elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna"
elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John" elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John"
elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank" elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank"
elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma" elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma"
elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia" elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia"
elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry" elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry"
elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan" elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan"
elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael" elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael"
end end
end end

View File

@@ -1,87 +1,87 @@
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS --CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS
function(e, msg, sender, ...) function(e, msg, sender, ...)
if not aura_env.toggle then aura_env.toggle = 1 end if not aura_env.toggle then aura_env.toggle = 1 end
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = { if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
["port"] = 1, ["port"] = 1,
["portal"] = 1, ["portal"] = 1,
["org"] = 1, ["org"] = 1,
["og"] = 1, ["og"] = 1,
["uc"] = 1, ["uc"] = 1,
["under"] = 1, ["under"] = 1,
["thunder"] = 1, ["thunder"] = 1,
["tb"] = 1, ["tb"] = 1,
["wtb"] = 1, ["wtb"] = 1,
} }
end end
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
local class = select(2, GetPlayerInfoByGUID(select(10, ...))) local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
if msg and aura_env.toggle == 1 then if msg and aura_env.toggle == 1 then
msg = msg:lower() msg = msg:lower()
local noRealmSender = sender:match("(.+)-%w+") local noRealmSender = sender:match("(.+)-%w+")
for k,v in pairs(WeakAurasSaved.MagusKeywords) do for k,v in pairs(WeakAurasSaved.MagusKeywords) do
if msg:match(k) then if msg:match(k) then
local st, en = msg:find(k) local st, en = msg:find(k)
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
InviteUnit(sender) InviteUnit(sender)
return true return true
end end
end end
end end
end end
elseif e == "TOGGLE_MAGUS" then elseif e == "TOGGLE_MAGUS" then
if aura_env.toggle == 0 then if aura_env.toggle == 0 then
print("Toggling script on") print("Toggling script on")
aura_env.toggle = 1 aura_env.toggle = 1
else else
print("Toggling script off") print("Toggling script off")
aura_env.toggle = 0 aura_env.toggle = 0
end end
elseif e == "ADD_KEYWORD" then elseif e == "ADD_KEYWORD" then
if msg then if msg then
print("Adding", msg) print("Adding", msg)
msg = msg:lower() msg = msg:lower()
WeakAurasSaved.MagusKeywords[msg] = 1 WeakAurasSaved.MagusKeywords[msg] = 1
else else
print("No keyword provided") print("No keyword provided")
end end
elseif e == "LIST_KEYWORDS" then elseif e == "LIST_KEYWORDS" then
local test = "" local test = ""
for k,v in pairs(WeakAurasSaved.MagusKeywords) do for k,v in pairs(WeakAurasSaved.MagusKeywords) do
print(k) print(k)
test = test .. k .. "\n" test = test .. k .. "\n"
end end
message(test) message(test)
elseif e == "REMOVE_KEYWORD" then elseif e == "REMOVE_KEYWORD" then
if msg then if msg then
if WeakAurasSaved.MagusKeywords[msg] then if WeakAurasSaved.MagusKeywords[msg] then
print("Removing", msg) print("Removing", msg)
WeakAurasSaved.MagusKeywords[msg] = nil WeakAurasSaved.MagusKeywords[msg] = nil
else else
print(msg, "does not exist in the keyword table") print(msg, "does not exist in the keyword table")
end end
else else
print("No keyword provided") print("No keyword provided")
end end
end end
end end
--INIT --INIT
aura_env.button = CreateFrame("Button", "buton", UIParent, "SecureActionButtonTemplate") aura_env.button = CreateFrame("Button", "buton", UIParent, "SecureActionButtonTemplate")
aura_env.button:SetAttribute("type", "macro") aura_env.button:SetAttribute("type", "macro")
aura_env.button:SetPoint("CENTER", UIParent, "CENTER") aura_env.button:SetPoint("CENTER", UIParent, "CENTER")
aura_env.button:SetWidth(128) aura_env.button:SetWidth(128)
aura_env.button:SetHeight(128) aura_env.button:SetHeight(128)
aura_env.button:SetNormalTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp") aura_env.button:SetNormalTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp")
aura_env.button:SetPushedTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp") aura_env.button:SetPushedTexture("interface/icons/inv_misc_enggizmos_rocketchicken.blp")
if not aura_env.toggle then aura_env.toggle = 1 end if not aura_env.toggle then aura_env.toggle = 1 end
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = { if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
"port", "port",
"portal", "portal",
"org", "org",
"og", "og",
"UC", "UC",
"under", "under",
"thunder", "thunder",
"tb", "tb",
"wtb", "wtb",
} }

View File

@@ -1,84 +1,84 @@
--COMBAT_LOG_EVENT_UNFILTERED UNIT_STATS PLAYER_TARGET_CHANGED --COMBAT_LOG_EVENT_UNFILTERED UNIT_STATS PLAYER_TARGET_CHANGED
function(e, ...) function(e, ...)
local function updateStats() local function updateStats()
aura_env.output = "BUFFS " aura_env.output = "BUFFS "
local noBuffs = 0 local noBuffs = 0
local hitPercent = 0 local hitPercent = 0
local critPercent = 0 local critPercent = 0
local attackPower = 0 local attackPower = 0
local effArmor = 0 local effArmor = 0
local armorPercent = 0 local armorPercent = 0
for i = 1, 40 do for i = 1, 40 do
if UnitBuff("player", i) then if UnitBuff("player", i) then
noBuffs = noBuffs + 1 noBuffs = noBuffs + 1
end end
end end
hitPercent = GetCombatRatingBonus(6) + GetHitModifier() hitPercent = GetCombatRatingBonus(6) + GetHitModifier()
critPercent = GetCritChance() critPercent = GetCritChance()
local base, pos, neg = UnitAttackPower("player") local base, pos, neg = UnitAttackPower("player")
attackPower = base + pos - neg attackPower = base + pos - neg
effArmor = select(2, UnitArmor("player")) effArmor = select(2, UnitArmor("player"))
if UnitExists("target") then if UnitExists("target") then
local tlevel = UnitLevel("target") local tlevel = UnitLevel("target")
if tlevel < 60 then if tlevel < 60 then
armorPercent = (effArmor / ((85 * tlevel) + effArmor + 400)) * 100 armorPercent = (effArmor / ((85 * tlevel) + effArmor + 400)) * 100
elseif tlevel >= 60 then elseif tlevel >= 60 then
armorPercent = (effArmor / ((467.5 * tlevel) + effArmor - 22167.5)) * 100 armorPercent = (effArmor / ((467.5 * tlevel) + effArmor - 22167.5)) * 100
end end
end end
-- BUFFS %d%d (5 + 2 + 1 = 8 + 4) -- BUFFS %d%d (5 + 2 + 1 = 8 + 4)
aura_env.output = aura_env.output .. noBuffs aura_env.output = aura_env.output .. noBuffs
while string.len(aura_env.output) < 12 do while string.len(aura_env.output) < 12 do
aura_env.output = aura_env.output .. " " aura_env.output = aura_env.output .. " "
end end
-- BUFFS %d%d<4>HIT %d%d.%d (12 + 3 + 1 + 4 = 20 + 4) -- BUFFS %d%d<4>HIT %d%d.%d (12 + 3 + 1 + 4 = 20 + 4)
aura_env.output = aura_env.output .. "HIT " .. math.ceil((hitPercent * 10)) / 10 .. "%" aura_env.output = aura_env.output .. "HIT " .. math.ceil((hitPercent * 10)) / 10 .. "%"
while string.len(aura_env.output) < 24 do while string.len(aura_env.output) < 24 do
aura_env.output = aura_env.output .. " " aura_env.output = aura_env.output .. " "
end end
-- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d (24 + 4 + 1 + 4 = 33 + 4) -- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d (24 + 4 + 1 + 4 = 33 + 4)
aura_env.output = aura_env.output .. "CRIT " .. math.ceil((critPercent * 10)) / 10 .. "%" aura_env.output = aura_env.output .. "CRIT " .. math.ceil((critPercent * 10)) / 10 .. "%"
while string.len(aura_env.output) < 37 do while string.len(aura_env.output) < 37 do
aura_env.output = aura_env.output .. " " aura_env.output = aura_env.output .. " "
end end
-- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d<4>AP %d+ -- BUFFS %d%d<4>HIT %d%d.%d<4>CRIT %d%d.%d<4>AP %d+
-- APPEND AP -- APPEND AP
-- 37 + 3 + 8 = 48 -- 37 + 3 + 8 = 48
aura_env.output = aura_env.output .. "AP " .. attackPower aura_env.output = aura_env.output .. "AP " .. attackPower
while string.len(aura_env.output) < 48 do while string.len(aura_env.output) < 48 do
aura_env.output = aura_env.output .. " " aura_env.output = aura_env.output .. " "
end end
aura_env.output = aura_env.output .. "A " .. effArmor .. " " .. math.ceil((armorPercent * 10)) / 10 .. "%" aura_env.output = aura_env.output .. "A " .. effArmor .. " " .. math.ceil((armorPercent * 10)) / 10 .. "%"
end end
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...) local se = select(2, ...)
local subevents = { local subevents = {
["SPELL_AURA_APPLIED"] = true, ["SPELL_AURA_APPLIED"] = true,
["SPELL_AURA_APPLIED_DOSE"] = true, ["SPELL_AURA_APPLIED_DOSE"] = true,
["SPELL_AURA_REMOVED"] = true, ["SPELL_AURA_REMOVED"] = true,
["SPELL_AURA_REMOVED_DOSE"] = true, ["SPELL_AURA_REMOVED_DOSE"] = true,
["SPELL_AURA_REFRESH"] = true, ["SPELL_AURA_REFRESH"] = true,
} }
if subevents[se] then if subevents[se] then
local target = select(9, ...) local target = select(9, ...)
if target == UnitName("player") then if target == UnitName("player") then
updateStats() updateStats()
return true return true
end end
end end
elseif e == "UNIT_STATS" or e == "PLAYER_TARGET_CHANGED" then elseif e == "UNIT_STATS" or e == "PLAYER_TARGET_CHANGED" then
updateStats() updateStats()
return true return true
end end
end end
--DISPLAY --DISPLAY
function() function()
return aura_env.output or "" return aura_env.output or ""
end end
--INIT --INIT
aura_env.output = "" aura_env.output = ""
WeakAuras.ScanEvents("UNIT_STATS") WeakAuras.ScanEvents("UNIT_STATS")

View File

@@ -1,81 +1,81 @@
--UNIT_HEALTH UNIT_AURA PLAYER_REGEN_DISABLED --UNIT_HEALTH UNIT_AURA PLAYER_REGEN_DISABLED
function(e, u) function(e, u)
if e == "PLAYER_REGEN_DISABLED" then if e == "PLAYER_REGEN_DISABLED" then
aura_env.lowppl = 0 aura_env.lowppl = 0
aura_env.renw = 0 aura_env.renw = 0
elseif e == "UNIT_AURA" then elseif e == "UNIT_AURA" then
if u == "player" then if u == "player" then
local i = 1 local i = 1
while UnitBuff(u, i) do while UnitBuff(u, i) do
local name = UnitBuff(u, i) local name = UnitBuff(u, i)
if name == "Mana Tea" then if name == "Mana Tea" then
aura_env.manaTea = true aura_env.manaTea = true
break break
end end
i = i + 1 i = i + 1
end end
elseif u:match("raid") then elseif u:match("raid") then
if not aura_env.people[u] then aura_env.people[u] = {} end if not aura_env.people[u] then aura_env.people[u] = {} end
aura_env.people[u].buff = false aura_env.people[u].buff = false
local i = 1 local i = 1
while UnitBuff(u, i) do while UnitBuff(u, i) do
local caster = select(8, UnitBuff(u, i)) local caster = select(8, UnitBuff(u, i))
local name = UnitBuff(u, i) local name = UnitBuff(u, i)
if name == "Renewing Mist" and caster == "player" then if name == "Renewing Mist" and caster == "player" then
aura_env.people[u].buff = true aura_env.people[u].buff = true
break break
end end
i = i + 1 i = i + 1
end end
aura_env.renw = 0 aura_env.renw = 0
for k,v in pairs(aura_env.people) do for k,v in pairs(aura_env.people) do
if v.buff == true then if v.buff == true then
aura_env.renw = aura_env.renw + 1 aura_env.renw = aura_env.renw + 1
end end
end end
end end
return true return true
elseif e == "UNIT_HEALTH" then elseif e == "UNIT_HEALTH" then
if u:match("raid") then if u:match("raid") then
if not aura_env.people[u] then aura_env.people[u] = {} end if not aura_env.people[u] then aura_env.people[u] = {} end
aura_env.people[u].hp = UnitHealth(u) aura_env.people[u].hp = UnitHealth(u)
aura_env.people[u].mhp = UnitHealthMax(u) aura_env.people[u].mhp = UnitHealthMax(u)
aura_env.people[u].php = UnitHealth(u) / UnitHealthMax(u) aura_env.people[u].php = UnitHealth(u) / UnitHealthMax(u)
if aura_env.people[u].php < aura_env.config.low then if aura_env.people[u].php < aura_env.config.low then
aura_env.people[u].low = true aura_env.people[u].low = true
else else
aura_env.people[u].low = false aura_env.people[u].low = false
end end
end end
aura_env.lowppl = 0 aura_env.lowppl = 0
for k,v in pairs(aura_env.people) do for k,v in pairs(aura_env.people) do
if v.low == true then if v.low == true then
aura_env.lowppl = aura_env.lowppl + 1 aura_env.lowppl = aura_env.lowppl + 1
end end
end end
return true return true
end end
return true return true
end end
--ICON --ICON
function() function()
if aura_env.manaTea == true then if aura_env.manaTea == true then
return 1360980 return 1360980
elseif aura_env.lowppl < 6 or aura_env.renw >= 5 then elseif aura_env.lowppl < 6 or aura_env.renw >= 5 then
return 1360980 return 1360980
elseif aura_env.lowppl >= 6 and aura_env.renw < 5 then elseif aura_env.lowppl >= 6 and aura_env.renw < 5 then
return 1360978 return 1360978
end end
end end
--DISPLAY --DISPLAY
function() function()
return format("Renewing mists active: %d\nPeople on low health: %d", aura_env.renw, aura_env.lowppl) return format("Renewing mists active: %d\nPeople on low health: %d", aura_env.renw, aura_env.lowppl)
end end
--INIT --INIT
aura_env.manaTea = false aura_env.manaTea = false
aura_env.lowppl = 0 aura_env.lowppl = 0
aura_env.renw = 0 aura_env.renw = 0
aura_env.people = {} aura_env.people = {}

View File

@@ -1,54 +1,54 @@
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_CHANNEL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS --CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_CHANNEL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS
function(e, msg, sender, ...) function(e, msg, sender, ...)
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" or e == "CHAT_MSG_CHANNEL" then if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" or e == "CHAT_MSG_CHANNEL" then
local class = select(2, GetPlayerInfoByGUID(select(10, ...))) local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
if msg and aura_env.toggle == 1 then if msg and aura_env.toggle == 1 then
msg = msg:lower() msg = msg:lower()
local noRealmSender = sender:match("(.+)-%w+") local noRealmSender = sender:match("(.+)-%w+")
for k,v in pairs(WeakAurasSaved.MagusKeywords) do for k,v in pairs(WeakAurasSaved.MagusKeywords) do
if msg:match(k) then if msg:match(k) then
local st, en = msg:find(k) local st, en = msg:find(k)
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
InviteUnit(sender) InviteUnit(sender)
end end
end end
end end
end end
elseif e == "TOGGLE_MAGUS" then elseif e == "TOGGLE_MAGUS" then
if aura_env.toggle == 0 then if aura_env.toggle == 0 then
print("Toggling script on") print("Toggling script on")
aura_env.toggle = 1 aura_env.toggle = 1
else else
print("Toggling script off") print("Toggling script off")
aura_env.toggle = 0 aura_env.toggle = 0
end end
elseif e == "ADD_KEYWORD" then elseif e == "ADD_KEYWORD" then
if msg then if msg then
print("Adding", msg) print("Adding", msg)
msg = msg:lower() msg = msg:lower()
WeakAurasSaved.MagusKeywords[msg] = 1 WeakAurasSaved.MagusKeywords[msg] = 1
else else
print("No keyword provided") print("No keyword provided")
end end
elseif e == "LIST_KEYWORDS" then elseif e == "LIST_KEYWORDS" then
for k,v in pairs(WeakAurasSaved.MagusKeywords) do for k,v in pairs(WeakAurasSaved.MagusKeywords) do
print(k) print(k)
end end
elseif e == "REMOVE_KEYWORD" then elseif e == "REMOVE_KEYWORD" then
if msg then if msg then
if WeakAurasSaved.MagusKeywords[msg] then if WeakAurasSaved.MagusKeywords[msg] then
print("Removing", msg) print("Removing", msg)
WeakAurasSaved.MagusKeywords[msg] = nil WeakAurasSaved.MagusKeywords[msg] = nil
else else
print(msg, "does not exist in the keyword table") print(msg, "does not exist in the keyword table")
end end
else else
print("No keyword provided") print("No keyword provided")
end end
end end
end end
--INIT --INIT
aura_env.toggle = 0 aura_env.toggle = 0
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {} end

View File

@@ -1,12 +1,12 @@
--GOSSIP_SHOW UPDATE_BATTLEFIELD_STATUS --GOSSIP_SHOW UPDATE_BATTLEFIELD_STATUS
function(e, ...) function(e, ...)
if e == "GOSSIP_SHOW" then if e == "GOSSIP_SHOW" then
local target = UnitName("target") local target = UnitName("target")
if target:match("Grizzle Halfmane") or target:match("Kartra Bloodsnarl") or target:match("Glordrum Steelbeard") or target:match("Thelman Slatefist") or target:match(" Taim Ragetotem") or target:match("Brogun Stoneshield") or target:match("Innkeeper Gryshka") then if target:match("Grizzle Halfmane") or target:match("Kartra Bloodsnarl") or target:match("Glordrum Steelbeard") or target:match("Thelman Slatefist") or target:match(" Taim Ragetotem") or target:match("Brogun Stoneshield") or target:match("Innkeeper Gryshka") then
GossipTitleButton1:Click() GossipTitleButton1:Click()
BattlefieldFrameJoinButton:Click() BattlefieldFrameJoinButton:Click()
end end
elseif e == "UPDATE_BATTLEFIELD_STATUS" then elseif e == "UPDATE_BATTLEFIELD_STATUS" then
StaticPopup1Button1:Click() StaticPopup1Button1:Click()
end end
end end

View File

@@ -1,277 +1,277 @@
--CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS CHAT_MSG_SYSTEM COMBAT_LOG_EVENT_UNFILTERED TRADE_SHOW TRADE_MONEY_CHANGED PLAYER_TRADE_MONEY TRADE_ACCEPT_UPDATE TRADE_CLOSED --CHAT_MSG_SAY CHAT_MSG_YELL CHAT_MSG_WHISPER ADD_KEYWORD REMOVE_KEYWORD LIST_KEYWORDS TOGGLE_MAGUS CHAT_MSG_SYSTEM COMBAT_LOG_EVENT_UNFILTERED TRADE_SHOW TRADE_MONEY_CHANGED PLAYER_TRADE_MONEY TRADE_ACCEPT_UPDATE TRADE_CLOSED
function(e, msg, sender, ...) function(e, msg, sender, ...)
local function updateText() local function updateText()
local texts = {[1] = {}, [2] = {}, [3] = {}, [4] = {}} local texts = {[1] = {}, [2] = {}, [3] = {}, [4] = {}}
for k,v in pairs(aura_env.people) do for k,v in pairs(aura_env.people) do
if v.state == 5 then if v.state == 5 then
if v.kw == "uc" or v.kw == "under" or v.kw == "undercity" then if v.kw == "uc" or v.kw == "under" or v.kw == "undercity" then
texts[1][#texts[1] + 1] = k texts[1][#texts[1] + 1] = k
elseif v.kw == "org" or v.kw == "og" or v.kw == "orgrimmar" then elseif v.kw == "org" or v.kw == "og" or v.kw == "orgrimmar" then
texts[2][#texts[2] + 1] = k texts[2][#texts[2] + 1] = k
elseif v.kw == "tb" or v.kw == "thunder" or v.kw == "thunderbluff" then elseif v.kw == "tb" or v.kw == "thunder" or v.kw == "thunderbluff" then
texts[3][#texts[3] + 1] = k texts[3][#texts[3] + 1] = k
elseif v.kw == "test" then elseif v.kw == "test" then
texts[4][#texts[4] + 1] = k texts[4][#texts[4] + 1] = k
end end
end end
end end
for k,v in pairs(texts) do for k,v in pairs(texts) do
local text = "" local text = ""
for k2,v2 in pairs(v) do for k2,v2 in pairs(v) do
text = text .. v2 .. "\n" text = text .. v2 .. "\n"
end end
WeakAurasSaved.MagusKeywords.buttons[k].text:SetText(text) WeakAurasSaved.MagusKeywords.buttons[k].text:SetText(text)
end end
end end
local aura_env = aura_env local aura_env = aura_env
if not aura_env.toggle then aura_env.toggle = 1 end if not aura_env.toggle then aura_env.toggle = 1 end
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = { if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
["port"] = 1, ["port"] = 1,
["portal"] = 1, ["portal"] = 1,
["org"] = 1, ["org"] = 1,
["og"] = 1, ["og"] = 1,
["uc"] = 1, ["uc"] = 1,
["under"] = 1, ["under"] = 1,
["thunder"] = 1, ["thunder"] = 1,
["tb"] = 1, ["tb"] = 1,
["wtb"] = 1, ["wtb"] = 1,
["test"] = 1, ["test"] = 1,
} end } end
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
local class = select(2, GetPlayerInfoByGUID(select(10, ...))) local class = select(2, GetPlayerInfoByGUID(select(10, ...)))
if msg and aura_env.toggle == 1 then if msg and aura_env.toggle == 1 then
msg = msg:lower() msg = msg:lower()
local noRealmSender = sender:match("(.+)-?%w*") or sender local noRealmSender = sender:match("(.+)-?%w*") or sender
for k,v in pairs(WeakAurasSaved.MagusKeywords) do for k,v in pairs(WeakAurasSaved.MagusKeywords) do
if msg:match(k) then if msg:match(k) then
local st, en = msg:find(k) local st, en = msg:find(k)
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and class ~= "MAGE" then
InviteUnit(sender) InviteUnit(sender)
if not aura_env.people[noRealmSender] then aura_env.people[noRealmSender] = {["state"] = 0, ["kw"] = k} end if not aura_env.people[noRealmSender] then aura_env.people[noRealmSender] = {["state"] = 0, ["kw"] = k} end
return true return true
end end
end end
end end
end end
elseif e == "CHAT_MSG_SYSTEM" then elseif e == "CHAT_MSG_SYSTEM" then
if msg:match("You have invited") then if msg:match("You have invited") then
local sender = msg:match("You have invited (.+) to join your group") local sender = msg:match("You have invited (.+) to join your group")
local noRealmSender = sender:match("(.+)-%w+") or sender local noRealmSender = sender:match("(.+)-%w+") or sender
if aura_env.people[noRealmSender] then if aura_env.people[noRealmSender] then
aura_env.people[noRealmSender].state = 0 aura_env.people[noRealmSender].state = 0
end end
elseif msg:match("joins the party") then elseif msg:match("joins the party") then
local sender = msg:match("(.+) joins the party") local sender = msg:match("(.+) joins the party")
local noRealmSender = sender:match("(.+)-%w+") or sender local noRealmSender = sender:match("(.+)-%w+") or sender
if aura_env.people[noRealmSender] and aura_env.people[noRealmSender].state == 0 then if aura_env.people[noRealmSender] and aura_env.people[noRealmSender].state == 0 then
aura_env.people[noRealmSender].state = 1 aura_env.people[noRealmSender].state = 1
for i = 1, GetNumGroupMembers() do for i = 1, GetNumGroupMembers() do
if UnitName("party" .. i) == sender then if UnitName("party" .. i) == sender then
aura_env.people[noRealmSender].unitID = "party" .. i aura_env.people[noRealmSender].unitID = "party" .. i
break break
end end
end end
--If not tradeable create ticker and do other stuff --If not tradeable create ticker and do other stuff
if CheckInteractDistance(aura_env.people[noRealmSender].unitID, 2) then if CheckInteractDistance(aura_env.people[noRealmSender].unitID, 2) then
InitiateTrade(aura_env.people[noRealmSender].unitID) InitiateTrade(aura_env.people[noRealmSender].unitID)
aura_env.people[noRealmSender].state = 2 aura_env.people[noRealmSender].state = 2
end end
end end
elseif msg:match("leaves the party") then elseif msg:match("leaves the party") then
local sender = msg:match("(.+) leaves the party") local sender = msg:match("(.+) leaves the party")
local noRealmSender = sender:match("(.+)-%w+") or sender local noRealmSender = sender:match("(.+)-%w+") or sender
if aura_env.people[noRealmSender] and aura_env[noRealmSender].state == 6 then if aura_env.people[noRealmSender] and aura_env[noRealmSender].state == 6 then
aura_env.people[noRealmSender] = nil aura_env.people[noRealmSender] = nil
end end
end end
elseif e == "TRADE_SHOW" then elseif e == "TRADE_SHOW" then
for k,v in pairs(aura_env.people) do for k,v in pairs(aura_env.people) do
if v.state == 2 then if v.state == 2 then
aura_env.isTrade = true aura_env.isTrade = true
aura_env.tradee = k aura_env.tradee = k
aura_env.people[k].state = 3 aura_env.people[k].state = 3
end end
end end
elseif e == "TRADE_ACCEPT_UPDATE" then elseif e == "TRADE_ACCEPT_UPDATE" then
if msg == 1 and sender == 1 then if msg == 1 and sender == 1 then
if aura_env.isTrade == true then if aura_env.isTrade == true then
aura_env.people[aura_env.tradee].state = 4 aura_env.people[aura_env.tradee].state = 4
if aura_env.people[aura_env.tradee].kw == "uc" or aura_env.people[aura_env.tradee].kw == "under" or aura_env.people[aura_env.tradee].kw == "undercity" then if aura_env.people[aura_env.tradee].kw == "uc" or aura_env.people[aura_env.tradee].kw == "under" or aura_env.people[aura_env.tradee].kw == "undercity" then
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3]) ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3])
aura_env.castQueue["Portal: Undercity"] = true aura_env.castQueue["Portal: Undercity"] = true
aura_env.people[aura_env.tradee]["Portal: Undercity"] = true aura_env.people[aura_env.tradee]["Portal: Undercity"] = true
aura_env.people[aura_env.tradee].state = 5 aura_env.people[aura_env.tradee].state = 5
elseif aura_env.people[aura_env.tradee].kw == "org" or aura_env.people[aura_env.tradee].kw == "og" or aura_env.people[aura_env.tradee].kw == "orgrimmar" then elseif aura_env.people[aura_env.tradee].kw == "org" or aura_env.people[aura_env.tradee].kw == "og" or aura_env.people[aura_env.tradee].kw == "orgrimmar" then
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2]) ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2])
aura_env.castQueue["Portal: Orgrimmar"] = true aura_env.castQueue["Portal: Orgrimmar"] = true
aura_env.people[aura_env.tradee]["Portal: Orgrimmar"] = true aura_env.people[aura_env.tradee]["Portal: Orgrimmar"] = true
aura_env.people[aura_env.tradee].state = 5 aura_env.people[aura_env.tradee].state = 5
elseif aura_env.people[aura_env.tradee].kw == "tb" or aura_env.people[aura_env.tradee].kw == "thunder" or aura_env.people[aura_env.tradee].kw == "thunderbluff" then elseif aura_env.people[aura_env.tradee].kw == "tb" or aura_env.people[aura_env.tradee].kw == "thunder" or aura_env.people[aura_env.tradee].kw == "thunderbluff" then
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1]) ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1])
aura_env.castQueue["Portal: Thunder Bluff"] = true aura_env.castQueue["Portal: Thunder Bluff"] = true
aura_env.people[aura_env.tradee]["Portal: Thunder Bluff"] = true aura_env.people[aura_env.tradee]["Portal: Thunder Bluff"] = true
aura_env.people[aura_env.tradee].state = 5 aura_env.people[aura_env.tradee].state = 5
elseif aura_env.people[aura_env.tradee].kw == "test" then elseif aura_env.people[aura_env.tradee].kw == "test" then
ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4]) ActionButton_ShowOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4])
aura_env.castQueue["Consecration"] = true aura_env.castQueue["Consecration"] = true
aura_env.people[aura_env.tradee]["Consecration"] = true aura_env.people[aura_env.tradee]["Consecration"] = true
aura_env.people[aura_env.tradee].state = 5 aura_env.people[aura_env.tradee].state = 5
end end
aura_env.isTrade = false aura_env.isTrade = false
aura_env.tradee = "" aura_env.tradee = ""
updateText() updateText()
end end
end end
elseif e == "TRADE_CLOSED" then elseif e == "TRADE_CLOSED" then
if aura_env.isTrade == true then if aura_env.isTrade == true then
aura_env.people[aura_env.tradee].state = 2 aura_env.people[aura_env.tradee].state = 2
aura_env.isTrade = false aura_env.isTrade = false
aura_env.tradee = "" aura_env.tradee = ""
end end
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = sender local se = sender
local caster = select(3, ...) local caster = select(3, ...)
if se == "SPELL_CAST_SUCCESS" and caster == UnitName("player") then if se == "SPELL_CAST_SUCCESS" and caster == UnitName("player") then
local spell = select(11, ...) local spell = select(11, ...)
if aura_env.castQueue[spell] == true then aura_env.castQueue[spell] = false end if aura_env.castQueue[spell] == true then aura_env.castQueue[spell] = false end
if spell == "Portal: Undercity" then if spell == "Portal: Undercity" then
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3]) ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[3])
elseif spell == "Portal: Orgrimmar" then elseif spell == "Portal: Orgrimmar" then
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2]) ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[2])
elseif spell == "Portal: Thunder Bluff" then elseif spell == "Portal: Thunder Bluff" then
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1]) ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[1])
elseif spell == "Consecration" then elseif spell == "Consecration" then
ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4]) ActionButton_HideOverlayGlow(WeakAurasSaved.MagusKeywords.buttons[4])
end end
for k,v in pairs(aura_env.people) do for k,v in pairs(aura_env.people) do
if v[spell] and v.state == 5 then if v[spell] and v.state == 5 then
v[spell] = false v[spell] = false
aura_env.people[k] = nil aura_env.people[k] = nil
updateText() updateText()
end end
end end
end end
elseif e == "TOGGLE_MAGUS" then elseif e == "TOGGLE_MAGUS" then
if aura_env.toggle == 0 then if aura_env.toggle == 0 then
print("Toggling script on") print("Toggling script on")
aura_env.toggle = 1 aura_env.toggle = 1
for i = 1, 3 do for i = 1, 3 do
WeakAurasSaved.MagusKeywords.buttons[i]:Show() WeakAurasSaved.MagusKeywords.buttons[i]:Show()
end end
else else
print("Toggling script off") print("Toggling script off")
aura_env.toggle = 0 aura_env.toggle = 0
for i = 1, 3 do for i = 1, 3 do
WeakAurasSaved.MagusKeywords.buttons[i]:Hide() WeakAurasSaved.MagusKeywords.buttons[i]:Hide()
end end
end end
elseif e == "ADD_KEYWORD" then elseif e == "ADD_KEYWORD" then
if msg then if msg then
print("Adding", msg) print("Adding", msg)
msg = msg:lower() msg = msg:lower()
WeakAurasSaved.MagusKeywords[msg] = 1 WeakAurasSaved.MagusKeywords[msg] = 1
else else
print("No keyword provided") print("No keyword provided")
end end
elseif e == "LIST_KEYWORDS" then elseif e == "LIST_KEYWORDS" then
local test = "" local test = ""
for k,v in pairs(WeakAurasSaved.MagusKeywords) do for k,v in pairs(WeakAurasSaved.MagusKeywords) do
print(k) print(k)
test = test .. k .. "\n" test = test .. k .. "\n"
end end
message(test) message(test)
elseif e == "REMOVE_KEYWORD" then elseif e == "REMOVE_KEYWORD" then
if msg then if msg then
if WeakAurasSaved.MagusKeywords[msg] then if WeakAurasSaved.MagusKeywords[msg] then
print("Removing", msg) print("Removing", msg)
WeakAurasSaved.MagusKeywords[msg] = nil WeakAurasSaved.MagusKeywords[msg] = nil
else else
print(msg, "does not exist in the keyword table") print(msg, "does not exist in the keyword table")
end end
else else
print("No keyword provided") print("No keyword provided")
end end
end end
end end
--INIT --INIT
if not aura_env.toggle then aura_env.toggle = 1 end if not aura_env.toggle then aura_env.toggle = 1 end
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = { if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {
["port"] = 1, ["port"] = 1,
["portal"] = 1, ["portal"] = 1,
["org"] = 1, ["org"] = 1,
["og"] = 1, ["og"] = 1,
["uc"] = 1, ["uc"] = 1,
["under"] = 1, ["under"] = 1,
["thunder"] = 1, ["thunder"] = 1,
["tb"] = 1, ["tb"] = 1,
["wtb"] = 1, ["wtb"] = 1,
} end } end
--[[ --[[
Player state table Player state table
0 - invited 0 - invited
1 - joined 1 - joined
2 - trade queue 2 - trade queue
3 - trading 3 - trading
4 - trade complete 4 - trade complete
5 - light up portal 5 - light up portal
6 - portal cast 6 - portal cast
7 - left? clean table 7 - left? clean table
Cancel everything if person leave Cancel everything if person leave
]] ]]
aura_env.people = {} aura_env.people = {}
aura_env.castQueue = {} aura_env.castQueue = {}
aura_env.isTrade = false aura_env.isTrade = false
aura_env.tradee = "" aura_env.tradee = ""
--[[local function hideButon(self) --[[local function hideButon(self)
ActionButton_HideOverlayGlow(self) ActionButton_HideOverlayGlow(self)
end--]] end--]]
if not WeakAurasSaved.MagusKeywords.buttons or not WeakAurasSaved.MagusKeywords.buttons[1][0] then WeakAurasSaved.MagusKeywords.buttons = { if not WeakAurasSaved.MagusKeywords.buttons or not WeakAurasSaved.MagusKeywords.buttons[1][0] then WeakAurasSaved.MagusKeywords.buttons = {
[1] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"), [1] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
[2] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"), [2] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
[3] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"), [3] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
[4] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"), [4] = CreateFrame("Button", "buton", aura_env.region, "SecureActionButtonTemplate"),
} end } end
for i = 1, 4 do for i = 1, 4 do
WeakAurasSaved.MagusKeywords.buttons[i]:SetAttribute("type", "macro") WeakAurasSaved.MagusKeywords.buttons[i]:SetAttribute("type", "macro")
WeakAurasSaved.MagusKeywords.buttons[i]:SetSize(aura_env.config.size, aura_env.config.size) WeakAurasSaved.MagusKeywords.buttons[i]:SetSize(aura_env.config.size, aura_env.config.size)
WeakAurasSaved.MagusKeywords.buttons[i]:SetPoint("CENTER", aura_env.region, "CENTER", (i - 1) * aura_env.config.size, 0) WeakAurasSaved.MagusKeywords.buttons[i]:SetPoint("CENTER", aura_env.region, "CENTER", (i - 1) * aura_env.config.size, 0)
WeakAurasSaved.MagusKeywords.buttons[i]:RegisterForClicks("LeftButtonDown") WeakAurasSaved.MagusKeywords.buttons[i]:RegisterForClicks("LeftButtonDown")
--WeakAurasSaved.MagusKeywords.buttons[i]:SetScript("PreClick", hideButon) --WeakAurasSaved.MagusKeywords.buttons[i]:SetScript("PreClick", hideButon)
WeakAurasSaved.MagusKeywords.buttons[i].text = WeakAurasSaved.MagusKeywords.buttons[i]:CreateFontString("text", "ARTWORK") WeakAurasSaved.MagusKeywords.buttons[i].text = WeakAurasSaved.MagusKeywords.buttons[i]:CreateFontString("text", "ARTWORK")
WeakAurasSaved.MagusKeywords.buttons[i].text:SetFont("Fonts\\FRIZQT__.TTF", 14, "OUTLINE, MONOCHROME") WeakAurasSaved.MagusKeywords.buttons[i].text:SetFont("Fonts\\FRIZQT__.TTF", 14, "OUTLINE, MONOCHROME")
WeakAurasSaved.MagusKeywords.buttons[i].text:SetPoint("CENTER", WeakAurasSaved.MagusKeywords.buttons[i], "CENTER", 0, -aura_env.config.size / 2 - 14) WeakAurasSaved.MagusKeywords.buttons[i].text:SetPoint("CENTER", WeakAurasSaved.MagusKeywords.buttons[i], "CENTER", 0, -aura_env.config.size / 2 - 14)
WeakAurasSaved.MagusKeywords.buttons[i].text:Show() WeakAurasSaved.MagusKeywords.buttons[i].text:Show()
WeakAurasSaved.MagusKeywords.buttons[i]:Show() WeakAurasSaved.MagusKeywords.buttons[i]:Show()
end end
WeakAurasSaved.MagusKeywords.buttons[1]:SetNormalTexture(135750) WeakAurasSaved.MagusKeywords.buttons[1]:SetNormalTexture(135750)
WeakAurasSaved.MagusKeywords.buttons[1]:SetAttribute("macrotext", format("/cast Portal: Thunder Bluff")) WeakAurasSaved.MagusKeywords.buttons[1]:SetAttribute("macrotext", format("/cast Portal: Thunder Bluff"))
WeakAurasSaved.MagusKeywords.buttons[2]:SetNormalTexture(135744) WeakAurasSaved.MagusKeywords.buttons[2]:SetNormalTexture(135744)
WeakAurasSaved.MagusKeywords.buttons[2]:SetAttribute("macrotext", format("/cast Portal: Orgrimmar")) WeakAurasSaved.MagusKeywords.buttons[2]:SetAttribute("macrotext", format("/cast Portal: Orgrimmar"))
WeakAurasSaved.MagusKeywords.buttons[3]:SetNormalTexture(135751) WeakAurasSaved.MagusKeywords.buttons[3]:SetNormalTexture(135751)
WeakAurasSaved.MagusKeywords.buttons[3]:SetAttribute("macrotext", format("/cast Portal: Undercity")) WeakAurasSaved.MagusKeywords.buttons[3]:SetAttribute("macrotext", format("/cast Portal: Undercity"))
WeakAurasSaved.MagusKeywords.buttons[4]:SetNormalTexture(135926) WeakAurasSaved.MagusKeywords.buttons[4]:SetNormalTexture(135926)
WeakAurasSaved.MagusKeywords.buttons[4]:SetAttribute("macrotext", format("/cast Consecration")) WeakAurasSaved.MagusKeywords.buttons[4]:SetAttribute("macrotext", format("/cast Consecration"))
aura_env.printTable = function(table, n) aura_env.printTable = function(table, n)
if not n then n = 0 end if not n then n = 0 end
for k,v in pairs(table) do for k,v in pairs(table) do
local printText = "" local printText = ""
for i = 1, n do for i = 1, n do
printText = printText .. " " printText = printText .. " "
end end
printText = printText .. "[" .. k .. "] = " .. tostring(v) printText = printText .. "[" .. k .. "] = " .. tostring(v)
print(printText) print(printText)
if type(v) == "table" then if type(v) == "table" then
n = n + 1 n = n + 1
aura_env.printTable(v, n) aura_env.printTable(v, n)
end end
end end
end end

View File

@@ -1,234 +1,234 @@
--GROUP_ROSTER_UPDATE INSPECT_READY --GROUP_ROSTER_UPDATE INSPECT_READY
function(e) function(e)
if e == "GROUP_ROSTER_UPDATE" then if e == "GROUP_ROSTER_UPDATE" then
for i = 1, 40 do for i = 1, 40 do
local u = "raid" .. i local u = "raid" .. i
if UnitExists(u) and not UnitIsUnit(u, "player") then if UnitExists(u) and not UnitIsUnit(u, "player") then
if not aura_env.data[u] then if not aura_env.data[u] then
aura_env.data[u] = { aura_env.data[u] = {
["name"] = UnitName(u), ["name"] = UnitName(u),
["class"] = select(3, UnitClass(u)), ["class"] = select(3, UnitClass(u)),
["neckilvl"] = 0, ["neckilvl"] = 0,
["backilvl"] = 0, ["backilvl"] = 0,
["corruption"] = 0, ["corruption"] = 0,
["inspectQueue"] = false, ["inspectQueue"] = false,
["inspected"] = false ["inspected"] = false
} }
end end
if aura_env.data[u] then if aura_env.data[u] then
if aura_env.data[u].name ~= UnitName(u) then if aura_env.data[u].name ~= UnitName(u) then
aura_env.data[u] = { aura_env.data[u] = {
["name"] = UnitName(u), ["name"] = UnitName(u),
["class"] = select(3, UnitClass(u)), ["class"] = select(3, UnitClass(u)),
["neckilvl"] = 0, ["neckilvl"] = 0,
["backilvl"] = 0, ["backilvl"] = 0,
["corruption"] = 0, ["corruption"] = 0,
["inspectQueue"] = false, ["inspectQueue"] = false,
["inspected"] = false ["inspected"] = false
} }
end end
end end
elseif not UnitExists(u) and aura_env.data[u] then elseif not UnitExists(u) and aura_env.data[u] then
if aura_env.data[u] then if aura_env.data[u] then
aura_env.data[u] = nil aura_env.data[u] = nil
end end
for k,v in pairs(aura_env.inspectQueue) do for k,v in pairs(aura_env.inspectQueue) do
if v == u then if v == u then
table.remove(aura_env.inspectQueue, k) table.remove(aura_env.inspectQueue, k)
end end
end end
end end
end end
elseif e == "INSPECT_READY" then elseif e == "INSPECT_READY" then
if aura_env.notifyInspect ~= false and aura_env.inspecting == false then if aura_env.notifyInspect ~= false and aura_env.inspecting == false then
InspectUnit(aura_env.notifyInspect) InspectUnit(aura_env.notifyInspect)
aura_env.inspecting = true aura_env.inspecting = true
elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then
for i = 1, 17 do for i = 1, 17 do
local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0 local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0
if link ~= 0 then if link ~= 0 then
local stats = {} local stats = {}
GetItemStats(link, stats) GetItemStats(link, stats)
local rarity = select(3, GetItemInfo(link)) local rarity = select(3, GetItemInfo(link))
local ilvl = select(4, GetItemInfo(link)) local ilvl = select(4, GetItemInfo(link))
if aura_env.config.debug == true then if aura_env.config.debug == true then
for k,v in pairs(stats) do for k,v in pairs(stats) do
end end
end end
if i == 2 then if i == 2 then
aura_env.data[aura_env.notifyInspect].neckilvl = ilvl aura_env.data[aura_env.notifyInspect].neckilvl = ilvl
elseif i == 15 and rarity == 5 then elseif i == 15 and rarity == 5 then
aura_env.data[aura_env.notifyInspect].backilvl = ilvl aura_env.data[aura_env.notifyInspect].backilvl = ilvl
end end
if stats["ITEM_MOD_CORRUPTION"] then if stats["ITEM_MOD_CORRUPTION"] then
--print("Item", link, "adds", stats["ITEM_MOD_CORRUPTION"], "corruption") --print("Item", link, "adds", stats["ITEM_MOD_CORRUPTION"], "corruption")
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"] aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"]
end end
if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then
--print("Item", link, "reduces corruption by", stats["ITEM_MOD_CORRUPTION_RESISTANCE"]) --print("Item", link, "reduces corruption by", stats["ITEM_MOD_CORRUPTION_RESISTANCE"])
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"] aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"]
end end
end end
end end
aura_env.data[aura_env.notifyInspect].inspectQueue = false aura_env.data[aura_env.notifyInspect].inspectQueue = false
aura_env.data[aura_env.notifyInspect].inspected = true aura_env.data[aura_env.notifyInspect].inspected = true
aura_env.notifyInspect = false aura_env.notifyInspect = false
if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing) end if not aura_env.ticker then aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing) end
ClearInspectPlayer() ClearInspectPlayer()
end end
end end
for k,v in pairs(aura_env.data) do for k,v in pairs(aura_env.data) do
if v.inspected == false and v.inspectQueue == false then if v.inspected == false and v.inspectQueue == false then
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
v.inspectQueue = true v.inspectQueue = true
end end
if v.neckilvl == 0 and v.inspectQueue == false then if v.neckilvl == 0 and v.inspectQueue == false then
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
v.inspectQueue = true v.inspectQueue = true
end end
end end
local text = {"", "", "", ""} local text = {"", "", "", ""}
for k,v in pairs(aura_env.data) do for k,v in pairs(aura_env.data) do
text[1] = text[1] .. aura_env.classColor(v.class) .. v.name .. "\n" text[1] = text[1] .. aura_env.classColor(v.class) .. v.name .. "\n"
text[2] = text[2] .. "|cff" .. aura_env.config.ncolor .. v.neckilvl .. "\n" text[2] = text[2] .. "|cff" .. aura_env.config.ncolor .. v.neckilvl .. "\n"
text[3] = text[3] .. "|cff" .. aura_env.config.ccolor .. v.backilvl .. "\n" text[3] = text[3] .. "|cff" .. aura_env.config.ccolor .. v.backilvl .. "\n"
text[4] = text[4] .. "|cff" .. aura_env.config.cocolor .. v.corruption .. "\n" text[4] = text[4] .. "|cff" .. aura_env.config.cocolor .. v.corruption .. "\n"
end end
aura_env.text = text[1] aura_env.text = text[1]
aura_env.randomFrame.text2:SetText(text[2]) aura_env.randomFrame.text2:SetText(text[2])
aura_env.randomFrame.text3:SetText(text[3]) aura_env.randomFrame.text3:SetText(text[3])
aura_env.randomFrame.text4:SetText(text[4]) aura_env.randomFrame.text4:SetText(text[4])
return true return true
end end
--DISPLAY --DISPLAY
function() function()
return aura_env.text return aura_env.text
end end
--INIT --INIT
if WeakAuras.IsOptionsOpen() then if WeakAuras.IsOptionsOpen() then
if aura_env.ticker then if aura_env.ticker then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
aura_env.ticker = nil aura_env.ticker = nil
end end
end end
local aura_env = aura_env local aura_env = aura_env
aura_env.data = {} aura_env.data = {}
aura_env.text = "" aura_env.text = ""
aura_env.inspectQueue = {} aura_env.inspectQueue = {}
aura_env.insIndex = 1 aura_env.insIndex = 1
aura_env.notifyInspect = false aura_env.notifyInspect = false
aura_env.inspecting = false aura_env.inspecting = false
aura_env.output = "" aura_env.output = ""
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end
aura_env.printTable = function(table, n) aura_env.printTable = function(table, n)
if not n then n = 0 end if not n then n = 0 end
for k,v in pairs(table) do for k,v in pairs(table) do
local printText = "" local printText = ""
for i = 1, n do for i = 1, n do
printText = printText .. " " printText = printText .. " "
end end
printText = printText .. "[" .. k .. "] = " .. tostring(v) printText = printText .. "[" .. k .. "] = " .. tostring(v)
print(printText) print(printText)
if type(v) == "table" then if type(v) == "table" then
n = n + 1 n = n + 1
aura_env.printTable(v, n) aura_env.printTable(v, n)
end end
end end
end end
local function uninspect() local function uninspect()
aura_env.inspecting = false aura_env.inspecting = false
end end
hooksecurefunc("ClearInspectPlayer", uninspect) hooksecurefunc("ClearInspectPlayer", uninspect)
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == 6 then return "|cFFC41F3B" elseif if class == 6 then return "|cFFC41F3B" elseif
class == 12 then return "|cFFA330C9" elseif class == 12 then return "|cFFA330C9" elseif
class == 11 then return "|cFFFF7D0A" elseif class == 11 then return "|cFFFF7D0A" elseif
class == 3 then return "|cFFABD473" elseif class == 3 then return "|cFFABD473" elseif
class == 8 then return "|cFF40C7EB" elseif class == 8 then return "|cFF40C7EB" elseif
class == 10 then return "|cFF00FF96" elseif class == 10 then return "|cFF00FF96" elseif
class == 2 then return "|cFFF58CBA" elseif class == 2 then return "|cFFF58CBA" elseif
class == 5 then return "|cFFFFFFFF" elseif class == 5 then return "|cFFFFFFFF" elseif
class == 4 then return "|cFFFFF569" elseif class == 4 then return "|cFFFFF569" elseif
class == 7 then return "|cFF0070DE" elseif class == 7 then return "|cFF0070DE" elseif
class == 9 then return "|cFF8787ED" elseif class == 9 then return "|cFF8787ED" elseif
class == 1 then return "|cFFC79C6E" else class == 1 then return "|cFFC79C6E" else
return "|cFF000000" end return "|cFF000000" end
end end
aura_env.inspectPing = function() aura_env.inspectPing = function()
if aura_env.inspecting == false and aura_env.notifyInspect == false then if aura_env.inspecting == false and aura_env.notifyInspect == false then
if #aura_env.inspectQueue > 0 then if #aura_env.inspectQueue > 0 then
if aura_env.insIndex >= #aura_env.inspectQueue then if aura_env.insIndex >= #aura_env.inspectQueue then
aura_env.insIndex = 1 aura_env.insIndex = 1
end end
for i = aura_env.insIndex, #aura_env.inspectQueue do for i = aura_env.insIndex, #aura_env.inspectQueue do
if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then
ClearInspectPlayer() ClearInspectPlayer()
NotifyInspect(aura_env.inspectQueue[i]) NotifyInspect(aura_env.inspectQueue[i])
aura_env.notifyInspect = aura_env.inspectQueue[i] aura_env.notifyInspect = aura_env.inspectQueue[i]
if aura_env.ticker then aura_env.ticker:Cancel(); aura_env.ticker = nil end if aura_env.ticker then aura_env.ticker:Cancel(); aura_env.ticker = nil end
table.remove(aura_env.inspectQueue, i) table.remove(aura_env.inspectQueue, i)
break break
end end
end end
end end
end end
for k,v in pairs(aura_env.data) do for k,v in pairs(aura_env.data) do
if v.neckilvl == 0 and v.inspectQueue == false then if v.neckilvl == 0 and v.inspectQueue == false then
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
v.inspectQueue = true v.inspectQueue = true
end end
end end
end end
if not aura_env.ticker then if not aura_env.ticker then
aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing) aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing)
end end
local font, fontSize, fontFlags = aura_env.region.text:GetFont() local font, fontSize, fontFlags = aura_env.region.text:GetFont()
local charWidth = fontSize * 0.6 local charWidth = fontSize * 0.6
fontSize = fontSize * 0.65 fontSize = fontSize * 0.65
aura_env.randomFrame = CreateFrame("frame") aura_env.randomFrame = CreateFrame("frame")
aura_env.randomFrame:ClearAllPoints() aura_env.randomFrame:ClearAllPoints()
aura_env.randomFrame:SetPoint("CENTER", aura_env.region, "CENTER") aura_env.randomFrame:SetPoint("CENTER", aura_env.region, "CENTER")
if not aura_env.randomFrame.text2 then if not aura_env.randomFrame.text2 then
aura_env.randomFrame.text2 = aura_env.randomFrame:CreateFontString() aura_env.randomFrame.text2 = aura_env.randomFrame:CreateFontString()
end end
aura_env.randomFrame.text2:SetFont(font, fontSize, fontFlags) aura_env.randomFrame.text2:SetFont(font, fontSize, fontFlags)
aura_env.randomFrame.text2:SetPoint("CENTER", aura_env.region, "CENTER", charWidth * 8, 0) aura_env.randomFrame.text2:SetPoint("CENTER", aura_env.region, "CENTER", charWidth * 8, 0)
aura_env.randomFrame.text2:SetText("") aura_env.randomFrame.text2:SetText("")
aura_env.randomFrame.text2:SetJustifyV("center") aura_env.randomFrame.text2:SetJustifyV("center")
aura_env.randomFrame.text2:SetJustifyH("center") aura_env.randomFrame.text2:SetJustifyH("center")
aura_env.randomFrame.text2:Show() aura_env.randomFrame.text2:Show()
if not aura_env.randomFrame.text3 then if not aura_env.randomFrame.text3 then
aura_env.randomFrame.text3 = aura_env.randomFrame:CreateFontString() aura_env.randomFrame.text3 = aura_env.randomFrame:CreateFontString()
end end
aura_env.randomFrame.text3:SetFont(font, fontSize, fontFlags) aura_env.randomFrame.text3:SetFont(font, fontSize, fontFlags)
aura_env.randomFrame.text3:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3), 0) aura_env.randomFrame.text3:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3), 0)
aura_env.randomFrame.text3:SetText("") aura_env.randomFrame.text3:SetText("")
aura_env.randomFrame.text3:SetJustifyV("center") aura_env.randomFrame.text3:SetJustifyV("center")
aura_env.randomFrame.text3:SetJustifyH("center") aura_env.randomFrame.text3:SetJustifyH("center")
aura_env.randomFrame.text3:Show() aura_env.randomFrame.text3:Show()
if not aura_env.randomFrame.text4 then if not aura_env.randomFrame.text4 then
aura_env.randomFrame.text4 = aura_env.randomFrame:CreateFontString() aura_env.randomFrame.text4 = aura_env.randomFrame:CreateFontString()
end end
aura_env.randomFrame.text4:SetFont(font, fontSize, fontFlags) aura_env.randomFrame.text4:SetFont(font, fontSize, fontFlags)
aura_env.randomFrame.text4:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3) + (charWidth * 3), 0) aura_env.randomFrame.text4:SetPoint("CENTER", aura_env.region, "CENTER", (charWidth * 8) + (charWidth * 3) + (charWidth * 3), 0)
aura_env.randomFrame.text4:SetText("") aura_env.randomFrame.text4:SetText("")
aura_env.randomFrame.text4:SetJustifyV("center") aura_env.randomFrame.text4:SetJustifyV("center")
aura_env.randomFrame.text4:SetJustifyH("center") aura_env.randomFrame.text4:SetJustifyH("center")
aura_env.randomFrame.text4:Show() aura_env.randomFrame.text4:Show()

View File

@@ -1,223 +1,223 @@
--GROUP_ROSTER_UPDATE INSPECT_READY --GROUP_ROSTER_UPDATE INSPECT_READY
function(allstates, e) function(allstates, e)
if e == "GROUP_ROSTER_UPDATE" then if e == "GROUP_ROSTER_UPDATE" then
for i = 1, 40 do for i = 1, 40 do
local u = "raid" .. i local u = "raid" .. i
if UnitExists(u) and not UnitIsUnit(u, "player") then if UnitExists(u) and not UnitIsUnit(u, "player") then
if not aura_env.data[u] then if not aura_env.data[u] then
aura_env.data[u] = { aura_env.data[u] = {
["name"] = UnitName(u), ["name"] = UnitName(u),
["class"] = select(3, UnitClass(u)), ["class"] = select(3, UnitClass(u)),
["neckilvl"] = 0, ["neckilvl"] = 0,
["backilvl"] = 0, ["backilvl"] = 0,
["corruption"] = 0, ["corruption"] = 0,
["inspectQueue"] = false, ["inspectQueue"] = false,
["inspected"] = false ["inspected"] = false
} }
end end
if aura_env.data[u] then if aura_env.data[u] then
if aura_env.data[u].name ~= UnitName(u) then if aura_env.data[u].name ~= UnitName(u) then
aura_env.data[u] = { aura_env.data[u] = {
["name"] = UnitName(u), ["name"] = UnitName(u),
["class"] = select(3, UnitClass(u)), ["class"] = select(3, UnitClass(u)),
["neckilvl"] = 0, ["neckilvl"] = 0,
["backilvl"] = 0, ["backilvl"] = 0,
["corruption"] = 0, ["corruption"] = 0,
["inspectQueue"] = false, ["inspectQueue"] = false,
["inspected"] = false ["inspected"] = false
} }
end end
end end
elseif not UnitExists(u) and (aura_env.data[u] or allstates[u]) then elseif not UnitExists(u) and (aura_env.data[u] or allstates[u]) then
if aura_env.data[u] then if aura_env.data[u] then
aura_env.data[u] = nil aura_env.data[u] = nil
end end
for k,v in pairs(aura_env.inspectQueue) do for k,v in pairs(aura_env.inspectQueue) do
if v == u then if v == u then
table.remove(aura_env.inspectQueue, k) table.remove(aura_env.inspectQueue, k)
end end
end end
if allstates[u] then if allstates[u] then
allstates[u].show = false allstates[u].show = false
allstates[u].changed = true allstates[u].changed = true
end end
end end
end end
elseif e == "INSPECT_READY" then elseif e == "INSPECT_READY" then
if aura_env.notifyInspect ~= false and aura_env.inspecting == false then if aura_env.notifyInspect ~= false and aura_env.inspecting == false then
InspectUnit(aura_env.notifyInspect) InspectUnit(aura_env.notifyInspect)
aura_env.inspecting = true aura_env.inspecting = true
elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then elseif aura_env.notifyInspect ~= false and aura_env.inspecting == true then
for i = 1, 17 do for i = 1, 17 do
local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0 local link = GetInventoryItemLink(aura_env.notifyInspect, i) or 0
if link ~= 0 then if link ~= 0 then
local stats = {} local stats = {}
GetItemStats(link, stats) GetItemStats(link, stats)
local rarity = select(3, GetItemInfo(link)) local rarity = select(3, GetItemInfo(link))
local ilvl = select(4, GetItemInfo(link)) local ilvl = select(4, GetItemInfo(link))
if aura_env.config.debug == true then if aura_env.config.debug == true then
for k,v in pairs(stats) do for k,v in pairs(stats) do
end end
end end
if i == 2 then if i == 2 then
aura_env.data[aura_env.notifyInspect].neckilvl = ilvl aura_env.data[aura_env.notifyInspect].neckilvl = ilvl
elseif i == 15 and rarity == 5 then elseif i == 15 and rarity == 5 then
aura_env.data[aura_env.notifyInspect].backilvl = ilvl aura_env.data[aura_env.notifyInspect].backilvl = ilvl
end end
if stats["ITEM_MOD_CORRUPTION"] then if stats["ITEM_MOD_CORRUPTION"] then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"] aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption + stats["ITEM_MOD_CORRUPTION"]
end end
if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then if stats["ITEM_MOD_CORRUPTION_RESISTANCE"] then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"] aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - stats["ITEM_MOD_CORRUPTION_RESISTANCE"]
end end
end end
end end
if aura_env.data[aura_env.notifyInspect].backilvl > 0 then if aura_env.data[aura_env.notifyInspect].backilvl > 0 then
local bil = aura_env.data[aura_env.notifyInspect].backilvl local bil = aura_env.data[aura_env.notifyInspect].backilvl
if bil >= 470 and bil < 472 then if bil >= 470 and bil < 472 then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 5 aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 5
elseif bil >= 472 and bil <= 474 then elseif bil >= 472 and bil <= 474 then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 12 aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 12
elseif bil >= 476 and bil <= 480 then elseif bil >= 476 and bil <= 480 then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 20 aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 20
elseif bil >= 482 and bil <= 484 then elseif bil >= 482 and bil <= 484 then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 27 aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 27
elseif bil >= 486 and bil <= 488 then elseif bil >= 486 and bil <= 488 then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 35 aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 35
elseif bil >= 490 and bil <= 494 then elseif bil >= 490 and bil <= 494 then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 42 aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 42
elseif bil >= 494 then elseif bil >= 494 then
aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 50 aura_env.data[aura_env.notifyInspect].corruption = aura_env.data[aura_env.notifyInspect].corruption - 50
end end
end end
aura_env.data[aura_env.notifyInspect].inspectQueue = false aura_env.data[aura_env.notifyInspect].inspectQueue = false
aura_env.data[aura_env.notifyInspect].inspected = true aura_env.data[aura_env.notifyInspect].inspected = true
aura_env.notifyInspect = false aura_env.notifyInspect = false
ClearInspectPlayer() ClearInspectPlayer()
end end
end end
for k,v in pairs(aura_env.data) do for k,v in pairs(aura_env.data) do
if v.inspected == false and v.inspectQueue == false then if v.inspected == false and v.inspectQueue == false then
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
v.inspectQueue = true v.inspectQueue = true
end end
if v.neckilvl == 0 and v.inspectQueue == false then if v.neckilvl == 0 and v.inspectQueue == false then
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
v.inspectQueue = true v.inspectQueue = true
end end
end end
for k,v in pairs(aura_env.data) do for k,v in pairs(aura_env.data) do
allstates[k] = { allstates[k] = {
show = true, show = true,
changed = true, changed = true,
name = v.name, name = v.name,
class = v.class, class = v.class,
classColor = aura_env.classColor(v.class), classColor = aura_env.classColor(v.class),
backilvl = v.backilvl, backilvl = v.backilvl,
backColor = "|cff" .. aura_env.config.ccolor, backColor = "|cff" .. aura_env.config.ccolor,
neckilvl = v.neckilvl, neckilvl = v.neckilvl,
neckColor = "|cff" .. aura_env.config.ncolor, neckColor = "|cff" .. aura_env.config.ncolor,
corruption = v.corruption, corruption = v.corruption,
corruptionColor = "|cff" .. aura_env.config.cocolor, corruptionColor = "|cff" .. aura_env.config.cocolor,
resort = true, resort = true,
index = v.name, index = v.name,
} }
if aura_env.config.sort == 1 then if aura_env.config.sort == 1 then
allstates[k].index = v.name allstates[k].index = v.name
elseif aura_env.config.sort == 2 then elseif aura_env.config.sort == 2 then
allstates[k].index = v.backilvl allstates[k].index = v.backilvl
elseif aura_env.config.sort == 3 then elseif aura_env.config.sort == 3 then
allstates[k].index = v.neckilvl allstates[k].index = v.neckilvl
elseif aura_env.config.sort == 4 then elseif aura_env.config.sort == 4 then
allstates[k].index = v.corruption allstates[k].index = v.corruption
end end
end end
return true return true
end end
--DISPLAY --DISPLAY
%classColor%n %neckColor%neckilvl %backColor%backilvl %corruptionColor%corruption %classColor%n %neckColor%neckilvl %backColor%backilvl %corruptionColor%corruption
--INIT --INIT
if WeakAuras.IsOptionsOpen() then if WeakAuras.IsOptionsOpen() then
if aura_env.ticker then if aura_env.ticker then
aura_env.ticker:Cancel() aura_env.ticker:Cancel()
aura_env.ticker = nil aura_env.ticker = nil
end end
end end
local aura_env = aura_env local aura_env = aura_env
aura_env.data = {} aura_env.data = {}
aura_env.inspectQueue = {} aura_env.inspectQueue = {}
aura_env.insIndex = 1 aura_env.insIndex = 1
aura_env.notifyInspect = false aura_env.notifyInspect = false
aura_env.inspecting = false aura_env.inspecting = false
aura_env.output = "" aura_env.output = ""
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end if not WeakAurasSaved.CustomTrash.Debug then WeakAurasSaved.CustomTrash.Debug = {} end
aura_env.printTable = function(table, n) aura_env.printTable = function(table, n)
if not n then n = 0 end if not n then n = 0 end
for k,v in pairs(table) do for k,v in pairs(table) do
local printText = "" local printText = ""
for i = 1, n do for i = 1, n do
printText = printText .. " " printText = printText .. " "
end end
printText = printText .. "[" .. k .. "] = " .. tostring(v) printText = printText .. "[" .. k .. "] = " .. tostring(v)
print(printText) print(printText)
if type(v) == "table" then if type(v) == "table" then
n = n + 1 n = n + 1
aura_env.printTable(v, n) aura_env.printTable(v, n)
end end
end end
end end
local function uninspect() local function uninspect()
aura_env.inspecting = false aura_env.inspecting = false
end end
hooksecurefunc("ClearInspectPlayer", uninspect) hooksecurefunc("ClearInspectPlayer", uninspect)
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == 6 then return "|cFFC41F3B" elseif if class == 6 then return "|cFFC41F3B" elseif
class == 12 then return "|cFFA330C9" elseif class == 12 then return "|cFFA330C9" elseif
class == 11 then return "|cFFFF7D0A" elseif class == 11 then return "|cFFFF7D0A" elseif
class == 3 then return "|cFFABD473" elseif class == 3 then return "|cFFABD473" elseif
class == 8 then return "|cFF40C7EB" elseif class == 8 then return "|cFF40C7EB" elseif
class == 10 then return "|cFF00FF96" elseif class == 10 then return "|cFF00FF96" elseif
class == 2 then return "|cFFF58CBA" elseif class == 2 then return "|cFFF58CBA" elseif
class == 5 then return "|cFFFFFFFF" elseif class == 5 then return "|cFFFFFFFF" elseif
class == 4 then return "|cFFFFF569" elseif class == 4 then return "|cFFFFF569" elseif
class == 7 then return "|cFF0070DE" elseif class == 7 then return "|cFF0070DE" elseif
class == 9 then return "|cFF8787ED" elseif class == 9 then return "|cFF8787ED" elseif
class == 1 then return "|cFFC79C6E" else class == 1 then return "|cFFC79C6E" else
return "|cFF000000" end return "|cFF000000" end
end end
aura_env.inspectPing = function() aura_env.inspectPing = function()
if aura_env.inspecting == false and aura_env.notifyInspect == false then if aura_env.inspecting == false and aura_env.notifyInspect == false then
if #aura_env.inspectQueue > 0 then if #aura_env.inspectQueue > 0 then
--print("There are units to inspect D:") --print("There are units to inspect D:")
if aura_env.insIndex >= #aura_env.inspectQueue then if aura_env.insIndex >= #aura_env.inspectQueue then
aura_env.insIndex = 1 aura_env.insIndex = 1
end end
for i = aura_env.insIndex, #aura_env.inspectQueue do for i = aura_env.insIndex, #aura_env.inspectQueue do
if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then if CheckInteractDistance(aura_env.inspectQueue[i], 2) == true then
--print("QUEUEING INSPECT FOR", aura_env.inspectQueue[i]) --print("QUEUEING INSPECT FOR", aura_env.inspectQueue[i])
ClearInspectPlayer() ClearInspectPlayer()
NotifyInspect(aura_env.inspectQueue[i]) NotifyInspect(aura_env.inspectQueue[i])
aura_env.notifyInspect = aura_env.inspectQueue[i] aura_env.notifyInspect = aura_env.inspectQueue[i]
table.remove(aura_env.inspectQueue, i) table.remove(aura_env.inspectQueue, i)
break break
end end
end end
end end
end end
for k,v in pairs(aura_env.data) do for k,v in pairs(aura_env.data) do
if v.neckilvl == 0 and v.inspectQueue == false then if v.neckilvl == 0 and v.inspectQueue == false then
aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k aura_env.inspectQueue[#aura_env.inspectQueue + 1] = k
v.inspectQueue = true v.inspectQueue = true
end end
end end
end end
aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing) aura_env.ticker = C_Timer.NewTicker(0.5, aura_env.inspectPing)

View File

@@ -1,71 +1,71 @@
--UNIT_AURA DRUID_HOTS_REMOVE_HOT UPDATE_HOTS --UNIT_AURA DRUID_HOTS_REMOVE_HOT UPDATE_HOTS
function(e, ...) function(e, ...)
if not WeakAurasSaved.DruidHots then WeakAurasSaved.DruidHots = {} end if not WeakAurasSaved.DruidHots then WeakAurasSaved.DruidHots = {} end
if not WeakAurasSaved.DruidHotsTotal then WeakAurasSaved.DruidHotsTotal = { if not WeakAurasSaved.DruidHotsTotal then WeakAurasSaved.DruidHotsTotal = {
["Rejuvenation"] = 0, ["Rejuvenation"] = 0,
["Regrowth"] = 0, ["Regrowth"] = 0,
["Lifebloom"] = 0, ["Lifebloom"] = 0,
["Wild Growth"] = 0, ["Wild Growth"] = 0,
["Spring Blossoms"] = 0, ["Spring Blossoms"] = 0,
["Grove Tending"] = 0, ["Grove Tending"] = 0,
["Rejuvenation (Germination)"] = 0, ["Rejuvenation (Germination)"] = 0,
} end } end
if e == "UNIT_AURA" then if e == "UNIT_AURA" then
local u = ... local u = ...
local index = 1 local index = 1
local GUID = UnitGUID(u) local GUID = UnitGUID(u)
local buff, update = 0, 0 local buff, update = 0, 0
WeakAurasSaved.DruidHots[GUID] = {} WeakAurasSaved.DruidHots[GUID] = {}
while UnitBuff(u, index, "PLAYER") do while UnitBuff(u, index, "PLAYER") do
local name = UnitBuff(u, index, "PLAYER") local name = UnitBuff(u, index, "PLAYER")
local dur = select(6, UnitBuff(u, index, "PLAYER")) local dur = select(6, UnitBuff(u, index, "PLAYER"))
if aura_env.hots[name] then if aura_env.hots[name] then
buff = 1 buff = 1
WeakAurasSaved.DruidHots[GUID][name] = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", GUID, name) end) WeakAurasSaved.DruidHots[GUID][name] = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", GUID, name) end)
end end
index = index + 1 index = index + 1
if index > 20 then break end if index > 20 then break end
end end
if buff == 0 then WeakAurasSaved.DruidHots[GUID] = nil end if buff == 0 then WeakAurasSaved.DruidHots[GUID] = nil end
if buff == 1 then WeakAuras.ScanEvents("UPDATE_HOTS") end if buff == 1 then WeakAuras.ScanEvents("UPDATE_HOTS") end
--DevTools_Dump(WeakAurasSaved.DruidHots) --DevTools_Dump(WeakAurasSaved.DruidHots)
elseif e == "DRUID_HOTS_REMOVE_HOT" then elseif e == "DRUID_HOTS_REMOVE_HOT" then
local GUID, bname = ... local GUID, bname = ...
WeakAurasSaved.DruidHots[GUID][bname] = nil WeakAurasSaved.DruidHots[GUID][bname] = nil
WeakAuras.ScanEvents("UPDATE_HOTS") WeakAuras.ScanEvents("UPDATE_HOTS")
--DevTools_Dump(WeakAurasSaved.DruidHots) --DevTools_Dump(WeakAurasSaved.DruidHots)
elseif e == "UPDATE_HOTS" then elseif e == "UPDATE_HOTS" then
WeakAurasSaved.DruidHotsTotal = { WeakAurasSaved.DruidHotsTotal = {
["Rejuvenation"] = 0, ["Rejuvenation"] = 0,
["Regrowth"] = 0, ["Regrowth"] = 0,
["Lifebloom"] = 0, ["Lifebloom"] = 0,
["Wild Growth"] = 0, ["Wild Growth"] = 0,
["Spring Blossoms"] = 0, ["Spring Blossoms"] = 0,
["Grove Tending"] = 0, ["Grove Tending"] = 0,
["Rejuvenation (Germination)"] = 0, ["Rejuvenation (Germination)"] = 0,
} }
for k,v in pairs(WeakAurasSaved.DruidHots) do for k,v in pairs(WeakAurasSaved.DruidHots) do
for k2, v2 in pairs(v) do for k2, v2 in pairs(v) do
--print(k2) --print(k2)
WeakAurasSaved.DruidHotsTotal[k2] = WeakAurasSaved.DruidHotsTotal[k2] + 1 WeakAurasSaved.DruidHotsTotal[k2] = WeakAurasSaved.DruidHotsTotal[k2] + 1
end end
end end
--DevTools_Dump(WeakAurasSaved.DruidHotsTotal) --DevTools_Dump(WeakAurasSaved.DruidHotsTotal)
end end
end end
--DISPLAY --DISPLAY
function() function()
return WeakAurasSaved.DruidHotsTotal["Grove Tending"] return WeakAurasSaved.DruidHotsTotal["Grove Tending"]
end end
--INIT --INIT
aura_env.hots = { aura_env.hots = {
["Rejuvenation"] = 1, ["Rejuvenation"] = 1,
["Regrowth"] = 1, ["Regrowth"] = 1,
["Lifebloom"] = 1, ["Lifebloom"] = 1,
["Wild Growth"] = 1, ["Wild Growth"] = 1,
["Spring Blossoms"] = 1, ["Spring Blossoms"] = 1,
["Grove Tending"] = 1, ["Grove Tending"] = 1,
["Rejuvenation (Germination)"] = 1, ["Rejuvenation (Germination)"] = 1,
} }

View File

@@ -1,105 +1,105 @@
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED --COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED
--I fucked it up. --I fucked it up.
function(e, msg, sender) function(e, msg, sender)
if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {["tb"] = "Thunder Bluff", ["org"] = "Orgrimmar", ["uc"] = "Undercity", ["portal"] = "Portal", ["port"] = "Portal", ["water"] = "Water", ["waters"] = "Waters", ["food"] = "Food"} end if not WeakAurasSaved.MagusKeywords then WeakAurasSaved.MagusKeywords = {["tb"] = "Thunder Bluff", ["org"] = "Orgrimmar", ["uc"] = "Undercity", ["portal"] = "Portal", ["port"] = "Portal", ["water"] = "Water", ["waters"] = "Waters", ["food"] = "Food"} end
if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then if e == "CHAT_MSG_SAY" or e == "CHAT_MSG_YELL" or e == "CHAT_MSG_WHISPER" then
if msg and aura_env.toggle == 1 then if msg and aura_env.toggle == 1 then
msg = msg:lower() msg = msg:lower()
local noRealmSender = sender:match("(.+)-%w+") local noRealmSender = sender:match("(.+)-%w+")
--print(sender, noRealmSender, UnitClass(sender), UnitClass(noRealmSender)) --print(sender, noRealmSender, UnitClass(sender), UnitClass(noRealmSender))
if select(3, UnitClass(noRealmSender)) == 8 and not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then if select(3, UnitClass(noRealmSender)) == 8 and not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then
print("Adding", noRealmSender, "to the ignore") print("Adding", noRealmSender, "to the ignore")
WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] = 1 WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] = 1
end end
for k,v in pairs(WeakAurasSaved.MagusKeywords) do for k,v in pairs(WeakAurasSaved.MagusKeywords) do
if msg:match(k) then if msg:match(k) then
local st, en = msg:find(k) local st, en = msg:find(k)
if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and select(3, UnitClass(noRealmSender)) ~= 8 then if not (st > 1 and msg:match(".", st - 1) ~= " ") and not (en < strlen(msg) and msg:match(".", en + 1) ~= " ") and select(3, UnitClass(noRealmSender)) ~= 8 then
if not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then if not WeakAurasSaved.MagusKeywords.AntiMagusTable[noRealmSender] then
InviteUnit(sender) InviteUnit(sender)
end end
end end
end end
end end
end end
elseif e == "TOGGLE_MAGUS" then elseif e == "TOGGLE_MAGUS" then
if aura_env.toggle == 0 then if aura_env.toggle == 0 then
print("Toggling script on") print("Toggling script on")
SendWho('z-"azsuna" c-"Mage"') SendWho('z-"azsuna" c-"Mage"')
aura_env.toggle = 1 aura_env.toggle = 1
else else
print("Toggling script off") print("Toggling script off")
aura_env.toggle = 0 aura_env.toggle = 0
end end
elseif e == "WHO_LIST_UPDATE" then elseif e == "WHO_LIST_UPDATE" then
for i = 1, GetNumWhoResults() do for i = 1, GetNumWhoResults() do
local name = select(1, GetWhoInfo(i)) local name = select(1, GetWhoInfo(i))
local class = select(5, GetWhoInfo(i)) local class = select(5, GetWhoInfo(i))
if class:match("Mage") then if class:match("Mage") then
if not WeakAurasSaved.MagusKeywords.AntiMagusTable[name] then if not WeakAurasSaved.MagusKeywords.AntiMagusTable[name] then
print("Adding", name, "to the ignore table") print("Adding", name, "to the ignore table")
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1 WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
end end
end end
end end
FriendsFrameCloseButton:Click() FriendsFrameCloseButton:Click()
elseif e == "NAME_PLATE_UNIT_ADDED" then elseif e == "NAME_PLATE_UNIT_ADDED" then
local name, class = UnitName(msg), select(3, UnitClass(msg)) local name, class = UnitName(msg), select(3, UnitClass(msg))
local ispl = UnitIsPlayer(msg) local ispl = UnitIsPlayer(msg)
if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then
print("Adding", name, "to the ignore table") print("Adding", name, "to the ignore table")
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1 WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
end end
elseif e =="NAME_PLATE_UNIT_REMOVED" then elseif e =="NAME_PLATE_UNIT_REMOVED" then
local name, class = UnitName(msg), select(3, UnitClass(msg)) local name, class = UnitName(msg), select(3, UnitClass(msg))
local ispl = UnitIsPlayer(msg) local ispl = UnitIsPlayer(msg)
if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then if class == 8 and WeakAurasSaved.MagusKeywords.AntiMagusTable[name] == nil and ispl == true then
print("Adding", name, "to the ignore table") print("Adding", name, "to the ignore table")
WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1 WeakAurasSaved.MagusKeywords.AntiMagusTable[name] = 1
end end
elseif e == "ADD_KEYWORD" then elseif e == "ADD_KEYWORD" then
print("Adding", msg) print("Adding", msg)
msg = msg:lower() msg = msg:lower()
WeakAurasSaved.MagusKeywords[msg] = 1 WeakAurasSaved.MagusKeywords[msg] = 1
elseif e == "LIST_KEYWORDS" then elseif e == "LIST_KEYWORDS" then
for k,v in pairs(WeakAurasSaved.MagusKeywords) do for k,v in pairs(WeakAurasSaved.MagusKeywords) do
print(k) print(k)
end end
elseif e == "REMOVE_KEYWORD" then elseif e == "REMOVE_KEYWORD" then
if WeakAurasSaved.MagusKeywords[msg] then if WeakAurasSaved.MagusKeywords[msg] then
print("Removing", msg) print("Removing", msg)
WeakAurasSaved.MagusKeywords[msg] = nil WeakAurasSaved.MagusKeywords[msg] = nil
else else
print(msg, "does not exist in the keyword table") print(msg, "does not exist in the keyword table")
end end
end end
end end
--EVERY FRAME 1 --EVERY FRAME 1
function() function()
if (WeakAurasSaved.CustomTrash.swingone - GetTime()) > 0 then if (WeakAurasSaved.CustomTrash.swingone - GetTime()) > 0 then
return string.format("%.1f", WeakAurasSaved.CustomTrash.swingone - GetTime()) return string.format("%.1f", WeakAurasSaved.CustomTrash.swingone - GetTime())
end end
end end
--EVERY FRAME 2 --EVERY FRAME 2
function() function()
if (WeakAurasSaved.CustomTrash.swingtwo - GetTime()) > 0 then if (WeakAurasSaved.CustomTrash.swingtwo - GetTime()) > 0 then
return string.format("%.1f", WeakAurasSaved.CustomTrash.swingtwo - GetTime()) return string.format("%.1f", WeakAurasSaved.CustomTrash.swingtwo - GetTime())
end end
end end
--DISPLAY --DISPLAY
function() function()
if WeakAurasSaved.CustomTrash.swingRotation == 1 then if WeakAurasSaved.CustomTrash.swingRotation == 1 then
return "MH" return "MH"
elseif WeakAurasSaved.CustomTrash.swingRotation == 2 then elseif WeakAurasSaved.CustomTrash.swingRotation == 2 then
return "OH" return "OH"
end end
end end
--INIT --INIT
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
WeakAurasSaved.CustomTrash.swingRotation = 1 WeakAurasSaved.CustomTrash.swingRotation = 1
WeakAurasSaved.CustomTrash.swingone = 0 WeakAurasSaved.CustomTrash.swingone = 0
WeakAurasSaved.CustomTrash.swingtwo = 0 WeakAurasSaved.CustomTrash.swingtwo = 0

View File

@@ -1,103 +1,103 @@
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED COMBAT_TICKER_TICK COMBAT_TICKER_FALSE --PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED COMBAT_TICKER_TICK COMBAT_TICKER_FALSE
function(e) function(e)
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {}; aura_env.updateTimers() end if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {}; aura_env.updateTimers() end
if e == "PLAYER_REGEN_ENABLED" then if e == "PLAYER_REGEN_ENABLED" then
if WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker:Cancel(); WeakAurasSaved.CustomTrash.CombatTimers.ticker = nil end if WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker:Cancel(); WeakAurasSaved.CustomTrash.CombatTimers.ticker = nil end
elseif e == "PLAYER_REGEN_DISABLED" then elseif e == "PLAYER_REGEN_DISABLED" then
WeakAurasSaved.CustomTrash.CombatTimers.time = 0 WeakAurasSaved.CustomTrash.CombatTimers.time = 0
WeakAuras.ScanEvents("COMBAT_TICKER_TICK") WeakAuras.ScanEvents("COMBAT_TICKER_TICK")
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0} WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time) aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time)
if not WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("COMBAT_TICKER_TICK") end) end if not WeakAurasSaved.CustomTrash.CombatTimers.ticker then WeakAurasSaved.CustomTrash.CombatTimers.ticker = C_Timer.NewTicker(1, function() WeakAuras.ScanEvents("COMBAT_TICKER_TICK") end) end
elseif e == "COMBAT_TICKER_TICK" then elseif e == "COMBAT_TICKER_TICK" then
WeakAurasSaved.CustomTrash.CombatTimers.time = WeakAurasSaved.CustomTrash.CombatTimers.time + 1 WeakAurasSaved.CustomTrash.CombatTimers.time = WeakAurasSaved.CustomTrash.CombatTimers.time + 1
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time - 1 WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time - 1
if WeakAurasSaved.CustomTrash.CombatTimers.timers[WeakAurasSaved.CustomTrash.CombatTimers.time] then if WeakAurasSaved.CustomTrash.CombatTimers.timers[WeakAurasSaved.CustomTrash.CombatTimers.time] then
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0} WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time) aura_env.nextTimer(WeakAurasSaved.CustomTrash.CombatTimers.time)
C_Timer.After(aura_env.config.dur, function() WeakAuras.ScanEvents("COMBAT_TICKER_FALSE") end) C_Timer.After(aura_env.config.dur, function() WeakAuras.ScanEvents("COMBAT_TICKER_FALSE") end)
return true return true
end end
end end
end end
--UNTRIGGER --UNTRIGGER
function(e) function(e)
if e == "COMBAT_TICKER_FALSE" then if e == "COMBAT_TICKER_FALSE" then
return true return true
end end
end end
--Aura #2 --Aura #2
--COMBAT_TICKER_TICK --COMBAT_TICKER_TICK
function(e) function(e)
return true return true
end end
--DISPLAY --DISPLAY
function() function()
local temps = { local temps = {
[1] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.time}, [1] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.time},
[2] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time}, [2] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time},
[3] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id}, [3] = {["m"] = 0, ["s"] = 0, ["res"] = WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id},
} }
for k,v in ipairs(temps) do for k,v in ipairs(temps) do
while v.res >= 60 do while v.res >= 60 do
v.m = v.m + 1 v.m = v.m + 1
v.res = v.res - 60 v.res = v.res - 60
end end
v.s = v.res v.s = v.res
if v.s < 10 then if v.s < 10 then
v.s = string.format("0%d", v.s) v.s = string.format("0%d", v.s)
end end
if type(v.s) ~= "string" then tostring(v.s) end if type(v.s) ~= "string" then tostring(v.s) end
end end
return string.format("%d:%s\n%d:%s (%d:%s)", temps[1].m, temps[1].s, temps[2].m, temps[2].s, temps[3].m, temps[3].s) return string.format("%d:%s\n%d:%s (%d:%s)", temps[1].m, temps[1].s, temps[2].m, temps[2].s, temps[3].m, temps[3].s)
end end
--INIT --INIT
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {} end if not WeakAurasSaved.CustomTrash.CombatTimers then WeakAurasSaved.CustomTrash.CombatTimers = {} end
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0} WeakAurasSaved.CustomTrash.CombatTimers.nearestTime = {["time"] = 999, ["id"] = 0}
WeakAurasSaved.CustomTrash.CombatTimers.time = 0 WeakAurasSaved.CustomTrash.CombatTimers.time = 0
aura_env.updateTimers = function() aura_env.updateTimers = function()
WeakAurasSaved.CustomTrash.CombatTimers.timers = {} WeakAurasSaved.CustomTrash.CombatTimers.timers = {}
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m1 or 0) * 60) + (aura_env.config.s1 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m1 or 0) * 60) + (aura_env.config.s1 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m2 or 0) * 60) + (aura_env.config.s2 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m2 or 0) * 60) + (aura_env.config.s2 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m3 or 0) * 60) + (aura_env.config.s3 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m3 or 0) * 60) + (aura_env.config.s3 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m4 or 0) * 60) + (aura_env.config.s4 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m4 or 0) * 60) + (aura_env.config.s4 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m5 or 0) * 60) + (aura_env.config.s5 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m5 or 0) * 60) + (aura_env.config.s5 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m6 or 0) * 60) + (aura_env.config.s6 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m6 or 0) * 60) + (aura_env.config.s6 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m7 or 0) * 60) + (aura_env.config.s7 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m7 or 0) * 60) + (aura_env.config.s7 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m8 or 0) * 60) + (aura_env.config.s8 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m8 or 0) * 60) + (aura_env.config.s8 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m9 or 0) * 60) + (aura_env.config.s9 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m9 or 0) * 60) + (aura_env.config.s9 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m10 or 0) * 60) + (aura_env.config.s10 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m10 or 0) * 60) + (aura_env.config.s10 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m11 or 0) * 60) + (aura_env.config.s11 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m11 or 0) * 60) + (aura_env.config.s11 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m12 or 0) * 60) + (aura_env.config.s12 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m12 or 0) * 60) + (aura_env.config.s12 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m13 or 0) * 60) + (aura_env.config.s13 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m13 or 0) * 60) + (aura_env.config.s13 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m14 or 0) * 60) + (aura_env.config.s14 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m14 or 0) * 60) + (aura_env.config.s14 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m15 or 0) * 60) + (aura_env.config.s15 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m15 or 0) * 60) + (aura_env.config.s15 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m16 or 0) * 60) + (aura_env.config.s16 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m16 or 0) * 60) + (aura_env.config.s16 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m17 or 0) * 60) + (aura_env.config.s17 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m17 or 0) * 60) + (aura_env.config.s17 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m18 or 0) * 60) + (aura_env.config.s18 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m18 or 0) * 60) + (aura_env.config.s18 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m19 or 0) * 60) + (aura_env.config.s19 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m19 or 0) * 60) + (aura_env.config.s19 or 0)] = 1
WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m20 or 0) * 60) + (aura_env.config.s20 or 0)] = 1 WeakAurasSaved.CustomTrash.CombatTimers.timers[((aura_env.config.m20 or 0) * 60) + (aura_env.config.s20 or 0)] = 1
end end
aura_env.updateTimers() aura_env.updateTimers()
aura_env.nextTimer = function(time) aura_env.nextTimer = function(time)
for k,v in pairs(WeakAurasSaved.CustomTrash.CombatTimers.timers) do for k,v in pairs(WeakAurasSaved.CustomTrash.CombatTimers.timers) do
local dtime = k - time local dtime = k - time
if dtime < WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time and dtime > 0 then if dtime < WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time and dtime > 0 then
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = dtime WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.time = dtime
WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id = k WeakAurasSaved.CustomTrash.CombatTimers.nearestTime.id = k
end end
end end
return 0 return 0
end end

View File

@@ -1,65 +1,65 @@
--CLEU --CLEU
function(e, ...) function(e, ...)
local se = select(2, ...) local se = select(2, ...)
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
for i = 1, 40 do for i = 1, 40 do
local name = UnitDebuff("target", i) local name = UnitDebuff("target", i)
if name == "Conductive Ink" then if name == "Conductive Ink" then
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff("target", i)) aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff("target", i))
aura_env.totaldebuff.damage = aura_env.totaldebuff.stacks * aura_env.config.mediandamage aura_env.totaldebuff.damage = aura_env.totaldebuff.stacks * aura_env.config.mediandamage
end end
end end
for i = 1, 40 do for i = 1, 40 do
local name = UnitDebuff("target", i, PLAYER) local name = UnitDebuff("target", i, PLAYER)
if name == "Conductive Ink" then if name == "Conductive Ink" then
aura_env.owndebuff.stacks = select(3, UnitDebuff("target", i, PLAYER)) aura_env.owndebuff.stacks = select(3, UnitDebuff("target", i, PLAYER))
aura_env.owndebuff.damage = aura_env.owndebuff.stacks * aura_env.config.mediandamage aura_env.owndebuff.damage = aura_env.owndebuff.stacks * aura_env.config.mediandamage
break break
end end
end end
return true return true
end end
end end
--DISPLAY --DISPLAY
function() function()
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage) aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage)
return "Player stacks\nPlayer damage\nTotal stacks\nTotal damage" return "Player stacks\nPlayer damage\nTotal stacks\nTotal damage"
end end
--INIT --INIT
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
if not aura_env.region.text2 then if not aura_env.region.text2 then
local text2 = aura_env.region:CreateFontString(nil, aura_env.region) local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text2 = text2 aura_env.region.text2 = text2
end end
local font, size, flags = aura_env.region.text:GetFont() local font, size, flags = aura_env.region.text:GetFont()
aura_env.region.text2:SetFont(font, size, flags) aura_env.region.text2:SetFont(font, size, flags)
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4]) aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0) aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
aura_env.region.text2:SetText("") aura_env.region.text2:SetText("")
aura_env.region.text2:Show() aura_env.region.text2:Show()
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end

View File

@@ -1,290 +1,290 @@
--CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED --CLEU PLAYER_TARGET_CHANGED PLAYER_FOCUS_CHANGED
function(e, ...) function(e, ...)
if aura_env.config.tsuenable == false then if aura_env.config.tsuenable == false then
local se = select(2, ...) local se = select(2, ...)
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" then
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
aura_env.damagepercentage = 0 aura_env.damagepercentage = 0
local unit = "target" local unit = "target"
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
local bossmax = UnitHealthMax(unit) local bossmax = UnitHealthMax(unit)
if aura_env.config.pdmg == true then if aura_env.config.pdmg == true then
for i = 1, 200 do for i = 1, 200 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name == "Conductive Ink" then if name == "Conductive Ink" then
local caster = select(7, UnitDebuff(unit, i)) local caster = select(7, UnitDebuff(unit, i))
local stacks = select(3, UnitDebuff(unit, i)) local stacks = select(3, UnitDebuff(unit, i))
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
aura_env.myTooltip:SetUnitDebuff(unit, i) aura_env.myTooltip:SetUnitDebuff(unit, i)
local text = _G["MyAddOnTooltipTextLeft2"]:GetText() local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
if text:match("Falling below %d*%% health will cause") then if text:match("Falling below %d*%% health will cause") then
local damage = text:match("inflict (%d+%,?%d*)") local damage = text:match("inflict (%d+%,?%d*)")
damage = damage:gsub("%,", "") damage = damage:gsub("%,", "")
damage = damage:gsub(" ", "") damage = damage:gsub(" ", "")
damage = tonumber(damage) damage = tonumber(damage)
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage aura_env.totaldebuff.damage = aura_env.totaldebuff.damage + damage
if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end if caster == "player" then aura_env.owndebuff.damage = damage; aura_env.owndebuff.stacks = stacks end
end end
elseif not name then break end elseif not name then break end
end end
else else
for i = 1, 200 do for i = 1, 200 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name == "Conductive Ink" then if name == "Conductive Ink" then
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i)) aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + select(3, UnitDebuff(unit, i))
aura_env.myTooltip:SetUnitDebuff(unit, i) aura_env.myTooltip:SetUnitDebuff(unit, i)
local text = _G["MyAddOnTooltipTextLeft2"]:GetText() local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
if text:match("Falling below %d*%% health will cause") then if text:match("Falling below %d*%% health will cause") then
aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)") aura_env.totaldebuff.damage = text:match("inflict (%d+%,?%d*)")
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "") aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub("%,", "")
aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "") aura_env.totaldebuff.damage = aura_env.totaldebuff.damage:gsub(" ", "")
aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage) aura_env.totaldebuff.damage = tonumber(aura_env.totaldebuff.damage)
end end
break break
elseif not name then break end elseif not name then break end
end end
end end
aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2) aura_env.damagepercentage = aura_env.round(((aura_env.totaldebuff.damage / bossmax) * 100), 2)
return true return true
end end
end end
end end
--TSU --TSU
--CLEU PLAYER_TARGET_CHANGED --CLEU PLAYER_TARGET_CHANGED
function(allstates, e, ...) function(allstates, e, ...)
if aura_env.config.tsuenable == true then if aura_env.config.tsuenable == true then
local unit = "target" local unit = "target"
if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end if aura_env.config.tar == 2 then unit = "focus" elseif aura_env.config.tar == 3 then unit = "Boss1" end
if UnitExists(unit) then if UnitExists(unit) then
local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit) local hp, maxhp = UnitHealth(unit), UnitHealthMax(unit)
local pp = hp / maxhp local pp = hp / maxhp
if pp > 0.3 then if pp > 0.3 then
local totaldamage, totalstacks = 0, 0 local totaldamage, totalstacks = 0, 0
local maxdamage, maxstacks = {["d"] = 0, ["c"] = ""}, {["s"] = 0, ["c"] = ""} local maxdamage, maxstacks = {["d"] = 0, ["c"] = ""}, {["s"] = 0, ["c"] = ""}
local datatable = {} local datatable = {}
aura_env.damagepercentage = 0 aura_env.damagepercentage = 0
local se = select(2, ...) local se = select(2, ...)
if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then if se == "SPELL_AURA_APPLIED_DOSE" or e == "PLAYER_TARGET_CHANGED" or e == "PLAYER_FOCUS_CHANGED" then
for i = 1, #allstates do for i = 1, #allstates do
allstates[i].sub30 = false allstates[i].sub30 = false
if i > 1 then if i > 1 then
allstates[i] = {["show"] = false, ["changed"] = true} allstates[i] = {["show"] = false, ["changed"] = true}
end end
end end
for i = 1, 200 do for i = 1, 200 do
local name = UnitDebuff(unit, i) local name = UnitDebuff(unit, i)
if name == "Conductive Ink" then if name == "Conductive Ink" then
local caster = select(7, UnitDebuff(unit, i)) local caster = select(7, UnitDebuff(unit, i))
local stacks = select(3, UnitDebuff(unit, i)) local stacks = select(3, UnitDebuff(unit, i))
aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks aura_env.totaldebuff.stacks = aura_env.totaldebuff.stacks + stacks
aura_env.myTooltip:SetUnitDebuff(unit, i) aura_env.myTooltip:SetUnitDebuff(unit, i)
local text = _G["MyAddOnTooltipTextLeft2"]:GetText() local text = _G["MyAddOnTooltipTextLeft2"]:GetText()
if text:match("Falling below %d*%% health will cause") then if text:match("Falling below %d*%% health will cause") then
local damage = text:match("inflict (%d+%,?%d*)") local damage = text:match("inflict (%d+%,?%d*)")
damage = damage:gsub("%,", "") damage = damage:gsub("%,", "")
damage = damage:gsub(" ", "") damage = damage:gsub(" ", "")
damage = tonumber(damage) damage = tonumber(damage)
--local damage = i * 23412 --local damage = i * 23412
datatable[caster] = {["damage"] = damage, ["stacks"] = stacks, ["name"] = UnitName(caster), ["class"] = select(3, UnitClass(caster))} --UnitName(caster) UnitClass(caster) datatable[caster] = {["damage"] = damage, ["stacks"] = stacks, ["name"] = UnitName(caster), ["class"] = select(3, UnitClass(caster))} --UnitName(caster) UnitClass(caster)
if damage > maxdamage.d then maxdamage.d = damage; maxdamage.c = caster; maxstacks.s = stacks; maxstacks.c = caster end if damage > maxdamage.d then maxdamage.d = damage; maxdamage.c = caster; maxstacks.s = stacks; maxstacks.c = caster end
totaldamage = totaldamage + damage; totalstacks = totalstacks + stacks totaldamage = totaldamage + damage; totalstacks = totalstacks + stacks
end end
elseif not name then break end elseif not name then break end
end end
local allstatesindex = 2 local allstatesindex = 2
for k,v in pairs(datatable) do for k,v in pairs(datatable) do
allstates[allstatesindex] = allstates[allstatesindex] =
{ {
show = true, show = true,
changed = true, changed = true,
progressType = "static", progressType = "static",
caster = v.name, caster = v.name,
class = v.class, class = v.class,
stacks = v.stacks, stacks = v.stacks,
damage = v.damage, damage = v.damage,
} }
if aura_env.config.sort == 1 then if aura_env.config.sort == 1 then
allstates[allstatesindex].resort = true allstates[allstatesindex].resort = true
allstates[allstatesindex].index = v.damage --/ totaldamage allstates[allstatesindex].index = v.damage --/ totaldamage
allstates[allstatesindex].value = v.damage --/ totaldamage allstates[allstatesindex].value = v.damage --/ totaldamage
allstates[allstatesindex].total = maxdamage.d allstates[allstatesindex].total = maxdamage.d
elseif aura_env.config.sort == 2 then elseif aura_env.config.sort == 2 then
allstates[allstatesindex].resort = true allstates[allstatesindex].resort = true
allstates[allstatesindex].index = v.stacks allstates[allstatesindex].index = v.stacks
allstates[allstatesindex].value = v.stacks allstates[allstatesindex].value = v.stacks
allstates[allstatesindex].total = totalstacks allstates[allstatesindex].total = totalstacks
end end
allstatesindex = allstatesindex + 1 allstatesindex = allstatesindex + 1
end end
dmgper = aura_env.round(((totaldamage / maxhp) * 100), 2) dmgper = aura_env.round(((totaldamage / maxhp) * 100), 2)
allstates[1] = allstates[1] =
{ {
show = true, show = true,
changed = true, changed = true,
progressType = "static", progressType = "static",
caster = "Total", caster = "Total",
stacks = totalstacks, stacks = totalstacks,
damage = totaldamage, damage = totaldamage,
resort = true, resort = true,
percent = dmgper, percent = dmgper,
index = maxdamage.d + 1, index = maxdamage.d + 1,
value = maxdamage.d + 1, value = maxdamage.d + 1,
total = maxdamage.d + 1, total = maxdamage.d + 1,
} }
if totalstacks == 0 then totalstacks = 1 end if totalstacks == 0 then totalstacks = 1 end
if aura_env.config.sort == 2 then allstates[1].index = totalstacks + 1 end if aura_env.config.sort == 2 then allstates[1].index = totalstacks + 1 end
end end
return true return true
else else
for i = 1, #allstates do for i = 1, #allstates do
if allstates[i] then if allstates[i] then
allstates[i].show = true allstates[i].show = true
allstates[i].changed = true allstates[i].changed = true
allstates[i].sub30 = true allstates[i].sub30 = true
end end
end end
allstates[1].percent = "<30" allstates[1].percent = "<30"
allstates[1].class = 15 allstates[1].class = 15
return true return true
end end
else else
for i = 1, #allstates do for i = 1, #allstates do
if allstates[i].sub30 == false or not allstates[i].sub30 then if allstates[i].sub30 == false or not allstates[i].sub30 then
allstates[i] = {["show"] = false, ["changed"] = true} allstates[i] = {["show"] = false, ["changed"] = true}
end end
end end
return true return true
end end
end end
end end
--CUSTOM TRIGGER --CUSTOM TRIGGER
function(t) function(t)
if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end if aura_env.config.tsuenable == false then return t[1] and t[2] elseif aura_env.config.tsuenable == true then return t[3] and t[2] end
end end
--COLOR ANIMATION --COLOR ANIMATION
function() function()
if aura_env.state then if aura_env.statee then
return aura_env.classColor(aura_env.state.class) return aura_env.classColor(aura_env.statee.class)
end end
end end
--DISPLAY --DISPLAY
function() function()
if aura_env.config.tsuenable == false then if aura_env.config.tsuenable == false then
if aura_env.config.pdmg == true then if aura_env.config.pdmg == true then
if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end if aura_env.config.sh == true then aura_env.owndebuff.damage = aura_env.shorten(aura_env.owndebuff.damage); aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%") aura_env.region.text2:SetText(aura_env.owndebuff.stacks .. "\n" .. aura_env.owndebuff.damage .. "\n" .. aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end if aura_env.config.stext == true then aura_env.region.text3:SetText("Player stacks\nPlayer damage\nTotal stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
else else
if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end if aura_env.config.sh == true then aura_env.totaldebuff.damage = aura_env.shorten(aura_env.totaldebuff.damage) end
aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%") aura_env.region.text2:SetText(aura_env.totaldebuff.stacks .. "\n" .. aura_env.totaldebuff.damage .. "\n" .. aura_env.damagepercentage .. "%")
if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end if aura_env.config.stext == true then aura_env.region.text3:SetText("Total stacks\nTotal damage\nDamage in %") else aura_env.region.text3:SetText("") end
end end
else else
if aura_env.state.caster == "Total" then if aura_env.statee.caster == "Total" then
return aura_env.shorten(aura_env.state.damage) .. " - " .. aura_env.state.stacks .. " - " .. aura_env.state.percent .. "%" return aura_env.shorten(aura_env.statee.damage) .. " - " .. aura_env.statee.stacks .. " - " .. aura_env.statee.percent .. "%"
else else
return aura_env.shorten(aura_env.state.damage) .. " - " .. aura_env.state.stacks return aura_env.shorten(aura_env.statee.damage) .. " - " .. aura_env.statee.stacks
end end
end end
end end
--INIT --INIT
aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate") aura_env.myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE") aura_env.myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.owndebuff = {["stacks"] = 0, ["damage"] = 0,}
aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,} aura_env.totaldebuff = {["stacks"] = 0, ["damage"] = 0,}
if aura_env.config.tsuenable == false then if aura_env.config.tsuenable == false then
if not aura_env.region.text2 then if not aura_env.region.text2 then
local text2 = aura_env.region:CreateFontString(nil, aura_env.region) local text2 = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text2 = text2 aura_env.region.text2 = text2
end end
local font, size, flags = aura_env.region.text:GetFont() local font, size, flags = aura_env.region.text:GetFont()
aura_env.region.text2:SetFont(font, size, flags) aura_env.region.text2:SetFont(font, size, flags)
aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4]) aura_env.region.text2:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0) aura_env.region.text2:SetPoint("CENTER", aura_env.region, "CENTER", aura_env.config.x, 0)
aura_env.region.text2:SetText("") aura_env.region.text2:SetText("")
aura_env.region.text2:Show() aura_env.region.text2:Show()
if not aura_env.region.text3 then if not aura_env.region.text3 then
local text3 = aura_env.region:CreateFontString(nil, aura_env.region) local text3 = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text3 = text3 aura_env.region.text3 = text3
end end
local font, size, flags = aura_env.region.text:GetFont() local font, size, flags = aura_env.region.text:GetFont()
aura_env.region.text3:SetFont(font, size, flags) aura_env.region.text3:SetFont(font, size, flags)
aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4]) aura_env.region.text3:SetTextColor(aura_env.config.color[1], aura_env.config.color[2], aura_env.config.color[3], aura_env.config.color[4])
aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0) aura_env.region.text3:SetPoint("CENTER", aura_env.region, "CENTER", - aura_env.config.x, 0)
aura_env.region.text3:SetText("") aura_env.region.text3:SetText("")
aura_env.region.text3:Show() aura_env.region.text3:Show()
aura_env.region.bar:Hide() aura_env.region.bar:Hide()
end end
if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end if aura_env.config.tsuenable == true and aura_env.region.text2 then aura_env.region.text2:Hide() end
if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end if aura_env.config.tsuenable == true and aura_env.region.text3 then aura_env.region.text3:Hide() end
if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() end if aura_env.config.tsuenable == true and aura_env.region.bar then aura_env.region.bar:Show() end
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end
aura_env.round = function(var, n) aura_env.round = function(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
aura_env.classColor = function(class) aura_env.classColor = function(class)
if class == 1 then return 0.78, 0.61, 0.43 if class == 1 then return 0.78, 0.61, 0.43
elseif class == 2 then return 0.96, 0.55, 0.73 elseif class == 2 then return 0.96, 0.55, 0.73
elseif class == 3 then return 0.67, 0.83, 0.45 elseif class == 3 then return 0.67, 0.83, 0.45
elseif class == 4 then return 1, 0.96, 0.41, 1 elseif class == 4 then return 1, 0.96, 0.41, 1
elseif class == 5 then return 1, 1, 1 elseif class == 5 then return 1, 1, 1
elseif class == 6 then return 0.77, 0.12, 0.23 elseif class == 6 then return 0.77, 0.12, 0.23
elseif class == 7 then return 0, 0.44, 0.87 elseif class == 7 then return 0, 0.44, 0.87
elseif class == 8 then return 0.25, 0.78, 0.92 elseif class == 8 then return 0.25, 0.78, 0.92
elseif class == 9 then return 0.53, 0.53, 0.93 elseif class == 9 then return 0.53, 0.53, 0.93
elseif class == 10 then return 0, 1, 0.59 elseif class == 10 then return 0, 1, 0.59
elseif class == 11 then return 1, 0.49, 0.04 elseif class == 11 then return 1, 0.49, 0.04
elseif class == 12 then return 0.64, 0.19, 0.79 elseif class == 12 then return 0.64, 0.19, 0.79
elseif class == 15 then return 0, 1, 0 elseif class == 15 then return 0, 1, 0
else return 1, 1, 1 end else return 1, 1, 1 end
end end
--TESTING --TESTING
--Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1 --Conductive Ink 1500960 1 Magic 120 119774.845 player false false 302565 false false true false 1
aura_env.UnitDebuffC = function(unit, i) aura_env.UnitDebuffC = function(unit, i)
if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko" if i == 1 then return "Conductive Ink", 1500960, 1, 2, 120, 119774.845, "Pinko"
elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy" elseif i == 1 then return "Conductive Ink", 1500960, 3, 4, 120, 119774.845, "Billy"
elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary" elseif i == 2 then return "Conductive Ink", 1500960, 7, 7, 120, 119774.845, "Mary"
elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna" elseif i == 3 then return "Conductive Ink", 1500960, 35, 11, 120, 119774.845, "Anna"
elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John" elseif i == 4 then return "Conductive Ink", 1500960, 8, 6, 120, 119774.845, "John"
elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank" elseif i == 5 then return "Conductive Ink", 1500960, 72, 2, 120, 119774.845, "Frank"
elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma" elseif i == 6 then return "Conductive Ink", 1500960, 25, 7, 120, 119774.845, "Emma"
elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia" elseif i == 7 then return "Conductive Ink", 1500960, 45, 8, 120, 119774.845, "Sophia"
elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry" elseif i == 8 then return "Conductive Ink", 1500960, 37, 5, 120, 119774.845, "Henry"
elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan" elseif i == 9 then return "Conductive Ink", 1500960, 4, 3, 120, 119774.845, "Ethan"
elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael" elseif i == 10 then return "Conductive Ink", 1500960, 1, 1, 120, 119774.845, "Michael"
end end
end end

View File

@@ -1,76 +1,76 @@
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT UPDATE_WOUNDS --COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT UPDATE_WOUNDS
function(e, ...) function(e, ...)
if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end
if not WeakAurasSaved.FesteringWounds.ticker then WeakAurasSaved.FesteringWounds.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_WOUNDS") end) end if not WeakAurasSaved.FesteringWounds.ticker then WeakAurasSaved.FesteringWounds.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_WOUNDS") end) end
if e == "UPDATE_WOUNDS" then return true if e == "UPDATE_WOUNDS" then return true
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...) local se = select(2, ...)
local caster = select(5, ...) local caster = select(5, ...)
local spellname = select(13, ...) local spellname = select(13, ...)
local stacks = select(16, ...) local stacks = select(16, ...)
if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_APPLIED_DOSE" or se == "SPELL_AURA_REMOVED" or se == "SPELL_AURA_REMOVED_DOSE" then if se == "SPELL_AURA_APPLIED" or se == "SPELL_AURA_APPLIED_DOSE" or se == "SPELL_AURA_REMOVED" or se == "SPELL_AURA_REMOVED_DOSE" then
if caster and caster == UnitName("player") and spellname == "Festering Wound" then if caster and caster == UnitName("player") and spellname == "Festering Wound" then
local countsum = 0 local countsum = 0
local counted = 0 local counted = 0
for i = 1, 40 do for i = 1, 40 do
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
local index = 1 local index = 1
while UnitDebuff("nameplate" .. i, index) do while UnitDebuff("nameplate" .. i, index) do
local name, _, _, count = UnitDebuff("nameplate" .. i, index) local name, _, _, count = UnitDebuff("nameplate" .. i, index)
local caster = select(8, UnitDebuff("nameplate" .. i, index)) local caster = select(8, UnitDebuff("nameplate" .. i, index))
if name == "Festering Wound" then if name == "Festering Wound" then
countsum = countsum + count countsum = countsum + count
if counted == 0 then counted = 1 end if counted == 0 then counted = 1 end
end end
index = index + 1 index = index + 1
end end
end end
end end
if counted == 0 and se == "SPELL_AURA_REMOVED" then if counted == 0 and se == "SPELL_AURA_REMOVED" then
WeakAurasSaved.FesteringWounds.count = 0 WeakAurasSaved.FesteringWounds.count = 0
end end
if counted == 1 then if counted == 1 then
WeakAurasSaved.FesteringWounds.count = countsum WeakAurasSaved.FesteringWounds.count = countsum
end end
--DevTools_Dump(WeakAurasSaved.FesteringWounds) --DevTools_Dump(WeakAurasSaved.FesteringWounds)
return true return true
end end
end end
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
WeakAurasSaved.FesteringWounds.count = 0 WeakAurasSaved.FesteringWounds.count = 0
local countsum = 0 local countsum = 0
local counted = 0 local counted = 0
for i = 1, 40 do for i = 1, 40 do
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
local index = 1 local index = 1
while UnitDebuff("nameplate" .. i, index) do while UnitDebuff("nameplate" .. i, index) do
local name, _, _, count = UnitDebuff("nameplate" .. i, index) local name, _, _, count = UnitDebuff("nameplate" .. i, index)
local caster = select(8, UnitDebuff("nameplate" .. i, index)) local caster = select(8, UnitDebuff("nameplate" .. i, index))
if name == "Festering Wound" then if name == "Festering Wound" then
countsum = countsum + count countsum = countsum + count
if counted == 0 then counted = 1 end if counted == 0 then counted = 1 end
end end
index = index + 1 index = index + 1
end end
end end
end end
if counted == 1 then if counted == 1 then
WeakAurasSaved.FesteringWounds.count = countsum WeakAurasSaved.FesteringWounds.count = countsum
end end
--DevTools_Dump(WeakAurasSaved.FesteringWounds) --DevTools_Dump(WeakAurasSaved.FesteringWounds)
return true return true
end end
end end
--STACK INFO --STACK INFO
function() function()
return WeakAurasSaved.FesteringWounds.count return WeakAurasSaved.FesteringWounds.count
end end
--DISPLAY --DISPLAY
function() function()
return WeakAurasSaved.FesteringWounds["Spring Blossoms"].count return WeakAurasSaved.FesteringWounds["Spring Blossoms"].count
end end
--INIT --INIT
if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end if not WeakAurasSaved.FesteringWounds then WeakAurasSaved.FesteringWounds = {["count"] = 0} end

View File

@@ -1,119 +1,119 @@
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT --COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_ENABLED PLAYER_REGEN_DISABLED DRUID_HOTS_REMOVE_HOT
function(e, ...) function(e, ...)
if not WeakAurasSaved.DruidHots then if not WeakAurasSaved.DruidHots then
WeakAurasSaved.DruidHots = { WeakAurasSaved.DruidHots = {
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}}, ["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}}, ["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}},
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}}, ["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}},
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}}, ["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}},
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}}, ["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}},
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}}, ["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}},
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}}, ["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
} }
end end
if not WeakAurasSaved.DruidHots.ticker then WeakAurasSaved.DruidHots.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_HOTS") end) end if not WeakAurasSaved.DruidHots.ticker then WeakAurasSaved.DruidHots.ticker = C_Timer.NewTicker(0.5, function() WeakAuras.ScanEvents("UPDATE_HOTS") end) end
if e == "DRUID_HOTS_REMOVE_HOT" then if e == "DRUID_HOTS_REMOVE_HOT" then
local name, id = ... local name, id = ...
--DevTools_Dump(WeakAurasSaved.DruidHots) --DevTools_Dump(WeakAurasSaved.DruidHots)
if WeakAurasSaved.DruidHots[name].timers[id] then if WeakAurasSaved.DruidHots[name].timers[id] then
if WeakAurasSaved.DruidHots[name].timers[id] then WeakAurasSaved.DruidHots[name].timers[id]:Cancel() end if WeakAurasSaved.DruidHots[name].timers[id] then WeakAurasSaved.DruidHots[name].timers[id]:Cancel() end
WeakAurasSaved.DruidHots[name].timers[id] = nil WeakAurasSaved.DruidHots[name].timers[id] = nil
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count - 1 WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count - 1
end end
WeakAuras.ScanEvents("UPDATE_HOTS") WeakAuras.ScanEvents("UPDATE_HOTS")
--DevTools_Dump(WeakAurasSaved.DruidHots) --DevTools_Dump(WeakAurasSaved.DruidHots)
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...) local se = select(2, ...)
local caster = select(5, ...) local caster = select(5, ...)
local spellname = select(13, ...) local spellname = select(13, ...)
local target = select(10, ...) local target = select(10, ...)
if se == "SPELL_AURA_APPLIED" then if se == "SPELL_AURA_APPLIED" then
if caster and caster == UnitName("player") then if caster and caster == UnitName("player") then
if WeakAurasSaved.DruidHots[spellname] then if WeakAurasSaved.DruidHots[spellname] then
WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count + 1 WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count + 1
WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count] = C_Timer.NewTimer(WeakAurasSaved.DruidHots[spellname].duration * 4, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", spellname, WeakAurasSaved.DruidHots[spellname].count) end) WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count] = C_Timer.NewTimer(WeakAurasSaved.DruidHots[spellname].duration * 4, function() WeakAuras.ScanEvents("DRUID_HOTS_REMOVE_HOT", spellname, WeakAurasSaved.DruidHots[spellname].count) end)
--DevTools_Dump(WeakAurasSaved.DruidHots) --DevTools_Dump(WeakAurasSaved.DruidHots)
WeakAuras.ScanEvents("UPDATE_HOTS") WeakAuras.ScanEvents("UPDATE_HOTS")
end end
end end
elseif se == "SPELL_AURA_REMOVED" then elseif se == "SPELL_AURA_REMOVED" then
if caster and caster == UnitName("player") then if caster and caster == UnitName("player") then
if WeakAurasSaved.DruidHots[spellname] then if WeakAurasSaved.DruidHots[spellname] then
if WeakAurasSaved.DruidHots[spellname].count > 0 then if WeakAurasSaved.DruidHots[spellname].count > 0 then
WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count - 1 WeakAurasSaved.DruidHots[spellname].count = WeakAurasSaved.DruidHots[spellname].count - 1
if WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] then WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1]:Cancel(); WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] = nil end if WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] then WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1]:Cancel(); WeakAurasSaved.DruidHots[spellname].timers[WeakAurasSaved.DruidHots[spellname].count + 1] = nil end
--DevTools_Dump(WeakAurasSaved.DruidHots) --DevTools_Dump(WeakAurasSaved.DruidHots)
WeakAuras.ScanEvents("UPDATE_HOTS") WeakAuras.ScanEvents("UPDATE_HOTS")
end end
end end
end end
end end
elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then elseif e == "PLAYER_REGEN_ENABLED" or e == "PLAYER_REGEN_DISABLED" then
WeakAurasSaved.DruidHots = { WeakAurasSaved.DruidHots = {
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}}, ["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}}, ["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timers"] = {}},
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}}, ["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timers"] = {}},
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}}, ["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timers"] = {}},
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}}, ["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timers"] = {}},
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}}, ["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timers"] = {}},
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}}, ["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timers"] = {}},
} }
local instance = "party" local instance = "party"
if IsInRaid() then instance = "raid" end if IsInRaid() then instance = "raid" end
local index = 1 local index = 1
--DevTools_Dump(UnitBuff("player", index, "PLAYER")) --DevTools_Dump(UnitBuff("player", index, "PLAYER"))
while UnitBuff("player", index, "PLAYER") do while UnitBuff("player", index, "PLAYER") do
local name = UnitBuff("player", index, "PLAYER") local name = UnitBuff("player", index, "PLAYER")
if WeakAurasSaved.DruidHots[name] then if WeakAurasSaved.DruidHots[name] then
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1 WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1
end end
index = index + 1 index = index + 1
if index > 20 then break end if index > 20 then break end
end end
for i = 1, GetNumGroupMembers() do for i = 1, GetNumGroupMembers() do
local index = 1 local index = 1
--DevTools_Dump(UnitBuff(instance .. i, index, "PLAYER")) --DevTools_Dump(UnitBuff(instance .. i, index, "PLAYER"))
while UnitBuff(instance .. i, index, "PLAYER") do while UnitBuff(instance .. i, index, "PLAYER") do
--DevTools_Dump(UnitBuff(instance .. i , index, "PLAYER")) --DevTools_Dump(UnitBuff(instance .. i , index, "PLAYER"))
local name = UnitBuff(instance .. i, index, "PLAYER") local name = UnitBuff(instance .. i, index, "PLAYER")
if WeakAurasSaved.DruidHots[name] then if WeakAurasSaved.DruidHots[name] then
WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1 WeakAurasSaved.DruidHots[name].count = WeakAurasSaved.DruidHots[name].count + 1
end end
index = index + 1 index = index + 1
if index > 20 then break end if index > 20 then break end
end end
end end
--DevTools_Dump(WeakAurasSaved.DruidHots) --DevTools_Dump(WeakAurasSaved.DruidHots)
WeakAuras.ScanEvents("UPDATE_HOTS") WeakAuras.ScanEvents("UPDATE_HOTS")
end end
end end
--DISPLAY --DISPLAY
function() function()
return WeakAurasSaved.DruidHots["Spring Blossoms"].count return WeakAurasSaved.DruidHots["Spring Blossoms"].count
end end
--Mana bar --Mana bar
--DISPLAY --DISPLAY
function() function()
local mana = UnitPower("player", 0) local mana = UnitPower("player", 0)
if mana >= 1e3 and mana < 1e6 then if mana >= 1e3 and mana < 1e6 then
mana = string.format("%.1fk", mana / 1e3) mana = string.format("%.1fk", mana / 1e3)
elseif mana >= 1e6 and mana < 1e9 then elseif mana >= 1e6 and mana < 1e9 then
mana = string.format("%.1fM", mana / 1e6) mana = string.format("%.1fM", mana / 1e6)
end end
return mana return mana
end end
--INIT --INIT
if not WeakAurasSaved.DruidHots then if not WeakAurasSaved.DruidHots then
WeakAurasSaved.DruidHots = { WeakAurasSaved.DruidHots = {
["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil}, ["Rejuvenation"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil},
["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timer"] = nil}, ["Regrowth"] = {["count"] = 0, ["duration"] = 12, ["timer"] = nil},
["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timer"] = nil}, ["Lifebloom"] = {["count"] = 0, ["duration"] = 15, ["timer"] = nil},
["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timer"] = nil}, ["Wild Growth"] = {["count"] = 0, ["duration"] = 7, ["timer"] = nil},
["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timer"] = nil}, ["Spring Blossoms"] = {["count"] = 0, ["duration"] = 6, ["timer"] = nil},
["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timer"] = nil}, ["Grove Tending"] = {["count"] = 0, ["duration"] = 9, ["timer"] = nil},
["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil}, ["Rejuvenation (Germination)"] = {["count"] = 0, ["duration"] = 18, ["timer"] = nil},
} }
end end

View File

@@ -1,203 +1,203 @@
--Idea: --Idea:
--Get loot from everyone --Get loot from everyone
--Put loot in table sorted with everyone --Put loot in table sorted with everyone
--If AH visit get prices of boe items? and DE mats --If AH visit get prices of boe items? and DE mats
--In item table add value in vendor, AH and DE --In item table add value in vendor, AH and DE
--Add option to export all to excel --Add option to export all to excel
--Add timer (toggleable?) with a button and macro --Add timer (toggleable?) with a button and macro
--Add option to mark significant items, idk how maybe use macro maybe some sort of button --Add option to mark significant items, idk how maybe use macro maybe some sort of button
--Use only for guildies --Use only for guildies
--Maybe reminder to turn timer on --Maybe reminder to turn timer on
--Maybe individual member timer --Maybe individual member timer
--Sort table by member > item > iteminfo --Sort table by member > item > iteminfo
--Where member holds time and key is name --Where member holds time and key is name
--Maybe use time as start and endtime --Maybe use time as start and endtime
--Maybe establish comms with other weakauras to make sure times are synced --Maybe establish comms with other weakauras to make sure times are synced
--Add gold / hour !! --Add gold / hour !!
--Maybe add split gold f(totalgold, membertimespent)? --Maybe add split gold f(totalgold, membertimespent)?
--Google sheets uses tab for column seperation and newline for row seperation !! --Google sheets uses tab for column seperation and newline for row seperation !!
--Make into addon not weakaura --Make into addon not weakaura
--CHAT_MSG_LOOT AUCTION_HOUSE_SHOW AUCTION_ITEM_LIST_UPDATE AH_READY --CHAT_MSG_LOOT AUCTION_HOUSE_SHOW AUCTION_ITEM_LIST_UPDATE AH_READY
function(e, msg) function(e, msg)
if e == "CHAT_MSG_LOOT" then if e == "CHAT_MSG_LOOT" then
if msg then if msg then
local who = msg:match("%w+") local who = msg:match("%w+")
if who == "You" then who = UnitName("player") end if who == "You" then who = UnitName("player") end
if who:match("(-)") then who:match("(.+)-%w*") end if who:match("(-)") then who:match("(.+)-%w*") end
local howmuch = msg:match("(x%d+).$") local howmuch = msg:match("(x%d+).$")
local link local link
for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do for itemLink in msg:gmatch("|%x+|Hitem:.-|h.-|h|r") do
link = itemLink link = itemLink
end end
local itemName, _, itemQuality, _, _, itemType = GetItemInfo(link) local itemName, _, itemQuality, _, _, itemType = GetItemInfo(link)
local itemLevel = GetDetailedItemLevelInfo(link) local itemLevel = GetDetailedItemLevelInfo(link)
if itemQuality > 1 then if itemQuality > 1 then
if not aura_env.lootTable[who] then aura_env.lootTable[who] = {["items"] = {}} end if not aura_env.lootTable[who] then aura_env.lootTable[who] = {["items"] = {}} end
if not aura_env.lootTable[who].items[itemName] then if not aura_env.lootTable[who].items[itemName] then
aura_env.lootTable[who].items[itemName] = { aura_env.lootTable[who].items[itemName] = {
["name"] = itemName, ["name"] = itemName,
["vendor"] = select(11, GetItemInfo(link)), ["vendor"] = select(11, GetItemInfo(link)),
["quantity"] = howmuch or 1, ["quantity"] = howmuch or 1,
} }
--Handles DE price prediction --Handles DE price prediction
--if itemType == "Armor" or itemType == "Weapon" then --if itemType == "Armor" or itemType == "Weapon" then
-- print("itemLevel", itemLevel) -- print("itemLevel", itemLevel)
-- if itemLevel >= 45 and itemLevel <= 55 then -- if itemLevel >= 45 and itemLevel <= 55 then
-- local price = 0 -- local price = 0
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[1]) do -- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[1]) do
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k]) -- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
-- end -- end
-- price = price * (howmuch or 1) -- price = price * (howmuch or 1)
-- aura_env.lootTable[who].items[itemName].DE = price -- aura_env.lootTable[who].items[itemName].DE = price
-- DevTools_Dump(aura_env.lootTable) -- DevTools_Dump(aura_env.lootTable)
-- elseif itemLevel >= 56 then -- elseif itemLevel >= 56 then
-- local price = 0 -- local price = 0
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[2]) do -- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[2]) do
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k]) -- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
-- end -- end
-- price = price * (howmuch or 1) -- price = price * (howmuch or 1)
-- aura_env.lootTable[who].items[itemName].DE = price -- aura_env.lootTable[who].items[itemName].DE = price
-- DevTools_Dump(aura_env.lootTable) -- DevTools_Dump(aura_env.lootTable)
-- elseif itemLevel > 58 and itemLevel < 77 and itemQuality == 4 then -- elseif itemLevel > 58 and itemLevel < 77 and itemQuality == 4 then
-- local price = 0 -- local price = 0
-- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[3]) do -- for k,v in pairs(WeakAurasSaved.LootLog.DEStats[3]) do
-- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k]) -- price = price + (v * WeakAurasSaved.LootLog.AHPrices[k])
-- end -- end
-- price = price * (howmuch or 1) -- price = price * (howmuch or 1)
-- aura_env.lootTable[who].items[itemName].DE = price -- aura_env.lootTable[who].items[itemName].DE = price
-- DevTools_Dump(aura_env.lootTable) -- DevTools_Dump(aura_env.lootTable)
-- end -- end
--end --end
if WeakAurasSaved.LootLog.Notables[itemName] then if WeakAurasSaved.LootLog.Notables[itemName] then
aura_env.lootTable[who].items[itemName].AH = WeakAurasSaved.LootLog.Notables[itemName] aura_env.lootTable[who].items[itemName].AH = WeakAurasSaved.LootLog.Notables[itemName]
end end
else else
aura_env.lootTable[who].items[itemName].quantity = aura_env.lootTable[who].items[itemName].quantity + 1 aura_env.lootTable[who].items[itemName].quantity = aura_env.lootTable[who].items[itemName].quantity + 1
end end
end end
DevTools_Dump(aura_env.lootTable) DevTools_Dump(aura_env.lootTable)
--DevTools_Dump(WeakAurasSaved.LootLog) --DevTools_Dump(WeakAurasSaved.LootLog)
end end
elseif e == "AUCTION_HOUSE_SHOW" then elseif e == "AUCTION_HOUSE_SHOW" then
DevTools_Dump(WeakAurasSaved.LootLog.AHPrices) DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
if aura_env.i == 1 then if aura_env.i == 1 then
QueryAuctionItems("Illusion Dust") QueryAuctionItems("Illusion Dust")
print("Querry", "Illusion Dust") print("Querry", "Illusion Dust")
end end
--Querry update that fires item list update then get item info from like a page or two and get median value if the spread isn't too much --Querry update that fires item list update then get item info from like a page or two and get median value if the spread isn't too much
elseif e == "AUCTION_ITEM_LIST_UPDATE" then elseif e == "AUCTION_ITEM_LIST_UPDATE" then
--Get auction info --Get auction info
if not aura_env.timer then if not aura_env.timer then
SortAuctionSetSort("list", "buyout") SortAuctionSetSort("list", "buyout")
SortAuctionApplySort("list") SortAuctionApplySort("list")
end end
if aura_env.timer then aura_env.timer:Cancel(); aura_env.timer = nil end if aura_env.timer then aura_env.timer:Cancel(); aura_env.timer = nil end
if not aura_env.timer then aura_env.timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("AH_READY") end) end if not aura_env.timer then aura_env.timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("AH_READY") end) end
elseif e == "AH_READY" then elseif e == "AH_READY" then
if aura_env.timer then aura_env.timer = nil end if aura_env.timer then aura_env.timer = nil end
local masterName, masterID local masterName, masterID
if aura_env.i == 1 then if aura_env.i == 1 then
masterName = "Illusion Dust" masterName = "Illusion Dust"
masterID = "ID" masterID = "ID"
elseif aura_env.i == 2 then elseif aura_env.i == 2 then
masterName = "Dream Dust" masterName = "Dream Dust"
masterID = "DD" masterID = "DD"
elseif aura_env.i == 3 then elseif aura_env.i == 3 then
masterName = "Small Brillaint Shard" masterName = "Small Brillaint Shard"
masterID = "SBS" masterID = "SBS"
elseif aura_env.i == 4 then elseif aura_env.i == 4 then
masterName = "Large Brilliant Shard" masterName = "Large Brilliant Shard"
masterID = "LBS" masterID = "LBS"
elseif aura_env.i == 5 then elseif aura_env.i == 5 then
masterName = "Lesser Eternal Essence" masterName = "Lesser Eternal Essence"
masterID = "LEE" masterID = "LEE"
elseif aura_env.i == 6 then elseif aura_env.i == 6 then
masterName = "Greater Eternal Essence" masterName = "Greater Eternal Essence"
masterID = "GEE" masterID = "GEE"
end end
for i = 1, GetNumAuctionItems("list") do for i = 1, GetNumAuctionItems("list") do
local name, _, count = GetAuctionItemInfo("list", i) local name, _, count = GetAuctionItemInfo("list", i)
local buyoutPrice = select(10, GetAuctionItemInfo("list", i)) local buyoutPrice = select(10, GetAuctionItemInfo("list", i))
if name == masterName then if name == masterName then
local pricePerEach = buyoutPrice / count local pricePerEach = buyoutPrice / count
if WeakAurasSaved.LootLog.AHPrices[masterID] == 0 then if WeakAurasSaved.LootLog.AHPrices[masterID] == 0 then
WeakAurasSaved.LootLog.AHPrices[masterID] = pricePerEach WeakAurasSaved.LootLog.AHPrices[masterID] = pricePerEach
else else
WeakAurasSaved.LootLog.AHPrices[masterID] = (WeakAurasSaved.LootLog.AHPrices[masterID] + pricePerEach) / 2 WeakAurasSaved.LootLog.AHPrices[masterID] = (WeakAurasSaved.LootLog.AHPrices[masterID] + pricePerEach) / 2
end end
end end
end end
aura_env.i = aura_env.i + 1 aura_env.i = aura_env.i + 1
if WeakAurasSaved.LootLog.AHPrices[masterID] then WeakAurasSaved.LootLog.AHPrices[masterID] = math.floor(WeakAurasSaved.LootLog.AHPrices[masterID]) end if WeakAurasSaved.LootLog.AHPrices[masterID] then WeakAurasSaved.LootLog.AHPrices[masterID] = math.floor(WeakAurasSaved.LootLog.AHPrices[masterID]) end
--DevTools_Dump(WeakAurasSaved.LootLog.AHPrices) --DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
if aura_env.i == 1 then if aura_env.i == 1 then
masterName = "Illusion Dust" masterName = "Illusion Dust"
masterID = "ID" masterID = "ID"
elseif aura_env.i == 2 then elseif aura_env.i == 2 then
masterName = "Dream Dust" masterName = "Dream Dust"
masterID = "DD" masterID = "DD"
elseif aura_env.i == 3 then elseif aura_env.i == 3 then
masterName = "Small Brillaint Shard" masterName = "Small Brillaint Shard"
masterID = "SBS" masterID = "SBS"
elseif aura_env.i == 4 then elseif aura_env.i == 4 then
masterName = "Large Brilliant Shard" masterName = "Large Brilliant Shard"
masterID = "LBS" masterID = "LBS"
elseif aura_env.i == 5 then elseif aura_env.i == 5 then
masterName = "Lesser Eternal Essence" masterName = "Lesser Eternal Essence"
masterID = "LEE" masterID = "LEE"
elseif aura_env.i == 6 then elseif aura_env.i == 6 then
masterName = "Greater Eternal Essence" masterName = "Greater Eternal Essence"
masterID = "GEE" masterID = "GEE"
elseif aura_env.i > 6 then elseif aura_env.i > 6 then
print("AH Scan complete") print("AH Scan complete")
DevTools_Dump(WeakAurasSaved.LootLog.AHPrices) DevTools_Dump(WeakAurasSaved.LootLog.AHPrices)
masterName = nil masterName = nil
masterID = nil masterID = nil
aura_env.i = 1 aura_env.i = 1
end end
if masterName then if masterName then
QueryAuctionItems(masterName) QueryAuctionItems(masterName)
print("Querry", masterName) print("Querry", masterName)
end end
end end
end end
--INIT --INIT
aura_env.i = 1 aura_env.i = 1
aura_env.lootTable = {} aura_env.lootTable = {}
if not WeakAurasSaved.LootLog then WeakAurasSaved.LootLog = {} end if not WeakAurasSaved.LootLog then WeakAurasSaved.LootLog = {} end
if not WeakAurasSaved.LootLog.AHPrices then if not WeakAurasSaved.LootLog.AHPrices then
WeakAurasSaved.LootLog.AHPrices = { WeakAurasSaved.LootLog.AHPrices = {
["ID"] = 0, ["ID"] = 0,
["DD"] = 0, ["DD"] = 0,
["SBS"] = 0, ["SBS"] = 0,
["LBS"] = 0, ["LBS"] = 0,
["LEE"] = 0, ["LEE"] = 0,
["GEE"] = 0, ["GEE"] = 0,
} }
end end
if not WeakAurasSaved.LootLog.DEStats then if not WeakAurasSaved.LootLog.DEStats then
WeakAurasSaved.LootLog.DEStats = { WeakAurasSaved.LootLog.DEStats = {
--<45,55> --<45,55>
[1] = { [1] = {
["DD"] = 0, ["DD"] = 0,
["SBS"] = 0, ["SBS"] = 0,
["LBS"] = 0, ["LBS"] = 0,
["LEE"] = 0, ["LEE"] = 0,
["GEE"] = 0, ["GEE"] = 0,
["GME"] = 0, ["GME"] = 0,
}, },
--<56,65> --<56,65>
[2] = { [2] = {
["ID"] = 2.8699, ["ID"] = 2.8699,
["LBS"] = 0.018, ["LBS"] = 0.018,
["GEE"] = 0.4, ["GEE"] = 0.4,
}, },
--Purple items between 59 and 78 --Purple items between 59 and 78
[3] = { [3] = {
["LBS"] = 0, ["LBS"] = 0,
}, },
} }
end end
if not WeakAurasSaved.LootLog.Notables then WeakAurasSaved.LootLog.Notables = {} end if not WeakAurasSaved.LootLog.Notables then WeakAurasSaved.LootLog.Notables = {} end

View File

@@ -1,49 +1,49 @@
--GROUP_ROSTER_UPDATE COMBAT_LOG_EVENT_UNFILTERED --GROUP_ROSTER_UPDATE COMBAT_LOG_EVENT_UNFILTERED
function(allstates, e, ...) function(allstates, e, ...)
if e == "GROUP_ROSTER_UPDATE" then if e == "GROUP_ROSTER_UPDATE" then
aura_env.playerList = {} aura_env.playerList = {}
for i = 1, GetNumGroupMembers() do for i = 1, GetNumGroupMembers() do
local u = "raid" .. i local u = "raid" .. i
if select(3, UnitClass(u)) == 2 then if select(3, UnitClass(u)) == 2 then
if not aura_env.playerList[UnitName(u)] then aura_env.playerList[UnitName(u)] = u end if not aura_env.playerList[UnitName(u)] then aura_env.playerList[UnitName(u)] = u end
if not allstates[UnitName(u)] then allstates[UnitName(u)] = { if not allstates[UnitName(u)] then allstates[UnitName(u)] = {
show = true, show = true,
changed = true, changed = true,
name = UnitName(u), name = UnitName(u),
unit = u, unit = u,
class = UnitClass(u), class = UnitClass(u),
resort = true, resort = true,
cd = 0, cd = 0,
cdtotal = 20, cdtotal = 20,
index = 0, index = 0,
progressType = "static", progressType = "static",
value = 0, value = 0,
total = 1, total = 1,
} end } end
end end
end end
return true return true
elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then elseif e == "COMBAT_LOG_EVENT_UNFILTERED" then
local caster = select(5, ...) local caster = select(5, ...)
if aura_env.playerList[caster] then if aura_env.playerList[caster] then
local se = select(2, ...) local se = select(2, ...)
if se == "SPELL_CAST_SUCCESS" then if se == "SPELL_CAST_SUCCESS" then
local spellname = select(13, ...) local spellname = select(13, ...)
if spellname == "Consecration" then if spellname == "Consecration" then
if allstates[caster] then if allstates[caster] then
allstates[caster].progressType = "timed" allstates[caster].progressType = "timed"
allstates[caster].duration = 7.57 allstates[caster].duration = 7.57
allstates[caster].expirationTime = GetTime() + 7.57 allstates[caster].expirationTime = GetTime() + 7.57
allstates[caster].index = GetTime() + 7.57 allstates[caster].index = GetTime() + 7.57
allstates[caster].resort = true allstates[caster].resort = true
allstates[caster].changed = true allstates[caster].changed = true
end end
end end
end end
end end
return true return true
end end
end end
--INIT --INIT
aura_env.playerList = {} aura_env.playerList = {}

View File

@@ -1,40 +1,40 @@
There are more things these weakauras can do but it might be a pain to understand/read/care; this is what I got sidetracked doing There are more things these weakauras can do but it might be a pain to understand/read/care; this is what I got sidetracked doing
It is possible to tell the 4th-row aura to look for all cooldowns (in your spellbook) or to exclude/whitelist some; for example It is possible to tell the 4th-row aura to look for all cooldowns (in your spellbook) or to exclude/whitelist some; for example
You can tell it to find all spells with cooldowns in your spellbook except for Life Cocoon; likewise, you can tell it to only find Life Cocoon You can tell it to find all spells with cooldowns in your spellbook except for Life Cocoon; likewise, you can tell it to only find Life Cocoon
There also are two modes this aura can appear in, one sorts the spells by their cooldown (so a 30s spell would be first, a 1 min spell second and so on) and the other sorts them by their active cooldown (so ready spells are always first and last are spells on cooldown sorted by their remaining cooldown) There also are two modes this aura can appear in, one sorts the spells by their cooldown (so a 30s spell would be first, a 1 min spell second and so on) and the other sorts them by their active cooldown (so ready spells are always first and last are spells on cooldown sorted by their remaining cooldown)
I got carried away designing this and I think there would be no point withholding it from you so, feature-full it is I got carried away designing this and I think there would be no point withholding it from you so, feature-full it is
To begin, it has two modes of display (as mentioned previously) and this is how you toggle between them (ran in the chat of course) To begin, it has two modes of display (as mentioned previously) and this is how you toggle between them (ran in the chat of course)
/run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_MODES") /run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_MODES")
I also mentioned it being able to switch between whitelisted and blacklisted spells and this is how that's done (currently there is no way to tell what mode it's in other than looking at the actual aura and seeing for yourself (There is no output other than 0 and 1)) I also mentioned it being able to switch between whitelisted and blacklisted spells and this is how that's done (currently there is no way to tell what mode it's in other than looking at the actual aura and seeing for yourself (There is no output other than 0 and 1))
/run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_SCAN_MODES") /run WeakAuras.ScanEvents("COOLDOWN_MANAGER_SWITCH_SCAN_MODES")
What the above command essentially does is tells the aura to either look for the spells we want or those we don't want; once it is in either mode we also need to tell it what to look for What the above command essentially does is tells the aura to either look for the spells we want or those we don't want; once it is in either mode we also need to tell it what to look for
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "<SPELL NAME OR ID>") /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "<SPELL NAME OR ID>")
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "<SPELL NAME OR ID>") /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "<SPELL NAME OR ID>")
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_ADD", "<SPELL NAME OR ID>") /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_ADD", "<SPELL NAME OR ID>")
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_REMOVE", "<SPELL NAME OR ID>") /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_REMOVE", "<SPELL NAME OR ID>")
You can use these commands to either whitelist or blacklist spells using their name or their ID; if you wanted the aura to NOT show Chi Wave you would do You can use these commands to either whitelist or blacklist spells using their name or their ID; if you wanted the aura to NOT show Chi Wave you would do
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "Chi Wave") /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_ADD", "Chi Wave")
And if you wanted it to show Chi Wave again you would do And if you wanted it to show Chi Wave again you would do
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "Chi Wave") /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", "Chi Wave")
Few things to note here are if you want to use spell names you must place them in quotation marks however if you want to use ID's you may not use quotation marks; so an ID example would be and also if the aura is in Whitelisted mode (showing only the spells you told it to) the exclusion table/list will have no effect on it and adding or removing spells to it will not change the behavior, similarly if the aura is in Exclusion/Blacklist mode the whitelisted list will have no effect on it Few things to note here are if you want to use spell names you must place them in quotation marks however if you want to use ID's you may not use quotation marks; so an ID example would be and also if the aura is in Whitelisted mode (showing only the spells you told it to) the exclusion table/list will have no effect on it and adding or removing spells to it will not change the behavior, similarly if the aura is in Exclusion/Blacklist mode the whitelisted list will have no effect on it
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", 115008) /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_REMOVE", 115008)
And finally to check what spells are blacklisted or whitelisted you would do And finally to check what spells are blacklisted or whitelisted you would do
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_LIST") /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_EXCLUSION_LIST")
/run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_LIST") /run WeakAuras.ScanEvents("PLAYER_SPELLBOOK_WHITELIST_LIST")
Why had I done this? I do not know Why had I done this? I do not know

View File

@@ -1,67 +1,67 @@
--DISPLAY --DISPLAY
function() function()
local mana = UnitPower("player") local mana = UnitPower("player")
local maxmana = UnitPowerMax("player") local maxmana = UnitPowerMax("player")
return string.format("%.f%%", (mana / maxmana) * 100) return string.format("%.f%%", (mana / maxmana) * 100)
end end
--NAME --NAME
function() function()
local mana = UnitPower("player") local mana = UnitPower("player")
local maxmana = UnitPowerMax("player") local maxmana = UnitPowerMax("player")
return aura_env.shorten(mana) return aura_env.shorten(mana)
end end
--UNIT_POWER --UNIT_POWER
function() function()
return true return true
end end
--DURATION --DURATION
function() function()
local mana = UnitPower("player") local mana = UnitPower("player")
local maxmana = UnitPowerMax("player") local maxmana = UnitPowerMax("player")
return maxmana - mana, maxmana, 1 return maxmana - mana, maxmana, 1
end end
--SPELL_UPDATE_COOLDOWN --SPELL_UPDATE_COOLDOWN
function() function()
return true return true
end end
--DURATION --DURATION
function() function()
local id = 109132 local id = 109132
if IsPlayerSpell(115008) then id = 115008 end if IsPlayerSpell(115008) then id = 115008 end
local charges, maxCharges, start, duration = GetSpellCharges(id) local charges, maxCharges, start, duration = GetSpellCharges(id)
if charges >= 2 then if charges >= 2 then
return 0, 1, 1, 1 return 0, 1, 1, 1
elseif charges == 1 then elseif charges == 1 then
expirationTime = start + duration expirationTime = start + duration
return duration, expirationTime return duration, expirationTime
elseif charges < 1 then elseif charges < 1 then
return 1, 1, 1, 1 return 1, 1, 1, 1
end end
end end
--INIT --INIT
aura_env.shorten = function(val) aura_env.shorten = function(val)
local function round(var, n) local function round(var, n)
if (n) then if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n) var = math.floor((var * 10^n) + 0.5) / (10^n)
else else
var = math.floor(var+0.5) var = math.floor(var+0.5)
end end
return var return var
end end
local n = 2 local n = 2
if val < 1e3 then if val < 1e3 then
return round(val, n) return round(val, n)
elseif val > 1e3 and val < 1e6 then elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k" return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M" return round(val / 1e6, n) .. "M"
elseif val > 1e9 then elseif val > 1e9 then
return round(val / 1e9, n) .. "G" return round(val / 1e9, n) .. "G"
end end
end end

View File

@@ -1,43 +1,43 @@
--TSU --TSU
--SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER_SPELLS COOLDOWN_MANAGER_SWITCH_MODES --SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER_SPELLS COOLDOWN_MANAGER_SWITCH_MODES
function(allstates, e) function(allstates, e)
if e == "RESET_COOLDOWN_MANAGER_SPELLS" then if e == "RESET_COOLDOWN_MANAGER_SPELLS" then
for _, state in pairs(allstates) do for _, state in pairs(allstates) do
state.show = false; state.show = false;
state.changed = true; state.changed = true;
end end
end end
if not aura_env.mode then aura_env.mode = 1 end if not aura_env.mode then aura_env.mode = 1 end
if e == "COOLDOWN_MANAGER_SWITCH_MODES" then if e == "COOLDOWN_MANAGER_SWITCH_MODES" then
if aura_env.mode == 0 then if aura_env.mode == 0 then
aura_env.mode = 1 aura_env.mode = 1
print(aura_env.mode) print(aura_env.mode)
else else
aura_env.mode = 0 aura_env.mode = 0
print(aura_env.mode) print(aura_env.mode)
end end
end end
if not aura_env.spells then WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") end if not aura_env.spells then WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") end
for k,v in pairs(aura_env.spells) do for k,v in pairs(aura_env.spells) do
local start, duration = GetSpellCooldown(v) local start, duration = GetSpellCooldown(v)
local icon = GetSpellTexture(k) local icon = GetSpellTexture(k)
local totalcd = GetSpellBaseCooldown(v) local totalcd = GetSpellBaseCooldown(v)
allstates[v] = { allstates[v] = {
changed = true, changed = true,
show = true, show = true,
resort = true, resort = true,
progressType = "timed", progressType = "timed",
icon = icon, icon = icon,
} }
if aura_env.mode == 0 then allstates[v].index = totalcd end if aura_env.mode == 0 then allstates[v].index = totalcd end
if start > 0 and duration > 1.5 then if start > 0 and duration > 1.5 then
allstates[v].expirationTime = start + duration allstates[v].expirationTime = start + duration
allstates[v].duration = duration allstates[v].duration = duration
if not allstates[v].timer and aura_env.mode == 1 then allstates[v].timer = C_Timer.NewTimer(duration, function() WeakAuras.ScanEvents("SPELL_UPDATE_COOLDOWN") end) end if not allstates[v].timer and aura_env.mode == 1 then allstates[v].timer = C_Timer.NewTimer(duration, function() WeakAuras.ScanEvents("SPELL_UPDATE_COOLDOWN") end) end
if aura_env.mode == 1 then allstates[v].index = start + duration end if aura_env.mode == 1 then allstates[v].index = start + duration end
else else
if aura_env.mode == 1 then allstates[v].index = 0 end if aura_env.mode == 1 then allstates[v].index = 0 end
end end
end end
return true return true
end end

View File

@@ -1,87 +1,87 @@
--PLAYER_SPELLBOOK_UPDATE PLAYER_SPELLBOOK_EXCLUSION_ADD PLAYER_SPELLBOOK_EXCLUSION_REMOVE PLAYER_SPELLBOOK_EXCLUSION_LIST COOLDOWN_MANAGER_SWITCH_SCAN_MODES PLAYER_SPELLBOOK_WHITELIST_ADD PLAYER_SPELLBOOK_WHITELIST_REMOVE PLAYER_SPELLBOOK_WHITELIST_LIST --PLAYER_SPELLBOOK_UPDATE PLAYER_SPELLBOOK_EXCLUSION_ADD PLAYER_SPELLBOOK_EXCLUSION_REMOVE PLAYER_SPELLBOOK_EXCLUSION_LIST COOLDOWN_MANAGER_SWITCH_SCAN_MODES PLAYER_SPELLBOOK_WHITELIST_ADD PLAYER_SPELLBOOK_WHITELIST_REMOVE PLAYER_SPELLBOOK_WHITELIST_LIST
function(e, msg) function(e, msg)
if not aura_env.mode then aura_env.mode = 1 end if not aura_env.mode then aura_env.mode = 1 end
if e == "COOLDOWN_MANAGER_SWITCH_SCAN_MODES" then if e == "COOLDOWN_MANAGER_SWITCH_SCAN_MODES" then
if aura_env.mode == 0 then if aura_env.mode == 0 then
aura_env.mode = 1 aura_env.mode = 1
print(aura_env.mode) print(aura_env.mode)
else else
aura_env.mode = 0 aura_env.mode = 0
print(aura_env.mode) print(aura_env.mode)
end end
elseif e == "PLAYER_SPELLBOOK_UPDATE" then elseif e == "PLAYER_SPELLBOOK_UPDATE" then
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if not WeakAurasSaved.CustomTrash.SpellExclusion then WeakAurasSaved.CustomTrash.SpellExclusion = {} end if not WeakAurasSaved.CustomTrash.SpellExclusion then WeakAurasSaved.CustomTrash.SpellExclusion = {} end
if not WeakAurasSaved.CustomTrash.SpellWhitelist then WeakAurasSaved.CustomTrash.SpellWhitelist = { if not WeakAurasSaved.CustomTrash.SpellWhitelist then WeakAurasSaved.CustomTrash.SpellWhitelist = {
["Fortifying Brew"] = 1, ["Fortifying Brew"] = 1,
["Life Cocoon"] = 1, ["Life Cocoon"] = 1,
["Revival"] = 1, ["Revival"] = 1,
["Paralysis"] = 1, ["Paralysis"] = 1,
} end } end
aura_env.spells = {} aura_env.spells = {}
if aura_env.mode == 0 then if aura_env.mode == 0 then
local index = 1 local index = 1
while GetSpellBookItemName(index, "spell") do while GetSpellBookItemName(index, "spell") do
local name = GetSpellInfo(index, "spell") local name = GetSpellInfo(index, "spell")
local id = select(7, GetSpellInfo(index, "spell")) local id = select(7, GetSpellInfo(index, "spell"))
if IsPlayerSpell(id) == true and GetSpellBaseCooldown(id) > 10000 and (not (WeakAurasSaved.CustomTrash.SpellExclusion[name] or WeakAurasSaved.CustomTrash.SpellExclusion[id])) then if IsPlayerSpell(id) == true and GetSpellBaseCooldown(id) > 10000 and (not (WeakAurasSaved.CustomTrash.SpellExclusion[name] or WeakAurasSaved.CustomTrash.SpellExclusion[id])) then
aura_env.spells[name] = id aura_env.spells[name] = id
end end
index = index + 1 index = index + 1
end end
else else
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do
local name = GetSpellInfo(k) local name = GetSpellInfo(k)
local id = select(7, GetSpellInfo(k)) local id = select(7, GetSpellInfo(k))
if id and IsPlayerSpell(id) == true then if id and IsPlayerSpell(id) == true then
aura_env.spells[name] = id aura_env.spells[name] = id
end end
end end
end end
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS") WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_ADD" then elseif e == "PLAYER_SPELLBOOK_EXCLUSION_ADD" then
if GetSpellInfo(msg) then if GetSpellInfo(msg) then
if not WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = 1 end if not WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = 1 end
print("Spell <", msg, "> added") print("Spell <", msg, "> added")
else else
print("Spell <", msg, "> is invalid") print("Spell <", msg, "> is invalid")
end end
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS") WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_REMOVE" then elseif e == "PLAYER_SPELLBOOK_EXCLUSION_REMOVE" then
if GetSpellInfo(msg) then if GetSpellInfo(msg) then
if WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = nil else print("Spell <", msg, "> is not excluded"); return end if WeakAurasSaved.CustomTrash.SpellExclusion[msg] then WeakAurasSaved.CustomTrash.SpellExclusion[msg] = nil else print("Spell <", msg, "> is not excluded"); return end
print("Spell <", msg, "> removed") print("Spell <", msg, "> removed")
else else
print("Spell <", msg, "> is invalid") print("Spell <", msg, "> is invalid")
end end
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS") WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
elseif e == "PLAYER_SPELLBOOK_EXCLUSION_LIST" then elseif e == "PLAYER_SPELLBOOK_EXCLUSION_LIST" then
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellExclusion) do for k,v in pairs(WeakAurasSaved.CustomTrash.SpellExclusion) do
print(k,v) print(k,v)
end end
elseif e == "PLAYER_SPELLBOOK_WHITELIST_ADD" then elseif e == "PLAYER_SPELLBOOK_WHITELIST_ADD" then
if GetSpellInfo(msg) then if GetSpellInfo(msg) then
if not WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = 1 end if not WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = 1 end
print("Spell <", msg, "> added") print("Spell <", msg, "> added")
else else
print("Spell <", msg, "> is invalid") print("Spell <", msg, "> is invalid")
end end
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS") WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
elseif e == "PLAYER_SPELLBOOK_WHITELIST_REMOVE" then elseif e == "PLAYER_SPELLBOOK_WHITELIST_REMOVE" then
if GetSpellInfo(msg) then if GetSpellInfo(msg) then
if WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = nil else print("Spell <", msg, "> is not excluded"); return end if WeakAurasSaved.CustomTrash.SpellWhitelist[msg] then WeakAurasSaved.CustomTrash.SpellWhitelist[msg] = nil else print("Spell <", msg, "> is not excluded"); return end
print("Spell <", msg, "> removed") print("Spell <", msg, "> removed")
else else
print("Spell <", msg, "> is invalid") print("Spell <", msg, "> is invalid")
end end
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS") WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
elseif e == "PLAYER_SPELLBOOK_WHITELIST_LIST" then elseif e == "PLAYER_SPELLBOOK_WHITELIST_LIST" then
for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do for k,v in pairs(WeakAurasSaved.CustomTrash.SpellWhitelist) do
print(k,v) print(k,v)
end end
end end
end end

View File

@@ -1,31 +1,31 @@
--TSU --TSU
--SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER --SPELL_UPDATE_COOLDOWN RESET_COOLDOWN_MANAGER
function(allstates, e) function(allstates, e)
if e == "RESET_COOLDOWN_MANAGER" then if e == "RESET_COOLDOWN_MANAGER" then
for _, state in pairs(allstates) do for _, state in pairs(allstates) do
state.show = false; state.show = false;
state.changed = true; state.changed = true;
end end
end end
if not aura_env.talents then WeakAuras.ScanEvents("PLAYER_TALENT_UPDATE") end if not aura_env.talents then WeakAuras.ScanEvents("PLAYER_TALENT_UPDATE") end
for k,v in pairs(aura_env.talents) do for k,v in pairs(aura_env.talents) do
local start, duration = GetSpellCooldown(v) local start, duration = GetSpellCooldown(v)
local icon = GetSpellTexture(k) local icon = GetSpellTexture(k)
local enable = 0 local enable = 0
if start == 0 then enable = 1 else enable = 0 end if start == 0 then enable = 1 else enable = 0 end
allstates[v] = { allstates[v] = {
changed = true, changed = true,
show = true, show = true,
resort = true, resort = true,
progressType = "timed", progressType = "timed",
icon = icon, icon = icon,
enable = enable, enable = enable,
} }
if start > 0 and duration > 1.5 then if start > 0 and duration > 1.5 then
allstates[v].expirationTime = start + duration allstates[v].expirationTime = start + duration
allstates[v].duration = duration allstates[v].duration = duration
allstates[v].index = duration allstates[v].index = duration
end end
end end
return true return true
end end

View File

@@ -1,17 +1,17 @@
--PLAYER_TALENT_UPDATE --PLAYER_TALENT_UPDATE
function(e, msg) function(e, msg)
aura_env.talents = {} aura_env.talents = {}
for row = 1, 7 do for row = 1, 7 do
for column = 1, 3 do for column = 1, 3 do
local id, name = GetTalentInfo(row, column, 1) local id, name = GetTalentInfo(row, column, 1)
local sel = select(10, GetTalentInfoByID(id)) local sel = select(10, GetTalentInfoByID(id))
local sid = select(6, GetTalentInfoByID(id)) local sid = select(6, GetTalentInfoByID(id))
if GetSpellBaseCooldown(sid) > 0 and sel == true then if GetSpellBaseCooldown(sid) > 0 and sel == true then
aura_env.talents[name] = sid aura_env.talents[name] = sid
end end
end end
end end
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER") WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER")
WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS") WeakAuras.ScanEvents("RESET_COOLDOWN_MANAGER_SPELLS")
WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE") WeakAuras.ScanEvents("PLAYER_SPELLBOOK_UPDATE")
end end

View File

@@ -1,239 +1,239 @@
--UPDATE_BIND_TABLE UPDATE_BINDS UPDATE_BAR_TABLE UPDATE_BARS DELETE_SET LIST_SETS --UPDATE_BIND_TABLE UPDATE_BINDS UPDATE_BAR_TABLE UPDATE_BARS DELETE_SET LIST_SETS
--[[ --[[
UPDATE_BIND_TABLE saves current binds UPDATE_BIND_TABLE saves current binds
UPDATE_BINDS restores saved binds UPDATE_BINDS restores saved binds
UPDATE_BAR_TABLE saves current bar layout also supports sets UPDATE_BAR_TABLE saves current bar layout also supports sets
UPDATE_BARS restores bar layout; defaults to the "default" set UPDATE_BARS restores bar layout; defaults to the "default" set
DELETE_SET deletes a specified set DELETE_SET deletes a specified set
LIST_SETS lists all sets LIST_SETS lists all sets
DELETE and LIST only work for bar layouts DELETE and LIST only work for bar layouts
/run WeakAuras.ScanEvents("UPDATE_BINDS") /run WeakAuras.ScanEvents("UPDATE_BINDS")
/run WeakAuras.ScanEvents("UPDATE_BIND_TABLE") /run WeakAuras.ScanEvents("UPDATE_BIND_TABLE")
]] ]]
function(e, ...) function(e, ...)
if InCombatLockdown() ~= 1 then if InCombatLockdown() ~= 1 then
if e == "UPDATE_BIND_TABLE" then if e == "UPDATE_BIND_TABLE" then
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if not WeakAurasSaved.CustomTrash.BindTableTwo then WeakAurasSaved.CustomTrash.BindTableTwo = {} end if not WeakAurasSaved.CustomTrash.BindTableTwo then WeakAurasSaved.CustomTrash.BindTableTwo = {} end
for i = 1, GetNumBindings() do for i = 1, GetNumBindings() do
local comm, bind, bind2 = GetBinding(i) local comm, bind, bind2 = GetBinding(i)
if comm and bind2 and not WeakAurasSaved.CustomTrash.BindTableTwo[comm] then if comm and bind2 and not WeakAurasSaved.CustomTrash.BindTableTwo[comm] then
print("Adding", comm, "with bind", bind2, "to bind table") print("Adding", comm, "with bind", bind2, "to bind table")
WeakAurasSaved.CustomTrash.BindTableTwo[comm] = {} WeakAurasSaved.CustomTrash.BindTableTwo[comm] = {}
WeakAurasSaved.CustomTrash.BindTableTwo[comm].bind = bind2 WeakAurasSaved.CustomTrash.BindTableTwo[comm].bind = bind2
WeakAurasSaved.CustomTrash.BindTableTwo[comm].index = i WeakAurasSaved.CustomTrash.BindTableTwo[comm].index = i
end end
if comm and not bind2 and WeakAurasSaved.CustomTrash.BindTableTwo[comm] then if comm and not bind2 and WeakAurasSaved.CustomTrash.BindTableTwo[comm] then
print("Removing", comm, "with no bind from the bind table") print("Removing", comm, "with no bind from the bind table")
WeakAurasSaved.CustomTrash.BindTableTwo[comm] = nil WeakAurasSaved.CustomTrash.BindTableTwo[comm] = nil
end end
end end
elseif e == "UPDATE_BINDS" then elseif e == "UPDATE_BINDS" then
for k, v in pairs(WeakAurasSaved.CustomTrash.BindTableTwo) do for k, v in pairs(WeakAurasSaved.CustomTrash.BindTableTwo) do
local command, bind, bind2 = GetBinding(v.index) local command, bind, bind2 = GetBinding(v.index)
if bind2 ~= v.bind then if bind2 ~= v.bind then
--The key should be aura_env.keyBinds[command] but the key is bind2 --The key should be aura_env.keyBinds[command] but the key is bind2
print("Key", command, "has bind", bind2, "but should have", v.bind) print("Key", command, "has bind", bind2, "but should have", v.bind)
if bind2 then SetBinding(bind2) end if bind2 then SetBinding(bind2) end
if v.bind then SetBinding(v.bind, command) end if v.bind then SetBinding(v.bind, command) end
end end
end end
SaveBindings(1) SaveBindings(1)
elseif e == "UPDATE_BAR_TABLE" then elseif e == "UPDATE_BAR_TABLE" then
local arg2 = "default" local arg2 = "default"
if ... then arg2 = ... end if ... then arg2 = ... end
if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end if not WeakAurasSaved.CustomTrash then WeakAurasSaved.CustomTrash = {} end
if not WeakAurasSaved.CustomTrash.BarTable then WeakAurasSaved.CustomTrash.BarTable = {} end if not WeakAurasSaved.CustomTrash.BarTable then WeakAurasSaved.CustomTrash.BarTable = {} end
if not WeakAurasSaved.CustomTrash.BarTable[arg2] then WeakAurasSaved.CustomTrash.BarTable[arg2] = {} end if not WeakAurasSaved.CustomTrash.BarTable[arg2] then WeakAurasSaved.CustomTrash.BarTable[arg2] = {} end
for i = 1, 72 do for i = 1, 72 do
PickupAction(i) PickupAction(i)
if GetCursorInfo() then if GetCursorInfo() then
local type = GetCursorInfo() local type = GetCursorInfo()
local id, name = nil, nil local id, name = nil, nil
if not type then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = nil end if not type then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = nil end
if type == "spell" then if type == "spell" then
id = select(4, GetCursorInfo()) id = select(4, GetCursorInfo())
elseif type == "mount" then elseif type == "mount" then
id = select(2, GetCursorInfo()) id = select(2, GetCursorInfo())
elseif type == "macro" then elseif type == "macro" then
id = select(2, GetCursorInfo()) id = select(2, GetCursorInfo())
name = select(1, GetMacroInfo(id)) name = select(1, GetMacroInfo(id))
elseif type == "item" then elseif type == "item" then
id = select(2, GetCursorInfo()) id = select(2, GetCursorInfo())
elseif type == "equipmentset" then elseif type == "equipmentset" then
name = select(2, GetCursorInfo()) name = select(2, GetCursorInfo())
end --elseif end end --elseif end
if not WeakAurasSaved.CustomTrash.BarTable[arg2][i] then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = {} end if not WeakAurasSaved.CustomTrash.BarTable[arg2][i] then WeakAurasSaved.CustomTrash.BarTable[arg2][i] = {} end
if id ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].id or type ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].type then if id ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].id or type ~= WeakAurasSaved.CustomTrash.BarTable[arg2][i].type then
WeakAurasSaved.CustomTrash.BarTable[arg2][i].type = type WeakAurasSaved.CustomTrash.BarTable[arg2][i].type = type
WeakAurasSaved.CustomTrash.BarTable[arg2][i].id = id WeakAurasSaved.CustomTrash.BarTable[arg2][i].id = id
WeakAurasSaved.CustomTrash.BarTable[arg2][i].name = name WeakAurasSaved.CustomTrash.BarTable[arg2][i].name = name
if not name then if not name then
print("Adding", type, "by id", id, "on slot", i, "to the table") print("Adding", type, "by id", id, "on slot", i, "to the table")
elseif name then elseif name then
print("Adding", type, "by id", id, "and name", name, "on slot", i, "to the table") print("Adding", type, "by id", id, "and name", name, "on slot", i, "to the table")
end end
end end
end end
PickupAction(i) PickupAction(i)
end end
elseif e == "UPDATE_BARS" then elseif e == "UPDATE_BARS" then
local arg2 = "default" local arg2 = "default"
if ... then arg2 = ... end if ... then arg2 = ... end
for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable[arg2]) do for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable[arg2]) do
if v.type == "spell" then if v.type == "spell" then
if GetCursorInfo() then ClearCursor() end if GetCursorInfo() then ClearCursor() end
PickupAction(k) PickupAction(k)
if GetCursorInfo() then if GetCursorInfo() then
local id = select(4, GetCursorInfo()) local id = select(4, GetCursorInfo())
if id ~= v.id then if id ~= v.id then
ClearCursor() ClearCursor()
PickupSpell(v.id) PickupSpell(v.id)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
PickupAction(k) PickupAction(k)
else else
ClearCursor() ClearCursor()
PickupSpell(v.id) PickupSpell(v.id)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
elseif v.type == "mount" then elseif v.type == "mount" then
local mid, mindex local mid, mindex
--Looking for mount in mount journal --Looking for mount in mount journal
for i = 1, C_MountJournal.GetNumMounts() do for i = 1, C_MountJournal.GetNumMounts() do
mid = select(12, C_MountJournal.GetDisplayedMountInfo(i)) mid = select(12, C_MountJournal.GetDisplayedMountInfo(i))
local ishave = select(11, C_MountJournal.GetDisplayedMountInfo(i)) local ishave = select(11, C_MountJournal.GetDisplayedMountInfo(i))
if mid == v.id then if mid == v.id then
mindex = i mindex = i
break break
end end
if ishave == false then if ishave == false then
break break
end end
end end
--Checking what's on the bar --Checking what's on the bar
if GetCursorInfo() then ClearCursor() end if GetCursorInfo() then ClearCursor() end
PickupAction(k) PickupAction(k)
if GetCursorInfo() then if GetCursorInfo() then
local id = select(2, GetCursorInfo()) local id = select(2, GetCursorInfo())
if id ~= v.id and mindex then if id ~= v.id and mindex then
ClearCursor() ClearCursor()
C_MountJournal.Pickup(mindex) C_MountJournal.Pickup(mindex)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
PickupAction(k) PickupAction(k)
elseif not GetCursorInfo() and mindex then elseif not GetCursorInfo() and mindex then
ClearCursor() ClearCursor()
C_MountJournal.Pickup(mindex) C_MountJournal.Pickup(mindex)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
elseif v.type == "macro" then elseif v.type == "macro" then
if GetCursorInfo() then ClearCursor() end if GetCursorInfo() then ClearCursor() end
PickupAction(k) PickupAction(k)
if GetCursorInfo() then if GetCursorInfo() then
local id = select(2, GetCursorInfo()) local id = select(2, GetCursorInfo())
local name = select(1, GetMacroInfo(id)) local name = select(1, GetMacroInfo(id))
if id ~= v.id or name ~= v.name then if id ~= v.id or name ~= v.name then
ClearCursor() ClearCursor()
PickupMacro(v.id) PickupMacro(v.id)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
PickupAction(k) PickupAction(k)
else else
ClearCursor() ClearCursor()
local name = GetMacroInfo(v.id) local name = GetMacroInfo(v.id)
if name == v.name then if name == v.name then
PickupMacro(v.id) PickupMacro(v.id)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
end end
elseif v.type == "equipmentset" then elseif v.type == "equipmentset" then
if GetCursorInfo() then ClearCursor() end if GetCursorInfo() then ClearCursor() end
local eqindex local eqindex
for i = 1, GetNumEquipmentSets() do for i = 1, GetNumEquipmentSets() do
local nam = GetEquipmentSetInfo(i) local nam = GetEquipmentSetInfo(i)
if nam == v.name then if nam == v.name then
eqindex = i eqindex = i
break break
end end
end end
if eqindex then if eqindex then
PickupAction(k) PickupAction(k)
if GetCursorInfo() then if GetCursorInfo() then
local name = select(2, GetCursorInfo()) local name = select(2, GetCursorInfo())
if name ~= v.name then if name ~= v.name then
ClearCursor() ClearCursor()
PickupEquipmentSet(eqindex) PickupEquipmentSet(eqindex)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
PickupAction(k) PickupAction(k)
else else
ClearCursor() ClearCursor()
PickupEquipmentSet(eqindex) PickupEquipmentSet(eqindex)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
end end
elseif v.type == "item" then elseif v.type == "item" then
if GetCursorInfo() then ClearCursor() end if GetCursorInfo() then ClearCursor() end
local ios, jos local ios, jos
for i = 0, 4 do for i = 0, 4 do
for j = 1, GetContainerNumSlots(i) do for j = 1, GetContainerNumSlots(i) do
local link = select(7, GetContainerItemInfo(i, j)) local link = select(7, GetContainerItemInfo(i, j))
if link then if link then
local id = link:match("item:(%d+):") local id = link:match("item:(%d+):")
if id then if id then
id = tonumber(id) id = tonumber(id)
if id == v.id then if id == v.id then
ios = i ios = i
jos = j jos = j
break break
end end
end end
end end
end end
end end
if ios and jos then if ios and jos then
PickupAction(k) PickupAction(k)
if GetCursorInfo() then if GetCursorInfo() then
local id = select(2, GetCursorInfo()) local id = select(2, GetCursorInfo())
if id ~= v.id then if id ~= v.id then
ClearCursor() ClearCursor()
PickupContainerItem(ios, jos) PickupContainerItem(ios, jos)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
PickupAction(k) PickupAction(k)
else else
ClearCursor() ClearCursor()
PickupContainerItem(ios, jos) PickupContainerItem(ios, jos)
PickupAction(k) PickupAction(k)
ClearCursor() ClearCursor()
end end
end end
end --elseif end end --elseif end
end end
elseif e == "DELETE_SET" then elseif e == "DELETE_SET" then
local arg2 = ... local arg2 = ...
if arg2 and WeakAurasSaved.CustomTrash.BarTable[arg2] then if arg2 and WeakAurasSaved.CustomTrash.BarTable[arg2] then
WeakAurasSaved.CustomTrash.BarTable[arg2] = nil WeakAurasSaved.CustomTrash.BarTable[arg2] = nil
end end
elseif e == "LIST_SETS" then elseif e == "LIST_SETS" then
for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable) do for k, v in pairs(WeakAurasSaved.CustomTrash.BarTable) do
print(k) print(k)
end end
end --elseif end end --elseif end
end end
end end

View File

@@ -1,318 +1,318 @@
--UPDATE_MOUSEOVER_UNIT PLAYER_TARGET_CHANGED --UPDATE_MOUSEOVER_UNIT PLAYER_TARGET_CHANGED
function() function()
if not UnitExists("target") and UnitExists("mouseover") and UnitIsPlayer("mouseover") then if not UnitExists("target") and UnitExists("mouseover") and UnitIsPlayer("mouseover") then
aura_env.output = "Boss RF NM HC Myth" .. "\n" aura_env.output = "Boss RF NM HC Myth" .. "\n"
bossKills = bossKills =
{ {
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
} }
SetAchievementComparisonUnit("mouseover") SetAchievementComparisonUnit("mouseover")
end end
if not UnitExists("mouseover") and UnitExists("target") and UnitIsPlayer("target") then if not UnitExists("mouseover") and UnitExists("target") and UnitIsPlayer("target") then
aura_env.output = "Boss RF NM HC Myth" .. "\n" aura_env.output = "Boss RF NM HC Myth" .. "\n"
bossKills = bossKills =
{ {
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
{ {
[1] = 0, [1] = 0,
[2] = 0, [2] = 0,
[3] = 0, [3] = 0,
[4] = 0 [4] = 0
}, },
} }
SetAchievementComparisonUnit("target") SetAchievementComparisonUnit("target")
end end
end end
--INSPECT_ACHIEVEMENT_READY --INSPECT_ACHIEVEMENT_READY
function() function()
aura_env.output = "Boss RF NM HC Myth" .. "\n" aura_env.output = "Boss RF NM HC Myth" .. "\n"
for k,v in ipairs(aura_env.TOS) do for k,v in ipairs(aura_env.TOS) do
if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" or GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then
local bossname = select(2, GetAchievementInfo(aura_env.TOS[k][1])) local bossname = select(2, GetAchievementInfo(aura_env.TOS[k][1]))
bossname = bossname:match("[a-zA-Z' ]*kills") bossname = bossname:match("[a-zA-Z' ]*kills")
bossname = bossname:gsub(" kills", "") bossname = bossname:gsub(" kills", "")
aura_env.output = aura_env.output .. bossname .. "\n" aura_env.output = aura_env.output .. bossname .. "\n"
if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" then if GetComparisonStatistic(aura_env.TOS[k][1]) ~= "--" then
bossKills[k][1] = GetComparisonStatistic(aura_env.TOS[k][1]) bossKills[k][1] = GetComparisonStatistic(aura_env.TOS[k][1])
end end
if GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" then if GetComparisonStatistic(aura_env.TOS[k][2]) ~= "--" then
bossKills[k][2] = GetComparisonStatistic(aura_env.TOS[k][2]) bossKills[k][2] = GetComparisonStatistic(aura_env.TOS[k][2])
end end
if GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" then if GetComparisonStatistic(aura_env.TOS[k][3]) ~= "--" then
bossKills[k][3] = GetComparisonStatistic(aura_env.TOS[k][3]) bossKills[k][3] = GetComparisonStatistic(aura_env.TOS[k][3])
end end
if GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then if GetComparisonStatistic(aura_env.TOS[k][4]) ~= "--" then
bossKills[k][4] = GetComparisonStatistic(aura_env.TOS[k][4]) bossKills[k][4] = GetComparisonStatistic(aura_env.TOS[k][4])
end end
end end
end end
ClearAchievementComparisonUnit() ClearAchievementComparisonUnit()
end end
--WEAKAURA 2 DISPLAY -- RF BOSSES --WEAKAURA 2 DISPLAY -- RF BOSSES
function() function()
local output = "" local output = ""
for k,v in ipairs(bossKills) do for k,v in ipairs(bossKills) do
if tonumber(bossKills[k][1]) > 0 then if tonumber(bossKills[k][1]) > 0 then
output = output .. bossKills[k][1] .. "\n" output = output .. bossKills[k][1] .. "\n"
end end
end end
return output return output
end end
--WEAKAURA 2 DISPLAY -- NM BOSSES --WEAKAURA 2 DISPLAY -- NM BOSSES
function() function()
local output = "" local output = ""
for k,v in ipairs(bossKills) do for k,v in ipairs(bossKills) do
if tonumber(bossKills[k][2]) > 0 then if tonumber(bossKills[k][2]) > 0 then
output = output .. bossKills[k][2] .. "\n" output = output .. bossKills[k][2] .. "\n"
end end
end end
return output return output
end end
--WEAKAURA 2 DISPLAY -- HC BOSSES --WEAKAURA 2 DISPLAY -- HC BOSSES
function() function()
local output = "" local output = ""
for k,v in ipairs(bossKills) do for k,v in ipairs(bossKills) do
if tonumber(bossKills[k][3]) > 0 then if tonumber(bossKills[k][3]) > 0 then
output = output .. bossKills[k][3] .. "\n" output = output .. bossKills[k][3] .. "\n"
end end
end end
return output return output
end end
--WEAKAURA 2 DISPLAY -- Myth BOSSES --WEAKAURA 2 DISPLAY -- Myth BOSSES
function() function()
local output = "" local output = ""
for k,v in ipairs(bossKills) do for k,v in ipairs(bossKills) do
if tonumber(bossKills[k][4]) > 0 then if tonumber(bossKills[k][4]) > 0 then
output = output .. bossKills[k][4] .. "\n" output = output .. bossKills[k][4] .. "\n"
end end
end end
return output return output
end end
--INIT --INIT
aura_env.TOS = aura_env.TOS =
{ {
{ --Goroth { --Goroth
11877, -- [1] 11877, -- [1]
11878, -- [2] 11878, -- [2]
11879, -- [3] 11879, -- [3]
11880, -- [4] 11880, -- [4]
}, -- [1] }, -- [1]
{ --Inquisition { --Inquisition
11881, -- [1] 11881, -- [1]
11882, -- [2] 11882, -- [2]
11883, -- [3] 11883, -- [3]
11884, -- [4] 11884, -- [4]
}, -- [2] }, -- [2]
{ --Harjatan { --Harjatan
11885, -- [1] 11885, -- [1]
11886, -- [2] 11886, -- [2]
11887, -- [3] 11887, -- [3]
11888, -- [4] 11888, -- [4]
}, -- [3] }, -- [3]
{ --Sisters { --Sisters
11889, -- [1] 11889, -- [1]
11890, -- [2] 11890, -- [2]
11891, -- [3] 11891, -- [3]
11892, -- [4] 11892, -- [4]
}, -- [4] }, -- [4]
{ --Mistress { --Mistress
11893, -- [1] 11893, -- [1]
11894, -- [2] 11894, -- [2]
11895, -- [3] 11895, -- [3]
11896, -- [4] 11896, -- [4]
}, -- [5] }, -- [5]
{ --Host { --Host
11897, -- [1] 11897, -- [1]
11898, -- [2] 11898, -- [2]
11899, -- [3] 11899, -- [3]
11900, -- [4] 11900, -- [4]
}, -- [6] }, -- [6]
{ --Maiden { --Maiden
11901, -- [1] 11901, -- [1]
11902, -- [2] 11902, -- [2]
11903, -- [3] 11903, -- [3]
11904, -- [4] 11904, -- [4]
}, -- [7] }, -- [7]
{ --Avatar { --Avatar
11905, -- [1] 11905, -- [1]
11906, -- [2] 11906, -- [2]
11907, -- [3] 11907, -- [3]
11908, -- [4] 11908, -- [4]
}, -- [8] }, -- [8]
{ --Kil'jaeden { --Kil'jaeden
11909, -- [1] 11909, -- [1]
11910, -- [2] 11910, -- [2]
11911, -- [3] 11911, -- [3]
11912, -- [4] 11912, -- [4]
}, -- [9] }, -- [9]
} }
aura_env.NH = aura_env.NH =
{ {
{ --Skorp { --Skorp
10940, -- [1] 10940, -- [1]
10941, -- [2] 10941, -- [2]
10942, -- [3] 10942, -- [3]
10943, -- [4] 10943, -- [4]
}, -- [1] }, -- [1]
{ --Anomaly { --Anomaly
10944, -- [1] 10944, -- [1]
10945, -- [2] 10945, -- [2]
10946, -- [3] 10946, -- [3]
10947, -- [4] 10947, -- [4]
}, -- [2] }, -- [2]
{ --Trilliax { --Trilliax
10948, -- [1] 10948, -- [1]
10949, -- [2] 10949, -- [2]
10950, -- [3] 10950, -- [3]
10951, -- [4] 10951, -- [4]
}, -- [3] }, -- [3]
{ --Aluriel { --Aluriel
10952, -- [1] 10952, -- [1]
10953, -- [2] 10953, -- [2]
10954, -- [3] 10954, -- [3]
10955, -- [4] 10955, -- [4]
}, -- [4] }, -- [4]
{ --Augur { --Augur
10956, -- [1] 10956, -- [1]
10957, -- [2] 10957, -- [2]
10959, -- [3] 10959, -- [3]
10960, -- [4] 10960, -- [4]
}, -- [5] }, -- [5]
{ --Botanist { --Botanist
10961, -- [1] 10961, -- [1]
10962, -- [2] 10962, -- [2]
10963, -- [3] 10963, -- [3]
10964, -- [4] 10964, -- [4]
}, -- [6] }, -- [6]
{ --Tich { --Tich
10965, -- [1] 10965, -- [1]
10966, -- [2] 10966, -- [2]
10967, -- [3] 10967, -- [3]
10968, -- [4] 10968, -- [4]
}, -- [7] }, -- [7]
{ --Krosus { --Krosus
10969, -- [1] 10969, -- [1]
10970, -- [2] 10970, -- [2]
10971, -- [3] 10971, -- [3]
10972, -- [4] 10972, -- [4]
}, -- [8] }, -- [8]
{ --Elisande { --Elisande
10973, -- [1] 10973, -- [1]
10974, -- [2] 10974, -- [2]
10975, -- [3] 10975, -- [3]
10976, -- [4] 10976, -- [4]
}, -- [9] }, -- [9]
{ --Gul'dan { --Gul'dan
10977, -- [1] 10977, -- [1]
10978, -- [2] 10978, -- [2]
10979, -- [3] 10979, -- [3]
10980, -- [4] 10980, -- [4]
}, -- [10] }, -- [10]
} }
aura_env.output = "" aura_env.output = ""

View File

@@ -1,9 +1,9 @@
function() function()
local seeds = 0 local seeds = 0
for i = 1, 100 do for i = 1, 100 do
if UnitDebuff("nameplate" .. i, "Seed of Corruption") then if UnitDebuff("nameplate" .. i, "Seed of Corruption") then
seeds = seeds + 1 seeds = seeds + 1
end end
end end
return seeds return seeds
end end

View File

@@ -1,305 +1,305 @@
--QUEST_ACCEPTED QUEST_TURNED_IN --QUEST_ACCEPTED QUEST_TURNED_IN
function(e) function(e)
for k, v in ipairs(aura_env.questDatabase) do for k, v in ipairs(aura_env.questDatabase) do
if IsQuestFlaggedCompleted(v) == false then if IsQuestFlaggedCompleted(v) == false then
--print(aura_env.TESTCOMPLETION[k]) --print(aura_env.TESTCOMPLETION[k])
--if aura_env.TESTCOMPLETION[k] == false then --if aura_env.TESTCOMPLETION[k] == false then
--print(k, IsQuestFlaggedCompleted(v)) --print(k, IsQuestFlaggedCompleted(v))
if k < 36 or k > 37 then if k < 36 or k > 37 then
aura_env.currentQuest = k aura_env.currentQuest = k
break break
elseif (k == 36 and IsQuestFlaggedCompleted(aura_env.questDatabase[37]) == true) or (k == 37 and IsQuestFlaggedCompleted(aura_env.questDatabase[36]) == true) then elseif (k == 36 and IsQuestFlaggedCompleted(aura_env.questDatabase[37]) == true) or (k == 37 and IsQuestFlaggedCompleted(aura_env.questDatabase[36]) == true) then
--elseif (k == 36 and aura_env.TESTCOMPLETION[37] == true) or (k == 37 and aura_env.TESTCOMPLETION[36] == true) then --elseif (k == 36 and aura_env.TESTCOMPLETION[37] == true) or (k == 37 and aura_env.TESTCOMPLETION[36] == true) then
k = 38 k = 38
end end
end end
end end
--print(aura_env.currentQuest) --print(aura_env.currentQuest)
return true return true
end end
--DISPLAY --DISPLAY
function() function()
if aura_env.currentQuest < 89 then if aura_env.currentQuest < 89 then
return "Progress: " .. aura_env.currentQuest .. "/" .. #aura_env.questDatabase .. "\nCurrent quest: " .. aura_env.questNames[aura_env.currentQuest] .. "\nNext Quest: " .. aura_env.questNames[aura_env.currentQuest + 1] return "Progress: " .. aura_env.currentQuest .. "/" .. #aura_env.questDatabase .. "\nCurrent quest: " .. aura_env.questNames[aura_env.currentQuest] .. "\nNext Quest: " .. aura_env.questNames[aura_env.currentQuest + 1]
else else
return "Progress: " .. aura_env.currentQuest .. "/" .. #aura_env.questDatabase .. "\nCurrent quest: " .. aura_env.questNames[aura_env.currentQuest] return "Progress: " .. aura_env.currentQuest .. "/" .. #aura_env.questDatabase .. "\nCurrent quest: " .. aura_env.questNames[aura_env.currentQuest]
end end
end end
--INIT --INIT
aura_env.currentQuest = 1 aura_env.currentQuest = 1
aura_env.questDatabase = { aura_env.questDatabase = {
[1] = 47835, [1] = 47835,
[2] = 47867, [2] = 47867,
[3] = 47223, [3] = 47223,
[4] = 47224, [4] = 47224,
[5] = 48440, [5] = 48440,
[6] = 46938, [6] = 46938,
[7] = 47589, [7] = 47589,
[8] = 46297, [8] = 46297,
[9] = 48483, [9] = 48483,
[10] = 47627, [10] = 47627,
[11] = 47641, [11] = 47641,
[12] = 46732, [12] = 46732,
[13] = 46816, [13] = 46816,
[14] = 46839, [14] = 46839,
[15] = 46840, [15] = 46840,
[16] = 46841, [16] = 46841,
[17] = 46842, [17] = 46842,
[18] = 46843, [18] = 46843,
[19] = 48500, [19] = 48500,
[20] = 47431, [20] = 47431,
[21] = 46213, [21] = 46213,
[22] = 40238, [22] = 40238,
[23] = 47541, [23] = 47541,
[24] = 47508, [24] = 47508,
[25] = 47771, [25] = 47771,
[26] = 47526, [26] = 47526,
[27] = 47754, [27] = 47754,
[28] = 47652, [28] = 47652,
[29] = 47653, [29] = 47653,
[30] = 47743, [30] = 47743,
[31] = 49143, [31] = 49143,
[32] = 47287, [32] = 47287,
[33] = 48559, [33] = 48559,
[34] = 48199, [34] = 48199,
[35] = 48200, [35] = 48200,
[36] = 48201, [36] = 48201,
[37] = 48202, [37] = 48202,
[38] = 47473, [38] = 47473,
[39] = 47889, [39] = 47889,
[40] = 47890, [40] = 47890,
[41] = 47891, [41] = 47891,
[42] = 47892, [42] = 47892,
[43] = 47986, [43] = 47986,
[44] = 47987, [44] = 47987,
[45] = 47988, [45] = 47988,
[46] = 47991, [46] = 47991,
[47] = 47990, [47] = 47990,
[48] = 47989, [48] = 47989,
[49] = 47992, [49] = 47992,
[50] = 47993, [50] = 47993,
[51] = 47994, [51] = 47994,
[52] = 48081, [52] = 48081,
[53] = 46815, [53] = 46815,
[54] = 46818, [54] = 46818,
[55] = 46834, [55] = 46834,
[56] = 47066, [56] = 47066,
[57] = 46941, [57] = 46941,
[58] = 47686, [58] = 47686,
[59] = 47882, [59] = 47882,
[60] = 47688, [60] = 47688,
[61] = 47883, [61] = 47883,
[62] = 47689, [62] = 47689,
[63] = 47685, [63] = 47685,
[64] = 47687, [64] = 47687,
[65] = 47690, [65] = 47690,
[66] = 48107, [66] = 48107,
[67] = 48461, [67] = 48461,
[68] = 48344, [68] = 48344,
[69] = 47691, [69] = 47691,
[70] = 47854, [70] = 47854,
[71] = 47995, [71] = 47995,
[72] = 47853, [72] = 47853,
[73] = 48345, [73] = 48345,
[74] = 47855, [74] = 47855,
[75] = 47856, [75] = 47856,
[76] = 47416, [76] = 47416,
[77] = 47238, [77] = 47238,
[78] = 40761, [78] = 40761,
[79] = 47101, [79] = 47101,
[80] = 47180, [80] = 47180,
[81] = 47100, [81] = 47100,
[82] = 47183, [82] = 47183,
[83] = 47184, [83] = 47184,
[84] = 47203, [84] = 47203,
[85] = 47217, [85] = 47217,
[86] = 47218, [86] = 47218,
[87] = 47219, [87] = 47219,
[88] = 47220, [88] = 47220,
[89] = 48560, [89] = 48560,
} }
aura_env.questNames = { aura_env.questNames = {
[1] = "The Hand of Fate", [1] = "The Hand of Fate",
[2] = "Two If By Sea", [2] = "Two If By Sea",
[3] = "Light's Exodus", [3] = "Light's Exodus",
[4] = "The Vindicaar", [4] = "The Vindicaar",
[5] = "Into the Night", [5] = "Into the Night",
[6] = "Alone in the Abyss", [6] = "Alone in the Abyss",
[7] = "Righteous Fury", [7] = "Righteous Fury",
[8] = "Overwhelming Power", [8] = "Overwhelming Power",
[9] = "A Stranger's Plea", [9] = "A Stranger's Plea",
[10] = "Vengeance", [10] = "Vengeance",
[11] = "Sign of Resistance", [11] = "Sign of Resistance",
[12] = "The Prophet's Gambit", [12] = "The Prophet's Gambit",
[13] = "Rendezvous", [13] = "Rendezvous",
[14] = "From Darkness", [14] = "From Darkness",
[15] = "Prisoners No More", [15] = "Prisoners No More",
[16] = "Threat Reduction", [16] = "Threat Reduction",
[17] = "A Strike at the Heart", [17] = "A Strike at the Heart",
[18] = "Return to the Vindicaar", [18] = "Return to the Vindicaar",
[19] = "A Moment of Respite", [19] = "A Moment of Respite",
[20] = "Gathering Light", [20] = "Gathering Light",
[21] = "Crystals Not Included", [21] = "Crystals Not Included",
[22] = "A Grim Equation", [22] = "A Grim Equation",
[23] = "The Best Prevention", [23] = "The Best Prevention",
[24] = "Fire at Will", [24] = "Fire at Will",
[25] = "Locating the Longshot", [25] = "Locating the Longshot",
[26] = "Bringing the Big Guns", [26] = "Bringing the Big Guns",
[27] = "Lightly Roasted", [27] = "Lightly Roasted",
[28] = "The Light Mother", [28] = "The Light Mother",
[29] = "Light's Return", [29] = "Light's Return",
[30] = "The Child of Light and Shadow", [30] = "The Child of Light and Shadow",
[31] = "Essence of the Light Mother", [31] = "Essence of the Light Mother",
[32] = "The Vindicaar Matrix Core", [32] = "The Vindicaar Matrix Core",
[33] = "An Offering of Light", [33] = "An Offering of Light",
[34] = "The Burning Heart", [34] = "The Burning Heart",
[35] = "Securing a Foothold", [35] = "Securing a Foothold",
[36] = "Reinforce Light's Purchase", [36] = "Reinforce Light's Purchase",
[37] = "Reinforce the Veiled Den", [37] = "Reinforce the Veiled Den",
[38] = "Sizing Up The Opposition", [38] = "Sizing Up The Opposition",
[39] = "The Speaker Calls", [39] = "The Speaker Calls",
[40] = "Visions of Torment", [40] = "Visions of Torment",
[41] = "Dire News", [41] = "Dire News",
[42] = "Storming the Citadel", [42] = "Storming the Citadel",
[43] = "Scars of the Past", [43] = "Scars of the Past",
[44] = "Preventive Measures", [44] = "Preventive Measures",
[45] = "Chaos Theory", [45] = "Chaos Theory",
[46] = "Dark Machinations", [46] = "Dark Machinations",
[47] = "A Touch of Fel", [47] = "A Touch of Fel",
[48] = "Heralds of Apocalypse", [48] = "Heralds of Apocalypse",
[49] = "Dawn of Justice", [49] = "Dawn of Justice",
[50] = "Lord of the Spire", [50] = "Lord of the Spire",
[51] = "Forming a Bond", [51] = "Forming a Bond",
[52] = "A Floating Ruin", [52] = "A Floating Ruin",
[53] = "Mac'Aree, Jewel of Argus", [53] = "Mac'Aree, Jewel of Argus",
[54] = "Defenseless and Afraid", [54] = "Defenseless and Afraid",
[55] = "Khazaduum, First of His Name", [55] = "Khazaduum, First of His Name",
[56] = "Consecrating Ground", [56] = "Consecrating Ground",
[57] = "The Path Forward", [57] = "The Path Forward",
[58] = "Not-So-Humble Beginnings", [58] = "Not-So-Humble Beginnings",
[59] = "Conservation of Magic", [59] = "Conservation of Magic",
[60] = "Invasive Species", [60] = "Invasive Species",
[61] = "The Longest Vigil", [61] = "The Longest Vigil",
[62] = "Gatekeeper's Challenge: Tenacity", [62] = "Gatekeeper's Challenge: Tenacity",
[63] = "Gatekeeper's Challenge: Cunning", [63] = "Gatekeeper's Challenge: Cunning",
[64] = "Gatekeeper's Challenge: Mastery", [64] = "Gatekeeper's Challenge: Mastery",
[65] = "The Defiler's Legacy", [65] = "The Defiler's Legacy",
[66] = "The Sigil of Awakening", [66] = "The Sigil of Awakening",
[67] = "Where They Least Expect It", [67] = "Where They Least Expect It",
[68] = "We Have a Problem", [68] = "We Have a Problem",
[69] = "A Non-Prophet Organization", [69] = "A Non-Prophet Organization",
[70] = "Wrath of the Hight Exarch", [70] = "Wrath of the Hight Exarch",
[71] = "Overt Ops", [71] = "Overt Ops",
[72] = "Flanking Maneuvers", [72] = "Flanking Maneuvers",
[73] = "Talgath's Forces", [73] = "Talgath's Forces",
[74] = "What Might Have Been", [74] = "What Might Have Been",
[75] = "Across the Universe", [75] = "Across the Universe",
[76] = "Shadow of the Triumvirate", [76] = "Shadow of the Triumvirate",
[77] = "The Seat of the Triumvirate", [77] = "The Seat of the Triumvirate",
[78] = "Whispers from Oronaar", [78] = "Whispers from Oronaar",
[79] = "Arkhaan's Prayers", [79] = "Arkhaan's Prayers",
[80] = "The Pulsing Madness", [80] = "The Pulsing Madness",
[81] = "Arkhaan's Pain", [81] = "Arkhaan's Pain",
[82] = "Arkhaan's Plan", [82] = "Arkhaan's Plan",
[83] = "Arkhaan's Peril", [83] = "Arkhaan's Peril",
[84] = "Throwing Shade", [84] = "Throwing Shade",
[85] = "Sources of Darkness", [85] = "Sources of Darkness",
[86] = "The Shadowguard Incursion", [86] = "The Shadowguard Incursion",
[87] = "A Vessel Made Ready", [87] = "A Vessel Made Ready",
[88] = "A Beacon in the Dark", [88] = "A Beacon in the Dark",
[89] = "An Offering of Shadow", [89] = "An Offering of Shadow",
} }
aura_env.TESTCOMPLETION = { aura_env.TESTCOMPLETION = {
[1] = true, [1] = true,
[2] = true, [2] = true,
[3] = true, [3] = true,
[4] = true, [4] = true,
[5] = true, [5] = true,
[6] = true, [6] = true,
[7] = true, [7] = true,
[8] = true, [8] = true,
[9] = true, [9] = true,
[10] = true, [10] = true,
[11] = true, [11] = true,
[12] = true, [12] = true,
[13] = true, [13] = true,
[14] = true, [14] = true,
[15] = true, [15] = true,
[16] = true, [16] = true,
[17] = true, [17] = true,
[18] = true, [18] = true,
[19] = true, [19] = true,
[20] = true, [20] = true,
[21] = true, [21] = true,
[22] = true, [22] = true,
[23] = true, [23] = true,
[24] = true, [24] = true,
[25] = true, [25] = true,
[26] = true, [26] = true,
[27] = true, [27] = true,
[28] = true, [28] = true,
[29] = true, [29] = true,
[30] = true, [30] = true,
[31] = true, [31] = true,
[32] = true, [32] = true,
[33] = true, [33] = true,
[34] = true, [34] = true,
[35] = true, [35] = true,
[36] = false, [36] = false,
[37] = true, [37] = true,
[38] = true, [38] = true,
[39] = true, [39] = true,
[40] = true, [40] = true,
[41] = true, [41] = true,
[42] = true, [42] = true,
[43] = true, [43] = true,
[44] = true, [44] = true,
[45] = true, [45] = true,
[46] = true, [46] = true,
[47] = true, [47] = true,
[48] = true, [48] = true,
[49] = false, [49] = false,
[50] = false, [50] = false,
[51] = false, [51] = false,
[52] = false, [52] = false,
[53] = false, [53] = false,
[54] = false, [54] = false,
[55] = false, [55] = false,
[56] = false, [56] = false,
[57] = false, [57] = false,
[58] = false, [58] = false,
[59] = false, [59] = false,
[60] = false, [60] = false,
[61] = false, [61] = false,
[62] = false, [62] = false,
[63] = false, [63] = false,
[64] = false, [64] = false,
[65] = false, [65] = false,
[66] = false, [66] = false,
[67] = false, [67] = false,
[68] = false, [68] = false,
[69] = false, [69] = false,
[70] = false, [70] = false,
[71] = false, [71] = false,
[72] = false, [72] = false,
[73] = false, [73] = false,
[74] = false, [74] = false,
[75] = false, [75] = false,
[76] = false, [76] = false,
[77] = false, [77] = false,
[78] = false, [78] = false,
[79] = false, [79] = false,
[80] = false, [80] = false,
[81] = false, [81] = false,
[82] = false, [82] = false,
[83] = false, [83] = false,
[84] = false, [84] = false,
[85] = false, [85] = false,
[86] = false, [86] = false,
[87] = false, [87] = false,
[88] = false, [88] = false,
[89] = false, [89] = false,
} }
WeakAuras.ScanEvents("QUEST_TURNED_IN") WeakAuras.ScanEvents("QUEST_TURNED_IN")

View File

@@ -1,56 +1,56 @@
--make auto attack speed predictor thing please --make auto attack speed predictor thing please
--COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED --COMBAT_LOG_EVENT_UNFILTERED PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED
function(allstates, e, ...) function(allstates, e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local time = debugprofilestop() local time = debugprofilestop()
local subevent = select(2, ...) local subevent = select(2, ...)
if subevent == "SWING_DAMAGE" or subevent == "SWING_MISSED" then if subevent == "SWING_DAMAGE" or subevent == "SWING_MISSED" then
local source = select(4, ...) local source = select(4, ...)
local destination = select(9, ...) local destination = select(9, ...)
if source == UnitGUID("target") and destination == UnitName("player") then if source == UnitGUID("target") and destination == UnitName("player") then
if #aura_env.swings == aura_env.lines * 2 then if #aura_env.swings == aura_env.lines * 2 then
for k,v in ipairs(aura_env.swings) do for k,v in ipairs(aura_env.swings) do
if k > 1 then if k > 1 then
aura_env.swings[k - 1] = v aura_env.swings[k - 1] = v
end end
end end
table.remove(aura_env.swings, (aura_env.lines * 2)) table.remove(aura_env.swings, (aura_env.lines * 2))
table.insert(aura_env.swings, time) table.insert(aura_env.swings, time)
else else
table.insert(aura_env.swings, time) table.insert(aura_env.swings, time)
end end
local avgTime = 0 local avgTime = 0
for k,v in ipairs(aura_env.swings) do for k,v in ipairs(aura_env.swings) do
if k > 1 then if k > 1 then
if avgTime == 0 then if avgTime == 0 then
avgTime = aura_env.swings[k] - aura_env.swings[k - 1] avgTime = aura_env.swings[k] - aura_env.swings[k - 1]
else else
avgTime = (avgTime + (aura_env.swings[k] - aura_env.swings[k - 1])) / 2 avgTime = (avgTime + (aura_env.swings[k] - aura_env.swings[k - 1])) / 2
end end
end end
end end
allstates[1] = { allstates[1] = {
show = true, show = true,
changed = true, changed = true,
progressType = "timed", progressType = "timed",
avgTime = string.format("%.2f", avgTime / 1000), avgTime = string.format("%.2f", avgTime / 1000),
expirationTime = GetTime() + (avgTime / 1000), expirationTime = GetTime() + (avgTime / 1000),
duration = avgTime / 1000, duration = avgTime / 1000,
} }
print("return true", allstates[1].expirationTime, allstates[1].duration) print("return true", allstates[1].expirationTime, allstates[1].duration)
return true return true
end end
end end
elseif e == "PLAYER_REGEN_DISABLED" or e == "PLAYER_REGEN_ENABLED" then elseif e == "PLAYER_REGEN_DISABLED" or e == "PLAYER_REGEN_ENABLED" then
aura_env.swings = {} aura_env.swings = {}
if allstates[1] then if allstates[1] then
allstates[1].show = false allstates[1].show = false
allstates[1].changed = true allstates[1].changed = true
end end
return true return true
end end
end end
--INIT --INIT
aura_env.swings = {} aura_env.swings = {}
aura_env.lines = 2 aura_env.lines = 2

File diff suppressed because it is too large Load Diff

View File

@@ -1,40 +1,40 @@
--DISPLAY --DISPLAY
function() function()
return aura_env.output return aura_env.output
end end
--Try SPELL_RESSURECT -- RESSURECT event?? --Try SPELL_RESSURECT -- RESSURECT event??
--UNIT_HEALTH --UNIT_HEALTH
function() function()
local healthP = 0 local healthP = 0
local aliveMembers = GetNumGroupMembers() local aliveMembers = GetNumGroupMembers()
if IsInRaid("player") == true then if IsInRaid("player") == true then
for i = 1, GetNumGroupMembers() do for i = 1, GetNumGroupMembers() do
if UnitIsDeadOrGhost("raid" .. i) == false and UnitIsConnected("raid" .. i) == true then if UnitIsDeadOrGhost("raid" .. i) == false and UnitIsConnected("raid" .. i) == true then
healthP = healthP + math.floor(UnitHealth("raid" .. i) / UnitHealthMax("raid" .. i) * 10000) / 100 healthP = healthP + math.floor(UnitHealth("raid" .. i) / UnitHealthMax("raid" .. i) * 10000) / 100
end end
if UnitIsDeadOrGhost("raid" .. i) == true or UnitIsConnected("raid" .. i) == false then if UnitIsDeadOrGhost("raid" .. i) == true or UnitIsConnected("raid" .. i) == false then
aliveMembers = aliveMembers - 1 aliveMembers = aliveMembers - 1
end end
end end
else else
for i = 1, GetNumGroupMembers() - 1 do for i = 1, GetNumGroupMembers() - 1 do
if UnitIsDeadOrGhost("party" .. i) == false and UnitIsConnected("party" .. i) == true then if UnitIsDeadOrGhost("party" .. i) == false and UnitIsConnected("party" .. i) == true then
healthP = healthP + math.floor(UnitHealth("party" .. i) / UnitHealthMax("party" .. i) * 10000) / 100 healthP = healthP + math.floor(UnitHealth("party" .. i) / UnitHealthMax("party" .. i) * 10000) / 100
end end
if UnitIsDeadOrGhost("party" .. i) == true or UnitIsConnected("party" .. i) == false then if UnitIsDeadOrGhost("party" .. i) == true or UnitIsConnected("party" .. i) == false then
aliveMembers = aliveMembers - 1 aliveMembers = aliveMembers - 1
end end
end end
if UnitIsDeadOrGhost("player") == false and UnitIsConnected("player") == true then if UnitIsDeadOrGhost("player") == false and UnitIsConnected("player") == true then
healthP = healthP + math.floor(UnitHealth("player") / UnitHealthMax("player") * 10000) / 100 healthP = healthP + math.floor(UnitHealth("player") / UnitHealthMax("player") * 10000) / 100
end end
if UnitIsDeadOrGhost("player") == true or UnitIsConnected("player") == false then if UnitIsDeadOrGhost("player") == true or UnitIsConnected("player") == false then
aliveMembers = aliveMembers - 1 aliveMembers = aliveMembers - 1
end end
end end
aura_env.output = math.floor(healthP / aliveMembers * 100) / 100 .. "%%" aura_env.output = math.floor(healthP / aliveMembers * 100) / 100 .. "%%"
end end
--INIT --INIT
aura_env.output = 0 aura_env.output = 0

View File

@@ -1,25 +1,25 @@
-- DISPLAY -- DISPLAY
function aa() function aa()
if UnitDebuff("focus", "Paralytic Poison") then -- application for stun if UnitDebuff("focus", "Paralytic Poison") then -- application for stun
local stacks = select(4, UnitDebuff("focus", "Paralytic Poison")) local stacks = select(4, UnitDebuff("focus", "Paralytic Poison"))
return stacks return stacks
end end
if UnitDebuff("focus", "Partial Paralysis") then return "ROOT'D" end if UnitDebuff("focus", "Partial Paralysis") then return "ROOT'D" end
if UnitDebuff("focus", "Paralysis") then return "PLS HELP" end if UnitDebuff("focus", "Paralysis") then return "PLS HELP" end
end end
-- TRIGGER -- TRIGGER
function bb() function bb()
if UnitDebuff("focus", "Paralytic Poison") or if UnitDebuff("focus", "Paralytic Poison") or
UnitDebuff("focus", "Partial Paralysis") or UnitDebuff("focus", "Partial Paralysis") or
UnitDebuff("focus", "Paralysis") then -- application for stun UnitDebuff("focus", "Paralysis") then -- application for stun
return true return true
end end
end end
-- UNTRIGGER -- UNTRIGGER
function cc() function cc()
if UnitDebuff("focus", "Paralytic Poison") == nil and if UnitDebuff("focus", "Paralytic Poison") == nil and
UnitDebuff("focus", "Partial Paralysis") == nil and UnitDebuff("focus", "Partial Paralysis") == nil and
UnitDebuff("focus", "Paralysis") == nil then -- application for stun UnitDebuff("focus", "Paralysis") == nil then -- application for stun
return true return true
end end
end end

View File

@@ -1,17 +1,17 @@
LOOT_OPENED LOOT_OPENED
function() function()
aura_env.lootTime = math.floor(GetTime()) + 300 aura_env.lootTime = math.floor(GetTime()) + 300
end end
DISPLAY DISPLAY
function() function()
local currentTime = math.floor(GetTime()) local currentTime = math.floor(GetTime())
if currentTime > aura_env.lootTime and aura_env.lootTime > 0 then if currentTime > aura_env.lootTime and aura_env.lootTime > 0 then
return "FISHING BOAT MOTHERFUCKERS" return "FISHING BOAT MOTHERFUCKERS"
else else
return aura_env.lootTime - currentTime return aura_env.lootTime - currentTime
end end
end end
INTI INTI
aura_env.lootTime = 0 aura_env.lootTime = 0

View File

@@ -1,275 +1,275 @@
--TODO: FIX THE FUCKING THING --TODO: FIX THE FUCKING THING
--I had no idea what I was doing lol --I had no idea what I was doing lol
TRIGGER FOR HP TRIGGER FOR HP
function() function()
local bossList = local bossList =
{ {
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold "Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH "Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS "Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT "Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA "Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV "Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
"Ymiron", "Harbaron", "Helya", --MoS "Ymiron", "Harbaron", "Helya", --MoS
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL "Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway "Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW "Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
} }
local output = "" local output = ""
for i = 1, 40 do for i = 1, 40 do
for j = 1, table.getn(bossList) do for j = 1, table.getn(bossList) do
--if UnitName("nameplate" .. i) == bossList[j] then --if UnitName("nameplate" .. i) == bossList[j] then
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
return true return true
end end
end end
end end
end end
end end
TRIGGER FOR POWER TRIGGER FOR POWER
function() function()
local bossList = local bossList =
{ {
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold "Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH "Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS "Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT "Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA "Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV "Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
"Ymiron", "Harbaron", "Helya", --MoS "Ymiron", "Harbaron", "Helya", --MoS
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL "Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway "Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW "Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
} }
for i = 1, 40 do for i = 1, 40 do
for j = 1, table.getn(bossList) do for j = 1, table.getn(bossList) do
--if UnitName("nameplate" .. i) == bossList[j] then --if UnitName("nameplate" .. i) == bossList[j] then
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
if UnitPower("nameplate" .. i) > 0 then if UnitPower("nameplate" .. i) > 0 then
return true return true
end end
end end
end end
end end
end end
end end
TRIGGER FOR CASTBAR TRIGGER FOR CASTBAR
function() function()
local bossList = local bossList =
{ {
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold "Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH "Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS "Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT "Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA "Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV "Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
"Ymiron", "Harbaron", "Helya", --MoS "Ymiron", "Harbaron", "Helya", --MoS
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL "Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway "Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW "Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
} }
local output = "" local output = ""
for i = 1, 40 do for i = 1, 40 do
for j = 1, table.getn(bossList) do for j = 1, table.getn(bossList) do
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
if UnitCastingInfo("nameplate" .. i) then if UnitCastingInfo("nameplate" .. i) then
return true return true
end end
end end
end end
end end
end end
end end
DISPLAY FOR HP DISPLAY FOR HP
function() function()
local bossList = local bossList =
{ {
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold "Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH "Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS "Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT "Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA "Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV "Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
"Ymiron", "Harbaron", "Helya", --MoS "Ymiron", "Harbaron", "Helya", --MoS
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL "Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway "Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW "Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
} }
local output = "" local output = ""
for i = 1, 40 do for i = 1, 40 do
for j = 1, table.getn(bossList) do for j = 1, table.getn(bossList) do
--if UnitName("nameplate" .. i) == bossList[j] then --if UnitName("nameplate" .. i) == bossList[j] then
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
aura_env.bossHp = UnitHealth("nameplate" .. i) aura_env.bossHp = UnitHealth("nameplate" .. i)
aura_env.bossMaxHp = UnitHealthMax("nameplate" .. i) aura_env.bossMaxHp = UnitHealthMax("nameplate" .. i)
aura_env.bossPer = math.floor((aura_env.bossHp / aura_env.bossMaxHp) * 100) aura_env.bossPer = math.floor((aura_env.bossHp / aura_env.bossMaxHp) * 100)
output = math.floor(aura_env.bossHp / 1e6) .. "M%/" .. math.floor(aura_env.bossMaxHp / 1e6) .. "M - " .. aura_env.bossPer .. "%%" output = math.floor(aura_env.bossHp / 1e6) .. "M%/" .. math.floor(aura_env.bossMaxHp / 1e6) .. "M - " .. aura_env.bossPer .. "%%"
break break
end end
end end
end end
end end
return output return output
end end
DISPLAY FOR POWER DISPLAY FOR POWER
function() function()
local bossList = local bossList =
{ {
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold "Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH "Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS "Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT "Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA "Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV "Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
"Ymiron", "Harbaron", "Helya", --MoS "Ymiron", "Harbaron", "Helya", --MoS
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL "Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway "Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW "Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
} }
local output = "" local output = ""
for i = 1, 40 do for i = 1, 40 do
for j = 1, table.getn(bossList) do for j = 1, table.getn(bossList) do
--if UnitName("nameplate" .. i) == bossList[j] then --if UnitName("nameplate" .. i) == bossList[j] then
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
if UnitPower("nameplate" .. i) > 0 then if UnitPower("nameplate" .. i) > 0 then
aura_env.bossPower = UnitPower("nameplate" .. i) aura_env.bossPower = UnitPower("nameplate" .. i)
aura_env.bossPowerMax = UnitPowerMax("nameplate" .. i) aura_env.bossPowerMax = UnitPowerMax("nameplate" .. i)
aura_env.bossPer = math.floor((aura_env.bossPower / aura_env.bossPowerMax) * 100) aura_env.bossPer = math.floor((aura_env.bossPower / aura_env.bossPowerMax) * 100)
output = aura_env.bossPower .. "%/" .. aura_env.bossPowerMax .. " " .. aura_env.bossPer .. "%%" output = aura_env.bossPower .. "%/" .. aura_env.bossPowerMax .. " " .. aura_env.bossPer .. "%%"
break break
end end
end end
end end
end end
end end
return output return output
end end
DISPLAY FOR CASTBAR DISPLAY FOR CASTBAR
function() function()
local bossList = local bossList =
{ {
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold "Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH "Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS "Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT "Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA "Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV "Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
"Ymiron", "Harbaron", "Helya", --MoS "Ymiron", "Harbaron", "Helya", --MoS
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL "Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway "Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW "Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
} }
local output = "" local output = ""
for i = 1, 40 do for i = 1, 40 do
for j = 1, table.getn(bossList) do for j = 1, table.getn(bossList) do
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
if UnitCastingInfo("nameplate" .. i) then if UnitCastingInfo("nameplate" .. i) then
aura_env.bossCast = UnitCastingInfo("nameplate" .. i) aura_env.bossCast = UnitCastingInfo("nameplate" .. i)
aura_env.castEnd = select(6, UnitCastingInfo("nameplate" .. i)) aura_env.castEnd = select(6, UnitCastingInfo("nameplate" .. i))
aura_env.castStart = select(5, UnitCastingInfo("nameplate" .. i)) aura_env.castStart = select(5, UnitCastingInfo("nameplate" .. i))
output = aura_env.bossCast .. " - " .. math.floor(((aura_env.castEnd - GetTime() * 1000) / 1000) * 100) / 100 output = aura_env.bossCast .. " - " .. math.floor(((aura_env.castEnd - GetTime() * 1000) / 1000) * 100) / 100
break break
end end
end end
end end
end end
end end
return output return output
end end
DURATION FOR HP DURATION FOR HP
function() function()
return aura_env.bossHp, aura_env.bossMaxHp, 1 return aura_env.bossHp, aura_env.bossMaxHp, 1
end end
DURATION FOR POWER DURATION FOR POWER
function() function()
return aura_env.bossPower, aura_env.bossPowerMax, 1 return aura_env.bossPower, aura_env.bossPowerMax, 1
end end
DURATION FOR CASTBAR DURATION FOR CASTBAR
function() function()
return aura_env.castEnd - GetTime() * 1000, aura_env.castEnd - aura_env.castStart, 1 return aura_env.castEnd - GetTime() * 1000, aura_env.castEnd - aura_env.castStart, 1
end end
DISPLAY FOR NAME DISPLAY FOR NAME
function() function()
local bossList = local bossList =
{ {
"Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold "Skorpyron", "Anomaly", "Trilliax", "Tichon", "Krosus", "Aluriel", "Botanist", "Augur", "Elisande", "Gul'dan", --Nighthold
"Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH "Amalgam of souls", "Illysanna", "Smashspite", "Kur'talos", --BRH
"Gerdo", "Flamewreath", "Advisor Melandrus", --CoS "Gerdo", "Flamewreath", "Advisor Melandrus", --CoS
"Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT "Glaidalis", "Oakheart", "Dresaron", "of Xavius", --DHT
"Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA "Parjesh", "Lady Hatecoil", "Deepbeard", "Serpentrix", "Wrath of Azshara", --EoA
"Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV "Hymdall", "Hyrja", "Fenryr", "Skovald", "Odyn", --HoV
"Ymiron", "Harbaron", "Helya", --MoS "Ymiron", "Harbaron", "Helya", --MoS
"Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL "Rokmora", "Ularogg", "Naraxas", "Dargrul", --NL
"Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway "Ivanyr", "Corstilax", "Xakal", "Nal'tira", "Vandros", --Arcway
"Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW "Saltheril", "Inquisitor Tormen", "Ash'golm", "Glazer", "Cordana Fel" --VoTW
} }
local output = "" local output = ""
for i = 1, 40 do for i = 1, 40 do
for j = 1, table.getn(bossList) do for j = 1, table.getn(bossList) do
--if UnitName("nameplate" .. i) == bossList[j] then --if UnitName("nameplate" .. i) == bossList[j] then
if UnitExists("nameplate" .. i) then if UnitExists("nameplate" .. i) then
if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then if string.match(string.lower(UnitName("nameplate" .. i)), string.lower(bossList[j])) then
output = UnitName("nameplate" .. i) output = UnitName("nameplate" .. i)
break break
end end
end end
end end
end end
return output return output
end end
ANIMATION FOR HP ANIMATION FOR HP
function() function()
local function range (val, min, max, max2) local function range (val, min, max, max2)
val = 1 - (((max - val) / (max - min)) * max2) val = 1 - (((max - val) / (max - min)) * max2)
return val return val
end end
local c = aura_env.bossHp / aura_env.bossMaxHp local c = aura_env.bossHp / aura_env.bossMaxHp
c = 1 - c c = 1 - c
--c expected as [0, 1] --c expected as [0, 1]
if c > 0.5 then if c > 0.5 then
c = 1 - (2 * (c - 0.5)) c = 1 - (2 * (c - 0.5))
return c, 1, 0, 1 return c, 1, 0, 1
else else
c = c * 2 c = c * 2
return 1, c, 0, 1 return 1, c, 0, 1
end end
end end
INIT FOR HP INIT FOR HP
aura_env.bossHp = 1 aura_env.bossHp = 1
aura_env.bossMaxHp = 1 aura_env.bossMaxHp = 1
aura_env.bossPer = 1 aura_env.bossPer = 1
INIT FOR POWER INIT FOR POWER
aura_env.bossPower = 1 aura_env.bossPower = 1
aura_env.bossPowerMax = 1 aura_env.bossPowerMax = 1
aura_env.bossPer = 1 aura_env.bossPer = 1
INIT FOR CASTBAR INIT FOR CASTBAR
aura_env.castEnd = 0 aura_env.castEnd = 0
aura_env.castStart = 0 aura_env.castStart = 0
aura_env.bossCast = "" aura_env.bossCast = ""

View File

@@ -1,67 +1,67 @@
--GET MAX SHIELD ABSORB AND BAR FOR ABSORB --GET MAX SHIELD ABSORB AND BAR FOR ABSORB
TRIGGER TRIGGER
function() function()
local buff = UnitBuff("player", "Bulwark of Order") or "" local buff = UnitBuff("player", "Bulwark of Order") or ""
if buff ~= "" then return true else return false end if buff ~= "" then return true else return false end
end end
DURATION DURATION
function() function()
local shieldAmount = select(17, UnitBuff("player", "Bulwark of Order")) local shieldAmount = select(17, UnitBuff("player", "Bulwark of Order"))
if shieldAmount > aura_env.maxShield then if shieldAmount > aura_env.maxShield then
aura_env.maxShield = shieldAmount aura_env.maxShield = shieldAmount
end end
return shieldAmount, aura_env.maxShield, 1 return shieldAmount, aura_env.maxShield, 1
end end
DISPLAY DISPLAY
function() function()
local shield = select(17, UnitBuff("player", "Bulwark of Order")) or 0 local shield = select(17, UnitBuff("player", "Bulwark of Order")) or 0
return math.floor(shield / 1000) .. "k" return math.floor(shield / 1000) .. "k"
end end
ANIMATION ANIMATION
function() function()
local function range(val, min, max, max2) local function range(val, min, max, max2)
local val = 1 - (((max - val) / (max - min)) * max2) local val = 1 - (((max - val) / (max - min)) * max2)
return val return val
end end
local endTime = select(7, UnitBuff("player", "Bulwark of Order")) * 1000 local endTime = select(7, UnitBuff("player", "Bulwark of Order")) * 1000
local time = GetTime() * 1000 local time = GetTime() * 1000
local maxDur = select(6, UnitBuff("player", "Bulwark of Order")) * 1000 local maxDur = select(6, UnitBuff("player", "Bulwark of Order")) * 1000
local duration = endTime - time local duration = endTime - time
local c = range(duration, 0, maxDur, 1) local c = range(duration, 0, maxDur, 1)
--c expected as [0, 1] --c expected as [0, 1]
if c > 0.5 then if c > 0.5 then
c = 1 - (2 * (c - 0.5)) c = 1 - (2 * (c - 0.5))
return c, 1, 0, 1 return c, 1, 0, 1
else else
c = c * 2 c = c * 2
return 1, c, 0, 1 return 1, c, 0, 1
end end
end end
ON SHOW ON SHOW
aura_env.maxShield = 0 aura_env.maxShield = 0
TRIGGER TRIGGER
function() function()
local buff = UnitBuff("player", "Bulwark of Order") or "" local buff = UnitBuff("player", "Bulwark of Order") or ""
if buff ~= "" then return true else return false end if buff ~= "" then return true else return false end
end end
DURATION DURATION
function() function()
local shieldAmount = select(17, UnitBuff("player", "Bulwark of Order")) local shieldAmount = select(17, UnitBuff("player", "Bulwark of Order"))
local maxShield = UnitHealth("player") / 5 local maxShield = UnitHealth("player") / 5
return shieldAmount, maxShield, 1 return shieldAmount, maxShield, 1
end end
DISPLAY DISPLAY
function() function()
local shield = select(17, UnitBuff("player", "Bulwark of Order")) or 0 local shield = select(17, UnitBuff("player", "Bulwark of Order")) or 0
local maxShield = UnitHealth("player") / 5 local maxShield = UnitHealth("player") / 5
local pp = (shield / maxShield) * 20 local pp = (shield / maxShield) * 20
return string.format("%2.1f", pp) return string.format("%2.1f", pp)
end end

View File

@@ -1,40 +1,40 @@
PLAYER_ENTERING_WORLD PLAYER_ENTERING_WORLD
function() function()
if aura_env.enabled == 1 then if aura_env.enabled == 1 then
local r = WeakAuras.regions['julijabutton0'].region local r = WeakAuras.regions['julijabutton0'].region
local b = CreateFrame("Button", "JulijaButton", r, "SecureActionButtonTemplate") local b = CreateFrame("Button", "JulijaButton", r, "SecureActionButtonTemplate")
if aura_env.type:match("spell") then if aura_env.type:match("spell") then
b:SetAllPoints() b:SetAllPoints()
b:SetAttribute("unit", aura_env.target) b:SetAttribute("unit", aura_env.target)
b:SetAttribute("spell", aura_env.name) b:SetAttribute("spell", aura_env.name)
b:SetAttribute("type", "spell") b:SetAttribute("type", "spell")
end end
if aura_env.type:match("macro") then if aura_env.type:match("macro") then
b:SetAllPoints() b:SetAllPoints()
b:SetAttribute("macro", aura_env.name) b:SetAttribute("macro", aura_env.name)
b:SetAttribute("type", "macro") b:SetAttribute("type", "macro")
end end
return true return true
else else
return false return false
end end
end end
INIT INIT
aura_env.enabled = 0 aura_env.enabled = 0
aura_env.target = "player" --UnitID; player, focus, target, partyn (where n is the number in order of the party member), raidn (For more elaborate UnitIDs look up UnitID API Wiki thing; NO DYNAMIC INFO); I don't think it works for macros though.... So I've disabled it for macros aura_env.target = "player" --UnitID; player, focus, target, partyn (where n is the number in order of the party member), raidn (For more elaborate UnitIDs look up UnitID API Wiki thing; NO DYNAMIC INFO); I don't think it works for macros though.... So I've disabled it for macros
aura_env.type = "spell" --"spell" or "macro" CASE SENSITIVE aura_env.type = "spell" --"spell" or "macro" CASE SENSITIVE
aura_env.name = "Hand of the Protector" --Spell or Macro name CASE SENSITIVE aura_env.name = "Hand of the Protector" --Spell or Macro name CASE SENSITIVE
if aura_env.enabled == 1 then if aura_env.enabled == 1 then
if not aura_env.type:match("spell") and not aura_env.type:match("macro") then if not aura_env.type:match("spell") and not aura_env.type:match("macro") then
print("|cFFFF0000Error 'type' on julijabutton0") print("|cFFFF0000Error 'type' on julijabutton0")
aura_env.enabled = 0 aura_env.enabled = 0
end end
if aura_env.name == "" then if aura_env.name == "" then
print("|cFFFF0000Error 'name' on julijabutton0") print("|cFFFF0000Error 'name' on julijabutton0")
end end
if aura_env.target == "" and not aura_env.type:match("macro") then if aura_env.target == "" and not aura_env.type:match("macro") then
print("|cFFFF0000Error 'target' on julijabutton0") print("|cFFFF0000Error 'target' on julijabutton0")
end end
end end

Some files were not shown because too many files have changed in this diff Show More