[Updates and fixes for pwstats Karthik Arumugham **20070322050534 end_tourney.pl: Remove basketball-type scoring, add planet count, neaten up script output, add links to other stats files, and more. sample_key.html: A key to the abbreviations used in pwstats.html. ] { addfile ./Vanilla/docs/sample_key.html hunk ./Vanilla/docs/sample_key.html 1 + + + +PWStats Key + + +

Player/Base Stats:

+ + + + + + + + + + + + + + + + +
NameDescription
TPDTotal Planets Destroyed (Neuted)
TPTTotal Planets Taken
TPBTotal Planets Bombed
TABTotal Armies Bombed
TACTotal Armies Carried (Armies picked)
TADTotal Armies Delivered (Dropped on any planet or on base)
PADPercentage of Armies Delivered (TAD/TAC Percentage)
CAKCarried Armies Killed (Your armies dooshed)
EAOEnemy Armies Ogged (Enemy armies dooshed)
ECKEnemy Carriers Killed
PCKPotential Carriers Killed (Non-carriers with kills)
TEKTotal Enemies Killed
DEFDeaths by Enemy Fire
ACCActual Carriers Created (Ships using your kills to pick)
+

+

Kill Stats:

+ + + + + + + + + + hunk ./Vanilla/robots/end_tourney.pl 40 +# Enter your local time zone here, standard time +$tz = "EST"; +# Enter your local time zone here, daylight savings time (if applicable) +$tzdst = "EDT"; + +# Edit this to point to a valid key.html key file +$keyloc = "http://stats.psychosis.net/key.html"; + hunk ./Vanilla/robots/end_tourney.pl 51 +# This is for keeping a local stats archive in addition to the stats +# that auto-archive.pl sends to http://www.netrek.org/stats/. hunk ./Vanilla/robots/end_tourney.pl 54 -#$dropdir = "/ls/home/tom/public_html/results"; +#$dropdir = "/home/karthik/public_html/clue"; hunk ./Vanilla/robots/end_tourney.pl 59 -#$dropsub = 1; +$dropsub = 1; hunk ./Vanilla/robots/end_tourney.pl 63 -#$newdrop = 1; +$newdrop = 1; + hunk ./Vanilla/robots/end_tourney.pl 67 +if ($keyloc) { + $key = "(View Key)"; +} + hunk ./Vanilla/robots/end_tourney.pl 84 + $endtime = $id; hunk ./Vanilla/robots/end_tourney.pl 90 + $endtime = time; +} + +@months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); +@weekdays = qw(Sun Mon Tue Wed Thu Fri Sat Sun); +($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($endtime); +if ($hour < 12) { + $ampm = "AM"; +} else { + $hour = $hour - 12; + $ampm = "PM"; +} +if ($hour == 0) { + $hour = 12; +} +if ($min < 10) { + $min = "0${min}"; +} +if ($isdst) { + $tz = $tzdst; hunk ./Vanilla/robots/end_tourney.pl 111 +$endtimestr = "$weekdays[$wday] $months[$mon] $mday ". ($year + 1900) . + " at $hour:$min $ampm $tz"; hunk ./Vanilla/robots/end_tourney.pl 126 +$neuts=0; hunk ./Vanilla/robots/end_tourney.pl 147 - $neuts = 20 - $homecurrentplanets - $awaycurrentplanets; hunk ./Vanilla/robots/end_tourney.pl 165 + system("ln -s \"$dirpath/pwstats.html\" \"$dirpath/index.html\""); hunk ./Vanilla/robots/end_tourney.pl 212 + $neuts = 20 - $homecurrentplanets - $awaycurrentplanets; hunk ./Vanilla/robots/end_tourney.pl 214 - print "Score: $homescore, $awayscore\n"; + print "Score: $homescore, $awayscore, $neuts\n"; hunk ./Vanilla/robots/end_tourney.pl 339 + # This is deprecated due to most clients being run without visible stdout hunk ./Vanilla/robots/end_tourney.pl 346 - $winner = 0; - - if ( $awayscore > $homescore ) { - if ( $awayscore - $homescore > 2 ) { - print "FINAL SCORE: $awayteam defeats $hometeam, ${awayscore}-$homescore\n\n"; - $winner = 1; - } + if ($neuts) { + print "FINAL SCORE: $hometeam -vs- $awayteam, ${homecurrentplanets}-${awaycurrentplanets}-${neuts}\n\n"; hunk ./Vanilla/robots/end_tourney.pl 349 - if ( $homescore - $awayscore > 2 ) { - print "FINAL SCORE: $hometeam defeats $awayteam, ${homescore}-$awayscore\n\n"; - $winner = 1; - } - } - - if ( ! $winner ) { - print "FINAL SCORE: $hometeam draws $awayteam, ${homescore}-$awayscore\n\n"; + print "FINAL SCORE: $hometeam -vs- $awayteam, ${homecurrentplanets}-${awaycurrentplanets}\n\n"; hunk ./Vanilla/robots/end_tourney.pl 402 +if ($neuts) { + $planetscore = "${homecurrentplanets}-${awaycurrentplanets}-${neuts}"; +} else { + $planetscore = "${homecurrentplanets}-${awaycurrentplanets}"; +} hunk ./Vanilla/robots/end_tourney.pl 411 -PWstats: $awayteam ($awayrace) at $hometeam ($homerace) +PWStats: $hometeam ($homerace) -vs- $awaytem ($awayrace) hunk ./Vanilla/robots/end_tourney.pl 414 -

PWstats: $awayteam ($awayrace) at $hometeam ($homerace)

- -
NameDescription
KBPKills by Phaser
KBTKills by Torpedo
KBSKills by Smack (Plasma)
DBPDeaths by Phaser
DBTDeaths by Torpedo
DBSDeath by Smack (Plasma)
-
FINAL SCORE: -END - -if ( $awayscore > $homescore ) { - print OUTPUT <$awayteam ($awayrace) ${th}$awayscore -
$hometeam ($homerace) ${th}$homescore +Game Ended: $endtimestr +

+ +${th}Home Team${th}Away Team + hunk ./Vanilla/robots/end_tourney.pl 420 - +
+
$hometeam ($homerace)$awayteam ($awayrace)
$th$planetscore
FINAL SCORE: 
+
Scoring Mode: Planet Count (11-8-1 or 8-11-1 required for victory)
hunk ./Vanilla/robots/end_tourney.pl 425 +if ($homecurrentplanets <= 8) { + print OUTPUT "

$awayteam (Away) -defeats- $hometeam (Home)!

"; +} elsif ($awaycurrentplanets <= 8) { + print OUTPUT "

$hometeam (Home) -defeats- $awayteam (Away)!

"; hunk ./Vanilla/robots/end_tourney.pl 430 - print OUTPUT <$hometeam ($homerace) ${th}$homescore -
$awayteam ($awayrace) ${th}$awayscore -
- -END + print OUTPUT "

$hometeam (Home) -ties- $awayteam (Away).

"; hunk ./Vanilla/robots/end_tourney.pl 432 +print OUTPUT ""; hunk ./Vanilla/robots/end_tourney.pl 461 -

Player Stats

+

+Download: LTD Stats |  +INL Log | Game Recording (Cambot) +

+Player Stats $key hunk ./Vanilla/robots/end_tourney.pl 471 - ${th}tad/tac/%ad${th}cak${th}eao${th}eck${th}pck${th}tek${th}def${th}acc + ${th}tad/tac/pad${th}cak${th}eao${th}eck${th}pck${th}tek${th}def${th}acc hunk ./Vanilla/robots/end_tourney.pl 535 - ${th}tad/tac/%ad${th}cak${th}eao${th}eck${th}pck${th}tek${th}def${th}acc + ${th}tad/tac/pad${th}cak${th}eao${th}eck${th}pck${th}tek${th}def${th}acc hunk ./Vanilla/robots/end_tourney.pl 603 - ${th}tad/tac/%ad${th}cak${th}eao${th}eck${th}pck${th}tek${th}def${th}acc + ${th}tad/tac/pad${th}cak${th}eao${th}eck${th}pck${th}tek${th}def${th}acc hunk ./Vanilla/robots/end_tourney.pl 620 - ${th}tad/tac/%ad${th}cak${th}eao${th}eck${th}pck${th}tek${th}def${th}acc + ${th}tad/tac/pad${th}cak${th}eao${th}eck${th}pck${th}tek${th}def${th}acc hunk ./Vanilla/robots/end_tourney.pl 635 - ${th}Name ${th}Min ${th}tek ${th}def ${th}tad/tac/%ad ${th}cak + ${th}Name ${th}Min ${th}tek ${th}def ${th}tad/tac/pad ${th}cak }