Join RaGEZONE TODAY! Register

Results 1 to 11 of 11
  1. #1
    Hardcore Member MsDerp's Avatar

    Rank
    Member
    Join Date
    Apr 2011
    Posts
    125

    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 04:05 AM.


  2.  
  3. #2
    Account Upgraded | Title Enabled! Sharky's Avatar

    Rank
    True Member
    Join Date
    Dec 2010
    Location
    Ur Mom's Pants.
    Posts
    933

    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's Avatar

    Rank
    Member
    Join Date
    Apr 2011
    Posts
    125

    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
    Java Programmer RpViet's Avatar

    Rank
    True Member
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    357

    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's Avatar

    Rank
    True Member
    Join Date
    Jul 2010
    Location
    California
    Posts
    885

    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.

    Need Help? PM Me or add me on one of these:

    Xbox Live - xXSnipeDownOo
    MSN - travis4fun@sbcglobal.net
    SKYPE - travis.lamothe

  7. #6
    Account Upgraded | Title Enabled! Darksta's Avatar

    Rank
    True Member
    Join Date
    Oct 2010
    Location
    Down undah mate
    Posts
    1,627

    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's Avatar

    Rank
    Subscriber
    Join Date
    Oct 2008
    Posts
    1,682

    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/

    If you develop v15X, you may add me on Skype for help.

  9. #8
    Verisimilitude. Soulfist's Avatar

    Rank
    Alpha Male
    Join Date
    Dec 2010
    Location
    Hawaii
    Posts
    1,849

    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

    Rank
    Member
    Join Date
    Jul 2008
    Posts
    147

    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
    Member Vineyard's Avatar

    Rank
    Member
    Join Date
    Jul 2008
    Location
    Finland
    Posts
    53

    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's Avatar

    Rank
    Alpha Male
    Join Date
    Aug 2009
    Location
    somewhere..
    Posts
    2,362

    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

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HyperFilter
Sponsored by HyperFilter , secured by Incapsula , powered by LiteSpeed.
Mods by DBTech. All times are GMT +1. The time now is 09:11 PM.
Powered by vBulletin® Copyright , Jelsoft Enterprises Ltd.