Jump to content
  • 0

Exp penalty from a specific level


KRMizu

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  29
  • Reputation:   0
  • Joined:  05/26/18
  • Last Seen:  

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

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  29
  • Reputation:   0
  • Joined:  05/26/18
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  02/23/21
  • Last Seen:  

On 4/15/2020 at 12:08 AM, KRMizu said:

Thanks

how about on PRE-NEWAL?

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...