on *:Join:#: { if ($chan == #Godbot) || ($chan == #GodbotStaff) { HALT } elseif ($nick isop #Godbot) { Msg $Chan 2»4»7|4«2« 14G15od14B15ot 14A15dmin 2»4»7|4«2« $+(14,$left($nick,1),15,$right($nick,-1)) 2»4»7|4«2« } elseif ($nick isvoice #Godbot) { Msg $Chan 2»4»7|4«2« 14G15od14B15ot 14H15elper 2»4»7|4«2« $+(14,$left($nick,1),15,$right($nick,-1)) 2»4»7|4«2« } } on *:INVITE:#: { if ($chan(0) >= 30) { notice $nick $c2($nick,I am currently full, please try again later.) halt } if ($readini(botinfo.ini,n,kicks,$chan) < 5) || ($readini(botinfo.ini,n,kicks,$chan) == $null) { writeini botinfo.ini JoinTEST $me $addtok($readini(botinfo.ini,JoinTEST,$me),$chan,44) msg #Godbotstaff $+($chr(3),07,$nick,$chr(3)) has invited me to $+($chr(3),07,$chan,$chr(3)) join $chan .timer 1 2 msg $chan Hello! I'm $me $+ . I was invited by $nick $+ . If I am kicked 5 times this channel is blacklisted, kicks left: $+($chr(3),07,$iif($readini(botinfo.ini,n,kicks,$chan),$calc(5 - $v1),5),/5,$chr(3),.) To remove me type $+($chr(3),07,!part $me,$chr(3)) } else { notice $nick I am not currently joining $chan as it is blacklisted, join #Godbot to get this appealed. } } on *:CONNECT:{ ns id %nspass join $readini(botinfo.ini,JoinTEST,$me) } on *:PART:#: { if ($nick != $me) { if ($nick($chan,0) < 4) { part $chan You need at least two other people to keep me. } } if ($nick == $me) { writeini botinfo.ini JoinTEST $me $remtok($readini(botinfo.ini,JoinTEST,$me),$chan,1,44) msg #Godbotstaff I have just parted $+($chr(3),07,$chan,$chr(3),.) } } on *:KICK:#: { if ($knick == $me) { writeini botinfo.ini JoinTEST $me $remtok($readini(botinfo.ini,JoinTEST,$me),$chan,1,44) ignore -iu300 $iif($address($nick,2),$v1,$nick) if ($readini(botinfo.ini,n,kicks,$chan) == $null) { writeini botinfo.ini kicks $chan 1 } else { var %x $readini(botinfo.ini,n,kicks,$chan) inc %x writeini botinfo.ini kicks $chan %x } msg #Godbotstaff I was just kicked from $+($chr(03),07,$chan,$chr(03)) by $+($chr(03),07,$nick,$chr(03),.) } } on *:TEXT:*:?: { msg #GodbotStaff 7 $+ $nick Has Just privately messaged me, Saying 7 $+ $1- msg $nick I am not currently receving Pm`s Please join #Godbot And speak to an operator close -m } on $*:TEXT:/^[!@]define/Si:#: haltdef on $*:TEXT:/^[!@]rank (duel|bounty|rogues)/Si:#: { if ($3 !isnum) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You must put a valid number.) halt } var %x 1 while ($sock(rankminigame. $+ %x)) { inc %x } if (duel isin $2) var %type 0 elseif (bounty isin $2) var %type 1 elseif (rogues isin $2) var %type 2 sockopen $+(rankminigame.,%x) hiscore.runescape.com 80 sockmark $+(rankminigame.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $3 $+ ~ $+ $nick $+ ~ $+ %type } on *:SOCKOPEN:rankminigame.*: { tokenize 126 $sock($sockname).mark sockwrite -nt $sockname GET /overall.ws?category_type=1&table= $+ $4 $+ &rank= $+ $2 HTTP/1.1 sockwrite -nt $sockname Host: hiscore.runescape.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:rankminigame.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if (AA0022 isincs %read) { if ($remove($gettok(%read,2,62),$chr(44), isin %read) { if ($5) { $1 *** $+($chr(91),$c1($3,$iif($4 == 0,Dueling,$iif($4 == 1,Bounty Hunters,Bouty Hunter Rogues))),$chr(93),:) $c2($3,Rank) $+ : $c1($3,$2) $chr(124) $c2($3,Name) $+ : $c1($3,$5) $chr(124) $c2($3,Score) $+ : $c1($3,$6) } else { $1 *** $+($chr(91),$c1($3,$iif($4 == 0,Dueling,$iif($4 == 1,Bounty Hunters,Bouty Hunter Rogues))),$chr(93),:) $c2($3,Rank) $c1($3,$2) $c2($3,not found.) } sockclose $sockname } } on $*:TEXT:/^[!@](rsnews|news)/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } var %x 1 while ($sock(rsnews. $+ %x)) { inc %x } sockopen $+(rsnews.,%x) runescape.com 80 sockmark $+(rsnews.,%x) $iif($left($1,1) == @,msg $chan,notice $nick) $+ ~ $+ $nick } on *:SOCKOPEN:rsnews.* { sockwrite -n $sockname GET /title.ws HTTP/1.1 sockwrite -n $sockname Host: runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:rsnews.*: { var %read sockread %read if ( isin %read) { var %name $gettok($sock($sockname).mark,2,126) $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1(%name,RuneScape News),$chr(93),:) $qt($c1(%name,$remove($gettok(%read,4,62),= 5) { var %y %y $ini(botinfo.ini,kicks,%x) } inc %x } msg $chan Channels blacklisted are: $+($chr(3),07,$iif(%y,%y,None),$chr(3)) } if ($2 == IdleExcepts) { msg $chan Channels on except for idle checking: $+($chr(3),07,$readini(botinfo.ini,n,IgnoreChannel,Idle),$chr(3)) } if ($2 == PublicIgnore) { msg $chan Channels on except for public commands: $+($chr(3),07,$readini(botinfo.ini,n,IgnoreChannel,Channels),$chr(3)) } if ($2- == commands) { privmsg $nick Commands are: join #channel, part #channel, blacklist #channel, unblacklist #channel, addpublicignore #channel, delpublicignore #channel, addidleexcept #channel, delidleexcept #channel, chans, idleexcepts, publicignore, blacklists, and commands. } if ($2 == amsg) && ($3 != $null) { amsg *** $+($chr(91),$+($chr(3),07,AMSG,$chr(3)),$chr(93),:) $3- $+($chr(91),$+($chr(32),$chr(3),07,$nick,$chr(3),$chr(32)),$chr(93)) } } } } on $*:TEXT:/^!(defname|setrsn)/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($2 == $null) { notice $nick *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You must specify a defname.) halt } if ($chr(36) isin $1-) { notice $nick *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,You may not have a) $c1($nick,$chr(36)) $c2($nick,in your name.) notice #omegascript $+($chr(03),07,$nick,$chr(3)) is attempting to exploit me in $+($chr(3),07,$chan,$chr(3),.) halt } writeini botinfo.ini defname $address($nick,3) $replace($2-,$chr(32),$chr(95)) notice $nick *** [ $+ $c1($nick,Defname) $+ ]: $c2($nick,Your default username is now) $qt($c1($nick,$2-)) $+ . $c2($nick,This defname is assiciated with the address) $c1($nick,$address($nick,3)) $+ $c2($nick,.) } on *:TEXT:!mycolor*:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($chr(36) isin $1-) { notice $nick *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,You may not have a) $c1($nick,$chr(36)) $c2($nick,in your colors.) halt } if ($2 !isnum 1-15) || ($len($2) > 2) || (. isin $2) { notice $nick *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,Your number $+ $+($chr(40),s,$chr(41)) must be between 1 and 15 and must not have a lenth of 3 or more.) halt } if ($3) && (($3 !isnum 1-15) || ($len($3) > 2) || (. isin $3)) { notice $nick *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,Your number $+ $+($chr(40),s,$chr(41)) must be between 1 and 15 and must not have a lenth of 3 or more.) halt } if ($readini(botinfo.ini,n,defcolor2,$address($nick,3))) && (!$3) { remini botinfo.ini defcolor2 $address($nick,3) } writeini botinfo.ini defcolor $address($nick,3) $iif($len($2) == 1,0 $+ $2,$2) if ($3) writeini botinfo.ini defcolor2 $address($nick,3) $iif($len($3) == 1,0 $+ $3,$3) notice $nick *** [ $+ $c1($nick,Mycolor) $+ ]: Your default highlight colors have been set to: $c1($nick,this) and $c2($nick,this) $+ . } on $*:TEXT:/^[!@](alch|item)/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($2 == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You must specify an item to lookup.) halt } var %x 1 while ($sock(alch. $+ %x)) { inc %x } sockopen $+(alch.,%x) tip.it 80 sockmark $+(alch.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $replace($2-,$chr(32),$chr(43)) $+ ~ $+ $nick } on *:SOCKOPEN:alch.*: { sockwrite -nt $sockname GET /runescape/index.php?rs2item=&orderby=0&keywords= $+ $gettok($sock($sockname).mark,2,126) $+ &Players=all&category=0&subcategory=0&cmd=8&action=Manage_Items&search=1&submit=Simple+Search HTTP/1.1 sockwrite -nt $sockname Host: tip.it sockwrite -nt $sockname $crlf } on *:SOCKREAD:alch.*: { var %read sockread %read if (No items matched isin %read) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Item),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),No items matched your search.) sockclose $sockname halt } if ($eval( Location,0) isin %read) { sockread %read sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Location) $+ : $c1($gettok($sock($sockname).mark,3,126),$remove(%read,$chr(9),)) } elseif ($eval(,0) isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),$remove(%read,$chr(9),)),$chr(93),:) } elseif ( isin %read) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Item),$chr(93),:) $replace($gettok($sock($sockname).mark,5-,126),~,$+($chr(32),$chr(124),$chr(32)),]: $chr(124),]:) sockclose $sockname halt } } on $*:TEXT:/^[!@](att|attack|str|strength|def|defence|hp|hitpoints|range|ranged|ranging|pray|prayer|praying|mage|magic|cook|cooking|woodcutting|wc|woodcut|fletch|fletching|fish|fishing|fm|firemaking|craft|crafting|smith|smithing|mine|mining|herb|herby|herblore|agil|agility|thief|thieving|slay|slayer|farm|farming|rc|runecraft|runecrafting|hunt|hunter|hunting|con|construction|sum|summon|summoning)-plan/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if (!$readini(botinfo.ini,n,defname,$address($nick,3))) && (!$4) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You do not have a defname set, set one or provide a RSN.) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $c2($nick,Sytax is: $+($left($1,1),$chr(31),skill,$chr(31),-plan) $+($chr(31),Number,$chr(31)) $+($chr(31),Item/Monster,$chr(31)) $+($chr(31),Name,$chr(31)) $+ . Your RSN may be omitted if you have a defname set. To see a list of items/monsters type: !param $+($chr(31),skill,$chr(31),.) halt } if (!$3) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $c2($nick,Sytax is: $+($left($1,1),$chr(31),skill,$chr(31),-plan) $+($chr(31),Number,$chr(31)) $+($chr(31),Item/Monster,$chr(31)) $+($chr(31),Name,$chr(31)) $+ . Your RSN may be omitted if you have a defname set. To see a list of items/monsters type: !param $+($chr(31),skill,$chr(31),.) halt } if (!$readini(eparam.ini,n,$skill2($remove($gettok($1,1,45),!,@)),$3)) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,The term) $qt($c1($nick,$3)) $c2($nick,was not found $+ $chr(44) for a list of parameters type: !param $+($chr(31),skill,$chr(31).)) halt } if ($2 !isnum) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $c2($nick,Sytax is: $+($left($1,1),$chr(31),skill,$chr(31),-plan) $+($chr(31),Number,$chr(31)) $+($chr(31),Item/Monster,$chr(31)) $+($chr(31),Name,$chr(31)) $+ . Your RSN may be omitted if you have a defname set. To see a list of items/monsters type: !param $+($chr(31),skill,$chr(31),.)) halt } var %x 1 while ($sock(plan. $+ %x)) { inc %x } if ($chr(38) isin $4) { if ($readini(botinfo.ini,n,defname,$address($remove($4,&),3))) { var %ntl $readini(botinfo.ini,n,defname,$address($remove($4,&),3)) } else { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,The name) $qt($c1($nick,$remove($4,&))) $c2($nick,does not have a defname set OR is not on the channel.) halt } } else { var %ntl $iif($4,$4,$readini(botinfo.ini,n,defname,$address($nick,3))) } sockopen $+(plan.,%x) hiscore.runescape.com 80 sockmark $+(plan.,%x) 0 $+ ~ $+ $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $skill2($remove($gettok($1,1,45),!,@)) $+ ~ $+ $2 $+ ~ $+ $3 $+ ~ $+ %ntl $+ ~ $+ $readini(eparam.ini,n,$skill2($remove($gettok($1,1,45),!,@)),$3) $+ ~ $+ $nick } on *:SOCKOPEN:plan.*: { sockwrite -n $sockname GET /index_lite.ws?player= $+ $gettok($sock($sockname).mark,6,126) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:plan.*: { var %read sockread %read if (404 - page not isin %read) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,8,126),Error),$chr(93),:) $c2($gettok($sock($sockname).mark,8,126),The name) $qt($c1($gettok($sock($sockname).mark,8,126),$gettok($sock($sockname).mark,6,126))) $c2($gettok($sock($sockname).mark,8,126),was not in the hiscores for any skill.) sockclose $sockname halt } if (*,*,* iswm %read) { var %x $gettok($sock($sockname).mark,1,126) while ($skill(%x) != $gettok($sock($sockname).mark,3,126)) { sockread %read inc %x } if (-1 isin %read) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,8,126),Error),$chr(93),:) $c2($gettok($sock($sockname).mark,8,126),The name) $qt($c1($gettok($sock($sockname).mark,8,126),$gettok($sock($sockname).mark,6,126))) $c2($gettok($sock($sockname).mark,8,126),was not in the) $c1($gettok($sock($sockname).mark,8,126),$gettok($sock($sockname).mark,3,126)) $c2($gettok($sock($sockname).mark,8,126),hiscores.) sockclose $sockname halt } var %final $chr(124) $c2($gettok($sock($sockname).mark,8,126),Experience gained from) $c1($gettok($sock($sockname).mark,8,126),$bytes($gettok($sock($sockname).mark,4,126),db) $gettok($sock($sockname).mark,5,126)) $+ : $c1($gettok($sock($sockname).mark,8,126),$bytes($calc($gettok($sock($sockname).mark,7,126) * $gettok($sock($sockname).mark,4,126)),db)) $+($chr(40),$c1($gettok($sock($sockname).mark,8,126),$gettok($sock($sockname).mark,7,126) $+ ea),$chr(41)) $chr(124) $c2($gettok($sock($sockname).mark,8,126),Final Level) $+ : $c1($gettok($sock($sockname).mark,8,126),$lfe($calc($gettok(%read,3,44) + $calc($gettok($sock($sockname).mark,4,126) * $gettok($sock($sockname).mark,7,126))))) $+($chr(40),$c1($gettok($sock($sockname).mark,8,126),$bytes($calc($gettok(%read,3,44) + $calc($gettok($sock($sockname).mark,4,126) * $gettok($sock($sockname).mark,7,126))),db) $+ exp),$chr(41)) $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,8,126),$upper($gettok($sock($sockname).mark,3,126) PLAN)),$chr(93),:) $+($chr(91),$c1($gettok($sock($sockname).mark,8,126),$gettok($sock($sockname).mark,6,126)),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),Oringinal Level) $+ : $c1($gettok($sock($sockname).mark,8,126),$gettok(%read,2,44)) $+($chr(40),$c1($gettok($sock($sockname).mark,8,126),$bytes($gettok(%read,3,44),db) $+ exp),$chr(41)) %final sockclose $sockname } } on $*:TEXT:/^[!@]stats/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($2 == $null) && ($readini(botinfo.ini,n,defname,$address($nick,3)) == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,You must specify a player or default name.) halt } var %x 1 while ($sock(stats. $+ %x)) { inc %x } var %y 1 while (%y <= $numtok($2-,32)) { if ($remove($gettok($2-,%y,32),$chr(95),$chr(45)) isalnum) { var %name %name $gettok($2-,%y,32) } elseif ($chr(62) isin $gettok($2-,%y,32)) || ($chr(60) isin $gettok($2-,%y,32)) { var %ep $gettok($2-,%y,32) } elseif ($chr(38) isin $gettok($2-,%y,32)) { if ($readini(botinfo.ini,n,defname,$address($left($gettok($2-,%y,32),-1),3))) { var %name $readini(botinfo.ini,n,defname,$address($left($gettok($2-,%y,32),-1),3)) } else { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93)) $c2($nick,The name) $qt($c1($nick,$left($gettok($2-,%y,32),-1))) $c2($nick,does not have a defname set OR is not on the channel.) halt } } inc %y } if (!%name) && ($readini(botinfo.ini,n,defname,$address($nick,3))) { var %name $readini(botinfo.ini,n,defname,$address($nick,3)) } elseif (!%name) && (!$readini(botinfo.ini,n,defname,$address($nick,3))) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93)) $c2($nick,You must specify a name to lookup or set a default name.) halt } sockopen $+(stats.,%x) hiscore.runescape.com 80 sockmark $+(stats.,%x) -1 $+ ~ $+ $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ %name $+ ~ $+ $nick $+ ~ $+ $iif(%ep,%ep) } on *:SOCKOPEN:stats.*: { sockwrite -n $sockname GET /index_lite.ws?player= $+ $gettok($sock($sockname).mark,3,126) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:stats.*: { var %read sockread %read if (404 - Page isin %read) { $gettok($sock($sockname).mark,2,126) *** [ $+ $c1($gettok($sock($sockname).mark,4,126),$upper($replace($gettok($sock($sockname).mark,3,126),$chr(95),$chr(32)))) $+ ]: $c2($gettok($sock($sockname).mark,4,126),does not appear in the high scores list.) sockclose $sockname } if (*,*,* iswm %read) { var %x $gettok($sock($sockname).mark,1,126) inc %x if (-1 !isin %read) { if ($gettok($sock($sockname).mark,5,126)) { if ($chr(60) isin $gettok($sock($sockname).mark,5,126)) { if ($gettok(%read,2,44) < $remove($gettok($sock($sockname).mark,5,126),$chr(60),$chr(62))) { sockmark $sockname %x $+ ~ $+ $gettok($sock($sockname).mark,2-,126) $+ ~ $c2($gettok($sock($sockname).mark,4,126),$skill(%x)) $c1($gettok($sock($sockname).mark,4,126),$iif($gettok(%read,2,44) == -1,0,$v1)) $chr(124) } else { sockmark $sockname %x $+ ~ $+ $gettok($sock($sockname).mark,2-,126) } } else { if ($gettok(%read,2,44) > $remove($gettok($sock($sockname).mark,5,126),<,>)) { sockmark $sockname %x $+ ~ $+ $gettok($sock($sockname).mark,2-,126) $+ ~ $c2($gettok($sock($sockname).mark,4,126),$skill(%x)) $c1($gettok($sock($sockname).mark,4,126),$iif($gettok(%read,2,44) == -1,0,$v1)) $chr(124) } else { sockmark $sockname %x $+ ~ $+ $gettok($sock($sockname).mark,2-,126) } } } else { sockmark $sockname %x $+ ~ $+ $gettok($sock($sockname).mark,2-,126) $+ ~ $c2($gettok($sock($sockname).mark,4,126),$skill(%x)) $c1($gettok($sock($sockname).mark,4,126),$iif($gettok(%read,2,44) == -1,0,$v1)) $chr(124) } } else { sockmark $sockname %x $+ ~ $+ $gettok($sock($sockname).mark,2-,126) } if (%x == 24) { if ($numtok($gettok($sock($sockname).mark,4-,126),32) <= 65) { $gettok($sock($sockname).mark,2,126) *** [ $+ $c1($gettok($sock($sockname).mark,4,126),$upper($replace($gettok($sock($sockname).mark,3,126),$chr(95),$chr(32)))) $+ ]: $left($remove($gettok($sock($sockname).mark,5-,126),~),-1) } else { $gettok($sock($sockname).mark,2,126) *** [ $+ $c1($gettok($sock($sockname).mark,4,126),$upper($replace($gettok($sock($sockname).mark,3,126),$chr(95),$chr(32)))) $+ ]: $left($remove($gettok($sock($sockname).mark,5-23,126),~),-1) $gettok($sock($sockname).mark,2,126) *** [ $+ $c1($gettok($sock($sockname).mark,4,126),$upper($replace($gettok($sock($sockname).mark,3,126),$chr(95),$chr(32)))) $+ ]: $left($remove($gettok($sock($sockname).mark,24-,126),~),-1) } } } } on $*:TEXT:/^[!@]pc (att|attack|str|strength|def|defence|hp|hitpoints|range|ranged|ranging|pray|prayer|praying|magic|mage)/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } var %x 1 while ($gettok($2-,%x,32)) { if ($chr(35) isin $gettok($2-,%x,32)) && ($remove($gettok($2-,%x,32),$chr(35)) isnum 31-99) { var %level $remove($gettok($2-,%x,32),$chr(35)) } elseif ($chr(38) isin $gettok($2-,%x,32)) { if ($readini(botinfo.ini,n,defname,$address($left($gettok($2-,%x,32),-1),3)) != $null) { var %name $v1 } else { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,The name) $qt($c1($nick,$left($gettok($2-,%x,32),-1))) $c2($nick,does not have a defname set OR is not on the channel.) halt } } elseif ($gettok($remove($2-,$chr(95)),%x,32) isalnum) && ($gettok($2-,%x,32) != $2) { var %name $gettok($2-,%x,32) } if (%name == $null) { var %name $readini(botinfo.ini,n,defname,$address($nick,3)) } if (%level == $null) { var %level null } inc %x } if (%name == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You must specify a player or default name.) halt } var %x 1 while ($sock(pc. $+ %x)) { inc %x } sockopen $+(pc.,%x) hiscore.runescape.com 80 sockmark $+(pc.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ %name $+ ~ $+ %level $+ ~ $+ $skill2($2) $+ ~ $+ $nick } on *:SOCKOPEN:pc.*: { sockwrite -n $sockname GET /index_lite.ws?player= $+ $gettok($sock($sockname).mark,2,126) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com 80 sockwrite -n $sockname $crlf } on *:SOCKREAD:pc.*: { var %overall,%attack,%defence,%strength,%hitpoints,%ranged,%prayer,%magic sockread %overall if (*404 - page not* iswm %overall) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,5,126),Error),$chr(93),:) $c2($gettok($sock($sockname).mark,5,126),The name) $qt($c1($gettok($sock($sockname).mark,5,126),$gettok($sock($sockname).mark,2,126))) $c2($gettok($sock($sockname).mark,5,126),does not appear in the hiscores.) sockclose $sockname halt } if (*,*,* iswm %overall) { var %name $gettok($sock($sockname).mark,5,126) sockread %attack sockread %defence sockread %strength sockread %hitpoints sockread %ranged sockread %prayer sockread %magic if ($gettok(% [ $+ [ $gettok($sock($sockname).mark,4,126) ] ],2,44) == 99) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1(%name,Error),$chr(93),:) $c2(%name,The name) $qt($c1(%name,$gettok($sock($sockname).mark,2,126))) $c2(%name, is already level 99) $c1(%name,$gettok($sock($sockname).mark,4,126)) $+ $c2(%name,!) sockclose $sockname halt } if ($gettok($sock($sockname).mark,3,126) <= $gettok(% [ $+ [ $gettok($sock($sockname).mark,4,126) ] ],2,44)) && ($gettok($sock($sockname).mark,3,126) != null) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1(%name,Error),$chr(93),:) $c2(%name,You must pick a level greater than your current level.) sockclose $sockname halt } var %x $iif($gettok($sock($sockname).mark,3,126) == null,$calc($gettok(% [ $+ [ $gettok($sock($sockname).mark,4,126) ] ],2,44) + 1),$v1) var %y $gettok(% [ $+ [ $gettok($sock($sockname).mark,4,126) ] ],2,44) var %single 0,%100 0,%10 0 while (%y < %x) { var %exp $calc($floor($calc(%y * %y / 600)) * 35) if (%y == $gettok(% [ $+ [ $gettok($sock($sockname).mark,4,126) ] ],2,44)) { var %xpneeded $calc($xpforlevel($calc(%y + 1)) - $gettok(% [ $+ [ $gettok($sock($sockname).mark,4,126) ] ],3,44)) } else { var %xpneeded $calc($xpforlevel($calc(%y + 1)) - $xpforlevel(%y)) } inc %single $calc(%xpneeded / %exp) inc %10 $calc(%xpneeded / $calc($calc($calc(%exp * 10) * .01) + $calc(%exp * 10))) inc %100 $calc(%xpneeded / $calc($calc($calc(%exp * 100) * .1) + $calc(%exp * 100))) inc %y } $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1(%name,$upper($gettok($sock($sockname).mark,2,126))),$chr(93),:) $c1(%name,$ceil(%single)) $c2(%name,single points $+ $chr(44)) $c1(%name,$ceil(%10)) $c2(%name,sets of 10) $+($chr(40),$c1(%name,$calc($ceil(%10) * 10)),$chr(32) $+ $c2(%name,points),$chr(41))) $+ $c2(%name,$chr(44) or) $c1(%name,$ceil(%100)) $c2(%name,sets of 100 points) $+($chr(40),$c1(%name,$calc($ceil(%100) * 100)),$c2(%name,$chr(160) $+ points),$chr(41)) $c2(%name,needed for level) $c1(%name,%x $gettok($sock($sockname).mark,4,126)) $+ $c2(%name,.) sockclose $sockname } } on $*:TEXT:/^[!@]rank/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($2 == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,The syntax is: !rank ) halt } if ($skill2($2) == $null) || ($3 !isnum 1-1000000) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93).:) $c2($nick,The syntax is: !rank ) halt } var %x 1 while ($sock(rank. $+ %x)) { inc %x } sockopen $+(rank.,%x) hiscore.runescape.com 80 sockmark $+(rank.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $skill2($2) $+ ~ $+ $3 $+ ~ $+ $nick } on *:SOCKOPEN:rank.*: { sockwrite -nt $sockname GET /overall.ws?table= $+ $skill3($gettok($sock($sockname).mark,2,126)) $+ &rank= $+ $gettok($sock($sockname).mark,3,126) HTTP/1.1 sockwrite -nt $sockname Host: hiscore.runescape.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:rank.*: { var %read sockread %read if (*AA0022* iswm %read) && (*hiscorepersonal.ws* !iswm %read) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $remove($gettok(%read,2,62),* iswm %read) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,2,126)),$chr(93),:) $c2($gettok($sock($sockname).mark,4,126),Rank) $+ : $c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,5,126)) $chr(124) $c2($gettok($sock($sockname).mark,4,126),Name) $+ : $c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,6,126)) $chr(124) $c2($gettok($sock($sockname).mark,4,126),Experience) $+ : $c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,8,126)) $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,7,126)),$chr(93)) sockclose $sockname } } on $*:TEXT:/^[!@](overall|att|attack|str|strength|def|defence|hp|hitpoints|range|ranged|ranging|pray|prayer|praying|mage|magic|cook|cooking|woodcutting|wc|woodcut|fletch|fletching|fish|fishing|fm|firemaking|craft|crafting|smith|smithing|mine|mining|herb|herby|herblore|agil|agility|thief|thieving|slay|slayer|farm|farming|rc|runecraft|runecrafting|hunt|hunter|hunting|con|construction|sum)/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($2- == $null) && ($readini(botinfo.ini,n,defname,$address($nick,3)) == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,You must specify a player or default name.) halt } var %x 1,%y while (%x <= $numtok($replace($2-,$chr(95),$chr(32),$chr(45),$chr(32)),32)) { if ($gettok($replace($2-,$chr(95),$chr(32),$chr(45),$chr(32)),%x,32) !isalnum) { inc %y } inc %x } if (%y == $numtok($replace($2-,$chr(95),$chr(32),$chr(45),$chr(32)),32)) && ($readini(botinfo.ini,n,defname,$address($nick,3)) == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,You must specify a player or default name.) halt } var %x 1 while ($sock(level. $+ %x)) { inc %x } var %y 1 while (%y <= $numtok($2-,32)) { if ($gettok($remove($2-,$chr(95)),%y,32) isalnum) { var %name %name $gettok($2-,%y,32) } elseif (#* iswm $v1) { var %# $v2 } elseif ($chr(38) isin $gettok($2-,%y,32)) { var %name $readini(botinfo.ini,n,defname,$address($left($v2,-1),3)) } elseif (@* iswm $gettok($2-,%y,32)) { var %clu $v2 } inc %y } sockopen $+(level.,%x) hiscore.runescape.com 80 sockmark $+(level.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $iif(%name,%name,$readini(botinfo.ini,n,defname,$address($nick,3))) $+ ~ $+ $nick $+ ~ $+ $right($1,-1) $+ ~ $+ $iif(%#,$right(%#,-1),0) $+ ~ $+ $iif(%clu,%clu) } on *:SOCKOPEN:level.*: { sockwrite -n $sockname GET /index_lite.ws?player= $+ $gettok($sock($sockname).mark,2,126) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:level.*: { var %read sockread %read if (404 - page isin %read) { $gettok($sock($sockname).mark,1,126) *** $chr(91) $+ $c1($gettok($sock($sockname).mark,3,126),$upper($gettok($sock($sockname).mark,2,126))) $+ $chr(93) $+ : $c2($gettok($sock($sockname).mark,3,126),does not appear in the) $c1($gettok($sock($sockname).mark,3,126),$skill2($gettok($sock($sockname).mark,4,126))) $c2($gettok($sock($sockname).mark,3,126),high scores list.) sockclose $sockname halt } if (*,*,* iswm %read) { var %x 0 if ($gettok($sock($sockname).mark,4,126) == Overall) { if (-1 isin %read) { $gettok($sock($sockname).mark,1,126) *** $chr(91) $+ $c1($gettok($sock($sockname).mark,3,126),$upper($gettok($sock($sockname).mark,2,126))) $+ $chr(93) $+ : $c2($gettok($sock($sockname).mark,3,126),does not appear in the) $c1($gettok($sock($sockname).mark,3,126),Overall) $c2($gettok($sock($sockname).mark,3,126),high scores list.) sockclose $sockname halt } var %ranged,%magic,%att,%str,%def,%hp,%prayer sockread %att sockread %def sockread %str sockread %hp sockread %ranged sockread %prayer sockread %magic var %att $iif($gettok(%att,2,44) == -1,1,$v1) var %def $iif($gettok(%def,2,44) == -1,1,$v1) var %str $iif($gettok(%str,2,44) == -1,1,$v1) var %hp $iif($gettok(%hp,2,44) == -1,10,$v1) var %ranged $iif($gettok(%ranged,2,44) == -1,1,$v1) var %prayer $iif($gettok(%prayer,2,44) == -1,1,$v1) var %magic $iif($gettok(%magic,2,44) == -1,1,$v1) var %1 1, %summon while (%1 <= 17) { sockread %summon inc %1 } var %summon = $iif(- !isin $gettok(%summon,2,44),$v2,1) var %f $gettok($sock($sockname).mark,3,126) $gettok($sock($sockname).mark,1,126) *** $chr(91) $+ $c1($gettok($sock($sockname).mark,3,126),$upper($gettok($sock($sockname).mark,2,126))) $+ $chr(93) $+ : $chr(91) $+ $c1(%f,$skill(%x)) $+ $chr(93) $c2(%f,Level) $+ : $c1(%f,$bytes($gettok(%read,2,44),db)) $chr(124) $c2(%f,Experience) $+ : $c1(%f,$bytes($gettok(%read,3,44),db)) $chr(40) $+ $c1(%f,$round($calc($gettok(%read,3,44) / 299791913 * 100),2) $+ $chr(37)) $c2(%f,of 99) $+ $chr(41) $chr(124) $c2(%f,Rank) $+ : $c1(%f,$bytes($gettok(%read,1,44),db)) $chr(124) $c2(%f,Combat) $+ : $c1(%f,$cmblvl(%att,%str,%def,%hp,%ranged,%prayer,%magic,%summon)) sockclose $sockname halt } while ($skill2($gettok($sock($sockname).mark,4,126)) != $skill(%x)) { sockread %read inc %x } if ($gettok($sock($sockname).mark,5,126) != 0) && ($gettok($sock($sockname).mark,5,126) <= $gettok(%read,2,44)) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Error),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),You must specify a level higher than your current.) sockclose $sockname halt } if (-1 isin %read) { $gettok($sock($sockname).mark,1,126) *** $chr(91) $+ $c1($gettok($sock($sockname).mark,3,126),$upper($gettok($sock($sockname).mark,2,126))) $+ $chr(93) $+ : $c2($gettok($sock($sockname).mark,3,126),does not appear in the) $c1($gettok($sock($sockname).mark,3,126),$skill(%x)) $c2($gettok($sock($sockname).mark,3,126),high scores list.) sockclose $sockname halt } var %f $gettok($sock($sockname).mark,3,126) if ($gettok($sock($sockname).mark,5,126)) && (@ !isin $gettok($sock($sockname).mark,5,126)) { var %level $gettok($sock($sockname).mark,5,126) } else { var %level $calc($gettok(%read,2,44) + 1) } var %level $iif($gettok($sock($sockname).mark,5,126) != 0,$v1,$calc($gettok(%read,2,44) + 1)) var %y $calc($gettok(%read,3,44) - $xpforlevel($gettok(%read,2,44))) var %y $calc(%y / $calc($xpforlevel($iif($gettok($sock($sockname).mark,5,126),$v1,$calc($gettok(%read,2,44) + 1))) - $xpforlevel($gettok(%read,2,44)))) var %y $round($calc(%y * 100),1) var %y $chr(40) $+ $c1($gettok($sock($sockname).mark,3,126),%y $+ $chr(37)) $c2(%f,to %level) $+ $chr(41) $gettok($sock($sockname).mark,1,126) *** $chr(91) $+ $c1(%f,$upper($gettok($sock($sockname).mark,2,126))) $+ $chr(93) $+ : $chr(91) $+ $c1(%f,$skill(%x)) $+ $chr(93) $c2(%f,Level) $+ : $c1(%f,$gettok(%read,2,44)) $chr(124) $c2(%f,Experience) $+ : $c1(%f,$bytes($gettok(%read,3,44),db)) $chr(40) $+ $c1(%f,$round($calc($gettok(%read,3,44) / 13034431 * 100),2) $+ $chr(37)) $c2(%f,of 99) $+ $chr(41) $chr(124) $c2(%f,Rank) $+ : $c1(%f,$bytes($gettok(%read,1,44),db)) $iif($gettok(%read,2,44) != 99,$chr(124) $c2(%f,Experience to level) $c1(%f,%level) $+ : $c1(%f,$bytes($calc($xpforlevel(%level) - $gettok(%read,3,44)),db))) $iif($gettok(%read,2,44) != 99,%y) if ($gettok(%read,2,44) != 99) && ($skill(%x) != Slayer) { notice $gettok($sock($sockname).mark,3,126) $FNL($skill(%x),$calc($xpforlevel(%level) - $gettok(%read,3,44)),$gettok($sock($sockname).mark,3,126),$iif($gettok($sock($sockname).mark,6,126),$right($gettok($sock($sockname).mark,6,126),-1))) } sockclose $sockname } } on *:TEXT:!param*:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if (% [ $+ [ $gettok($address($nick,2),2-,64) ] ] != $null) { notice $nick $c2($nick,Please wait) $c1($nick,% [ $+ [ $gettok($address($nick,2),2-,64) ] ]) $c2($nick,more seconds before useing) $c1($nick,!param) $c2($nick,again.) halt } set -z $+(%,$gettok($address($nick,2),2-,64)) 30 if ($skill2($2) == Construction) { notice $nick $c2($nick,Parameters for) $c1($nick,$skill2($2)) $+ : $c2($nick,Normal Plank) $+ , $c2($nick,Oak Plank) $+ , $c2($nick,Teak Plank) $+ , $c2($nick,Mahogany Plank) $+ . $c2($nick,There are also the individual things you can make with the planks, but they are too numerous to list.) halt } if ($skill2($2)) { var %x 1 while ($ini(eparam.ini,%x) != $skill2($2)) { inc %x } var %y 1 while (%y <= $ini(eparam.ini,%x,0)) { if ($len($replace(%z,$chr(44),a)) >= 900) { var %c %z unset %z } var %z %z $+ $iif(%z,$chr(44)) $c2($nick,$ini(eparam.ini,%x,%y)) inc %Y } if ($len($replace(%z,$chr(44),a)) >= 290) { var %c $gettok(%z,1- $+ $calc($numtok(%z,44) / 2),44) var %z $gettok(%z,$calc($numtok(%z,44) / 2 + 1) $+ -,44) } if (%c != $null) { if ($len($replace(%c,$chr(44),a)) >= 324) { var %d $gettok(%c,1- $+ $calc($numtok(%c,44) / 2),44) var %c $gettok(%c,$calc($numtok(%c,44) / 2 + 1) $+ -,44) } if (%d != $null) { notice $nick $c2($nick,Parameters for) $c1($nick,$skill2($2)) $+ : %d $+ , notice $nick $gettok(%c,1-27,44) $+ , notice $nick $gettok(%c,28-,44) $gettok(%z,1- $+ $calc($numtok(%z,32) / 2),32) if ($gettok(%z,$calc($floor($calc($numtok(%z,32) / 2)) + 1) $+ -,32)) { notice $nick $v1 $+ . } } else { notice $nick $c2($nick,Parameters for) $c1($nick,$skill2($2)) $+ : %c $+ , notice $nick %z $+ . } } else { notice $nick $c2($nick,Parameters for) $c1($nick,$skill2($2)) $+ : %z $+ . } } } on $*:TEXT:/^[!@]compare/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($skill2($2) == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,Syntax is: !compare [user2]. Spaces in names must be underscores. User2 may be ommited if you have a defname set.) halt } if ($4 == $null) && ($readini(botinfo.ini,n,defname,$address($nick,3)) == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,you must specify a second user or set a default name.) halt } var %y 1 while (%y <= $numtok($2-,32)) { if ($chr(38) isin $gettok($2-,%y,32)) { if ($readini(botinfo.ini,n,defname,$address($left($gettok($2-,%y,32),-1),3)) == $null) { $iif($left($1,1) == @,msg $chan,notice $nick) $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,The name) $qt($c1($nick,$left($gettok($2-,%y,32),-1))) $c2($nick,does not have a defname set OR is not in the channel.) halt } if (%nick1 == $null) { var %nick1 $readini(botinfo.ini,n,defname,$address($left($gettok($2-,%y,32),-1),3)) } else { var %nick2 $readini(botinfo.ini,n,defname,$address($left($gettok($2-,%y,32),-1),3)) } } inc %y } if (%nick1 == $null) { var %nick1 $iif($4,$3,$readini(botinfo.ini,n,defname,$address($nick,3))) var %nick2 $iif($4,$4,$3) } if (%nick2 == $null) { if ($4) { var %nick2 $iif($chr(38) !isin $4,$4,$3) } else { var %nick2 %nick1 var %nick1 $readini(botinfo.ini,n,defname,$address($nick,3)) } } if (%nick1 == %nick2) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Compare),$chr(93),:) $c2($nick,Wow!) $c1($nick,%nick1) $c2($nick,has the same levels and experience as) $c1($nick,%nick2) $+ $c2($nick,. Who knew?) halt } var %x 1 while ($sock(compare. $+ %x)) { inc %x } sockopen $+(compare.,%x) hiscore.runescape.com 80 sockmark $+(compare.,%x) -1 $+ ~ $+ $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $skill2($2) $+ ~ $+ $nick $+ ~ $+ %nick1 $+ ~ $+ %nick2 } on *:SOCKOPEN:compare.*: { sockwrite -n $sockname GET /index_lite.ws?player= $+ $gettok($sock($sockname).mark,5,126) HTTP/1.1 sockwrite -n $sockname host: hiscore.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:compare.*: { var %read sockread %read if (*404 - page not* iswm %read) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),Compare),$chr(93).:) $c2($gettok($sock($sockname).mark,4,126),The stats of) $qt($c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,5,126))) $c2($gettok($sock($sockname).mark,4,126),were not found.) sockclose $sockname halt } if (*,*,* iswm %read) { var %x 0 while ($gettok($sock($sockname).mark,3,126) != $skill(%x)) { sockread %read inc %x } if (-1 isin %read) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),Compare),$chr(93),:) $c2($gettok($sock($sockname).mark,4,126),The name) $qt($c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,5,126))) $c2($gettok($sock($sockname).mark,4,126),is not ranked in the skill) $c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,3,126)) $+ $c2($gettok($sock($sockname).mark,4,126),.) sockclose $sockname halt } sockopen $+(compare2.,$gettok($sockname,2,46)) hiscore.runescape.com 80 sockmark $+(compare2.,$gettok($sockname,2,46)) -1 $+ ~ $+ $gettok($sock($sockname).mark,2-,126) $+ ~ $+ %read sockclose $sockname halt } } on *:SOCKOPEN:compare2.*: { sockwrite -n $sockname GET /index_lite.ws?player= $+ $gettok($sock($sockname).mark,6,126) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:compare2.*: { var %p2 sockread %p2 if (*404 - page not* iswm %p2) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),Compare),$chr(93).:) $c2($gettok($sock($sockname).mark,4,126),The stats of) $qt($c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,6,126))) $c2($gettok($sock($sockname).mark,4,126),were not found.) sockclose $sockname halt } if (*,*,* iswm %p2) { var %x 0 while ($gettok($sock($sockname).mark,3,126) != $skill(%x)) { sockread %p2 inc %x } if (-1 isin %p2) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),Compare),$chr(93),:) $c2($gettok($sock($sockname).mark,4,126),The name) $qt($c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,6,126))) $c2($gettok($sock($sockname).mark,4,126),is not ranked in the skill) $c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,3,126)) $+ $c2($gettok($sock($sockname).mark,4,126),.) sockclose $sockname halt } var %p1 $gettok($sock($sockname).mark,7,126) var %name $gettok($sock($sockname).mark,4,126) var %name1 $gettok($sock($sockname).mark,5,126) var %name2 $gettok($sock($sockname).mark,6,126) if ($gettok(%p1,2,44) == $gettok(%p2,2,44)) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1(%name,Compare),$chr(93),:) $c1(%name,%name1) $c2(%name,has the same) $c1(%name,$gettok($sock($sockname).mark,3,126)) $c2(%name,level as) $c1(%name,%name2) $+($chr(40),$c1(%name,$gettok(%p1,2,44)),$chr(41)) $+ $c2(%name,.) $c1(%name,$iif($gettok(%p1,3,44) > $gettok(%p2,3,44),%name1,%name2)) $c2(%name,has) $c1(%name,$bytes($calc($iif($gettok(%p1,3,44) > $gettok(%p2,3,44),$v1 - $v2,$v2 - $v1)),db)) $c2(%name,more) $c1(%name,$gettok($sock($sockname).mark,3,126)) $c2(%name,experience than) $c1(%name,$iif($gettok(%p1,3,44) > $gettok(%p2,3,44),%name2,%name1))) $+ $c2(%name,.) sockclose $sockname halt } else { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1(%name,Compare),$chr(93),:) $c1(%name,$iif($gettok(%p1,2,44) > $gettok(%p2,2,44),%name1,%name2)) $c2(%name,is) $c1(%name,$calc($iif($gettok(%p1,2,44) > $gettok(%p2,2,44),$v1,$v2) - $iif($gettok(%p1,2,44) > $gettok(%p2,2,44),$v2,$v1)) $gettok($sock($sockname).mark,3,126)) $c2(%name,levels higher than) $c1(%name,$iif($gettok(%p1,2,44) > $gettok(%p2,2,44),%name2,%name1)) $+ $c2(%name,.) $c1(%name,$iif($gettok(%p1,3,44) > $gettok(%p2,3,44),%name1,%name2)) $c2(%name,has) $c1(%name,$bytes($calc($iif($gettok(%p1,3,44) > $gettok(%p2,3,44),$v1,$v2) - $iif($gettok(%p1,3,44) > $gettok(%p2,3,44),$v2,$v1)),db)) $c2(%name,more) $c1(%name,$gettok($sock($sockname).mark,3,126)) $c2(%name,experience than) $c1(%name,$iif($gettok(%p1,3,44) > $gettok(%p2,3,44),%name2,%name1)) $+ $c2(%name,.) if (($gettok(%p1,2,44) != 99) || ($gettok(%p2,2,44) != 99)) && ($gettok($sock($sockname).mark,3,126) != Overall) && ($gettok($sock($sockname).mark,3,126) != Slayer) { notice %name $FNL($gettok($sock($sockname).mark,3,126),$iif($gettok(%p1,3,44) > $gettok(%p2,3,44),$calc($v1 - $v2),$calc($v2 - $v1)),%name) } } sockclose $sockname halt } } on $*:TEXT:/^(`|[!@]Calc)/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($left($1,1) == `) && ($mid($1,2,1) !isnum) halt var %x $chr(40) $+ $replace($iif($left($1,1) == `,$remove($1-,`),$2-),k,* 1000,m,* 1000000,b,* 1000000000,/,$+($chr(41),/,$chr(40))) $+ $chr(41) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** [ $+ $c1($nick,Calc) $+ ]: $c1($nick,$iif($left($1,1) == `,$remove($1-,`),$2-)) $c2($nick,=) $c1($nick,$bytes($calc($eval(%x,1)),db)) } on $*:TEXT:/^[!@]clan/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($2- == $null) && ($readini(botinfo.ini,n,defname,$address($nick,3)) == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,You must specify a player or default name.) halt } var %x 1 while ($sock(clan. $+ %x)) { inc %x } if ($chr(38) isin $2) || ($2 == $null) { if ($readini(botinfo.ini,n,defname,$address($remove($iif($2,$2,$nick),&),3))) { var %name $v1 } else { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** [ $+ $c1($nick,Error) $+ ]: $c2($nick,The name) $qt($c1($nick,$remove($2,&))) $c2($nick,does not have a defname set OR is not on the channel.) halt } } else { var %name $replace($2-,$chr(32),$chr(95),$chr(45),$chr(95)) } sockopen $+(clan.,%x) runehead.com 80 sockmark $+(clan.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ %name $+ ~ $+ $nick } on *:SOCKOPEN:clan.*: { sockwrite -nt $sockname GET /clans/search.php?search= $+ $gettok($sock($sockname).mark,2,126) $+ &mltype=0&id=exact HTTP/1.1 sockwrite -nt $sockname Host: runehead.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:clan.*: { var %read sockread %read if (*no results* iswm %read) { $gettok($sock($sockname).mark,1,126) *** $chr(91) $+ $c1($gettok($sock($sockname).mark,3,126),Clan) $+ $chr(93) $+ : $c1($gettok($sock($sockname).mark,3,126),$gettok($sock($sockname).mark,2,126)) $c2($gettok($sock($sockname).mark,3,126),was not found in the RSHSC.) sockclose $sockname } if (** iswm %read) { sockread %read sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,3,62),* iswm %read) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Clan),$chr(93),:) $c1($gettok($sock($sockname).mark,3,126),$gettok($sock($sockname).mark,2,126)) $c2($gettok($sock($sockname).mark,3,126),is in $+(clan,$chr(40),s,$chr(41))) $+ : $replace($gettok($sock($sockname).mark,4-,126),~,$+($chr(32),$chr(124),$chr(32))) sockclose $sockname } } on $*:TEXT:/^[!@]price/Si:#: { if ($chan == #godbot) && ($me != Godbot) { halt } if ($2- == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Price),$chr(93),:) $c2($nick,You must specify an item to lookup.) halt } var %x 1 while ($sock(price. $+ %x)) { inc %x } sockopen $+(price.,%x) zybez.net 80 sockmark $+(price.,%x) 0 $+ ~ $+ $iif($left($1,1) == @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick)nick) $+ ~ $+ $replace($2-,$chr(32),$chr(43)) $+ ~ $+ $nick } on *:SOCKOPEN:price.*: { sockwrite -nt $sockname GET /priceguide.php?search_terms= $+ $gettok($sock($sockname).mark,3,126) $+ &search_area=1&price_low=&price_high=&member=1 HTTP/1.1 sockwrite -nt $sockname Host: www.zybez.net sockwrite -nt $sockname $crlf } on *:SOCKREAD:price.*: { var %read,%price,%name var %price sockread %read if (*>= %attstr,$v2,N/A) $iif($calc(198 - $calc($4 + $5)) >= %defhit,$v2,N/A) $iif($calc(99 - $7) >= %pray,$v2,N/A) $iif($calc(99 - $9) >= %summon,$v2,N/A) } alias chancheck { var %x 1 while (%x <= $chan(0)) { if ($nick($chan(%x),0) <= 2) { part $chan(%x) You need at least two other people to keep me. } inc %x } var %x 1 while (%x <= $chan(0)) { var %y 1,%unidle 0 while (%y <= $nick($chan(%x),0)) { if ($nick($chan(%x),%y).color == 1) { inc %unidle } inc %y } if (%unidle < 1) { if (!$istok($readini(botinfo.ini,n,IgnoreChannel,Idle),$chan(%x),32)) { part $chan(%x) This channel has been detected for having people that are idle. } } inc %x } } alias -l FNL2 return $bytes($ceil($calc($1 / $2)),db) alias -l c1 return $+($chr(3),$iif($readini(botinfo.ini,n,defcolor,$address($1,3)),$v1,07),$2-,$chr(3)) alias -l c2 { if ($readini(botinfo.ini,n,defcolor2,$address($1,3))) { return $+($chr(3),$v1,$2-,$chr(3)) } else { return $2- } } alias -l htmlfree { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ) return %x } on $*:TEXT:/^[!@]google/Si:#:{ if ($chan == #godbot) && ($me != Godbot) { halt } sockopen google www.google.com 80 set %sockchan $chan set %nick $nick set %prefix $iif(@* iswm $1,msg %sockchan,notice %nick) set %erm $replace($2-,$chr(32),+) } on *:SOCKOPEN:google: { sockwrite -nt $sockname GET /search?hl=en&q= $+ %erm $+ &btnI=I%27m+Feeling+Lucky HTTP/1.1 sockwrite -nt $sockname Host: www.google.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:google: { if ($sockerr) { halt } else { var %read sockread %read if (Location: isin %read) { %prefix $chr(3) $+ 07[ $+ $chr(3) $+ 14 $+ Top google result for: $+ $chr(3) $+ 07 $regsubex($replace(%erm,+,$chr(32)),/\b(\w)/g,$upper($chr(3) $+ 07\1))) $+ $chr(3) $+ 07]: %prefix $chr(3) $+ 14 $+ $remove(%read,Location: $+ $chr(32)) sockclose $sockname } elseif (did not match any documents isin %read) { %prefix $chr(3) $+ 07[ $+ $chr(3) $+ 14 $+ Error with search: $+ $chr(3) $+ 07 $regsubex($replace(%erm,+,$chr(32)),/\b(\w)/g,$upper($chr(3) $+ 07\1))) $+ $chr(3) $+ 07]: %prefix $chr(3) $+ 14 $+ Your search did not bring back any results. sockclose $sockname } } }