Thread Tools Display Modes
Prev Previous Post   Next Post Next
03/13/23, 08:43 AM   #1
cabwav
Join Date: Aug 2020
Posts: 7
Question 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:
  1. for j = 1, GetNumGuilds() do
  2.         local guildId = GetGuildId(j)
  3.         if (SelectTradingHouseGuildId(guildId)) then
  4.             local currentListingCount, maxListingCount = GetTradingHouseListingCounts()
  5.             if(currentListingCount > 0) then
  6.                 for i = 1, currentListingCount do
  7.                     local _,itemName,displayQuality,stackCount,_,timeRemaining,salePrice = GetTradingHouseListingItemInfo(i)
  8.                     local link = GetTradingHouseListingItemLink(i,j)
  9.                     local linkItemId = GetItemLinkItemId(link)
  10.                   table.insert(mytable,string.format("%s;%s;%s;%s;%s",guildId,linkItemId,itemName,salePrice,timeRemaining))
  11.                 end
  12.             end
  13.          end
  14.       end
This returns a table that contains twice the number of items, exactly the same for each guild although one of the guilds has no sellable items. What am I missing here?

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

Last edited by cabwav : 03/13/23 at 10:14 AM.
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » How to get Trading House Listing data


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off