Wednesday 6 February 2008

C:SI Stats Perl Script

I wrote a Perl script that grabs avatar duel data from the C:SI website and calculates some useful information. It can be downloaded here. I know that most of you reading this probably have no idea what to do with a Perl script. If I had the resources, I would put it up on a web site so that everyone could make use of it. I invite the C:SI devs to take this script and use it on the website, or for Robby to do something with it on his blog (or anyone to put it up on the web, for that matter). It takes avatar names as command line arguments, and is especially useful if given multiple names (so that you can see the combined stats of your alts).

Example:
$ ./csiscores.pl Colin Kiernan Selene Corvale
Getting stats for Colin Kiernan...
Getting stats for Selene Corvale...

Colin Kiernan
Total Wins Losses Ratio
Count 3323 1686 1637 1.0299 (102:100)
%total 93.13% 91.38% 95.01%

Selene Corvale
Total Wins Losses Ratio
Count 245 159 86 1.8488 (184:100)
%total 6.87% 8.62% 4.99%

Overall
Total Wins Losses Ratio
3568 1845 1723 1.0708 (107:100)


Edit: Another thing you could do with this is list all the members in a clan and get the total clan score, how much each person contributed, etc. If you do that, I recommend promptly logging into SL and buying a few more swords to cover the bandwidth you've just used on the website ;)

Edit 2: I forgot to mention that it only takes the stats from the first page (30 sims). Since they are sorted in order of most duels, the sims omitted probably won't have that big an effect on the results.

No comments: