Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 06-27-2006, 12:49 PM   #1 (permalink)
Forum Novice
 
Join Date: Jun 2005
Location: Turkey
Age: 24
Posts: 106
Default Utility.Random problem?

What is the space of the Utility.Random( 100000 ) 0-99999 or 1-100000 ? Reason of the question is i changed the artifact chance i set to
Code:
if ( boss is DemonKnight && luck >= 1000 )
                chance = 1500 + (luck / 5);
            else if ( luck >= 100000 )
                chance = 750 + (luck / 10);
            else
                chance = 0;
but one player drop the artifact with 649 luck. What should i do ? should i set chance = -1 ? Please tell me
__________________
:confused: Why Dark Jedis Use Light Saber :confused:
hollysong is offline   Reply With Quote
Old 06-27-2006, 01:14 PM   #2 (permalink)
ConnectUO Creator
 
Jeff's Avatar
 
Join Date: Jan 2004
Age: 28
Posts: 4,892
Default

Quote:
Originally Posted by hollysong
What is the space of the Utility.Random( 100000 ) 0-99999 or 1-100000 ? Reason of the question is i changed the artifact chance i set to
Code:
if ( boss is DemonKnight && luck >= 1000 )
                chance = 1500 + (luck / 5);
            else if ( luck >= 100000 )
                chance = 750 + (luck / 10);
            else
                chance = 0;
but one player drop the artifact with 649 luck. What should i do ? should i set chance = -1 ? Please tell me
0-99999 is what it does. if u wanted 1-100000 you need to do Utility.RandomMinMax( 1, 1000000 );
__________________
Jeff Boulanger
ConnectUO - Core Developer

Want to help make ConnectUO better? Click here to submit your ideas/requests
Use your talent to compete against other community members in RunUO hosted coding competitions

If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team.


Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO
Jeff is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5