xTrivia — File Browser

xTriviav1.0 / xTriviav1.0 / xTriviaByRibellina / xtrivia / bot / aliases4.ini

aliases4.ini — 1.57 KB — Download this file

[aliases]
n0=trivscoresalls {
n1=  var %scores = 0 0 0 0 0 0 0 0 0 0
n2=  var %nicks = --- --- --- --- --- --- --- --- --- ---
n3=  var %totalplayers = $triv_readgetall(0)
n4=
n5=  var %index = 1
n6=  while (%index <= %totalplayers) {
n7=    var %thisnick = $triv_readgetall(%index)
n8=    var %thisscore = $triv_read(scoresall, %thisnick)
n9=    var %index2 = 1
n10=    while (%index2 <= 10) {
n11=      var %scoresget = $gettok(%scores,%index2,32)
n12=      if (%thisscore > %scoresget) {
n13=        var %scores = $instok(%scores,%thisscore,%index2,32)
n14=        var %nicks = $instok(%nicks,%thisnick,%index2,32)
n15=        var %scores = $deltok(%scores,11,32)
n16=        var %nicks = $deltok(%nicks,11,32)
n17=        var %index2 = 11
n18=      }
n19=      inc %index2
n20=    }
n21=    inc %index
n22=  }
n23=  var %index = 1
n24=
n25=  var %c1a = $chr(3) $+ 08,02
n26=  var %cl2b = $chr(3) $+ 02,08
n27=  var %msg = 7¤3ToP 03107¤ 41° $u($ntalk($gettok(%nicks,1,32))) $+ 03 $gettok(%scores,1,32) 042° $ntalk($gettok(%nicks,2,32)) 03 $+ $gettok(%scores,2,32) %c1a #3 %cl2b $gettok(%nicks,3,32) $gettok(%scores,3,32) %c1a #4 %cl2b $gettok(%nicks,4,32) $gettok(%scores,4,32) %c1a #5 %cl2b $gettok(%nicks,5,32) $gettok(%scores,5,32) %c1a #6 %cl2b $gettok(%nicks,6,32) $gettok(%scores,6,32) %c1a #7 %cl2b $gettok(%nicks,7,32) $gettok(%scores,7,32) %c1a #8 %cl2b $gettok(%nicks,8,32) $gettok(%scores,8,32) %c1a #9 %cl2b $gettok(%nicks,9,32) $gettok(%scores,9,32) %c1a #10 %cl2b $gettok(%nicks,10,32) $gettok(%scores,10,32) 
n28=  echo -a %msg
n29=}