All pastes #374676 Raw Edit

Someone

public text v1 · immutable
#374676 ·published 2007-02-27 19:27 UTC
rendered paste body
alias process { 
  var %table = $1, %id = $gettok($1,2,46), %x = 0, $& 
    %display = $($+(%,stats.display.,%ID),2), $& 
    %rsn = $($+(%,stats.rsn.,%ID),2), $& 
    %skill = $($+(%,stats.skill.,%ID),2), $& 
    %style = $($+(%,stats.style.,%ID),2) 

  if (%style == astats) { 
    while (%x <= 23) { 
      tokenize 32 $hget(%table,$setskill(%x)) 
      if ($2) { 
        var %sl = %sl $c1($setskill(%x)) $c2($2) 
        inc %x 
      } 
    } 
    %display $c1(Stats for) $c2(%rsn) 
    %display %sl 
    $iif(%sl2,%display %sl2) 
  } 
  elseif (%style == istat) { 
    if (!$hget(%table,%skill)) %display $c1(The RSN) $c2(%rsn) $c1(does not appear in the highscores for) $c2(%skill) $+ $c1(.) 
    else { 
      tokenize 32 $hget(%table,%skill) 
      tokenize 32 $1-3 $calc($experience($iif(%goal,%goal,$calc($2 + 1))) - $remove($3,$chr(44))) 
      %display $c2(%skill) $c1(stats for) $c2(%rsn) $+ $c1(:) 
      %display $c1(Rank:) $c2($1) $c1( $+ $chr(124) Level:) $c2($bytes($2,b)) $c1( $+ $chr(124) Exp:) $c2($3) $iif(%skill != Overall,$c1( $+ $chr(124) Exp to level) $c2($iif(%goal,%goal,$calc($2 + 1))) $+ $c1(:) $c2($bytes($4,b)))