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.
[REQUEST] recover when you level up

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 87
Code Geass = Best show EVER XD
Project of the Month winner for May 2008
I thought this would be easier to find, but I can't seem to find one.

Does anyone know of a simple script that will recover the actor's hp/mp/state when he levels up?
« Last Edit: June 07, 2008, 02:10:12 AM by Falcon »

*
Rep:
Level 102
2014 Biggest Narcissist Award2014 Biggest Forum Potato2014 Best Non-RM Creator2013 Best Game Creator (Non-RM)2013 Best IRC ChatterboxParticipant - GIAW 112012 Most Successful Troll2012 Funniest Member2012 Best Use Of Avatar and Signature space2012 Best IRC ChatterboxSecret Santa 2012 ParticipantProject of the Month winner for November 2009For being a noted contributor to the RMRK Wiki2010 Most Successful Troll2010 Biggest Forum Couch Potato2010 Best IRC Chatterbox

****
Rep:
Level 87
Code Geass = Best show EVER XD
Project of the Month winner for May 2008
it won't work as it doesn't work with... exotic? CBSs

I'm using minkoff's, but I guess it's not compatible.

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Strike 1, use the damn tags.

***
Rep:
Level 85
there is one (or more) in the rpgvx database dat should work for rpgxp too, i dont know or these will work for rpgxp but you can give it a try (i am on holiday now so i cant test it):
http://rmrk.net/index.php/topic,27610.0.html
« Last Edit: July 15, 2008, 05:58:59 PM by drakenkanon »

*
Resident Cloud
Rep:
Level 91
this wont work for xp theres no  def levelup in xp. ive quickely knocked this up using the ideals of the one you linked this should work in xp although it may be uncompatible with another script if it also messes with the exp method:

Code: [Select]
#===============================================================================
# Recover Hp/Sp/State on levelup
#-------------------------------------------------------------------------------
# Version 1.0
#-------------------------------------------------------------------------------
# By ahref. Based on the ideas of the vx version by worale
#===============================================================================
class Game_Actor < Game_Battler
  #You can change these values!!!
  RECOVER_HP = true # recover hp when you level up true/false
  RECOVER_SP = true # recover sp when you level up true/false
  RECOVER_STATE = true #recover state when you level up
  #--------------------------------------------------------------------------
  # * Change EXP
  #     exp : new EXP
  #--------------------------------------------------------------------------
  def exp=(exp)
    @exp = [[exp, 9999999].min, 0].max
    # Level up
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1
      @hp = self.maxhp if RECOVER_HP
      @sp = self.maxsp if RECOVER_SP
      @states.clear if RECOVER_STATE
      # Learn skill
      for j in $data_classes[@class_id].learnings
        if j.level == @level
          learn_skill(j.skill_id)
        end
      end
    end
    # Level down
    while @exp < @exp_list[@level]
      @level -= 1
    end
    # Correction if exceeding current max HP and max SP
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
end