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
}
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?
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.
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.