So, I'm working on making a trainer for myself (and possibly for the public), but I have a problem.

I'm making trainer for Dungeon Defenders (First game), I have figured out the level up thing, but I keep having issues with mana that you use in the actual match, I can set it to 2k, but each time I use it, it goes down, so I am having a sort of hard time wtf should I do.

Note: I have not coded for a very long time, probably about 12-13 years.