Script to restore set hp/mp

Is there a script that can restore a set amount of hp/mp and perhaps tp when an actor levels?
What's it for? It's easier to make recommendations if you state your intentions.
I'm pretty sure you can do this through events, you don't need a script. :3

Here's how to do it:
Make an event that will play at the very beginning of the game like this one(make sure its second page is blank with the condition that self switch A is on so that you don't get stuck in a loop!):
Spoiler: Initialize Event
Heal Upon Level Up_1.png

Then make a common event that will always be on once its switch is flipped in the first event. You can set how much you'd like the character to heal up! (Just copy and paste the events and edit it to accommodate for other characters too!
Spoiler: Common Event
Heal Upon Level Up_2.png

Hope this was helpful! 👋
Ok do you know if this script can be modified to restore a numerical value of hp/mp (not as a % of hp/mp)
  1. # )----------------------------------------------------------------------------(
  2. # )-- AUTHOR: Mr Trivel --(
  3. # )-- NAME: Level Up Restore --(
  4. # )-- CREATED: 2014-06-17 --(
  5. # )-- VERSION: 1.0 --(
  6. # )----------------------------------------------------------------------------(
  7. # )-- DESCRIPTION --(
  8. # )-- Restores HP & MP on level up. --(
  9. # )----------------------------------------------------------------------------(
  10. # )-- INSTRUCTIONS --(
  11. # )-- Plug & Play, or set values to you liking. --(
  12. # )----------------------------------------------------------------------------(
  13. # )-- LICENSE INFO --(
  14. # )-- http://mrtrivelvx.wordpress.com/terms-of-use/ --(
  15. # )----------------------------------------------------------------------------(

  16. module MrTS
  17. module Level_Up
  18. Restore_HP = 100 #100 - restore HP by 100%
  19. Restore_MP = 100 #100 - restore MP by 100%
  20. end
  21. end

  22. class Game_Actor < Game_Battler

  23. alias mrts_level_up level_up
  24. def level_up
  25. mrts_level_up
  26. @hp += (mhp * (MrTS::Level_Up::Restore_HP/100.0)).to_i
  27. @mp += (mmp * (MrTS::Level_Up::Restore_MP/100.0)).to_i
  28. end
  29. end
change line 29 and 30 to
Code:
self.hp = 999
self.mp = 999
of course, change the number 999 on your liking
Is there a way to have it add hp/mp not set your hp/mp?
.... I forgot to put '+' on it (well, I was after wake up, so)
use this
Code:
self.hp += 999
self.mp += 999
Moved to: RGSS3 Script Requests

Original thread: https://forums.rpgmakerweb.com/threads/script-to-restore-set-hp-mp.92902/