Never need to reset reactors :)

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Gamma Xerixe is offline
    MemberRank
    Apr 2008 Join Date
    MalaysiaLocation
    3,605Posts

    Never need to reset reactors :)

    Tired of resetting reactors because they got bugged? With this, you never need to reset reactors ever again ! :)

    MapleCharacter
    changeMapInternal
    Code:
    if (inBoss() && getMap().getPlayerCount() <= 1) {
                            if (getMap().getMonsterCount() > 1)
                                    getMap().killAllMonsters(false);
                            getMap().resetReactors();
                            getMap().getReturnMap().resetReactors();
                            for (MaplePortal p : getMap().getReturnMap().getPortals()) {
                                    if (p.CLOSED) {
                                            p.setPortalStatus(p.OPEN);
                                    }
                            }
    MapleMap
    Code:
    public int getPlayerCount() {
                    List<MapleMapObject> players = getMapObjectsInRange(new Point(0, 0), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.PLAYER));
                    return players.size();
            }
    
            public int getMonsterCount() {
                    List<MapleMapObject> monsters = getMapObjectsInRange(new Point(0, 0), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.MONSTER));
                    return monsters.size();
            }
    MapleClient
    disconnect
    Code:
    if (player.inBoss() && player.getMap().getPlayerCount() <= 1) {
                                    if (player.getMap().getMonsterCount() > 1)
                                            player.getMap().killAllMonsters(false);
                                    player.getMap().resetReactors();
                                    player.getMap().getReturnMap().resetReactors();
                                    for (MaplePortal p : player.getMap().getReturnMap().getPortals()) {
                                            if (p.CLOSED) {
                                                    p.setPortalStatus(p.OPEN);
                                            }
                                    }
                            }
    Code:
    public boolean inBoss() {
                    int a = this.map.getId();
                    return a == 240060200 || a == 220080001 || a == 801040100 || a == 280030000 || a == 801040100;
            }
    P/s : All credits goes to me as nothing that was released here was leeched :)

    Pressing the heart button would be nice :D
    Last edited by Xerixe; 20-02-10 at 02:58 AM.


  2. #2
    Member TobbixD is offline
    MemberRank
    Oct 2009 Join Date
    52Posts

    Re: Never need to reset reactors :)

    Nice release

  3. #3
    offonline King Grub is offline
    MemberRank
    Aug 2009 Join Date
    Spring fieldLocation
    3,303Posts

    Re: Never need to reset reactors :)

    Nice there, Xerixe.

  4. #4
    Account Upgraded | Title Enabled! jadeling is offline
    MemberRank
    Jul 2008 Join Date
    706Posts

    Re: Never need to reset reactors :)

    nice job and long time no see..:O

  5. #5
    Smoke & Fly Kars is offline
    MemberRank
    Apr 2008 Join Date
    The NetherlandsLocation
    3,383Posts

    Re: Never need to reset reactors :)

    I didn't really look but this will load the reactorscript everytime a reactor is used, right?

  6. #6
    bleh.... Shawn is offline
    MemberRank
    Oct 2008 Join Date
    Mississauga, CaLocation
    5,904Posts

    Re: Never need to reset reactors :)

    No, it looks like it only loads the reactorscript if the reactors/mobs fall below 1.

  7. #7
    may web.very maple.pls. iAkira is offline
    MemberRank
    Aug 2009 Join Date
    somewhere..Location
    2,378Posts

    Re: Never need to reset reactors :)

    Nice release xD

  8. #8
    Account Upgraded | Title Enabled! zcikkita is offline
    MemberRank
    Jul 2008 Join Date
    Europe.Location
    317Posts

    Re: Never need to reset reactors :)

    Xerixe's back! :D

  9. #9
    Banned lolxd is offline
    BannedRank
    Feb 2010 Join Date
    85Posts

    Re: Never need to reset reactors :)

    fail shit

  10. #10
    Enthusiast vegito2010 is offline
    MemberRank
    Jul 2008 Join Date
    35Posts

    Re: Never need to reset reactors :)

    Quote Originally Posted by lolxd View Post
    fail shit
    *Off topic: Release somethin if your gonna say shit like that

    *On topic: Thanks for this

  11. #11
    Alpha Member Hennessy`' is offline
    MemberRank
    Dec 2009 Join Date
    in a CaveLocation
    2,298Posts

    Re: Never need to reset reactors :)

    Nice release!

  12. #12
    Gamma Xerixe is offline
    MemberRank
    Apr 2008 Join Date
    MalaysiaLocation
    3,605Posts

    Re: Never need to reset reactors :)

    Hmmm. Forgot to add inBoss(). I just remembered :P
    Btw, I'm not sure how pink bean works since i stopped maple for sometime, but if pink bean is similiar to the other bosses, just add the mapid to inBoss

  13. #13
    Alpha Member watzmename is offline
    MemberRank
    Aug 2008 Join Date
    2,835Posts

    Re: Never need to reset reactors :)

    Put it in removePlayer in MapleMap instead of placing it in both changeMap and disconnect.

    And to make it shorter:
    PHP Code:
    if (chr.inBoss() && getPlayerCount() <= 1) {
                if (
    getMonsterCount() > 1) {    
                       
    killAllMonsters(false);
                }
                
    resetReactors();
                
    getReturnMap().resetReactors();
                for (
    MaplePortal p getReturnMap().getPortals()) {
                    if (
    p.CLOSED) {
                        
    p.setPortalStatus(p.OPEN);
                    }
                }
            } 

  14. #14
    Novice cornhollio is offline
    MemberRank
    Feb 2010 Join Date
    2Posts

    Re: Never need to reset reactors :)

    thanks dude it works

  15. #15
    Account Upgraded | Title Enabled! Colors is offline
    MemberRank
    Jan 2010 Join Date
    ParadiseLocation
    385Posts

    Re: Never need to reset reactors :)

    Great release :) Keep em coming.



Page 1 of 2 12 LastLast

Advertisement