Tumble files around a bit

This commit is contained in:
2025-05-16 10:20:19 +02:00
parent 0e3166a410
commit 003f90126d
1595 changed files with 75381 additions and 70006 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
dye0taqicOfPcDjcGrbGtPsAvkQOzPs0Tae7sO4xkQWWuPoMQyzcQNrGMMkQRHuABeQ6BQeACkQ05aOCpvcoOa1crQ8qaPjcqLlsOSrfvnsHsDsbPvQImtck3eGStL6NkkgQIslvOKNsAQsCva1xjuzUcK9s9xKQgmrhgvlwf8yKmzGUSuBwv6ZkYOjKtJYQja9AKIzlYTvv7wj)wHHlKJdqvlh0ZL00HUUO2ob57cIXlGZluTEcQ2pI9Jlw5Uy0A1A4yemMlA9Bf0kOlw5uitOUazttneqdW2BG8CBTdeXxGnOPZA8zEFRn6nqcFFBf2tSXQepQTobh5iR1o9o7GTqR0ntPmdGeMyZxSYaTkqbkqbkqbkqbkqbkqRGSQaMxuitO2kpLSUY)cKnn1WQ3pwtdoOlwrEQxOlw)5eYCXOrRujET6I1kBnLARXg4DrSyz0AU20tL41QveMBRqov7I1FoHmxmA0AKqrip1l0fR)CczUy0O1xofYglxS(ZjK5IrJwHJu7I1FoHmxmA0ki79LrLtyCxS(ZjK5IrJgnALYfVFCXAnIdPrCmquK3HT(ow48j(u16maxewOBXSEGdb6inGU4Dyp)CbS7NWcgo89zXpxAd)iE)ceAp7TGE(5cy3pHfmC47ZIFU0g(r8(fi0sRrRPbh0fRip1l0fR)CczUy0O1Aut5I1kBnLAVFS(ZjK5I3pMoVdB6mA0AU20tL41QPZkKt1Uy9NtiZfJgTgjueYt9cDX6pNqMlgnA9LtHSXYfR)CczUy0OvQeVwDXALTMsT1yd8UiwSS(ZjK5I1zdwybd4cDB6mA0ki79LrLtyCxS(ZjK5IrJwHJu7I1FoHmxmA0OvypXgRs8O2kpd5h4qRvKtrt1hSYwmKEQXpk1yd69JvSdGzyBvSKqahkrUhWVvSdGZpwO1GHmEIi3CiCeI1ddiydN59T2O3NTwJ4qAmDwr2VHZpwOvXceb7AneECR1ioKgGosdOlE)49T3H9(2Bb9(2O1ddiydPJtrdiCezvhjgOvQCfh)shaT(MxuiBSa4k5ersKejrcBmdxe5rIKijsIKijsIKijsIKijsI8irgtmejWlgo7iKgcWXOepEdpELCQxGw5uitOUazttneqdW2BG8CBfKvJs84LoakS(fTkauwriBAQHUyfJh1wPYvC8TsLR44tVigyBfz)g0kvUIJp9y8O2Af5yUATfQxy1kW7ql0p7mItSyzLkxXXhWLHCKnwwFZlkKnwaCLCIijsIKitdkEIi)re5fiYphffZNhaG7ljsGxmC2rineGJrjE8gE86vICoiYphffZNhaGNljsGxmC2rineq8aaCmkXJ3WJxVsKZjr(CFtorKejrsKPbfprK1OoL28FtKxGibEXqGYRiBnf66DaWXOepEdpELCIijsIKizVeznQtPn)3e5fUarEmy2Vbjsv0apsKOOErK)iI8ce5pIibcrs7nr2lqYjIKijsIe2ygUiYF0Lp33xIWCto1lqRu5ko(B(VT(MxuiBSa4k5ersKejrMgu8er(JiYlqKFokkMppaa3xsKaVy4SJqAiahJs84n841Re5CqKFokkMppaapxsKaVy4SJqAiG4ba4yuIhVHhVELiNtI85(MCIijsIKiHnMHlISIq2AkM3b8ZraokaX8E8sI8hDLCQxGwPYvC8T(MxuiBSa4k5ersKejrcBmdxejcZn5uVajNiNiNiNiNSsjQPOXAocKJTrRi73qLj827WNTwJ4qAkDamdBRHUWg(YP6GcgeCMvniX1CAcod51GaudY4bv6ayg21GuaFMdB6fNig2wr2VH(GvK9B48j(u16maxewOBXSEGtrdiCeb0rAaDX7hVV9oS33ElO33EF27hJwzGwJDEHnKiXUIejkITMSUY)cKnn1WQ3pwXoaQmH3Eh(Svg1y5dwpmGGnumWP2kDjMWfohcsKavehjs6YhoKARHWarrE)ay0A9Wac2qLj827WwpmGGneOJ0a6I3pEF7DyVV9wqVV9(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GSPPgcOby7nqEUTIDamdBRHUWg(YP6GcgeCSQbjUMttWziVg0SJqAyWziVcOgKXdk4mKxdk4mKFXZwdmZ7BTrVP92kczttn0fRy8O2Af5yUAnVAH6fALNXHvQCfhF6X4rT1kYXC1kvUIJp9IyGTvK9BqRuIAkASMJa5yBnxB6ZlgA6mA9fY)TIqoY9(S1qyGOiVP16k)lq20udRE)yvuZMeHEt7T10Gd6IvKN6f6I1FoHmxmA0kvIxRUyTYwtP2ASbExelwgTMRn9ujETA6SchP2fR)CczUy0O1iHIqEQxOlw)5eYCXOrRVCkKnwUy9NtiZfJgTc5uTlw)5eYCXOrRGS3xgvoHXDX6pNqMlgnA0OrRc59Z5WpgTb

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
dmKMpaGivLljvQ0OGkDkujZIcUfuWUKQQAyOIJbPwgu1ZKQmnQKUMuv2MQQeFJc15OsX9Gk6GsflKkHEivIMOQqxuvvTrvbFuQQYivvL6KsLSsQYmPsPBkvk7KO(juHHsLGLQQkPNQyQs6QOs9vvvXCHcTxXFvfnyshMslgk9yImzu1LvAZuvFMIgnKCAuwTuvPxdfnBvCBQy3s53Q0WvLoUuPILt45qmDKRlX2Ps13LkvnEkKZRQY6LQk2p4Go1mizW3)U2)OnoJtg(m8PMrSMSBR(7DZykUL3mRrV2g)YhxmJvIyUVvbZ0CfD7YVrMtggFMoD60Pthq7pXT8MPvCQcMP5kqIm6mi7X3fUSgLXfXrTIJU52)FOM5CT8PMHSNTr4tnJt5qSudfkdzpBJsnJt5qSudfktbzFkDSiibBgHvAtnJt5qSudfkJ4E2uZ4uoel1qHY86(lzpBJsnJt5qSudfkJVvIy3wQzCkhILAOqz4z((mPYH(LAgNYHyPgkuOqzKsnYOtnJ)TrpCSMizWb3v32L8)zWAfU8EUIuJm68qFgJhpE8CmMtpoOr7g8UgFm0xVi3lYOdL5CT8PMHSNTr4tnJt5qSudfkdzpBJsnJ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KAKrNh6Zy84XJNJXC6XbnA3G314JH(6f5ErgDKDnYCcL5CT8PMHSNTr4tnJt5qSudfkdzpBJsnJt5qSudfkdpZ3Njvo0VuZ4uoel1qHYiSsBQzCkhILAOqzED)LSNTrPMXPCiwQHcLrCpBQzCkhILAOqz8Tse72snJt5qSudfkugeN7Lq5cIRPyrqc2mI1KDB1FVBgBryXAfzqiReMibBgAnIkInZ)h35UlqLVcNm8mK3J9xxs3wKr3Z4EUHJXzSseZ9TkyMMROBx(nYyanNmKGzAUIuZq)E3msfe66KrQGqxNhlclXUTm(LMeXUnC5c8afuqbvSur0afTb0gqdEBJh8apWd8apWlJubHUoz8lnjIDB4Yf4bkOGckZhuUBm6XfBX3h3pYkmx6ZaOFYmtue2JLF)4cuc12apqbfuqbfuqbvSur0aLeLf8afuqbfuqbfuWduqbf0TXdEBJh8apWd8apWlJubHUopPFVBgeYsfKmsOwjmZuE5T0gkdTgrbBgKxRaZ6AeveBMUA0k8Tslg7WZJJgcg)ZAXStryrWy3wEMfJ11iQiwemoDNIvSp)dkgTzqETcmD59CfPgz05H(mgpE845ymNECqJ2n4Dn(yOVErgFK5ekdQLzIIICFCYqmNv8WXAIKbhCxDBxY)NPvCQcMP5kqIm6meZzfbBggFMoD60Pthq7LHyoRyy9Zg5E4ZG8Afy(3lZeffzx5KHNH0VLMeXCFZypNms3ZvKAOmDpJNqf5EO5KbRvcttXT04D59CfPgzxJm6qHcLX9iJ2v8OdLa

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

239
WeakAuras/Projects/ABS.lua Normal file
View File

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

View 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

View 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

View 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
}

View File

@@ -0,0 +1,3 @@
/run AuctionHouseFrame.SearchBar.FavoritesSearchButton:Click()
/dump C_AuctionHouse.GetBrowseResults()

View File

@@ -0,0 +1,3 @@
function(progress)
return aura_env.Display.color.r, aura_env.Display.color.g, aura_env.Display.color.b, 1
end

View File

@@ -0,0 +1,4 @@
function()
local current, max = aura_env.ShieldManager.GetStats()
return current, max, 1
end

View File

@@ -0,0 +1,8 @@
-- TICKER_500
function()
for _, shield in pairs(aura_env.Shields) do
shield:Update()
end
aura_env.Display.Update()
return true
end

View File

@@ -0,0 +1 @@
!LVXcZPTr6Fl13K5GgmbHXy3mnzQFGJX1g8GWPjNRbTGwavlK4wjHTtUWV97BFjT6jYPjDMoDspS0U737Ns67gPnA4i9LJ0nP)hCP3ke5(FZY0FXOEAne33F2mpS)hg1dw4r(nSRNg457UCi(r)r6ZcCM6B56uP6Ml2yW)hb7hqC2yGciOXyN11p1YBLn6P6tdieSJFTm2Aj6XSw2D25R2Cb2b4ZNKCWUn3hycKZ0fUKRDTCaU4Ko9g2zaSyGV7OJfS)axFeL1sWZ3SYe5JhPhi(7e007NtCdCmpX12LaAJEAuq61K97ESFBb)wF)raPqmX1JP08reF4cQAWYXYBb)A4s6Q6MUJ5uLYrIR03D3D)fKTfYBJbJCBm(m51BmCcwobtanWC1BMeEZx2CbfYP2ipjKycFTzwyBZngtPRb75JMyJ)5quWo6BJDYjem6(vufxIJdhl0aijHXBaomY0cOzJXvO7XBm8ci4iYICsIzK9dONG)UaTgoN)ckiOLyPeTXWD2gdWBGyH9(HngVVZGpUXO7vx3FWWJ6n8hIrZFX)Pv4CLn5bL8sCww(VpdoMS9AuVDtQMw9MjH3SX4l1O0CJX7i4NsJg6oHOsRMC55jUNJqTiS9BlS8XfYvArCvs80igxHDkcpjyPg1B1srap8GiuDSDqXCu7wk6PMAkO5N2lcnxhqwzxeI0sXs7xltzRpb5mVyw6NQPINdvXt99JW0LwZx4dklxWH)5ORurOw9gQ6kRp9jeXmPwd2p86yU)mNqaJuAakp2VTy)2UMKsASD1A0OHGuxe3RhYIHwUXynIsszCtStit1YcfaC5yz))8GqkN5rNRRJpMSY1gY2XyRWu2m8wnT(X2DkYweojfKif28WRISFQm(wdBtCRi3ZBZLpMqGm0yFjN8zoXf2MpZDVObAC(iboMrfbRq3W)vYeC1Jz0mDtJb5)SMfAj(zLkvzGNBTUJ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yd2w3E9a31bDF35dLJ82hvMepga)b4gAn7PiVHq0RB9jWNRz40Y9bfqjuZhMpeF96du3NkJFDwbT)ryfUSZz)vyeAffKaA7jUetAvg(FfSfl6oCnpgbAfE)0TR4eNurziwbBohOR()narhUVZcSTftUw4jCfCFlkVU)xPdZE)9XHjphKKosz4WeovQFNDzGRwGPd8giUmySwY74qzgv1nfTHiQW7HHsqqTFHzYX1btXZsKLt6wKc8WctfD2AHgwWpYmXS1ggVBk6UpX2fzVAbIp8WSFFIpiUuyokc83fD5GOlpdQKQ0W0kI7Cc2ZRudzmf(6KA5U1883AsTWV2jRPdP6oIZpMXJ5Omvhe4YPWbiSDrSrWgEEdIBWk2Gzhy7BXAlJ6Zckuh)ulZEfaPw10cAIDkSYtP2cE6bC6fDTtV4Q1RYHOqlJttT4m(JLKdJ3mnsOE3jw0x07WXaiMIoko9uMN3rM0afSjg6b(rENn8MDoPWKhIX1gcXME)tH9GpHnJ4qiv)vYX4MQlDDMznNFT3sxx)fxlC4Oo8X5blgsiSMAgQ2kJmdPShSJLrVWZTTeZpQ(jd60PNO)ppwVLIA7ZOhcEifKpI5H9jxiAQNCs8pxj8MMLiGaq2XE9nDPZJkY5E55SmnXqVS968EAcf2AdLNN9mMGXc)7NGa1IZ8JrKF)MU7gD3U6uaeWrftF3PRLTEEqJ9ODnBbDtF0epxYepPeFSWGmspAkzh66cw3vHzbar6b()3lGHfgfoz7z)dOK7s0NcE)GLD7)aRLykhf1g6P8otzl4sSapoXtBDE)bD)p97n8Olzgytlfdov)tbGMS9mB0CVOS7uxGr6nRR1UouLAnWhTAszLr))d

View File

@@ -0,0 +1,208 @@
---@alias Color {r: number, g: number, b: number}
---@class Colorer
---@field colors table<number, Color>
---@field breakpoints table<number>
aura_env.Colorer = {
--- Make sure colors and breakpoints always have the same number of entries! VERY IMPORTANT!
---@type table<number, Color>
colors = {
{ r = 0.62, g = 0.62, b = 0.62 }, -- Grey
-- { r = 1, g = 1, b = 1 }, -- White
{ r = 0.12, g = 1, b = 0 }, -- Green
{ r = 0, g = 0.44, b = 0.87 }, -- Blue
{ r = 0.64, g = 0.21, b = 0.93 }, -- Purple
{ r = 1, g = 0.5, b = 0 }, -- Orange
{ r = 0.9, g = 0.8, b = 0.5 }, -- Light Gold
{ r = 0, g = 0.8, b = 1.0 }, -- Blizzard Blue
},
breakpoints = { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1000.0 },
---@param value number
---@return Color, nil|string
Interpolate = function(value)
local color = { r = 0, g = 0, b = 0 }
---@type table<number, table<number, number>>
local bracket = { { 0, 0 }, { 1, 1 } }
for i = 1, #aura_env.Colorer.breakpoints do
if value < aura_env.Colorer.breakpoints[i] then
bracket[2] = { i, aura_env.Colorer.breakpoints[i] }
break
end
bracket[1] = { i, aura_env.Colorer.breakpoints[i] }
end
---@type Color
local startColor = aura_env.Colorer.colors[bracket[1][1]]
---@type Color
local endColor = aura_env.Colorer.colors[bracket[2][1]]
if startColor == nil or endColor == nil then return color, "Color not found" end
local fraction = (value - bracket[1][2]) / (bracket[2][2] - bracket[1][2])
for k, v in pairs(startColor) do
color[k] = aura_env.Colorer.lerp(v, endColor[k], fraction)
end
return color, nil
end,
---@param a number
---@param b number
---@param t number
---@return number
lerp = function(a, b, t) return a * (1 - t) + b * t end,
}
setmetatable(aura_env.Colorer, { __index = aura_env.Colorer })
---@class ShieldBuffer
---@field records table<number, number>
---@field recordsToKeep number
---@field pointer number
aura_env.ShieldBuffer = {
---@param recordsToKeep number
---@return ShieldBuffer
new = function(recordsToKeep)
local self = setmetatable({}, {
__index = aura_env.ShieldBuffer,
})
self.recordsToKeep = recordsToKeep
self.records = {}
self.pointer = 1
for i = 1, recordsToKeep do
self.records[i] = 0
end
return self
end,
---@param self ShieldBuffer
---@param shieldValue number
---@return nil
Append = function(self, shieldValue)
self.records[self.pointer] = shieldValue
self.pointer = (self.pointer % self.recordsToKeep) + 1
end,
---@param self ShieldBuffer
---@return number
GetMax = function(self)
local max = 0
for _, value in pairs(self.records) do
if value > max then max = value end
end
if max == nil then return 0 end
return max
end,
---@param self ShieldBuffer
---@return number
GetCurrent = function(self)
local val = self.records[(self.pointer + self.recordsToKeep - 2) % self.recordsToKeep + 1]
if val == nil then return 0 end
return val
end,
}
---@class Shield
---@field name string
---@field value number
---@field buffer ShieldBuffer
aura_env.Shield = {
---@param name string
---@return Shield
new = function(name)
local self = setmetatable({}, {
__index = aura_env.Shield,
})
self.name = name
self.value = 0
self.buffer = aura_env.ShieldBuffer.new(30)
return self
end,
---@param self Shield
---@return nil, nil|string
Update = function(self)
local shieldValue = select(17, UnitAura("player", self.name))
if shieldValue then
self.value = shieldValue
else
self.value = 0
end
self.buffer:Append(self.value)
end,
}
---@class ShieldManager
aura_env.ShieldManager = {
---@return number
GetMax = function()
local value = 0
for _, shield in pairs(aura_env.Shields) do
value = value + shield.buffer:GetMax()
end
return value
end,
---@return number
GetCurrent = function()
local value = 0
for _, shield in pairs(aura_env.Shields) do
value = value + shield.buffer:GetCurrent()
end
return value
end,
---@return number current
---@return number max
GetStats = function()
local max = 0
local current = 0
for _, shield in pairs(aura_env.Shields) do
max = max + shield.buffer:GetMax()
current = current + shield.buffer:GetCurrent()
end
return current, max
end,
---@return string current
---@return string max
---@return number current (raw)
---@return number max (raw)
GetStatsNice = function()
local current, max = aura_env.ShieldManager.GetStats()
if max > 1e6 or current > 1e6 then
return string.format("%.1fM", current / 1e6), string.format("%.1fM", max / 1e6), current, max
end
return string.format("%.0fk", current / 1000), string.format("%.0fk", max / 1000), current, max
end,
}
---@class Display
---@field current number
---@field max number
---@field currentRaw number
---@field maxRaw number
---@field ofHp string
---@field ofHpRaw number
---@field ofHpRawFraction number
---@field color Color
aura_env.Display = {
Update = function()
local current, max, currentRaw, maxRaw = aura_env.ShieldManager.GetStatsNice()
local hp = UnitHealthMax("player")
aura_env.Display.current = current
aura_env.Display.max = max
aura_env.Display.currentRaw = currentRaw
aura_env.Display.maxRaw = maxRaw
aura_env.Display.ofHpRaw = currentRaw / hp * 100
aura_env.Display.ofHpRawFraction = aura_env.Display.ofHpRaw / 100
aura_env.Display.ofHp = string.format("%.0f%%", aura_env.Display.ofHpRaw)
aura_env.Display.color = aura_env.Colorer.Interpolate(aura_env.Display.ofHpRawFraction)
return nil
end,
}
---@type table<Shield>
aura_env.Shields = {
[108366] = aura_env.Shield.new("Soul Leech"),
[108416] = aura_env.Shield.new("Dark Pact"),
[207472] = aura_env.Shield.new("Xavaric's Magnum Opus"),
[252208] = aura_env.Shield.new("Refractive Shell"),
}

View File

@@ -0,0 +1,28 @@
---@param table table
---@param depth number?
function DumpTable(table, depth)
if depth == nil then depth = 0 end
if depth > 200 then
print("Error: Depth > 200 in dumpTable()")
return
end
for k, v in pairs(table) do
if type(v) == "table" then
print(string.rep(" ", depth) .. k .. ":")
DumpTable(v, depth + 1)
else
print(string.rep(" ", depth) .. k .. ": ", v)
end
end
end
local colorer = Colorer.new()
local value = 1.21
local rgb = colorer:Interpolate(value)
for i = 1, 150 do
local value = i / 100
local rgb = colorer:Interpolate(value)
print(value, rgb.r, rgb.g, rgb.b)
end

View File

@@ -0,0 +1,3 @@
function()
return aura_env.Display.current, aura_env.Display.max, aura_env.Display.ofHp
end

View File

@@ -0,0 +1,5 @@
--- PLAYER_TARGET_CHANGED
--- Deprecated in favor of Heimdall.AchievementSniffer
--function(allstates)
-- aura_env.TryInspect()
--end

View File

@@ -0,0 +1,16 @@
--- INSPECT_ACHIEVEMENT_READY
--- Deprecated in favor of Heimdall.AchievementSniffer
--function()
-- local targetGuid = UnitGUID("target")
-- if not targetGuid then return end
-- if not string.match(targetGuid, "Player") then return end
-- local targetName = UnitName("target")
--
-- local should = false
-- if not WeakAurasSaved.Cyka.AchievementSniffer[targetName] then should = true end
-- if WeakAurasSaved.Cyka.AchievementSniffer2[targetName] then should = false end
-- if aura_env.config.rescan then should = true end
-- if not should then return end
--
-- aura_env.Scan(targetName)
--end

View File

@@ -0,0 +1,4 @@
-- TICKER_500
function()
aura_env.TryInspect()
end

View File

@@ -0,0 +1,32 @@
--- TICKER_200
function(allstates)
for i = 0, 40 do
local unit = "nameplate" .. i
if UnitIsPlayer(unit) then
local name = UnitName(unit)
local seen = false
if not Heimdall_Achievements then return end
if not Heimdall_Achievements.players then return end
if not Heimdall_Achievements.alreadySeen then return end
if Heimdall_Achievements.players[name] then seen = true end
if Heimdall_Achievements.alreadySeen[name] then seen = true end
allstates[unit] = {
show = true,
changed = true,
name = name,
unit = unit,
seen = seen,
}
else
allstates[unit] = {
show = false,
changed = true,
seen = false,
}
end
end
return true
end

View File

@@ -0,0 +1,3 @@
{
seen = "bool",
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,135 @@
main achievement frame is AchievementFrame
The tabs are
AchievementFrameTab1 2 3
First is "Achievements", 2nd guild and 3rd statistics
Statistics might also be useful but that would be hard to tell, for now
AchievementFrame > AchievementFrameComparison
The comparison frame is AchievementFrameComparisonContainer (N/A)
Scroll buttons are AchievementFrameComparisonContainerScrollBarScrollDownButton (scrollDown) and AchievementFrameComparisonContainerScrollBarScrollUpButton (scrollUp)
The actual individual achievement data is in
AchievementFrameComparisonContainerScrollChild (ScrollChild) (not a typo)
It has achievements listed as:
AchievementFrameComparisonContainerButton1 .. 10
Always seems to be 10
Scrolling should move 1 new into the view and 1 old out of view
The buttons themselves represent one row (one achievement)
Our achievement is found in
AchievementFrameComparisonContainerButton1Player (player)
AchievementFrameComparisonContainerButton1Friend (friend)
Ours has names while friend has no names
So we will have to use names from Player and dates from Friend
Name, title, is under AchievementFrameComparisonContainerButton1PlayerLabel (label)
Friend date achieved is under AchievementFrameComparisonContainerButton1FriendStatus (status)
We can also get achievement ID from the button frame
AchievementFrameComparisonContainerButton1P under the "id" property
Categories are under
AchievementFrameCategories (N/A) > AchievementFrameCategoriesContainer (N/A)
Structure is the same as AchievementFrameComparisonContainer
We have scroll child and scroll up/down
Although there's no scrolling so I'm not sure what we scroll
Not true - the buttons are categories to be expanded into
And clicking one does expand
So after we click we have to recalculate their positions
In AchievementFrameCategoriesContainer we have many buttons which correspond to categories
The best way of browsing them that I can see is reading the title of each
Since we are only interested in a few
AchievementFrameCategoriesContainerButton1 .. n
The title is the same structure as the achievement title
AchievementFrameCategoriesContainerButton1Label (label)
Under each button of course
We can also get the category ID and name from the button frame
AchievementFrameCategoriesContainerButton1
Under "categoryID" and "name"
[11:20 PM] [Virag's DT]: 23:20:04 INSPECT_ACHIEVEMENT_READY - (2) table: 000001AF07021540
Fires when the achievement frame is ready
Argument #2 is the GUID of the player
None is fired when the frame is closed...
I guess we'll have to check each frame we go over
See
canInspect = CanInspect("unit", showError)
Arguments:
unit - A unit to inspect (string, unitID)
showError - True to fire a UI_ERROR_MESSAGE event (causing the default UI to display an error message) if the unit cannot be inspected; otherwise false (boolean)
Returns:
canInspect - 1 if the unit can be inspected; otherwise nil (1nil)
Actually nevermind, this seems much easier and simpler:
completed, month, day, year = GetAchievementComparisonInfo(achievementID)
completed
boolean - Returns true/false depending on whether the unit has completed the achievement or not.
month
number - Month in which the unit has completed the achievement. Returns nil if completed is false.
day
number - Day of the month in which the unit has completed the achievement. Returns nil if completed is false.
year
number - Year (two digits, 21st century is assumed) in which the unit has completed the achievement. Returns nil if completed is false.
Only accurate after the after SetAchievementComparisonUnit is called and the INSPECT_ACHIEVEMENT_READY event has fired.
success = SetAchievementComparisonUnit(unit)
success
boolean - Returns true/false depending on whether the unit is valid.
-> INSPECT_ACHIEVEMENT_READY
522 -- Somebody Likes Me
523 -- 5 Exalted Reputations
524 -- 10 Exalted Reputations
521 -- 15 Exalted Reputations
520 -- 20 Exalted Reputations
519 -- 25 Exalted Reputations
518 -- 30 Exalted Reputations
1556 -- 25 Fish
1557 -- 50 Fish
1558 -- 100 Fish
238 -- An Honorable Kill
513 -- 100 Honorable Kills
515 -- 500 Honorable Kills
516 -- 1000 Honorable Kills
512 -- 5000 Honorable Kills
509 -- 10000 Honorable Kills
239 -- 25000 Honorable Kills
503 -- 50 Quests Completed
504 -- 100 Quests Completed
505 -- 250 Quests Completed
506 -- 500 Quests Completed
507 -- 1000 Quests Completed
1017 -- Can I Keep Him?
15 -- Plenty of Pets
1248 -- Plethora of Pets
1250 -- Shop Smart, Shop Pet...Smart
2516 -- Lil' Game Hunter
5876 -- Petting Zoo
11188 -- Broken Isles Explorer
11190 -- Broken Isles Pathfinder, Part One
11157 -- Loremaster of Legion
10763 -- Azsuna Matata
10790 -- Vrykul Story, Bro
11124 -- Good Suramaritan
10059 -- Ain't No Mountain High Enough
10698 -- That's Val'sharah Folks!
10672 -- Broken Isles Diplomat
10665 -- Explore Azsuna
10666 -- Explore Val'sharah
10667 -- Explore Highmountain
10668 -- Explore Stormheim
10669 -- Explore Suramar
12069 -- Explore Argus
2141 -- Stable Keeper
2142 -- Filling Up The Barn
2143 -- Leading the Cavalry
7382 -- Dynamic Duo
7383 -- Terrific Trio
7384 -- Quintessential Quintet
245 -- That Takes Class

View File

@@ -0,0 +1,223 @@
---@class aura_env
---@field achievements table<number, string>
---@field Scan fun(playerName: string)
---@field TryInspect fun()
---@class WeakAurasSaved
---@field Cyka table<string, table<string, table<number, string>>>
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
if not WeakAurasSaved.Cyka.AchievementSniffer then WeakAurasSaved.Cyka.AchievementSniffer = {} end
if not WeakAurasSaved.Cyka.AchievementSniffer2 then WeakAurasSaved.Cyka.AchievementSniffer2 = {} end
for k, v in pairs(WeakAurasSaved.Cyka.AchievementSniffer2) do
if WeakAurasSaved.Cyka.AchievementSniffer[k] then WeakAurasSaved.Cyka.AchievementSniffer[k] = nil end
end
aura_env.achievements = {
15,
153,
245,
506,
507,
513,
524,
648,
649,
651,
655,
657,
660,
661,
667,
668,
669,
671,
676,
678,
681,
682,
697,
777,
958,
974,
975,
1017,
1266,
1556,
1557,
1558,
1576,
2078,
2141,
2200,
4477,
4478,
4624,
4914,
4958,
4960,
5455,
5456,
5749,
5752,
6456,
6460,
6753,
6757,
6758,
6835,
7382,
7383,
7384,
7437,
7948,
8929,
8952,
8956,
8966,
8967,
8969,
8978,
8979,
8980,
8981,
8982,
8983,
9017,
9038,
9132,
9493,
9507,
10059,
10079,
10278,
10460,
10581,
10585,
10595,
10597,
10617,
10657,
10666,
10667,
10668,
10672,
10682,
10684,
10688,
10689,
10692,
10693,
10698,
10706,
10746,
10755,
10756,
10763,
10772,
10775,
10790,
10800,
10818,
10819,
10820,
10875,
10994,
11124,
11126,
11127,
11128,
11153,
11157,
11164,
11188,
11189,
11190,
11214,
11220,
11298,
11338,
11394,
11446,
11473,
11545,
11559,
11610,
11611,
11653,
11657,
11658,
11659,
11660,
11674,
11773,
11787,
11789,
11790,
11796,
11992,
11993,
11994,
11995,
11996,
11997,
11998,
11999,
12000,
12001,
12008,
12015,
12020,
12026,
12028,
12030,
12072,
12074,
12085,
12086,
12103,
12110,
12445,
12447,
12448,
}
aura_env.TryInspect = function()
local targetPlayer = UnitIsPlayer("target")
if not targetPlayer then return end
local targetName = UnitName("target")
local should = false
if not WeakAurasSaved.Cyka.AchievementSniffer[targetName] then should = true end
if WeakAurasSaved.Cyka.AchievementSniffer2[targetName] then should = false end
if aura_env.config.rescan then should = true end
if not should then return end
local canInspect = CheckInteractDistance("target", 1)
if canInspect then SetAchievementComparisonUnit("target") end
end
---@param playerName string
aura_env.Scan = function(playerName)
WeakAurasSaved.Cyka.AchievementSniffer[playerName] = {}
for i, aid in ipairs(aura_env.achievements) do
local completed, month, day, year = GetAchievementComparisonInfo(aid)
if completed then
---@type string
local yearstr = "" .. year
if year < 100 then yearstr = "20" .. year end
local date = string.format("%04d-%02d-%02d", yearstr, month, day)
local data = {
id = aid,
date = date,
completed = completed,
}
WeakAurasSaved.Cyka.AchievementSniffer[playerName][aid] = data
end
end
end
--/run WeakAurasSaved.Cyka.AchievementSniffer = {}
--/dump WeakAurasSaved.Cyka.AchievementSniffer["Pinkleta"]

View File

@@ -0,0 +1,7 @@
local year = 20
local month = 7
local day = 12
if year < 100 then year = "20" .. year end
print(string.format("%4d-%02d-%02d", year, month, day))

View File

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

View File

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

View File

@@ -0,0 +1,14 @@
-- CHAT_MSG_SYSTEM
function(e, msg)
if msg == nil then return false end
if string.find(msg, "You are now Away") then
aura_env.KickTime = time() + 30 * 60
aura_env.AfkSince = time()
return true
end
if string.find(msg, "You are no longer Away") then
aura_env.KickTime = 0
aura_env.AfkSince = 0
return false
end
end

View File

@@ -0,0 +1,16 @@
-- TICKER_500
function(e)
local timeToKick = aura_env.KickTime - time()
if timeToKick > 0 and timeToKick < 10 * 60 then
WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\Sounds\\quack.ogg")
-- SendChatMessage("QUACK", "WHISPER", nil, UnitName("player"))
end
local rewardClaimed = WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].claimed
local onlineTime = WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].onlineTimeInMinutes
if rewardClaimed == 0 and onlineTime >= 120 then
WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\Sounds\\quack.ogg")
end
return aura_env.KickTime > 0
end

View File

@@ -0,0 +1,3 @@
function(e)
return math.floor(time() - aura_env.AfkSince), math.floor(aura_env.KickTime - aura_env.AfkSince), 1
end

View File

@@ -0,0 +1 @@
!DF16ZPTrq8)xyMoJDBWdVmjzMMoJmgceJfUCIy7wxHoKojUG4oYPt(r(G(BV79qGWXoXjFOFOd2cXQD3BF8BFi)M(E(O1(Oi1FWTzBWIvxsJKl9DB2W(7jXXze5v(UabCUCjxmzJKYzzGesF0dMNBEmleE8fCkdEqV(UE9NAvYuUeResZ2EuoNhr8roZ8M4JOHahl8rsbnjHiuNGR2gTe03(WgG)W8mjhS8S8fKBjmjkpoMEVpAEphK3CKNZuG1OCH5qrnpUbCUAo9rdj4uWd3k7fcIww0f9hpUu1Zxsv2LKUMezLmd8PHoEZph9(5ORrE9px5kK00rr2yrPvvVErWJyT4dX5SqL1Ca5vfbRZsoS4dfbMp0ynLIG39UIagnTiqUKWkceezUa(ogNMrkciSO9LjdIlSKJIPSOda5b9w7AEErawaCZ43ve4Ch(HAhA13wzl)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TIH24yBlSixas3p92zJkcojfZwb2ffMpqVUZq2XYRw17Zwj9k5E3S1EyamYsoblUz2O67(vDK2ouV8dxxhWdVTCoXRB0wLcvNHZGZudcfLq2bcyIQX3r9M2VVlmgtrcwOdlX6wd3zEvR3QuboDZsdvT917Lm0szg65jFHdtovbuUGcBqy3MB4KPJ(RjUEoJ1r6iALxBdZORnSPc0sSqUB6cJZi7E7j7owzeLkYuYUgtzVCUHL5PzlFX8lntZng6wlt7UuTngXNBxv4KDln8SB8)mB4VVHLPQeQcfCIIMWYUz7Yz3CojIIlx(6e(9aYWrqyynf1AyvTRf6Fyu6IT1M(Owh1S7rT9r3cjWoTu5q))n

View File

@@ -0,0 +1,6 @@
aura_env.KickTime = 0
aura_env.AfkSince = 0
WeakAurasSaved.Cyka.LoginInfo = {
[Today] = WeakAurasSaved.Cyka.LoginInfo[Today] or {},
}

View File

@@ -0,0 +1,3 @@
function(t)
return t[2]
end

View File

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

View File

@@ -0,0 +1,26 @@
--Display every frame for text
--Every frame
function()
print(aura_env.peopleList[aura_env.currentInterrupt])
if aura_env.peopleList[aura_env.currentInterrupt] == UnitName("player") then
if UnitCastingInfo("Belac") then
local sname = UnitCastingInfo("Belac")
if sname == "Phangs of Guilt" then
return "Interrupt it reeee"
end
end
if UnitDebuff("player", "Belac's Prisoner") or UnitIsDead("player") then --If is in cage
local msg = aura_env.messages["Cannot Interrupt"]
local msg = aura_env.encode(msg)
SendChatMessage(msg, "RAID")
aura_env.currentInterrupt = aura_env.currentInterrupt + 1
end
if GetTime() < aura_env.interruptTime then --If is on cooldown
local msg = aura_env.messages["Cannot Interrupt"]
local msg = aura_env.encode(msg)
SendChatMessage(msg, "RAID")
aura_env.currentInterrupt = aura_env.currentInterrupt + 1
end
return "You're next"
end
end

View File

@@ -0,0 +1,40 @@
aura_env.interruptTime = 0
aura_env.interruptCD = 24
aura_env.peopleList = {}
aura_env.currentInterrupt = 1
local playerClass = UnitClass("player")
if playerClass == "Hunter" then
aura_env.classInterrupt = "Counter Shot" elseif
playerClass == "Mage" then
aura_env.classInterrupt = "Counterspell" elseif
playerClass == "Warlock" then
aura.classInterrupt = "Spell Lock"
end
aura_env.messages =
{
["Interrupted"] = 9461,
["Cannot Interrupt"] = 9462,
["Initialized"] = 9451,
["Added to interrupt list"], = 9452,
["Cycle Interrupt DEBUG"] = 9551
}
aura_env.encode = function(msg)
local date = date()
local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)") --15:37:43
local hr = localtime:match("(%d%d)")
local min = localtime:match("%d%d%p(%d%d)")
local retmsg = msg - (hr * min)
retmsg = tostring(retmsg)
return retmsg
end
aura_env.decode = function(msg)
local date = date()
local localtime = date:match("%d%d%/%d%d%/%d%d%s(%d%d%p%d%d%p%d%d)") --15:37:43
local hr = localtime:match("(%d%d)")
local min = localtime:match("%d%d%p(%d%d)")
tonumber(msg)
local retint = msg + (hr * min)
return retint
end

View File

@@ -0,0 +1,28 @@
[02:39 PM] [Virags DT]: 14:35:39 UNIT_SPELLCAST_INTERRUPTED - (6) table: 000000004830D3C0 --seems to only work on player
[02:39 PM] [Virags DT]: 1 - UNIT_SPELLCAST_INTERRUPTED
[02:39 PM] [Virags DT]: 2 - player
[02:39 PM] [Virags DT]: 3 - Flash of Light
[02:39 PM] [Virags DT]: 5 - 3-5-1-0-19750-00000056B2
[02:39 PM] [Virags DT]: 6 - 19750
[02:40 PM] [Virags DT]: 14:35:50 COMBAT_LOG_EVENT_UNFILTERED - (18) table: 00000000543D23B0 -- realistically the only important one since the only interrupts are outgoing
[02:40 PM] [Virags DT]: 1 - COMBAT_LOG_EVENT_UNFILTERED
[02:40 PM] [Virags DT]: 2 - 1549632949.728
[02:40 PM] [Virags DT]: 3 - SPELL_INTERRUPT
[02:40 PM] [Virags DT]: 4 - false
[02:40 PM] [Virags DT]: 5 - Player-5-000AD3B6
[02:40 PM] [Virags DT]: 6 - Pinkiepiie
[02:40 PM] [Virags DT]: 7 - 1297
[02:40 PM] [Virags DT]: 8 - 0
[02:40 PM] [Virags DT]: 9 - Player-5-000A70EF
[02:40 PM] [Virags DT]: 10 - Lilithiy
[02:40 PM] [Virags DT]: 11 - 66888
[02:40 PM] [Virags DT]: 12 - 0
[02:40 PM] [Virags DT]: 13 - 96231
[02:40 PM] [Virags DT]: 14 - Rebuke
[02:40 PM] [Virags DT]: 15 - 1
[02:40 PM] [Virags DT]: 16 - 116
[02:40 PM] [Virags DT]: 17 - Frostbolt
[02:40 PM] [Virags DT]: 18 - 16

View File

@@ -0,0 +1,18 @@
--The interrupt detection trigger
--COMBAT_LOG_EVENT_UNFILTERED
function(...)
local subevent = select(3, ...)
if subevent == "SPELL_INTERRUPT" then
local playerName = select(6, ...)
local targetName = select(10, ...)
local spellName = select(14, ...)
local interruptedSpellName = select(17, ...)
if playerName == UnitName("player") and targetName == "Belac" and and interruptedSpellName == "Phangs of Guilt" then
local msg = aura_env.messages["Interrupted"]
local msg = aura_env.encode(msg)
SendChatMessage(msg, "RAID")
aura_env.currentInterrupt = aura_env.currentInterrupt + 1
aura_env.interruptTime = GetTime() + aura_env.interruptCD
end
end
end

View File

@@ -0,0 +1,40 @@
--The encoding trigger
--CHAT_MSG_RAID, CHAT_MSG_RAID_LEADER
function(_,msg,sender)
local sender = string.match(sender, "%a+")
local returnMessage = aura_env.decode(msg)
if returnMessage == aura_env.messages["Initialized"] then
local isfound = 0
for k,v in pairs(aura_env.peopleList) do
if v == UnitName("player") then
isfound = 1
break
end
end
if isfound == 0 then
aura_env.peopleList[#aura_env.peopleList + 1] = UnitName("player")
end
local msg = aura_env.messages["Added to interrupt list"]
local msg = aura_env.encode(msg)
SendChatMessage(msg, "RAID")
end
if returnMessage == aura_env.messages["Added to interrupt list"] then
local isfound = 0
for k,v in pairs(aura_env.peopleList) do
if v == sender then
isfound = 1
break
end
end
if isfound == 0 then
aura_env.peopleList[#aura_env.peopleList + 1] = sender
end
end
if returnMessage == aura_env.messages["Interrupted"] then
aura_env.currentInterrupt = aura_env.currentInterrupt + 1
end
if returnMessage == aura_env.messages["Cycle Interrupt DEBUG"] then
aura_env.currentInterrupt = aura_env.currentInterrupt + 1
end
return true
end

View File

@@ -0,0 +1,15 @@
--Trigger for raid wide initialization
--CHAT_MSG_WHISPER
function(_,msg,sender)
local sender = string.match(sender, "%a+")
if sender == "Pinkiepiie" and msg == "init_the_thing_i_guess_101_?" then
local msg = aura_env.messages["Initialized"]
local msg = aura_env.encode(msg)
SendChatMessage(msg, "RAID")
end
if sender == "Pinkiepiie" and msg == "cycle_interrupt_debug" then
local msg = aura_env.messages["Cycle Interrupt DEBUG"]
local msg = aura_env.encode(msg)
SendChatMessage(msg, "RAID")
end
end

View File

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

View File

@@ -0,0 +1,7 @@
-- CHAT_MSG_LOOT
function(allstates, e, msg)
if msg:match("You receive loot") then
DrawIcon(msg, allstates)
return true
end
end

View File

@@ -0,0 +1,46 @@
local iconDisplayDuration = 3
---@alias CItemInfo {name: string, icon: number, quantity: number, color: string}
---@param msg string
---@return CItemInfo, string | nil
GetItemInfo = function(msg)
local itemInfo = { name = "", icon = 134400, quantity = 0, color = "" }
local name = msg:match("h%[(.+)%]")
if not name then return itemInfo, "No item name found" end
local quantity = msg:match("x(%d+)") or 1
itemInfo.name = name
itemInfo.quantity = quantity
if WeakAurasSaved.Cyka.ItemCache[name] then itemInfo.icon = WeakAurasSaved.Cyka.ItemCache[name].icon end
local color = msg:match("cff(%w%w%w%w%w%w)") or "ffffff"
itemInfo.color = color
return itemInfo, nil
end
---@param msg string
---@param allstates allstates
DrawIcon = function(msg, allstates)
local info, err = GetItemInfo(msg)
if err then
print(err)
return
end
local formattedName = "\124cff" .. info.color .. "[" .. info.name .. "]\124r x" .. info.quantity
allstates[#aura_env.allstates + 1] = {
show = true,
changed = true,
index = GetTime(),
resort = true,
icon = info.icon,
name = formattedName,
progressType = "timed",
expirationTime = GetTime() + iconDisplayDuration,
duration = iconDisplayDuration,
autoHide = true,
}
end

View File

@@ -0,0 +1,6 @@
-- LOOT_READY
function(e)
C_Timer.After(0.1, function()
WeakAuras.ScanEvents("DO_AUTOLOOT")
end)
end

View File

@@ -0,0 +1,6 @@
-- DO_AUTOLOOT
function(e)
local lootInfo = GetLootInfo()
aura_env.FilterService.Run(lootInfo)
CloseLoot()
end

View File

@@ -0,0 +1,829 @@
local debug = false
if not WeakAurasSaved then WeakAurasSaved = {} end
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
if not WeakAurasSaved.Cyka.ItemCache then WeakAurasSaved.Cyka.ItemCache = {} end
---@param slot number
---@return string, string|nil
local function getItemLink(slot)
if slot == nil then return "", string.format("Slot can not be nil") end
local link = GetLootSlotLink(slot)
if link == nil then return "", string.format("GetLootSlotLink returned nil for slot %d", slot) end
return link, nil
end
---@param slot number
---@return string, string|nil
local function getItemName(slot)
if slot == nil then return "", string.format("Slot can not be null") end
local name = select(2, GetLootSlotInfo(slot))
if name == nil then return "", string.format("GetLootSlotInfo returned nil for slot %d", slot) end
return name, nil
end
---@param slot number
---@return string, string|nil
local function getItemType(slot)
if slot == nil then return "", string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return "", err end
local itemType = select(6, GetItemInfo(itemLink))
if itemType == nil then return "", string.format("GetItemInfo returned nil for slot %d", slot) end
return itemType, nil
end
---@param slot number
---@return string, string|nil
local function getItemSubtype(slot)
if slot == nil then return "", string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return "", err end
local itemSubtype = select(7, GetItemInfo(itemLink))
if itemSubtype == nil then return "", string.format("GetItemInfo returned nil for slot %d", slot) end
return itemSubtype, nil
end
---@param slot number
---@return number, string|nil
local function getItemLevel(slot)
if slot == nil then return 0, string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return 0, err end
local itemLevel = select(4, GetItemInfo(itemLink))
if itemLevel == nil then return 0, string.format("GetItemInfo returned nil for slot %d", slot) end
return itemLevel, nil
end
---The vendor price in copper, or 0 for items that cannot be sold
---@param slot number
---@return number, string|nil
local function getItemValue(slot)
if slot == nil then return 0, string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return 0, err end
local value = select(11, GetItemInfo(itemLink))
if value == nil then return 0, string.format("GetItemInfo returned nil for slot %d", slot) end
return value, nil
end
---@param slot number
---@return number, string|nil
local function getItemSubclassId(slot)
if slot == nil then return 0, string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return 0, err end
local subclassId = select(13, GetItemInfo(itemLink))
if subclassId == nil then return 0, string.format("GetItemInfo returned nil for slot %d", slot) end
return subclassId, nil
end
---@param slot number
---@return number, string|nil
local function getItemQuantity(slot)
if slot == nil then return 0, string.format("Slot can not be nil") end
local quantity = select(3, GetLootSlotInfo(slot))
if quantity == nil then return 0, string.format("GetLootSlotInfo returned nil for slot %d", slot) end
return quantity, nil
end
---@param slot number
---@return Enum.ItemQuality, string|nil
local function getItemQuality(slot)
if slot == nil then return 0, string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return 0, err end
local quality = select(3, GetItemInfo(itemLink))
if quality == nil then return 0, string.format("GetItemInfo returned nil for slot %d", slot) end
return quality, nil
end
---@param slot number
---@return string, string|nil
local function getItemEquipLocation(slot)
if slot == nil then return "", string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return "", err end
local equipLoc = select(9, GetItemInfo(itemLink))
if equipLoc == nil then return "", string.format("GetItemInfo returned nil for slot %d", slot) end
return equipLoc, nil
end
---@param slot number
---@return number, string|nil
local function getItemIcon(slot)
if slot == nil then return 134400, string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return 134400, err end
local icon = select(10, GetItemInfo(itemLink))
if icon == nil then return 134400, string.format("GetItemInfo returned nil for slot %d", slot) end
return icon, nil
end
---@param slot number
---@return number, string|nil
local function getBindType(slot)
if slot == nil then return 0, string.format("Slot can not be nil") end
local itemLink, err = getItemLink(slot)
if err then return 0, err end
local bindType = select(14, GetItemInfo(itemLink))
if bindType == nil then return 0, string.format("GetItemInfo returned nil for slot %d", slot) end
return bindType, nil
end
---@class Filter
---@field requires table<string, fun(slot: number): string|number|boolean> | nil
---@field filter fun(slot: number, provided: table<string, string|number|boolean>): boolean
Filter = {
---@param requires table<string, fun(slot: number): string|number|boolean> | nil
---@param filter fun(slot: number, provided: table<string, string|number|boolean>): boolean
---@return Filter
new = function(requires, filter)
local self = setmetatable({}, {
__index = Filter,
})
self.requires = requires
self.filter = filter
return self
end,
---@param self Filter
---@param slot number
---@return boolean, string|nil
Run = function(self, slot)
---@type table<string, string|number|boolean>
local provided = {}
if self.requires then
for k, v in pairs(self.requires) do
local res, err = v(slot)
if err ~= nil then
if debug then print(err) end
return false, err
end
provided[k] = res
end
end
local res, err = self.filter(slot, provided)
if err ~= nil then
if debug then print(err) end
end
return res, nil
end,
}
local goldFilter = Filter.new({ ["name"] = getItemName }, function(slot, provided)
---@cast provided { name: string }
if not aura_env.config.goldFilter then return false end
if
string.find(provided.name, "Gold")
or string.find(provided.name, "Silver")
or string.find(provided.name, "Copper")
then
if debug then print(string.format("Gold filter pass for %s", provided.name)) end
return true
end
if debug then print(string.format("Gold filter fail for %s", provided.name)) end
return false
end)
local orderResourcesFilter = Filter.new({ ["name"] = getItemName }, function(slot, provided)
---@cast provided { name: string }
if not aura_env.config.orderResourcesFilter then return false end
if string.find(provided.name, "Order Resources") then
if debug then print(string.format("Order resource filter pass for %s", provided.name)) end
return true
end
if debug then print(string.format("Order resource filter fail for %s", provided.name)) end
return false
end)
local mountFilter = Filter.new({ ["type"] = getItemType }, function(slot, provided)
---@cast provided { type: string }
if not aura_env.config.mountFilter then return false end
if provided.type == "Mount" then
if debug then print(string.format("Mount filter pass for type %s", provided.type)) end
return true
end
if debug then print(string.format("Mount filter fail for type %s", provided.type)) end
return false
end)
local ilvlFilter = Filter.new({ ["ilvl"] = getItemLevel }, function(slot, provided)
---@cast provided { ilvl: number }
if not aura_env.config.ilvlFilter then return false end
if provided.ilvl and provided.ilvl > aura_env.config.ilvlFilterThreshold then
if debug then print(string.format("ilvl filter pass for ilvl %d", provided.ilvl)) end
return true
end
if debug then print(string.format("ilvl filter fail for ilvl %d", provided.ilvl)) end
return false
end)
local professionFilter = Filter.new({
["type"] = getItemType,
["subtype"] = getItemSubtype,
}, function(slot, provided)
---@cast provided { type: string, subtype: string }
if not aura_env.config.professionFilter then return false end
local enabled = {
["Cloth"] = aura_env.config.professionFilterProfessions[1],
["Cooking"] = aura_env.config.professionFilterProfessions[2],
["Enchanting"] = aura_env.config.professionFilterProfessions[3],
["Herb"] = aura_env.config.professionFilterProfessions[4],
["Inscription"] = aura_env.config.professionFilterProfessions[5],
["Jewelcrafting"] = aura_env.config.professionFilterProfessions[6],
["Leather"] = aura_env.config.professionFilterProfessions[7],
["Metal & Stone"] = aura_env.config.professionFilterProfessions[8],
["Ore"] = aura_env.config.professionFilterProfessions[9],
}
-- Maybe implement an expansion based filter
if provided.type == "Tradeskill" then
if enabled[provided.subtype] then
if debug then print(string.format("Profession filter pass for type %s", provided.type)) end
return true
end
end
if debug then print(string.format("Profession filter fail for type %s", provided.type)) end
return false
end)
local valueFilter = Filter.new({
["value"] = getItemValue,
["quantity"] = getItemQuality,
}, function(slot, provided)
---@cast provided { value: number, quantity: number }
if not aura_env.config.valueFilter then return false end
local valueThreshold = aura_env.config.valueFilterThreshold
local value = provided.value
if aura_env.config.valueFilterApplyValueToStack then value = value * provided.quantity end
if value > valueThreshold then
if debug then print(string.format("Value filter pass for value %d", value)) end
return true
end
if debug then print(string.format("Value filter fail for value %d", value)) end
return false
end)
local greyValueFilter = Filter.new({
["quality"] = getItemQuality,
["value"] = getItemValue,
["quantity"] = getItemQuantity,
}, function(slot, provided)
---@cast provided { quality: number, value: number, quantity: number }
if not aura_env.config.greyValueFilter then return false end
local valueThreshold = aura_env.config.greyValueFilterThreshold
if provided.quality == 0 then
local value = provided.value
if aura_env.config.greyValueFilterApplyValueToStack then value = value * provided.quantity end
if value > valueThreshold then
if debug then
print(string.format("Grey value filter pass for value %d of %s quality items", value, provided.quality))
end
return true
end
end
if debug then
print(
string.format("Grey value filter fail for value %d of %s quality items", provided.value, provided.quality)
)
end
return false
end)
local questItemFilter = Filter.new({
["type"] = getItemType,
["subtype"] = getItemSubtype,
}, function(slot, provided)
---@cast provided { type: string, subtype: string }
if not aura_env.config.questItemsFilter then return false end
if provided.type == "Quest" and provided.subtype == "Quest" then
if debug then
print(string.format("Quest item filter pass for type %s and subtype", provided.type, provided.subtype))
end
return true
end
if debug then
print(string.format("Quest item filter fail for type %s and subtype", provided.type, provided.subtype))
end
return false
end)
local classGearFilter = Filter.new({
["ilvl"] = getItemLevel,
["quality"] = getItemQuality,
["type"] = getItemType,
["subtype"] = getItemSubtype,
["equiploc"] = getItemEquipLocation,
}, function(slot, provided)
---@cast provided { ilvl: number, quality: number, type: string, subtype: string, equiploc: string }
if not aura_env.config.classGearFilter then return false end
local ilvlThreshold = aura_env.config.classGearFilterIlvlThreshold
local qualityThreshold = aura_env.config.classGearFilterQualityThreshold
local isEquippable = aura_env.skills[select(3, UnitClass("player"))][provided.subtype] == 1
if isEquippable and provided.ilvl > ilvlThreshold and provided.quality > qualityThreshold then
if debug then
print(string.format("Class gear filter pass for ilvl %d and quality %d", provided.ilvl, provided.quality))
end
return true
end
if debug then
print(string.format("Class gear filter fail for ilvl %d and quality %d", provided.ilvl, provided.quality))
end
return false
end)
local nameFilter = Filter.new({ ["name"] = getItemName }, function(slot, provided)
---@cast provided { name: string }
if not aura_env.config.nameFilter then return false end
local names = string.split(",", aura_env.config.nameFilterNames or "")
if #names == 0 then return false end
for _, name in ipairs(names) do
name = string.trim(name)
if aura_env.config.nameFilterIgnoreCase then
name = string.lower(name)
provided.name = string.lower(provided.name)
end
if provided.name == name then
if debug then print(string.format("Name filter pass for %s", provided.name)) end
return true
end
end
if debug then print(string.format("Name filter fail for %s", provided.name)) end
return false
end)
local reicpeFilter = Filter.new({ ["name"] = getItemName }, function(slot, provided)
---@cast provided { name: string }
if string.find(provided.name, "Recipe") or string.find(provided.name, "Technique") then
if debug then print(string.format("Recipe filter pass for %s", provided.name)) end
return true
end
if debug then print(string.format("Recipe filter fail for %s", provided.name)) end
return false
end)
local boeFilter = Filter.new({
["ilvl"] = getItemLevel,
["type"] = getItemType,
["quality"] = getItemQuality,
["equiploc"] = getItemEquipLocation,
["bindtype"] = getBindType,
}, function(slot, provided)
---@cast provided { ilvl: number, type: string, quality: number, equiploc: string, bindtype: number }
aura_env.config.boeFilter = true
local ilvlThreshold = aura_env.config.boeFilterIlvlThreshold
local qualityThreshold = aura_env.config.boeFilterQualityThreshold
local itemType = provided.type
local itemEquipLoc = provided.equiploc
if
itemType == "Armor"
or itemType == "Weapon"
or itemEquipLoc == "INVTYPE_FINGER"
or itemEquipLoc == "INVTYPE_TRINKET"
or itemEquipLoc == "INVTYPE_CLOAK"
or itemEquipLoc == "INVTYPE_NECK"
then
local itemLevel = provided.ilvl
local itemQuality = provided.quality
local bindType = provided.bindtype
if itemLevel > ilvlThreshold and itemQuality > qualityThreshold and bindType == 1 then
if debug then print(string.format("BoE filter pass for ilvl %d and quality %d", itemLevel, itemQuality)) end
return true
end
end
if debug then
print(string.format("BoE filter fail for ilvl %d and quality %d", provided.ilvl, provided.quality))
end
return false
end)
local artifactPowerFilter = Filter.new({
["type"] = getItemType,
["subtype"] = getItemSubtype,
["subclassid"] = getItemSubclassId,
["value"] = getItemValue,
}, function(slot, provided)
---@cast provided { type: string, subtype: string, subclassid: number, value: number }
if not aura_env.config.artifactPowerFilter then return false end
if
provided.value == 0
and provided.type == "Consumable"
and provided.subtype == "Other"
and provided.subclassid == 8
then
if debug then
print(
string.format(
"Artifact power filter pass for type %s and subtype %s and subclassid %d with value %d",
provided.type,
provided.subtype,
provided.subclassid,
provided.value
)
)
end
return true
end
if debug then
DevTools_Dump(provided)
print(
string.format(
"Artifact power filter fail for type %s and subtype %s and subclassid %d with value %d",
provided.type,
provided.subtype,
provided.subclassid,
provided.value
)
)
end
return false
end)
local everythingFilter = Filter.new({ ["name"] = getItemName }, function(slot, provided)
---@cast provided { name: string }
return aura_env.config.everythingFilter
end)
---@type table<Filter>
local filters = {
everythingFilter,
artifactPowerFilter,
boeFilter,
classGearFilter,
goldFilter,
greyValueFilter,
ilvlFilter,
mountFilter,
orderResourcesFilter,
professionFilter,
questItemFilter,
-- reicpeFilter,
valueFilter,
nameFilter,
}
---@class FilterService
aura_env.FilterService = {
---@param lootInfo table<number>
Run = function(lootInfo)
---@type table<number>
local slotsToLoot = {}
for slot, item in pairs(lootInfo) do
if debug then
local itemname = getItemName(slot)
print(string.format("Checking slot %d for %s", slot, itemname))
end
for _, filter in ipairs(filters) do
local res, err = filter:Run(slot)
if err then
if debug then print(err) end
end
if res then
slotsToLoot[#slotsToLoot + 1] = slot
break
end
end
end
aura_env.FilterService.doLoot(slotsToLoot)
end,
---@param slots table<number>
---@return nil
doLoot = function(slots)
for i = #slots, 1, -1 do
aura_env.FilterService.lootslot(slots[i])
end
end,
---@param slot number
---@return nil
lootslot = function(slot)
LootSlot(slot)
local itemIcon = getItemIcon(slot) or 134400
local itemName = getItemName(slot) or "Unknown"
itemName = itemName:gsub("\n", ", ")
local itemQuality = getItemQuality(slot) or 0
if
string.find(itemName, "Gold") == nil
and string.find(itemName, "Silver") == nil
and string.find(itemName, "Copper") == nil
then
if not WeakAurasSaved.Cyka.ItemCache[itemName] then
WeakAurasSaved.Cyka.ItemCache[itemName] = {
icon = itemIcon,
quality = itemQuality,
}
end
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,
},
}
aura_env.qualityColors = {
"\124cff9d9d9d", -- Poor
"\124cffffffff", -- Common
"\124cff1eff00", -- Uncommon
"\124cff0070dd", -- Rare
"\124cffa335ee", -- Epic
"\124cffff8000", -- Legendary
"\124cffe6cc80", -- Artifact
"\124cff00ccff", -- Heirloom
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,42 @@
-- QUEST_POI_UPDATE QUEST_DETAIL QUEST_COMPLETE QUEST_GREETING QUEST_PROGRESS GOSSIP_SHOW
function(e)
if 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 completedQuests = GetNumGossipActiveQuests()
local options = GetNumGossipOptions()
if completedQuests > 0 and options == 0 then
for i = 1, completedQuests do
SelectGossipActiveQuest(i)
end
end
if quests > 0 and options == 0 then
SelectGossipAvailableQuest(1)
end
if options == 1 and quests + completedQuests == 0 then
SelectGossipOption(1)
end
elseif e == "QUEST_GREETING" then
local quests = GetNumGossipAvailableQuests()
local completedQuests = GetNumGossipActiveQuests()
if completedQuests > 0 then
for i = 1, completedQuests 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

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
-- MERCHANT_SHOW
function(allstates, e)
if (GetMerchantNumItems() > 0) then
aura_env.allstates = allstates
if CanMerchantRepair() == true then RepairAllItems() end
for container = 0, 4 do
for slot = 1, GetContainerNumSlots(container) do
aura_env.FilterService.Run(container, slot)
end
end
return true
end
end

View File

@@ -0,0 +1 @@
!DVvctTnYs4)l8QuLPEaLnqiztTj1ZagWeIHyzs2TYBnES0i7zrwsRomq2e)B)19Cin6YhX8cBrCkS8m90xZ30ZHMUFJ(96BqG)e13iSVXU704GD2RVXK(gw4)Hkhf4DxFJJV8ZD6Bm0lWIgCiX8wRap)(gh6W(6xjbwZg0ZZZjIbfrIJg7fCPFeZZnuW3hU02oKg1VZlRxhiW1ei4kpMlu1rT60RvxfJpYZXlaAtNg97uVFND5)Dp(F3hleAaOmg(etk(tdIPskgHrKGiH4SzUSWXINHhfLcphfWgnIgekeqVKc4p(Gpf19acWQ4H0Pu3iJyBB299nU5OMg9UXOxZUaH8A6BCgL4enUVrmYFdFhYdaFmc9PooTTKMTfDiWHECoFwRlU6KRVOVHlzcvwVsoxfq5YX4QwxauGnYyS3Dx6cKW)UjyMtPytIDt1zUnzXc)Zyxr9gehhHpzkTNGSp4zbEQTBuhP10ZjEIBQ3d6aObUeNpb(eWnc(7dajesVGnbmQHi)yJaL4IwNiCWCbdDggJPSrJH(Zd2VVHJhHdtyUaqj2hFCsmafs86eh0JLVythsyyHsbhOzHcTyq)GjuYdfQkaTL8fAlGffk3FQFfktGNtr2aEIBeA5qLvSBrfM91cTekEOCeIoGUbhq3GdOBWb0135LiXex2eseT)HQHbTD5JwahDOjixENLOguvep1YAe0JB8xXKa6SbNe74mBWNhZa2yeqhbMVa3z9aa4yMIUgztnqDg0fJqpyiJHRNlIDcmVG6ocW0D27aqYoCqqNxI9j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zuiP(cfNQVAMJU02xlrh5BUidJMqUhORoMqMHruFUFj1dnHjs1ufRXNfIUn)KlJuhzPsHZvmSWOoh3Q7Sb3nMzogQWtCULklkNzJTw8uYzH2NNASf8xklyybEyiow0s6Dn4cMxNM)b6D(kSUhUPXbEIUBseg8uKQMYeYehOd7bg3QPfwoUBx87fMNTTL4zzEYUadUZRrou0GgMbGCygq9HLL8TvMXUAz1lpbGp44pEM3deNAtobdeHgdxC3RNvRo(JfSnFE7QCp8Cv9FU5WlVNEkyb7Vl2T3))9

View File

@@ -0,0 +1,259 @@
local debug = false
local iconDisplayDuration = 3
---@param container number
---@param slot number
---@return string, string|nil
local function getItemLink(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local link = select(7, GetContainerItemInfo(container, slot))
if link == nil then return "", string.format("GetContainerItemInfo returned nil for link (arg 7)") end
return link
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemQuantity(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local quantity = select(2, GetContainerItemInfo(container, slot))
if quantity == nil then return "", string.format("GetContainerItemInfo returned nil for quantity (arg 2)") end
return quantity
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemName(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local name = select(1, GetItemInfo(getItemLink(container, slot)))
if name == nil then return "", string.format("GetItemInfo returned nil for name (arg 1)") end
return name
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemType(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local type = select(6, GetItemInfo(getItemLink(container, slot)))
if type == nil then return "", string.format("GetItemInfo returned nil for type (arg 6)") end
return type
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemSubtype(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local subtype = select(7, GetItemInfo(getItemLink(container, slot)))
if subtype == nil then return "", string.format("GetItemInfo returned nil for subtype (arg 7)") end
return subtype
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemLevel(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local level = select(4, GetItemInfo(getItemLink(container, slot)))
if level == nil then return "", string.format("GetItemInfo returned nil for level (arg 4)") end
return level
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemValue(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local value = select(11, GetItemInfo(getItemLink(container, slot)))
if value == nil then return "", string.format("GetItemInfo returned nil for value (arg 11)") end
return value
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemQuality(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local quality = select(3, GetItemInfo(getItemLink(container, slot)))
if quality == nil then return "", string.format("GetItemInfo returned nil for quality (arg 3)") end
return quality
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemEquipLocation(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local equipLoc = select(9, GetItemInfo(getItemLink(container, slot)))
if equipLoc == nil then return "", string.format("GetItemInfo returned nil for equipLoc (arg 9)") end
return equipLoc
end
---@param container number
---@param slot number
---@return string, string|nil
local function getItemIcon(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local icon = select(10, GetItemInfo(getItemLink(container, slot)))
if icon == nil then return "", string.format("GetItemInfo returned nil for icon (arg 10)") end
return icon
end
---@param container number
---@param slot number
---@return string, string|nil
local function getBindType(container, slot)
if container == nil then return "", string.format("Container is nil") end
if slot == nil then return "", string.format("Slot is nil") end
local bindType = select(14, GetItemInfo(getItemLink(container, slot)))
if bindType == nil then return "", string.format("GetItemInfo returned nil for bindType (arg 14)") end
return bindType
end
---@class Filter
---@field requires table<string, fun(container:number, slot: number): string|number|boolean> | nil
---@field filter fun(container: number, slot: number, provided: table<string, string|number|boolean>): boolean
Filter = {
---@param requires table<string, fun(container:number, slot: number): string|number|boolean> | nil
---@param filter fun(container: number, slot: number, provided: table<string, string|number|boolean>): boolean
---@return Filter
new = function(requires, filter)
local self = setmetatable({}, {
__index = Filter,
})
self.requires = requires
self.filter = filter
return self
end,
---@param self Filter
---@param container number
---@param slot number
---@return boolean, string|nil
Run = function(self, container, slot)
---@type table<string, string|number|boolean>
local provided = {}
if self.requires then
for k, v in pairs(self.requires) do
local res, err = v(container, slot)
if err then
if debug then print(err) end
return false, err
end
provided[k] = res
end
end
local res, err = self.filter(container, slot, provided)
if err then
if debug then print(err) end
end
return res, nil
end,
}
local grayFilter = Filter.new({
["quality"] = getItemQuality,
}, function(container, slot, provided)
if not aura_env.config.grayFilter then return false end
if provided.quality == 0 then return true end
return false
end)
local gearFilter = Filter.new({
["ilvl"] = getItemLevel,
["bindType"] = getBindType,
["type"] = getItemType,
["equipLoc"] = getItemEquipLocation,
}, function(container, slot, provided)
if not aura_env.config.gearFilter then return false end
local ilvlThreshold = aura_env.config.gearFilterIlvlFilterThreshold
local sellBoe = aura_env.config.gearFilterSellBoe
if
provided.type == "Armor"
or provided.type == "Weapon"
or provided.equipLoc == "INVTYPE_FINGER"
or provided.equipLoc == "INVTYPE_TRINKET"
or provided.equipLoc == "INVTYPE_CLOAK"
or provided.equipLoc == "INVTYPE_NECK"
then
if provided.ilvl < ilvlThreshold and (provided.bindType == 1 or sellBoe) then return true end
end
return false
end)
---@param container number
---@param slot number
---@return nil, string|nil
local function doSell(container, slot)
local itemIcon, err = getItemIcon(container, slot)
if err then return nil, string.format("Error getting item icon: %s", err) end
local itemName, err = getItemName(container, slot)
if err then return nil, string.format("Error getting item name: %s", err) end
local itemQuantity, err = getItemQuantity(container, slot)
if err then return nil, string.format("Error getting item quantity: %s", err) end
local itemQuality, err = getItemQuality(container, slot)
if err then return nil, string.format("Error getting item quality: %s", err) end
local nameWithColor = string.format("%s[%s]\124r", aura_env.qualityColors[itemQuality + 1], itemName)
local nameWithQuantity = string.format("%s x%s", nameWithColor, itemQuantity)
aura_env.allstates[#aura_env.allstates + 1] = {
show = true,
changed = true,
index = GetTime(),
resort = true,
icon = itemIcon,
name = nameWithQuantity,
amount = itemQuantity,
progressType = "timed",
expirationTime = GetTime() + iconDisplayDuration,
duration = iconDisplayDuration,
autoHide = true,
}
UseContainerItem(container, slot)
return nil, nil
end
---@type table<Filter>
local filters = {
grayFilter,
gearFilter,
}
---@class FilterService
aura_env.FilterService = {
---@param container number
---@param slot number
---@return nil, nil
Run = function(container, slot)
local itemLink, err = getItemLink(container, slot)
if err then return nil, string.format("Err: slot empty (%d-%d) - %s", container, slot, err) end
for k, filter in pairs(filters) do
local res, err = filter:Run(container, slot)
if err then
if debug then print(err) end
else
if res then
doSell(container, slot)
return
end
end
end
end,
}
aura_env.qualityColors = {
"\124cff9d9d9d", -- Poor
"\124cffffffff", -- Common
"\124cff1eff00", -- Uncommon
"\124cff0070dd", -- Rare
"\124cffa335ee", -- Epic
"\124cffff8000", -- Legendary
"\124cffe6cc80", -- Artifact
"\124cff00ccff", -- Heirloom
}

View File

@@ -0,0 +1,698 @@
--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 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)
if aura_env.debug == true then
print("loot 1 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[2] == true and link:match("Azerite") then
LootSlot(slot)
if aura_env.debug == true then
print("loot 2 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[3] == true and v.item:match("War Resources") then
LootSlot(slot)
if aura_env.debug == true then
print("loot 3 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[4] == true and v.item:match("Residuum") then
LootSlot(slot)
if aura_env.debug == true then
print("loot 4 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[5] == true and v.item:match("Manapearl") then
LootSlot(slot)
if aura_env.debug == true then
print("loot 5 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
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 ", v.item, " to 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 ", v.item, " to 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 aura_env.filter[6] == true and (select(7, GetItemInfo(link)) or 0) == "Mount" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 6 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[7] == true and ilvl > aura_env.ilvlFilter then
LootSlot(slot)
if aura_env.debug == true then
print("loot 7 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[8] == true and (select(7, GetItemInfo(link)) or 0) == "Herb" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 8 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[9] == true and (select(7, GetItemInfo(link)) or 0) == "Cooking" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 9 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[10] == true and (select(7, GetItemInfo(link)) or 0) == "Cloth" and type == "Tradeskill" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 10 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[11] == true and (select(7, GetItemInfo(link)) or 0) == "Metal & Stone" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 11 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[12] == true and (select(11, GetItemInfo(link)) or 0) > aura_env.goldFilter and v.quality == 0 then
LootSlot(slot)
if aura_env.debug == true then
print("loot 12 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[13] == true and v.quality > 1 and v.quality < 4 and type ~= "Weapon" and type ~= "Armor" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 13 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[14] == true and v.isQuestItem == true then
LootSlot(slot)
if aura_env.debug == true then
print("loot 14 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[15] == true and v.quality == 0 then
LootSlot(slot)
if aura_env.debug == true then
print("loot 15 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[16] == true and aura_env.whitelist[v.item] then
LootSlot(slot)
if aura_env.debug == true then
print("loot 16 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[17] == true and type == "Quest" and subtype == "Quest" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 17 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
elseif aura_env.filter[21] == true and type == "Consumable" and subtype == "Other" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 21 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
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)
if aura_env.debug == true then
print("loot 18 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
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)
if aura_env.debug == true then
print("loot 19 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
end
elseif aura_env.filter[20] == true and type == "Miscellaneous" then
if subtype == "Mount" then
LootSlot(slot)
if aura_env.debug == true then
print("loot 20 ", v.item, type, subtype)
end
if link then
WeakAuras.ScanEvents("ADD_ITEM_SHOW", link, v.quantity)
end
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
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.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] = true, --Herbs
[9] = false, --Cooking
[10] = false, --Cloth
[11] = true, --Metal & Stone
[12] = true, --Gold filter greys
[13] = true, -- >1 && <4 quality items, no gear
[14] = true, --Quest items
[15] = false, --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 = 940
aura_env.goldFilter = 500000
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,
["Blood of Sargeras"] = 1,
["Primal Sargerite"] = 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,
},
}

View 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

View 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,
},
}

View 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

View File

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

View File

@@ -0,0 +1,4 @@
-- BAG_UPDATE
function(e)
aura_env.update()
end

View File

@@ -0,0 +1,23 @@
local function getItemLink(container, slot) return select(7, GetContainerItemInfo(container, slot)) or "" end
local function getBindType(container, slot) return select(14, GetItemInfo(getItemLink(container, slot))) or 0 end
local function isBoe(container, slot) return getBindType(container, slot) == 1 end
local showGlow = function(container, slot)
ActionButton_ShowOverlayGlow(_G["ElvUI_ContainerFrameBag" .. container .. "Slot" .. slot])
end
local hideGlow = function(container, slot)
ActionButton_HideOverlayGlow(_G["ElvUI_ContainerFrameBag" .. container .. "Slot" .. slot])
end
aura_env.update = function()
for container = 0, 4 do
for slot = 1, GetContainerNumSlots(container) do
print(C_Item.IsBound(ItemLocation:CreateFromBagAndSlot(container, slot)))
if isBoe(container, slot) then
showGlow(container, slot)
else
hideGlow(container, slot)
end
end
end
end

View File

@@ -0,0 +1,18 @@
Haven't found a way of determining whether an item is soulbound or not without tooltip scanning which I don't want to do
local cTip = CreateFrame("GameTooltip","PrivTooltip",nil,"GameTooltipTemplate")
local function IsSoulbound(bag, slot)
cTip:SetOwner(UIParent, "ANCHOR_NONE")
cTip:SetBagItem(bag, slot)
cTip:Show()
for i = 1,cTip:NumLines() do
if(_G[name.."TooltipTextLeft"..i]:GetText()==ITEM_SOULBOUND) then
cTip:Hide()
return true
end
end
cTip:Hide()
return false
end
Some guy says this is good

View File

@@ -0,0 +1,3 @@
function()
return BattlepassInfo.currentDayOnlineTimeMinutes, 120, 1
end

View File

@@ -0,0 +1,6 @@
-- CHAT_MSG_ADDON
function(e, opcode, msg)
if opcode ~= "UISMSG_TO_CLIENT" then return end
BattlepassInfo.ParseApi(msg)
return BattlepassInfo.dayRewardComplete == 0
end

View File

@@ -0,0 +1,4 @@
--- TICKER_10000
function()
BattlepassInfo()
end

View File

@@ -0,0 +1 @@
!TVrd3jUnY)lCV82WRjCaHKSTVB7RaXzdPjqUyNnnnPye2cWfJf1FKp2R1)2VzKKn2gBGK29U9EhB2qSLgnAKMp0Ozg6xRVwFvc8HFFvV(Q1Ru7Okh0xDwFvt8)qNdjgtnDzZBZSzUqdDRX)FD(NhW)Sr)UvRCiIIHmxtQBl5q6R2Y26ZFM4AgoqJXS9TGM8mi2uCysG7pSV6l9gnYJ6dOPVQlDSfZr7L50(QJDzbZJau16ZuCELVMKEQYPNQC6PkNEQHuJpZ4rQRhGU(DpU6bvbStm8Hx9WfMNpX1xSYTCSKpncE0Bc)zebUwJhdyqmnAXnWFKtHKaxcGQGH0hPo(QbJgz9CFv92nv10v1AEnaiVN(QNrj2(twa7vUuoSQxPCXfqZZP22Dm9eKXqarQtyp1Zb6H)3MaH)imHoKzujqbivRo3M8cqrQMuCqI9TZuU4QtV5cbqlOz(AIWrKMOXlzMu5MfjWFcZT38O9NyUzeVPrudkMJH5q93ciU0WbNgyBho42jw(qJEu7rxXSW1BREAA9U8c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KFXqTTmq2wgiflzSTGq2wqiBliKTfeY2cczBbHSTGq2wqiBliKTfeYxdfeYsIMvuniok8iIUBPRUO5D6Q9UP7jislTi5ApOIjOW7HhGRWBmTcB84sfSAApH4hTykDNIIchtsYdF2XYojrgl1VTQv2w1k)VxvRK5lRzoF14YM7)KvtqMcn4vuCbFPQGGA1ZVeo(cv8af)vQCnvsGme)jtMEMe3VC1eKxw6)Yxpbrv3Wgvib5vWdFn)vdnBPCKSyqs(DELxhdkg1F69gx2z6NDsvhdfw4czRVNL)oekZmNSCj4K0JaH0OokD1)Fp

View File

@@ -0,0 +1,109 @@
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
if not WeakAurasSaved.Cyka.LoginInfo then WeakAurasSaved.Cyka.LoginInfo = {} end
Today = date("%Y-%m-%d")
if not WeakAurasSaved.Cyka.LoginInfo[Today] then WeakAurasSaved.Cyka.LoginInfo[Today] = {} end
if not WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")] then
WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")] = {
onlineTimeInMinutes = 0,
claimed = 0,
}
end
local greenColor = "|cff00ff00"
local noColor = "|r"
BattlepassAccountInfo = ""
local function UpdateAccountInfo()
local ret = {}
for char, info in pairs(WeakAurasSaved.Cyka.LoginInfo[Today]) do
if info.claimed == 1 then
char = string.format("%s%s %d%s", greenColor, char, info.onlineTimeInMinutes, noColor)
else
char = string.format("%s %d", char, info.onlineTimeInMinutes)
end
ret[#ret + 1] = char
end
BattlepassAccountInfo = table.concat(ret, "\n")
end
-- [02:37 PM] Bluepotato
-- [02:37 PM] onlineTimeInMinutes=120,
-- [02:37 PM] claimed=1
-- [02:37 PM] Smolpotato
-- [02:37 PM] onlineTimeInMinutes=120,
-- [02:37 PM] claimed=1
-- [02:37 PM] Thiccpotato
-- [02:37 PM] onlineTimeInMinutes=57,
-- [02:37 PM] claimed=0
---@param input string
---@param deliminer string
---@return table<string>
aura_env.Split = function(input, deliminer)
local ret = {}
for str in string.gmatch(input, "([^" .. deliminer .. "]+)") do
table.insert(ret, str)
end
return ret
end
---@class BattlepassInfo
---@field week number
---@field getRew number
---@field dayRewardComplete number
---@field lostDay number
---@field cost number
---@field currentDayOnlineTimeMinutes number
---@field currentDayOnlineTimeMilliseconds number
BattlepassInfo = {
PingApi = function()
SendAddonMessage("UIMSG_TO_SERVER", "UIMSG_GET_ONLINETIME_DAY" .. "\t", "WHISPER", UnitName("player"))
end,
ParseApi = function(msg)
local packets = aura_env.Split(msg, ":")
if packets[1] ~= "UISMSG_EVT_WEEK_TIME" then return end
BattlepassInfo.currentDayOnlineTimeMilliseconds = tonumber(packets[2])
BattlepassInfo.week = tonumber(packets[3]) + 1
BattlepassInfo.getRew = tonumber(packets[4])
BattlepassInfo.dayRewardComplete = tonumber(packets[5])
BattlepassInfo.lostDay = tonumber(packets[6])
BattlepassInfo.cost = tonumber(packets[7])
BattlepassInfo.currentDayOnlineTimeMinutes = math.floor(BattlepassInfo.currentDayOnlineTimeMilliseconds / 60000)
WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].onlineTimeInMinutes =
BattlepassInfo.currentDayOnlineTimeMinutes
WeakAurasSaved.Cyka.LoginInfo[Today][UnitName("player")].claimed = BattlepassInfo.dayRewardComplete
if BattlepassInfo.dayRewardComplete == 0 and BattlepassInfo.currentDayOnlineTimeMinutes >= 120 then
BattlepassInfo.DoClaim()
C_Timer.After(0.2, function() BattlepassInfo.PingApi() end)
end
UpdateAccountInfo()
end,
DoClaim = function()
SendAddonMessage("UIMSG_TO_SERVER", "UIMSG_WEEKLY_REW_GET" .. "\t", "WHISPER", UnitName("player"))
WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\Sounds\\quack.ogg")
SendChatMessage("YEEE", "WHISPER", nil, UnitName("player"))
end,
}
setmetatable(BattlepassInfo, {
__call = BattlepassInfo.PingApi,
__index = BattlepassInfo,
__tostring = function()
local ret = {}
for k, v in pairs(BattlepassInfo) do
table.insert(ret, k .. ": " .. tostring(v))
end
return table.concat(ret, "\n")
end,
})
for k, v in pairs(BattlepassInfo) do
if type(v) == "number" then BattlepassInfo[k] = 0 end
end
BattlepassInfo()
-- Claiming rewards works fine
-- But the bar does not hide once rewards are claimed

View File

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

View File

@@ -0,0 +1,40 @@
COMBAT_LOG_EVENT_UNFILTERED
function(...)
local subevent = select(3, ...)
local target = select(10, ...)
if subevent == "SWING_DAMAGE" and target == UnitName("player") then
local dmg = select(13, ...)
local block = select(17, ...) or 0
if block > 0 then
aura_env.overallBlock = aura_env.overallBlock + block
end
end
end
DISPLAY
function()
local function shorten(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
return shorten(aura_env.overallBlock)
end
INIT
aura_env.overallBlock = 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

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