Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 16.49 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;; pool.picked.won.lost.fp.sp.tp
  3.  
  4. alias AddHero.pool {
  5.   var %hero = $replace($1-,$chr(32),$chr(95))
  6.   var %herodata = $hget(herodata,%hero)
  7.   var %x = $gettok(%herodata,1,46)
  8.   inc %x
  9.   hadd herodata %hero $puttok(%herodata,%x,1,46)
  10. }
  11.  
  12. alias AddHero.picked {
  13.   var %hero = $replace($1-,$chr(32),$chr(95))
  14.   var %herodata = $hget(herodata,%hero)
  15.   var %x = $gettok(%herodata,2,46)
  16.   inc %x
  17.   hadd herodata %hero $puttok(%herodata,%x,2,46)
  18. }
  19.  
  20. alias AddHero.won {
  21.   var %hero = $replace($1-,$chr(32),$chr(95))
  22.   var %herodata = $hget(herodata,%hero)
  23.   var %x = $gettok(%herodata,3,46)
  24.   inc %x
  25.   hadd herodata %hero $puttok(%herodata,%x,3,46)
  26. }
  27.  
  28. alias AddHero.lost {
  29.   var %hero = $replace($1-,$chr(32),$chr(95))
  30.   var %herodata = $hget(herodata,%hero)
  31.   var %x = $gettok(%herodata,4,46)
  32.   inc %x
  33.   hadd herodata %hero $puttok(%herodata,%x,4,46)
  34. }
  35.  
  36. alias AddHero.fp {
  37.   var %hero = $replace($1-,$chr(32),$chr(95))
  38.   var %herodata = $hget(herodata,%hero)
  39.   var %x = $gettok(%herodata,5,46)
  40.   inc %x
  41.   hadd herodata %hero $puttok(%herodata,%x,5,46)
  42. }
  43.  
  44. alias AddHero.sp {
  45.   var %hero = $replace($1-,$chr(32),$chr(95))
  46.   var %herodata = $hget(herodata,%hero)
  47.   var %x = $gettok(%herodata,6,46)
  48.   inc %x
  49.   hadd herodata %hero $puttok(%herodata,%x,6,46)
  50. }
  51.  
  52. alias AddHero.tp {
  53.   var %hero = $replace($1-,$chr(32),$chr(95))
  54.   var %herodata = $hget(herodata,%hero)
  55.   var %x = $gettok(%herodata,7,46)
  56.   inc %x
  57.   hadd herodata %hero $puttok(%herodata,%x,7,46)
  58. }
  59.  
  60. alias resetherodata {
  61.   hfree herodata
  62.   hmake herodata 100
  63.   var %i = 1
  64.   while (%i <= 90) {
  65.     var %hero = $replace($($+(%,hero_,%i),2),$chr(32),$chr(95))
  66.     hadd herodata %hero 0.0.0.0.0.0.0
  67.     inc %i
  68.   }
  69.   hsave herodata herodata.txt
  70. }
  71.  
  72. alias hero {
  73.   var %hero = $replace($1-,$chr(32),$chr(95))
  74.   if ( $prop == pop ) {
  75.     var %a = $gettok($hget(herodata,%hero),1,46)
  76.     var %b = $gettok($hget(herodata,%hero),2,46)
  77.     var %f = $gettok($hget(herodata,%hero),5,46)
  78.     var %s = $gettok($hget(herodata,%hero),6,46)
  79.     var %t = $gettok($hget(herodata,%hero),7,46)
  80.     /*
  81.     var %rating = $calc(40 * %f / %a)
  82.     inc %rating $calc(20 * %s / %a)
  83.     inc %rating $calc(5 * %t / %a)
  84.     inc %rating $calc(100 * %b / %a)
  85.     */
  86.     /*
  87.     var %base = %b
  88.     var %mul = $calc(1 + (%f * 0.4))
  89.     var %base = %base * %mul
  90.     var %mul = $calc(1 + (%s * 0.25))
  91.     var %base = %base * %mul
  92.     var %mul = $calc(1 + (%t * 0.15))
  93.     var %base = %base * %mul
  94.     var %rating = $calc(100 * %base / %a)
  95.     */
  96.     /*
  97.     var %base = %b
  98.     inc %base $calc(%f * 0.4)
  99.     inc %base $calc(%s * 0.25)
  100.     inc %base $calc(%t * 0.15)
  101.     var %rating = $calc(100 * %base / %a)
  102.     */
  103.     var %base = %b
  104.     var %mul = $calc(1 + (%f * 0.4))
  105.     inc %mul $calc(%s * 0.25)
  106.     inc %mul $calc(%t * 0.15)
  107.     var %base = %base * %mul
  108.     var %rating = $calc(100 * %base / %a)
  109.     return $round(%rating,2)
  110.   }
  111.   if ( $prop == pool ) {
  112.     return $gettok($hget(herodata,%hero),1,46)
  113.   }
  114.   if ( $prop == picked ) {
  115.     return $gettok($hget(herodata,%hero),2,46)
  116.   }
  117.   if ( $prop == won ) {
  118.     return $gettok($hget(herodata,%hero),3,46)
  119.   }
  120.   if ( $prop == lost ) {
  121.     return $gettok($hget(herodata,%hero),4,46)
  122.   }
  123.   if ( $prop == fp ) {
  124.     return $gettok($hget(herodata,%hero),5,46)
  125.   }
  126.   if ( $prop == sp ) {
  127.     return $gettok($hget(herodata,%hero),6,46)
  128.   }
  129.   if ( $prop == tp ) {
  130.     return $gettok($hget(herodata,%hero),7,46)
  131.   }
  132. }
  133.  
  134. ;########################### PENALTY #############################
  135. ;#################################################################
  136.  
  137. ;;;;;;;;;;;;;;;;;;
  138. ;; takes user, penalty-user, penalty-type, reason optional
  139. alias AddPenalty {
  140.   var %pu = $2
  141.   var %n = $hget(pendata,$+(n.,%pu))
  142.   inc %n
  143.   hinc pendata $+(n.,%pu) 1
  144.   hadd pendata $+(p.,%n,.,%pu) $+($1,.,$3,.,$ctime,.,$4)
  145. }
  146.  
  147. alias pen {
  148.   if (!$1) { return }
  149.   var %u = $1
  150.   if (!$2) {
  151.     return $hget(pendata,$+(n.,%u))
  152.   }
  153.   if ( $prop == author ) {
  154.     return $gettok($hget(pendata,$+(p.,$2,.,%u)),1,46)
  155.   }
  156.   if ( $prop == type ) {
  157.     return $gettok($hget(pendata,$+(p.,$2,.,%u)),2,46)
  158.   }
  159.   if ( $prop == date ) {
  160.     return $asctime($gettok($hget(pendata,$+(p.,$2,.,%u)),3,46),dd/mm/yy)
  161.   }
  162.   if ( $prop == info ) {
  163.     return $gettok($hget(pendata,$+(p.,$2,.,%u)),4,46)
  164.   }
  165. }
  166.  
  167. on *:TEXT:.warnhist*:*: {
  168.   if ($chan) { var %target = $chan }
  169.   else { var %target = $nick }
  170.   var %u = $getid2($nick)
  171.   if ($userlvl(%u) < $adminlvl ) { return }
  172.   var %pu = $getid($2)
  173.   if (!%pu) { describe %target User not found! | return }
  174.   var %l = $pen(%pu)
  175.   if (!%l) { describe %target Empty record | return }
  176.   if ($3 == full) { var %i = 1 }
  177.   else {
  178.     if ( %l <= 10 ) {
  179.       var %i = 1
  180.     }
  181.     else {
  182.       var %i = %l - 10
  183.     }
  184.   }
  185.   var %list = $null
  186.   while (%i <= %l) {
  187.     if ($len(%list) >= 780) {
  188.       describe %target %list [more...]
  189.       var %list = $null
  190.     }
  191.     var %list = %list $enclose($pen(%pu,%i).type by $getname($pen(%pu,%i).author) - $pen(%pu,%i).date)
  192.     inc %i
  193.   }
  194.   describe %target %list
  195. }
  196.  
  197.  
  198.  
  199. ;############################# LOG ###############################
  200. ;#################################################################
  201.  
  202. ;;;;;;;;;;;;;;;;;;;;;;
  203. ;; $1 = user who caused action
  204. ;; $2 = action ( .report/.closegame/.voidgame/.submit/.reward/.penalty )
  205. ;; $3- = bonus info
  206.  
  207. alias AddRecord {
  208.   write adminlog.txt $enclose($time) $enclose($date) $enclose($level.str($userlvl($1))) $enclose($2)
  209.   write adminlog.txt $enclose(Operator $1 - $userlvl($1))
  210.   write adminlog.txt $3-
  211.   write adminlog.txt $crlf
  212. }
  213.  
  214. ;########################## CHANSTATS ############################
  215. ;#################################################################
  216.  
  217.  
  218. on *:TEXT:.chanstats:*: {
  219.   if ($chan) { var %target = $chan }
  220.   else { var %target = $nick }
  221.   var %ulvl = $userlvl2($nick)
  222.   if ( %ulvl >= 50 ) {
  223.     var %line = Number of users: %rank.users $chr(124)
  224.     var %line = %line Games today/max/total: %game.today $+ / $+ %game.daymax $+ / $+ %gamenum ( $+ $asctime(%game.daymax.time,dd/mm/yy) $+ ) $chr(124)
  225.     var %line = %line Most XP gained: %max.xpgained ( $+ %max.xpgained.info $+ ) $chr(124)
  226.     var %line = %line Most XP lost: %max.xplost ( $+ %max.xplost.info $+ )
  227.     describe %target %line
  228.   }
  229. }
  230.  
  231. ;############################ RE-SYNC ############################
  232. ;#################################################################
  233.  
  234. ;resync xp gained/lost
  235. alias resync.expstats {
  236.   var %game = 1
  237.   var %l = %gamenum
  238.   while (%game <= %l) {
  239.     if ($hget(gamedata,%game)) {
  240.       var %re = $game(%game).result
  241.       var %players = $game(%game).plist
  242.       if ( %re == sentinel ) {
  243.         var %expchange = $game(%game).elist
  244.       }
  245.       elseif ( %re == scourge ) {
  246.         var %expchange = $game(%game).aelist
  247.       }
  248.       var %i = 1
  249.       while ( %i <= 10 ) {
  250.         var %e = $gettok(%expchange,%i,46)
  251.         if ( %e < 0 ) {
  252.           if ( %e < %max.xplost ) {
  253.             set %max.xplost %e
  254.             set %max.xplost.info $getname($gettok(%players,%i,46)) in game %game on $asctime($game(%game).time,dd/mm/yy)
  255.           }
  256.         }
  257.         else {
  258.           if ( %e > %max.xpgained ) {
  259.             set %max.xpgained %e
  260.             set %max.xpgained.info $getname($gettok(%players,%i,46)) in game %game on $asctime($game(%game).time,dd/mm/yy)
  261.           }
  262.         }
  263.         inc %i
  264.       }
  265.     }
  266.     inc %game
  267.   }
  268. }
  269.  
  270. alias resetconf {
  271.   var %i = 1
  272.   var %l = $hget(userdata,0).item
  273.   while ( %i <= %l ) {
  274.     if ( . !isin $hget(userdata,%i).item ) {
  275.       var %u = $v2
  276.       var %c = $user(%u).conf
  277.       if ( %c > 1000 ) {
  278.         noop $setuser(%u,1000).conf
  279.       }
  280.     }
  281.     inc %i
  282.   }
  283. }
  284.  
  285. on *:TEXT:.gamestats:*: {
  286.   if ((!%canreply) && ($userlvl2($nick) < 50 )) { return }
  287.   if ($chan) { var %target = $chan }
  288.   else { var %target = $nick }
  289.   var %i = 1
  290.   var %sent = 0
  291.   var %scrg = 0
  292.   var %draw = 0
  293.   var %modetype = $modes
  294.   var %modenum = 0.0.0.0.0.0.0.0.0
  295.   var %error = 0
  296.   while (%i <= %gamenum ) {
  297.     var %r = $game(%i).result
  298.     if (%r == sentinel) { inc %sent }
  299.     elseif (%r == scourge ) { inc %scrg }
  300.     else { inc %draw }
  301.     var %m = $game(%i).mode
  302.     var %p = $findtok(%modetype,%m,1,46)
  303.     if (%p) {
  304.       var %n = $gettok(%modenum,%p,46)
  305.       inc %n
  306.       ;echo -ag %i $+ . %p - %n - %m - %modenum
  307.       var %modenum = $puttok(%modenum,%n,%p,46)
  308.     }
  309.     else {
  310.       ;echo -ag %i $+ . 4ERROR
  311.       inc %error
  312.     }
  313.     inc %i
  314.   }
  315.   var %i = 1
  316.   var %l = $numtok(%modetype,46)
  317.   var %modelist = $null
  318.   while (%i <= %l) {
  319.     if ($gettok(%modenum,%i,46)) {
  320.       var %modelist = %modelist $gettok(%modetype,%i,46) $+ : $gettok(%modenum,%i,46)
  321.     }
  322.     inc %i
  323.   }
  324.   describe %target Total games: %gamenum $chr(124) Sentinel: %sent Scourge: %scrg Draw: %draw $chr(124) %modelist $chr(124) Chall: %challnum SG: %regnum $chr(124) Corrupted Records: %error
  325. }
  326.  
  327. on *:TEXT:.playerhist*:*: {
  328.   if ((!%canreply) && ($userlvl2($nick) < 50 )) { return }
  329.   if ($chan) { var %target = $chan }
  330.   else { var %target = $nick }
  331.   if ($2) { var %u = $getid($2) }
  332.   else { var %u = $getid2($nick) }
  333.   var %ulvl = $userlvl2($nick)
  334.   var %i = 1
  335.   var %list = $null
  336.   while ( %i <= %gamenum ) {
  337.     if ($istok($game(%i).plist,%u,46)) {
  338.       var %p = $findtok($game(%i).plist,%u,1,46)
  339.       if ( $game(%i).result == sentinel ) {
  340.         var %exp = $gettok($game(%i).elist,%p,46)
  341.       }
  342.       elseif ( $game(%i).result == scourge ) {
  343.         var %exp = $gettok($game(%i).aelist,%p,46)
  344.       }
  345.       else {
  346.         inc %i
  347.         continue
  348.       }
  349.       var %list = %list %i $+ ( $+ $iif(%exp >= 0, + $+ $v1,$v1) $+ )
  350.     }
  351.     inc %i
  352.   }
  353.   describe %target $getname(%u) $+ 's game history: %list
  354.   var %list = $null
  355. }
  356.  
  357. on *:TEXT:.playerdetails*:*: {
  358.   if ((!%canreply) && ($userlvl2($nick) < 50 )) { return }
  359.   if ($chan) { var %target = $chan }
  360.   else { var %target = $nick }
  361.   if ($2) { var %u = $getid($2) }
  362.   else { var %u = $getid2($nick) }
  363.   var %ulvl = $userlvl2($nick)
  364.   var %xp = 1000
  365.   var %top.xp = 0
  366.   var %bottom.xp = 9999
  367.   var %sent = 0
  368.   var %scrg = 0
  369.   var %draw = 0
  370.   var %sentw = 0
  371.   var %sentl = 0
  372.   var %scrgw = 0
  373.   var %scrgl = 0
  374.   var %top.lost = 0
  375.   var %top.gain = 0
  376.   var %i = 1
  377.   var %line = $null
  378.   while ( %i <= %gamenum ) {
  379.     if ($istok($game(%i).plist,%u,46)) {
  380.       var %p = $findtok($game(%i).plist,%u,1,46)
  381.       if ( $game(%i).result == sentinel ) {
  382.         var %exp = $gettok($game(%i).elist,%p,46)
  383.         if (%exp > 0) {
  384.           inc %sentw
  385.         }
  386.         else {
  387.           inc %sentl
  388.         }
  389.         inc %sent
  390.         var %xp = $calc(%xp + %exp)
  391.       }
  392.       elseif ( $game(%i).result == scourge ) {
  393.         var %exp = $gettok($game(%i).aelist,%p,46)
  394.         if (%exp > 0) {
  395.           inc %scrgw
  396.         }
  397.         else {
  398.           inc %scrgl
  399.         }
  400.         inc %scrg
  401.         var %xp = $calc(%xp + %exp)
  402.       }
  403.       else {
  404.         inc %draw
  405.       }
  406.       if (%exp > %top.gain) { var %top.gain = %exp }
  407.       if (%exp < %top.lost) { var %top.lost = %exp }
  408.       if (%xp > %top.xp) { var %top.xp = %xp }
  409.       if (%xp < %bottom.xp) { var %bottom.xp = %xp }
  410.     }
  411.     inc %i
  412.   }
  413.   var %line = Sentinel: %sent $enclose(%sentw $+ / $+ %sentl) Scourge: %scrg $enclose(%scrgw $+ / $+ %scrgl) Draw: %draw $chr(124)
  414.   var %line = %line Most XP gained: %top.gain $chr(124) Most XP lost: %top.lost $chr(124)
  415.   var %line = %line Top XP: %top.xp $chr(124) Bottom XP: %bottom.xp
  416.   describe %target %line
  417.   var %line = $null
  418. }
  419.  
  420.  
  421. alias cleanvars {
  422.   var %i = 1
  423.   var %l = %gamenum
  424.   while (%i <= %l ) {
  425.     unset $+(%game.mode_,$(%i))
  426.     unset $+(%game.version_,$(%i))
  427.     unset $+(%game.auths_,$(%i))
  428.     unset $+(%game.date_,$(%i))
  429.     unset $+(%game.heroes_,$(%i))
  430.     unset $+(%game.chall,$(%i))
  431.     unset $+(%cen.pergame_,$(%i),*)
  432.     unset $+(%cen.game_,$(%i),*)
  433.     unset $+(%cen.game.censured_,$(%i),*)
  434.     inc %i
  435.   }
  436.   set %gamenum 0
  437.   set %challnum 0
  438.   set %regnum 0
  439.   set %max.xpgained 0
  440.   set %max.xplost 0
  441.   set %game.daymax 0
  442.   set %game.today 0
  443.   set %max.xpgained.info nobody
  444.   set %max.xplost.info nobody
  445. }
  446.  
  447. alias resetstats {
  448.   var %i = 1
  449.   var %l = $hget(userdata,0).item
  450.   while ( %i <= %l ) {
  451.     if ( . !isin $hget(userdata,%i).item ) {
  452.       var %u = $v2
  453.       var %n = $getname(%u)
  454.       hadd userdata %u 0.0.0.1000.0.0.0.0.500. $+ %n
  455.     }
  456.     inc %i
  457.   }
  458. }
  459.  
  460.  
  461. /*
  462. [16:40:42] <MYM|Maelk> .compare revael
  463. [16:40:42] --> IHCS-BOT2 revael<Capable> compared to MYM|Maelk<Diabolic>: 11 games more for MYM|Maelk;
  464. 29 wins more; 18 losses less;
  465. Rank difference: +60 for MYM|Maelk (61 Against 1);
  466. Score together: 5/9[-4] ; Score against: 3/15[MYM|Maelk leads: +12]
  467.  
  468. */
  469.  
  470. on $*:TEXT:/^\.(compare\b.*|cp\b.*)/i:%ch: {
  471.   if ((!%canreply) && ($userlvl2($nick) < 50 )) { return }
  472.   if ($chan) { var %target = $chan }
  473.   else { var %target = $nick }
  474.   if ($3) {
  475.     var %u = $getid($2)
  476.     var %cu = $getid($3)
  477.   }
  478.   else {
  479.     var %u = $getid2($nick)
  480.     var %cu = $getid($2)
  481.   }
  482.   if ((!%u) || (!%cu)) { describe %target User not found! | return }
  483.   var %nu = $getname(%u)
  484.   var %ncu = $getname(%cu)
  485.   var %line = %nu $+ $enclose($get.exprank(%u)) compared to %ncu $+ $enclose($get.exprank(%cu)) $+ :
  486.   var %gameu = $user(%u).game
  487.   var %gamecu = $user(%cu).game
  488.   var %gamediff = $abs($calc(%gameu - %gamecu))
  489.   if (%gameu > %gamecu) {
  490.     var %line = %line %gamediff games more for %nu $+ ;
  491.     var %windiff = $calc( $user(%u).win - $user(%cu).win )
  492.     var %lostdiff = $calc( $user(%u).lost - $user(%cu).lost )
  493.     if (%windiff != 0) { var %line = %line $abs(%windiff)% wins $iif( %windiff > 0 ,more,less) $+ ; }
  494.     if (%lostdiff != 0) { var %line = %line $abs(%lostdiff) losses $iif( %lostdiff > 0 ,more,less) $+ ; }
  495.   }
  496.   elseif (%gameu < %gamecu) {
  497.     var %line = %line %gamediff games more for %ncu $+ ;
  498.     var %windiff = $calc( $user(%cu).win - $user(%u).win )
  499.     var %lostdiff = $calc( $user(%cu).lost - $user(%u).lost )
  500.     if (%windiff != 0) { var %line = %line $abs(%windiff) wins $iif( %windiff > 0 ,more,less) $+ ; }
  501.     if (%lostdiff != 0) { var %line = %line $abs(%lostdiff) losses $iif( %lostdiff > 0 ,more,less) $+ ; }
  502.   }
  503.   var %ranku = $user(%u).rankonly
  504.   var %rankcu = $user(%cu).rankonly
  505.   if (%ranku < %rankcu) {
  506.     var %line = %line Rank difference: + $+ $abs($calc(%ranku - %rankcu)) for %nu ( $+ %ranku against %rankcu $+ );
  507.   }
  508.   else {
  509.     var %line = %line Rank difference: + $+ $abs($calc(%rankcu - %ranku)) for %ncu ( $+ %rankcu against %ranku $+ );
  510.   }
  511.   var %stw = 0
  512.   var %stl = 0
  513.   var %saw = 0
  514.   var %sal = 0
  515.   var %i = 1
  516.   var %lu = $user(%u).lastgame
  517.   var %lcu = $user(%cu).lastgame
  518.   if (%lu > %lcu) { var %l = %lu }
  519.   else { var %l = %lcu }
  520.   echo -ag %l
  521.   while (%i <= %l) {
  522.     var %p = $game(%i).plist
  523.     var %pu = $findtok(%p,%u,1,46)
  524.     var %pcu = $findtok(%p,%cu,1,46)
  525.     if ((!%pu) || (!%pcu)) {
  526.       inc %i
  527.       continue
  528.     }
  529.     ;echo -ag hraci boli spolu v hre
  530.     var %result = $game(%i).result
  531.     if (%result == draw) {
  532.       inc %i
  533.       continue
  534.     }
  535.     ;echo -ag nebol do draw, result %result
  536.     if ((( %pu <= 5 ) && ( %pcu <= 5)) || (( %pu > 5 ) && ( %pcu > 5))) {
  537.       ;;;;;;;;;;;;;;;;;; spolocna hra ;;;;;;;;;;;;;;;;;
  538.       ;echo -ag ;;;;;;;;;;;;;;;;;; spolocna hra ;;;;;;;;;;;;;;;;;
  539.       if ( %result == sentinel ) {
  540.         if (%pu <= 5) {
  541.           inc %stw
  542.         }
  543.         else {
  544.           inc %stl
  545.         }
  546.       }
  547.       else {
  548.         if (%pu <= 5) {
  549.           inc %stl
  550.         }
  551.         else {
  552.           inc %stw
  553.         }
  554.       }
  555.     }
  556.     else {
  557.       ;;;;;;;;;;;;;;;;;; hra proti sebe ;;;;;;;;;;;;;;;;;
  558.       ;echo -ag ;;;;;;;;;;;;;;;;;; hra proti sebe ;;;;;;;;;;;;;;;;;
  559.       if ( %result == sentinel ) {
  560.         if (%pu <= 5) {
  561.           inc %saw
  562.         }
  563.         else {
  564.           inc %sal
  565.         }
  566.       }
  567.       else {
  568.         if (%pu <= 5) {
  569.           inc %sal
  570.         }
  571.         else {
  572.           inc %saw
  573.         }
  574.       }
  575.     }
  576.     inc %i
  577.   }
  578.   var %line = %line Score togehter: %stw $+ / $+ %stl $+ $enclose($iif( %stw == %stl ,Neutral,$iif(%stw > %stl,+ $+ $calc(%stw - %stl),- $+ $calc(%stl - %stw))))
  579.   var %line = %line Score against: %saw $+ / $+ %sal $+ $enclose($iif( %saw == %sal ,Tied,$iif(%saw > %sal,%nu leads: + $+ $calc(%saw - %sal),%ncu leads: + $+ $calc(%sal - %saw))))
  580.   describe %target %line
  581. }
  582.  
  583. ;Rank difference: +60 for MYM|Maelk (61 Against 1);
  584.  
  585. on *:TEXT:.inactive*:*: {
  586.   if ((!%canreply) && ($userlvl2($nick) < 50 )) { return }
  587.   if (($timer(listinactive)) && ($userlvl2($nick) < 90)) { return }
  588.   if ($chan) { var %target = $chan }
  589.   else { var %target = $nick }
  590.   var %i = 1
  591.   var %n = 0
  592.   var %l = %rank.users
  593.   var %list = Inactive players:
  594.   while (%i <= %l) {
  595.     var %u = $sort.getuser(%i)
  596.     if ($user(%u).inactive) {
  597.       if ($len(%list) >= 780) {
  598.         describe %target %list [more...]
  599.         var %list = $null
  600.       }
  601.       var %list = %list $getname(%u) $+ ,
  602.       inc %n
  603.     }
  604.     inc %i
  605.   }
  606.   describe %target $left(%list,-1) $enclose(%n players total)
  607.   timerlistinactive 1 30 noop
  608. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement