on *:JOIN:#aak:{ .notice $nick Hello $nick $+ .Welcome to Athena's Abyssal Knights! If you have any questions, please contact an op or halfop. Please respect ops and halfops. To be given voice contact an op or in-game. } on *:JOIN:#blk-market:{ .notice $nick Hi there $nick , welcome to $chan $+ . No account selling or trading, no spamming, or using colors, reverses, bolds, or underlines. Thank you, If you have any questions contact an op or a half-op. Thank you for your time $nick Enjoy your time here!! } on *:TEXT:!global *:#: { if ( $nick isop $chan || $nick ishop $chan ) { msg #80+pc 3[Global Message - $nick $+ 3]12 $2- | msg #80+pc.staff 4[Global- $+ $nick $+ 4]12 $2- } } on *:TEXT:!lag:#: { if ( $nick isop $chan ) { notice $nick [My Current Lag Is: %zlag.current $+ s. (Highest: %zlag.highest $+ s. Lowest: %zlag.lowest $+ s.) } } on *:TEXT:!change *:#80+pc.staff,#aak: { if ( $nick isop $chan || $nick ishop $chan ) { set %world $2- set %ht $ctime set %nick $nick msg #80+pc.staff 3[12PC-World Update3] 12The Pest Control World has been updated by %nick $+ ! | msg #80+pc.staff 3[12PC-World Update3] 12The Pest Control World has been updated by $nick $+ ! } elseif ( $nick isvoice $chan ) { halt } } on *:TEXT:!setpcw *:#80+pc.staff,#aak: { if ( $nick isop $chan || $nick ishop $chan ) { set %world $2- set %ht $ctime set %nick $nick msg #80+pc.staff 3[12PC-World Update3] 12The Pest Control World has been updated by %nick $+ ! } elseif ( $nick isvoice $chan ) { halt } } on *:TEXT:!setba *:#80+pc.staff,#aak: { if ( $nick isop $chan || $nick ishop $chan ) { set %baworld $2- set %ht $ctime set %nick $nick msg #80+pc.staff 3[12BA-World Update3] 12The Barbarian Assualt World has been updated by %nick $+ ! } elseif ( $nick isvoice $chan ) { halt } } on *:text:!suggestbaw *:#:{ inc %basuggest 1 | notice $nick [Suggested Barbarian Assualt world $2 |Count: %basuggest $+ . Suggested by $nick . } on *:TEXT:!baw:#: { inc %bacount 1 | notice $nick 3[12Barbarian-Assualt World -4 %baworld $+ 12. Set by %nick $duration($calc($ctime - %ht)) ago $+ .3| 12Times used: %bacount ] } on *:TEXT:!world:#80+pc.staff,#aak: { inc %pcwcount 1 | notice $nick 3[12Pest-Control World -4 %world $+ 12. Set by %nick $duration($calc($ctime - %ht)) ago $+ .3| 12Times used: %pcwcount ] } on *:TEXT:!pcw:#80+pc.staff,#aak: { inc %pcwcount 1 | notice $nick 3[12Pest-Control World -4 %world $+ 12. Set by %nick $duration($calc($ctime - %ht)) ago $+ .3| Times used: %pcwcount ] } on *:TEXT:!users:#: { notice $nick There are currently $nick($chan,0) users on $chan $+ . $nick($chan,0,o) Ops, $nick($chan,0,h) Halfops, $nick($chan,0,v) Voiced, and $nick($chan,0,r) Regular. } on *:TEXT:@users:#: { msg $chan There are currently $nick($chan,0) users on $chan $+ . $nick($chan,0,o) Ops, $nick($chan,0,h) Halfops, $nick($chan,0,v) Voiced, and $nick($chan,0,r) Regular. } on *:TEXT:!calc *:#: { notice $nick $2- = $calc($2-) } on *:TEXT:!pcwcount*:*: { /notice $nick The !pcw/!world Command count: %pcwcount } on *:TEXT:!bacount*:*: { /notice $nick The !baw Command count: %bacount } on *:TEXT:!pcwrehash *:#80+pc,#80+pc.staff: { if ( $nick isop $chan || $nick ishop $chan ) { msg $chan 3Rehasing the Bot. The Scripts will reload in $2 seconds. During this time, !pcw, !world, and all my other bot commands will be disabled temporarily. | remote off | timer 1 $2 remote on | timer 1 $calc($2 - 1) msg $chan 3The Scripts have been reloaded. } } on $*:TEXT:$(/^(?>\\Q $+ $me $+ \\E,? ?)?([!@]price)/Si):*:{ if (($readini(dchans.ini, dchans, $chan) == on) && ($me !isin $1)) /halt /tokenize 32 $iif($me isin $1,$deltok($1-,1,32),$1-) if (!$2) { .notice $nick No item entered. } ;;; Loops through the sockets to find the first open one.;;; else { var %x = 1 while ($sock($+(Price.,%x))) { inc %x } ;;; Set vars and open socket;;; set $+(%,price.target,.,%x) $iif($left($1,1) == @ && ($nick !isreg $chan),.msg $chan,.notice $nick) set $+(%,price.search,.,%x) $replace($2-,$chr(32),+) sockopen $+(Price,.,%x) www.o-ss.net 80 } } On *:SockOpen:Price.*:{ var %id = $right($sockname,-6) sockwrite -nt $sockname GET /parsers/price.php?item= $+ $eval($+(%,price.search,.,%id),2) HTTP/1.1 sockwrite -nt $sockname Host: www.o-ss.net $+ $crlf $+ $crlf } On *:SockRead:Price.*:{ var %id = $right($sockname,-6) var %target = $eval($+(%,price.target,.,%id),2) if ($sockerr) { %target A socket error has occured, please try again later. /cleanup %id /halt } ;;; Opens an Infinate loop to find results;;; /var %read /sockread %read /tokenize 32 %read if (*END* iswm $1-) { /inc %matches. [ $+ [ %id ] ] /set %results. [ $+ [ %id ] ] $(%results. [ $+ [ %id ] ],2) $iif(%results. [ $+ [ %id ] ],$col1($+($chr(2),$chr(124),$chr(2))),$chr(32)) $col2($deltok($1-,$0,32)) } if (DONE isin $1-) { if (!%matches. [ $+ [ %id ] ]) { %target $col1(No matches found) /cleanupr %id } if (%matches. [ $+ [ %id ] ]) { %target $col1(Returning) $col2(%matches. [ $+ [ %id ] ]) $col1(results:) %target %results. [ $+ [ %id ] ] /cleanupr %id } } } ;;; Local aliases for running the script.;;; alias -l col1 { return $+($chr(3),2,$1-,$chr(3)) } alias -l col2 { return $+($chr(3),10,$1-,$chr(3)) } alias -l cleanupr { sockclose price. $+ $1 unset $+(%,Price,.,*,.,$1) unset %matches. [ $+ [ $1 ] ] unset %results. [ $+ [ $1 ] ] } alias c1 { return $+( 4 $1-,) } alias c2 { return $+( 7 $1-,) } on *:text:*:#: { tokenize 32 $strip($1-) if ($left($1,1) !isin @!.) halt if ($right($1,-1) == stats) var %style = astats elseif ($regex($1,/co?mb(at)?/Si)) var %style = combat elseif ($setskill($remove($1,@,!,.))) var %style = istat, %skill = $setskill($remove($1,@,!,.)) elseif ($right($1,-1) == defname) && ($2) { writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($2-,$chr(32),-) .notice $nick 7You're default RSN for the host 4 $mask($fulladdress,3) 7has been set to $2- halt } else halt inc %ID if ($len($2-) > 12) { 4 $($+(%,stats.display.,%ID),2) $c1(The nick) $c2($2-) $c1(is too long) cleanup %ID halt } elseif ($2) set $+(%,stats.rsn.,%ID) $replace($2-,$chr(32),-) elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) set $+(%,stats.rsn.,%ID) $ifmatch elseif ($readini(DefRSN.ini,RSNs,$nick)) set $+(%,stats.rsn.,%ID) $ifmatch else set $+(%,stats.rsn.,%ID) $nick set $+(%,stats.style.,%ID) %style set $+(%,stats.skill.,%ID) %skill set $+(%,stats.display.,%ID) $iif($left($1,1) == @,msg $chan,notice $nick) sockopen $+(stats.,%ID) hiscore.runescape.com 80 } on *:sockopen:stats.*: { var %id = $gettok($sockname,2,46) sockwrite -n $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ $($+(%,stats.rsn.,%ID),2) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf } on *:sockread:stats.*: { sockread &Incoming bwrite $sockname -1 -1 &Incoming if ($bfind(&Incoming, 1, ).text) makehash $sockname elseif ($bfind(&Incoming, 1, does not feature in the hiscores.).text) { $($+(%,stats.display.,%ID),2) $c1(The nick) $c2($($+(%,stats.rsn.,%ID),2)) $c1(Does not appear in the hiscores) cleanup $gettok($sockname,2,46) } } alias -l makehash { var %file = $1 bread %file 1 $file(%file).size &stats var %currentstat, %x = 1 while (%x) { var %x = $bfind(&stats,$calc(%x + 1),