Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2012, 06:37 PM
Durge
Sarnak
 
Join Date: Jan 2010
Location: USA
Posts: 51
Default 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?
__________________
Reply With Quote
  #2  
Old 01-10-2012, 07:32 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Perl has a built-in random number generator. http://perlmeme.org/howtos/perlfunc/rand_function.html
Reply With Quote
  #3  
Old 01-10-2012, 10:10 PM
Durge
Sarnak
 
Join Date: Jan 2010
Location: USA
Posts: 51
Default

Thank you, this was very helpful =).
__________________
Reply With Quote
  #4  
Old 01-11-2012, 06:34 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 01-14-2012, 12:46 AM
Durge
Sarnak
 
Join Date: Jan 2010
Location: USA
Posts: 51
Default

Ok, thanks, thats also nice to know
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:30 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3