Just type `Bomb and it randomly gives a nick the bomb... The script is pretty much self explainable. So have fun... (I havn't had a chance to test and this is my first real script like this so there might be mistakes and bugs.
on *:Text:`Bomb:#:{
if (%Power == On) {
if (%BombInUse == Yes) { msg $Chan 4(12-3[7-3]12-4)15 Sorry $Nick but the Bomb Game is already in use. Please wait until its over. 4(12-3[7-3]12-4)15 | halt }
var %nick = $nick(#,$r(1,$nick(#,0)))
set %BombInUse Yes
set %HasBomb %Nick
Describe $Chan 4(12-3[7-3]12-4)15 Hands %Nick A Bomb. Everyone must try to give the bomb to someone else before the timer runs out. If the time runs out the person will be given a kickban for 1min. 4(12-3[7-3]12-4)
msg $Chan 4(12-3[7-3]12-4)15 You got 1min before the bomb explodes. Use your time wisely. 4(12-3[7-3]12-4)15
.timer 1 60 KickBan %Nick 4(12-3[7-3]12-4)15 *BOOM!!!* The Bomb has exploding and your seriously injured. (Come back in 10min)(No one can play for 10min...)
set %Power Off
unset %Nick
unset %BombInUse
unset %HasBomb
.timer 1 600 Unban %Nick
}
}
on *:Text:`GiveBomb:#:{
if (%Power == On) {
if ($Nick != %Nick) { Halt }
if ($Nick == $2) { Msg $Chan 4(12-3[7-3]12-4)15 Don't try to give urself the bomb! 4(12-3[7-3]12-4)15 | halt )
if ($2 ison $Chan) { msg $Chan 4(12-3[7-3]12-4)15 $2 is not in chan... Don't try to cheat! 4(12-3[7-3]12-4)15
msg $Chan 4(12-3[7-3]12-4)15 $Nick has given $2 the bomb. Please hurry before the time runs out. (Noise heard in the background: Tic Toc Tic Toc..."
set %Nick $2
}
}
}
}
Menu Status,Channel {
.Bomb Power
..On: Set %Power On | echo -a 4(12-3[7-3]12-4)15 Bomb Script Now Activated. 4(12-3[7-3]12-4)15
..Off: Set %Power Off | echo -a 4(12-3[7-3]12-4)15 Bomb Script Now Activated. 4(12-3[7-3]12-4)15
}
ok you have it set %Power Off in the mid of the game so if you try to do \"`givebomb nick\" you cant cuz %power is not on also you have isin you should use ison.
Logan said:
Ok Sorry I just forgot to put in the power on power off command. Sorry for the incovenience.
um thats fine but ur script still dont work. =/
Logan said:
I havn\'t had a chance to test it and its my first script like this so there might be mistakes and bugs.
so why post it if you didnt test it. You should really learn to test ur work before you post it.
ok if you would look at my last comment you would see a few things you can fix. like why make it 2 on text events when it can be one. why set power off if you are not going to use the off part just unset it, and also you use KickBan and unban but have no aliases for them. also why use var %nick = $nick(#,$r(1,$nick(#,0))) if you are just going to set %HasBomb %Nick. againg take alook at my last comment. it\'s ment to help.
um heres one way of getting it to work.
on @*:text:*:%bombchan:{
if ($1 == `bomb) {
if (%BombInUse) {
msg %bombchan 4(12-3[7-3]12-4)15 Sorry $nick but the Bomb Game is already in use. Please wait until its over. 4(12-3[7-3]12-4)15
}
else {
set %BombInUse on
set %HasBomb $nick(#,$r(1,$nick(#,0)))
Describe %bombchan 4(12-3[7-3]12-4)15 Hands %HasBomb A Bomb. Everyone must try to give the bomb to someone else before the timer runs out. If the time runs out the person will be given a kickban for 1 min. 4(12-3[7-3]12-4)
msg %bombchan 4(12-3[7-3]12-4)15 You got 1 min before the bomb explodes. Use your time wisely. 4(12-3[7-3]12-4)15
.timerboom 1 60 boom
}
}
elseif ($1 == `GiveBomb) {
if ($nick != %HasBomb) { msg %bombchan You Dont Have The Bomb $nick
}
elseif ($nick == $2) { msg %bombchan 4(12-3[7-3]12-4)15 Don\'t try to give urself the bomb! 4(12-3[7-3]12-4)15
}
elseif ($2 !ison #) { msg %bombchan 4(12-3[7-3]12-4)15 $2 is not in chan... Don\'t try to cheat! 4(12-3[7-3]12-4)15
}
else {
msg %bombchan 4(12-3[7-3]12-4)15 $nick has given $2 the bomb. Please hurry before the time runs out. (Noise heard in the background: Tic Toc Tic Toc...\"
set %HasBomb $2
}
}
}
alias boom { ban -ku60 %bombchan %HasBomb 2 4(12-3[7-3]12-4)15 *BOOM!!!* The Bomb has exploded and your seriously injured. (Come back in 1 min) | unset %BombInUse %HasBomb }
on *:load:{ set %bombchan $$?=\"Please Set A Channel To Play Bomb Game ex: #channel\" | echo -a Bomb Game Channel Set As %bombchan }