add little AH refresh bot to alert about low and high prices
This commit is contained in:
19
NewAge/AHBot/AUCTION_HOUSE_BROWSE_RESULTS_UPDATED.lua
Normal file
19
NewAge/AHBot/AUCTION_HOUSE_BROWSE_RESULTS_UPDATED.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
function()
|
||||
results = C_AuctionHouse.GetBrowseResults()
|
||||
-- DevTools_Dump(results)
|
||||
for k,v in ipairs(results) do
|
||||
local itemID = v.itemKey.itemID
|
||||
local itemName = GetItemInfo(itemID)
|
||||
if aura_env.sellPriceThresholds[itemID] then
|
||||
if v.minPrice > aura_env.sellPriceThresholds[itemID] then
|
||||
print(itemName, "too expensive")
|
||||
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
|
6
NewAge/AHBot/EveryFrameThrottled.lua
Normal file
6
NewAge/AHBot/EveryFrameThrottled.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
function()
|
||||
if not aura_env.last or aura_env.last < GetTime() - aura_env.throttleTime then
|
||||
aura_env.last = GetTime()
|
||||
AuctionHouseFrame.SearchBar.FavoritesSearchButton:Click()
|
||||
end
|
||||
end
|
13
NewAge/AHBot/INIT.lua
Normal file
13
NewAge/AHBot/INIT.lua
Normal 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
3
NewAge/AHBot/Info.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
/run AuctionHouseFrame.SearchBar.FavoritesSearchButton:Click()
|
||||
|
||||
/dump C_AuctionHouse.GetBrowseResults()
|
Reference in New Issue
Block a user