Jump to content
Sign in to follow this  
qwer.ty

Spirit to Min/Max Attack

Recommended Posts

Hello, how to increase min/max attack when adding spirit attribute and must be effective only if the player is Cleric, SM, or Voy. The idea is to have fair normal attack for magic types. Thanks in advance.

Share this post


Link to post
Share on other sites

There are some different approaches to achieve what you desire, if I understood you correctly. 

 

One simple way I can think of is the following:

 

In AttrCalculate.lua, locate the function "ExAttrCheck(role)" .

After the local variables declarations, add the following:

	if job == JOB_TYPE_SHENGZHIZHE or job == JOB_TYPE_HANGHAISHI or job == JOB_TYPE_FENGYINSHI then
		mnatk = mnatk + (Sta(role) * 1 + math.pow(math.floor( Sta(role)*4/20), 2 ))  --  Or whatever formula you want to use for minimum attack
		mxatk = mxatk + (Sta(role) * 1 + math.pow(math.floor( Sta(role)*4/20), 2 ))  --  Or whatever formula you want to use for maximum attack
	end

I haven't tested it tho. 

Share this post


Link to post
Share on other sites
5 hours ago, Avatar said:

There are some different approaches to achieve what you desire, if I understood you correctly. 

 

One simple way I can think of is the following:

 

In AttrCalculate.lua, locate the function "ExAttrCheck(role)" .

After the local variables declarations, add the following:


	if job == JOB_TYPE_SHENGZHIZHE or job == JOB_TYPE_HANGHAISHI or job == JOB_TYPE_FENGYINSHI then
		mnatk = mnatk + (Sta(role) * 1 + math.pow(math.floor( Sta(role)*4/20), 2 ))  --  Or whatever formula you want to use for minimum attack
		mxatk = mxatk + (Sta(role) * 1 + math.pow(math.floor( Sta(role)*4/20), 2 ))  --  Or whatever formula you want to use for maximum attack
	end

I haven't tested it tho. 

Thank you so much. This works perfectly. :)

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Sign in to follow this  

×
×
  • Create New...