Yanfly's Job points as a variable

Hello, everyone!

I'm using Yanfly's skill learn system and as you may know, it uses job points (jp) as a "currency" for acquiring skills.

My question is, how can I use the party leader's job points as a variable so an NPC tells you different things depending on your current JPs.

I've found something, but I've failed to apply it to my situation:

https://forums.rpgmakerweb.com/index.php?threads/yep-job-points-variables.57325/



The link of the plugin is:

http://yanfly.moe/2015/11/13/yep-27-job-points/


Thanks in advance!!!
It sounds like you want to use a conditional branch, and you need to use the script call listed in the linked thread as part of your condition check. It also sounds like you might need some help figuring out how to write the condition, so I'll break it down:

For example, if you want to see if the party leader has at least 50 job points, your condition would be:
$gameParty.leader().jp() >= 50;

If you want to see if the party leader has between 0 and 50 job points (but not 0 or 50):
($gameParty.leader().jp() < 50 && $gameParty.leader().jp() > 0);

If you want to see if the party leader has 0 job points (it's always safest to include 0 or less just in case something unexpected happens):
$gameParty.leader().jp() <= 0;

If you want to see if the party leader has EXACTLY 17 job points (just as a weird example):
$gameParty.leader().jp() == 17;

Here are what some of the symbols mean:
<= less than or equal to
< strictly less than
== equal to
> strictly greater than
>= greater than or equal to
&& and (used when multiple conditions have to be true)
|| or (used when only one condition needs to be true out of multiples)

It's also worth noting that this looks at the JP for their current class.
If you want to find their JP for a different class, you can put the classID in the jp() function like so:
$gameParty.leader().jp(classId)
I can't say how much you helped me, Llareian. It worked just perfectly. And also you taught me something; I didn't know you could use script calls when making a conditional branch. Thanks, you really helped me.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-job-points-as-a-variable.88076/