Page 1 of 1
Random Number generator/modifier
Posted: June 24th, 2007, 5:24 am
by reaphavok
I have been unable to find a command within lotroextreme to generate random numbers to add as a modifer to sleep timers and such. Is there currently a command able to do this and if not will this be something we can expect to see in v1.0?
Thanks any feedback would be appreciated.
Posted: June 24th, 2007, 6:08 am
by antareus
Got this from Tault_mississippi (
http://www.taultunleashed.com/phpbb2/ab ... king_.html)
FUNCTION myRandom(upperlimit, lowerlimit)
myRandom = Int((upperlimit - lowerlimit + 1)*Rnd() + lowerlimit)
END FUNCTION
I quote :
The following VBScript code will generate a random number between any limits you
choose. (Since the Int function always rounds down, we add one to the difference
between the limits.)