All pastes #92006 Raw Edit

Unnamed

public text v1 · immutable
#92006 ·published 2006-07-19 03:19 UTC
rendered paste body
alias levelexp { 
  var %outputnum = 0 
  var %points = 0 
  var %lvl = 1 
  while (%lvl < $$1) { 
    %points = $int($calc(%points + %lvl + 300 * 2 ^ (%lvl / 7.0))) 
    %outputnum = $int($calc(%points / 4)) 
    inc %lvl 1 
  } 
  return $int(%outputnum) 
} 

alias noticeexp { 
  if ($nick != $null) var %nick = $nick 
  else %nick = $me  
  if ($$1 !isnum 1-1000) { 
    notice %nick Syntax error! It's !exp <lvl> 
    halt 
  } 
  if ($1 > 99 || $2 > 99) { 
    .notice %nick Dumbass the skills can only go to 99. 
    halt 
  } 
  else { 
    notice $nick 15Level4 $$1 15=4 $levelexp($$1) 15experience.
  } 
} 
alias publicexp { 
  if ($nick != $null) var %nick = $nick 
  else %nick = $me  
  if ($$1 !isnum 1-1000) { 
    .notice %nick Syntax error! It's !exp <lvl> 
    halt 
  } 
  if ($1 > 99 || $2 > 99) { 
    .notice %nick Dumbass the skills can only go to 99. 
    halt 
  } 
  else { 
    msg # 15Level4 $$1 15=4 $levelexp($$1) 15experience.
  } 
} 

on *:TEXT:!exp*:#:{ 
  $noticeexp($2) 
} 
on *:TEXT:@exp*:#:{ 
  $publicexp($2) 
}