Jump to content

toplist


kheelo

Recommended Posts

Posted

($scriptdir $+ points.ini,POINTS)

now there are names and points like that:

name = points

So can someone please make me script that reads 3 or 5 best players from points.ini and show them on server when someone types !rank ?

or atleast give me some hints

thx.

Posted
on *:SIGNAL:mta.command:{
 if ($3 == !rank) {
   var %a = 0,%b = 0,%c = 0,%d,%e = 0,%f,%g = 0,%h
   while (%a < $ini($scriptdir $+ points.ini,POINTS,0)) {
     %b = $readini($scriptdir $+ points.ini,POINTS,$ini($scriptdir $+ points.ini,POINTS,%a)) 
     if (%b > %c) {
       %e = %c
       %f = %d
       %c = %b
       %d = $ini($scriptdir $+ points.ini,POINTS,%a)
     }
     elseif (%b > %e) {
       %g = %e
       %h = %f
       %e = %b
       %f = $ini($scriptdir $+ points.ini,POINTS,%a)
     }
     elseif (%b > %g) {
       %g = %b
       %h = $ini($scriptdir $+ points.ini,POINTS,%a)
     }
     !inc %a
   }
   mta.text $1 Players with top points:
   if (%d) mta.text $1 1: %d with %c points
   if (%f) mta.text $1 2: %f with %e points
   if (%h) mta.text $1 3: %h with %g points
 }
}

Do not PM me, im not going to read it anyway.

Posted
on *:SIGNAL:mta.command:{
 if ($3 == !rank) {
   var %a = 0,%b = 0,%c = 0,%d = 0,%e = 0,%f = 0,%g = 0,%h,%i,%j,%k,%l
   while (%a < $ini($scriptdir $+ points.ini,POINTS,0)) {
     %b = $readini($scriptdir $+ points.ini,POINTS,$ini($scriptdir $+ points.ini,POINTS,%a)) 
     if (%b > %c) { %d = %c | %c = %b | %h = $ini($scriptdir $+ points.ini,POINTS,%a) }
     elseif (%b > %d) { %e = %d | %d = %b | %i = $ini($scriptdir $+ points.ini,POINTS,%a) }
     elseif (%b > %e) { %f = %e | %e = %b | %j = $ini($scriptdir $+ points.ini,POINTS,%a) }
     elseif (%b > %f) { %g = %f | %f = %b | %k = $ini($scriptdir $+ points.ini,POINTS,%a) }
     elseif (%b > %g) { %g = %b | %l = $ini($scriptdir $+ points.ini,POINTS,%a) }
     !inc %a
   }
   mta.text $1 Players with top points:
   if (%h) mta.text $1 1: %h with %c points
   if (%i) mta.text $1 2: %i with %d points
   if (%j) mta.text $1 3: %j with %e points
   if (%k) mta.text $1 4: %k with %f points
   if (%l) mta.text $1 5: %l with %g points
 }
}

Do not PM me, im not going to read it anyway.

Posted

it shows 4 and 5 th but doesent show second .-.-

edit: there is something wrong with this script.

points.ini:

[POINTS]

OneManArmy|DmA=7

DarDevil(Rus)=2.4

~RevC~puuks=8

Ristov=2

Player=1

random_noob=4

testing_noob1=20

testing_noob2=19

testing_noob3=18

testing_noob4=17

testing_noob5=16

Sancop=2

it showed 1. 3. 4. and 5. before

now it shows 1. 2. 3. and 4.

edit2:the first script with top 3 works correctly but the top 5 script has errors in list and it skips one or two places.

  • 1 month later...
Posted

Lil Toady's method eats CPU when you have 80.000 users in the list

on *:SIGNAL:mta.command:{
 if ($3 == !rank) {
   mta.text $1 Players with top points: 
   mta.text $1 1: $ini($scriptdir $+ points.ini,POINTS,%mta.top.1) with $readini($scriptdir $+ points.ini,POINTS,%mta.top.1)
   mta.text $1 2: $ini($scriptdir $+ points.ini,POINTS,%mta.top.2) with $readini($scriptdir $+ points.ini,POINTS,%mta.top.2)
   mta.text $1 3: $ini($scriptdir $+ points.ini,POINTS,%mta.top.3) with $readini($scriptdir $+ points.ini,POINTS,%mta.top.3)
   mta.text $1 4: $ini($scriptdir $+ points.ini,POINTS,%mta.top.4) with $readini($scriptdir $+ points.ini,POINTS,%mta.top.4)
   mta.text $1 5: $ini($scriptdir $+ points.ini,POINTS,%mta.top.5) with $readini($scriptdir $+ points.ini,POINTS,%mta.top.5)
 }
}
on *:SIGNAL:mta.finish:{
 ;paste snippets after rewarding points
 var %a = $readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)), %b = $ini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2))
 if (%a > $readini($scriptdir $+ points.ini,POINTS,%mta.top.1)) {
   %mta.top.5 = %mta.top.4
   %mta.top.4 = %mta.top.3
   %mta.top.3 = %mta.top.2
   %mta.top.2 = %mta.top.1
   %mta.top.1 = %b
 }
 elseif (%a > $readini($scriptdir $+ points.ini,POINTS,%mta.top.2)) {
   %mta.top.5 = %mta.top.4
   %mta.top.4 = %mta.top.3
   %mta.top.3 = %mta.top.2
   %mta.top.2 = %b
 }
 elseif (%a > $readini($scriptdir $+ points.ini,POINTS,%mta.top.3)) {
   %mta.top.5 = %mta.top.4
   %mta.top.4 = %mta.top.3
   %mta.top.3 = %b
 }
 elseif (%a > $readini($scriptdir $+ points.ini,POINTS,%mta.top.4)) {
   %mta.top.5 = %mta.top.4
   %mta.top.4 = %b
 }
 elseif (%a > $readini($scriptdir $+ points.ini,POINTS,%mta.top.5)) {
   %mta.top.5 = %b
 }
}

This method takes less CPU making it faster and is compatible with lil Toady's script.

The script works perfectly after the leading player (with the most points) has finished 5 times. Of if you make a list of the best players, get there index number of the ini file and set the variables in %mta.top.1 %mta.top.2 %mta.top.3 %mta.top.4 %mta.top.5

*UNTESTED*

"Never argue with an idiot. They bring you down to their level and beat you with experience."

"Arguing on the internet is like the Special Olympics. Even if you win, you're still retarded."

signature.gif

Posted

As leading player I have finished like 10 races and still the !rank command only shows :

Players with top points :

1: with

2: with

3: with

4: with

5: with

I will try to add manually the %mta.top.X values in points.ini

Posted
I will try to add manually the %mta.top.X values in points.ini

Don't do that

P.S: muhahahahahha Aeron, you fail! :P (you can also load the ini into hash, so itll take less time/cpu with big ini's)

Do not PM me, im not going to read it anyway.

Posted

I guess I will revert to Lil Toady's script...

Although the idea of keeping a ladder in a .ini file would be a cool idea... so player could check their ladder position with the !stats !points or !rank command.

Aeron > Keep us updated if you can get the script to work or on how to set it up correctly. I didnt understand what you said about tweaking the INI files.

Posted
Theres 450 players in my points.ini....

both top3 and top5 scripts are totally screwed :/

cant be.. top 3 works, not sure about top 5, maybe u or ur mirc is "screwed".. hope u dont have mirc 6.2 or 6.21

Do not PM me, im not going to read it anyway.

Posted

i have 6.16

both scripts skip and mix up names.

[RevC]ZaMuT: !top3

<1: ~RevC~HUNJA with 6410.3 points>

<2: ~RevC~PaX with 4022.6 points>

<3: ~RevC~Rix with 1680.7 points>

i have 2600 points it never shows me

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...