mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2014
Posts: 18
K
Kawalli Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Apr 2014
Posts: 18
Hey fellas,
I have a ".ini" file for my coins, it save the "money" like this:

Code:
[Nickname1]
Money=100

[Nickname2]
Money=299

[Nickname3]
Money=500

[Nickname4]
Money=387

[Nickname5]
Money=120


is there a easy way to filter the top 5 "Money" and give a message like:
Top5: Nickname(500),Nickname(450),Nickname(349),Nickname(300),Nickname(200)

EDIT:/
Saw the other "Top Ten" thread and blessings answer, that is the script (i changed it a bit, so far i could!):

Code:
on *:TEXT:!top5:#:{
 top5 #
}
alias -l top5 {
  window -h @. | var %i 1
  while $gettok($remove($read(Casino.ini,w,$+(*,$1,*),%i),[,]),2,46) {
    var %n $v1, %p $gettok($read(Casino.ini,$calc($readn + 1)),2,61)
    aline @. %n %p
    var %i $calc($readn + 1)
  }
  filter -cetuww 2 32 @. @.
  var %i 1 | while %i <= 5 {
    var %list $addtok(%list,$line(@.,%i),44)
    inc %i
  }
  msg $1 Top 5: $replace(%list,$chr(44),$+($chr(44),$chr(32)))
  window -c @.
}


But i dont know what i have to change exactly to read my points! smile



Last edited by Kawalli; 30/04/14 08:58 AM.
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Literally the same kind of topic was replied to 20 minutes ago.

https://forums.mirc.com/ubbthreads.php/topics/245600/How_to_display_a_top_10#Post245600


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Apr 2014
Posts: 18
K
Kawalli Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Apr 2014
Posts: 18
Like my edit, i saw it.
I changed the script as far as i could, but i have another "point system" and i dont know how change blessings script so it can read my .ini correct.

But yes i ask'd in the other thread now, perhaps a mod can delete this here.

Last edited by Kawalli; 30/04/14 09:07 AM.

Link Copied to Clipboard