[Request] Formula for upgrading item level

05/09/2011 02:29 AndreaCo#1
Hey what is the formula to determine the amount of mets you need to upgrade an item level.

Thanks in advance :)
05/09/2011 04:14 CptSky#2
Code:
int Amount = 100 / Chance + 1;
The amount is related to the chance you have to upgrade at TC. I have the official algorithm somewhere, but I can't find it at the moment.
05/09/2011 06:22 Spirited42#3
Quote:
Originally Posted by CptSky View Post
Code:
int Amount = 100 / Chance + 1;
The amount is related to the chance you have to upgrade at TC. I have the official algorithm somewhere, but I can't find it at the moment.
If they have the same thing in the EO client, then we could just look into that source. I've never played EO.
05/09/2011 08:30 pro4never#4
They do have a similar system. Red/yellow stones instead of db's/+1's... I forget what it is for level upgrade... blue? O_o
05/09/2011 08:40 Spirited42#5
Quote:
Originally Posted by pro4never View Post
They do have a similar system. Red/yellow stones instead of db's/+1's... I forget what it is for level upgrade... blue? O_o
._. ... what?
that's weird..
05/09/2011 09:22 pro4never#6
It's violet or purple stones for level upgrade now that I think of it... Violet stones sounds right :P
05/09/2011 10:22 Spirited42#7
Quote:
Originally Posted by pro4never View Post
It's violet or purple stones for level upgrade now that I think of it... Violet stones sounds right :P
TQ is so creative..
05/09/2011 11:52 |NeoX#8
Quote:
Originally Posted by Spirited View Post
TQ is so creative..
TQ does LSD.
05/09/2011 15:27 nTL3fTy#9
Quote:
Originally Posted by CptSky View Post
Code:
int Amount = 100 / Chance + 1;
The amount is related to the chance you have to upgrade at TC. I have the official algorithm somewhere, but I can't find it at the moment.
And this is where the chance comes from:
Code:
bool CUser::GetUpEpLevelInfo	(CItem* pItem, int& nChance, OBJID& idNewType, bool bSendHint/*=false*/)
{
	idNewType = this->ChkUpEqLevel(pItem, bSendHint);
	if (ID_NONE == idNewType)
		return false;

	OBJID idType = pItem->GetInt(ITEMDATA_TYPE);

	nChance = 100;
	if (pItem->IsShield() || pItem->IsArmor() || pItem->IsHelmet())
	{
		int nLev = (idType%100)/10;
		switch(nLev)
		{
		case 5:
			nChance = 50;
			break;

		case 6:
			nChance = 40;
			break;

		case 7:
			nChance = 30;
			break;

		case 8:
		case 9:
			nChance = 20;
			break;

		default:
			nChance = 500;
			break;
		}

		int nQuality = idType%10;
		switch(nQuality)
		{
		case 6:
			nChance = nChance*90/100;
			break;

		case 7:
			nChance = nChance*70/100;
			break;
			
		case 8:
			nChance = nChance*30/100;
			break;
			
		case 9:
			nChance = nChance*10/100;
			break;
			
		default:
			break;
		}
	}
	else
	{		
		int nLev = (idType%1000)/10;
		switch(nLev)
		{
		case 11:
			nChance = 95;
			break;
			
		case 12:
			nChance = 90;
			break;
			
		case 13:
			nChance = 85;
			break;
			
		case 14:
			nChance = 80;
			break;
			
		case 15:
			nChance = 75;
			break;
			
		case 16:
			nChance = 70;
			break;
			
		case 17:
			nChance = 65;
			break;
			
		case 18:
			nChance = 60;
			break;
			
		case 19:
			nChance = 55;
			break;
			
		case 20:
			nChance = 50;
			break;
			
		case 21:
			nChance = 45;
			break;
			
		case 22:
			nChance = 40;
			break;
			
		default:
			nChance = 500;
			break;
		}
		
		int nQuality = idType%10;
		switch(nQuality)
		{
		case 6:
			nChance = nChance*90/100;
			break;

		case 7:
			nChance = nChance*70/100;
			break;
			
		case 8:
			nChance = nChance*30/100;
			break;
			
		case 9:
			nChance = nChance*10/100;
			break;
			
		default:
			break;
		}
	}

	// change range
	nChance = __min(100, __max(1, nChance));
	return true;
}