Skill which requires 3 states

● ARCHIVED · READ-ONLY
Started by Reirid 3 posts View original ↗
  1. Hi

    I'm trying to make a skill that only shows up when 3 specific states are on the user. I've using Yanfly's states plugin and have used a bit of code, which works if the user has 1 state on. I've tried changing it about and i'm not having one luck.
    Code:
    <Custom Show Eval>
    if (user.isStateAffected(86)) {
    visible = true;
    } else {
    visible = false;
    }
    </Custom Show Eval>

    That's the code im using if the user has one state on, the skill appears. Is there anyway to amend it to only appear if 3 states are on?

    Thanks
  2. I think you can use this:
    Code:
    if (user.isStateAffected(x) && user.isStateAffected(y) && user.isStateAffected(z)) {
    Change x, y, z to your state IDs. It will require all three states.
  3. That has worked, thanks you very much :D