;OmegaScript v2.3 ;Written by Adam- on *:CONNECT: { mode $me +TBpR .timercc $+ $network 0 120 chancheck } on *:DISCONNECT: { timers off unsetall } 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) } } on *:PART:#: { if ($nick != $me) { if ($nick($chan,0) < 4) { part $chan You need at least two other people to keep me. } } if ($nick == $me) { ;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:#: haltdef on $*:TEXT:/^[!@]rank (duel|bounty|rogues)/Si:#: { if ($3 !isnum) { $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) *** $+($chr(91),$c1($nick,Error),$chr(93),:) $c2($nick,You must put a valid number.) halt } var %x 1 while ($sock(rankminigame. $+ %x)) { inc %x } if (duel isin $2) var %type 0 elseif (bounty isin $2) var %type 1 elseif (rogues isin $2) var %type 2 sockopen $+(rankminigame.,%x) hiscore.runescape.com 80 sockmark $+(rankminigame.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $3 $+ ~ $+ $nick $+ ~ $+ %type } on *:SOCKOPEN:rankminigame.*: { tokenize 126 $sock($sockname).mark sockwrite -nt $sockname GET /overall.ws?category_type=1&table= $+ $4 $+ &rank= $+ $2 HTTP/1.1 sockwrite -nt $sockname Host: hiscore.runescape.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:rankminigame.*: { tokenize 126 $sock($sockname).mark var %read sockread %read if (AA0022 isincs %read) { if ($remove($gettok(%read,2,62),$chr(44), isin %read) { if ($5) { $1 *** $+($chr(91),$c1($3,$iif($4 == 0,Dueling,$iif($4 == 1,Bounty Hunters,Bouty Hunter Rogues))),$chr(93),:) $c2($3,Rank) $+ : $c1($3,$2) $chr(124) $c2($3,Name) $+ : $c1($3,$5) $chr(124) $c2($3,Score) $+ : $c1($3,$6) } else { $1 *** $+($chr(91),$c1($3,$iif($4 == 0,Dueling,$iif($4 == 1,Bounty Hunters,Bouty Hunter Rogues))),$chr(93),:) $c2($3,Rank) $c1($3,$2) $c2($3,not found.) } sockclose $sockname } } on $*:TEXT:/^[!@](rsnews|news)/Si:#: { var %x 1 while ($sock(rsnews. $+ %x)) { inc %x } sockopen $+(rsnews.,%x) runescape.com 80 sockmark $+(rsnews.,%x) $iif($left($1,1) == @,msg $chan,notice $nick) $+ ~ $+ $nick } on *:SOCKOPEN:rsnews.* { sockwrite -n $sockname GET /title.ws HTTP/1.1 sockwrite -n $sockname Host: runescape.com sockwrite -n $sockname $crlf } on *:SOCKREAD:rsnews.*: { var %read sockread %read if ( isin %read) { var %name $gettok($sock($sockname).mark,2,126) $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1(%name,RuneScape News),$chr(93),:) $qt($c1(%name,$remove($gettok(%read,4,62),= 5) { 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 assiciated 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)/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 while ($sock(alch. $+ %x)) { inc %x } sockopen $+(alch.,%x) tip.it 80 sockmark $+(alch.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $replace($2-,$chr(32),$chr(43)) $+ ~ $+ $nick } on *:SOCKOPEN:alch.*: { sockwrite -nt $sockname GET /runescape/index.php?rs2item=&orderby=0&keywords= $+ $gettok($sock($sockname).mark,2,126) $+ &Players=all&category=0&subcategory=0&cmd=8&action=Manage_Items&search=1&submit=Simple+Search HTTP/1.1 sockwrite -nt $sockname Host: tip.it sockwrite -nt $sockname $crlf } on *:SOCKREAD:alch.*: { var %read sockread %read if (No items matched isin %read) { $gettok($sock($sockname).mark,1,126) *** $+($chr(91),$c1($gettok($sock($sockname).mark,3,126),Item),$chr(93),:) $c2($gettok($sock($sockname).mark,3,126),No items matched your search.) sockclose $sockname halt } if ($eval(