Ok got it.
on *:TEXT:!top10:#:{
if ($nick isop #) { top10 # }
else { msg # You are not allowed to use !top10. }
}
alias -l top10 {
window -h @. | var %i 1
while $gettok($remove($read(points.ini,w,$+(*,$1,*),%i),[,]),2,46) {
var %n $v1, %p $gettok($read(points.ini,$calc($readn + 1)),2,61)
aline @. %n %p
var %i $calc($readn + 1)
}
filter -cetuww 2 32 @. @.
var %i 1 | while %i <= 10 {
var %list $addtok(%list,$line(@.,%i),44)
inc %i
}
msg $1 Top 10 point are: $replace(%list,$chr(44),$+($chr(44),$chr(32)))
window -c @.
}
Hello, i need little help with my twitch mirc bot. I was already watching and reading lot of topics but i cant find solution. My point system is working and writing data to Points.ini . Only think what i am looking for is to add command !pointlist and want to get back something like: bot: Hello, there is list of points (nick 5 points, nick2 4 points, nick3 3 points)