- 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.
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
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 :
You must be registered to see links
sorry bad english