on $*:text:/^[!@]pc */Si:#:{ inc %ID var %skill = $setskill($2) if (!%skill) { set %pcmode not skill } else { set %pcmode skill } if (%pcmode == skill) { if (!$2) { /notice $nick You must choose a skill. Syntax is [!/@]pc . halt } } if (%pcmode == skill) { if ($3) { set $+(%,pc.rsn.,%ID) $replace($3-,$chr(32),-) set %pcmode skill } elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) { set $+(%,pc.rsn.,%ID) $ifmatch } elseif ($readini(DefRSN.ini,RSNs,$nick)) { set $+(%,pc.rsn.,%ID) $ifmatch } else { /notice $nick You must specify a RuneScape Name. } } else { if ($2) { set $+(%,pc.rsn.,%ID) $replace($2-,$chr(32),-) } elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) { set $+(%,pc.rsn.,%ID) $ifmatch } elseif ($readini(DefRSN.ini,RSNs,$nick)) { set $+(%,pc.rsn.,%ID) $ifmatch } else { /notice $nick You must specify a RuneScape Name. } } if ((%skill == Attack) || (%skill == Defence) || (%skill == Hitpoints) || (%skill == Strength) || (%skill == Ranged) || (%skill == Magic) || (%skill == Prayer)) { set $+(%,pc.skill.,%ID) %skill } elseif (%pcmode == skill) { /notice $nick Only Attack, Defence, Hitpoints, Strength, Ranged, Magic, and Prayer may be enhanced with Pest Control. halt } set $+(%,pc.display.,%ID) $iif($left($1,1) == @,msg $chan,notice %nick) sockopen $+(pc.,%ID) hiscore.runescape.com 80 } on *:sockopen:pc.*: { var %id = $gettok($sockname,2,46) sockwrite -n $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ $($+(%,pc.rsn.,%ID),2) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf } on *:sockread:pc.*: { 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) { $($+(%,pc.display.,%ID),2) (The nick) $c2($($+(%,stats.rsn.,%ID),2)) (Does not appear in the hiscores) 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),