Add mobile touch UI and AVA2 biology system with server tools

This commit is contained in:
shen
2026-10-14 19:12:38 -07:00
parent e7f2202a94
commit 6472d17306
68 changed files with 4447 additions and 197 deletions
+7 -1
View File
@@ -13,7 +13,7 @@
| 目录 | 商店 | NPC | 位置 |
|---|---|---|---|
| `item-mall/` | 14 / 16 `item_mall`(两页:增益、道具) | 9010 百店老板娘 | 杂货店 9003 旁 |
| `item-mall/` | 14 / 16 `item_mall`(三页:增益、道具、宝石) | 9010 百店老板娘 | 杂货店 9003 旁 |
| `mount/` | 15 `mount` | 20368 坐骑商人(原「铁算盘」,未使用的货郎模型) | 马夫 20349 旁 |
`install.sh` 对一个商店做这些事:
@@ -42,6 +42,8 @@
| 双倍伤害丸、无视防御丸 | 各 15 万 |
| 经验药水、夺宝手套 | 各 20 万 |
| 物品属性转换秘籍 | 50 万 |
| 超级属性转换秘籍、超级属性追加秘籍 | 各 1 |
| +6 镶嵌石(28700~28713,全部 14 种,宝石页) | 各 1 |
| 移动戒指(不限次数、无冷却,见 `../ring-warp`) | 1 |
| 追加物品属性秘籍、龙神的祝福书 | 各 100 万 |
@@ -89,3 +91,7 @@ mysql -uroot player < $B/player-shop.sql
- 商城:`/root/backup-itemmall/20260929-162714`。这份还没备份 mob_proto;9010 原来的 on_click 是 2。
- 坐骑:`/root/backup-npcshop/mount-20260929-172630`。更早的 mount 备份里还没有 mob_names.txt;20368 原名是 Peddler。
## +6 石头与红国位置修复(2026-10-02)
`item-mall/stones.tsv` 来自 server_extracted 的 28700~28713 实际数值。203 原来的同编号为空类型,安装时以对应普通石头行恢复标志与镶嵌族,再写入 +6 数值;客户端同步表为 `data/zh_40250/item_stones_server.tsv`。红国老板娘改为本地坐标 678,575(杂货店前方),重复安装会更新已有 NPC 的坐标。
+30 -1
View File
@@ -35,6 +35,33 @@ echo "$VILLAGES" | while read -r map x y dir; do cp -p "$MAPS/$map/npc.txt" "$BA
mysqldump -uroot player shop shop_item item_proto mob_proto > "$BACKUP/player-shop.sql"
echo "backup: $BACKUP"
# Optional stone restoration: reuse the corresponding valid +3 row for flags and
# socket family, then apply the extracted +6 values. Preserve its existing name.
if [ -f "$SHOP_DIR/stones.tsv" ]; then
awk -F'\t' -v OFS='\t' '
NR==FNR {if ($1 !~ /^#/ && NF==12) {wanted[$1]=$6; count++} next}
{line[NR]=$0; order[++n]=$1; original[$1]=$0}
END {
for (i=1;i<=n;i++) {
v=order[i]
if (v in wanted) {
split(original[v], old, "\t")
base=28330+v-28700
if (!(base in original)) exit 1
split(original[base], a, "\t")
a[1]=v; a[2]=old[2]; a[10]=1; a[11]=0; a[20]=wanted[v]
for (j=1;j<=33;j++) printf "%s%s",a[j],(j==33 ? "\n" : OFS)
found++
} else print original[v]
}
if (found!=count || count!=14) exit 1
}' "$SHOP_DIR/stones.tsv" "$PROTO" > "$BACKUP/stones.new"
cat "$BACKUP/stones.new" > "$PROTO"
awk -F'\t' '$1 !~ /^#/ && NF==12 {
printf "UPDATE item_proto SET type=%d,subtype=%d,wearflag=%d,applytype0=%d,applyvalue0=%d,applytype1=0,applyvalue1=0,applytype2=0,applyvalue2=0,value0=%d,value1=%d,value2=%d,value3=%d,value4=%d,value5=%d,shop_buy_price=0 WHERE vnum=%d;\n",$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$1
}' "$SHOP_DIR/stones.tsv" | mysql -uroot player
fi
# item_proto.txt column 10 is the price an NPC shop sells the item for (TItemTable::dwGold).
awk -F'\t' -v OFS='\t' 'NR == FNR { if ($1 !~ /^#/ && NF >= 3) { price[$1] = $3; want++ } next }
($1 in price) { $10 = price[$1]; n++ } { print }
@@ -105,7 +132,9 @@ fi
echo "$VILLAGES" | while read -r map x y dir; do
npc="$MAPS/$map/npc.txt"
if awk -F'\t' -v v=$NPC_VNUM '$11 == v { found = 1 } END { exit !found }' "$npc"; then
echo "$map: NPC $NPC_VNUM already placed"
awk -F'\t' -v OFS='\t' -v v=$NPC_VNUM -v x="$x" -v y="$y" -v dir="$dir" '$11==v {$2=x; $3=y; $7=dir} {print}' "$npc" > "$BACKUP/$map.npc.new"
cat "$BACKUP/$map.npc.new" > "$npc"
echo "$map: NPC $NPC_VNUM positioned at $x,$y"
else
[ -z "$(tail -c 1 "$npc")" ] || echo >> "$npc"
printf 'm\t%d\t%d\t0\t0\t0\t%d\t1m\t100\t1\t%d\n' "$x" "$y" "$dir" "$NPC_VNUM" >> "$npc"
@@ -43,3 +43,20 @@
71032 1 1000000 龙神的祝福书
70058 1 1 移动戒指 不限次数、无冷却(../../ring-warp)
50307 1 0 小狩猎套装礼包 1级+9全套、满属性(../../hunt-set)
71052 1 1 超级属性转换秘籍
71051 1 1 超级属性追加秘籍
[宝石]
28700 1 1 鸡血石+6
28701 1 1 羊脂玉+6
28702 1 1 羚角石+6
28703 1 1 虹河石+6
28704 1 1 青胆石+6
28705 1 1 精石+6
28706 1 1 鹰翼石+6
28707 1 1 木鱼石+6
28708 1 1 龙骨石+6
28709 1 1 青石+6
28710 1 1 彩芒石+6
28711 1 1 鹿影石+6
28712 1 1 东海石+6
28713 1 1 帝王石+6
1 # [tab name] starts a shop page (shop_table_ex.txt, at most 3 pages of 39); then vnum count price name (duration: unique items count worn play minutes, 仓库扩张卷 real time)
43 71032 1 1000000 龙神的祝福书
44 70058 1 1 移动戒指 不限次数、无冷却(../../ring-warp)
45 50307 1 0 小狩猎套装礼包 1级+9全套、满属性(../../hunt-set)
46 71052 1 1 超级属性转换秘籍
47 71051 1 1 超级属性追加秘籍
48 [宝石]
49 28700 1 1 鸡血石+6
50 28701 1 1 羊脂玉+6
51 28702 1 1 羚角石+6
52 28703 1 1 虹河石+6
53 28704 1 1 青胆石+6
54 28705 1 1 精石+6
55 28706 1 1 鹰翼石+6
56 28707 1 1 木鱼石+6
57 28708 1 1 龙骨石+6
58 28709 1 1 青石+6
59 28710 1 1 彩芒石+6
60 28711 1 1 鹿影石+6
61 28712 1 1 东海石+6
62 28713 1 1 帝王石+6
+1 -1
View File
@@ -2,7 +2,7 @@
SHOP_VNUM=14
SHOP_NAME=item_mall
NPC_VNUM=9010
VILLAGES="metin2_map_a1 686 565 8
VILLAGES="metin2_map_a1 678 575 8
metin2_map_b1 598 689 4
metin2_map_c1 391 693 5"
# Shop vnum of each page after the first (items.tsv has [tab] lines, so this is a shop_table_ex.txt shop).
@@ -0,0 +1,15 @@
# vnum type subtype wear apply_type apply_value value0 value1 value2 value3 value4 value5
28700 10 0 16 16 25 0 0 0 0 0 17
28701 10 0 16 15 25 0 0 0 0 0 18
28702 10 0 16 9 50 0 0 0 0 0 19
28703 10 0 16 59 55 0 0 0 0 0 20
28704 10 0 16 60 55 0 0 0 0 0 21
28705 10 0 16 61 55 0 0 0 0 0 22
28706 10 0 16 62 55 0 0 0 0 0 23
28707 10 0 16 63 25 0 0 0 0 0 24
28708 10 0 1 27 25 0 0 0 0 0 25
28709 10 0 1 28 25 0 0 0 0 0 26
28710 10 0 1 2 1000 0 0 0 0 0 27
28711 10 0 1 1 2000 0 0 0 0 0 28
28712 10 0 1 54 500 0 0 0 0 0 29
28713 10 0 1 8 50 0 0 0 0 0 30
1 # vnum type subtype wear apply_type apply_value value0 value1 value2 value3 value4 value5
2 28700 10 0 16 16 25 0 0 0 0 0 17
3 28701 10 0 16 15 25 0 0 0 0 0 18
4 28702 10 0 16 9 50 0 0 0 0 0 19
5 28703 10 0 16 59 55 0 0 0 0 0 20
6 28704 10 0 16 60 55 0 0 0 0 0 21
7 28705 10 0 16 61 55 0 0 0 0 0 22
8 28706 10 0 16 62 55 0 0 0 0 0 23
9 28707 10 0 16 63 25 0 0 0 0 0 24
10 28708 10 0 1 27 25 0 0 0 0 0 25
11 28709 10 0 1 28 25 0 0 0 0 0 26
12 28710 10 0 1 2 1000 0 0 0 0 0 27
13 28711 10 0 1 1 2000 0 0 0 0 0 28
14 28712 10 0 1 54 500 0 0 0 0 0 29
15 28713 10 0 1 8 50 0 0 0 0 0 30