Quick HP Variable and State help

Does anyone know the script call to see if certain actor's HP is below 50% or whatever. And does anyone know the script call to tell if a certain actor has a certain state applied to them? I tried the one given in the script call spreadsheet but it doesn't work, and the HP one isn't there.
$gameActors.actor(x).hp / $gameActors.actor(x).mhp * 100 <= 50


$gameActors.actor(x).isStateAffected(State Id);
$gameActors.actor(x).hp / $gameActors.actor(x).mhp * 100 <= 50


$gameActors.actor(x).isStateAffected(State Id);

Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/quick-hp-variable-and-state-help.63407/