Files
metin2-client/tools/server/ava2-maps/sbtest_locale.sh
T
shenleiandClaude Opus 5.5 a1e7da68a4 Level 120 (L1-L5): AVA2 maps, drops, dungeons, dungeon timer UI
- tools/server/level-120: sbtest install of the 120 exp table and the
  unsigned exp column.
- tools/server/ava2-maps: the 10 AVA2 maps (pack, map data, regen, designed
  drops) for sbtest; Ava2MapsScript.inc, gr2 texture and mob_proto tests.
- tools/server/ava2-dungeons: snow / ship defence / Meley quests ported from
  AVA2 (make_quests.py + install.sh).
- mt_dungeon_timer (DungeonTimerScript.inc): AVA2 dungeon timer in place of
  the minimap (RefreshDungeonTimer) and the hydra mast HP bar (gethydrahp).
- Autohunt skips a target that is hit but takes no damage for 4 s (blocked
  Meley statues) and keeps it skipped for 60 s; FindCloseTarget now honours
  the skip list.

Meley full run passed on sbtest with the Mac client. Not deployed live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 08:13:32 +09:00

59 lines
2.3 KiB
Bash

#!/bin/sh
# Give the sbtest channel5 core its own locale and data dir so install_maps.py never touches the live ones.
# sbtest/share/locale/newcibn = symlinks to every live newcibn entry, except real copies of
# group.txt, group_group.txt, mob_drop_item.txt and a real map/ dir (symlinks to each live map dir + a copied index).
# sbtest/share/data = symlinks to the live data entries, except a real monster/ dir (symlinks per live folder).
# Idempotent: existing entries are kept, so a rerun only adds what the live locale gained since.
# Run on 203: sh sbtest_locale.sh (restart channel5 afterwards)
set -e
LIVE=/usr/metin2/server/share/locale
SB=/usr/metin2/server/sbtest/share/locale
CORE=/usr/metin2/server/channel5/first
LIVEMAP=$(cd "$LIVE/newcibn/map" && pwd -P)
LIVEDATA=/usr/metin2/server/share/data
SBDATA=/usr/metin2/server/sbtest/share/data
mkdir -p "$SB/newcibn/map"
[ -e "$SB/english" ] || ln -s "$LIVE/english" "$SB/english"
for e in "$LIVE"/newcibn/*; do
n=${e##*/}
case $n in map) continue ;; esac
[ -e "$SB/newcibn/$n" ] || [ -L "$SB/newcibn/$n" ] && continue
case $n in
group.txt|group_group.txt) cp -p "$e" "$SB/newcibn/$n" ;;
*) ln -s "$e" "$SB/newcibn/$n" ;;
esac
done
# entries made into copies after the farm was first built
for n in group.txt group_group.txt mob_drop_item.txt; do
[ -L "$SB/newcibn/$n" ] && rm "$SB/newcibn/$n" && cp -p "$LIVE/newcibn/$n" "$SB/newcibn/$n" && echo "$n copied"
done
for e in "$LIVEMAP"/*; do
n=${e##*/}
[ -e "$SB/newcibn/map/$n" ] || [ -L "$SB/newcibn/map/$n" ] && continue
case $n in
index) cp -p "$e" "$SB/newcibn/map/index" ;;
*) ln -s "$e" "$SB/newcibn/map/$n" ;;
esac
done
mkdir -p "$SBDATA/monster"
for e in "$LIVEDATA"/*; do
n=${e##*/}
[ "$n" = monster ] || [ -e "$SBDATA/$n" ] || [ -L "$SBDATA/$n" ] || ln -s "$e" "$SBDATA/$n"
done
for e in "$LIVEDATA"/monster/*; do
[ -e "$SBDATA/monster/${e##*/}" ] || [ -L "$SBDATA/monster/${e##*/}" ] || ln -s "$e" "$SBDATA/monster/${e##*/}"
done
repoint() # <link> <target>
{
[ "$(readlink "$1")" = "$2" ] && return 0
echo "$1 was $(readlink "$1")"
rm "$1" && ln -s "$2" "$1"
}
repoint "$CORE/locale" "$SB"
repoint "$CORE/data" "$SBDATA"
echo "channel5 locale -> $(readlink "$CORE/locale"); $(ls "$SB/newcibn" | wc -l) entries, $(ls "$SB/newcibn/map" | wc -l) map entries"
echo "channel5 data -> $(readlink "$CORE/data"); $(ls "$SBDATA/monster" | wc -l) monster folders"