diff --git a/NewAge/AHBot/AUCTION_HOUSE_BROWSE_RESULTS_UPDATED.lua b/NewAge/AHBot/AUCTION_HOUSE_BROWSE_RESULTS_UPDATED.lua new file mode 100644 index 0000000..edbc415 --- /dev/null +++ b/NewAge/AHBot/AUCTION_HOUSE_BROWSE_RESULTS_UPDATED.lua @@ -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 \ No newline at end of file diff --git a/NewAge/AHBot/EveryFrameThrottled.lua b/NewAge/AHBot/EveryFrameThrottled.lua new file mode 100644 index 0000000..6e30da2 --- /dev/null +++ b/NewAge/AHBot/EveryFrameThrottled.lua @@ -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 \ No newline at end of file diff --git a/NewAge/AHBot/INIT.lua b/NewAge/AHBot/INIT.lua new file mode 100644 index 0000000..e45fba0 --- /dev/null +++ b/NewAge/AHBot/INIT.lua @@ -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 +} \ No newline at end of file diff --git a/NewAge/AHBot/Info.txt b/NewAge/AHBot/Info.txt new file mode 100644 index 0000000..599f3f8 --- /dev/null +++ b/NewAge/AHBot/Info.txt @@ -0,0 +1,3 @@ +/run AuctionHouseFrame.SearchBar.FavoritesSearchButton:Click() + +/dump C_AuctionHouse.GetBrowseResults() \ No newline at end of file