i need script as lv up hp and sp restore.
Tons of Addons (http://forum.chaos-project.com/index.php?topic=105.0)
learn to use google.
5th result down when searching for 'Actor heal on Level up RMXP'
really big script for just that. might break lots other stuff. what you want is only one line in game_actor. "restore_all" in the gain exp section
Quote from: SolstICE on March 03, 2009, 08:00:02 PM
really big script for just that. might break lots other stuff. what you want is only one line in game_actor. "restore_all" in the gain exp section
Tons of Addons is pretty much compatible with everything, and it's not just that one scriptlet, lol.
Falcon is so going to kick your ass for not putting this in the request section.
[spoiler="Clicky!"]
Place it somewhere above Main and below Game_Actor. I did it right before going to bed and I haven't worked with RMXP in a while but it'll work.
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Change EXP
# exp : new EXP
#--------------------------------------------------------------------------
def exp=(exp)
old_level=@level
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# 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
if old_level == @level
self.hp = self.maxhp
self.sp = self.maxsp
end
end
end
[/spoiler]
Quote from: Shinami on March 05, 2009, 05:19:48 AM
Falcon is so going to kick your ass for not putting this in the request section.
falcon hasn't been around for a few months :(