Jump to content

I want the expin level that comes to the person who cuts the mob to be not more than 10%


Recommended Posts

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

17 minutes ago, TMP4 said:

char_battle.cpp above this: to->PointChange(POINT_EXP, iExp, true);

Paste this:

if ((to->GetNextExp() / 10) > iExp)     iExp = to->GetNextExp() / 10;


if ((to->GetNextExp() / 10) > iExp)
    iExp = to->GetNextExp() / 10;

Edit: Tested, working. A wild dog gives 30xp when lv2 needs 300.


For example, when the level is 60,
If the exp for the level 61 is 500.000

exp from cut mob 10.000

if 10.000/10=1000
isn't he doing it?

Link to comment
Share on other sites

  • Contributor

I think you misunderstand it.

GetNextExp() does not calculates the needed amount, but it calculates the whole exp from 60 to 61 if the player is level 60.

See: 

DWORD CHARACTER::GetNextExp() const
{
	if (PLAYER_EXP_TABLE_MAX < GetLevel())
		return 2500000000;
	else
		return exp_table[GetLevel()];
}

So if the exp is 500.000 in your exp table for lv61, then a mob can't give you more then 50.000 with my code what is 10 percent as you asked.

That's what you want, isn't it?

Edited by TMP4
Link to comment
Share on other sites

20 hours ago, TMP4 said:

I think you misunderstand it.

GetNextExp() does not calculates the needed amount, but it calculates the whole exp from 60 to 61 if the player is level 60.

See: 

DWORD CHARACTER::GetNextExp() const { if (PLAYER_EXP_TABLE_MAX < GetLevel()) return 2500000000; else return exp_table[GetLevel()]; }


DWORD CHARACTER::GetNextExp() const
{
	if (PLAYER_EXP_TABLE_MAX < GetLevel())
		return 2500000000;
	else
		return exp_table[GetLevel()];
}

So if the exp is 500.000 in your exp table for lv61, then a mob can't give you more then 50.000 with my code what is 10 percent as you asked.

That's what you want, isn't it?

 

char_battle.cpp I arranged the way you say.  : F4wWpz.png

 

the problem did not improve :

 

 

must be :

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Contributor

EDIT: Found your error, you have this:

#define ENABLE_NEWEXP_CALCULATION
#ifdef ENABLE_NEWEXP_CALCULATION

Please edit this ifdef's code too and it will working.

(Line 2634 for you)

    {
        to->PointChange(POINT_EXP, iExp, true);
        from->CreateFly(FLY_EXP, to);
    }

Modify:

    {
        if ((to->GetNextExp() / 10) > iExp)
            iExp = to->GetNextExp() / 10;
        
        to->PointChange(POINT_EXP, iExp, true);
        from->CreateFly(FLY_EXP, to);
    }

 

@creedy Tag you because idk if you see i edited this.

Edited by TMP4
Link to comment
Share on other sites

3 hours ago, TMP4 said:

EDIT: Found your error, you have this:

#define ENABLE_NEWEXP_CALCULATION #ifdef ENABLE_NEWEXP_CALCULATION


#define ENABLE_NEWEXP_CALCULATION
#ifdef ENABLE_NEWEXP_CALCULATION

Please edit this ifdef's code too and it will working.

(Line 2634 for you)

    {         to->PointChange(POINT_EXP, iExp, true);         from->CreateFly(FLY_EXP, to);     }


    {
        to->PointChange(POINT_EXP, iExp, true);
        from->CreateFly(FLY_EXP, to);
    }

Modify:

    {         if ((to->GetNextExp() / 10) > iExp)             iExp = to->GetNextExp() / 10;                  to->PointChange(POINT_EXP, iExp, true);         from->CreateFly(FLY_EXP, to);     }


    {
        if ((to->GetNextExp() / 10) > iExp)
            iExp = to->GetNextExp() / 10;
        
        to->PointChange(POINT_EXP, iExp, true);
        from->CreateFly(FLY_EXP, to);
    }

 

@creedy Tag you because idk if you see i edited this.

 

char_battle.cpp : https://paste.tc/Nwo3jSo20O

I edited it as you said but it didn't happen again
Edited by creedy
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.