alias -l tc1 { return $+(07,$1-,) } alias -l tc2 { return $+(04,$1-,) } alias -l randomcat { var %cats = $findfile(trivcat,*.txt,0) var %i = $r(1,%cats) return $remove($findfile(trivcat,*.txt,%i),$mircdir) } alias -l getq { var %cat = $iif(%trivia.cat. [ $+ [ $1 ] ] == $null,$randomcat,%trivia.cat. [ $+ [ $1 ] ]) return $read(%cat) } alias -l ask { set %triv.l. [ $+ [ $1 ] ] $getq($1) set %triv.q. [ $+ [ $1 ] ] $gettok(%triv.l. [ $+ [ $1 ] ],1,124) set %triv.a. [ $+ [ $1 ] ] $gettok(%triv.l. [ $+ [ $1 ] ],2-,124) msg $1 $tc1([TRIVIA QUESTION]) $tc2(%triv.q. [ $+ [ $1 ] ]) .timertriv [ $+ [ $1 ] ] 1 30 timeout $1 } alias -l timeout { .timertriv [ $+ [ $1 ] ] off msg $1 $tc1(Times Up! The correct answer is) $tc2(%triv.a. [ $+ [ $1 ] ]) unset %triv.*. [ $+ [ $1 ] ] ask $1 } alias -l correct { .timertriv [ $+ [ $2 ] ] off msg $2 7C9o8n13g11r4a13t12u6l7a9t4i3o10n11s12! $tc2($1) $tc1(got the right answer!) $tc2($+([,$gettok(%triv.a. [ $+ [ $2 ] ],1,124),])) unset %triv.*. [ $+ [ $2 ] ] ask $2 } on *:TEXT:!thelp:#:{ .notice $nick Use !trivia [category] to begin a game .notice $nick Use !categories to view available categories .notice $nick Use !strivia to stop trivia } on $*:TEXT:/^[@!]cat[ae]gories$/:#:{ var %d = $iif($left($1,1) == @,msg $chan,.notice $nick) var %i = 0 while (%i < $findfile(trivcat,*.txt,0)) { inc %i 1 %d $remove($nopath($findfile(trivcat,*.txt,%i)),.txt) :: $lines($remove($findfile(trivcat,*.txt,%i),$mircdir)) Question(s) } } on *:TEXT:!strivia:#:{ if ($timer(triv [ $+ [ $chan ] ]) != $null) { .timertriv [ $+ [ $chan ] ] off msg $chan $tc1(Trivia stopped by) $tc2($nick) $+ $tc1(. Thanks for Playing!) unset %triv.*. [ $+ [ $chan ] ] unset %trivia.*. [ $+ [ $chan ] ] } } on *:TEXT:!trivia*:#:{ if ($timer(triv [ $+ [ $chan ] ]) == $null) { if ($2) && ($findfile(trivcat,$2- $+ .txt,1) != $null) { set %trivia.cat. [ $+ [ $chan ] ] $remove($findfile(trivcat,$2- $+ .txt,1),$mircdir) } ask $chan } } on *:TEXT:*:#:{ if ($timer(triv [ $+ [ $chan ] ]) != $null) { var %i = 0 while (%i < $numtok(%triv.a. [ $+ [ $chan ] ],124)) { inc %i 1 if ($+(*,$gettok(%triv.a. [ $+ [ $chan ] ],%i,124),*) iswm $1-) { correct $nick $chan } } } } alias c1 { return $+(,$1-) } alias c2 { return $+(,$1-) } on *:text:!calc*:#:{ if ($2 == $null) { notice $nick Error - You Didn't Specify An Equasion To Solve | halt } else { notice $nick The answer to $2- is.. $calc($replace($2-,k,000,m,000000,c,00) $2- )) } } dialog hamLIST { title "HamLIST Blacklist Script" size -1 -1 294 215 option dbu list 1, 20 32 238 90, size box "Hostmasks:", 2, 11 17 259 124 button "Remove", 3, 98 124 37 12 button "Update", 4, 60 124 37 12 edit "", 5, 20 152 238 10 button "Add", 6, 22 124 37 12 box "Add Hostmask:", 7, 11 143 260 24 text "HamLIST Blacklist Script", 8, 15 4 121 12 button "OK", 9, 43 179 37 12, ok button "Cancel", 10, 81 179 37 12, cancel } on *:DIALOG:HamLIST:sclick:6:{ set %hlist.hmask $did(HamLIST,5).text write HamLIST.txt %hlist.hmask did -a HamLIST 1 %hlist.hmask scanchannels } on *:DIALOG:HamLIST:sclick:3:{ set %hlist.remove $did(HamLIST,1,1).sel write -ds $+ $did(HamLIST,1,1).seltext HamLIST.txt did -d HamLIST 1 %hlist.remove } on *:DIALOG:HamLIST:sclick:4:{ set %hlist.update $did(HamLIST,5).text write -ds $+ $did(HamLIST,1,1).seltext HamLIST.txt write HamLIST.txt %hlist.update did -o $did(HamLIST,1,1).sel %hlist.update } alias hamlist { dialog -ma hamlist hamlist } on *:join:#:{ if ( $nick == $me ) { scanchannel $chan } else { docheck $nick $chan } } alias docheck { var %hlist.read2 1 while (%hlist.read2 <= $lines(hamlist.txt)) { if ( $mask($read(hamlist.txt,%hlist.read2),5) iswm $address($$1,5) ) { mode $chan +b $read(hamlist.txt,%hlist.read2) inc %kicks 1 kick $2 $$1 You have been HamLISTED) ( $+ %kicks dudes kicked } inc %hlist.read2 1 } } menu channel { HamLIST:/HamLIST } menu status { HamLIST:/HamLIST } menu query { HamLIST:/HamLIST } menu menubar { HamLIST:/HamLIST } menu nicklist { HamLIST .Add Address ..$+ $address($$1,1) $+ :/hamlist | /set %hlist.hmask $address($$1,1) | /did -a HamLIST 5 %hlist.hmask ..$+ $address($$1,2) $+ :/hamlist | /set %hlist.hmask $address($$1,2) | /did -a HamLIST 5 %hlist.hmask ..$+ $address($$1,3) $+ :/hamlist | /set %hlist.hmask $address($$1,3) | /did -a HamLIST 5 %hlist.hmask ..$+ $address($$1,4) $+ :/hamlist | /set %hlist.hmask $address($$1,4) | /did -a HamLIST 5 %hlist.hmask ..$+ $address($$1,5) $+ :/hamlist | /set %hlist.hmask $address($$1,5) | /did -a HamLIST 5 %hlist.hmask } on *:DIALOG:hamLIST:init:0:{ var %hlist.read 1 while (%hlist.read <= $lines(hamlist.txt)) { did -a hamLIST 1 $read(hamlist.txt,%hlist.read) inc %hlist.read 1 } } on *:text:*:#:{ docheck $nick } on *:action:*:#:{ docheck $nick } on *:mode:#:{ docheck $nick } alias scanchannels { var %sc 1 while (%sc <= $chan(0)) { var %sn 1 while (%sn <= $nick($chan(%sc),0)) { var %hlist.read2 1 while (%hlist.read2 <= $lines(hamlist.txt)) { if ( $mask($read(hamlist.txt,%hlist.read2),5) iswm $address($nick($chan(%sc),%sn),5) ) { mode $chan(%sc) +b $read(hamlist.txt,%hlist.read2) inc %kicks 1 kick $chan(%sc) $nick($chan(%sc),%sn) You have been HamLISTED) ( $+ %kicks dudes kicked } inc %hlist.read2 1 } inc %sn 1 } inc %sc 1 } } alias scanchannel { var %sn 1 while (%sn <= $nick($1,0)) { var %hlist.read2 1 while (%hlist.read2 <= $lines(hamlist.txt)) { if ( $mask($read(hamlist.txt,%hlist.read2),5) iswm $address($nick($1,%sn),5) ) { mode $1 +b $read(hamlist.txt,%hlist.read2) inc %kicks 1 kick $1 $nick($1,%sn) You have been HamLISTED) ( $+ %kicks dudes kicked } inc %hlist.read2 1 } inc %sn 1 } } on *:TEXT:!kick *:#:{ if (($nick isop $chan) || ($nick ishop $chan)) || ($nick isvoice $chan) { if (!$($+(%,kick.,$2),2)) { /set $+(%,kick.,$2) 1 /kick $chan $2 Reason: $3- (This is your first warning, twice more and you will be banned.) } elseif ($($+(%,kick.,$2),2) == 1) { /inc $+(%,kick.,$2) /kick $chan $2 Reason: $3- (You have already been warned, once more and you will be banned.) } elseif ($($+(%,kick.,$2),2) == 2) { /mode $chan +b $address($2,2) | /kick # $2 Reason: $3- (You have been warned twice already. Kick-Banned) /unset $+(%,kick.,$2) } } } on *:text:!ns*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan +b ~q: $+ $address($2,2) } } on *:text:!nds*:#:{ if ($nick isop $chan) || ($nick ishop $chan) { mode $chan -b ~q: $+ $address($2,2) } } on *:text:!tb*:#:{ if ($2 isop $chan) || ($2 ishop $chan) { notice $nick I have been forbidden to use this command on Operators and Half-Operators! halt } else { if ($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice $chan) { inc %kcount /ban -ku $+ $calc( $3 * 60 ) $chan $2 2 Reason: $4- - $3 Minute Ban - Noobs Pwnt: ( %kcount ) } } } on *:text:!time*:#:{ if ($2 == s) { notice $nick Converting $3 seconds into minutes... $calc( $3 / 60 ) minutes. } else { if ($2 == m) { notice $nick Converting $3 minutes into seconds... $calc( $3 * 60 ) seconds. } } } alias cbl { dialog -ma cbl cbl } alias abl { if ($1 == $null) { if ($readini(cbl.ini,chans,$chan) == $null) { writeini cbl.ini chans $chan $chan } } elseif ( $left($1,1) == $chr(35)) { if ($readini(cbl.ini,chans,$1) == $null) { writeini cbl.ini chans $1 $1 } } else { if ($readini(cbl.ini,chans,$chr(35) $+ $1) == $null) { writeini cbl.ini chans $chr(35) $+ $1 $chr(35) $+ $1 } } } dialog cbl { title "BLIST" size -1 -1 73 40 option dbu text "AlternativeNick", 1, 130 57 30 5 check "Add Channels on Kick", 4, 6 3 65 10 text "Kicks Before Added", 5, 4 14 46 8 edit "", 6, 54 13 13 10 button "Close", 7, 43 25 27 12, ok button "Channels", 2, 3 25 37 12 } dialog viewbadchannelsthingy { title "BChan" size -1 -1 76 90 option dbu list 1, 2 1 71 73, size button "Add", 2, 38 75 34 12 button "Remove", 3, 2 75 34 12 } on *:DIALOG:cbl:init:*:{ did -a $dname 6 $readini(cbl.ini,setup,kicklimit) if ($readini(cbl.ini,setup,kick) == 1) { did -c $dname 4 } } on *:DIALOG:cbl:sclick:2:{ dialog -ma viewbadchannelsthingy viewbadchannelsthingy } on *:DIALOG:cbl:close:*:{ writeini cbl.ini setup kicklimit $did($dname,6).text writeini cbl.ini setup kick $did($dname,4).state } on *:DIALOG:viewbadchannelsthingy:init:*:{ var %i = 0 while (%i < $ini(cbl.ini,chans,0)) { inc %i 1 did -a $dname 1 $readini(cbl.ini,chans,$ini(cbl.ini,chans,%i)) } } on *:DIALOG:viewbadchannelsthingy:sclick:2:{ .echo -q $$?="Channel to Add" if ( $left($!,1) == $chr(35)) { if ($readini(cbl.ini,chans,$!) == $null) { writeini cbl.ini chans $! $! did -a $dname 1 $! } } else { if ($readini(cbl.ini,chans,$chr(35) $+ $!) == $null) { writeini cbl.ini chans $chr(35) $+ $! $chr(35) $+ $! did -a $dname 1 $chr(35) $+ $! } } } on *:DIALOG:viewbadchannelsthingy:sclick:3:{ if ($did($dname,1).seltext != $null) { var %var = $did(viewbadchannelsthingy,1).seltext did -d viewbadchannelsthingy 1 $ini(cbl.ini,chans,%var) remini cbl.ini chans %var } } on *:KICK:#:{ if ($knick == $me) && ($readini(cbl.ini,setup,kick) == 1) { writeini cbl.ini kicks $chan $calc($readini(cbl.ini,kicks,$chan) + 1) if ($readini(cbl.ini,kicks,$chan) >= $readini(cbl.ini,setup,kicklimit)) { writeini cbl.ini chans $chan $chan } } } on *:JOIN:#:{ if ($nick == $me) { if ($readini(cbl.ini,chans,$chan) != $null) { part $chan Channel Blacklisted halt } } } on *:INVITE:#:{ if ( $readini(cbl.ini,chans,$chan == $null) { join $chan } else { halt } } 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) == setrsn) && ($2) { if ($2 == -h) { writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($3-,$chr(32),-) .notice $nick You're default RSN for the host $mask($fulladdress,3) has been set to $3- } else { writeini DefRSN.ini RSNs $nick $replace($2-,$chr(32),-) .notice $nick You're default RSN for the nick $nick 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),