;OmegaScript v2.89 ;Written by Adam- on *:CONNECT: { mode $me +TBpR ;.timercc $+ $network 0 120 chancheck } on *:DISCONNECT: { timers off unsetall } on *:JOIN:#: { if ($readini(botinfo.ini,n,cmbonjoin,$chan) == true) { if ($readini(botinfo.ini,n,defname,$address($nick,3)) != $null) { var %name $v1 } else var %name $nick var %x 1 while ($sock(cmb. $+ %x)) inc %x sockopen $+(cmb.,%x) hiscore.runescape.com 80 sockmark $+(cmb.,%x) -1 $+ ~ $+ msg $chan $+ ~ $+ $nick $+ ~ $+ %name var %x 1 while ($sock(clan. $+ %x)) inc %x sockopen $+(clan.,%x) runehead.com 80 sockmark $+(clan.,%x) msg $chan $+ ~ $+ %name $+ ~ $+ $nick } } off *: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) { ;msg #OmegaScript $+($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 $+ . Go to $+($chr(3),07,http://freewebs.com/omegascript/,$chr(3)) to view my commands. 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)) ignore -iu300 $iif($address($nick,2),$v1,$nick) } else { notice $nick You can not invite me because your channel is blacklisted, join #OmegaScript to get this appealed. ignore -iu300 $iif($address($nick,2),$v1,$nick) } } off *:PART:#: { if ($nick != $me) { if ($nick($chan,0) < 4) { part $chan You need at least two other people to keep me. } } if ($nick == $me) { ;msg #omegascript I have just parted $+($chr(3),07,$chan,$chr(3),.) } } on *:KICK:#: { if ($knick == $me) { 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 #omegascript I was just kicked from $+($chr(03),07,$chan,$chr(03)) by $+($chr(03),07,$nick,$chr(03),.) } } on *:TEXT:*:?: close -m on $*:TEXT:/^[!@]define/Si:#: halt on $*:TEXT:/^[!@](start|stop|check|end)/Si:#: { if ($regml(1) == start) { if ($skill2($2)) { if ($3 != $null) { if ($regex($3,/^(.+)&$/)) { if ($readini(botinfo.ini,n,defname,$address($regml(1),3))) { var %name $v1 } else { $mh($1,$chan,$nick) *** $+([,$c1($nick,Error),]:) $c2($nick,The name) $qt($c1($nick,$regml(1))) $c2($nick,does not have a defname set or is not in the channel.) halt } } else { var %name $replace($3-,$chr(32),_) } } else { if ($readini(botinfo.ini,n,defname,$address($nick,3))) { var %name $v1 } else { $mh($1,$chan,$nick) *** $+([,$c1($nick,Error),]:) $c2($nick,You must specify a user or set a default name.) halt } } var %x 1 while ($sock(startstop. $+ %x)) inc %x sockopen $+(startstop.,%x) hiscore.runescape.com 80 sockmark $+(startstop.,%x) %name $+ ~ $+ $skill2($2) $+ ~ $+ $mh($1,$chan,$nick) $+ ~ $+ $nick } } else { if ($readini(startstop.ini,n,$address($nick,3),skill)) { var %skill $v1 } else { $mh($1,$chan,$nick) *** $+([,$c1($nick,Error),]:) $c2($nick,You must start something first.) halt } var %x 1 while ($sock(startstop. $+ %x)) inc %x sockopen $+(startstop.,%x) hiscore.runescape.com 80 sockmark $+(startstop.,%x) $readini(startstop.ini,n,$address($nick,3),name) $+ ~ $+ %skill $+ ~ $+ $mh($1,$chan,$nick) $+ ~ $+ $nick $+ ~ $+ $iif($regml(1) == check,check,end) } } on *:SOCKOPEN:startstop.*: { tokenize 126 $sock($sockname).mark sockwrite -n $sockname GET /index_lite.ws?player= $+ $1 HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:startstop.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if (*404*page*not* iswm %read) { $3 *** $+([,$c1($4,START),]:) $c2($4,The name) $qt($c1($4,$1))) $c2($4,isn't in the RSHS.) sockclose $sockname halt } if (*,*,* iswm %read) { var %x 0 while ($2 != $skill(%x)) { sockread %read inc %x } if (-1 isin %read) { $3 *** $+([,$c1($4,Error),]:) $c2($4,The name) $qt($c1($4,$1)) $c2($4,isn't ranked in) $c1($4,$2) $c2($4,in the RSHS.) sockclose $sockname halt } if ($5 == $null) { writeini startstop.ini $address($4,3) startxp $gettok(%read,3,44) writeini startstop.ini $address($4,3) starttime $ctime writeini startstop.ini $address($4,3) skill $2 writeini startstop.ini $address($4,3) name $1 $3 *** $+([,$c1($4,START),]:) $+([,$c1($4,$1),]:) $c2($4,Your starting experience of) $c1($4,$bytes($gettok(%read,3,44),db)) $c2($4,in) $c1($4,$2) $C2($4,has been recorded.) } else { var %startxp $readini(startstop.ini,n,$address($4,3),startxp) var %starttime $readini(startstop.ini,n,$address($4,3),starttime) var %skill $readini(startstop.ini,n,$address($4,3),skill) var %name $readini(startstop.ini,n,$address($4,3),name) var %gainedxp $calc($gettok(%read,3,44) - %startxp) var %totaltime $calc($ctime - %starttime) var %xpforlevel $gettok(%read,2,44) inc %xpforlevel var %xpforlevel $xpforlevel(%xpforlevel) var %xpforlevel $calc(%xpforlevel - $gettok(%read,3,44)) $3 *** $+([,$c1($4,$upper($5)),]:) $c2($4,You've gained) $c1($4,$bytes(%gainedxp,db) %skill) $c2($4,experience in) $c1($4,$duration(%totaltime)) $+ $c2($4,. That's) $c1($4,$bytes($round($calc(%gainedxp / %totaltime * 3600),0),db)) $c2($4,experience per hour. Estimated time to level up) $+ : $c1($4,$h2d($calc(%xpforlevel / $round($calc(%gainedxp / %totaltime * 3600),0)))) if ($5 == end) { remini startstop.ini $address($4,3) } } sockclose $sockname halt } } on $*:TEXT:/^[!@]track(er)?/Si:#: { if ($2 == $null) { if ($readini(botinfo.ini,n,defname,$address($nick,3)) != $null) { var %name $v1 } else { $mh($1,$chan,$nick) *** $+([,$c1($nick,Error),]:) $c2($nick,You must specify a user or set a default name.) halt } } else { if ($skill2($2) != $null) { var %skill $skill3($skill2($2)) var %x 3 if ($regex($3,/(.+)\&$/)) { if ($readini(botinfo.ini,n,defname,$address($regml(1),3))) { var %name $v1 } else { $mh($1,$chan,$nick) *** $+([,$c1($nick,Error),]:) $c2($nick,The name) $qt($c1($nick,$regml(1))) $c2($nick,does not have a defname set or isnt in the channel.) halt } } else { while ($ [ $+ [ %x ] ] != $null) && (@* !iswm $ [ $+ [ %x ] ]) { var %name %name $+ $iif(%name,_) $+ $ [ $+ [ %x ] ] inc %x } } if ($regex($ [ $+ [ %x ] ],/^@[1-9](day|week|month)(?:s)?$/)) { var %time $calc($replace($ [ $+ [ %x ] ],day,*86400,week,*604800,month,*2592000,@,,s,)) } } else { var %x 2 if ($regex($2,/.+\&$/)) { if ($readini(botinfo.ini,n,defname,$address($remove($2,&),3))) { var %name $v1 } else { $mh($1,$chan,$nick) *** $+([,$c1($nick,Error),]:) $c2($nick,The name) $qt($c1($nick,$remove($2,&))) $c2($nick,does not have a defname set or isnt in the channel.) halt } } else { while ($ [ $+ [ %x ] ] != $null) && (@* !iswm $ [ $+ [ %x ] ]) { var %name %name $+ $iif(%name,_) $+ $ [ $+ [ %x ] ] inc %x } } if ($regex($ [ $+ [ %x ] ],/^@[1-9](day|week|month)(?:s)?$/)) { var %time $calc($replace($ [ $+ [ %x ] ],day,*86400,week,*604800,month,*2592000,@,,s,)) } } } if (%time == $null) var %time 0 if (%skill == $null) var %skill all if (%name == $null) { if ($readini(botinfo.ini,n,defname,$address($nick,3)) != $null) { var %name $v1 } else { $mh($1,$chan,$nick) *** $+([,$c1($nick,Error),]:) $c2($nick,You must specify a user or set a default name.) halt } } var %x 1 if (%skill == all) { if (%time == 0) var %time 604800 while ($sock(trackerall. $+ %x)) inc %x sockopen $+(trackerall.,%x) rscript.org 80 sockmark $+(trackerall.,%x) $mh($1,$chan,$nick) $+ ~ $+ $nick $+ ~ $+ %time $+ ~ $+ %name $+ ~ $+ %skill } else { while ($sock(trackerskill. $+ %x)) inc %x sockopen $+(trackerskill.,%x) rscript.org 80 sockmark $+(trackerskill.,%x) $mh($1,$chan,$nick) $+ ~ $+ $nick $+ ~ $+ %time $+ ~ $+ %name $+ ~ $+ %skill } } on *:SOCKOPEN:trackerall.*: { tokenize 126 $sock($sockname).mark sockwrite -nt $sockname GET /lookup.php?type=track&time= $+ $3 $+ &user= $+ $4 $+ &skill= $+ $5 HTTP/1.1 sockwrite -nt $sockname Host: rscript.org sockwrite -nt $sockname $crlf } on *:SOCKREAD:trackerall.*: { tokenize 126 $sock($sockname).mark var %read sockread %read while (start: isin %read) && (started !isin %read) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $gettok(%read,3,58) sockread %read var %donewithstart 1 } while ($numtok($sock($sockname).mark,126) < 31) && (%donewithstart == 1) { sockmark $sockname $sock($sockname).mark $+ ~0 } if (%read == 0:-1) || (ERROR: isin %read) { $1 *** $+([,$c1($2,TRACKER),]): $c2($2,The name) $qt($c1($2,$4)) $c2($2,is not ranked in the RSHS.) sockclose $sockname halt } sockread %read while (gain isin %read) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $gettok(%read,2,58) $gettok(%read,4,58) sockread %read var %donewithgain 1 } while ($numtok($sock($sockname).mark,126) < 57) && (%donewithgain == 1) { sockmark $sockname $sock($sockname).mark $+ ~null 0 } tokenize 126 $sock($sockname).mark if ($0 == 57) { var %x 32,%olvl 0 while ($ [ $+ [ %x ] ] != $null) { if ($gettok($ [ $+ [ %x ] ],2,32) != 0) { if ($lfe($calc($gettok($sock($sockname).mark,$calc(%x - 26),126) - $gettok($ [ $+ [ %x ] ],2,32))) != $lfe($gettok($sock($sockname).mark,$calc(%x - 26),126))) { var %a $v1 $+ -> $+ $v2 inc %olvl $calc($v2 - $v1) } else { if ($skill($calc(%x - 32)) != Overall) { var %a $lfe($gettok($sock($sockname).mark,$calc(%x - 26),126)) } else { var %a $+(%,olvl) } } var %message = %message $c1($2,$gettok($ [ $+ [ %x ] ],1,32)) $+ $c2($2,$+($chr(40),%a,$chr(41))) $c1($2,+ $+ $bytes($gettok($ [ $+ [ %x ] ],2,32),db)) $chr(124) } inc %x } var %message = $replace(%message,$+(%,olvl),+ $+ %olvl) if (%message != $null) { $1 *** $+([,$c1($2,TRACKER),]:) $+([,$c1($2,ALL),]) $c2($2,experience gains for) $c1($2,$4) $c2($2,in the last) $c1($2,$duration($3)) $+ : $gettok(%message,1-10,124) if ($gettok(%message,11-22,124)) { $1 *** $+([,$c1($2,TRACKER),]:) $gettok(%message,11-22,124) if ($gettok(%message,23-,124)) { $1 *** $+([,$c1($2,TRACKER),]:) $gettok(%message,23-,124) } } } else { $1 *** $+([,$c1($2,TRACKER),]:) $c2($3,The name) $qt($c1($3,$4)) $c2($3,has not gained any experience over the last) $c1($3,$duration($3)) $+ $c2($3,.) } sockclose $sockname halt } } on $*:SOCKOPEN:/^trackerskill(.+)?\.(?:.+)$/: { tokenize 126 $sock($sockname).mark if ($regml(1) == $null) var %time 86400 elseif ($regml(1) == 2) var %time 604800 elseif ($regml(1) == 3) var %time 2592000 elseif ($regml(1) == 4) var %time $3 sockwrite -nt $sockname GET /lookup.php?type=track&time= $+ %time $+ &user= $+ $4 $+ &skill= $+ $5 HTTP/1.1 sockwrite -nt $sockname Host: rscript.org sockwrite -nt $sockname $crlf } on *:SOCKREAD:trackerskill.*: { var %read sockread %read if (started isin %read) { sockread %read var %x 1 while ($sock(trackerskill2. $+ %x)) inc %x sockopen $+(trackerskill2.,%x) rscript.org 80 sockmark $+(trackerskill2.,%x) $sock($sockname).mark $+ ~ $+ $gettok(%read,2,58) sockclose $sockname } } on *:SOCKREAD:trackerskill2.*: { var %read sockread %read if (started isin %read) { sockread %read var %x 1 while ($sock(trackerskill3. $+ %x)) inc %x sockopen $+(trackerskill3.,%x) rscript.org 80 sockmark $+(trackerskill3.,%x) $sock($sockname).mark $+ ~ $+ $gettok(%read,2,58) sockclose $sockname } } on *:SOCKREAD:trackerskill3.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if (started isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $gettok(%read,2,58) tokenize 126 $sock($sockname).mark if ($3 == 0) { $1 *** $+([,$c1($2,TRACKER),]:) $+([,$c1($2,$skill($5)),]:) $c2($2,Experience gains for) $c1($2,$4) $c2($2,in the last) $+ : $c2($2,1 day) $+ : $c1($2,$bytes($6,db)) $chr(124) $c2($2,1 week) $+ : $c1($2,$bytes($7,db)) $chr(124) $c2($2,1 month) $+ : $c1($2,$bytes($8,db)) sockclose $sockname } else { var %x 1 while ($sock(trackerskill4. $+ %x)) inc %x sockopen $+(trackerskill4.,%x) rscript.org 80 sockmark $+(trackerskill4.,%x) $sock($sockname).mark sockclose $sockname } } } on *:SOCKREAD:trackerskill4.*: { var %read sockread %read if (started isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $gettok(%read,2,58) tokenize 126 $sock($sockname).mark $1 *** $+([,$c1($2,TRACKER),]:) $+([,$c1($2,$skill($5)),]:) $c2($2,Experience gains for) $c1($2,$4) $c2($2,in the last) $+ : $c2($2,1 day) $+ : $c1($2,$bytes($6,db)) $chr(124) $c2($2,1 week) $+ : $c1($2,$bytes($7,db)) $chr(124) $c2($2,1 month) $+ : $c1($2,$bytes($8,db)) $chr(124) $c2($2,$duration($3)) $+ : $c1($2,$bytes($9,db)) } } on *:TEXT:!set *:#: { if ($nick isop $chan) { if ($2 == cmbonjoin) { var %status $iif($readini(botinfo.ini,n,cmbonjoin,$chan),true,false) if ($3 == on) { if (%status == false) { writeini botinfo.ini cmbonjoin $chan true msg $chan *** $+([,$c1($nick,SET),]:) $c2($nick,CMB on join is now) $c1($nick,on) $c2($nick,for) $c1($nick,$chan) $+ $C2($nick,.) } else { msg $chan *** $+([,$c1($nick,SET),]:) $c2($nick,CMB on join was already on for) $c1($nick,$chan) $+ $c2($nick,.) } } elseif ($3 == off) { if (%status == true) { remini botinfo.ini cmbonjoin $chan msg $chan *** $+([,$c1($nick,SET),]:) $c2($nick,CMB on join is now) $c1($nick,off) $c2($nick,for) $c1($nick,$chan) $+ $c2($nick,.) } else { msg $chan *** $+([,$c1($nick,SET),]:) $c2($nick,CMB on join was already off for) $c1($nick,$chan) $+ $c2($nick,.) } } else { notice $nick *** $+([,$c1($nick,SET),]:) $c2($nick,Either use on or off.) } } else { notice $nick *** $+([,$c1($nick,SET),]:) $c2($nick,Available options are) $+ : $c1($nick,cmbonjoin) } } } on $*:TEXT:/^[!@](npc|monster)/Si:#: { if ($2 == $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+([,$c1($nick,NPC),]:) $c2($nick,You must specify a monster to lookup.) halt } var %x 1 while ($sock(npc. $+ %x)) inc %x sockopen $+(npc.,%x) tip.it 80 sockmark $+(npc.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $nick $+ ~ $+ $replace($2-,$chr(32),+,-,+,_,+) } on *:SOCKOPEN:npc.*: { tokenize 126 $sock($sockname).mark sockwrite -nt $sockname GET /runescape/index.php?rs2monster=&orderby=&keywords= $+ $3 $+ &levels=All&race=0 sockwrite -nt $sockname Host: tip.it sockwrite -nt $sockname $crlf } on *:SOCKREAD:npc.*: { var %read sockread %read if ($regex(%read,//i)) { var %x 1 while ($sock(npc2. $+ %x)) inc %x sockopen $+(npc2.,%x) tip.it 80 sockmark $+(npc2.,%x) $sock($sockname).mark $+ ~ $+ $regml(1) sockclose $sockname } if (End of main table isin %read) { tokenize 126 $sock($sockname).mark $1 *** $+([,$c1($2,NPC),]:) $c2($2,NPC) $qt($c1($2,$3)) $c2($2,returned no results $+ $chr(44) if you can't figure out the name check Tip.It's Besitary for the corret name.) sockclose $sockname } } on *:SOCKOPEN:npc2.*: { tokenize 126 $sock($sockname).mark sockwrite -n $sockname GET /runescape/index.php?rs2monster_id= $+ $4 sockwrite -n $sockname Host: tip.it sockwrite -n $sockname $crlf } on *:SOCKREAD:npc2.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if ($regex(%read,/(.+):<\/b>/)) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($2,$regml(1)) $+ : $c1($2,$remove($gettok(%read,2,62),(.+)\?<\/b>  (.+)<\/td>/)) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($2,$regml(1)) $+ : $+($chr(3),$iif($regml(2) == Yes,09,04),$regml(2),$chr(3)) $chr(124) if ($regml(1) == Poisonous) { tokenize 126 $sock($sockname).mark $1 *** $+([,$c1($2,NPC),]:) $left($5-9,-1) $+([,$c1($2,tip.it),]) $1 *** $+([,$c1($2,NPC),]:) $left($10-,-1) } } } on $*:TEXT:/^[!@]ls$/Si:#: { var %x 1 while ($sock(ls. $+ %x)) inc %x sockopen $+(ls.,%x) runescape.com 80 sockmark $+(ls.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $nick $+ ~ $+ : $+ ~ $+ : } on *:SOCKOPEN:ls.*: { sockwrite -nt $sockname GET /slj.ws?plugin=0&hires.x=106&hires.y=78 HTTP/1.1 sockwrite -nt $sockname Host: runescape.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:ls.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if (LootShare isin %read) { if ($gettok(%read,2,44) == 0) { sockmark $sockname $gettok($sock($sockname).mark,1-3,126) $remove($gettok(%read,1,44),$+(e,$chr(40))) $+ ~ $+ $4 } else { sockmark $sockname $sock($sockname).mark $remove($gettok(%read,1,44),$+(e,$chr(40))) } } elseif ( isin %read) { $1 *** $+([,$c1($2,LOOTSHARE),]:) $c2($2,F2P) $+ : $+ $remove($c1($3,$sorttok($3,32,n)),:) $chr(124) $c2($2,P2P) $+ : $+ $remove($c1($3,$sorttok($4,32,n)),:) sockclose $sockname } } on $*:TEXT:/^[!@](pcw|setworld)\b/Si:#: { if ($regml(1) == pcw) { if ($readini(botinfo.ini,n,PCW,$chan $+ .world) == $null) { if ($nick isop $chan) || ($nick ishop $chan) $iif($left($1,1) == @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) == $false,msg $chan,notice $nick) *** $+([,$c1($nick,PCW),]:) $c2($nick,There is currently no PC world set for) $c1($nick,$chan) $+ $c2($nick,.) else notice $nick *** $+([,$c1($nick,PCW),]:) $c2($nick,There is currently no PC world set for) $c1($nick,$chan) $+ $c2($nick,.) } else { if ($nick isop $chan) || ($nick ishop $chan) $iif($left($1,1) == @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) == $false,msg $chan,notice $nick) *** $+([,$c1($nick,PCW),]:) $c2($nick,The current PC world for) $c1($nick,$chan) $c2($nick,is) $c1($nick,$readini(botinfo.ini,n,PCW,$chan $+ .world)) $+ $c2($nick,. It was set by) $c1($nick,$readini(botinfo.ini,n,PCW,$chan $+ .setby) $duration($calc($ctime - $readini(botinfo.ini,n,PCW,$chan $+ .wst)))) $c2($nick,ago.) else notice $nick *** $+([,$c1($nick,PCW),]:) $c2($nick,The current PC world for) $c1($nick,$chan) $c2($nick,is) $c1($nick,$readini(botinfo.ini,n,PCW,$chan $+ .world)) $+ $c2($nick,. It was set by) $c1($nick,$readini(botinfo.ini,n,PCW,$chan $+ .setby) $duration($calc($ctime - $readini(botinfo.ini,n,PCW,$chan $+ .wst)))) $c2($nick,ago.) } } else { if ($chr(36) isin $2-) halt if ($nick isop $chan) || ($nick ishop $chan) { if ($2 isnum) { writeini botinfo.ini pcw $chan $+ .world $2 writeini botinfo.ini pcw $chan $+ .setby $nick writeini botinfo.ini pcw $chan $+ .wst $ctime msg $chan ** $+([,$c1($nick,PCW),]:) $c2($nick,The PCW has been updated! Type) $c1($nick,!pcw) $c2($nick,to see it.) } elseif ($2 == $null) { remini botinfo.ini pcw $chan $+ .world remini botinfo.ini pcw $chan $+ .setby remini botinfo.ini pcw $chan $+ .wst notice $nick *** $+([,$c1($nick,PCW),]:) $c2($nick,The PCW has been unset.) } } } } on $*:TEXT:/^[!@]ge\b/Si:#: { var %x 1 while ($sock(ge. $+ %x)) inc %x sockopen $+(ge.,%x) itemdb-rs.runescape.com 80 sockmark $+(ge.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $2- $+ ~ $+ $nick } on *:SOCKOPEN:ge.*: { tokenize 126 $sock($sockname).mark sockwrite -nt $sockname GET /results.ws?query=%22 $+ $2 $+ $+(%,22) $+ &price=all&members= HTTP/1.1 sockwrite -nt $sockname Host: itemdb-rs.runescape.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:ge.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if (*items*matched*the*search*term* iswm %read) { if (*0 items matched the search term* iswm %read) { $1 *** $+([,$c1($3,GE),]:) $c2($3,There were no results found for) $qt($c1($3,$2)) $+ . sockclose $sockname } sockmark $sockname $sock($sockname).mark $+ ~ $+ $gettok(%read,2,32) } if ((create.gif isin %read) || (membership_benefits.gif isin %read)) && (!$9) { var %type $iif(Free game item !isin %read,[M]) sockread %read sockread %read sockread %read var %name $htmlfree(%read) sockread %read var %price $htmlfree(%read) sockread %read var %change $htmlfree(%read) sockmark $sockname $sock($sockname).mark $+ ~ $+ $iif(%type,$+([,$c1($3,M),])) $c1($3,%Name) $+ : $c1($3,%price) $+($chr(40),$c2($3,Today) $+ : $c1($3,$iif(%change == 0,No gain/loss,$v1)),$chr(41)) $chr(124) } if ( isin %read) $1 *** $+([,$c1($3,GE),]:) $c2($3,Results) $+ : $c1($3,$4) $chr(124) $left($5-,-1) } on $*:TEXT:/youtube\.com\//Si:#: { if ($istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32)) halt var %x 1 while ($gettok($1-,%x,32)) { if ($regex($v1,/(?:http:\/\/)?(?:www\.)?youtube\.com\//)) { var %link $gettok($1-,%x,32) } inc %x } %link = $remove(%link,http://,www.) var %y 1 while ($sock(youtube. $+ %y)) inc %y sockopen $+(youtube.,%y) www.youtube.com 80 sockmark $+(youtube.,%y) msg $chan $+ ~ $gettok(%link,2-,47) $+ ~ $+ $nick } on *:SOCKOPEN:youtube.*: { tokenize 126 $sock($sockname).mark sockwrite -n $sockname GET / $+ $remove($2,$chr(32)) HTTP/1.1 sockwrite -n $sockname Host: www.youtube.com sockwrite -n $sockname $crlf } on *:SOCKREAD:youtube.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if ( isin %read) sockmark $sockname $sock($sockname).mark $+ ~ $+ *** $+([,$c1($3,YOUTUBE),]:) $c2($3,Title) $+ : $c1($3,$htmlfree($remove(%read,$chr(9)))) if (Views: isin %read) { sockread %read $1 $4- $chr(124) $c2($3,Views) $+ : $c1($3,$htmlfree($remove(%read,$chr(9)))) sockclose $sockname } if (</html> isin %read) { $1 *** $+([,$c1($3,YOUTUBE),]:) $+ $c2($3,Thre was in error in finding the title of your video.) sockclose $sockname } } on $*:TEXT:/^[!@]fog\b/:#: { if (!$2) && ($readini(botinfo.ini,n,defname,$address($nick,3)) == $null) { $iif($left($1,1) == @,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,Y ou must specify a player or default name.) halt } var %x 1 while ($sock(fog. $+ %x)) inc %x sockopen $+(fog.,%x) hiscore.runescape.com 80 sockmark $+(fog.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $nick $+ ~ $+ $iif($2,$replace($2-,$chr(32),_,-,_),$readini(botinfo.ini,n,defname,$address($nick,3))) } on *:SOCKOPEN:fog.*: { tokenize 126 $sock($sockname).mark sockwrite -n $sockname GET /index_lite.ws?player= $+ $3 HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:fog.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if (404 - page not isin %read) { $1 *** $+([,$c1($2,Error),]:) $c1($2,$3) $c2($2,was not found in the RSHS.) sockclose $sockname halt } if (*,*,* iswm %read) sockmark $sockname $sock($sockname).mark $+ ~ $+ 1 elseif (*,* iswm %read) && (*,*,* !iswm %read) && ($4) { sockread %read sockread %read sockread %read if ($gettok(%read,2,44) != -1) { $1 $+([,$c1($2,$3),]:) $+([,$c1($2,FoG),]:) $c2($2,Rank) $+ : $c1($2,$bytes($gettok(%read,1,44),db)) $chr(124) $c2($2,Score) $+ : $c1($2,$bytes($gettok(%read,2,44),db)) } else { $1 $+([,$c1($2,$3),]:) $+([,$c1($2,FoG),]:) $c2($2,The name) $qt($c1($2,$3)) $c2($2,was not found on the RSHS.) } sockclose $sockname } } on $*:TEXT:/^[!@]rank (duel|bh|bhr|fog)/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 (bhr isin $2) var %type 2 elseif (bh isin $2) var %type 1 elseif (fog isin $2) var %type 3 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),</font) isnum) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $v1 } else { sockmark $sockname $sock($sockname).mark $+ ~ $+ $remove($gettok(%read,3,62),</span) } } if (</html> isin %read) { if ($5) { $1 *** $+($chr(91),$c1($3,$iif($4 == 0,Dueling,$iif($4 == 1,Bounty Hunters,$iif($4 == 2,Bouty Hunter Rogues,Fist of Guthix)))),$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,$iif($4 == 2,Bouty Hunter Rogues,Fist of Guthix)))),$chr(93),:) $c2($3,Rank) $c1($3,$2) $c2($3,not found.) } sockclose $sockname } } on $*:TEXT:/^[!@](rsnews|news)/Si:#: { 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 (<span class="newsdate"> 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),</dt)))) on $qt($c1(%name,$remove($gettok(%read,3,62),</span)))) $+ . sockclose $sockname } } on ^*:TEXT:*:*: { if (%Spam. [ $+ [ $nick ] ] == $null) { set -u4 $+(%,Spam.,$nick) 1 } else { inc %Spam. [ $+ [ $nick ] ] if (%Spam. [ $+ [ $nick ] ] >= 5) { notice $nick Your spamming me, you will now be ignored for 5 minutes! ignore -u300 $address($nick,2) } } } on *:QUIT: { if ($network isin $1-) && (*.*.* iswm $2) && (Quit !isin $1-) && (Killed !isin $1-) { if (%netsplit == $null) { set -u15 %netsplit yes amsg *** $+($chr(91),$chr(3),07,NetSplit,$chr(3),$chr(93),:) There has been a netsplit detected between $+($chr(3),07,$1,$chr(3)) and $+($chr(3),07,$2,$chr(3)) $+ . } } } on *:TEXT:!public*:#: { if ($nick isop $chan) { if ($2 == off) { if (!$istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32)) { writeini botinfo.ini IgnoreChannel Channels $readini(botinfo.ini,n,IgnoreChannel,Channels) $chan msg $chan $c2($nick,Public commands for) $c1($nick,$chan) $c2($nick,are now) $c1($nick,off) $+ $c2($nick,.) } else { msg $chan $c2($nick,Public commands for) $c1($nick,$chan) $c2($nick,were already off.) } } elseif ($2 == on) { if ($istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32)) { if ($readini(botinfo.ini,n,IgnoreChannel,Channels) == $chan) { remini botinfo.ini IgnoreChannel } else { writeini botinfo.ini IgnoreChannel Channels $remtok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,1,32) } msg $chan $c2($nick,Public commands for) $c1($nick,$chan) $c2($nick,are now) $c1($nick,on) $+ $c2($nick,.) } else { msg $chan $c2($nick,Public commands for) $c1($nick,$chan) $c2($nick,were already on.) } } else { notice $nick $c2($nick,Syntax is:) $c1($nick,!public [on/off]) $+ $c2($nick,.) } } } on *:TEXT:!part*:#: { if ($nick isop $chan) { if ($2 == $me) { ignore -iu300 $iif($address($nick,2),$v1,$nick) part $chan Part command used by $nick } else { notice $nick Did you want to part me? If so, type $+($chr(3),07,!part $me,$chr(3)) } } } on *:TEXT:!commands:#: notice $nick $c2($nick,To see my commands go to) $c1($nick,http://freewebs.com/omegascript/) on *:TEXT:!admin*:#: { var %x 1 while ($ini(botinfo.ini,admin,%x)) { if ($ini(botinfo.ini,admin,%x) iswm $address($nick,5)) { var %lol yes } inc %x } if (%lol == yes) { if ($nick != Adam-) && ($nick != Adam) { notice #omegascript $nick just used admin command $+($chr(3),07,$2-,$chr(3),.) } if ($2- == chans) { var %x 1,%y 0 while (%x <= $chan(0)) { var %chans %chans $iif($me isop $chan(%x),$+($chr(3),04,@,$chr(3)),$iif($me ishop $chan(%x),$+($chr(3),07,%,$chr(3)),$iif($me isvoice $chan(%x),$+($chr(3),12,+,$chr(3))))) $+ $+($chr(3),07,$chan(%x)) $+($chr(3),$chr(91),$chr(3),07,$nick($chan(%x),0),$chr(3),$chr(93),$chr(3),07) inc %y $nick($chan(%x),0) inc %x } msg $chan I am currently serving $+($chr(3),07,%y,$chr(3)) people on $+($chr(3),07,$chan(0),$chr(3)) channels: $+($chr(3),07,%chans,$chr(3),.) } if ($2 == addadmin) && (($nick == Adam-) || ($nick == Adam)) { writeini botinfo.ini admin $iif($4 != $null,$4,$address($3,2)) $3 msg $chan Name $+($chr(3),07,$3,$chr(3)) added to admin list with the host $+($chr(3),07,$iif($4,$4,$address($3,2)),$chr(3),.) } if ($2 == deladmin) && (($nick == Adam-) || ($nick == Adam)) { var %x 1 while ($ini(botinfo.ini,admin,%x)) { if ($ini(botinfo.ini,admin,%x) iswm $address($3,5)) { remini botinfo.ini admin $ini(botinfo.ini,admin,%x) } inc %x } msg $chan Name $+($chr(3),07,$3,$chr(3)) deleted from admin list. } if ($2 == join) { if ($3 == $null) halt join $3 } if ($2 == part) && ($me ison $3) { if ($3 == $null) halt part $3 } if ($2 == blacklist) { if ($3 == $null) halt writeini botinfo.ini kicks $3 5 msg $chan Added $+($chr(3),07,$3,$chr(3)) to channel blacklist. if ($me ison $3) { part $3 Blacklisted. } } if ($2 == unblacklist) { if ($3 == $null) halt if ($readini(botinfo.ini,n,kicks,$3) == 5) { remini botinfo.ini kicks $3 msg $chan Removed $+($chr(3),07,$3,$chr(3)) from channel blacklist. } else { msg $chan Channel $+($chr(3),07,$3,$chr(3)) was not blacklisted. } } if ($2 == addpublicignore) { if ($3 == $null) halt if (!$istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$3,32)) { writeini botinfo.ini IgnoreChannel Channels $readini(botinfo.ini,n,IgnoreChannel,Channels) $3 msg $chan Channel $+($chr(3),07,$3,$chr(3)) is now ignored from public commands. } else { msg $chan Channel $+($chr(3),07,$3,$chr(3)) was already on ignore. } } if ($2 == delpublicignore) { if ($3 == $null) halt if ($3 == all) { remini botinfo.ini IgnoreChannel Channels msg $chan All channels were removed from ignore. halt } if ($istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$3,32)) { if ($readini(botinfo.ini,n,IgnoreChannel,Channels) == $3) { remini botinfo.ini IgnoreChannel Channels } else { writeini botinfo.ini IgnoreChannel Channels $remtok($readini(botinfo.ini,n,IgnoreChannel,Channels),$3,1,32) } msg $chan Channel $+($chr(3),07,$3,$chr(3)) is now unignored from public commands. } else { msg $chan Channel $+($chr(3),07,$3,$chr(3)) was not on ignore. } } if ($2 == addidleexcept) { if ($3 == $null) halt if (!$istok($readini(botinfo.ini,n,IgnoreChannel,Idle),$3,32)) { writeini botinfo.ini IgnoreChannel Idle $readini(botinfo.ini,n,IgnoreChannel,Idle) $3 msg $chan Channel $+($chr(3),07,$3,$chr(3)) is now exempt from idle checking. } else { msg $chan Channel $+($chr(3),07,$3,$chr(3)) was already exempt from idle checking. } } if ($2 == delidleexcept) { if ($3 == $null) halt if ($3 == all) { remini botinfo.ini IgnoreChannel Idle msg $chan All channels were removed from exempt. halt } if ($istok($readini(botinfo.ini,n,IgnoreChannel,Idle),$3,32)) { if ($readini(botinfo.ini,n,IgnoreChannel,Idle) == $3) { remini botinfo.ini IgnoreChannel Idle } else { writeini botinfo.ini IgnoreChannel Idle $remtok($readini(botinfo.ini,n,IgnoreChannel,Idle),$3,1,32) } msg $chan Channel $+($chr(3),07,$3,$chr(3)) is now unexempt from idle checking. } else { msg $chan Channel $+($chr(3),07,$3,$chr(3)) was not exempt from idle checking. } } if ($2 == Blacklists) { var %x 1 while (%x <= $ini(botinfo.ini,kicks,0)) { if ($readini(botinfo.ini,kicks,$ini(botinfo.ini,kicks,%x)) >= 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 ($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 associated with the address) $c1($nick,$address($nick,3)) $+ $c2($nick,.) } on *:TEXT:!mycolor*:#: { 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|istats)\b/Si:#: { 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 if ($regml(1) != istats) { 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 } else { while ($sock(istats. $+ %x)) inc %x sockopen $+(istats.,%x) tip.it 80 sockmark $+(istats.,%x) $iif($left($1,1) == @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) == $false,msg $chan,notice $nick) $+ ~ $+ $replace($2-,$chr(32),+)) $+ ~ $+ $nick } } on $*:SOCKOPEN:/^(alch|istats)\./: { 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|istats)\./: { 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(<td><a href="index.php?rs2item_id=,0) isin %read) { var %x 1 if ($regml(1) == alch) { while ($sock(alch2. $+ %x)) { inc %x } sockopen $+(alch2.,%x) tip.it 80 sockmark $+(alch2.,%x) $sock($sockname).mark $+ ~ $+ $remove($gettok(%read,2,34),index.php?rs2item_id=) } else { while ($sock(istats. $+ %x)) inc %x sockopen $+(istats2.,%x) tip.it 80 sockmark $+(istats2.,%x) $sock($sockname).mark $+ ~ $+ $remove($gettok(%read,2,34),index.php?rs2item_id=) } sockclose $sockname halt } } on $*:SOCKOPEN:/^(alch2|istats2)\./: { sockwrite -n $sockname GET /runescape/index.php?rs2item_id= $+ $gettok($sock($sockname).mark,4,126) HTTP/1.1 sockwrite -n $sockname Host: tip.it sockwrite -n $sockname $crlf } on *:SOCKREAD:istats2.*: { tokenize 126 $sock($sockname).mark var %read,%read2 sockread %read if ($regex(%read,/<td><b>(Stab|Slash|Crush|Magic|Range)<\/b><\/td>/Si)) { sockread %read sockread %read2 sockread %read2 sockmark $sockname $sock($sockname).mark $+ ~ $+ $c1($3,$regml(1) Attack/Defence) $+ : $c2($3,$remove($gettok(%read,2,62),</td) $remove($gettok(%read2,2,62),</td)) } elseif ($regex(%read,/<td><b>(Summoning|Strength|Prayer)<\/b><\/td>/Si)) { sockread %read if (%read != $null) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $c1($3,$regml(1)) $+ : $c2($3,$remove($gettok(%read,2,62),</td)) } } elseif (<td class="header" colspan="3"> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c1($3,$remove(%read,$chr(9),</td>)) } elseif (</html> isin %read) { $1 *** $+([,$c1($3,ITEM STATS),]:) $+([,$5,]:) $6- sockclose $sockname } } on *:SOCKREAD:alch2.*: { var %read sockread %read if (High Alchemy isin %read) { sockread %read sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),High Alchemy) $+ : $c1($gettok($sock($sockname).mark,3,126),$bytes($gettok(%read,1,32),db) $+ $gettok(%read,2-,32)) } elseif (Members? isin %read) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Members?) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,32),$chr(9),</td>)) } elseif (Quest? isin %read) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Quest?) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,32),$chr(9),</td>)) } elseif (Tradeable? isin %read) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Tradeable?) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,32),$chr(9),</td>)) } elseif (Stackable? isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Stackable?) $c1($gettok($sock($sockname).mark,3,126),$remove(%read,$chr(9),</td>,$chr(32))) } elseif (Examine: isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Examine) $+ : $c1($gettok($sock($sockname).mark,3,126),$remove(%read,$chr(9),</td>)) } elseif (Category isin %read) && (- !isin %read) { sockread %read sockread %read sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Category) $+ : $c1($gettok($sock($sockname).mark,3,126),$remove(%read,$chr(9),</td>)) } elseif (Gen. store buys isin %read) { sockread %read sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Low Alch/General Store Buys) $+ : $c1($gettok($sock($sockname).mark,3,126),$bytes($gettok(%read,1,32),db) $+ $gettok(%read,2-,32)) } elseif ($eval(<td class="header" width="139"> Location</td>,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),</td>)) } elseif ($eval(<td class="header" colspan="3">,0) isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),$remove(%read,$chr(9),</td>)),$chr(93),:) } elseif (</html> 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 (!$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 ($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:#: { 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 ($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 <skill> <position>) 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 <skill> <position>) 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),</span,</font) } if (*AA0022* iswm %read) && (*hiscorepersonal.ws* iswm %read) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $remove($gettok(%read,3,62),</span) } if (*</html>* 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 ($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) { 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 (% [ $+ [ $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 ($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 <skill> <user1> [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) { 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 ($regex($2-,/[a-z]/i)) halt if ($left($1,1) == `) && ($mid($1,2,1) !isnum) halt tokenize 32 $remove($1-,$chr(44)) 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 ($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 (*<tr class='hovertr'>* iswm %read) { sockread %read sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,3,62),</a)) $c2($gettok($sock($sockname).mark,3,126),$+($chr(40),URL:)) $c1($gettok($sock($sockname).mark,3,126),http://runehead.com/clans/ $+ $gettok(%read,4,39)) $+ $chr(41) } if (*</table>* 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 ($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 var %x 1 while ($sock(ge. $+ %x)) inc %x sockopen $+(ge.,%x) itemdb-rs.runescape.com 80 sockmark $+(ge.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $2- $+ ~ $+ $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 (*><a href="/items.php* iswm %read) { sockread %name sockread %price sockread %price sockread %price var %x $gettok($sock($sockname).mark,1,126) inc %x if ($numtok($sock($sockname).mark,124) < 6) { sockmark $sockname %x $+ ~ $+ $gettok($sock($sockname).mark,2-,126) $+ ~ $+ $c2($gettok($sock($sockname).mark,4,126),$remove($gettok(%name,2,62),</td)) $+ : $c1($gettok($sock($sockname).mark,4,126),$remove($gettok(%price,2,62),</td)) $chr(124) } } if (*</table></form><br* iswm %read) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),Price),$chr(93),:) $left($replace($gettok($gettok($sock($sockname).mark,5-,126),1-6,126),~,$chr(32)),-2))) $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),zybez.net),$chr(93)) sockclose $sockname } if (*your search did not* iswm %read) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),Price),$chr(93),:) $c2($gettok($sock($sockname).mark,4,126),No results for) $qt($c1($gettok($sock($sockname).mark,4,126),$replace($gettok($sock($sockname).mark,3,126),$chr(43),$chr(32)))) $+ $c2($gettok($sock($sockname).mark,4,126),.) $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),zybez.net),$chr(93)) sockclose $sockname } } on $*:TEXT:/^[!@]cmb%/Si:#: { 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) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You must specify a player or default name.) halt } if ($chr(38) isin $2) { if ($readini(botinfo.ini,n,defname,$address($left($2,-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($2,-1))) $c2($nick,does not have a defname set OR is not in the channel.) halt } } if ($2 == $null) { var %name $readini(botinfo.ini,n,defname,$address($nick,3)) } if (%name == $null) { var %name $replace($2-,$chr(32),$chr(95)) } var %x 1 while ($sock(cmbpercent. $+ %x)) { inc %x } sockopen $+(cmbpercent.,%x) hiscore.runescape.com 80 sockmark $+(cmbpercent.,%x) -1 $+ ~ $+ $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ %name $+ ~ $+ $nick $+ ~ $+ 0 $+ ~ $+ 0 } on *:SOCKOPEN:cmbpercent.*: { 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:cmbpercent.*: { 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),Error),$chr(93),:) $c2($gettok($sock($sockname).mark,4,126),The name) $qt($c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,3,126))) $c2($gettok($sock($sockname).mark,4,126),is not ranked in the hiscores.) sockclose $sockname halt } if (*,*,* iswm %read) { var %x $gettok($sock($sockname).mark,1,126) inc %x sockmark $sockname %x $+ ~ $+ $gettok($sock($sockname).mark,2-,126) if ($gettok($sock($sockname).mark,1,126) <= 7) && ($gettok($sock($sockname).mark,1,126) >= 1) { var %y $gettok($sock($sockname).mark,5,126) inc %y $gettok(%read,3,44) sockmark $sockname $gettok($sock($sockname).mark,1-4,126) $+ ~ $+ %y } if ($gettok($sock($sockname).mark,1,126) >= 8) && ($v1 <= 23) { var %z $gettok($sock($sockname).mark,6,126) inc %z $gettok(%read,3,44) sockmark $sockname $gettok($sock($sockname).mark,1-5,126) $+ ~ $+ %z } if ($gettok($sock($sockname).mark,1,126) == 24) { var %y $gettok($sock($sockname).mark,5,126) inc %y $gettok(%read,3,44) sockmark $sockname $gettok($sock($sockname).mark,1-4,126) $+ ~ $+ %y $+ ~ $+ $gettok($sock($sockname).mark,6-,126) $gettok($sock($sockname).mark,2,126) $+($chr(91),$c1($gettok($sock($sockname).mark,4,126),Combat Percent),$chr(93),:) $c1($gettok($sock($sockname).mark,4,126),$gettok($sock($sockname).mark,3,126)) $c2($gettok($sock($sockname).mark,4,126),is) $c1($gettok($sock($sockname).mark,4,126),$calc($calc($gettok($sock($sockname).mark,5,126) / $calc($gettok($sock($sockname).mark,5,126) + $gettok($sock($sockname).mark,6,126))) * 100) $+ %) $c2($gettok($sock($sockname).mark,4,126),combat based $+ $chr(44) with) $c1($gettok($sock($sockname).mark,4,126),$bytes($gettok($sock($sockname).mark,5,126),db)) $c2($gettok($sock($sockname).mark,4,126),combat based experience $+ $chr(44) and) $c1($gettok($sock($sockname).mark,4,126),$bytes($calc($gettok($sock($sockname).mark,5,126) + $gettok($sock($sockname).mark,6,126)),db)) $c2($gettok($sock($sockname).mark,4,126),total experience.) sockclose $sockname } } } on $*:TEXT:/^[!@]cmb-est/Si:#: { 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,CMB-EST),$chr(93),:) $c2($nick,You must specify an attack, strength, defence, hitpoints, ranged, prayer, magic, and summon level.) halt } if (!$9) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+($chr(91),$c1($nick,CMB-EST),$chr(93),:) $c2($nick,You must specify attack, strength, defence, hitpoints, range, prayer, magic, and summon level.) halt } if ($2 isnum 1-99) && ($3 isnum 1-99) && ($4 isnum 1-99) && ($5 isnum 1-99) && ($6 isnum 1-99) && ($7 isnum 1-99) && ($8 isnum 1-99) && ($9 isnum 1-99) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+($chr(91),$c1($nick,CMB-EST),$chr(93),:) $c2($nick,Level) $+ : $c1($nick,$gettok($cmblvl($2,$3,$4,$5,$6,$7,$8,$9),1,32)) $+($chr(91),$c1($nick,$gettok($cmblvl($2,$3,$4,$5,$6,$7,$8),2,32)),$chr(93)) $chr(124) $c2($nick,$+(ASD,$chr(2),H,$chr(2),RPMU)) $c1($nick,$2 $3 $4 $+($chr(2),$5,$chr(2)) $6 $7 $8 $9) if ($floor($gettok($cmblvl($2,$3,$4,$5,$6,$7,$8,$9),1,32)) != 138) { var %info $nextcmblvl(,$2,$3,$4,$5,$6,$7,$8,$9) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,CMB-EST),$chr(93),:) $c2($nick,Next level in) $+ : $c2($nick,Attack/Strength) $+ : $c1($nick,$gettok(%info,1,32)) $c2($nick,Defence/Hitpoints) $+ : $c1($nick,$gettok(%info,2,32)) $c2($nick,Prayer) $+ : $c1($nick,$gettok(%info,3,32)) $c2($nick,Summon) $+ : $c1($nick,$gettok(%info,4,32)) } } } on $*:TEXT:/^[!@](cmb|combat)/Si:#: { 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) *** $+($chr(91),$c1($nick,Combat),$chr(93),:) $c2($nick,Error, you must specify a player or have a default name.) halt } if ($2 == $null) { var %name $readini(botinfo.ini,n,defname,$address($nick,3)) } elseif ($chr(38) isin $2) { if ($readini(botinfo.ini,n,defname,$address($left($2,-1),3))) { var %name $readini(botinfo.ini,n,defname,$address($left($2,-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,Combat),$chr(93),:) $c2($nick,The name) $c1($nick,$left($2,-1)) $c2($nick,does not have a defname set OR is not in the channel.) halt } } else { var %name $replace($2-,$chr(32),$chr(95)) } var %x 1 while ($sock(cmb. $+ %x)) { inc %x } sockopen $+(cmb.,%x) hiscore.runescape.com 80 sockmark $+(cmb.,%x) -1 $+ ~ $+ $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $nick $+ ~ $+ %name } on *:SOCKOPEN:cmb.*: { sockwrite -n $sockname GET /index_lite.ws?player= $+ $gettok($sock($sockname).mark,4,126) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:cmb.*: { var %read var %att var %str var %def var %hp var %range var %prayer var %magic var %summon sockread %read if (*404 - page not* iswm %read) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Combat),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),Combat stats of) $qt($c1($gettok($sock($sockname).mark,3,126),$gettok($sock($sockname).mark,4,126))) $c2($gettok($sock($sockname).mark,3,126),not found.) sockclose $sockname halt } if (*,*,* iswm %read) { sockread %att sockread %def sockread %str sockread %hp sockread %range sockread %prayer sockread %magic var %1 1 while (%1 <= 17) { sockread %summon inc %1 } 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 %range $iif($gettok(%range,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 %summon $iif($gettok(%summon,2,44) == -1,1,$v1) var %info $cmblvl(%att,%str,%def,%hp,%range,%prayer,%magic,%summon) var %f2pcmb $f2pcmblvl(%att,%str,%def,%hp,%range,%prayer,%magic) var %info2 $nextcmblvl(,%att,%str,%def,%hp,%range,%prayer,%magic,%summon) $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Combat),$chr(93),:) $c1($gettok($sock($sockname).mark,3,126),$gettok($sock($sockname).mark,4,126)) $c2($gettok($sock($sockname).mark,3,126),is level) $c1($gettok($sock($sockname).mark,3,126),$gettok(%info,1,32)) $+($chr(40),$c1($gettok($sock($sockname).mark,3,126),F2P $gettok(%f2pcmb,1,32)),$chr(41)) $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),$gettok(%info,2,32)),$chr(93)) $chr(124) $c2($gettok($sock($sockname).mark,3,126),$+(ASD,$chr(2),H,$chr(2),RPMU)) $+ : $c1($gettok($sock($sockname).mark,3,126),%att %str %def $+($chr(2),%hp,$chr(2)) %range %prayer %magic %summon) if (%info2 != N/A N/A N/A N/A) { $gettok($sock($sockname).mark,2,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Combat),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),Next level in) $+ : $c2($gettok($sock($sockname).mark,3,126),Attack/Strength) $+ : $c1($gettok($sock($sockname).mark,3,126),$gettok(%info2,1,32)) $c2($gettok($sock($sockname).mark,3,126),Defence/Hitpoints) $+ : $c1($gettok($sock($sockname).mark,3,126),$gettok(%info2,2,32)) $c2($gettok($sock($sockname).mark,3,126),Prayer) $+ : $c1($gettok($sock($sockname).mark,3,126),$gettok(%info2,3,32)) $c2($gettok($sock($sockname).mark,3,126),Summon) $+ : $c1($gettok($sock($sockname).mark,3,126),$gettok(%info2,4,32)) } sockclose $sockname halt } } on $*:TEXT:/^[!@](players?|world)/Si:#: { if ($1- == !world) halt if ($2 != $null) && ($2 !isnum 1-144) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Players),$chr(93),:) $c2($nick,You must specify a number and it must be between 1 and 144.) halt } if ($2 == $null) { var %x 1 while ($sock(totalplayers. $+ %x)) { inc %x } sockopen $+(totalplayers.,%x) runescape.com 80 sockmark $+(totalplayers.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $nick halt } var %x 1 while ($sock(players. $+ %x)) { inc %x } sockopen $+(players.,%x) runescape.com 80 sockmark $+(players.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $2 $+ ~ $+ $nick } on *:SOCKOPEN:players.*: { sockwrite -nt $sockname GET /slj.ws?lores.x=0&plugin=0&order=WMLPA HTTP/1.1 sockwrite -nt $sockname Host: runescape.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:players.*: { var %read sockread %read if ($+(*e,$chr(40),$gettok($sock($sockname).mark,2,126),*) iswm %read) { if ($gettok(%read,2,34) != -) { var %activity $chr(124) $c2($gettok($sock($sockname).mark,3,126),Activity) $+ : $c1($gettok($sock($sockname).mark,3,126),$gettok(%read,2,34)) } $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Players),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),Server) $+ : $c1($gettok($sock($sockname).mark,3,126),$gettok($gettok(%read,2,40),1,44)) $chr(124) $c2($gettok($sock($sockname).mark,3,126),Players) $+ : $c1($gettok($sock($sockname).mark,3,126),$gettok(%read,7,44)) $chr(124) $c2($gettok($sock($sockname).mark,3,126),Type) $+ : $c1($gettok($sock($sockname).mark,3,126),$iif($gettok(%read,2,44) == 1,P2P,F2P)) %activity sockclose $sockname } } on *:SOCKOPEN:totalplayers.*: { sockwrite -n $sockname GET /title.ws HTTP/1.1 sockwrite -n $sockname Host: runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:totalplayers.*: { var %read sockread %read if (*There are currently*people playing* iswm %read) { $gettok($sock($sockname).mark,1,126) $+($chr(91),$c1($gettok($sock($sockname).mark,2,126),Players),$chr(93),:) $c2($gettok($sock($sockname).mark,2,126),There are currently) $c1($gettok($sock($sockname).mark,2,126),$bytes($gettok(%read,4,32),db)) $c2($gettok($sock($sockname).mark,2,126),people playing.) sockclose $sockname } } on $*:TEXT:/^[!@](nextlevel|nextlvl)/Si:#: { 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) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You must specify a player to lookup or set a default name.) halt } var %x 1 while ($sock(nextlevel. $+ %x)) { inc %x } if ($2 != $null) { if ($chr(38) !isin $2) { var %name $replace($2-,$chr(32),$chr(95)) } else { if ($readini(botinfo.ini,n,defname,$address($left($2,-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($2,-1))) $c2($nick,does not have a defname set OR is not in the channel.) halt } } } else { var %name $readini(botinfo.ini,n,defname,$address($nick,3)) } sockopen $+(nextlevel.,%x) hiscore.runescape.com 80 sockmark $+(nextlevel.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ %name $+ ~ $+ $nick } on *:SOCKOPEN:nextlevel.*: { 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:nextlevel.*: { var %overall,%attack,%strength,%defence,%ranged,%prayer,%magic,%runecraft,%construction,%hitpoints,%agility,%herblore,%thieving,%crafting,%fletching,%slayer,%hunter,%mining,%smithing,%fishing,%cooking,%firemaking,%woodcutting,%farming,%summoning sockread %overall if (*404 - page not* iswm %overall) { $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),The name) $qt($c1($gettok($sock($sockname).mark,3,126),$gettok($sock($sockname).mark,2,126))) $c2($gettok($sock($sockname).mark,3,126),is not in the hiscores.) sockclose $sockname halt } if (*,*,* iswm %overall) { if ($gettok(%overall,2,44) == 2376) { $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),The name) $qt($c1($gettok($sock($sockname).mark,3,126),$gettok($sock($sockname).mark,2,126))) $c2($gettok($sock($sockname).mark,3,126),can not raise any more levels!) sockclose $sockname halt } sockread %attack sockread %defence sockread %strength sockread %hitpoints sockread %ranged sockread %prayer sockread %magic sockread %cooking sockread %woodcutting sockread %fletching sockread %fishing sockread %firemaking sockread %crafting sockread %smithing sockread %mining sockread %herblore sockread %agility sockread %thieving sockread %slayer sockread %farming sockread %runecraft sockread %hunter sockread %construction sockread %summoning var %2attack $calc($xpforlevel($calc($gettok(%attack,2,44) + 1)) - $gettok(%attack,3,44)) var %2defence $calc($xpforlevel($calc($gettok(%defence,2,44) + 1)) - $gettok(%defence,3,44)) var %2strength $calc($xpforlevel($calc($gettok(%strength,2,44) + 1)) - $gettok(%strength,3,44)) var %2hitpoints $calc($xpforlevel($calc($gettok(%hitpoints,2,44) + 1)) - $gettok(%hitpoints,3,44)) var %2ranged $calc($xpforlevel($calc($gettok(%ranged,2,44) + 1)) - $gettok(%ranged,3,44)) var %2prayer $calc($xpforlevel($calc($gettok(%prayer,2,44) + 1)) - $gettok(%prayer,3,44)) var %2magic $calc($xpforlevel($calc($gettok(%magic,2,44) + 1)) - $gettok(%magic,3,44)) var %2cooking $calc($xpforlevel($calc($gettok(%cooking,2,44) + 1)) - $gettok(%cooking,3,44)) var %2woodcutting $calc($xpforlevel($calc($gettok(%woodcutting,2,44) + 1)) - $gettok(%woodcutting,3,44)) var %2fletching $calc($xpforlevel($calc($gettok(%fletching,2,44) + 1)) - $gettok(%fletching,3,44)) var %2fishing $calc($xpforlevel($calc($gettok(%fishing,2,44) + 1)) - $gettok(%fishing,3,44)) var %2firemaking $calc($xpforlevel($calc($gettok(%firemaking,2,44) + 1)) - $gettok(%firemaking,3,44)) var %2crafting $calc($xpforlevel($calc($gettok(%crafting,2,44) + 1)) - $gettok(%crafting,3,44)) var %2smithing $calc($xpforlevel($calc($gettok(%smithing,2,44) + 1)) - $gettok(%smithing,3,44)) var %2mining $calc($xpforlevel($calc($gettok(%mining,2,44) + 1)) - $gettok(%mining,3,44)) var %2herblore $calc($xpforlevel($calc($gettok(%herblore,2,44) + 1)) - $gettok(%herblore,3,44)) var %2agility $calc($xpforlevel($calc($gettok(%agility,2,44) + 1)) - $gettok(%agility,3,44)) var %2thieving $calc($xpforlevel($calc($gettok(%thieving,2,44) + 1)) - $gettok(%thieving,3,44)) var %2slayer $calc($xpforlevel($calc($gettok(%slayer,2,44) + 1)) - $gettok(%slayer,3,44)) var %2farming $calc($xpforlevel($calc($gettok(%farming,2,44) + 1)) - $gettok(%farming,3,44)) var %2runecraft $calc($xpforlevel($calc($gettok(%runecraft,2,44) + 1)) - $gettok(%runecrafting,3,44)) var %2hunter $calc($xpforlevel($calc($gettok(%hunter,2,44) + 1)) - $gettok(%hunter,3,44)) var %2construction $calc($xpforlevel($calc($gettok(%construction,2,44) + 1)) - $gettok(%construction,3,44)))) var %2summoning $calc($xpforlevel($calc($gettok(%summoning,2,44) + 1)) - $gettok(%summoning,3,44)))) var %x 1 while ($gettok(%2attack %2defence %2strength %2hitpoints %2ranged %2prayer %2magic %2cooking %2woodcutting %2fletching %2fishing %2firemaking %2crafting %2smithing %2mining %2herblore %2agility %2thieving %2slayer %2farming %2runecraft %2hunter %2construction %2summoning,%x,32)) { if (- !isin $v1) { var %y %y $v2 } inc %x } var %lowestxp $gettok($sorttok(%y,32,n),1,32) var %x 0 while ($calc($xpforlevel($calc($gettok(% [ $+ [ $skill(%x) ] ],2,44) + 1)) - $gettok(% [ $+ [ $skill(%x) ] ],3,44)) != %lowestxp) { inc %x } $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),Closest level up is) $c1($gettok($sock($sockname).mark,3,126),$skill(%x)) $c2($gettok($sock($sockname).mark,3,126),level) $c1($gettok($sock($sockname).mark,3,126),$calc($gettok(% [ $+ [ $skill(%x) ] ],2,44) + 1)) $c2($gettok($sock($sockname).mark,3,126),in) $c1($gettok($sock($sockname).mark,3,126),$bytes(%lowestxp,db)) $c2($gettok($sock($sockname).mark,3,126),experience.) notice $gettok($sock($sockname).mark,3,126) $FNL($skill(%x),%lowestxp,$gettok($sock($sockname).mark,3,126)) sockclose $sockname halt } } on $*:TEXT:/^[!@]qfc/Si:#: { 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 a quick find code.) halt } var %x 1 while ($sock(qfc. $+ %x)) { inc %x } sockopen $+(qfc.,%x) forum.runescape.com 80 sockmark $+(qfc.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $2 $+ ~ $+ $nick } on *:SOCKOPEN:qfc.*: { sockwrite -n $sockname GET /forums.ws?uid= $+ $gettok($sock($sockname).mark,2,126) HTTP/1.1 sockwrite -n $sockname Host: forum.runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:qfc.*: { var %read sockread %read if (*Thread was not found* iswm %read) { $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),Invalid Quick Find Code.) sockclose $sockname halt } if (*forums.ws* iswm %read) && (*<FORM method=?post* !iswm %read) { sockread %read sockread %read $gettok($sock($sockname).mark,1,126) $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),QFC),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),The link for) $c1($gettok($sock($sockname).mark,3,126),$gettok($sock($sockname).mark,2,126)) $c2($gettok($sock($sockname).mark,3,126),is) $c1($gettok($sock($sockname).mark,3,126),http://forum.runescape.com/ $+ $gettok(%read,2,34)) $c2($gettok($sock($sockname).mark,3,126),and is called) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</A)) sockclose $sockname halt } } on $*:TEXT:/^[!@](level|lvl)/Si:#: { if ($2 == $null) || ($2 !isnum 1-99) { $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 number 1-99.) halt } else { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+($chr(91),$c1($nick,Level),$chr(93),:) $c1($nick,Level $2) $c2($nick,=) $c1($nick,$bytes($xpforlevel($2),db)) $c2($nick,experience.) halt } } on $*:TEXT:/^[!@](congratulations|congratz|gratz)/Si:#: { var %x 1 while ($gettok($2-,%x,32)) { if ($gettok($2-,%x,32) isnum) { if ($gettok($2-,%x,32) isnum 2-99) { var %level $gettok($2-,%x,32) } else { $iif($istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,Your level must be between 2 and 99.) halt } } if ($gettok($2-,%x,32) isalpha) { if ($skill2($gettok($2-,%x,32)) != $null) { var %skill $v1 } else { $iif($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 level and a skill.) halt } } inc %x } describe $chan :D\-< ¤.¡*°*¡.¤ Woot! Congratz on level $c1($nick,%level %skill $nick) $+ !¤.¡*°*¡.¤ :D/-< } on $*:TEXT:/^[!@]rsn/Si:#: { 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 a name.) halt } if ($readini(botinfo.ini,n,defname,$address($2,3)) != $null) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,RuneScape Name),$chr(93),:) $c2($nick,The default RuneScape Name for) $c1($nick,$2) $c2($nick,is) $c1($nick,$readini(botinfo.ini,n,defname,$address($2,3))) $+ $c2($nick,.) } else { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,RuneScape Name),$chr(93),:) $c2($nick,The name) $qt($c1($nick,$2)) $c2($nick,does not have a default name set.) } } on $*:TEXT:/^[!@]urban/Si:#: { 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 a term to search for.) halt } var %x 1 while ($sock(urban. $+ %x)) { inc %x } sockopen $+(urban.,%x) www.urbandictionary.com 80 sockmark $+(urban.,%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:urban.*: { sockwrite -n $sockname GET /define.php?term= $+ $gettok($sock($sockname).mark,2,126) HTTP/1.1 sockwrite -n $sockname Host: www.urbandictionary.com sockwrite -n $sockname $crlf } on *:SOCKREAD:urban.*: { var %read sockread %read if (*<div class='definition'>* iswm %read) { sockread %read $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Urban),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),$replace($htmlfree(%read),",")) sockclose $sockname } if (*isn't defined* iswm %read) { $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),The search) $qt($c1($gettok($sock($sockname).mark,3,126),$replace($gettok($sock($sockname).mark,2,126),+,$chr(32)))) $c2($gettok($sock($sockname).mark,3,126),returned no results.) sockclose $sockname } } on $*:TEXT:/^[!@]halo3/Si:#: { if ($2 == $null) { $iif($left($1,1) == @,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You must specify a name.) halt } var %x 1 while ($sock(halo3. $+ %x)) { inc %x } sockopen $+(halo3.,%x) www.bungie.net 80 sockmark $+(halo3.,%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),$chr(95),$chr(43)) $+ ~ $+ $nick } on *:SOCKOPEN:halo3.*: { sockwrite -n $sockname GET /Stats/Halo3/Default.aspx?player= $+ $gettok($sock($sockname).mark,2,126) HTTP/1.1 sockwrite -n $sockname Host: www.bungie.net sockwrite -n $sockname $crlf } on *:SOCKREAD:halo3.*: { var %read,%next,%next2 sockread %read if (*<td class="fields">*</td>* iswm %read) { sockread %next sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</td)) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%next,3,62),</span,</a)) } if (<td>Total Games</td> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Total Games:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</td)) } if (<td>Matchmade Games</td> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Matchmade Games:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</td)) } if (<td>Custom Games</td> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Custom Games:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</td)) } if (<td>Campaign Missions</td> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Campaign Missions:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</td)) } if (<td>Total EXP</td> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Total EXP:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</td,$chr(32))) } if (<td>Enemies KIA</td> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Enemies KIA:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</td)) } if (<td>Friendlies Lost</td> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Friendlies Lost:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,2,62),</td)) } if (<li><span id="ctl00_mainContent_identityStrip_lblRank"> isin %read) { sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Rank:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,3,62),</span)) } if (<td>Highest Skill</td> isin %read) { sockread %read sockmark $sockname $sock($sockname).mark $+ ~ $+ $c2($gettok($sock($sockname).mark,3,126),Highest skill:) $c1($gettok($sock($sockname).mark,3,126),$remove($gettok(%read,3,32),</td>)) } if (</html> isin %read) { if ($gettok($sock($sockname).mark,4,126)) { $gettok($sock($sockname).mark,1,126) $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Halo3),$chr(93),:) $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),$replace($gettok($sock($sockname).mark,2,126),$chr(95),$chr(32),$chr(43),$chr(32))),$chr(93),:) $replace($gettok($sock($sockname).mark,4-,126),~,$chr(32)) } else { $gettok($sock($sockname).mark,1,126) $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Halo3),$chr(93),:) $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),$replace($gettok($sock($sockname).mark,2,126),$chr(95),$chr(32),$chr(43),$chr(32))),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),The name) $qt($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 Halo3 gamertags.) } sockclose $sockname } } on $*:TEXT:/^[!@](duel|bh|rogues|bhr)/Si:#: { if ($2 == $null) && (!$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 player or default name.) halt } if ($chr(38) isin $2-) { if ($readini(botinfo.ini,n,defname,$address($remove($2-,$chr(38)),3))) { 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,Error $+ $chr(44) the name) $qt($c1($nick,$remove($2-,$chr(38)))) $c2($nick,does not have a defname set.) halt } } else { if ($2) { var %name $replace($2-,$chr(32),$chr(95)) } else { var %name $readini(botinfo.ini,n,defname,$address($nick,3)) } } var %x 1 while ($sock(duel. $+ %x)) { inc %x } if (duel isin $1) { var %type Dueling } elseif (bhr isin $1) { var %type Bounty Hunter Rogues } elseif (bh isin $1) { var %type Bounty Hunters } sockopen $+(duel.,%x) hiscore.runescape.com 80 sockmark $+(duel.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ %name $+ ~ $+ $nick $+ ~ $+ %type } on *:SOCKOPEN:duel.*: { 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:duel.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if (*404*page*not*found* iswm %read) { $1 *** $+([,$c1($3,$2),]:) $c2($3,does not appear in the RSHS.) sockclose $sockname } if (*,* iswm %read) && (*,*,* !iswm %read) && ($remove(%read,$chr(44),-) isnum) { if ($4 == Bounty Hunters) { sockread %read } if ($4 == Bounty Hunter Rogues) { sockread %read sockread %read } if (-1 isin %read) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),$2),$chr(93),:) $c2($3,does not appear in the) $c1($gettok($sock($sockname).mark,3,126),$iif($4 == Dueling,Dueling,$iif($4 == Bounty Hunters,Bounty Hunters,Bounty Hunter Rogues))) $c2($gettok($sock($sockname).mark,3,126),high scores list.) sockclose $sockname } else { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),$2),$chr(93),:) $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),$iif($4 == Dueling,Dueling,$iif($4 == Bounty Hunters,Bounty Hunters,Bounty Hunter Rogues))),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),Rank) $+ : $c1($gettok($sock($sockname).mark,3,126),$bytes($gettok(%read,1,44),db)) $chr(124) $c2($gettok($sock($sockname).mark,3,126),Score) $+ : $c1($gettok($sock($sockname).mark,3,126),$bytes($gettok(%read,2,44),db)) sockclose $sockname } } } alias -l skill { if ($1 == 0) return Overall elseif ($1 == 1) return Attack elseif ($1 == 2) return Defence elseif ($1 == 3) return Strength elseif ($1 == 4) return Hitpoints elseif ($1 == 5) return Ranged elseif ($1 == 6) return Prayer elseif ($1 == 7) return Magic elseif ($1 == 8) return Cooking elseif ($1 == 9) return Woodcutting elseif ($1 == 10) return Fletching elseif ($1 == 11) return Fishing elseif ($1 == 12) return Firemaking elseif ($1 == 13) return Crafting elseif ($1 == 14) return Smithing elseif ($1 == 15) return Mining elseif ($1 == 16) return Herblore elseif ($1 == 17) return Agility elseif ($1 == 18) return Thieving elseif ($1 == 19) return Slayer elseif ($1 == 20) return Farming elseif ($1 == 21) return Runecrafting elseif ($1 == 22) return Hunter elseif ($1 == 23) return Construction elseif ($1 == 24) return Summoning } alias -l skill2 { if ($regex($1,/^Att(?:ack)?$/Si)) return Attack elseif ($regex($1,/^Def(?:ence)?/Si)) return Defence elseif ($regex($1,/^Str(?:ength)?/Si)) return Strength elseif ($regex($1,/^H(?:itpoint(?:s)?|p)$/Si)) return Hitpoints elseif ($regex($1,/^Rang(?:e|ing)$/Si)) return Ranged elseif ($regex($1,/^Pray(?:er|ing)?$/Si)) return Prayer elseif ($regex($1,/^Mag(?:e|ic|ing)$/Si)) return Magic elseif ($regex($1,/^Cook(?:ing)?$/Si)) return Cooking elseif ($regex($1,/^W(?:c|oodcut(?:ing)?)$/Si)) return Woodcutting elseif ($regex($1-,/^Fletch(?:ing)?$/Si)) return Fletching elseif ($regex($1-,/^Fish(?:ing)?$/Si)) return Fishing elseif ($regex($1,/^F(?:m|iremak(?:e|ing))$/Si)) return Firemaking elseif ($regex($1,/^Craft(?:ing)?$/Si)) return Crafting elseif ($regex($1,/^Smith(?:ing)?$/Si)) return Smithing elseif ($regex($1,/^Min(?:e|ing)$/Si)) return Mining elseif ($regex($1,/^Herb(?:y|lore|ing)?$/Si)) return Herblore elseif ($regex($1,/^Agil(?:ity)?$/Si)) return Agility elseif ($regex($1,/^Th[ie][ei]v(?:ing)?$/Si)) return Thieving elseif ($regex($1,/^Slay(?:er)?$/Si)) return Slayer elseif ($regex($1,/^Farm(?:ing)?$/Si)) return Farming elseif ($regex($1,/^R(?:c|unecraft(?:ing)?)$/Si)) return Runecrafting elseif ($regex($1,/^Hunt(?:er)?$/Si)) return Hunter elseif ($regex($1,/^Con(?:struction)?$/Si)) return Construction elseif ($regex($1,/^Overall$/Si)) return Overall elseif ($regex($1,/^Sum(?:mon(?:ing)?)?$/Si)) return Summoning } alias -l skill3 { if ($1 == Overall) return 0 elseif ($1 == Attack) return 1 elseif ($1 == Defence) return 2 elseif ($1 == Strength) return 3 elseif ($1 == Hitpoints) return 4 elseif ($1 == Ranged) return 5 elseif ($1 == Prayer) return 6 elseif ($1 == Magic) return 7 elseif ($1 == Cooking) return 8 elseif ($1 == Woodcutting) return 9 elseif ($1 == Fletching) return 10 elseif ($1 == Fishing) return 11 elseif ($1 == Firemaking) return 12 elseif ($1 == Crafting) return 13 elseif ($1 == Smithing) return 14 elseif ($1 == Mining) return 15 elseif ($1 == Herblore) return 16 elseif ($1 == Agility) return 17 elseif ($1 == Thieving) return 18 elseif ($1 == Slayer) return 19 elseif ($1 == Farming) return 20 elseif ($1 == Runecrafting) return 21 elseif ($1 == Hunter) return 22 elseif ($1 == Construction) return 23 elseif ($1 == Summoning) return 24 } alias -l xpforlevel { var %x = 1, %level = $calc($1 - 1), %xp = 0 while (%x <= %level) { var %TempXp = $calc($floor($calc(%x + 300 * 2 ^ (%x / 7))) / 4) inc %xp %TempXp inc %x } return $int(%xp) } alias -l lfe { if ($1 < 83) return 1 elseif ($1 < 174) return 2 elseif ($1 < 276) return 3 elseif ($1 < 388) return 4 elseif ($1 < 512) return 5 elseif ($1 < 650) return 6 elseif ($1 < 801) return 7 elseif ($1 < 969) return 8 elseif ($1 < 1154) return 9 elseif ($1 < 1358) return 10 elseif ($1 < 1584) return 11 elseif ($1 < 1833) return 12 elseif ($1 < 2107) return 13 elseif ($1 < 2411) return 14 elseif ($1 < 2746) return 15 elseif ($1 < 3115) return 16 elseif ($1 < 3523) return 17 elseif ($1 < 3973) return 18 elseif ($1 < 4470) return 19 elseif ($1 < 5018) return 20 elseif ($1 < 5624) return 21 elseif ($1 < 6291) return 22 elseif ($1 < 7028) return 23 elseif ($1 < 7842) return 24 elseif ($1 < 8740) return 25 elseif ($1 < 9730) return 26 elseif ($1 < 10824) return 27 elseif ($1 < 12031) return 28 elseif ($1 < 13363) return 29 elseif ($1 < 14833) return 30 elseif ($1 < 16456) return 31 elseif ($1 < 18247) return 32 elseif ($1 < 20224) return 33 elseif ($1 < 22406) return 34 elseif ($1 < 24815) return 35 elseif ($1 < 27473) return 36 elseif ($1 < 30408) return 37 elseif ($1 < 33648) return 38 elseif ($1 < 37224) return 39 elseif ($1 < 41171) return 40 elseif ($1 < 45529) return 41 elseif ($1 < 50339) return 42 elseif ($1 < 55649) return 43 elseif ($1 < 61512) return 44 elseif ($1 < 67983) return 45 elseif ($1 < 75127) return 46 elseif ($1 < 83014) return 47 elseif ($1 < 91721) return 48 elseif ($1 < 101333) return 49 elseif ($1 < 111945) return 50 elseif ($1 < 123660) return 51 elseif ($1 < 136594) return 52 elseif ($1 < 150872) return 53 elseif ($1 < 166636) return 54 elseif ($1 < 184040) return 55 elseif ($1 < 203254) return 56 elseif ($1 < 224466) return 57 elseif ($1 < 247886) return 58 elseif ($1 < 273742) return 59 elseif ($1 < 302288) return 60 elseif ($1 < 333804) return 61 elseif ($1 < 368599) return 62 elseif ($1 < 407015) return 63 elseif ($1 < 449428) return 64 elseif ($1 < 496254) return 65 elseif ($1 < 547953) return 66 elseif ($1 < 605032) return 67 elseif ($1 < 668051) return 68 elseif ($1 < 737627) return 69 elseif ($1 < 814445) return 70 elseif ($1 < 899257) return 71 elseif ($1 < 992895) return 72 elseif ($1 < 1096278) return 73 elseif ($1 < 1210421) return 74 elseif ($1 < 1336443) return 75 elseif ($1 < 1475581) return 76 elseif ($1 < 1629200) return 77 elseif ($1 < 1798808) return 78 elseif ($1 < 1986068) return 79 elseif ($1 < 2192818) return 80 elseif ($1 < 2421087) return 81 elseif ($1 < 2673114) return 82 elseif ($1 < 2951373) return 83 elseif ($1 < 3258594) return 84 elseif ($1 < 3597792) return 85 elseif ($1 < 3972294) return 86 elseif ($1 < 4385776) return 87 elseif ($1 < 4842295) return 88 elseif ($1 < 5346332) return 89 elseif ($1 < 5902831) return 90 elseif ($1 < 6517253) return 91 elseif ($1 < 7195629) return 92 elseif ($1 < 7944614) return 93 elseif ($1 < 8771558) return 94 elseif ($1 < 9684577) return 95 elseif ($1 < 10692629) return 96 elseif ($1 < 11805606) return 97 elseif ($1 < 13034431) return 98 else return 99 } alias -l FNL { if ($4) { var %eparam if ($1 == Hitpoints) { if ($readini(eparam.ini,n,Attack,$4)) { %eparam = $chr(124) $c2($3,$4) $+ : $c1($3,$FNL2($2,$calc($readini(eparam.ini,n,Attack,$4) / 4 * 1.33))) } else { %eparam = $chr(124) $c1($3,$4) $c2($3,is not a valid paramater, type) $c1($3,!param $1) $c2($3,to see the parameters.) } } elseif ($1 == Ranged) { if ($readini(eparam.ini,n,Attack,$4)) { %eparam = $chr(124) $c2($3,$4) $+ : $c1($3,$FNL2($2,$readini(eparam.ini,n,Attack,$4))) } else { %eparam = $chr(124) $c1($3,$4) $c2($3,is not a valid paramater, type) $c1($3,!param $1) $c2($3,to see the parameters.) } } else { if ($readini(eparam.ini,n,$1,$4)) { %eparam = $chr(124) $c2($3,$4) $+ : $c1($3,$FNL2($2,$readini(eparam.ini,n,$1,$4))) } else { %eparam = $chr(124) $c1($3,$4) $c2($3,is not a valid paramater, type) $c1($3,!param $1) $c2($3,to see the parameters.) } } } if ($1 == Overall) halt elseif ($1 == Attack) { return $c2($3,NPCs for) $c1($3,$bytes($2,db)) $c2($3,attack experience) $+ : $c2($3,Ogre) $+ : $c1($3,$FNL2($2,240)) $+($chr(91),$c1($3,$FNL2($2,$calc(60 * 1.33))),$chr(93)) $chr(124) $c2($3,Shadow Warrior) $+ : $c1($3,$FNL2($2,268)) $+($chr(91),$c1($3,$FNL2($2,$calc(67 * 1.33))),$chr(93)) $chr(124) $c2($3,Earth Warrior) $+ : $c1($3,$FNL2($2,216)) $+($chr(91),$c1($3,$FNL2($2,$calc(54 * 1.33))),$chr(93)) $chr(124) $c2($3,$+(Dagannoth,$chr(40),74,$chr(41))) $+ : $c1($3,$FNL2($2,280)) $+($chr(91),$c1($3,$FNL2($2,$calc(70 * 1.33))),$chr(93)) $chr(124) $c2($3,Axes) $+ : $c1($3,$FNL2($2,176)) $+($chr(91),$c1($3,$FNL2($2,$calc(44 * 1.33))),$chr(93)) $iif(%eparam,$v1) } elseif ($1 == Defence) { return $c2($3,NPCs for) $c1($3,$bytes($2,db)) $c2($3,defence experience) $+ : $c2($3,Ogre) $+ : $c1($3,$FNL2($2,240)) $+($chr(91),$c1($3,$FNL2($2,$calc(60 * 1.33))),$chr(93)) $chr(124) $c2($3,Shadow Warrior) $+ : $c1($3,$FNL2($2,268)) $+($chr(91),$c1($3,$FNL2($2,$calc(67 * 1.33))),$chr(93)) $chr(124) $c2($3,Earth Warrior) $+ : $c1($3,$FNL2($2,216)) $+($chr(91),$c1($3,$FNL2($2,$calc(54 * 1.33))),$chr(93)) $chr(124) $c2($3,$+(Dagannoth,$chr(40),74,$chr(41))) $+ : $c1($3,$FNL2($2,280)) $+($chr(91),$c1($3,$FNL2($2,$calc(70 * 1.33))),$chr(93)) $chr(124) $c2($3,Axes) $+ : $c1($3,$FNL2($2,176)) $+($chr(91),$c1($3,$FNL2($2,$calc(44 * 1.33))),$chr(93)) $iif(%eparam,$v1) } elseif ($1 == Strength) { return $c2($3,NPCs for) $c1($3,$bytes($2,db)) $c2($3,strength experience) $+ : $c2($3,Ogre) $+ : $c1($3,$FNL2($2,240)) $+($chr(91),$c1($3,$FNL2($2,$calc(60 * 1.33))),$chr(93)) $chr(124) $c2($3,Shadow Warrior) $+ : $c1($3,$FNL2($2,268)) $+($chr(91),$c1($3,$FNL2($2,$calc(67 * 1.33))),$chr(93)) $chr(124) $c2($3,Earth Warrior) $+ : $c1($3,$FNL2($2,216)) $+($chr(91),$c1($3,$FNL2($2,$calc(54 * 1.33))),$chr(93)) $chr(124) $c2($3,$+(Dagannoth,$chr(40),74,$chr(41))) $+ : $c1($3,$FNL2($2,280)) $+($chr(91),$c1($3,$FNL2($2,$calc(70 * 1.33))),$chr(93)) $chr(124) $c2($3,Axes) $+ : $c1($3,$FNL2($2,176)) $+($chr(91),$c1($3,$FNL2($2,$calc(44 * 1.33))),$chr(93)) $iif(%eparam,$v1) } elseif ($1 == Hitpoints) { return $c2($3,NPCs for) $c1($3,$bytes($2,db)) $c2($3,hitpoints experience) $+ : $c2($3,Ogre) $+ : $c1($3,$FNL2($2,$calc(60 * 1.33))) $chr(124) $c2($3,Shadow Warrior) $+ : $c1($3,$FNL2($2,$calc(67 * 1.33))) $chr(124) $c2($3,Earth Warrior) $+ : $c1($3,$FNL2($2,$calc(54 * 1.33))) $chr(124) $c2($3,$+(Daganooth,$chr(40),74,$chr(41))) $c1($3,$FNL2($2,$calc(70 * 1.33))) $iif(%eparam,$v1) } elseif ($1 == Ranged) { return $c2($3,NPCs for) $c1($3,$bytes($2,db)) $c2($3,ranging experience) $+ : $c2($3,Blue Dragons) $+ : $c1($3,$FNL2($2,420)) $+($chr(91),$c1($3,$bytes($calc($remove($FNL2($2,420),$chr(44)) * 2),db)),$chr(93)) $chr(124) $c2($3,Greater Demon) $+ : $c1($3,$FNL2($2,348)) $+($chr(91),$c1($3,$bytes($calc($remove($FNL2($2,348),$chr(44)) * 2),db)),$chr(93)) $chr(124) $c2($3,Ogres) $+ : $c1($3,$FNL2($2,240)) $+($chr(91),$c1($3,$bytes($calc($remove($FNL2($2,240),$chr(44)) * 2),db)),$chr(93)) $chr(124) $c2($3,Fire Giants) $+ : $c1($3,$FNL2($2,444)) $+($chr(91),$c1($3,$bytes($calc($remove($FNL2($2,444),$chr(44)) * 2),db)),$chr(93)) $iif(%eparam,$v1) } elseif ($1 == Prayer) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,prayer experience) $+ : $c2($3,Dragon Bones) $+ : $c1($3,$FNL2($2,72)) $+($chr(91),E:,$c1($3,$bytes($ceil($calc($2 / 288)),db)),$chr(93)) $+($chr(91),A:,$c1($3,$bytes($ceil($calc($2 / 252)),db)),$chr(93)) $chr(124) $c2($3,Baby Dragon Bones) $+ : $c1($3,$FNL2($2,30)) $+($chr(91),E:,$c1($3,$bytes($ceil($calc($2 / 120)),db)),$chr(93)) $+($chr(91),A:,$c1($3,$bytes($ceil($calc($2 / 105)),db)),$chr(93)) $chr(124) $c2($3,Big Bones) $+ : $c1($3,$FNL2($2,15)) $+($chr(91),E:,$c1($3,$bytes($ceil($calc($2 / 60)),db)),$chr(93)) $+($chr(91),A:,$c1($3,$bytes($ceil($calc($2 / 52.5)),db)),$chr(93)) $chr(124) $c2($3,Ourg Bones) $+ : $c1($3,$FNL2($2,140)) $+($chr(91),E:,$c1($3,$bytes($ceil($calc($2 / 560)),db)),$chr(93)) $+($chr(91),A:,$c1($3,$bytes($ceil($calc($2 / 490)),db)),$chr(93)) $iif(%eparam,$v1) } elseif ($1 == Magic) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,magic experience) $+ : $c2($3,Enchant Level 6 Jewelery) $+ : $c1($3,$FNL2($2,97)) $chr(124) $c2($3,Stun) $+ : $c1($3,$FNL2($2,90)) $chr(124) $c2($3,Fire Wave) $+ : $c1($3,$FNL2($2,62.5)) $chr(124) $c2($3,High Alchemy) $+ : $c1($3,$FNL2($2,65)) $chr(124) $c2($3,Camelot Teleport) $+ : $c1($3,$FNL2($2,55.5)) $iif(%eparam,$v1) } elseif ($1 == Cooking) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,cooking experience) $+ : $c2($3,Shark) $+ : $c1($3,$FNL2($2,210)) $chr(124) $c2($3,Tuna and Corn Potato) $+ : $c1($3,$FNL2($2,309.5)) $chr(124) $c2($3,Monkfish) $+ : $c1($3,$FNL2($2,150)) $chr(124) $c2($3,Curry) $+ : $c1($3,$FNL2($2,280)) $chr(124) $c2($3,Chocolate Cake) $+ : $c1($3,$FNL2($2,210)) $chr(124) $c2($3,Swordfish) $+ : $c1($3,$FNL2($2,140)) $chr(124) $c2($3,Lobster) $+ : $c1($3,$FNL2($2,120)) $chr(124) $c2($3,Tuna) $+ : $c1($3,$FNL2($2,100)) $iif(%eparam,$v1) } elseif ($1 == Woodcutting) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,woodcutting experience) $+ : $c2($3,Magic) $+ : $c1($3,$FNL2($2,250)) $chr(124) $c2($3,Yew) $+ : $c1($3,$FNL2($2,175)) $chr(124) $c2($3,Mahogany) $+ : $c1($3,$FNL2($2,125)) $chr(124) $c2($3,Maple) $+ : $c1($3,$FNL2($2,100)) $chr(124) $c2($3,Willow) $+ : $c1($3,$FNL2($2,67.5)) $iif(%eparam,$v1) } elseif ($1 == Fletching) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,fletching experience) $+ : $c2($3,Magic Long Bow) $+ : $c1($3,$FNL2($2,183)) $chr(124) $c2($3,Yew Long Bow) $+ : $c1($3,$FNL2($2,150)) $chr(124) $c2($3,Maple Long Bow) $+ : $c1($3,$FNL2($2,116.5)) $chr(124) $c2($3,Willow Long Bow) $+ : $c1($3,$FNL2($2,83)) $iif(%eparam,$v1) } elseif ($1 == Fishing) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,fishing experience) $+ : $c2($3,Shark) $+ : $c1($3,$FNL2($2,110)) $chr(124) $c2($3,Monkfish) $+ : $c1($3,$FNL2($2,120)) $chr(124) $c2($3,Swordfish) $+ : $c1($3,$FNL2($2,100)) $chr(124) $c2($3,Bass) $+ : $c1($3,$FNL2($2,100)) $chr(124) $c2($3,Lobster) $+ : $c1($3,$FNL2($2,90)) $iif(%eparam,$v1) } elseif ($1 == Firemaking) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,firemaking experience) $+ : $c2($3,Magic Logs) $+ : $c1($3,$FNL2($2,303.75)) $chr(124) $c2($3,Yew Logs) $+ : $c1($3,$FNL2($2,202.5)) $chr(124) $c2($3,Maple Logs) $+ : $c1($3,$FNL2($2,135)) $chr(124) $c2($3,Willow Logs) $+ : $c1($3,$FNL2($2,90)) $iif(%eparam,$v1) $iif(%eparam,$v1) } elseif ($1 == Crafting) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,crafting experience) $+ : $c2($3,Leather body/chaps) $+ : $c1($3,$FNL2($2,27)) $chr(124) $c2($3,Hard Leather Body) $+ : $c1($3,$FNL2($2,35)) $chr(124) $c2($3,Air Battlestaff) $+ : $c1($3,$FNL2($2,137.5)) $chr(124) $c2($3,Fire Battlestaff) $+ : $c1($3,$FNL2($2,125)) $chr(124) $c2($3,Green Dragonhide) $+ : $c1($3,$FNL2($2,62)) $chr(124) $c2($3,Blue Dragonhide) $+ : $c1($3,$FNL2($2,70)) $chr(124) $c2($3,Red Dragonhide) $+ : $c1($3,$FNL2($2,78)) $iif(%eparam,$v1) } elseif ($1 == Smithing) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,smithing experience) $+($chr(91),smelt,$chr(47),smith,$chr(47),both,$chr(93)) $+ : $c2($3,Adamant Bars) $+ : $+($c1($3,$FNL2($2,37.5)),/,$c1($3,$FNL2($2,62.5)),/,$c1($3,$FNL2($2,100))) $chr(124) $c2($3,Mithril Bars) $+ : $+($c1($3,$FNL2($2,30)),/,$c1($3,$FNL2($2,50)),/,$c1($3,$FNL2($2,80))) $chr(124) $c2($3,Smelt Gold) $+ : $c1($3,$FNL2($2,22.5)) $+($chr(40),$c2($3,w/guants) $+ : $c1($3,$FNL2($2,56.2)),$chr(41)) $chr(124) $c2($3,4 Cannon Balls) $+ : $c1($3,$FNL2($2,25.6)) $+($chr(40),$c2($3,w/smelt) $+ : $c1($3,$FNL2($2,43.1)),$chr(41)) $chr(124) $c2($3,Steel bars) $+ : $+($c1($3,$FNL2($2,17.5)),/,$c1($3,$FNL2($2,37.5)),/,$c1($3,$FNL2($2,55))) $chr(124) $c2($3,Smelt Silver) $+ : $c1($3,$FNL2($2,13.7)) $iif(%eparam,$v1) } elseif ($1 == Mining) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,mining experience) $+ : $c2($3,Adamant) $+ : $c1($3,$FNL2($2,95)) $chr(124) $c2($3,Mithril) $+ : $c1($3,$FNL2($2,80)) $chr(124) $c2($3,Granite) $+($chr(91),tiny,/,small,/,medium,$chr(93)) $+ : $+($c1($3,$FNL2($2,50)),/,$c1($3,$FNL2($2,60)),/,$c1($3,$FNL2($2,75))) $chr(124) $c2($3,Gems) $+ : $c1($3,$FNL2($2,65)) $chr(124) $c2($3,Gold) $+ : $c1($3,$FNL2($2,65)) $chr(124) $c2($3,Coal) $+ : $c1($3,$FNL2($2,50)) $chr(124) $c2($3,Iron) $+ : $c1($3,$FNL2($2,35)) $iif(%eparam,$v1) } elseif ($1 == Herblore) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,herblore experience) $+ : $c2($3,Ranging Potion) $+ : $c1($3,$FNL2($2,162.5)) $chr(124) $c2($3,Clean Dwarf Weed) $+ : $c1($3,$FNL2($2,13.75)) $chr(124) $c2($3,Anti Fire-Breath Potion) $+ : $c1($3,$FNL2($2,157.5)) $chr(124) $c2($3,ID Lantadyme) $+ : $c1($3,$FNL2($2,13)) $chr(124) $c2($3,Super Attack Potion) $+ : $c1($3,$FNL2($2,100)) $chr(124) $c2($3,Super Strength Potion) $+ : $c1($3,$FNL2($2,125)) $chr(124) $c2($3,Super defence potion) $+ : $c1($3,$FNL2($2,150)) $chr(124) $c2($3,Prayer Restore Potion) $+ : $c1($3,$FNL2($2,87.5)) $iif(%eparam,$v1) } elseif ($1 == Agility) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,agility experience) $+ : $c2($3,Werewolves' Course) $+ : $c1($3,$FNL2($2,540)) $chr(124) $c2($3,Wilderness Course) $+ : $c1($3,$FNL2($2,571.5)) $chr(124) $c2($3,Ape Atoll) $+ : $c1($3,$FNL2($2,580)) $chr(124) $c2($3,Barbarian Course) $+ : $c1($3,$FNL2($2,153.2)) $chr(124) $c2($3,Agility Pyramid) $+ : $c1($3,$FNL2($2,1014)) $chr(124) $c2($3,Gnome Course) $+ : $c1($3,$FNL2($2,86)) $iif(%eparam,$v1) } elseif ($1 == Thieving) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,thieving experience) $+ : $c2($3,Pick Pollnivian Bandit) $+ : $c1($3,$FNL2($2,84.3)) $+($chr(40),$c2($3,Bearded) $+ : $c1($3,$FNL2($2,65)),$chr(41)) $chr(124) $c2($3,Pick Knight) $+ : $c1($3,$FNL2($2,84.3)) $chr(124) $c2($3,Pick Guard) $+ : $c1($3,$FNL2($2,46.8)) $chr(124) $c2($3,Wall Safes) $+ : $c1($3,$FNL2($2,70)) $iif(%eparam,$v1) } elseif ($1 == Slayer) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,slayer experience) $+ : $c2($3,Dark Beast) $+ : $c1($3,$FNL2($2,220)) $chr(124) $c2($3,Abyssal Demon) $+ : $c1($3,$FNL2($2,150)) $chr(124) $c2($3,Nechryael) $+ : $c1($3,$FNL2($2,105)) $chr(124) $c2($3,Gargoyle) $+ : $c1($3,$FNL2($2,105)) $chr(124) $c2($3,Dust Devil) $+ : $c1($3,$FNL2($2,105)) $chr(124) $c2($3,Aberrant Specter) $+ : $c1($3,$FNL2($2,90)) $chr(124) $c2($3,Jelly) $c1($3,$FNL2($2,75)) $iif(%eparam,$v1) } elseif ($1 == Farming) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,farming experience) $+ : $c2($3,Poison Ivy Bush) $+ : $c1($3,$FNL2($2,794)) $chr(124) $c2($3,Palm Tree) $+ : $c1($3,$FNL2($2,10211)) $chr(124) $c2($3,Belladonna) $+ : $c1($3,$FNL2($2,91)) $chr(124) $c2($3,Snapdragon) $+ : $c1($3,$FNL2($2,186)) $chr(124) $c2($3,Yew Tree) $+ : $c1($3,$FNL2($2,7150.5)) $chr(124) $c2($3,Whiteberry Bush) $+ : $c1($3,$FNL2($2,515)) $chr(124) $c2($3,Papaya Tree) $+ : $c1($3,$FNL2($2,6219)) $iif(%eparam,$v1) } elseif ($1 == Runecrafting) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,runecrafting experience) $+ : $c2($3,Blood Rune) $+ : $c1($3,$FNL2($2,10.5)) $chr(124) $c2($3,Death Rune) $+ : $c1($3,$FNL2($2,10)) $chr(124) $c2($3,Law Rune) $+ : $c1($3,$FNL2($2,9.5)) $chr(124) $c2($3,Nature Rune) $+ : $c1($3,$FNL2($2,9)) $chr(124) $c2($3,Astral Rune) $+ : $c1($3,$FNL2($2,8.7)) $chr(124) $c2($3,Chaos Rune) $+ : $c1($3,$FNL2($2,8.5)) $chr(124) $c2($3,Cosmic Rune) $+ : $c1($3,$FNL2($2,8)) $chr(124) $c2($3,Air Rune) $+ : $c1($3,$FNL2($2,5)) $iif(%eparam,$v1) } elseif ($1 == Hunter) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,hunter experience) $+ : $c2($3,Imp) $+ : $c1($3,$FNL2($2,450)) $chr(124) $c2($3,Dashing Kebbit) $+ : $c1($3,$FNL2($2,156)) $chr(124) $c2($3,Black Salamander) $+ : $c1($3,$FNL2($2,304)) $chr(124) $c2($3,Red Chinchompa) $+ : $c1($3,$FNL2($2,265)) $chr(124) $c2($3,Red Salamander) $+ : $c1($3,$FNL2($2,272)) $chr(124) $c2($3,Dark Kebbit) $+ : $c1($3,$FNL2($2,132)) $chr(124) $c2($3,Sabretooth Kyatt) $+ : $c1($3,$FNL2($2,300)) $chr(124) $c2($3,Chinchompa) $+ : $c1($3,$FNL2($2,198.5)) $iif(%eparam,$v1) } elseif ($1 == Construction) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,construction experience) $+ : $c2($3,Mahogany Plank) $+ : $c1($3,$FNL2($2,140)) $+($chr(91),$c1($3,$bytes($calc($FNL2($2,140) * 1500),db) $+ gp),$chr(93)) $chr(124) $c2($3,Team Plank) $+ : $c1($3,$FNL2($2,90)) $+($chr(91),$c1($3,$bytes($calc($FNL2($2,90) * 500),db) $+ gp),$chr(93)) $chr(124) $c2($3,Oak Plank) $+ : $c1($3,$FNL2($2,60)) $+($chr(91),$c1($3,$bytes($calc($FNL2($2,60) * 250),db) $+ gp),$chr(93)) $iif(%eparam,$v1) } elseif ($1 == Summoning) { return $c2($3,Required for) $c1($3,$bytes($2,db)) $c2($3,summoning experience) $+ : $c2($3,Thorny snail) $+ : $c1($3,$FNL2($2,12.6)) $chr(124) $c2($3,Beaver) $+ : $c1($3,$FNL2($2,57.6)) $chr(124) $c2($3,Iron Minotaur) $+ : $c1($3,$FNL2($2,404.8)) $chr(124) $c2($3,Stranger Plant) $+ : $c1($3,$FNL2($2,281.6)) $chr(124) $c2($3,Unicorn Stallion) $+ : $c1($3,$FNL2($2,404.8)) $iif(%eparam,$v1) } } alias -l f2pcmblvl { ;1=attack,2=strength,3=defence,4=hitpoints,5=ranged,6=prayer,7=magic var %base $calc($calc($calc($3 * 100) + $calc($4 * 100) + $calc($iif($isbit($6,1),$calc($6 - 1) * 50,$6 * 50))) / 400) if ($isbit($5,1) == 1) { var %ranged $calc($calc($calc($calc($5 - 1) + $calc($5 * 2)) * 65) / 400) } else { var %ranged $calc($calc($5 * 195) / 400) } if ($isbit($7,1) == 1) { var %magic $calc($calc($calc($calc($7 - 1) + $calc($7 * 2)) * 65) / 400) } else { var %magic $calc($calc($7 * 195) / 400) } var %melee $calc($calc($calc($1 * 130) + $calc($2 * 130)) / 400) return $calc($gettok($sorttok(%melee %ranged %magic,32,nr),1,32) + %base) $iif($gettok($sorttok(%melee %ranged %magic,32,nr),1,32) == %melee,Melee,$iif($gettok($sorttok(%melee %ranged %magic,32,nr),1,32) == %ranged,Ranged,$iif($gettok($sorttok(%melee %ranged %magic,32,nr),1,32) == %magic,Magic))) } alias -l cmblvl { ;att,str,def,hit,range,prayer,mage,summoning var %a $calc($3 * 100) var %b $calc($4 * 100) if ($isbit($6,1)) var %c $calc($calc($6 - 1) * 50) else var %c $calc($6 * 50) if ($isbit($8,1)) var %d $calc($calc($8 - 1) * 50) else var %d $calc($8 * 50) var %base $calc($calc(%a + %b + %c + %d) / 400) var %e $calc($1 * 130), %f $calc($2 * 130) if ($isbit($5,1)) var %g $calc($calc($calc($5 - 1) + $calc($5 * 2)) * 65) else var %g $calc($5 * 195) if ($isbit($7,1)) var %h $calc($calc($calc($7 - 1) + $calc($7 * 2)) * 65) else var %h $calc($7 * 195) var %melee $calc($calc(%e + %f) / 400) var %range $calc(%g / 400) var %mage $calc(%h / 400) if ($gettok($sorttok(%melee %range %mage,32,nr),1,32) == %melee) var %type Melee elseif ($v1 == %range) var %type Ranged else var %type Magic return $calc($v1 + %base) %type } alias -l nextcmblvl { var %attstr 1 while ($floor($gettok($cmblvl($calc($2 + %attstr),$3,$4,$5,$6,$7,$8,$9),1,32)) < $calc($floor($gettok($cmblvl($2,$3,$4,$5,$6,$7,$8,$9),1,32)) + 1)) { inc %attstr } var %defhit 1 while ($floor($gettok($cmblvl($2,$3,$calc($4 + %defhit),$5,$6,$7,$8,$9),1,32)) < $calc($floor($gettok($cmblvl($2,$3,$4,$5,$6,$7,$8,$9),1,32)) + 1)) { inc %defhit } var %pray 1 while ($floor($gettok($cmblvl($2,$3,$4,$5,$6,$calc($7 + %pray),$8,$9),1,32)) < $calc($floor($gettok($cmblvl($2,$3,$4,$5,$6,$7,$8,$9),1,32)) + 1)) { inc %pray } var %summon 1 while ($floor($gettok($cmblvl($2,$3,$4,$5,$6,$7,$8,$calc($9 + %summon)),1,32)) < $calc($floor($gettok($cmblvl($2,$3,$4,$5,$6,$7,$8,$9),1,32)) + 1)) { inc %summon } return $iif($calc(198 - $calc($2 + $3)) >= %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 } alias -l mh { return $iif($left($1,1) == @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$2,32) == $false,msg $2,notice $3) } alias -l h2d { var %day,%hour,%min,%sec,%1 $1 while (%1 >= 24) { inc %day dec %1 24 } while (%1 >= 1) { inc %hour dec %1 1 } while (%1 >= $calc(1 / 60)) { inc %min dec %1 $v2 } while (%1 >= $calc(1 / 60 / 60)) { inc %sec dec %1 $v2 } if ($regex(%sec %min %hour %day,/[1-9]/)) { return $iif(%day,%day day $+ $iif(%day > 1,s)) $iif(%hour,%hour hour $+ $iif(%hour > 1,s)) $iif(%min,%min minute $+ $iif(%min > 1,s)) $iif(%sec,%sec second $+ $iif(%sec > 1,s)) } else { return Forever } }