alias qu return $+(",$1,") alias updatewr { set %btmatchbot if ($me ison #BT-Match) { if (^]-BT-MaTcH-[^ ison #BT-Match) { %btmatchbot = ^]-BT-MaTcH-[^ write -c $qu($logdir_]-BT-MaTcH-[_.log) } else if (]-BT-MaTcH-[ ison #BT-Match) { %btmatchbot = ]-BT-MaTcH-[ write -c $qu($logdir]-BT-MaTcH-[.log) } else { echo -ae $+(,$color(info)) Error: The BT-Match bot appears to be offline. halt } echo -s BOT is %btmatchbot log on %btmatchbot .timermsgbot -m 1 1500 .msg %btmatchbot !rec show .timerstartcon 1 20 rec2html.txt } else { echo -ae $+(,$color(info)) Error: You must be on #BT-Match to update the list! } } alias rec2html.txt { if ($isfile(BTWR.html)) write -c BTWR.html echo -a Starting conversion... set %recticks $ticks hmake recstats 100 var %log, %c, %l if (%btmatchbot == ^]-BT-MaTcH-[^) %log = $qu($logdir_]-BT-MaTcH-[_.log) else if (%btmatchbot == ]-BT-MaTcH-[) %log = $qu($logdir]-BT-MaTcH-[.log) %i = $lines(%log) window -h @lst | window -h @rec | window -h @stat loadbuf @lst %log while (%i) { %c = $line(@lst,%i) if ($regex(%c,/(?:http|www)/)) { !.echo -q $regsub(%c,/~\^\](.+)\[\^~/S,,%c) hinc recstats $gettok($regml(1),4,32) aline @rec $gettok($mid($regml(1),3-),1-7,32) } dec %i } filter -ct 3 32 @rec @rec %i = $hget(recstats,0).item while (%i) { %c = $hget(recstats,$hget(recstats,%i).item) aline @stat $hget(recstats,%i).item - $iif($len(%c) == 1,$+(0,%c),%c) dec %i } filter -ctue 3 32 @stat @stat rec2html.html } alias rec2html.html { write BTWR.html BunnyTrack World Records
$crlf $&

$crlf $& $& #BT-MaTcH World Record List $crlf $&
Click on a name to view that player's records
Click on a map to view a screenshot

write BTWR.html $crlf $& $crlf $&
Statistics
Total Records $+ $line(@rec,0) $+ $crlf $&
Ranked Players $+ $hget(recstats,0).item $+ $crlf $&

write BTWR.html $crlf$& $crlf $& $crlf $& $crlf
 Player SortedMap Sorted
$crlf write BTWR.html $crlf $& $crlf $& $crlf $& rec2html.stat } alias rec2html.stat { var %i = 1, %l = $line(@stat,0), %c while (%i <= %l) { %c = $line(@stat,%i) write BTWR.html $crlf $& $crlf $& inc %i } rec2html.rec } alias rec2html.rec { var %i = 1, %l = $hget(recstats,0).item, %ii, %ll, %c, %count, %d write BTWR.html
RankPlayerRecords
$+ %i $+ .) $+ $gettok(%c,1,32) $+ $+ $& $iif($left($gettok(%c,3,32),1) == 0,$right($gettok(%c,3,32),1),$gettok(%c,3,32)) $+
$crlf $& $crlf filter -ct 1 32 @stat @stat while (%i <= %l) { %d = $line(@stat,%i) write BTWR.html %count = 0 if (%i == 1) { %ii = 1 %ll = $hget(recstats,$gettok(%d,1,32)) } else { %ll = $calc(%ii + $hget(recstats,$gettok(%d,1,32)) - 1) } while (%ii <= %ll) { %c = $line(@rec,%ii) inc %count write BTWR.html $crlf $& $crlf $& inc %ii } inc %i } write BTWR.html
$crlf $&
) $& $+ $gettok(%d,1,32) $+($chr(40),$hget(recstats,$gettok(%d,1,32)),$chr(41)) $& $+ [Back $& $+ /Top]
$+ %count $+ . $+ $gettok(%c,1,32) $+ $+ $gettok(%c,5,32) $+
$crlf filter -ct 1 32 @rec @rec write BTWR.html $crlf $& $crlf $& $crlf $& $crlf $& %i = 1 %l = $line(@rec,0) while (%i <= %l) { %c = $line(@rec,%i) write BTWR.html $crlf $& $crlf $& $& inc %i } %c = $calc($ticks - %recticks) if ($len(%c) > 3) %c = $bytes(%c) else %c = 0. $+ %c write BTWR.html
 MapRecord HolderTime
$+ $+(%i,.) $+ ) $+ $gettok(%c,1,32) $+ $+ $gettok(%c,3,32) $+ $+ $gettok(%c,5,32) $+


Page generated in %c $+ s on $fulldate $&
mIRC 6.03 blows.

window -c @lst | window -c @rec | window -c @stat hfree recstats | unset %recticks log off %btmatchbot unset %btmatchbot echo -a Conversion completed - $mircdirBTWR.html $+($chr(40),%c,s,$chr(41)) }