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!

[Development] Max Level User MuEMU

Experienced Elementalist
Joined
Apr 2, 2009
Messages
220
Reaction score
54
Hello, here we are working on the season 6 version to be able to increase it to level 1000

Here I leave the GS code to be able to use it at the mill level.

All that remains is to fix the client's DWORD.

To avoid logging in the experience bar and in stats, to fix the problem of experience gained.

Code:
ServerInfo.h
int m_MaxUserLevel;


Code:
ServerInfo.cpp
the 1000 depends on your #define MAX_USER_LEVEL


this->m_MaxUserLevel = GetPrivateProfileInt(section, "MaxUserLevel", 1000, path)

Code:
ObjectManager.cpp
bool CObjectManager::CharacterLevelUp(LPOBJ lpObj,DWORD AddExperience,int MaxLevelUp,int ExperienceType) // OK
{
	if(gMasterSkillTree.CheckMasterLevel(lpObj) == 0)
	{
		//if(lpObj->Level >= MAX_CHARACTER_LEVEL)
		if (lpObj->Level >= gServerInfo.m_MaxUserLevel)
		{
			gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(266));
			return 1;
		}

		if((lpObj->Experience+AddExperience) < lpObj->NextExperience)
		{
			lpObj->Experience += AddExperience;
			return 0;
		}

		while(true)
		{
			lpObj->Level++;

			lpObj->LevelUpPoint += gServerInfo.m_LevelUpPoint[lpObj->Class];

			lpObj->LevelUpPoint += ((lpObj->Level>220)?((gQuest.CheckQuestListState(lpObj,2,QUEST_FINISH)==0)?0:gServerInfo.m_PlusStatPoint):0);

			AddExperience -= (((--MaxLevelUp)==0)?AddExperience:(lpObj->NextExperience-lpObj->Experience));

			lpObj->Experience = lpObj->NextExperience;

			gObjCalcExperience(lpObj);

			if (gServerInfo.m_CustomRankUserType == 2)
			{
				gCustomRankUser.CheckUpdate(lpObj);
			}

			//if(lpObj->Level >= MAX_CHARACTER_LEVEL)
			if (lpObj->Level >= gServerInfo.m_MaxUserLevel)

			{
				AddExperience = 0;
				break;
			}

			if (lpObj->MasterLevel >= gServerInfo.m_MasterSkillTreeMaxLevel)
			{
				AddExperience = 0;
				break;
			}

			if((lpObj->Experience+AddExperience) < lpObj->NextExperience)
			{
				lpObj->Experience += AddExperience;
				break;
			}
		}

		this->CharacterCalcAttribute(lpObj->Index);

		lpObj->Life = lpObj->MaxLife+lpObj->AddLife;

		lpObj->Mana = lpObj->MaxMana+lpObj->AddMana;

		lpObj->BP = lpObj->MaxBP+lpObj->AddBP;

		lpObj->Shield = lpObj->MaxShield+lpObj->AddShield;

		gCustomRankUser.GCReqRankLevelUser(lpObj->Index, lpObj->Index);

		GCLevelUpSend(lpObj);
	}
	else
	{
		if(lpObj->MasterLevel >= gServerInfo.m_MasterSkillTreeMaxLevel)
		{
			gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(267));
			return 1;
		}

		if((lpObj->MasterExperience+AddExperience) < lpObj->MasterNextExperience)
		{
			lpObj->MasterExperience += AddExperience;
			return 0;
		}

		while(true)
		{
			lpObj->MasterLevel++;

			lpObj->MasterPoint += gServerInfo.m_MasterSkillTreePoint;

			AddExperience -= (((--MaxLevelUp)==0)?AddExperience:(DWORD)(lpObj->MasterNextExperience-lpObj->MasterExperience));

			lpObj->MasterExperience = lpObj->MasterNextExperience;

			gObjCalcExperience(lpObj);

			if (gServerInfo.m_CustomRankUserType == 2)
			{
				gCustomRankUser.CheckUpdate(lpObj);
			}

			if(lpObj->MasterLevel >= gServerInfo.m_MasterSkillTreeMaxLevel)
			{
				AddExperience = 0;
				break;
			}

			if((lpObj->MasterExperience+AddExperience) < lpObj->MasterNextExperience)
			{
				lpObj->MasterExperience += AddExperience;
				break;
			}
		}

		this->CharacterCalcAttribute(lpObj->Index);

		lpObj->Life = lpObj->MaxLife+lpObj->AddLife;

		lpObj->Mana = lpObj->MaxMana+lpObj->AddMana;

		lpObj->BP = lpObj->MaxBP+lpObj->AddBP;

		lpObj->Shield = lpObj->MaxShield+lpObj->AddShield;

		gMasterSkillTree.GCMasterLevelUpSend(lpObj);

		gCustomRankUser.GCReqRankLevelUser(lpObj->Index, lpObj->Index);
	}

	if((GetTickCount()-lpObj->CharSaveTime) > 60000)
	{
		lpObj->CharSaveTime = GetTickCount();
		GDCharacterInfoSaveSend(lpObj->Index);
	}

	return 1;
}

Code:
User.cpp
void gObjSetExperienceTable() // OK
{
	gLevelExperience[0] = 0;

	int over = 1;

	for (int n = 1; n <= MAX_CHARACTER_LEVEL; n++)
	{

		gLevelExperience[n] += (((over + 9)*over)*over) * 2 + (over + 9)*over*over * 1;

		over++;
	}
}

Code:
Common.dat


MaxUserLevel = 1000


It is only necessary to fix the part of the client if someone wants to collaborate and at once break the monopoly with this grateful system.


MUEMU Main 1.04E
Link main :

sorry bad english ;)
 
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,280
Hello, here we are working on the season 6 version to be able to increase it to level 1000

Here I leave the GS code to be able to use it at the mill level.

All that remains is to fix the client's DWORD.

To avoid logging in the experience bar and in stats, to fix the problem of experience gained.

Code:
ServerInfo.h
int m_MaxUserLevel;


Code:
ServerInfo.cpp
the 1000 depends on your #define MAX_USER_LEVEL


this->m_MaxUserLevel = GetPrivateProfileInt(section, "MaxUserLevel", 1000, path)

Code:
ObjectManager.cpp
bool CObjectManager::CharacterLevelUp(LPOBJ lpObj,DWORD AddExperience,int MaxLevelUp,int ExperienceType) // OK
{
    if(gMasterSkillTree.CheckMasterLevel(lpObj) == 0)
    {
        //if(lpObj->Level >= MAX_CHARACTER_LEVEL)
        if (lpObj->Level >= gServerInfo.m_MaxUserLevel)
        {
            gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(266));
            return 1;
        }

        if((lpObj->Experience+AddExperience) < lpObj->NextExperience)
        {
            lpObj->Experience += AddExperience;
            return 0;
        }

        while(true)
        {
            lpObj->Level++;

            lpObj->LevelUpPoint += gServerInfo.m_LevelUpPoint[lpObj->Class];

            lpObj->LevelUpPoint += ((lpObj->Level>220)?((gQuest.CheckQuestListState(lpObj,2,QUEST_FINISH)==0)?0:gServerInfo.m_PlusStatPoint):0);

            AddExperience -= (((--MaxLevelUp)==0)?AddExperience:(lpObj->NextExperience-lpObj->Experience));

            lpObj->Experience = lpObj->NextExperience;

            gObjCalcExperience(lpObj);

            if (gServerInfo.m_CustomRankUserType == 2)
            {
                gCustomRankUser.CheckUpdate(lpObj);
            }

            //if(lpObj->Level >= MAX_CHARACTER_LEVEL)
            if (lpObj->Level >= gServerInfo.m_MaxUserLevel)

            {
                AddExperience = 0;
                break;
            }

            if (lpObj->MasterLevel >= gServerInfo.m_MasterSkillTreeMaxLevel)
            {
                AddExperience = 0;
                break;
            }

            if((lpObj->Experience+AddExperience) < lpObj->NextExperience)
            {
                lpObj->Experience += AddExperience;
                break;
            }
        }

        this->CharacterCalcAttribute(lpObj->Index);

        lpObj->Life = lpObj->MaxLife+lpObj->AddLife;

        lpObj->Mana = lpObj->MaxMana+lpObj->AddMana;

        lpObj->BP = lpObj->MaxBP+lpObj->AddBP;

        lpObj->Shield = lpObj->MaxShield+lpObj->AddShield;

        gCustomRankUser.GCReqRankLevelUser(lpObj->Index, lpObj->Index);

        GCLevelUpSend(lpObj);
    }
    else
    {
        if(lpObj->MasterLevel >= gServerInfo.m_MasterSkillTreeMaxLevel)
        {
            gNotice.GCNoticeSend(lpObj->Index,1,0,0,0,0,0,gMessage.GetMessage(267));
            return 1;
        }

        if((lpObj->MasterExperience+AddExperience) < lpObj->MasterNextExperience)
        {
            lpObj->MasterExperience += AddExperience;
            return 0;
        }

        while(true)
        {
            lpObj->MasterLevel++;

            lpObj->MasterPoint += gServerInfo.m_MasterSkillTreePoint;

            AddExperience -= (((--MaxLevelUp)==0)?AddExperience:(DWORD)(lpObj->MasterNextExperience-lpObj->MasterExperience));

            lpObj->MasterExperience = lpObj->MasterNextExperience;

            gObjCalcExperience(lpObj);

            if (gServerInfo.m_CustomRankUserType == 2)
            {
                gCustomRankUser.CheckUpdate(lpObj);
            }

            if(lpObj->MasterLevel >= gServerInfo.m_MasterSkillTreeMaxLevel)
            {
                AddExperience = 0;
                break;
            }

            if((lpObj->MasterExperience+AddExperience) < lpObj->MasterNextExperience)
            {
                lpObj->MasterExperience += AddExperience;
                break;
            }
        }

        this->CharacterCalcAttribute(lpObj->Index);

        lpObj->Life = lpObj->MaxLife+lpObj->AddLife;

        lpObj->Mana = lpObj->MaxMana+lpObj->AddMana;

        lpObj->BP = lpObj->MaxBP+lpObj->AddBP;

        lpObj->Shield = lpObj->MaxShield+lpObj->AddShield;

        gMasterSkillTree.GCMasterLevelUpSend(lpObj);

        gCustomRankUser.GCReqRankLevelUser(lpObj->Index, lpObj->Index);
    }

    if((GetTickCount()-lpObj->CharSaveTime) > 60000)
    {
        lpObj->CharSaveTime = GetTickCount();
        GDCharacterInfoSaveSend(lpObj->Index);
    }

    return 1;
}

Code:
User.cpp
void gObjSetExperienceTable() // OK
{
    gLevelExperience[0] = 0;

    int over = 1;

    for (int n = 1; n <= MAX_CHARACTER_LEVEL; n++)
    {

        gLevelExperience[n] += (((over + 9)*over)*over) * 2 + (over + 9)*over*over * 1;

        over++;
    }
}

Code:
Common.dat


MaxUserLevel = 1000


It is only necessary to fix the part of the client if someone wants to collaborate and at once break the monopoly with this grateful system.


MUEMU Main 1.04E
Link main :

sorry bad english ;)

English:

All newbies today. They do not know how to correctly find information about the problems/bugs they have with their MU servers/clients in this forum. that is why the MU community is in decadence. In any case, this Link that I am going to leave you lacks the necessary images to fully understand the Guide that must be followed (step by step). but even so if you are not so noob you will be able to do something with this.

PS: I know that this Guide is not to make fix the max level of the character into the main.exe, it's for Experience calc, but anyways the calc for the Character Experience and the Level of the Character's are related.

Good Luck !

Pics (Related to your Request):

Oj6X9za - [Development] Max Level User MuEMU - RaGEZONE Forums


1qHq2yc - [Development] Max Level User MuEMU - RaGEZONE Forums


Link of original thread created by: Gembrid


http://forum.ragezone.com/f196/fixing-experience-bar-bug-397716/

Spanish:

Todos los novatos de hoy. No saben cómo encontrar correctamente la información sobre los problemas/errores que tienen con sus servidores/clientes de MU en este foro. por eso la comunidad de MU está en decadencia. En cualquier caso, este Link que les voy a dejar carece de las imágenes necesarias para comprender en su totalidad la Guía que se debe seguir (paso a paso). pero aun así, si no eres tan novato podrás hacer algo con esto.

PD: Sé que esta guía no es para arreglar el nivel máximo del personaje en el main.exe, es para el cálculo de experiencia, pero de todos modos el cálculo para la experiencia del personaje y el nivel del personaje están relacionados.

Buena Suerte !

Imagenes (relacionadas a tu pedido):

Oj6X9za - [Development] Max Level User MuEMU - RaGEZONE Forums


1qHq2yc - [Development] Max Level User MuEMU - RaGEZONE Forums


Vinculo del Tema Originalmente creado por: Gembrid


http://forum.ragezone.com/f196/fixing-experience-bar-bug-397716/
 

Attachments

You must be registered for see attachments list
Joined
Nov 4, 2012
Messages
928
Reaction score
544
In my tests need only to fix experience table at gameserver, in versions with master skill tree to get correctly work without changes in main side.

Ps. i found at some place a experience table calculator based on level but i did not remember where is.

Edit: Found it
 

Attachments

You must be registered for see attachments list
Back
Top