Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This sets what channel it should respond in
- setudef flag roulette
- # Random values for current chamber and loaded chamber based on rounds in gun
- set gunRounds 6
- set currentRound [expr {int(rand()*$gunRounds)} +1]
- set loadedChamber [expr {int(rand()*$gunRounds)} +1]
- bind pub - %rr russianroulette
- proc russianroulette {nick host handle chan text} {
- if {![channel get $channel roulette]} {
- return 0
- }
- global currentRound loadedChamber gunRounds
- if {$currentRound == $loadedChamber} {
- puthelp "PRIVMSG $chan :$nick loads one bullet. He spins the barrel and pulls the trigger."
- newbanchan $chan "$nick!*@*" oldtopbot "Lost at Russian Roulette. (5 minutes)" 5
- puthelp "PRIVMSG ChanServ :KICK $rouletteChan $nick died. Respawn in 5 minutes."
- set currentRound [expr {int(rand()*$gunRounds)} +1]
- set loadedChamber [expr {int(rand()*$gunRounds)} +1]
- puthelp "PRIVMSG $chan :The gun has been reloaded with a new round."
- return 1
- } elseif {$currentRound != $loadedChamber} {
- puthelp "PRIVMSG $chan :$nick hears the hammer click, but he emerges unscathed."
- if {$currentRound > $gunRounds} {
- set currentRound 0
- } else {
- incr currentRound
- }
- return 1
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement