Attributes increase based on battle conditions

Hi everyone!

I'm breaking my bones to understand js, but it's rlly hard to me. Any way, i'm sure I'll be proefficient (some day).
But if anyone could gimme a little help, i'd be very grateful:

I'm trying to make a system that the attributes of the actor will not increase based on level up, but in what happened to him through the game. For exemple: if he take too much hits from his enimies, his MaxHP and DEF (or MgcDEF when it was magic atk) will be higher; if he use too much mana based attacks (spend too mana points), his MaxMP will increase, and thats so.

I tried use the conditional branch, but there's any condition like "When Actor 'Harold' take damage". I though that would be possible using a script code. Since then, I'm being beaten. Could anyone help me?
'JS Plugin Releases' is where people who have written plugins that they want to share with others can post them.

This might require a plugin, but before moving it to 'JS Plugin Requests', let's see if there is a script call which might do what you are looking for.

Moved to: RPGMaker MV
I can't think of a way to use a script call for this, but I can see how I might write a plugin for it. If no one comes up with anything simpler, I'd be willing to try writing a plugin for you.
Rlly thank u! I'll wait for this paciently hahaha
I'll try not to bore u as well. Thank u, again!

Original thread: https://forums.rpgmakerweb.com/threads/attributes-increase-based-on-battle-conditions.86626/