Russian Roulette

By blodix on Jan 25, 2010

It's one of my first scripts.. Yes i know it's not good or anything like that and i know russian roulette have been maked before as well.. I just wanted to share mine. :=)
It is working.. You only need to type !rr to try. Paste into your remotes.

And yes, it is one of my first.

on *:text:!rr:#:{
  if ($rand(1,6) != 3) { 
    /msg $chan CLICK
    /msg $chan $nick is lucky today! Since there where no bullet there.  | halt
  }
  /msg $chan BOOM!
  /msg $chan $nick is now dead! See you at the funeral
 /kick $chan $nick You are dead
}

Comments

Sign in to comment.
Jethro   -  Feb 08, 2010

I know some people have a bad habit of mixing php coding with mirc coding.

 Respond  
blodix   -  Feb 08, 2010

Type fail..

 Respond  
PuNkTuReD   -  Feb 08, 2010
on *:text:!rr:#:{
  if ($rand(1,6) != 3) { 
    /msg $chan CLICK
    /msg $chan $nick is lucky today! Since there where no bullet there.  | halt
  }
  /msg $chan BOOM!
  /msg $chan $nick is now dead! See you at the funeral
} /kick $chan $nick You are dead

why the

/kick $chan $nick You are dead

outside of all brackets?

 Respond  
blodix   -  Jan 27, 2010

Well.. If you lower the $rand value there will be a greater chance to get a kick

 Respond  
Jethro   -  Jan 26, 2010

Actually I miscomprehended the purpose of your script, here is the updated example of mine:

on @*:TEXT:!rr:#: {
  msg # CLICK | if ($rand(1,6) != 3) { $gettok(msg # $nick is lucky today! Since there is no bullet in the chamber.,$v1,58)) }
  else { msg # BOOM! | msg # $nick is now dead! See you at the funeral | kick # $nick You are dead }
}

Now, there will be click, no bullet you are lucky, and boom you are dead. Three chances before someone hits the jackpot.

 Respond  
Jethro   -  Jan 26, 2010

Your code will output the message below 95% of the time:

CLICK
blah is lucky today! Since there where no bullet there.
Then the ramaining 5% will result in a kick.

 Respond  
blodix   -  Jan 26, 2010

Hmm it worked to me with no problems.

 Respond  
Jethro   -  Jan 26, 2010

blodix, have you tested your updated code before submitting it? There's a flaw, at least to me, in the code that'll kick a person quite often during the randomization of the roulette. Aside from a bracket mismatch and an unneeded halt, I will suggest something like this:

on @*:TEXT:!rr:#: {
  var %x = msg # CLICK:msg # is lucky today! Since there where no bullet there.:msg # BOOM!:msg # $nick is now dead! See you at the funeral:kick # $nick You are dead
  $iif($rand(1,6) != 3,$gettok(%x,$v1,58))
}

The client running the code should be opped before giving out a kick.

 Respond  
blodix   -  Jan 26, 2010

Kick part added.. It will now kick if hit.

 Respond  
God425   -  Jan 25, 2010

Should add a kick part

 Respond  
termz   -  Jan 25, 2010

lol :) This is what i try to 1 line.

on $*:TEXT:/^[.!@]RR/Si:#: msg $chan $iif($rand(0,6),Click $nick is lucky today! Since there where no bullets in the $ord($v1) chamber,Boom $+ $chr(44) $nick is now dead! See you at your funeral.)
 Respond  
napa182   -  Jan 25, 2010

you could do
but maybe put some flood pro into it

on *:text:!rr:#:{ msg # $iif($r(1,6) != 3,CLICK $nick is lucky today! Since there where no bullet there.,BOOM $nick is now dead! See you at the funeral) }

but whatever............

you have to ask hawkee to delete it...

 Respond  
Shiny   -  Jan 25, 2010

You cant

 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.