Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 21st, 2010 | Syntax: mIRC | Size: 0.68 KB | Hits: 56 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. on $*:text:/^[!@.]rank/Si:#: {
  2. if (!$2) || ($2 !isnum) {
  3. notice $nick Error, please select a valid rank.
  4. halt
  5. }
  6. notice $nick $ranks($2)
  7. }
  8.  
  9. alias ranks {
  10.   ;;$Ranks(Rank) returns "Ranked rank is nick with score.";;
  11.   window -h @list1
  12.   window -h @list2
  13.   var %a 1
  14.   while ($var(%cash*,%a)) {
  15.     aline -a @list1 $($v1,2) $right($v1,-5)
  16.     inc %a
  17.   }
  18.   filter -wwteuc 1 1 @list1 @list2
  19.   var %b $line(@list2,$1)
  20.   var %c $line(@list2,0)
  21.   .timer 1 0 close -@ @list*
  22.   if ((%b == $null) && (%c isnum)) {
  23.     return Error! The lowest rank is $gettok(%c,1,32) $+ .
  24.   }
  25.   else {
  26.     return Ranked $ord($1) is $gettok(%b,2,32) with $+($bytes($gettok(%b,1,32),b),gp,.)
  27.   }
  28. }