Relevant to this post, I'm using "YEP_ItemCore," YEP_X_AttachAugments," and "YEP_JobPoints" plugins. Links below:
www.yanfly.moe
www.yanfly.moe
www.yanfly.moe
Bottom line up front, I'm trying to create an augment that provides the user with a MaxHP stat boost based on their number of Job Points (+10% up to +50% MHP boost), which removes the effect if the augment is detached.
My failed script is below:
Community assistance is greatly appreciated.
Item Core (YEP) - Yanfly.moe Wiki
Attachable Augments (YEP) - Yanfly.moe Wiki
Job Points (YEP) - Yanfly.moe Wiki
Bottom line up front, I'm trying to create an augment that provides the user with a MaxHP stat boost based on their number of Job Points (+10% up to +50% MHP boost), which removes the effect if the augment is detached.
My failed script is below:
JavaScript:
<Augment Attach Eval: Essence>
if (user.jp()>=50000) {
item.params[0] += 0.5*user.mhp;
} else if (user.jp()>=40000) {
item.params[0] += 0.4*user.mhp;
} else if (user.jp()>=30000) {
item.params[0] += 0.3*user.mhp;
} else if (user.jp()>=20000) {
item.params[0] += 0.2*user.mhp;
} else if (user.jp()>=0) {
item.params[0] += 0.1*user.mhp;
}
</Augment Attach Eval: Essence>
<Augment Detach Eval: Essence>
if (user.jp()>=50000) {
item.params[0] -= 0.5*user.mhp;
} else if (user.jp()>=40000) {
item.params[0] -= 0.4*user.mhp;
} else if (user.jp()>=30000) {
item.params[0] -= 0.3*user.mhp;
} else if (user.jp()>=20000) {
item.params[0] -= 0.2*user.mhp;
} else if (user.jp()>=0) {
item.params[0] -= 0.1*user.mhp;
}
</Augment Detach Eval: Essence>
Community assistance is greatly appreciated.