mIRC Homepage

mIRC script

Posted By: TitaniumG

mIRC script - 11/09/14 03:11 AM

Hi, I have a point system on my stream and was wondering if anyone has a script that will work with finding out who in the chat or overall on stream has the most points such as a top 5 or top 10 command such as !top 5, so it will list up the users and the amount they have? As i Have been asked this a few times and I cant find it anywhere. I know its possible as I have seen other streamers have it. If anyone can help me with the script it would be much appreciated.
Posted By: Bramzee

Re: mIRC script - 11/09/14 06:53 PM

Code:
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 @.
}
Posted By: TitaniumG

Re: mIRC script - 12/09/14 02:39 AM

Thanks very much works as I wanted smile Do you know of a way to bring up how long the user has followed for?
Posted By: Bramzee

Re: mIRC script - 13/09/14 01:54 PM

You'd have to make a script (or try finding one) that writes the new followers to a file and keeps track of it. But I'm not sure how that would work.
Posted By: patrickplays

Re: mIRC script - 11/10/14 08:39 PM

Originally Posted By: Bramzee
Code:
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 @.
}


how would it work if i had a .ini that looks like that:
Code:
[#channel.nick1]
a=2

[#channel.nick2]
a=3
b=5


+ is there a more efficient way? because it takes about 1 minute for a 4085 lines .ini
Posted By: patrickplays

Re: mIRC script - 14/10/14 07:40 PM

cant get it to work >.<

GOT IT lol
© 2022 mIRC Discussion Forums