水世界修改S4赛季教程

水世界修改S4赛季教程

开启后注册新账号进去就是s4 之前的旧账号还是s2

1.修改区服文件zones.yaml

/www/wwwroot/quanxinghoutai/sp/config/zones.yaml
/root/server/config/zones.yaml

第12行2002改成2004

default_zone: 2004001001   # 默认区服 worldId(新玩家首次登录进入的区服)

 

2.修改启动文件

/root/qd

修改qd文件里面的文件时间

#!/bin/bash
set -euo pipefail

BASE_DIR="/root/server"
START_SCRIPT="$BASE_DIR/scripts/start.sh"
CFG="$BASE_DIR/config/zones.yaml"

if [ ! -x "$START_SCRIPT" ]; then
  echo "start script not found: $START_SCRIPT"
  exit 1
fi

# 启动前先彻底清一次,避免残留进程占端口
/root/gb >/dev/null 2>&1 || true

bash "$START_SCRIPT"
sleep 8

curl -fsS -X POST http://127.0.0.1:9443/internal/register_zone \
  -H 'Content-Type: application/json' \
  -d '{"world_id":2004001001,"name":"一区","addr":"127.0.0.1:50051"}' >/dev/null

curl -fsS -X POST http://127.0.0.1:9443/internal/register_zone \
  -H 'Content-Type: application/json' \
  -d '{"world_id":2004001002,"name":"二区","addr":"127.0.0.1:50052"}' >/dev/null

curl -fsS -X POST http://127.0.0.1:9443/internal/register_zone \
  -H 'Content-Type: application/json' \
  -d '{"world_id":2004001003,"name":"三区","addr":"127.0.0.1:50053"}' >/dev/null

curl -fsS -X POST http://127.0.0.1:9443/internal/register_zone \
  -H 'Content-Type: application/json' \
  -d '{"world_id":2004001004,"name":"四区","addr":"127.0.0.1:50054"}' >/dev/null

echo "zones from $CFG are up:"
ps -ef | grep -E '/root/server/bin/(gateway|gameservice)' | grep -v grep || true
echo "---"
ss -ltnp | grep -E ':9443|:50051|:50052|:50053|:50054|:8090|:8091|:8092|:8093' || true


systemctl status zhgback

启动区服时间2002改成2004

THE END
喜欢就支持一下吧
点赞5 分享
羡余的头像-头号咸鱼-rp1的小站
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片快捷回复

    暂无评论内容