#stats on alias c1 { return $+(12,$1-) } alias c2 { return $+(14,$1-) } on *:TEXT:!setworld *:#: { { HALT } } on *:text:*:#: { tokenize 32 $strip($1-) if ($left($1,1) !isin @!.) halt if ($right($1,-1) == stats) var %style = astats elseif ($ [ $+ [ $0 ] ] isnum) { if ($3 == $null) { goto skipplz } if ($setskill($remove($1,@,!,.)) == overall) { $iif($left($1,1) == @,msg $chan $c1($+(Sorry,$chr(44))) $c2($setskill($remove($1,@,!,.))) $c1(can't be used in this feature.),notice $nick $c1($+(Sorry,$chr(44))) $c2($setskill($remove($1,@,!,.))) $c1(can't be used in this feature.)) | halt } if ($ [ $+ [ $0 ] ] isnum 0) { $iif($left($1,1) == @,msg $chan $c2(0) $c1(is not a real level.),notice $nick $c2(0) $c1(is not a real level.)) | halt } if ($ [ $+ [ $0 ] ] isnum 1-150) { var %style = tstat, %skill = $setskill($remove($1,@,!,.)) | set %stats.togo $ [ $+ [ $0 ] ] | goto skipmeplz } else { $iif($left($1,1) == @,msg $chan $c1(that is too high you can do up to) $c2(150) $+ $c1(.),notice $nick $c1(that is too high you can do up to) $c2(150) $+ $c1(.)) | halt } } :skipplz elseif ($setskill($remove($1,@,!,.))) var %style = istat, %skill = $setskill($remove($1,@,!,.)) elseif ($regex($1,/co?mb(at)?/Si)) var %style = combat :skipmeplz elseif ($right($1,-1) == defname) && ($2) { if ($2 == -h) { writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($3-,$chr(32),-) /notice $nick 13You're default RSN for the host1 $mask($fulladdress,3) 13has been set to1 $3- } else { writeini DefRSN.ini RSNs $nick $replace($2-,$chr(32),-) .notice $nick 13,1You're default RuneScape User for the nick1 $nick 13has been set to1 $2- } halt } else halt inc %ID if ($len($2-) > 12) { if (%stats.togo) { var %tot = $calc($0 - 1), var %tot1 = $len($2-%tot) | $iif($len(%tot1) > 12,unset %stats.togo,goto displace) } $($+(%,stats.display.,%ID),2) $c1(The nick) $c2($2-) $c1(is too long) cleanup %ID halt } :displace if ($2) { if (%stats.togo) { var %s = $calc($0 - 1) var %o = 1 while (%o < %s) { inc %o 1 var %line = %line $ [ $+ [ %o ] ] } set $+(%,stats.rsn.,%ID) $replace(%line,$chr(32),-) goto seekdap } else { set $+(%,stats.rsn.,%ID) $replace($2-,$chr(32),-) } } elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) set $+(%,stats.rsn.,%ID) $ifmatch elseif ($readini(DefRSN.ini,RSNs,$nick)) set $+(%,stats.rsn.,%ID) $ifmatch else set $+(%,stats.rsn.,%ID) $nick :seekdap set $+(%,stats.style.,%ID) %style set $+(%,stats.skill.,%ID) %skill set $+(%,stats.display.,%ID) $iif($left($1,1) == @,msg $chan,notice $nick) sockopen $+(stats.,%ID) hiscore.runescape.com 80 } on *:sockopen:stats.*: { var %id = $gettok($sockname,2,46) sockwrite -n $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ $($+(%,stats.rsn.,%ID),2) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf } on *:sockread:stats.*: { sockread &Incoming bwrite $sockname -1 -1 &Incoming if ($bfind(&Incoming, 1, ).text) makehash $sockname elseif ($bfind(&Incoming, 1, does not feature in the hiscores.).text) { $($+(%,stats.display.,%ID),2) 7The RuneScape User $c1($($+(%,stats.rsn.,%ID),2)) 13Does not feature in the hiscores if (%stats.togo != $null) { unset %stats.togo } cleanup $gettok($sockname,2,46) } } alias -l makehash { var %file = $1 bread %file 1 $file(%file).size &stats var %currentstat, %x = 1 while (%x) { var %x = $bfind(&stats,$calc(%x + 1),