YEP AutoPassiveStates

How to make a condition so that the presence in the inventory of a given item with ID XX gives a passive state?

The condition template is like this:


<Custom Passive Condition>

if (user.hp / user.mhp <= 0.25) {

condition = true;

} else {

condition = false;

}

</Custom Passive Condition>
Where it has
Code:
if (user.hp / user.mhp <= 0.25)

Change it to
Code:
if ($gameParty.hasItem($dataItems[id of item you want to check for]))
Thank you very much!
Always happy to help!

Original thread: https://forums.rpgmakerweb.com/threads/yep-autopassivestates.123455/