Mystic Software Forums

Miscellaneous => Archives => Archive => Topic started by: DarkElite on September 08, 2003, 09:24:00 PM

Title: (no subject)
Post by: DarkElite on September 08, 2003, 09:24:00 PM
are there any codes that will create a radom variable that would allow you to create a game of chance?
Title: (no subject)
Post by: Anonymous on September 08, 2003, 11:43:08 PM
Quote
#Random
Name: Produce a random number.

Format:  #Random(range!, dest!)

This command produces a random number and places it in a variable.  range! is the range of the random number.  For example, if range! were 100, then the random number would be between 1 and 100.

dest! is the numerical variable to which the number should be put.

Example:

* Show 5 random numbers.

#For (num!=1; num!<=5; num!=num!+1)

{

      #Random(100,my_number!)

      #Show(my_number!)

}

Related Commands:

None



Umm... You should really try this technique that a lot of us try... it's called reading the help files. You can really learn a great deal.
Title: (no subject)
Post by: Cuzit on September 12, 2003, 11:16:47 PM
Laughing
I use it all the time for chances (its really the only thing u can use, isn't it?)
Title: (no subject)
Post by: Anonymous on September 13, 2003, 02:20:35 PM
No you can technically use it for boards.... well theoretically.

You can set up a way that will make random numbers within a given board and place tiles there. So you can technically place random chests in them....

of course it is only theoretical.
Title: (no subject)
Post by: Cuzit on September 13, 2003, 09:57:55 PM
Oh. Hmm... maybe I need to reread the guide and reference again... I wonder...