Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!top10:#:{ run_top10 # }
- alias run_top10 {
- var %t = $lines(points.ini)
- if (!%t) { return }
- window -nj $+ %t @.
- loadbuf @. points.ini
- var %l = $line(@.,0)
- var %i = 1
- while (%i <= %l) {
- var %line = $line(@.,%i)
- rline @. %i $replace(%line,=,$chr(32))
- if (%i == %l) { dline @. 1 }
- inc %i
- }
- filter -cetuww 2 32 @. @.
- var %z 1
- while (%z <= 10) {
- var %list = $addtok(%list,%z $+ . $line(@.,%z),44) $iif(%z !== 10,-)
- inc %z
- }
- echo msg $1 Top 10 point are: $replace(%list,$chr(44),$+($chr(32)))
- window -c @.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement