Ring 70058: usable from level 1, tooltip says unlimited and no cooldown
The item_proto limit (LEVEL 30) kept new characters from using the warp ring. ring-warp/install.sh now clears it in share/conf/item_proto.txt and the player.item_proto mirror. The client proto gets the same limit through a new item_limits_server.tsv fed to locale_proto_patch, and the zh itemdesc overlay replaces the "50 uses" text. Verified on 203: a fresh level-1 character opened the warp menu four times in a row (one real warp in between), ring still in the bag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
01cc252a1d
commit
f345bd5d3b
@@ -4,7 +4,8 @@
|
||||
选择本国一村 / 二村、升龙谷、影悲沙漠、舒寒山、导炎大地后传送。原版能用 50 次、每次冷却 30 分钟
|
||||
(item_proto value0 / value1,记在物品 socket 0 / 1 里),用完就消失。
|
||||
|
||||
这里的 `ring_warp.quest` 去掉了次数和冷却:不再读写 socket,戒指不会消耗。在百店老板娘的商城里卖
|
||||
这里的 `ring_warp.quest` 去掉了次数和冷却:不再读写 socket,戒指不会消耗。`install.sh` 同时去掉
|
||||
`item_proto.txt` 里的 30 级限制(服务端 `CHARACTER::CanUseItem` 按它拒绝低等级角色使用),新建的角色也能用。在百店老板娘的商城里卖
|
||||
(`../npc-shops/item-mall`,1 金币)。
|
||||
|
||||
sh install.sh # 在服务器上,从本目录运行;然后重启 db 和 game
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
#!/bin/sh
|
||||
# Installs the unlimited 移动戒指 (README.md): run on the server from this directory, then restart db + game.
|
||||
# Replaces quest ring_warp with ./ring_warp.quest (GBK), recompiles all quests with make.py, and names
|
||||
# item 70058 移动戒指 on the server (item_names.txt and item_proto.locale_name; the client has its own name).
|
||||
# item 70058 移动戒指 on the server (item_names.txt and item_proto.locale_name; the client has its own name), and
|
||||
# drops its level 30 limit in item_proto.txt (CHARACTER::CanUseItem refuses it to lower characters).
|
||||
set -eu
|
||||
|
||||
SERVER=${SERVER:-/usr/metin2/server}
|
||||
LOCALE=${LOCALE:-newcibn}
|
||||
QUEST="$SERVER/share/locale/$LOCALE/quest"
|
||||
NAMES="$SERVER/share/conf/item_names.txt"
|
||||
PROTO="$SERVER/share/conf/item_proto.txt"
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
BACKUP=/root/backup-ringwarp/$(date +%Y%m%d-%H%M%S)
|
||||
export LC_ALL=C
|
||||
|
||||
mkdir -p "$BACKUP"
|
||||
cp -p "$QUEST/ring_warp.quest" "$NAMES" "$BACKUP/"
|
||||
cp -p "$QUEST/ring_warp.quest" "$NAMES" "$PROTO" "$BACKUP/"
|
||||
echo "backup: $BACKUP"
|
||||
|
||||
# A GBK trail byte 0x5C would be a backslash to qc.
|
||||
@@ -28,6 +30,14 @@ awk -F'\t' -v OFS='\t' -v name="$name" '$1 == 70058 { $2 = name; n++ } { print }
|
||||
cat "$BACKUP/item_names.new" > "$NAMES"
|
||||
mysql -uroot player -e "UPDATE item_proto SET locale_name = '$name' WHERE vnum = 70058"
|
||||
|
||||
# LIMIT_TYPE0 / LIMIT_VALUE0 (columns 15, 16): LEVEL 30 -> none. The db process loads item_proto.txt at boot
|
||||
# and mirrors it into the item_proto table.
|
||||
awk -F'\t' -v OFS='\t' '$1 == 70058 { if ($15 == "LEVEL") { $15 = "LIMIT_NONE"; $16 = 0 }; n++ } { print }
|
||||
END { if (n != 1) { print "item_proto.txt: 70058 not found" > "/dev/stderr"; exit 1 } }' \
|
||||
"$PROTO" > "$BACKUP/item_proto.new"
|
||||
cat "$BACKUP/item_proto.new" > "$PROTO"
|
||||
mysql -uroot player -e "UPDATE item_proto SET limittype0 = 0, limitvalue0 = 0 WHERE vnum = 70058 AND limittype0 = 1"
|
||||
|
||||
# make.py's shebang (/usr/local/bin/python) does not exist on 203.
|
||||
cd "$QUEST" && /usr/local/bin/python2.7 make.py > "$BACKUP/make.log" 2>&1 || { tail "$BACKUP/make.log" >&2; exit 1; }
|
||||
ls "$QUEST/object/10031/sig_use"
|
||||
|
||||
Reference in New Issue
Block a user