Server: hunt set once per character, rebuild.sh for patch build/deploy/rollback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d163aab949
commit
3fcb27dd4d
@@ -24,7 +24,8 @@
|
||||
| 耳环 | 移速 20%、掉宝 20%、对兽人/秘教/不死 各 20% |
|
||||
|
||||
属性都是 `item_attr` 表里该部位允许的类型、5 级的值。背包空格(`CountEmptyInventory`,按格数算)少于 15
|
||||
时不打开;确认前可以取消,礼包不消耗。
|
||||
时不打开;确认前可以取消,礼包不消耗。每个角色只能打开一次(任务标记 `hunt_set.opened`),
|
||||
再用礼包只提示、不扣除。
|
||||
|
||||
## 文件
|
||||
|
||||
@@ -41,16 +42,9 @@
|
||||
|
||||
## 构建与部署
|
||||
|
||||
```sh
|
||||
cd /usr/metin2/src && patch -p1 < server.patch
|
||||
cd server/game/src && gmake -j2 GAMEDIR=/root/hunt-out/new # 不覆盖线上 share/bin/game
|
||||
cd /usr/metin2/server && sh close.sh
|
||||
cp share/bin/game <备份>; cp /root/hunt-out/new/game share/bin/game
|
||||
sh install.sh # 本目录
|
||||
sh ../npc-shops/install.sh ../npc-shops/item-mall
|
||||
echo 1 | sh start.sh
|
||||
```
|
||||
用 `../rebuild.sh`:`build`(打补丁并编译)→ `deploy <目录>` → `data`(含本目录 install.sh 和商城商店)。
|
||||
|
||||
2026-09-30 已在 203 部署。备份在 `/root/backup-hunt-set/`:`questlua_item.cpp.orig`、`bin-<时间>/game`
|
||||
(旧二进制)、`<时间>/`(locale_list、quest_functions、item_names.txt)。用 GM 角色(武士)实测:礼包打开后
|
||||
8 件装备属性与上表一致,重新登录后仍在,礼包已扣除;从百店老板娘处以 0 两买到礼包,金钱不变。
|
||||
限次改动(2026-09-30):同一角色第二次使用礼包不弹对话框,礼包保留。
|
||||
|
||||
@@ -28,6 +28,11 @@ quest hunt_set begin
|
||||
local STEAL_HP, REFLECT_MELEE, EXP, GOLD, DROP = 23, 39, 43, 44, 45
|
||||
local IMMUNE_STUN, IMMUNE_SLOW, ATT_GRADE = 48, 49, 53
|
||||
|
||||
-- One set per character (quest flag hunt_set.opened); the box stays in the bag.
|
||||
if pc.getqf("opened") == 1 then
|
||||
syschat("每个角色只能打开一次小狩猎套装礼包。")
|
||||
return
|
||||
end
|
||||
if pc.get_empty_inventory_count() < 15 then
|
||||
syschat("背包空位不足,请至少留出15格再打开礼包。")
|
||||
return
|
||||
@@ -60,7 +65,7 @@ quest hunt_set begin
|
||||
return
|
||||
end
|
||||
-- The dialog waited; check again that the box is still there and the bag has room.
|
||||
if pc.count_item(50307) < 1 or pc.get_empty_inventory_count() < 15 then
|
||||
if pc.getqf("opened") == 1 or pc.count_item(50307) < 1 or pc.get_empty_inventory_count() < 15 then
|
||||
syschat("背包空位不足,请至少留出15格再打开礼包。")
|
||||
return
|
||||
end
|
||||
@@ -70,6 +75,7 @@ quest hunt_set begin
|
||||
local helmets = { 12209, 12349, 12489, 12629 }
|
||||
local main, armor, helmet = mains[job + 1], armors[job + 1], helmets[job + 1]
|
||||
|
||||
pc.setqf("opened", 1)
|
||||
pc.remove_item(50307, 1)
|
||||
hunt_set.give(weapon, { { CRITICAL, 10 }, { PENETRATE, 10 }, { main, 12 }, { DEVIL, 20 }, { UNDEAD, 20 } })
|
||||
hunt_set.give(armor, { { MAX_HP, 2000 }, { STEAL_HP, 10 }, { ATT_GRADE, 50 }, { REFLECT_MELEE, 10 }, { CAST_SPEED, 20 } })
|
||||
|
||||
Reference in New Issue
Block a user