this it the proc of !rank, this code display rank 1 to 5 with command !rank. I want it like when i do command !rank2 if will display only rank 2 or if i do !rank31 it will this play those who are on rank 31... is it possible to do this?
here is the proc
proc KAOSTop5 {nick uhost hand chan args} {
global KAOSChannel KAOSScoreFile KAOSPointsName
if {$chan != $KAOSChannel} {return}
set KWinners "Top5 $KAOSPointsName "
set f [open $KAOSScoreFile r]
for { set s 0 } { $s < 5 } { incr s } {
gets $f KAOSTotals
if {[lindex $KAOSTotals 1] > 0} {
append KWinners "15,1<[expr $s +1]>0,1 [lindex $KAOSTotals 0]4,1 [lindex $KAOSTotals 1] "
} {
append KWinners "<[expr $s +1]> Nobody 0 "
}
}
kaosmsg "$KWinners"
close $f
}
if ![catch {set f [open file.txt]}] {
while {![eof $f]} {lappend lines [gets $f]}; close $f
set line [lindex $lines [expr $num - 1]]
} {set line "couldn't open file"}
I'd patch your script but that circling dude of yours drives me crazy