All pastes #420969 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-02 14:53 UTC
rendered paste body
on $*:TEXT:/^[!@](xp|level|lvl)/Si:#: {
  var %level = $calc($2- - 1)
  if (%level >= 500) { 
    $iif($left($1,1) == @,msg $chan,notice $nick) I dont go above lvl 500 
    halt 
  }
  else { 
    var %i = 1, %points = 0, %output = 0
    while (%level >= %i) {
      %points = $int($calc(%points + %i + 300 * (2 ^ (%i / 7))))
      %output = $int($calc(%points / 4))
      inc %i
    }
    $iif($left($1,1) == @,msg $chan,notice $nick) Level $calc(%level + 1) - %output xp
  } 
}