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!

Basic MapleStory Java (In the src)

Junior Spellweaver
Joined
Apr 13, 2011
Messages
119
Reaction score
11
I was bored so I decided to share my noob knowledge with RZ. This is a tutorial on how to do basic things on the java files.
I'm not sure how to start with this, so I guess I'll just blab on to see what fits lol.

Example: MapleCharacter.java -> ctrl + F -> levelUp

The code below is part of the levelUp function from MoopleDev rev 107 (v83) First, in order to do anything you have to know how to understand what the code says. I'm not 100% perfect at doing this as I am a noob, but basically what this says is:

when players level up, if they are beginners, and below level 6 they will gain 5 str each time they level. If they are over level 6, they will gain 4 str and 1 dex each time. If they are cygnus knights and are under level 70, they will gain the "remainingap" which is 5 in this case.

Code:
public void levelUp(boolean takeexp) {
        ISkill improvingMaxHP = null;
        ISkill improvingMaxMP = null;
        int improvingMaxHPLevel = 0;
        int improvingMaxMPLevel = 0;

        if (isBeginnerJob()) {
            remainingAp = 0;
            if (getLevel() < 6) {
                str += 5;
            } else {
                str += 4;
                dex += 1;
            }
        } else {
            remainingAp += 5;
            if (isCygnus() && level < 70) {
                remainingAp++;
            }
        }

Now that you know what it says, let's change it up a bit. Since this is the whole levelup function, it lets you add in things it should do as the player levels up. For example, if you wanted to add mini leveling occupations, you would do something like:

Code:
public void levelUp(boolean takeexp) {
        ISkill improvingMaxHP = null;
        ISkill improvingMaxMP = null;
        int improvingMaxHPLevel = 0;
        int improvingMaxMPLevel = 0;

        if (isBeginnerJob()) {
            remainingAp = 0;
            if (getLevel() < 6) {
                str += 5;
            } else {
                str += 4;
                dex += 1;
            }
        } else {
            remainingAp += 5;
            if (isCygnus() && level < 70) {
                remainingAp++;
            }
        }
	if (getlevel() == 10) {
		dropMessage("Good job, you reached level 10! You get 5 fame as your prize!");
		gainFame(5);
	}

I've added something at the bottom saying if the player levels up and they are level 10, it will give them five fame and show them a message saying that they reached level 10 and they recieved 5 fame. If you wanted to do something like teleport them to another map or something you'd change the gainFame(5); to something like changeMap(id); or something like that. It's very simple as long as you know how to understand what the scripts do and you know what they SHOULD do. It's mostly common sense. Most of the functions you need are in MapleCharacter.java so you can look off of that. Use NetBeans to help you.

Well... This is mostly common sense so I have no idea what else I should do. I feel like if i go on anymore, I'm gonna either be cliche or expose the ideas that I have for my server by using them as examples so I'm going to cut the "tutorial" off there. I know it didn't help much, but uhh yeah lol. Idk. Sorry for the sucky tutorial? Anyways good luck (Y)
 
Last edited:
Skilled Illusionist
Joined
Dec 16, 2010
Messages
304
Reaction score
164
All you did was take apart the levelUp method =(
If they are cygnus knights and are under level 70, they will gain the "remainingap" which is 5 in this case.
Sorry, this is wrong. remainingAp symbolizes the leftover AP. remainingAp += 5 gives everybody who is not a beginner 5 AP, and if the character is a KoC under level 70, remainingAp++ just gives them one more.
 
Junior Spellweaver
Joined
Apr 13, 2011
Messages
119
Reaction score
11
All you did was take apart the levelUp method =(

Sorry, this is wrong. remainingAp symbolizes the leftover AP. remainingAp += 5 gives everybody who is not a beginner 5 AP, and if the character is a KoC under level 70, remainingAp++ just gives them one more.

ah lol. I told u i was a n1b. anyways uhh like I said I was just sharing my noob knowledge while I was bored lol.
 
Initiate Mage
Joined
Jun 3, 2008
Messages
84
Reaction score
13
Why are you trying to "teach" people java when you don't know it yourself. It's frustrating when ignorant people release tutorials and don't know what they're talking about and you even failed in your own tutorial.
 
Joined
Jul 1, 2010
Messages
75
Reaction score
36
And it's frustrating when people bash other people's stuff, no matter how stupid/useless it is, when they have yet to offer anything good to the community, or at least attempt to. Kthx.

@OT
Good idea, but not right execution. I haven't really seen a full on Java coding tutorial, only a side section in my NPC Tutorial, so i think it would be a great idea to make one for the noobs, just this wasn't the right way to go about doing it.
 
Can't kilean the zilean
Member
Joined
Oct 20, 2010
Messages
1,182
Reaction score
515
thanks, this has increased my knowledge... :) it helps when you learn to have a break down on certain aspects of what you are trying to learn. i guess.. well done? :D
 
Legendary Battlemage
Member
Joined
Dec 13, 2010
Messages
649
Reaction score
140
Your signature bothers me. :/:

I was thinking the same thing :(:.

Anyways, I 100% agree with Travis on this, its a great idea to share Java knowledge, which is usually kept private. But bad execution, you just did this out of boredom, with the right motives and means this coulda been great :/:.
 
Initiate Mage
Joined
Jul 13, 2008
Messages
85
Reaction score
2
is it supose to work?
isnt work for me XD(moopleDEV)

Heres my code:

Code:
    public void levelUp(boolean takeexp) {
        ISkill improvingMaxHP = null;
        ISkill improvingMaxMP = null;
        int improvingMaxHPLevel = 0;
        int improvingMaxMPLevel = 0;

        if (isBeginnerJob()) {
            remainingAp = 0;
            if (getLevel() < 6) {
                str += 5;
            } else {
                str += 4;
                dex += 1;
            }
        } else {
            remainingAp += 5;
            if (isCygnus() && level < 70) {
                remainingAp++;
            }
            if (getLevel() == 10)
            {
                dropMessage("Good job, you reached level 10! You gain 5 fame & 500 NX as your prize!");
		gainFame(5);
       getCashShop().gainCash(1, 500);
            }
             
        }
 
Initiate Mage
Joined
Jul 2, 2008
Messages
49
Reaction score
2
Hey, if you're going to make some tutorials about the OdinMS API, you should focus on the big picture, tell how different parts interact with each other and what's the best way to modify the code without breaking something... instead of inspecting a simple method that makes such a good use of variable names that anyone with even a tiny bit of knowledge of Java's syntax could understand what's going on. I wonder why the Max HP and MP Increase skills are not hooked instead of being set to null though? That would be a rather simple example AND it would also show how to interact with different parts of OdinMS.
 
may web.very maple.pls.
Member
Joined
Aug 12, 2009
Messages
1,810
Reaction score
606

PHP:
public void levelUp(boolean takeexp) {
    ISkill improvingMaxHP = null;
    ISkill improvingMaxMP = null;
    int improvingMaxHPLevel = 0;
    int improvingMaxMPLevel = 0;

    if (isBeginnerJob()) {
        remainingAp = 0;
        if (getLevel() < 6) {
                str += 5;
        } else {
                str += 4;
                dex += 1;
        }
        if (getLevel() == 10){
                dropMessage("Good job, you reached level 10! You gain 5 fame & 500 NX as your prize!");
		gainFame(5);
                getCashShop().gainCash(1, 500);
        }
    } else {
        remainingAp += 5;
        if (isCygnus() && level < 70) {
                remainingAp++;
        }
    }          
}

try that
 
Back
Top