alias top5 {
; Open a hidden sorted window.
window -hs @i
var %i = 1, %a = 1, %top5
; Add this info to the window
; Each line looks like: <score> <name>
while $ini(inplay.ini,money,%i) {
aline @i $readini(inplay.ini,money,$ifmatch) $ifmatch
inc %i
}
; And retrieve the top 5 lines...
while %a <= 5 && $line(@i,%a) {
echo * Place %a - $gettok($ifmatch,2,32) with $gettok($ifmatch,1,32) points.
inc %a
}
window -c @i
}