Bomb Script.

By Logan on Mar 06, 2008

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
}

Comments

Sign in to comment.
Ghost-writer   -  Jul 27, 2009

:`GiveBomb:#:{ <--- this screwed you up so badly!!! lol you missed a star :)

 Respond  
Jonesy44   -  Mar 08, 2008

noted lol, thanks xD

 Respond  
napa182   -  Mar 06, 2008

jonesy44 on the ban kick unban part you can use this ;)

ban -ku60 $chan $nick 2 kick message here
 Respond  
napa182   -  Mar 06, 2008

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.

 Respond  
napa182   -  Mar 06, 2008

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.

 Respond  
Logan   -  Mar 06, 2008

Ok Sorry I just forgot to put in the power on power off command. Sorry for the incovenience.

 Respond  
napa182   -  Mar 06, 2008

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 }
 Respond  
napa182   -  Mar 06, 2008

Logan Please make sure the script works before you post it.

 Respond  
napa182   -  Mar 06, 2008

you have if (%Power == on) well um where do you set the power?

 Respond  
Jonesy44   -  Mar 06, 2008

Most ?

Might be better to suit \"All\", the 7 or so servers i\'ve been on do not support built in aliases, they don\'t come on ircd or anope

 Respond  
Logan   -  Mar 06, 2008

I Know Jonesy But most servers do So I\'m sticking wit it.

 Respond  
Jonesy44   -  Mar 06, 2008

Also, not everybody has the aliases;

Kickban || Unban

Use:

/ban -k $chan %nick msg...alalala

and

/mode $chan -b $address($nick,0)

Please correct me if ,0 is the wrong param, im not sure, there are so many of them xP

 Respond  
Logan   -  Mar 06, 2008

Ok I\'ve tried it. Once and it set the nick and the script went through and the var stayed so it doesn\'t have to be changed. I just tried it like a second ago. (Everyone Please Comment And Rate)

 Respond  
Jonesy44   -  Mar 06, 2008

One quick thing,

var %nick = $nick(#,$r(1,$nick(#,0)))

may need to be changed to

set %nick $nick(#,$r(1,$nick(#,0)))

as \"vars\" get deleted after the script has been exectued, therefore when ya try:

if ($Nick != %Nick) { Halt }

nothings gonna be popping there >.>

 Respond  
Logan   -  Mar 06, 2008

I hope you enjoy it... :) | Note: I was bored...

 Respond  
Logan   -  Mar 06, 2008

I havn\'t had a chance to test it and its my first script like this so there might be mistakes and bugs. You may do whatever you want with it, but if you modify it and post it here please be sure to give me some of the credit.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.