Somewhat unoriginal, but I haven't messed with mIRC's scripting system in some time so this was a bit of practice.
What it does: When a user types !bomb [NICK], that user will be forced to defuse the bomb by 'cutting' the proper wire (randomly selected from three colors, also randomly selected from a short list of possible colors). The person has anywhere from 20 to 40 seconds (also remotely customizable) to cut a wire or they are kicked. If the 'bombee' is an op, they will not be kicked. Any op can use various commands: !bomb stop will, obviously, stop the bomb in progress. They can also use !bomb stop kick [REASON] or !bomb stop ban [TIME] [REASON], which will kick or ban the person who 'planted' the bomb. If an op types !bomb set on/off the script will be enabled/disabled respectively. Just to add a bit of fairness, if the same user is !bombed twice in a row, they may type !counter-attack which will kick the !bomber (assuming he/she's not an op). The script also protects users idle at least 5 minutes from being !bombed.
To use: Paste the code into your Remotes.
I've done plenty of testing of this and see no problems, but if you do happen to find one please tell me. That about sums it up. C&C please, and enjoy!
UPDATE 3-11-07:
-Added the ability to use a custom kick message when a person fails to defuse the bomb with !bomb [NICK] [REASON]
-Added the ability to modify the color list by simply adding/removing colors from the variable %BombColorList
-Made the KABOOM! message more colorful
-Allowed ops to modify the minimum and maximum time for the bomb with !bomb set timer [MIN] [MAX]
-Allowed a custom kick message to be set by changing %Kaboom (for failed defuse attempts) and %Zing (for !counter-attacks)
-Added protection from !bombing for the client that is running this script
-Optimized the !bomb set on/off script bits
-Added an extensive list of optional (and strange) colors (found at line 91) that you may add if you please
UPDATE 3-12-07:
-Merged !stopbomb with !bomb for continuity. Now use !bomb stop [KICK/BAN] [[TIME IN SECONDS IF BAN]] [REASON], or just plain !bomb stop. Using this command you can kick/ban the 'planter' of the bomb
-Named timers to prevent interference when using multiple scripts dependent on timers
UPDATE 3-14-07:
-Fixed an error that caused the script not to work
-Modified !bomb stop [kick/ban] kick messages
-Added a vowel 'parser', so now if the correct wire color is, for example, violet, the bombee can use !cutwire pirple and it will still register.
UPDATE 3-15-07:
-Vastly upgraded the color list. Due to the fact that the color list is so large and nobody know's what half of the colors are, it defaults to using a small 'normal color' of only the colors of the rainbow. To change it, any op can use !bomb set colors [NORMAL/EXTENDED]
-Added on LOAD event
-Fixed some ordering problems
-Added all commands to the menubar for the client. Just go to Commands->!Bomb Script to set options and quickly use other commands
-Added 'There's already a bomb set!' message when someone tries to 'plant' a bomb whilst there's already one
-Added support for multi-worded colors like 'fire engine red', to use replace the spaces with underscores. I.E: 'fire engine red' would become 'fire_engine_red'
-Fixed !cutwire bug involving mult-word colors
-Modified various variable names to suit the modified CleanBombVars alias
-Fixed bug involving the enable/disable section of the menu item and !bomb set [ON/OFF]
-Improved the Set->Color List area of the menu
-Fixed error involving the set->color area of the menu and the !bomb set colors command
-Fixed continuity of colors
;##########################################
;# Teh Maestro - http://www.fpsbanana.com #
;# #fpsbanana on irc.GameSurge.net #
;##########################################
ON *:LOAD:{
set %BombOn 1
set %BombTimerMin 20
set %BombTimerMax 40
set %BombColorSelect Normal
set %BombScriptStatus Disable
set %BombColorListOpp Extended
}
ON *:TEXT:!Bomb*:#:{
if ($2 == stop) && ($nick isop $chan) && (%BG1BombPlanted == 1) && ($chan == %BG1BombedChan) {
if (%BG1Planter !isop $chan) {
if (!$3) {
msg $chan 4The bomb dissolves into dust.
set %BombedNick2 %BG1BombedNick
CleanBombVars
halt
}
elseif ($3 == kick) {
kick %BG1BombedChan %BG1Planter $4- ( $+ $nick $+ )
msg %BG1BombedChan 4The bomb dissolves into dust.
set %BombedNick2 %BG1BombedNick
CleanBombVars
halt
}
elseif ($3 == ban) {
ban -ku $+ $4 %BG1BombedChan %BG1Planter $5- (Kick/Banned for $duration($4) ( $+ $nick $+ ))
msg %BG1BombedChan 4The bomb dissolves into dust.
set %BombedNick2 %BG1BombedNick
CleanBombVars
halt
}
else {
msg %BG1BombedChan 4The bomb dissolves into dust.
set %BombedNick2 %BG1BombedNick
CleanBombVars
halt
}
}
else {
msg %BG1BombedChan 4The bomb dissolves into dust.
set %BombedNick2 %BG1BombedNick
CleanBombVars
halt
}
}
elseif ($2 == blow) && ($nick isop $chan) && (%BG1BombPlanted == 1) && (%BG1Planter != $me) && (%BG1BombedNick != $me) && ($chan == %BG1BombedChan) {
TimeUp
halt
}
elseif ($2 == showvars) && ($nick isop $chan) {
notice $nick 5 $+ $chr(37) $+ BombTimerMin=4 $+ %BombTimerMin $+ 5, $chr(37) $+ BombTimerMax=4 $+ %BombTimerMax $+ 5, $chr(37) $+ BombColorSelect=4 $+ %BombColorSelect $+ 5, $&
$chr(37) $+ BombedNick=4 $+ $iif(!%BG1BombedNick,$chr(36) $+ null,%BG1BombedNick) $+ 5, $chr(37) $+ BombedNick2=4 $+ $iif(!%BombedNick2,$chr(36) $+ null,%BombedNick2) $+ 5, $&
$chr(37) $+ BombedChan=4 $+ $iif(!%BG1BombedChan,$chr(36) $+ null,%BG1BombedChan) $+ 5, $chr(37) $+ BombColors=4 $+ $iif(!%BG1BombColors,$chr(36) $+ null,%BG1BombColors)
halt
}
elseif ($2 == set) && ($nick isop $chan) {
if (!$3) {
notice $nick 5Commands: 4!Bomb set [ON/OFF], !Bomb set colors [NORMAL/EXTENDED], !Bomb set timer [MIN] [MAX]
halt
}
elseif ($3 == on) {
if (%Bombon == 1) {
notice $nick 5The script is already enabled!
halt
}
else {
set %Bombon 1
msg $chan 5!Bomb script enabled!
set %BombScriptStatus Disable
CleanBombVars
halt
}
}
elseif ($3 == off) {
if (%Bombon == 0) {
notice $nick 5The script is already disabled!
halt
}
else {
set %Bombon 0
msg $chan 5!Bomb script disabled!
set %BombScriptStatus Enable
CleanBombVars
halt
}
}
elseif ($3 == colors) {
if ($4 == normal) {
set %BombColorSelect Normal
set %BombColorListOpp Extended
msg $chan 4Normal 5bomb colors are now in use!
halt
}
elseif ($4 == extended) {
set %BombColorSelect Extended
set %BombColorListOpp Normal
msg $chan 4Extended 5bomb colors are now in use!
halt
}
else {
notice $nick 5Use 4!bomb set colors [NORMAL/EXTENDED] 5to choose the color list to use.
halt
}
}
elseif ($3 == timer) {
if ($4) && ($5) {
set %BombTimerMin $4
set %BombTimerMax $5
msg $chan 5The bomb timer is now between4 %BombTimerMin 5and4 %BombTimerMax 5(default 20 and 40)
halt
}
else {
notice $nick 5Use 4!bomb timer [MIN] [MAX] 5(default is 20 and 40)
}
}
else {
halt
}
}
elseif (%Bombon == 1) && (%BG1BombPlanted != 1) {
if ($2 == $null) {
notice $nick 5Use4 !Bomb [NICK] (optional)[REASON] 5to make that person have to defuse the bomb.
halt
}
elseif ($2 !ison $chan) {
msg $chan 5That user does not exist.
halt
}
elseif ($nick($chan,$2).idle >= 300) {
msg $chan 5Sorry, that user is idle
halt
}
else {
BombSetColorVars
:FixColors2
if (%BombColorSelect == Extended) {
set %BG1BombColor1 $gettok( %BombColorList1,$r(1,$numtok( %BombColorList1,32)),32)
set %BG1BombColor2 $gettok( %BombColorList2,$r(1,$numtok( %BombColorList2,32)),32)
set %BG1BombColor3 $gettok( %BombColorList3,$r(1,$numtok( %BombColorList3,32)),32)
}
else {
set %BG1BombColor1 $gettok(%BombColorListNorm,$rand(1,$numtok(%BombColorListNorm,32)),32)
set %BG1BombColor2 $gettok(%BombColorListNorm,$rand(1,$numtok(%BombColorListNorm,32)),32)
set %BG1BombColor3 $gettok(%BombColorListNorm,$rand(1,$numtok(%BombColorListNorm,32)),32)
}
goto FixColors
halt
:FixColors
if (%BG1BombColor1 == %BG1BombColor2) || (%BG1BombColor2 == %BG1BombColor3) || (%BG1BombColor1 == %BG1BombColor3) {
goto FixColors2
halt
}
else {
$SetBombVars($nick,$2,$chan,$3-)
if ($2 == $me) {
msg %BG1BombedChan 4I will not allow that!
set %BG1BombTimer %BG1BombTimer - 10
set %BG1BombedNick $nick
set BombKickMsg 4Think twice before trying to bomb the bot!
}
set %BG1BombTimer2 $floor( $calc( %BG1BombTimer / 3 * 2 ) )
describe %BG1BombedChan 5straps a bomb onto4 %BG1BombedNick $+ 's 5chest.4 %BG1BombedNick 5has4 %BG1BombTimer 5seconds to defuse the bomb. The wire colors $&
are4 $replace( $lower(%BG1BombColor1),_,$chr(32)) $+ 5,4 $replace( $lower(%BG1BombColor2),_,$chr(32)) $+ 5, and4 $replace( $lower(%BG1BombColor3),_,$chr(32)) $+ 5. Type 4!cutwire COLOR 5to cut a wire!
timerBombBeep 1 %BG1BombTimer2 msg %BG1BombedChan 4beep... beep... beep...
timerBombBlow 1 %BG1BombTimer TimeUp
halt
}
}
}
elseif (%BG1BombPlanted == 1) {
notice $nick 5There's already a bomb set!
halt
}
else {
notice $nick 5Sorry, the script is currently disabled
halt
}
}
ON *:TEXT:!cutwire*:%BG1BombedChan:{
var %CWZ $lower($replace($gettok(%BG1BombColors,$rand(1,3),32),_,$chr(32)))
var %CWA $replace(%CWZ,a,$null,e,$null,i,$null,o,$null,u,$null,$chr(32),_)
var %CWB $replace($2-,a,$null,e,$null,i,$null,o,$null,u,$null,$chr(32),_)
var %CWC $replace(%BG1BombColors,a,$null,e,$null,i,$null,o,$null,u,$null)
if (%BG1BombPlanted == 1) && ($nick == %BG1BombedNick) && ($2) {
if ($gettok(%CWC,1,32) != %CWB) && ($gettok(%CWC,2,32) != %CWB) && ($gettok(%CWC,3,32) != %CWB) { msg $chan 5There's no wire of that color! | halt }
elseif (%CWA != %CWB) {
if (%BG1BombedNick isop %BG1BombedChan) {
msg %BG1BombedChan 5You cut the wrong wire! You should've cut the4 %CWZ 5wire!
msg %BG1BombedChan %Kaboom
set %BombedNick2 %BG1BombedNick
CleanBombVars
halt
}
else {
msg %BG1BombedChan 5You cut the wrong wire! You should've cut the4 %CWZ 5wire!
$iif(%BG1BombKickMsg != $null,ban -ku2 %BG1BombedChan %BG1BombedNick %Kaboom ( $+ %BG1BombKickMsg $+ ),ban -ku2 %BG1BombedChan %BG1BombedNick %Kaboom)
set %BombedNick2 %BG1BombedNick
CleanBombVars
halt
}
}
elseif (%BG1BombPlanted == 1) && ($nick == %BG1BombedNick) && (%CWA == %CWB) {
msg %BG1BombedChan 4Bomb has been defused! You win!
set %BombedNick2 %BG1BombedNick
CleanBombVars
halt
}
}
else {
halt
}
}
ON *:TEXT:!counter-attack:#:{
if (%BG1Planter != $me) {
if (%BG1BombPlanted == 1) && ($nick == %BG1BombedNick) && ($nick == %BombedNick2) && ($chan == %BG1BombedChan) {
if (%BG1Planter !isop %BG1BombedChan) {
kick %BG1BombedChan %BG1Planter %Zing (Owned by $nick $+ )
CleanBombVars
halt
}
else {
msg $chan 4God comes down from above, and He says, 'I shall not smite thine enemy.'
msg $chan 4The bomb dissolves into dust.
CleanBombVars
halt
}
}
}
else {
msg $chan 4I will do no such thing!
halt
}
}
ON *:NICK:{
if ($nick == %BombedNick2) {
set %BombedNick2 $newnick
halt
}
elseif (%BG1BombPlanted == 1) {
if (%BG1BombedNick != $null) {
if ($nick == %BG1BombedNick) {
set %BG1BombedNick $newnick
halt
}
elseif ($nick == %BG1Planter) {
set %BG1Planter $newnick
halt
}
}
}
}
ON *:QUIT:{
if (%BG1BombPlanted == 1) && ($nick == %BG1BombedNick) {
msg %BG1BombedChan 4Chicken...
CleanBombVars
}
}
ALIAS -l TimeUp {
if (%BG1BombedNick isop %BG1BombedChan) {
msg %BG1BombedChan %Kaboom
CleanBombVars
halt
}
else {
$iif(%BG1BombKickMsg != $null,ban -ku2 %BG1BombedChan %BG1BombedNick %Kaboom ( $+ %BG1BombKickMsg $+ ),ban -ku2 %BG1BombedChan %BG1BombedNick %Kaboom)
CleanBombVars
halt
}
}
ALIAS -l SetBombVars {
set %BG1BombColors %BG1BombColor1 %BG1BombColor2 %BG1BombColor3
set %BG1Planter $1
set %BG1BombedNick $2
set %BG1BombedChan $3
set %BG1BombTimer $rand(%BombTimerMin,%BombTimerMax)
set %BG1BombPlanted 1
set %BG1BombKickMsg $4-
set %Kaboom 8,1*K7AB4OO7M!8*
set %Zing 8,1*Z7IN4G!7*
}
ALIAS -l CleanBombVars {
unset %BG1*
timerBombBeep off
timerBombBlow off
}
ALIAS -l BombSetColorVars {
set %BombColorListNorm red orange yellow green blue indigo violet
set %BombColorList1 Alizarin Burgundy Cardinal Carmine Cerise Chestnut Crimson Falu_red Fire_engine_red Girlsnberry Maroon Mauve Red Red-violet Rust Puce Sangria Scarlet Terracotta $&
Vermilion Amaranth Rose Hollywood Cerise Shocking_Pink Coral Red Pomegranate Persian_red Pink Dark_Pink Venetian_red Fuchsia Magenta Orange Amber Coral Dark_salmon $&
Gamboge Mahogany Peach Peach-orange Peach-yellow Pink-orange Pomegranate Pumpkin Rust Safety_orange Salmon Tangerine Tawny Amber Vermilion Burnt_Orange $&
Apricot Carrot_Orange Orange_Peel Brown-Amber Beige Buff Corn Cream Dark_Goldenrod Ecru Flax Gamboge Golden Goldenrod Khaki Lemon Lemon_Cream Lime Mustard Navajo_white
set %BombColorList2 Old_Gold Olive Papaya_whip Peach-yellow Pear Saffron School_bus_yellow Tangerine_yellow Yellow Apricot Metallic_Gold Chartreuse_yellow Golden_yellow $&
Golden_poppy Green-yellow Asparagus Bright_green Camouflage_green Celadon Chartreuse Emerald Fern_green Gray-asparagus Green Green-yellow $&
Jade Lime Moss_green Myrtle Olive Olive_drab Pear Pine_green Sea_green Spring_green Swamp_green Tea_green Forest_green Chartreuse_yellow Harlequin Office_green $&
Lime_pulp Hunter_green Kelly_green Shamrock_green Islamic_green Lime_green Persian_green Alice_blue Aqua Aquamarine Baby_blue Bondi_blue Cerulean Cyan Pine_green
set %BombColorList3 Robin_egg_blue Teal Turquoise Viridian Alice_blue Azure Blue Cerulean Cerulean_blue Cobalt_blue Cornflower_blue Dark blue Denim Dodger_blue Indigo Klein_Blue Lavender $&
Midnight_Blue Navy_blue Periwinkle Persian_blue Powder_blue Prussian_blue Royal_blue Sapphire Steel_blue Ultramarine Light_blue Baby_blue Amethyst $&
Cerise Eggplant Fuchsia Heliotrope Indigo Lavender Lavender_blush Lavender_gray Lavender_rose Lilac Magenta Mauve Mountbatten_pink Orchid Palatinate Purple $&
Persian_indigo Purple Red-violet Rose Sangria Thistle Violet Violet-eggplant Wisteria_Pink Carnation Fuchsia Magenta Salmon_Pink Deep_Pink Hollywood_Cerise Hot_Pink
}
menu menubar {
!Bomb Script
.%BombScriptStatus:{
echo -m 4!Bomb script $lower(%BombScriptStatus) $+ d!
$iif(%BombScriptStatus == Enable,set %BombOn 1, set %BombOn 0)
$iif(%BombScriptStatus == Enable,set %BombScriptStatus Disable, set %BombScriptStatus Enable)
}
.Set
..Timer...:{
:SetTimer
var %BG1BombTimerMinTemp = $$?="Enter the minimum timer limit:", %BG1BombTimerMaxTemp = $$?="Enter the maximum timer limit:"
if (%BG1BombTimerMinTemp isnum) && (%BG1BombTimerMaxTemp isnum) {
set %BG1BombTimerMin %BG1BombTimerMinTemp
set %BG1BombTimerMax %BG1BombTimerMaxTemp
echo -m 4The bomb timer is now between %BG1BombTimerMinTemp and %BG1BombTimerMaxTemp $+ !
halt
}
else {
var %BG1BombTimerFailTemp = $$?!="Error: Both values must be numerals. $crlf $+ $crlf $+ Try again?"
$iif(%BG1BombTimerFailTemp == $true,goto SetTimer,halt)
}
}
..Use %BombColorListOpp Color List:{
echo -m 4 $+ %BombColorListOpp now in use!
$iif(%BombColorListOpp == Normal,set %BombColorSelect normal, set %BombColorSelect extended)
$iif(%BombColorListOpp == Normal,set %BombColorListOpp Extended, set %BombColorListOpp Normal)
}
.Stop
..Stop Current Bomb:{
if (%BG1BombPlanted == 1) {
msg %BG1BombedChan 4The bomb dissolves into dust.
CleanBombVars
halt
}
else {
halt
}
}
..Stop and Kick...:{
if (%BG1BombPlanted == 1) {
kick %BG1BombedChan %BG1Planter $$?="Reason:"
msg %BG1BombedChan 4The bomb dissolves into dust.
CleanBombVars
halt
}
else {
halt
}
}
..Stop and Ban...:{
if (%BG1BombPlanted == 1) {
var %BBTT = $$?="How long? (in seconds)"
ban -ku $+ %BBTT %BG1BombedChan %BG1Planter $?="Reason:" (Kick/Banned for $duration(%BBTT))
msg %BG1BombedChan 4The bomb dissolves into dust.
CleanBombVars
halt
}
else {
halt
}
}
.By Teh Maestro:{
run http://www.fpsbanana.com/
}
}
Backoff (notice I didn\'t add Jackson just to add salt to the wounds since you choose to be so immature) get over it. It\'s a snippet that people can use to mess with people and it provides a variance in the kick/ban option that people like. It\'s something DIFFERENT. As to \"ripping\" it... as Teh Maestro said it is a bomb script so how different can it be? Who cares whether it\'s a ! command or a .command. It does vary from your version of the code enough that you can\'t really complain plus he added in extra features that make it original. Grow up and enjoy all the posts we get in the mIRC scripting section and be appreciative to all those that contribute.
Rawr. The fact that you spoofed it makes it bad. I mean, I have spoofed some scripts, but the fact that you could have changed it to being something besides !cutwire makes it a true ebil spoof. By the way NEVER refer to meh as \'backoff\' lazy people, you can at least copy and paste my name. >.>
P.S. Rawr.