[Development] Max Level User MuEMU

Results 1 to 5 of 5
  1. #1
    Ultimate Member Odisk is offline
    MemberRank
    Apr 2009 Join Date
    VenezuelaLocation
    162Posts

    Support [Development] Max Level User MuEMU

    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 : https://www.mediafire.com/file/isenw.../main.exe/file

    sorry bad english ;)


  2. #2
    #ChangeBrazil SmileYzn is offline
    True MemberRank
    Nov 2012 Join Date
    0x00401000Location
    918Posts

    Re: (developer) Max Level User MuEMU

    gObjSetExperienceTable is wrong.

    monopoly? heehhe

  3. #3
    Member jhonhy is offline
    MemberRank
    Dec 2010 Join Date
    63Posts

    Re: [Development] Max Level User MuEMU

    the code works 100% but it bugged the exp bar

  4. #4
    Darkness Member Kiosani is online now
    True MemberRank
    Oct 2007 Join Date
    ArgentinaLocation
    1,224Posts

    cool Re: [Development] Max Level User MuEMU

    Quote Originally Posted by Odisk View Post
    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 : https://www.mediafire.com/file/isenw.../main.exe/file

    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):





    Link of original thread created by: Gembrid


    http://forum.ragezone.com/f196/fixin...ar-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):





    Vinculo del Tema Originalmente creado por: Gembrid


    http://forum.ragezone.com/f196/fixin...ar-bug-397716/

  5. #5
    #ChangeBrazil SmileYzn is offline
    True MemberRank
    Nov 2012 Join Date
    0x00401000Location
    918Posts

    Re: [Development] Max Level User MuEMU

    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
    Attached Files Attached Files



Advertisement