Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Rarity Drop Value (Confused)

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 29, 2011
Messages
97
Reaction score
10
I need help regarding the Rarity Percentage Drop of this Rarity functions.
Value of 3000 = 30% Drop?
Value of 1000 = 10% Drop?
Value of 500 = 1% Drop?
Value of 100 = 0.5% Drop?
Value of 10 = 0.1% Drop?

Is this correct? Because i wanted to change it to this Drop Rate:
30% / 20% / 15% / 10% / 5%

It would be appreciated if you can provide the values.


#ifdef __RARITY
// if you want other drop chances for the raritys write me in skype please
DWORD dwRandom = xRandom( 0, 10000 );
if ( dwRandom <= 5390 )
{
return 0;
}
else if (dwRandom > 5390 && dwRandom <= 8390)
{
return 1; // Dusty 30%
}
else if ( dwRandom > 8390 && dwRandom <= 9390 )
{
return 2; // Angelic 10%
}
else if ( dwRandom > 9390 && dwRandom <= 9890 )
{
return 3; // Arctic 1%
}
else if ( dwRandom > 9890 && dwRandom <= 9990 )
{
return 4; // Royal 0,5%
}
else if ( dwRandom > 9990 )
{
return 5; // Mystic 0,1%
}
#endif // __RARITY
 
Inactive
Joined
Jan 20, 2009
Messages
1,015
Reaction score
1,830
If the max drop chance is 10000 "100%" then..

30% = 3000
20% = 2000
15% = 1500
10% = 1000
5% = 500
 
Newbie Spellweaver
Joined
Apr 29, 2011
Messages
97
Reaction score
10
If the max drop chance is 10000 "100%" then..

30% = 3000
20% = 2000
15% = 1500
10% = 1000
5% = 500

So if I will change this
else if ( dwRandom > 8390 && dwRandom <= 9390 )
{
return 2; // Angelic 10%
}

so you mean the value between ( dwRandom > 8390 && dwRandom <=9390 ) should be + 2000? then it would be more than 10000. :blink:
 
Inactive
Joined
Jan 20, 2009
Messages
1,015
Reaction score
1,830
So if I will change this


so you mean the value between ( dwRandom > 8390 && dwRandom <=9390 ) should be + 2000? then it would be more than 10000. :blink:

DWORD dwRandom = xRandom( 0, 10000 );

^ 10,000 is the max chance.

Here:
Code:
#ifdef __RARITY
DWORD dwRandom = xRandom(0, 10000);

if (dwRandom <= 2900)
{
	return 0;
}
else if (dwRandom > 2900 && dwRandom <= 3000)
{
	return 1; // Dusty: 29% - 30%
}
else if (dwRandom > 1900 && dwRandom <= 2000)
{
	return 2; // Angelic: 19% - 20%
}
else if (dwRandom > 1400 && dwRandom <= 1500)
{
	return 3; // Arctic: 14% - 15%
}
else if (dwRandom > 900 && dwRandom <= 1000)
{
	return 4; // Royal: 9% - 10%
}
else if (dwRandom > 500)
{
	return 5; // Mystic: 5%
}
#endif
 
Newbie Spellweaver
Joined
Apr 29, 2011
Messages
97
Reaction score
10
DWORD dwRandom = xRandom( 0, 10000 );

^ 10,000 is the max chance.

Here:
Code:
#ifdef __RARITY
DWORD dwRandom = xRandom(0, 10000);

if (dwRandom <= 2900)
{
	return 0;
}
else if (dwRandom > 2900 && dwRandom <= 3000)
{
	return 1; // Dusty: 29% - 30%
}
else if (dwRandom > 1900 && dwRandom <= 2000)
{
	return 2; // Angelic: 19% - 20%
}
else if (dwRandom > 1400 && dwRandom <= 1500)
{
	return 3; // Arctic: 14% - 15%
}
else if (dwRandom > 900 && dwRandom <= 1000)
{
	return 4; // Royal: 9% - 10%
}
else if (dwRandom > 500)
{
	return 5; // Mystic: 5%
}
#endif

I tried this configuration but its always dropping Mystic Items now even its 5% drop. pretty weird.
 
One word! Im Fawkin Pro!
Loyal Member
Joined
Jul 1, 2010
Messages
1,254
Reaction score
359
dwRandom >= 2900
&
dwRandom <= 500

should fix your problem

let me explain.

dwRandom > 500 means if dwRandom is bigger than 500 (which is between 501 to 10000) it will return 5, which gives it a mystic.

and

dwRandom <= 2900 means if dwRandom is less than 2900 (which is between 0 to 2900) it will return 0, which gives it a common I guess it is(?)

also, this is more accurate Percentage as the first one is giving everything but Mystic 1% chance drop, mystic 95% and common 29%?

Code:
#ifdef __RARITY
DWORD dwRandom = xRandom(0, 10000);

if (dwRandom >= 0 && dwRandom <= 3000)
{
	return 1; // Dusty: 30%
}
else if (dwRandom > 3000 && dwRandom <= 5000)
{
	return 2; // Angelic: 20%
}
else if (dwRandom > 5000 && dwRandom <= 6500)
{
	return 3; // Arctic: 15%
}
else if (dwRandom > 6500 && dwRandom <= 7500)
{
	return 4; // Royal: 10%
}
else if (dwRandom > 7500 && dwRandom <= 8000)
{
	return 5; // Mystic: 5%
}else
{
	return 0; //which in this case would be 20% if the numbers would go negative for some unknown reason, it would be a common
}
#endif

But if I were you, I would go with the following Percentages.

0 = 33%
1 = 23%
2 = 18%
3 = 13%
4 = 8%
5 = 5%

which would look like this:

Code:
#ifdef __RARITY
DWORD dwRandom = xRandom(0, 10000);

if (dwRandom >= 0 && dwRandom <= 2300)
{
	return 1; // Dusty: 23%
}
else if (dwRandom > 2300 && dwRandom <= 4100)
{
	return 2; // Angelic: 18%
}
else if (dwRandom > 4100 && dwRandom <= 5400)
{
	return 3; // Arctic: 13%
}
else if (dwRandom > 5400 && dwRandom <= 6200)
{
	return 4; // Royal: 8%
}
else if (dwRandom > 6200 && dwRandom <= 6700)
{
	return 5; // Mystic: 5%
}else
{
	return 0; //which in this case would be 33% (6700 - 10000) if the numbers would go negative for some unknown reason, it would be a common
}
#endif
 
Last edited:
Status
Not open for further replies.
Back
Top