qwer.ty 2 Report post Posted August 14, 2019 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. Quote Share this post Link to post Share on other sites
Avatar 0 Report post Posted August 15, 2019 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. Quote Share this post Link to post Share on other sites
qwer.ty 2 Report post Posted August 15, 2019 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. :) Quote Share this post Link to post Share on other sites