Top

Dice (Alup style)


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  3.0
Scores Submitted  1
Date Added  Jun 22, 2008
Last Updated  Jun 22, 2008
Tags  dice  mirc 
  Bookmark and Share

Introduction

this is a dice code i wrote i got tired of all the big code so i decided to make it compact and still be functional any ways here it is...

you need to make a text file in your bots root dir and name it dice.txt
put all the stuff between start and end in the dice.txt file and save

Grab the Code

Comments

  (2)  RSS
Alup
Comments: 2
 
mIRC Snippet:  Dice (Alup style)
Posted on Jun 22, 2008 7:24 pm
i have been using this for quite a while befor i decided to post it. so i know for a fact it works!
napa182
Comments: 1,143
 
mIRC Snippet:  Dice (Alup style)
Posted on Jun 22, 2008 11:25 pm
you can just do this if you dont want to calc the outcome
Code:
on *:text:!roll:#: {
  describe $chan Rolls the Dice!
  .timer 1 2 msg $chan they landed on... $+($r(1,6),$chr(58),$r(1,6))
}

or this way if you want to calc the outcome.
Code:
on *:text:!roll:#: {
  var %die1 $r(1,6), %die2 $r(1,6)
  describe $chan Rolls the Dice!
  .timer 1 2 msg $chan they landed on... $+(%die1,$chr(58),%die2) = $calc(%die1 + %die2)
}

no need for a txt file, but i would also add a flood control to it as well.
maybe like
Code:
on *:text:!roll:#: {
  if (!$($+(%,die,$nick),2)) {
    var %die1 $r(1,6), %die2 $r(1,6)
    describe $chan Rolls the Dice!
    .timer 1 2 msg $chan they landed on... $+(%die1,$chr(58),%die2) = $calc(%die1 + %die2)
    set -u5 $+(%,die,$nick) $nick
  }
}



Please Register or Login to start posting comments.
Bottom