How to down HP and MP at the same time?

First of all, sorry for my bad English.

I am looking for a way for the enemies, with their attacks, to lower the HP and MP at the same time of the characters.

I've tried it with common events, but it doesn't work.

Can anybody help me?
I've done this in my game, though you won't be able to have both be based on a formula. What I did was I set my HP damage to be based on a formula, then in effects for the skill they are using I checked MP recovery and put in a negative number. The negative number will turn into damage of that much MP (or that % of MP if you use the percent option).

You could also reverse that and use MP damage based on a formula and the HP damage based on a negative HP recovery effect.
The solution was simpler than I expected.
Thank you very much for your help!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-down-hp-and-mp-at-the-same-time.122022/