Help with Yanfly Base Parameter Control

I've been attempting to set this up so I can have altered parameters on enemies based on a variable roll. I'm trying to use the Lunatic part to set this up but I'm having no luck. If anyone is familiar with this script and could tell me how to set this up I would be grateful. For testing purposes I have troop 1 as bat*2. If someone could tell me how to setup: "battler = $gameTroop.members()[2];"in a script call and then do I do a script call for "battler.setMaxHp(x)" or is it a plugin command? So far I'm getting setMaxHP is undefined as an error. Thanks for any help!
If setMaxHp is undefined, you're not returning a legal number. First, is the code you're using setMaxHp() [without a capitalized p] or setMaxHP() [with a capitalized P]? The p shouldn't be capitalized. If it is, that may be the problem.
Here is a screenshot of what I have. Currently engaging the enemy does nothing but put me in a fight with standard bats no matter which roll i get. It does not add Hp or Atk.
First, those setMaxHp and setAtk should be script commands, not plugin commands. Next, variables can only be a number. I don't think you can't set it to an enemy like that. Also, the script needs to set the battler to a variable (not a game variable) to set the stats, and I think you have to be in the battle to set that, so I'd try doing that part in the start of the battle event.

The script should look something like this:
var members = $gameTroop.members();
for (var i = 0; i < members.length; i++) {
var member = members[i ];
if (member && $gameVariables.value >= 76) {
member.setMaxHp(300);
member.gainHp(300);
} else if (member && $gameVariables.value >= 11) {
member.setMaxHp(900);
member.setAtk(999);
member.gainHp(900);
}
}

Try that, see if it works.
@shockra Variables can be anything, inculding javascript evals.
To use a variable like how @Braxillian was trying to do would be this in the script call:

$gameVariables.value(10).setMaxHp(900);

Original thread: https://forums.rpgmakerweb.com/threads/help-with-yanfly-base-parameter-control.76692/