-
Posted by Philburt on Wed, 25 Feb 2009 11:46:47
XSSFilter could not parse (X)HTML: <p><span lang="EN"> <p>I'm trying to read the whole Auction House and store the name of each item in a table, but only the first 50 names appear in the created table in the Saved Variables folder.</p> <p>My code is:</p> <p>nametable={}</p> <p>temp,numofAH=GetNumAuctionItems("list")</p> <p>for loop=1,numofAH do</p> <p>name, texture, count, quality, canUse, level, minBid, minIncrement, buyoutPrice, bidAmount, highBidder, owner = GetAuctionItemInfo("list", loop);</p> <p>nametable[loop]=name</p> <p>end</p> <p>Its probably something simple I'm missing, but any advice would be appreciated. Thanks :)</p> <p> </p> <p> </p> <p></span></p></p>
-
Posted by Philburt on Wed, 25 Feb 2009 11:46:47
XSSFilter could not parse (X)HTML: <p><span lang="EN"> <p>I'm trying to read the whole Auction House and store the name of each item in a table, but only the first 50 names appear in the created table in the Saved Variables folder.</p> <p>My code is:</p> <p>nametable={}</p> <p>temp,numofAH=GetNumAuctionItems("list")</p> <p>for loop=1,numofAH do</p> <p>name, texture, count, quality, canUse, level, minBid, minIncrement, buyoutPrice, bidAmount, highBidder, owner = GetAuctionItemInfo("list", loop);</p> <p>nametable[loop]=name</p> <p>end</p> <p>Its probably something simple I'm missing, but any advice would be appreciated. Thanks :)</p> <p> </p> <p> </p> <p></span></p></p>
-
Posted by jnwhiteh on Wed, 25 Feb 2009 17:52:16
Please refer to the documentation of http://wowprogramming.com/docs/api/QueryAuctionItems. The auction house returns a limited number of items per page. If you need more than one page, you need to query the auction house for them.
-
Posted by Philburt on Thu, 26 Feb 2009 11:27:19
Thanks - i'll give it a try :) After I'd posted the initial question I realised the significane of 50 items being one page of info, but thought there may be more to it than that. Thanks again.
-
Posted by Philburt on Thu, 26 Feb 2009 13:04:59
After checking the QueryAuctionItems function, this is not going to achieve what I want (at least I think not). I need to search the whole auction house, one item at a time, returning the Name and BuyoutPrice. The QueryAuctionItems function won't do this for me. A simple version of the code would look something like
for n=1 to end of AuctionHouse (typically 25000+)
get the nth item from the auction house (i expected GetAuctionItemInfo("list",n) to manage this, but alas not.)
put the name and pricing details into a table
end of loop
Any ideas please - or am I missing something with the QueryAuctionsFunction. I know this can access the items from individual AH pages, but I can't see how I would then scan that page of 50 items to read the name and pricing details.
-
Posted by Philburt on Thu, 26 Feb 2009 13:27:49
Actually, forget that last post - I think I've got it worked out.
By using QueryAuctionItems with all the arguments as null, (ie "" or 0) except for page, I can get the auctions from that page, then use GetAuctionItemsInfo("list",index+(page * 50)) to read the info I need.
Hopefully this will work - and if it does I'll post a reply to this thread to let you know :)