Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Forced Return Maps(Odin)

Status
Not open for further replies.
You've got my respect!
Joined
Apr 8, 2008
Messages
508
Reaction score
147
You know when you disconnect from pianus in GMS you get warped to aqua?
This will do that.
This has every map that has a forcible return map.

In MapleMapfactory.java
Change:
Code:
map = new MapleMap(mapid, channel, MapleDataTool.getInt("info/returnMap", mapData), monsterRate);
To:
Code:
map = new MapleMap(mapid, channel, MapleDataTool.getInt("info/returnMap", mapData), MapleDataTool.getInt("info/forcedReturn", mapData), monsterRate);
In MapleMap.java
Add:
Code:
private int forcedMapId;
After:
Code:
private int returnMapId;
Change:
Code:
public MapleMap(int mapid, int channel, int returnMapId, float monsterRate) {
To:
Code:
public MapleMap(int mapid, int channel, int returnMapId, int forcedMapId, float monsterRate) {
Add:
Code:
this.forcedMapId = forcedMapId;
After:
Code:
this.returnMapId = returnMapId;
Add:
Code:
public int getForcedMapId() {
            return forcedMapId;
        }
After:
Code:
public MapleMap getReturnMap() {
        return ChannelServer.getInstance(channel).getMapFactory().getMap(returnMapId);
    }
In MapleCharacter.java
Change:
Code:
if (map == null) {
                ps.setInt(20, 0);
            } else {
                    ps.setInt(20, map.getId());
            }
To:
Code:
if (map == null) {
                ps.setInt(20, 0);
            } else {
                            if(map.getForcedMapId() != 999999999)
                ps.setInt(20, map.getForcedMapId());
                            else
                                ps.setInt(20, map.getId());
            }
Have fun.
Creds:
Matze/Serp
Me

NOTE:
If you would like to change the forced return map of a map, using xml files go to the file and search for "forcedReturn" and change the value to what map you want it to change to.
 
Last edited:
Newbie Spellweaver
Joined
Aug 1, 2008
Messages
66
Reaction score
0
Re: [Release] Forced Return Maps

good job!
nice release =)
 
Newbie Spellweaver
Joined
Jun 14, 2008
Messages
80
Reaction score
1
Re: [Release] Forced Return Maps

Same as Kryser,
Someone already released it, Diffrenet methods but it's was the same
thing to do.
 
Junior Spellweaver
Joined
May 26, 2008
Messages
195
Reaction score
0
Re: [Release] Forced Return Maps

So this has...
Pianus > Aqua?
Mushmom > henesy?
Zombie Mushmom > ant tunnel park?
Zakum > dead mine 1?
i dun remember anything else :)
 
You've got my respect!
Joined
Apr 8, 2008
Messages
508
Reaction score
147
Re: [Release] Forced Return Maps

This has every map that has a forcible return map.
i remember someone release one diferent metod that do the same thing o.o
This is the more proper way of doing it.
 
Status
Not open for further replies.
Back
Top