Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

How to add custom exp rate when killing monster?


nasagnilac

Question


  • Group:  Members
  • Topic Count:  89
  • Topics Per Day:  0.02
  • Content Count:  232
  • Reputation:   15
  • Joined:  11/02/13
  • Last Seen:  

I need help on this code and I added it before "pc_gainexp(tmpsd, &md->bl, base_exp, job_exp, 0);" in mob.cpp. I want to customize the drop rate when having autoafk state. Any one can help me if there is a problem in my code since its look like not working.

 

						if(sd->state.autoafk){
							base_exp = base_exp - cap_value(base_exp * ((50 - ((get_percentage(sd->state.fatigue,360)/100)*50))/100), 0, UINT_MAX);
							job_exp = base_exp - cap_value(job_exp * ((50 - ((get_percentage(sd->state.fatigue,360)/100)*50))/100), 0, UINT_MAX);
						}

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  485
  • Reputation:   271
  • Joined:  06/13/17
  • Last Seen:  

As I can see on your code.. you are adjusting exp instead of drop rate..
you should refer to this line when you want to adjust the drop rate.

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