A function included in the GECK version 18.104.22.168.
Returns a random integer between 0 and 99 inclusive.
(0 to 99:int) GetRandomPercent
short rnd set rnd to GetRandomPercent
This will set the variable "rnd" to an integer between 0 and 99, inclusive
- To generate a random number between 1 and max:
set randVal to 1 + GetRandomPercent * max / 100
To generate a random number between min and max:
set randVal to min + GetRandomPercent * (max-min+1) / 100