on *:join:#pc90elites: { if ($nick = Daystar1124) /msg $chan 11,12 It's Daystar1124! Run and hide! elseif ($nick = jmk10) /msg $chan Hey, its our leader, welcome!!! else /msg $chan /bs say #pc90elites @cmb $nick } on *:TEXT:!change *:#pc90elites:{ if ($nick isop $chan) || ($nick ishop $chan) || { /set %pcsettime $ctime /set %nick $nick /set %pcw $2- /set %pcsettime $ctime /set %nick $nick /msg $chan 12The Pest control world has been updated. Type 4!pcw 12to see it. else { /notice $nick You NEED Voice or higher to use the !change command. } } on *:text:!pc:#pc90elites: { /inc %countpcw 1 /notice $nick 12Current PC World is4 %pcw 12Last Updated:4 $+($duration($calc($ctime - %pcsettime)),) - 12Last Set by:4 %nick 12This command has been used4 %countpcw times $+ . } } on *:text:!pcw:#pc90elites: { /inc %countpcw 1 /notice $nick 12Current PC World is4 %pcw 12Last Updated:4 $+($duration($calc($ctime - %pcsettime)),) - 12Last Set by:4 %nick 12This command has been used4 %countpcw times $+ . } } on *:text:!world:#pc90elites: { /inc %countpcw 1 /notice $nick 12Current PC World is4 %pcw 12Last Updated:4 $+($duration($calc($ctime - %pcsettime)),) - 12Last Set by:4 %nick 12This command has been used4 %countpcw times $+ . } } on *:text:!startpcw:#pc90elites: { /set %pcstarttime $ctime } on *:text:!endpcw:#pc90elites: { notice $nick That game lasted: $+($duration($calc($ctime - %pcstarttime)),) } } } on $*:TEXT:$(/^(?>\Q $+ $me $+ \E,? ?)?([!.@~]price)/Si):#dragon_knight, #pc90elites:{ 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 ] ] } /var %world on $*:TEXT:/^[!@]setpcw */Si:*: { if ($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice $chan) { /set %setpc $calc( $readini( setpcw.ini, $nick, Set ) +1) /writeini setpcw.ini $nick Set %setpc if ($2 == 2) || ($2 == 6) || ($2 == 9) || ($2 == 12) || ($2 == 18) || ($2 == 22) || ($2 == 23) || ($2 == 24) || ($2 == 26) || ($2 == 27) || ($2 == 28) || ($2 == 31) || ($2 == 36) || ($2 == 42) || ($2 == 44) || ($2 == 48) || ($2 == 53) || ($2 == 54) || ($2 == 56) || ($2 == 58) || ($2 == 59) || ($2 == 60) || ($2 == 64) || ($2 == 65) || ($2 == 66) || ($2 == 69) || ($2 == 70) || ($2 == 71) || ($2 == 76) || ($2 == 77) || ($2 == 78) || ($2 == 79) || ($2 == 82) || ($2 == 83) || ($2 == 84) || ($2 == 88) || ($2 == 89) || ($2 == 91) || ($2 == 92) || ($2 == 97) || ($2 == 98) || ($2 == 99) || ($2 == 100) || ($2 == 103) || ($2 == 104) || ($2 == 110) || ($2 == 111) || ($2 == 112) || ($2 == 114) || ($2 == 115) || ($2 == 116) || ($2 == 120) || ($2 == 121) || ($2 == 123) || ($2 == 124) || ($2 == 129) || ($2 == 130) || ($2 == 131) || ($2 == 132) || ($2 == 137) || ($2 == 138) { if ($2 == %world) { notice $nick 14That 7world14 is already set! halt } set %world $2 set %nic $nick set %pcsettime. [ $+ [ $chan ] ] $ctime /msg #Daystar 14 $nick has set the 7Pc World15 - 14Type 7!pcw 14or 7!world 14to see the world. } } } on $*:TEXT:/^[@!.](pcw|world)*$/Si:#dragon_knight, #pc90elites:{ /set %used $calc( ( %used ) + 1) if (($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice $chan)) { /notice $nick 14The 7PC World 14is 7 %world 14 set by 7 %nic 14- 4Set $duration($calc( $ctime - %pcsettime. [ $+ [ $chan ] ] )) Ago.14 - Used %used Times. To change the World type !setpcw *** } else { /notice $nick 14The 7PC World 14is 7 %world 14 set by 7 %nic 14- 4Set $duration($calc( $ctime - %pcsettime. [ $+ [ $chan ] ] )) Ago.14 - Used %used Times. } } on 1:TEXT:!suggest*:#dragon_knight, #pc90elites:{ if ($2 == %worlds) { /notice $nick That world has already been suggested! halt } set %worlds $2 $3 $4 $5 $6 $7 $8 set %suggest $nick /msg #daystar1124 14 Thank you for the 7world14 suggestion7 $nick } on 1:TEXT:!viewpcw*:#dragon_knight:{ if ($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice %chan) { /notice $nick %suggest Suggested world %worlds } else { halt } } alias c1 { return $+( 14 $1-,) } alias c2 { return $+( 5 $1-,) } on *:text:!stats*:#Dragon_knight, #pc90elites: { tokenize 32 $strip($1-) if ($left($1,1) !isin @!.) halt if ($right($1,-1) == stats) var %style = astats elseif ($regex($1,/co?mb(at)?/Si)) var %style = combat elseif ($setskill($remove($1,@,!,.))) var %style = istat, %skill = $setskill($remove($1,@,!,.)) elseif ($right($1,-1) == defname) && ($2) { writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($2-,$chr(32),-) .notice $nick You're default RSN for the host $mask($fulladdress,3) has been set to $2- halt } else halt inc %ID if ($len($2-) > 12) { $($+(%,stats.display., %ID),2) $c1(The name) $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 name) $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),