Basic MapleStory Java (In the src)

Results 1 to 11 of 11
  1. #1
    Hardcore Member MsDerp is offline
    MemberRank
    Apr 2011 Join Date
    125Posts

    Basic MapleStory Java (In the src)

    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 by MsDerp; 16-04-11 at 03:05 AM.


  2.  
  3. #2
    Account Upgraded | Title Enabled! Sharky is offline
    True MemberRank
    Dec 2010 Join Date
    Ur Mom's Pants.Location
    927Posts

    Re: Basic MapleStory Java (In the src)

    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.
    -Jaws theme song-

  4. #3
    Hardcore Member MsDerp is offline
    MemberRank
    Apr 2011 Join Date
    125Posts

    Re: Basic MapleStory Java (In the src)

    Quote Originally Posted by Sharky View Post
    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.

  5. #4
    Account Inactive RpViet is offline
    InactiveRank
    Jun 2008 Join Date
    CanadaLocation
    357Posts

    Re: Basic MapleStory Java (In the src)

    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.

  6. #5
    -Error- xXSnipeDownOo is offline
    True MemberRank
    Jul 2010 Join Date
    885Posts

    Re: Basic MapleStory Java (In the src)

    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.

  7. #6
    Can't kilean the zilean Darksta is offline
    Alpha MaleRank
    Oct 2010 Join Date
    Down undah mateLocation
    1,629Posts

    Re: Basic MapleStory Java (In the src)

    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
    Quote Originally Posted by Dang View Post
    Ho chi minh ! Vietnam vietnam walao walao la la ho chi minhhhhhh! i drink nuoc mam like its water!




  8. #7
    Interesting... SharpAceX is offline
    SubscriberRank
    Oct 2008 Join Date
    1,744Posts

    Re: Basic MapleStory Java (In the src)

    Quote Originally Posted by NomStory View Post
    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
    Your signature bothers me.


    My video game development studio based in New York City.
    http://luminositygames.com/

  9. #8
    Account Inactive Soulfist is offline
    InactiveRank
    Dec 2010 Join Date
    HawaiiLocation
    1,834Posts

    Re: Basic MapleStory Java (In the src)

    Quote Originally Posted by BloodAngel13 View Post
    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 .

  10. #9
    Hardcore Member ariel_Tete94 is offline
    MemberRank
    Jul 2008 Join Date
    147Posts

    Re: Basic MapleStory Java (In the src)

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

  11. #10
    Account Inactive Vineyard is offline
    InactiveRank
    Jul 2008 Join Date
    FinlandLocation
    53Posts

    Re: Basic MapleStory Java (In the src)

    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.

  12. #11
    may web.very maple.pls. iAkira is offline
    Alpha MaleRank
    Aug 2009 Join Date
    somewhere..Location
    2,358Posts

    Re: Basic MapleStory Java (In the src)

    Quote Originally Posted by ariel_Tete94 View Post
    ...
    PHP 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;
            }
            if (
    getLevel() == 10){
                    
    dropMessage("Good job, you reached level 10! You gain 5 fame & 500 NX as your prize!");
            
    gainFame(5);
                    
    getCashShop().gainCash(1500);
            }
        } else {
            
    remainingAp += 5;
            if (
    isCygnus() && level 70) {
                    
    remainingAp++;
            }
        }          

    try that


  13.  

    Latest Gaming Releases

Advertisement