查看: 1303|回复: 3

【夜空】CMS079按下聊天按钮自动到自由市集

[复制链接]
  • TA的每日心情

    2022-12-15 19:48
  • 签到天数: 6 天

    [LV.2]偶尔看看I

    74

    主题

    9

    回帖

    355

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    355
    QQ
    发表于 2022-11-21 15:22:47 | 显示全部楼层 |阅读模式
    端口來源:
    https://www.fengyewuyu.com/thread-1573-1-1.html


    由于聊天按钮都是被拿来当作解卡的,所以我把他改成按下按钮后移动到自由市场,同时也可以跟拍卖快捷菜单共存,无需将拍卖按钮改成移动到自由市场
    本帖隐藏的内容修改方法:
    到handling.channel.handler的PlayersHandler节点

    1.在适当的位置添加下面该段代码


    • import tools.data.input.SeekableLittleEndianAccessor;
    • import server.MaplePortal;
    • import server.maps.MapleMap;
    • import server.maps.SavedLocationType;
    • import handling.channel.ChannelServer;

    [color=rgb(85, 85, 85) !important]复制代码





    2.再找到
    • public static void ChatRoomHandler(final SeekableLittleEndianAccessor slea, final MapleClient c) {

    [color=rgb(85, 85, 85) !important]复制代码




    •       }
    •     public static void UseDoor(final SeekableLittleEndianAccessor slea, final MapleCharacter chr) {

    [color=rgb(85, 85, 85) !important]复制代码



    将这两段代码之间的代码改成

    •             if ((c.getPlayer().getMapId() < 910000000) || (c.getPlayer().getMapId() > 910000022)){
    •               //c.getSession().write(MaplePacketCreator.enableActions());
    •                 MapleMap to;
    •                 MaplePortal pto;
    •                               to = ChannelServer.getInstance(c.getChannel()).getMapFactory().getMap(910000000);
    •                               c.getPlayer().saveLocation(SavedLocationType.FREE_MARKET);
    •                               pto = to.getPortal("out00"); // or st00?
    •                                 c.getPlayer().changeMap(to, pto);
    •             //} else {
    •               //c.getSession().write(MaplePacketCreator.enableActions());
    •             }

    [color=rgb(85, 85, 85) !important]复制代码



    最终结果需为
    •     public static void ChatRoomHandler(final SeekableLittleEndianAccessor slea, final MapleClient c) {
    •             if ((c.getPlayer().getMapId() < 910000000) || (c.getPlayer().getMapId() > 910000022)){
    •               //c.getSession().write(MaplePacketCreator.enableActions());
    •                 MapleMap to;
    •                 MaplePortal pto;
    •                               to = ChannelServer.getInstance(c.getChannel()).getMapFactory().getMap(910000000);
    •                               c.getPlayer().saveLocation(SavedLocationType.FREE_MARKET);
    •                               pto = to.getPortal("out00"); // or st00?
    •                                 c.getPlayer().changeMap(to, pto);
    •             //} else {
    •               //c.getSession().write(MaplePacketCreator.enableActions());
    •             }
    •       }

    [color=rgb(85, 85, 85) !important]复制代码



    专注于GMS研究,有偿调试架设,全网最低,公益群:915210346。
    回复

    使用道具 举报

  • TA的每日心情
    慵懒
    2022-12-15 07:40
  • 签到天数: 6 天

    [LV.2]偶尔看看I

    1

    主题

    32

    回帖

    161

    积分

    注册会员

    Rank: 2

    积分
    161
    发表于 2022-11-27 22:25:46 | 显示全部楼层
    感谢分享~~~~~~~~~~~
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    2024-6-28 07:37
  • 签到天数: 10 天

    [LV.3]偶尔看看II

    2

    主题

    66

    回帖

    71

    积分

    注册会员

    Rank: 2

    积分
    71
    发表于 2024-6-19 18:22:41 | 显示全部楼层

    666666666666666
    回复

    使用道具 举报

  • TA的每日心情
    慵懒
    2024-7-4 11:28
  • 签到天数: 6 天

    [LV.2]偶尔看看I

    0

    主题

    55

    回帖

    168

    积分

    注册会员

    Rank: 2

    积分
    168
    发表于 2024-6-29 07:39:59 | 显示全部楼层
    666666666666666666666
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    快速回复 返回顶部 返回列表