[Request] Method does not work but it should?

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

    [Request] Method does not work but it should?

    Can anyone explain why this piece of code does not work? The exact code used to work a while back but not exactly as it should, and now it doesn't work at all. I want an occupation (camper) to camp in Henesys and gain some occupation EXP while doing so. He seems to get no EXP at all. I also took into consideration would this keep appearing if a player were to spam the "up" arrow key and switch between henesys and another map to go back to Henesys and receiving the EXP in a "cheating" way rather than to wait a minute to get it? Sorry if this seems confusing.

    PHP Code:
    if (chr.getOccupation() == OccupationConstants.CAMPER && mapid == 1000000000) {
                    
    TimerManager.getInstance().register(new Runnable() {
                        [
    MENTION=2000004426]Override[/MENTION]
                        public 
    void run() {
                            if (
    mapid == 1000000000) {
                                final 
    int rand Randomizer.rand(19);
                                
    chr.gainOccupationEXP(rand);
                            }
                        }
                    }, 
    60000);
                } 


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

    Re: [Request] Method does not work but it should?

    Where is the code placed?

    If it's in the map-changing section, then every time I enter the map, I register a new check. So if I re-enter the map 5 times, I can expect to get occupation points 5 times a minute.

    Look up how fishing events are done. When started, the thread is stored as a variable, and the registered event is stopped upon out of bait, or chair removed. Do the same thing, except that the thread is started upon entering Henesys, and stopped upon exiting Henesys.

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

    Re: [Request] Method does not work but it should?

    The code is placed in Maplemap.java under addPlayer method.

  4. #4
    Account Upgraded | Title Enabled! NemesisToKill is offline
    MemberRank
    Nov 2009 Join Date
    874Posts

    Re: [Request] Method does not work but it should?

    It is really bad to register threads and not save them in ScheduledFuture objects. Every time you register (schedule is okay), the thread pool executor keeps the thread and runs it at a specified interval. This means that the thread is never garbage collected! If you do not save a reference to the ScheduledFuture so that you can manually cancel it when you want to, it will be a huge memory leak, especially in the way you wrote it. If the TimerManager wasn't coded how it was, it would be okay if the character logs off (but still bad while the character is online), because an exception would be thrown and the thread would be removed from the executor. But the TimerManager ignores exceptions, so the threads would remain forever.

    It is standard to assign a ScheduledFuture upon registering a thread, like this:
    PHP Code:
    ScheduledFuture<?future TimerManager.register(threadINTERVALDELAY);

    // do some stuff

    // cancel thread here when no longer necessary
    future.cancel(false);
    You can, for example, put the future in MapleCharacter, register the thread when the character enters Henesys, and then cancel the future when the character leaves Henesys.

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

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by NemesisToKill View Post
    It is really bad to register threads and not save them in ScheduledFuture objects. Every time you register (schedule is okay), the thread pool executor keeps the thread and runs it at a specified interval. This means that the thread is never garbage collected! If you do not save a reference to the ScheduledFuture so that you can manually cancel it when you want to, it will be a huge memory leak, especially in the way you wrote it. If the TimerManager wasn't coded how it was, it would be okay if the character logs off (but still bad while the character is online), because an exception would be thrown and the thread would be removed from the executor. But the TimerManager ignores exceptions, so the threads would remain forever.

    It is standard to assign a ScheduledFuture upon registering a thread, like this:
    PHP Code:
    ScheduledFuture<?future TimerManager.register(threadINTERVALDELAY);

    // do some stuff

    // cancel thread here when no longer necessary
    future.cancel(false);
    You can, for example, put the future in MapleCharacter, register the thread when the character enters Henesys, and then cancel the future when the character leaves Henesys.
    I coded it in that atrocious way because I use the Henesys PQ method as a base and assumed it was fine? Guess I was wrong. This was the template I used.
    PHP Code:
    } else if (mapid == 910110000) {
                        
    chr.getClient().announce(MaplePacketCreator.getClock(15 60));
                        
    TimerManager.getInstance().register(new Runnable() {
                              [
    MENTION=2000004426]Override[/MENTION]
                            public 
    void run() {
                                if (
    mapid == 910110000) {
                                    
    chr.getClient().getPlayer().changeMap(chr.getClient().getChannelServer().getMapFactory().getMap(925020000));
                                }
                            }
                        }, 
    15 60 1000 3000); 
    I also don't work with ScheduledFuture's too much because of the confusion, for example I don't even know how to register the thread. I'm still looking on how to rofl. I was able to come up with a quick code but i'm assuming it's still way wrong.
    PHP Code:
    public ScheduledFuture<?future null;
    if (
    mapid == 100000000 && chr.getOccupation() == OccupationConstants.CAMPER&& !chr.getSuckupCamp()) {
                        
    TimerManager.getInstance().schedule(new Runnable() {
                             [
    MENTION=2000004426]Override[/MENTION]
                            public 
    void run() {
                                if (
    mapid == 1000000000) {
                                    
    int rand Randomizer.rand(125);
                                    
    chr.gainOccupationEXP(rand);
                                    
    chr.setSuckupCamp(true);
                                } else {
                                    
    chr.setSuckupCamp(false);
                                }
                            }
                        }, 
    10000);
                        
    future.cancel(true);
                    }
    Last edited by TacoBell; 18-05-14 at 10:40 AM.

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

    [Request] Method does not work but it should?

    Quote Originally Posted by TacoBell View Post
    I coded it in that atrocious way because I use the Henesys PQ method as a base and assumed it was fine? Guess I was wrong. This was the template I used.
    PHP Code:
    } else if (mapid == 910110000) {
                        
    chr.getClient().announce(MaplePacketCreator.getClock(15 60));
                        
    TimerManager.getInstance().register(new Runnable() {
                              [
    MENTION=2000004426]Override[/MENTION]
                            public 
    void run() {
                                if (
    mapid == 910110000) {
                                    
    chr.getClient().getPlayer().changeMap(chr.getClient().getChannelServer().getMapFactory().getMap(925020000));
                                }
                            }
                        }, 
    15 60 1000 3000); 
    I also don't work with ScheduledFuture's too much because of the confusion, for example I don't even know how to register the thread. I'm still looking on how to rofl. I was able to come up with a quick code but i'm assuming it's still way wrong.
    PHP Code:
    public ScheduledFuture future null;
    if (
    mapid == 100000000 && chr.getOccupation() == OccupationConstants.CAMPER&& !chr.getSuckupCamp()) {
                        
    TimerManager.getInstance().schedule(new Runnable() {
                             [
    MENTION=2000004426]Override[/MENTION]
                            public 
    void run() {
                                if (
    mapid == 1000000000) {
                                    
    int rand Randomizer.rand(125);
                                    
    chr.gainOccupationEXP(rand);
                                    
    chr.setSuckupCamp(true);
                                } else {
                                    
    chr.setSuckupCamp(false);
                                }
                            }
                        }, 
    10000);
                        
    future.cancel(true);
                    } 
    Make ScheduleFuture a variable in MapleCharacter. Let's call it sf for now.

    When the player changes map:
    sf.cancel();
    sf = null;
    => If map is Henesys and player is camper:
    sf = (runnable code here);
    then schedule it.

    That should make the code fairly clean, with none of the exploits you listed earlier.

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

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by QuietCrystal View Post
    Make ScheduleFuture a variable in MapleCharacter. Let's call it sf for now.

    When the player changes map:
    sf.cancel();
    sf = null;
    => If map is Henesys and player is camper:
    sf = (runnable code here);
    then schedule it.

    That should make the code fairly clean, with none of the exploits you listed earlier.
    Thank you for the tip! I was able to code it or at least I think so but it still doesn't work. I added it under addPlayer in MapleMap. I followed your steps and did my best but it fails somehow.
    PHP Code:
    public ScheduledFuture<?whoreExp;
    PHP Code:
    } else if (mapid == 1000000000 && chr.getOccupation() == OccupationConstants.CAMPER) {
                        
    chr.whoreExp TimerManager.getInstance().schedule(new Runnable() {
                             [
    MENTION=2000004426]Override[/MENTION]
                            public 
    void run() {
                                if (
    mapid == 1000000000) {
                                    
    chr.gainOccupationEXP(5);
                                    
    System.out.println("Will this work?");
                                    
    chr.whoreExp.cancel(false);
                                } else {
                                    
    chr.whoreExp.cancel(true);
                                    
    chr.whoreExp null;
                                }
                            }
                        }, 
    5000); //Happens every 5 seconds for debug purposes.
                    


  8. #8
    Account Upgraded | Title Enabled! NemesisToKill is offline
    MemberRank
    Nov 2009 Join Date
    874Posts

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by TacoBell View Post
    Thank you for the tip! I was able to code it or at least I think so but it still doesn't work. I added it under addPlayer in MapleMap. I followed your steps and did my best but it fails somehow.
    PHP Code:
    public ScheduledFuture<?whoreExp;
    PHP Code:
    } else if (mapid == 1000000000 && chr.getOccupation() == OccupationConstants.CAMPER) {
                        
    chr.whoreExp TimerManager.getInstance().schedule(new Runnable() {
                             [
    MENTION=2000004426]Override[/MENTION]
                            public 
    void run() {
                                if (
    mapid == 1000000000) {
                                    
    chr.gainOccupationEXP(5);
                                    
    System.out.println("Will this work?");
                                    
    chr.whoreExp.cancel(false);
                                } else {
                                    
    chr.whoreExp.cancel(true);
                                    
    chr.whoreExp null;
                                }
                            }
                        }, 
    5000); //Happens every 5 seconds for debug purposes.
                    

    Um btw your mapId is wrong, it has 10 digits.

    addPlayer:
    PHP Code:
    if (mapid == 100000000 && chr.getOccupation() == OccupationConstants.CAMPER) {
                        
    chr.whoreExp TimerManager.getInstance().register(new Runnable() {
                            public 
    void run() {
                                    
    chr.gainOccupationEXP(5);
                                    
    System.out.println("Will this work?");
                                }
                            }
                        }, 
    5000); //Happens every 5 seconds for debug purposes.
                    

    removePlayer:
    PHP Code:
    if (mapid == 100000000 && chr.whoreExp != null) {
        
    chr.whoreExp.cancel(false);
        
    chr.whoreExp null;


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

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by NemesisToKill View Post
    Um btw your mapId is wrong, it has 10 digits.

    addPlayer:
    PHP Code:
    if (mapid == 100000000 && chr.getOccupation() == OccupationConstants.CAMPER) {
                        
    chr.whoreExp TimerManager.getInstance().register(new Runnable() {
                            public 
    void run() {
                                    
    chr.gainOccupationEXP(5);
                                    
    System.out.println("Will this work?");
                                }
                            }
                        }, 
    5000); //Happens every 5 seconds for debug purposes.
                    

    removePlayer:
    PHP Code:
    if (mapid == 100000000 && chr.whoreExp != null) {
        
    chr.whoreExp.cancel(false);
        
    chr.whoreExp null;

    Wow i'm so dumb! How did I not see that. I managed to add the functions and they work only for the specified occupation (good) but when I spam portal button to enter another map I get EXP. I repeatedly kept changing maps on purpose and gained EXP without having to spend 10 seconds in Henesys, any idea as to why that happens? The functions look exactly the same and placed correctly.

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

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by TacoBell View Post
    Wow i'm so dumb! How did I not see that. I managed to add the functions and they work only for the specified occupation (good) but when I spam portal button to enter another map I get EXP. I repeatedly kept changing maps on purpose and gained EXP without having to spend 10 seconds in Henesys, any idea as to why that happens? The functions look exactly the same and placed correctly.
    If I'm not wrong, TimerManager.register() can take 3 variables as well. At the moment you're using 2. The third variable is what you should be looking at.

  11. #11
    Account Upgraded | Title Enabled! NemesisToKill is offline
    MemberRank
    Nov 2009 Join Date
    874Posts

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by TacoBell View Post
    Wow i'm so dumb! How did I not see that. I managed to add the functions and they work only for the specified occupation (good) but when I spam portal button to enter another map I get EXP. I repeatedly kept changing maps on purpose and gained EXP without having to spend 10 seconds in Henesys, any idea as to why that happens? The functions look exactly the same and placed correctly.
    Can you post your MapleMap.addPlayer and MapleMap.removePlayer? I don't think there is a way for that code to have unintended effects unless it was placed weirdly. Also, why would it be 10 seconds? It repeats every 5 seconds.

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

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by NemesisToKill View Post
    Can you post your MapleMap.addPlayer and MapleMap.removePlayer? I don't think there is a way for that code to have unintended effects unless it was placed weirdly. Also, why would it be 10 seconds? It repeats every 5 seconds.
    I changed it to 10 seconds so it wouldn't be too fast and made sure it could work.
    PHP Code:
    public void addPlayer(final MapleCharacter chr) {
            
    synchronized (characters) {
                
    this.characters.add(chr);
            }
            if ((
    cTimestamp cDuration) > System.currentTimeMillis()) {
                
    chr.announce(MaplePacketCreator.getClock((int) (cDuration 1000 - ((System.currentTimeMillis() - cTimestamp) / 1000))));
            }
            
    synchronized (this.mapobjects) {
                if (!
    chr.isClone()) {
                    if (
    onFirstUserEnter.length() != && !chr.hasEntered(onFirstUserEntermapid) && MapScriptManager.getInstance().scriptExists(onFirstUserEntertrue)) {
                        if (
    getAllPlayer().size() <= 1) {
                            
    chr.enteredScript(onFirstUserEntermapid);
                            
    MapScriptManager.getInstance().getMapScript(chr.getClient(), onFirstUserEntertrue);
                        }
                    }
                    if (
    onUserEnter.length() != 0) {
                        if (
    onUserEnter.equals("cygnusTest") && (mapid 913040000 || mapid 913040006)) {
                            
    chr.saveLocation("INTRO");
                        }
                        
    MapScriptManager.getInstance().getMapScript(chr.getClient(), onUserEnterfalse);
                    }
                    if (
    FieldLimit.CANNOTUSEMOUNTS.check(fieldLimit) && chr.getBuffedValue(MapleBuffStat.MONSTER_RIDING) != null) {
                        
    chr.cancelEffectFromBuffStat(MapleBuffStat.MONSTER_RIDING);
                        
    chr.cancelBuffStats(MapleBuffStat.MONSTER_RIDING);
                    }
                    if (
    chr.getOccupation() == OccupationConstants.CAMPER&& mapid == 100000000) {
                        
    chr.whoreExp TimerManager.getInstance().register(new Runnable() {
                             [
    MENTION=2000004426]Override[/MENTION]
                            public 
    void run() {
                                if (
    chr.getOccupation() == OccupationConstants.CAMPER && mapid == 100000000) {
                                    final 
    int rand Randomizer.rand(125);
                                    
    chr.gainOccupationEXP(rand);
                                }
                            }
                        }, 
    10000);
                    }
                    if (
    mapid == 923010000 && getMonsterById(9300102) == null) {
                        
    spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300102), new Point(77426));
                    } else if (
    mapid == 922241100) {
                        
    chr.getClient().getSession().write(MaplePacketCreator.musicChange("Bgm08/LetsHuntAliens"));
                    } else if (
    mapid == 922241100) {
                        
    NPCScriptManager.getInstance().start(chr.getClient(), 2050002nullnull);
                    } else if (
    mapid == 910000018) {
                        
    chr.getClient().getSession().write(MaplePacketCreator.musicChange("Bgm09/TimeAttack"));
                        
    chr.getMap().broadcastMessage(MaplePacketCreator.serverNotice(5"" chr.getName() + " has entered the PvP map!"));
                    } else if (
    mapid == 910000019) {
                        
    chr.getClient().getSession().write(MaplePacketCreator.musicChange("Bgm09/TimeAttack"));
                        
    chr.getMap().broadcastMessage(MaplePacketCreator.serverNotice(5"" chr.getName() + " has entered the PvP map!"));
                    } else if (
    mapid == 910000020) {
                        
    chr.getClient().getSession().write(MaplePacketCreator.musicChange("Bgm09/TimeAttack"));
                        
    chr.getMap().broadcastMessage(MaplePacketCreator.serverNotice(5"" chr.getName() + " has entered the PvP map!"));
                    } else if (
    mapid == 910000021) {
                        
    chr.getClient().getSession().write(MaplePacketCreator.musicChange("Bgm09/TimeAttack"));
                        
    chr.getMap().broadcastMessage(MaplePacketCreator.serverNotice(5"" chr.getName() + " has entered the PvP map!"));
                    } else if (
    mapid == 910000022) {
                        
    chr.getClient().getSession().write(MaplePacketCreator.musicChange("Bgm09/TimeAttack"));
                        
    chr.getMap().broadcastMessage(MaplePacketCreator.serverNotice(5"" chr.getName() + " has entered the PvP map!"));
                    } else if (
    mapid == 990000300) {
                        
    chr.getClient().getSession().write(MaplePacketCreator.musicChange("Bgm06/FinalFight"));
                    } else if (
    mapid == 910110000) {
                        
    chr.getClient().announce(MaplePacketCreator.getClock(15 60));
                        
    TimerManager.getInstance().register(new Runnable() {
                             [
    MENTION=2000004426]Override[/MENTION]
                            public 
    void run() {
                                if (
    mapid == 910110000) {
                                    
    chr.getClient().getPlayer().changeMap(chr.getClient().getChannelServer().getMapFactory().getMap(925020000));
                                }
                            }
                        }, 
    15 60 1000 3000);
                    }
                }
                
    MaplePet[] pets chr.getPets();
                for (
    int i 0chr.getPets().lengthi++) {
                    if (
    pets[i] != null && getGroundBelow(chr.getPosition()) != null) {
                        
    pets[i].setPos(getGroundBelow(chr.getPosition()));
                        
    chr.announce(MaplePacketCreator.showPet(chrpets[i], falsefalse));
                    } else {
                        break;
                    }
                }

                if (
    chr.isHidden()) {
                    
    broadcastGMMessage(chrMaplePacketCreator.spawnPlayerMapobject(chr), false);
                    
    chr.announce(MaplePacketCreator.getGMEffect(0x10, (byte1));
                } else {
                    
    broadcastMessage(chrMaplePacketCreator.spawnPlayerMapobject(chr), false);
                }

                
    sendObjectPlacement(chr.getClient());
                if (
    isStartingEventMap() && !eventStarted()) {
                    
    chr.getMap().getPortal("join00").setPortalStatus(false);
                }
                if (
    hasForcedEquip()) {
                    
    chr.getClient().announce(MaplePacketCreator.showForcedEquip(-1));
                }
                if (
    specialEquip()) {
                    
    chr.getClient().announce(MaplePacketCreator.coconutScore(00));
                    
    chr.getClient().announce(MaplePacketCreator.showForcedEquip(chr.getTeam()));
                }
                
    this.mapobjects.put(chr.getObjectId(), chr);
            }
            if (
    chr.getPlayerShop() != null) {
                
    addMapObject(chr.getPlayerShop());
            }
            
    MapleStatEffect summonStat chr.getStatForBuff(MapleBuffStat.SUMMON);
            if (!
    chr.isClone()) {
                if (
    summonStat != null) {
                    
    MapleSummon summon chr.getSummons().get(summonStat.getSourceId());
                    
    summon.setPosition(chr.getPosition());
                    
    chr.getMap().spawnSummon(summon);
                    
    updateMapObjectVisibility(chrsummon);
                }
            }
            if (
    mapEffect != null) {
                
    mapEffect.sendStartData(chr.getClient());
            }
            if (
    mapid == 914000200 || mapid == 914000210 || mapid == 914000220) {
                
    TimerManager.getInstance().schedule(new Runnable() {
                     [
    MENTION=2000004426]Override[/MENTION]
                    public 
    void run() {
                        
    chr.getClient().announce(MaplePacketCreator.aranGodlyStats());
                    }
                }, 
    1500);
            }
            if (!
    chr.isClone()) {
                if (
    chr.getEventInstance() != null && chr.getEventInstance().isTimerStarted()) {
                    
    chr.getClient().announce(MaplePacketCreator.getClock((int) (chr.getEventInstance().getTimeLeft() / 1000)));
                }
                if (
    chr.getFitness() != null && chr.getFitness().isTimerStarted()) {
                    
    chr.getClient().announce(MaplePacketCreator.getClock((int) (chr.getFitness().getTimeLeft() / 1000)));
                }

                if (
    chr.getOla() != null && chr.getOla().isTimerStarted()) {
                    
    chr.getClient().announce(MaplePacketCreator.getClock((int) (chr.getOla().getTimeLeft() / 1000)));
                }

                if (
    mapid == 109060000) {
                    
    chr.announce(MaplePacketCreator.rollSnowBall(true0nullnull));
                }

                
    MonsterCarnival carnival chr.getCarnival();
                
    MonsterCarnivalParty cparty chr.getCarnivalParty();
                if (
    carnival != null && cparty != null && (mapid == 980000101 || mapid == 980000201 || mapid == 980000301 || mapid == 980000401 || mapid == 980000501 || mapid == 980000601)) {
                    
    chr.getClient().announce(MaplePacketCreator.getClock((int) (carnival.getTimeLeft() / 1000)));
                    
    chr.getClient().announce(MaplePacketCreator.startCPQ(chrcarnival.oppositeTeam(cparty)));
                }
                if (
    hasClock()) {
                    
    Calendar cal Calendar.getInstance();
                    
    chr.getClient().announce((MaplePacketCreator.getClockTime(cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND))));
                }
                if (
    hasBoat() == 2) {
                    
    chr.getClient().announce((MaplePacketCreator.boatPacket(true)));
                } else if (
    hasBoat() == && (chr.getMapId() != 200090000 || chr.getMapId() != 200090010)) {
                    
    chr.getClient().announce(MaplePacketCreator.boatPacket(false));
                }
                
    chr.receivePartyMemberHP();
            }
            for (final 
    WeakReference<MapleCharacterchrz chr.getClones()) {
                if (
    chrz.get() != null) {
                    
    chrz.get().setPosition(chr.getPosition());
                    
    chrz.get().setMap(this);
                    
    addPlayer(chrz.get());
                }
            }
        } 
    PHP Code:
    public void removePlayer(MapleCharacter chr) {
            
    synchronized (characters) {
                
    characters.remove(chr);
            }
            
    removeMapObject(chr.getObjectId());
            if (!
    chr.isHidden()) {
                
    broadcastMessage(MaplePacketCreator.removePlayerFromMap(chr.getId()));
            } else {
                
    broadcastGMMessage(MaplePacketCreator.removePlayerFromMap(chr.getId()));
            }

            for (
    MapleMonster monster chr.getControlledMonsters()) {
                
    monster.setController(null);
                
    monster.setControllerHasAggro(false);
                
    monster.setControllerKnowsAboutAggro(false);
                
    updateMonsterController(monster);
            }
            if (
    mapid == 100000000 && chr.whoreExp != null) {
                
    chr.whoreExp.cancel(false);
                
    chr.whoreExp null;
            }
            
    chr.leaveMap();
            
    chr.cancelMapTimeLimitTask();
            for (
    MapleSummon summon chr.getSummons().values()) {
                if (
    summon.isStationary()) {
                    
    chr.cancelBuffStats(MapleBuffStat.PUPPET);
                } else {
                    
    removeMapObject(summon);
                }
            }
            if (!
    chr.isClone()) {
                for (final 
    WeakReference<MapleCharacterchrz chr.getClones()) {
                    if (
    chrz.get() != null) {
                        
    removePlayer(chrz.get());
                    }
                }
                
    chr.leaveMap();
            }
        } 

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

    Re: [Request] Method does not work but it should?

    The coded wasn't placed weirdly. I made sure (to my knowledge) to place it in a good spot. There's no error or anything, the only error that appears is that I get Occupation EXP twice upon entering Henesys without spending 10 seconds. I was able to test this multiple times and couldn't find out why it happens. Would an event script do the trick?

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

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by TacoBell View Post
    The coded wasn't placed weirdly. I made sure (to my knowledge) to place it in a good spot. There's no error or anything, the only error that appears is that I get Occupation EXP twice upon entering Henesys without spending 10 seconds. I was able to test this multiple times and couldn't find out why it happens. Would an event script do the trick?
    No. Read my previous post about the third parameter.

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

    Re: [Request] Method does not work but it should?

    Quote Originally Posted by QuietCrystal View Post
    No. Read my previous post about the third parameter.
    I would if you could specify a bit more. I have looked at all of the TimerManager's in my maplemap and they look almost exactly the same except mine is checking for an occupation.



Page 1 of 2 12 LastLast

Advertisement