server: unlimited teleport ring 70058, sold in a two-page item mall
ring-warp/: ring_warp.quest without use count or cooldown (the ring is never used up) + install.sh (GBK, make.py, item name 移动戒指). npc-shops: [page] lines in items.tsv make an extended shop written to shop_table_ex.txt; item-mall is now 增益 (29) + 道具 (12, incl. 70058 at 1 gold). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
000d4841fd
commit
42e4cf1a9f
@@ -0,0 +1,13 @@
|
||||
# 移动戒指(203 服务端)
|
||||
|
||||
40250 的移动戒指 70058(任务物品,30 级可用)通过 `special_item_group.txt` 的 10031 组触发任务 `ring_warp`:
|
||||
选择本国一村 / 二村、升龙谷、影悲沙漠、舒寒山、导炎大地后传送。原版能用 50 次、每次冷却 30 分钟
|
||||
(item_proto value0 / value1,记在物品 socket 0 / 1 里),用完就消失。
|
||||
|
||||
这里的 `ring_warp.quest` 去掉了次数和冷却:不再读写 socket,戒指不会消耗。在百店老板娘的商城里卖
|
||||
(`../npc-shops/item-mall`,1 金币)。
|
||||
|
||||
sh install.sh # 在服务器上,从本目录运行;然后重启 db 和 game
|
||||
|
||||
`install.sh` 会备份到 `/root/backup-ringwarp/<时间>`,把任务转成 GBK 换掉 `ring_warp.quest`,用 `make.py` 重新编译
|
||||
全部任务,并把服务端的物品名(`item_names.txt`、DB `item_proto.locale_name`)改成「移动戒指」。
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/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).
|
||||
set -eu
|
||||
|
||||
SERVER=${SERVER:-/usr/metin2/server}
|
||||
LOCALE=${LOCALE:-newcibn}
|
||||
QUEST="$SERVER/share/locale/$LOCALE/quest"
|
||||
NAMES="$SERVER/share/conf/item_names.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/"
|
||||
echo "backup: $BACKUP"
|
||||
|
||||
# A GBK trail byte 0x5C would be a backslash to qc.
|
||||
iconv -f UTF-8 -t GBK "$HERE/ring_warp.quest" > "$BACKUP/ring_warp.gbk"
|
||||
if grep -q '\\' "$BACKUP/ring_warp.gbk"; then echo "ring_warp.quest: backslash byte in GBK" >&2; exit 1; fi
|
||||
cat "$BACKUP/ring_warp.gbk" > "$QUEST/ring_warp.quest"
|
||||
|
||||
name=$(printf '移动戒指' | iconv -f UTF-8 -t GB2312)
|
||||
awk -F'\t' -v OFS='\t' -v name="$name" '$1 == 70058 { $2 = name; n++ } { print }
|
||||
END { if (n != 1) { print "item_names.txt: 70058 not found" > "/dev/stderr"; exit 1 } }' \
|
||||
"$NAMES" > "$BACKUP/item_names.new"
|
||||
cat "$BACKUP/item_names.new" > "$NAMES"
|
||||
mysql -uroot player -e "UPDATE item_proto SET locale_name = '$name' WHERE vnum = 70058"
|
||||
|
||||
# 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"
|
||||
echo "done; restart db and game"
|
||||
@@ -0,0 +1,67 @@
|
||||
-- 移动戒指 70058 (special_item_group 10031 "Quest" -> sig_use), from 40250 ring_warp.quest.
|
||||
-- Changed for 203 (install.sh): no use count, no cooldown, the ring is never used up.
|
||||
-- UTF-8 here; install.sh converts it to GBK for qc.
|
||||
quest ring_warp begin
|
||||
state start begin
|
||||
when 10031.sig_use begin
|
||||
local empire = pc.get_empire()
|
||||
|
||||
say("请选择传送地点:")
|
||||
|
||||
local town1 = {
|
||||
gameforge.functions._100_say,
|
||||
gameforge.functions._110_say,
|
||||
gameforge.functions._120_say,
|
||||
}
|
||||
|
||||
local town2 = {
|
||||
gameforge.functions._130_say,
|
||||
gameforge.functions._140_say,
|
||||
gameforge.functions._150_say,
|
||||
}
|
||||
local sub_set = select(town1[empire], town2[empire], locale.map_name[64], locale.map_name[63], locale.map_name[61], locale.map_name[62], gameforge.locale.cancel)
|
||||
if sub_set == 7 then
|
||||
return
|
||||
end
|
||||
|
||||
local warp = {
|
||||
{ -- empire town -1
|
||||
{ 474300, 954800 },
|
||||
{ 63800, 166400 },
|
||||
{ 959900, 269200 },
|
||||
},
|
||||
{ -- empire town -2
|
||||
{ 353100, 882900 },
|
||||
{ 145500, 240000 },
|
||||
{ 863900, 246000 },
|
||||
},
|
||||
-- 64 map_n_threeway
|
||||
{
|
||||
{ 402100, 673900 },
|
||||
{ 270400, 739900 },
|
||||
{ 321300, 808000 },
|
||||
},
|
||||
-- 63 metin2_map_n_desert_01
|
||||
{
|
||||
{ 217800, 627200 },
|
||||
{ 221900, 502700 },
|
||||
{ 344000, 502500 },
|
||||
},
|
||||
-- 61 map_n_snowm_01
|
||||
{
|
||||
{ 434200, 290600 },
|
||||
{ 375200, 174900 },
|
||||
{ 491800, 173600 },
|
||||
},
|
||||
-- 62 metin2_map_n_flame_01
|
||||
{
|
||||
{ 599400, 756300 },
|
||||
{ 597800, 622200 },
|
||||
{ 730700, 689800 },
|
||||
},
|
||||
}
|
||||
|
||||
pc.warp(warp[sub_set][empire][1], warp[sub_set][empire][2])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user