Reloadmap that reloads XML

Results 1 to 8 of 8
  1. #1
    Member qqwcty is offline
    MemberRank
    Oct 2015 Join Date
    66Posts

    Reloadmap that reloads XML

    iirc there were reloadmap commands that could reload the xml. Meaning if I added a NPC in the XML and do !reloadmap <map id> , the NPC will appear instead of needing to restart the server.

    Seems like v83 reloadmap doesn't work that way & how can I change it ?
    else if (sub[0].equals("reloadmap")) { MapleMap oldMap = c.getPlayer().getMap();
    MapleMap newMap = c.getChannelServer().getMapFactory().getMap(player.getMapId());
    for (MapleCharacter ch : oldMap.getCharacters()) {
    ch.changeMap(newMap);
    }
    oldMap = null;
    newMap.respawn();
    }


  2. #2
    That one pokemon thing Luxray is offline
    Grand MasterRank
    Apr 2010 Join Date
    2,043Posts

    Re: Reloadmap that reloads XML

    You would have to reload the data it loads during startup. If I recall correctly, data is stored in the MapleData file, but I'm not sure where it's loaded from

  3. #3
    Member qqwcty is offline
    MemberRank
    Oct 2015 Join Date
    66Posts

    Re: Reloadmap that reloads XML

    Alright I'll figure a way. Another thing ( I dont wanna create another thread ) ,

    "this.expRate = worldz.getExpRate();" default exp rate is 10x , I want it 11x. When I do this.expRate = 1 + worldz.getExpRate(); , nothing happens. There isnt a change in-game.

  4. #4
    That one pokemon thing Luxray is offline
    Grand MasterRank
    Apr 2010 Join Date
    2,043Posts

    Re: Reloadmap that reloads XML

    Isn't it easier to just edit the worldz.getExpRate() value?

  5. #5
    Member qqwcty is offline
    MemberRank
    Oct 2015 Join Date
    66Posts

    Re: Reloadmap that reloads XML

    I'm just messing around with custom exp cards xD

  6. #6
    Elite Member Las Systos is offline
    Member +Rank
    Mar 2015 Join Date
    NetherlandsLocation
    238Posts

    Re: Reloadmap that reloads XML

    i know for a fact that mapleblade sources have !reloadmap in them (without map id) that reloads the map including the xml data, if you remove an npc in xml and do !reloadmap. the npc will be gone.

  7. #7
    Member qqwcty is offline
    MemberRank
    Oct 2015 Join Date
    66Posts

    Re: Reloadmap that reloads XML

    Yea I just noticed cause EricMs v83 was based off mapleblade too and the reloadmap function were similar but the source I'm using is based off MoopleDEV and by adding the way mapleblade reloadmap , gives me HEAPS of errors.

    Was wondering if anyone has the function working for moopledev .

  8. #8
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: Reloadmap that reloads XML

    Quote Originally Posted by qqwcty View Post
    Yea I just noticed cause EricMs v83 was based off mapleblade too and the reloadmap function were similar but the source I'm using is based off MoopleDEV and by adding the way mapleblade reloadmap , gives me HEAPS of errors.

    Was wondering if anyone has the function working for moopledev .
    This is because I fixed the function to do what your asking (I used it on Development as well). Mine won't just "reload" the map, it will remove the key from the MapleMapFactory so that it's null, and re-iterate that id to get all the modified data from XML. I did this for the same reason when I XML edited back in the day. You need to add the fixed reloadmap command to your commands, and then in MapleMapFactory you'll have to change/add a reloadMap function.

    In fact, I recall seeing a release here on RZ a while ago that did this. Not sure if you can find it though..



Advertisement