How to get Trading House Listing data
I am rather new to AddOn development. I would like to write Trading House listing data to SavedVariables so that I can process these listed items outside ESO in order to keep track of what I listed for sale.
I am a member of two Guilds: one is my 'regular' guild that has no trader, and the other one is the Trading guild that I use for selling things. I am using this code: Lua Code:
The above code only works when I visit the bank, and open the listing from the guild trader. Is there a way to access the listing data in the bank without actually visiting the bank? Thank you in advance |
Quote:
Lua Code:
The IsPlayerInGuild(guildId) part can be skipped in your code as you already loop over the guilds you are in via GetNumGuilds() before! Quote:
Edit: Btw GetTradingHouseListingItemLink only needs 1 parameter, the index of the item. There is no second param local link = GetTradingHouseListingItemLink(i) And a hint: If you post code use the code or lua highlight tags around it please. It eases the reading! |
Thank you for your reply. I changed the code as follows:
Lua Code:
Unfortunately, I am still getting the double amount of items, i.e. the items that are actually sold in the Trading Guild, plus the same number of items for the 'regular' guild (that has no trader) Did I understand your answer correctly? thanks again, cabwav |
Something to keep in mind, if you have Awesome Guild Store installed then getting information from the trader will not work the same as when you don't have AGS installed. The vanilla routines won't work with AGS.
I am really not a fan of exporting to spreadsheets. It takes time to do it and the output will always be in Lua and not CSV or something more convenient. For example: Code:
["SALES"] = So the question is, do you absolutely "need" to export it? Would 180 days worth of information available in game with search capabilities be sufficient? For the items you have listed to sell on a trader for all the different guilds you are in. |
Thank you for your reply. I do have AGS installed as an addon, so that may well be the explanation for this problem. I am developing this specific addon because I am new to addon development and I just wanted to see how they work. I am fairly skilled in C# development but LUA is new to me so I thought I would give it a try.
The code that I described in my post above gives me lines like e.g.: Code:
[1] = "400042;156825;Style Page: Opal Bloodspawn Mace;9200;951966", The addon and its output is intended for my own personal use, and as a way to become more familiar with the inner workings of AddOns/LUA in general. |
Yes, looks okay to me. Not sure why you get items of a guildId where no trader exists though. How should one list any item there?
Did you testreset the SV table before trying new so there is no old data in it? Add d() debit messages to your code to see where it runs through, which items are added at what loop etc. Quote:
|
I found the solution. It turns out that Sharlikran's remark about AGS is correct. I temporarly removed the AGS addon and now it works as expected. Which is a bit of a pity, because I really want to keep using AGS.
So I guess that means that this is the end of my endeavour to process listing data outside ESO :( OTOH I learned that some AddOns apparently change the 'standard' ESO API calls in unexpected ways (I never would have figured this out myself :o) thank you for your help cabwav |
Quote:
You should always disable all other addons if you test yours! Only keep those helpers like merTorchbug updated, ZGOO, LibDebugLogger, DebugLogViewer enabled and the needed dependencies like LibAddonMenu etc. Here are some best practices and helper tools for new addon devs, if you haven't seen that already: https://www.esoui.com/forums/showthread.php?t=9867 |
Thank you Baertram, another lesson learnt :). I admit that I didn't read the guidelines you linked above :o but I assure you that I did read everything this time!
|
All times are GMT -6. The time now is 04:37 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI