Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Level Up Health, Just a little something I did for Tomtau
Jako Drako
post Aug 3 2006, 09:22 AM
Post #1


Protector of life
Group Icon

Group: Member
Posts: 145
Type: Scripter
RM Skill: Advanced




This is a handy little script that adds the same amount of health and SP to the heros' current HP and SP as the max HP and SP. For example, as Tomtaru said, the hero enters battle with full health 10/10. In battle he is injured to 6/10 HP. When he defeats the monster(s), he gets enough exp to level up. Not only does the hero's max HP rise by 10, but so does his current HP. So at the end of the battle, the hero's health is now 6/10 + 10/10 = 16/20.
I thought it might be a good idea to post it in this forum so that more people could see it and benefit wink.gif

Open the Game_Actor script and find the exp=(exp) attribute (just use ctrl+f to search for it). Replace the code of the method with this:
CODE
# exp=(exp) attribute that allows level up healing
# modified by: Jako Drako
# Give credit!
def exp=(exp)
 temp_level = @level
 @exp = [[exp, 9999999].min, 0].max
 while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
   @level += 1
   for j in $data_classes[@class_id].learnings
     if j.level == @level
       learn_skill(j.skill_id)
     end
   end
 end
 while @exp < @exp_list[@level]
   @level -= 1
 end
 if temp_level != @level
   actor = $data_actors[@actor_id]
   level_difference = @level - temp_level
   @hp += actor.parameters[0, @level] - actor.parameters[0, @level - level_difference]
   @sp += actor.parameters[1, @level] - actor.parameters[1, @level - level_difference]
   if @hp > maxhp
     @hp = maxhp
   end
   if @sp > maxsp
     @sp = maxsp
   end
 end
end


__________________________
-------------------
*thanks to rpgx for sig*
*I had to change my av, but still wanted the pic of Kaylee, lol*
I am Warder Dragon
Lawful good
Very magical
The warder dragon is a large and bulky dragon, with large strong legs and arms. The size of these mammoth dragons starts from birth at the size of a mature border collie! But don?t be fooled by these big dragons, they aren?t slow, but aren?t fast, and they tend to be more peaceful and talkative than most dragons. Warder dragons get their names from the fact that they radiate a holy magical aura from their large tattoo like markings that may be anywhere on their bodies, the aura destroys "pure evil" beings, but higher evil ones will just be phased. The warder dragon loves love, and enjoy being in relationships with mates, and they despise weight jokes and anti-self acceptance jokes. They will gladly fight when it comes to defending a homeland or their friends!
This Dragons favorite elements are: Love,Relationships,Food,Peace,Honor
Take the Inner Dragon quiz!

Go to the top of the page
 
+Quote Post
   

Posts in this topic
- Jako Drako   Level Up Health   Aug 3 2006, 09:22 AM
- - Tomtaru   very handy little script and keep up the good w...   Aug 4 2006, 01:03 AM
- - barcow   great script.   Aug 5 2006, 06:38 PM
- - Jako Drako   Thankest thou??? I never get much acknoowledgement...   Aug 5 2006, 07:49 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 04:51 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker