on *:TEXT:!Start:#:{ msg $nick Hi, and thanks for your interest in King-Jad. There are two ways to have this Bot in your channel. msg $nick 1. In your channel, type "/invite King-Jad channel" msg $nick 2. If you know that King-Jad has 5 or more access in your channel, simply type !invite King-Jad channel wherever King-Jad is. msg $nick Before inviting King-Jad into your channel, please read our Rules and Regulations, by typing !Policy msg $nick When you're finished, type !bye to make King-Jad leave your channel, failure to do so will end in channel Blacklisting. } ==== on *:op:#: { if ($opnick == $me) { inc %aop 1 | msg $chan Thanks for making me an 4Operator1 $nick (I've been Op`ed %aop Times) } } on *:help:#: { if ($hnick == $me) { inc %ho 1 | msg $chan Thanks for making me a 7Half-Op1 $nick (I've been HalfOp`ed %ho Times) } } on *:voice:#: { if ($vnick == $me) { inc %vo 1 | msg $chan Thanks for making me a 2Voiced Member1 $nick (I've been Voiced %vo Times) } } on *:text:!protect*:#:{ if ($nick isop $chan) && ($2- == $me) { inc %prot 1 | msg $chan Thanks for the 3Protection1 $nick ! (I've been Protected %prot Times) } } on *:deop:#: { if ($opnick == $me) { inc %deaop 1 | msg $chan $nick took away my 4Operator Status1 - I'm sad now! (I've been De-Op`ed %deaop Times ) } } on *:dehelp:#: { if ($hnick == $me) { inc %dehop 1 | msg $chan $nick took away my 7Half-Op Status1 - I'm sad now! (I've been De-HalfOp`ed %dehop Times) } } on *:devoice:#: { if ($vnick == $me) { inc %devo 1 | msg $chan $nick took away my 2Voiced Status1 - I'm sad now! (I've been De-Voiced %Devo Times) } } ==== on *:TEXT:!invite*:#:{ if ($2 == $null) { msg $nick Thanks for your interest in King-Jad. Please specify a channel to have King-Jad in. msg $nick To do so, type !invite channel. Thanks! } else { cs invite $2- } } ==== on *:INVITE:#: { invite $active $read(bots.txt) } ==== on $*:TEXT:!tb*:#:{ if ($nick isop $chan || $nick ishop $chan) { ban -ku $+ $calc($2 * 60) $chan $3 2 Time-banned for $2 minute(s) by $nick $+ . Reason: $4- } } ==== On *:INVITE:#:{ join $chan | .timer 1 1 .signal -n bot_join $nick $chan } On *:SIGNAL:bot_join:{ If ($1 isop $2) || ($1 ishop $2) { Msg $2 Thanks For Inviting me! - To view my command list, type !Commands, and to make me leave the channel, simply type !bye. Please do not PM this Bot, unless you would like to submit a script. Type !Help if you need help from one of the Bot's Staff Team. Do not flood this Bot or your channel will be blacklisted. If you'd like to have Supremacy auto-join your channel on connect, simply Memo Supremacy. } Else { part $2 Invited By Non Op $+($1,.) Please Have an Op or Halfop Invite me, thanks! } } ==== on *:TEXT:!bye*:#:{ if ( $nick isop $chan ) || ( $nick ishop $chan ) { /msg $chan Thankyou for using 4King-Jad. 1Please don't hesitate to invite me in again, by typing /invite Supremacy Channel. See you soon! /leave $chan } else { /notice $nick Only Operators and Half-Operators can use this command, sorry. } } on *:TEXT:!leave*:#:{ if ( $nick isop $chan ) || ( $nick ishop $chan ) { /msg $chan Thankyou for using 4King-Jad. 1Please don't hesitate to invite me in again, by typing /invite Supremacy Channel. See you soon! /leave $chan } else { /notice $nick Only Operators and Half-Operators can use this command, sorry. } } on *:TEXT:!part*:#:{ if ( $nick isop $chan ) || ( $nick ishop $chan ) { /msg $chan Thankyou for using 4King-Jad. 1Please don't hesitate to invite me in again, by typing /invite King-Jad Channel. See you soon! /leave $chan } else { /notice $nick Only Operators and Half-Operators can use this command, sorry. } } ==== on *:TEXT:!setpcw *:*:{ if ($nick isop $chan) || ($nick ishop $chan) { if ($2- isnum 2-132) { set $+(%,pcw.,$chan) $2- | set $+(%,pcw.,$chan,.nick) $nick | set $+(%,pcw.,$chan,.time) $ctime | .notice $nick New PCW! The New PCW was Set by $eval($+(%,pcw.,$chan,.nick),2) $+ ! Type !pcw To View the Updated World. } } } on *:text:!pcw:*:{ .notice $nick 11 The 4 PCW 9 For $chan is Currently: 4 $eval($+(%,pcw.,$chan),2) $+ . 11 And Was Last Set $duration($calc($ctime - $($+(%,pcw.,$chan,.time),2))) ago by 9 $($+(%,pcw.,$chan,.nick),2) $+ . } } ==== on *:TEXT:!Commands*:#: { if ( $2 == $null) { notice $nick ==Commands Index!== notice $nick !commands General - General Commands Menu notice $nick !commands Sockets - Socket Commands Menu notice $nick !commands Admin - Operator Commands Menu notice $nick !commands Fun - Fun Command Menu } else if ( $2 == Admin ) { notice $nick ==Admin Commands== notice $nick !TB Minutes nick Reason - Time Ban's a User notice $nick !part - Part's King-Jad from Channel notice $nick !setpcw - Sets your channel's PCW } else if ( $2 == Fun ) { notice $nick ==Fun Commands== } else if ( $2 == General ) { notice $nick ==General Commands == notice $nick !Power - Shows how much power King-Jad has. notice $nick !PCW - Shows your channel's PCW. } else if ( $2 == Sockets ) { notice $nick ==Socket Commands== notice $nick !Stats name - Shows your Stats! (Includes !skill commands) } } ==== on *:TEXT:!Power*:#:{ /power } alias power { var %op = 0, %halfop = 0, %voice = 0, %peons = 0, %total = 0, %chans = 0 var %a = 1 while (%a <= $scon(0)) { .scon %a var %b = 1 inc %chans $chan(0) while (%b <= $chan(0)) { if ($me isop $chan(%b)) { .inc %op | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,rh) | inc %b } elseif ($me ishop $chan(%b)) { inc %halfop | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,rh) | inc %b } elseif ($me isvoice $chan(%b)) { inc %voice | inc %total $nick($chan(%b),0) | inc %b } else { inc %total $nick($chan(%b),0) | inc %b } } inc %a } .scon -r msg $active My Status - 4 $+(OP- ,%op,/,%chans) 7 $+(HOP- ,%halfop,/,%chans) 2 $+(VOICE- ,%voice,/,%chans) 1- I control $+(%peons,/,%total) 3( $+ $calc((%peons / %total)*100) $+ % $+ )1 users over3 $scon(0) 1networks } =========================================== alias c1 { return $+(12,$1-) } alias c2 { return $+(04,$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) == setname) && ($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 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),