Jump to content
  • 0
KRMizu

Exp penalty from a specific level

Question

I would like to make the last 5 levels of my server very difficult but I do not know how, Is it possible to add an exp penalty from a specific level? If so, how? 
 

Edited by Mael
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

https://github.com/rathena/rathena/blob/652d77eb0287a13fca25d47eb5317de1b538fe87/src/map/mob.cpp#L2665-L2673

modify it into something like this.

	int rate = pc_level_penalty_mod(md->level - tmpsd[i]->status.base_level, md->status.class_, md->status.mode, 1);
	if (tmpsd[i]->status.base_level >= (MAX_LEVEL - 5))
		rate = 50; // reduce EXP rate by half for last 5 base level.
	if (rate != 100) {
		if (base_exp)
			base_exp = (unsigned int)cap_value(apply_rate(base_exp, rate), 1, UINT_MAX);
		if (job_exp)
			job_exp = (unsigned int)cap_value(apply_rate(job_exp, rate), 1, UINT_MAX);
	}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
On 4/10/2020 at 2:41 PM, Emistry said:

https://github.com/rathena/rathena/blob/652d77eb0287a13fca25d47eb5317de1b538fe87/src/map/mob.cpp#L2665-L2673

modify it into something like this.

	int rate = pc_level_penalty_mod(md->level - tmpsd[i]->status.base_level, md->status.class_, md->status.mode, 1);
	if (tmpsd[i]->status.base_level >= (MAX_LEVEL - 5))
		rate = 50; // reduce EXP rate by half for last 5 base level.
	if (rate != 100) {
		if (base_exp)
			base_exp = (unsigned int)cap_value(apply_rate(base_exp, rate), 1, UINT_MAX);
		if (job_exp)
			job_exp = (unsigned int)cap_value(apply_rate(job_exp, rate), 1, UINT_MAX);
	}

 

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.