Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

job Advancers with HP/MP Additions

Newbie Spellweaver
Joined
Apr 19, 2008
Messages
16
Reaction score
1
Well, this is a continuation on my thread for the HP/MP "formulas" for job advancers.
These are the formulas that GMS uses when advancing.

In: net\sf\odinms\scripting\npc\NPCConversationManager.java
Add:
Code:
public void gainMaxHP(int hp) {
                getPlayer().gainMaxHP(hp);
        }

public void gainMaxMP(int mp) {
                getPlayer().gainMaxMP(mp);
        }
After: (or anywhere)
Code:
public void setFace(int face) {
		getPlayer().setFace(face);
		getPlayer().updateSingleStat(MapleStat.FACE, face);
		getPlayer().equipChanged();
	}
In: net\sf\odinms\client\MapleCharacter.java
Add:
Code:
public void gainMaxHP(int hpchange) {  
            this.maxhp += hpchange;
	}

public void gainMaxMP(int mpchange) {  
            this.maxmp += mpchange;
	}
After: (or anywhere)
Code:
public void changeSkillLevel(ISkill skill, int newLevel, int newMasterlevel) {
		skills.put(skill, new SkillEntry(newLevel, newMasterlevel));
		this.getClient().getSession().write(MaplePacketCreator.updateSkill(skill.getId(), newLevel, newMasterlevel));
	}
Now just download the npc scripts attached in this post and replace your current one's with them in your scripts/npc/ folder.
Do not do the following steps unless you don't want to just replace the npc files.


If you have custom job advancers or just want to keep the current one's you have, then you'll have to add in the changes yourself, because there's too many changes for me to fit on this post.
Here's how to add it in:
After:
Code:
if (cm.getJob().equals(net.sf.odinms.client.MapleJob.BEGINNER))
Add in:
Code:
cm.gainMaxHP(<job advancement formulas>);
or
cm.gainMaxMP(<job advancement formulas>);
You are going to have to make it a random value between 2 values, so here's how you do that:
Code:
(Math.floor(Math.random() * (<max> - <min>) + <min>));
Example: (would give you a random amount of hp between 200 and 250)
Code:
cm.gainMaxHP((Math.floor(Math.random() * (250 - 200) + 200)));
If you do not understand how to do this, you can always use my npc scripts as a refrence. ;)

The job advancement "formulas" are located here.

I have attached both the real job advancer scripts (Job_Advancement_NPCs.zip) and, for the servers who use Cody, Cody with the hp/mp additions (All_in_One_Cody_Job_Advancer.zip). Although, since Cody only advances 2nd job - 4th job, he will not add the 1st job hp/mp additions. Also, I haven't tested this Cody because we don't use Cody, but he still should work.
If you find any bugs with anything, or need help feel free to post, but please no flaming.
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Jun 26, 2008
Messages
136
Reaction score
0
Re: [Release] Job Advancers with HP/MP Additions

Omg you rock
 
Junior Spellweaver
Joined
May 20, 2008
Messages
153
Reaction score
0
Re: [Release] Job Advancers with HP/MP Additions

Um.. Cool release I guess
 
Back
Top