All pastes #817089 Raw Edit

dfsfsfsfsfs

public text v1 · immutable
·published 2007-12-15 06:13 UTC
rendered paste body
alias -l htmlfree {
  var %y, %x = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%y), %y = $remove(%y,&nbsp;)
  return %y
}
alias stats {
  if ($sock(highscore)) {
    sockclose highscore 
  }
  else {
    set -u10 %user $iif($1,$replace($1-,$chr(32),-),$me)
    sockopen highscore hiscore.runescape.com 80
    sockmark highscore echo @stats
    $iif(!$window(@stats),window -e @stats)
  } 
}
on *:sockopen:highscore: { 
  sockwrite -nt $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ %user HTTP/1.1 
  sockwrite -nt $sockname Host: hiscore.runescape.com $+ $crlf 
  sockwrite -nt $sockname $crlf
} 
on *:sockread:highscore: {
  if (!$sockerr) {
    var %stats
    sockread %stats
    if (<td colspan="*" align="right">*</td> iswm %stats) $sock($sockname).mark $htmlfree(%stats)
    if (<span style="font-weight: bold;">Duel Tournament</span> iswm %stats) $sock($sockname).mark $htmlfree(%stats)
    if (<td align="right">*</td> iswm %stats) $sock($sockname).mark $htmlfree(%stats)
    if ($skill(%stats)) $sock($sockname).mark $htmlfree(%stats)
  }
}
on *:sockclose:highscore: {
  sockclose $sockname
}
alias -l skill {
  if ($regex($1,/^Attack/Si) return Attack
}