Add new code snippets

This commit is contained in:
2024-03-03 13:50:12 +01:00
commit 01b612a50b
409 changed files with 65292 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text
print("ok!")
end
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:SetPoint("CENTER", aura_env.region, "CENTER", 1, 0)
aura_env.region.text:SetText("SW")
aura_env.region.text:Show()

View File

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

View File

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

View File

@@ -0,0 +1,531 @@
--LOOT_READY MERCHANT_SHOW QUEST_POI_UPDATE QUEST_DETAIL QUEST_COMPLETE QUEST_GREETING QUEST_PROGRESS GOSSIP_SHOW SCRAPPING_MACHINE_SHOW MERCHANT_CLOSED EQUIP_BIND_CONFIRM
function(e)
local aura_env = aura_env
if e == "LOOT_READY" then --Auto Loot
local slot = 1
local lootinfo = GetLootInfo()
for k, v in pairs(lootinfo) do
if v.locked == false then
local link = GetLootSlotLink(slot)
local looted = false
if not link then link = GetLootSlotLink(slot) end
if v.item:match("%d* Gold") or v.item:match("%d* Silver") or v.item:match("%d* Copper") then LootSlot(slot); print("|cff78cb00loot 1 |r", v.item, type, subtype)
elseif link:match("Azerite") then LootSlot(slot); print("|cff78cb00loot 2 |r", v.item, type, subtype)
elseif v.item:match("War Resources") then LootSlot(slot); print("|cff78cb00loot 3 |r", v.item, type, subtype)
elseif v.item:match("Residuum") then LootSlot(slot); print("|cff78cb00loot 4 |r", v.item, type, subtype)
elseif v.item:match("Manapearl") then LootSlot(slot); print("|cff78cb00loot 5 |r", v.item, type, subtype)
end
if link then
local icon = v.texture
local id = link:match("item:(%d+):")
if not WeakAurasSaved.CustomTrash.IconDatabase[v.item] and v.item and icon then WeakAurasSaved.CustomTrash.IconDatabase[v.item] = icon; print("Adding|cff78cb00 ", v.item, " |rto the icon database") end
if not WeakAurasSaved.CustomTrash.IDDatabase[v.item] and v.item and id then WeakAurasSaved.CustomTrash.IDDatabase[v.item] = id; print("Adding|cff3366ff ", v.item, " |rto the id database") end
local type = select(6, GetItemInfo(link)) or ""
local subtype = select(7, GetItemInfo(link)) or ""
local ilvl = select(4, GetItemInfo(link)) or 0
local equip = select(9, GetItemInfo(link))
if (select(7, GetItemInfo(link)) or 0) == "Mount" then LootSlot(slot); print("|cff78cb00loot 6 |r", v.item, type, subtype)
elseif ilvl > 390 then LootSlot(slot); print("|cff78cb00loot 7 |r", v.item, type, subtype)
elseif (select(7, GetItemInfo(link)) or 0) == "Herb" then LootSlot(slot); print("|cff78cb00loot 8 |r", v.item, type, subtype)
elseif (select(7, GetItemInfo(link)) or 0) == "Cooking" then LootSlot(slot); print("|cff78cb00loot 9 |r", v.item, type, subtype)
elseif (select(7, GetItemInfo(link)) or 0) == "Cloth" and type == "Tradeskill" then LootSlot(slot); print("|cff78cb00loot 10 |r", v.item, type, subtype)
elseif (select(7, GetItemInfo(link)) or 0) == "Metal & Stone" then LootSlot(slot); print("|cff78cb00loot 11 |r", v.item, type, subtype)
elseif (select(11, GetItemInfo(link)) or 0) > 150000 and v.quality == 0 then LootSlot(slot); print("|cff78cb00loot 12 |r", v.item, type, subtype)
elseif v.quality > 1 and v.quality < 4 and type ~= "Weapon" and type ~= "Armor" then LootSlot(slot); print("|cff78cb00loot 13 |r", v.item, type, subtype)
elseif v.isQuestItem == true then LootSlot(slot); print("|cff78cb00loot 14 |r", v.item, type, subtype)
elseif v.quality == 0 then LootSlot(slot); print("|cff78cb00loot 15 |r", v.item, type, subtype)
elseif aura_env.whitelist[v.item] then LootSlot(slot); print("|cff78cb00loot 16 |r", v.item, type, subtype)
--elseif type == "Quest" and subtype == "Quest" then LootSlot(slot); print("|cff78cb00loot 17 |r", v.item, type, subtype)
else
print(type, subtype)
if type == "Weapon" or type == "Armor" then
if aura_env.skills[select(3, UnitClass("player"))][subtype] == 1 then
LootSlot(slot); print("|cff78cb00loot 18 |r", v.item, type, subtype)
elseif equip == "INVTYPE_FINGER" or equip == "INVTYPE_TRINKET" or equip == "INVTYPE_CLOAK" or equip == "INVTYPE_NECK" then
LootSlot(slot); print("|cff78cb00loot 19 |r", v.item, type, subtype)
end
elseif type == "Miscellaneous" then
if subtype == "Mount" then
LootSlot(slot); print("|cff78cb00loot 20 |r", v.item, type, subtype)
end
end
end
end
if link then WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity, looted) end
slot = slot + 1
end
end
CloseLoot()
elseif e == "EQUIP_BIND_CONFIRM" then
StaticPopup1Button1:Click()
elseif e == "SCRAPPING_MACHINE_SHOW" then
for i = 0, 4 do
for j = 1, GetContainerNumSlots(i) do
local link = select(7, GetContainerItemInfo(i, j))
if link then
local name = GetItemInfo(link)
local rarity = select(3, GetItemInfo(link))
local ilvl = select(4, GetItemInfo(link)) or 0
local type = select(6, GetItemInfo(link))
local equip = select(9, GetItemInfo(link)) or ""
local price = select(11, GetItemInfo(link))
if aura_env.sellWhitelist[name] ~= 1 then
if name and rarity and ilvl and type and equip and price then
if (type == "Armor" or type == "Weapon") and rarity <= 3 and aura_env.getequipID(equip) then
UseContainerItem(i, j)
elseif rarity > 3 and aura_env.getequipID(equip) then
if equip ~= "INVTYPE_FINGER" then
local eqID = aura_env.getequipID(equip)
local elink = GetInventoryItemLink("player", eqID)
local eilvl = select(4, GetItemInfo(elink)) or 0
if eilvl > ilvl + 5 then
print("Scrapping " .. link .. "over |cFF780000" .. eilvl - ilvl .. "|r ilvl difference from " .. elink)
UseContainerItem(i, j)
end
elseif equip == "INVTYPE_FINGER" then
local eqID1, eqID2 = 11, 12
local elink1, elink2 = GetInventoryItemLink("player", eqID1), GetInventoryItemLink("player", eqID2)
local eilvl1, eilvl2 = select(4, GetItemInfo(elink1)) or 0, select(4, GetItemInfo(elink2)) or 0
if eilvl1 > ilvl + 5 then
print("Scrapping " .. link .. " over |cFF780000" .. eilvl1 - ilvl .. "|r ilvl difference from " .. elink1)
UseContainerItem(i, j)
elseif eilvl2 > ilvl + 5 then
print("Scrapping " .. link .. " over |cFF780000" .. eilvl2 - ilvl .. "|r ilvl difference from " .. elink2)
UseContainerItem(i, j)
end
end
end
end
end
end
end
end
elseif e == "MERCHANT_SHOW" then --Sell grey and white wepaon
if CanMerchantRepair() == true then RepairAllItems() end
local i, j = 0, 1
for c = 0, 4 do
for s = 1, GetContainerNumSlots(c) do
local link = select(7, GetContainerItemInfo(c, s))
if link then
local name = GetItemInfo(link)
local rarity = select(3, GetItemInfo(link))
local ilvl = select(4, GetItemInfo(link)) or 0
local type = select(6, GetItemInfo(link))
local price = select(11, GetItemInfo(link))
if price and price > 0 then
if aura_env.sellWhitelist[name] ~= 1 then
if rarity == 0 then
aura_env.toSell[#aura_env.toSell + 1] = {["c"] = c, ["s"] = s}
elseif (type == "Armor" or type == "Weapon") and ilvl < 350 then
aura_env.toSell[#aura_env.toSell + 1] = {["c"] = c, ["s"] = s}
end
end
end
end
end
end
aura_env.ticker = C_Timer.NewTicker(0.15, function()
if aura_env.toSell[1] then
UseContainerItem(aura_env.toSell[1].c, aura_env.toSell[1].s)
table.remove(aura_env.toSell, 1)
else
aura_env.ticker:Cancel()
end
if j >= GetContainerNumSlots(i) then i = i + 1; j = 1 end
if i >= 4 then aura_env.ticker:Cancel() end
end)
elseif e == "MERCHANT_CLOSED" then
if aura_env.ticker then aura_env.ticker:Cancel() end
aura_env.toSell = {}
elseif e == "QUEST_POI_UPDATE" then
CloseGossip()
elseif e == "QUEST_DETAIL" then
AcceptQuest()
elseif e == "QUEST_COMPLETE" then
if GetNumQuestChoices() <= 1 then
GetQuestReward(1)
end
elseif e == "GOSSIP_SHOW" then
local quests = GetNumGossipAvailableQuests()
local complquests = GetNumGossipActiveQuests()
local opt = GetNumGossipOptions()
if complquests > 0 and opt == 0 then
for i = 1, complquests do
SelectGossipActiveQuest(i)
end
end
if quests > 0 and opt == 0 then
SelectGossipAvailableQuest(1)
end
if opt == 1 and quests + complquests == 0 then
SelectGossipOption(1)
end
elseif e == "QUEST_GREETING" then
local quests = GetNumGossipAvailableQuests()
local complquests = GetNumGossipActiveQuests()
if complquests > 0 then
for i = 1, complquests do
SelectActiveQuest(1)
end
end
if quests > 0 then
SelectAvailableQuest(1)
end
elseif e == "QUEST_PROGRESS" then
if IsQuestCompletable(i) then
CompleteQuest()
end
end
end
--INIT
aura_env.whitelist =
{
["Pygmy Suckerfish"] = 1,
["Drakkari Offerings"] = 1,
["Deepcoral Pod"] = 1,
["Hardened Spring"] = 1,
["Machined Gear Assembly"] = 1,
["Tempered Plating"] = 1,
["Hefty Glimmershell"] = 1,
["Fresh Meat"] = 1,
["Wood"] = 1,
}
aura_env.sellWhitelist =
{
["Blacksmith Hammer"] = 1,
["Endless Tincture of Renewed Combat"] = 1,
["Mr. Munchykins"] = 1,
}
aura_env.toSell = {}
aura_env.getequipID = function(equip)
if equip == "INVTYPE_HEAD" then return 1
elseif equip == "INVTYPE_NECK" then return 2
elseif equip == "INVTYPE_SHOULDER" then return 3
elseif equip == "INVTYPE_BODY" then return 4
elseif equip == "INVTYPE_CHEST" or equip == "INVTYPE_ROBE" then return 5
elseif equip == "INVTYPE_WAIST" then return 6
elseif equip == "INVTYPE_LEGS" then return 7
elseif equip == "INVTYPE_FEET" then return 8
elseif equip == "INVTYPE_WRIST" then return 9
elseif equip == "INVTYPE_HAND" then return 10
elseif equip == "INVTYPE_CLOAK" then return 15
elseif equip == "INVTYPE_WEAPON" or equip == "INVTYPE_WEAPONMAINHAND" or equip == "INVTYPE_2HWEAPON" then return 16
elseif equip == "INVTYPE_SHIELD" then return 17
else return nil end
end
aura_env.skills =
{
--Warrior
[1] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 0,
["Mail"] = 0,
["Plate"] = 1,
["Shields"] = 1,
--Weapon Skills
["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 1,
["Bows"] = 1,
["Guns"] = 1,
["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 1,
["Polearms"] = 1,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 1,
["Warglaives"] = 1,
["Staves"] = 1,
["Fist Weapons"] = 1,
["Daggers"] = 1,
["Crossbows"] = 1,
["Wands"] = 0,
},
--Paladin
[2] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 0,
["Mail"] = 0,
["Plate"] = 1,
["Shields"] = 1,
--Weapon Skills
["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 1,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 1,
["Polearms"] = 1,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 1,
["Warglaives"] = 0,
["Staves"] = 0,
["Fist Weapons"] = 0,
["Daggers"] = 0,
["Crossbows"] = 0,
["Wands"] = 0,
},
--Hunter
[3] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 0,
["Mail"] = 1,
["Plate"] = 0,
["Shields"] = 0,
--Weapon Skills
["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 1,
["Bows"] = 1,
["Guns"] = 1,
["One-Handed Maces"] = 0,
["Two-Handed Maces"] = 0,
["Polearms"] = 1,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 1,
["Warglaives"] = 0,
["Staves"] = 1,
["Fist Weapons"] = 1,
["Daggers"] = 1,
["Crossbows"] = 1,
["Wands"] = 0,
},
--Rogue
[4] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 1,
["Mail"] = 0,
["Plate"] = 0,
["Shields"] = 0,
--Weapon Skills
["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 0,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0,
["Polearms"] = 0,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0,
["Warglaives"] = 0,
["Staves"] = 0,
["Fist Weapons"] = 1,
["Daggers"] = 1,
["Crossbows"] = 0,
["Wands"] = 0,
},
--Priest
[5] =
{
--Armor Skills
["Cloth"] = 1,
["Leather"] = 0,
["Mail"] = 0,
["Plate"] = 0,
["Shields"] = 0,
--Weapon Skills
["One-Handed Axes"] = 0,
["Two-Handed Axes"] = 0,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0,
["Polearms"] = 0,
["One-Handed Swords"] = 0,
["Two-Handed Swords"] = 0,
["Warglaives"] = 0,
["Staves"] = 1,
["Fist Weapons"] = 0,
["Daggers"] = 1,
["Crossbows"] = 0,
["Wands"] = 1,
},
--Death Knight
[6] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 0,
["Mail"] = 0,
["Plate"] = 1,
["Shields"] = 0,
--Weapon Skills
["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 1,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 1,
["Polearms"] = 1,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 1,
["Warglaives"] = 0,
["Staves"] = 0,
["Fist Weapons"] = 0,
["Daggers"] = 0,
["Crossbows"] = 0,
["Wands"] = 0,
},
--Shaman
[7] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 0,
["Mail"] = 1,
["Plate"] = 0,
["Shields"] = 1,
--Weapon Skills
["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 0,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0,
["Polearms"] = 0,
["One-Handed Swords"] = 0,
["Two-Handed Swords"] = 0,
["Warglaives"] = 0,
["Staves"] = 1,
["Fist Weapons"] = 1,
["Daggers"] = 1,
["Crossbows"] = 0,
["Wands"] = 0,
},
--Mage
[8] =
{
--Armor Skills
["Cloth"] = 1,
["Leather"] = 0,
["Mail"] = 0,
["Plate"] = 0,
["Shields"] = 0,
--Weapon Skills
["One-Handed Axes"] = 0,
["Two-Handed Axes"] = 0,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 0,
["Two-Handed Maces"] = 0,
["Polearms"] = 0,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0,
["Warglaives"] = 0,
["Staves"] = 1,
["Fist Weapons"] = 0,
["Daggers"] = 1,
["Crossbows"] = 0,
["Wands"] = 1,
},
--Warlock
[9] =
{
--Armor Skills
["Cloth"] = 1,
["Leather"] = 0,
["Mail"] = 0,
["Plate"] = 0,
["Shields"] = 0,
--Weapon Skills
["One-Handed Axes"] = 0,
["Two-Handed Axes"] = 0,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 0,
["Two-Handed Maces"] = 0,
["Polearms"] = 0,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0,
["Warglaives"] = 0,
["Staves"] = 1,
["Fist Weapons"] = 0,
["Daggers"] = 1,
["Crossbows"] = 0,
["Wands"] = 1,
},
--Monk
[10] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 1,
["Mail"] = 0,
["Plate"] = 1,
["Shields"] = 1,
--Weapon Skills
["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 0,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0,
["Polearms"] = 1,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0,
["Warglaives"] = 0,
["Staves"] = 1,
["Fist Weapons"] = 1,
["Daggers"] = 0,
["Crossbows"] = 0,
["Wands"] = 0,
},
--Druid
[11] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 1,
["Mail"] = 0,
["Plate"] = 0,
["Shields"] = 0,
--Weapon Skills
["One-Handed Axes"] = 0,
["Two-Handed Axes"] = 0,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 1,
["Two-Handed Maces"] = 0,
["Polearms"] = 1,
["One-Handed Swords"] = 0,
["Two-Handed Swords"] = 0,
["Warglaives"] = 0,
["Staves"] = 1,
["Fist Weapons"] = 1,
["Daggers"] = 1,
["Crossbows"] = 0,
["Wands"] = 0,
},
--Demon Hunter
[12] =
{
--Armor Skills
["Cloth"] = 0,
["Leather"] = 1,
["Mail"] = 0,
["Plate"] = 0,
["Shields"] = 0,
--Weapon Skills
["One-Handed Axes"] = 1,
["Two-Handed Axes"] = 0,
["Bows"] = 0,
["Guns"] = 0,
["One-Handed Maces"] = 0,
["Two-Handed Maces"] = 0,
["Polearms"] = 0,
["One-Handed Swords"] = 1,
["Two-Handed Swords"] = 0,
["Warglaives"] = 1,
["Staves"] = 0,
["Fist Weapons"] = 1,
["Daggers"] = 0,
["Crossbows"] = 0,
["Wands"] = 0,
},
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,15 @@
/click ChatFrame1Tab RightButton
DropDownList1Button4
/click ChatFrame3Tab RightButton
/click DropDownList1Button10
/click ChatConfigChatSettingsLeftCheckBox2Check
/click ChatConfigChatSettingsLeftCheckBox4Check
/click ChatConfigChatSettingsLeftCheckBox12Check
/click ChatConfigChatSettingsLeftCheckBox13Check
/click ChatConfigChatSettingsLeftCheckBox14Check
/click ChatConfigChatSettingsLeftCheckBox15Check
/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

View File

@@ -0,0 +1,20 @@
--PLAYER_REGEN_DISABLED PLAYER_REGEN_ENABLED UPDATE
function(e)
if e == "PLAYER_REGEN_DISABLED" then
if not aura_env.seconds then aura_env.seconds = 0 end
if not aura_env.minutes then aura_env.minutes = 0 end
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)
return true
elseif e == "PLAYER_REGEN_ENABLED" then
aura_env.minutes = 0; aura_env.seconds = 0
if aura_env.ticker then aura_env.ticker:Cancel() end
elseif e == "UPDATE" then return true end
end
--DISPLAY
function()
if aura_env.seconds and aura_env.minutes then
return aura_env.minutes .. ":" .. aura_env.seconds
end
end

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +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
--/run WeakAuras.ScanEvents("BULLSHIT_BEGIN")
--BULLSHIT_BEGIN BULLSHIT_STOP PLAYER_ENTERING_WORLD
function(e)
if e == "BULLSHIT_BEGIN" 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(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
if aura_env.ticker then
aura_env.ticker:Cancel()
end
end
elseif e == "BULLSHIT_STOP" then
if aura_env.ticker then
aura_env.ticker:Cancel()
end
elseif e == "PLAYER_ENTERING_WORLD" then
if IsInInstance() == true then
if aura_env.ticker then
aura_env.ticker:Cancel()
end
end
end
end

View File

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

View File

@@ -0,0 +1,28 @@
--CLEU PLAYER_TARGET_CHANGED
function(e, ...)
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
return true
end
elseif e == "PLAYER_TARGET_CHANGED" then
return true
end
end
--DISPLAY
function()
local function UnitDebuffC(unit, spell)
for i = 1, 40 do
local name = UnitDebuff(unit, i, PLAYER)
if name then
if name == spell then
return UnitDebuff(unit, i, PLAYER)
end
else
return nil
end
end
end
local thing = select(16, UnitDebuffC("target", "Ignite"))
if thing then return thing else return 0 end
end

View File

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

View File

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

View File

@@ -0,0 +1,24 @@
--CLEU SPELL_UPDATE_COOLDOWN
function(e, ...)
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 not aura_env.cd then aura_env.cd = 0 end
aura_env.cd = aura_env.cd + 1
return true
end
if select(2, ...) == "SPELL_CAST_SUCCESS" and select(5, ...) == UnitName("player") and select(13, ...) == "Combustion" then
aura_env.cd = 0
end
elseif e == "SPELL_UPDATE_COOLDOWN" then return true
end
end
--DISPLAY
function()
if not aura_env.cd then aura_env.cd = 0 end
if GetSpellCooldown("Combustion") > 0 then
return "|cfffd477b" .. aura_env.cd
else
return "|cff78cb00" .. aura_env.cd
end
end

View File

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

View File

@@ -0,0 +1,121 @@
--EVERY FRAME (Throttled)
function()
if aura_env.lastscan < GetTime() then
if UnitExists("focus") then
if UnitInParty("focus") then
--Get MapID for both
local myMapID = C_Map.GetBestMapForUnit("player")
local focusMapID = C_Map.GetBestMapForUnit("focus")
--Get Coordinates for both within same map
local pX, pY, fX, fY = 0, 0, 0, 0
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
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
if pX > 0 and pY > 0 and fX > 0 and fY > 0 then
--Get player direction facing and convert to angle
local playerFace = GetPlayerFacing() or 0
local playerA = math.floor(playerFace * 100)
playerA = aura_env.range(playerA, 0, 630, 360) - 1
playerA = - playerA
playerA = math.floor(playerA)
playerA = playerA - 90
if playerA < 0 then playerA = playerA + 360 end
--Get relative Coordinates
local X = fX - pX
local Y = fY - pY
local hyp = math.sqrt((X ^ 2) + (Y ^ 2))
local a = math.atan2(Y, X)
a = a - math.rad(playerA)
local Y2, X2 = hyp * math.cos(a), hyp * math.sin(a)
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
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
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
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
aura_env.zoom = 1
end
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
end
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.focusTexture:SetPoint("CENTER", aura_env.region, "CENTER", X2 * aura_env.zoom, Y2 * aura_env.zoom)
--Get class to color
local pclass, fclass = select(3, UnitClass("player")), select(3, UnitClass("focus"))
aura_env.region.playerTexture:SetVertexColor(aura_env.classColor(pclass))
aura_env.region.focusTexture:SetVertexColor(aura_env.classColor(fclass))
return true
else
print("Focus not in map!")
end
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("No focus found!"); aura_env.region.playerTexture:Hide(); aura_env.region.focusTexture:Hide(); aura_env.lastscan = GetTime() + 5 end
end
end
--INIT
aura_env.throttle = 250
aura_env.lastscan = 0
aura_env.zoom = 1
aura_env.range = function(val, min, max, max2)
val = 1 - (((max - val) / (max - min)) * max2)
return val
end
aura_env.round = function(var, n)
if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n)
else
var = math.floor(var+0.5)
end
return var
end
aura_env.classColor = function(class)
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 == 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 == 5 then return 1, 1, 1, 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 == 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 == 10 then return 0, 1, 0.59, 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
return 1, 1, 1, 1 end
end
if not aura_env.region.playerTexture then
local playerTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
aura_env.region.playerTexture = playerTexture
end
aura_env.region.playerTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
aura_env.region.playerTexture:SetHeight(16)
aura_env.region.playerTexture:SetWidth(16)
aura_env.region.playerTexture:Show()
if not aura_env.region.focusTexture then
local focusTexture = aura_env.region:CreateTexture(nil, "OVERLAY")
aura_env.region.focusTexture = focusTexture
end
aura_env.region.focusTexture:SetTexture("Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\Aura72")
aura_env.region.focusTexture:SetHeight(16)
aura_env.region.focusTexture:SetWidth(16)
aura_env.region.focusTexture:Show()
if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.text = text
end
aura_env.region.text:ClearAllPoints()
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:SetJustifyH("CENTER")
aura_env.region.text:Show()

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,100 @@
--CHAT_MSG_CHANNEL
function(e, msg, _, _, channel)
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
local x, y = msg:match("(%d+%.?%d*)[ ,/]+(%d+%.?%d*)")
if x and y then
local command = x .. " " .. y
aura_env.waypoints[#aura_env.waypoints + 1] = {["x"] = x, ["y"] = y,}
WeakAuras.ScanEvents("NEW_ID")
end
end
end
--EVERY FRAME
function()
if not aura_env.noidee then
local function range (val, min, max, max2)
val = 1 - (((max - val) / (max - min)) * max2)
return val
end
if not aura_env.idee then WeakAuras.ScanEvents("NEW_ID")
else
local hX, hY = aura_env.waypoints[aura_env.idee]["x"], aura_env.waypoints[aura_env.idee]["y"]
local myMapID = C_Map.GetBestMapForUnit("player")
local pX, pY = C_Map.GetPlayerMapPosition(myMapID, "player").x * 100, C_Map.GetPlayerMapPosition(myMapID, "player").y * 100
local X = pX - hX
local Y = pY - hY
local playerFace = GetPlayerFacing() or 0
local playerA = math.floor(playerFace * 100)
playerA = range(playerA, 0, 630, 360) - 1
playerA = - playerA
playerA = playerA - 90
if playerA < 0 then playerA = playerA + 360 end
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.angle = math.deg(math.atan2(Y, X))
aura_env.angle = aura_env.angle - playerA
aura_env.angle = aura_env.angle - 180
if aura_env.hyp < aura_env.wipeDistance then
table.remove(aura_env.waypoints, aura_env.idee)
aura_env.idee = nil
WeakAuras.ScanEvents("NEW_ID")
end
return true
end
end
end
--NEW_ID REMOVE_ID
function(e)
if e == "NEW_ID" then
if not IsInInstance() then
local maxhyp = 100000
local myMapID = C_Map.GetBestMapForUnit("player")
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
local hX, hY = aura_env.waypoints[k].x, aura_env.waypoints[k].y
local X, Y = pX - hX, pY - hY
local hyp = math.sqrt((math.abs(X^2)) + (math.abs(Y^2)))
if hyp < maxhyp then
maxhyp = hyp
aura_env.idee = k
end
end
if not aura_env.idee then aura_env.noidee = true end
if aura_env.idee then aura_env.noidee = nil end
end
elseif e == "REMOVE_ID" then
if aura_env.idee then
table.remove(aura_env.waypoints, aura_env.idee)
aura_env.idee = nil
WeakAuras.ScanEvents("NEW_ID")
else
end
end
end
--ANIMATION
function()
if aura_env.angle then
return - aura_env.angle
else
return 0
end
end
--INIT
aura_env.waypoints = {}
if not aura_env.region.distance then
local distance = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.distance = distance
end
aura_env.region.distance:ClearAllPoints()
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:SetJustifyH("CENTER")
aura_env.region.distance:SetJustifyV("CENTER")
aura_env.region.distance:Show()
aura_env.wipeDistance = 50
WeakAuras.ScanEvents("NEW_ID")

View File

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

View File

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

View File

@@ -0,0 +1 @@
!nR1cZjoYr4)lu1wfo3AcpmE9E3TPkSbwWblCqI15UZrWG0amhcjIE4xPw(TNU7rsiK5LmEtLI1EfZm9x)y6E6w9y9s6A6QE6QLluQsHs6QZ1vnX)bJYCn6WTN4pvxPY5f1vFQ74XECFDLtRue(6ZrF9SlGVnXvyQ98cUUAV66QUopQUGzW1vaihXmMnX1jWgawXXgwcZWx4y7rS2N56dp4RRowyl8MkFgEuok8SVRyYeUlUCfsCdhaF0Kpky8yjJB1OZTn73bMN(klWLvgyWcULvBtpjUEbJ4pWT9vbQepPRo4QAQAdu1Q1dalazQ6cl2Za4Q2S58qQisagWzwG1igKBD5eiQ32OthCDb2RenFPWB4yfm3ELXWLzkc80vkJMqpU14BDei2ADVfezlXeBD1RAOO1OhzBiWuGLA5WOnLap(adlMNN(is3mWbNhy5lImxYztpQN4fE6bHHz2I5mFobMbZkCdZX1eTaYnlx(eyZsAInFgSkcdC3CbqHdS1PAlxLJpd3ujHvIk(Te7WQMWgco4a5(Jh3WXg2xc3Uiya4MZe2h(QJ9zoS1t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3M9ssC3DuoZzPmYYKGXuvPD1Hst0gu(KtLuEHo8NdvAubSShjkKYOhQ4tEXEVDtkK2rzsMyktlqPek2y3o7rPFhkkJOBm1r12r1ZcYNalTFR6vBpQvh4T671rRnbvdhCqe2OZrJUwXNXMJMoK0tUt2Xewct4mazF5SY2i(SAhRLyF1YkQffxFjOv84CsHoxRivO5dYExU57YnvuUjpf4(k08qCmF4vAozN25IcYTQIBPrE1K)ZCQjf0IP8xLkQy1)QLtMp3U7YxfobDMYvX)xHsZVVpftsvAMLOyVzC41Zjp5DkkEu5K4LOYDN0JKOCoJ(MD70PQWXJQCHNZk1oFucNMPTD0Nuv04(CQOYi5vUQvjYN12H8qTJFlQtxArMvOKrLQIlZ5ntJA5)oQrv6cuPzlQ(vglQU4MB(TpJIZ78ZhjfO)WR)89JG(7AnLFqz2ZeBkvp1bqcQ8eAQ65ENteA5B(qLsx(Q1DsLNyswg(6(hnqMSjlCsdExP57knpCkn)W7knpeknRtdwPzO9)7LyMK(tMyZdVet(oYFHYjVkCsJpE6IP38mDd1)WX4lPWRkzM7e8W7ko)HuXPCASJHetvrAFD7K(w3p3Ipx2z2i78Q7oCz6CJ6GZ9p3Qnj997pfNt24bri9)KgB4)8DVVp6Y1CsPnM(fpVblDFP8NClGDzRkkZOGtzHJ72oUUdYjsohIYoCHzLUC8oSHkl(Ix0MMevLf8nV81S76zp5Ispfszu7w8I43W2QNOZpzzcCse3RV9Mhd9HL)7I(qLs5ZUVSsAB)eyfxQH9JH)V)

View File

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

View File

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

View File

@@ -0,0 +1,110 @@
--COMBAT_LOG_EVENT_UNFILTERED
function(...)
local se = select(3, ...)
if se == "SWING_DAMAGE" then
local dest = select(10, ...)
if dest == UnitName("player") then
local bloq = select(17, ...)
if bloq then
aura_env.dmgbloq = aura_env.dmgbloq + bloq
aura_env.numbloq = aura_env.numbloq + 1
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))
end
end
elseif se == "SPELL_DAMAGE" then
local dest = select(10, ...)
if dest == UnitName("player") then
local bloq = select(20, ...)
if bloq then
aura_env.dmgbloq = aura_env.dmgbloq + bloq
aura_env.numbloq = aura_env.numbloq + 1
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))
end
end
elseif se == "SPELL_AURA_APPLIED" then
local dest = select(6, ...)
if dest == UnitName("player") then
local name = select(14, ...)
if name == "Shield Block" or name == "Last Stand" then
aura_env.numbloq = 0
aura_env.dmgbloq = 0
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))
end
end
end
end
--INIT
aura_env.numbloq = 0
aura_env.dmgbloq = 0
aura_env.color = function(damag)
local damagcolor = "|cFFFFFFFF"
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.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 > 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.66 * UnitHealth("player") then damagcolor = "|c" end
return damagcolor
end
local fontsize = 32
if not aura_env.region.blocks then
local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.blocks = text
print("ok!")
end
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:SetPoint("CENTER", aura_env.region, "CENTER")
aura_env.region.blocks:SetJustifyH("LEFT")
aura_env.region.blocks:SetText("0")
aura_env.region.blocks:Show()
if not aura_env.region.damag then
local text = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.damag = text
print("ok!")
end
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:SetPoint("CENTER", aura_env.region, "CENTER", 0, -32)
aura_env.region.damag:SetJustifyH("LEFT")
aura_env.region.damag:SetText("0")
aura_env.region.damag:Show()
aura_env.shorten = function(val)
local function round(var, n)
if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n)
else
var = math.floor(var+0.5)
end
return var
end
local n = 2
if val <= 1e3 then
return round(val, n)
elseif val > 1e3 and val < 1e6 then
return round(val / 1e3, n) .. "k"
elseif val > 1e6 and val < 1e9 then
return round(val / 1e6, n) .. "M"
elseif val > 1e9 then
return round(val / 1e9, n) .. "G"
end
end
aura_env.auraID = function(spell)
for i = 1, 40 do
local name = UnitBuff("player", i)
if name then
if name == spell then
return i
end
else
break
end
end
end

View File

@@ -0,0 +1,54 @@
--COMBAT_LOG_EVENT_UNFILTERED UPDATE REMOVE PLAYER_ALIVE
function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, ...)
if se == "UNIT_DIED" then
local name = select(9, ...)
if name:match(aura_env.farmanimal) then
local date = date()
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].Count = WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal].Count + 1
return true
end
end
elseif e == "UPDATE" then
return true
elseif e == "REMOVE" then
for i = 1, #WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal] do
WeakAurasSaved.CustomTrash.Farm[aura_env.farmanimal][i] = nil
end
return true
elseif e == "PLAYER_ALIVE" and IsInInstance() == false then
ResetInstances()
return true
end
end
--DISPLAY
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 date = date()
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
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
return output
end
--INIT
aura_env.farmanimal = "Altairus"
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
aura_env.ticker = C_Timer.NewTicker(10, function() WeakAuras.ScanEvents("UPDATE") end)
if WeakAuras.IsOptionsOpen() then
aura_env.ticker:Cancel()
end
aura_env.round = function(var, n)
if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n)
else
var = math.floor(var+0.5)
end
return var
end

View File

@@ -0,0 +1,77 @@
--EVERY FRAME
function()
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)
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 >= 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 >= 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)
end
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 >= 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 >= 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)
end
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 >= 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 >= 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)
end
return "Crit\nHaste\nMastery"
end
--INIT
local font, size, flags = aura_env.region.text:GetFont()
if not aura_env.region.crit then
local crit = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.crit = crit
print("ok!")
end
aura_env.region.crit:SetFont(font, size, flags)
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:SetJustifyH("RIGHT")
aura_env.region.crit:SetText("11111111")
aura_env.region.crit:Show()
if not aura_env.region.haste then
local haste = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.haste = haste
print("ok!")
end
aura_env.region.haste:SetFont(font, size, flags)
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:SetJustifyH("RIGHT")
aura_env.region.haste:SetText("22222222")
aura_env.region.haste:Show()
if not aura_env.region.mastery then
local mastery = aura_env.region:CreateFontString(nil, aura_env.region)
aura_env.region.mastery = mastery
print("ok!")
end
aura_env.region.mastery:SetFont(font, size, flags)
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:SetJustifyH("RIGHT")
aura_env.region.mastery:SetText("33333333")
aura_env.region.mastery:Show()
aura_env.round = function(var, n)
if (n) then
var = math.floor((var * 10^n) + 0.5) / (10^n)
else
var = math.floor(var+0.5)
end
return var
end
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.c31, aura_env.c32, aura_env.c33 = 0, 1, 0
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.c61, aura_env.c62, aura_env.c63 = 1, 1, 0

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,58 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED REMOVE_UNIT
function(allstates, e, unit)
if e == "NAME_PLATE_UNIT_ADDED" and unit then
if UnitIsPlayer(unit) then
if UnitIsEnemy("player", unit) then
local _, _, class = UnitClass(unit)
allstates[unit] =
{
changed = true,
show = true,
unit = unit,
class = class,
}
return true
end
end
elseif e == "NAME_PLATE_UNIT_REMOVED" and unit then
if allstates[unit] then
local LCG = LibStub("LibCustomGlow-1.0")
allstates[unit].show = false
allstates[unit].changed = true
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Stop(nameplate)
return true
end
elseif e == "REMOVE_UNIT" then
if allstates[unit] then
allstates[unit].show = false
allstates[unit].changed = true
return true
end
end
end
--ON SHOW
local LCG = LibStub("LibCustomGlow-1.0")
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit)
local aura_env = aura_env
local unit = aura_env.state.unit
LCG.PixelGlow_Start(nameplate, {aura_env.classColor(aura_env.state.class)}, nil, 0, 8, 4, 0, -4)
C_Timer.After(4, function() WeakAuras.ScanEvents("REMOVE_UNIT", unit); LCG.PixelGlow_Stop(nameplate) end)
--INIT
aura_env.classColor = function(class)
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 == 3 then return 0.67, 0.83, 0.45, 1 elseif
class == 4 then return 1, 0.96, 0.41, 1 elseif
class == 5 then return 1, 1, 1, 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 == 8 then return 0.25, 0.78, 0.92, 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 == 11 then return 1, 0.49, 0.04, 1 elseif
class == 12 then return 0.64, 0.19, 0.79, 1 else
return 1, 1, 1, 1 end
end

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,731 @@
--COMBAT_LOG_EVENT_UNFILTERED REMOVE_GUID NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(allstates, e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local se = select(2, CombatLogGetCurrentEventInfo())
if se == "SPELL_CAST_START" or se == "SPELL_CAST_SUCCESS" then
local spell = select(13, CombatLogGetCurrentEventInfo())
if aura_env.spells[spell] then
local ID = select(7, GetSpellInfo(aura_env.spells[spell].ID))
if ID == aura_env.spells[spell].ID then
local castTime = select(4, GetSpellInfo(aura_env.spells[spell].ID))
local GUID = select(4, CombatLogGetCurrentEventInfo())
if GUID then allstates[GUID] = {} end
if allstates[GUID].timer then allstates[GUID].timer:Cancel() end
local unit = ""
local target = select(9, CombatLogGetCurrentEventInfo())
if target and UnitIsPlayer(target) == true then
local targetClass = UnitClass(target) or ""
target = aura_env.classColor(targetClass) .. target
allstates[GUID].target = target
end
for i = 1, 30 do
if UnitExists("nameplate" .. i) then
if UnitGUID("nameplate" .. i) == GUID then
unit = "nameplate" .. i
break
end
end
end
-- unit = "player"
local LCG = LibStub("LibCustomGlow-1.0")
if castTime > 1000 and se == "SPELL_CAST_START" then
if unit == "player" or unit == "" then unit = "nameplate1" end
if allstates[GUID].timer then allstates[GUID].timer:Cancel() end
allstates[GUID].changed = true
allstates[GUID].show = true
allstates[GUID].showTime = GetTime()
allstates[GUID].ID = aura_env.spells[spell].ID
allstates[GUID].ins = aura_env.spells[spell].ins
allstates[GUID].unit = unit
allstates[GUID].GUID = GUID
allstates[GUID].progressType = "timed"
allstates[GUID].expirationTime = GetTime() + castTime / 1000
allstates[GUID].duration = castTime / 1000
allstates[GUID].timer = C_Timer.NewTimer(castTime / 1000, function() WeakAuras.ScanEvents("REMOVE_GUID", GUID); LCG.PixelGlow_Stop(nameplate); end)
return true
elseif castTime == 0 and se == "SPELL_CAST_SUCCESS" then
if unit == "player" or unit == "" then unit = "nameplate1" end
if allstates[GUID].timer then allstates[GUID].timer:Cancel() end
allstates[GUID].changed = true
allstates[GUID].show = true
allstates[GUID].showTime = GetTime()
allstates[GUID].ID = aura_env.spells[spell].ID
allstates[GUID].ins = aura_env.spells[spell].ins
allstates[GUID].unit = unit
allstates[GUID].GUID = GUID
allstates[GUID].expirationTime = GetTime() + 2
allstates[GUID].timer = C_Timer.NewTimer(2, function() WeakAuras.ScanEvents("REMOVE_GUID", GUID); LCG.PixelGlow_Stop(nameplate); end)
return true
end
end
end
elseif se == "SPELL_CAST_FAILED" then
local spell = select(13, CombatLogGetCurrentEventInfo())
if aura_env.spells[spell] then
local ID = select(7, GetSpellInfo(aura_env.spells[spell].ID))
if ID == aura_env.spells[spell].ID then
local LCG = LibStub("LibCustomGlow-1.0")
local GUID = select(4, CombatLogGetCurrentEventInfo())
if allstates[GUID].timer then allstates[GUID].timer:Cancel() end
local unit = ""
for i = 1, 30 do
if UnitExists("nameplate" .. i) then
if UnitGUID("nameplate" .. i) == GUID then
unit = "nameplate" .. i
break
end
end
end
--WeakAuras.ScanEvents("REMOVE_GUID", GUID)
local rem = allstates[GUID].expirationTime - GetTime()
local maxrem = allstates[GUID].expirationTime - allstates[GUID].showTime
allstates[GUID].changed = true
allstates[GUID].show = true
allstates[GUID].progressType = "static"
allstates[GUID].value = string.format("%.1f", rem)
allstates[GUID].total = maxrem
allstates[GUID].interrupted = true
allstates[GUID].timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("REMOVE_GUID", GUID) end)
if unit ~= "" then
local nameplate = C_NamePlate.GetNamePlateForUnit(unit)
LCG.PixelGlow_Stop(nameplate)
end
return true
end
end
elseif se == "UNIT_DIED" then
local GUID = select(8, CombatLogGetCurrentEventInfo())
if allstates[GUID] and allstates[GUID].expirationTime and not allstates[GUID].interrupted then
local rem = allstates[GUID].expirationTime - GetTime()
local maxrem = allstates[GUID].expirationTime - allstates[GUID].showTime
allstates[GUID].changed = true
allstates[GUID].show = true
allstates[GUID].progressType = "static"
allstates[GUID].value = rem
allstates[GUID].total = maxrem
allstates[GUID].interrupted = true
allstates[GUID].timer = C_Timer.NewTimer(1, function() WeakAuras.ScanEvents("REMOVE_GUID", GUID) end)
return true
end
end
elseif e == "REMOVE_GUID" then
local GUID = select(1, ...)
if allstates[GUID] then
allstates[GUID].show = false
allstates[GUID].changed = true
return true
end
elseif e == "NAME_PLATE_UNIT_ADDED" then
local u = select(1, ...)
if u then
local GUID = UnitGUID(u)
if allstates[GUID] then
local LCG = LibStub("LibCustomGlow-1.0")
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
LCG.PixelGlow_Start(nameplate, {1, 1, 0, 1}, 100, 0, 200, 4, 0, -4)
end
end
elseif e == "NAME_PLATE_UNIT_REMOVED" then
local u = select(1, ...)
if u then
local GUID = UnitGUID(u)
local LCG = LibStub("LibCustomGlow-1.0")
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
LCG.PixelGlow_Stop(nameplate)
end
end
end
--ON SHOW
local LCG = LibStub("LibCustomGlow-1.0")
local font, size, flags = aura_env.region.text:GetFont()
PlaySoundFile("Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg", "Master")
if not aura_env.region.text then
local text = aura_env.region:CreateFontString(nil, "OVERLAY")
aura_env.region.text = text
end
aura_env.region.text:SetFont(font, size, flags)
aura_env.region.text:SetTextColor(1,1,1,1)
aura_env.region.text:ClearAllPoints()
aura_env.region.text:SetPoint("CENTER", aura_env.region, "CENTER")
aura_env.region.text:SetJustifyH("CENTER")
aura_env.region.text:SetJustifyV("CENTER")
local output = aura_env.state.ins
if aura_env.state.target then output = output .. " > " .. aura_env.state.target end
aura_env.region.text:SetText(output)
aura_env.region.text:Show()
local aura_env = aura_env
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit, true)
LCG.PixelGlow_Start(nameplate, {1, 1, 0, 1}, 100, 0, 200, 4, 0, -4)
local GUID = aura_env.state.GUID
--ON HIDE
local LCG = LibStub("LibCustomGlow-1.0")
local nameplate = C_NamePlate.GetNamePlateForUnit(aura_env.state.unit, true)
if nameplate then
LCG.PixelGlow_Stop(nameplate)
end
--ANIMATION
function()
if aura_env.state and aura_env.state.interrupted then return 0, 1, 0, 1 end
end
--INIT
aura_env.spells = {
-- ["Vivify"] =
-- {
-- ["ID"] = 116670,
-- ["ins"] = "Test",
-- },
["Brutal Backhand"] =
{
["ID"] = 257426,
["ins"] = "Brutal Backhand - Sidestep",
},
["Shattering Toss"] =
{
["ID"] = 274860,
["ins"] = "Shattering Toss - Brace"
},
["Suppression Slam"] =
{
["ID"] = 270003,
["ins"] = "Suppression Slam - Sidestep"
},
["Axe Barrage"] =
{
["ID"] = 270084,
["ins"] = "Axe Barrage - Stun"
},
["Poison Barrage"] =
{
["ID"] = 270507,
["ins"] = "Poison Barrage - Move with"
},
["Slobber Knocker"] =
{
["ID"] = 256627,
["ins"] = "Slobber Knocker - Sidestep"
},
["Heavy Slash"] =
{
["ID"] = 257292,
["ins"] = "Heavy Slash - Sidestep"
},
["Singing Steel"] =
{
["ID"] = 256709,
["ins"] = "Singing Steel - Sidestep"
},
["Crimson Swipe"] =
{
["ID"] = 268230,
["ins"] = "Crimson Swipe - Sidestep"
},
["Tail Thrash"] =
{
["ID"] = 265910,
["ins"] = "Tail Thrash - Mitigation"
},
["Debilitating Backhand"] =
{
["ID"] = 266237,
["ins"] = "Debilitating Backhand - Sidestep"
},
["Poison Nova"] =
{
["ID"] = 267273,
["ins"] = "Poison Nova - Interrupt"
},
["Blade Combo"] =
{
["ID"] = 268586,
["ins"] = "Blade Combo - Mitigation"
},
["Clear the Deck"] =
{
["ID"] = 269029,
["ins"] = "Clear the Deck - Sidestep"
},
["Viscous Slobber"] =
{
["ID"] = 272827,
["ins"] = "Viscous Slobber - Place out of group"
},
["Crashing Tide"] =
{
["ID"] = 261563,
["ins"] = "Crashing Tide - Face to wall"
},
["Noxious Breath"] =
{
["ID"] = 272657,
["ins"] = "Noxious Breath - Sidestep"
},
["Dust Cloud"] =
{
["ID"] = 268705,
["ins"] = "Dust Cloud - Move enemies"
},
["Shocking Claw"] =
{
["ID"] = 257337,
["ins"] = "Shocking Claw - Sidestep"
},
["Power Through"] =
{
["ID"] = 268415,
["ins"] = "Power Through - Face away"
},
["Cover"] =
{
["ID"] = 263275,
["ins"] = "Cover - Move enemies"
},
["Desperate Measures"] =
{
["ID"] = 263601,
["ins"] = "Desperate Measures - Mitigation"
},
["Blowtorch"] =
{
["ID"] = 263103,
["ins"] = "Blowtorch - Face away"
},
["Echo Blade"] =
{
["ID"] = 268846,
["ins"] = "Echo Blade - Face away"
},
["Charged Shot"] =
{
["ID"] = 269429,
["ins"] = "Charged Shot - Mitigation"
},
["Shockwave"] =
{
["ID"] = 272457,
["ins"] = "Shockwave - Mitigation"
},
["Maddening Gaze"] =
{
["ID"] = 272609,
["ins"] = "Maddening Gaze - Sidestep"
},
["Suppression Fire"] =
{
["ID"] = 258864,
["ins"] = "Suppression Fire - Face away"
},
["Shadow Cleave"] =
{
["ID"] = 265372,
["ins"] = "Shadow Cleave - Face away"
},
["Thorned Barrage"] =
{
["ID"] = 265760,
["ins"] = "Thorned Barrage - Mitigation"
},
["Crush"] =
{
["ID"] = 260508,
["ins"] = "Crush - Mitigation"
},
["Marking Cleave"] =
{
["ID"] = 263905,
["ins"] = "Marking Cleave - Sidestep"
},
["Warding Candles"] =
{
["ID"] = 263961,
["ins"] = "Warding Candles - Move enemies"
},
["Tectonic Smash"] =
{
["ID"] = 275907,
["ins"] = "Tectonic Smash - Sidestep"
},
["Heaving Blow"] =
{
["ID"] = 276268,
["ins"] = "Heaving Blow - Sidestep"
},
["Hindering Cleave"] =
{
["ID"] = 267899,
["ins"] = "Hindering Cleave - Sidestep"
},
["Mental Assault"] =
{
["ID"] = 268391,
["ins"] = "Mental Assault - Sidestep"
},
["Rotten Bile"] =
{
["ID"] = 265540,
["ins"] = "Rotten Bile - MOVE CUNT"
},
["Blade Barrage"] =
{
["ID"] = 257870,
["ins"] = "Blade Barrage - Mitigation"
},
["Skewer"] =
{
["ID"] = 249919,
["ins"] = "Skewer - Mitigation"
},
["Heavy Slash"] =
{
["ID"] = 257292,
["ins"] = "Heavy Slash - Sidestep"
},
["Broadside"] =
{
["ID"] = 268260,
["ins"] = "Broadside - Sidestep"
},
["Crushing Slam"] =
{
["ID"] = 272711,
["ins"] = "Crushing Slam - Sidestep"
},
["Slam"] =
{
["ID"] = 269266,
["ins"] = "Slam - Sidestep"
},
["Energy Lash"] =
{
["ID"] = 262794,
["ins"] = "Energy Lash - Reflect"
},
["Grasping Hex"] =
{
["ID"] = 300436,
["ins"] = "Grasping Hex - Interrupt",
},
["Stoneskin"] =
{
["ID"] = 300514,
["ins"] = "Stoneskin - Interrupt",
},
["Shockwave"] =
{
["ID"] = 300424,
["ins"] = "Shockwave - Sidestep",
},
["Charged Smash"] =
{
["ID"] = 297254,
["ins"] = "Charged Smash - Stack on tank",
},
["Rapid Fire"] =
{
["ID"] = 301667,
["ins"] = "Rapid Fire - Sidestep",
},
["Enlarge"] =
{
["ID"] = 301629,
["ins"] = "Enlarge - Interrupt",
},
["Shrink"] =
{
["ID"] = 284219,
["ins"] = "Shrink - Interrupt",
},
["Wreck"] =
{
["ID"] = 302279,
["ins"] = "Wreck - Mitigation",
},
["Pedal to the Metal"] =
{
["ID"] = 299164,
["ins"] = "Pedal to the Metal - Sidestep",
},
["Burnout"] =
{
["ID"] = 298571,
["ins"] = "Burnout - move from smoke",
},
["Bolt Buster"] =
{
["ID"] = 298940,
["ins"] = "Bolt Buster - Sidestep",
},
["Mega Taze"] =
{
["ID"] = 298718,
["ins"] = "Mega Taze - Run into smoke",
},
["Slimewave"] =
{
["ID"] = 300777,
["ins"] = "Slimewave - Sidestep",
},
["Toxic Wave"] =
{
["ID"] = 297834,
["ins"] = "Toxic Wave - Run to robot",
},
["Disassembling Protocol"] =
{
["ID"] = 301990,
["ins"] = "Disassembling Protocol - Mitigation",
},
["Gyro-Scrap"] =
{
["ID"] = 300159,
["ins"] = "Gyro-Scrap - Run away",
},
["Exhaust"] =
{
["ID"] = 300177,
["ins"] = "Exhaust - Move from smoke",
},
["Repair Protocol"] =
{
["ID"] = 300171,
["ins"] = "Repair Protocol - Interrupt",
},
["Shield Bash"] =
{
["ID"] = 273185,
["ins"] = "Shield Bash - Mitigation",
},
["Overclock"] =
{
["ID"] = 299588,
["ins"] = "Overclock - Interrupt",
},
["Repair"] =
{
["ID"] = 300087,
["ins"] = "Repair - Interrupt",
},
["Scrap Cannon"] =
{
["ID"] = 300188,
["ins"] = "Scrap Cannon - Sidestep",
},
["Detonate"] =
{
["ID"] = 301088,
["ins"] = "Detonate - Interrupt",
},
["Whirling Edge"] =
{
["ID"] = 285020,
["ins"] = "Whirling Edge - Run away",
},
["Maximum Thrust"] =
{
["ID"] = 283421,
["ins"] = "Maximum Thrust - Sidestep",
},
["Process Waste"] =
{
["ID"] = 294290,
["ins"] = "Process Waste - Sidestep",
},
["Venting Flames"] =
{
["ID"] = 291946,
["ins"] = "Venting Flames - Go behind cool cube",
},
["Capacitor Discharge"] =
{
["ID"] = 295169,
["ins"] = "Capacitor Discharge - Run to free floor",
},
["Tune-Up"] =
{
["ID"] = 293729,
["ins"] = "Tune-Up - Interrupt",
},
["Sonic Pulse"] =
{
["ID"] = 293986,
["ins"] = "Sonic Pulse - Sidestep",
},
["Skullcracker"] =
{
["ID"] = 300296,
["ins"] = "Skullcracker - Mitigation",
},
["Coalesce"] =
{
["ID"] = 297835,
["ins"] = "Coalesce - Run to robot",
},
["Maximum Thrust"] =
{
["ID"] = 283421,
["ins"] = "Maximum Thrust - Sidestep",
},
["Vent Jets"] =
{
["ID"] = 285388,
["ins"] = "Vent Jets - Run Away",
},
["Giga-Zap"] =
{
["ID"] = 291939,
["ins"] = "Giga-Zap - Face Away",
},
["Rock Lance"] =
{
["ID"] = 263202,
["ins"] = "Rock Lance - Send Help",
},
["Azerite Heartseeker"] =
{
["ID"] = 262513,
["ins"] = "Azerite Heartseeker - Help",
},
["Savage Cleave"] =
{
["ID"] = 265019,
["ins"] = "Savage Cleave - Sidestep",
},
["Decaying Mind"] =
{
["ID"] = 278961,
["ins"] = "Decaying Mind - Interrupt",
},
["Short Out"] =
{
["ID"] = 297128,
["ins"] = "Short Out - Run to bubble",
},
["Cyclone Strike"] =
{
["ID"] = 263573,
["ins"] = "Cyclone Strike - Sidestep",
},
["Power Shot"] =
{
["ID"] = 264574,
["ins"] = "Power Shot - Sidestep",
},
["Overflow"] =
{
["ID"] = 295346,
["ins"] = "Overflow - Run cunt",
},
["Crushing Reverberation"] =
{
["ID"] = 295332,
["ins"] = "Crushing Reverberation - Stack on tank cunt",
},
["Overwhelming Barrage"] =
{
["ID"] = 295138,
["ins"] = "Overwhelming Barrage - Dodge cunt",
},
["Frostshock Bolts"] =
{
["ID"] = 295601,
["ins"] = "Frostshock Bolts - Dodge cunt",
},
["Inversion"] =
{
["ID"] = 295791,
["ins"] = "Inversion - Spread cunt",
},
["Bioluminescent Cloud"] =
{
["ID"] = 292205,
["ins"] = "Bioluminescent Cloud - Get glowing cunt",
},
["Shock Pulse"] =
{
["ID"] = 292279,
["ins"] = "Shock Pulse - Run cunt",
},
["Arcane Bomb"] =
{
["ID"] = 296746,
["ins"] = "Arcane Bomb - Run cunt",
},
["Gale Buffet"] =
{
["ID"] = 296701,
["ins"] = "Gale Buffet - Run to stormy cunt",
},
["Arcanado Burst"] =
{
["ID"] = 296701,
["ins"] = "Arcanado Burst - Tornados cunt",
},
["Coral Growth"] =
{
["ID"] = 296555,
["ins"] = "Coral Growth - Run cunt",
},
["Briny Bubble"] =
{
["ID"] = 297333,
["ins"] = "Briny Bubble - Help cunt-s",
},
["Rippling Wave"] =
{
["ID"] = 296688,
["ins"] = "Rippling Wave - Soak - s l o w l y - cunt",
},
["Arcing Azerite"] =
{
["ID"] = 296944,
["ins"] = "Arcing Azerite - Destroy Corals cunt",
},
["Conductive Pulse"] =
{
["ID"] = 295822,
["ins"] = "Conductive Pulse - Interrupt cunt",
},
["Frenetic Charge"] =
{
["ID"] = 299914,
["ins"] = "Frenetic Charge - Soak cunt",
},
["Zealous Eruption"] =
{
["ID"] = 301807,
["ins"] = "Zealous Eruption - Run to safe boss cunt",
},
["Fanatical Verdict"] =
{
["ID"] = 296850,
["ins"] = "Fanatical Verdict - Spread cunt",
},
["Potent Spark"] =
{
["ID"] = 301947,
["ins"] = "Potent Spark - Botanist orbs cunt",
},
["Violent Outburst"] =
{
["ID"] = 297325,
["ins"] = "Violent Outburst - Run cunt",
},
}
aura_env.classColor = function(class)
if class == "Death Knight" then return "|cFFC41F3B" elseif
class == "Demon Hunter" then return "|cFFA330C9" elseif
class == "Druid" then return "|cFFFF7D0A" elseif
class == "Hunter" then return "|cFFABD473" elseif
class == "Mage" then return "|cFF40C7EB" elseif
class == "Monk" then return "|cFF00FF96" elseif
class == "Paladin" then return "|cFFF58CBA" elseif
class == "Priest" then return "|cFFFFFFFF" elseif
class == "Rogue" then return "|cFFFFF569" elseif
class == "Shaman" then return "|cFF0070DE" elseif
class == "Warlock" then return "|cFF8787ED" elseif
class == "Warrior" then return "|cFFC79C6E" else
return "|cFFFFFFFF" end
end

View File

@@ -0,0 +1,69 @@
--COMBAT_LOG_EVENT_UNFILTERED GROUP_ROSTER_UPDATE UNTRIGGER
function(e, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then --CLEU
if not aura_env.tank then aura_env.tank = "" end
local se = select(2, ...)
if se == "SPELL_AURA_APPLIED" then
local type = select(15, ...)
if type == "DEBUFF" then
local caster = select(5, ...)
local target = select(9, ...)
local name = select(13, ...)
--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
--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))
if stacks > aura_env.auras[name] then
--If I have too many stacks and I am tanking then -- other taunts
if target == UnitName("player") and select(1, UnitDetailedThreatSituation("player", "target")) then
aura_env.returnName = "DEBIL TAUNT"
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
elseif target == aura_env.tank and select(1, UnitDetailedThreatSituation(target, "target")) then
aura_env.returnName = "TAUNT DEBIL"
aura_env.region:Color(0.5660, 0.1588, 0.2752, 1)
end
if aura_env.timer then aura_env.timer:Cancel() end
aura_env.timer = C_Timer.NewTimer(dur, function() WeakAuras.ScanEvents("UNTRIGGER") end)
return true
end
end
end
end
elseif e == "GROUP_ROSTER_UPDATE" then --Find other tank
if IsInRaid() then
for i = 1, GetNumGroupMembers() do
if UnitGroupRolesAssigned("raid" .. i) == "TANK" and UnitName("raid" .. i) ~= UnitName("player") then
aura_env.tank = UnitName("raid" .. i)
end
end
end
elseif e == "UNTRIGGER" then
return false
end
end
--NAME INFO
function()
return aura_env.returnName
end
--INIT
aura_env.UnitDebuffC = function(unit, spell)
for i = 1, 40 do
local name = UnitDebuff(unit, i)
if name then
if name == spell then
return UnitDebuff(unit, i)
end
else
return nil
end
end
end
aura_env.auras =
{
["Rimefrost"] = 5,
["Septic Taint"] = 5,
}

View File

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

View File

@@ -0,0 +1,62 @@
--COMBAT_LOG_EVENT_UNFILTERED UPDATE_TAUNT_GOD
function(...)
local e = select(1, ...)
if e == "COMBAT_LOG_EVENT_UNFILTERED" then
local spellName = select(14, ...)
if (spellName == "Taunt"
or spellName == "Provoke"
or spellName == "Dark Command"
or spellName == "Torment"
or spellName == "Hand of Reckoning"
or spellName == "Growl")
and subEvent == "SPELL_CAST_SUCCESS" then
local target = select(10, ...)
local source = select(6, ...)
local subEvent = select(3, ...)
aura_env.spellName = spellName
aura_env.caster = source
aura_env.target = target
aura_env.cast_time = GetTime()
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)
return true
else
return false
end
end
elseif e == "UPDATE_TAUNT_GOD" then
return true
end
end
--DISPLAY
function()
if aura_env.caster then
local source_class = UnitClass(aura_env.caster)
local source_class_color = "|cFFFFFFFF"
local time_color = "|cFFFFFFFF"
local target_color = "|cFFFFFFFF"
if aura_env.spellName == "Taunt"
or aura_env.spellName == "Provoke"
or aura_env.spellName == "Hand of Reckoning"
or aura_env.spellName == "Dark Command"
or aura_env.spellName == "Torment"
or aura_env.spellName == "Growl"
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 source_class == "Death Knight" then source_class_color = "|cFFC41F3B"
elseif source_class == "Demon Hunter" then source_class_color = "|cFFA330C9"
elseif source_class == "Druid" then source_class_color = "|cFFFF7D0A"
elseif source_class == "Hunter" then source_class_color = "|cFFABD473"
elseif source_class == "Mage" then source_class_color = "|cFF40C7EB"
elseif source_class == "Monk" then source_class_color = "|cFF00FF96"
elseif source_class == "Paladin" then source_class_color = "|cFFF58CBA"
elseif source_class == "Priest" then source_class_color = "|cFFFFFFFF"
elseif source_class == "Rogue" then source_class_color = "|cFFFFF569"
elseif source_class == "Shaman" then source_class_color = "|cFF0070DE"
elseif source_class == "Warlock" then source_class_color = "|cFF8787ED"
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
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

View File

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

View File

@@ -0,0 +1,33 @@
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED PLAYER_REGEN_DISABLED PLAYER_TARGET_CHANGED
function(e, u)
--local mname = "Armored Vaultbot"
local mname = "Sickly Saurid"
local LCG = LibStub("LibCustomGlow-1.0")
if e == "NAME_PLATE_UNIT_ADDED" then
local name = UnitName(u)
if name == mname then
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)
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
end
elseif e == "NAME_PLATE_UNIT_REMOVED" then
local name = UnitName(u)
if name == mname then
if aura_env.ticker then
aura_env.ticker:Cancel()
aura_env.ticker = nil
end
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
LCG.PixelGlow_Stop()
end
elseif e == "PLAYER_REGEN_DISABLED" and aura_env.ticker then
aura_env.ticker:Cancel()
aura_env.ticker = nil
elseif e == "PLAYER_TARGET_CHANGED" and aura_env.ticker then
if UnitName("target") == mname then
aura_env.ticker:Cancel()
aura_env.ticker = nil
end
end
end

View File

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

View File

@@ -0,0 +1 @@
UNIT_POWER_FREQUENT:player UNIT_SPELLCAST_START:player UNIT_SPELLCAST_STOP:player UNIT_DISPLAYPOWER:player UNIT_MAXPOWER:player LOAD

View File

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

View File

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

View File

@@ -0,0 +1 @@
/script ChatFrame1:AddMessage("frame name: " .. GetMouseFocus():GetName())