Create a state that triggers under conditions?

Hi, I've been trying to figure this out for quite some time. I'd like to create an Auto-Passive State with yanfly's plugin that triggers when the actor has reached a certain HP / MP threshold in %. For example, if the actor's MP are under 30%, the passive state triggers.

Any help would be very much appreciated ;-;
Just want to help but I might be wrong. I'm way under white belt in script-fu.

http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/
The example is right there at the bottom of the plugin page 😀

State Notetags:
<Custom Passive Condition>
if (user.mhp <= 0.30) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
Now that was exactly what I was looking for.. ugh I can't believe that I didn't see this -.-

Thanks a lot!

Original thread: https://forums.rpgmakerweb.com/threads/create-a-state-that-triggers-under-conditions.75488/