mIRC Home    About    Download    Register    News    Help

Print Thread
#165607 28/11/06 12:40 PM
Joined: Jun 2006
Posts: 79
B
Babel fish
OP Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
Code:
_inctoken {
  .writeini $data $1 token $calc($_tok($1) + $int($2))
  var %t = 1 | while (%t <= 10) { if ($_topt(%t) == $1) { return }
    if ($_tok($1) > $_tok($_topt(%t))) { 
      if ($calc(%t + 1) != 11) { .writeini $_top rich $calc(%t + 1) $_topt(%t) 
      .writeini $_title rich $_topt(%t) rich man banjirian $calc(%t + 1) }
      .writeini $_top rich %t $1 | .writeini $_title rich $_topt(%t) rich man banjirian %t
      return
    }
    inc %t
  }
}
_dectoken {
    .writeini $data $1 token $calc($_tok($1) - $int($2))
    var %t = 1 | while (%t <= 10) { if ($_topt(%t) == $1) { return }
      if ($_tok($1) > $_tok($_topt(%t))) { 
        if ($calc(%t + 1) != 11) { .writeini $_top rich $calc(%t + 1) $_topt(%t) | .writeini $_title rich $_topt(%t) rich man banjirian $calc(%t + 1) }
        .writeini $_top rich %t $1 | .writeini $_title rich $_topt(%t) rich man banjirian %t
        return
      }
      inc %t
    }
  }
  


When i store top10 "rich" .. there was conflict in sorting .. what i mean is 1 user in multiple ranking ..

[rich]
2=ok
1=offline
3=no
4=goku
5=ok
6=goku
7=yes
8=yes
9=nizam
10=online

thanks

#165608 28/11/06 03:33 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
If you're trying to sort, then using /filter is a faster and more efficient method.


Invision Support
#Invision on irc.irchighway.net
#165609 29/11/06 09:49 AM
Joined: Jun 2006
Posts: 79
B
Babel fish
OP Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
Uhmm .. i dont know where to start .. can someone gimme an sample blush .. thanks

#165610 29/11/06 02:44 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Well, first you have to store the nicks + the number or whatever else that you're sorting it by. You mentioned "rich," so I assume that it's a numerical value. If so, /write the values to a text file so it looks something like:

name1 432523
name2 332465
name3 243535

/filter -ffcute 2 32 filename.txt filename.txt

Then the filename.txt will have the sorted list and you can do whatever you want with it.

For more info:
/help /filter


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard