Top

Dice Game V.2

Please Register to submit score.
Average Score  5.5
Scores Submitted  2
Date Added  May 03, 2008
Last Updated  May 16, 2008
Tags  dice  fun  game 

Introduction

This is a script i made one day because i felt like making a turn based game feel free to add colors of your own and give me credit if you do post this snippet edited.
this is a bit of a spam game, so i included a way to turn it off.
make sure to change NICK into your nick so those commands don't get abused.

V.2 Update -> Also i have added Superroll , just change NICK you your nick and you can use it to beat all of your freinds. I also added color to the script making it more interesting


use !dicecommands for the rules and commands



Grab the Code

Comments

  (4)  RSS
vaseline28
Comments: 112
 
mIRC Snippet:  Dice Game V.2
Posted on May 4, 2008 1:42 am
To save the long lists of
Quote:
unset %....
there are certain variables which can be set using "var" instead of "set" (Please note, not all of them can)
Var uses the variable for the amount of time that the script is running, instead of saving the variable to your "Variables Tab".
Quote:
on *:text:!roll*:#: {
if (%turn == 1) {
if ($nick == %player1) {
set %roll $rand(2,12)
msg $chan %player1 has rolled a 1,0 %roll 1!
set %turn 2
if (%roll >= 10) {
msg $chan %player1 has won!
unset %roll
unset %player1
unset %player2
unset %dice
unset %dice2
}
}
}
elseif (%turn == 2) {
if ($nick == %player2) {
var %roll $rand(2,12)
msg $chan %player2 has rolled a 1,0 %roll 1!
set %turn 1
if (%roll >= 10) {
msg $chan %player2 has won!
unset %turn
unset %player1
unset %player2
unset %dice
unset %dice2
}
}
}
}


Some of the variables can be changed:
[quote]
Quote:
on *:text:!roll*:#: {
if (%turn == 1) {
if ($nick == %player1) {
var %roll $rand(2,12)
msg $chan %player1 has rolled a 1,0 %roll 1!
var %turn 2
if (%roll >= 10) {
msg $chan %player1 has won!
unset %turn
unset %player1
unset %player2
unset %dice
unset %dice2
}
}
}
** Cut to make the quote shorter **


Another thing I noticed, I don't know whether it is deliberate, but in your script at one point $nick is set to %Player2 and at another to %Player1.
vaseline28
Comments: 112
 
mIRC Snippet:  Dice Game V.2
Posted on May 4, 2008 10:40 am
Sorry, I see what you've done with the set $nick %Player1 / %Player2 now.

I was thinking that the /unset commands are actually unnecessary as they will be over-written the next time you use the script (Unless you like nice tidy empty Variables).
RagBot
Comments: 34
 
mIRC Snippet:  Dice Game V.2
Posted on May 4, 2008 6:24 pm
:p i don't like variables much, not sure how i can use them here, but i need all of those unsets or else it may not work the next time through :)
RagBot
Comments: 34
 
mIRC Snippet:  Dice Game V.2
Posted on Jun 14, 2008 4:59 pm
Please rate this Script, i need to be able to tell it it's good or not :p

Please Register or Login to start posting comments.
Bottom