A dice script with a counter inside it, and some extra's...
Only works if another user says -dice-
You can add text behind the command... makes stuff more easy.
on *:TEXT:-dice-*:#:{
/set %dice $rand(1,6)
if (%dice == 1) { describe # 0,1rolls a dice... | msg # 1,0You have thrown a 1. Better luck next time! }
if (%dice == 2) { describe # 0,1rolls a dice... | msg # 1,0You have thrown a 2. You're on your way! }
if (%dice == 3) { describe # 0,1rolls a dice... | msg # 1,0You have thrown a 3. Mmm... Not too bad. }
if (%dice == 4) { describe # 0,1rolls a dice... | msg # 1,0You have thrown a 4. Good move! }
if (%dice == 5) { describe # 0,1rolls a dice... | msg # 1,0You have thrown a 5. That's quite neat! }
if (%dice == 6) { describe # 0,1rolls a dice... | msg # 1,0You have thrown a 6. Lucky you! That was a awesome move! }
}
When you\'re doing something no matter what the if statement is is, don\'t include it in the if\'s. Example:
describe $chan rolls a dice...
if (%dice == 1) msg $chan You have thrown a 1.
if (%dice == 2) msg $chan You have thrown a 2.
...
But you don\'t even need the variable, you could just say \"msg $chan You have rolled a $r(1,6) $+ !\"
Also, if you do it the way it is, make it a local variable (/var %var = data) so that it is $null when the script is done.