EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Random Int question (https://www.eqemulator.org/forums/showthread.php?t=34707)

Durge 01-10-2012 06:37 PM

Random Int question
 
Hey guys, I just had a quick question with something, is there someway that I can do this? quest::ChooseRandom(<int>-<int>), so like 0-100 or something, or does it already support it maybe?

lerxst2112 01-10-2012 07:32 PM

Perl has a built-in random number generator. http://perlmeme.org/howtos/perlfunc/rand_function.html

Durge 01-10-2012 10:10 PM

Thank you, this was very helpful =).

trevius 01-11-2012 06:34 AM

If you have the right plugin, you can also do:

my $randomnum = plugin::RandomRange(5, 15);

It makes it a bit easier to get a random number within a range that doesn't start at 0.

Durge 01-14-2012 12:46 AM

Ok, thanks, thats also nice to know


All times are GMT -4. The time now is 06:17 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.