- Joined
- Feb 23, 2008
- Messages
- 507
- Reaction score
- 361
Well , I've decided to release my Occupation Leveling + EXP System.
It's pretty simple. Here it is :
MapleCharacter.java
Required Variables in Maplecharacter.java (Figure it out)
Required Methods : (MapleCharacter.java !)
MapleMonster.java
Under
put :
If you want it to save to the DB, do that yourself, too lazy to finish the tutorial on that.
Conclusion :
Feel free to modify this code and/or use it on your server and even leech it to other forums, but ALWAYS remember to give the proper credits, (LxShutdown/FateJiki of RaGeZONE/KryptoDEV !) Never claim this as your own.
There are not many open-source developers or releases, because people tend to leech. I'm happy to code features and release them, as long as you guys don't claim them as your own.
Thank you , and if I forgot something, just tell me. I made this tutorial in under 10 minutes.
Instead of posting "thanks" , please just click the thanks button.
It's pretty simple. Here it is :
MapleCharacter.java
Required Variables in Maplecharacter.java (Figure it out)
PHP:
public int OccupationLevel;
public int OccupationExp;
PHP:
public int getOccEXP(){
return this.OccupationExp;
PHP:
public void setOccLevel(int x){
this.OccupationLevel = x;
}
PHP:
public void OccupationLevelUp(){
getMap().broadcastMessage(getClient().getPlayer(), MaplePacketCreator.showSpecialEffect(8), false);
getClient().getSession().write(MaplePacketCreator.showSpecialEffect(8));
if(this.getOccupationLevel() >= 125 && this.hasSecondOccupation() == false){
scripting.npc.NPCScriptManager npc = scripting.npc.NPCScriptManager.getInstance();
npc.start(getClient(), 9201**** null, this);
}
this.OccupationLevel++;
this.OccupationExp = 0;
this.maxhp += 50;
this.maxmp += 50;
this.updateSingleStat(MapleStat.MAXHP, maxhp);
this.updateSingleStat(MapleStat.MAXMP, maxmp);
getClient().getSession().write(MaplePacketCreator.serverNotice(5, "Your occupation has leveled up! You are now a Lv." + this.getOccupationLevel() + " " + this.getOccupation()));
}
PHP:
public int getOccupationLevel(){
return this.OccupationLevel;
}
PHP:
public void gainOccEXP(int amount){
int totoexp = this.OccupationExp + amount;
if(totoexp >= getOccupationExpNeeded() && this.getOccupationLevel() < 150){
OccupationLevelUp();
}
else {
OccupationExp += amount;
}
PHP:
public int getOccupationExpNeeded(){
return ExpTable.getExpNeededForLevel(getOccupationLevel()) / 3;
}
Under
Code:
public void giveExpToCharacter(MapleCharacter attacker, int exp, boolean highestDamage, int numExpSharers) {
PHP:
if(attacker.getOccupationId() != 0 && attacker.getOccupationLevel() < 150){
int OccEXP = exp / 12;
if(attacker.getParty() != null){
attacker.gainOccEXP(OccEXP / attacker.getParty().getMembers().size());
}
else {
attacker.gainOccEXP(exp);
}
Conclusion :
Feel free to modify this code and/or use it on your server and even leech it to other forums, but ALWAYS remember to give the proper credits, (LxShutdown/FateJiki of RaGeZONE/KryptoDEV !) Never claim this as your own.
There are not many open-source developers or releases, because people tend to leech. I'm happy to code features and release them, as long as you guys don't claim them as your own.
Thank you , and if I forgot something, just tell me. I made this tutorial in under 10 minutes.
Instead of posting "thanks" , please just click the thanks button.
Last edited: