[Help] Exiled v117.1 Retarded Reset

Results 1 to 12 of 12
  1. #1
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    [Help] Exiled v117.1 Retarded Reset

    Does anyone know why skills keep resetting every time I change job? When I switch from job to job like Phantom to Jett or Jett to something else some someskills reset to 0 and get keyboard wiped. This is a concern because this happens upon rebirthing as well. I looked at the changeJob function and found nothing leading to skills being reset or anything about keyboard. I have tried searching for a solution for a while and came up with nothing, would really appreciate a tip on this.

    Edit: Some skills get reset to 0 while others stay at max level, which is really weird...

    This is the method:
    PHP Code:
    public void changeJob(short newJob) {
            try {
                
    cancelEffectFromBuffStat(MapleBuffStat.SHADOWPARTNER);
                
    this.job newJob;
                
    updateSingleStat(MapleStat.JOBnewJob);
                if (!
    GameConstants.isBeginnerJob(newJob)) {
                    if (
    GameConstants.isEvan(newJob) || GameConstants.isResist(newJob) || GameConstants.isMercedes(newJob) || GameConstants.isJett(newJob) || GameConstants.isPhantom(newJob) || GameConstants.isMihile(newJob)) {
                        if (
    GameConstants.isPhantom(job)) {
                            
    client.getSession().write(CField.updateCardStack(0));
                            
    resetRunningStack();
                        }
                        
    int changeSp = (newJob == 2200 || newJob == 2210 || newJob == 2211 || newJob == 2213 5);
                        if (
    GameConstants.isResist(job) && newJob != 3100 && newJob != 3200 && newJob != 3300 && newJob != 3500) {
                            
    changeSp 3;
                        }
                        
    remainingSp[GameConstants.getSkillBook(newJob)] += changeSp;
                        
    client.getSession().write(InfoPacket.getSPMsg((bytechangeSp, (shortnewJob));
                    } else {
                        
    remainingSp[GameConstants.getSkillBook(newJob)]++;
                        if (
    newJob 10 >= 2) {
                            
    remainingSp[GameConstants.getSkillBook(newJob)] += 2;
                        }
                    }
                    if (
    newJob 10 >= && level >= 70) { //3rd job or higher. lucky for evans who get 80, 100, 120, 160 ap...
                        
    remainingAp += 5;
                        
    updateSingleStat(MapleStat.AVAILABLEAPremainingAp);
                    }
                    if (!
    isGM()) {
                        
    resetStatsByJob(true);
                        if (!
    GameConstants.isEvan(newJob)) {
                            if (
    getLevel() > (newJob == 200 10) && newJob 100 == && (newJob 1000) / 100 0) { //first job
                                
    remainingSp[GameConstants.getSkillBook(newJob)] += * (getLevel() - (newJob == 200 10));
                            }
                        } else if (
    newJob == 2200) {
                            
    MapleQuest.getInstance(22100).forceStart(this0null);
                            
    MapleQuest.getInstance(22100).forceComplete(this0);
                            
    expandInventory((byte14);
                            
    expandInventory((byte24);
                            
    expandInventory((byte34);
                            
    expandInventory((byte44);
                            
    client.getSession().write(NPCPacket.getEvanTutorial("UI/tutorial/evan/14/0"));
                            
    dropMessage(5"The baby Dragon hatched and appears to have something to tell you. Click the baby Dragon to start a conversation.");
                        }
                    }
                    
    updateSingleStat(MapleStat.AVAILABLESP0); // we don't care the value here
                
    }

                
    int maxhp stats.getMaxHp(), maxmp stats.getMaxMp();

                switch (
    job) {
                    case 
    100// Warrior
                    
    case 1100// Soul Master
                    
    case 2100// Aran
                    
    case 3200:
                    case 
    5100// Mihile
                        
    maxhp += Randomizer.rand(200250);
                        break;
                    case 
    3100:
                        
    maxhp += Randomizer.rand(200250);
                        break;
                    case 
    3110:
                        
    maxhp += Randomizer.rand(300350);
                        break;
                    case 
    200// Magician
                    
    case 2200//evan
                    
    case 2210//evan
                        
    maxmp += Randomizer.rand(100150);
                        break;
                    case 
    300// Bowman
                    
    case 400// Thief
                    
    case 500// Pirate
                    
    case 2300:
                    case 
    3300:
                    case 
    3500:
                        
    maxhp += Randomizer.rand(100150);
                        
    maxmp += Randomizer.rand(2550);
                        break;
                    case 
    110// Fighter
                    
    case 120// Page
                    
    case 130// Spearman
                    
    case 1110// Soul Master
                    
    case 2110// Aran
                    
    case 3210:
                    case 
    5110// Mihile
                        
    maxhp += Randomizer.rand(300350);
                        break;
                    case 
    210// FP
                    
    case 220// IL
                    
    case 230// Cleric
                        
    maxmp += Randomizer.rand(400450);
                        break;
                    case 
    310// Bowman
                    
    case 320// Crossbowman
                    
    case 410// Assasin
                    
    case 420// Bandit
                    
    case 430// Semi Dualer
                    
    case 510:
                    case 
    520:
                    case 
    530:
                    case 
    2310:
                    case 
    1310// Wind Breaker
                    
    case 1410// Night Walker
                    
    case 3310:
                    case 
    3510:
                        
    maxhp += Randomizer.rand(200250);
                        
    maxhp += Randomizer.rand(150200);
                        break;
                    case 
    900// GM
                    
    case 800// Manager
                        
    maxhp += 99999;
                        
    maxmp += 99999;
                        break;
                }
                if (
    maxhp >= 99999) {
                    
    maxhp 99999;
                }
                if (
    maxmp >= 99999) {
                    
    maxmp 99999;
                }
                if (
    GameConstants.isDemon(job)) {
                    
    maxmp GameConstants.getMPByJob(job);
                }
                
    stats.setInfo(maxhpmaxmpmaxhpmaxmp);
                
    Map<MapleStatIntegerstatup = new EnumMap<MapleStatInteger>(MapleStat.class);
                
    statup.put(MapleStat.MAXHPInteger.valueOf(maxhp));
                
    statup.put(MapleStat.MAXMPInteger.valueOf(maxmp));
                
    statup.put(MapleStat.HPInteger.valueOf(maxhp));
                
    statup.put(MapleStat.MPInteger.valueOf(maxmp));
                
    characterCard.recalcLocalStats(this);
                
    stats.recalcLocalStats(this);
                
    client.getSession().write(CWvsContext.updatePlayerStats(statupthis));
                
    map.broadcastMessage(thisEffectPacket.showForeignEffect(getId(), 11), false);
                
    silentPartyUpdate();
                
    guildUpdate();
                
    familyUpdate();
                if (
    dragon != null) {
                    
    map.broadcastMessage(CField.removeDragon(this.id));
                    
    dragon null;
                }
                
    baseSkills();
                if (
    newJob >= 2200 && newJob <= 2218) { //make new
                    
    if (getBuffedValue(MapleBuffStat.MONSTER_RIDING) != null) {
                        
    cancelBuffStats(MapleBuffStat.MONSTER_RIDING);
                    }
                    
    makeDragon();
                }
            } catch (
    Exception e) {
                
    FileoutputUtil.outputFileError(FileoutputUtil.ScriptEx_Loge); //all jobs throw errors :(
            
    }
        } 
    Last edited by TacoBell; 08-02-14 at 07:39 PM.


  2. #2
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    /Bump

  3. #3
    Apprentice frager is offline
    MemberRank
    Feb 2014 Join Date
    12Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    baseSkills();

    my theory

  4. #4
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    Quote Originally Posted by frager View Post
    baseSkills();

    my theory
    I tried that too. Removed the whole method from every point in the source and even edited it to max every skill. This problem is so dumb.

  5. #5
    Apprentice frager is offline
    MemberRank
    Feb 2014 Join Date
    12Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    Quote Originally Posted by TacoBell View Post
    I tried that too. Removed the whole method from every point in the source and even edited it to max every skill. This problem is so dumb.
    Damn, these repacks are worse than I thought lol. Have you tried making a separate changeJob function and just making it do the basic work of changing the job?

  6. #6
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    Quote Originally Posted by frager View Post
    Damn, these repacks are worse than I thought lol. Have you tried making a separate changeJob function and just making it do the basic work of changing the job?
    I guess I could try that.

  7. #7
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    Quote Originally Posted by frager View Post
    Damn, these repacks are worse than I thought lol. Have you tried making a separate changeJob function and just making it do the basic work of changing the job?
    No don't do that. First, changeJob functions not just updates the character's job ID, it has to send packets to update them for the player too. Then in the recent versions (I'm talking v11X and above) more and more checks need to be done in changeJob. Mecedes needs the ear update, Demon slayers need their MP bar updated to DF, Evans need their dragon spawned, so on so forth.

    So yes, if you want to recode something without all the fancy checks, be my guest.

    I suggest you go through the existing changeJob function again and again, and keep going deeper into the functions. Experience is a good thing anyway.

  8. #8
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    Quote Originally Posted by QuietCrystal View Post
    No don't do that. First, changeJob functions not just updates the character's job ID, it has to send packets to update them for the player too. Then in the recent versions (I'm talking v11X and above) more and more checks need to be done in changeJob. Mecedes needs the ear update, Demon slayers need their MP bar updated to DF, Evans need their dragon spawned, so on so forth.

    So yes, if you want to recode something without all the fancy checks, be my guest.

    I suggest you go through the existing changeJob function again and again, and keep going deeper into the functions. Experience is a good thing anyway.
    Iv'e tried that too. I have looked at the whole method from top to bottom and removed multiple functions while in Netbeans during hotfix to see immediate changes. I can't seem to figure this problem out.

  9. #9
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    Quote Originally Posted by TacoBell View Post
    Iv'e tried that too. I have looked at the whole method from top to bottom and removed multiple functions while in Netbeans during hotfix to see immediate changes. I can't seem to figure this problem out.
    Just split in halves. Leaving behind the packet-sending functions, comment out the first half of the code. If it still resets skills, then your error is in the first half. If no, then check if it's in the second half. If it still doesn't reset these skills, then look at packet-sending functions.

    Keep using this method to split segments of codes into halves, quarters, etc until the amount of code you're looking at is very short. Then comment it out.

  10. #10
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    Quote Originally Posted by QuietCrystal View Post
    Just split in halves. Leaving behind the packet-sending functions, comment out the first half of the code. If it still resets skills, then your error is in the first half. If no, then check if it's in the second half. If it still doesn't reset these skills, then look at packet-sending functions.

    Keep using this method to split segments of codes into halves, quarters, etc until the amount of code you're looking at is very short. Then comment it out.
    Yeah i'm starting to wonder if the problem is located elsewhere. I followed your guide lines and even took it to the extreme by deleting 98% of the method and only leaving in minor functions and SOME skills still get wiped and set back to 0. I'm starting to wonder if the problem is coming from somewhere else...

  11. #11
    Member divinesam is offline
    MemberRank
    May 2004 Join Date
    singaporeLocation
    97Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    I guess. Only guess.

    That there might be function that disable some character class from owning certain skills.

    For example, some method might suggest that Mercedes cannot learn 'Shadow Partner' skill. So when you change job from night lord to mercedes, the shadow partner skill gets wiped and also removed from ur key settings.

    I think, and only think, is it 'canLearn' or something like that.

  12. #12
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: [Help] Exiled v117.1 Retarded Reset

    Quote Originally Posted by divinesam View Post
    I guess. Only guess.

    That there might be function that disable some character class from owning certain skills.

    For example, some method might suggest that Mercedes cannot learn 'Shadow Partner' skill. So when you change job from night lord to mercedes, the shadow partner skill gets wiped and also removed from ur key settings.
    Well you're right. I found a method in Skill.java

    I think, and only think, is it 'canLearn' or something like that.
    Well you are right. There's a method about "canBeLearnedBy" in Skill.java. I'll take a crack at the method and see if I can solve it. Thanks for the heads-up ^.^
    PHP Code:
    public boolean canBeLearnedBy(int job) {
            
    int jid job;
            
    int skillForJob id 10000;
            if (
    skillForJob == 2001) {
                return 
    GameConstants.isEvan(job); //special exception for beginner -.-
            
    } else if (skillForJob == 0) {
                return 
    GameConstants.isAdventurer(job); //special exception for beginner
            
    } else if (skillForJob == 1000) {
                return 
    GameConstants.isKOC(job); //special exception for beginner
            
    } else if (skillForJob == 2000) {
                return 
    GameConstants.isAran(job); //special exception for beginner
            
    } else if (skillForJob == 3000) {
                return 
    GameConstants.isResist(job); //special exception for beginner
            
    } else if (skillForJob == 1) {
                return 
    GameConstants.isCannon(job); //special exception for beginner
            
    } else if (skillForJob == 3001) {
                return 
    GameConstants.isDemon(job); //special exception for beginner
            
    } else if (skillForJob == 2002) {
                return 
    GameConstants.isMercedes(job); //special exception for beginner
            
    } else if (skillForJob == 508) {
                return 
    GameConstants.isJett(job); //special exception for beginner
            
    } else if (skillForJob == 2003) {
                return 
    GameConstants.isPhantom(job); //special exception for beginner
            
    } else if (jid 100 != skillForJob 100) { // wrong job
                
    return false;
            } else if (
    jid 1000 != skillForJob 1000) { // wrong job
                
    return false;
            } else if (
    GameConstants.isPhantom(skillForJob) && !GameConstants.isPhantom(job)) {
                return 
    false;
            } else if (
    GameConstants.isJett(skillForJob) && !GameConstants.isJett(job)) {
                return 
    false;
            } else if (
    GameConstants.isCannon(skillForJob) && !GameConstants.isCannon(job)) {
                return 
    false;
            } else if (
    GameConstants.isDemon(skillForJob) && !GameConstants.isDemon(job)) {
                return 
    false;
            } else if (
    GameConstants.isAdventurer(skillForJob) && !GameConstants.isAdventurer(job)) {
                return 
    false;
            } else if (
    GameConstants.isKOC(skillForJob) && !GameConstants.isKOC(job)) {
                return 
    false;
            } else if (
    GameConstants.isAran(skillForJob) && !GameConstants.isAran(job)) {
                return 
    false;
            } else if (
    GameConstants.isEvan(skillForJob) && !GameConstants.isEvan(job)) {
                return 
    false;
            } else if (
    GameConstants.isMercedes(skillForJob) && !GameConstants.isMercedes(job)) {
                return 
    false;
            } else if (
    GameConstants.isResist(skillForJob) && !GameConstants.isResist(job)) {
                return 
    false;
            } else if ((
    jid 10) % 10 == && (skillForJob 10) % 10 > (jid 10) % 10) { // wrong 2nd job
                
    return false;
            } else if ((
    skillForJob 10) % 10 != && (skillForJob 10) % 10 != (jid 10) % 10) { //wrong 2nd job
                
    return false;
            } else if (
    skillForJob 10 jid 10) { // wrong 3rd/4th job
                
    return false;
            }
            return 
    true;
        } 



Advertisement