Dice game
Platform: mIRC
Published Feb 11, 2007
Updated Feb 11, 2007
This is simple dice game in wich you can compete with other people. Just copy and paste it in your remotes (Alt+R) and type !roll
Let the best man win!
Have fun!
on *:TEXT:!roll*:#:{
if (%dice == on) {
/notice $nick 6 Game is already in progress.
halt
}
/set %dicedplayer1 $nick
/set %dice on
/msg $chan 6 %dicedplayer1 has began the game and you have 30 seconds to write !join
/timer72 1 30 /msg $chan 6SOrry, %dicedplayer1 nobody joined your game!
/timer73 1 30 /unset %dice*
}
on *:TEXT:!join:#:{
if ($nick == %dicedplayer1) {
/notice $nick 6 You can`t play with yourself.
halt
}
if (%dice == $null) {
/notice $nick 6 Game hasn`t been started yet! Type !dice to start the game.
halt
}
/timer72 off
/timer73 off
goto next
:next
/set %dicedplayer2 $nick
/set %diceplayer1num $rand(1,6)
/set %diceplayer2num $rand(1,6)
/msg $chan 6 GamE has been started...
/msg $chan 6 $+ %dicedplayer1 $+ 's rolls ---> %diceplayer1num
/msg $chan 6 $+ %dicedplayer2 $+ 's rolls ---> %diceplayer2num
}
if (%diceplayer1num > %diceplayer2num) {
/msg $chan 4 $+ %dicedplayer1 Has won!!!
/unset %dice*
halt
}
if (%diceplayer1num == %diceplayer2num) {
/msg $chan 6 It`s a tie. ROll again!
goto next
}