;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Basic Runescape Utility and Fun IRC Scripts designed for Gosu Stizz. ;; ;; Most scripts desgined and put together by Max Hearts. Respective credit goes to repesctive owners. ;; ;; Availible commands in this packages are !list, [!@]leet text, [!@]calc text, !global text, ;; ;; [!@]gaysensor text, [!@]emosensor text, [!@]lovesensor text, [!@]noobsensor text, ;; ;; action slap reaction, action huggle reaction, !spy text, !endspy, [!@]google text, ;; ;; standard stats script commands ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; on *:TEXT:!list:#:{ notice $nick Availible commands on $me is as following: notice $nick RuneScape Stats(With Defname Feature!) ----- !defname nick, <@ or !><stats or cmb or skill> RSN notice $nick Google Search ----- <@ or !>google topic notice $nick Calculator ----- <@ or !>calc number<+ or - or * or />number notice $nick Fun "Sensors" ----- !emosensor nick, !gaysensor nick, !noobsensor nick, !lovesensor nick1 nick2 notice $nick English-to-Leet(Hardcore) Translator ----- <@ or !>leet text1 } on *:INVITE:#: { if ($chan == #Channel) { halt } { join $chan msg $chan Hello chatters of12 $chan and thanks for inviting me! I was invited by12 $nick $+ . If you would like to Part me, type 12!Part $me $+  (I can only be parted by Ops). To view my command list, type: 12!List. notice $me 1I was invited to $chan by $nick $+ . } } on *:TEXT:!part $me:#: { if ($chan == #Channel) { halt } { if ($nick isop $chan) || ($address($nick,2) == $address($me,2)) { /msg $chan 12 $+ $nick has Parted me. To invite me again some other time, type: 12/invite $me #channelname notice $me 1I was parted by $nick from $chan $+ . part $chan } } } on $*:TEXT:/^[!@]leet */Si:#:{ var %send $iif(!* iswm $1,notice $nick,msg $chan) %send English:  $+ $2- $+  Leet(1337):  $+ $replace($2-,a,/\,b,|3,c,[,d,|],e,3,f,|=,g,6,h,|-|,i,|,j,_],k,|{,l,1,m,|\/|,n,|\|,o,0,p,|*,q,O_,r,|2,s,5,t,7,u,(_),v,\/,w,\/\/,x,><,y,`/,z,2) $+  } on $*:TEXT:/^[!@]calc */Si:#: { var %send $iif(!* iswm $1,notice $nick,msg $chan) %send 12Calculator:12 $$2-  = 12 $calc($replace($2-,k,000,m,000000,pi,3.14159265,leet,1337) $2- $+  )) } on *:TEXT:!global *:#:{ if $address($nick,2) == $address($me,2) { /amsg [12 $+ $Me GLOBAL1] $2- } } on $*:TEXT:/^[!@]gaysensor */Si:#:{ var %send $iif(!* iswm $1,notice $nick,msg $chan) %send Gay sensors indicate that $2 is...  $+ $rand(1,100) $+ $chr(37) gay $+ . } on $*:TEXT:/^[!@]emosensor */Si:#:{ var %send $iif(!* iswm $1,notice $nick,msg $chan) %send Emo sensors indicate that $2 is...  $+ $rand(1,100) $+ $chr(37) emo $+ . $2 has...  $+ $rand(1,100) wrist-cuts $+ . } on $*:TEXT:/^[!@]lovesensor */Si:#:{ var %send $iif(!* iswm $1,notice $nick,msg $chan) %send Love sensors indicate indicate that $2 and $3- have a love compatabillity rate of $rand(1,100) $+ $chr(37) $+ . } on $*:TEXT:/^[!@]noobsensor */Si:#:{ var %send $iif(!* iswm $1,notice $nick,msg $chan) %send Noob sensors indicate that $2 is...  $+ $rand(1,100) $+ $chr(37) noob on the internet and  $+ $rand(1,100) $+ $chr(37) noob at life. } on *:ACTION:slaps * around a bit with a large trout:#:{ inc %tcount describe $chan snatches the trout from1 $nick 6and eats it! 1[Trouts Eaten:12 %tcount $+ 1] } on *:ACTION:*huggles *:#:{ describe $chan huggles1 $2- 6and1 $nick 6 msg $chan Room for one more? <3 } on *:TEXT:!spy *:#: { if $address($nick,2) == $address($me,2) { if (!$2) { msg $chan No channel specified. } else { set %spy.target $chan | join $2 | set %spy.source $2- | msg $chan Now spying on  $+ %spy.source $+ . } } } on *:TEXT:!endspy:#: { if $address($nick,2) == $address($me,2) { part %spy.source | msg $chan Spying on  $+ %spy.source  $+ has ended. | unset %spy.* } } on *:TEXT:*:%spy.source: { msg %spy.target $chr(91) $+ $time $+ ] $+(,<,,$spy.rank($nick),$nick,,>) $1- } on *:ACTION:*:%spy.source: { msg %spy.target $chr(91) $+ $time $+ ] * $+(,$spy.rank($nick)) $+ $nick $1- $+  } on *:JOIN:%spy.source: { msg %spy.target $chr(91) $+ $time $+ ] * $nick has joined %spy.source $+  } on *:PART:%spy.source: { msg %spy.target $chr(91) $+ $time $+ ] * $nick has left %spy.source $+  } on *:KICK:%spy.source: { msg %spy.target $chr(91) $+ $time $+ ] * $1 was kicked by $nick $+  } on *:QUIT:%spy.source: { msg %spy.target $chr(91) $+ $time $+ ] * $nick has quit IRC. $+  } on *:RAWMODE:%spy.source: { msg %spy.target $chr(91) $+ $time $+ ] * $nick set mode $1- $+  } alias spy.rank { if ($1 isop %spy.source) { return $chr(64) } elseif ($1 ishop %spy.source) { return $chr(37) } elseif ($1 isvoice %spy.source) { return $chr(43) } else { return $chr(45) } } on $*:text:/^[!@]google */Si:*:{ inc %ID 1 set %google.search $2- set %googlechan $chan set $+(%,search.,%ID) $replace($2-,$chr(32),+) $iif($left($1-,1) == @,.msg $chan,.notice $nick) sockopen $+(google.,%ID) www.google.com 80 } on *:SOCKOPEN:google.*: { sockwrite -nt $sockname GET /search?hl=en&q= $+ $gettok($($+(%,search.,%ID),2),1,32) $+ &btnI HTTP/1.1 sockwrite -nt $sockname Host: www.google.com sockwrite -t $sockname $str($crlf,2) } on *:SOCKREAD:google.*: { var %IDt = $right($sockname,-7) var %target = $gettok($($+(%,search.,%IDt),2),2-,32) if ($sockerr) { %target $chr(91) $col(ERROR) $chr(93) Socket error unset %search. $+ $right($sockname,-7) sockclose $sockname } else { var %read | sockread %read if (Location:* iswm %read) { %target 12G4o8o12g3l4e 4Result1: $remove($htmlfree(%read),Location:) unset %search. $+ $right($sockname,-7) sockclose $sockname } if (*did not match any documents* iswm %read) { %target 12G4o8o12g3l4e 1Result1: No results were found for 4" $+ %google.search $+ ". Please make sure you spelled the topic you are looking for correctly and try again. unset %search. $+ $right($sockname,-7) sockclose $sockname } } /close -m $nick } alias -l col { return $+($chr(3),$iif($len(%col) == 2,%col,$+(0,%col)), $1-, $chr(3)) } alias -l htmlfree { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ) return %x } alias c1 { return $+(, $1-,) } alias c2 { return $+(12, $1-,) } on *:text:*:#: { 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 4 $+ $2 $+  is now the Default RuneScape Username for the following Hostmask: $+ 4 $mask($fulladdress,3) $+  $+ . halt } else halt inc %ID if ($len($2-) > 12) { $($+(%,stats.display.,%ID),2) %display $c1( $+ The user) $c2($2-) $c1(is more than 12 letters long. Please search for a valid user.) 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(was not found in the RuneScape HighScores. If you do not have a Default RuneScape Username set yet, type !defname nick. ) 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),