Move newage submodule to .
This commit is contained in:
1
NewAge
1
NewAge
Submodule NewAge deleted from b3e312b058
19
NewAge/AHBot/AUCTION_HOUSE_BROWSE_RESULTS_UPDATED.lua
Normal file
19
NewAge/AHBot/AUCTION_HOUSE_BROWSE_RESULTS_UPDATED.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
function()
|
||||||
|
results = C_AuctionHouse.GetBrowseResults()
|
||||||
|
-- DevTools_Dump(results)
|
||||||
|
for k,v in ipairs(results) do
|
||||||
|
local itemID = v.itemKey.itemID
|
||||||
|
local itemName = GetItemInfo(itemID)
|
||||||
|
if aura_env.sellPriceThresholds[itemID] then
|
||||||
|
if v.minPrice > aura_env.sellPriceThresholds[itemID] then
|
||||||
|
print(itemName, "too expensive")
|
||||||
|
SendChatMessage("POKE", "WHISPER", nil, UnitName("player"))
|
||||||
|
end
|
||||||
|
elseif aura_env.buyPriceThresholds[itemID] then
|
||||||
|
if v.minPrice < aura_env.buyPriceThresholds[itemID] then
|
||||||
|
print(itemName, "too cheap")
|
||||||
|
SendChatMessage("POKE", "WHISPER", nil, UnitName("player"))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
6
NewAge/AHBot/EveryFrameThrottled.lua
Normal file
6
NewAge/AHBot/EveryFrameThrottled.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
function()
|
||||||
|
if not aura_env.last or aura_env.last < GetTime() - aura_env.throttleTime then
|
||||||
|
aura_env.last = GetTime()
|
||||||
|
AuctionHouseFrame.SearchBar.FavoritesSearchButton:Click()
|
||||||
|
end
|
||||||
|
end
|
17
NewAge/AHBot/INIT.lua
Normal file
17
NewAge/AHBot/INIT.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
aura_env.throttleTime = 10
|
||||||
|
|
||||||
|
aura_env.sellPriceThresholds = {
|
||||||
|
[168446] = 5000 * 100 * 100, -- Accord of Critical Strike
|
||||||
|
[168447] = 5000 * 100 * 100, -- Accord of Haste
|
||||||
|
[168448] = 5000 * 100 * 100, -- Accord of Mastery
|
||||||
|
[168449] = 5000 * 100 * 100, -- Accord of Versatility
|
||||||
|
[168592] = 4500 * 100 * 100, -- Oceanic Restoration
|
||||||
|
[168496] = 4500 * 100 * 100, -- Force Multiplier
|
||||||
|
[168593] = 4500 * 100 * 100, -- Machinist's Brilliance
|
||||||
|
[168598] = 4500 * 100 * 100, -- Naga Hide
|
||||||
|
}
|
||||||
|
|
||||||
|
aura_env.buyPriceThresholds = {
|
||||||
|
[152576] = 5 * 100 * 100, -- Tidesrpay Linen
|
||||||
|
[152877] = 500 * 100 * 100, -- Veiled Crystal
|
||||||
|
}
|
3
NewAge/AHBot/Info.txt
Normal file
3
NewAge/AHBot/Info.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
/run AuctionHouseFrame.SearchBar.FavoritesSearchButton:Click()
|
||||||
|
|
||||||
|
/dump C_AuctionHouse.GetBrowseResults()
|
205
NewAge/Automation/Eventz.lua
Normal file
205
NewAge/Automation/Eventz.lua
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
--- LOOT_READY LOOT_OPENED 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" or e == "LOOT_OPENED" 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 aura_env.filter[1] == true and (v.item:match("%d+ Gold") or v.item:match("%d+ Silver") or v.item:match("%d+ Copper")) then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[2] == true and link:match("Azerite") then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[3] == true and v.item:match("War Resources") then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[4] == true and v.item:match("Residuum") then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[5] == true and v.item:match("Manapearl") then
|
||||||
|
LootSlot(slot)
|
||||||
|
end
|
||||||
|
if link then
|
||||||
|
local icon = v.texture
|
||||||
|
local id = link:match("item:(%d+):")
|
||||||
|
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 aura_env.filter[6] == true and (select(7, GetItemInfo(link)) or 0) == "Mount" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[7] == true and ilvl > aura_env.ilvlFilter then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[8] == true and (select(7, GetItemInfo(link)) or 0) == "Herb" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[9] == true and (select(7, GetItemInfo(link)) or 0) == "Cooking" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[10] == true and (select(7, GetItemInfo(link)) or 0) == "Cloth" and type == "Tradeskill" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[11] == true and (select(7, GetItemInfo(link)) or 0) == "Metal & Stone" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[12] == true and (select(11, GetItemInfo(link)) or 0) > aura_env.goldFilter and v.quality == 0 then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[13] == true and v.quality > 1 and v.quality < 4 and type ~= "Weapon" and type ~= "Armor" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[14] == true and v.isQuestItem == true then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[15] == true and v.quality == 0 then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[16] == true and aura_env.whitelist[v.item] then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[17] == true and type == "Quest" and subtype == "Quest" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[21] == true and type == "Tradeskill" and subtype == "Elemental" then
|
||||||
|
LootSlot(slot)
|
||||||
|
else
|
||||||
|
if type == "Weapon" or type == "Armor" then
|
||||||
|
if aura_env.filter[18] == true and aura_env.skills[select(3, UnitClass("player"))][subtype] == 1 and v.quality > 2 then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[19] == true and (equip == "INVTYPE_FINGER" or equip == "INVTYPE_TRINKET" or equip == "INVTYPE_CLOAK" or equip == "INVTYPE_NECK") and v.quality > 2 then
|
||||||
|
LootSlot(slot)
|
||||||
|
end
|
||||||
|
elseif aura_env.filter[20] == true and type == "Miscellaneous" then
|
||||||
|
if subtype == "Mount" then
|
||||||
|
LootSlot(slot)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
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 " .. eilvl - ilvl .. " 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 " .. eilvl1 - ilvl .. " ilvl difference from " .. elink1)
|
||||||
|
UseContainerItem(i, j)
|
||||||
|
elseif eilvl2 > ilvl + 5 then
|
||||||
|
print("Scrapping " .. link .. " over " .. eilvl2 - ilvl .. " 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
|
||||||
|
if aura_env.throttleSell == true then
|
||||||
|
aura_env.toSell[#aura_env.toSell + 1] = {["c"] = c, ["s"] = s}
|
||||||
|
else
|
||||||
|
UseContainerItem(c, s)
|
||||||
|
end
|
||||||
|
elseif (type == "Armor" or type == "Weapon") and ilvl < 200 then
|
||||||
|
if aura_env.throttleSell == true then
|
||||||
|
aura_env.toSell[#aura_env.toSell + 1] = {["c"] = c, ["s"] = s}
|
||||||
|
else
|
||||||
|
UseContainerItem(c, s)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if aura_env.throttleSell == true then
|
||||||
|
aura_env.ticker = C_Timer.NewTicker(0.05, 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)
|
||||||
|
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
|
394
NewAge/Automation/INIT.lua
Normal file
394
NewAge/Automation/INIT.lua
Normal file
@@ -0,0 +1,394 @@
|
|||||||
|
aura_env.debug = true
|
||||||
|
aura_env.filter = {
|
||||||
|
[1] = true, --Gold
|
||||||
|
[2] = true, --Azerite
|
||||||
|
[3] = true, --War resources
|
||||||
|
[4] = true, --Residuum
|
||||||
|
[5] = true, --Manapearls
|
||||||
|
[6] = true, --Mounts
|
||||||
|
[7] = true, --High ilvl
|
||||||
|
[8] = false, --Herbs
|
||||||
|
[9] = true, --Cooking
|
||||||
|
[10] = true, --Cloth
|
||||||
|
[11] = false, --Metal & Stone
|
||||||
|
[12] = true, --Gold filter greys
|
||||||
|
[13] = true, -- >1 && <4 quality items, no gear
|
||||||
|
[14] = true, --Quest items
|
||||||
|
[15] = true, --All greys
|
||||||
|
[16] = true, --Whitelist
|
||||||
|
[17] = true, --Quest items (different filter)
|
||||||
|
[18] = true, --Class aproperiate >2 items
|
||||||
|
[19] = true, --Jewelery >2 quality
|
||||||
|
[20] = true, --Additional mount filter
|
||||||
|
[21] = true, --Tradeskill // Elemental
|
||||||
|
}
|
||||||
|
aura_env.ilvlFilter = 200
|
||||||
|
aura_env.goldFilter = 0.5
|
||||||
|
aura_env.goldFilter = aura_env.goldFilter * 10000
|
||||||
|
aura_env.throttleSell = false
|
||||||
|
|
||||||
|
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,
|
||||||
|
|
||||||
|
["Gloom Dust"] = 1,
|
||||||
|
["Veiled Crytal"] = 1,
|
||||||
|
["Coalescing Visions"] = 1,
|
||||||
|
["Echoes of Ny'alotha"] = 1,
|
||||||
|
["Corrupted Mementos"] = 1,
|
||||||
|
|
||||||
|
["Blood of Sargeras"] = 1,
|
||||||
|
["Primal Sargerite"] = 1,
|
||||||
|
|
||||||
|
["Chain Ignitercoil"] = 1,
|
||||||
|
["Galvanic Oscillator"] = 1,
|
||||||
|
["Corrupted Memento"] = 1,
|
||||||
|
}
|
||||||
|
aura_env.sellWhitelist = {
|
||||||
|
["Blacksmith Hammer"] = 1,
|
||||||
|
["Endless Tincture of Renewed Combat"] = 1,
|
||||||
|
["Mr. Munchykins"] = 1,
|
||||||
|
["Arclight Spanner"] = 1,
|
||||||
|
["Runeblade of Baron Rivendare"] = 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,
|
||||||
|
},
|
||||||
|
}
|
69
NewAge/Automation/LOOT_READY.lua
Normal file
69
NewAge/Automation/LOOT_READY.lua
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
-- LOOT_READY LOOT_OPENED
|
||||||
|
|
||||||
|
function(e, ...)
|
||||||
|
local slot = 1
|
||||||
|
local lootinfo = GetLootInfo()
|
||||||
|
for k, v in pairs(lootinfo) do
|
||||||
|
if v.locked == false then
|
||||||
|
local link = GetLootSlotLink(slot)
|
||||||
|
if not link then link = GetLootSlotLink(slot) end
|
||||||
|
if aura_env.filter[1] == true and (v.item:match("%d+ Gold") or v.item:match("%d+ Silver") or v.item:match("%d+ Copper")) then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[2] == true and link:match("Azerite") then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[3] == true and v.item:match("War Resources") then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[4] == true and v.item:match("Residuum") then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[5] == true and v.item:match("Manapearl") then
|
||||||
|
LootSlot(slot)
|
||||||
|
end
|
||||||
|
if link then
|
||||||
|
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 aura_env.filter[6] == true and (select(7, GetItemInfo(link)) or 0) == "Mount" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[7] == true and ilvl > aura_env.ilvlFilter then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[8] == true and (select(7, GetItemInfo(link)) or 0) == "Herb" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[9] == true and (select(7, GetItemInfo(link)) or 0) == "Cooking" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[10] == true and (select(7, GetItemInfo(link)) or 0) == "Cloth" and type == "Tradeskill" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[11] == true and (select(7, GetItemInfo(link)) or 0) == "Metal & Stone" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[12] == true and (select(11, GetItemInfo(link)) or 0) > aura_env.goldFilter and v.quality == 0 then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[13] == true and v.quality > 1 and v.quality < 4 and type ~= "Weapon" and type ~= "Armor" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[14] == true and v.isQuestItem == true then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[15] == true and v.quality == 0 then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[16] == true and aura_env.whitelist[v.item] then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[17] == true and type == "Quest" and subtype == "Quest" then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[21] == true and type == "Tradeskill" and subtype == "Elemental" then
|
||||||
|
LootSlot(slot)
|
||||||
|
else
|
||||||
|
if type == "Weapon" or type == "Armor" then
|
||||||
|
if aura_env.filter[18] == true and aura_env.skills[select(3, UnitClass("player"))][subtype] == 1 and v.quality > 2 then
|
||||||
|
LootSlot(slot)
|
||||||
|
elseif aura_env.filter[19] == true and (equip == "INVTYPE_FINGER" or equip == "INVTYPE_TRINKET" or equip == "INVTYPE_CLOAK" or equip == "INVTYPE_NECK") and v.quality > 2 then
|
||||||
|
LootSlot(slot)
|
||||||
|
end
|
||||||
|
elseif aura_env.filter[20] == true and type == "Miscellaneous" then
|
||||||
|
if subtype == "Mount" then
|
||||||
|
LootSlot(slot)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
slot = slot + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
20
NewAge/CataAuraBar/CustomOptions.lua
Normal file
20
NewAge/CataAuraBar/CustomOptions.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
IsOnCooldown = {
|
||||||
|
type = "bool",
|
||||||
|
test = function(state, needle)
|
||||||
|
return state.IsOnCooldown == (needle == 1)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
IsActive = {
|
||||||
|
type = "bool",
|
||||||
|
test = function(state, needle)
|
||||||
|
return state.IsActive == (needle == 1)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
IsDebuff = {
|
||||||
|
type = "bool",
|
||||||
|
test = function(state, needle)
|
||||||
|
return state.IsBad == (needle == 1)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
11
NewAge/CataAuraBar/CustomText.lua
Normal file
11
NewAge/CataAuraBar/CustomText.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function()
|
||||||
|
if aura_env.statee.pname then
|
||||||
|
output = ""
|
||||||
|
if aura_env.statee.pclass then
|
||||||
|
output = aura_env.GetClassColor(aura_env.statee.pclass) .. aura_env.statee.pname .. "\124r"
|
||||||
|
else
|
||||||
|
output = aura_env.statee.pname
|
||||||
|
end
|
||||||
|
return output
|
||||||
|
end
|
||||||
|
end
|
1
NewAge/CataAuraBar/Export
Normal file
1
NewAge/CataAuraBar/Export
Normal file
File diff suppressed because one or more lines are too long
294
NewAge/CataAuraBar/INIT.lua
Normal file
294
NewAge/CataAuraBar/INIT.lua
Normal file
@@ -0,0 +1,294 @@
|
|||||||
|
local function StrSplit(inputString, separator)
|
||||||
|
local outputTable = {}
|
||||||
|
for str in string.gmatch(inputString, "([^" .. separator .. "]+)") do
|
||||||
|
outputTable[#outputTable + 1] = str
|
||||||
|
end
|
||||||
|
return outputTable
|
||||||
|
end
|
||||||
|
|
||||||
|
local function PrintTable(table)
|
||||||
|
for k, v in pairs(table) do
|
||||||
|
print(k .. " " .. v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.GetClassColor = function(class)
|
||||||
|
if class == "Death Knight" then
|
||||||
|
return "\124cFFC41E3A"
|
||||||
|
elseif class == "Druid" then
|
||||||
|
return "\124cFFFF7C0A"
|
||||||
|
elseif class == "Hunter" then
|
||||||
|
return "\124cFFAAD372"
|
||||||
|
elseif class == "Mage" then
|
||||||
|
return "\124cFF3FC7EB"
|
||||||
|
elseif class == "Paladin" then
|
||||||
|
return "\124cFFF48CBA"
|
||||||
|
elseif class == "Priest" then
|
||||||
|
return "\124cFFFFFFFF"
|
||||||
|
elseif class == "Rogue" then
|
||||||
|
return "\124cFFFFF468"
|
||||||
|
elseif class == "Shaman" then
|
||||||
|
return "\124cFF0070DD"
|
||||||
|
elseif class == "Warlock" then
|
||||||
|
return "\124cFF8788EE"
|
||||||
|
elseif class == "Warrior" then
|
||||||
|
return "\124cFFC69B6D"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local Unit = {
|
||||||
|
New = function(self, unit)
|
||||||
|
o = {
|
||||||
|
["unit"] = unit,
|
||||||
|
}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
|
||||||
|
GetAuras = function(self, auraFunc, name, type) return nil end,
|
||||||
|
}
|
||||||
|
local BasicUnit = Unit:New("player")
|
||||||
|
function BasicUnit:GetAuras(auraFunc, name)
|
||||||
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(self.unit, name)
|
||||||
|
if aura ~= nil then
|
||||||
|
return {
|
||||||
|
[UnitName(self.unit)] = {
|
||||||
|
["duration"] = duration,
|
||||||
|
["expirationTime"] = expirationTime,
|
||||||
|
["spellID"] = spellID,
|
||||||
|
["stacks"] = stacks or 1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Maybe implement some sort of throttle to group unit?
|
||||||
|
local GroupUnit = Unit:New("group")
|
||||||
|
function GroupUnit:GetAuras(auraFunc, name)
|
||||||
|
local raidMem = GetNumRaidMembers()
|
||||||
|
local num = GetNumPartyMembers()
|
||||||
|
local unitPrefix = "party"
|
||||||
|
if raidMem > num then
|
||||||
|
unitPrefix = "raid"
|
||||||
|
num = raidMem
|
||||||
|
end
|
||||||
|
auras = {}
|
||||||
|
for i = 1, num do
|
||||||
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(unitPrefix .. i, name)
|
||||||
|
if aura ~= nil then
|
||||||
|
auras[UnitName(unitPrefix .. i)] = {
|
||||||
|
["duration"] = duration,
|
||||||
|
["expirationTime"] = expirationTime,
|
||||||
|
["spellID"] = spellID,
|
||||||
|
["class"] = UnitClass(unitPrefix .. i) or "Paladin",
|
||||||
|
["stacks"] = stacks or 1,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if unitPrefix == "party" then
|
||||||
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", name)
|
||||||
|
if aura ~= nil then
|
||||||
|
auras[UnitName("player")] = {
|
||||||
|
["duration"] = duration,
|
||||||
|
["expirationTime"] = expirationTime,
|
||||||
|
["spellID"] = spellID,
|
||||||
|
["class"] = UnitClass(unitPrefix .. i) or "Paladin",
|
||||||
|
["stacks"] = stacks or 1,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return auras
|
||||||
|
end
|
||||||
|
-- Nameplate does not work, find out why?
|
||||||
|
local NameplateUnit = Unit:New("nameplate")
|
||||||
|
function NameplateUnit:GetAuras(auraFunc, name)
|
||||||
|
local unitPrefix = "nameplate"
|
||||||
|
auras = {}
|
||||||
|
for i = 1, 40 do
|
||||||
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(auraPrefix .. i, name)
|
||||||
|
if aura ~= nil then
|
||||||
|
auras[UnitName(unitPrefix .. i)] = {
|
||||||
|
["duration"] = duration,
|
||||||
|
["expirationTime"] = expirationTime,
|
||||||
|
["spellID"] = spellID,
|
||||||
|
["stacks"] = stacks or 1,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return auras
|
||||||
|
end
|
||||||
|
|
||||||
|
local UnitFactory = {
|
||||||
|
New = function(self)
|
||||||
|
o = {}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
|
||||||
|
CreateUnit = function(self, target)
|
||||||
|
target = string.lower(target)
|
||||||
|
if target == "player" or target == "target" or target == "focus" then
|
||||||
|
return BasicUnit:New(target)
|
||||||
|
elseif target == "group" then
|
||||||
|
return GroupUnit:New(target)
|
||||||
|
elseif target == "nameplate" then
|
||||||
|
return NameplateUnit:New(target)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
local unitFactory = UnitFactory:New()
|
||||||
|
|
||||||
|
local Aura = {
|
||||||
|
New = function(self, entry, index)
|
||||||
|
o = {
|
||||||
|
["name"] = entry.auraName,
|
||||||
|
["unit"] = entry.target,
|
||||||
|
["hasCooldown"] = entry.hasCooldown,
|
||||||
|
["index"] = index,
|
||||||
|
["GetAura"] = entry.GetAura,
|
||||||
|
}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
|
||||||
|
IsActive = function(self)
|
||||||
|
for k, v in pairs(self.unit:GetAuras(self.GetAura, self.name)) do
|
||||||
|
for k2, v2 in pairs(v) do
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
IsOnCooldown = function(self)
|
||||||
|
if not self.hasCooldown then return false end
|
||||||
|
return GetSpellCooldown(self.name) > 0
|
||||||
|
end,
|
||||||
|
|
||||||
|
AddAsAura = function(self, allstates)
|
||||||
|
local auras = self.unit:GetAuras(self.GetAura, self.name)
|
||||||
|
for k, v in pairs(auras) do
|
||||||
|
duration = v.duration
|
||||||
|
expirationTime = v.expirationTime
|
||||||
|
icon = self:GetAuraIcon(v.spellID)
|
||||||
|
allstates[self.name .. k] = {
|
||||||
|
changed = true,
|
||||||
|
show = true,
|
||||||
|
resort = true,
|
||||||
|
progressType = "timed",
|
||||||
|
duration = duration,
|
||||||
|
expirationTime = expirationTime,
|
||||||
|
index = self.index,
|
||||||
|
icon = icon,
|
||||||
|
pname = k,
|
||||||
|
stacks = v.stacks,
|
||||||
|
pclass = v.class,
|
||||||
|
IsOnCooldown = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsBad = self.GetAura == UnitDebuff,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
AddAsCooldown = function(self, allstates)
|
||||||
|
if not self.hasCooldown then return false end
|
||||||
|
startTime, duration = GetSpellCooldown(self.name)
|
||||||
|
icon = self:GetSpellIcon()
|
||||||
|
allstates[self.name] = {
|
||||||
|
changed = true,
|
||||||
|
show = true,
|
||||||
|
resort = true,
|
||||||
|
progressType = "timed",
|
||||||
|
duration = duration,
|
||||||
|
expirationTime = startTime + duration,
|
||||||
|
index = self.index,
|
||||||
|
icon = icon,
|
||||||
|
IsOnCooldown = true,
|
||||||
|
IsActive = false,
|
||||||
|
IsBad = self.GetAura == UnitDebuff,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
AddAsIcon = function(self, allstates)
|
||||||
|
if not self.hasCooldown then return false end
|
||||||
|
icon = self:GetSpellIcon()
|
||||||
|
allstates[self.name] = {
|
||||||
|
changed = true,
|
||||||
|
show = true,
|
||||||
|
resort = true,
|
||||||
|
progressType = "static",
|
||||||
|
value = 1,
|
||||||
|
total = 1,
|
||||||
|
index = self.index,
|
||||||
|
icon = icon,
|
||||||
|
IsOnCooldown = false,
|
||||||
|
IsActive = false,
|
||||||
|
IsBad = self.GetAura == UnitDebuff,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
|
||||||
|
GetSpellIcon = function(self) return select(3, GetSpellInfo(self.name)) end,
|
||||||
|
GetAuraIcon = function(self, spellID) return select(3, GetSpellInfo(spellID)) end,
|
||||||
|
}
|
||||||
|
|
||||||
|
local Entry = {
|
||||||
|
New = function(self, entry)
|
||||||
|
entry = self:TrimWhitespace(entry)
|
||||||
|
|
||||||
|
local entryData = StrSplit(entry, ",")
|
||||||
|
local name = self:ReadEntryData(entryData, 1)
|
||||||
|
local type = self:ReadEntryData(entryData, 2) or "Buff"
|
||||||
|
local target = unitFactory:CreateUnit(self:ReadEntryData(entryData, 3) or "Player")
|
||||||
|
local cooldown = (self:ReadEntryData(entryData, 4) == "0") or false
|
||||||
|
cooldown = not cooldown
|
||||||
|
local GetAura = UnitBuff
|
||||||
|
|
||||||
|
if type == "Debuff" then GetAura = UnitDebuff end
|
||||||
|
|
||||||
|
o = {
|
||||||
|
["entry"] = entry,
|
||||||
|
["auraName"] = name,
|
||||||
|
["GetAura"] = GetAura,
|
||||||
|
["target"] = target,
|
||||||
|
["hasCooldown"] = cooldown,
|
||||||
|
}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
|
||||||
|
ReadEntryData = function(self, entryData, index)
|
||||||
|
local str = entryData[index]
|
||||||
|
if str == nil then return nil end
|
||||||
|
str = self:TrimWhitespace(str)
|
||||||
|
return str
|
||||||
|
end,
|
||||||
|
|
||||||
|
TrimWhitespace = function(self, str)
|
||||||
|
str = str:gsub("^[ ]+", "")
|
||||||
|
str = str:gsub("\n$", "")
|
||||||
|
str = str:gsub("[ ]+$", "")
|
||||||
|
return str
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
aura_env.auras = {}
|
||||||
|
for entry in string.gmatch(aura_env.config.spellList, "([a-zA-Z,0-9 ]+)") do
|
||||||
|
entry = Entry:New(entry)
|
||||||
|
|
||||||
|
auraObj = Aura:New(entry, #aura_env.auras + 1)
|
||||||
|
aura_env.auras[#aura_env.auras + 1] = auraObj
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.HandleEvent = function(allstates)
|
||||||
|
for k, v in ipairs(aura_env.auras) do
|
||||||
|
if v:IsActive() then
|
||||||
|
v:AddAsAura(allstates)
|
||||||
|
elseif v:IsOnCooldown() and not v:IsActive() then
|
||||||
|
v:AddAsCooldown(allstates)
|
||||||
|
elseif not v:IsOnCooldown() and not v:IsActive() then
|
||||||
|
v:AddAsIcon(allstates)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
304
NewAge/CataAuraBar/INIT_BFA.lua
Normal file
304
NewAge/CataAuraBar/INIT_BFA.lua
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
local function StrSplit(inputString, separator)
|
||||||
|
local outputTable = {}
|
||||||
|
for str in string.gmatch(inputString, "([^" .. separator .. "]+)") do
|
||||||
|
outputTable[#outputTable + 1] = str
|
||||||
|
end
|
||||||
|
return outputTable
|
||||||
|
end
|
||||||
|
|
||||||
|
local function PrintTable(table)
|
||||||
|
for k, v in pairs(table) do
|
||||||
|
print(k .. " " .. v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GetAuraIndex(func, unit, name)
|
||||||
|
for i = 1, 40 do
|
||||||
|
local aura = func(unit, i)
|
||||||
|
if aura == "name" then return i end
|
||||||
|
if aura == nil then return 0 end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.GetClassColor = function(class)
|
||||||
|
if class == "Death Knight" then
|
||||||
|
return "\124cFFC41E3A"
|
||||||
|
elseif class == "Druid" then
|
||||||
|
return "\124cFFFF7C0A"
|
||||||
|
elseif class == "Hunter" then
|
||||||
|
return "\124cFFAAD372"
|
||||||
|
elseif class == "Mage" then
|
||||||
|
return "\124cFF3FC7EB"
|
||||||
|
elseif class == "Paladin" then
|
||||||
|
return "\124cFFF48CBA"
|
||||||
|
elseif class == "Priest" then
|
||||||
|
return "\124cFFFFFFFF"
|
||||||
|
elseif class == "Rogue" then
|
||||||
|
return "\124cFFFFF468"
|
||||||
|
elseif class == "Shaman" then
|
||||||
|
return "\124cFF0070DD"
|
||||||
|
elseif class == "Warlock" then
|
||||||
|
return "\124cFF8788EE"
|
||||||
|
elseif class == "Warrior" then
|
||||||
|
return "\124cFFC69B6D"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local Unit = {
|
||||||
|
New = function(self, unit)
|
||||||
|
o = {
|
||||||
|
["unit"] = unit,
|
||||||
|
}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
|
||||||
|
GetAuras = function(self, auraFunc, name, type) return nil end,
|
||||||
|
}
|
||||||
|
local BasicUnit = Unit:New("player")
|
||||||
|
function BasicUnit:GetAuras(auraFunc, name)
|
||||||
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(self.unit, name)
|
||||||
|
if aura ~= nil then
|
||||||
|
return {
|
||||||
|
[UnitName(self.unit)] = {
|
||||||
|
["duration"] = duration,
|
||||||
|
["expirationTime"] = expirationTime,
|
||||||
|
["spellID"] = spellID,
|
||||||
|
["stacks"] = stacks or 1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Maybe implement some sort of throttle to group unit?
|
||||||
|
local GroupUnit = Unit:New("group")
|
||||||
|
function GroupUnit:GetAuras(auraFunc, name)
|
||||||
|
local num = GetNumGroupMembers()
|
||||||
|
local unitPrefix = "party"
|
||||||
|
if IsInRaid() then unitPrefix = "raid" end
|
||||||
|
auras = {}
|
||||||
|
for i = 1, num do
|
||||||
|
-- local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(unitPrefix .. i, name)
|
||||||
|
local auraIndex = GetAuraIndex(auraFunc, unitPrefix .. i, name)
|
||||||
|
if auraIndex > 0 then
|
||||||
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID =
|
||||||
|
auraFunc(unitPrefix .. i, auraIndex)
|
||||||
|
auras[UnitName(unitPrefix .. i)] = {
|
||||||
|
["duration"] = duration,
|
||||||
|
["expirationTime"] = expirationTime,
|
||||||
|
["spellID"] = spellID,
|
||||||
|
["class"] = UnitClass(unitPrefix .. i) or "Paladin",
|
||||||
|
["stacks"] = stacks or 1,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if unitPrefix == "party" then
|
||||||
|
-- local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", name)
|
||||||
|
local auraIndex = GetAuraIndex(auraFunc, "player", name)
|
||||||
|
if auraIndex > 0 then
|
||||||
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", auraIndex)
|
||||||
|
auras[UnitName("player")] = {
|
||||||
|
["duration"] = duration,
|
||||||
|
["expirationTime"] = expirationTime,
|
||||||
|
["spellID"] = spellID,
|
||||||
|
["class"] = UnitClass(unitPrefix .. i) or "Paladin",
|
||||||
|
["stacks"] = stacks or 1,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return auras
|
||||||
|
end
|
||||||
|
-- Nameplate does not work, find out why?
|
||||||
|
local NameplateUnit = Unit:New("nameplate")
|
||||||
|
function NameplateUnit:GetAuras(auraFunc, name)
|
||||||
|
local unitPrefix = "nameplate"
|
||||||
|
auras = {}
|
||||||
|
for i = 1, 40 do
|
||||||
|
-- local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc(unitPrefix .. i, name)
|
||||||
|
local auraIndex = GetAuraIndex(auraFunc, unitPrefix .. i, name)
|
||||||
|
if auraIndex > 0 then
|
||||||
|
local aura, _, _, stacks, _, duration, expirationTime, _, _, _, spellID = auraFunc("player", auraIndex)
|
||||||
|
auras[UnitName(unitPrefix .. i)] = {
|
||||||
|
["duration"] = duration,
|
||||||
|
["expirationTime"] = expirationTime,
|
||||||
|
["spellID"] = spellID,
|
||||||
|
["stacks"] = stacks or 1,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return auras
|
||||||
|
end
|
||||||
|
|
||||||
|
local UnitFactory = {
|
||||||
|
New = function(self)
|
||||||
|
o = {}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
|
||||||
|
CreateUnit = function(self, target)
|
||||||
|
target = string.lower(target)
|
||||||
|
if target == "player" or target == "target" or target == "focus" then
|
||||||
|
return BasicUnit:New(target)
|
||||||
|
elseif target == "group" then
|
||||||
|
return GroupUnit:New(target)
|
||||||
|
elseif target == "nameplate" then
|
||||||
|
return NameplateUnit:New(target)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
local unitFactory = UnitFactory:New()
|
||||||
|
|
||||||
|
local Aura = {
|
||||||
|
New = function(self, entry, index)
|
||||||
|
o = {
|
||||||
|
["name"] = entry.auraName,
|
||||||
|
["unit"] = entry.target,
|
||||||
|
["hasCooldown"] = entry.hasCooldown,
|
||||||
|
["index"] = index,
|
||||||
|
["GetAura"] = entry.GetAura,
|
||||||
|
}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
|
||||||
|
IsActive = function(self)
|
||||||
|
for k, v in pairs(self.unit:GetAuras(self.GetAura, self.name)) do
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
IsOnCooldown = function(self)
|
||||||
|
if not self.hasCooldown then return false end
|
||||||
|
return GetSpellCooldown(self.name) > 0
|
||||||
|
end,
|
||||||
|
|
||||||
|
AddAsAura = function(self, allstates)
|
||||||
|
local auras = self.unit:GetAuras(self.GetAura, self.name)
|
||||||
|
for k, v in pairs(auras) do
|
||||||
|
duration = v.duration
|
||||||
|
expirationTime = v.expirationTime
|
||||||
|
icon = self:GetAuraIcon(v.spellID)
|
||||||
|
allstates[self.name .. k] = {
|
||||||
|
changed = true,
|
||||||
|
show = true,
|
||||||
|
resort = true,
|
||||||
|
progressType = "timed",
|
||||||
|
duration = duration,
|
||||||
|
expirationTime = expirationTime,
|
||||||
|
index = self.index,
|
||||||
|
icon = icon,
|
||||||
|
pname = k,
|
||||||
|
stacks = v.stacks,
|
||||||
|
pclass = v.class,
|
||||||
|
IsOnCooldown = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsBad = self.GetAura == UnitDebuff,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
AddAsCooldown = function(self, allstates)
|
||||||
|
if not self.hasCooldown then return false end
|
||||||
|
startTime, duration = GetSpellCooldown(self.name)
|
||||||
|
icon = self:GetSpellIcon()
|
||||||
|
allstates[self.name] = {
|
||||||
|
changed = true,
|
||||||
|
show = true,
|
||||||
|
resort = true,
|
||||||
|
progressType = "timed",
|
||||||
|
duration = duration,
|
||||||
|
expirationTime = startTime + duration,
|
||||||
|
index = self.index,
|
||||||
|
icon = icon,
|
||||||
|
IsOnCooldown = true,
|
||||||
|
IsActive = false,
|
||||||
|
IsBad = self.GetAura == UnitDebuff,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
AddAsIcon = function(self, allstates)
|
||||||
|
if not self.hasCooldown then return false end
|
||||||
|
icon = self:GetSpellIcon()
|
||||||
|
allstates[self.name] = {
|
||||||
|
changed = true,
|
||||||
|
show = true,
|
||||||
|
resort = true,
|
||||||
|
progressType = "static",
|
||||||
|
value = 1,
|
||||||
|
total = 1,
|
||||||
|
index = self.index,
|
||||||
|
icon = icon,
|
||||||
|
IsOnCooldown = false,
|
||||||
|
IsActive = false,
|
||||||
|
IsBad = self.GetAura == UnitDebuff,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
|
||||||
|
GetSpellIcon = function(self) return select(3, GetSpellInfo(self.name)) end,
|
||||||
|
GetAuraIcon = function(self, spellID) return select(3, GetSpellInfo(spellID)) end,
|
||||||
|
}
|
||||||
|
|
||||||
|
local Entry = {
|
||||||
|
New = function(self, entry)
|
||||||
|
entry = self:TrimWhitespace(entry)
|
||||||
|
|
||||||
|
local entryData = StrSplit(entry, ",")
|
||||||
|
local name = self:ReadEntryData(entryData, 1)
|
||||||
|
local type = self:ReadEntryData(entryData, 2) or "Buff"
|
||||||
|
local target = unitFactory:CreateUnit(self:ReadEntryData(entryData, 3) or "Player")
|
||||||
|
local cooldown = (self:ReadEntryData(entryData, 4) == "0") or false
|
||||||
|
cooldown = not cooldown
|
||||||
|
local GetAura = UnitBuff
|
||||||
|
|
||||||
|
if type == "Debuff" then GetAura = UnitDebuff end
|
||||||
|
|
||||||
|
o = {
|
||||||
|
["entry"] = entry,
|
||||||
|
["auraName"] = name,
|
||||||
|
["GetAura"] = GetAura,
|
||||||
|
["target"] = target,
|
||||||
|
["hasCooldown"] = cooldown,
|
||||||
|
}
|
||||||
|
setmetatable(o, self)
|
||||||
|
self.__index = self
|
||||||
|
return o
|
||||||
|
end,
|
||||||
|
|
||||||
|
ReadEntryData = function(self, entryData, index)
|
||||||
|
local str = entryData[index]
|
||||||
|
if str == nil then return nil end
|
||||||
|
str = self:TrimWhitespace(str)
|
||||||
|
return str
|
||||||
|
end,
|
||||||
|
|
||||||
|
TrimWhitespace = function(self, str)
|
||||||
|
str = str:gsub("^[ ]+", "")
|
||||||
|
str = str:gsub("\n$", "")
|
||||||
|
str = str:gsub("[ ]+$", "")
|
||||||
|
return str
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
aura_env.auras = {}
|
||||||
|
for entry in string.gmatch(aura_env.config.spellList, "([a-zA-Z,0-9 ]+)") do
|
||||||
|
entry = Entry:New(entry)
|
||||||
|
|
||||||
|
auraObj = Aura:New(entry, #aura_env.auras + 1)
|
||||||
|
aura_env.auras[#aura_env.auras + 1] = auraObj
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.HandleEvent = function(allstates)
|
||||||
|
for k, v in ipairs(aura_env.auras) do
|
||||||
|
if v:IsActive() then
|
||||||
|
v:AddAsAura(allstates)
|
||||||
|
elseif v:IsOnCooldown() and not v:IsActive() then
|
||||||
|
v:AddAsCooldown(allstates)
|
||||||
|
elseif not v:IsOnCooldown() and not v:IsActive() then
|
||||||
|
v:AddAsIcon(allstates)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
11
NewAge/CataAuraBar/README.md
Normal file
11
NewAge/CataAuraBar/README.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
## While aura is active show aura
|
||||||
|
|
||||||
|
## While aura is inactive and off cooldown show icon
|
||||||
|
|
||||||
|
## While aura is inactive and on cooldown show cooldown
|
||||||
|
|
||||||
|
## Use tsu
|
||||||
|
|
||||||
|
### ACTIONBAR_UPDATE_COOLDOWN when anything on bar goes on cooldown
|
||||||
|
|
||||||
|
### UNIT_AURA with one argument which is unit when aura fades/gets applied
|
12
NewAge/CataAuraBar/TSU.lua
Normal file
12
NewAge/CataAuraBar/TSU.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
function(allstates, e, ...)
|
||||||
|
for _,v in pairs(allstates) do
|
||||||
|
v.show = false
|
||||||
|
v.changed = true
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.HandleEvent(allstates)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- /run WeakAuras.ScanEvents("SPELL_UPDATE_COOLDOWN")
|
||||||
|
-- /dump UnitAura("player", "Blessing of Might")
|
53
NewAge/DHRogueSniffer/sniffer.lua
Normal file
53
NewAge/DHRogueSniffer/sniffer.lua
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
-- PLAYER_TARGET_CHANGED
|
||||||
|
function(e)
|
||||||
|
local hasEyes = UnitBuff("player", "Spectral Sight") -- Spectral Sight
|
||||||
|
if not hasEyes then
|
||||||
|
--print("Player has no Spectral Sight")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local unitUuid = UnitGUID("target")
|
||||||
|
if not unitUuid then
|
||||||
|
--print(string.format("Target has no UUID: %s", tostring(unitUuid)))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--print(string.format("Target UUID: %s", tostring(unitUuid)))
|
||||||
|
|
||||||
|
if not string.find(unitUuid, "Player") then
|
||||||
|
--print(string.format("Target %s is not a player", tostring(unitUuid)))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local targetStealth = UnitBuff("target", "Stealth")
|
||||||
|
if not targetStealth then
|
||||||
|
--print("Target has no Stealth")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--print(string.format("Target Stealth: %s", tostring(targetStealth)))
|
||||||
|
|
||||||
|
local targetName = UnitName("target")
|
||||||
|
if not targetName then
|
||||||
|
--print("Target has no name")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--print(string.format("Target Name: %s", tostring(targetName)))
|
||||||
|
|
||||||
|
local pvp = UnitIsPVP("target")
|
||||||
|
local pvpState = pvp == true and "ON" or "OFF"
|
||||||
|
|
||||||
|
local low, high = WeakAuras.GetRange("target")
|
||||||
|
local key = string.format("%s-%s-%s-%s", unitUuid, targetName, low, high)
|
||||||
|
--print(string.format("Key: %s", tostring(key)))
|
||||||
|
--print(string.format("Previous Key: %s", tostring(aura_env.previousTarget)))
|
||||||
|
if not aura_env.previousTarget then aura_env.previousTarget = key end
|
||||||
|
if aura_env.previousTarget == key then
|
||||||
|
--print(string.format("Target same as previous target: %s", tostring(key)))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local message =
|
||||||
|
string.format("I see %s in stealth with pvp %s between %d and %d yards away", targetName, pvpState, low, high)
|
||||||
|
--print(string.format("Sending message: %s", tostring(message)))
|
||||||
|
SendChatMessage(message, "RAID")
|
||||||
|
aura_env.previousTarget = key
|
||||||
|
end
|
1
NewAge/DamageIntake/export
Normal file
1
NewAge/DamageIntake/export
Normal file
File diff suppressed because one or more lines are too long
198
NewAge/DamageIntake/init.lua
Normal file
198
NewAge/DamageIntake/init.lua
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
--- initial
|
||||||
|
aura_env.fn = {}
|
||||||
|
aura_env.damageHistory = {}
|
||||||
|
aura_env.historyCurrent = {}
|
||||||
|
aura_env.playerGUID = UnitGUID("player")
|
||||||
|
aura_env.lastCleanup = 0
|
||||||
|
aura_env.historyWindow = 10
|
||||||
|
aura_env.cleanupInterval = 1
|
||||||
|
aura_env.types = {
|
||||||
|
SWING = "SWING_DAMAGE",
|
||||||
|
SPELL = "SPELL_DAMAGE",
|
||||||
|
RANGE = "RANGE_DAMAGE",
|
||||||
|
DOT = "SPELL_PERIODIC_DAMAGE",
|
||||||
|
ENV = "ENVIRONMENTAL_DAMAGE",
|
||||||
|
BLEED = "BLEED",
|
||||||
|
}
|
||||||
|
aura_env.labels = {}
|
||||||
|
aura_env.labels[aura_env.types.SWING] = "Swing"
|
||||||
|
aura_env.labels[aura_env.types.SPELL] = "Spell"
|
||||||
|
aura_env.labels[aura_env.types.RANGE] = "Ranged"
|
||||||
|
aura_env.labels[aura_env.types.DOT] = "Magic DoT"
|
||||||
|
aura_env.labels[aura_env.types.ENV] = "Environment"
|
||||||
|
aura_env.labels[aura_env.types.BLEED] = "Bleed"
|
||||||
|
aura_env.spellSchool = {
|
||||||
|
PHYSICAL = 1,
|
||||||
|
}
|
||||||
|
aura_env.iconz = {}
|
||||||
|
aura_env.iconz[aura_env.types.SWING] = 589068
|
||||||
|
aura_env.iconz[aura_env.types.SPELL] = 1391677
|
||||||
|
aura_env.iconz[aura_env.types.RANGE] = 135128
|
||||||
|
aura_env.iconz[aura_env.types.DOT] = 132095
|
||||||
|
aura_env.iconz[aura_env.types.ENV] = 237583
|
||||||
|
aura_env.iconz[aura_env.types.BLEED] = 1033474
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Returns players current max health
|
||||||
|
--
|
||||||
|
aura_env.fn.getMaxHealth = function() return UnitHealthMax("player") end
|
||||||
|
|
||||||
|
aura_env.fn.getMaxHit = function()
|
||||||
|
local maxHit = 0
|
||||||
|
for _, amount in pairs(aura_env.historyCurrent) do
|
||||||
|
maxHit = maxHit + amount
|
||||||
|
end
|
||||||
|
return maxHit
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.fn.isEnabled = function(damageType)
|
||||||
|
local enabled = damageType == aura_env.types.SWING and aura_env.config.enableSwing
|
||||||
|
or damageType == aura_env.types.SPELL and aura_env.config.enableSpell
|
||||||
|
or damageType == aura_env.types.DOT and aura_env.config.enableDot
|
||||||
|
or damageType == aura_env.types.ENV and aura_env.config.enableEnv
|
||||||
|
or damageType == aura_env.types.BLEED and aura_env.config.enableBleed
|
||||||
|
return enabled
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Checks if the given CLU event is tracked by this aura
|
||||||
|
-- @return bool
|
||||||
|
--
|
||||||
|
aura_env.fn.isTrackedEvent = function(damageType)
|
||||||
|
local match = false
|
||||||
|
for key, typeName in pairs(aura_env.types) do
|
||||||
|
if damageType == typeName and aura_env.fn.isEnabled(damageType) then match = true end
|
||||||
|
end
|
||||||
|
|
||||||
|
return match
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Calculates the amount of damage taken from a given CLU parameter set
|
||||||
|
-- @return number
|
||||||
|
--
|
||||||
|
aura_env.fn.parseDamage = function(type, ...)
|
||||||
|
local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing
|
||||||
|
|
||||||
|
if type == aura_env.types.SWING then
|
||||||
|
-- REGULAR SWINGS
|
||||||
|
amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = select(12, ...)
|
||||||
|
elseif
|
||||||
|
type == aura_env.types.SPELL
|
||||||
|
or type == aura_env.types.RANGE
|
||||||
|
or type == aura_env.types.DOT
|
||||||
|
or type == aura_env.types.BLEED
|
||||||
|
or type == aura_env.types.ENV
|
||||||
|
then
|
||||||
|
amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = select(15, ...)
|
||||||
|
end
|
||||||
|
|
||||||
|
return amount
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Returns the summarized, historical damage intake over all sources
|
||||||
|
-- @return number
|
||||||
|
--
|
||||||
|
aura_env.fn.getCurrentHistoryDamage = function()
|
||||||
|
local d = 0
|
||||||
|
for damageType, value in pairs(aura_env.historyCurrent) do
|
||||||
|
d = d + value
|
||||||
|
end
|
||||||
|
|
||||||
|
return d
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Records a new damage event and notifies the engine.
|
||||||
|
-- @return void
|
||||||
|
--
|
||||||
|
aura_env.fn.addDamageRecord = function(allStates, time, damageType, damage)
|
||||||
|
if not damage or damage == 0 then return end
|
||||||
|
|
||||||
|
if not aura_env.historyCurrent[damageType] then aura_env.historyCurrent[damageType] = 0 end
|
||||||
|
|
||||||
|
-- add new damage to current value immediately
|
||||||
|
aura_env.historyCurrent[damageType] = aura_env.historyCurrent[damageType] + damage
|
||||||
|
|
||||||
|
-- add new history record so the history engine picks it up
|
||||||
|
table.insert(aura_env.damageHistory, { time = time, damageType = damageType, value = damage })
|
||||||
|
|
||||||
|
-- invoke state update
|
||||||
|
aura_env.fn.updateAllState(allStates)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function normalize(value)
|
||||||
|
if value > 1e9 then
|
||||||
|
return string.format("%.2fB", value / 1e9)
|
||||||
|
elseif value > 1e6 then
|
||||||
|
return string.format("%.2fM", value / 1e6)
|
||||||
|
elseif value > 1e3 then
|
||||||
|
return string.format("%.2fk", value / 1e3)
|
||||||
|
else
|
||||||
|
return value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Updates the state table of the clone with the new damage.
|
||||||
|
-- @return boolean
|
||||||
|
--
|
||||||
|
aura_env.fn.updateAllState = function(allStates)
|
||||||
|
-- local maxHealth = aura_env.fn.getMaxHealth()
|
||||||
|
local maxHit = aura_env.fn.getMaxHit()
|
||||||
|
|
||||||
|
-- create progress bar records
|
||||||
|
for idx, value in pairs(aura_env.historyCurrent) do
|
||||||
|
allStates[idx] = {
|
||||||
|
changed = true,
|
||||||
|
show = value ~= 0,
|
||||||
|
name = aura_env.labels[idx],
|
||||||
|
progressType = "static",
|
||||||
|
value = value,
|
||||||
|
display = normalize(value),
|
||||||
|
total = maxHit,
|
||||||
|
type = idx,
|
||||||
|
icon = aura_env.iconz[idx],
|
||||||
|
duration = 3,
|
||||||
|
autohide = true,
|
||||||
|
}
|
||||||
|
--print(allStates[idx].display)
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- @return table {SWING_DAMAGE = 123, SPELL_DAMAGE = 0}
|
||||||
|
aura_env.fn.calcCurrentHistoricalDamage = function()
|
||||||
|
local currentDamage = {}
|
||||||
|
local now = GetTime()
|
||||||
|
|
||||||
|
-- iterate over historical damage records
|
||||||
|
for idx, obj in pairs(aura_env.damageHistory) do
|
||||||
|
if now - obj.time > aura_env.historyWindow then
|
||||||
|
aura_env.damageHistory[idx] = nil
|
||||||
|
else
|
||||||
|
-- if no value, start with 0
|
||||||
|
if not currentDamage[obj.damageType] then currentDamage[obj.damageType] = 0 end
|
||||||
|
currentDamage[obj.damageType] = currentDamage[obj.damageType] + tonumber(obj.value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- update current historical value
|
||||||
|
for key, typeName in pairs(aura_env.types) do
|
||||||
|
aura_env.historyCurrent[typeName] = currentDamage[typeName] or 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Generates synthetic damage events for a proper display when options are open.
|
||||||
|
-- @return void
|
||||||
|
--
|
||||||
|
aura_env.fn.createDummyDisplay = function(allStates)
|
||||||
|
for key, typeName in pairs(aura_env.types) do
|
||||||
|
if aura_env.fn.isEnabled(typeName) then
|
||||||
|
aura_env.fn.addDamageRecord(allStates, GetTime(), typeName, math.random(aura_env.fn.getMaxHealth()))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
41
NewAge/DamageIntake/trigger.lua
Normal file
41
NewAge/DamageIntake/trigger.lua
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
-- COMBAT_LOG_EVENT_UNFILTERED, FRAME_UPDATE
|
||||||
|
function (allStates, ev, ...)
|
||||||
|
local now = GetTime()
|
||||||
|
|
||||||
|
if (WeakAuras.IsOptionsOpen()) then
|
||||||
|
aura_env.fn.createDummyDisplay(allStates)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
if (ev == "COMBAT_LOG_EVENT_UNFILTERED") then
|
||||||
|
-----------------------------------------
|
||||||
|
-- COMBAT LOG
|
||||||
|
-----------------------------------------
|
||||||
|
local timestamp, damageType, _, _, _, _, _, destGUID, _, _, _, _, _, spellSchool = ...
|
||||||
|
|
||||||
|
-- hack to separate bleeds from magical DoT
|
||||||
|
if (damageType == "SPELL_PERIODIC_DAMAGE" and spellSchool == aura_env.spellSchool.PHYSICAL) then
|
||||||
|
damageType = aura_env.types.BLEED
|
||||||
|
end
|
||||||
|
|
||||||
|
-- exit early if target is NOT the player or the damageType is NOT relevant
|
||||||
|
if (destGUID ~= aura_env.playerGUID or not aura_env.fn.isTrackedEvent(damageType)) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- get damage of current "hit"
|
||||||
|
local damage = aura_env.fn.parseDamage(damageType, ...)
|
||||||
|
-- record new damage application
|
||||||
|
aura_env.fn.addDamageRecord(allStates, now, damageType, damage)
|
||||||
|
else
|
||||||
|
-----------------------------------------
|
||||||
|
-- FRAME UPDATE
|
||||||
|
-----------------------------------------
|
||||||
|
if (now - aura_env.lastCleanup > aura_env.cleanupInterval) then
|
||||||
|
aura_env.lastCleanup = now
|
||||||
|
aura_env.fn.calcCurrentHistoricalDamage()
|
||||||
|
aura_env.fn.updateAllState(allStates)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
15
NewAge/DamageIntake/vars.lua
Normal file
15
NewAge/DamageIntake/vars.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
type = {
|
||||||
|
display = "Damage Type",
|
||||||
|
type = "select",
|
||||||
|
values = {
|
||||||
|
["SWING_DAMAGE"] = "Auto Attack",
|
||||||
|
["SPELL_DAMAGE"] = "Spell Hit",
|
||||||
|
["RANGE_DAMAGE"] = "Range Attack",
|
||||||
|
["SPELL_PERIODIC_DAMAGE"] = "Spell Damage Over Time",
|
||||||
|
["ENVIRONMENTAL_DAMAGE"] = "Environmental",
|
||||||
|
["BLEED"] = "Bleed",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
display = "string"
|
||||||
|
}
|
102
NewAge/EquipmentManager/INIT.lua
Normal file
102
NewAge/EquipmentManager/INIT.lua
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
function()
|
||||||
|
--- @class Item
|
||||||
|
--- @field id number
|
||||||
|
--- @field name string
|
||||||
|
--- @field ilvl number
|
||||||
|
--- @field type string
|
||||||
|
|
||||||
|
--- @field new function
|
||||||
|
Item = {
|
||||||
|
--- @param self Item
|
||||||
|
--- @return Item
|
||||||
|
new = function(self)
|
||||||
|
local obj = {}
|
||||||
|
obj.id = id or -1
|
||||||
|
obj.name = name or ""
|
||||||
|
obj.ilvl = ilvl or -1
|
||||||
|
obj.type = type or ""
|
||||||
|
setmetatable(obj, self)
|
||||||
|
self.__index = self
|
||||||
|
return obj
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
--- @class ItemSet
|
||||||
|
--- @field items Item[]
|
||||||
|
|
||||||
|
--- @field new function
|
||||||
|
--- @field equip function
|
||||||
|
ItemSet = {
|
||||||
|
--- @param self ItemSet
|
||||||
|
--- @return ItemSet
|
||||||
|
new = function(self, items)
|
||||||
|
local obj = {}
|
||||||
|
obj.items = items or {}
|
||||||
|
setmetatable(obj, self)
|
||||||
|
self.__index = self
|
||||||
|
return obj
|
||||||
|
end,
|
||||||
|
|
||||||
|
equip = function(self)
|
||||||
|
local equippedItems = getEquippedItems()
|
||||||
|
print(#equippedItems .. " items equipped")
|
||||||
|
|
||||||
|
for itemSlot, eqItem in pairs(equippedItems) do
|
||||||
|
local item = self.items[itemSlot]
|
||||||
|
|
||||||
|
if (eqItem.id ~= item.id and eqItem.ilvl ~= item.ilvl) then
|
||||||
|
print("Unequip " .. itemSlot)
|
||||||
|
PickupInventoryItem(itemSlot)
|
||||||
|
PutItemInBag(22)
|
||||||
|
print("Equip " .. item.id)
|
||||||
|
EquipItemByName(item.id, itemSlot)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
--- @return string
|
||||||
|
function getItemName(itemLink)
|
||||||
|
return select(1, GetItemInfo(itemLink))
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return number
|
||||||
|
function getItemIlvl(itemLink)
|
||||||
|
return select(4, GetItemInfo(itemLink))
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return string
|
||||||
|
function getItemType(itemLink)
|
||||||
|
return select(9, GetItemInfo(itemLink))
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return Item[]
|
||||||
|
function getEquippedItems()
|
||||||
|
--- @type Item[]
|
||||||
|
local items = {}
|
||||||
|
|
||||||
|
for i = 1, 19 do
|
||||||
|
--- @type Item
|
||||||
|
local item = Item:new()
|
||||||
|
--- @type string
|
||||||
|
local eqItemLink = GetInventoryItemLink("player", i)
|
||||||
|
--- @type number
|
||||||
|
local eqItemId = GetInventoryItemID("player", i)
|
||||||
|
|
||||||
|
if (eqItemLink ~= nil) then
|
||||||
|
item.name = getItemName(eqItemLink)
|
||||||
|
item.ilvl = getItemIlvl(eqItemLink)
|
||||||
|
item.type = getItemType(eqItemLink)
|
||||||
|
item.id = eqItemId
|
||||||
|
|
||||||
|
items[i] = item
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return items
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @type ItemSet
|
||||||
|
local set = ItemSet:new(getEquippedItems())
|
||||||
|
set:equip()
|
||||||
|
end
|
19
NewAge/NameplateInfo/Hostility.lua
Normal file
19
NewAge/NameplateInfo/Hostility.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
--- NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
|
||||||
|
function(allstates, e, ...)
|
||||||
|
---@cast allstates allstates
|
||||||
|
print("Starting to process nameplates for hostility...")
|
||||||
|
for i = 1, 40 do
|
||||||
|
local unit = "nameplate" .. i
|
||||||
|
local hostile = UnitCanAttack("player", unit)
|
||||||
|
allstates[unit] = {
|
||||||
|
show = true,
|
||||||
|
changed = true,
|
||||||
|
resort = true,
|
||||||
|
|
||||||
|
hostile = hostile,
|
||||||
|
}
|
||||||
|
print("Processed nameplate " .. i .. " hostility: " .. tostring(hostile))
|
||||||
|
end
|
||||||
|
print("Finished processing nameplates for hostility.")
|
||||||
|
return true
|
||||||
|
end
|
10
NewAge/NullBarrier/CLEU1.lua
Normal file
10
NewAge/NullBarrier/CLEU1.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
function()
|
||||||
|
if select(2, CombatLogGetCurrentEventInfo()) == "SPELL_AURA_APPLIED" then
|
||||||
|
local target = select(5, CombatLogGetCurrentEventInfo())
|
||||||
|
local buff = select(13, CombatLogGetCurrentEventInfo())
|
||||||
|
if target == UnitName("player") and aura_env.buffs[buff] ~= nil then
|
||||||
|
aura_env.max = aura_env.GetAbsorbs()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return aura_env.GetAbsorbs() > 0
|
||||||
|
end
|
10
NewAge/NullBarrier/CLEU2.lua
Normal file
10
NewAge/NullBarrier/CLEU2.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
function()
|
||||||
|
if select(2, CombatLogGetCurrentEventInfo()) == "SPELL_AURA_APPLIED" then
|
||||||
|
local target = select(5, CombatLogGetCurrentEventInfo())
|
||||||
|
local buff = select(13, CombatLogGetCurrentEventInfo())
|
||||||
|
if target == UnitName("player") and aura_env.buffs[buff] ~= nil then
|
||||||
|
aura_env.timeApplied = GetTime()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
3
NewAge/NullBarrier/CustomDuration1.lua
Normal file
3
NewAge/NullBarrier/CustomDuration1.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function()
|
||||||
|
return aura_env.GetAbsorbs(), aura_env.max, 1
|
||||||
|
end
|
3
NewAge/NullBarrier/CustomDuration2.lua
Normal file
3
NewAge/NullBarrier/CustomDuration2.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function()
|
||||||
|
return 15, aura_env.timeApplied + 15
|
||||||
|
end
|
1
NewAge/NullBarrier/Export
Normal file
1
NewAge/NullBarrier/Export
Normal file
@@ -0,0 +1 @@
|
|||||||
|
!WA:2!TFv3UTXXv4qqyy4fOOw0Xw1UUjRzQTLQLv0p2YjPvXHKMsIQ0K0lP8)oKZYDi31A5UBMDxjkLM0AL2uvJ2Iw1a0))J30Bk6f8jiqpbhi0hGcDrFa0f9w3Zm7QvK0YWj96saYD5zoZzoZ35mNVZe72jCvNA8jFRXVsIwj0sOT5z3rLuFznMTtgBtB2IXJhVu8jg)Q7QAZ0OS0Hd6C80MgRVoHPjxX220ZWH1UyJgUuVyQbAQ3j4zwTMuNHk)b(egvEoFtt57OB4r7WOnnSTQSMdvPjZ23ju9YgRtps3G3d8GyXIfVJND9vOmxCgFTyV9FxXToXKgNrQ7HsCNrX1JW8KuByyz4QlLgF4jTHhZOztCsN5cSWx)0oAuv)gn4RkBHS5ln3s5t7XDbIpJm1gUoutZCAUs766RsxHA5vg12OD3QzsvUs1YvsPujTpACvhtYAuMIfPf1vsrOQ6cuIPNE0ulXO4uvkxkB(8B5Bf6csS1cXP9mS8OmlI5Td2yz6sSQRBZkzJdOMjBHkzv2YLA2qiOt6IvQu8M5ZoxLKgADlGazAcJzqzt5J)p3OLQKDKzuxEPsDBWqVQShJ4rIVxGnNJlIVRvlNrjB2cQ1TTAy0ukeOZzHou8Di(EOUfDeGQuhCJOicsUsBhOxGNFSo4S1mc0kTPnrBM0iYv)ukT8XmbjL6Mex3tbVLuAxmAYFzlILrlcFgZahFUTPexUdsTA6PFuy40w2w0D0WqaxJQ8acZLYxe3n4QYDCy20TigwZbFhCcWSW7cxhEp85qdkjr93zZj646qylFhdnp9tUT49ax)UXGJSW1F2Z(8xb)0PUVRNDRk02Eol0W3sKmnYOsY4hg1ZNzjZtlQsTwzCmy65Twjggjk43AKi5Zt9sP6AZuDhz0rLOwAW3CHp35Op7FH2hUaCXDelUITNyRfZzO(()nT1OPtTuLIWxfXfjyijiXf2sZUAGNvtn4z74NnAb5PVUYZk)Hc38bj5jcYHzcjFeoWKJfos2wo2Rszun5dtNpskYKTiTrztij17UknUoO0iyHNPhannSzYgcJiFLjK1Sfc5FmAiVeE2GpZrsgCaj5yYgJkp7SY8Pl7PtTI0Uhu2isicGs9(muHj4iB)(xaQF4EOPnwEq2J2YbhhpbrR7nYKZm2H5DdULdSYOb2b3qcJW979DfHaQPlnY3eo7lW)C71b715iIHMicqxEm5vKnSKDigm3r6pApAVGCWe5)Ej5NF9gz5rpm8dvFapS)85(GXO9UL87kpjDM(dBHw0flNz1CC01XJ1JK88JpvJBIWPL8BYNsOtGOuKzM(lQzwoYmtFGzgCEwr7s(rUtu4cWR(FWIalcNeofCg4RdNf(gBSFbLetaVoiVN2AyS1O(ncLwB3Gdx7)FN37LucO3J69K4GNEgtEsHF8AsWITJ9zdyheccZbNAm5m2TujE5TBIwlJpdlb6LLtwKZQHnwbHFujPGXOAQLusvnvPs5ZL9gj7h8cZVjSMuVdYWV6l16dya1GJ47Faz6V4ZNFWiC1NvCQQaEQj6u1OYeln5(ZHFa)3hj)XyLadZNVqWa1Ioum)LvK4qNeM7jkE0niyl4wWSHZbjHtlfWt7Mot(SlTVc6gAump6nK6Qz4(yrKCf6ueR1CgIiEVsapoV0D8ogijv1673OuC48zGVnNHBqwQuVCERnuj73WZcx)F8AIpXJJnS4s84POu9EjYUxmy6V1PGH7Y314mRIF38vDs4HKzvD1jA2RE3anJVLqg)NKNVUZX7rJd6VA3aP73SbCrNtiKGDeyZ5TRlOstNc)7EIbWoBOAcHpzNGwmUxyBnBlg)XiAA0yn4IDyCUokNKnDHIfYcdZW(k460rO4bGxGF2Wg71jBBhg11DvYA9TJcxIZ(k7ieUk2tYDyeNnUt4l7ezbrdEfxQs(CfYgUL7P5QTZvOqwLQbTyf4VRy4AOAsRDGj4nIEUW9wiugZ50ryz1GAwvTcFbMvvNA0u3BAyM5GRXB6bEBrRp(U0QwyMgthEhUGDfHX0MywjpjAQu34gohhvkLgh0OAuTBsARdtibx(y762Y22tVeZUjhqQnOIgw6WXyH5abn9K5GSXrGlULid1ftQvuYn)cvGPK6kuBbdnnQLsHS3oRsOeH7plJV78z0oznxzPCYfWDx61TTBfli9RsWOoJKJ39AdsD6dZqWyTvtSbJhUuUlFW)UCzXgLNdvd(k8(2Xox3U3MrueMuxHy6OtIdJdVPYQ8CQRmeCPU3YK2E95Ym)1M4wijbV7FQEA(2rVRnozRGwO6SqrLC3VyHkPYdxvAp(Lx4xNWslk5o2MtaPpjKjgCdi7aTNbZfdMhwa(mHIWjE)iIKk4xorIcugYhWGWjvGcox7W5jM8Q9qk4z0IMYXX0a7(6s4qc6HtlOh(K)p9W)70d9IRZkJUrfuqpud9ep8y(0dLYGhk41)Vfgtrg7BQlAA4nofSycjm8)VHHvXRt657Y8TeeeWt3sCXq(Ui2U8JZeb9c)0BTDAsTOmJ6L1TxTO1UUIhzWReJ1RS2GRm)(I12HHxoSCKv2HpqKrRjYS4zy5tmPZq8X6ZQ1e1qWl0vF5AboReSeCB4oXH7oaVdNqb5v6H3zajd9CsU3IXrga4(6WdcjvGhU5WWk4qVFYZ7avfmeqn4jabuH6pb0Ibu8StdOjQRoye4dpgw25Cpx9rNQ8ywvSEEDd(TCJdMN9vGhfhAbwGn4aFq3GQXIYthsbwNWxu42rdCRbENd8J586VOLkSppDy1blfdTdlbdRbRdFOo8ZXcn)sD47vd(iSok8XHxdlXfGC1GfDM)l1TU65gv9NMob)EDhCTt4hapbleUBV2qEk4NQd)WzHFe8PyPpYAfBmV5KLBFFkSj8tGNgw)e2a(e4Yhf(zIALCkIVFa2)lQb)4yWwWVcRbYl7JL5JQ61Zk)IlaIOGOl6nta)LAWVh(d8Jg8uTHHFn8BGNYZmJYs)D1G)um4pxJxr73gtuM8pwd(R1ehREX5MF57jki3m2(5MNrKBggxdIOx7qJRHOYus9eA5OcI8CSeHQqOgbso(Iy)(8t9hwMwqdFerIchXVuxfNR9DZmFU63V494OopGec79CfEiNosF83cOvINyL)5D)V)
|
39
NewAge/NullBarrier/INIT1.lua
Normal file
39
NewAge/NullBarrier/INIT1.lua
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
aura_env.buffs = {
|
||||||
|
["Null Barrier"] = 1,
|
||||||
|
["Empowered Null Barrier"] = 1,
|
||||||
|
}
|
||||||
|
aura_env.max = 0
|
||||||
|
|
||||||
|
aura_env.GetBuff = function(name)
|
||||||
|
for i = 1, 40 do
|
||||||
|
if UnitBuff("player", i) == name then return i end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.GetAbsorb = function(name)
|
||||||
|
local temp = select(16, UnitBuff("player", aura_env.GetBuff(name)))
|
||||||
|
if temp then
|
||||||
|
return temp
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.GetAbsorbs = function()
|
||||||
|
local abs = 0
|
||||||
|
for k, v in pairs(aura_env.buffs) do
|
||||||
|
abs = abs + aura_env.GetAbsorb(k)
|
||||||
|
end
|
||||||
|
return abs
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.PrettyPrintNum = function(n)
|
||||||
|
if n > 1e6 then
|
||||||
|
return string.format("%.2fM", n / 1e6)
|
||||||
|
elseif n > 1e3 then
|
||||||
|
return string.format("%.2fk", n / 1e3)
|
||||||
|
else
|
||||||
|
return n
|
||||||
|
end
|
||||||
|
end
|
4
NewAge/NullBarrier/INIT2.lua
Normal file
4
NewAge/NullBarrier/INIT2.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
aura_env.buffs = {
|
||||||
|
["Null Barrier"] = 1,
|
||||||
|
}
|
||||||
|
aura_env.timeApplied = 0
|
3
NewAge/NullBarrier/Text1.lua
Normal file
3
NewAge/NullBarrier/Text1.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function()
|
||||||
|
return aura_env.PrettyPrintNum(aura_env.GetAbsorbs())
|
||||||
|
end
|
1
NewAge/OverallAbsorbs/Export.txt
Normal file
1
NewAge/OverallAbsorbs/Export.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
!WA:2!nA1YUnsrxyScsaEZKjadGe)sTS0mYbYK7jWSiaUD6KyWJTvB7jZv5uT7YURjTRQvvv7epi(LiRyDepbEnR8JqEcAfXtq2ZMSG1CQQ70(cbgAP0P8PQZ58DUuFNoZEl0Bb3fC)Lvhkcq8JpK4k9(4l0RR2PJalFAMlrHspgVAGKWOISdBhkKSEnWNkdoOtiTTsC(fZAapCSmKtnqHCulmT)Y1abYb14eQSsyV8PY3hll4iyChr(fxmlM6YhK4T3D7TwERriABWJ1yGEofTQ0WY(snKSzsKYDzcU7u)(XmxSzHMnQAsAZOENj5KUDXCrLhWtw(NMYbbyNySp0f7e2Ptdqc)aRY12Rz5ReHo4(yQSoSb50rTkwOEJw1BuWUX1UdOOEK27cOx5SJoZnz1cRAR1X5amYx6zgsjsNaF0am)QypDJobF3BjtnzgzPXI7HoDjJ1uziBadyr2yqkmlw2Q5OyF0sfzrFsAeajDicSRxZQC5O5pnZVoJRjDmeyFCBz(1xYOiRNdswM1faqXqoh03szKs0omO2ySZog50wQvHM2fAvOwTYLS2nNH0dt1wt94ZAJ8nKiExS0yNBS(wVvRpJbu1KXQV2g)31hcPB8(ognHQqfizLpxCPi3IgiQ74CQYnIxOE)kJ))oguI)0rJ6zYcaaPBTmLQauDYo5))3QTgFJXQQY5zIaSVFjxr2BQIEexC08Nhst6yZoYLiETU01hVoIoi4Ui96gX7R65NBOQFVvBMpJ)9Zbpxd3yWCkY)jq3puYlEoIs6PBb32wa5i5ExGrcCDjKl7k9EVO7yszu8L30sRBM4cmywxXzQJQULeTIzpeHUx0YGcrReTA0ArRhTIthcLi8Mv8zoiEXyiDW3(h)p9tM5GlDcKu5gS3KemplZqOZ1g3vXU8f3l6oJujoWeTG)(LpkybjW00s4HCzN80yvM7CTm1RC3VDW8tCIy)MjtM5Ukwk2VJMhj69d(qTeGnJPYiT1CDMfGFETEd4sd2vl8NVmMa6zXUlZf69FnuNiDge9(d5kAhSIb0Ss1kwr3HdrG6md1hCC5igNDyu5qRtd4yH4e0GPIOex85VZLAHNW4UhYrbNDyYIltTGMTQAZgLlvXkjKNGM8IsvQyz3kMSmgV9jcIJp(OXMOo5n41sITKuzMGplnxcNHdzMw0Kfqb2dt66j3W0NHC3Ze6zBFp7EH(ssw72(iH4ErhM98qbUffOE4EMcWdkzxPlWM(qNUQpD9c7UBW8W5k4QYIyxS7JrN6DDmu2Jd3wvHNt9I2wwvUs0JXKE14SUQu2rZQjH6nKR7x05KK2fostYj2o6HzJ2mRj0AkFW5USwX3VocOcN7SPjbGB2)O(g7lYvj033WeScbimEfSXAlLSJvVa2jyo214F(m2yblK6sODnaulXAKm9r2peXDNw0tyexJ6ECw4mBuxcxjfhtsnXpLDgcPvZMDs6fZyMZuIE1SIy(jOsAq0gXyZvnCztszQikvAMsuUKbrZ4Ru)VZjMqRrEB8EA(TPXxm93TJWKHh4EbtW9V9s3g6MnKJTYIPJ10grH7BGIwa2xGtXMgS)d4tmjaNeCi9wRMMqpEjJ(geQraIWf5NUNAXjtYXkQE)L3Y4G8hV4To3WrmdcN(ZOMknMg7uyYYA4TNUSLyrbmsH2D54B15ZD)LxVZJH0j1yfLkjGaYsPMzJ)RM54uZSXyZmRE00Oe(78jyKpxp9sad(STlT)bnmFdJ1lJPIH(OrAgKd08p7Wv0tHC8ql)(nlzubqW6He3rFvO4r)G9(pV5gBfpsPr85cYxsnhSdQn(LfraTnTlCV9Lnl9WX)6H11FbPwnVHsw7(XJm)0mp63sCoX1ftTRy9el74ppUykZ(OokslymksI(a7tutn28U2i)ap0Coqu1H0nlKTu2e7LJ4EvvyjY3pPtBedirOXF86WdQAx65vR0Oq5HQXUK4VZMFAcd91oO2h3LRiygpDBbHZ6lV2xV8Ml0)3F6Fb
|
43
NewAge/OverallAbsorbs/INIT.lua
Normal file
43
NewAge/OverallAbsorbs/INIT.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
aura_env.buffs = {
|
||||||
|
["Null Barrier"] = 1,
|
||||||
|
["Empowered Null Barrier"] = 1,
|
||||||
|
["Resounding Protection"] = 1,
|
||||||
|
["Guard"] = 1,
|
||||||
|
["Void Shroud"] = 1,
|
||||||
|
["Stoneskin"] = 1,
|
||||||
|
}
|
||||||
|
aura_env.max = 0
|
||||||
|
|
||||||
|
aura_env.GetBuff = function(name)
|
||||||
|
for i = 1, 40 do
|
||||||
|
if UnitBuff("player", i) == name then return i end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.GetAbsorb = function(name)
|
||||||
|
local temp = select(16, UnitBuff("player", aura_env.GetBuff(name)))
|
||||||
|
if temp then
|
||||||
|
return temp
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.GetAbsorbs = function()
|
||||||
|
local abs = 0
|
||||||
|
for k, v in pairs(aura_env.buffs) do
|
||||||
|
abs = abs + aura_env.GetAbsorb(k)
|
||||||
|
end
|
||||||
|
return abs
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.PrettyPrintNum = function(n)
|
||||||
|
if n > 1e6 then
|
||||||
|
return string.format("%.2fM", n / 1e6)
|
||||||
|
elseif n > 1e3 then
|
||||||
|
return string.format("%.2fk", n / 1e3)
|
||||||
|
else
|
||||||
|
return n
|
||||||
|
end
|
||||||
|
end
|
7
NewAge/PrimaryStatBar/CLEU.lua
Normal file
7
NewAge/PrimaryStatBar/CLEU.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
function(e, ...)
|
||||||
|
aura_env.currentStat = aura_env.GetPrimaryStat()
|
||||||
|
if aura_env.maxStat < aura_env.currentStat then
|
||||||
|
aura_env.maxStat = aura_env.currentStat
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
3
NewAge/PrimaryStatBar/CustomDuration.lua
Normal file
3
NewAge/PrimaryStatBar/CustomDuration.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function()
|
||||||
|
return aura_env.currentStat, aura_env.maxStat, 1
|
||||||
|
end
|
1
NewAge/PrimaryStatBar/Export.txt
Normal file
1
NewAge/PrimaryStatBar/Export.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
!WA:2!nA1tVnUXvCtOw0af0wBN0T7UTav1g1XURHqSXUEtkAWcrzPyTWw2GsE9geNknKCO4etnd7mdLT2G0MQt7XcDT3e6HEON0NGed07dec6ha3Z9I)e03mKs(pRxGoasC4BEZ7V)EVhTQUy3f9x0)1pEKigXp5iIVm8hEUz)(bbcS8Lw8Zs3TZ3(vF7CFZCZn3iVeHK1Tj(mzCXGeQNKWORUw(cWIJLjCAbuch1ct7v0lHZXuzdjsMht959ZK6p4PpT4tgJOEHm(bmcv6wUs9MvCMyuTdd4heQv88xPRdJ9rsSdUhipoYOuXwocjIlZ7gqOeryEB4HCLH(SwP3RTB6ZZS(BZmjrm2tBpnrUr4cFsHVYy4F(shrO(NIIobZx6laYBUEgDBo(0UiH8203JiKNIr9YO)41Z)15NPKUOZ06aO)H5VRGH5GRo5tXYd4KUiE)SdVvyvKs9qW70mS6sXrO(GIxVWTfH(4ABV6A3iDiYc)VPgtz)ouieKQT96MN1rD1Xj4gnG3iOiYRmzNA0a2QVb1BP67oS)5tL7xOnRbsoPthmx8hwHNT91pyO(MuGfXdVSgfheysxn5jYWlse4wixbJ7UhZh3EshmfZjEnczNUpDKaEuk6uuFHDceWCtJvd0xs)EBxdesyxE3kh6y0qEoCO2CApofV0kK4JvlmemZOi9b3367(V2Y(XaXbgI18f5NYSH(7oWhmyDeyXnMWXOOgtV7faccjdlWckuLWboJFqzglYNDkTWbCwhowikSQH914juJ1zJsKSlsL)2zYnU8))fBxdyKbfxVWg6y9eDyyMB1wTq8)AMuXRxOyXIPY(TaAFli2mdIe8gQTWV)UfLmetn35gk7QYM7SdIMxnm(AoVKNG1(1fIK086bCCa5mNghuz3DJxq7T3aD0EgJnscagh3QCPgnB1OzjNMd1CR7TCs7r(yx48MqMLVtLDpO6H7omHMboVN6(QhSI69)3QLD1LwjIuePbZPnO2QFR6rQnBRU)fcJwNMVvpu9luFGLQyB1swQ3Duzg1Ny6KPwzXnupPTAl1tvFu(X(eXxAsl9WBIO9Jxaz23m1a0O(CJiEmAlpweJ)8CW6sOlkMtrrVaQKarwEOahfyAUQENbUiEzdRw525z)N3ZSYbEPamFaEHdDqrXHOCxV3)Nznccwo4oAd83Dp1YJ1zfqsTGF9g7Y4(yElb5v4CtYEjTJ(MW5QLhcxoL85zNMASwww5UiJspIGa11TNkmSFhC8cn(JjioUq1KOOchfsK4PINzSRCV(Nh)RLWiHwM)cy8UizR4wssxCRyo0ns7)5goJLL(nEXZBEteIG8q5RSJuQtdu2LoS5(XVNHOUceKlXZmu0Ue86LP6JCg23q8Vmj1F)S04L15MZ)sOQLe0x9oJ465yy9Wl7DRuTPAzoes08mYW4v5UHzocvg)Z0ycmvG9lydGMcREw5MpAT4fVM5)Yu1L7geZSHF5CtMjld6D)dBUBT6vsPEkegpIJIhCu2MulEAwiliDTXYNxRE9koTshoh)G7iONUXrh79VdgOzBSPmk(ktRbaA(KSOxM7yf)REB5u)(qBAIxOBiM0ju(3)P2rmK)w26PiR4ki0or4CoDtIKKh22Xlcje3t1lVTgAQ3CHbuBhb9j0Looq2O(2XZdfTL81zlSp2Fp0zHdrusxtV2Tu)4QNJrcCdj09PJm8hPwwrNmTfVPLpxGHkqFXanF6yTIA3frOvvFTHB1Fs9NvFd88NCBkx6c9y6Wzju)uO4optDGzDTnFFtZk3yuMnUhH6SXhcRja0eIB7hB6CaExxgtgoDus7B7yeA4iUPi2aiYQHt)GVRQegAANiG5Eoo1(0DAEP58TN1Ga(ukgnG0jV6rHJnNTJjzKJRtyjC85BJLisKOq1iapCQU(yn7xXyDTCmShosY86L2B6(wF8)CjI)4RncjtMeFa87uVYlQ4moGdJOGeasIYDzkwPQMK2nCBu2PsL6PTRAMAbXBvt3cma5HpUKV)(uXXhHrNucSFXX7H9jOJZ4uCCAlMwMUlBMaMYZ5p)jp1PXQVARpMtOA7e6jAQqZpMXjWaJ0HWZdwwZALlTBRA1HTnQmYBwt8hUIJxi27KTuVFUb9qCI(BwgXM1(3PhkkbBX9cr0oWh2SI6F88Cw78S)68MvUbXCgKHK9vLJx4gFjSg2QEHTohfUOWDZIB8rfF8I9((x()(
|
17
NewAge/PrimaryStatBar/INIT.lua
Normal file
17
NewAge/PrimaryStatBar/INIT.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
aura_env.specStatTable = {
|
||||||
|
["Windwalker"] = 2,
|
||||||
|
["Brewmaster"] = 2,
|
||||||
|
["Mistweaver"] = 4,
|
||||||
|
}
|
||||||
|
aura_env.maxStat = 0
|
||||||
|
aura_env.currentStat = 0
|
||||||
|
|
||||||
|
aura_env.GetPrimaryStat = function()
|
||||||
|
stat = UnitStat("player", aura_env.GetPrimStatID())
|
||||||
|
return stat
|
||||||
|
end
|
||||||
|
|
||||||
|
aura_env.GetPrimStatID = function()
|
||||||
|
specID, specName = GetSpecializationInfo(GetSpecialization())
|
||||||
|
return aura_env.specStatTable[specName]
|
||||||
|
end
|
1
NewAge/ScrollingText/export
Normal file
1
NewAge/ScrollingText/export
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user