Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # [RGSS/2] Recover on Level Up
- # Last Update : 17/5/2012
- # Version : 1.1
- # Author : LowlingLife
- #==============================================================================
- # Nge-recover HP, SP, atau State kalau level-up
- #==============================================================================
- # CHANGELOG
- # V.1.0 | Original Release
- # V.1.1 | Cross-Engined
- #==============================================================================
- module LevelUpRecover
- RECOVER_HP = true # Set ke true jika ingin recover HP saat level up.
- RECOVER_MP = true # Set ke true jika ingin recover SP saat level up.
- RECOVER_STATE = true # Set ke true jika ingin recover State saat level up.
- end
- #==============================================================================
- # EDITING BEYOND THIS LINE CAN CAUSE DAMAGE TO YOUR GAME, THEREFORE EDIT
- # WITH YOUR OWN RISK.
- #==============================================================================
- VX = defined?(Window_ActorCommand)
- level_def = VX ? "change_exp" : "exp="
- hp_max = VX ? "maxhp" : "self.maxhp"
- sp_max = VX ? "@mp = maxmp" : "@sp = self.maxsp"
- eval"
- class Game_Actor < Game_Battler
- include LevelUpRecover
- alias recover_exp #{level_def} unless $@
- def #{level_def}(*args, &block)
- recover_exp(*args, &block)
- @hp = #{hp_max} if RECOVER_HP
- #{sp_max} if RECOVER_MP
- @states.clear if RECOVER_STATE
- end
- end#"
Advertisement
Add Comment
Please, Sign In to add comment