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!

Occupation Leveling + EXP System

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)
PHP:
    public int OccupationLevel;
    public int OccupationExp;
Required Methods : (MapleCharacter.java !)
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;

    }
MapleMonster.java

Under
Code:
public void giveExpToCharacter(MapleCharacter attacker, int exp, boolean highestDamage, int numExpSharers) {
put :
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);
            }
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. :)
 
Last edited:
Junior Spellweaver
Joined
Aug 15, 2008
Messages
192
Reaction score
12
Re: [Release] Occupation Leveling + EXP System

Thanks man! =)

*Edit* I think you missed
getOccupationId
and hasSecondOccupation
 
Last edited:
Supreme Arcanarch
Loyal Member
Joined
Oct 18, 2009
Messages
914
Reaction score
335
Re: [Release] Occupation Leveling + EXP System

Nice release, useful to high rate servers.
 
Supreme Arcanarch
Loyal Member
Joined
Oct 18, 2009
Messages
914
Reaction score
335
Re: [Release] Occupation Leveling + EXP System

For some noobs it won't be that friendly, because they wont know how to add those functions, and then they well complain.
 
Newbie Spellweaver
Joined
Nov 7, 2009
Messages
37
Reaction score
29
Re: [Release] Occupation Leveling + EXP System

grt rls mang so prao.

Jk, nice release Julien. Keep at what you do. ;)
 
Junior Spellweaver
Joined
Oct 18, 2008
Messages
159
Reaction score
11
Re: [Release] Occupation Leveling + EXP System

ill keep using ur stuff LOL Although u still gotta give me ur repack :p(Deal for his Repack)
 
Last edited:
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
Re: [Release] Occupation Leveling + EXP System

Quick question u need to add to savetodb and loadfromdb right?
 
may web.very maple.pls.
Loyal Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606
Re: [Release] Occupation Leveling + EXP System

kk thanks,
i will test this
great release <3
 
Junior Spellweaver
Joined
Oct 18, 2008
Messages
159
Reaction score
11
Re: [Release] Occupation Leveling + EXP System

Lol ill be sure to use this i think.
 
Supreme Arcanarch
Loyal Member
Joined
Oct 18, 2009
Messages
914
Reaction score
335
Re: [Release] Occupation Leveling + EXP System

This poop was All I knew you and me only.
LOL Good release :D
 
I'm sexy and I know it :)
Joined
Oct 21, 2008
Messages
811
Reaction score
350
Re: [Release] Occupation Leveling + EXP System

Once again, nice release.
I don't think occupations are originally code dlike this but i'm not sure, I would have done it this way too.
Raymond, what's not good about this method.
 
Newbie Spellweaver
Joined
Oct 10, 2008
Messages
52
Reaction score
2
Re: [Release] Occupation Leveling + EXP System

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);
}

will that in the red work? o.o
 
Joined
Feb 23, 2008
Messages
507
Reaction score
361
Re: [Release] Occupation Leveling + EXP System

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);
}

will that in the red work? o.o
No, it won't.

9201**** is an NPC script designed to pop-up when you're Lv125.
 
Back
Top