server: AVA2 conqueror level (ENABLE_CONQUEROR_LEVEL)
- Conqueror level/exp/step/points and the four sungma stats on the player (db load/save, simple player, actor add/update packets), POINT_CONQUEROR_*. - Conqueror maps 129-132 give conqueror exp instead of exp; per-map sungma requirements from map/<name>/sungma_attr.txt, sent as GC_SUNGMA_ATTR_UPDATE, with the AVA2 damage/defence penalties when below them. - /conqueror_stat, pc.set_conqueror_level / pc.get_conqueror_level, 9th skills 176-183 (+ Cheonun affects); DAMAGE_BLOCK is spelled (1 << 3) in char_battle. - tools/conqueror: schema, skill_proto rows, sungma_attr maps, the conqueror_unlock quest (lv 120 login/levelup) and install.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
794ac41a41
commit
31ebae050b
@@ -0,0 +1,11 @@
|
||||
-- Conqueror (Yohara) level unlock. AVA2 ships pc.set_conqueror_level without a quest that calls it; give
|
||||
-- conqueror level 1 once a character reaches the max level (the function itself checks gPlayerMaxLevel).
|
||||
quest conqueror_unlock begin
|
||||
state start begin
|
||||
when login or levelup with pc.get_level() >= 120 and pc.get_conqueror_level() == 0 begin
|
||||
if pc.set_conqueror_level() then
|
||||
syschat("你已成为征服者!击败成魔地图的怪物可获得征服者经验。")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# Conqueror (Yohara) level install: player columns, skill_proto rows, per-map sungma_attr.txt, unlock quest.
|
||||
# sh install.sh <player db> <locale dir> e.g. sh install.sh player_sb /usr/metin2/server/sbtest/share/locale/newcibn
|
||||
# Restart db + game afterwards (skill_proto and map files are read at boot).
|
||||
set -e
|
||||
DB=${1:?player db}
|
||||
LOC=${2:?locale dir}
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
mysql -uroot "$DB" < "$HERE/schema.sql"
|
||||
mysql -uroot "$DB" < "$HERE/skill_proto.sql"
|
||||
for d in "$HERE"/map/*; do
|
||||
m=$(basename "$d")
|
||||
[ -d "$LOC/map/$m" ] || { echo "missing map dir $LOC/map/$m" >&2; exit 1; }
|
||||
cp "$d/sungma_attr.txt" "$LOC/map/$m/sungma_attr.txt"
|
||||
done
|
||||
# Unlock quest: qc rejects functions missing from quest_functions; the quest text is GB2312 like the locale.
|
||||
Q="$LOC/quest"
|
||||
for f in quest_functions locale_list; do
|
||||
[ -z "$(tail -c 1 "$Q/$f")" ] || echo >> "$Q/$f"
|
||||
done
|
||||
for f in pc.set_conqueror_level pc.get_conqueror_level; do
|
||||
grep -qx "$f" "$Q/quest_functions" || echo "$f" >> "$Q/quest_functions"
|
||||
done
|
||||
iconv -f UTF-8 -t GB18030 "$HERE/conqueror_unlock.quest" > "$Q/conqueror_unlock.quest"
|
||||
grep -qx conqueror_unlock.quest "$Q/locale_list" || echo conqueror_unlock.quest >> "$Q/locale_list"
|
||||
(cd "$Q" && ./qc conqueror_unlock.quest)
|
||||
mysql -uroot "$DB" -e "SELECT COUNT(*) AS conqueror_cols FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='$DB' AND TABLE_NAME='player' AND COLUMN_NAME IN ('conquerorlevel','conqueror_level_step','sungma_str','sungma_hp','sungma_move','sungma_inmune','conqueror_exp','conqueror_point'); SELECT dwVnum, szName, setAffectFlag FROM skill_proto WHERE dwVnum IN (133,134) OR dwVnum BETWEEN 176 AND 183;"
|
||||
@@ -0,0 +1,4 @@
|
||||
sungma_str 15
|
||||
sungma_hp 10
|
||||
sungma_move 15
|
||||
sungma_immune 20
|
||||
@@ -0,0 +1,4 @@
|
||||
sungma_str 20
|
||||
sungma_hp 10
|
||||
sungma_move 20
|
||||
sungma_immune 25
|
||||
@@ -0,0 +1,4 @@
|
||||
sungma_str 25
|
||||
sungma_hp 15
|
||||
sungma_move 25
|
||||
sungma_immune 30
|
||||
@@ -0,0 +1,4 @@
|
||||
sungma_str 0
|
||||
sungma_hp 0
|
||||
sungma_move 1
|
||||
sungma_immune 0
|
||||
@@ -0,0 +1,21 @@
|
||||
-- AVA2 conqueror (Yohara) level: per-player columns read/written by db ClientManagerLogin/Player.
|
||||
-- Idempotent: run against the player schema (player / player_sb).
|
||||
DROP PROCEDURE IF EXISTS mt_conqueror_add_columns;
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE mt_conqueror_add_columns()
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'player' AND COLUMN_NAME = 'conquerorlevel') THEN
|
||||
ALTER TABLE player
|
||||
ADD COLUMN conquerorlevel tinyint(3) unsigned NOT NULL DEFAULT 0,
|
||||
ADD COLUMN conqueror_level_step tinyint(3) unsigned NOT NULL DEFAULT 0,
|
||||
ADD COLUMN sungma_str smallint(6) NOT NULL DEFAULT 0,
|
||||
ADD COLUMN sungma_hp smallint(6) NOT NULL DEFAULT 0,
|
||||
ADD COLUMN sungma_move smallint(6) NOT NULL DEFAULT 0,
|
||||
ADD COLUMN sungma_inmune smallint(6) NOT NULL DEFAULT 0,
|
||||
ADD COLUMN conqueror_exp int(10) unsigned NOT NULL DEFAULT 0,
|
||||
ADD COLUMN conqueror_point smallint(6) NOT NULL DEFAULT 0;
|
||||
END IF;
|
||||
END //
|
||||
DELIMITER ;
|
||||
CALL mt_conqueror_add_columns();
|
||||
DROP PROCEDURE mt_conqueror_add_columns;
|
||||
@@ -0,0 +1,13 @@
|
||||
-- AVA2 skill_proto rows: 133/134 (role proficiency / insight) and the conqueror skills 176-183.
|
||||
-- Copied 1:1 from the AVA2 backup; names folded to ASCII (latin1 table).
|
||||
|
||||
REPLACE INTO `skill_proto` VALUES (133,'Carisma',0,1,40,0,'NONE','','','','','','','','DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'NORMAL',0,'1',1000,0);
|
||||
REPLACE INTO `skill_proto` VALUES (134,'Inspiracion',0,1,40,0,'NONE','','','','','','','','DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'NORMAL',0,'1',1000,0);
|
||||
REPLACE INTO `skill_proto` VALUES (176,'Terremoto',1,1,1,0,'HP','-(3*atk+(0.9*atk+number(1,1000)+str*5+dex*3+lv)*k)','200+200*k','','','35+20*k','-(3*atk+(0.9*atk+number(1,1000)+str*5+dex*3+lv)*k)','','ATTACK,USE_MELEE_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MELEE',8,'1',0,200);
|
||||
REPLACE INTO `skill_proto` VALUES (177,'Estrellas',2,1,1,0,'HP','-(atk+(1.7*atk+number(1,1000)+dex*6+lv*5)*k)','200+200*k','','','35+20*k','-(atk+(1.7*atk+number(1,1000)+dex*6+lv*5)*k)','','ATTACK,USE_MELEE_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MELEE',4,'1',2000,200);
|
||||
REPLACE INTO `skill_proto` VALUES (178,'Tiro tempestad',2,1,1,0,'HP','-(1.9*atk+(2.6*atk+number(1,1000))*k)','200+200*k','','','35+20*k','-(1.9*atk+(2.6*atk+number(1,1000))*k)','','ATTACK,SPLASH,USE_ARROW_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'RANGE',4,'1',2500,500);
|
||||
REPLACE INTO `skill_proto` VALUES (179,'Golpe infernal',3,1,1,0,'HP','-(1.9*atk+(2.6*atk+number(1,1000))*k)','200+200*k','','','35+20*k','-(1.9*atk+(2.6*atk+number(1,1000))*k)','','ATTACK,USE_MELEE_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MELEE',4,'1',0,0);
|
||||
REPLACE INTO `skill_proto` VALUES (180,'Onda letal',3,1,1,0,'HP','-(120+6*lv+(5*con+5*dex+30*iq+number(1,1000)+9*mwep)*ar*k)','200+200*k','','','35+20*k','-(120+6*lv+(5*con+5*dex+30*iq+number(1,1000)+9*mwep)*ar*k)','','ATTACK,COMPUTE_MAGIC_DAMAGE,SPLASH,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MAGIC',5,'1',2000,200);
|
||||
REPLACE INTO `skill_proto` VALUES (181,'Meteoro',4,1,1,0,'HP','-(120+6*lv+(5*con+5*dex+30*iq+number(1,1000)+9*mwep)*ar*k)','200+200*k','','','35+20*k','-(120+6*lv+(5*con+5*dex+30*iq+number(1,1000)+9*mwep)*ar*k)','','ATTACK,SPLASH,ATTACK_FIRE_CONT,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MAGIC',5,'1',2000,500);
|
||||
REPLACE INTO `skill_proto` VALUES (182,'Escudo etereo',4,1,1,0,'NONE','0.4*k+(18*k)','200+200*k','50+(8*k)','','386+(80*k)','0.4*k+(18*k)','','DISABLE_BY_POINT_UP,PARTY','CHEONUN','NONE','','','YMIR','NONE','','','',0,0,'NORMAL',1,'1',2500,0);
|
||||
REPLACE INTO `skill_proto` VALUES (183,'Golpe de garra',7,1,1,0,'HP','-(2.3*atk+(4*atk+str*4+con)*k)','200+200*k','','','35+20*k','-(2.3*atk+(4*atk+str*4+con)*k)','','ATTACK,USE_MELEE_DAMAGE,DISABLE_BY_POINT_UP','YMIR','NONE','','','YMIR','NONE','','','',0,0,'MELEE',8,'1',0,200);
|
||||
Reference in New Issue
Block a user