Jump to content
  • 0

How to add condition to mammonite skill?


Mironko

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  02/06/22
  • Last Seen:  

Hi I would like to add condition to mammonite skill, when you will have discount on lvl 10 then your mammonite skill will be for free, and each level of discount will be cheaper...(for example . Discount lvl 1 - Mammonite lvl 10 costs 900, Discount lvl 2 - Mammonite lvl 10 costs 800 and etc ).

How can I do this please? where should I need to make a changes (which files)? ?
It is possible to do that ? Thank you so much for your answer.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  155
  • Reputation:   51
  • Joined:  07/15/13
  • Last Seen:  

Go to src/map/skill.cpp and find

 

	// Check for cost reductions due to skills & SCs
	switch(skill_id) {
		case MC_MAMMONITE:
			if(pc_checkskill(sd,BS_UNFAIRLYTRICK)>0)
				req.zeny -= req.zeny*10/100;
			break;

 

then replace with 

	// Check for cost reductions due to skills & SCs
	switch(skill_id) {
		case MC_MAMMONITE:
			{
				int discount_level = pc_checkskill(sd,MC_DISCOUNT);

				if( discount_level )
					req.zeny -= req.zeny* (10 * discount_level) / 100;
			}
			if(pc_checkskill(sd,BS_UNFAIRLYTRICK)>0)
				req.zeny -= req.zeny*10/100;
			break;

 

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