- Joined
- Sep 7, 2006
- Messages
- 245
- Reaction score
- 0
HI uhm can you make me a script so when I click on the 'Trade' button it takes you to FM
EnterMTSHandler.java
Code:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <[email protected]>
Matthias Butz <[email protected]>
Jan Christian Meyer <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.odinms.net.channel.handler;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.messages.ServernoticeMapleClientMessageCallback;
import net.sf.odinms.net.AbstractMaplePacketHandler;
import net.sf.odinms.net.channel.ChannelServer;
import net.sf.odinms.server.MaplePortal;
import net.sf.odinms.server.maps.MapleMap;
import net.sf.odinms.tools.MaplePacketCreator;
import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;
public class EnterMTSHandler extends AbstractMaplePacketHandler {
@Override
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
/*
new ServernoticeMapleClientMessageCallback(5, c).dropMessage("The MTS is not available.");
c.getSession().write(MaplePacketCreator.enableActions());
//c.getSession().write(MaplePacketCreator.sendMTS());
*/
final int teleportTo = 910000000;
c.getPlayer().saveLocation(SavedLocationType.FREE_MARKET);
ChannelServer cserv = c.getChannelServer();
MapleMap target = cserv.getMapFactory().getMap(teleportTo);
MaplePortal targetPortal = target.getPortal(0);
c.getPlayer().changeMap(target, targetPortal);
}
}
Code:
final int teleportTo = <MAPID>

