WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   can traditional auction house searching be phased out with an addon? (https://www.wowinterface.com/forums/showthread.php?t=58959)

cheesewiz 10-25-21 05:16 PM

can traditional auction house searching be phased out with an addon?
 
someone told me you could use caching to store the item keys for every item you want to shop for to save time on search results. then, through the use of an automatic search function, you could shop for items as soon as the auction house is opened. my question is, how much faster would this be? you would still need the auction id and the price parameter for the addon to show items at or below that price. would this realistically be any faster than what trade skill master does?

Seerah 10-26-21 01:23 PM

I'm not entirely sure what you're asking.

cheesewiz 10-26-21 07:24 PM

Quote:

Originally Posted by Seerah (Post 339969)
I'm not entirely sure what you're asking.

ive been using a python program called goblin stock alerts that gets auction data from the api every hour and imports it into an addon that speeds up the buying process. i want to remove the need for the python script and use the item keys for the items on my list to create a tool faster than any other auction house addon. in theory, if youre able to supply the addon with enough information about the item, then an item key search should provide instant results. im not a programmer so i cant test any of this myself.

Fizzlemizz 10-26-21 07:44 PM

In-game addons and your Python script are accessing two seperate APIs. You can't access both APIs from the same code (in-game addons can't access the web API and Python can access the in-game API).

I think that's what you're asking.

cheesewiz 10-26-21 10:25 PM

Quote:

Originally Posted by Fizzlemizz (Post 339971)
In-game addons and your Python script are accessing two seperate APIs. You can't access both APIs from the same code (in-game addons can't access the web API and Python can access the in-game API).

I think that's what you're asking.

That's right. I want to cache the requirements for making item keys into an addon and use that to search for items from my shopping list on the ah. I think the GSA addon relies on the item key to be generated with info from the python script. I want to skip the need for the script and have the item keys on hand, ready to use whenever I want to look something up. I think GSA is using the api from raidbots to generate most of the data for the item keys, so it's not outside the realm of possibilies. I figured if you can just build a list then save it into something an addon could use, why wait for the web api? I don't think any addons use the item key search method, either. I wanna learn why that is.

Fizzlemizz 10-27-21 12:11 AM

The difference between the web api and searching in game is that to do the same thing in-game you would have to actually be at the AH with the AH UI open all day. You can't be off questing, raiding etc. and running AH searches at the same time.

You can't "inject" external information into a running addon so you can't add items from your latest sim without either pasting in-game or exiting, running a process to update addon information and the re-starting the game.

Quote:

I wanna learn why that is.
Because Blizzard doesn't what that level of automation.

cheesewiz 10-27-21 02:15 AM

But it wouldn't be external data, it would be using the item key data that's already used by the items on the auction house. Also, this isn't automated, just reduced time in order to shop faster. The GSA addon is already able to bring items up within a second of the auction house opening, all that's left would be to have a cache of the item data preloaded into the addon.

If they didn't want that level of automation then https://wowpedia.fandom.com/wiki/API...se.MakeItemKey and https://wowpedia.fandom.com/wiki/API...rchForItemKeys this would be protected functions.

There are already people using this method, I just want something public for everyone to use.

I can do it right now with this, but I don't have a way to generate the item data for my entire shopping cart.

Quote:

function SniperMixin:Search()
if not self.isReady then return end
local data = tremove(SniperDB, 1)
if not data then
ClearOverrideBindings(self)
print("No Items left in list")
return
end

local auctionID, itemID, itemQuantity, auctionPrice, itemHasVariation, petid = split(data)

local itemKey = C_AuctionHouse.MakeItemKey(itemID, nil, 0, petid)
self.auctionInfo = {
quantity = itemQuantity,
itemKey = itemKey,
price = auctionPrice,
auctionID = auctionID,
}

if (itemHasVariation == "true") then
self:SearchByName(self.auctionInfo)
else
self:SearchByItemKey(self.auctionInfo)
end
end

myrroddin 10-27-21 09:41 AM

The web API cannot be accessed in the game, as noted. It also is updated about once per hour, assuming Blizzard's web auction house API is working.

You can use the in game Lua API to cache your data, but then you're depending on it to have every item, which isn't possible. The Lua API will see things as it finds them, and by the time it runs through, the earliest items which are expiring first might not be available, even though your cached data thinks they exist.

The other issue is a forced cooldown on how often you can scan the auction house in game. I seem to recall the cooldown is 15 minutes, so it isn't like you can be constantly updating your cached data.

Since your original question refers to TradeSkillMaster and shopping for items as soon as the auction house window is open, that is exactly what TSM does with grouped items. Their implementation is as fast as the system can get.

cheesewiz 10-27-21 11:23 AM

Quote:

Originally Posted by myrroddin (Post 339975)
The web API cannot be accessed in the game, as noted. It also is updated about once per hour, assuming Blizzard's web auction house API is working.

You can use the in game Lua API to cache your data, but then you're depending on it to have every item, which isn't possible. The Lua API will see things as it finds them, and by the time it runs through, the earliest items which are expiring first might not be available, even though your cached data thinks they exist.

The other issue is a forced cooldown on how often you can scan the auction house in game. I seem to recall the cooldown is 15 minutes, so it isn't like you can be constantly updating your cached data.

Since your original question refers to TradeSkillMaster and shopping for items as soon as the auction house window is open, that is exactly what TSM does with grouped items. Their implementation is as fast as the system can get.

Like I already said, I wouldn't need it for every item, just the ones I'm looking for. As for the the 15 minute cooldown, this is for replicate search, not for item key or blank query search. Sorry, but this is outside the realm of relying on TSM to provide a faster search route. Auctionator can scan the entire auction house within 30 seconds via caching, with no cooldown in between scans. As of right now, TSM is nothing compared to Auctionator when it comes to shopping. There are faster methods than Auctionator, but no one is publically implementing them because they give too much control over the auction house.

Fizzlemizz 10-27-21 12:50 PM

Quote:

I can do it right now with this, but I don't have a way to generate the item data for my entire shopping cart.
"this" is using information from what looks like a SavedVariables table (SniperDB) which would be the "cache".

It's not really, it's just a list of item information that could be sourced from anywhere (WoWHead, Raidbot presumably, a script/program that gets the information from somwhere "outside" of the game, ...).

That list can't be updated from these external sources while the game is running.

The question becomes, how and where from do you want to create a list of item information for the "stuff" you specifically want to search for (your cache).

The code supplied also looks like it's only searching one item at a time where C_AuctionHouse.SearchForItemKeys appears to be able to accept a table of multiple itemKey tables. That might make an actual pass quicker but the AH API isn't something I've used.

cheesewiz 10-27-21 01:55 PM

Quote:

Originally Posted by Fizzlemizz (Post 339977)
The question becomes, how and where from do you want to create a list of item information for the "stuff" you specifically want to search for (your cache).

I should be able to use a python script to generate every known variable for suffixes and item levels for my list.

Fizzlemizz 10-27-21 03:19 PM

Quote:

Originally Posted by cheesewiz (Post 339978)
I should be able to use a python script to generate every known variable for suffixes and item levels for my list.

You can't use Python (or any language, other than an extremely restricted sub-set of lua, or binaries created in any language or ...) in a WoW addon.

Addons (the extremely restricted sub-set of the lua language) can't access the web to get the information to create your shopping list.

Because of Blizzards very heavy restrictions on what in-game addons can and can't do is why services like TSM have seperate methods for alerting and in-game AHing.

cheesewiz 10-27-21 05:07 PM

Quote:

Originally Posted by Fizzlemizz (Post 339979)
You can't use Python (or any language, other than an extremely restricted sub-set of lua, or binaries created in any language or ...) in a WoW addon.

Addons (the extremely restricted sub-set of the lua language) can't access the web to get the information to create your shopping list.

Because of Blizzards very heavy restrictions on what in-game addons can and can't do is why services like TSM have seperate methods for alerting and in-game AHing.

...I'm not saying I'm going to use python every time I need to make my list. Idk why we're going in circles on this. The requirements for an item key have a finite value. If X item needs [id: 123, suffix 64/32/111/175, battlepet_id: 0] then I would only need to save a variation of that item key into a file somewhere that can then later be used by an addon.

Python allows me to generate every variation possible for each item because there are databases (Raidbots, Undermine Journal, TSM api) who provide public access to this info. If this doesn't explain it, then idk how to.


All times are GMT -6. The time now is 11:50 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI