mIRC Home    About    Download    Register    News    Help

Print Thread
Help With Stats Script Plz #161801 11/10/06 01:05 PM
Joined: Oct 2006
Posts: 11
W
WarlockTheWeary Offline OP
Pikka bird
OP Offline
Pikka bird
W
Joined: Oct 2006
Posts: 11
trying to do a stats script ...

i need it to check an unowins.ini file that looks like this ...
[jackie_5012]
wins=8
[gwyidr]
wins=1
[WarlockWeary]
wins=8
[|Raven|]
wins=10

I want it to check the "wins" and display in order the top 10
best "wins"

HELP!

alias xxx {
var %next = 0
/msg $chan 4[ 7UNO Stats ... 4]
var %x = 1, %total = $lines(unowins.ini)
while (%x <= %total) {
var %next = $calc( %next + 1 )
var %1 = $read(unowins.ini,%x)
var %2 = $remove(%1,[,])
var %3 = $readini(unowins.ini,%2,wins)
var %4 = $remove(%3,w)
if (( %next == 1 ) || ( %next == 3 ) || ( %next == 5 ) || ( %next == 7 ) || ( %next == 9 ) || ( %next == 11 )) { /msg $chan 04[ 11Name: %1 Wins: %4 !4 ] }
inc %x
}
}

Dont work right ... help plz ?

Re: Help With Stats Script Plz #161802 11/10/06 01:34 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
/help /filter

I'd give more help, but I'm about to leave for work, so don't have time. Someone else may expand on this, or you can try it out. Just filter it so you get only the win lines and have it sorted by the number of wins and in numerical order. Then you can output the top10 easily.


Invision Support
#Invision on irc.irchighway.net
Re: Help With Stats Script Plz #161803 11/10/06 03:39 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Try this

Code:
 alias top10 {
  var %d = 1, %w = @top10, %file = FILE.ini
  window -hn %w
  clear %w
  while $ini(%file,%d) {
    aline %w $v1 $readini(%file,$v1,wins)
    inc %d
  }
  filter -cteuww 2 32 %w %w
  var %k = 1, %c
  while %k &lt;= 10  {
    %c = %c $+($chr(32),12,$chr(35),%k,) $iif($line(%w,%k),$v1,*)
    inc %k
  }
  window -c %w
  return %c
} 
 


Syntax: $top10

//echo -a $top10

** Change FILE.ini


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: Help With Stats Script Plz #161804 11/10/06 09:23 PM
Joined: Oct 2006
Posts: 11
W
WarlockTheWeary Offline OP
Pikka bird
OP Offline
Pikka bird
W
Joined: Oct 2006
Posts: 11
Nice Works Great !

Thanks You Very Much For The help ..
Sorry For the late responce ..

Just Got Home From Work smirk