-
Posts
6030 -
Joined
-
Last visited
-
Days Won
17
Content Type
Profiles
Forums
Downloads
Gallery
Events
Articles
Posts posted by chain
-
-
This is a small collection of snippets I decided to make. This code is intended for a bot, and provides some games for channel use.
So far it has three games:
Bomb Game
Number Guess Game
*BlackjackI will add more here and there as I make them. The commands used to use each snippet are in comments above each game's code.
Do note that I have NOT included flood protection. If you would like flood protection, you will have to devise your own scheme until I have implemented one.
Likewise goes with usable channels, these scripts are currently set up to work on ALL channels your bot is in (though when activated, it will set the channel it was activated in as the channel it will work in temporarily, and all other channels are locked out of the game until the game is done. I'll improve on this later).
If you have any other SIMPLE game ideas, comment them here and I may look into implementing it.
;BotGames ;By IllogicTC ;1st Edition, 3 games. (12/26/2011 release) ;To use: Load this whole script into your bot and enjoy! ;NOTE: I have NOT included flood protection yet. Please exercise caution with unknown users. ;Feel free to edit any parameters to better suit your needs. ;Bomb Game, BotGames Edition ;By IllogicTC ;v1.0 12/26/2011 ;To trigger a game, use !bombgame. To cut a wire, use !cutwire <wire> on *:text:!bombgame:#: { if ($timer(bomb) != $null) return set %bgames_bomb_wires set %bgames_bomb_chan $chan var %t = $rand(15,45), %w = $rand(3,5), %wpick = red.orange.yellow.green.blue.purple.black.brown.white.gray while (%w) { var %g $rand(1,$numtok(%wpick,46)) set %bgames_bomb_wires %bgames_bomb_wires $gettok(%wpick,%g,46) var %wpick $deltok(%wpick,%g,46) dec %w } set %bgames_bomb_goodwire $gettok(%bgames_bomb_wires,$rand(1,$numtok(%bgames_bomb_wires,32)),32) msg $chan A bomb has been planted in the cookie factory! The wires are: %bgames_bomb_wires msg $chan Choose wisely, you only get one chance! You have %t seconds. .timerbomb 1 %t bombboom } on *:text:!cutwire*:#: { if ($chan == %bgames_bomb_chan) && ($timer(bomb) != $null) && ($2 isin %bgames_bomb_wires) { if ($2 == %bgames_bomb_goodwire) { msg %bgames_bomb_chan Congratulations! The bomb has been defused. Good job, $nick $+ $chr(33) .timerbomb off unset %bgames_bomb* } else { .timerbomb off bombboom } } } alias bombboom { msg %bgames_bomb_chan The bomb has exploded! $rand(10000,100000) cookies are lost in the explosion. unset %bgames_bomb* } ;END OF BOMB GAME ;Number Guess Game, BotGames Edition ;By IllogicTC ;v1.0 12/26/2011 ;To start, use !numberguess. To make a guess, use !ngguess <number>. Only one guess is allowed per person, and they cannot guess the same number. on *:text:!numberguess:#: { if ($timer(nggame) != $null) return set %bgames_ng_closest 101 set %bgames_ng_cguesser set %bgames_ng_chan $chan set %bgames_ng_guesses set %bgames_ng_guessnicks set %bgames_ng_number $rand(1,100) msg %bgames_ng_chan I'm thinking of a number between 1 and 100! Use !ngguess <number> to make a guess! Closest to my number wins! .timernggame 1 60 ng_results } on *:text:!ngguess*:#: { if ($timer(nggame) != $null) && ($chan == %bgames_ng_chan) && ($2 isnum 1-100) { if ($istok(%bgames_ng_guessnicks,$nick,32) == $false) { if ($istok(%bgames_ng_guesses,$2,32) == $true) { msg %bgames_ng_guesses Please pick a different number, $nick $+ . return } set %bgames_ng_guesses %bgames_ng_guesses $2 set %bgames_ng_guessnicks %bgames_ng_guessnicks $nick if ($2 == %bgames_ng_number) { msg %bgames_ng_chan $nick got it dead on! The number was %bgames_ng_number $+ . .timernggame off unset %bgames_ng* } else { if ($calc($2 - %bgames_ng_number) > 0) var %a $calc($2 - %bgames_ng_number) else var %a $calc(%bgames_ng_number - $2) if (%a < %bgames_ng_closest) { set %bgames_ng_closest %a set %bgames_ng_cguesser $nick } } } } } alias ng_results { msg %bgames_ng_chan The numbers game is up! if ($numtok(%bgames_ng_guessnicks,32) == 0) msg %bgames_ng_chan Nobody made a guess! Bummer. elseif ($numtok(%bgames_ng_guessnicks,32) == 1) msg %bgames_ng_chan %bgames_ng_cguesser wins by default, being the only guesser! They were off by %bgames_ng_closest $+ . else msg %bgames_ng_chan Out of $numtok(%bgames_ng_guessnicks,32) people with guesses, %bgames_ng_cguesser reigns supreme! They were %bgames_ng_closest off. My number was: %bgames_ng_number unset %bgames_ng* } ;END OF NUMBER GUESS GAME ;Blackjack, BotGames Edition ;By IllogicTC ;v1.0 12/26/2011 ;To start, type !blackjack. To hit, use !bhit. on *:text:!blackjack:#: { if ($timer(bj) != $null) return set %bgames_bj_deck A.2.3.4.5.6.7.8.9.10.J.Q.K.A.2.3.4.5.6.7.8.9.10.J.Q.K.A.2.3.4.5.6.7.8.9.10.J.Q.K.A.2.3.4.5.6.7.8.9.10.J.Q.K set %bgames_bj_chan $chan set %bgames_bj_nick $nick .timerbj 1 30 bj_results var %x $gettok(%bgames_bj_deck,$rand(1,52),46) set %bgames_bj_deck $deltok(%bgames_bj_deck,%x,46) var %y $gettok(%bgames_bj_deck,$rand(1,51),46) set %bgames_bj_deck $deltok(%bgames_bj_deck,%y,46) set %bgames_bj_phand %x %y if (%x == A) set %bgames_bj_total 11 else set %bgames_bj_total $replace(%x,J,10,Q,10,K,10) if (%y == A) { if (%x == A) inc %bgames_bj_total else inc %bgames_bj_total 11 } else inc %bgames_bj_total $replace(%y,J,10,Q,10,K,10) if (%bgames_bj_total != 21) msg $chan Your cards: %x %y $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) Use !bhit to try getting as close to 21 as possible without going over! You have 30 seconds. Dealer stands at 17! else { msg $chan You have a blackjack! .timerbj off bj_results } } on *:text:!bhit:#: { if ($timer(bj) != $null) && ($nick == %bgames_bj_nick) { var %x $rand(1,$numtok(%bgames_bj_deck,46)) var %y $gettok(%bgames_bj_deck,%x,46) set %bgames_bj_phand %bgames_bj_phand %y set %bgames_bj_deck $deltok(%bgames_bj_deck,%x,46) var %t = $numtok(%bgames_bj_phand,32), %n = 0, %a = 0 while (%t) { if ($gettok(%bgames_bj_phand,%t,32) == A) inc %a else inc %n $replace($gettok(%bgames_bj_phand,%t,32),J,10,Q,10,K,10) dec %t } if (%a > 0) { while (%a) { if ($calc(11 + %n) > 21) inc %n else inc %n 11 dec %a } } set %bgames_bj_total %n if (%bgames_bj_total > 21) { msg %bgames_bj_chan You have busted! Automatic loss :( Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) .timerbj off } elseif (%bgames_bj_total == 21) { msg %bgames_bj_chan You have reached 21! Now let's see how the dealer fared. .timerbj off bj_results } else msg %bgames_bj_chan Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) To stay, just wait for the round to end! } } alias bj_results { var %dh $rand(17,24) if (%dh <= 21) { if (%dh < %bgames_bj_total) msg %bgames_bj_chan You've won! Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) The dealer's hand: %dh elseif (%dh == %bgames_bj_total) msg %bgames_bj_chan Your hands are a tie! Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) The dealer's hand: %dh else msg %bgames_bj_chan You've lost! Your hand: %bgames_bj_phand $+($chr(40),%bgames_bj_total,$chr(41),$chr(46)) The dealer's hand: %dh } else msg %bgames_bj_chan The dealer has busted with %dh $+ ! You've won! unset %bgames_bj* } ;END OF BLACKJACK GAME
-
Intro: This is a remake of the very first version of a Mafia game I ran, and is considered to be a demo bot of the one ran on #Mafia on SwiftIRC. The code has been simplified for those who can't script too well, so it's easily adjustable, but at the same time I made it slightly more efficient. I've had two friends help me with various bits and pieces because at 3 AM I sometimes lose the ability to think.
About the game: Simply put, to win the game be the last team standing. There are three teams: Civilian Team (civilians, doctor, homeless bum, and detective), Mafia Team (mafia 1, mafia 2, etc), and Killer Team (killer alone). Before the game starts, the bot will query (PM) everybody to accept or reject a role, and that's how you know what role you are. If you reject, you'll either be given a different role if one is rejected, or you'll be a civilian. Every night everybody except the civilians have something to do, and the bot PMs everyone with his/her actions. During the day there's an optional voting to hang a person, if that person is hung, he/she dies and is taken out of the game.
Installation: To set up the bot, it's fairly easy, just copy the code below into the mIRC Remotes or Aliases tab (alt+R to get there). Upon loading the script it will set the very minimum variables it needs, such as the colors, and the like. By default the bot's nick will be MafiaGameBot, the password to identify via NickServ is PASSWORDGOESHERE, and the game channel is #MafiaGameChannel. To change either the nick or password use /set %BotsNick nick-here or /set %BotsPass password-here, or use an operator command, which is also talked about below. To change the gaming channel, use /set %GameChannel #Channel-here Upon connecting to the server the bot will join the channel, identify it's nick, and be ready to start playing.
Basic staff commands: There aren't very many of them, but then again, the original didn't have a lot anyway, and this does have just a few more than that one did. To register a user into the game, even if it's already playing, just use !reguser nick while being opped and/or halfopped. To stop the game, or prevent it from being played until a staff member allows it, use !stop, then either !start, !reg, or !reguser to get it going again. To end the registration process early and skip right to the role give out phase, staff can use the !endreg command. If for whatever reason the bot become unidentified with NickServ, staff can force it to change its nick to the proper nick and identify using the !ident command. Ops can also change a couple of variables for the bot, such as the colors, the nick's password, and so forth. This command is !set, and its syntax is as followed: !set VariableName value. The colors are probably going to be the most often ones change, and they are c1, c2, c3, c4, and c5 ordered from primary, secondary, and so on. To change the primary color, use !set c1 new-color-here. In example: !set c1 04. It has to be two digits, if not, it'll just give you an error. The rest of the set commands are just !set GameChanne, !set BotsNick, and !set BotsPass, fairly basic, which is key. !TakeOut will take the specified user out of the game.
Short list of commands: Not wanting to go into what each command does, but here's a short list of what they are: !start, !reg, !unreg, !killme, !reguser, !endreg, !stop, !endreg, !kick, !set, !kill, !check, !heal, !cancel, !yes, !no, !all, !stat, !q, !dur, !gamestat, !night, !sideswon, !invite, !takeout
Rules: The rules for this game can be found on the forum, which is http://mafbot.com/forum/index.php Though the most important part is to not play against your role, and don't give away your role to anybody that's currently in the game.
Conclusion: The bot has been tested, but as always, bugs/glitches/errors/mistakes/typos are expected, so if something doesn't go right, feel more than free to fix it yourself, or post on the forum, and it will be fixed. The same can be said you'd like something to be changed/tweaked/updated/added. Because this is open source, you can mess with the code as you please.
;LOAD THIS PART INTO THE REMOTES TAB alias c1 { return $+(,%c1,$1-) } alias c2 { return $+(,%c2,$1-) } alias c3 { return $+(,%c3,$1-) } alias c4 { return $+(,%c4,$1-) } alias c5 { return $+(,%c5,$1-) } on *:load:set %c1 14 | set %c2 10 | set %c3 07 | set %c4 05 | set %c5 11 | set %GameChannel #MafiaGameChannel | set %BotsNick MafiaGameBot | set %BotsPass PASSWORDGOESHERE | set %CiviliansWon 0 | set %MafiaWon 0 | set %KillerWon 0 | set %Ties 0 | set %GameCount 0 | set %Visitors 0 on *:text:!set*:?:{ if ($nick !isop %GameChannel) return if (!$2) { msg $nick $c2(You must first specify a parameter! | return } if (!$3) msg $nick $c2(Missing parameter!) if (($2 == c1) || ($2 == c2) || ($2 == c3) || ($2 == c4) || ($2 == c5) { if (!$3) { msg $nick $c2(Enter a digit from 00 to 15. | return } if ($len($2) != 2) { msg $nick $c2(Please enter a two digit number. In example: 04 for red, or 12 for blue.) | return } if (($3 > 15) || ($3 < 0)) { msg $nick $c2(The parameter must be between 00 and 12. | return } set % $+ $2 $3 msg $nick $c1(The value of) $c2($2) $c1(has been changed to) $c3($3) return } elseif ($2 == BotsNick) { if (!$3) { msg $nick $c2(Enter a nick that is alphanumeric or contains the following character: `^()|/ and does not start with a number) | return } set %BotsNick $3 } elseif ($2 == BotsPass) { if (!$3) { msg $nick $c2(Please specify a password without spaces) | return } set %BotsPass $3 } elseif ($2 == GameChannel) { if (!$3) { msg $nick $c2(Please specify a new game channel for the bot!) } if ($me !ison $3) { msg $nick $c2(I must first be on the channel and have operator status | return } if ($me !isop $3) { msg $nick $c2(I must first operator status in that channel) | return } if ($nick !isop $3) { msg $nick $c2(You must first obtain operator status in the channel before using this command) | return } set %GameChannel $3 } } on *:text:!start:%GameChannel:StartTheGame $nick on *:text:!done*:%GameChannel:{ if ((%GameIsPlayig == false) || ($GameIsStopped == true) || (%Voting == no) || ($nick != %CiviliansVictim)) return else { timers off | EndVoting } } on *:text:!cancel:?:{ if ((%GameIsPlaying == false) || (%GameIsStopped == true)) return if (($WhatIs($nick) == Detective) && (%DetectiveMoved == 1)) { set %DetectiveMoved 0 | msg %GameChannel $c1(For some reason the) $c3(detective) $c1(decided it would be best to rethink the plot and went home) } if (($read($m.txt,1) == $1) && (%MafiaMoved == 1)) { set %MafiaMoved 0 | msg %GameChannel $c1(For some reason the) $c3(mafia) $c1(wanted to switch out targets and went back to the drawing board) } if (($WhatIs($nick) == Doctor) && (%DoctorMoved == 1)) { set %DoctorMoved 0 | msg %GameChannel $c1(For some reason the) $c3(detective) $c1(decided it would be best to rethink the plot and went home) } } on *:text:!stat:%GameChannel:msg # $AllActiveRoles on *:text:!yes*:%GameChannel:VoteFor $nick on *:text:!no*:%GameChannel:VoteAgainst $nick on *:text:!dur:%GameChannel:if ($GameIsPlaying == true) # $c1(The game has been going on for) $c2($duration($calc($ctime - %dur)))) on *:text:!dur:?:if ($GameIsPlaying == true) $nick $c1(The game has been going on for) $c2($duration($calc($ctime - %dur)))) on *:text:!day:%GameChannel:if (%GameIsPlaying == true) { if (($nick isop $chan) | ($nick ishop $chan)) Day } on *:text:!ident:%GameChannel:if (($nick isop $chan) || ($nick ishop $chan) { /ns ghost %BotsNick %BotsPass | /nick %BotsNick | /ns identify %BotsPass } on *:text:!gamestat:%GameChannel:if (%GameIsPlaying == true) msg # $c1(Number of players:) $c2(%NumberOfPlayer) $c1(nights passed:) $c2(%nights) $c1(number of roles:) $c2($calc(%TotalMafia + %TotalDetective + %TotalKiller + %TotalDoctor + %TotalHomeless)) on *:text:!gamestat:?:if (%GameIsPlaying == true) msg $nick $c1(Number of players:) $c2(%NumberOfPlayer) $c1(nights passed:) $c2(%nights) $c1(number of roles:) $c2($calc(%TotalMafia + %TotalDetective + %TotalKiller + %TotalDoctor + %TotalHomeless)) on *:text:!nights:GameChannel:if (%GameIsPlaying == true) msg # $c1(There have been) $c2(%nights) $c1(nights so far.) on *:text:!nights:?:if (%GameIsPlaying == true) msg $nick $c1(There have been) $c2(%nights) $c1(nights so far.) on *:text:!games:%GameChannel:msg $chan $c1(There have been) $c2(%played) $c1(games in total...) on *:text:!games:?:$nick $c1(There have been) $c2(%played) $c1(games in total...) on *:text:!sideswon:%GameChannel:msg # $c1(The) $c3(civilians) $c1(have won) $c2(%CiviliansWon) $c1(times,) $c1(the) $c3(mafia) $c1(have won) $c2(%MafiaWon) $c1(times,) $c1(the) $c3(killer) $c1(has won) $c2(%KillerWon) $c1(times,) $c1(and there have been a total of) $c2(%Ties) $c1(ties.) on *:text:!sideswon:?:msg $nick $c1(The) $c3(civilians) $c1(have won) $c2(%CiviliansWon) $c1(times,) $c1(the) $c3(mafia) $c1(have won) $c2(%MafiaWon) $c1(times,) $c1(the) $c3(killer) $c1(has won) $c2(%KillerWon) $c1(times,) $c1(and there have been a total of) $c2(%Ties) $c1(ties.) on *:text:!rules:?: /msg $nick $c1(The basic rules of the game is to make sure that your team succeeds in surviving, and you do so according to your role. There are the) $c3(civilians, mafia, detective, killer, homeless bum) |msg $nick $c1(For more information about the roles, please type in) $c2(!roles) on *:text:!roles:?:msg $nick $c1(The) $c3(civilians) $c3(can't do a whole lot at night, they wait for the day, when they vote. The) $c3(Detective) $c1(can either check a player's role by) $c2(!check target) $c1(or kill one by) $c2(!kill target) $+ ($c1.) $c3(Mafia) $c1(can only kill, and it's the same way as the) $c3(detective) $c1(and the) $c3(killer) $c1(The) $c3(homeless) $c1(can only check, and same way as the) $c3(detective) $c1(while the) $c3(doctor) $c1(can heal a killed peson with) $c2(!heal) | /msg $nick $c1(For more information at what what happens in the day time, please type in) $c2(!day) on *:text:!day:?:msg $nick $c1(Right after everybody has made their moves, the day time comes. This is where everything that has been done is revealed, and those who are killed, are taken out of the game. Then we have the voting to see who the people (this includes everybody in the game) want to kill, giving the civilians a chance to get involved, for there's a lot of them. The voting is done by typing in) $c2(!nick) | msg $nick $c1(After that is done, the people decide on whether or not to hang the chosen one, by typing either) $c2(!yes) $c1(or) $c2(!no) on *:text:!q:%GameChannel:/msg # $c1(There are currently) $c2(%NumberOfPlayers) $c1(players.) on *:text:!q:?:/msg $nick $c1(There are currently) $c2(%NumberOfPlayers) $c1(players.) on *:text:!roles:%GameChannel:if (%GameIsPlaying == true) msg %GameChannel $c1(In total:) $c3(civilians -) $c2(%TotalCivilian) $c3(mafia -) $c2(%TotalMafia) $c3(killer -) $c2(%TotalKiller) $c3(doctor -) $c2(%TotalDoctor) $c3(detective -) $c2(%TotalDetective) $c3(homeless bum -) $c2(%TotalHomeless) on *:text:!endreg:%GameChannel:if (($nick isop $chan) || ($nick ishop #)) timers off | GiveOutRoles on *:connect:set %GameIsPlaying false | /ns ghost %BotsNick %BotsPass | /nick %BotsNick | /ns identify %BotsPass | join %GameChannel on *:text:!reguser*:%GameChannel:ReggedByOp $2 $nick on *:text:!reguser*:?:ReggedByOp $2 $nick on *:text:!reg:%GameChannel:reg $nick on *:text:!reg:?:reg $nick on *:text:!yes:?:AcceptRole $nick on *:text:!no:?:RejectRole $nick on *:text:!check*:?:check $2 $nick $3- on *:text:!kill*:?:kill $2 $nick $3- on *:text:!heal*:?:heal $2 $nick $3- on *:devoice:if ($nick != $me) %GameChannel:TakeOut $vnick on *:text:!killme:%GameChannel:TakeOut $nick on *:part:%GameChannel:Leaving $nick on *:quit:Leaving $nick on *:text:!unreg:%GameChannel:if (%Registration == on) TakeOut $nick on *:text:!Stop:%GameChannel: { if (($nick !isop #) && ($nick !ishop #)) return if (%GameIsStopped == true) return timers off set %GameIsStopped true set %GameIsPlaying false msg # $c2(The game has been stopped, and now only a staff member of the channel may start it!) } on *:text:!Stop:?: { if (($nick !isop %GameChannel) && ($nick !ishop %GameChannel)) return if (%GameIsStopped == true) return timers off set %GameIsStopped true set %GameIsPlaying false msg %GameChannel $c2(The game has been stopped, and now only a staff member of the channel may start it!) } on *:text:!TakeOut*:%GameChannel:if (($nick isop %GameChannel) || ($nick ishop %GameChannel)) TakeOut $2 on *:text:!*:%GameChannel:ThoseVoted $nick $1 on *:join:%GameChannel:JoinGameChannel $nick on *:text:!invite *:%CivilianChannel:if (($WhatIs($nick) == detective) || ($WhatIs($nick) == homeless)) invite $2 $chan | msg $2 $c1(You have been invited to $c2(%CivilianChannel) on *:text:!r *:#:if (($2 isnum) && ($3 isnum) && ($2 < $3) ($c1(Your random number is:) $c2($r($1,$2)) on *:kick:%GameChannel:Takeout $knick on *:nick:ChangedNick $nick $newnick on *:text:!version:*:msg $nick $c1(This version of the $c2(Mafia)$c1(/)$c2(Warewolf) $c2(game bot is) $c3(AV2 1.2.5) on *:text:!ver:*:msg $nick $c1(This version of the $c2(Mafia)$c1(/)$c2(Warewolf) $c2(game bot is) $c3(AV2 1.2.5) ;LOAD THIS PART INTO THE ALIASES TAB InGame { set %x 1 if ((%NumberOfPlayers == 0) || (%GameIsPlaying == false)) return no while ($read(l.txt,%x) != $null) { if ($1 == $read(l.txt,%x)) return yes inc %x } return no } EndRoles { timers off msg %GameChannel $c1(The game has been played for) $c2($duration($calc($ctime - %dur)))) $+ $c1(.) inc %Played if (%Nights > %MostNights) set %MostNights %Nights unset %Nights msg %GameChannel $c1(The roles were:) %x = 1 while ($read(w.txt,%x)) { %Player = $read(w.txt,%x) if (%Player != $null) msg %GameChannel $c3(Mafia %x $+ :) $c2(%Player) inc %x } set %Player %WasKiller if (%Player) msg %GameChannel $c3(Killer:) $c2(%Player) set %Player %WasDoctor if (%Player) msg %GameChannel $c3(Doctor:) $c2(%Player) set %Player %WasDetective if (%Player) msg %GameChannel $c3(Detective:) $c2(%Player) set %Player %WasHomeless if (%Player) msg %GameChannel $c3(Bum:) $c2(%Player) EndGame } Punt { if ((!$1) || (%GameIsPlaying != true)) return set %x 1 while ($read(l.txt,%x) != $null) { if ($read(l.txt,%x) == $1) write -dl %x l.txt if ($read(m.txt,%x) == $1) write -dl %x m.txt inc %x } if ($1 ison %GameChannel) mode %GameChannel -v $1 if ($2) { if ($2 ison %GameChannel) mode %GameChannel -v $2 } if ($WhatIs($1) == Detective) unset %Detective if ($WhatIs($1) == killer) unset %Killer if ($WhatIs($1) == Doctor) unset %Doctor if ($WhatIs($1) == Homeless) unset %Homeless } BotsMoves { if ((%GameIsPlaying == false) || ($InGame($1) == no)) return if ($WhatIs($1) == Civilian) { msg %GameChannel $c1(The bot had to take real action:) $c3(civilian) $c2($1) $c1(was put face-first into a wall, and shot in the back!) if ($InGame($1) == yes) { dec %TotalCivilian | kick $1 %CivilianChannel You died. } } if ($WhatIs($1) == detective) { msg %GameChannel $c1(The was sitting in the bar when the) $c3(detective) $c2($1) $c1(got too drunk and started a fight, but ended up headless on the floor!) if ($InGame($1) == yes) { dec %TotalDetective | kick $1 %CivilianChannel You died. | set %DetectiveMoved } } if ($WhatIs($1) == mafia) { msg %GameChannel $c1(The mob messed with the wrong target, so the bot too a glance at) $c3(mafia) $c2($1) $c1(and shot a pistol right into the eye socket!) if ($InGame($1) == yes) { dec %TotalMafia | kick $1 #mazone You died. | set %MafiaMoved } } if ($WhatIs($1) == doctor) { msg %GameChannel $c1(The bot found illegal drugs being traced to the:) $c3(doctor) $c2($1) $c1(and punished the doc by death!) if ($InGame($1) == yes) { dec %TotalDoctor | kick $1 %CivilianChannel You died. | set %DoctorMoved } } if ($WhatIs($1) == killer) { msg %GameChannel $c1(The bot had to do some dirty work of its own and too the) $c3(killer) $c2($1) $+ $c1('s life!) if ($InGame($1) == yes) { dec %TotalKiller | kick $1 %CivilianChannel You died. | set %KillerMoved } } if ($WhatIs($1) == homeless) { msg %GameChannel $c1(The bot accidentally stepped on the) $c3(homeless bum) $c2($1) $+ $c1('s head and crushed it!) if ($InGame($1) == yes) { dec %TotalHomeless | kick $1 %CivilianChannel You died. | set %HomelessMoved } } if ($InGame($1) == yes) dec %NumberOfPlayers punt $1 } StartTheGame { if (%GameIsPlaying == true) return if (%GameIsStopped == true) { if (($1 !isop %GameChannel) && ($1 !ishop %GameChannel)) { msg $1 $c2(You don't have access to use that command.) | return } else msg %GameChannel $c2(The bot shall run as normal) } EndGame part %MafiaChannel $c1(Game over) part %CivilianChannel $c1(Game over) msg %GameChannel $c1(Registration into the game has start, you may use) $c2(!reg) $c1(to register) $+ $c1(! The registration lasts) $c3(2 minutes and 10 seconds) set %NumberOfPlayers 0 set %GameIsStopped false set %GameIsPlaying true set %Registration on set %TimeToAccept false set %TotalPlayers 0 set %TotalMafia 0 set %TotalKiller 0 set %TotalHomeless 0 set %TotalDoctor 0 set %TotalCivilian 0 remove m.txt remove l.txt remove w.txt remove a.txt unset %WasDetective %WasDoctor %WasKiller %WasHomeless %Detective %Killer %Homeless %Doctor set %BeginVoting no set %Voting no set %EndVoting no set %TotalVoted 0 set %For 0 set %Against 0 timerReg1 1 65 msg %GameChannel $c1(Registration is in progress, you may join the game by using) $c2(!reg) $c1(Time left until the game starts:) $c3(1 minute and 5 seconds) timerReg2 1 140 msg %GameChannel $c1(Well the registrtaion is now over, and the roles are about to be given out!) timerReg3 1 145 GiveOutRoles set %CivilianChannel $+(#Civilians,$r(1,99999)) set %MafiaChannel $+(#Mafia,$r(1,99999)) join %CivilianChannel join %MafiaChannel set %dur $ctime } TakeOut { if (%GameIsPlaying == false) return if ($InGame($1) == yes) return if ($GotKicked($1) > 0) return if (%GameIsStopped == true) return if (%Registration == on) { Punt $1 msg %GameChannel $c2($1) $c1(is no longer in the game...) dec %NumberOfPlayers return } if ($1 ison %GameChannel) mode %GameChannel -v $1 msg %GameChannel $c2($1) $c1(you are crazy, but you will be eliminated once the day/night comes...) write q.txt $1 if (%Voting == yes) { if (%CiviliansVictim == $1) { set %Voting no | timer1 off | timer1 1 5 Night } } if (%YesNoVoting == yes) { if (%CiviliansVictim == $1) { %YesNoVoting = 0 | timer1 off | timer1 1 5 Night } } } GiveOutRoles { set %Registration off set %TotalPlayers %NumberOfPlayers set %DetectiveAccepted no if (%TotalPlayers < 3) { msg %GameChannel $c2(The game cannot start due to the lack of players. You only have) $c3(%TotalPlayers out of 3) $C2(needed to play!) | set %GameIsPlaying false | endgame | return } set %TimeToAccept true mode %GameChannel m set %TotalMafia $round($calc(((%TotalPlayers - 3)/3)+1),0) set %TotalDetective 1 if (%TotalPlayers > 3) { set %TotalDoctor 1 | set %DoctorAccepted no } else set %TotalDoctor 0 if (%TotalPlayers > 4) { set %TotalKiller 1 | set %KillerAccepted no } else set %TotalKiller 0 if (%TotalMafia > 2) { set %TotalHomeless 1 | set %HomelessAccepted no } else set %TotalHomeless 0 set %TotalCivilian $calc(%TotalPlayers - (%TotalMafia + %TotalDoctor + %TotalKiller + %TotalHomeless + %TotalDetective)) GiveOutD if (%TotalDoctor != 0) GiveOutH if (%TotalKiller != 0) GiveOutK if (%TotalHomeless != 0) GiveOutB StartMafiaGiveOut timerStartGame 1 65 StartGame } StartMafiaGiveOut { set %xx 1 while (%xx < %TotalMafia) { GiveOutM inc %xx } } GiveOutD { :PickAnotherPerson set %RandomNick $read(l.txt,$rand(1,%TotalPlayers)) if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson msg %RandomNick $c1(You are being offered to be the) $c3(Detective) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no)) set %Detective %RandomNick set %WasDetective %RandomNick } GiveOutM { :PickAnotherPerson set %RandomNick $read(l.txt,$rand(1,%TotalPlayers)) if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson write $1 m.txt %RandomNick write $1 w.txt %RandomNick write no a.txt msg %RandomNick $c1(You are being offered to be the) $c3(Mafia) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no)) } GiveOutH { :PickAnotherPerson set %RandomNick $read(l.txt,$rand(1,%TotalPlayers)) if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson msg %RandomNick $c1(You are being offered to be the) $c3(Doctor) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no)) set %Doctor %RandomNick set %WasDoctor %RandomNick } GiveOutK { :PickAnotherPerson set %RandomNick $read(l.txt,$rand(1,%TotalPlayers)) if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson msg %RandomNick $c1(You are being offered to be the) $c3(Killer) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no)) set %Killer %RandomNick set %WasKiller %RandomNick } GiveOutB { :PickAnotherPerson set %RandomNick $read(l.txt,$rand(1,%TotalPlayers)) if ($WhatIs(%RandomNick) != civilian) goto PickAnotherPerson msg %RandomNick $c1(You are being offered to be the) $c3(Homeless bum) $+ $c1(! Do you accept this role? To accept (!yes) or to reject (!no)) set %Homeless %RandomNick set %WasHomeless %RandomNick } EndVoting { set %EndVoting yes msg %GameChannel $c1(Ok, time to decide whether or not) $c2(%CiviliansVictim) $c1(should be hung... Is it worth it? Vote people!) $c2(!yes/!no) $c1(You have 1 minute!) notice %GameChannel Civilians, time to vote! set %For 0 set %Against 0 set %TotalVoted 0 set %Voting no if ($hget(VotingResults)) hfree VotingResults hmake VotingResults $calc(%NumberOfPlayers -1) timer1 1 60 YesNoVoting } AcceptRole { if ((%TimeToAccept == false) || ($WhatIs($1) == civilian) || (%AllConfirmed == yes)) return if ($WhatIs($1) == detective) { if (%DetectiveAccepted == yes) return invite $1 %CivilianChannel msg $1 $c1(Granted, you have been given your role. Please join $c3(%CivilianChannel)) set %Detective $1 msg %GameChannel $c1(It seems like the) $c2(detective) $c1(has accepted the role)... set %WasDetective $1 set %DetectiveAccepted yes } if ($WhatIs($1) == doctor) { if (%DoctorAccepted == yes) return msg $1 $c1(Granted, you have been given your role) set %Doctor $1 msg %GameChannel $c1(It seems like the) $c2(doctor) $c1(has accepted the role)... set %WasDoctor $1 set %DoctorAccepted yes } if ($WhatIs($1) == killer) { if (%KillerAccepted == yes) return msg $1 $c1(Granted, you have been given your role) set %Killer $1 /msg %GameChannel $c1(It seems like the) $c2(killer) $c1(has accepted the role)... set %WasKiller $1 set %KillerAccepted yes } if ($WhatIs($1) == homeless) { if (%HomelessAccepted == yes) return invite $1 %CivilianChannel msg $1 $c1(Granted, you have been given your role. Please join $c3(%CivilianChannel)) set %Homeless $1 /msg %GameChannel $c1(It seems like the) $c2(homeless) $c1(has accepted the role)... set %WasHomeless $1 set %HomelessAccepted yes } if ($WhatIs($1) == mafia) { set %TempVar $MafiaNumber($1) if ($read(a.txt,t,%TempVar) == yes) return write -l %t a.txt yes invite $1 %MafiaChannel msg $1 $c1(Granted, you have been given your role. Please join $c3(%MafiaChannel)) /msg %GameChannel $c1(It seems like the) $c2(mafia) $c1(has accepted the role)... write l w.txt $1 } if ($AllAccepted == yes) { timers off | StartGame } } StartVoting { VictoryAchieved set %BeginVoting yes set %TimeToVote yes set %Voting yes set %CiviliansVictim $null set %VotedVictim 0 if ($c == true) { EndGame | return } else { if ($hget(VotingResults)) hfree VotingResults hmake VotingResults %NumberOfPlayers msg %GameChannel $c1(Well, who is responsible for everything? You have 2 minutes! To vote:) $c2(!<Nick/Number>) $c1(or) $c2(!!night) $c1(if you don't want to hang anyone...) ShowPlayers %GameChannel notice %GameChannel People, time to vote! timerToVote 1 120 Voting } } RejectRole { if ((%TimeToAccept == false) || ($WhatIs($1) == civilian) || (%AllConfirmed == yes)) return if ($WhatIs($1) == detective) { if (%DetectiveAccepted == yes) return msg $1 $c1(Your role will be given to somebody else) msg %GameChannel $c1(It seems like the) $c2(detective) $c1(has rejected the role)... unset %detective GiveOutD } if ($WhatIs($1) == doctor) { if (%DoctorAccepted == yes) return msg $1 $c1(Your role will be given to somebody else) /msg %GameChannel $c1(It seems like the) $c2(doctor) $c1(has rejected the role)... unset %doctor GiveOutH } if ($WhatIs($1) == killer) { if (%KillerAccepted == yes) return msg $1 $c1(Your role will be given to somebody else) /msg %GameChannel $c1(It seems like the) $c2(killer) $c1(has rejected the role)... unset %killer GiveOutK } if ($WhatIs($1) == homeless) { if (%HomelessAccepted == yes) return msg $1 $c1(Your role will be given to somebody else) /msg %GameChannel $c1(It seems like the) $c2(homeless) $c1(has rejected the role)... unset %homeless GiveOutB } if ($WhatIs($1) == mafia) { set %TempVar $fif(m.txt,$1) write -dl %TempVar m.txt write -dl %TempVar w.txt set %RandomNick $MafiaNumber($1) msg $1 $c1(Your role will be given to somebody else) msg %GameChannel $c1(It seems like the) $c2(mafia) $c1(has rejected the role)... GiveOutM %RandomNick } } Voting { set %BeginVoting no %TimeToVote = no if (%VotedVictim < 2) { msg %GameChannel $c1(During the entire day, the people didn't achive anything!) timer1 1 10 /night return } if (%z == 1) { msg %GameChannel 10The day was wasted, and there was no decision! timer1 1 10 /night return } if (%CiviliansVictim == 1night) { msg %GameChannel 10The people have decided not to hang anybody today! timer1 1 10 /night return } set %Voting yes msg %GameChannel $c1(Certain people agree that) $c2(%CiviliansVictim) $c1(should be blamed for what was done at night!) msg %GameChannel $c1(What do you have to say for yourself dear) $c2%CiviliansVictim) $c3(!done) $c1(to end... You have no more than 10 seconds!) timer1 1 10 EndVoting } AllActiveRoles { if ((%GameIsPlaying == false) || (%Registration == on) || (%GameIsStopped == 1)) return set %ActiveRoles $c1(In total there are:) if (%TotalCivilian > 0) %ActiveRoles = %ActiveRoles $c2(civilians -) $c3(%TotalCivilian) $+ $c1($chr(44)) if (%TotalDetective > 0) %ActiveRoles = %ActiveRoles $c2(detective) $+ $c1($chr(44)) if (%TotalMafia > 0) %ActiveRoles = %ActiveRoles $c2(mafia -) $c3(%TotalMafia) $+ $c1($chr(44)) if (%TotalDoctor > 0) %ActiveRoles = %ActiveRoles $c2(doctor) $+ $c1($chr(44)) if (%TotalKiller > 0) %ActiveRoles = %ActiveRoles $c2(killer) $+ $c1($chr(44)) if (%TotalHomeless > 0) %ActiveRoles = %ActiveRoles $c2(homeless bum) $+ $c1(..) %ActiveRoles = $left(%ActiveRoles,-1) return %ActiveRoles } StartGame { set %TimeToAccept false if ($AllConfirmed == no) { set %Xy 1 msg %Detective Please join $c3(%CivilianChannel)) if (%TotalHomeless == 1) msg %Homeless $c1(Please join) $c3(%CivilianChannel)) while ($read(w.txt,%Xy)) { if ($read(m.txt,w,$+($read(w.txt,%Xy))) == $null) { write m.txt $read(w.txt,%Xy) msg $read(w.txt,%Xy) $c1(Please join) %$c2(%MafiaChannel) write -dl %Xy w.txt } inc %Xy } } msg %GameChannel $c1(The roles have been given out, and the game is about to start...) msg %GameChannel $AllActiveRoles /NightChecks } NightChecks { if ($read(q.txt,1) == $null) { Night | return } else { PlayersGone if ($VictoryAchieved == true) { EndGame return } } timer1 1 10 Night } SleepyPeople { if ($read(q.txt,1) == $null) { DetectivesMove | return } else { PlayersGone remove q.txt timerNextMove 1 15 DetectivesMove } } ShowPlayers { if (%GameIsPlaying == false) return %ListOfPlayers = $c1(List of players:) %x = 1 while (%x <= %NumberOfPlayers) { %ListOfPlayers = %ListOfPlayers $c3(%x) $+ .4 $read(l.txt,%x) inc %x } msg $1 %ListOfPlayers } Night { VictoryAchieved %NightTime = yes %DetectiveMoved = 0 %MafiaMoved = 0 %DoctorMoved = 0 %KillerMoved = 0 %BumMoved = 0 %DetectivesVictim = $null %MafiasVictim = $null %DoctorsVictim = $null %KillersVictim = $null %BumsVictim = $null %DWords = $null %MWords = $null %HWords = $null %KWords = $null %BWords = $null inc %nights msg %GameChannel $c1(It is now the) $c3(night) $c1(time, the people are sleeping tight, after a hard day of work. The only ones who are up, are those you are looking for trouble. The night will last 3 minutes 10!!) if (%Detective != $null) { msg %Detective $c2(Who's the victim?) $c1(To check:) $c3(!check <Nick/Number> [phrase]) $c1(to kill:) $c3(!kill <Nick/Number> [phrase]) | ShowPlayers %Detective } if ($read(m.txt,1) != $null) { msg $read(m.txt,1) $c2(Who's the victim?) $c1(To kill:) $c3(!kill <Nick/Number> [phrase]) | ShowPlayers $read(m.txt,1) } if (%Doctor != $null) { msg %Doctor $c2(Who's the victim?) $c1(To heal:) $c3(!heal <Nick/Number> [phrase]) | ShowPlayers %Doctor } if (%killer != $null) { msg %Killer $c2(Who's the victim?) $c1(To kill:) $c3(!kill <Nick/Number> [phrase]) | ShowPlayers %Killer } if (%Homeless != $null) { msg %Homeless $c2(Who's the victim?) $c1(To check:) $c3(!check <Nick/Number> [phrase]) | ShowPlayers %Homeless } notice %GameChannel Players, time to make your move! if (%Detective == $null) %DetectiveMoved = 1 if ($read(m.txt,1) == $null) %MafiaMoved = 1 if (%Doctor == $null) %DoctorMoved = 1 if (%Killer == $null) %KillerMoved = 1 if (%Homeless == $null) %BumMoved = 1 timerToEndNight 1 180 Day } PlayersGone { set %x 1 while ($read(q.txt,%x) != $null) { set %Quitter $read(q.txt,%x) if (%Quitter != $null) TakeOut %Quitter inc %x } } Day { VictoryAchieved msg %GameChannel $c1(Finally the) $c3(day) $c1(has come, they sun is shining bright, and the birds are singing. There is a cry heard through out the town "help!" A member of the town is now dead...) FoundOutRole %Detective FoundOutRole %Homeless set %NightTime no set %healed 0 timerDay 1 5 DetectivesMove } DetectivesMove { if ((%DetectivesVictim == $null) && (%TotalDetective > 0)) { BotAttacks %Detective | timerNextMove 1 15 MafiasMove | return } if (%DetectiveChecked == yes) { msg %GameChannel $c1(The) $c3(detective) $c1(could have been doing something better last night, but at least he now knows who is) $c2(%DetectivesVictim) $c1(is! $iif(%DWords != $null,Detective's words were:12 %DWords)) timerNextMove 1 15 MafiasMove } else { if (%healed == 0) { if (%DoctorsVictim == %DetectivesVictim) { set %healed 1 msg %GameChannel $c1(The) $c3(detective) $c1(took many shots last night and almost killed) $c2(%DetectivesVictim) $c1($iif(%DWords != $null,Detective's words were:12 %DWords)) msg %GameChannel $c3(%DoctorsVictim) $c1(was near death, but thankfully the) $c3(doctor) $c1(knew what he was doing, and saved the poor soul! $iif(%HWords != $null,The doctor's words were:12 %HWords)) timerNextMove 1 15 MafiasMove return } } if ($WhatIs(%DetectivesVictim) == civilian) { msg %GameChannel $c1(The) $c3(detective) $c1(got in a fight and lost control of himself so he shot the) $c3(civilian) $c2(%DetectivesVictim) $+ $c1(! $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim You died if ($InGame(%DetectivesVictim) == yes) { dec %TotalCivilian } } if ($WhatIs(%DetectivesVictim) == detective) { msg %GameChannel $c3(Detective) $c2(%DetectivesVictim) $c1(could no longer handle the pressure he was under, so he decided to kill himself... $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim You died if ($InGame(%DetectivesVictim) == yes) { dec %TotalDetective } } if ($WhatIs(%DetectivesVictim) == mafia) { msg %GameChannel $c1(The) $c3(detective) $c1(was going through a tough operation and in the end has managed to kill the) $c3(mafia) $c2(%DetectivesVictim) $+ $c1(... $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %MafiaChannel %DetectivesVictim You died if ($InGame(%DetectivesVictim) == yes) { dec %TotalMafia } } if ($WhatIs(%DetectivesVictim) == doctor) { msg %GameChannel $c1(The) $c3(detective) $c1(did not believe that the) $c3(doctor) $c2(%DetectivesVictim) $c1(had stiched up his sholder to his best efforts, so he deserved to die... $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim You died if ($InGame(%DetectivesVictim) == yes) { dec %TotalDoctor } } if ($WhatIs(%DetectivesVictim) == killer) { msg %GameChannel $c1(The) $c3(detective) $1(was sitting in the bar when he started fighting with the) $c3(killer) $c2(%DetectivesVictim) $+ $c1(and was nothing short of victory! $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim You died if ($InGame(%DetectivesVictim) == yes) { dec %TotalKiller } } if ($WhatIs(%DetectivesVictim) == homeless) { msg %GameChannel $c1(The) $c3(detective) $1(got into an arguement with his best friend, and killed the) $c3(homeless bum) $c2(%DetectivesVictim) $+ $c1(... $iif(%DWords != $null,Detective's words were:12 %DWords)) | kick %CivilianChannel %DetectivesVictim You died if ($InGame(%DetectivesVictim) == yes) { dec %TotalHomeless } } if ($InGame(%DetectivesVictim) == yes) dec %NumberOfPlayers Punt %DetectivesVictim } timerNextMove 1 15 MafiasMove return } MafiasMove { if (%MafiasVictim == $null) { if ($read(m.txt,1) != $null) { BotAttacks $read(m.txt,1) | timerNextMove 1 15 KillersMove | /return } KillersMove return } if (%healed == 0) { if (%DoctorsVictim == %MafiasVictim) { set %healed 1 msg %GameChannel $c1(The) $c3(mafia) $c1(had a meeting last night, and came to the conclusion that) $c2(%MafiasVictim) $c1(deserves to die! $iif(%MWords != $null,Mafia's words were:12 %MWords)) msg %GameChannel $c1(Nobody could touch) $c2(%DoctorsVictim) $c1(for the) $c3(doctor) $c1(was there to save a life! $iif(%HWords != $null,Doctor's words were:12 %HWords)) } } if ($WhatIs(%MafiasVictim) == civilian) { msg %GameChannel $c1(It wasn't long until the) $c3(mafia) $c1(decided to let) $c3(civilian) $c2(%MafiasVictim) $c1(rest in peace! $iif(%MWords != $null,Mafia's words were:12 %MWords)) | kick %CivilianChannel %MafiasVictim You died if ($InGame(%MafiasVictim) == yes) { dec %TotalCivilian } } if ($WhatIs(%MafiasVictim) == detective) { msg %GameChannel $c1(Well people, today was a sad day, for the) $c3(mafia) $c1(had finally found the) $c3(detective) $c2(%MafiasVictim) $c1(and put a bullet through the head! $iif(%MWords != $null,Mafia's words were:12 %MWords)) kick %CivilianChannel %MafiasVictim You died if ($InGame(%MafiasVictim) == yes) { dec %TotalDetective } } if ($WhatIs(%MafiasVictim) == mafia) { msg %GameChannel $c1(The) $c3(mafia) $c1(hand a great conflict last night, and it ended in a killing of the) $c3(mafia's) $c2(%MafiasVictim) $+ $c1(... $iif(%MWords != $null,Mafia's words were:12 %MWords)) kick %MafiaChannel %MafiasVictim You died if ($InGame(%MafiasVictim) == yes) { dec %TotalMafia } } if ($WhatIs(%MafiasVictim) == doctor) { msg %GameChannel $c1(The) $c3(mafia) $c1(did not like the fact that the majority of their victims live to see the next day after their visit, so they killed the) $c3(doctor) $c2(%MafiasVictim) $+ $c1(... $iif(%MWords != $null,Mafia's words were:12 %MWords)) kick %CivilianChannel %MafiasVictim You died if ($InGame(%MafiasVictim) == yes) { dec %TotalDoctor } } if ($WhatIs(%MafiasVictim) == killer) { msg %GameChannel $c1(The) $c3(mafia) $c1(are aware of their competition, so they burtally shot and killed the) $c3(killer) $c2(%MafiasVictim) $+ $c1(... $iif(%MWords != $null,Mafia's words were:12 %MWords)) kick %CivilianChannel %MafiasVictim You died if ($InGame(%MafiasVictim) == yes) { dec %TotalKiller } } if ($WhatIs(%MafiasVictim) == homeless) { msg %GameChannel $c1(The) $c3(mafia) $c1(were afraid of getting traced, so they threw a grenade they had on them in the dumpster and by chance killing the) $c3(homeless bum) $c2(%MafiasVictim) $+ $c1(... $iif(%MWords != $null,Mafia's words were:12 %MWords)) kick %CivilianChannel %MafiasVictim You died if ($InGame(%MafiasVictim) == yes) { dec %TotalHomeless } } if ($InGame(%MafiasVictim) == yes) dec %NumberOfPlayers Punt %MafiasVictim timerNextMove 1 15 KillersMove } KillersMove { if (%TotalKiller < 1) { DoctorsMove | return } if (%KillersVictim == $null) { BotAttacks %Killer | timerNextMove 1 15 DoctorsMove | return } if (%healed == 0) { if (%DoctorsVictim == %KillersVictim) { set %healed 1 msg %GameChannel $c1(The) $c3(killer) $c1(got a little to careless with) $c2(%victman) $+ $c1(, and couldn't get the job done! $iif(%KWords != $null,Killer's words were:12 %KWords)) msg %GameChannel $c2(%victdok) $c1(didn't die for the) $c3(doctor) $c1(was right at the scene of the crime! $iif(%HWords != $null,The doctor's words were:12 %HWords)) goto doc } } if ($WhatIs(%KillersVictim) == civilian) { msg %GameChannel $c1(At night the) $c3(killer) $c1(got the blood of the innocent as he wanted, and killed) $c3(civilian) $c2(%KillersVictim) $+ $c1(! $iif(%KWords != $null,Killer's words were:12 %KWords)) kick %CivilianChannel %KillersVictim You died if ($InGame(%KillersVictim) == yes) dec %TotalCivilian } if ($WhatIs(%KillersVictim) == detective) { msg %GameChannel $c1(The crazy) $c3(killer) $c1(decapitated) the $3(detective) $2(%KillersVictim) $c1(and carved his name into the skull! $iif(%KWords != $null,Killer's words were:12 %KWords)) kick %CivilianChannel %KillersVictim You died if ($InGame(%KillersVictim) == yes) dec %TotalDetective } if ($WhatIs(%KillersVictim) == mafia) { msg %GameChannel $c1(The) $c3(killer) $c1(saw a mob and wanted to join, but after getting rejected he killed the) $3(mafia) $2(%KillersVictim) $+ $c1(! $iif(%KWords != $null,Killer's words were:12 %KWords)) kick %MafiaChannel %KillersVictim You died if ($InGame(%KillersVictim) == yes) dec %TotalMafia } if ($WhatIs(%KillersVictim) == doctor) { msg %GameChannel $c1(The) $c3(doctor) $2(%KillersVictim) $c1(was out helping the people in town, then suddenly got stabbed in the back with a dagger by the visious) $3(killer) $+ $c1(! $iif(%KWords != $null,Killer's words were:12 %KWords)) kick %CivilianChannel %KillersVictim You died if ($InGame(%KillersVictim) == yes) dec %TotalDoctor } if ($WhatIs(%KillersVictim) == killer) { msg %GameChannel $c1(Going crazy from boredom, the) $c3(killer) $c2(%KillersVictim) $c1(decided to commit suicide, and jabbed a knife right into the throat! $iif(%KWords != $null,Killer's words were:12 %KWords)) kick %CivilianChannel %KillersVictim You died kick %MafiaChannel %KillersVictim You died if ($InGame(%KillersVictim) == yes) dec %TotalKiller } if ($WhatIs(%KillersVictim) == homeless) { msg %GameChannel $c1(The) $c3(killer) $c1(noticed that the) $3(homeless bum) $2(%KillersVictim) $c1(was asking for money, so decided to have some fun by stabbing the bum in the eyes and snapping his neck! $iif(%KWords != $null,Killer's words were:12 %KWords)) kick %CivilianChannel %KillersVictim You died if ($InGame(%KillersVictim) == yes) dec %TotalHomeless } if ($InGame(%KillersVictim) == yes) dec %NumberOfPlayers Punt %KillersVictim :doc timerNextMove 1 15 DoctorsMove } DoctorsMove { if (%TotalDoctor < 1) { BumsMove | return } if (%DoctorsVictim == $null) { if (%TotalDoctor > 0) { BotAttacks %Doctor | timerNextMove 1 15 BumsMove | return } } if (%healed == 0) { msg %GameChannel $c1(The) $c3(doctor) $c1(thought that) $c2(%DoctorsVictim) $c1(looked too ill, so he decided to stay there over night... $iif(%HWords != $null,Doctor's words were:12 %HWords)) } else { BumsMove | return } timerNextMove 1 15 BumsMove } BumsMove { if (%BumsVictim == $null) { if (%TotalHomeless > 0) { BotAttacks %Homeless | timerNextMove 1 15 StartVoting | return } StartVoting return } msg %GameChannel $c1(The) $c3(homeless bum) $c1(at night started snooping around) $c2(%BumsVictim) $+ $c1('s stuff.. $iif(%BWords != $null,Homeless' words were:12 %BWords)) timerNextMove 1 15 StartVoting } BotAttacks { if ($WhatIs($1) == Civilian) { msg %GameChannel $c(The bot had to take real action, so) $c2(civilian) $c3($1) $c1(was put face-first into a wall, and shot in the back!) kick $1 %CivilianChannel You died. if ($InGame($1) == yes) dec %TotalCivilian } if ($WhatIs($1) == Detective) { msg %GameChannel $c1(The) $c3(detective) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...) kick $1 %CivilianChannel $c1(You died.) set %DetectiveMoved yes if ($InGame($1) == yes) dec %TotalDetective } if ($WhatIs($1) == Mafia) { msg %GameChannel $c1(The) $c3(mafia) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...) kick $1 %MafiaChannel $c1(You died.) set %MafiaMoved yes if ($InGame($1) == yes) dec %TotalMafia } if ($WhatIs($1) == Doctor) { msg %GameChannel $c1(The) $c3(doctor) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...) kick $1 %CivilianChannel $c1(You died.) set %DoctorMoved yes if ($InGame($1) == yes) dec %TotalDoctor } if ($WhatIs($1) == Killer) { msg %GameChannel $c1(The) $c3(killer) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...) kick $1 %CivilianChannel $c1(You died.) set %KillerMoved yes if ($InGame($1) == yes) dec %TotalKiller } if ($WhatIs($1) == Homeless) { msg %GameChannel $c1(The) $c3(homeless bum) $c2($1) $c1(got too drunk and started a fight with the bot, and you could see how that ended...) kick $1 %CivilianChannel $c1(You died.) set %HomelessMoved yes if ($InGame($1) == yes) dec %TotalHomeless } if ($InGame($1) == yes) dec %NumerOfPlayers punt $1 } VotingStats { unset %Voted* set %x 1 set %y 0 set %z 0 var %VotingMessage = $c4(Voting Statistics:) while ($hget(VotingResults,%x).data) { set %User $hget(VotingResults,%x).data inc %Voted $+ $hget(VotingResults,%x).data if (%User !isin %VotingMessage) set %VotingMessage %VotingMessage $iif(%User != 1night,$c2(%User),$c5($right(%User,-1))) $c4(-) $c3($+(!,Voted,%User)) $+ $c4(.) if (%z < $eval($+(%,Voted,$hget(VotingResults,%x).data),2)) { set %z $eval($+(%,Voted,$hget(VotingResults,%x).data),2) | set %CiviliansVictim $hget(VotingResults,%x).data } inc %x inc %y } set %VotingMessage %VotingMessage $c3($+([,%y,:,%NumberOfPlayers,])) msg %GameChannel $regsubex(%VotingMessage,/!(Voted\w+)/ig,$(%\1,2)) if ($calc(%z / %NumberOfPlayers) >= .6) { timers off | timerYesNo 1 5 Voting | unset %D } } ThoseVoted { if (%GameIsPlaying == false) return if (%Voting == no) return if ($InGame($1) == no) return if ($left($2,1) != !) return set %Vote $right($2,-1) if ($PlayerNumber(%Vote) == yes) %Victim = $read(l.txt,%Vote) else %Victim = %vote %Vote = %Victim if (%Vote == !night) { set %Vote 1night } if (($InGame(%Vote) == no) && (%Vote != 1night)) { msg %GameChannel $c1(There is no) $c2(%Vote) $c1(in the game...) return } hadd VotingResults $1 %Vote VotingStats } YesNoVoting { if (%Against >= %For ) { msg %GameChannel $c1(The defendant) $c2(%CiviliansVictim) $c1(is safe! Now's the time to celebrate!) timerGoToNight 1 10 Night return } if ($calc(%Against + %For) <= $calc((%NumberOfPlayers -1)/2)) { msg %GameChannel $c1(The people haven't come to a conclusion!) timerGoToNight 1 10 Night return } if (%CiviliansVictim == $null) goto CheckForEnd if ($WhatIs(%CiviliansVictim) == civilian) { msg %GameChannel $c1(Today the people have decided to hang the) $c3(civilian) $c2(%CiviliansVictim) if ($InGame(%CiviliansVictim) == yes) dec %TotalCivilian } if ($WhatIs(%CiviliansVictim) == detective) { msg %GameChannel $c1(People what have you done? You just hang the) $c3(detective) $c2(%CiviliansVictim) if ($InGame(%CiviliansVictim) == yes) dec %TotalDetective } if ($WhatIs(%CiviliansVictim) == mafia) { msg %GameChannel $c1(Hooray! The town has finally gotten rid of the evil) $c3(mafia) $c2(%CiviliansVictim) if ($InGame(%CiviliansVictim) == yes) dec %TotalMafia } if ($WhatIs(%CiviliansVictim) == doctor) { msg %GameChannel $c1(The townspeople were fed up with the constant medicine mixup, so they hung the) $c3(doctor) $c2(%CiviliansVictim) if ($InGame(%CiviliansVictim) == yes) dec %TotalDoctor } if ($WhatIs(%CiviliansVictim) == killer) { msg %GameChannel $c1(The good people of the village have had enough of the innocent people dying, and killed off the) $c3(killer) $c2(%CiviliansVictim) if ($InGame(%CiviliansVictim) == yes) dec %TotalKiller } if ($WhatIs(%CiviliansVictim) == homeless) { msg %GameChannel $c1(The people could no longer stand the horrible stench of the) $c3(homeless bum) $c2(%CiviliansVictim) if ($InGame(%CiviliansVictim) == yes) dec %TotalHomeless } if ($InGame(%CiviliansVictim) == yes) dec %NumberOfPlayers Punt %CiviliansVictim goto CheckForEnd :CheckForEnd if ($VictoryAchieved == true) { EndGame return } timerVotingOver 1 10 Night } VoteFor { if ($InGame($1) == no) return if (%GameIsStopped == true) return if (%GameIsPlaying == false) return if (%EndVoting == no) return if ($1 == %CiviliansVictim) return if ($hget(VotingResults,$1) == $null) { inc %For | inc %TotalVoted } if ($hget(VotingResults,$1) == no) { inc %For | dec %Against } hadd VotingResults $1 Yes msg %GameChannel $c2($+($chr(91),%For,:,%Against,$chr(93))) $+ $c3($+($chr(91),%TotalVoted,:,$calc(%NumberOfPlayers -1),$chr(93))) $c1(The townperson) $c2($1) $c1(has voted) $c3(for) $c1(the hanging of) $c2(%CiviliansVictim) if (%For > $calc((%NumberOfPlayers - 1)/2) ) { timer1 -o 1 7 YesNoVoting } elseif (%Against > $calc((%NumberOfPlayers - 1)/2) ) { timer1 -o 1 7 YesNoVoting } elseif ($calc(%Pro + %Against) == $calc(%NumberOfPlayers - 1) ) { timer1 -o 1 7 YesNoVoting } } VoteAgainst { if ($InGame($1) == no) return if (%GameIsStopped == true) return if (%GameIsPlaying == false) return if (%EndVoting == no) return if ($1 == %CiviliansVictim) return if ($hget(VotingResults,$1) == $null) { inc %Against | inc %TotalVoted } if ($hget(VotingResults,$1) == yes) { inc %Against | dec %For } hadd VotingResults $1 No msg %GameChannel $c2($+($chr(91),%For,:,%Against,$chr(93))) $+ $c3($+($chr(91),%TotalVoted,:,$calc(%NumberOfPlayers -1),$chr(93))) $c1(The townperson) $c2($1) $c1(has voted) $c3(against) $c1(the hanging of) $c2(%CiviliansVictim) if (%For > $calc((%NumberOfPlayers - 1)/2) ) { timer1 -o 1 7 YesNoVoting } elseif (%Against > $calc((%NumberOfPlayers - 1)/2) ) { timer1 -o 1 7 YesNoVoting } elseif ($calc(%Pro + %Against) == $calc(%NumberOfPlayers - 1) ) { timer1 -o 1 7 YesNoVoting } } VictoryAchieved { if (%NumberOfPlayers == 1) { if (%TotalMafia == 1) { msg %GameChannel $c2(Game over! The wins goes to mafia!) inc %MafiaWon EndRoles return true } } if (%NumberOfPlayers == 1) { if (%TotalKiller == 1) { msg %GameChannel $c2(Game over! The wins goes to civilians!) inc %CiviliansWon EndRoles return true } } if (%NumberOfPlayers == 1) { if (%TotalDoctor == 1) { msg %GameChannel $c2(Game over! The wins goes to civilians!) inc %CiviliansWon EndRoles return true } } if (%NumberOfPlayers == 2) { if (%TotalKiller == 1) { if (%TotalMafia == 1) msg %GameChannel $c2(Game over! It's a tie!) inc %Ties EndRoles return true } } if (%NumberOfPlayers == 1) { if (%TotalHomeless == 1) { msg %GameChannel $c2(Game over! The wins goes to civilians!) inc %CiviliansWon EndRoles return true } } if (%NumberOfPlayers == 1) { if (%TotalCivilian == 1) { msg %GameChannel $c2(Game over! The wins goes to mafia!) inc %MafiaWon EndRoles return true } } if ($read(m.txt,1) == $null) { if (%Killer == $null ) { if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) >= 1 ) { msg %GameChannel $c2(Game over! The wins goes to thecivilian!) inc %CiviliansWon EndRoles return true } } } if ($read(m.txt,1) != $null) { if (%Detective == $null) { if (%Killer == $null ) { if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) <= 1 ) { msg %GameChannel $c2(Game over! The wins goes to themafia!) inc %MafiaWon EndRoles return true } } } } if (%Killer != $null) { if (%Detective == $null) { if ($read(m.txt,1) == $null ) { if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) <= 1 ) { msg %GameChannel $c2(Game over! The winner is the killer!) inc %KillerWon EndRoles return true } } } } if (%TotalDetective == 1) { if (%TotalKiller == 1) { if (%TotalPlayers == 2) { msg %GameChannel $c2(Game over! It's a tie!) inc %Ties EndRoles return true } } } if (%TotalMafia == 1) { if (%TotalKiller == 1) { if (%TotalPlayers == 2) { msg %GameChannel $c2(Game over! It's a tie!) inc %Ties EndRoles return true } } } if (%TotalKiller == 1) { if (%TotalDetective == 0) { if (%TotalMafia == 0) { if (%TotalPlayers < 3) { msg %GameChannel $c2(Game over! The winnder is the killer!) inc %KillerWon EndRoles return true } } } } if (%TotalMafia == 1) { if (%TotalDetective == 1) { if (%TotalKiller == 0) { if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0) { msg %GameChannel $c2(Game over! It's a tie!) inc %Ties EndRoles return true } } } } if (%TotalMafia == 1) { if (%TotalDetective == 1) { if (%TotalKiller == 0) { if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0 ) { msg %GameChannel $c2(Game over! It's a tie!) inc %Ties EndRoles return true } } } } if (%TotalKiller == 1) { if (%TotalDetective == 1) { if (%TotalMafia == 0) { if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0 ) { msg %GameChannel $c2(Game over! It's a tie!) inc %Ties EndRoles return true } } } } if (%TotalMafia == 1) { if (%TotalKiller == 1) { if (%TotalDetective == 0) { if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0 ) { msg %GameChannel $c2(Game over! It's a tie!) inc %Ties EndRoles return true } } } } if (%TotalMafia == 0) { if (%TotalKiller == 0) { if (%TotalDetective == 0 ) { if ($calc(%TotalCivilian + %TotalDoctor + %TotalHomeless) == 0 ) { msg %GameChannel $c2(Game over! Everybody lost!) inc %Ties EndRoles return true } } } } if (%NumberOfPlayers == 0) { msg %GameChannel $c2(Game over! It's a tie and everybody lost!) inc %Ties EndRoles EndGame return true } return false } Leaving { if (%GameIsPlaying == false) return if ($GameIsStopped == true) return if ($InGame($1) == yes) return if (%Registration == on) { punt $1 msg %GameChannel $c2($1) $c1(is no longer in the game...) %numplayers = %numplayers - 1 return } if ($1 ison %GameChannel) mode %GameChannel -v $1 msg %GameChannel $c2($1) $c1(has until either the day or night to get back, or else the bot will have to do some dirty work...) kick %CivilianChannel $1 You left kick %MafiaChannel $1 You left } JoinGameChannel { if ($1 == $me) { EndGame } inc %Visitors notice $1 $c2($1) $c1(welcome to the internet IRС-game channel) $c2("Mafia") $c1(you are visitor number) $c3(%Visitors) if ((%GameIsPlaying == false) && (%GameIsStopped == false)) { notice $1 $c1(To start the game, type in) $2(!start) $c1(in the channel, but keep in mind that you need at least $c3(3) $c1(players...)) return } if (%Registration == on) { notice $1 $c1(There is currently a registeration for the game! Type in) $c2(!reg) $c1(to register for the game!) return } if (%GameIsPlaying == 1) { if ($GotKicked($1) > 0) { mode %GameChannel +v $1 msg %GameChannel $c1($1 $+ , You're back in the game!) if (%NightTime == yes) { if ($EveryoneMoved == no) { msg %GameChannel $c1(Just in case you have a role and you haven't made your move yet, do it now...) timer1 off timer1 1 180 Day } } %t = $GotKicked($1) write -dl %t q.txt return } notice $1 $c1(Sadly, the game has already started. Please wait for the game to end...) return } } EveryoneMoved { if (%DetectiveMoved > 0) { if (%MafiaMoved > 0 ) { if (%KillerMoved > 0 ) { if (%DoctorMoved > 0 ) { if (%BumMoved > 0 ) return yes } } } } return no } GotKicked { set %x 1 while ($read(q.txt,%x)) { if ($read(q.txt,%x) == $1) return %x if ($read(q.txt,%x) == $null) return 0 inc %k } return 0 } Reg { if (%GameIsPlaying == false) StartTheGame $1 if (%Registration == off) return if ($InGame($1) == yes) return inc %NumberofPlayers write l.txt $1 if ($1 ison %GameChannel) mode %GameChannel +v-ho $1 $1 $1 notice $1 $c1(You have registered as player number) $c2(%NumberOfPlayers) } ReggedByOp { if (($2 !isop %GameChannel) && ($2 !ishop %GameChannel)) return if ($1 !ison %GameChannel) return if (%GameIsPlaying == false) StartTheGame if (%Registration == off) return if ($InGame($1) == yes) return inc %NumberofPlayers write l.txt $1 mode %GameChannel +v-ho $1 $1 $1 msg %GameChannel $c3($1) $c1(has been registered registered as player number) $c2(%NumberOfPlayers) $c1(by staff member) $c3($2) } Kill { set %VictimsName $null if ((%GameIsPlaying == false) || (%GameIsStopped == true) || (%NightTime == no) || ($InGame($2) == no)) return if ($PlayerNumber($1) == yes) set %VictimsName $read(l.txt,$1) else set %VictimsName $1 if ($InGame(%VictimsName) == no) { msg $2 $c1(There is no such player! Please try again...) | return } if ($WhatIs($2) == detective) { if (%DetectiveMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return } set %DetectivesVictim %VictimsName set %DetectiveChecked no set %DetectiveMoved 1 set %DWords $3- msg %GameChannel $c1(The) $c3(detective) $c1(got bored out of his mind, so he decided to do something about it...) msg $2 $c1(You have decided to kill) $c2(%VictimsName) msg %CivilianChannel $c1(The) $c3(detective) $c1(decided to kill) $c2(%VictimsName) } if ($read(m.txt,1) == $2) { if (%MafiaMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return } set %MafiasVictim %VictimsName set %MafiaMoved 1 set %MWords $3- msg %GameChannel $c1(The) $c3(mafia) $c1(gathered up in a very dark ally, and decided to get some work done...) msg $2 $c1(You have decided to kill) $c2(%VictimsName) msg %MafiaChannel $c1(The) $c3(mafia) $c1(decided to kill) $c2(%VictimsName) } if ($WhatIs($2) == killer) { if (%KillerMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return } set %KillersVictim %VictimsName set %KillerMoved 1 set %KWords $3- msg $2 $c1(You have decided to kill) $c2(%VictimsName) msg %GameChannel $c1(The) $c3(killer) $c1(got thirsty for some blood, so now is off to quench that thirst...) } if ($EveryoneMoved == yes) { timers off | timerGoToDay 1 10 Day } } Check { set %VictimsName $null if ((%GameIsPlaying == false) || (%GameIsStopped == true) || (%NightTime == no) || ($InGame($2) == no)) return if ($PlayerNumber($1) == yes) set %VictimsName $read(l.txt,$1) else set %VictimsName $1 if ($InGame(%VictimsName) == no) { msg $2 $c1(There is no such player! Please try again...) | return } if ($WhatIs($2) == detective) { if (%DetectiveMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return } set %DetectivesVictim %VictimsName set %DetectiveChecked yes set %DetectiveMoved 1 set %DWords $3- msg $2 $c1(You have decided to check) $c2(%VictimsName) msg %GameChannel $c1(The) $c3(detective) $c1(got bored out of his mind, so he decided to do something about it...) msg %CivilianChannel $c1(The) $c3(detective) $c1(decided to check) $c2(%VictimsName) } if ($WhatIs($2) == homeless) { if (%bomdone > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return } set %BumsVictim %VictimsName set %BumMoed 1 %BWords $3- msg $2 $c1(You have decided to check) $c2(%VictimsName) msg %GameChannel $c1(The) $c3(homeless bum) $c1(is out digging in trash...) } if ($EveryoneMoved == yes) { timer1 off | timerGoToDay 1 10 Day } } Heal { set %VictimsName $null if ((%GameIsPlaying == false) || (%GameIsStopped == true) || (%NightTime == no) || ($InGame($2) == no)) return if ($PlayerNumber($1) == yes) set %VictimsName $read(l.txt,$1) else set %VictimsName $1 if ($InGame(%VictimsName) == 0) { msg $2 $c1(There is no such player in the game! Please try again...) | return } if (%DoctorMoved > 0) { msg $2 $c2(Sorry, but you've already made your move...) | return } if (%LastPersonHealed == %VictimsName) msg $2 $c1(Sorry, as kind as you may be, but you can't heal the same person more than once in a row!) set %LastPersonHealed %VictimsName set %DoctorsVictim %VictimsName set %DoctorMoved 1 msg %GameChannel $c1(The) $c3(doctor) $c1(got a call, so he collected his pills and syringes...) msg $2 $c1(You have decided to heal) $c2(%VictimsName) set %HWords $3- if ($EveryoneMoved == yes) { timers off | timerGoToDay 1 10 Day } } PlayerNumber { if (!$1) return no if ($1 !isnum) return no else { if ($read(l.txt,$1)) return yes } return no } ShowTeams { set %x 1 :next1 set %y 1 :next2 if (%y == %x) { inc %y | goto next2 } if (%x > %TotalMafia) goto GoodTeam if (%y > %TotalMafia) { inc %x | goto next1 } msg $read(m.txt,%x) $c3(Mafia number: %j) $c2($read(m.txt,%y)) inc %x goto next2 :GoodTeam if (%TotalHomeless != 0) { msg %Detective $c3(Homeless bum:) $c2(%Homeless) msg %Homeless $c3(Detective:) $c(%Detective) } } WhatIs { if (%WasDetective == $1) return Detective if (%WasKiller == $1) return Killer if (%WasDoctor == $1) return Doctor if (%WasHomeless == $1) return Homeless set %x 1 while ($read(w.txt,%x) != $null) { if ($read(w.txt,%x) == $1) return Mafia inc %x } return civilian } ChangedNick { if ((%GameIsPlaying == false) || ($GameIsStopped == true) || ($InGame($1) == no)) return if (%Registration == on) { Punt $1 write l.txt $2 mode %GameChannel +v $2 msg %GameChannel $c2($2) $c1(you've been re-registered with the new nick!) return } if ($GotKicked($1) == > 0) return msg %GameChannel $c1(Everybody, remember this once and for all, especially you) $c2($2) $+ $c1(! Changing your nick during the game results in death!) if ($2 ison %GameChannel) mode %GameChannel -v $2 msg %GameChannel $c2($2) $c1(you will be excluded from the game...) write q.txt $1 } EndGame { close -m set %GameIsPlaying false timerUnsetM 1 10 mode %GameChannel -m { set %prefix $+(-,$str(v,$modespl)) } :start set %massing $nick($chan,0) while (%massing) { if ($nick(%GameChannel,%massing) != $me) { set %mass1 %mass1 $nick($chan,%massing) } if ($gettok(%mass1,0,32) = $modespl) { mode $chan %prefix %mass1 | unset %mass1 } dec %massing } mode $chan %prefix %mass1 | unset %mass1 return } MafiaNumber { set %x 1 while ($read($read(m.txt,x))) { if ($1 == $read(m.txt,%x)) return %x if ($read(m.txt,%x) == $null) return 0 inc %x } } fif { var %find = $read($1,tw,$2) return $readn } FoundOutRole { if ((%GameIsPlaying == false) || (%GameIsStopped == true)) return if (($WhatIs($1) != Detective) && ($WhatIs($1) != homeless)) return if (($WhatIs($1) == Detective) && (%DetectivesVictim != $null) && (%DetectiveChecked == yes)) { if ($WhatIs(%DetectivesVictim) == civilian) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(civilian) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(civilian) | return } if ($WhatIs(%DetectivesVictim) == detective) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(detective) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(detective) | return } if ( $role(%victname) == 3 ) { msg $1 4 $+ %victname 10- is the 12killer10! | /msg %CivilianChannel 4 $+ %victname 10- is the 12killer10! 10To invite the player here, type in 4!invite nick } if ($WhatIs(%DetectivesVictim) == mafia) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(mafia) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(mafia) | return } if ($WhatIs(%DetectivesVictim) == doctor) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(doctor) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(dotor) | return } if ($WhatIs(%DetectivesVictim) == killer) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(killer) | msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(killer) | return } if ($WhatIs(%DetectivesVictim) == homeless) { msg $1 $c2(%DetectivesVictim) $c1(- is the) $c3(homeless bum) | /msg %CivilianChannel $c2(%DetectivesVictim) $c1(- is the) $c3(homeless bum) | return } } if (($WhatIs($1) == Homeless) && (%BumsVictim != $null)) { if ($WhatIs(%BumsVictim) == civilian) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(civilian) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(civilian) | return } if ($WhatIs(%BumsVictim) == detective) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(detective) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(detective) | return } if ( $role(%victname) == 3 ) { msg $1 4 $+ %victname 10- is the 12killer10! | /msg %CivilianChannel 4 $+ %victname 10- is the 12killer10! 10To invite the player here, type in 4!invite nick } if ($WhatIs(%BumsVictim) == mafia) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(mafia) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(mafia) | return } if ($WhatIs(%BumsVictim) == doctor) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(doctor) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(dotor) | return } if ($WhatIs(%BumsVictim) == killer) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(killer) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(killer) | return } if ($WhatIs(%BumsVictim) == homeless) { msg $1 $c2(%BumsVictim) $c1(- is the) $c3(homeless bum) | msg %CivilianChannel $c2(%BumsVictim) $c1(- is the) $c3(homeless bum) | return } } } AllAccepted { if (%DetectiveAccepted == no) return no if (%DoctorAccepted == no) return no if (%KillerAccepted == no) return no if (%HomelessAccepted == no) return no set %x 1 while ($read(a.txt,t,$calc(%x)) != $null) { if ($read(a.txt,t,%x) == no) return no inc %x } if ($read(a.txt,t,%x) == $null) return yes }
-
Hello!!
This is a Unscramble Game by myselfhe Works with random nicks of the chan
To load Paste in: Alt+R file/new
To play type in the channel: !wnick(english version)
enjoy 😉
on *:text:!wnick:#: { if (%qnick.game-status != on) { set %qnick.game-status on set %qnick.game-nick $qnickrand($chan) set %qnick.game-last-nick %qnick.game-nick if (!%qnick.game-games) { set %qnick.game-games 1 } if (%qnick.game-games) { inc %qnick.game-games } /msg $chan 7W14nick-Gam7E 7N14ew Nic7K 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14o Stop this nic7K9:4 !wstop /nscrammble %qnick.game-nick $chan set %qnick.game-start $ctime } else { if (!%floo-time) { set -u15 %floo-time ok /nscrammble %qnick.game-nick $chan } } } alias qnickrand { var %qnick.game-nick1 = $nick($1,$r(1,$nick($1,0))) while ( %qnick.game-nick1 = %qnick.game-last-nick ) { set %qnick.game-nick1 $nick($1,$r(1,$nick($1,0))) } return %qnick.game-nick1 } alias nscrammble { /msg $2 7W14nick-Gam7e 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7U14nscramble this NickNam7E9: $misturecs(%qnick.game-nick) } on *:text:%qnick.game-nick:#: { if (%qnick.game-status == on) { /msg $chan 7[4 $nick 7] 7W14inns the gam7E 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14imeGam7E9: $duration($calc($ctime - %qnick.game-start)) 7T14he nickname wa7S:4 %qnick.game-nick /msg $chan 7W14nick-Gam7e 7T14o new gam7E4 !wnick set %qnick.game-status off unset %qnick.game-nick } } on *:text:!wstop:#: { if (%qnick.game-status == on) { /msg $chan 7W14nick-Gam7e 12( $+ Game N°: $+ %qnick.game-games $+ 12) 7T14imeGam7E9: 9 $duration($calc($ctime - %qnick.game-start)) 7S14toped!!7! /msg $chan 7W14nick-Gam7e 7N14oOne get it right!!! The Scrambled nickname wa7S9:4 %qnick.game-nick set %qnick.game-status off unset %qnick.game-nick /msg $chan 7W14nick-Gam7e 7T14o a new scrambled nick Typ7E9:4 !wnick } } ;# yeahss you never seen this!!! # ;# Becouse this on IS MINE ONE :pPpP # alias misturecs { var %trrr = $lower($1) var %trr = $len($1) var %trr1 = 1 while (%trr1 <= %trr) { var %trr2 = %trr2 $+ $mid(%trrr,%trr1,1) $+ . inc %trr1 } var %tra = %trr2 var %tr = $numtok(%trr2,46) var %tr1 = 1 var %tr2 = %tr while (%tr1 <= %tr) { set %tr3 $rand(1,%tr2) var %trr12 = $remove(%tra,.) var %tr4 = %tr4 $+ $mid(%trr12,%tr3,1) var %tra = $deltok(%tra,%tr3,46) dec %tr2 inc %tr1 } return %tr4 } ;############ The End :)~ ##################
-
SCRIPT ID: GUESSINGBOT
Hello!
This is an IRC Game Script! Remember the classic guessing games where the bot selects a random number and you try to guess it??
Well! Time for a change, don't you think?
This Bot Script will ask you to select a number from 1 to 7 and will try to guess it!
As more users play the bot will become "smarter" and guess right more times than wrong!
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::v0.5 > 28/7/2016 ::
::Added: Auto Cancel After Player 1min idle (idle as in no game commands used) ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;;Guessing Bot Script by OrFeAsGr;; http://humanity.ucoz.com ;; More Scripts! ;;Current version: v0.5 ;; ;;Have Fun;;; ;; http://hawkee.com/snippet/16940/ ;; ON *:TEXT:*:#: { if ($strip($1) == !guess) { if (!%GUESSINGBOTversion) || (%GUESSINGBOTversion != v0.5) { set %GUESSINGBOTversion v0.5 } if (!%guesson) { st-gb $nick $chan !ready set %guesson readywait .timer 1 1 msg $chan Hey $nick ... Think of a number from 1 to 7 and i'll try to guess it! Type !ready when you're ready! set %guessnick $nick set %guesschan $chan } elseif (%guesson) { .timer 1 1 msg $chan Hey! I'm an mIRC Script not Ainstain! You wait for your turn $+($nick,.) I'm guessing $+(%guessnick,'s) number at the moment. } } elseif ($strip($1) == !ready) { if (%guesson == readywait) && (%guessnick == $nick) && (%guesschan == $chan) { .timerst-gb 1 60 st-gb $nick $chan !utry .timer 1 1 msg $chan OK! Now you have to define how many tries i got! Type !utry 1-5 set %guesson utrywait } } elseif ($strip($1) == !utry) { if (%guesson == utrywait) && (%guessnick == $nick) && (%guesschan == $chan) { if ($strip($2) isnum 1-5) { .timerst-gb 1 60 st-gb $nick $chan !uright/!uwrong set %utry $strip($2) set %guesson guessing .timer 1 1 msg $chan Alright! I'm gonna start guessing now! If i guess right type: !uright .timer 1 2 msg $chan If i guess wrong type !uwrong .timer 1 3 guessnum } } } elseif ($strip($1) == !uright) || ($strip($1) == !uwrong) { if (%guesson == guessing) && (%guessnick == $nick) && (%guesschan == $chan) { .timerst-gb 1 60 st-gb $nick $chan !uright/!uwrong if ($strip($1) == !uright) { if (!%fguess) { set %fguess 1 } inc $+(%,num,%crand) 1 inc %foundnums 1 inc %totnums 1 .timerst-gb* off .timer 1 1 msg $chan Yayyyy! I found it on my $ord(%guessnum) attempt! I'm so damn smart! Thanks for playing with me $nick <3 .timer 1 5 msg %guesschan Out of %totnums numbers i have guessed right %foundnums and wrong %notfoundnums if (!%adv) { set -u1200 %adv 1 | .timer 1 10 msg %guesschan The Guessing Bot Script by OrFeAsGr :.::. http://humanity.ucoz.com .::.: } unset %guess* %crand %saidguess %nfrands %utry } else { .timer 1 1 msg %guesschan uuuh! Cmon! .timer 1 2 guessnum } } } } alias guessnum { inc %guessnum 1 if (%guessnum <= %utry) { if (!%fguess) { if ($numtok(%nfrands,32) < %utry) { var %rand = $rand(1,7) while ($istok(%nfrands,%rand,32)) { var %rand = $rand(1,7) } set %nfrands $addtok(%nfrands,%rand,32) set %crand %rand .timer 1 1 msg %guesschan Is it..... %rand ???? } } elseif (%fguess) { var %t = %guessnum var %max = 0 while (%t <= 7) { if ($($+(%,num,%t),2) > %max) { var %max = %t ;OrFeAsGr http://humanity.ucoz.com } inc %t } if (%max == 0) || (%max == %guesslmax) || ($istok(%saidguess,%max,32)) { var %randx = $rand(1,7) while ($istok(%saidguess,%randx,32)) { var %randx = $rand(1,7) } set %saidguess $addtok(%saidguess,%randx,32) set %crand %randx .timer 1 1 msg %guesschan Is the number you thought of.... %randx } elseif (%max != 0) || (%max != %guesslmax) || (!$istok(%saidguess,%max,32)) { set %saidguess $addtok(%saidguess,%max,32) set %guesslmax %max .timer 1 1 msg %guesschan Maybe it is... idk... %max ?? } } } elseif (%guessnum > %utry) { .timerst-gb* off inc %totnums 1 inc %notfoundnums 1 .timer 1 1 msg %guesschan Oh damn it! I lost all my chances! .timer 1 2 msg %guesschan Thanks for playing %guessnick .timer 1 6 msg %guesschan Out of %totnums numbers i have guessed right %foundnums and wrong %notfoundnums if (!%adv) { set -u1200 %adv 1 | .timer 1 10 msg %guesschan The Guessing Bot Script by OrFeAsGr :.::. http://humanity.ucoz.com .::.: } unset %guess* %crand %saidguess %nfrands %utry } ;;;;;The Guessing Bot Script by OrFeAsGr;;;;;; ;;;;;;http://hawkee.com/snippet/16940/;;;;;;;; ;;;;;;;;;http://humanity.ucoz.com;;;;;;;;;;;;; ;;;;;;;;Check Out Humanity IRC Bot;;;;;;;;;;;; } alias st-gb { if ($timer(st-gb).secs) { .timerst-gb* off } .timerst-gb 1 60 msg $2 $1 Didn't Use $3 Command In Time... Now Accepting New Player! .timerst-gb2 1 60 unset %crand %saidguess %nfrands %utry %guess* }
-
SCRIPT ID: EMAIL
Hi! This is one more mIRC Script by OrFeAsGr !
Quick FAQ
-What do i need your script for?
This script uses the API provided by https://mailboxlayer.com/ to verify if the email you request is a real email
-Neat! How does it work?
The script triggers with a channel message! Type !emailver
(Of course without the < and > around the email address)
The bot responds with a channel message!
-Do i need something extra for the script to work?
Yes and no. I have registered for a free account on https://mailboxlayer.com/ so the limit of requests is 1000 per month.
If some users start using the script the limit will be reached soon and the script will message the following error:
Code: 104 Type: "usage_limit_reached" Info: User has reached or exceeded his subscription plan's monthly API Request Allowance.
You could use the key i provide to test if the limit isn't reached at the time but soon you'll have to easily sign up at https://mailboxlayer.com/ and get your API key.
Then replace my key with yours at line 8 of the script.
i.e this line:
return 00564d4dfd1e326146ed7568f367b2f6
(do not erase return)So this is all i had to explain!
Here's the script!
v0.1 24/6/2016
-Added version and ID for Update Checker!;;; v0.1 24/6/2016 ;;; ;;; http://humanity.ucoz.com ;;; alias emailver { sockopen emailver apilayer.net 80 set %emailver $1 set %emailchan $2 } alias emailverapikey { return 00564d4dfd1e326146ed7568f367b2f6 } ON *:SOCKOPEN:emailver: { if ($sockerr) { msg %emailchan 10An Error Occured While Verifying %emailver | unset %emailver %emailchan | sockclose $sockname } sockwrite -nt $sockname GET $iif(%emailver, $+(/api/check?access_key=,$emailverapikey,&email=,$v1,&smtp=1&format=1), $null) HTTP/1.1 sockwrite -nt $sockname Host: apilayer.net sockwrite $sockname $crlf } ON *:SOCKREAD:emailver: { if ($sockerr) { msg %emailchan An Error Occured While Verifying %emailver | unset %emailchan %emailver | sockclose $sockname } var %ev sockread %ev if (*smtp_check":true* iswm %ev) { msg %emailchan 3Email14: %emailver $+($chr(03),03,$chr(10004)) 7Exists14! unset %emailchan unset %emailver sockclose $sockname } elseif (*smtp_check":false* iswm %ev) { msg %emailchan 3Email14: %emailver $+($chr(03),04,$chr(10008)) 7Doesn14'7t Exist14! unset %emailver sockclose $sockname } elseif (*success": false* iswm %ev) { set %evfalse 1 } if (%evfalse) { if (*code":* iswm %ev) { set %errorcode $remove($gettok(%ev,2,58),$chr(44)) } if (*type":* iswm %ev) { set %errortype $remove($gettok(%ev,2,58),$chr(44)) } if (*info":* iswm %ev) { set %errorinfo $remove($gettok(%ev,2,58),$chr(44)) unset %evfalse sockclose $sockname msg %emailchan 10Your Request For %emailver 10Returned the following error14: .timer 1 1 msg %emailchan 10Code14: %errorcode 10Type14: %errortype 10Info14: %errorinfo .timer 1 2 unset %emailchan %errorinfo %errortype %errorcode } } } ON *:TEXT:*:#: { if (!emailver == $strip($1)) { if (!%EMAILversion) || (%EMAILversion != v0.1) { set %EMAILversion v0.1 } if (*@*.* !iswm $strip($2)) { .timer 1 1 msg $chan 10The email you requested was not checked because it doesn't match the usual format of email adresses14. Please provide a valid email (e.g oneemail@someserver.com) } elseif (*@*.* iswm $strip($2)) { if (!%emvdel) { set -u100 %emvdel 1 emailver $strip($2) $chan } } } } ;;;;;;Script by OrFeAsGr;;;;;;;; ;;;;http://humanity.ucoz.com;;;; ;;;;;;Humanity I.R.C Bot;;;;;;;;
-
Below is a very simple example of how to create a basic websocket using node.js. Websockets are great for maintaining a server/client relationship without as much of the overhead of HTTP web traffic. Today, websockets are used to build a magnitude of browser-based real-time applications (live chats, multiplayer games). Basically it's a persistent connection between the server and client in which both applications can send data. Typically, long-polling or Flash have been used as alternatives.
First, you'll need to install the "websocket" package using the Node Package Manager.
1
npm install websocket
You may get an error about the Native code not compiling. (attow) I haven't looked into how to resolve that but the websocket package typically still works. Next we'll setup the server and client. Using the javascript below as a basic skeleton, you'll want to start the server just as any other node snippet. In our example, the server will listen for connections and reply "hello" (to any and everything the client sends) then another message shortly after.
ar server = require('websocket').server, http = require('http'); var socket = new server({ httpServer: http.createServer().listen(1337) }); socket.on('request', function(request) { var connection = request.accept(null, request.origin); connection.on('message', function(message) { console.log(message.utf8Data); connection.sendUTF('hello'); setTimeout(function() { connection.sendUTF('this is a websocket example'); }, 1000); }); connection.on('close', function(connection) { console.log('connection closed'); }); });
Once the server has been started, you can use the code below in any HTML5 browser (that carries websocket support) to establish a connection to the server. In this example, the client sends a "hello" message when it opens the connection and puts anything it receives into the #content div.
<div id="content"></div> <script type="text/javascript"> var content = document.getElementById('content'); var socket = new WebSocket('ws://localhost:1337'); socket.onopen = function () { socket.send('hello from the client'); }; socket.onmessage = function (message) { content.innerHTML += message.data +'<br />'; }; socket.onerror = function (error) { console.log('WebSocket error: ' + error); }; </script>
-
So.
Last night I decided to try out kvirc.
I'll be honest I don't like it.
Its too picturey I like basic text.But out of all features, one feature really caught my eye.
"The AVATAR Idea"
The concept of users having avatars on IRC.I really liked this idea, a friend on a chat server told be it used DCC.
I asked about how it worked and he werent to sure as he didn't use that feature.So after playing around with mIRC and kvirc I found out how it works.
Its just CTCP's and DCC's 😄
So I spent till 5am coding this damn thing up after a lot of dead ends and troubleshooting I've sorted it.
So have fun,Report any bugs you find.
NOTE:
Currently two mIRC clients don't properly swap avatars.
I intend to fix this soon!Leave comments, bug reports and suggestions below.
I intend to setup a bug reporting system for my scripts!
Find me at irc.ilkotech.co.uk in #ilkotech if you want help with anything mIRC related!
;The AVATAR Idea. ;This nice feature is used in kvirc, and its nice. ;So why not let mIRC do the same? ;So thats what I intend to do with this script. ;Unluckily i've never used DCC in scripts so this will be a test. ;Script by Thomas Edwards (TMFKSOFT) ;Copyright Ilkotech.co.uk & Thomas Edwards 2011 ;I plan for it to modify the address book :) ;Let the games begin. menu nicklist { - Notify Avatar:/avatar_send $1 View Avatar:/avatar_view $1 } menu * { Set Avatar:/avatar_set } alias avatar_send { if (%avatar_name != $null) { ctcpreply $1 AVATAR $replace(%avatar_name,$chr(32),_) %avatar_size } else { echo 4You have not set an avatar. Set one via /avatar_set } } alias avatar_set { var %file $sfile($mircdir $+ avatars\,Select Avatar) set %avatar_size $file(%file).size set %avatar_name $right(%file,$calc(0 - $pos(%file,\,$count(%file,\)))) set %avatar_path %file echo Avatar set! } alias avatar_view { if ($1 == $me) { if (%avatar_name != $null) { window -osCdbptw0 @Avatar 0 0 256 256 drawpic -s @Avatar 0 0 256 256 %avatar_path } else { echo 4You have not set an avatar. Set one via /avatar_set } } else { if ($readini(avatars.ini,others,$1) != $null) { window -soCdbptw0 @Avatar 0 0 265 292 drawpic -s @Avatar 0 0 256 256 avatars\ $+ $readini(avatars.ini,others,$1) } } else { echo -t [Avatar] $1 does not have an Avatar. Why not politely ask them for it? } } on *:CTCPREPLY:AVATAR*:{ echo -t $active [Avatar] $nick changes their avatar to $qt($2) if ($exists(avatars\) == $FALSE) { mkdir avatars } if ($exists(avatars\ $+ $2) == $FALSE) { raw -q NOTICE $nick :DCC GET $2 $3 $+ set %avatar_recv 1 } echo Avatar exists. Updating user avatar. writeini avatars.ini others $nick $2 HALTDEF } CTCP *:DCC:{ if ($2 == GET) { echo Sending Avatar. File: $replace(%avatar_name,$chr(32),_) Size: %avatar_size User: $nick dcc SEND $nick %avatar_path } } on *:FILERCVD:*:{ if (%avatar_recv == 1) { copy -o $file($filename).shortfn avatars\ remove $file($filename).shortfn unset %avatar_recv } } on *:NICK:{ if ($readini(avatars.ini,others,$nick) != $null) { writeini avatars.ini others $newnick $readini(avatars.ini,others,$nick) remini avatars.ini others $nick } }
-
!Ng-game - Start Game
!guess 1 - 100 - Play Game
!ad - Ad for the script
!Ngg-End - End Game
!a - Get The Answer send to you in PM {OWNER ONLY}NOTE: Thanks to ICE and Relurk for helpin
;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Number Guessing Game ; ; By Dj 801 ; ; ; ; irc.wubnet.org:6667 ; ; #dj801,#mIRC,#games ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;; on *:LOAD: { .timer 1 1 /echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 Thanks for Loading Number Guessing Game 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ .timer 1 2 /set %ng-game-owner $$?="Game Owner:" .timer 1 3 /set %ng-game-chan $$?="Game Channel:" } Menu Channel { Number Guessing Game .Settings ..Channel Owner ...Owner:/echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 The Game Owner is %ng-game-owner 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ ...Change Owner:/set %ng-game-owner $$?="New Game Owner:" | /echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 The New Game Owner is %ng-game-owner 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ ..Channel ...Channel:/echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 The Game Channel is %ng-game-chan 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ ...Change Channel:/set %ng-game-owner $$?="New Game Channel:" | /echo -a 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) 9,1 The New Game Channel is %ng-game-chan 4,1 $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ $chr(171) $+ } on *:TEXT:*:%ng-game-chan: { if ($1 == !Ng-Game) { set %number $r(1,100) | msg $chan The Number Guessing game has begun. Type !Guess <Number 1 - 100 to play> | halt } elseif (!Guess isin $1-) { if (%number isin $2) { msg $chan 4 Well Done $nick The Number Was $2 } if ($2 == $null) { msg $chan 4 $nick Be sure to include a number when you guess. } if ($2 > 100) { msg $chan 3Please only guess numbers 1 - 100 } if ($2 < 1) { msg $chan 3Please only guess numbers 1 - 100 } if ($2 < %number ) { msg $chan 3It's Higher Than $2 } if ($2 > %number ) { msg $chan 3It's Lower Than $2 } } if (!ad isin $1) { msg $chan This was made by dj801. Dj 801: http://www.hawkee.com/profile/48694/ | msg $chan Thanks to ICE and Relurk for helping with the script } if (!Ngg-End isin $1) && ($nick isop $chan) { msg $chan The number guessing game has been ended by $nick. | unset %number } if (!a isin $1) && ($nick == %owner) { inc %number | msg $nick The Number is %number } }
-
Auto Connect/Join/Identify v1.0 [ source: http://www.hawkee.com/snippet/565/ ] had a lot of features and was easy to use, but unfortunately it had a lot of bugs and was written REALLY badly (Sorry to the author, but come on, hard coding 50 join statements for 5 servers each with 10 channels each is absurd).
By right clicking on a Status, Query or Channel, you'll have the option of popping up the dialog for the script. There are five tabs, one for each server, each with the ability of storing channels to autojoin, a primary and secondary nick and a nickserv password.
You have the option of setting to automatically join each independent server, to automatically be named the nicks supplied, to automatically ident, and even to automatically ghost your primary nick if it is already in use.Bug fixes:
- Autoident worked erratically, depended on which tab was last visited
- If you closed the dialog while not on tab 2-5, when reopened, being on tab 1, would show the wrong information and would delete previous information if you clicked save
- Not really a bug fix, but there were some spelling mistakes in the help
-
The tickboxes would always be shown as ticked, even if the option was not actually on
Improvements: -
Primary and Secondary nicks for each server, with autoghost option:
- * If autoghost is on, and primary nick is already in use, your nick will be automatically ghosted, and you will take it * If autoghost is on, and primary nick is already in use, your nick will be automatically ghosted, and you will take it
-
If autoghost is off, you will connect with secondary nick[]The nick and server fields were too small and didn't have horizontal scrolling (autohs), therefore wouldn't accept long strings
[]Channels are now stored in a combo box, and not in individual editboxes. This means you can now store as many channels as you like per server.
[]Now uses $network to keep track of which server you're connecting to, don't need to enter a subserver into the server field anymore
[]v1.0 was 24kb - This script is only 10kb. No loss to functionality, few bug fixes and some new stuff.
;Shows a link to the script when you right click a status, query or channel window menu status,query,channel { Auto Connect/Join/Identify v2.1:/sci01 } ;Calls the dialog window initialisation and loads the first tab alias sci01 { dialog -m scd01 scd01 | set %tab.scd01 1 } ;Initialises the dialog window dialog scd01 { title "Auto Connect/Join/Identify v2.1" size -1 -1 355 390 tab "Server 1", 1, 5 5 345 265 tab "Server 2", 2 tab "Server 3", 3 tab "Server 4", 4 tab "Server 5", 5 text "Servers address", 6, 15 30 160 12 edit "", 7, 15 45 160 20, autohs text "Server network", 43, 180 30 160 12 edit "", 44, 180 45 160 20, autohs text "Primary nick", 8, 22 80 75 12 edit "", 9, 20 94 85 20, autohs text "Password", 10, 112 80 75 12 edit "", 11, 110 94 60 20, autohs text "Secondary nick", 40, 22 117 75 12 edit "", 41, 20 132 85 20, autohs box "Nicknames", 48, 15 65 160 100 text "Add channel to this server", 49, 22 180 140 20 edit "", 50, 20 194 155 21, autohs button "Add Channel", 51, 20 220 155 25 text "View/delete existing channels", 46, 182 180 150 20 combo 45, 180 194 155 20, drop button "Delete", 52, 180 220 155 25 box "Channels", 47, 15 165 325 90 check "A Conn/Join", 33, 188 83 80 12 check "A Nickname", 34, 188 103 88 12 check "A Identify", 35, 188 123 80 12 check "A Ghost", 42, 188 143 80 12 box "Options", 32, 180 65 100 100 button "SET", 36, 285 70 55 35 button "CLOSE", 37, 285 110 55 35, cancel box "Help", 38, 5 270 345 110 text "", 39, 10 283 325 92, multi } ;On initialisation, display default help text and load first tab on 1:dialog:scd01:init:*: { did -ra $dname 39 Please hover over a button, checkbox or Edit box for help. scd01.loadgui 1 } ;loads the gui with the information for the required tab ( called with $1 being tab number ) alias scd01.loadgui { if ($rs($1, AC) == 1) { did -c scd01 33 } else { did -u scd01 33 } if ($rs($1, AN) == 1) { did -c scd01 34 } else { did -u scd01 34 } if ($rs($1, AP) == 1) { did -c scd01 35 } else { did -u scd01 35 } if ($rs($1, AG) == 1) { did -c scd01 42 } else { did -u scd01 42 } did -ra scd01 7 $rs($1, Server) did -ra scd01 44 $rs($1, Network) did -ra scd01 9 $rs($1, Nick) did -ra scd01 41 $rs($1, Nick2) if ($rs($1, Password) != $null) { did -ra scd01 11 [Hidden] } else did -ra scd01 11 [None] did -r scd01 45 set %rid 0 while (%rid < $rs($1,Channels)) { did -a scd01 45 $rs($1, Room $+ %rid) inc %rid } unset %rid } ;When hovering over any of the edit boxes, check boxes or buttons, the help label will display help information for that element on 1:dialog:scd01:mouse:*: { if ($did == 7) { did -ra $dname 39 Enter the server address here. e.g. irc.gamesurge.net } elseif ($did == 9) { did -ra $dname 39 Enter the primary Nickname you would like to use on this server. Your nick will automatically be set to what is entered here if you have the Auto Nickname option selected. $crlf $+ If it's already in use, and the Auto-ghost option is ticked, the nick will be ghosted and you will be set to this nick. } elseif ($did == 41) { did -ra $dname 39 Enter the secondary Nickname you would like to use on this server. If your Primary nick is already in use, and Auto-ghost is not enabled, your nick will automatically be set to this. } elseif ($did == 11) { did -ra $dname 39 Here you will enter the password to the nickname to the left if your nickname is registered and you selected the auto nickname option. Will automatically identify you when nickserv asks for the password } elseif ($did == 13) || ($did == 15) || ($did == 17) || ($did == 19) || ($did == 21) || ($did == 23) || ($did == 25) || ($did == 27) || ($did == 29) || ($did == 31) { did -ra $dname 39 If Auto connect is selected, you will join these channels when you connect to this server. } elseif ($did == 32) { did -ra $dname 39 Choose which options you would like for this server. Auto connect will automatically connect you to the server and the listed channels. Auto nick will automatically set your nick. Auto Password will automatically identify you when needed. Auto Ghost will ghost your primary nick if it is already in use. If not selected, your secondary nick will be used. $crlf $+ Auto-ghost requires a secondary nick active. } elseif ($did == 36) { did -ra $dname 39 By clicking this button all the info in the edit boxes will be saved for this server. } elseif ($did == 37) { did -ra $dname 39 By clicking this button all changes will be lost. Be sure to click the Set button is you want to save this configuration. } elseif ($did == 44) { did -ra $dname 39 Enter the servers network here. $crlf $+ Find this out by typing '//echo -a $network' whilst connected the the server. eg. GameSurge } elseif ($did == 50) || ($did == 51) { did -ra $dname 39 Enter a channel name and then click the Add button to add that channel to this servers autojoin list. If the channel has a password, enter it after the channel. $crlf e.g. #channelwithpassword password } elseif ($did == 45) || ($did == 52) { did -ra $dname 39 Use the dropdown menu to view the channels set to automatically join when this server starts. If you wish to delete one, pick it from the list then click the Delete button. } } ;Listens for clicks on the tabs and set button on 1:dialog:scd01:sclick:*: { ;If a tab is clicked, load that information into the editable fields and textboxes if (($did == 1) || ($did == 2) || ($did == 3) || ($did == 4) || ($did == 5)) { set %tab.scd01 $did scd01.loadgui $did } ;If the set button is clicked, save all information into the Settings.ini file if ($did == 36) { if ($did($dname, 7).text != $null) { $ws(%tab.scd01, Server, 7) } else { $rms(%tab.scd01, Server) } if ($did($dname, 44).text != $null) { $ws(%tab.scd01, Network, 44) } else { $rms(%tab.scd01, Network) } if ($did($dname, 9).text != $null) { $ws(%tab.scd01, Nick, 9) } else { $rms(%tab.scd01, Nick) } if ($did($dname, 41).text != $null) { $ws(%tab.scd01, Nick2, 41) } else { $rms(%tab.scd01, Nick2) } if (($did($dname, 11).text != $null) && ($did($dname, 11).text != [hidden]) && ($did($dname, 11).text != [none])) { $ws(%tab.scd01, Password, 11) } if ($did($dname, 11).text == $null) { $rms(%tab.scd01, Password) } if ($did($dname, 33).state == 1) { $ws(%tab.scd01, AC, 33) } else { $rms(%tab.scd01, AC) } if ($did($dname, 34).state == 1) { $ws(%tab.scd01, AN, 34) } else { $rms(%tab.scd01, AN) } if ($did($dname, 35).state == 1) { $ws(%tab.scd01, AP, 35) } else { $rms(%tab.scd01, AP) } if ($did($dname, 42).state == 1) { $ws(%tab.scd01, AG, 42) } else { $rms(%tab.scd01, AG) } } ;If the add channel button is clicked, add a channel to the current server in the Settings.ini file if ($did == 51) { if ($did($dname, 50).text != $null) { if ($rs(%tab.scd01, Channels) != $null) { set %channels $rs(%tab.scd01, Channels) } else set %channels 0 $ws(%tab.scd01, Room $+ %channels, 50) did -a scd01 45 $rs(%tab.scd01, Room $+ %channels) inc %channels writeini Settings.ini Server $+ %tab.scd01 Channels %channels did -r scd01 50 unset %channels } } ;If the delete channel button is clicked, delete the current channel in the combo box from the Settings.ini file if ($did == 52) { if ($did($dname, 45) != $null) { set %channels $rs(%tab.scd01, Channels) set %n $did($dname, 45).sel dec %n $rms(%tab.scd01, Room $+ %n) did -d scd01 45 $did($dname, 45).sel dec %channels set %s %n while (%n < %channels) { inc %s writeini Settings.ini Server $+ %tab.scd01 Room $+ %n $rs(%tab.scd01, Room $+ %s) inc %n } $rms(%tab.scd01, Room $+ %n) unset %s writeini Settings.ini Server $+ %tab.scd01 Channels %channels unset %channels unset %n } } } ;When mIRC starts, connect to each of the servers in the Settings.ini file with the primary nick supplied, if there is one. on *:Start: { if ($rs(1, AC) == 1) { server $rs(1, Server) $iif($rs(1, AN) == 1 && $rs(1, nick) != $null, -i $rs(1, Nick),) } set %servc 2 while (%servc <= 5) { if ($rs(%servc, AC) == 1) { server -m $rs(%servc, Server) $iif($rs(%servc, AN) == 1 && $rs(%servc, nick) != $null, -i $rs(%servc, Nick),) } inc %servc } unset %servc } ;When you connect to a server, check that it's one in the Settings.ini file and then connect to the supplied channels on *:Connect: { set %servc 1 while (%servc <= 5) { if (($rs(%servc, Network) == $network) && ($rs(%servc, AC) == 1)) { ;channel counter set %chanc 0 while (%chanc < $rs(%servc, Channels)) { join $rs(%servc, Room $+ %chanc) inc %chanc } unset %chanc if (($rs(%servc, Password) != $null) && ($rs(%servc, AP) == 1) && ($rs(%servc, nick) == $me)) { nickserv identify $rs(%servc, Password) } } inc %servc } unset %servc } ;When nickserv asks to identify, do so with the supplied password from the Settings.ini file on *:notice:*:?: { if (($nick == nickserv) && (identify isin $1-)) { set %servc 1 while (%servc <= 5) { if (($rs(%servc, AP) == 1) && ($server == $rs(%servc, Server))) { nickserv identify $rs(%servc, Password) } inc %servc } unset %servc } } ;When mIRC tells you that your primary nickname is already in use, change to your secondary nick, ghost the primary, and then change to it raw 433:*:{ autoghost $1- } alias autoghost { set %servc 1 while (%servc <= 5) { if ($server == $rs(%servc, Server)) && ($rs(%servc, AG) == 1) { nick $rs(%servc, Nick2) timerghost1 1 2 nickserv ghost $2 $rs(%servc, Password) timerghost2 1 3 nick $2 } inc %servc } unset %servc } ;called by $rs(server number, item) alias rs { return $readini(Settings.ini, Server $+ $1, $2) } ;called by $ws(server number, item, id to read from) alias ws { ;if it's a check box, write the checkboxes state, else write the editboxes text if ($3 == 33) || ($3 == 34) || ($3 == 35) || ($3 == 42) writeini Settings.ini Server $+ $1 $2 1 else writeini Settings.ini Server $+ $1 $2 $did($dname,$3).text } ;called by $rms(server number, item) alias rms { remini Settings.ini Server $+ $1 $2 }
-
exsplains it self...
I got this on mIRC Renegade, i liked it alot tweaked it a lil tooon *:LOAD:{ if ($version < 6.14) { echo -a Uno was coded and tested on mirc 6.14. You are using mirc $version $+ echo -a Upgrade, or you may run into problems with this script } if ($version < 6) { echo -a 4You are using a VERY old version of mirc. You WILL run into problems with this script. } unosetup } alias unosetup { if ($exists($unoini(uno.ini))) { echo -a *** Found an existing config/user database...backing it up ( unoback $+ $ctime $+ .ini ) if ($readini($unoini(uno.ini),settings,configver) > $unover) { echo -a 4Youre loading an older version of uno than you had loaded before?!??!!? echo -a Config Version: $readini($unoini(uno.ini),settings,configver) This version: $unover } copy $unoini(uno.ini) unoback $+ $ctime $+ .ini } if ($readini($unoini(uno.ini),settings,allowreg) == $null) { %tmpmsg = $?!="Do you want to enable user registration? (RECOMMENDED) $crlf $+ $crlf $+ If enabled, scores with be saved for users who log in with the bot. Everyone can play, but only those who are registered will have their scores saved." writeini $unoini(uno.ini) settings allowreg $iif(%tmpmsg == $true,1,0) } if ($readini($unoini(uno.ini),settings,enabled) == $null) { writeini $unoini(uno.ini) settings enabled 1 } if ($readini($unoini(uno.ini),settings,color) == $null) { writeini $unoini(uno.ini) settings color 1 } writeini $unoini(uno.ini) settings configver $unover if ($readini($unoini(uno.ini),settings,encrypt) == 1) { echo -a Encrypted passwords has been removed. All passwords will be converted to plan text once the user logs in. } if ($readini($unoini(uno.ini),settings,idlewarn) == $null) { writeini $unoini(uno.ini) settings idlewarn 30 } if ($readini($unoini(uno.ini),settings,idleremove) == $null) { writeini $unoini(uno.ini) settings idleremove 120 } if (!$exists($unoini(unotheme.ini))) { echo -a 4,1UNOTHEME.INI NOT FOUND! Unobot will NOT work without this file. See http://shady.nu/?x=mirc echo -a *** Loading unobot anyway. } if ($readini($unoini(uno.ini),settings,theme) == $null) { writeini $unoini(uno.ini) settings theme default } if ($readini($unoini(uno.ini),settings,floodmsgs) == $null) { writeini $unoini(uno.ini) settings floodmsgs 7 } if ($readini($unoini(uno.ini),settings,floodreps) == $null) { writeini $unoini(uno.ini) settings floodreps 4 } if ($readini($unoini(uno.ini),settings,floodignoresecs) == $null) { writeini $unoini(uno.ini) settings floodignoresecs 10 } if ($readini($unoini(uno.ini),settings,floodpunishmsg) == $null) { writeini $unoini(uno.ini) settings floodpunishmsg 2 } if ($readini($unoini(uno.ini),settings,floodpunishrep) == $null) { writeini $unoini(uno.ini) settings floodpunishrep 2 } if ($readini($unoini(uno.ini),settings,floodban) == $null) { writeini $unoini(uno.ini) settings floodban 60 } if ($readini($unoini(uno.ini),settings,floodenabled) == $null) { writeini $unoini(uno.ini) settings floodenabled 0 } if ($readini($unoini(uno.ini),settings,htmlbackground) == $null) { writeini $unoini(uno.ini) settings htmlbackground white } if ($readini($unoini(uno.ini),settings,htmltext) == $null) { writeini $unoini(uno.ini) settings htmltext black } if ($readini($unoini(uno.ini),settings,htmlborder) == $null) { writeini $unoini(uno.ini) settings htmlborder black } if ($readini($unoini(uno.ini),settings,topcalc) == $null) { writeini $unoini(uno.ini) settings topcalc 2 } if (!$exists($unoini(uno.ini))) { echo -a -------- echo -a 4,1!UNO.INI WAS NOT CREATED! echo -a Bad location: $unoini(uno.ini) echo -a This means that the directory " $+ $nofile($unoini(uno.ini)) $+ " cannot be written to for one reason or another. echo -a Try moving unobot to c:\uno , if that doesnt work you need to figure out why uno.ini cannot be created in that directory. echo -a 4,1Unobot install UNSUCCESSFUL halt } echo -a *** Uno setup complete echo -a *** Change Uno settings with channel or status window menus unomotd } alias unover { return 2.6 } alias unomotd { if (!$sock(unocheck)) { sockopen unocheck bl4h.mine.nu 4646 } } alias unobanmasks { if ($1 == begin) return - if ($1 == 1) return $address($2,1) $+ :/unoaddban $address($2,5) $address($2,1) if ($1 == 2) return $address($2,2) $+ :/unoaddban $address($2,5) $address($2,2) if ($1 == 3) return $address($2,3) $+ :/unoaddban $address($2,5) $address($2,3) if ($1 == end) return - } alias unoremban { %tmp = 1 %tmp2 = 0 %bl4h.unotmpliness = $lines($shortfn($scriptdir $+ unobans.txt)) while (%tmp <= %bl4h.unotmpliness) { if ($read($shortfn($scriptdir $+ unobans.txt),%tmp) iswm $1) { write -d $+ %tmp $shortfn($scriptdir $+ unobans.txt) inc %tmp2 } else { inc %tmp } } echo -a %tmp2 Bans removed } alias unoaddban { %bl4h.unountmp = 1 %bl4h.unotmplines = $lines($shortfn($scriptdir $+ unobans.txt)) while (%bl4h.unountmp <= %bl4h.unotmplines) { if ($read($shortfn($scriptdir $+ unobans.txt),%bl4h.unountmp) iswm $1) { echo -a ! User already banned as: $read($shortfn($scriptdir $+ unobans.txt),%bl4h.unountmp) } inc %bl4h.unountmp } write $shortfn($scriptdir $+ unobans.txt) $2 echo -a *** Added $2 to the uno ban list } menu Menubar { - (-[Uno]-) .$submenu($unobanmasks($1,$snick($chan,1))) .Custom banmask:/unoaddban $address($snick($chan,1),5) $?="Enter banmask" .Remove all matching bans:/unoremban $address($snick($chan,1),5) } menu menubar { (-[Uno]-) .Uno settings:/unodiag unoman .Uno banlist:{ if ($exists($shortfn($scriptdir $+ unobans.txt))) { run $shortfn($scriptdir $+ unobans.txt) } else { write $shortfn($scriptdir $+ unobans.txt) ;put one ban mask per line | run $shortfn($scriptdir $+ unobans.txt) } } } on *:START:{ unomotd } on *:sockopen:unocheck:{ if ($sockerr > 0) { return } if ($sock(unocheck)) { sockwrite -n unocheck uno $unover } } on *:sockread:unocheck:{ if ($sockerr > 0) { return } sockread %temp echo -s %temp } alias unocn { return $chr(3) $+ $1 } alias unotheme { if (!$readini($unoini(unotheme.ini),$readini($unoini(uno.ini),settings,theme),$2)) { return UNO ERROR: Missing theme var : $2 } %bl4h.unotheme = $readini($unoini(unotheme.ini),$readini($unoini(uno.ini),settings,theme),$2) %bl4h.unotheme = $replace(%bl4h.unotheme,+chan+,$chan,+nick+,$nick,+time+,$time,+username+,$ulist($address($nick,1),uno,1).info,+botnick+,$me) ;%bl4h.unotheme = $replace(%bl4h.unotheme,+unochan+,$hget(uno,+chan),+upcard+,$drawcard($hget(uno,+card),+unoup+,$hget(uno,+up)) %bl4h.unotheme = $replace(%bl4h.unotheme,+1+,$gettok($1-,1,32),+2+,$gettok($1-,2,32),+3+,$gettok($1-,3,32),+4+,$gettok($1-,4,32)) %bl4h.unotheme = $replace(%bl4h.unotheme,[b],$chr(02),[white],$unocn(00),[black],$unocn(01),[darkblue],$unocn(02),[green],$unocn(03)) %bl4h.unotheme = $replace(%bl4h.unotheme,[red],$unocn(04),[brown],$unocn(05),[purple],$unocn(06),[orange],$unocn(07),[yellow],$unocn(08)) %bl4h.unotheme = $replace(%bl4h.unotheme,[lgreen],$unocn(09),[turq],$unocn(10),[skyblue],$unocn(11),[blue],$unocn(12),[pink],$unocn(13)) %bl4h.unotheme = $replace(%bl4h.unotheme,[dgray],$unocn(14),[lgray],$unocn(15),[r],$chr(22),[u],$chr(31)) %bl4h.unotheme = $replace(%bl4h.unotheme,[/b],$chr(2),[/r],$chr(22),[/u],$chr(31)) if ([/ isin %bl4h.unotheme) { %bl4h.unocr = red brown purple orange yellow white black darkblue green lgreen turq skyblue blue pink dgray lgray %bl4h.untmp = 1 while ($gettok(%bl4h.unocr,0,32) >= %bl4h.untmp) { %bl4h.unotheme = $replace(%bl4h.unotheme,[/ $+ $gettok(%bl4h.unocr,%bl4h.untmp,32) $+ ],$chr(3)) inc %bl4h.untmp } } return %bl4h.unotheme } on ^*:NOTICE:uno*:?:{ ;close -m $nick if (!$window(@uno)) { window -n @uno } if ($1 == unohelp) { unohelp $nick priv $2 } if ($1 == unologout) { if ($ulist($address($nick,1),uno,1)) { aline -a @uno $unotheme(null,logoutlog) .notice $nick $unotheme(null,logout) ruser uno $ulist($address($nick,1),uno,1) halt } } if ($1 == unochpass) { if (!$2) { .notice $nick $unotheme($nick,hchpass) } if ($ulist($address($nick,1),uno,1).info) { writeini $unoini(uno.ini) $ulist($address($nick,1),uno,1).info password $2 .notice $nick $unotheme($2,passchange) halt } else { .notice $nick $unotheme(null,notlogged) | halt } } if ($1 == unologin) { unset %bl4h.unologtmp if ($readini($unoini(uno.ini),settings,allowreg) != 1) { .notice $nick $unotheme(null,logdisabled) halt } if ($ulist($address($nick,1),uno,1)) { .notice $nick $unotheme(null,alreadylogged) halt } if (!$2 || !$3) { .notice $nick $unotheme(null,hlogin) | halt } if (!$readini($unoini(uno.ini),$2,registered) || $readini($unoini(uno.ini),$2,registered) == 0) { .notice $nick $unotheme($2,notregged) | halt } if ($3 == $readini($unoini(uno.ini),$2,password) && %bl4h.unologtmp != 1) { %bl4h.unologtmp = 1 } if (%bl4h.unologtmp == 1) { .guser uno $nick 1 $2 .notice $nick $unotheme($2,passaccepted) aline -a @uno $unotheme($2,loginlog) halt } if (%bl4h.unologtmp != 1) { .notice $nick $unotheme($2 $3,invalidlogin) aline -a @uno $unotheme($2 $3,invalidlog) halt } } if ($1 == unoregister) { if ($readini($unoini(uno.ini),$2,registered) == 1) { .notice $nick $unotheme($2,usernametaken) | halt } userhost $nick if (!$2 || !$3) { .notice $nick $unotheme(null,hregister) | halt } if ($len($2) > 20 || $len($3) > 20) { .notice $nick $unotheme(null,toolong) | halt } %bl4h.unolamercheck = $unohostcheck($nick) if (%bl4h.unolamercheck != 0) { .notice $nick $unotheme(%bl4h.unolamercheck,alreadyregged) halt } else { writeini $unoini(uno.ini) $2 password $3 writeini $unoini(uno.ini) $2 registered 1 writeini $unoini(uno.ini) $2 wins 0 writeini $unoini(uno.ini) $2 loss 0 writeini $unoini(uno.ini) $2 score 0 writeini $unoini(uno.ini) $2 totalgames 0 writeini $unoini(uno.ini) $2 place 0 writeini $unoini(uno.ini) $2 playersince $ctime writeini $unoini(uno.ini) $2 redad $address($nick,1) .notice $nick $unotheme($2 $3,regsuccess) .guser uno $nick 1 $2 .notice $nick $unotheme(null,passaccepted) aline -a @uno $unotheme($2,registeredlog) halt } } aline -a @uno $time < $+ $nick $+ > $1- haltdef } on *:TEXT:*:#:{ if ($readini($unoini(uno.ini),settings,enabled) == 1) { ;flood protection if ($hget(flood. $+ $nick,ig)) { halt } if (!%bl4h.floodenabled) { %bl4h.floodenabled = $readini($unoini(uno.ini),settings,floodenabled) } if (%bl4h.floodenabled == 1) { if (!%bl4h.floodunorep) { %bl4h.floodunorep = $readini($unoini(uno.ini),settings,floodreps) } if (!%bl4h.floodunomsgs) { %bl4h.floodunomsgs = $readini($unoini(uno.ini),settings,floodmsgs) } if (!%bl4h.floodunoignore) { %bl4h.floodunoignore = $readini($unoini(uno.ini),settings,floodignoresecs) } if (!%bl4h.floodpunishmsg) { %bl4h.floodpunishmsg = $readini($unoini(uno.ini),settings,floodpunishmsg) } if (!%bl4h.floodpunishrep) { %bl4h.floodpunishrep = $readini($unoini(uno.ini),settings,floodpunishrep) } unset %bl4h.flooder if (!$hget(flood. $+ $nick,s)) { hadd -m flood. $+ $nick t $md5($1-) hadd -m flood. $+ $nick rep 1 hadd -m flood. $+ $nick msg 1 hadd -z flood. $+ $nick s 10 goto gays } if ($md5($1-) isin $hget(flood. $+ $nick,t)) { hinc flood. $+ $nick rep } hadd flood. $+ $nick t $hget(flood. $+ $nick,t) $md5($1-) hinc flood. $+ $nick msg if ($hget(flood. $+ $nick,s)) { if ($hget(flood. $+ $nick,rep) >= %bl4h.floodunorep) { %bl4h.flooder = rep | %bl4h.floodpunish = %bl4h.floodpunishrep } if ($hget(flood. $+ $nick,msg) >= %bl4h.floodunomsgs) { %bl4h.flooder = msg | %bl4h.floodpunish = %bl4h.floodpunishmsg } if (%bl4h.flooder) { hadd -u $+ %bl4h.floodunoignore flood. $+ $nick ig 1 if (%bl4h.floodpunish == 3 && $me isop $chan) { ban -u $+ $readini($unoini(uno.ini),settings,floodban) $chan $nick | %bl4h.unotmpban = $readini($unoini(uno.ini),settings,floodban) } if (%bl4h.floodpunish >= 2 && $me isop $chan) { kick $chan $nick $upper(%bl4h.flooder) FLOOD: $iif(%bl4h.unotmpban,>> $readini($unoini(uno.ini),settings,floodban) second ban,slow down) unset %bl4h.unotmpban } else { .notice $nick $unotheme(%bl4h.floodunoignore,floodmsg) } return } } :gays ;end flood protection } if ($1 == !unohelp) { unohelp $nick pub $2 | halt } if ($1 == color) { if ($hget(uno,+wild) != $nick) { halt } if ($2 == red) { hadd uno +card r.RED | goto k } if ($2 == blue) { hadd uno +card b.BLUE | goto k } if ($2 == green) { hadd uno +card g.GREEN | goto k } if ($2 == yellow) { hadd uno +card y.YELLOW | goto k } halt :k hdel uno +wild goone nextplayer halt } if ($1 == !uno) { if ($unoisban($address($nick,5)) == 1) { .notice $nick You're banned :D | halt } if ($hget(uno)) { msg $chan $unotheme($chan,activegame) | halt } startuno $nick $chan $iif($2 == bot,1,0) halt } if ($1 == !unotop10) { if ($readini($unoini(uno.ini),settings,top10)) { unset %bl4h.unotmpu %bl4h.unotmp = 1 while (%bl4h.unotmp <= $gettok($readini($unoini(uno.ini),settings,top10),0,32)) { %bl4h.unotmpu = %bl4h.unotmpu $ord(%bl4h.unotmp) $+ : $gettok($readini($unoini(uno.ini),settings,top10),%bl4h.unotmp,32) inc %bl4h.unotmp } msg $chan %bl4h.unotmpu } halt } if ($1 == !unostat) { if (!$2) { unostat $chan $nick | halt } else { unostat $chan $2 | halt } } if ($1 == !unoend || $1 = !enduno || $1 = !stopuno) { if (!$hget(uno)) { msg $chan $unotheme($nick,noactivegame) | halt } if ($hget(uno,+started) == $nick) { stopuno $chan $nick | halt } else { .msg $chan $unotheme($hget(uno,+started),endunoerr) | halt } } if ($1 == !unoabout) { .notice $nick Unobot $unover by bl4h (bl4h@shady.nu) http://shady.nu | halt } if ($1- == join) { if (!$hget(uno)) { msg $chan $unotheme(null,noactivegame) | halt } if ($unoingame($nick)) { .notice $nick $unotheme(null,alreadyplaying) | halt } userhost $nick if ($unoisban($address($nick,5)) == 1) { .notice $nick You're banned :D | halt } if ($readini($unoini(uno.ini),settings,allowreg) == 1) { if ($ulist($address($nick,1),uno,1)) { .notice $nick $unotheme(null,playingas) } if (!$ulist($address($nick,1),uno,1)) { .notice $nick $unotheme(null,notplayingas) .notice $nick $unotheme(null,hregistersuggest) } } setupplayer $nick halt } if ($1 == count) { unocount | halt } if ($1 == order || $1 == turns) { if ($hget(uno,+turn)) { msg $chan Up: $gettok($unoorder,1,32) Next: $gettok($unoorder,2-,32) $+ } } if ($1 == !unoremove) { if ($unoingame($nick)) { .notice $nick You may not join this current game again. hadd uno +nojoin $hget(uno,+nojoin) $address($nick,2) unoremplayer $nick halt } } if ($hget(uno,+wild)) { msg $hget(uno,+chan) $unotheme($hget(uno,+wild),wildwait) | halt } if ($1 == play) { if ($hget(uno,+up) != $nick) { .notice $nick $unotheme($nick,notyourturn) | halt } playcard $nick $2- halt } if ($1 == pass) { if (!$hget(uno)) { .notice $nick $unotheme($nick,noactivegame) | halt } if ($hget(uno,+up) != $nick) { .notice $nick $unotheme(null,notyourturn) | halt } if (!%bl4h.unodraw) { .notice $hget(uno,+up) $unotheme(null,mustdraw) | halt } goone nextplayer halt } if ($1 == draw) { if (!$hget(uno)) { .notice $nick $unotheme($nick,noactivegame) | halt } if ($hget(uno,+up) != $nick) { .notice $nick $unotheme(null,notyourturn) | halt } if (%bl4h.unodraw == 1) { .notice $nick $unotheme(null,passorplay) | halt } givecards $hget(uno,+up) 1 %bl4h.unodraw = 1 .notice $hget(uno,+up) $unotheme(null,passorplay) halt } } } alias unoisban { %bl4h.unotmp = 1 while (%bl4h.unotmp <= $gettok($hget(uno,+nojoin),0,32)) { if ($gettok($hget(uno,+nojoin),%bl4h.unotmp,32) iswm $1) { return 1 } inc %bl4h.unotmp } if ($exists($shortfn($scriptdir $+ unobans.txt))) { %bl4h.unotmp = 1 while (%bl4h.unotmp <= $lines($shortfn($scriptdir $+ unobans.txt))) { if ($read($shortfn($scriptdir $+ unobans.txt),%bl4h.unotmp) iswm $1) { return 1 } inc %bl4h.unotmp } } return 0 } alias playcard { %bl4h.unoply = $hascard($1,$2-) if (%bl4h.unoply != 0) { hadd uno +card $upper(%bl4h.unoply) removecard $hget(uno,+up) $upper(%bl4h.unoply) if ($gettok($hget(uno,$1),0,45) == 1) { msg $hget(uno,+chan) $unotheme($hget(uno,+up),hasuno) } if (!$gettok($hget(uno,$1),0,45)) { if (%bl4h.unoply == W.D.F) { givecards $gettok($unoorder,2,32) 4 } if ($gettok(%bl4h.unoply,2,46) == dt) { givecards $gettok($unoorder,2,32) 2 } msg $hget(uno,+chan) $unotheme($hget(uno,+up),unowin) msg $hget(uno,+chan) Duration: $duration($calc($ctime - $hget(uno,+time))) unoscore $hget(uno,+up) stopuno $hget(uno,+chan) $hget(uno,+up) halt } if (%bl4h.unoply == W.D.F) { hadd uno +wild $hget(uno,+up) goone givecards $hget(uno,+up) 4 msg $hget(uno,+chan) $unotheme($hget(uno,+up),drawfour) if ($hget(uno,+up) == $me) { msg $hget(uno,+chan) $unobotmad } if ($hget(uno,+wild) == $me) { hadd uno +card $unobc(WILD) msg $hget(uno,+chan) I choose color $gettok($hget(uno,+card),2,46) hdel uno +wild nextplayer halt } msg $hget(uno,+chan) $unotheme($hget(uno,+wild),choosecolor) halt } if (%bl4h.unoply == W) { hadd uno +wild $hget(uno,+up) goone if ($hget(uno,+wild) == $me) { hadd uno +card $unobc(WILD) msg $hget(uno,+chan) I choose color $gettok($hget(uno,+card),2,46) hdel uno +wild nextplayer halt } msg $hget(uno,+chan) $unotheme($hget(uno,+wild),choosecolor) halt } if ($gettok(%bl4h.unoply,2,46) == r) { if ($hget(uno,+rot) == inc) { hadd uno +rot dec | msg $hget(uno,+chan) $unotheme(null,reverseback) | goto poo } if ($hget(uno,+rot) == dec) { hadd uno +rot inc | msg $hget(uno,+chan) $unotheme(null,reversefwd) } :poo if ($gettok($hget(uno,+players),0,32) == 2) { nextplayer | halt } } if ($gettok(%bl4h.unoply,2,46) == dt) { goone msg $hget(uno,+chan) $unotheme($hget(uno,+up),drawtwo) if ($hget(uno,+up) == $me) { if ($rand(1,3) == 2) { msg $hget(uno,+chan) $unobotmad } } givecards $hget(uno,+up) 2 } if ($gettok(%bl4h.unoply,2,46) == s) { goone msg $hget(uno,+chan) $unotheme($hget(uno,+up),skipped) } goone nextplayer } } alias goone { if ($hget(uno,+rot) == inc) { if ($gettok($hget(uno,+players),0,32) == $hget(uno,+turn)) { hadd uno +turn 1 } else { hinc uno +turn } } if ($hget(uno,+rot) == dec) { if ($hget(uno,+turn) == 1) { hadd uno +turn $gettok($hget(uno,+players),0,32) } else { hdec uno +turn } } hadd uno +up $gettok($hget(uno,+players),$hget(uno,+turn),32) unosendn } alias unoorder { %bl4h.unototal = $gettok($hget(uno,+players),0,32) %bl4h.unopos = $hget(uno,+turn) %bl4h.unotmp = $hget(uno,+turn) %bl4h.unoorder = $gettok($hget(uno,+players),$hget(uno,+turn),32) if ($hget(uno,+rot) == inc) { inc %bl4h.unotmp } if ($hget(uno,+rot) == dec) { dec %bl4h.unotmp } while (%bl4h.unotmp != %bl4h.unopos) { if (%bl4h.unotmp != 0) { %bl4h.unoorder = %bl4h.unoorder $gettok($hget(uno,+players),%bl4h.unotmp,32) } if ($hget(uno,+rot) == inc) { inc %bl4h.unotmp } if ($hget(uno,+rot) == dec) { dec %bl4h.unotmp } if (%bl4h.unotmp <= 0) { if ($hget(uno,+rot) == inc) { %bl4h.unotmp = 1 } if ($hget(uno,+rot) == dec) { %bl4h.unotmp = %bl4h.unototal } } if (%bl4h.unotmp > %bl4h.unototal) { %bl4h.unotmp = 1 } } return %bl4h.unoorder } alias removecard { unset %bl4h.unohi unset %bl4h.unopoo %bl4h.unotmp = 1 %bl4h.unocards = $hget(uno,$1) %bl4h.unotot = $gettok(%bl4h.unocards,0,45) while (%bl4h.unotot >= %bl4h.unotmp) { if (!%bl4h.unohi && $gettok(%bl4h.unocards,%bl4h.unotmp,45) == $2) { set %bl4h.unohi 1 | inc %bl4h.unotmp } else { %bl4h.unopoo = %bl4h.unopoo $+ - $+ $gettok(%bl4h.unocards,%bl4h.unotmp,45) | inc %bl4h.unotmp } } hadd uno $1 %bl4h.unopoo } alias unobotthink { %bl4h.unobotthink = *evil-grin*.. You'll-pay-for-that... woooot.. Dum-de-dum.. hehe.. Oh-boy.. hrm.. Lets-see-here.. uh.. Hmm,-you're-good.. Decisions-decisions.. Ahah!-... Eeny-Meeny-Miney-Moe.. LOL.. Oh-dear.. Errr.. Ah-me-brain!-... return $replace($gettok(%bl4h.unobotthink,$rand(1,$gettok(%bl4h.unobotthink,0,32)),32),$chr(45),$chr(32)) } alias unobotmad { %bl4h.unobotthink = ARRGH! This-is-getting-annoying! RATS! *sigh* You're-getting-on-my-nerves->:/ dfasdfjhweuryaeuwysadjkf I'm-steamed. BAH return $replace($gettok(%bl4h.unobotthink,$rand(1,$gettok(%bl4h.unobotthink,0,32)),32),$chr(45),$chr(32)) } alias unosendn { if ($readini($unoini(uno.ini),settings,idlewarn) > 0) { if (!$1) { .timerunoidle 1 $readini($unoini(uno.ini),settings,idlewarn) /unosendn warn } if ($1 == warn) { .notice $hget(uno,+up) $unotheme($readini($unoini(uno.ini),settings,idleremove),idlewarnplayer) .timerunoidle 1 $readini($unoini(uno.ini),settings,idleremove) /unoremplayer $hget(uno,+up) } } } alias nextplayer { unset %bl4h.unodraw msg $hget(uno,+chan) $+ $hget(uno,+up) up: $drawcards($hget(uno,+card)) if ($hget(uno,+up) == $me) { unobotbrain return } if ($gettok($hget(uno,+players),0,32) > 2) { .notice $hget(uno,+up) Next: $replace($gettok($unoorder,2-,32),$chr(32),$chr(44) $chr(32)) } .notice $hget(uno,+up) $drawcards($hget(uno,$hget(uno,+up))) } alias unobotplay { if (!%bl4h.unohold) { %bl4h.unohold = 1 if ($rand(1,4) == 2) { msg $hget(uno,+chan) $unobotthink } .timer 1 $1 unobotplay $2- halt } unset %bl4h.unohold msg $hget(uno,+chan) play $replace($2-,$chr(46),$chr(32)) playcard $me $2- halt } alias unobc { if ($1 == c) { return $count($hget(uno,$me),$2 $+ .) } if ($1 == n) { return $count($hget(uno,$me),. $+ $2) } if ($1 == r) { %bl4h.unoinc = 1 %bl4h.unocrds = $hget(uno,$me) while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) { if ($gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) == $2) { return $gettok(%bl4h.unocrds,%bl4h.unoinc,45) } inc %bl4h.unoinc } } if ($1 == wild) { %bl4h.unocol = $iif($count($hget(uno,$me),G.) > $count($hget(uno,$me),Y.),G $count($hget(uno,$me),G.),Y $count($hget(uno,$me),Y.)) %bl4h.unocol = $iif($gettok(%bl4h.unocol,2,32) > $count($hget(uno,$me),B.),%bl4h.unocol,B $count($hget(uno,$me),B.)) %bl4h.unocol = $iif($gettok(%bl4h.unocol,2,32) > $count($hget(uno,$me),R.),%bl4h.unocol,R $count($hget(uno,$me),R.)) return $gettok(%bl4h.unocol,1,32) $+ . $+ $replace($gettok(%bl4h.unocol,1,32),r,RED,y,YELLOW,b,BLUE,g,GREEN) } if ($1 == best) { %bl4h.unoinc = 1 %bl4h.unocrds = $hget(uno,$me) %bl4h.unowow = 0 0 while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) { if ($gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),2,46) == $2) { if ($count($hget(uno,$me),$gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) $+ .) > $gettok(%bl4h.unowow,2,32)) { %bl4h.unowow = $gettok(%bl4h.unocrds,%bl4h.unoinc,45) $count($hget(uno,$me),$gettok($gettok(%bl4h.unocrds,%bl4h.unoinc,45),1,46) $+ .) } } inc %bl4h.unoinc } return $gettok(%bl4h.unowow,1,32) } } alias unobotbrain { if ($unobc(c,$gettok($hget(uno,+card),1,46)) > 0) { if ($count($hget(uno,unobot),$gettok($hget(uno,+card),1,46) $+ .S) > 0) { unobotplay $rand(2,5) play $gettok($hget(uno,+card),1,46) S halt } if ($count($hget(uno,unobot),$gettok($hget(uno,+card),1,46) $+ .DT) > 0) { unobotplay $rand(2,5) play $gettok($hget(uno,+card),1,46) DT halt } unobotplay $rand(2,5) play $unobc(r,$gettok($hget(uno,+card),1,46)) halt } if ($unobc(n,$gettok($hget(uno,+card),2,46)) > 0) { unobotplay $rand(2,5) play $replace($unobc(best,$gettok($hget(uno,+card),2,46)),$chr(46),$chr(32)) halt } if ($count($hget(uno,$me),W) > 0) { unobotplay $rand(2,5) play $iif($count($hget(uno,$me),W.D) > 0,WD4,W) halt } if (%bl4h.unodraw != 1) { describe $hget(uno,+chan) draws a card givecards $hget(uno,+up) 1 set %bl4h.unodraw 1 .timer 1 1 unobotbrain halt } if ($rand(1,5) == 2) { msg $hget(uno,+chan) $unobotmad } goone nextplayer } alias hascard { %bl4h.unoinc = 1 %bl4h.unocrds = $hget(uno,$1) %bl4h.unocart = $replace($2-,w,W,wild,W,wd4,W.D.F,wdf,W.D.F,w d 4,W.D.F,w d f,W.D.F) %bl4h.unocart = $replace(%bl4h.unocart,$chr(32),$chr(46)) while ($gettok(%bl4h.unocrds,0,45) >= %bl4h.unoinc) { if ($gettok(%bl4h.unocrds,%bl4h.unoinc,45) == %bl4h.unocart) { if ($gettok(%bl4h.unocart,1,46) == $gettok($hget(uno,+card),1,46) || $gettok(%bl4h.unocart,2,46) == $gettok($hget(uno,+card),2,46) || %bl4h.unocart == W || %bl4h.unocart == W.D.F) { return %bl4h.unocart } } inc %bl4h.unoinc } return 0 } alias makedeck { hmake unocards 500 %bl4h.unotmp = 1 %bl4h.unotmp2 = 1 %bl4h.unotimes = 1 while (%bl4h.unotmp <= 9) { if (%bl4h.unotmp2 > 4) { break } hadd unocards $gettok(G R B Y,%bl4h.unotmp2,32) $+ . $+ %bl4h.unotmp 2 inc %bl4h.unotmp if (%bl4h.unotmp > 9) { set %bl4h.unotmp 1 | inc %bl4h.unotmp2 } } hadd unocards R.0 1 hadd unocards G.0 1 hadd unocards B.0 1 hadd unocards Y.0 1 hadd unocards R.DT 2 hadd unocards G.DT 2 hadd unocards B.DT 2 hadd unocards Y.DT 2 hadd unocards G.R 2 hadd unocards R.R 2 hadd unocards B.R 2 hadd unocards Y.R 2 hadd unocards G.S 2 hadd unocards R.S 2 hadd unocards Y.S 2 hadd unocards B.S 2 hadd unocards W.D.F 4 hadd unocards W 4 } alias stopuno { .timeruno* off msg $hget(uno,+chan) $unotheme($2,stopuno) unset %bl4h.uno* hfree -w uno* } alias startuno { unset %bl4h.uno* hfree -w uno* hmake uno hadd uno +started $1 hadd uno +turn 1 hadd uno +chan $2 hadd uno +rot inc hadd uno +color $readini($unoini(uno.ini),settings,color) if ($3 == 1) { hadd uno +bot 1 } makedeck msg $2 $unotheme($1,unostart) $iif($hget(uno,+bot),$unotheme(null,unostartbot),) .timeruno 1 30 begingame $2 } alias begingame { if (!$gettok($hget(uno,+players),0,32)) { stopuno $1 $me | halt } if ($gettok($hget(uno,+players),0,32) == 1) { hadd uno +bot 1 } if ($hget(uno,+bot) == 1) { setupplayer $me } if ($gettok($hget(uno,+players),0,32) >= 2) { msg $hget(uno,+chan) Playing this round: $hget(uno,+players) %bl4h.unofirst = $hfind(unocards, *, $rand(1,$hfind(unocards, *, 0, w)), w) } ;er remind me to fix this below if ($gettok(%bl4h.unofirst,1,46) == W) { hdec unocards %bl4h.unofirst %bl4h.unofirst = r.RED goto eh } hdec unocards %bl4h.unofirst :eh hadd uno +card %bl4h.unofirst hadd uno +time $ctime if ($hget(unocards,%bl4h.unofirst) == 0) { hdel unocards %bl4h.unofirst } hadd uno +up $gettok($hget(uno,+players),$hget(uno,+turn),32) nextplayer } alias setupplayer { if ($hget(uno,$1)) { halt } hadd uno +players $hget(uno,+players) $1 hadd uno $1 msg $hget(uno,+chan) $unotheme($1,willplay) givecards $1 7 } alias givecards { if ($hget(uno,+up) == $1) { unset %bl4h.unodraw } %bl4h.unotmp = 1 unset %bl4h.unocard* while (%bl4h.unotmp <= $2) { if (!$hget(unocards,0).item) { msg $hget(uno,+chan) $unotheme(null,shuffledeck) | hfree unocards | makedeck } %bl4h.unocard = $hfind(unocards, *, $rand(1,$hfind(unocards, *, 0, w)), w) %bl4h.unocardz = %bl4h.unocardz $+ - $+ %bl4h.unocard hdec unocards %bl4h.unocard if ($hget(unocards,%bl4h.unocard) == 0) { hdel unocards %bl4h.unocard } inc %bl4h.unotmp } hadd uno $1 $hget(uno,$1) $+ %bl4h.unocardz if ($1 == $me) { return } .notice $1 You drew: $drawcards(%bl4h.unocardz) } alias drawcards { unset %bl4h.unofix.* unset %bl4h.unofix %bl4h.unototcar = $gettok($1-,0,45) %bl4h.unotmpp = 1 while (%bl4h.unotmpp <= %bl4h.unototcar) { if ($left($gettok($1-,%bl4h.unotmpp,45),1) == W) { if ($gettok($1-,%bl4h.unotmpp,45) == W.D.F) { if ($hget(uno,+color) == 1) { %bl4h.unofix = %bl4h.unofix 0[8,1W12D0440] } if ($hget(uno,+color) == 0) { %bl4h.unofix = %bl4h.unofix [W D F] } inc %bl4h.unotmpp } if ($gettok($1-,%bl4h.unotmpp,45) == W) { if ($hget(uno,+color) == 1) { %bl4h.unofix = %bl4h.unofix 0[8,1W12I04L9D0] } if ($hget(uno,+color) == 0) { %bl4h.unofix = %bl4h.unofix [WILD] } inc %bl4h.unotmpp } } else { if ($hget(uno,+color) == 1) { if ($left($gettok($1-,%bl4h.unotmpp,45),1) == r) { %bl4h.unofix.r = %bl4h.unofix.r $+ 0[4,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] } if ($left($gettok($1-,%bl4h.unotmpp,45),1) == b) { %bl4h.unofix.b = %bl4h.unofix.b $+ 0[12,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] } if ($left($gettok($1-,%bl4h.unotmpp,45),1) == y) { %bl4h.unofix.y = %bl4h.unofix.y $+ 0[8,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] } if ($left($gettok($1-,%bl4h.unotmpp,45),1) == g) { %bl4h.unofix.g = %bl4h.unofix.g $+ 0[9,01 $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(32) $+ 0] } } if ($hget(uno,+color) == 0) { %bl4h.unofix = %bl4h.unofix $+ $chr(91) $+ $left($gettok($1-,%bl4h.unotmpp,45),1) $+ $chr(32) $+ $gettok($gettok($1-,%bl4h.unotmpp,45),2,46) $+ $chr(93) } inc %bl4h.unotmpp } } %bl4h.unofix = %bl4h.unofix $+ %bl4h.unofix.r $+ %bl4h.unofix.b $+ %bl4h.unofix.y $+ %bl4h.unofix.g return %bl4h.unofix } alias unoscore { %bl4h.unoscore = 0 %bl4h.unotmp = 1 while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp) { if ($gettok($hget(uno,+players),%bl4h.unotmp,32) == $1) { inc %bl4h.unotmp } %bl4h.unotmp2 = 1 while (%bl4h.unotmp2 <= $gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),0,45)) { %bl4h.unocrd = $gettok($gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),%bl4h.unotmp2,45),2,46) %bl4h.unocrd2 = $gettok($gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),%bl4h.unotmp2,45),1,46) if (%bl4h.unocrd2 == W) { inc %bl4h.unoscore 50 } if (%bl4h.unocrd == S) { inc %bl4h.unoscore 20 } if (%bl4h.unocrd == R) { inc %bl4h.unoscore 20 } if (%bl4h.unocrd == DT) { inc %bl4h.unoscore 20 } if (%bl4h.unocrd isnum) { inc %bl4h.unoscore %bl4h.unocrd } inc %bl4h.unotmp2 } inc %bl4h.unotmp } %bl4h.unotmp3 = 1 while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp3) { if ($gettok($hget(uno,+players),%bl4h.unotmp3,32) == $1) { inc %bl4h.unotmp3 } else { if ($gettok($hget(uno,+players),%bl4h.unotmp3,32) == $me) { goto lame } if ($ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1)) { if ($readini($unoini(uno.ini),settings,allowreg) == 1) { %bl4h.unosloss = $calc($readini($unoini(uno.ini),$ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info,loss) + 1) %bl4h.unoswin = $readini($unoini(uno.ini),$ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info,wins) writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info loss %bl4h.unosloss writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info totalgames $calc(%bl4h.unosloss + %bl4h.unoswin) writeini $unoini(uno.ini) $ulist($address($gettok($hget(uno,+players),%bl4h.unotmp3,32),1),uno,1).info lastgame $ctime } } :lame msg $hget(uno,+chan) $gettok($hget(uno,+players),%bl4h.unotmp3,32) $+ : $drawcards($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp3,32))) inc %bl4h.unotmp3 } } msg $hget(uno,+chan) $unotheme($1 %bl4h.unoscore,endscore) if ($1 == $me) { parseunotop | goto skip } if ($readini($unoini(uno.ini),settings,allowreg) == 1) { if ($ulist($address($1,1),uno,1)) { %bl4h.unoscoretot = $calc($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,score) + %bl4h.unoscore) %bl4h.unoscorewins = $calc($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,wins) + 1) %bl4h.unoscoreloss = $readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,loss) writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info totalgames $calc(%bl4h.unoscorewins + %bl4h.unoscoreloss) writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info score %bl4h.unoscoretot writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info wins %bl4h.unoscorewins writeini $unoini(uno.ini) $ulist($address($1,1),uno,1).info lastgame $ctime parseunotop msg $hget(uno,+chan) $1 ( $+ $ulist($address($1,1),uno,1).info $+ ): $+ %bl4h.unoscoretot points $+ < $+ %bl4h.unoscorewins wins / %bl4h.unoscoreloss losses> Place:04 $ord($readini($unoini(uno.ini),$ulist($address($1,1),uno,1).info,place)) } else { .notice $1 $unotheme($1,mustreg) } } :skip } alias unocount { unset %bl4h.unocount %bl4h.unoscore = 0 %bl4h.unotmp = 1 while ($gettok($hget(uno,+players),0,32) >= %bl4h.unotmp) { %bl4h.unotmp2 = 1 %bl4h.unonick = $gettok($hget(uno,+players),%bl4h.unotmp,32) while (%bl4h.unotmp2 <= $gettok($hget(uno,$gettok($hget(uno,+players),%bl4h.unotmp,32)),0,45)) { inc %bl4h.unotmp2 } set %bl4h.unocount %bl4h.unocount %bl4h.unonick $+ : $calc(%bl4h.unotmp2 - 1) inc %bl4h.unotmp } msg $hget(uno,+chan) %bl4h.unocount } alias unostat { if ($ulist($address($2,1),uno,1).info) { %bl4h.unotmp = $ulist($address($2,1),uno,1).info } if (!$ulist($address($2,1),uno,1).info) { %bl4h.unotmp = $2 } if ($readini($unoini(uno.ini),%bl4h.unotmp,totalgames)) { if ($readini($unoini(uno.ini),%bl4h.unotmp,place) == 1) { msg $1 %bl4h.unotmp is $1 $+ 's 8U12N4O master! } if ($readini($unoini(uno.ini),%bl4h.unotmp,place) == 2 || $readini($unoini(uno.ini),%bl4h.unotmp,place) == 3) { msg $1 %bl4h.unotmp is a top 3 player! } msg $1 $+ %bl4h.unotmp $+ : $readini($unoini(uno.ini),%bl4h.unotmp,score) $+ < $+ $readini($unoini(uno.ini),%bl4h.unotmp,wins) $+ W/ $+ $readini($unoini(uno.ini),%bl4h.unotmp,loss) $+ L $+ > Place:4 $ord($readini($unoini(uno.ini),%bl4h.unotmp,place)) } else { msg $1 $+ $2 $+ no such user/no games played } } alias unohelp { if ($2 == pub && !$3) { .notice $1 For official uno rules visit: http://hometown.aol.com/babso00001/unorules.html .notice $1 Use /notice $me unohelp for private commands. .notice $1 Commands: !uno , !unoremove , !unoend , join , play , draw , pass , order , count , !unostat , !unotop10, !unoabout .notice $1 Type !unohelp <command> for help on a specific command return } if ($2 == priv && !$3) { .notice $1 You must register a username to have your scores saved. .notice $1 Commands: unoregister , unologin , unochpass , unologout .notice $1 Use unohelp <command> for help on a specific command return } if ($readini($unoini(unohelp.ini),help,$3) != $null) { .notice $nick $readini($unoini(unohelp.ini),help,$3) } else { .notice $nick No help on that command } } alias unoingame { %bl4h.unod = 1 while ($gettok($hget(uno,+players),0,32) >= %bl4h.unod) { if ($gettok($hget(uno,+players),%bl4h.unod,32) == $1) { return 1 } inc %bl4h.unod } return 0 } alias unohtmlscore { parseunotop %bl4h.unotmp = 1 write -c unotop10.html write unotop10.html <html> write unotop10.html <!-- Generated by unobot $unover ( http://shady.nu ) --> write unotop10.html <head><title>UNO! Top 10 players</title></head> write unotop10.html <STYLE id=default type=text/css> .tabel $chr(123) BORDER-RIGHT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-TOP: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-LEFT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-BOTTOM: $readini($unoini(uno.ini),settings,htmlborder) 2px solid $chr(125) write unotop10.html .tdb $chr(123) BORDER-BOTTOM: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; BORDER-RIGHT: $readini($unoini(uno.ini),settings,htmlborder) 2px solid; $chr(125) </style> write unotop10.html <body bgcolor=" $+ $readini($unoini(uno.ini),settings,htmlbackground) $+ " text=" $+ $readini($unoini(uno.ini),settings,htmltext) $+ "> write unotop10.html <center><table width="70%" class=tabel><tr><td class=tdb>Place</td><td class=tdb>User</td><td class=tdb>Wins</td><td class=tdb>Loss</td><td class=tdb>Score</td></tr> if ($readini($unoini(uno.ini),settings,top10)) { while (%bl4h.unotmp <= $gettok($readini($unoini(uno.ini),settings,top10),0,32)) { %bl4h.unotmpu = $gettok($readini($unoini(uno.ini),settings,top10),%bl4h.unotmp,32) write unotop10.html <tr><td> $ord(%bl4h.unotmp) </td><td> %bl4h.unotmpu </td> write unotop10.html <td> $readini($unoini(uno.ini),%bl4h.unotmpu,wins) </td><td> $readini($unoini(uno.ini),%bl4h.unotmpu,loss) </td> write unotop10.html <td><b> $readini($unoini(uno.ini),%bl4h.unotmpu,score) </b></td></tr> inc %bl4h.unotmp } write unotop10.html </table><br><br><a href="http://shady.nu/?x=mirc">Unobot $unover </a></center></html> run unotop10.html } } alias parseunotop { %bl4h.parsetmp = 1 %bl4h.parsetotal = $ini($unoini(uno.ini),0) if ($ini($unoini(uno.ini),0) > 101 && $hget(uno,+chan)) { msg $hget(uno,+chan) Calculating... } while (%bl4h.parsetmp <= %bl4h.parsetotal) { window -n @sorting if ($ini($unoini(uno.ini),%bl4h.parsetmp) == settings) { goto skip } if ($readini($unoini(uno.ini),settings,topcalc) == 1) { aline @sorting $calc($readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),score) / $readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),totalgames)) $ini($unoini(uno.ini),%bl4h.parsetmp) } if ($readini($unoini(uno.ini),settings,topcalc) == 2) { aline @sorting $readini($unoini(uno.ini),$ini($unoini(uno.ini),%bl4h.parsetmp),score) $ini($unoini(uno.ini),%bl4h.parsetmp) } :skip inc %bl4h.parsetmp } filter -eutc 1 32 @sorting @sorting %bl4h.parsetmp = 1 if ($readini($unoini(uno.ini),settings,top10)) { remini $unoini(uno.ini) settings top10 } while (%bl4h.parsetmp <= $line(@sorting,0)) { writeini $unoini(uno.ini) $gettok($line(@sorting,%bl4h.parsetmp),2,32) place %bl4h.parsetmp if (%bl4h.parsetmp <= 10) { writeini $unoini(uno.ini) settings top10 $readini($unoini(uno.ini),settings,top10) $gettok($line(@sorting,%bl4h.parsetmp),2,32) } :error reseterror inc %bl4h.parsetmp } close -@ @sorting } on *:NICK:{ if ($unoingame($nick)) { hadd uno +players $hget(uno,+players) $newnick hadd uno $newnick $hget(uno,$nick) if ($hget(uno,+up) == $nick) { hadd uno +up $newnick } if ($hget(uno,+wild) == $nick) { hadd uno +wild $newnick } if ($hget(uno,+started) == $nick) { hadd uno +started $newnick } unodelplayer $nick } } on *:JOIN:#:{ if ($unoingame($nick) && $chan == $hget(uno,+chan)) { msg $hget(uno,+chan) WB $nick $+ , Game is still on! Its $hget(uno,+up) $+ 's turn. } } alias unodelplayer { unset %bl4h.unop %bl4h.unol = 1 %bl4h.unone = $gettok($unoorder,2,32) while (%bl4h.unol <= $gettok($hget(uno,+players),0,32)) { if ($gettok($hget(uno,+players),%bl4h.unol,32) != $1) { %bl4h.unop = %bl4h.unop $gettok($hget(uno,+players),%bl4h.unol,32) } inc %bl4h.unol } hdel uno $1 hadd uno +players %bl4h.unop if ($hget(uno,+wild) == $1) { hdel uno +wild | hadd uno +card r.RED } if ($hget(uno,+started) == $1) { hadd uno +started $gettok($hget(uno,+players),1,32) } if ($hget(uno,+up) == $1) { hadd uno +up %bl4h.unone hadd uno +turn $findtok($hget(uno,+players),%bl4h.unone,1,32) nextplayer } } alias unoremplayer { if ($gettok($hget(uno,+players),0,32) > 2) { unodelplayer $1 msg $hget(uno,+chan) $1 has been removed from the game! } else { stopuno $hget(uno,+chan) $1 } } on *:QUIT:{ if ($unoingame($nick)) { unoremplayer $nick } } dialog unouser { title "Uno users" size -1 -1 142 126 option dbu list 1, 6 10 50 88, size vsbar ;button "ADD", 2, 6 104 23 12 box "Group Box", 3, 2 2 58 120 button "DEL", 4, 34 104 21 12 edit "", 5, 88 12 50 10 edit "", 6, 88 28 22 10 edit "", 7, 116 28 22 10 text "Pass:", 8, 66 14 19 8 text "W/L", 9, 66 30 19 8 button "Apply change", 10, 94 66 37 12 edit "", 11, 88 44 50 10 text "Score:", 12, 66 46 21 8 } alias unodref { %tmp = 1 did -r unouser 1 while (%tmp <= $ini($unoini(uno.ini),0)) { if ($ini($unoini(uno.ini),%tmp) != settings) { did -a unouser 1 $ini($unoini(uno.ini),%tmp) } inc %tmp } if (%tmp <= 2) { did -a unouser 1 [No Users yet] did -b unouser 10,4 } } alias unodiag { if ($dialog($1)) { dialog -v $1 | halt } dialog -m $1 $1 } alias unohostcheck { %tmp2 = $address($1,1) %tmp = 1 while (%tmp <= $ini($unoini(uno.ini),0)) { if ($readini($unoini(uno.ini),$ini($unoini(uno.ini),%tmp),redad) iswm %tmp2) { return $ini($unoini(uno.ini),%tmp) } inc %tmp } return 0 } dialog unothemeedit { title "Unobot Theme Editor" size -1 -1 196 68 option dbu list 1, 4 4 54 44, size vsbar edit "", 2, 66 10 120 10, autohs combo 3, 2 52 60 50, drop button "Save", 4, 70 28 37 12, flat button "Preview", 5, 108 28 37 12, flat button "Convert", 6, 146 28 37 12, flat } on *:DIALOG:*:*:*:{ if ($dname == unothemeedit) { if ($devent == init) { %tmp = 1 while ($ini($unoini(unotheme.ini),0) >= %tmp) { did -a unothemeedit 3 $ini($unoini(unotheme.ini),%tmp) inc %tmp } } if ($devent = sclick) { if ($did == 3) { if ($did(3).seltext) { did -r unothemeedit 1 %tmp = 1 while ($ini($unoini(unotheme.ini),$did(3).seltext,0) >= %tmp) { did -a unothemeedit 1 $ini($unoini(unotheme.ini),$did(3).seltext,%tmp) inc %tmp } } } if ($did = 1 && $did(1).seltext) { did -ra unothemeedit 2 $readini($unoini(unotheme.ini),$did(3).seltext,$did(1).seltext) } if ($did = 5 && $did(1).seltext && $did(2).text) { if (!$window(@prev)) { window @prev } aline -a @prev $unotheme(TEST1 TEST2 TEST3 TEST4,$did(1).seltext) } } } if ($dname == unoman) { if ($devent == sclick || $devent == init) { if ($did == 11) { unodiag unouser } if ($did == 13) { unodiag unoabout } if ($did == 12) { unodiag unomisc } if ($did == 3) { writeini $unoini(uno.ini) settings enabled 1 } if ($did == 4) { writeini $unoini(uno.ini) settings enabled 0 } if ($did == 6) { writeini $unoini(uno.ini) settings color 1 } if ($did == 7) { writeini $unoini(uno.ini) settings color 0 } if ($did == 9) { writeini $unoini(uno.ini) settings allowreg 1 } if ($did == 10) { writeini $unoini(uno.ini) settings allowreg 0 } if ($readini($unoini(uno.ini),settings,enabled) == 1) { did -e unoman 4 | did -b unoman 3 } else { did -e unoman 3 | did -b unoman 4 } if ($readini($unoini(uno.ini),settings,allowreg) == 1) { did -e unoman 10 | did -b unoman 9 } else { did -e unoman 9 | did -b unoman 10 } if ($readini($unoini(uno.ini),settings,color) == 1) { did -e unoman 7 | did -b unoman 6 } else { did -e unoman 6 | did -b unoman 7 } } } if ($dname == unoabout) { if ($devent == sclick) { if ($did == 3) { run http://shady.nu } if ($did == 4) { run mailto:bl4h@shady.nu } } } if ($dname == unouser) { if ($devent == init) { unodref } if ($devent == sclick) { if ($did == 1) { did -r unouser 5,6,7,11 did -a unouser 5 $readini($unoini(uno.ini),$did(1).seltext,password) did -a unouser 6 $readini($unoini(uno.ini),$did(1).seltext,wins) did -a unouser 7 $readini($unoini(uno.ini),$did(1).seltext,loss) did -a unouser 11 $readini($unoini(uno.ini),$did(1).seltext,score) } if ($did == 10) { if (!$did(1).seltext) { %tmp = $input(No username selected!,o,Fail) | halt } if ($did(5).text) { writeini $unoini(uno.ini) $did(1).seltext password $did(5).text } if ($did(6).text isnum) { writeini $unoini(uno.ini) $did(1).seltext wins $did(6).text } if ($did(7).text isnum) { writeini $unoini(uno.ini) $did(1).seltext loss $did(7).text } if ($did(11).text isnum) { writeini $unoini(uno.ini) $did(1).seltext score $did(11).text } %tmp = $input(Applied,o,Applied) } if ($did = 4 && $did(1).seltext) { %tmp = $?!="DELETE $did(1).seltext $+ ?" if (%tmp == $true) { remini $unoini(uno.ini) $did(1).seltext } unodref } } } if ($dname == unomisc) { if ($devent == init) { unset %bl4h.flood* did -i unomisc 5,8 1 ignore did -i unomisc 5,8 2 kick did -i unomisc 5,8 3 ban+kick did -i unomisc 12 1 Score / games played did -i unomisc 12 2 Score only did -c unomisc 12 $readini($unoini(uno.ini),settings,topcalc) did -c unomisc 5 $iif($readini($unoini(uno.ini),settings,floodpunishmsg),$readini($unoini(uno.ini),settings,floodpunishmsg),1) did -c unomisc 8 $iif($readini($unoini(uno.ini),settings,floodpunishrep),$readini($unoini(uno.ini),settings,floodpunishrep),1) did -a unomisc 2 $iif($readini($unoini(uno.ini),settings,floodmsgs),$readini($unoini(uno.ini),settings,floodmsgs),5) did -a unomisc 10 $iif($readini($unoini(uno.ini),settings,floodreps),$readini($unoini(uno.ini),settings,floodreps),3) did -a unomisc 17 $iif($readini($unoini(uno.ini),settings,idlewarn),$readini($unoini(uno.ini),settings,idlewarn),60) did -a unomisc 19 $iif($readini($unoini(uno.ini),settings,idleremove),$readini($unoini(uno.ini),settings,idleremove),120) did -a unomisc 22 $iif($readini($unoini(uno.ini),settings,floodban),$readini($unoini(uno.ini),settings,floodban),30) if ($readini($unoini(uno.ini),settings,floodenabled) != $null) { if ($readini($unoini(uno.ini),settings,floodenabled) == 1) { did -c unomisc 24 } else { did -b unomisc 5,8,2,10 } } } if ($devent == sclick) { if ($did == 24) { if ($did(unomisc,24).state == 1) { writeini $unoini(uno.ini) settings floodenabled 1 | did -e unomisc 5,8,2,10 } else { writeini $unoini(uno.ini) settings floodenabled 0 | did -b unomisc 5,8,2,10 } } if ($did == 21) { if ($did(unomisc,2).text isnum && $did(unomisc,10).text isnum && $did(unomisc,17).text isnum && $did(unomisc,19).text isnum && $did(unomisc,22).text isnum) { writeini $unoini(uno.ini) settings floodpunishmsg $did(unomisc,5).sel writeini $unoini(uno.ini) settings floodpunishrep $did(unomisc,8).sel writeini $unoini(uno.ini) settings topcalc $did(unomisc,12).sel writeini $unoini(uno.ini) settings floodmsgs $did(unomisc,2).text writeini $unoini(uno.ini) settings floodreps $did(unomisc,10).text writeini $unoini(uno.ini) settings idlewarn $did(unomisc,17).text writeini $unoini(uno.ini) settings idleremove $did(unomisc,19).text writeini $unoini(uno.ini) settings floodban $did(unomisc,22).text %tmp = $input(Saved,o,Saved) } else { %tmp = $input(invalid numbers,o,error) } } } } } alias unoini { return " $+ $shortfn($scriptdir $+ $1) $+ " } dialog unoman { title "Unobot Manager" size -1 -1 148 82 option dbu notheme icon $shortfn($mircexe), 18 box "Settings", 1, 2 4 144 56 text "Uno On/Off:", 2, 8 14 39 8 button "ON", 3, 60 12 37 12, disable button "OFF", 4, 104 12 37 12, disable text "Card coloring:", 5, 8 30 35 8 button "ON", 6, 60 28 37 12, disable button "OFF", 7, 104 28 37 12, disable text "Registration:", 8, 8 48 35 8 button "ON", 9, 60 44 37 12, disable button "OFF", 10, 104 44 37 12, disable button "User Manager", 11, 2 66 37 12, flat button "Misc Settings", 12, 54 66 37 12, flat button "About", 13, 108 66 37 12, flat } dialog unomisc { title "Unobot" size -1 -1 144 162 option dbu box "Flood settings", 1, 2 2 140 62 edit "", 2, 58 12 14 10 text "Lines in 10 seconds", 3, 74 14 53 8 combo 5, 6 12 36 35, size drop text "after", 6, 44 14 13 8 combo 8, 6 32 36 35, size drop text "after", 9, 44 34 13 8 edit "", 10, 58 32 14 10 text "Repeats in 10 seconds", 11, 74 34 59 8 box "Timer settings", 16, 2 66 140 50 edit "", 17, 106 74 24 10 text "Seconds before idle player is warned:", 18, 8 76 91 8 edit "", 19, 106 88 24 10 text "After warning, player is removed after:", 20, 8 90 91 8 button "Save", 21, 56 146 37 12 edit "", 22, 106 102 24 10 text "Flood ban time in seconds:", 23, 34 104 67 8 check "Enabled?", 24, 46 50 46 10 box "Misc", 4, 2 118 140 24 text "Top 10 by:", 7, 10 128 31 8 combo 12, 60 126 60 32, drop } dialog unoabout { title "Unobot" size -1 -1 132 30 option dbu notheme icon $shortfn($mircexe), $rand(1,21) icon 1, 4 4 15 15, $shortfn($mircexe), $rand(1,21) text Unobot $unover, 2, 30 4 97 10 link "http://shady.nu", 3, 30 18 40 8 link "bl4h@shady.nu", 4, 76 18 50 8
-
Hello, this is my first serious gather bot for counter-strike or counter-strike: source. What is different from others bots? It has admins. U cant start the game if u didnt identify yourself for admin.
To register to admins u have to type in bot private chat .addhost nick password_to_become_admin your_identify_password and identify same but .admin your_identify_passwordAll admins have stats. I mean how many games they done. Everyone can see this by typing in channel .gstats
All players have points. They rise it buy playing games. They can buy things with that points. Points will be decreased. Btw u have to set all things available to buy (name(without spaces),needed points,command(this can be with spaces. Ex: /cs access #channel add %nick(this is the name of nick who wants to buy) 3)
all players can see their points buy typing !rank or !rank nick
they can see all commands for simple users by typing !commands in channelfor admins options u have to type .commands in private chat.
bot will make raindom teams
bot can do commands like .kick nick .voice nick ect...
please make a feedback what is wrong here or what i should make ect.
on *:text:.start*:?:{ if ($2) && ($3) && ($4) && ($5) && ($6) && ($nick = %admin) { .set %server.ip $2 .set %server.pass $3 .set %server.map $4 .set %server.kom.vienas $5 .set %server.kom.du $6 .set %zaidejai.dabar 0 if (%kova != $null) { .set %kova $calc(%kova + 1) } elseif (%kova = $null) { .set %kova 1 } start } else { .msg $nick Wrong syntax. } close -m $nick } alias start { .set %gather.on 1 .set %last.player 0 .set %zaidejai.dabar 0 .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x .msg %chan 0,1Gather Bot: 10 $+ %server.kom.vienas 0 $+ vs 10 $+ %server.kom.du $+ 0. Admin: 8 $+ %admin $+ 0. Map: 10 $+ %server.map 0 $+ . Simple game. [ $+ %kova $+ ] Match .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 } on *:text:!add*:#:{ if (%gather.on = 1) { if ($2) { if ($2 ison $chan) && ($nick = %admin) { if (%p1 != $2) && (%p2 != $2) && (%p3 != $2) && (%p4 != $2) && (%p5 != $2) && (%p6 != $2) && (%p7 != $2) && (%p8 != $2) && (%p9 != $2) && (%p10 != $2) { if (%p10 = x) && (%last.player != 10) { .set %p $+ $calc(%last.player + 1) $2- .set %last.player $calc(%last.player + 1) .write gather.txt $2- .set %zaidejai.dabar $calc(%zaidejai.dabar + 1) .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 if (%last.player = 10) { .msg $chan 8,1 15Gather 4begins15. Password and other information players will get in 2 minutes | /make.teams } } } else { .msg %chan 0,1 $2- is already in game. } } elseif ($2 !ison $chan) { .msg %chan 0,1 $2 is not in the channel } } else { if (%p1 != $nick) && (%p2 != $nick) && (%p3 != $nick) && (%p4 != $nick) && (%p5 != $nick) && (%p6 != $nick) && (%p7 != $nick) && (%p8 != $nick) && (%p9 != $nick) && (%p10 != $nick) { if (%p10 = x) && (%last.player != 10) { .set %p $+ $calc(%last.player + 1) $nick .set %last.player $calc(%last.player + 1) .write gather.txt $nick .set %zaidejai.dabar $calc(%zaidejai.dabar + 1) .msg %chan 0,1Players [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 if (%last.player = 10) { make.teams } } } else { .msg %chan 0,1You are already in the game. } } } } on *:text:!rem*:#:{ if (%gather.on = 1) { if ($2) && ($nick = %admin) { if (%p1 = $2) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p2 = $2) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p3 = $2) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p4 = $2) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p5 = $2) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p6 = $2) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $2- gather.txt } elseif (%p7 = $2) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1 | /.write -ds $+ $2- gather.txt) } elseif (%p8 = $2) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) } elseif (%p9 = $2) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) } } else { if (%p1 = $nick) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p2 = $nick) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p3 = $nick) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p4 = $nick) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p5 = $nick) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p6 = $nick) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p7 = $nick) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p8 = $nick) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p9 = $nick) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } } } } on *:part:#:{ if (%gather.on = 1) { if (%p1 = $nick) { .set %p1 %p2 | .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p2 = $nick) { .set %p2 %p3 | .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p3 = $nick) { .set %p3 %p4 | .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p4 = $nick) { .set %p4 %p5 | .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p5 = $nick) { .set %p5 %p6 | .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p6 = $nick) { .set %p6 %p7 | .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p7 = $nick) { .set %p7 %p8 | .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p8 = $nick) { .set %p8 %p9 | .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } elseif (%p9 = $nick) { .set %p9 %p10 | .set %p10 x | .set %zaidejai.dabar $calc(%zaidejai.dabar - 1) | .msg %chan 0,1Zaidejai [ $+ %zaidejai.dabar $+ /10]:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 $+ 0 $chr(124) $+ 11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 | .set %last.player $calc(%last.player - 1) | /.write -ds $+ $nick gather.txt } } } alias make.teams { if ($len(gather.txt) = 10) { .set %i 1 .set %last.num 1 while (%i <= 10) { .set %tmp $read(gather.txt) .set %p $+ %last.num %tmp inc %i .set %last.num $calc(%last.num + 1) if ($readini(taskai.ini,taskai,%tmp) = $null) { .writeini -n taskai.ini taskai %tmp 1 } elseif ($readini(taskai.ini,taskai,%tmp) != $null) { .set %taskai $readini(taskai.ini,taskai,%tmp) .writeini -n taskai.ini taskai %tmp $calc(%taskai + 1) .unset %taskai } /.write -ds $+ %tmp gather.txt .unset %tmp } .set %adm.taskai $readini(taskai.ini,adminai,%admin) .writeini -n taskai.ini adminai %admin $calc(%adm.taskai + 1) msg $chan 0,1Match begins. Teams: 8 $+ %server.kom.vienas $+ 0:11 %p1 $+ 0 $chr(124) $+ 11 %p2 $+ 0 $chr(124) $+ 11 %p3 $+ 0 $chr(124) $+ 11 %p4 $+ 0 $chr(124) $+ 11 %p5 8 $+ %server.kom.du $+ 0:11 %p6 $+ 0 $chr(124) $+ 11 %p7 $+ 0 $chr(124) $+ 11 %p8 $+ 0 $chr(124) $+ 11 %p9 $+ 0 $chr(124) $+ 11 %p10 $+ 0. Please wait till we send you an information. If you wont get it please tell to game administrator [8 $+ %admin $+ 0] /send.pass .unset %adm.taskai } } on *:text:!off:#:{ if ($nick = %admin) { if (%gather.on = 1) { .set %gather.on 0 .msg $chan 0,1Gather game is now off .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x .unset %nick .unset %pass.typed | .unset %last.player | .unset %last.num /.remove gather.txt .set %online 0 } elseif (%gather.on = 0) { msg $chan 0,1Gather is not turned on. } } } alias send.pass { .write gather.txt %p1 | .write gather.txt %p2 | .write gather.txt %p3 | .write gather.txt %p4 | .write gather.txt %p5 | .write gather.txt %p6 | .write gather.txt %p7 | .write gather.txt %p8 | .write gather.txt %p9 | .write gather.txt %p10 .set %i 1 while (%i <= 10) { .set %tmp $read(gather.txt,%i) inc %i if (%tmp != $null) { .msg %tmp 0,1Hi, server ip: 8 $+ %server.ip 0 and pass 8 $+ %server.pass .msg %tmp 0,1Good luck & have fun } .unset %tmp } .msg %chan 0,1Information is sent. /.remove gather.txt if (%gather.on = 1) { .set %gather.on 0 .set %p1 x | .set %p2 x | .set %p3 x | .set %p4 x | .set %p5 x | .set %p6 x | .set %p7 x | .set %p8 x | .set %p9 x | .set %p10 x .unset %ip | .unset %port | .unset %chan | .unset %nick .unset %pass.typed | .unset %last.player | .unset %last.num /.remove gather.txt .set %online 0 } } menu menubar { Gather .Password(needed for become admin) ( %pass ):/.set %pass $?="Kodas" .Password(to become admin) ( %admin.pass.tapti ):/.set %admin.pass.tapti $?="Kodas" .- .Channel ( %chan ):/.set %chan $?="Kanalas?" .- .Buy options:/dialog -m gth.buy gth.buy } on *:text:!rank*:#:{ if (!$2) { .set %nick $nick if ($readini(taskai.ini,taskai,%nick) != $null) { .msg $chan 0,1Nick: %nick $chr(124) Points: $readini(taskai.ini,taskai,%nick) } elseif ($readini(taskai.ini,taskai,%nick) = $null) { .msg $chan 0,1 $+ %nick didn't play eny matches. } } elseif ($2) { .set %nick $2- if ($readini(taskai.ini,taskai,%nick) != $null) { msg $chan 0,1Nick: %nick $chr(124) Points: $readini(taskai.ini,taskai,%nick) } elseif ($readini(taskai.ini,taskai,%nick) = $null) { .msg $chan 0,1 $+ %nick didn't play eny matches. } } } on *:text:!buy:#:{ .notice $nick You can buy: .set %end $lines(items.txt) .set %i 1 while (%i <= %end) { .set %gth.buy $read(items.txt,%i) .notice $nick $+(%i,$chr(41)) $gettok(%gth.buy,1,32) $gettok(%gth.buy,2,32) inc %i } .notice $nick Write to the private what do you want to buy. Format: !buy number. Ex: !buy 1 (points will be detracted.) .unset %gth.buy | .unset %i | .unset %end } on *:text:!buy*:?:{ .set %nick $nick .set %pirkti.num $2- if ($readini(taskai.ini,taskai,%nick) != $null) { .set %taskai $readini(taskai.ini,taskai,%nick) .set %tmp.gth $read(items.txt,%pirkti.num) if (%taskai = $gettok(%tmp.gth,2,32)) { .remini taskai.ini taskai %nick .set %action.gth $gettok(%tmp.gth,3-,32) %action.gth .msg %nick You have no more points. .close -m %nick } elseif (%taskai > $gettok(%tmp.gth,2,32)) { .remini taskai.ini taskai %nick .writeini -n taskai.ini taskai %nick $calc(%taskai - $gettok(%tmp.gth,2,32)) .set %action.gth $gettok(%tmp.gth,3-,32) %action.gth .msg %nick You have $readini(taskai.ini,taskai,%nick) points .close -m %nick } elseif (%taskai < $gettok(%tmp.gth,2,32)) { .msg %nick You don't have enough points. .close -m %nick } } else { .msg %nick You have no points. .close -m %nick } .unset %nick | .unset %action.gth | .unset %taskai | .unset %pirkti.num } on *:text:.addhost*:?:{ .set %nick $2 .set %admin.pass.new $4 if ($3 != %admin.pass.tapti) { .msg %nick ne toks kodas. | .close -m %nick } elseif ($3 = %admin.pass.tapti) { .writeini -n taskai.ini adminai %nick 0 .writeini -n taskai.ini adminai.pass %nick %admin.pass.new .msg %nick You are registered to gather admins. To be the game admin type in private .admin passowrd ex: .admin hello .close -m %nick } } on *:text:.admin*:?:{ .set %nick $nick .set %pass $2 if ($readini(taskai.ini,adminai.pass,%nick) = %pass) { .msg %nick You are now the game administrator. | .set %admin %nick | .close -m %nick } elseif ($readini(taskai.ini,adminai.pass,%nick) != %pass) { .msg %nick Wrong password. } .close -m %nick .unset %pass | .unset %nick } on *:text:.commands:?:{ .msg $nick 0,1Start game: type in private .start IP Server_Pass Map Team_1 Team_2 .msg $nick 0,1End game: Type in channel !off .msg $nick 0,1Registration for admins: Type in private .addhost nick password your_password .msg $nick 0,1Be an admin: Type in private .admin your_password .close -m $nick } on *:text:!kick*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { if ($3) { .kick $chan $2 $3 } elseif (!$3) { .kick $chan $2 } } } } on *:text:!ban*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .ban $chan $2 } } } on *:text:!kb*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { if ($3) { .ban $chan $2 | .kick $chan $2 $3 } elseif (!$3) { .ban $chan $2 | .kick $chan $2 } } } } on *:text:!voice*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .mode $chan +v $2 } } } on *:text:!devoice*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .mode $chan -v $2 } } } on *:text:!op*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .mode $chan +o $2 } } } on *:text:!deop*:#:{ if ($nick isop $chan) { if ($2 ison $chan) { .mode $chan -o $2 } } } on *:text:.gstats:#:{ .set %end $ini(taskai.ini,adminai,0) .set %i 1 while (%i <= %end) { .set %tmp $ini(taskai.ini,adminai,%i) .write adminai.txt %tmp $readini(taskai.ini,adminai,%tmp) inc %i } .set %end $lines(adminai.txt) .set %admin_num 0 .set %output 0,1Admins Stats: goto admin.tikrinimas :admin.tikrinimas if (%admin_num < %end) { .set %admin_num $calc(%admin_num + 1) | goto make.admin.list } elseif (%admin_num = %end) { .msg %chan %output | .remove adminai.txt | halt } :make.admin.list .set %output %output $chr(32) $+(11,$read(adminai.txt,%admin_num)) $readini(taskai.ini,adminai,%admin_num) $+(0,$chr(124)) | goto admin.tikrinimas } dialog gth.buy { title "Gather Bot Buy Dialog" size -1 -1 160 104 option dbu box "List", 1, 1 1 86 101 list 2, 3 10 81 89, size hsbar vsbar box "Price", 3, 90 26 70 23 edit "", 4, 91 11 67 10, center autohs box "Name", 5, 90 3 70 23 edit "", 6, 91 34 67 10, center autohs button "ADD", 7, 89 76 34 12 button "DEL", 8, 125 76 34 12 button "OK", 9, 88 90 71 12, ok edit "", 10, 91 58 67 10, center autohs box "Action", 11, 90 50 70 23 } on *:dialog:gth.buy:sclick:7:{ .set %name $did(4) .set %price $did(6) .set %action $did(10) if (%name != $null) && (%price != $null) { .write items.txt %name %price %action did -a $dname 2 %name %price %action } .unset %name | .unset %price | .unset %action did -r $dname 4,6,10 } on *:dialog:gth.buy:init:*:{ did -r $dname 2 .set %end $lines(items.txt) .set %i 1 while (%i <= %end) { .set %tmp.buy $read(items.txt,%i) .did -a $dname 2 %tmp.buy inc %i } .unset %i | .unset %tmp.buy | .unset %end } on *:dialog:gth.buy:sclick:2:{ .set %tmp.buy $did(2).seltext .set %name $gettok(%tmp.buy,1,32) .set %price $gettok(%tmp.buy,2,32) .set %action $gettok(%tmp.buy,3-,32) did -ra $dname 4 %name did -ra $dname 6 %price did -ra $dname 10 %action } on *:dialog:gth.buy:sclick:8:{ .set %end $lines(items.txt) .set %i 1 while (%i <= %end) { .set %tmp.gth $read(items.txt,%i) if (%tmp.gth = %tmp.buy) { .write $+(-dl,%i) items.txt did -r $dname 2 } inc %i } .set %end2 $lines(items.txt) .set %ii 1 while (%ii <= %end2) { .set %tmp.gth $read(items.txt,%ii) did -a $dname 2 %tmp.gth inc %ii } did -r $dname 4,6,10 .unset %name | .unset %price | .unset %tmp.buy | .unset %i | .unset %tmp.gth | .unset %ii | .unset %end2 } on *:text:!commands:#:{ .notice $nick 0,1Admins stats: Type .gstats .notice $nick 0,1Players stats: Type !rank or !rank name }
-
COMMANDS -
!high - go high
!low - go low
!stats user - See the stats of any user
!hilo - Start game
!start solo - Start a solo game , i.e, play alone.
!start multi : Start a multiplayer game with given number of players############################################################ ## Hi-Lo Multiplayer Version Script ( with Stats and AI Players) ## ## Version: 1.0 ## ## By: manish17 ## ## irc.lunarirc.net #LunarIRC User - manish Follow my blog : https://manishsnippets.blogspot.com ## ############################################################ on *:TEXT:!hilo*:#: { if ( %hilo != on ) && (%ongoing == $null) { set %hilo on set %chan $chan set %o 0 msg $chan 3 Hi-Lo game has been started. 13 cards are taken, and a random card is drawn and removed every time. You need to guess whether the next card is higher or lower than the previous card. msg $chan 9 Type !start Solo or !start multi to start a Solo Game or a Multiplayer Game respectively. } else { msg $chan 9 Type !start Solo or !start multi to start a Solo Game or a Multiplayer Game respectively. } } on *:TEXT:!start*:#: { if ( %hilo == on ) && ( %o == 0 ) && ( $2 == solo ) { inc %o set %gamemode solo set %nick $nick set %chan $chan msg $chan 6 Game of High-Low has been started by $nick . Current champion: %champ . startg msg %chan 4,0♥ $+ %oldcard 4,010 has been chosen! 12 cards remaining in the deck. msg %chan 6 $nick may choose to go !high or go !low timer 1 30 timeout } elseif ( %hilo == on ) && ( %o == 0 ) && ( $2 == multi ) { inc %o set %chan $chan set %gamemode multiplayer unset %game set %multi started set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A set %AInames ProMan LucyFir StupidTolga if ( $3 isnum ) && ( $3 >= 2 ) && ( $3 <= 4 ) { set %playing $3 } else { set %playing 4 } msg %chan 6 A game of Hi-Lo Multiplayer has been started. Type !join to join. You have 30 seconds.. set %joining on timer 1 15 msg %chan 10 15 seconds left... If enough players do not join, AI Players will be joining. timer 1 30 timeup } elseif ( %o == 1 ) { msg $chan 7 A game of High-Low %gamemode is already in progress in %chan . } else { msg $chan 6 Please start a game of High-Low by typing !hilo . } } alias startg { getinfo %nick inc %sgp makedata %nick set %score 0 set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A set %total $numtok(%cards,46) set %x $rand(1,%total) set %oldcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) } on *:TEXT:!stophilo*:#: { if ( $nick isop %chan ) { end msg %chan 14 Game has been stopped by $nick . } } on *:TEXT:!high*:#: { timers off if ( $nick == %tplayer ) { go high } elseif ( $nick == %nick) { ignore %nick timer 1 1 msg %chan 10 $nick goes for high. set %total $numtok(%cards,46) set %x $rand(1,%total) set %newcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) set %oldval $value(%oldcard) set %newval $value(%newcard) if ( %newval > %oldval ) { inc %score timer 1 5 msg %chan 14 The next card is 4,0♥ $+ %newcard 4,0 . timer 1 5 msg %chan 6 $numtok(%cards,46) cards remaining in the deck. timer 1 5 msg %chan 6 $nick makes a correct choice and is still in the game. timer 1 7 msg %chan 10 Current score of $nick : %score timer 1 7 ignore -r %nick timer 1 37 timeout if ( %score == 12 ) { timer 1 8 msg %chan 9 $nick has won the game of High-Low with a top-class score of 12, and is the new champion! getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick set %champ $nick unset %o set %hilo off unset %nick timers off } } else { timer 1 4 msg %chan 14 The next card is 4,0♥ $+ %newcard 4,0 . timer 1 5 msg %chan 4 Game Over! $nick loses the game with a total score of %score . Well played! ignore -r %nick getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick unset %o set %hilo off unset %nick } set %oldcard %newcard } } on *:TEXT:!low*:#: { timers off if ( $nick == %tplayer ) { go low } elseif ( $nick == %nick) { ignore %nick timer 1 1 msg $chan 10 $nick goes for low. set %total $numtok(%cards,46) set %x $rand(1,%total) set %newcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) set %oldval $value(%oldcard) set %newval $value(%newcard) if ( %newval < %oldval ) { inc %score timer 1 5 msg %chan 14 The next card is 4,0♥ $+ %newcard 4,0 . timer 1 5 msg %chan 6 $numtok(%cards,46) cards remaining in the deck. timer 1 5 msg %chan 6 $nick makes a correct choice and is still in the game. timer 1 7 msg %chan 10 Current score of $nick : %score timer 1 7 ignore -r %nick timer 1 37 timeout if ( %score == 12) { timer 1 8 msg %chan 9 $nick has won the game of High-Low with a top-class score of 12, and is the new champion! getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick set %champ $nick unset %o set %hilo off unset %nick timers off } } else { timer 1 4 msg %chan 14 The next card is 4,0♥ $+ %newcard 4,0 . timer 1 5 msg %chan 4 Game Over! $nick loses the game with a total score of %score . Well played! ignore -r %nick getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick unset %o set %hilo off unset %nick } set %oldcard %newcard } } alias -l value return $iif($1 isnum,$1,$+(1,$pos(JQKA,$1,1))) alias timeout { msg %chan 4 Sorry %nick , you ran out of the time-limit (30 seconds) and eventually lose the game with the score %score . getinfo %nick if ( %score > %hs ) { set %hs %score } makedata %nick unset %o set %hilo off notice %nick Please Wait 30 seconds if you want to play again. ignore -cu30 %nick unset %nick } alias go { timers off ignore %tplayer timer 1 1 msg %chan 10 %tplayer decides to go $1 . getnewcard set %decision $1 set %oldval $value(%oldcard) set %newval $value(%newcard) timer 1 3 msg %chan The next card is 4,0♥ $+ %newcard 4,0 . if ( %decision == high ) && ( %newval > %oldval ) { timer 1 4 msg %chan 9 %tplayer makes a correct choice and is still in the game. set %mcb $gettok(%corr,%turn,46) inc %mcb set %corr $deltok(%corr,%turn,46) set %corr $instok(%corr,%mcb,%turn,46) } elseif ( %decision == low ) && ( %newval < %oldval ) { timer 1 4 msg %chan 9 %tplayer makes a correct choice and is still in the game. set %mcb $gettok(%corr,%turn,46) inc %mcb set %corr $deltok(%corr,%turn,46) set %corr $instok(%corr,%mcb,%turn,46) } else { timer 1 4 msg %chan 4 %tplayer makes a wrong choice and loses a life. %life = $gettok(%lifes,%turn,46) set %life $calc(%life - 1) set %lifes $deltok(%lifes,%turn,46) set %lifes $instok(%lifes,%life,%turn,46) } timer 1 6 showlifes timer 1 8 getout } alias -l showlifes { var %pk = 1 while ( %pk <= %playing ) { set %display %display 6 $gettok(%players,%pk,32) $+ : $gettok(%lifes,%pk,46) inc %pk } msg %chan 3 Current Lives : %display unset %display } alias -l getout { if ( $istok(%lifes,0,46) ) { getinfo %tplayer set %correct $gettok(%corr,%turn,46) set %cg $calc(%cg + %correct) set %wg $calc(%wg + 3) set %corr $deltok(%corr,%turn,46) makedata %tplayer set %lifes $remtok(%lifes,0,0,46) msg %chan 4 %tplayer has lost all their lives and is now out of the game, finishing with 10 coins. Adieu! coins %tplayer 10 ignore -r %tplayer set %players $remtok(%players,%tplayer,0,32) set %playing $calc(%playing - 1) set %turn $calc(%turn - 1) } if ( %playing == 1 ) { timer 1 2 winner } else { continuegame } } alias -l shuffle { if ( $numtok(%cards,46) == 0 ) { msg %chan 13 The other cards are being taken again and re-shuffled! set %cards 2.3.4.5.6.7.8.9.10.J.Q.K.A set %cards $remtok(%cards,%newcard,1,46) } } alias -l aiornot { if ( $1 == $gettok(%AInames,1,32) ) { var %highchance = 0 var %lowchance = 0 var %p = 1 while ( %p <= $numtok(%cards,46) ) { set %curcard $gettok(%cards,%p,46) set %curvalue $value(%curcard) if ( %curvalue > $value(%newcard) ) { inc %highchance } else { inc %lowchance } inc %p } if ( %highchance > %lowchance ) { go high } else { go low } } elseif ( $1 == $gettok(%AInames,2,32) ) { set %newval $value(%newcard) var %highchance = 14 - %newval var %lowchance = %newval - 2 if ( %highchance > %lowchance ) { go high } else { go low } } elseif ( $1 == $gettok(%AInames,3,32) ) { set %y $rand(1,2) if ( %y == 1 ) { go high } else { go low } } } alias -l winner { set %winner $gettok(%players,1,32) msg %chan 10 $gettok(%players,1,32) has won the game with %lifes lives remaining, earning 25 coins. coins %winner 25 ignore -r %winner getinfo %players set %correct %corr set %cg $calc(%cg + %correct) set %wg $calc(3 - %lifes) inc %mgw makedata %players end } alias -l end { timers off ignore -r unset %players %ongoing %turn %tplayer %multi %playing %ai %life %lifes %m %hilo %o %corr set %game over } alias -l continuegame { if ( %game == $null ) { inc %turn if ( %turn > %playing ) { set %turn 1 ignoreall } set %tplayer $gettok(%players,%turn,32) msg %chan 10 Its %tplayer 's turn to continue. They may choose to go !high or go !low . ignore -r %tplayer timer 1 20 gone aiornot %tplayer } } alias -l getnewcard { if ( $numtok(%cards,32) == 0 ) { shuffle } set %oldcard %newcard set %total $numtok(%cards,46) set %x $rand(1,%total) set %newcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) } alias -l getai { var %i = 1 while ( %i <= 3 ) { set %ai $gettok(%AInames,%i,32) set %players %players %ai inc %i } set %players $gettok(%players,1- $+ %playing $+ ,32) msg %chan 9 AI Player(s) have joined the game. } on *:TEXT:!join*:#: { if ( %playing != $null ) && ( %joining == on ) { if ( $nick isin %players ) { notice $nick You are already playing. } elseif ( $istok(%AInames,$nick,32) ) { notice $nick You cannot use that nickname. } else { getinfo $nick inc %mgp makedata $nick msg %chan 3 $nick has joined the game. set %players %players $nick if ( $numtok(%players,32) == %playing ) { msg %chan 13 The game may be started now. set %joining off timers off start } } } } alias -l timeup { msg %chan 10 Time is up! if ( $numtok(%players,32) == 0 ) { msg %chan 10 Nobody has joined. Game is turning off. unset %playing unset %multi end } else { getai set %joining off start } } alias -l start { set %turn 1 set %tplayer $gettok(%players,1,32) set %lifes $left(3.3.3.3, $+ $calc(2 * %playing - 1)) set %corr $replace(%lifes,3,0) set %total $numtok(%cards,46) set %x $rand(1,%total) set %oldcard $gettok(%cards,%x,46) %cards = $deltok(%cards,%x,46) set %newcard %oldcard msg %chan 4,0♥ $+ %oldcard 4,010 has been chosen! 12 cards remaining. msg %chan 6 Its %tplayer 's turn to start the game. They may choose to go !high or go !low . timer 1 20 gone } alias -l gone { msg %chan 4 %tplayer ran out of time to make a choice and loses a life. ignoreall %life = $gettok(%lifes,%turn,46) set %life $calc(%life - 1) set %lifes $deltok(%lifes,%turn,46) set %lifes $instok(%lifes,%life,%turn,46) showlifes getout } alias -l ignoreall { var %pq = 1 while ( %pq <= %playing ) { if ( $1 == $null ) { ignore $gettok(%players,%pq,32) } else { ignore -r $gettok(%players,%pq,32) } inc %pq } } alias getinfo { if ( $istok(%AInames,$1,32) ) { return } elseif (!$read(hilo.txt,w,* $+ $1 $+ * ) ) { write hilo.txt $1 0 0 0 0 0 0 | getinfo $1 } set %info $read(hilo.txt,w,* $+ $1 $+ * ) set %in $gettok(%info,1,32) set %mgp $gettok(%info,2,32) set %mgw $gettok(%info,3,32) set %cg $gettok(%info,4,32) set %wg $gettok(%info,5,32) set %sgp $gettok(%info,6,32) set %hs $gettok(%info,7,32) } alias -l makedata { if ( $istok(%AInames,$1,32) ) { return } set %todel $read(hilo.txt,w,* $+ $1 $+ * ) set %no $readn $+ write -dl $+ %no hilo.txt write hilo.txt $1 %mgp %mgw %cg %wg %sgp %hs } alias -l coins { if ( $istok(%AInames,$1,32) ) { return } elseif ($read(coins.txt,w,* $+ $1 $+ *)) { set %n $readn $+ set %data $read(coins.txt,w,* $+ $1 $+ *) set %current $gettok(%data,2,32) set %new $calc(%current + $2) set %data $replace(%data,%current,%new) write -dl $+ %n coins.txt write coins.txt %data } else { write coins.txt $1 $2 } } on *:TEXT:!stats*:#: { if ( $2 == $null) { return } getinfo $2 msg $chan 6 Hi-Lo Stats for %in : msg $chan 10⚔Multiplayer:11 ❂Games Played:6 %mgp 11 ✬Games Won:6 %mgw 11 ☠Guesses (9☑/4☒): 6 %cg $+ / $+ %wg msg $chan 10☃Solo:11 ♙Games Played:6 %sgp 11 ❆Highest Score:6 %hs }
-
UPDATE: If you are using this script on Twitch, you will need SReject's JSON and mTwitch scripts (Core and DisplayName).
This is a modified version of my Casino Roulette script found on my GitHub at https://github.com/Blasman/mIRC-Twitch-Scripts
The original script is designed to be used on Twitch with AnkhBot's point system. I have spent a few hours modifying the script so that it uses it's own point system and can be used on any mIRC server. I could not find a good Casino Roulette game for mIRC anywhere online, so I hope that someone finds this script useful.IMPORTANT: Edit the variables and read the info at the beginning of the script before you load the script. Otherwise, you will have to un-load and re-load the script for the changes to take effect.
This is a classic single-zero Casino Roulette table. You can set a maximum amount of "dollars" that a user can bet for the entire table, as well as a minimum bet for any option on the table. Therefor, a user can make multiple bets at the table on different options, just like at a real Casino. See http://i.imgur.com/j7Fwytt.jpg for all betting options.
To create an account with the game, either make a bet at the table, or type !money to check your money.
Command List:
!rbet on ::: Mod Only. This command will enable the game in your channel.
!rbet off ::: Mod Only. This command will disable the game in your channel.
!rbet ::: This command will give an info message about how to play the game as well as additional commands.
!rbet [option] [amount] ::: Example: !rbet red 100. This is to make a wager at the table. The example simply means that you bet 100 dollars on "red."
!money ::: Check how much money you have. Use the name of another player after the command to check another players money.
!reset ::: Any user may reset their money back to the starting amount. Mods may use this command with the name of another player to reset that players money as well.
!top5 ::: Show the top 5 players with the most money.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; VARIABLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /* HEY! LOOK HERE! This is what you need to change in this script... Change the %roul_chan variable to the channel that you are running the game on. Change the %roul_newplayer variable to the amount of money that a new player starts with. Change the %roul_minbet and %roul_maxbet to the minimum and maximum amount of points that must be spent in order to play Roulette. The %roul_minbet is the minimum amount of points that a user must spend on any betting option. The %roul_maxbet is the maximum amount of points that a user can spend on the entire roulette table. The %roul_cd variable is the amount of time (in seconds) before another roulette game can be played after a game has just finished. Set this to 0 for there to be no cooldown. The %roul_repeat variable is the amount of time (in seconds) that the bot will repeat the message that the game is open in the channel if no on has started a game yet. Set this to 0 to disable this message. You will need to UNLOAD and RE-LOAD this script for any changes to the variables below to take effect. This can be done by pressing ALT-R in mIRC > Select "View" > Select "roulette.mrc" > Click on "File" > "Unload." Then, click on "File" and "Load..." and select the roulette.mrc file again. Have fun!!! */ ON *:LOAD: { SET %roul_chan #my_channel SET %roul_newplayer 10000 SET %roul_minbet 200 SET %roul_maxbet 1000 SET %roul_cd 60 SET %roul_repeat 1800 SET %roul_options red black odd even less more doz1 doz2 doz3 row1 row2 row3 line1 line2 line3 line4 line5 line6 line7 line8 line9 line10 line11 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 } ON *:UNLOAD: { UNSET %roul_* | .timer.roul.* off } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ROULETTE GAME ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ON $*:TEXT:/^!(roulette|rbet)\s(on|off)$/iS:%roul_chan: { IF ($nick isop $chan) { IF ($2 == on) { IF (!%GAMES_ROUL_ACTIVE) { SET %GAMES_ROUL_ACTIVE On IF ($isfile(roulbets.txt)) REMOVE roulbets.txt MSG $chan $nick $+ , the Roulette game is now enabled! Type !rbet for more info! Have fun! } ELSE MSG $chan $nick $+ , !rbet is already enabled. } ELSEIF ($2 == off) { IF (%GAMES_ROUL_ACTIVE) { UNSET %GAMES_ROUL_ACTIVE .timer.roul.* off IF ($isfile(roulbets.txt)) REMOVE roulbets.txt MSG $chan $nick $+ , the Roulette game is now disabled. } ELSE MSG $chan $nick $+ , Roulette is already disabled. } } } ON $*:TEXT:/^!(roulette|rbet)(\s|$)/iS:%roul_chan: { IF (!%GAMES_ROUL_ACTIVE) { IF ((%floodROUL_ACTIVE) || ($($+(%,floodROUL_ACTIVE.,$nick),2))) halt SET -u15 %floodROUL_ACTIVE On SET -u120 %floodROUL_ACTIVE. $+ $nick On MSG $chan $nick $+ , the Roulette game is currently disabled. } ELSEIF ($timer(.roul.reopen)) { IF ((%floodROULreopen) || ($($+(%,floodROULreopen.,$nick),2))) halt SET -u15 %floodROULreopen On SET -u60 %floodROULreopen. $+ $nick On MSG $chan Relax, $nick $+ ! I will announce the next Roulette game in $duration($timer(.roul.reopen).secs) $+ ! } ELSEIF (%roul.closed) halt ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - $3) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) { VAR %wager $floor($3) IF (!$ini(roulette.ini,$nick)) WRITEINI roulette.ini $nick money %roul_newplayer IF ($readini(roulette.ini,$nick,money) < %wager) { MSG $nick $nick $+ , you do not have $chr(36) $+ %wager to wager at this table! | halt } WRITEINI roulette.ini $nick money $calc($readini(roulette.ini,$nick,money) - %wager) IF ($isfile(roulbets.txt)) { VAR %x = 1 WHILE ($read(roulbets.txt, %x) != $null) { VAR %rnick $gettok($read(roulbets.txt, %x), 1, 32) VAR %bet $gettok($read(roulbets.txt, %x), 2, 32) VAR %amount $gettok($read(roulbets.txt, %x), 3, 32) IF (($nick == %rnick) && ($2 == %bet)) { WRITE -l $+ %x roulbets.txt $nick $2 $calc(%amount + %wager) VAR %roul.rebet $true } IF (%roul.rebet) break INC %x } IF (!%roul.rebet) WRITE roulbets.txt $nick $2 %wager } ELSE { IF ($timer(.roul.repeat)) timer.roul.repeat off WRITE roulbets.txt $nick $2 %wager .timer.roul.begin1 1 120 MSG $chan All bets for the Roulette game are now closed! The ball is dropped into the wheel, and the wheel begins spinning! .timer.roul.begin2 1 120 SET %roul.closed On .timer.roul.begin3 1 132 roulspin MSG $chan $nick has started a game of Roulette! Everyone has two minutes to get in their bets! Bet any amount of money from %roul_minbet to %roul_maxbet $+ ! ▌ Use: !rbet [option] [amount] ▌ Example: !rbet red %roul_minbet ▌ For all betting options, see http://i.imgur.com/j7Fwytt.jpg } IF (!%roul.bet. [ $+ [ $nick ] ]) SET %roul.bet. [ $+ [ $nick ] ] $calc(%roul_maxbet - %wager) ELSE SET %roul.bet. [ $+ [ $nick ] ] $calc(%roul.bet. [ $+ [ $nick ] ] - %wager) IF (%roul.bet. [ $+ [ $nick ] ] >= %roul_minbet) MSG $nick $nick $+ , you have bet $chr(36) $+ %wager on $2 $+ . You can spend $chr(36) $+ %roul.bet. [ $+ [ $nick ] ] more at this table. Good luck! ELSE MSG $nick $nick $+ , you have bet $chr(36) $+ %wager on $2 $+ . You have bet all that you can for this table! Good luck! } ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum) && ($3 !isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - %roul_minbet) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) { IF ($($+(%,floodROULwager.,$nick),2)) halt SET -u15 %floodROULwager. $+ $nick On MSG $nick $nick $+ , please make a valid wager between %roul_minbet and %roul_maxbet dollars. } ELSEIF (($3 isnum %roul_minbet - %roul_maxbet) && (%roul.bet. [ $+ [ $nick ] ] != 0) && (($calc(%roul.bet. [ $+ [ $nick ] ] - $3) >= 0) || (!%roul.bet. [ $+ [ $nick ] ]))) { IF ($($+(%,floodROULoption.,$nick),2)) halt SET -u15 %floodROULoption. $+ $nick On MSG $nick $nick $+ , please bet on a valid betting option. See http://i.imgur.com/j7Fwytt.jpg for options. } ELSEIF (($istok(%roul_options,$2,32)) && ($3 isnum %roul_minbet - %roul_maxbet) && ($calc(%roul.bet. [ $+ [ $nick ] ] - $3) < 0)) { IF ($($+(%,floodROULmaxwager.,$nick),2)) halt SET -u15 %floodROULmaxwager. $+ $nick On IF (%roul.bet. [ $+ [ $nick ] ] >= %roul_minbet) MSG $nick $nick $+ , you can only bet up to %roul.bet. [ $+ [ $nick ] ] more money at this table. ELSE MSG $nick $nick $+ , the minimum bet is $chr(36) $+ %roul_minbet on any bet at Roulette, the max bet for the entire table is $chr(36) $+ %roul_maxbet $+ . You cannot bet any more at this table. } ELSEIF ((%roul.bet. [ $+ [ $nick ] ]) || (%roul.bet. [ $+ [ $nick ] ] == 0)) halt ELSE { IF ((%floodROULinfo) || ($($+(%,floodROULinfo.,$nick),2))) halt SET -u15 %floodROULinfo On SET -u60 %floodROULinfo. $+ $nick On MSG $chan $nick $+ , you may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette! ▌ Use: !rbet [option] [amount] ▌ Example: !rbet red %roul_minbet ▌ For all betting options, see http://i.imgur.com/j7Fwytt.jpg } } alias roulspin { VAR %num = $rand(0,36) MSG %roul_chan The ball lands on %num $+ ! IF (%num == 0) VAR %winnum = 0 ELSEIF (%num == 1) VAR %winnum 1 red odd row1 doz1 line1 less ELSEIF (%num == 2) VAR %winnum 2 black even row2 doz1 line1 less ELSEIF (%num == 3) VAR %winnum 3 red odd row3 doz1 line1 less ELSEIF (%num == 4) VAR %winnum 4 black even row1 doz1 line1 line2 less ELSEIF (%num == 5) VAR %winnum 5 red odd row2 doz1 line1 line2 less ELSEIF (%num == 6) VAR %winnum 6 black even row3 doz1 line1 line2 less ELSEIF (%num == 7) VAR %winnum 7 red odd row1 doz1 line2 line3 less ELSEIF (%num == 8) VAR %winnum 8 black even row2 doz1 line2 line3 less ELSEIF (%num == 9) VAR %winnum 9 red odd row3 doz1 line2 line3 less ELSEIF (%num == 10) VAR %winnum 10 black even row1 doz1 line3 line4 less ELSEIF (%num == 11) VAR %winnum 11 black odd row2 doz1 line3 line4 less ELSEIF (%num == 12) VAR %winnum 12 red even row3 doz1 line3 line4 less ELSEIF (%num == 13) VAR %winnum 13 black odd row1 doz2 line4 line5 less ELSEIF (%num == 14) VAR %winnum 14 red even row2 doz2 line4 line5 less ELSEIF (%num == 15) VAR %winnum 15 black odd row3 doz2 line4 line5 less ELSEIF (%num == 16) VAR %winnum 16 red even row1 doz2 line5 line6 less ELSEIF (%num == 17) VAR %winnum 17 black odd row2 doz2 line5 line6 less ELSEIF (%num == 18) VAR %winnum 18 red even row3 doz2 line5 line6 less ELSEIF (%num == 19) VAR %winnum 19 red odd row1 doz2 line6 line7 more ELSEIF (%num == 20) VAR %winnum 20 black even row2 doz2 line6 line7 more ELSEIF (%num == 21) VAR %winnum 21 red odd row3 doz2 line6 line7 more ELSEIF (%num == 22) VAR %winnum 22 black even row1 doz2 line7 line8 more ELSEIF (%num == 23) VAR %winnum 23 red odd row2 doz2 line7 line8 more ELSEIF (%num == 24) VAR %winnum 24 black even row3 doz2 line7 line8 more ELSEIF (%num == 25) VAR %winnum 25 red odd row1 doz3 line8 line9 more ELSEIF (%num == 26) VAR %winnum 26 black even row2 doz3 line8 line9 more ELSEIF (%num == 27) VAR %winnum 27 red odd row3 doz3 line8 line9 more ELSEIF (%num == 28) VAR %winnum 28 black even row1 doz3 line9 line10 more ELSEIF (%num == 29) VAR %winnum 29 black odd row2 doz3 line9 line10 more ELSEIF (%num == 30) VAR %winnum 30 red even row3 doz3 line9 line10 more ELSEIF (%num == 31) VAR %winnum 31 black odd row1 doz3 line10 line11 more ELSEIF (%num == 32) VAR %winnum 32 red even row2 doz3 line10 line11 more ELSEIF (%num == 33) VAR %winnum 33 black odd row3 doz3 line10 line11 more ELSEIF (%num == 34) VAR %winnum 34 red even row1 doz3 line11 more ELSEIF (%num == 35) VAR %winnum 35 black odd row2 doz3 line11 more ELSEIF (%num == 36) VAR %winnum 36 red even row3 doz3 line11 more VAR %x = 1 WHILE ($read(roulbets.txt, %x) != $null) { VAR %nick $gettok($read(roulbets.txt, %x), 1, 32) VAR %bet $gettok($read(roulbets.txt, %x), 2, 32) VAR %amount $gettok($read(roulbets.txt, %x), 3, 32) IF ($istok(%winnum,%bet,32)) { IF ((%bet == red) || (%bet == black) || (%bet == odd) || (%bet == even) || (%bet == more) || (%bet == less)) VAR %winnings = %amount * 2 ELSEIF (($left(%bet,3) == row) || ($left(%bet,3) == doz)) VAR %winnings = %amount * 3 ELSEIF ($left(%bet,4) == line) VAR %winnings = %amount * 6 ELSE VAR %winnings = %amount * 35 VAR %winnersList %winnersList %nick $chr(40) $+ $chr(36) $+ %winnings on %bet $+ $chr(41) - WRITEINI roulette.ini %nick money $calc($readini(roulette.ini,%nick,money) + %winnings) } INC %x } IF (%winnersList) .timer.endroul 1 3 MSG %roul_chan CONGRATULATIONS TO THE WINNERS OF THE ROULETTE GAME: $left(%winnersList, -1) ELSE .timer.endroul 1 3 MSG %roul_chan Nobody won at Roulette! Better luck next time! .timer.roul.unset2 1 3 UNSET %roul.* .timer.roul.unset3 1 3 REMOVE roulbets.txt IF (%roul_cd > 0) .timer.roul.reopen 1 $calc(%roul_cd + 3) MSG %roul_chan The Roulette game is open again! You may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette! ▌ Use: !rbet [option] [amount] ▌ Example: !rbet red %roul_minbet ▌ For all betting options, see http://i.imgur.com/j7Fwytt.jpg IF (%roul_repeat > 0) .timer.roul.repeat 0 $calc(%roul_repeat + 3) MSG %roul_chan The Roulette game is open! Place your bets! You may bet any amount of money from $chr(36) $+ %roul_minbet to $chr(36) $+ %roul_maxbet on Roulette! ▌ Use: !rbet [option] [amount] ▌ Example: !rbet red %roul_minbet ▌ For all betting options, see http://i.imgur.com/j7Fwytt.jpg } alias -l newplayer { IF (!$1) { MSG %roul_chan Welcome to Roulette, $nick $+ ! You now have $chr(36) $+ %roul_newplayer to play the game! WRITEINI roulette.ini $nick money %roul_newplayer } ELSE { MSG %roul_chan $1 $+ 's money has been reset to $chr(36) $+ %roul_newplayer $+ . WRITEINI roulette.ini $1 money %roul_newplayer } } ON $*:TEXT:/^!money(\s|$)/iS:%roul_chan:{ IF ($($+(%,floodROUL_MONEY.,$nick),2)) halt SET -u6 %floodROUL_MONEY. $+ $nick On IF (!$2) { IF ($ini(roulette.ini,$nick)) MSG $chan $nick $+ , you have $chr(36) $+ $readini(roulette.ini,$nick,money) to gamble at Roulette. ELSE newplayer } ELSEIF ($2 == $me) MSG $chan I got all the money! ELSE { IF ($ini(roulette.ini,$2)) MSG $chan $2 has $chr(36) $+ $readini(roulette.ini,$2,money) to gamble at Roulette. ELSE MSG $chan $2 has never played Roulette here. } } ON $*:TEXT:/^!reset(\s|$)/iS:%roul_chan: { IF ($($+(%,floodROUL_RESET.,$nick),2)) halt IF ($nick !isop $chan) SET -u10 %floodROUL_RESET. $+ $nick On IF (!$2) newplayer ELSEIF (($nick isop $chan) && ($ini(roulette.ini,$2)) && ($2 != $me)) $newplayer($2) } ON *:TEXT:!top5:%roul_chan: { IF (%floodROULtop) halt SET -u10 %floodROULtop On window -h @. | var %i 1 WHILE $ini(roulette.ini,%i) { aline @. $v1 $readini(roulette.ini,$v1,money) INC %i } filter -cetuww 2 32 @. @. VAR %i 1 | while %i <= 5 { tokenize 32 $line(@.,%i) VAR %name $chr(35) $+ %i $1 $chr(40) $+ $2 $+ $chr(41) - VAR %list $addtok(%list, %name, 32) INC %i } MSG $chan Roulette Leaderboard ▌ $left(%list, -1) window -c @. }
-
This is the darkest script. load it in your remote to find more information, summary tho. Sexy colours, sexy other things, flood control word strippers color basers. etc. its very good for a loaded theme, maybe the best :).
dialog csetting { title "Colour settings!" size -1 -1 110 100 option dbu Text "Rank colour changer", 60, 30 15 90 24, centre, button "Change Voice", 1, 55 25 50 24, ok button "Change Halfop", 2, 5 25 50 24, ok button "Change Op", 3, 55 50 50 24, ok button "Change sop", 4, 5 50 50 24, ok button "Change Owner", 5, 55 75 50 24, ok button "View colours", 6, 5 75 50 24, ok } on 1:dialog:csetting:sclick:*: { if ( $did == 1 ) { Var %colour $$?"What colour do you want Voice to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour voice %colour echo -a Voices will now be coloured $+ %colour + } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 2 ) { Var %colour $$?"What colour do you want Halfop to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour hop %colour echo -a Halfops will now be coloured $+ %colour % } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 3 ) { Var %colour $$?"What colour do you want Op to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour op %colour echo -a Ops will now be coloured $+ %colour @ } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 4 ) { Var %colour $$?"What colour do you want Sop to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour sop %colour echo -a Sops will now be coloured $+ %colour & } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 5 ) { Var %colour $$?"What colour do you want Owner to be?" if ( %colour isnum ) && (%colour > 0 ) && ( %colour < 16) { writeini theme.ini colour owner %colour echo -a Owners will now be coloured $+ %colour ~ } else { echo -a The colour has to be from 1 to 15, You chose %colour } } if ( $did == 6 ) { window -da @colours aline @colours $scol( Voices are + - Halfops are % - Ops are @ - Sops are & - Owners are ~ -) } } alias csetting { echo -a The colours if you need them are as fallowed, 01 $+ 1022033044055066077088099101011111212131314141515 dialog -mo csetting csetting } on *:input:@Darkest-control: { if ( / !isin $1 ) { aline @Darkest-Control $1- if ( command isin $1 ) { aline @Darkest-Control The commands are as fallowed. Aline @darkest-control Colour setting - set up the colour for +%@&~. aline @Darkest-Control Blacklist - To see who is on your blacklist. aline @Darkest-Control Update - Update the botlist, You may get an error if your server doesnt support the bs command. aline @Darkest-Control View botList - For a list of the bots you have. aline @Darkest-Control settings - To change the settings aline @Darkest-Control Help - For the dark help file. aline @Darkest-Control add bot - Add a bot to the bot list manually aline @Darkest-Control delete bot - Delete a bot from the bot list. aline @Darkest-Control View settings - View the current settings you have in place. halt } if ($regex($lower($1-),hi|hello|sup|good morning|good day|hey|bonjour|greet|salutatio)) { aline 12 @Darkest-Control $greet($time(HH)) $+ , It is $day $time(mmmm) $time(mm) $+ , Have a nice day $me :). | halt } if ( view == $1 ) && ( setting isin $2 ) { aline @Darkest-Control You currently have stripping messages: $iif($readini(theme.ini,settings,strip),$readini(theme.ini,settings,strip),off) aline @Darkest-Control You currently have Highlights: $iif($readini(theme.ini,settings,highlight),$readini(theme.ini,settings,highlight),off) aline @Darkest-Control You currently have Grammar correct: $iif($readini(theme.ini,settings,grammercorrect),$readini(theme.ini,settings,grammercorrect),off) aline @Darkest-Control You currently have Mode setting by + or -: $iif($readini(theme.ini,settings,plus),$readini(theme.ini,settings,plus),off) aline @Darkest-control You currently have Auto away: $iif(%away,%away,off) aline @Darkest-Control You currently have Query control: $iif($readini(theme.ini,settings,querycontrol),$readini(theme.ini,settings,querycontrol),off) aline @Darkest-Control You currently have Pop up on notice: $iif($readini(theme.ini,settings,popup),$readini(theme.ini,settings,popup),off) aline @Darkest-control Your current colour settings are $scol(~&@%+) - if they are all blue, you have none, type colour settings to change them. aline @Darkest-Control You are currently using - $dark(Darkest Script) Version $readini(theme.ini, settings, version) halt } if ( $1 == colour ) && ( setting isin $2 ) { csetting | halt } if ( blacklist isin $1- ) { aline @Darkest-Control $iif($ini(theme.ini,blacklreason,1),You currently have $ini(theme.ini, blacklreason, 0) people on your blacklist., You currently have no people on your blacklist.) var %x $ini(theme.ini, blacklreason, 0) while (%x) { var %person $ini(theme.ini, blacklreason, %x) aline @Darkest-Control %person For reason, $Readini(theme.ini, blacklreason, %person) dec %x } halt } if ( setting isin $1 ) { settings | halt } if ( help isin $1 ) { darkhelp | halt } if ( add == $1 ) && ( bot == $2 ) && ($3) { writeini theme.ini bots $3 1 | aline @Darkest-Control $3 has been added to the botlist! | halt } if ( delete == $1 ) && ( bot == $2 ) && ($3) { remini theme.ini bots $3 | aline @Darkest-Control $3 has been taken off the botlist. | halt } if ( view == $1 ) && ( bot isin $2 ) { viewbot | halt } if ( update == $1 ) { botit | halt } else { aline @Darkest-Control Error - No such command - To see commands type - commands - That is all. } } else noop $1- } alias startsets { if (!$hget(address, 0).item) .hmake address 100 hload address address.txt set -e %ttraw on set -e %logo 6,1D1,6a6,1r1,6k6,1e1,6s6,1t set -e %timestamp 14(12hh14:12nn14:12ss14) set -e %raw $readini(theme.ini, settings, raw) set -e %protection $readini(theme.ini, settings, protection) set -e %awaytime $readini(theme.ini, settings, awaytime) set -e %amsg $readini(theme.ini, settings, amsg) } on *:start: { startsets window -e @Darkest-Control aline 12 @Darkest-Control $greet($time(HH)) $+ , It is $day $time(mmmm) $time(mm) $+ , Have a nice day $me :). } alias Greet { var %time Hello! Its late :P if ( $1 == 06 ) { var %time Good morning } if ( $1 == 07 ) { var %time Good morning } if ( $1 == 08 ) { var %time Good morning } if ( $1 == 09 ) { var %time Good morning } if ( $1 == 10 ) { var %time Good morning } if ( $1 == 11 ) { var %time Good morning } if ( $1 == 12 ) { var %time Good Afternoon } if ( $1 == 13 ) { var %time Good Afternoon } if ( $1 == 14 ) { var %time Good Afternoon } if ( $1 == 15 ) { var %time Good Afternoon } if ( $1 == 16 ) { var %time Good Afternoon } if ( $1 == 17 ) { var %time Good Afternoon } if ( $1 == 18 ) { var %time Good Evening } if ( $1 == 19 ) { var %time Good Evening } if ( $1 == 20 ) { var %time Good Evening } return %time } on ^1:OPEN:?:*: { if ($nick) who $nick if ( $readini(theme.ini, settings, querycontrol) == on ) { if ($readini(theme.ini, query, $iif($sha($nick),$v1,$nick)) == accepted ) { echo -a Query Auto accepted from $nick $+ . | goto finish } if (%flood.o) { close -m $nick | $iif(%querys < 3,.msg $nick Please wait I have a que of queries which need to be answered first.) | inc %querys | window @floodcontrol | aline @floodcontrol $nick has queried you saying: <- $1- -> while you were accepting a query. | halt } set %query.nick $nick set %query.true $1- set %query.msg $iif($len($strip($1-)) > 75,a message to long to be displayed,$strip($1-)) .msg $nick 12{14-15-14 $dark(Darkest) Query Control Please Wait to be accepted or denied 14-15-12} dialog -m QF QF .timer 1 0 close -m $nick set %flood.o 1 .timer 1 5 unset %flood.* window @Darkest-Control aline 10 @Darkest-Control Query control used } :finish } dialog QF { title "Darkest Query Control" size 250 75 250 125 text You have a query from %query.nick $chr(40) $+ $sha(%query.nick) $+ $chr(41) saying %query.msg ,1, 5 5 210 100 button "Accept",2, 5 70 50 30, ok button "Deny",3, 60 70 50 30, cancel button "Block",4, 115 70 50 30 text "V3", 5, 200 90 30 15, disable } on *:dialog:QF:sclick:2: { query %query.nick echo -t %query.nick 12{14-12 %query.nick 14-12} %query.true echo -t %query.nick 12{14-12 $me 14-12} I have accepted your query. .msg %query.nick 12{14-15-14 I have accepted your query. 15-14-12} unset %query.* } on *:dialog:QF:sclick:3: { .msg %query.nick I have denied your query - A 2 minute ignore has been placed on your nick to prevent abuse. .ignore -pu120 %query.nick close -m %query.nick unset %query.* } on *:dialog:QF:sclick:4: { dialog -x QF var %reason $??"Is there a reason why you are blocking this person?" .msg %query.nick I have denied your query & You have been blocked for reason: $iif(%reason,$v1,Generel annoyance) .ignore -pu1200 %query.nick close -m %query.nick unset %query.* } menu query { $iif($readini(Theme.ini, Query, $sha($active)) == accepted,$style(1),$style(0)) Auto-Accept queries from $active: { set %status $iif($readini(Theme.ini, Query, $sha($active)) == Accepted,Declined,Accepted) writeini theme.ini query $sha($active) %status echo -ta $+(04,$active) 14 has been04 $iif(%status == declined,deleted from,added to) 14Auto-Accept. } } dialog FloodProtection { title "Flood Protection." size -1 -1 110 100 option dbu Text "Flood Protection", 10, 34 10 50 24, centre, ok button "Add exception", 1, 5 25 50 24, button "lines before kick", 2, 55 25 50 24, button "When to unset lines", 3, 5 50 50 24, button "Kicks before ban", 4, 55 50 50 24, button "Do kick ops", 5, 55 74 50 24, button "Dont kick ops", 6, 5 74 50 24, } on *:dialog:Floodprotection:sclick:*: { if ( $did == 1 ) { var %nick $$?"Who do you want to add to your exception list?" if (!%nick) { echo -a You have cancelled the command | halt } writeini theme.ini exception %nick Excepted echo -a %nick Has been added to the exception list. } if ( $did == 2 ) { set %lines $$?"How many lines should be said in a set amount of time before kicking somone?" echo -a after %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds a user will get kicked. } if ( $did == 3 ) { writeini theme.ini flood unsettime $$?"How long should it take to unset kicking time? - in seconds." echo -a after %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds a user will get kicked. } if ( $did == 4 ) { var %kb $$?"How many times should a person be kicked before being banned?" writeini theme.ini ban times %kb echo -a after $readini(theme.ini, ban, times ) kick $+ $iif( $readini(theme.ini, ban, times) > 1,s) a user will be banned, if not on the exception list. } if ( $did == 6 ) { writeini theme.ini protection op on echo -a ops will now not be kicked if they flood. } if ( $did == 5 ) { writeini theme.ini protection op off echo -a ops will now be kicked if they flood. } } alias w { whois $1- } alias advertise { msg $iif(%chan,$v1,$active) 12{14-15-14 I am using %logo script 12-14 Made by Termz 12-14 http://darkest-script.webs.com 15-14-12} } alias settings { dialog -mo settings settings } alias sun { var %colour1 8 var %colour2 4 var %colour3 7 var %colour4 $iif($rand(7,9) == 9,4,$rand(7,8)) var %x = 1 var %c = $chr(3) var %t = $+(%c,%colour1) %colour1 = $base(%colour1,10,10,2) %colour2 = $base(%colour2,10,10,2) %colour3 = $base(%colour3,10,10,2) %colour4 = $base(%colour4,10,10,2) while ($mid($1-,%x,1)) { %t = $+(%t,$v1,%c,$iif($and(%x,1) == 0,%colour [ $+ [ $rand(1,4) ] ],%colour [ $+ [ $rand(1,4) ] ] )) inc %x } return %t } alias ac { var %colour1 11 var %colour2 12 var %colour3 2 var %colour4 10 var %x = 1 var %c = $chr(3) var %t = $+(%c,%colour1) %colour1 = $base(%colour1,10,10,2) %colour2 = $base(%colour2,10,10,2) %colour3 = $base(%colour3,10,10,2) %colour4 = $base(%colour4,10,10,2) while ($mid($1-,%x,1)) { %t = $+(%t,$v1,%c,$iif($and(%x,1) == 0,%colour [ $+ [ $rand(1,4) ] ],%colour [ $+ [ $rand(1,4) ] ] )) inc %x } return %t } alias register { if (!%password ) { set %password $??"what is your password?" } if (@ !isin $Readini(mirc.ini, mirc, email)) { var %email $$?"What is your email?" writeini mirc.ini mirc email %email } else { var %email $readini(mirc.ini, mirc, email) } msg nickserv register %password %email } alias mute { who $active mode $active +b ~q: $+ $sha($1) | mode $active -vho $1 $1 $1 } on ^*:NOTICE:*:?: { $iif($readini(theme.ini, bots, $nick),goto bots,inc %floodS) if ( $readini(theme.ini, settings, popup) == on ) { if ( %floodS >= 3 ) { goto window } .timerflood 1 30 unset %floodS :bots if ($readini(Theme.ini, Bots, $nick) == 1 ) { if ($nick == nickserv) && ( Please isin $1-) && ( nick isin $1- ) { identify } if ($nick == botserv) && (%silence [ $+ [ botserv ] ]) { $iif($1 isnum,halt,writeini -n Theme.ini Bots $1 1) | halt } echo < $nick > $1- | halt :window .timerflood 1 30 unset %floods window @FloodControl $iif(%Alined != 1,aline 12 @floodcontrol This person was suspected of flood so it was forwarded to this window.) set %alined 1 .timer 1 20 unset %alined aline 14 @floodcontrol < $+ $nick $+ > $1- halt } noop $tip(Notice, Notice, 7Notice from 3 $+ $nick $+ saying $1- ,10) | write notice.txt $time $nick $+ : $1- | haltdef halt } } on ^*:INVITE:#: { if ( %raw != on ) { halt } if ( %inv [ $+ [ $address($nick,13) ] ] == 1 ) { .notice $nick I will not accept an invite from you for the next 60 seconds. | inc %inv [ $+ [ $address($nick,13) ] ] | halt } if ( %inv [ $+ [ $address($nick,13) ] ] > 1 ) { window @Darkest-Control aline 8 @Darkest-Control Invite protection from $nick has been used. halt } echo $active 12{14-12 $nick 14-12} has invited you to $+ $iif(!$1,$chan,$5) inc -u60 %inv [ $+ [ $address($nick,13) ] ] halt } menu @highlight { Clear Highlights: { .remove hl.txt write hl.txt Highlights Echo Highlights have been cleared. } } alias kick { if ( $2 == $chan ) || ( $3 == $chan ) { kick $1- | halt } $iif(Q isincs $chan(#).mode,cs kick,kick) $chan $1 $iif(!$2,$read(kick.txt),$2-) } alias darkhelp { run help.txt } alias connection { $iif($readini(theme.ini, botlist, $network) != Complete,Botit) .timestamp -f 14(12hh14:12nn14:12ss14) .timestamp on .timestamp -g 14(12hh14:12nn14:12ss14) set %raw on mode $me +xp } on *:load: { load } alias load { if ($?!"You are about to load the darkest script - when loading the darkest script many files will be made. And you will then be guided threw it.") { titlebar Darkest - Script .alias invite invite $chr(36) $+ 1 $chr(36) $+ iif(! $+ $chr(36) $+ 2,#, $+ $chr(36) $+ 2) .remove hl.txt .remove help.txt writeini mirc.ini text quit Darkest Script write hl.txt Highlights write help.txt *-*-*-*-*-*-*-*- $+ Darkest Script $+ -*-*-*-*-*-*-*-* write help.txt Thank you for using the darkest script made by Termz write help.txt I suggest you read this before further use. write help.txt For a list of commands to use in this window type commands in this window. write help.txt to access this file type help in this window. write help.txt To change settings right click the background or type "settings" write help.txt The rainbow text and grammer text cannot be on at the same time write help.txt Protection protects you from getting kicked or banned if you are op write help.txt Please do not edit the script in any way write help.txt If the script stops working because you editted it please do not ask me for help write help.txt if you need help with the script and you didnt edit it etc. you can find me by. write help.txt The website, http://darkest-script.webs.com/# for details and extra help. .remove joke.txt writeini theme.ini ban times 3 write joke.txt Yo mama's head is so small that she got her ear pierced and died. write joke.txt Yo mama's so bald she curls her hair with rice. write joke.txt Yo mama's so fat she lays on the beach and people run around yelling Free Willy! write joke.txt Yo mama's head is so big she has to wash her hair at Niagara Falls write joke.txt Yo mama's so poor when I saw her kicking a can down the street, I asked her what she was doing, she said, "Moving." write joke.txt Yo mama's breath is so stank we don't know whether you need gum or toilet paper write joke.txt Yo mama's so fat her blood type is Ragu write joke.txt Yo mama's head is so big she has to wash her hair at Niagara Falls write joke.txt Yo mama's so fat she can't wear Daisey Dukes. She has to wear Boss Hoggs set -e %logo 6,1D1,6a6,1r1,6k6,1e1,6s6,1t set -e %timestamp 14(12hh14:12nn14:12ss14) set -e %raw on set -e %protection on set -e %awaytime 1800 write joke.txt Yo mama's so stupid on her job application where it says emergency contact she put 911 write joke.txt Yo mama's so ugly that when she was born, the doctor slapped HER mama! write joke.txt Yo mama's so bald that she took a shower and got brain-washed! write joke.txt Yo mama's so big she uses I-95 for a Slip 'n Slide write joke.txt Yo mama's so stupid on her job application where it says emergency contact she put 911 write joke.txt Yo mama's so ugly they pay her to put her clothes on in strip joints. write joke.txt Yo mama's so fat she went to the movies and sat next to everyone! write joke.txt Yo mama's so smelly, that her shit is glad to escape. write joke.txt Yo mama's so fat when she wears a yellow raincoat, people said "Taxi!" write joke.txt Yo mama's so fat that when the bitch goes to an all You can eat buffet, they have to install speed bumps. write joke.txt Yo mama's so dumb, she cooked her own complimentary breakfast. write joke.txt Yo mama's so fat a picture of her would fall off the wall! write joke.txt Yo mama's so stupid, I saw her in the frozen food section with a fishing rod. write joke.txt Yo mama's so dumb, she got hit by a cup and told the police that she got mugged. write joke.txt Yo mama's got three fingers and a banjo. write joke.txt Yo mama's so stupid, she asked you, "What is the number for 911?" write joke.txt Yo mama's breath is so stank we don't know whether you need gum or toilet paper write joke.txt Yo mama's so stupid, I saw her in the frozen food section with a fishing rod. write joke.txt Yo mama's so ugly they put her face on box of Ex-Lax and sold it empty write joke.txt Yo mama's so ugly that Yo father takes her to work just so he doesn't have to kiss her goodbye. set %timestamp 14(12hh14:12nn14:12ss14) .remove chuck.txt write chuck.txt When you play Monopoly with Chuck Norris, you do not pass go, and you do not collect two hundred dollars. You will be lucky if you make it out alive. write chuck.txt When you play Monopoly with Chuck Norris, you do not pass go, and you do not collect two hundred dollars. You will be lucky if you make it out alive. write chuck.txt Chuck Norris can win a game of Connect Four in only three moves. write chuck.txt The active ingredient in Red Bull is Chuck Norris's sweat. write chuck.txt When Chuck Norris is in a crowded area, he doesn't walk around people. He walks through them. write chuck.txt It takes Chuck Norris 20 minutes to watch 60 Minutes. write chuck.txt The active ingredient in Red Bull is Chuck Norris's sweat. write chuck.txt Chuck Norris once ate an entire bottle of sleeping pills. They made him blink. write chuck.txt Thousands of years ago Chuck Norris came across a bear. It was so terrified that it fled north into the arctic. It was also so terrified that all of its decendents now have white hair. write chuck.txt When Chuck Norris is in a crowded area, he doesn't walk around people. He walks through them. write chuck.txt Chuck Norris doesn't bowl strikes, he just knocks down one pin and the other nine faint. write chuck.txt In the first Jurassic Park movie, the Tyrannosaurus Rex wasn't chasing the jeep. Chuck Norris was chasing the Tyrannosaurus AND the jeep. write chuck.txt Chuck Norris don't open no can of whoopass. He makes his own. write chuck.txt When a valcano erupts it is not because of a natural cause. It is because chuck norris just farted. write chuck.txt Chuck Norris once roundhouse-kicked a ten dollar bill into 200 nickels. write chuck.txt When a valcano erupts it is not because of a natural cause. It is because chuck norris just farted. write chuck.txt In the Bible, Jesus turned water into wine. But then Chuck Norris turned that wine into beer. write chuck.txt There are no weapons of mass destruction in Iraq, Chuck Norris lives in Oklahoma. write chuck.txt Chuck norris killed the dinosaurs. Along with the mamoth and the sabre tooth tiger, and well any other species thats did. He was there. write chuck.txt Chuck Norris doesn't bowl strikes, he just knocks down one pin and the other nine faint. .remove kick.txt write kick.txt Please, just stop. You are cracking the fuck out of everyone. write kick.txt You have a right to be silent! that means shut the fuck up! write kick.txt This happend because you were retarted and you forced me to do it. write kick.txt God doesnt spair idiots. He also doesnt spair jack asses, consider yourself a double kill. write kick.txt Who? ohhhh that faggot, i just kicked him. write kick.txt If you feel you were unfairly kicked please call our hotline at 1-800-tuf-shit or if you want to visit the website. www.kissmyass.com .color topic 3 .color kick 4 .color own text 14 if (!$hget(address, 0).item) .hmake address 100 .color normal text 14 .font -d Arial Unicode MS .color background 1 writeini -n Theme.ini Bots nickserv 1 writeini -n Theme.ini Bots Botserv 1 writeini -n Theme.ini Bots memoserv 1 writeini -n Theme.ini Bots Hostserv 1 writeini -n theme.ini Bots chanserv 1 writeini -n theme.ini Theme logo 1,6D6,1a1,6r6,1k1,6e6,1s1,6t writeini -n theme.ini Bots Global 1 .timestamp -f 14(12hh14:12nn14:12ss14) .timestamp on .timestamp -g 14(12hh14:12nn14:12ss14) set %raw on set %logo $dark(Darkest) set %night 6|13,6|0,13|13,6|6,2|2,1| 8¤ Good night ¤ 2,1|6,2|13,6|0,13|13,6| var %x 1 window -e @Darkest-Control writeini -n theme.ini settings Version 3 while ( %x < $calc($lines(help.txt) + 1)) { .timer 1 $calc(%x + %x) aline @Darkest-Control $replace($read(help.txt, %x),Darkest script,$dark(Darkest Script)) inc %x } } } alias version { $iif(!$1,version,ctcp $1 version) } dialog Away { title "The darkness shall rule the night" size -1 -1 270 150 Text "Dark Away script", 60, 85 15 90 24, centre, Text "V3", 330, 185 30 90 24, centre, disabled button "Adjust away time", 3, 0 50 90 24, ok button "Away message", 2, 90 50 90 24, ok button "Away nick", 1, 180 50 90 24, ok button "Turn on", 4, 0 74 135 76, ok button "Turn off", 5, 136 74 135 75, ok } on *:dialog:Away:sclick:*: { if ( $did == 2) { set %amsg $$?="What do you want your away message to be when you are gone?" echo $active Your away message is now %amsg } if ( $did == 3 ) { set %awaytime $$?="After how many seconds should your status turn away?" echo $active Your away time is now $duration(%awaytime) $+ . } if ( $did == 5 ) { set %away off | echo $active Away script has been turned off. } if ( $did == 4 ) { set %away on | echo $active Away script has been turned on. } if ( $did == 1 ) { set %anick $$?="What do you want your nick to be?" set %onick $me echo $active Your away nick is now %anick $+ , And your original nick is now $nick $+ . } } alias Botit { set -u5 %silencebotserv 10 bs botlist writeini theme.ini botlist $network Complete window -e @Darkest-Control aline 7 @Darkest-Control The botlist for $network has been updated. } alias identify { if (!$readini(theme.ini, password, $network $+ $iif($newnick,$newnick,$me))) { halt } .msg nickserv identify $readini(theme.ini, password, $network $+ $me) window -e @Darkest-Control aline 6 @Darkest-Control Auto identify script has been used. } ctcp ^*:version:*:{ haltdef | .ctcpreply $nick $1 1,6D6,1a1,6r6,1k1,6n6,1e1,6s6,1s 6,1 And only that shall rule the night. - 12Scripted 12By 14T15e0r15m14z4 | .ignore -tu7 $nick } on *:INPUT:#: { if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on } if ( /ns == $1 && id == $2 && $3 != $null && !$readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $3 | echo $active your password has been recorded. | halt } if ( /msg == $1 && nickserv == $2 && identify == $3 && $readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $4 | echo $active your password has been recorded. | halt } if ( + isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) { if ($regex($1,b|e/si)) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $iif($address($2,3),$v1,$sha($2))) | goto finish } mode $chan $1 $replace($2-,$ $+ me,$me) } if ( - isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) && ($chan) { if ($regex($1,b|e/si)) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $iif($address($2,3),$v1,$sha($2)))) | goto finish } mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ ) } if ( $readini(theme.ini, settings, grammercorrect) == on ) { if ( $left($1,1) isalpha ) { if ( $1 ison $chan ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ , $2- $+ . | halt } if ( ! isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == ? ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == ! ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == . ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( . isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if (!$2) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ . | halt } if ( ` isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( - isin $1- ) || ( + isin $1) { halt } if ( Good night isin $1- ) { msg $active $replace($1-,Good night,%night) | halt } haltdef msg $active $upper($left($1,1)) $+ $right($1,-1) $2- $+ . | halt } } if (%rainbowtexton == 1) && ($left($1,1) != /) { var %x 1 while ( %x !> $chan(0)) { if ( $chan == $chan(%x) ) { var %y %x } inc %x } if ( $lower(c) isin $chan(%y).mode ) || ($upper(S) isin $chan(%y).mode) { goto norm } unset %msgrbw var %r1 1 set %nintext $len($1-) + 1 while (%r1 < %nintext) { set %msgrbw %msgrbw $+ $+ 04 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 07 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 08 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 09 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 12 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 06 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 13 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 } if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 } say %msgrbw unset %msgrbw unset %nintext halt } elseif (%rainbowtextandbackgroundon == 1) && ($left($1,1) != /) { unset %msgrbw2 var %r2 1 set %nintext2 $len($1-) + 1 while (%r2 < %nintext2) { set %msgrbw2 %msgrbw2 $+ $+ 06,04 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 13,07 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 12,08 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 03,09 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 08,12 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 07,13 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 04,06 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw22 %msgrbw2 $chr(32) } inc %r2 } if ($lower(c) isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 } say %msgrbw2 :finisher1 unset %msgrbw2 unset %nintext2 haltdef halt } if ( %raw != on ) { goto finish } if ($left($1,1) == /) { goto finish } if ($left($1,2) == /) { goto finish } :norm if ($1) || ($2) $iif($status == connected,.msg,echo) $active $1- else { echo -a Your message could not be relayed. | halt } $iif($server,echo,noop) -at 12{14-12 $iif($ialchan($me,#,1).pnick != $me,$scol($left($ialchan($me,#,1).pnick,1))) $+ 12 $+ $me 14-12} $+ $color(own text) $1- $iif($away,away1) $iif(%away == on,.timeraway 1 $iif(!%awaytime,1800,%awaytime) away123) halt :finish } on *:INPUT:?: { if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on } if ( /ns == $1 && id == $2 && $3 != $null && !$readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $3 | echo $active your password has been recorded. | halt } if ( /msg == $1 && nickserv == $2 && identify == $3 && $readini(theme.ini, password, $network $+ $nick) ) { writeini theme.ini password $network $+ $nick $4 | echo $active your password has been recorded. | halt } if ( + isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) { if ( b isin $1 ) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $address($2,3)) | goto finish } mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ ) } if ( - isin $1 ) && ( $readini(theme.ini, settings, plus) == on ) && ($chan) { if ( b isin $1 ) && ( $2 ison $chan ) { mode $chan $replace($1-,$2, $address($2,3)) | goto finish } mode $chan $1 $replace($2-,$ $+ me, $+ $me $+ ) } if ( $readini(theme.ini, settings, grammercorrect) == on ) { if ( $left($1,1) isalpha ) { if ( $1 ison $chan ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ , $2- $+ . | halt } if ( ! isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == ? ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == ! ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( $right($1-,1) == . ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( . isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if (!$2) { msg $active $upper($left($1,1)) $+ $right($1,-1) $+ . | halt } if ( ` isin $1- ) { msg $active $upper($left($1,1)) $+ $right($1,-1) $2- | halt } if ( - isin $1- ) || ( + isin $1) { halt } if ( Good night isin $1- ) { msg $active $replace($1-,Good night,%night) | halt } haltdef msg $active $upper($left($1,1)) $+ $right($1,-1) $2- $+ . | halt } } if (%rainbowtexton == 1) && ($left($1,1) != /) { var %x 1 while ( %x !> $chan(0)) { if ( $chan == $chan(%x) ) { var %y %x } inc %x } if ( $lower(c) isin $chan(%y).mode ) || (S isin $chan(%y).mode) { goto norm } unset %msgrbw var %r1 1 set %nintext $len($1-) + 1 while (%r1 < %nintext) { set %msgrbw %msgrbw $+ $+ 04 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 07 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 08 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 09 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 12 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 06 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 set %msgrbw %msgrbw $+ $+ 13 $+ $mid($1-,%r1,1) if ($mid($1-,%r1,1) == $chr(32)) { set %msgrbw %msgrbw $chr(32) } inc %r1 } if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 } say %msgrbw unset %msgrbw unset %nintext halt } elseif (%rainbowtextandbackgroundon == 1) && ($left($1,1) != /) { unset %msgrbw2 var %r2 1 set %nintext2 $len($1-) + 1 while (%r2 < %nintext2) { set %msgrbw2 %msgrbw2 $+ $+ 06,04 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 13,07 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 12,08 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 03,09 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 08,12 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 07,13 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw2 %msgrbw2 $chr(32) } inc %r2 set %msgrbw2 %msgrbw2 $+ $+ 04,06 $+ $mid($1-,%r2,1) if ($mid($1-,%r2,1) == $chr(32)) { set %msgrbw22 %msgrbw2 $chr(32) } inc %r2 } if (c isincs $chan(#).mode) { msg $chan $strip($1-) | haltdef | goto finisher1 } say %msgrbw2 :finisher1 unset %msgrbw2 unset %nintext2 haltdef halt } if ( %raw != on ) { goto finish } if ($left($1,1) == /) { goto finish } if ($left($1,2) == /) { goto finish } :norm $iif(!$server,echo,.msg) $active $1- $iif($server,echo) -at 12{14-12 $iif($chan,$ialchan($me,#,1).pnick,$me) 14-12} $+ $color(own text) $1- $iif($away,away1) $iif(%away == on,.timeraway 1 $iif(!%awaytime,1800,%awaytime) away123) halt :finish } alias away1 { .timerg* off away nick $iif(%onick,%onick,$remove($me,|away)) timergonetime off unset %hlw* echo $active Welcome back from being away :), The script took care of you :3. You were away for, $duration(%seconds [ $+ [ $server ] ]) $+ . unset %second* } alias away123 { unset %hlw* set -e %second [ $+ [ $server ] ] %awaytime .timerG [ $+ [ $network ] ] 0 1 inc %seconds [ $+ [ $server ] ] away I am not here. $iif(%amsg,%amsg $+ .) 12{14-15- 12Auto Away Script By 14T15e0r15m14z 15-14-12} tnick $iif(!%anick,$me $+ |away,%anick) window @Darkest-Control aline 11 @Darkest-Control Auto away script used at $time(hh:nn) after $duration(%awaytime) } menu c* { Addons .Ascii converter: { var %convert $strip($$?"What do you want to convert to/from ascii?") bset -t &asc 1 %convert if ( $remove(%convert,$chr(32)) !isnum ) { var %result $bvar(&asc,1-) } else { bset &asc 1 %convert var %result $remove($bvar(&asc,1-).text,1,2,3,4,5,6,7,8,9,0) } echo -a 12{14-15-14 $iif(%convert isnum,Number %convert,%convert) 15-14-12}12 Is 12{14-15-14 $iif(%result,%result,$iif(%convert isnum ,$chr(%convert),$asc(%convert))) 15-14-12} } .Mass invite: { var %x 1 var %chan $$?"What channel you advertising today?" if (!%reason) { var %reason $Read(reason.txt) } while ( %x < $nick($chan,0) ) { :check if ( $nick($chan,%x) == $me ) || ($readini(theme.ini, Bots, $nick)) || ($nick ison %chan ) { inc %x | goto check } .timerinv $+ %x 1 $calc( %x * 10) .notice $nick($chan,%x) Hey, join %chan please? inc %x } } .Mass-Highlight:$iif($?!"There is a chance you may get banned for doing this. Do you still want to do it?",listchan) channel control .Flood Protection ..Add channel to flood protection: writeini theme.ini flood $chan 1 | echo -a Flood protection for $chan has been turned on. ..Delete channel from flood protection: remini theme.ini flood $chan | echo -a $chan has been removed from flood protection. ..settings:dialog -m floodprotection floodprotection .Topic ..Rare: topic # 7,14i!i!1,14i!i!14,1i!i! 1,1014 ·º• 8 $$?"What do you want to say in your topic?" 14•º· 14,1i!i!1,14i!i!7,14i!i! ..Love: topic # 2>6,2<313,6<30,13<313,6<36,2<32,1 8¤ 13,1x4X6x8,1 $$?"What do you want to say in your topic?" 13,1x4X6x 8¤ 2>6,2<313,6<30,13<313,6<36,2<32,12,1> ..Ice storm: topic # 11,0•0,11•10,11•11,10•12,10•10,12•2,12•1,2•2,1• $$?="What do you want to say in your topic" 11,0•0,11•10,11•11,10•12,10•10,12•2,12•1,2•2,1• ..Holy Have: Topic # 8¤~8,1®8,14®8,15®8,0®8,15®8,14®8,1® 8,1¤ $$?="What do you want to say in your topic" ¤8,1®8,14®8,15®8,0®8,15®8,14®8,1® ¤~ ..Gray love: topic # 14(¯`.¸15(¯`.¸ 4 $+ $$?="What do you want to say in your topic" $+ 15¸.´¯)14.´¯) ..Star light: topic # 4~*07~*08~*09~*10~*06~* $$?="What do you want to say in your topic?" 4*~07*~08*~09*~10*~06*~ ..Aurora: topic # 2|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦1,11-- $$?"What do you want to say in your topic?" --0,11¦|12¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|1,1144 ..Blazing red AE: topic # 14 7,4æ5,4æ4,5æ1,5æ5,1æ7,1 $??="What do you want to say in your topic" 5,1æ1,5æ4,5æ5,4æ7,4æ4,7æ ..Flame circles: topic # 14 8•0,80•7•0,78•5•0,47•5•0,54•0,110» 12 $$?="what do you want your topic to say" 10« 8•0,80•7•0,78•5•0,47•5•0,54• ..Fire arrow: topic # 12 0,4»5,4»4,5»1,5»5,1»0,1 $??="What do you want to say in your topic" 5,1«1,5«4,5«5,4« ..Blazing Red: topic # 4,0%0,4%4,4 5,4%4,5%5,5 1,5%5,1%1,1 0,1 $??="What do you want to say in your topic" 5,1%1,5%5,5 4,5%5,4%4,4 0,4%4,0% ..Blazing Purple: topic # 13¦|0,13¦|6¦|13,6¦|5¦|4 $??="What do you want to say in your topic" 5|¦13|¦6,13|¦0|¦13,0|¦ ..Blazing Blue: topic # 0,12æ¸2,12`æ12,2æ¸1,2`æ2,1æ¸0,1 -= $??="What do you want to say in your topic" =- 2,1`æ1,2æ¸12,2`æ2,12æ¸0,12`æ ..Blazing Green: topic # 9,0æ0,9æ3,9æ9,3æ1,3æ3,1æ9 $??="What do you want to say in your topic" 3,1æ1,3æ9,3æ3,9æ0,9æ9,0æ ..Red Bars: topic # 8,0|0,8|8,7|4,7|7,4|5,4|4,5|1,5|5,1|9,1 $??="What do you want to say in your topic" 5,1|1,5|4,5|5,4|7,4|4,7|8,7|0,8|8,0| ..Blue Bars: topic # 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 $??="What do you want to say in your topic" 2,1|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦ ..Steel Bar: topic # 15,0\0,15\14,15\15,14\1,14\14,1\15,1 $??="What do you want to say in your topic" 14,1/1,14/15,14/14,15/0,15/15,0/ ..Sky High: topic # 2~12,10~11,2~12,10~2,11~12,10~11,2~12,10~2,11~12,10~11,2~ $??="What do you want to say in your topic" 11,2~12,10~2,11~12,10~11,2~12,10~2,11~12,10~11,2~12,10~2,11~ ..Rainbow: topic # 6,12|12,6|13,6|6,13|4,13|13,4|7,4|4,7|8,7|7,8|9,8|8,9|10,9|9,10|12,10|10,12|16,12 $??="What do you want to say in your topic" 10,12|12,10|9,10|10,9|8,9|9,8|7,8|8,7|4,7|7,4|13,4|4,13| .channel mode setter. ..Register chan: msg chanserv register $chan $$?="Password for channel please" Second | topic # Welcome to $chan $+ , have a nice day. ..lock chan: mode $chan +miRc ..Normal secure chan: mode $chan +j 3:5 | /cs levels $chan set Autovoice -1 | mode $chan +m | bs assign $chan X | mode $chan +f [5t#b]:4 | /bs kick #channel flood ON 2 5 4 | mode $chan +Q Darkest .$iif($readini(theme.ini, settings, querycontrol) == on,$style(1)Disable,$style(0)Enable) Use Query Control: { var %status $iif($readini(theme.ini, settings, querycontrol) == on,off,on) echo -ta 14Query control has been turned %status writeini theme.ini settings querycontrol %status } .Nick color: csetting .settings: dialog -mo settings settings .Lag Bar: { .raw ping 123 /dialog -m lag lag .timer 1 0 /dialog -s lag 650 40 150 0 X } .Adjust away script: dialog -m away away .advertise: set %chan $iif(!$active,$chan,$active) | advertise | unset %chan } menu @Darkest-Control { Darkest .$iif($readini(theme.ini, settings, querycontrol) == on,$style(1)Disable,$style(0)Enable) Use Query Control: { var %status $iif($readini(theme.ini, settings, querycontrol) == on,off,on) echo -ta 14Query control has been turned %status writeini theme.ini settings querycontrol %status } .Nick color: csetting .settings: dialog -mo settings settings .Lag Bar: { .raw ping 123 dialog -m lag lag .timer 1 0 dialog -s lag 650 40 150 0 X } .Adjust away script: dialog -m away away } menu n* { Fun Things .Steal Cookies: { var %x $rand(2,20) describe $chan Goes into10 $$1 $+ 's pocket and grabs10 %x cookies! writeini theme.ini games cookies $calc($readini(theme.ini, games, cookies) + %x) msg $chan 10 $+ $readini(theme.ini, games, cookies) cookies stolen to date!! } .fml: { fml } .Fact: echo $active 12{14-15- Chuck Fact 15-14-12} $read(chuck.txt) .Insult: { var %diss $iif($Readini(theme.ini, diss, $$1),$v1,0) inc %diss writeini theme.ini diss $$1 %diss msg $active $$1 $read(joke.txt) 12[11-2=12,15Insulted $readini(theme.ini, diss, $$1) times0,02=11-12] } Highlight .View Anti Highlight List: { window -d @AntiHighlight var %x $ini(theme.ini, nohighlight, 0) aline 10 @AntiHighlight Start list while (%x) { aline 12 @AntiHighlight $ini(theme.ini, nohighlight, %x) dec %x } aline 10 @AntiHighlight End of list } .Add To Anti Highlight List: { if ( $readini(Theme.ini, NoHighlight, $$1) == 1 ) { echo -a $$1 is already on your anti highlight list. halt } else { echo -a $$1 has been added to the anti highlight list. writeini theme.ini NoHighlight $$1 1 } } .Delete From Anti Highlight List: { remini theme.ini Nohighlight $$1 echo -a $$1 has been taken of the anti highlight list. } User control .access ..Give voice: mode $chan + $+ $str(v,15) $$1- ..Take voice: mode $chan - $+ $str(v,15) $$1- ..Give halfop: mode $chan + $+ $str(h,15) $$1- ..Take halfop: mode $chan - $+ $str(h,15) $$1- ..Give op: mode $chan + $+ $str(o,15) $$1- ..Take op: mode $chan - $+ $str(o,15) $$1- ..Give sop: mode $chan + $+ $str(a,15) $$1- ..Take sop: mode $chan - $+ $str(a,15) $$1- ..Give owner: mode $chan + $+ $str(q,15) $$1- ..Take owner: mode $chan - $+ $str(q,15) $$1- .Dicipline ..Mute: who $chan | mode $chan +b ~q: $+ $sha($$1) | mode $chan -vho $$1 $$1 $$1 ..kick : kick $$1 ..kick with reason: var %reason $??="Reason of kicking this person?" | kick $$1 %reason ..kick with random: inc %kc1 | kick $$1 $read(kick.txt) 4«14«4«14« GTFO2 2Kick Number %kc1 4»14»4»14» ..Kickban: who $chan | /kick $chan $$1 | mode $chan +b $sha($$1) ..Ultimate ban: { who $chan | mode $chan +bbbbbbbbbbbb $address($$1,3) $address($$1,4) $address($$1,2) $address($$1,1) $address($$1,5) $address($$1,6) $address($$1,7) $address($$1,8) $address($$1,9) $address($$1,10) $address($$1,11) $$1 } .Black list ..Add to blacklist: { var %nickblk $$1 var %xbb $??="Do you have a reason for blacklisting this person?" writeini theme.ini Blacklreason $$1 $iif(!%xbb,No reason specified,%xbb) kick %nickblk 12{14-15-14 blacklisted for reason: $readini(theme.ini, blacklreason, $$1) 15-14-12} } ..Delete from blacklist: { var %nickblk $??="Who do you want to take of the blacklist." if (!$readini(theme.ini, blacklreason, %nickblk)) { echo -n %nickblk is not on your blacklist. | halt } remini theme.ini Blacklreason %nickblk mode $chan -b $address(%nickblk,3) echo -n $iif(%nickblk,%nickblk has been taken off blacklist,Command has been canceled.) } Contact .query: query $$1 $$?"What do you want to say?" .whois: w $$1 .version: version $$1 } on @*:deop:#: { if ( %protection == on ) && ( $opnick == $me ) { ns update mode $chan -o $nick kick $nick Dont deop a pro. the pro deops you. window -e @Darkest-Control aline 4 @Darkest-Control Auto op script has been used. - by protection in settings. } } on @*:BAN:#:{ if ( %protection == on ) && ($banmask iswm $ial($me)) && ($me isop $chan) && ($nick != $me) { noop $tip(Ban, Ban, 4Ban in 12 $+ $chan $+ by 3 $+ $nick $+ And it was like this: $1- ,5) mode $chan -obbb $nick $me $banmask $wildsite if ( $nick == chanserv ) { halt } kick $nick window @Darkest-Control aline 4 @Darkest-Control Auto anti ban script has been used. - by protection in settings. } } on @*:kick:#: { if ( %protection == on ) && ( $knick == $me ) && ( $me is $+ $iif( $me isop $chan,op,hop) $chan ) { noop $tip(Kick, Darkest-script, 4Kick in 12 $+ $chan $+ by 3 $+ $nick $+ saying $1- ,2) if ( $nick == chanserv ) { cs unban $chan | halt } cs unban $chan .timer1 1 3 .join $chan .timer2 1 4 .kick $nick 5,1{4-0Kick4-0Protection4-5} window -e @Darkest-Control aline 4 @Darkest-Control Anti kick script has been used. - by protection in settings. } } alias cchans { set %cc.t = $comchan($1,0), %cc.n = 1, %cc while (%cc.n <= %cc.t) { %cc = %cc $comchan($1,%cc.n) | inc %cc.n } return ( $+ %cc $+ ) } on ^*:nick: { if ( %raw == on ) { var %cc.t = $comchan($newnick,0), %cc.n = 1, %cc while (%cc.n <= %cc.t) { echo $comchan($newnick,%cc.n) 12(14Nick Change12) (14 $nick 12) 14is now known as 12(14 $newnick 12) | inc %cc.n } if ( $nick == $me ) { identify } who $nick haltdef } } On ^*:Join:#: { if (!$hget($network, $chan)) { if (!$hget($network, 0).item) hmake $network 100 hadd $network $chan No update needed. who $iif($nick == $me,$chan,$nick) } if ( %raw == on ) && ( $me isop $chan ) && ($readini(theme.ini, Blacklreason, $nick)) { mode $chan +b $address($nick,3) kick $nick Blacklisted for reason: $readini(theme.ini, Blacklreason, $nick) } echo -t $Chan 12{14-12 14Join $+ 14:12 $nick 14(12 $+ $remove($Address($nick,1),!,*) $+ 14) Has Joined12 $Chan 14-12} | halt } alias scol { var %x $Replace($1-,+, $+ $+ $iif($readini(theme.ini, colour, voice),$readini(theme.ini, colour, voice),12) $+ +) var %x $Replace(%x, $+ $chr(37) $+ , $+ $+ $iif($readini(theme.ini, colour, hop),$readini(theme.ini, colour, hop),12) $+ $chr(37) $+ ) var %x $Replace(%x,@, $+ $+ $iif($readini(theme.ini, colour, op),$readini(theme.ini, colour, op),12) $+ @) var %x $Replace(%x,&, $+ $+ $iif($readini(theme.ini, colour, sop),$readini(theme.ini, colour, sop),12) $+ &) var %x $Replace(%x,~, $+ $+ $iif($readini(theme.ini, colour, owner),$readini(theme.ini, colour, owner),12) $+ ~) return %x } On ^*:Part:#: { if ( %raw == on ) { if (!$1-) { echo -t $Chan 12{14-12 14Part:12 $Nick 14 $+ $chr(40) $+ 12 $+ $sha($nick) $+ 14 $+ $chr(41) 14Has Left12 $Chan 14-12} | halt } if ($1-) { echo -t $Chan 12{14-12 14Part:12 $Nick 14 $+ $chr(40) $+ 12 $+ $sha($nick) $+ 14 $+ $chr(41) 14Has Left2 $Chan 14-12} 12(14-12 $1- 14-12) | halt } } } On ^*:Rawmode:#:{ if ( %raw == on ) { echo -t $Chan 12{14-12 $Nick 14sets Mode:14(12 $+ $1- $+ 14) 14-12} | Halt } } On $^*:Text:*:#: { if ( %raw == on ) { if ( $readini(theme.ini, settings, highlight) == on ) && (!$readini(theme.ini, bots, $nick)) { if ( $me isin $strip($1-) ) { if ($away) { window -e @Darkest-control write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >----- aline @Darkest-control 14 $+ $nick Has highlighted you in12 $chan 14at15 $time(hh:nn) 14saying:12 $1- if (%hlw [ $+ [ $nick ] ]) { goto finish } set %hlw [ $+ [ $nick ] ] 1 halt .notice $nick I am aware of your highlight but i am currently away, This is a 1 time highlight message. | window -e @Darkest-control | aline 8 @darkest-control Highlight < $nick > in $chan at $time(hh:nn) saying $1- } if ( $readini(Theme.ini, NoHighlight, $nick)) { goto finish } if ( $chan == $active ) && ( $appactive) { write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >----- echo -at 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} 8<9<10Highlight9>8> $1- halt } if ( %highlight [ $+ [ $nick ] ] == 1 ) { goto finish } set -u30 %highlight [ $+ [ $nick ] ] 1 if (!$appactive) { write hl.txt 15{14-12 $network 14-15} {14-12 $nick 14-15} {14-12 $time(dddd mmmm mm yyyy) 14-15} {14-12 $time(hh:nn) 14-15} -----< $1- >----- noop $tip(H, H, 4Highlight in 12 $+ $chan $+ by 3 $+ $nick $+ saying $1- ,5) window -e @Darkest-control aline @Darkest-control 14 $+ $nick Has highlighted you in12 $chan 14at15 $time(hh:nn) 14saying:12 $1- echo -t $chan 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} 8<9<10Highlight9>8> $1- halt } echo -a 12,1|11,1|2,1|12,0Highlight2,1|11,1|12,1| $chan $nick $+ : $strip($1-) 12,1|11,1|2,1|12,0Highlight2,1|11,1|12,1| } } if ( $readini(Theme.ini, Flood, $chan ) == 1) && ($me isop $chan) && (!$readini(theme.ini, exception, $nick)) { if ( $nick isop $chan ) && ( $readini(theme.ini, Protection, op) == on ) { halt } inc %flood [ $+ [ $nick ] ] if ( %flood [ $+ [ $nick ] ] == $iif(%lines,%lines,3) ) { inc -u3000 %num [ $+ [ $nick ] ] kick $nick Flood Protection. 12{14-15-14 Warning %num [ $+ [ $nick ] ] 14-15-12} %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds window @Darkest-Control aline 13 @Darkest-Control Flood protection has been used in $chan $+ . } if ( $readini(theme.ini, ban, times ) == %num [ $+ [ $nick ] ] ) { who $chan mode $chan +b $sha($nick) | unset %num [ $+ [ $nick ] ] } .timer 1 $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) unset %flood [ $+ [ $nick ] ] } } :finish if ( %raw != on ) { goto no } echo $chan $timestamp 12{14-12 $iif($ialchan($nick,#,1).pnick != $nick,$scol($left($ialchan($nick,#,1).pnick,1))) $+ 12 $+ $nick 14-12} $iif($readini(theme.ini, settings, strip) == on,$strip($1-),$1-) Halt :no } On ^*:QUIT:{ if ( %raw == on ) { haltdef var %z = 1 while (%z <= $comchan($nick,0)) { echo -ti2 $comchan($nick,%z) 12{14- Quit:12 $nick 14(12 $+ $sha($nick) $+ 14)12-14(12 $+ $1- $+ 14) -12} | inc %z } } } on ^*:ACTION:*:#: { if ( slaps isin $strip($1-)) && ( $me isin $strip($1-)) && ( trout isin $strip($1-)) && ( %aflood != 1) { set -u10 %aflood 1 var %trout $iif(!$readini(theme.ini, games, trout),1,$calc($readini(theme.ini, games, trout) + 1 )) writeini theme.ini Games Trout %trout .timer 1 0 describe $chan Takes the 12Trout out of $nick $+ 's hands and drops it back in the sea 12{14-15-11 $readini(theme.ini, games, trout) 12Trou $+ $iif($readini(theme.ini, games,trout) >= 2, t's,t) saved 15-14-12} Window -e @darkest-control aline 12 @darkest-control Trout protection has been used in $chan on $nick $+ ! } if ( $readini(Theme.ini, Flood, $chan ) == 1) && ($me isop $chan) && (!$readini(theme.ini, exception, $nick)) { if ( $nick isop $chan ) && ( $readini(theme.ini, Protection, op) == on ) { halt } inc %flood [ $+ [ $nick ] ] if ( %flood [ $+ [ $nick ] ] == $iif(%lines,%lines,3) ) { inc %num [ $+ [ $nick ] ] .timerFloodPro -o 1 999 unset %num* kick $nick Flood Protection. 12{14-15-14 Warning %num [ $+ [ $nick ] ] 14-15-12} %lines line $+ $iif(%lines > 1,s) in $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) seconds } if ( $readini(theme.ini, ban, times ) == %num [ $+ [ $nick ] ] ) { mode $chan +b $sha($nick) | unset %num [ $+ [ $nick ] ] } .timer 1 $iif(!$readini(theme.ini, flood, unsettime),5,$readini(theme.ini, flood, unsettime)) unset %flood [ $+ [ $nick ] ] } } On ^*:Text:*:?: { haltdef echo $nick $timestamp 12{14-12 $nick 14-12} 14 $+ $1- } alias dark { var %a $len($1-),%b 1,%c 1 while (%b <= %a) { if ($mid($1-,%b,1) != $chr(32)) { if (%c == 8) var %c 1 var %d $+(%d,$chr(3),$gettok(6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6 6 $+ $chr(44) $+ 1 1 $+ $chr(44) $+ 6,%c,32),$mid($1-,%b,1),$chr(3)) inc %c } else var %d $+(%d,$chr(160)) inc %b } $iif($isid,return,msg $active) $+ $replace(%d,$chr(160),$chr(32)) $+ } alias listchan var %x 1,%a | while (%x <= $nick($iif($1,#$1,#),0)) { var %a %a $nick($iif($1,#$1,#),%x) | if ($len(%a) > 400) { msg $iif($1,$1,$active) %a | var %a } | inc %x } | msg $iif($1,$1,$active) %a alias viewbot { var %x $ini(theme.ini,bots,0) var %b 1 window -c @botlist window -d @botlist aline 12 @botlist This is the list of bots you have! while (%x) { aline @botlist Bot number %b - $ini(theme.ini,bots,%x) dec %x inc %b } } menu s* { Bot Control .Update Bot list: bs botlist | echo Bot list has been updated! | set %silence [ $+ [ botserv ] ] 1 | .timerSilence 1 15 unset %silence [ $+ [ Botserv ] ] .View bot list: viewbot .Add Bot: { var %bot $$?"What bot are you adding?" writeini theme.ini bots %bot 1 echo -a %bot has been added to the botlist. } .Delete Bot: { var %bot $$?"what is the bots name?" if ( $readini(theme.ini, bots, %bot)) { echo -a %bot has been taken off the botlist. remini theme.ini bots %bot } else { echo -a %bot is not on the bot list. } } } menu @Darkest-Control { Nick color: csetting Bot Control .Update Bot list: { botit echo Bot list has been updated! } .View bot list: viewbot .Add Bot: { var %bot $$?"What bot are you adding?" writeini theme.ini bots %bot 1 echo -a %bot has been added to the botlist. } .Delete bot: { var %bot $$?"what is the bots name?" if ( $readini(theme.ini, bots, %bot)) { echo -a %bot has been taken off the botlist. remini theme.ini bots %bot } else { echo -a %bot is not on the bot list. } } } on *:input:@*: { $iif($left($1,1) == /,$1-) $iif($left($1,1) != /,aline 12,halt) $active $eval($1-) } menu @* { Window Control .Close: { var %x $window(0) while (%x) { if ( $active == $window(%x) ) { var %active $window(%x) } dec %x } window -c %active } .Clear: { var %x $window(0) while (%x) { if ( $active == $window(%x) ) { var %active $window(%x) } dec %x } window -c %active window -ae %active } } on ^*:pong:{ if ((%lag) && (*123 iswm $1-)) { haltdef set %temp $calc( ( $ticks - %lag) / 1000 ) seconds if (%temp > 5) { if (!%xb) { set -u90 %xb 1 echo -a |||||--Lag Alert 5+ seconds of lag detected!--||||| } } } } alias lag { set %lag $ticks .raw ping 123 dialog -t lag %temp } dialog lag { size -1 -1 150 0 title %temp lag } on 1:dialog:lag:init:*: { .timerBar2 0 4 .raw ping 123 .timerBar1 0 5 lag } on 1:dialog:lag:close:*: { .timerBar* off unset %lag unset %temp } ;;; Aliases needed for colouring. Changing colour by changing "$Chr(3),12,$Chr(2)" to "Chr(3),<Colour>,$Chr(2)" $h is the main colour, $hh is the secondary colour. alias h { return $+($chr(3),12,$chr(2),$chr(2),$1-,$chr(3),$chr(2),$chr(2)) } alias hh { return $+($chr(3),14,$chr(2),$chr(2),$1-,$chr(3),$chr(2),$chr(2)) } Alias Tags { Return $+($hh([),$h($1-),$hh(]) $hh(—),$h(>),) } alias FML { if ($Sock(FML)) { SockClose FML } set %FMLOut $iif($1 = -s, msg $active, Echo -a) Sockopen FML rscript.org 80 } On *:SockOpen:FML: { Sockwrite -nt FML GET /lookup.php?type=fml SockWrite -nt FML Host: rscript.org SockWrite -nt FML $crlf } on *:SockRead:FML: { if ($SockErr) { SockClose FML | SockOpen FML rscript.org 80 } Var %FML SockRead %FML if ($Regex(%FML,ID:)) { set %FMLID $GetTok(%FML,2-,32) } if ($Regex(%FML,Cate:)) { set %FMLCate $GetTok(%FML,2-,32) } if ($Regex(%FML,Text:)) { set %FMLText $hh($GetTok(%FML,2-,32)) } if ($Regex(%FML,Agree:)) { set %FMLAggree $Bytes($GetTok(%FML,2-,32),bd) } if ($Regex(%FML,Deserved:)) { set %FMLDisaggree $Bytes($GetTok(%FML,2-,32),bd) } if ($Regex(%FML,Comments:)) { set %FMLComments $Bytes($GetTok(%FML,2-,32),bd) } if ($Regex(%FML,END)) { SockClose FML } if (!$Sock(FML)) { %FMLOut $Tags(FML) $hh(FML:) $h(%FMLText) %fmlout $Tags(FML) $hh(Information:) $hh(Agreed:) $h(%FMLAggree) $hh($(|)) $hh(Deserved) $h(%FMLDisaggree) $hh($(|)) $hh(Comments:) $h(%FMLComments) %FMLOut $Tags(FML) $hh(Link:) $h($+(,http://www.fmylife.com,/,%FMLCate,/,%FMLID,/,)) Unset %FML* } } alias eval { var %x = $ticks $iif( -a == $1,echo -a,msg $active) $remove(Eval $+(,$chr(40),,$1- == $iif($($1-,2) != $null,$v1,$!null),,$chr(41) $chr(40),,$calc($ticks - %x MS),,$chr(41))},-a) } dialog settings { title "Darkest settings" size -1 -1 110 100 option dbu tab "Base colors", 1, 5 5 100 90 tab "main settings", 2 tab "Addons", 3 button "Notice Pop up on", 19, 5 54 50 44, ok tab 1 button "Notice pop up off", 20, 55 54 50 44, ok tab 1 button "base colors on", 4, 5 20 50 34, ok tab 1 button "base colors off", 5, 55 20 50 34, ok tab 1 button "Strip messages on", 6, 5 20 50 24, tab 2 button "Strip messages off", 7, 55 20 50 24, tab 2 button "Highlight on", 8, 5 40 50 24, tab 2 button "Highlight off", 9, 55 40 50 24, tab 2 button "View highlights", 10, 5 62 100 34, tab 2 button "Grammer on", 11, 5 17 50 20, tab 3 button "Grammer off", 12, 55 17 50 20, tab 3 button "Rainbow text on", 13, 5 37 50 20, tab 3 button "Rainbow text off", 14, 55 37 50 20, tab 3 button "protection on", 15, 5 57 50 20, tab 3 button "Protection off", 16, 55 57 50 20, tab 3 button "mode setter on", 17, 5 75 50 20, tab 3 button "mode setter off", 18, 55 75 50 20, tab 3 } on *:dialog:settings:sclick:*: { if ( $did == 20 ) { writeini theme.ini settings popup off | echo -a When you get a notice it will now echo in your window. } if ( $did == 19 ) { writeini theme.ini settings popup on | echo -a When you get a notice it will now pop up :) } if ( $did == 18 ) { writeini theme.ini settings plus off echo -a Mode setter has been turned off } if ( $did == 17 ) { writeini theme.ini settings plus on echo -a Mode setter has been turned on, type +(mode) or -(mode) to use it. } if ( $did == 14 ) { coff } if ( $did == 15 ) { proon } if ( $did == 16 ) { prooff } if ( $did == 13 ) { con } if ( $did == 12 ) { gcoroff } if ( $did == 11 ) { gcoron } if ( $did == 10 ) { viewhl } if ( $did == 9 ) { hloff } if ( $did == 8 ) { hlon } if ( $did == 6 ) { writeini theme.ini settings strip on echo -a All incoming messages are now stripped. } if ( $did == 7 ) { writeini theme.ini settings strip off echo -a All incoming messages are no longer stripped. } if ( $did == 4 ) { colourso } if ( $did == 5 ) { coloursf } } alias gcoron { if (%rainbowtexton) { echo -a Rainbow text is already on | halt } echo -a Grammer correction has been turned on. writeini theme.ini settings grammercorrect on } alias gcoroff { if (%rainbowtexton) { echo -a Rainbow text is already on | halt } echo -a grammer correction has been turned off. writeini theme.ini settings grammercorrect off } alias con { if ( $readini(theme.ini, settings, grammercorrect) == on) { echo -a Grammer correction is already on | halt } echo -a $ac(Rainbow text has been turned on) unset %rainbowtextandbackgroundon | set %rainbowtexton 1 | echo -n Rainbow text turned on } alias coff { if ( $readini(theme.ini, settings, grammercorrect) == on) { echo -a Grammer correction is already on | halt } echo -a Rainbow text has been turned off unset %rainbowtexton | unset %rainbowtextandbackgroundon | echo -n Rainbow text turned off } alias mseton { echo -a mode setter has been turned on writeini theme.ini settings plus on } alias msetoff { echo -a mode setter has been turned off. writeini theme.ini settings plus off } alias hlon { writeini theme.ini settings highlight on echo -a Highlights have been turned on } alias hloff { writeini theme.ini settings highlight off echo -a highlights have been turned off } alias colourso { .timestamp -f 14(12hh14:12nn14:12ss14) .timestamp on .timestamp -g 14(12hh14:12nn14:12ss14) set %raw on echo -a Base colors have been turned on. } alias coloursf { .timestamp -f .timestamp on .timestamp -g set %raw off echo -a Base colors have been turned off. } alias proon { set %protection on echo -a Protection has been turned on. } alias prooff { set %protection off echo -a Protection has been turned off. } alias viewhl { if (!$read(hl.txt)) { write Hl.txt Highlight Logs. } var %x 1 window -c @highlight window -ad @Highlight while (%x < $calc($lines(hl.txt) + 1)) { $iif($len($Read(hl.txt, %x)) > 5,echo @Highlight $read(hl.txt, %x)) inc %x } } alias -l DVersion { return Darkest Script Version 3 - Mirc version $version } alias rawc { if ( %raw == on ) { noop } if ( %raw != on ) { halt } } alias Sha { who $1 return $iif($2,$address($1,$2),$iif($remove($iif($hget($network, $1),$v1,$iif($address($1,0),$v1,$hget(address, $1))),~) == *,$null,$remove($v1,~))) } raw 315:*: $iif(%ttraw,halt) raw 352:*: { if (!$hget($network)) { .hmake $network 100 } hadd $network $6 $3 $+ @ $+ $4 if ($hget(Address)) { hadd Address $6 $3 $+ @ $+ $4 } else .hmake address 1000 .timerASave 1 5 hsave address address.txt if (%ttraw) halt } raw 311:*:{ rawc echo -a 14«12« 12[15/14WHOIS12] 15Start 12»14» echo -a 14«12« 12 $+ $2 15 is 15 $+ $3 $+ 12@15 $+ $4 $5- 12»14» if (!$hget($network)) { .hmake $network 100 } hadd $network $2 $3 $+ @ $+ $4 if ($hget(Address)) { hadd Address $2 $3 $+ @ $+ $4 } else .hmake address 1000 halt } on *:INPUT:*: { if ($1 == /who ) { unset %ttraw | .timer 1 5 set %ttraw on } } raw 301:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ is away:14 $3- 12»14» | halt } raw 307:*:{ rawc | echo -a 14«12« 12 $+ $2 15is a registered user on14 $network 12»14» | halt } raw 312:*:{ rawc | echo -a 14«12« 12 $+ $2 15is on:14 $3 $12 12»14» | halt } raw 313:*:{ rawc | echo -a 14«12« 12 $+ $2 15is:14 $5- 12»14» | halt } raw 317:*:{ rawc | echo -a 14«12« 12 $+ $2 15is idling:14 $duration($3) 12»14» | halt } raw 319:*:{ rawc | echo -a 14«12« 12 $+ $2 15is on channels:14 $3- 12»14» | halt } raw 378:*:{ rawc | echo -a 14«12« 12 $+ $2 15is connecting from host:14 $6 12»14» | halt } raw 338:*:{ rawc | echo -a 14«12« 12 $+ $2 15is connecting from host:14 $3 12»14» | halt } raw 537:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt } raw 320:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt } raw 671:*:{ rawc | echo -a 14«12« 12 $+ $2 15is using a secure connection 12»14» | halt } raw 310:*:{ rawc | echo -a 14«12« 12 $+ $2 15 $+ $3- 12»14» | halt } raw 318:*:{ rawc | echo -a 14«12« 12[15/14WHOIS12] 14End 12»14» | halt } raw 329:*:{ haltdef } raw 439:*:{ echo Target Change Detected. Halt all messageing! | .timers off | halt } raw 474:*:{ if ( %raw == on ) { haltdef | echo $active ««Ë®®öR»» You are banned from $2 $+ . } } raw 972:*:{ if ( %raw == on ) { haltdef | echo $active ««Ë®®öR»» $2- } } raw 482:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» You do not have enough access. } } raw 404:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» $remove($1-,$me,$chan,) ) } } raw 421:*:{ if ( %raw == on ) { haltdef | echo -a ««Ë®®öR»» $2 - $3 command } } raw 332:*:{ if ( %raw == on ) { haltdef | echo $2 12{14-15-12 Topic is $2- 15-14-12} } } raw 335:*:{ if ( %raw == on ) { haltdef | echo -a 12{14-15-12 $2- 15-14-12} } } raw 313:*:{ if ( %raw == on ) { haltdef | echo -a 4*07*08*09*12*06 $2- 4*07*08*09*12*06 } } raw 372:*:{ if ( %raw == on ) { haltdef | echo $2- | .timerconnect 1 3 echo $active You have succesfully connected to the server via 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 12,1 12D12,14arkest 12S12,14cript 2,1|¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦ --- Made by Termz | .timercf 1 5 connection } } raw 301:*:{ if ( %raw == on ) { haltdef | echo -a 12{14-15-12 Away - $2- 15-14-12} } } raw 401:*:{ if ( %raw == on ) { haltdef | echo -a 11,0¦|0,11¦|12,11¦|11,12¦|2,12¦|12,2¦|1,2¦|2,1¦|11,1 $2 not found on server. 1¦1,2|¦12,2|¦2,12|¦11,12|¦12,11|¦0,11|¦11,0|¦ } }
-
Hi guys so i'm making a simple command line game, i've finished making a standard one, theres so much more to add but for now i'll show you what its like.
this is called the DUEL game:
Look at the pastebin to see what the game is like.
https://pastebin.com/ep0Dzhedat the moment the commands are:
[18:08:54] <~dronez4> !help
[18:08:55] [Duel Commands]
[18:08:55] !duel, !accept, !attack, !damage, !duelstatsi'll show you what each command does
[!duel]
[18:04:58] <~dronez4> !duel wallrunner
[18:04:59] [DUEL]: dronez4 has dueled wallrunner [Type !accept to accept dronez4's duel][!accept]
[18:05:02] !accept
[18:05:03] [DUEL]: wallrunner accepted dronez4's duel
[18:05:03] [Max Damage]: dronez4: 40 - wallrunner: 40
[18:05:03] [HP:200] - dronez4
[18:05:03] [HP:200] - wallrunner
[18:05:04] [DUEL]: dronez4's turn[!attack]
[18:05:14] <~dronez4> !attack wallrunner
[18:05:14] [ATTACK]: dronez4 hit 11 on wallrunner
[18:05:14] [HP:200] - dronez4
[18:05:14] [HP:189] - wallrunner
[18:05:14] [DUEL]: wallrunner's turn[!damage]
[18:11:41] <~dronez4> !damage dronez4
[18:11:42] [Damage Output]: Maximum amount of damage dronez4 has: [Damage: 40][!duelstats]
[18:12:26] <~dronez4> !duelstats dronez4
[18:12:27] [Duel Stats]: dronez4 - (Max damage: 40) (Total HP: 200) (Wins: ) (loses: )
[the wins/loses are empty if you have won/lost 0 games]I am currently in the stage of adding more features, way more features, feel free to give me any ideas? atm i've got a list
hp [DONE]
damage [DONE]
upgrades [DONE]
Round start - Round end [DONE]
Special power - skip [not sure about implimenting yet]
Store point system [Coming soon]
Stun [Coming soon]
Critical hit [coming soon]
Heal [Coming soon]
Protection spell [Coming soon];works for only 1 channel at the moment, so add a specific channel if need be. on *:text:*:#:{ if ($1 == !duel) && ($2 ison $chan) { if (%duel == on) { msg $chan 7[DUEL]: There's already a duel going on } else { msg $chan 7[DUEL]: $nick has dueled $2 [Type !accept to accept $nick $+ 's duel] set %duel on set %duelnick1 $nick set %duelnick2 $2 } } if ($1 == !accept) { if (%duel == on) { remini duelhp.ini hp %duelnick1 remini duelhp.ini hp %duelnick2 set %duelturn %duelnick1 set %duelnotturn %duelnick2 msg $chan 7[DUEL]: %duelnick2 accepted %duelnick1 $+ 's duel msg $chan 4[Max Damage]: %duelnick1 $+ :13 $calc($readini(duelstats.ini, stats, %duelnick1) + 40) 4- %duelnick2 $+ :13 $calc($readini(duelstats.ini, stats, %duelnick2) + 40) timer 1 2 msg $chan 7[DUEL]: %duelturn $+ 's turn if ($readini(addhp.ini, hp, %duelnick1) != $null) { timer 1 1 writeini duelhp.ini hp %duelnick1 $calc(200 + $readini(addhp.ini, hp, %duelnick1)) msg $chan 4[HP:13 $+ $calc(200 + $readini(addhp.ini, hp, %duelnick1)) $+ 4] - %duelnick1 } if ($readini(addhp.ini, hp, %duelnick2) != $null) { timer 1 1 writeini duelhp.ini hp %duelnick2 $calc(200 + $readini(addhp.ini, hp, %duelnick2)) msg $chan 4[HP:13 $+ $calc(200 + $readini(addhp.ini, hp, %duelnick2)) $+ 4] - %duelnick2 } if ($readini(duelhp.ini, hp, %duelnick1)) { msg $chan 4[HP:13 $+ $calc($readini(duelhp.ini, hp, %duelnick1) + $readini(addhp.ini, hp, %duelnick1)) $+ 4] - %duelnick1 } else { if ($readini(addhp.ini, hp, %duelnick1) == $null) { writeini duelhp.ini hp %duelnick1 200 msg $chan 4[HP:132004] - %duelnick1 } } if ($readini(duelhp.ini, hp, %duelnick2)) { msg $chan 4[HP:13 $+ $calc($readini(duelhp.ini, hp, %duelnick2) + $readini(addhp.ini, hp, %duelnick2)) $+ 4] - %duelnick2 } else { if ($readini(addhp.ini, hp, %duelnick2) == $null) { writeini duelhp.ini hp %duelnick2 200 msg $chan 4[HP:132004] - %duelnick2 } } } } if ($1 == !attack) { if (%duel == on) { if ($nick isin %duelturn) { set %randomhit $calc($rand(10,40) + $readini(duelstats.ini, stats, %duelturn)) if ($chr(45) isin $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit)) { set %prize $rand(1,5) set %prize1 $rand(1,7) set %duel off msg $chan 4[ATTACK]:9 %duelturn hit13 %randomhit 9on %duelnotturn writeini duelhp.ini hp %duelnotturn $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit) msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick1) $+ 4] - %duelnick1 msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick2) $+ 4] - %duelnick2 msg $chan 9[Winner]: %duelturn won the duel [Prize: Added %prize damage + %prize1 HP to %duelturn $+ 's statistic] writeini winsnlose.ini win %duelturn $calc($readini(winsnlose.ini, win, %duelturn) + 1) writeini winsnlose.ini lose %duelnotturn $calc($readini(winsnlose.ini, win, %duelnotturn) + 1) remini duelhp.ini hp %duelnick1 remini duelhp.ini hp %duelnick2 if ($readini(addhp.ini, hp, %duelturn) == $null) { writeini addhp.ini hp %duelturn %prize1 } else { writeini addhp.ini hp %duelturn $calc($readini(addhp.ini, hp, %duelturn) + %prize1) } if ($readini(duelstats.ini, stats, %duelturn) != $null) { writeini duelstats.ini stats %duelturn $calc($readini(duelstats.ini, stats, %duelturn) + %prize) halt } else { writeini duelstats.ini stats %duelturn %prize halt } } msg $chan 4[ATTACK]:9 %duelturn hit13 %randomhit 9on %duelnotturn writeini duelhp.ini hp %duelnotturn $calc($readini(duelhp.ini, hp, %duelnotturn) - %randomhit) msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick1) $+ 4] - %duelnick1 msg $chan 4[HP:13 $+ $readini(duelhp.ini, hp, %duelnick2) $+ 4] - %duelnick2 set %duelnotturn1 %duelnotturn set %duelnotturn %duelturn set %duelturn %duelnotturn1 msg $chan 7[DUEL]: %duelturn $+ 's turn } else { msg $chan 7[DUEL]: It is %duelturn $+ 's turn } } } if ($1 == !damage) && ($2 == $null) { msg $chan 9[Damage Output]: Maximum amount of damage $nick has: [Damage:13 $calc($readini(duelstats.ini, stats, $nick) + 40) $+ 9] } if ($1 == !damage) && ($2 != $null) { msg $chan 9[Damage Output]: Maximum amount of damage $2 has: [Damage:13 $calc($readini(duelstats.ini, stats, $2) + 40) $+ 9] } if ($1 == !duelstats) { if ($2 != $null) { msg $chan 9[Duel Stats]: $2 - (Max damage:13 $calc($readini(duelstats.ini, stats, $2) + 40) $+ 9) (Total HP:13 $calc($readini(addhp.ini, hp, $2) + 200) $+ 9) 9(Wins:13 $readini(winsnlose.ini, win, $2) $+ 9) 9(loses:13 $readini(winsnlose.ini, lose, $2) $+ 9) } else { msg $chan 9[Duel Stats]: $nick - (Max damage:13 $calc($readini(duelstats.ini, stats, $nick) + 40) $+ 9) (Total HP:13 $calc($readini(addhp.ini, hp, $nick) + 200) $+ 9) 9(Wins:13 $readini(winsnlose.ini, win, $nick) $+ 9) 9(loses:13 $readini(winsnlose.ini, lose, $nick) $+ 9) } } if ($1 == !help) { msg $chan [Duel Commands] msg $chan !duel, !accept, !attack, !damage, !duelstats } }
-
That Is Dialog Of /whois command
Again Write /whois nick and you will see the whois dialog
The IP Adress,Modes Is For The IRCOPS.Some Time Host Can Show The IPadress of nick
Auth is For GameSurge.Reg is for Check the nick is registered nick or no
And HelpOp Shows The NickName is HelpOp or no#whois on dialog whois { title "Whois" size -1 -1 131 113 option dbu text "NickName:", 1, 4 4 27 8 text "RealName:", 2, 4 13 25 8 text "Identy:", 3, 4 22 25 8 text "Host:", 4, 4 31 25 8 text "IP Address:", 21, 4 40 31 8 text "Auth or Reg:", 20, 4 58 31 8 text "Channels:", 5, 4 67 25 8 text "Away:", 6, 4 76 25 8 text "Idle:", 24, 4 85 25 8 text "Other:", 7, 4 94 32 8 text "Modes:", 22, 4 49 31 8 text "HelpOp:", 23, 4 103 32 8 edit "", 8, 36 3 94 9, read autohs edit "", 9, 36 12 94 9, read autohs edit "", 10, 36 21 94 9, read autohs edit "", 11, 36 30 94 9, read autohs edit "", 12, 36 66 94 9, read autohs edit "", 13, 36 75 94 9, read autohs edit "", 14, 36 84 94 9, read autohs edit "", 15, 36 93 94 9, read autohs edit "", 16, 36 57 94 9, read autohs edit "", 17, 36 39 94 9, read autohs edit "", 18, 36 48 94 9, read autohs edit "", 19, 36 102 94 9, read autohs } raw *:*: { if ( $numeric == 311 ) { set %d $2 dialog -m %d whois dialog -t %d Whois $2 $+ ? did -a %d 8 $2 did -a %d 9 $6- did -a %d 10 $3 did -a %d 11 $4 halt } if ( $numeric == 307 ) { if ( a registered nick isin $1- ) { did -a %d 16 Yes halt } } if ( $numeric == 378 ) { did -a %d 17 $6- halt } if ( $numeric == 379 ) { did -a %d 18 $6- halt } if ( $numeric == 330 ) { did -a %d 16 $3 halt } if ( $numeric == 319 ) { did -a %d 12 $3- halt } if ( $numeric == 301 ) { did -a %d 13 $3- halt } if ( $numeric == 313 ) { did -a %d 15 $3- did -a %d 7 $2 halt } if ( $numeric == 317 ) { did -a %d 14 $duration($3) halt } if ( $numeric == 310 ) { if ( help isin $1- ) { did -a %d 19 Yes halt } } if ( $numeric == 318 ) { halt } if ( $numeric == 312 ) { halt } } #whois end menu * { Whois Dialog .$iif($group(#whois).status == on,$style(1)) ON: .enable #whois | linesep | echo 3 -ag * Whois Dialog Has Been Enabled | linesep .$iif($group(#whois).status == off,$style(1)) OFF: .disable #whois | linesep | echo 2 -ag * Whois Dialog Has Been Disabled | linesep }
-
Just another socket from me ;x this one looks up a random tweet from twasted tweets.
copy/paste into a new remote. Trigger is @twasted or @twastMay not be right for +G rated channels
As always rip strip this snippet how ever you see fit. I can care less.
ex:
<~napa182> @twasted
<&Sick0> TwastedTweets: RT @AdInsanitum Well, what would YOU have made out of these Scrabble tiles? CSUMHOT... Last time I play board games with kids at the Y again<~napa182> @twasted
<&Sick0> TwastedTweets: RT @rsmallbone My erection lasted for 4 hours +. I called my doctor but he didnt seem too impressed so I showed it to some ppl at the mall<~napa182> @twast
<&Sick0> TwastedTweets: RT @shariv67 The most tedious part of being an Afghani phone sex operator is describing what I'm wearing.<~napa182> @twast
<&Sick0> TwastedTweets: RT @ruthakers Man at Walmart asked me the name of "Mommys Lil Helpers". Judging by his face "Xanax & Vodka" wasnt the reply he was looking 4on $*:text:/^@(twast(ed)?)$/iS:#: { if (!$($+(%,f,#),2)) { inc -u4 $+(%,f,#) if ($sock($+(Twast,#))) sockclose $+(Twast,#) sockopen $+(Twast,#) api.twitter.com 80 sockmark $+(Twast,#) $r(1,20) $& $+(/1/statuses/user_timeline/TwastedTweets.rss?page=,$r(1,26)) msg # } } on *:sockopen:Twast*: { sockwrite -nt $sockname GET $gettok($sock($sockname).mark,2,32) HTTP/1.1 sockwrite -nt $sockname Host: $+($sock($sockname).addr,$str($crlf,2)) } on *:load:{ echo 12 -a You Have Just Loaded Napa182's Twasted Tweets Snippet echo -a 08!!04WARNING08 This snippet may04/08will say curse04/08foul words 04WARNING08!! } alias -l twast return $regsubex($1-,/("|&)|\46\43(\d+)\73/g,$iif(\1 isnum,$chr(\1),$iif(\1 = ",",&))) on *:sockread:Twast*: { var %Twast | sockread %Twast if ($regex(%Twast,/<title>(Twa.+?)<\/title>/)) { inc -u4 %tw 1 if (%tw = $gettok($sock($sockname).mark,1,32)) { $gettok($sock($sockname).mark,3-,32) $twast($regml(1)) sockclose $sockname } } }
-
- Copy the code below and paste into an empty Remote file in mIRC (alt+r to view Remotes)
- Click ok, and either right click anywhere in a channel or type /autoreply
- Follow the instructions in the dialog and create your own custom auto-response message!
I hang out in #script on Gamesurge and by far the most common question (especially recently) is "how do I set up a query auto response?". I know that when I was starting out scripting I was much more comfortable with dialogs as they ease the process and make it more understandable (at least for me), so I thought it would be useful to create this. Obviously many of this site's frequenters won't have any use for it, but it's made for people who are either new to scripting or can't script at all.
Thank you to FordLawnMower for the (http://www.hawkee.com/snippet/6047/) which I borrowed (and slightly modified) due to mIRC not allowing you to open up the color dialog any way other than control+k
As somebody who has never used an auto-reply myself I didn't know exactly what would be best for this dialog, so if anyone has a suggestion on what I could add/remove please let me know! Thanks!//Auto-reply creator dialog by tv3636 //Version 1.0 7/26/09 alias autoreply { dialog -m autoreply autoreply } menu channel { Auto-Reply Creator .Auto-Reply Creator:/autoreply } dialog autoreply { title "Auto Reply Creator" size -1 -1 195 175 option dbu edit "", 1, 1 97 192 38, multi return button "Done", 3, 76 160 37 12, ok cancel text "Type your desired auto-reply in the text box below. To wrap a section in bold, color, underline, or reverse text simply check the box at the beginning of the section and uncheck it at the end. On top of the text box is a list of common identifiers you may want to use. These are dynamic and will return values rather than being displayed as they are. For instance, the auto-reply 'Hi $nick' would auto reply to Chanserv with 'Hi Chanserv'. To insert an identifier simply double click on it (or manually enter it). Be warned that an identifier must have a space before and after it to evaluate correctly.", 4, 5 2 186 54 list 6, 1 56 193 39, size check "Bold", 7, 20 137 24 10 check "Color", 8, 56 137 24 10 check "Underline", 9, 94 137 34 10 check "Reverse", 10, 145 137 30 10 } On *:Dialog:autoreply:init:*: { did -a $dname 6 $!nick - Returns the nickname of the user who messaged you did -a $dname 6 $!query(0) - Returns the number of query windows you have open did -a $dname 6 $!duration($idle) - Returns the time you have been idle did -a $dname 6 $!awaymsg - Returns your away message did -a $dname 6 $!awaytime - Returns your away time } On *:Dialog:autoreply:dclick:6: { if ($did($dname,6).sel == 1) did -a $dname 1 $!nick else if ($did($dname,6).sel == 2) did -a $dname 1 $!query(0) else if ($did($dname,6).sel == 3) did -a $dname 1 $!duration($idle) else if ($did($dname,6).sel == 4) did -a $dname 1 $!awaymsg else if ($did($dname,6).sel == 5) did -a $dname 1 $!awaytime } On *:Dialog:autoreply:sclick:*:{ if ($did == 7) did -a $dname 1 else if ($did == 8) { if ($did($dname,8).state == 0) did -a $dname 1 else { ColorPicker } } else if ($did == 9) did -a $dname 1 else if ($did == 10) did -a $dname 1 } On *:Dialog:autoreply:close:*: { var %x = 1 var %out write -c autoreply.mrc On *:Open:?:*: $chr(123) while (%x <= $did($dname,1).lines) { write autoreply.mrc msg $!nick $did($dname,1,%x) | inc %x } write autoreply.mrc $chr(125) load -rs autoreply.mrc echo -a 07Auto-reply created successfully. To view/modify go to the Remotes tab of the mIRC scripts editor (alt+r), click on view, and select "autoreply.mrc" } alias -l MakeColorIcons { var %c 0 if (!$isdir($+($mircdir,ColorIcon))) { mkdir ColorIcon } while (%c <= 15) { if (!$window(@MakeColorIcons)) { window -hBpf +d @MakeColorIcons -1 -1 68 68 } drawfill @MakeColorIcons %c %c 0 0 68 68 if (!$isfile($+(ColorIcon\,ColorIcon,%c,.bmp))) { drawsave @MakeColorIcons $qt($+($mircdir,ColorIcon\,ColorIcon,%c,.bmp)) } inc %c } window -c @MakeColorIcons } alias ColorPicker { if (!$dialog(ColorPicker)) { dialog -m ColorPicker ColorPicker } else { dialog -v ColorPicker ColorPicker } } dialog ColorPicker { title "Color Picker" size -1 -1 90 45 option dbu icon 1, 2 2 8 8 icon 2, 13 2 8 8 icon 3, 24 2 8 8 icon 4, 35 2 8 8 icon 5, 46 2 8 8 icon 6, 57 2 8 8 icon 7, 68 2 8 8 icon 8, 79 2 8 8 icon 9, 2 15 8 8 icon 10, 13 15 8 8 icon 11, 24 15 8 8 icon 12, 35 15 8 8 icon 13, 46 15 8 8 icon 14, 57 15 8 8 icon 15, 68 15 8 8 icon 16, 79 15 8 8 button "", 17, 4 4 4 4 button "", 18, 15 4 4 4 button "", 19, 26 4 4 4 button "", 20, 37 4 4 4 button "", 21, 48 4 4 4 button "", 22, 59 4 4 4 button "", 23, 70 4 4 4 button "", 24, 81 4 4 4 button "", 25, 4 17 4 4 button "", 26, 15 17 4 4 button "", 27, 26 17 4 4 button "", 28, 37 17 4 4 button "", 29, 48 17 4 4 button "", 30, 59 17 4 4 button "", 31, 70 17 4 4 button "", 32, 81 17 4 4 button "Accept", 38, 30 30 29 12, ok } On *:Dialog:ColorPicker:Close:*: { unset %ColorPicker* } On *:Dialog:ColorPicker:Sclick:*: { if ($did >= 17) && ($did <= 32) { set %ColorPickerNum $calc($did - 17) } if ($did == 38) { did -a autoreply 1 $+ %ColorPickerNum } } On *:Dialog:ColorPicker:init:*: { MakeColorIcons var %c = 0 while %c <= 15 { did -g ColorPicker $calc(%c + 1) $+(ColorIcon\,ColorIcon,%c,.bmp) inc %c } did -c ColorPicker 35 set %ColorPickerFG $color(normal text) set %ColorPickerBG $color(background) }
-
So im getting a lot of the old snippets from hawkee's and never knew there was so many, but im going fourth and continue to move forward and add more and more each day. I really havent counted as to how many snippets have been added on hawkee but this i can tell you i will have all of them on coders-resources so we dont loose them all. we will have a huge range of archive snippets and scripts and continue to do so!!
I will continue to keep you all posted and continue to add more and more 👍
-
1
-
-
mIRC Kicking Clones Games for Server Zildjan.mine.nu:6667 by Team SpiralKinetics.
A simple mIRC code intended to kick clones. Summary of the games detailed in the code dialog.;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] menu status,menubar,channel { - Spiralkinetics™ Dual Mode:/dialog $iif($dialog(dualmode),-o,-m) dualmode dualmode Spiralkinetics™ MassJoin Clear cloneMJ.TXT:/write -c cloneMJ.txt Spiralkinetics™ Flood Clear cloneFL.TXT:/write -c cloneFL.txt - } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] dialog dualmode { title "SpiralKinetics Dual Mode Sock Configuration" size -1 -1 210 180 option dbu ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "Intro", 1, 5 2 200 150, box "", 10, 10 15 190 135 text "Script: SpiralKinetics Dual Mode", 11, 15 20 180 10, tab 1 enable text "Coder: Sabri", 12, 15 27 180 10, tab 1 enable text "Tester: ItikRock, Ahseng, Cloud, Kereei and m11x", 13, 15 34 180 10, tab 1 enable text "Disclaimer: This code belong to Team SpiralKinetics and we just lend it to whoever wish to use it.", 14, 15 41 180 20, tab 1 enable text "Advisor: Bioshock and zildjan", 77, 15 59 180 10, tab 1 enable text "Applications: Flooding and MassJoin Games at Server Zildjan.mine.nu:6667", 15, 15 65 180 10, tab 1 enable text "Channel: Flooding #FLOOD / MassJoin #BIRC", 78, 15 72 180 10, tab 1 enable text "Games Summary:-", 16, 15 82 180 10, tab 1 enable text "Flood - (#FLOOD) Basic understanding are kicking clone on syntax error display on channel by each clone such as Long text etc.", 17, 15 90 180 20, tab 1 enable text "MassJoin - (#BIRC) Basic understanding are kicking all join clone.", 18, 15 104 180 10, tab 1 enable text "Team: SpiralKinetics Establish in 2010.", 19, 15 115 180 10, tab 1 enable text "Team members comprise of: Bioshock (Founder) and Senior Members: Sabri, ItikRock, Kereei, Ahseng, Cloud and m11x", 20, 15 122 180 15, tab 1 enable text "Like Us:", 21, 15 140 20 10, tab 1 enable link "FaceBook Page: SpiralKinetics Productions", 22, 35 140 130 15, tab 1 enable ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "MassJoin", 2, 5 2 170 130 box "MassJoin Configuration", 4, 15 20 180 125, tab 2 box "Groups", 23, 20 30 170 20, tab 2 text "Enable/Disable MassJoin Remote Groups:", 24, 25 38 99 10, enable tab 2 radio "Enable", 25, 127 36 25 10, left tab 2 box "", 26, 155 32 2 16, tab 2 radio "Disable", 27, 160 36 25 10, tab 2 box "Set Nick/Pass Sock`s", 28, 20 53 70 50, tab 2 text "Nick:", 29, 25 63 13 10, tab 2 edit "", 30, 40 63 45 10, center autohs tab 2 text "Pass:", 31, 25 78 13 10, tab 2 edit "", 32, 40 78 45 10, center pass autohs, tab 2 button "Set Nick/Pass", 33, 32 90 45 10, disable tab 2 box "", 34, 95 50 95 50, tab 2 text "Add Server eg.", 35, 125 55 40 10, tab 2 text "Zildjan.mine.nu PORT: 6667", 36, 109 62 68 10, tab 2 edit "", 37, 100 71 85 10, center autohs tab 2 edit "", 38, 118 85 25 10, center autohs tab 2 text "PORT:", 39, 100 86 15 10, tab 2 button "Add Server", 40, 146 85 40 10, disable tab 2 box "Set Channel e. #birc", 41, 20 105 63 37, tab 2 edit "", 42, 29 115 45 10, center autohs tab 2 button "Add Chan", 43, 32 128 40 10, disable tab 2 text "ON/OFF Your Sock`s", 44, 110 102 60 10, tab 2 button "Connect", 45, 95 112 40 15, tab 2 button "Disconnect", 46, 140 112 40 15, tab 2 text "Clear all MassJoin Setting:", 47, 85 132 70 10, tab 2 button "¤ Clear All ¤", 48, 152 130 40 12, tab 2 ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "Flood", 3, 5 2 170 130 box "Flood Configuration", 5, 15 20 180 125, tab 3 box "Groups", 49, 20 30 170 20, tab 3 text "Enable/Disable Flood Remote Groups:", 50, 25 38 99 10, enable tab 3 radio "Enable", 51, 127 36 25 10, left tab 3 box "", 52, 155 32 2 16, tab 3 radio "Disable", 53, 160 36 25 10, tab 3 box "Set Nick/Pass Sock`s", 54, 20 53 70 50, tab 3 text "Nick:", 55, 25 63 13 10, tab 3 edit "", 56, 40 63 45 10, center autohs tab 3 text "Pass:", 57, 25 78 13 10, tab 3 edit "", 58, 40 78 45 10, center pass autohs, tab 3 button "Set Nick/Pass", 59, 32 90 45 10, disable tab 3 box "", 60, 95 50 95 50, tab 3 text "Add Server eg.", 61, 125 55 40 10, tab 3 text "Zildjan.mine.nu PORT: 6667", 62, 109 62 68 10, tab 3 edit "", 63, 100 71 85 10, center autohs tab 3 edit "", 64, 118 85 25 10, center autohs tab 3 text "PORT:", 65, 100 86 15 10, tab 3 button "Add Server", 66, 146 85 40 10, disable tab 3 box "Set Channel e. #flood", 67, 20 105 63 37, tab 3 edit "", 68, 29 115 45 10, center autohs tab 3 button "Add Chan", 69, 32 128 40 10, disable tab 3 text "ON/OFF Your Sock`s", 70, 110 102 60 10, tab 3 button "Connect", 71, 95 112 40 15, tab 3 button "Disconnect", 72, 140 112 40 15, tab 3 text "Clear all Flood Setting:", 73, 85 132 70 10, tab 3 button "¤ Clear All ¤", 74, 152 130 40 12, tab 3 ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "Timing", 79, 5 2 170 130 box "MassJoin Timer/Isnum Tune", 80, 13 20 184 62, tab 79 box "Flood Timer/Isnum Tune", 81, 13 85 184 62, tab 79 text "Default setting isnum is 467-487 and larger than > 497. Isnum: Setting must be in different between 20 - 22 lines. i.e:min-100-120, max-100-122. Larger than that may cause you excessing. Delay: Setting must be in different of 10 lines after direct isnum last line. i.e if direct isnum 100-120 you may set your starting delay line: 130. Try default setting.", 82, 15 28 180 33, enable tab 79 button "Use Default Setting", 83, 15 66 55 10, tab 79 box "", 84, 73 60 121 20, tab 79 text "Isnum:", 85, 75 67 17 10, tab 79 edit "", 86, 93 66 28 10, center autohs tab 79 text ">", 87, 123 67 4 10, tab 79 edit "", 88, 130 66 15 10, center autohs tab 79 button "Use My Own", 89, 150 66 40 10, disable tab 79 text "Same as MassJoin. Default setting isnum is 367-387 and larger than > 397. Isnum: Setting must be in different between 20 - 22 lines. i.e:min-100-120, max-100-122. Larger than that may cause you excessing. Delay: Setting must be in different of 10 lines after direct isnum last line. i.e if direct isnum 100-120 you may set your starting delay line: 130. Try default setting.", 90, 15 93 180 33, enable tab 79 button "Use Default Setting", 91, 15 131 55 10, tab 79 box "", 92, 73 125 121 20, tab 79 text "Isnum:", 93, 75 132 17 10, tab 79 edit "", 94, 93 131 28 10, center autohs tab 79 text ">", 95, 123 132 4 10, tab 79 edit "", 96, 130 131 15 10, center autohs tab 79 button "Use My Own", 97, 150 131 40 10, disable tab 79 ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] tab "Logo", 100, 5 2 170 130 box "MassJoin Logo Setting", 98, 13 20 184 62, tab 100 box "Flood Logo Setting", 99, 13 85 184 62, tab 100 box "", 101, 30 50 150 1, tab 100 box "", 102, 30 115 150 1, tab 100 text "`` Dûä£ Mødè Mässjøíñ :: «®¤Šþì®á£Kïnè†í犙¤®»", 103, 15 29 180 10, center tab 100 button "Use Default Logo", 104, 32 37 60 10, tab 100 button "View/Echo", 105, 118 37 60 10, tab 100 edit "", 106, 16 55 178 10, autohs tab 100 button "View/Echo", 107, 20 68 50 10, tab 100 button "Use My Own", 108, 80 68 50 10, tab 100 button "Clear", 109, 140 68 50 10, tab 100 text "`` Dûä£ Mødè F£øød :: «®¤Šþì®á£Kïnè†í犙¤®»", 110, 15 94 180 10, center tab 100 button "Use Default Logo", 111, 23 102 60 10, tab 100 button "View/Echo", 112, 127 102 60 10, tab 100 edit "", 113, 16 120 178 10, autohs tab 100 button "View/Echo", 114, 20 133 50 10, tab 100 button "Use My Own", 115, 80 133 50 10, tab 100 button "Clear", 116, 140 133 50 10, tab 100 ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tab "Halting", 200, 5 2 170 130 box "MassJoin Channel", 117, 13 20 90 127, tab 200 check " MODE OP : ", 118, 62 30 37 10, left tab 200 check " MODE DEOP : ", 119, 49 45 43 10, left tab 200 check " JOIN : ", 120, 73 60 26 10, left tab 200 check " PART : ", 121, 65 75 27 10, left tab 200 check " BAN : ", 122, 75 90 24 10, left tab 200 check " UNBAN : ", 123, 61 105 31 10, left tab 200 check " KICK : ", 124, 74 120 25 10, left tab 200 text "To halt, set channel at MassJoin Tab. ie. #BIRC", 133, 16 130 80 20, center tab 200 box "Flood Channel", 125, 107 20 90 127, tab 200 check " : MODE OP ", 126, 116 30 83 10, tab 200 check " : MODE DEOP ", 127, 110 45 83 10, tab 200 check " : JOIN ", 128, 116 60 83 10, tab 200 check " : PART ", 129, 110 75 83 10, tab 200 check " : BAN ", 130, 116 90 83 10, tab 200 check " : UNBAN ", 131, 110 105 83 10, tab 200 check " : KICK ", 132, 116 120 83 10, tab 200 text "To halt, set channel at Flood Tab. ie. #FLOOD", 134, 110 130 80 20, center tab 200 ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] text "«®¤b£áçkŠKŠè®ìès¤®» :: «®¤Šþì®á£Kïnè†í犙¤®»", 75, 8 162 135 10, disable button "«®¤ CLOSE ¤®»", 76, 150 159 55 14, ok } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] on 1:dialog:dualmode:*:*:{ if ($devent == edit) { if ($did == 30) { did -e $dname 33 } if ($did == 37) || ($did == 38) { did -e $dname 40 } if ($did == 42) { did -e $dname 43 } if ($did == 56) { did -e $dname 59 } if ($did == 63) || ($did == 64) { did -e $dname 66 } if ($did == 68) { did -e $dname 69 } if ($did == 86) || ($did == 88) { did -e $dname 89 } if ($did == 94) || ($did == 96) { did -e $dname 97 } } if ($devent == init) { if ($group(#mjdialog) == on) { did -c $dname 25 } if ($group(#mjdialog) == off) { did -c $dname 27 } if ($group(#flooddialog) == on) { did -c $dname 51 } if ($group(#flooddialog) == off) { did -c $dname 53 } if (%MJsocknick) || (%MJpasssock) || (%MJserver) || (%MJport) || (%MJchan) || (%MJisnum) || (%MJafter) || (%MJlogo) { did -a $dname 30 %MJsocknick did -a $dname 32 %MJpassnick did -a $dname 37 %MJserver did -a $dname 38 %MJport did -a $dname 42 %MJchan did -a $dname 86 %MJisnum did -a $dname 88 %MJafter did -a $dname 106 %MJlogo } if (%FLsocknick) || (%FLpasssock) || (%FLserver) || (%FLport) || (%FLchan) || (%FLisnum) || (%FLafter) || (%FLlogo) { did -a $dname 56 %FLsocknick did -a $dname 58 %FLpassnick did -a $dname 63 %FLserver did -a $dname 64 %FLport did -a $dname 68 %FLchan did -a $dname 94 %FLisnum did -a $dname 96 %FLafter did -a $dname 113 %FLlogo } if ($group(#mjophalt) == on) { did -c $dname 118 } if ($group(#mjophalt) == off) { did -u $dname 118 } if ($group(#mjdeophalt) == on) { did -c $dname 119 } if ($group(#mjdeophalt) == off) { did -u $dname 119 } if ($group(#mjjoinhalt) == on) { did -c $dname 120 } if ($group(#mjjoinhalt) == off) { did -u $dname 120 } if ($group(#mjparthalt) == on) { did -c $dname 121 } if ($group(#mjparthalt) == off) { did -u $dname 121 } if ($group(#mjbanhalt) == on) { did -c $dname 122 } if ($group(#mjbanhalt) == off) { did -u $dname 122 } if ($group(#mjunbanhalt) == on) { did -c $dname 123 } if ($group(#mjunbanhalt) == off) { did -u $dname 123 } if ($group(#mjkickhalt) == on) { did -c $dname 124 } if ($group(#mjkickhalt) == off) { did -u $dname 124 } if ($group(#flophalt) == on) { did -c $dname 126 } if ($group(#flophalt) == off) { did -u $dname 126 } if ($group(#fldeophalt) == on) { did -c $dname 127 } if ($group(#fldeophalt) == off) { did -u $dname 127 } if ($group(#fljoinhalt) == on) { did -c $dname 128 } if ($group(#fljoinhalt) == off) { did -u $dname 128 } if ($group(#flparthalt) == on) { did -c $dname 129 } if ($group(#flparthalt) == off) { did -u $dname 129 } if ($group(#flbanhalt) == on) { did -c $dname 130 } if ($group(#flbanhalt) == off) { did -u $dname 130 } if ($group(#flunbanhalt) == on) { did -c $dname 131 } if ($group(#flunbanhalt) == off) { did -u $dname 131 } if ($group(#flkickhalt) == on) { did -c $dname 132 } if ($group(#flkickhalt) == off) { did -u $dname 132 } } if ($devent == sclick) { if ($did == 25) { if ($did(25).state == 0) { enable #mjdialog } if ($did(25).state == 1) { did -c $dname 25 | enable #mjdialog | .auser MJbot bot-bircX-03 } } if ($did == 27) { if ($did(27).state == 0) { disable #mjdialog } if ($did(27).state == 1) { did -c $dname 27 | disable #mjdialog | .flush MJbot } } if ($did == 51) { if ($did(51).state == 0) { enable #flooddialog } if ($did(51).state == 1) { did -c $dname 51 | enable #flooddialog } } if ($did == 53) { if ($did(53).state == 0) { disable #flooddialog } if ($did(53).state == 1) { did -c $dname 53 | disable #flooddialog } } if ($did == 33) { set %MJsocknick $did(30) set %MJpassnick $did(32) } if ($did == 40) { set %MJserver $did(37) set %MJport $did(38) } if ($did == 43) { set %MJchan $did(42) } if ($did == 48) { did -r $dname 30,32 did -r $dname 37,38 did -r $dname 42 did -b $dname 33,40,43 disable #MJdialog did -c $dname 27 did -u $dname 25 flush MJbot unset %MJsocknick %MJpassnick unset %MJserver %MJport %MJchan } if ($did == 45) { .sockopen MJ_* %MJserver %MJport | .notify %MJsocknick } if ($did == 46) { .sockwrite -n MJ_* quit | .sockclose MJ_* | .notify %MJsocknick } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] if ($did == 59) { set %FLsocknick $did(56) set %FLpassnick $did(58) } if ($did == 66) { set %FLserver $did(63) set %FLport $did(64) } if ($did == 69) { set %FLchan $did(68) } if ($did == 74) { did -r $dname 56,58 did -r $dname 63,64 did -r $dname 68 did -b $dname 59,66,69 disable #flooddialog did -c $dname 53 did -u $dname 51 unset %FLsocknick %FLpassnick unset %FLserver %FLport %FLchan } if ($did == 71) { .sockopen FL_* %FLserver %FLport | .notify %FLsocknick } if ($did == 72) { sockwrite -n FL_* quit | .sockclose FL_* | .notify %FLsocknick } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] if ($did == 83) { set %MJisnum 467-487 set %MJafter 497 did -b $dname 83 did -e $dname 89 } if ($did == 89) { set %MJisnum $did(86) set %MJafter $did(88) did -b $dname 89 did -e $dname 83 } if ($did == 91) { set %FLisnum 367-387 set %FLafter 397 did -b $dname 91 did -e $dname 97 } if ($did == 97) { set %FLisnum $did(94) set %FLafter $did(96) did -b $dname 97 did -e $dname 91 } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] if ($did == 104) { did -b $dname 104 | set %MJlogo `` 14D15ûä14£ M15ød14è Mä15ssjø14íñ :: 14«15®14¤14,1Šþì®15á£14Kï15nè14†íçŠ15™14¤15®14» } if ($did == 105) { set %MJlogoview `` 14D15ûä14£ M15ød14è Mä15ssjø14íñ :: 14«15®14¤14,1Šþì®15á£14Kï15nè14†íçŠ15™14¤15®14» echo -at echo -at NickClone was kicked by You ( $+ %MJlogoview $+ ) echo -at unset %MJlogoview } if ($did == 107) { set %logoview $did(106) echo -at echo -at NickClone was kicked by You ( $+ %logoview $+ ) echo -at unset %logoview } if ($did == 108) { did -b $dname 108 | set %MJlogo $did(106) } if ($did == 109) { did -r $dname 106 } if ($did == 111) { set %FLlogo `` 14D15ûä14£ M15ød14è F15£øø14d :: 14«15®14¤14,1Šþì®15á£14Kï15nè14†íçŠ15™14¤15®14» } if ($did == 112) { set %FLlogoview `` 14D15ûä14£ M15ød14è F15£øø14d :: 14«15®14¤14,1Šþì®15á£14Kï15nè14†íçŠ15™14¤15®14» echo -at echo -at NickClone was kicked by You (» Swearing » %FLlogoview $+ ) echo -at unset %FLlogoview } if ($did == 114) { set %logoview $did(113) echo -at echo -at NickClone was kicked by You (» Swearing » %logoview $+ ) echo -at unset %logoview } if ($did == 115) { did -b $dname 115 | set %FLlogo $did(113) } if ($did == 116) { did -r $dname 113 } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] if ($did == 118) { if ($did(118).state == 0) { disable #mjophalt } if ($did(118).state == 1) { enable #mjophalt } } if ($did == 119) { if ($did(119).state == 0) { disable #mjdeophalt } if ($did(119).state == 1) { enable #mjdeophalt } } if ($did == 120) { if ($did(120).state == 0) { disable #mjjoinhalt } if ($did(120).state == 1) { enable #mjjoinhalt } } if ($did == 121) { if ($did(121).state == 0) { disable #mjparthalt } if ($did(121).state == 1) { enable #mjparthalt } } if ($did == 122) { if ($did(122).state == 0) { disable #mjbanhalt } if ($did(122).state == 1) { enable #mjbanhalt } } if ($did == 123) { if ($did(123).state == 0) { disable #mjunbanhalt } if ($did(123).state == 1) { enable #mjunbanhalt } } if ($did == 124) { if ($did(124).state == 0) { disable #mjkickhalt } if ($did(124).state == 1) { enable #mjkickhalt } } if ($did == 126) { if ($did(126).state == 0) { disable #flophalt } if ($did(126).state == 1) { enable #flophalt } } if ($did == 127) { if ($did(127).state == 0) { disable #fldeophalt } if ($did(127).state == 1) { enable #fldeophalt } } if ($did == 128) { if ($did(128).state == 0) { disable #fljoinhalt } if ($did(128).state == 1) { enable #fljoinhalt } } if ($did == 129) { if ($did(129).state == 0) { disable #flparthalt } if ($did(129).state == 1) { enable #flparthalt } } if ($did == 130) { if ($did(130).state == 0) { disable #flbanhalt } if ($did(130).state == 1) { enable #flbanhalt } } if ($did == 131) { if ($did(131).state == 0) { disable #flunbanhalt } if ($did(131).state == 1) { enable #flunbanhalt } } if ($did == 132) { if ($did(132).state == 0) { disable #flkickhalt } if ($did(132).state == 1) { enable #flkickhalt } } } if ($devent == dclick) { if ($did == 22) { /run https://www.facebook.com/spiralkineticsproductions } } } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] on *:SOCKCLOSE:MJ_*: { sockclose MJ_* | timersock 1 2 .sockopen MJ_* %MJserver %MJport } on *:SOCKOPEN:MJ_*: { if ($sockerr != 0) { halt } if ($sockerr > 0) return sockwrite -nt MJ_* connect $+ %MJserver $+ : $+ %MJport $+ / HTTP/1.0 $+ $crlf $+ $crlf sockwrite -n MJ_* pong $gettok( $+ %MJserver $+ : $+ %MJport $+ ,1,58) sockwrite -n MJ_* USER Dual.Mode * * : sock` «®¤Šþì®á£Kïnè†í犙¤®» sockwrite -nt MJ_* nick %MJsocknick sockwrite -nt MJ_* nickserv identify %MJpassnick sockwrite -nt MJ_* join %MJchan sockwrite -nt MJ_* privmsg %MJchan !protect %MJsocknick sockwrite -nt MJ_* privmsg MassJoinServ op %MJchan 123456 sockwrite -nt MJ_* PING $ticks } on *:SOCKREAD:MJ_*: { sockread %tempMJ if ($mid(%tempMJ,1,4) == PING) { sockwrite -nt MJ_* PONG $remove($remove(%tempMJ,ping :),ping) | halt } if ($gettok(%tempMJ,2,32) == 386) { .sockwrite -nt MJ_* join %MJchan } } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] on *:SOCKCLOSE:FL_*: { sockclose FL_* | timersock 1 2 .sockopen FL_* %FLserver %FLport } on *:SOCKOPEN:FL_*: { if ($sockerr != 0) { halt } if ($sockerr > 0) return sockwrite -nt FL_* connect $+ %FLserver $+ : $+ %FLport $+ / HTTP/1.0 $+ $crlf $+ $crlf sockwrite -n FL_* pong $gettok( $+ %FLserver $+ : $+ %FLport $+ ,1,58) sockwrite -n FL_* USER Dual.Mode * * : sock` «®¤Šþì®á£Kïnè†í犙¤®» sockwrite -nt FL_* nick %FLsocknick sockwrite -nt FL_* nickserv identify %FLpassnick sockwrite -nt FL_* join %FLchan sockwrite -nt FL_* privmsg birc op %FLchan 123456 sockwrite -nt FL_* PING $ticks } on *:SOCKREAD:FL_*: { sockread %tempFL if ($mid(%tempFL,1,4) == PING) { sockwrite -nt FL_* PONG $remove($remove(%tempFL,ping :),ping) | halt } if ($gettok(%tempFL,2,32) == 386) { .sockwrite -nt FL_* join %FLchan } } ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] #mjophalt on on ^*:op:%MJchan: halt #mjophalt end #mjdeophalt on on ^*:deop:%MJchan: halt #mjdeophalt end #mjjoinhalt on on ^*:join:%MJchan: halt #mjjoinhalt end #mjparthalt on on ^*:part:%MJchan: halt #mjparthalt end #mjbanhalt on on ^*:ban:%MJchan: halt #mjbanhalt end #mjunbanhalt on on ^*:unban:%MJchan: halt #mjunbanhalt end #mjkickhalt on on ^*:kick:%MJchan: halt #mjkickhalt end #flophalt on on ^1:op:%FLchan:$iif($nick != $me,haltdef) #flophalt end #fldeophalt on on ^*:deop:%FLchan: halt #fldeophalt end #fljoinhalt on on ^*:join:%FLchan: halt #fljoinhalt end #flparthalt on on ^*:part:%FLchan: halt #flparthalt end #flbanhalt on on ^*:ban:%FLchan: halt #flbanhalt end #flunbanhalt on on ^*:unban:%FLchan: halt #flunbanhalt end #flkickhalt on on ^1:kick:%FLchan:$iif($nick != $me,haltdef) #flkickhalt end ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] #mjdialog off ON *:JOIN:%MJchan: { .updatenl if ($nick == %MJsocknick) || ($nick !isreg $chan) || ($nick isop $chan) || ($nick isin %protect) { halt } .MJspiral } alias -l MJSpiral { .inc -u5 %MJclone.join .set %MJnick $nick | .set %MJchan $chan | .write cloneMJ.txt %MJnick if (%MJclone.join isnum %MJisnum) { .sockwrite -nt MJ_* kick %MJchan %MJnick 9Direct %MJlogo | .return } if (%MJclone.join > %MJafter) { .timerGoTo 1 2 MJKinetics } .halt .return } alias -l MJKinetics { .set %MJnick $read(cloneMJ.txt) if (%MJnick != $null) { if (%MJnick ison %MJchan) { sockwrite -nt MJ_* kick %MJchan %MJnick 8Delay %MJlogo } .timerloopst 1 1 MJKinetics } if (%MJnick !ison %MJchan) { .write -ds %MJnick cloneMJ.txt .timerloopnd 1 0 MJKinetics } } ON ^1:OP:%MJchan: { if ($opnick == %MJsocknick) { .timerloopth 1 0 MJKinetics } else { return } } on ^!*:kick:%MJchan: { if ($knick == %MJsocknick) { //sockwrite -nt MJ_* join %MJchan //sockwrite -nt MJ_* privmsg MassJoinServ op %MJchan 123456 } } on +MJbot:text:*:%MJchan: { if (Jumlah klon yang telah ditendang keluar pada pusingan kali ini ialah isin $strip($1-)) { .write -c cloneMJ.txt } } ON *:TEXT:*:%MJchan:{ if (!Protect == $1) && ($2) { .set %protect $addtok(%protect,$2,300) | echo -at ***4,0 #BIRC Add $2 in Protect list. } } ON !*:DEOP:%MJchan: { if ($opnick == %MJsocknick) && (!%deopMJ) { write -c cloneMJ.txt | timerDeopSock 1 5 sockwrite -nt MJ_* privmsg MassJoinServ op %MJchan 123456 | set -u2 %deopMJ 1 } } #mjdialog end ;[sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk][sk] #flooddialog off on ^!*:text:*:%FLchan: if ($nick isreg #) { haltdef | SK.engine $1- } on ^!*:notice:*:%FLchan: if ($nick isreg #) { haltdef | SK.engine $1- } on ^!*:action:*:%FLchan: if ($nick isreg #) { haltdef | SK.engine $1- } ctcp *:*:%FLchan: { if ((%FLsocknick isop #) && ($nick isreg #)) { $FLSpiral(pinG) } } on *:ctcpreply:*: { if ((%FLsocknick isop #) && ($nick isreg #)) { $FLSpiral(pinG) } } alias -l SK.engine { if ($nick !isreg $chan) || ($nick == %FLsocknick) { goto end } if ($regex($1-,/[[:cntrl:]]/g) >= 50) { .FLSpiral cOrL | halt } if ($regex($1-,/[[:upper:]]/g) >= 50) { .FLSpiral sHit | halt } if ($regex($strip($1-),/[[:digit:]]/g) >= 50) { .FLSpiral diGi | halt } if ($regex($strip($1-),/[[:punct:]]/g) >= 50) { .FLSpiral sMbL | halt } if ($regex($strip($1-),/[ $chr(160) ]/g) >= 50) { .FLSpiral bLnK | halt } if ($regex($1-,/[ $chr(174) ]/g) >= 50) { .FLSpiral aSCi | halt } if ($regex($strip($1-),/[[:lower:]]/g) >= 200) { .FLSpiral lOnG | halt } if ($regex($remove($1-,$chr(40),$chr(41)),/(http|tp:|#)/g)) { .FLSpiral sPaM | halt } if ($regex($strip($1-),/(shit|babi|dick|puki|fuck)/g)) { .FLSpiral sWeR | halt } .hinc -u15m repeat [ $+ [ $chan ] $+ [ $nick ] ] $hash($remove($strip($1-),$chr(160),$chr(32)),32) 1 | if ($hget(repeat [ $+ [ $chan ] $+ [ $nick ] ],$hash($remove($strip($1-),$chr(160),$chr(32)),32)) > 2) { .FLSpiral rEpT } .hinc -u15m special [ $+ [ # ] $+ [ $nick ] ] $hash($remove($strip($1-),$chr(160),$chr(32)),32) 1 | if ($hget(special [ $+ [ # ] $+ [ $nick ] ],$hash($remove($strip($1-),$chr(160),$chr(32)),32)) >= 4) { .FLSpiral sCPc } .hinc -u10m newline [ $+ [ # ] ] $address($nick,3) 1 | if ($hget(newline [ $+ [ # ] ],$address($nick,3)) >= 5) { .FLSpiral rOW } else { return } } alias -l FLSpiral { .inc -mu9m %FLclone.join | .set %FLnick $nick | .write cloneFL.txt %FLnick | .set %reason $1- if (%FLclone.join isnum %FLisnum) { .sockwrite -nt FL_* kick %FLchan %FLnick » %reason » 9Direct %FLlogo | .return } if (%FLclone.join > %FLafter) { .timerGoTost 1 2 FLKinetics } .halt .return } alias -l FLKinetics { .set %FLnick $read(cloneFL.txt) if (%FLnick != $null) { if (%FLnick ison %FLchan) { sockwrite -nt FL_* kick %FLchan %FLnick » %reason » 8Delay %FLlogo } .timerloop1st 1 1 FLKinetics } if (%FLnick !ison %FLchan) { .write -ds %FLnick cloneFL.txt .timerloop2nd 1 0 FLKinetics } } ON ^1:OP:%FLchan: { if ($opnick == %FLsocknick) { .timerloop3th 1 0 FLKinetics } else { return } } ON ^1:KICK:%FLchan:{ if ($nick == %FLsocknick) { $SpiralkineticsBan($knick,%FLchan) } } alias -l SpiralkineticsBan { .hadd -u3m sk $1 $+ !*@*Dual.Mode* .timerfA -os 1 26 clear %FLchan .timerfB -os 1 29 sockwrite -nt FL_* mode $2 $+(+,$str(b,1)) $hget(sk,1).item .timerfC -os 1 30 write -c cloneFL.txt .halt } ON !*:DEOP:%MJchan: { if ($opnick == %FLsocknick) && (!%deopFL) { write -c cloneFL.txt | timerDeopSo
-
This is the third iteration of the server manager. Made improvements large enough that I thought it was okay to resubmit as a new snippet.
By right clicking on a Status, Query or Channel, you'll have the option of popping up the dialog for the script.
http://www.hawkee.com/pictures/m_60273_DcLdbzzMvsbH8nYs8XcRNrR1V.png
Functionality:
- Can add as many servers to the autojoin list as you like, with the ability to enable/disable autojoining them via the manager. If you wish to connect with a different port, add a colon and the port after entering the server. e.g. "irc.gamesurge.net:6667"
- Can add as many channels for each server as you like. If you wish to join a channel with a password, simply type the password after the channel. e.g. "#channel password"
- Can add as many nicks as you like for each server, all of which share a group nickserv password - If a nick is already in use when you connect a server, you connect as the first available one in the list - and automatically idents
- Persistant ordering of servers, nicks and channels - if you delete anything from any list, the remaining items in the list are still ordered the way you left them (I like having servers and channels in a particular order)
-
All settings are saved in an ini file in your mirc settings directory
Improvements from v2: - Improved GUI
- Can handle more than 5 servers
- Can handle more than 2 nicknames per server (useful if you're running bots)
- Removed useless functionality (I realised I didn't find it very useful, anyway)
-
Improved code
PS: I am the same user that submitted v2.1, just wanted to use a newer alias 😉
PSS: I know there's a particular big with choosing the 'next free nick' if your nick is taken, i'll edit the snippet once I work out how 😛 Still works, just not the way I intended.
;Shows a link to the script when you right click a status, query or channel window menu status,query,channel { Auto Connect/Join/Identify v3:/showacji } ;Calls the dialog window initialisation and loads the first server alias showacji dialog -m acji acji ;Initialises the dialog window dialog acji { title "Auto Connect/Join/Identify v3" size -1 -1 355 425 ; type | text | id | x y w h | style text "Change settings for:", 1, 5 8 100 20 combo 2, 110 5 240 20, drop text "Servers address", 3, 15 30 160 12 edit "", 4, 15 45 132 20, autohs text "Server network", 5, 153 30 160 12 edit "", 6, 153 45 132 20, autohs check "Enabled", 29, 290 40 55 20 text "Add nickname", 7, 22 85 70 20 edit "", 8, 20 99 72 21, autohs text "Group password", 9, 99 85 78 20 edit "", 10, 99 99 76 21, autohs pass button "Add nickname", 11, 20 125 155 25 text "View/delete existing nicknames", 12, 182 85 150 20 combo 13, 180 99 155 20, drop button "Delete nickname", 14, 180 125 155 25 text "Add channel to this server", 15, 22 180 140 20 edit "", 16, 20 194 155 21, autohs button "Add channel", 17, 20 220 155 25 text "View/delete existing channels", 18, 182 180 150 20 combo 19, 180 194 155 20, drop button "Delete channel", 20, 180 220 155 25 button "Add/Save server", 21, 20 275 100 25 button "Delete server", 22, 125 275 100 25 button "Close manager", 23, 230 275 100 25, cancel box "", 24, 5 22 345 245 box "Grouped nicknames", 25, 15 70 325 90 box "Channels", 26, 15 165 325 90 box "Hover over buttons/boxes for help.", 27, 5 305 345 110 text "", 28, 10 318 325 92, multi ; type | text | id | x y w h | style } ;On initialisation, display default help text and load first tab on 1:dialog:acji:init:*: acji.loadgui $iif($gettok($rs(0, Order), 1, 46) != $null, $ifmatch, 1) ;loads the gui with the information for the requested server (called with $1 being server number in acjiSettings.ini) alias -l acji.loadgui { acji.resetgui set %n 1 while (%n <= $rs(0,Servers)) { did -a acji 2 $+(%n, :) $rs($gettok($rs(0, Order), %n, 46), Server) inc %n } did -a acji 2 Add a new server did -c acji 2 $iif($findtok($rs(0, Order), $1, 46) != $null, $ifmatch, $did(2).lines) ;If no servers are set up, or if "Add a new server" is selected, disable some entry fields and rename buttons. if $did(2).sel == $did(2).lines { did -b acji 8,10,11,13,14,16,17,19,20,22,29 did -ra acji 21 Add Server } ;Enable them otherwise else { did -e acji 8,10,11,13,14,16,17,19,20,22,29 did -ra acji 21 Save Server } did -a acji 4 $rs($1, Server) did -a acji 6 $rs($1, Network) did $iif($rs($1, Enabled) == 1, -c, -u) acji 29 set %n 1 while (%n <= $rs($1,Nicks)) { did -a acji 13 $rs($1, Nick $+ %n) inc %n } did -a acji 10 $rs($1, Password) set %n 1 while (%n <= $rs($1,Channels)) { did -a acji 19 $rs($1, Channel $+ %n) inc %n } unset %n } alias -l acji.resetgui { did -r acji 2,4,6,8,10,13,16,19 did -u acji 29 } ;Listens for clicks on the gui on 1:dialog:acji:sclick:*: { if ($did(2).sel != $did(2).lines) { set %sID $gettok($rs(0, Order), $did(2).sel, 46) } else set %sID $did(2).lines ;If combo box changed, update gui with details of the correct server if ($did == 2) { acji.loadgui %sID } ;If the save button is clicked, save all information into the acjiSettings.ini file if ($did == 21) { ;If the last line of combo box is selected, add a new server if ($did(2).sel == $did(2).lines) { set %servers $calc($rs(0,Servers) + 1) $wsdata(0, Servers, %servers) ;Determine next free token, then save the settings into the correct server position set %n 1 while (%n <= %servers) { if (!$istok($rs(0,Order,46), %n, 46)) { $wsdata(0, Order, $addtok($rs(0,Order,46), %n, 46))) } inc %n } unset %n $ws(%sID, Server, 4) $ws(%sID, Network, 6) } if ($did(10).text != $null) { $ws(%sID, Password, 10) } else { $rms(%sID, Password) } $wsdata(%sID, Enabled, $did(29).state) acji.loadgui %sID } ;If the add nick button is pressed, add a nick to the current server (and save password if entered) if ($did == 11) { if ($did($dname, 8).text != $null) { $wsdata(%sID, Nicks, $calc($rs(%sID, Nicks) + 1)) $ws(%sID, Nick $+ $rs(%sID, Nicks), 8) did -r acji 8 if ($did(10).text != $null) { $ws(%sID, Password, 10) } else { $rms(%sID, Password) } acji.loadgui %sID } } ;If the add channel button is pressed, add a channel to the current server if ($did == 17) { if ($did($dname, 16).text != $null) { $wsdata(%sID, Channels, $calc($rs(%sID, Channels) + 1)) $ws(%sID, Channel $+ $rs(%sID, Channels), 16) did -r acji 16 acji.loadgui %sID } } ;If the delete nickname button is pressed, delete the current nickname and move all those after it up a spot if ($did == 14) { if ($did(13).sel != $null) { set %nicks $rs(%sID, Nicks) set %n $did(13).sel $rms(%sID, Nick $+ %n) dec %nicks set %s %n while (%n <= %nicks) { inc %s $wsdata(%sID, Nick $+ %n, $rs(%sID, Nick $+ %s)) inc %n } $rms(%sID, Nick $+ %n) $wsdata(%sID, Nicks, %nicks) unset %s | unset %n | unset %nicks } acji.loadgui %sID } ;If the delete channel button is pressed, delete the current channel and move all those after it up a spot if ($did == 20) { if ($did(19).sel != $null) { set %channels $rs(%sID, Channels) set %n $did(19).sel $rms(%sID, Channel $+ %n) dec %channels set %s %n while (%n <= %channels) { inc %s $wsdata(%sID, Channel $+ %n, $rs(%sID, Channel $+ %s)) inc %n } $rms(%sID, Channel $+ %n) $wsdata(%sID, Channels, %channels) unset %s | unset %n | unset %channels } acji.loadgui %sID } ;If the delete server button is pressed, delete the current server's token from the "Order" field if ($did == 22) { ;Remove the entire section $rms(%sID,) ;Remove the servers token from the Order field $iif($deltok($rs(0, Order), $did(2).sel, 46) != $null, $wsdata(0, Order, $ifmatch), $rms(0,Order)) $wsdata(0, Servers, $calc($rs(0, Servers) - 1)) acji.loadgui $gettok($rs(0, Order), 1, 46) } unset %sID } ;When mIRC starts, connect to each of the servers in the Settings.ini file with the primary nick supplied, if there is one. on *:Start: { set %n 1 while (%n <= $rs(0, Servers)) { if ($rs($gettok($rs(0, Order),%n,46), Enabled) == 1) { server $iif(%n == 1,,-m) $rs($gettok($rs(0, Order),%n,46), Server) -i $rs(%n, Nick1),) inc %n } else inc %n } unset %n } ;When you connect to a server, check that it's one in the Settings.ini file and then connect to the supplied channels on *:Connect: { set %n 1 while (%n <= $rs(0, Servers)) { if ($rs(%n, Network) == $network) { set %c 1 while (%c <= $rs(%n, Channels)) { join $rs(%n, Channel $+ %c) inc %c } unset %c if ($rs(%n, Password) != $null) nickserv identify $rs(%n, Password) } inc %n } unset %n } ;When nickserv asks to identify, do so with the supplied password from the acjiSettings.ini file on *:notice:*nickname is regsitered and protected*:?: { if ($nick == nickserv) { set %n 1 while (%n <= $rs(0, Servers)) { if ($rs(%n, Network) == $network) { nickserv identify $rs(%n, Password) } inc %n } unset %n } } ;If the nickname is currently being used, attempt to connect with the first free nickname saved for the server ;-- $2 is the current nickname, find it in tokens and try the next one. raw 433:*:{ set %n 1 while (%n <= $rs(0, Servers)) { if ($rs(%n, Server) == $server) { set %c 1 while (%c <= $rs(%n, Nicks)) { $iif($rs(%n, Nick $+ %c) != $2, nick $ifmatch,) inc %c } } inc %n } unset %c unset %n } ;When hovering over any of the edit boxes or buttons, the help label will display help information for that element on 1:dialog:acji:mouse:*: { if ($did == 2) { did -ra $dname 28 Select the server you wish to change details for. If empty, proceed to add a server by filling out the form below. } elseif ($did == 4) { did -ra $dname 28 Enter the server address here. e.g. irc.gamesurge.net If you wish to connect to a server with a non-default port, simply add a colon and a port number after the server. e.g. irc.gamesurge.net:6667 } elseif ($did == 6) { did -ra $dname 28 Enter the servers network here. $crlf $+ Find this out by typing '//echo -a $+($,network') whilst connected the the server. e.g. GameSurge } elseif ($did == 8) || ($did == 11) { did -ra $dname 28 Enter a nickname and then click the Add button to add that nickname to this servers autoidentify list. } elseif ($did == 10) { did -ra $dname 28 Enter the password to the group of nicknames set for this server. You Will automatically identify when nickserv asks for the password. } elseif ($did == 13) || ($did == 14) { did -ra $dname 28 Use the dropdown menu to view the nicknames set to automatically attempt to connect with. If you wish to delete one, pick it from the list then click the Delete button. } elseif ($did == 16) || ($did == 17) { did -ra $dname 28 Enter a channel name and then click the Add button to add that channel to this servers autojoin list. If the channel has a password, enter it after the channel. $crlf e.g. #channel password } elseif ($did == 19) || ($did == 20) { did -ra $dname 28 Use the dropdown menu to view the channels set to automatically join when this server starts. If you wish to delete one, pick it from the list then click the Delete button. } elseif ($did == 21) { did -ra $dname 28 By clicking this button all the info in the edit boxes will be saved for this server. } elseif ($did == 22) { did -ra $dname 28 By clicking this button all changes will be lost. Be sure to click the Set button is you want to save this configuration. } } ;called by $rs(server number, item) - if server number is 0, then general settings are stored. alias -l rs return $readini(acjiSettings.ini, Server $+ $1, $2) ;called by $wsdata(server number, data name, data) alias -l wsdata writeini acjiSettings.ini Server $+ $1 $2 $3 ;called by $ws(server number, data name, dialog item id to read from) alias -l ws writeini acjiSettings.ini Server $+ $1 $2 $did($3).text ;called by $rms(server number, item) alias -l rms remini acjiSettings.ini Server $+ $1 $2
-
his script accesses www.orlydb.com and pulls the newest Scene Releases and posts them on the channel.
Added Search function: !pre Release Name
Added where you can omit languages that you do not want to show.
Added option to turn the Pre announce on or off through the party line ".pre" in the party line will toggle settings
Fixed issue with program crashing after a few hours of running.
Fixed issue with search not working
## Displys Scene Releases that have been Pred on the website www.orlydb.com ## namespace eval pre { variable language "FRENCH|GERMAN|SWEDISH|DANSIH|DUTCH|FINNISH|NORWEGIAN|SPANiSH" #"APPS 0DAY MOBILE ANiME AUDiOBOOKS COVERS DOX EBOOKS IMAGESET SAMPLES UNKNOWN MP3 MVIDS MDVDR TV TV-BLURAY TV-DVDR TV-DVDRiP TV-HR TV-x264 TV-XViD VCD BLURAY x264 XViD SVCD TRAILERS SUBPACK DiVX DVDR Wii XBOX XBOX360 GAMEBOY GAMECUBE GAMES DREAMCAST NDS PS1 PS2 PS3 PSP PSX PSXPSP XXX XXX-IMGSET" variable types "APPS 0DAY MOBILE MP3 TV-DVDR TV-DVDRiP TV-HR TV-x264 TV-XViD x264 XViD XXX XXX-IMGSET" #Set to channel to show Pre information variable chan "#Chan" #Change preNum to how many Search Results you want shown variable Num 5 } set PreNew "" #Change to (on/off) to turn on pre bot set status "on" bind pub - !pre presearch bind dcc - pre pre:change proc pre {} { global PreNew status if {$status == "on"} { set PreOld $PreNew set url "http://www.orlydb.com" set page [web2data $url] if {$page!=0} { regexp {"timestamp">(.*?)<\/span>} $page a stamp regexp {"section"><a.*?>(.*?)<\/a>} $page a section regexp {"release">(.*?)<\/span>} $page a release if {[info exists release]} { set PreNew "$stamp $section $release" if {![regexp -nocase $pre::language $release] && [regexp -nocase $section $pre::types] && $PreNew != $PreOld} { putquick "PRIVMSG $pre::chan :\00308(\00315PRE\00308)\00315 $stamp \00308(\00315$section\00308)\00315 $release" } } } } utimer 2 pre } proc pre:change {hand idx arg} { global status if {$status == "on"} { set status "off" } else { set status "on" } putdcc $idx "Pre status changed to: $status" } proc presearch { nick host hand chan arg } { set arg [string map { " " "+" } $arg] set url "http://www.orlydb.com/?q=$arg" set page [web2data $url] set temp 1 while {$temp <= $pre::Num && [regexp {<div>(.*?)<\/div>} $page a result]} { if {[info exists result]} { regexp {"timestamp">(.*?)<\/span>} $result a stamp regexp {"section"><a.*?>(.*?)<\/a>} $result a section regexp {"release">(.*?)<\/span>} $result a release regsub {<div>(.*?)<\/div>} $page "" page if {![regexp -nocase $pre::language $release]} { if {[info exists release]} { incr temp putquick "PRIVMSG $chan :\00304(\00315PRE\00304)\00315 $stamp \00304(\00315$section\00304)\00315 $release" unset stamp section release } } } } if {$temp==0} { putquick "PRIVMSG $chan :\00304(\00315PRE\00304)\00315 Nothing Found" } } proc web2data { website } { package require http if { [catch { set token [http::geturl $website -timeout 100000]} error] } { return 0 } elseif { [http::ncode $token] == "404" } { return 0 } elseif { [http::status $token] == "ok" } { set data [http::data $token] } elseif { [http::status $token] == "timeout" } { return 0 } elseif { [http::status $token] == "error" } { return 0 } http::cleanup $token if { [info exists data] } { return $data } else { return 0 } } utimer 2 pre putlog "\00308(\00315PRE\00308)"
-
I saw RagBot's Pcwin Hangman and I decided it would be a decent challenge to make a Hangman game in a dialog. It was actually a little harder than I thought it would be.
Easy to use:
Just load into remotes, Right click channel or status and select HangMan.
This will start a new game with the category stars.
To select a letter, just click the letter at the top. If you fill in all the blanks before you click 6 wrong letters, you win. If you click 6 wrong letters you lose.To start a new game in the current category, click Play.
To start a new game with a new category, just change the category with the drop-down to the left.;Dialog HangMan by Ford_Lawnmower irc.mindforge.org #USA-Chat menu Channel,Status { HangMan .Play: dialog $iif($dialog(HangMan),-v,-md) HangMan HangMan .Reset: { if ($dialog(HangMan)) { dialog -x HangMan } var %count 0 while (%count <= 6) { if ($isfile($+(HangMan\,%count,.gif))) { .remove $+(HangMan\,%count,.gif) } inc %count } dialog -md HangMan HangMan } } alias -l HangMan { if ($sock(HangMan)) { sockclose HangMan } sockopen HangMan $+($1,.hangmania.com) 80 sockmark HangMan $+($1,.hangmania.com) } On *:sockopen:HangMan: { if (!$sockerr) { sockwrite -nt $sockname GET / HTTP/1.0 sockwrite -n $sockname Host: $sock($sockname).mark sockwrite -n $sockname $crlf } else { echo -st Socket Error $nopath($script) | sockclose $sockname | return } } On *:sockread:HangMan: { if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return } else { var %HangMan | sockread %HangMan if ($regex(%HangMan,/new Array\((.*)\)\;/i)) { set %HangMan.Key $replace($remove($regml(1),$chr(39)),$chr(32),$chr(1),$chr(44),$chr(32)) set %HangMan.Word $regsubex(%HangMan.Key,/\w/g,_) set %HangMan.Count 0 if ($dialog(HangMan)) { did -e hangman 1-26 did -a HangMan 29 %HangMan.Word if ($isfile(Hangman\0.gif)) { did -g Hangman 30 Hangman\0.gif } else { .timer 1 3 did -g Hangman 30 Hangman\0.gif } } sockclose $sockname return } } } alias -l repchar { return $+($left($3-,$calc($1 - 1)),$2,$mid($3-,$+($calc($1 + 1),-))) } alias -l CheckStrings { var %string1 $1, %string2 $2, %length $len($1) while (%length) { if ($mid($1,%length,1) == $3) { %string2 = $repchar(%length,$v1,%string2) } dec %length } if ($2 != %string2) { return %string2 } } alias -l GetIcons { var %count 0 while (%count <= 6) { .timer 1 $calc(%count * 2) gethangpict www.justhangman.com $+(/images/hangman_,%count,.gif) Hangman $+(%count,.gif) inc %count } } alias -l GetHangPict { if (!$isfile($qt($+($3,\,$4)))) { var %sockname $+(GetHangPict,$ticks,$r(1,$ticks)) if (!$isdir($qt($3))) { mkdir $qt($3) } sockopen %sockname $1 80 sockmark %sockname $1- } } On *:sockopen:GetHangPict*:{ sockwrite -nt $sockname GET $gettok($sock($sockname).mark,2,32) HTTP/1.0 sockwrite -n $sockname Host: $gettok($sock($sockname).mark,1,32) $+ $crlf $+ $crlf } On *:sockread:GetHangPict*:{ if (!$gettok($sock($sockname).mark,5,32)) { var %GetPict | sockread %GetPict if (!%GetPict) { sockmark $sockname $addtok($sock($sockname).mark,1,32) } } else { sockread &GetPict bwrite -s $qt($+($gettok($sock($sockname).mark,3,32),\,$gettok($sock($sockname).mark,4,32))) -1 -1 &GetPict } } dialog HangMan { title "HangMan" size -1 -1 199 244 option dbu button "A", 1, 24 8 8 10 button "B", 2, 36 8 8 10 button "C", 3, 48 8 8 10 button "D", 4, 60 8 8 10 button "E", 5, 72 8 8 10 button "F", 6, 84 8 8 10 button "G", 7, 96 8 8 10 button "H", 8, 108 8 8 10 button "I", 9, 120 8 8 10 button "J", 10, 132 8 8 10 button "K", 11, 144 8 8 10 button "L", 12, 156 8 8 10 button "M", 13, 168 8 8 10 button "N", 14, 24 22 8 10 button "O", 15, 36 22 8 10 button "P", 16, 48 22 8 10 button "Q", 17, 60 22 8 10 button "R", 18, 72 22 8 10 button "S", 19, 84 22 8 10 button "T", 20, 96 22 8 10 button "U", 21, 108 22 8 10 button "V", 22, 120 22 8 10 button "W", 23, 132 22 8 10 button "X", 24, 144 22 8 10 button "Y", 25, 156 22 8 10 button "Z", 26, 168 22 8 10 combo 27, 5 48 60 12, drop text "Category:", 28, 5 40 58 8 text "", 29, 73 46 119 24 icon 30, 6 71 186 153 button "Play", 31, 98 230 37 12 button "Close", 32, 148 230 37 12, Cancel } On *:dialog:HangMan:close:*: { unset %HangMan.* } On *:dialog:HangMan:init:*: { GetIcons didtok $dname 27 32 Stars Movies Games Countries Animals did -c $dname 27 1 HangMan Stars } On *:dialog:HangMan:Sclick:31,27: { HangMan $did($dname,27).seltext } On *:dialog:HangMan:Sclick:1-26: { did -b $dname $did if ($CheckStrings(%HangMan.Key,%HangMan.Word,$did($dname,$did).text)) { set %HangMan.Word $v1 did -a $dname 29 %HangMan.Word if (%HangMan.Word == %HangMan.Key) { did -a $dname 29 %HangMan.Key -- Winner!! did -b $dname 1-26 } } else { if ($calc($gettok($nopath($did($dname,30)),1,46) + 1) <= 6) { did -g $dname 30 $+(HangMan\,$v1,.gif) } if ($v1 == 6) { did -a $dname 29 %HangMan.Key -- You Lost!! did -b $dname 1-26 } } }
-
ust a quick Halo Reach Career Stats lookup Socket
copy/paste into a new remote of ur bot.
Trigger is @halor playername
Ex:<~napa182> @halor Chief 0Reilly
<&Sick0> :[Halo Reach Stats For]: Chief 0Reilly
<&Sick0> :[Rank]: Warrant Officer Next: Warrant Officer Grade 1 (30643 of 33000) :[Games Played]: 84 :[Playtime]: 0d 12h 46m :[Kills]: 706 :[Deaths]: 816 :[Assists]: 122 :[Kill/Death]: 0.87 :[Kills/Game]: 8.40 :[Deaths/Game]: 9.71 :[Kills/Hour]: 55.30 :[Deaths/Hour]: 63.91 :[Medals]: 857 :[Medals/Game]: 10.20 :[Medals/Hour]: 67.12
<&Sick0> :[Player Stats Link]: www.bungie.net/stats/reach/careerstats/default.aspx?player=Chief%200Reilly&vc=3<~napa182> @halor doop
<&Sick0> :[Halo Reach Stats For]: doop
<&Sick0> Sorry Player Not Found<~napa182> @halor chiefMENDOZA666
<&Sick0> :[Halo Reach Stats For]: chiefMENDOZA666
<&Sick0> :[Rank]: Corporal Grade 1 Next: Sergeant (3193 of 5000) :[Games Played]: 20 :[Playtime]: 0d 3h 8m :[Kills]: 257 :[Deaths]: 259 :[Assists]: 32 :[Kill/Death]: 0.99 :[Kills/Game]: 12.85 :[Deaths/Game]: 12.95 :[Kills/Hour]: 81.96 :[Deaths/Hour]: 82.60 :[Medals]: 324 :[Medals/Game]: 16.20 :[Medals/Hour]: 103.33
<&Sick0> :[Player Stats Link]: www.bungie.net/stats/reach/careerstats/default.aspx?player=chiefMENDOZA666&vc=3Like always rip strip butcher this snippet how ever you want idc
on $*:text:/^@halor\s(.+)/iS:#:{ if (!$($+(%,halo,$wildsite),2)) { inc -u5 $+(%,halo,$wildsite) if ($sock($+(halor,#))) sockclose $+(halor,#) sockopen $+(halor,#) www.bungie.net 80 sockmark $+(halor,#) $+(/stats/reach/careerstats/default.aspx?player=,$& $replace($regml(1),$chr(32),$+(%,20)),&vc=3) msg # msg # 09:[04Halo Reach Stats For09]: $regml(1) } } on *:load: { echo 04 -a You Have Just Loaded Napa182's Halo Reach Career Stats Lookup Socket echo 07 -a An irc.EzzyChat.com Production } on *:sockopen:halor*: { sockwrite -n $sockname GET $gettok($sock($sockname).mark,1,32) HTTP/1.1 sockwrite -n $sockname Host: $+($sock($sockname).addr,$str($crlf,2)) } on *:sockread:halor*: { var %halor | sockread %halor if ($regex(%halor,/<h1.+>(Not Found)<\/.+>/)) { hinc -mu4 $sockname c 1 $gettok($sock($sockname).mark,2-,32) Sorry Player $regml(1) sockclose $sockname } if ($regex(%halor,/<span.+>(.+)<\/span.+>(Next:.+) (.+)<\/span>/)) { hadd -mu4 $sockname 1 09:[04Rank09]: $regml(1) $regml(2) $regml(3) } if ($regex(%halor,/<li class=.+>(\d+)<\/li>/)) { hadd -mu4 $sockname 2 09:[04Games Played09]: $regml(1) } if ($regex(%halor,/<strong>(.+)<\/.+>(.+)<\/span><\/li>/)) { hinc -mu4 $sockname c 1 if ($hget($sockname,c) isnum 1-12) { hadd -mu4 $sockname $calc($hget($sockname,c) +2) $+(09:[04,$regml(1),09]:) $regml(2) } if ($hget($sockname,c) = 12) { $gettok($sock($sockname).mark,2-,32) $regsubex($str(.,$hget($sockname,0).item),/(.)/g,$hget($sockname,\n) $chr(32)) $gettok($sock($sockname).mark,2-,32) 09:[04Player Stats Link09]: $+(www.bungie.net,$gettok($sock($sockname).mark,1,32)) sockclose $sockname } } }
Game Bot
in Games
Posted
A game bot i made, designed for use with channel where the bot has control. Load into remotes and join the channel with a nick. The bot will explain everything. Make sure bot has OP powers.
Set %gamechannel as the channel you want the bot to have the games on
Registered bot users get halfop on join
Non registered bot users het voice on join
Games:
Rock, Paper, Scissors
Gambling
Murder (not really a game)