Detecting actor MP value

I'm making a sort of "Overheat" mechanic for an actor in my game. Is there any free plugin or script, etc. that I can use to detect when my actor's MP is full? (At 5 MP)

I want to both detect it at the very start of the battle, and when his MP is full (I'm using an MP Regen every turn), so I can confuse him and cause him to "Overheat".

I've been working on this specific thing for days and Its so frustrating. All I need is one thing to make it work, as everything else works with his Mechanic.

I also realize that this is going to be hard to do because I'd like it to only be during battle, if possible.
I really need this to work, as this mechanic will be a big part of the story, so please tell me whatever you think will help.
Conditional branch and use this code:

$gameActors.actor(id).mp = $gameActors.actor(id).mmp

human translation:

if Game Actor with ID current mana (mp) is equal to his Maximum Mana value (mmp)
You can do your stuff.

additional things you can use

hp / mhp - life - maximum life
atk - physical attack
mat - magical attack
def - defense
mdf - magic defense
agi - agility
luk - luck

there are also few more parameters you can use, but I don't feel like it to writting, there are here on forum.
Thank you! Ive been trying to get this figured out for a while. I'll see if this works
Lol, you don't need a plugin or script. This is basic variable and conditional branch stuff (check a tutorial if you get lost):

If the actor max MP is static, just store actor MP into a variable, then check in a conditional branch if their MP is equal to 5, and if so, run the event.
If the actor Max MP can be raised, store actor Max MP into one variable, then their current MP into another variable. Next, run a conditional branch that checks whether the current MP value matches the max MP value, and if so, run the event.

Original thread: https://forums.rpgmakerweb.com/threads/detecting-actor-mp-value.125451/