All pastes #514340 Raw Edit

Mine

public text v1 · immutable
#514340 ·published 2007-05-27 18:02 UTC
rendered paste body
alias MVP {
  unset %Killers
  unset %MVP1
  unset %MVP2
  unset %MVP3
  var %x = 0
  var %numofplayera = $calc($ini(GatherBot/stats.ini,MVP,0)+1)
  while (%x < %numofplayera) {
    set %Killers $addtok(%Killers,$readini(GatherBot/stats.ini,MVP,$ini(GatherBot/stats.ini,MVP,%x)),32)
    inc %x
  }
  TOP3
}
alias TOP3 {
  var %x = 1
  var %y = 1
  var %lines = $ini(GatherBot/stats.ini,MVP,0)
  set %Killers $sorttok(%Killers,32,nr)
  while (%y < 11) {
    if ($readini(GatherBot/stats.ini,MVP,$ini(GatherBot/stats.ini,MVP,%y)) == $gettok(%Killers,1,32)) goto mvp1
    if ($readini(GatherBot/stats.ini,MVP,$ini(GatherBot/stats.ini,MVP,%y)) == $gettok(%Killers,2,32)) goto mvp2
    if ($readini(GatherBot/stats.ini,MVP,$ini(GatherBot/stats.ini,MVP,%y)) == $gettok(%Killers,3,32)) goto mvp3
    :mvp1 {
      set %MVP1 $ini(GatherBot/stats.ini,MVP,%y)
      inc %x
    }
    :mvp2 {
      set %MVP2 $ini(GatherBot/stats.ini,MVP,%y)
      inc %x
    }
    :mvp3 {
      set %MVP3 $ini(GatherBot/stats.ini,MVP,%y)
      inc %x
    }
    inc %y
  }
  //echo -n %Gather.Channel The MVPs Are : 1ST. %MVP1 2ND. %MVP2 3RD. %MVP3
  if ($ini(Gatherbot\stats.ini,MVP,%MVP1) == 0 ) { //writeini GatherBot/stats.ini ScoreMVP %MVP1 0 }
  if ($ini(Gatherbot\stats.ini,MVP,%MVP2) == 0 ) { //writeini GatherBot/stats.ini ScoreMVP %MVP2 0 }
  if ($ini(Gatherbot\stats.ini,MVP,%MVP3) == 0 ) { //writeini GatherBot/stats.ini ScoreMVP %MVP3 0 }
  //writeini GatherBot/stats.ini ScoreMVP %MVP1 $calc($readini(GatherBot/stats.ini,ScoreMVP,%MVP1)+3)
  //writeini GatherBot/stats.ini ScoreMVP %MVP2 $calc($readini(GatherBot/stats.ini,ScoreMVP,%MVP2)+2)
  //writeini GatherBot/stats.ini ScoreMVP %MVP3 $calc($readini(GatherBot/stats.ini,ScoreMVP,%MVP3)+1)

}