Welcome to the RaGEZONE - MMORPG development forums.

Simple @advance command

This is a discussion on Simple @advance command within the Releases forums, part of the Java Based (Odin) category; Basically, when you reach level 70+ and later 120+ you can get advanced to your next job.THIS IS MY FIRST ...

Page 1 of 4 1234 LastLast
Results 1 to 15 of 46
  1. #1
    Coder in-training
    Rank
    Member +
    Join Date
    Dec 2008
    Location
    Canada
    Posts
    592
    Liked
    44
    Gamertag: Peter4Life

    Simple @advance command[NOW v111]

    Click
    Basically, when you reach level 70+ and later 120+ you can get advanced to your next job.THIS IS MY FIRST RELEASE!!!
    v111:
    Just put this in your commands.java:
    If you aren't using ChickenMS (mooplev111) then replace the "sub" with "splitted" and replace every "chr." with "player."
    PHP Code:
    }else if (sub[0].equals("advance")) {
             
    String advanced "You have advanced.";
             
    int job_ chr.getJob().getId();
             if (
    chr.getLevel() >= 160){
                 if (
    chr.isEvan()){
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced); 
                 } } else if (
    chr.getLevel() >= 120){ 
                if (
    chr.is3rdJob() || (chr.isAran() || (chr.isEvan() || (chr.isCygnus() || (chr.isDualBlade() || (chr.isElf() || (chr.isDemonSlayer() || (chr.isCannon()))))))))  {
                
    chr.changeJob(MapleJob.getById(job_ 1));
                
    chr.dropMessage(advanced);
                 } } else if (
    chr.getLevel() >= 100){
                 if (
    chr.isEvan()){
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced);  
                 } } else if (
    chr.getLevel() >= 80){
                 if (
    chr.isEvan()){
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced);
                 } } else if (
    chr.getLevel() >= 70){ 
                 if (
    chr.is2ndJob() || (chr.isAran() || (chr.isEvan() || (chr.isCygnus() || (chr.isDualBlade() || (chr.isElf() || (chr.isDemonSlayer() || (chr.isCannon()))))))))  {
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced);
                 }} else if (
    chr.getLevel() >= 60){
                 if (
    chr.isEvan()){
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced);
                 } } else if (
    chr.getLevel() >= 55){
                 if (
    chr.isDualBlade()){
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced);
                 } } else if (
    chr.getLevel() >= 50){
                 if (
    chr.isEvan()){
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced);
                 } } else if (
    chr.getLevel() >= 40){
                 if (
    chr.isEvan()){
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced);
                 } }else if (
    chr.getLevel() >= 30){
                 if (
    chr.isEvan()) {
                 
    chr.changeJob(MapleJob.getById(job_ 1));
                 
    chr.dropMessage(advanced);
                 }else if ((
    chr.isAran() || (chr.isCygnus() || (chr.isDualBlade() || (chr.isElf() || (chr.isDemonSlayer() || (chr.isCannon()))))))){
                 
    chr.changeJob(MapleJob.getById(job_ 10));    
                 }else{ 
    chr.dropMessage("Pick a 2nd job from your job person");
                 } }else if (
    chr.getLevel() >= 20){
                 if (
    chr.isEvan()){
                 
    chr.changeJob(MapleJob.getById(job_ 10));
                 
    chr.dropMessage(advanced);
                 } }else {
                 
    chr.dropMessage("You are not high level enough. Or it is not your job's time to advance.");} 
    Heres isCannon if you need it:
    PHP Code:
    public boolean isCannon(){
           if (
    getJob().getId() >= 501 && getJob().getId() <= 532 || GameConstants.isCannon(job.getId())) {
                return 
    true;
            }
            return 
    false;
        } 
    Heres some others if you need it:
    PHP Code:
    public boolean isMechanic() {
            return 
    getJob().getId() >= MapleJob.MECHANIC1.getId() && getJob().getId() <= MapleJob.MECHANIC4.getId();
        } 
         public 
    boolean isResistance() {
            return 
    getJob().getId() >= MapleJob.CITIZEN.getId() && getJob().getId() <= MapleJob.MECHANIC4.getId();
        }

        public 
    boolean isEvan() {
            return 
    getJob().getId() >= MapleJob.EVAN.getId() && getJob().getId() <= MapleJob.EVAN10.getId();
        }

        public 
    boolean isWarrior() {
            return 
    getJob().getId() == MapleJob.WARRIOR.getId();
        }
        
        public 
    boolean isMagician() {
            return 
    getJob().getId() == MapleJob.MAGICIAN.getId();
        }
        public 
    boolean isThief() {
            return 
    getJob().getId() == MapleJob.THIEF.getId();
        }
        public 
    boolean isPirate() {
            return 
    getJob().getId() == MapleJob.PIRATE.getId();
        }
        public 
    boolean isBowman() {
            return 
    getJob().getId() == MapleJob.BOWMAN.getId();
        }
        public 
    boolean isDualBlade() {
            return 
    getJob().getId() >= MapleJob.DUALBLADE.getId() && getJob().getId() <= MapleJob.DUALBLADE4.getId();
        }

        public 
    boolean is2ndJob() {
            return 
    getJob().getId()%10 == && getJob().getId()%100 != 0;
        }

        public 
    boolean is3rdJob() {
            return 
    getJob().getId()%10 == 1;
        }
        public 
    boolean isCannon(){
           if (
    getJob().getId() >= 501 && getJob().getId() <= 532 || GameConstants.isCannon(job.getId())) {
                return 
    true;
            }
            return 
    false;
        public 
    boolean isAran() {
            return 
    getJob().getId() >= 2000 && getJob().getId() <= 2112;
        } 
    V97:
    Put this in your playercommand.java:
    PHP Code:
    }else if (splitted[0].equals("advance")) { 
             
    String advanced "You have advanced."
             if (
    player.getLevel() >= 20){
                 if (
    player.isEvan()){
             
    player.autoJob();
                 
    player.dropMessage(advanced);
                 }}else if (
    player.getLevel() >= 30){
                 if (
    player.isEvan() || (player.isAran() || (player.isCygnus() || (player.isDualBlade())))){
             
    player.autoJob();
                 
    player.dropMessage(advanced);
                 } } else if (
    player.getLevel() >= 40){
                 if (
    player.isEvan()){
             
    player.autoJob();
                 
    player.dropMessage(advanced);
                 } } else if (
    player.getLevel() >= 50){
                 if (
    player.isEvan()){
             
    player.autoJob();
                 
    player.dropMessage(advanced);
                 } } else if (
    player.getLevel() >= 55){
                 if (
    player.isDualBlade()){
             
    player.autoJob();
                 
    player.dropMessage(advanced);
                 }} else if (
    player.getLevel() >= 60){
                 if (
    player.isEvan()){
             
    player.autoJob();
                 
    player.dropMessage(advanced);
                 
                 } } else if (
    player.getLevel() >= 70){ 
                 if (
    player.is2ndJob() || (player.isAran() || (player.isEvan() || (player.isCygnus() || (player.isDualBlade()  )))))  {
                 
    player.autoJob();
              
    player.dropMessage(advanced);
                 } } else if (
    player.getLevel() >= 80){
                 if (
    player.isEvan()){
             
    player.autoJob();
                 
    player.dropMessage(advanced); 
                 } } else if (
    player.getLevel() >= 100){
                 if (
    player.isEvan()){
             
    player.autoJob();
                 
    player.dropMessage(advanced); 
                 } } else if (
    player.getLevel() >= 120){ 
                if (
    player.is2ndJob() || (player.isAran() || (player.isEvan() || (player.isCygnus() || (player.isDualBlade()  )))))  {
                 
    player.autoJob();
                
    player.dropMessage(advanced); 
             } } else if (
    player.getLevel() >= 160){
                 if (
    player.isEvan()){
             
    player.autoJob();
                 
    player.dropMessage(advanced); 
                } }else {
                 
    player.dropMessage("You are not high level enough. Or it is not your job's time to advance.");}
            
            } 
    This into maplecharacter.java:
    PHP Code:
     public void autoJob() {
            
    int job_ getJob().getId();
            if (
    isDualBlade()) {
                switch (
    getLevel()) {
                    case 
    20:
                        
    changeJob(MapleJob.BLADE_RECRUIT);
                        break;
                    case 
    30:
                        
    changeJob(MapleJob.BLADE_ACOLYTE);
                        break;
                    case 
    55:
                        
    changeJob(MapleJob.BLADE_SPECIALIST);
                        break;
                    case 
    70:
                        
    changeJob(MapleJob.BLADE_LORD);
                        break;
                    case 
    120:
                        
    changeJob(MapleJob.BLADE_MASTER);
                        break;
                }
            } else if (
    getJob().getId() >= MapleJob.BATTLEMAGE1.getId() && getJob().getId() <= MapleJob.BATTLEMAGE4.getId()) {
                switch (
    getLevel()) {
                    case 
    30:
                        
    changeJob(MapleJob.BATTLEMAGE2);
                        break;
                    case 
    70:
                        
    changeJob(MapleJob.BATTLEMAGE3);
                        break;
                    case 
    120:
                        
    changeJob(MapleJob.BATTLEMAGE4);
                        break;
                }
            } else if (
    isEvan()) {
                switch (
    getLevel()) {
                    case 
    10:
                        
    changeJob(MapleJob.EVAN1);
                        break;
                    case 
    20:
                        
    changeJob(MapleJob.EVAN2);
                        break;
                    case 
    30:
                        
    changeJob(MapleJob.EVAN3);
                        break;
                    case 
    40:
                        
    changeJob(MapleJob.EVAN4);
                        break;
                    case 
    50:
                        
    changeJob(MapleJob.EVAN5);
                        break;
                    case 
    60:
                        
    changeJob(MapleJob.EVAN6);
                        break;
                    case 
    80:
                        
    changeJob(MapleJob.EVAN7);
                        break;
                    case 
    100:
                        
    changeJob(MapleJob.EVAN8);
                        break;
                    case 
    120:
                        
    changeJob(MapleJob.EVAN9);
                        break;
                    case 
    160:
                        
    changeJob(MapleJob.EVAN10);
                        break;
                    default:
                        break;
                }
            } else if (
    getJob().getId() >= MapleJob.WILDHUNTER1.getId() && getJob().getId() <= MapleJob.WILDHUNTER4.getId()) {
                switch (
    getLevel()) {
                    case 
    30:
                        
    changeJob(MapleJob.WILDHUNTER2);
                        break;
                    case 
    70:
                        
    changeJob(MapleJob.WILDHUNTER3);
                        break;
                    case 
    120:
                        
    changeJob(MapleJob.WILDHUNTER4);
                        break;
                }
            } else if (
    isMechanic()) {
                switch (
    getLevel()) {
                    case 
    30:
                        
    changeJob(MapleJob.MECHANIC2);
                        break;
                    case 
    70:
                        
    changeJob(MapleJob.MECHANIC3);
                        break;
                    case 
    120:
                        
    changeJob(MapleJob.MECHANIC4);
                        break;
                }
            } else {
                if (!
    isAran() && level == || !isAran() && !isCygnus() && level == 29) {
                    
    NPCScriptManager.getInstance().start(getClient(), 2003nullnull);
                } else if (
    isAran() && level == 9) {
                    
    changeJob(MapleJob.getById(2100));
                } else if (
    isAran() && level == 29) {
                    
    changeJob(MapleJob.getById(2110));
                } else if (
    isCygnus() && level == 29) {
                    
    changeJob(MapleJob.getById(job_ 10));
                } else if (
    isCygnus() && level == 69) {
                    
    changeJob(MapleJob.getById(job_ 1));
                } else if (
    isAran() && level == 69) {
                    
    changeJob(MapleJob.getById(2111));
                } else if (
    isAran() && level == 119) {
                    
    changeJob(MapleJob.getById(2112));
                }
                if (!
    isAran() && !isCygnus() && level == 69) {
                    if (
    is2ndJob()) {
                        
    changeJob(MapleJob.getById(job_ 1));
                    } else {
                        
    NPCScriptManager.getInstance().start(getClient(), 2003nullnull);
                    }
                } else if (!
    isCygnus() && !isAran() && level == 119) {
                    if (
    is3rdJob()) {
                        
    changeJob(MapleJob.getById(job_ 1));
                    } else if (
    is2ndJob()) {
                        
                    } else {
                        
    NPCScriptManager.getInstance().start(getClient(), 2003nullnull);
                    }
                }
            }
        } 
    Credits:
    V97: I only take credit in writing the actual command. The method has already been implemented in XeonMS v97.
    V111: I take full credit in writing the whole command.
    Last edited by lordpeter; 19-07-12 at 08:41 PM.
    Like if I helped you!

  2. #2
    Verisimilitude.
    Rank
    Alpha Member
    Join Date
    Dec 2010
    Location
    Hawaii
    Posts
    1,855
    Liked
    278

    Re: Simple @advance command

    The command is pretty horrible, not to shoot you down on your first release, but its pretty obvious for the most part (as to why).
    Posted via Mobile Device

  3. #3
    while(true) spam();
    Rank
    Moderator
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    3,650
    Liked
    1885

    Re: Simple @advance command

    Evan can be done in the levelup function.
    Quote Originally Posted by mavin0107 View Post
    can anyone tell me how to make pokemon system in lithium work cuz i try to go to a map have pokemon but there are no pokemon in that map
    Quote Originally Posted by MentaL View Post
    ps... if you dont like butterflys then ur a homo.

  4. #4
    Member
    Rank
    Member
    Join Date
    Jan 2011
    Location
    127.0.0.1
    Posts
    70
    Liked
    10

    Re: Simple @advance command

    wasnt this already in xeon? the second part?
    P.S. --------GOOGLE-------- Is Your Friend!
    EmeraldStory v83

  5. #5
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Nov 2008
    Location
    Canada, QC
    Posts
    1,046
    Liked
    370
    Gamertag: OxysoftHD

    Re: Simple @advance command

    You could make this alot shorter by using logic like in the job advancer npc by osiris or moogra (?) where an object array is used and push the possible jobs based on player current job.
    I am writing a pokemon engine in C# using the XNA framework!!!
    http://forum.ragezone.com/f704/pokes...e-fire-915097/

  6. #6
    Game Master
    Rank
    Member +
    Join Date
    Jul 2011
    Location
    New York
    Posts
    596
    Liked
    118

    Re: Simple @advance command

    Can be done easier but for your first release it's decent. My first release was a leech ;)

  7. #7
    Coder in-training
    Rank
    Member +
    Join Date
    Dec 2008
    Location
    Canada
    Posts
    592
    Liked
    44
    Gamertag: Peter4Life
    Thanks guys, I expected worse comments. I will improve.
    Posted via Mobile Device

  8. #8
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Dec 2011
    Location
    Canada
    Posts
    736
    Liked
    94

    Re: Simple @advance command

    I'm pretty sure you could easily do this in the Levelup function.

  9. #9
    I QUIT
    Rank
    Member +
    Join Date
    Jun 2008
    Location
    I QUIT, LOL I had 9XX posts :)
    Posts
    659
    Liked
    19

    Re: Simple @advance command

    What is this I don't even...
    Posted via Mobile Device

  10. #10
    Coder in-training
    Rank
    Member +
    Join Date
    Dec 2008
    Location
    Canada
    Posts
    592
    Liked
    44
    Gamertag: Peter4Life

    Re: Simple @advance command

    Quote Originally Posted by shakar96 View Post
    What is this I don't even...
    Posted via Mobile Device
    Hey...atleast it works!
    Like if I helped you!

  11. #11
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Nov 2008
    Location
    Canada, QC
    Posts
    1,046
    Liked
    370
    Gamertag: OxysoftHD

    Re: Simple @advance command

    Quote Originally Posted by lordpeter View Post
    Hey...atleast it works!
    you'll never get good if you think like this. you should alway make sure it's noob friendly so that could just add for example their ids into an array or something and it would work. learned this from someone.
    I am writing a pokemon engine in C# using the XNA framework!!!
    http://forum.ragezone.com/f704/pokes...e-fire-915097/

  12. #12
    I QUIT
    Rank
    Member +
    Join Date
    Jun 2008
    Location
    I QUIT, LOL I had 9XX posts :)
    Posts
    659
    Liked
    19

    Re: Simple @advance command

    Quote Originally Posted by lordpeter View Post
    Hey...atleast it works!
    LOL.
    Anyway there were hundreds of threads like this in the 'Help' section (Teehee).
    Sexy likes this.
    I QUIT

  13. #13
    Coder in-training
    Rank
    Member +
    Join Date
    Dec 2008
    Location
    Canada
    Posts
    592
    Liked
    44
    Gamertag: Peter4Life

    Re: Simple @advance command

    Quote Originally Posted by shakar96 View Post
    LOL.
    Anyway there were hundreds of threads like this in the 'Help' section (Teehee).
    never saw it
    Like if I helped you!

  14. #14
    Member
    Rank
    Member
    Join Date
    Sep 2011
    Posts
    26
    Liked
    5

    Re: Simple @advance command

    Quote Originally Posted by oxysoft View Post
    you'll never get good if you think like this. you should alway make sure it's noob friendly so that could just add for example their ids into an array or something and it would work. learned this from someone.
    Asking for somebody who doesn't understand the concept of future proofing to future proof something is not reasonable. Its better to do it this way first so later you are able to understand why you would want to make something more dynamic. Skipping the "hard code" step means that you don't truley know how to make something dynamic because you never understood that was wrong in the first place.

  15. #15
    Coder in-training
    Rank
    Member +
    Join Date
    Dec 2008
    Location
    Canada
    Posts
    592
    Liked
    44
    Gamertag: Peter4Life

    Re: Simple @advance command

    Quote Originally Posted by SoBrisk View Post
    Asking for somebody who doesn't understand the concept of future proofing to future proof something is not reasonable. Its better to do it this way first so later you are able to understand why you would want to make something more dynamic. Skipping the "hard code" step means that you don't truley know how to make something dynamic because you never understood that was wrong in the first place.
    Thanks for understanding. Hopefully this will help me learn.
    Like if I helped you!

 

 
Page 1 of 4 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •