Amount of mana spent by a player

Hello!
Does anyone knows a way to obtain the number of mana points a player hás already spent?

I want to know this number because in my a stat will grow according to how much mana the character has already spent.

Sorry for my english
I have no idea how to do that without a plugin but it would be a cool thing to keep track of.
If you are a bit JS skilled (unlike me) You can look this plugin :

I know you can play with a reward system acording to the skill used

I've moved this thread to Plugin Requests. Thank you.

you create a variable for it like the skill cost is stored every time a skill is consumed.

Original thread: https://forums.rpgmakerweb.com/threads/amount-of-mana-spent-by-a-player.120937/