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!

[Release] Adjust Level Gap For Item & Penya Drop

Experienced Elementalist
Joined
Feb 21, 2012
Messages
285
Reaction score
26
Hello, this be quick.

WorldServer -> CMover::DropItem( CMover* pAttacker )

Next to this if statement:
Code:
if( prj.m_EventLua.IsEventSpawnMonster( lpMoverProp->dwID ) )
				bAdjDropRate = FALSE;
You see this:
Code:
if( bAdjDropRate )
			{
				int d	= pAttacker->m_nLevel - (int)lpMoverProp->dwLevel;
				if( d <= 1 )	{	nProbability	= 100;	nPenyaRate	= 100;	}
				else if( d <= 2 )	{	nProbability	= 80;	nPenyaRate	= 100;	}
				else if( d <= 4 )	{	nProbability	= 60;	nPenyaRate	= 80;	}
				else if( d <= 7 )	{	nProbability	= 30;	nPenyaRate	= 65;	}
				else	{	nProbability	= 10;	nPenyaRate	= 50;	}
			}

The code should explain it. As to mine, I want it to be max gap of 9 with different drop chance for the item/s and penye. I made it to this:
Code:
if (bAdjDropRate) {
    static const int values[] = {100, 100, 90, 80, 70, 60, 50, 50, 50, 50};
    int d = pAttacker->m_nLevel - (int)lpMoverProp->dwLevel;
    nProbability = nPenyaRate = (d >= 1 && d <= 9) ? values[d] : 0;
}

~Flies awayy
 
Back
Top