on 1:JOIN:#heil: { /mode #heil +v $nick } on $*:TEXT:/^[!@]pcscript (on|off)$/Si:#: { if ($nick isop $chan) || ($nick ishop $chan) || ($address($nick,2) == $address($me,2)) { if ($2 == on) { if ($hget(pcwscript,$chan) == off) || (!$hget(pcwscript,$chan)) { hadd pcwscript $chan on msg $chan PCW Script enabled! } else { msg $chan PCW Script already enabled, noob. } } elseif ($2 == off) { if ($hget(pcwscript,$chan) == on) { hadd pcwscript $chan off msg $chan PCW Script DISABLED! } elseif ($hget(pcwscript,$chan) == off) || (!hget(pcwscript,$chan)) { msg $chan PCW Script wasn't on in the first place... } } } } on $*:TEXT:/^[!@](setpc|setpcw|setworld) +.$/Si:#: { if ($nick isop $chan) || ($nick ishop $chan) || ($address($nick,2) == $address($me,2)) { if ($hget(pcwscript,$chan) != off) { hadd pcw $chan $2 hadd pcwsetnicks $chan $nick hadd pcwsetsec $chan 0 hinc -c pcwsetsec $chan 1 msg $chan New world set by $nick $+ ! Type !world or !pcw to get the new world. } else { msg $chan Enable the PCW Script first! } } else { notice $nick Have to be op/hop to be able to do that. } } on $*:TEXT:/^!(pcw|world)$/Si:#:{ if ($hget(pcwscript,$chan) == on) { if ($nick isop $chan) || ($nick ishop $chan) || ($address($nick,2) == $address($me,2)) { notice $nick Current PCW world is $hget(pcw,$chan) $+ . notice $nick World was set by $hget(pcwsetnick,$chan) about $duration($hget(pcwsetsec,$chan),3) ago. } else { notice $nick You have to be voiced/hop/op to see the world. } } else { notice $nick PCW Script isn't even enabled... } } alias c1 { return 10 $+ $1- } alias c2 { return 12 $+ $1- } on *:text:*:#: { if (* $+ $chr(36) $+ * iswm $2-) { halt } tokenize 32 $strip($1-) if ($left($1,1) !isin @!.) halt if ($right($1,-1) == stats) var %style = astats elseif ($regex($1,/co?mb(at)?/Si)) var %style = combat elseif ($setskill($remove($1,@,!,.))) var %style = istat, %skill = $setskill($remove($1,@,!,.)) elseif ($right($1,-1) == defname) && ($2) { writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($2-,$chr(32),-) .notice $nick You're default RSN for the host $mask($fulladdress,3) has been set to $2- halt } else halt inc %ID if ($len($2-) > 12) { $($+(%,stats.display.,%ID),2) $c1(The nick) $c2($2-) $c1(is too long) cleanup %ID halt } elseif ($2) 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 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) $c1(The nick) $c2($($+(%,stats.rsn.,%ID),2)) $c1(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),