Download
(35 Kb)
Download
Updated: 03/08/15 09:27 AM
Pictures
File Info
Compatibility:
Update 5 (1.5.2)
Updated:03/08/15 09:27 AM
Created:02/13/15 11:57 AM
Monthly downloads:18
Total downloads:6,199
Favorites:1
MD5:
Categories:Discontinued & Outdated, Auction House & Vendors, Developer Utilities
JMGuildSaleHistoryTracker  Popular! (More than 5000 hits)
Version: 0.8.1
by: JordyMoos [More]
JMGuildSaleHistoryTracker


Addon for elder scroll online that keeps track of guild sales. Other addons can request this addon about all the sales of a guild. Or sales and buys from users or of a certain item id. You can also register for events to be informed when there are new sales.



Sale structure

Code:
sale =
{
    saleTimestamp = '',
    seller = '', -- The account name like @player
    buyer = '',
    quantity = '',
    itemLink = '',
    price = '',
    pricePerPiece = '',
    tax = '',
    itemId = '',
    guildName = '',
    isKioskSale = '', -- true when the buyer is not a guild member
}
The addon also stores some information about the guild that the addon uses itself. That information is also in the saved file. (See below)



Guild information structure

Code:
data =
{
    guildList =
    {
        -- Guilds are stored by their name
        "Name of first guild" =
        {
            name = '',
            description = '',

            memberList =
            {
                "@player" = "@Player",
                -- etc..
            },

            -- List of sales as described above
            saleList =
            {
                sale,
                sale,
                sale,
            },
        },

        "Name of second guild" = {}, -- Etc..
    }
}


API


getSalesFromUser
Code:
local saleList = JMGuildSaleHistoryTracker.getSalesFromUser("@Player")
Will return a list of sales made by the given users name. Sales are from all your guilds.



getBuysFromUser
Code:
local salesList = JMGuildSaleHistoryTracker.getBuysFromUser("@Player")
Will return list of "sales" that the given user bought.



getSalesFromItemId
Code:
local saleList = JMGuildSaleHistoryTracker.getSalesFromItemId(1000)
Will return a list of sales from the given item id.



getAllSalesFromGuildId
Code:
local saleList = JMGuildSaleHistoryTracker.getAllSalesFromGuildId(guildId)
Will return all the sales of the guild belonging to the given guild id



getAllSalesFromGuildIndex
Code:
local saleList = JMGuildSaleHistoryTracker.getAllSalesFromGuildIndex(guildIndex)
Will return all the sales of the guild belonging to the given guild index



getVersion
Code:
local version = JMGuildSaleHistoryTracker.getVersion()
Will return the current version of the addon



checkVersion
Code:
---
--- @param atLeastVersion             Means that you need this addon be at least in the given version
--- @param lessThanVersion (optional) Means that the addon needs to be less than the given version
--- JMGuildSaleHistoryTracker.checkVersion(atLeastVersion, lessThanVersion)
---
--- If you do not assign the second argument than it will be automatically assigned to the next mayor version
--- For example if your atLeastVersion is 0.5 than the lessThanVersion will become 1.0
--- You can also set false to the second parameter and than there will be no check against the lessThanVersion version
---
--- Examples:
--- - Lets say that this currents addon version is 1.7 in all the examples then:
---
--- Will return true because 1.5.1 is less than 1.7 and not more than 2.0 (the next mayor)
local isCorrectVersion = JMGuildSaleHistoryTracker.checkVersion('1.5.1')
---
--- Exactly the same as the previous example
local isCorrectVersion = JMGuildSaleHistoryTracker.checkVersion('1.5.1', '2.0')
---
--- False: The current version is lower than what you require
local isCorrectVersion = JMGuildSaleHistoryTracker.checkVersion('1.7.1')
---
--- False: The current version is more than the next mayor
local isCorrectVersion = JMGuildSaleHistoryTracker.checkVersion('0.6.1')
---
--- True: The current version is between the asLeast and LessThan
local isCorrectVersion = JMGuildSaleHistoryTracker.checkVersion('0.6.1', '2.0')
---
--- True: We ignore the LessThan
local isCorrectVersion = JMGuildSaleHistoryTracker.checkVersion('0.6.1', false)
This can be useful if you want to use newer features of the addon.
So you can check if you can use the new features or need to inform the player that he should update the addon.



registerForEvent
Code:
JMGuildSaleHistoryTracker.registerForEvent(event, callback)
Allows you to listen to an event. See Events for list of possible events. The callback function will be called when the events triggers.



unregisterForEvent
Code:
JMGuildSaleHistoryTracker.unregisterForEvent(event, callback)
Stop listening to an event.



Events

All possible events are listen in JMGuildSaleHistoryTracker.events.
Code:
JMGuildSaleHistoryTracker.events


NEW_GUILD_SALES
Code:
JMGuildSaleHistoryTracker.events.NEW_GUILD_SALES
Will be triggered when new sales for a guild is found. The function will have the guild id as its first argument. And a list of new sales as the second argument.
Code:
JMGuildSaleHistoryTracker.registerForEvent(JMGuildSaleHistoryTracker.events.NEW_GUILD_SALES, function (guildId, saleList)
    d('We found ' .. #saleList .. ' new sales for guild id ' .. guildId)
    d(saleList)
end)


Test command

As addon tester you can use this command to check how much sale records we have for the given argument.
To check how many buys or sells a user has, you can use his @username as the argument for the command.

Code:
/jm_gsht @somebody
Will print for example this to your main chat window:
Info for @somebody
Seller: 5
Buyer: 10
ItemId: 0
Guild: 0
Which will tell us that "@somebody" sold 5 items, bought 10 items, there are 0 sales with itemId "@somebody" and there are no sales for a guildIndex "@somebody"

Examples:
Code:
/jm_gsht 1
The argument "1" will definitely match your guildIndex 1 so you might get something like this:
Info for 1
Seller: 0
Buyer: 0
ItemId: 0
Guild: 3000
The command uses the api methods and then counts how many sales it received.
This can be usefull for testers to quickly check what the addon collected.
0.8
- Added getVersion and checkVersion

0.7
- Added events. You can now register for events.
-- Added event that will be triggered when new sales are found per guild

0.6
- Added price per piece to the sales data. Will also be applied to previous sales

0.5
- Added sale backward compatibility system which allows us to add more data to the sale without throwing away old sales

0.4
- Added addon settings
-- Testing mode is now also available via the addon settings

0.3.1
- Increased the wait time between core function calls so we are not spamming the system
- Removed some testing messages to lower the spam in the chat
-- The removed messages are:
--- 'We are done with guildId X'
--- 'Guild id X found Y new sales'
--- We now only message about new sales if we really found new sales

0.3
- Added testing messages which can be enabled by changing "testingMode" to true the the lua file.
Or by downloading version 0.3.testing.
I will add a gui settings soon

0.2.1
- Readme update
- Added more information in the test command
Post A Reply Comment Options
Unread 02/26/15, 03:11 PM  
JordyMoos
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 11
Uploads: 2
Release 0.8 checkVersion

Release 0.8 is out with version check functionality.

In preperation of release 1.0 i added some version check functions: getVersion and checkVersion.
For documentation about functions see the Addon Info page.

checkVersion can come in handly if you want to use some of the newer features. You can use the function to check if those features are actually implemented yet.

For example lets say version 0.9 adds a new property to the sale data. You want to check if the addon is atleast that version so you can expect the property to exists. Instead of getting lua errors.
Last edited by JordyMoos : 02/26/15 at 03:17 PM.
Report comment to moderator  
Reply With Quote
Unread 02/23/15, 01:09 PM  
JordyMoos
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 11
Uploads: 2
Release 0.7 Events

Release 0.7 is out with events.

You can now register for the new guild sales event and your addon will then be notified if there are new sales tracked.

Please check the addon information page about how to use the feature.
Report comment to moderator  
Reply With Quote
Unread 02/16/15, 02:58 AM  
JordyMoos
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 11
Uploads: 2
Arrow Gui Settings in release 0.4

Added the Gui Settings in version 0.4
Now you can toggle to test mode via the settings menu. You can also change some other settings like the max age of a sale and some intervals.

For version 0.5 is planned that price per piece is also in the sale data because that is used often.
Are there some more features someone would like to see?
Last edited by JordyMoos : 02/16/15 at 02:59 AM.
Report comment to moderator  
Reply With Quote
Unread 02/14/15, 07:00 PM  
JordyMoos
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 11
Uploads: 2
Originally Posted by timidobserver
Thanks. I plan to use your addon as a data source for my first addon. I'll let you know how it goes.
I upaded the download now the directory in the zip has the correct name. I also removed some messages and increased the wait time so it wont see it as spam.

Oke cool you can send me an PM when your addon gets released so i can take a look
Report comment to moderator  
Reply With Quote
Unread 02/14/15, 04:04 PM  
timidobserver

Forum posts: 37
File comments: 299
Uploads: 0
Originally Posted by JordyMoos
Originally Posted by timidobserver
Originally Posted by JordyMoos
If the addon works or does not work by other users then please let me know
Okay I tinkered with it and fixed it. I had to change the addon folder from JMGuildSaleHistoryTracker-0.3 to JMGuildSaleHistoryTracker. That made it start working.

Also note, your testing mode spams the chat and causes the game to be kicked from the server.
Thanks timidobserver i will make sure that the next uploads will have the correct directory name

I will create a new version when i am home with less messages, higher timers and right directory naming
Thanks. I plan to use your addon as a data source for my first addon. I'll let you know how it goes.
Report comment to moderator  
Reply With Quote
Unread 02/14/15, 02:54 PM  
JordyMoos
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 11
Uploads: 2
Originally Posted by timidobserver
Originally Posted by JordyMoos
If the addon works or does not work by other users then please let me know
Okay I tinkered with it and fixed it. I had to change the addon folder from JMGuildSaleHistoryTracker-0.3 to JMGuildSaleHistoryTracker. That made it start working.

Also note, your testing mode spams the chat and causes the game to be kicked from the server.
Thanks timidobserver i will make sure that the next uploads will have the correct directory name

I will create a new version when i am home with less messages, higher timers and right directory naming
Report comment to moderator  
Reply With Quote
Unread 02/14/15, 02:34 PM  
timidobserver

Forum posts: 37
File comments: 299
Uploads: 0
Originally Posted by JordyMoos
If the addon works or does not work by other users then please let me know
Okay I tinkered with it and fixed it. I had to change the addon folder from JMGuildSaleHistoryTracker-0.3 to JMGuildSaleHistoryTracker. That made it start working.

Also note, your testing mode spams the chat and causes the game to be kicked from the server.
Last edited by timidobserver : 02/14/15 at 02:36 PM.
Report comment to moderator  
Reply With Quote
Unread 02/14/15, 02:26 PM  
timidobserver

Forum posts: 37
File comments: 299
Uploads: 0
Originally Posted by JordyMoos
Originally Posted by timidobserver
I tried this addon and it is not working. The slash commands do not work and no saved variables file is being generated. However, it is listed in my addons list and it is enabled.
It should work straight away. I will add a "testing" version of the addon which will print test messages to screen. So you can see if it really is not doing anything or if it fails somewhere (i can use that information to fix the bug)

It might not work in combination with other addons that do the same, like shopkeeper.

Weird that you do not even have a saved variables file...
It is really strange. I turned on testing mode and disabled all other addons. It still won't do anything and won't create a saved variables file. I even tried installing it manually.
Last edited by timidobserver : 02/14/15 at 02:27 PM.
Report comment to moderator  
Reply With Quote
Unread 02/14/15, 05:55 AM  
JordyMoos
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 11
Uploads: 2
If the addon works or does not work by other users then please let me know
Report comment to moderator  
Reply With Quote
Unread 02/14/15, 04:23 AM  
JordyMoos
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 11
Uploads: 2
Originally Posted by timidobserver
I tried this addon and it is not working. The slash commands do not work and no saved variables file is being generated. However, it is listed in my addons list and it is enabled.
It should work straight away. I will add a "testing" version of the addon which will print test messages to screen. So you can see if it really is not doing anything or if it fails somewhere (i can use that information to fix the bug)

It might not work in combination with other addons that do the same, like shopkeeper.

Weird that you do not even have a saved variables file...
Last edited by JordyMoos : 02/14/15 at 04:25 AM.
Report comment to moderator  
Reply With Quote
Unread 02/13/15, 09:19 PM  
timidobserver

Forum posts: 37
File comments: 299
Uploads: 0
I tried this addon and it is not working. The slash commands do not work and no saved variables file is being generated. However, it is listed in my addons list and it is enabled.
Report comment to moderator  
Reply With Quote
Unread 02/13/15, 02:14 PM  
JordyMoos
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 11
Uploads: 2
That is exactly what this addon is for

Scanning the guild etc takes at lot focus of the intention of those addons, which is showing information in some usefull way like shopkeeper etc does. With this addon the other addons like shopkeeper can focus more on what they want to achieve and care less about how they got the data

This addon focuses on the guild sale history.
I made another addon that focuses on what is currently in the guild.
http://www.esoui.com/downloads/info9...eSnapshot.html

Both can be used independent of each other but can be even more valuable when used in a graphical addon together

Originally Posted by dominoid
Sounds like this might be what is desperately needed. Things like Shopkeeper, Price Tracker or Guild Store Search all of which provide different function and all of which must query the guild sales history/guild store separately really need a common library that reduces these lengthy functions.
Report comment to moderator  
Reply With Quote
Unread 02/13/15, 01:55 PM  
dominoid
AddOn Author - Click to view AddOns

Forum posts: 34
File comments: 276
Uploads: 2
Sounds like this might be what is desperately needed. Things like Shopkeeper, Price Tracker or Guild Store Search all of which provide different function and all of which must query the guild sales history/guild store separately really need a common library that reduces these lengthy functions.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: