I'd like to start tracking sell prices for auction times and be able to view them via alias or even export to excel. The auctions end in this format:
"<item name> sold to <winner> for <#> platinum!"
Example: "a gaudy golden crown sold to Rahas for 50 platinum!"
How would I go about capturing the item, the buyer and the price and saving it for future reference?
Thanks in advice!
How to capture and store data (and view it via an alias)?
Re: How to capture and store data (and view it via an alias)?
So, the pattern for that should be relatively simple, like so: ^(.+) sold to ([A-Z][\w'-]+) for (\d+) platinum!
As to how you should go about storing/displaying/exporting this data, there are a few things. Basically, the ideal method is going to depend on two main factors, how quickly are you gathering new data points, and how many total data points are you expecting?
So, for example, perhaps you see some daily record of sales, and you get 100+ records essentially at the same instant, and you are checking every day, so you expect in the range of hundreds of thousands to maybe even millions of records. For that much data, you definitely want to use a database, which is a bit of work to get setup, but it is fast enough that you should be able to add all the data points as they come in. Alternatively, you could be seeing one record every few minutes while you play, and expect to have maybe a few thousand total datapoints after playing for a while. For something like that, i would probably just recommend using a table, and saving that table whenever a new datapoint comes in.
So, what do you expect to be seeing in those terms?
As to how you should go about storing/displaying/exporting this data, there are a few things. Basically, the ideal method is going to depend on two main factors, how quickly are you gathering new data points, and how many total data points are you expecting?
So, for example, perhaps you see some daily record of sales, and you get 100+ records essentially at the same instant, and you are checking every day, so you expect in the range of hundreds of thousands to maybe even millions of records. For that much data, you definitely want to use a database, which is a bit of work to get setup, but it is fast enough that you should be able to add all the data points as they come in. Alternatively, you could be seeing one record every few minutes while you play, and expect to have maybe a few thousand total datapoints after playing for a while. For something like that, i would probably just recommend using a table, and saving that table whenever a new datapoint comes in.
So, what do you expect to be seeing in those terms?
Re: How to capture and store data (and view it via an alias)?
These would be the latter. Mostly between 10 and 50 per day. So a table would suffice.
How would I go about setting that up and pulling data from it to display via an alias?
And another thing I thought of... how to handle multiple entries for the same item at different sell prices.
How would I go about setting that up and pulling data from it to display via an alias?
And another thing I thought of... how to handle multiple entries for the same item at different sell prices.
Re: How to capture and store data (and view it via an alias)?
So I’m assuming all you care about is the item sold and the price it was sold at, and you don’t care about who purchased it. Given that, would you want an individual line for each sale, even for identical items, of would you prefer to combine identical items into a single line, showing the lowest, highest, and average sell values, or perhaps all sell values sorted from lowest to highest (or highest to lowest)?
Re: How to capture and store data (and view it via an alias)?
I would like to capture the buyer also to see who has all the money... lol. The easiest way to cross reference would be to have the list displayed by sell item in alphabetical order. Duplicates of the same item on their own line, sorted by date or sell price.
Another thought, it would be nice to capture the date also, to see pricing trends over time.
Another thought, it would be nice to capture the date also, to see pricing trends over time.
Re: How to capture and store data (and view it via an alias)?
Okay, so I threw together a very simple script (i.e. paste this into a script, which you will then use your aliases and triggers to call the functions of), which should at least get you close to what you are looking for.
And whatever alias you setup to display your auction data should have this for its code: show_auction_data()
Then your trigger that captures the auction info should use this for its code: add_auction_data(matches[2],matches[4],matches[3])
And whatever alias you setup to display your auction data should have this for its code: show_auction_data()
Re: How to capture and store data (and view it via an alias)?
Awesome! Thanks.
Re: How to capture and store data (and view it via an alias)?
Got it working! How would I go about deleting data already captured and stored?
Re: How to capture and store data (and view it via an alias)?
As in, some of the data is bad? Use this in the command line: lua auction_data = {}
Then the next time it gathers data, it will save over whatever it had before, leaving you with just stuff you capture from that point on.
Then the next time it gathers data, it will save over whatever it had before, leaving you with just stuff you capture from that point on.
Re: How to capture and store data (and view it via an alias)?
I was using an in game 'emote' to add data just for testing. Thanks again!