RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Recover HP/MP/States when Level Up

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 86
Recover HP/MP/States when Level Up
Version 1.0
by Woratana
Release Date: 10/06/2008


Introduction
Here is a little snippet I scripted after lost one VX game. :P
I just think that it should be easier (for player) if actors' status are recover when they level up. :D

Enjoy~  :lol:


Screenshots
-No screenshot-


Script
Place it above main

Code: [Select]
#===============================================================
# ? [VX] ? Recover HP/MP/States when Level Up ? ?
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 10/06/2008
# ? Version: 1.0
#--------------------------------------------------------------
# ? How to use:
# Put this script above main, you can setup script below
#=================================================================

class Game_Actor < Game_Battler
 
  #==================================
  # * SCRIPT SETUP PART
  #----------------------------------
  RECOVER_HP = true # Recover HP when level up? (true/false)
  RECOVER_MP = true # Recover MP when level up?
  REMOVE_STATES = true # Cure all states when level up?
  #==================================
 
  alias wora_fullhpmp_gamact_lvup level_up
  def level_up
    wora_fullhpmp_gamact_lvup
    @hp = maxhp if RECOVER_HP
    @mp = maxmp if RECOVER_MP
    if REMOVE_STATES
      @states.clone.each {|i| remove_state(i) }
    end
  end
end


Instruction
Place the script above main.
You can setup script in setup part if you don't want to recover all HP/MP/states when level up.


Author's Notes
Free for use in your work if credit is included.


Bug Report?
Please give me these informations:
Quote
- What is it says in error window?
- When is it get error? (Right after run game, when you choose something, etc.)
- Do you have any other scripts running in your game that may crash with this script?

***
Rep:
Level 85
... X0X...
COOL!!! Is just What I want!!! Err... How to setup...?

**
Rep:
Level 86
Code: [Select]
  RECOVER_HP = true # Recover HP when level up? (true/false)
  RECOVER_MP = true # Recover MP when level up?
  REMOVE_STATES = true # Cure all states when level up?
Change true to false if you don't want to recover some of these. :D

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
This should be useful for a lot of people. Nice job worale.

*
Resident Cloud
Rep:
Level 91
i love how your scripts are vital features that a maker might want yet there so tiny. Kinda makes me wonder why enterbrain didnt write them :D.

good job

*
Rep: +0/-0Level 85
Thanks alot this is useful for me, and i bet it is for alot of other people

**
Rep:
Level 85
Righteous Script!! so simple, but so great.
yes!