All pastes #193683 Raw Edit

Something

public text v1 · immutable
·published 2006-10-07 03:23 UTC
rendered paste body
on $*:TEXT:/^[!@.](pc|pest) */Si:#: { 
  ;;; Check if it's a valid skill, sockopen, and set vars. ;;; 
  if ($getskill($2)) { 
  } 
  if (#* iswm $4) { 
  } 
  if (#* iswm $3) { 
  } 
  ;;; Set Vars ;;; 
} 
} 
alias -l cleanup { 
  ;;; Clean up the socket, unset vars, close it ;;; 
} 
on *:sockopen:pc.*: { 
  ;;; Go to the file ;;; 
  if ($sockerr > 0) /return 
} 
on *:sockread:pc.*: { 
  ;;; Get the data, tokenize, and do checks to output. ;;; 
  if ($sockerr) /return 
  if (*</TITLE>* iswm $1-) { %target. [ $+ [ %x ] ] $replace(%rsn. [ $+ [ %x ] ],+,$chr(32)) Does Not Feature in the Hi-Scores for %skill. [ $+ [ %x ] ] $+ . | /cleanup $sockname | /halt } 
  if ($3 == does) { %target. [ $+ [ %x ] ] $replace(%rsn. [ $+ [ %x ] ],+,$chr(32)) Does Not feature in the Hi-Scores. | /cleanup $sockname | /halt } 
  if ($0 == 4) { %target. [ $+ [ %x ] ] Pest control points needed to get level $iif(%level. [ $+ [ %x ] ],%level. [ $+ [ %x ] ],$calc(($2)+1)) in %skill. [ $+ [ %x ] ] $+ : $iif(%level. [ $+ [ %x ] ],$pestget(%skill. [ $+ [ %x ] ],%level. [ $+ [ %x ] ],$calc($xp(%level. [ $+ [ %x ] ])-($remove($3,$chr(44))))),$pestget(%skill. [ $+ [ %x ] ],$calc(($2)+1),$calc($xp($calc($2 + 1))- $remove($3,$chr(44))))) | /cleanup $sockname } 
} 
alias -l /getskill { 
  ;;; Regex to return skills ;;; 
  if ($regex($1,/^over(all)?/Si)) return overall 
  elseif ($regex($1,/^at(t|k|tack)?/Si)) return attack 
  elseif ($regex($1,/^def(en[cs]e)?/Si)) return defence 
  elseif ($regex($1,/^hp|hit(s|points?)?/Si)) return hitpoints 
  elseif ($regex($1,/^range(r|d|ing)?/Si)) return ranged 
  elseif ($regex($1,/^Pray(er)?/Si)) return prayer 
  elseif ($regex($1,/^mag(e|ic)?/Si)) return magic 
  elseif ($regex($1,/^str(ength)?/Si)) return strength 
} 
alias /pest { 
  ;;; Pest alias to retrive skill points per ticket ;;; 
} 
alias /pestget { 
  ;;; Gets amount of tickets. ;;; 
} 
alias /xp { 
  ;;; Calculates XP to level ;;;