add little AH refresh bot to alert about low and high prices

This commit is contained in:
PhatDave
2021-12-05 15:23:20 +01:00
parent f899e14ff8
commit 34256fb7d2
4 changed files with 41 additions and 0 deletions

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")
return true
end
elseif aura_env.buyPriceThresholds[itemID] then
if v.minPrice < aura_env.buyPriceThresholds[itemID] then
print(itemName, "too cheap")
return true
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

13
NewAge/AHBot/INIT.lua Normal file
View File

@@ -0,0 +1,13 @@
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
}
aura_env.buyPriceThresholds = {
[152576] = 5 * 100 * 100; -- Tidesrpay Linen
[152877] = 500 * 100 * 100; -- Veiled Crystal
}

3
NewAge/AHBot/Info.txt Normal file
View File

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