Another LinqPad Script to parse your bazaar logs.
There are no outside dependencies with this one, so I just pasted the code.
Copy and paste this into Linqpad and select Language: C# Program
Hit F5 and get a pretty little dump of your Bazaar transactions.
This was quick and dirty, I only deal with platnium in my trader... so obvious bug would happen if you have 1p7g5s56c type transactions.
Sample Output: (Trader/Buyer/Item/Server removed for SECURITY)

There are no outside dependencies with this one, so I just pasted the code.
Copy and paste this into Linqpad and select Language: C# Program
Hit F5 and get a pretty little dump of your Bazaar transactions.
This was quick and dirty, I only deal with platnium in my trader... so obvious bug would happen if you have 1p7g5s56c type transactions.
Rich (BB code):
void Main()
{
var itemsSold = new List<BazaarSell>();
//Path to your EverQuest Log Folder, make sure you have the trailing \
var logFolder = @"C:\Users\Public\Daybreak Game Company\Installed Games\EverQuest\Logs\";
var logFiles = Directory.GetFiles(logFolder,"bzrlog*");
var months = new Dictionary<string,int>();
months.Add("Jan",1);
months.Add("Feb",2);
months.Add("Mar",3);
months.Add("Apr",4);
months.Add("May",5);
months.Add("Jun",6);
months.Add("Jul",7);
months.Add("Aug",8);
months.Add("Sep",9);
months.Add("Oct",10);
months.Add("Nov",11);
months.Add("Dec",12);
foreach(var l in logFiles)
{
var server = l.Substring(l.IndexOf("_")+1,l.LastIndexOf("_") - l.IndexOf("_")-1);
var trader = l.Replace(logFolder,string.Empty)
.Replace(server,string.Empty)
.Replace(".txt",string.Empty)
.Replace("_",string.Empty)
.Replace("bzrlog",string.Empty);
var data = File.ReadAllLines(l);
foreach(var line in data)
{
if(!line.Contains("purchased")) continue;
if(line.Contains("purchased by buyers.")) continue;
var date = line.Substring(0,line.LastIndexOf("]"))
.Replace("[","");
var buyer = line.Replace("[",string.Empty)
.Replace("]",string.Empty)
.Replace(date,string.Empty)
.TrimStart();
buyer = buyer.Substring(0,buyer.IndexOf(" purchased")).Trim();
var quantity = line.Substring(line.IndexOf("purchased "))
.Replace("purchased ",string.Empty);
quantity = quantity.Substring(0,quantity.IndexOf(" ")).Trim();
var item = line.Replace(date,string.Empty);
item = item.Substring(item.IndexOf(quantity+" "))
.Replace(quantity + " ",string.Empty);
item = item.Substring(0,item.IndexOf(" for (")).Trim();
var amount = line.Substring(line.LastIndexOf("("))
.Replace("(",string.Empty)
.Replace(")",string.Empty)
.Replace(".",string.Empty)
.Replace("p",string.Empty);
var dateparts = date.Split(' ');
var timeParts =dateparts[3].Split(':');
var monthString = dateparts[1];
var dayString = Convert.ToInt32(dateparts[2]);
var yearString = Convert.ToInt32(dateparts[4]);
var hourString = Convert.ToInt32(timeParts[0]);
var minuteString = Convert.ToInt32(timeParts[1]);
var secondString = Convert.ToInt32(timeParts[2]);
var monthValue = months[monthString];
var realDate = new DateTime(yearString,monthValue,dayString,hourString,minuteString,secondString);
var sell = new BazaarSell();
sell.Server = server;
sell.Timestamp = date;
sell.Trader = trader;
sell.Buyer = buyer;
sell.Quanity = Convert.ToInt32(quantity);
sell.Item = item;
sell.Amount = Convert.ToDouble(amount);
sell.Date = realDate;
itemsSold.Add(sell);
}
}
itemsSold
.OrderByDescending(x=>x.Date)
.Dump();
}
public class BazaarSell
{
public string Server {get;set;}
public string Trader {get;set;}
public string Buyer {get;set;}
public int Quanity {get;set;}
public string Item {get;set;}
public double Amount {get;set;}
public DateTime Date {get;set;}
public string Timestamp {get;set;}
}
// Define other methods and classes here
Sample Output: (Trader/Buyer/Item/Server removed for SECURITY)
Last edited:


