All pastes #385806 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-08 02:34 UTC
rendered paste body
alias endgame {
  if ($timer($1)) $+(timer,$1) off
  remini duels.ini $1 ohahaha
  if (!$2) remini duels.ini $1
  else {
    if ($2 == !@#$^&) msg $1 4Current DM was ended by7 $3
    else {
      var %hs1 = $readini(duels.ini,alltime,$2), %hs2 = $readini(duels.ini,alltime,$3), %n1 = $2, %n2 = $3, %dmchan = $1
      tokenize 32 %hs1
      if (!$1-) { writeini duels.ini alltime %n1 0 0 | tokenize 32 0 0 }
      writeini duels.ini alltime %n1 $calc($1 + 1) $2
      tokenize 32 %hs2
      if (!$1-) { writeini duels.ini alltime %n2 0 0 | tokenize 32 0 0 }
      writeini duels.ini alltime %n2 $1 $calc($2 + 1)
      tokenize 32 $readini(duels.ini,alltime,%n1)
      msg %dmchan 7 $+ %n1 4won the DM,7 %n1 $+ 4's stats, Wins:7 $1 4Loses:7 $2 4Total:7 $calc($1 + $2)
      remini duels.ini %dmchan
      halt
    }
    remini duels.ini $1
  }
}