- 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:
After: (or anywhere)
In: net\sf\odinms\client\MapleCharacter.java
Add:
After: (or anywhere)
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:
Add in:
You are going to have to make it a random value between 2 values, so here's how you do that:
Example: (would give you a random amount of hp between 200 and 250)
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.
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);
}
Code:
public void setFace(int face) {
getPlayer().setFace(face);
getPlayer().updateSingleStat(MapleStat.FACE, face);
getPlayer().equipChanged();
}
Add:
Code:
public void gainMaxHP(int hpchange) {
this.maxhp += hpchange;
}
public void gainMaxMP(int mpchange) {
this.maxmp += mpchange;
}
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));
}
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))
Code:
cm.gainMaxHP(<job advancement formulas>);
or
cm.gainMaxMP(<job advancement formulas>);
Code:
(Math.floor(Math.random() * (<max> - <min>) + <min>));
Code:
cm.gainMaxHP((Math.floor(Math.random() * (250 - 200) + 200)));

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.