diff options
32 files changed, 815 insertions, 42 deletions
diff --git a/conf/messages.conf b/conf/messages.conf index 7adff9dff..0c238d0fe 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -1251,7 +1251,8 @@ // @mobinfo ... 1291: ATK:%d~%d MATK:%d~%d Range:%d~%d~%d Size:%s Race: %s Element: %s (Lv:%d) -//1292-1293 FREE +1292: PrivateAirshipStartable | +1293: PrivateAirshipEndable | //1294 used by hercules chat feature // @version diff --git a/db/constants.conf b/db/constants.conf index cc0fb3104..e51ccb9bd 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -428,6 +428,8 @@ constants_db: { mf_nocashshop: 54 mf_noautoloot: 55 mf_noviewid: 56 + mf_pairship_startable: 57 + mf_pairship_endable: 58 comment__: "Cell Properties" cell_walkable: 0 diff --git a/doc/constants.md b/doc/constants.md index 7ed53c422..f4ffaf243 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -360,6 +360,8 @@ - `mf_nocashshop`: 54 - `mf_noautoloot`: 55 - `mf_noviewid`: 56 +- `mf_pairship_startable`: 57 +- `mf_pairship_endable`: 58 ### Cell Properties @@ -4219,6 +4221,15 @@ - `MST_AROUND4`: 12 - `MST_AROUND`: 12 +### private airship responds + +- `P_AIRSHIP_NONE`: 0 +- `P_AIRSHIP_RETRY`: 1 +- `P_AIRSHIP_INVALID_START_MAP`: 2 +- `P_AIRSHIP_INVALID_END_MAP`: 3 +- `P_AIRSHIP_ITEM_NOT_ENOUGH`: 4 +- `P_AIRSHIP_ITEM_INVALID`: 5 + ### Renewal - `RENEWAL`: 1 diff --git a/doc/script_commands.txt b/doc/script_commands.txt index d69322745..aa0fea31c 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9994,4 +9994,17 @@ Enables the Emblem of the given Clan to the current NPC //===================================== 13 - End of Clan System Related Commands //===================================== +--------------------------------------- + +*airship_respond(<flag>) + +Send client respond to different private airship status. +the available flags are: + P_AIRSHIP_NONE + P_AIRSHIP_RETRY + P_AIRSHIP_INVALID_START_MAP + P_AIRSHIP_INVALID_END_MAP + P_AIRSHIP_ITEM_NOT_ENOUGH + P_AIRSHIP_ITEM_INVALID + ---------------------------------------
\ No newline at end of file diff --git a/npc/mapflag/private_airship.txt b/npc/mapflag/private_airship.txt new file mode 100644 index 000000000..dc5c7fd1c --- /dev/null +++ b/npc/mapflag/private_airship.txt @@ -0,0 +1,436 @@ +//================= Hercules Script ======================================= +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//================= License =============================================== +//= This file is part of Hercules. +//= http://herc.ws - http://github.com/HerculesWS/Hercules +//= +//= Copyright (C) 2018 Hercules Dev Team +//= Copyright (C) Asheraf +//= +//= Hercules is free software: you can redistribute it and/or modify +//= it under the terms of the GNU General Public License as published by +//= the Free Software Foundation, either version 3 of the License, or +//= (at your option) any later version. +//= +//= This program is distributed in the hope that it will be useful, +//= but WITHOUT ANY WARRANTY; without even the implied warranty of +//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//= GNU General Public License for more details. +//= +//= You should have received a copy of the GNU General Public License +//= along with this program. If not, see <http://www.gnu.org/licenses/>. +//========================================================================= + +// Private Airship Startable Maps +// prt_cas mapflag pairship_startable +// prt_cas_q mapflag pairship_startable +prt_fild08d mapflag pairship_startable +prt_fild08c mapflag pairship_startable +prt_fild08b mapflag pairship_startable +prt_fild08a mapflag pairship_startable +iz_ac01_d mapflag pairship_startable +iz_ac02_d mapflag pairship_startable +iz_ac01_c mapflag pairship_startable +iz_ac02_c mapflag pairship_startable +iz_ac01_b mapflag pairship_startable +iz_ac02_b mapflag pairship_startable +iz_ac01_a mapflag pairship_startable +iz_ac02_a mapflag pairship_startable +izlude_d mapflag pairship_startable +izlude_c mapflag pairship_startable +izlude_b mapflag pairship_startable +izlude_a mapflag pairship_startable +iz_ac01 mapflag pairship_startable +iz_ac02 mapflag pairship_startable +iz_ng01 mapflag pairship_startable +treasure_n1 mapflag pairship_startable +treasure_n2 mapflag pairship_startable +moc_para01 mapflag pairship_startable +itemmall mapflag pairship_startable +um_dun01 mapflag pairship_startable +um_dun02 mapflag pairship_startable +um_in mapflag pairship_startable +um_fild01 mapflag pairship_startable +um_fild02 mapflag pairship_startable +um_fild03 mapflag pairship_startable +um_fild04 mapflag pairship_startable +umbala mapflag pairship_startable +alde_alche mapflag pairship_startable +job_duncer mapflag pairship_startable +job_sage mapflag pairship_startable +job_cru mapflag pairship_startable +job_monk mapflag pairship_startable +monk_test mapflag pairship_startable +in_rogue mapflag pairship_startable +job_wiz mapflag pairship_startable +job_prist mapflag pairship_startable +job_knt mapflag pairship_startable +job_hunte mapflag pairship_startable +cmd_in02 mapflag pairship_startable +cmd_in01 mapflag pairship_startable +comodo mapflag pairship_startable +beach_dun mapflag pairship_startable +beach_dun2 mapflag pairship_startable +beach_dun3 mapflag pairship_startable +cmd_fild01 mapflag pairship_startable +cmd_fild02 mapflag pairship_startable +cmd_fild03 mapflag pairship_startable +cmd_fild04 mapflag pairship_startable +cmd_fild06 mapflag pairship_startable +cmd_fild07 mapflag pairship_startable +cmd_fild08 mapflag pairship_startable +cmd_fild09 mapflag pairship_startable +mjolnir_01 mapflag pairship_startable +mjolnir_02 mapflag pairship_startable +mjolnir_03 mapflag pairship_startable +mjolnir_04 mapflag pairship_startable +mjolnir_05 mapflag pairship_startable +mjolnir_06 mapflag pairship_startable +mjolnir_07 mapflag pairship_startable +mjolnir_08 mapflag pairship_startable +mjolnir_09 mapflag pairship_startable +mjolnir_10 mapflag pairship_startable +mjolnir_11 mapflag pairship_startable +mjolnir_12 mapflag pairship_startable +prt_fild00 mapflag pairship_startable +prt_fild01 mapflag pairship_startable +prt_fild02 mapflag pairship_startable +prt_fild03 mapflag pairship_startable +prt_fild04 mapflag pairship_startable +prt_fild05 mapflag pairship_startable +prt_fild06 mapflag pairship_startable +prt_fild07 mapflag pairship_startable +prt_fild08 mapflag pairship_startable +prt_fild09 mapflag pairship_startable +prt_fild10 mapflag pairship_startable +prt_fild11 mapflag pairship_startable +prt_monk mapflag pairship_startable +gef_fild00 mapflag pairship_startable +gef_fild01 mapflag pairship_startable +gef_fild02 mapflag pairship_startable +gef_fild03 mapflag pairship_startable +gef_fild04 mapflag pairship_startable +gef_fild05 mapflag pairship_startable +gef_fild06 mapflag pairship_startable +gef_fild07 mapflag pairship_startable +gef_fild08 mapflag pairship_startable +gef_fild09 mapflag pairship_startable +gef_fild10 mapflag pairship_startable +in_orcs01 mapflag pairship_startable +gef_fild11 mapflag pairship_startable +moc_fild01 mapflag pairship_startable +moc_fild02 mapflag pairship_startable +moc_fild03 mapflag pairship_startable +moc_fild07 mapflag pairship_startable +moc_fild11 mapflag pairship_startable +moc_fild12 mapflag pairship_startable +moc_fild13 mapflag pairship_startable +moc_fild16 mapflag pairship_startable +in_moc_16 mapflag pairship_startable +moc_fild17 mapflag pairship_startable +moc_fild18 mapflag pairship_startable +moc_fild19 mapflag pairship_startable +pay_fild01 mapflag pairship_startable +pay_fild02 mapflag pairship_startable +pay_fild03 mapflag pairship_startable +pay_fild04 mapflag pairship_startable +pay_fild06 mapflag pairship_startable +pay_fild07 mapflag pairship_startable +pay_fild08 mapflag pairship_startable +pay_fild09 mapflag pairship_startable +pay_fild10 mapflag pairship_startable +anthell01 mapflag pairship_startable +anthell02 mapflag pairship_startable +gef_dun00 mapflag pairship_startable +gef_dun01 mapflag pairship_startable +gef_dun02 mapflag pairship_startable +iz_dun00 mapflag pairship_startable +iz_dun01 mapflag pairship_startable +iz_dun02 mapflag pairship_startable +iz_dun03 mapflag pairship_startable +iz_dun04 mapflag pairship_startable +iz_dun05 mapflag pairship_startable +in_sphinx1 mapflag pairship_startable +in_sphinx2 mapflag pairship_startable +in_sphinx3 mapflag pairship_startable +in_sphinx4 mapflag pairship_startable +in_sphinx5 mapflag pairship_startable +moc_pryd01 mapflag pairship_startable +moc_pryd02 mapflag pairship_startable +moc_pryd03 mapflag pairship_startable +moc_pryd04 mapflag pairship_startable +moc_pryd05 mapflag pairship_startable +moc_pryd06 mapflag pairship_startable +moc_prydb1 mapflag pairship_startable +mjo_dun01 mapflag pairship_startable +mjo_dun02 mapflag pairship_startable +mjo_dun03 mapflag pairship_startable +orcsdun01 mapflag pairship_startable +orcsdun02 mapflag pairship_startable +pay_dun00 mapflag pairship_startable +pay_dun01 mapflag pairship_startable +pay_dun02 mapflag pairship_startable +pay_dun03 mapflag pairship_startable +pay_dun04 mapflag pairship_startable +prt_maze01 mapflag pairship_startable +prt_maze02 mapflag pairship_startable +prt_maze03 mapflag pairship_startable +prt_sewb1 mapflag pairship_startable +prt_sewb2 mapflag pairship_startable +prt_sewb3 mapflag pairship_startable +prt_sewb4 mapflag pairship_startable +treasure01 mapflag pairship_startable +treasure02 mapflag pairship_startable +in_hunter mapflag pairship_startable +job_thief1 mapflag pairship_startable +alb_ship mapflag pairship_startable +alberta mapflag pairship_startable +alberta_in mapflag pairship_startable +alb2trea mapflag pairship_startable +aldebaran mapflag pairship_startable +aldeba_in mapflag pairship_startable +gef_tower mapflag pairship_startable +geffen mapflag pairship_startable +geffen_in mapflag pairship_startable +moc_ruins mapflag pairship_startable +morocc mapflag pairship_startable +morocc_in mapflag pairship_startable +pay_arche mapflag pairship_startable +payon mapflag pairship_startable +payon_in01 mapflag pairship_startable +payon_in02 mapflag pairship_startable +payon_in03 mapflag pairship_startable +prontera mapflag pairship_startable +prt_in mapflag pairship_startable +prt_castle mapflag pairship_startable +prt_church mapflag pairship_startable +izlude mapflag pairship_startable +izlude_in mapflag pairship_startable +izlu2dun mapflag pairship_startable +monk_in mapflag pairship_startable +xmas mapflag pairship_startable +xmas_fild01 mapflag pairship_startable +xmas_dun01 mapflag pairship_startable +xmas_dun02 mapflag pairship_startable +alde_dun01 mapflag pairship_startable +alde_dun02 mapflag pairship_startable +alde_dun03 mapflag pairship_startable +alde_dun04 mapflag pairship_startable +c_tower1 mapflag pairship_startable +c_tower2 mapflag pairship_startable +c_tower3 mapflag pairship_startable +c_tower4 mapflag pairship_startable +gl_cas01 mapflag pairship_startable +gl_cas02 mapflag pairship_startable +gl_church mapflag pairship_startable +gl_chyard mapflag pairship_startable +gl_dun01 mapflag pairship_startable +gl_dun02 mapflag pairship_startable +gl_in01 mapflag pairship_startable +gl_knt01 mapflag pairship_startable +gl_knt02 mapflag pairship_startable +gl_prison mapflag pairship_startable +gl_prison1 mapflag pairship_startable +gl_sew01 mapflag pairship_startable +gl_sew02 mapflag pairship_startable +gl_sew03 mapflag pairship_startable +gl_sew04 mapflag pairship_startable +gl_step mapflag pairship_startable +niflheim mapflag pairship_startable +nif_fild01 mapflag pairship_startable +nif_fild02 mapflag pairship_startable +tur_dun02 mapflag pairship_startable +tur_dun03 mapflag pairship_startable +tur_dun04 mapflag pairship_startable +tur_dun01 mapflag pairship_startable +glast_01 mapflag pairship_startable +lou_dun02 mapflag pairship_startable +lou_dun03 mapflag pairship_startable +louyang mapflag pairship_startable +lou_fild01 mapflag pairship_startable +lou_dun01 mapflag pairship_startable + +// Private Airship Endable Maps +prt_fild08d mapflag pairship_endable +prt_fild08c mapflag pairship_endable +prt_fild08b mapflag pairship_endable +prt_fild08a mapflag pairship_endable +izlude_d mapflag pairship_endable +izlude_c mapflag pairship_endable +izlude_b mapflag pairship_endable +izlude_a mapflag pairship_endable +um_dun01 mapflag pairship_endable +um_dun02 mapflag pairship_endable +um_fild01 mapflag pairship_endable +um_fild02 mapflag pairship_endable +um_fild03 mapflag pairship_endable +um_fild04 mapflag pairship_endable +umbala mapflag pairship_endable +comodo mapflag pairship_endable +beach_dun mapflag pairship_endable +beach_dun2 mapflag pairship_endable +beach_dun3 mapflag pairship_endable +cmd_fild01 mapflag pairship_endable +cmd_fild02 mapflag pairship_endable +cmd_fild03 mapflag pairship_endable +cmd_fild04 mapflag pairship_endable +cmd_fild06 mapflag pairship_endable +cmd_fild07 mapflag pairship_endable +cmd_fild08 mapflag pairship_endable +cmd_fild09 mapflag pairship_endable +mjolnir_01 mapflag pairship_endable +mjolnir_02 mapflag pairship_endable +mjolnir_03 mapflag pairship_endable +mjolnir_04 mapflag pairship_endable +mjolnir_05 mapflag pairship_endable +mjolnir_06 mapflag pairship_endable +mjolnir_07 mapflag pairship_endable +mjolnir_08 mapflag pairship_endable +mjolnir_09 mapflag pairship_endable +mjolnir_10 mapflag pairship_endable +mjolnir_11 mapflag pairship_endable +mjolnir_12 mapflag pairship_endable +prt_fild00 mapflag pairship_endable +prt_fild01 mapflag pairship_endable +prt_fild02 mapflag pairship_endable +prt_fild03 mapflag pairship_endable +prt_fild04 mapflag pairship_endable +prt_fild05 mapflag pairship_endable +prt_fild06 mapflag pairship_endable +prt_fild07 mapflag pairship_endable +prt_fild08 mapflag pairship_endable +prt_fild09 mapflag pairship_endable +prt_fild10 mapflag pairship_endable +prt_fild11 mapflag pairship_endable +prt_monk mapflag pairship_endable +gef_fild00 mapflag pairship_endable +gef_fild01 mapflag pairship_endable +gef_fild02 mapflag pairship_endable +gef_fild03 mapflag pairship_endable +gef_fild04 mapflag pairship_endable +gef_fild05 mapflag pairship_endable +gef_fild06 mapflag pairship_endable +gef_fild07 mapflag pairship_endable +gef_fild08 mapflag pairship_endable +gef_fild09 mapflag pairship_endable +gef_fild10 mapflag pairship_endable +gef_fild11 mapflag pairship_endable +moc_fild01 mapflag pairship_endable +moc_fild02 mapflag pairship_endable +moc_fild03 mapflag pairship_endable +moc_fild07 mapflag pairship_endable +moc_fild11 mapflag pairship_endable +moc_fild12 mapflag pairship_endable +moc_fild13 mapflag pairship_endable +moc_fild16 mapflag pairship_endable +moc_fild17 mapflag pairship_endable +moc_fild18 mapflag pairship_endable +moc_fild19 mapflag pairship_endable +pay_fild01 mapflag pairship_endable +pay_fild02 mapflag pairship_endable +pay_fild03 mapflag pairship_endable +pay_fild04 mapflag pairship_endable +pay_fild06 mapflag pairship_endable +pay_fild07 mapflag pairship_endable +pay_fild08 mapflag pairship_endable +pay_fild09 mapflag pairship_endable +pay_fild10 mapflag pairship_endable +anthell01 mapflag pairship_endable +anthell02 mapflag pairship_endable +gef_dun00 mapflag pairship_endable +gef_dun01 mapflag pairship_endable +gef_dun02 mapflag pairship_endable +iz_dun00 mapflag pairship_endable +iz_dun01 mapflag pairship_endable +iz_dun02 mapflag pairship_endable +iz_dun03 mapflag pairship_endable +iz_dun04 mapflag pairship_endable +iz_dun05 mapflag pairship_endable +in_sphinx1 mapflag pairship_endable +in_sphinx2 mapflag pairship_endable +in_sphinx3 mapflag pairship_endable +in_sphinx4 mapflag pairship_endable +in_sphinx5 mapflag pairship_endable +moc_pryd01 mapflag pairship_endable +moc_pryd02 mapflag pairship_endable +moc_pryd03 mapflag pairship_endable +moc_pryd04 mapflag pairship_endable +moc_pryd05 mapflag pairship_endable +moc_pryd06 mapflag pairship_endable +moc_prydb1 mapflag pairship_endable +mjo_dun01 mapflag pairship_endable +mjo_dun02 mapflag pairship_endable +mjo_dun03 mapflag pairship_endable +orcsdun01 mapflag pairship_endable +orcsdun02 mapflag pairship_endable +pay_dun00 mapflag pairship_endable +pay_dun01 mapflag pairship_endable +pay_dun02 mapflag pairship_endable +pay_dun03 mapflag pairship_endable +pay_dun04 mapflag pairship_endable +prt_maze01 mapflag pairship_endable +prt_maze02 mapflag pairship_endable +prt_maze03 mapflag pairship_endable +prt_sewb1 mapflag pairship_endable +prt_sewb2 mapflag pairship_endable +prt_sewb3 mapflag pairship_endable +prt_sewb4 mapflag pairship_endable +treasure01 mapflag pairship_endable +treasure02 mapflag pairship_endable +alberta mapflag pairship_endable +alb2trea mapflag pairship_endable +aldebaran mapflag pairship_endable +geffen mapflag pairship_endable +moc_ruins mapflag pairship_endable +morocc mapflag pairship_endable +pay_arche mapflag pairship_endable +payon mapflag pairship_endable +prontera mapflag pairship_endable +izlude mapflag pairship_endable +izlu2dun mapflag pairship_endable +xmas mapflag pairship_endable +xmas_fild01 mapflag pairship_endable +xmas_dun01 mapflag pairship_endable +xmas_dun02 mapflag pairship_endable +alde_dun01 mapflag pairship_endable +alde_dun02 mapflag pairship_endable +alde_dun03 mapflag pairship_endable +alde_dun04 mapflag pairship_endable +c_tower1 mapflag pairship_endable +c_tower2 mapflag pairship_endable +c_tower3 mapflag pairship_endable +c_tower4 mapflag pairship_endable +gl_cas01 mapflag pairship_endable +gl_cas02 mapflag pairship_endable +gl_church mapflag pairship_endable +gl_chyard mapflag pairship_endable +gl_dun01 mapflag pairship_endable +gl_dun02 mapflag pairship_endable +gl_in01 mapflag pairship_endable +gl_knt01 mapflag pairship_endable +gl_knt02 mapflag pairship_endable +gl_prison mapflag pairship_endable +gl_prison1 mapflag pairship_endable +gl_sew01 mapflag pairship_endable +gl_sew02 mapflag pairship_endable +gl_sew03 mapflag pairship_endable +gl_sew04 mapflag pairship_endable +gl_step mapflag pairship_endable +niflheim mapflag pairship_endable +nif_fild01 mapflag pairship_endable +nif_fild02 mapflag pairship_endable +tur_dun02 mapflag pairship_endable +tur_dun03 mapflag pairship_endable +tur_dun04 mapflag pairship_endable +tur_dun01 mapflag pairship_endable +glast_01 mapflag pairship_endable +lou_dun02 mapflag pairship_endable +lou_dun03 mapflag pairship_endable +louyang mapflag pairship_endable +lou_fild01 mapflag pairship_endable +lou_dun01 mapflag pairship_endable diff --git a/npc/other/private_airship.txt b/npc/other/private_airship.txt new file mode 100644 index 000000000..e650e4b96 --- /dev/null +++ b/npc/other/private_airship.txt @@ -0,0 +1,66 @@ +//================= Hercules Script ======================================= +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//================= License =============================================== +//= This file is part of Hercules. +//= http://herc.ws - http://github.com/HerculesWS/Hercules +//= +//= Copyright (C) 2018 Hercules Dev Team +//= Copyright (C) Asheraf +//= +//= Hercules is free software: you can redistribute it and/or modify +//= it under the terms of the GNU General Public License as published by +//= the Free Software Foundation, either version 3 of the License, or +//= (at your option) any later version. +//= +//= This program is distributed in the hope that it will be useful, +//= but WITHOUT ANY WARRANTY; without even the implied warranty of +//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//= GNU General Public License for more details. +//= +//= You should have received a copy of the GNU General Public License +//= along with this program. If not, see <http://www.gnu.org/licenses/>. +//========================================================================= +//= Private AirShip +//========================================================================= + +- script private_airship FAKE_NPC,{ + end; + +S_AirShipIsNeedItem: + for (.@i = 0; .@i < getarraysize(.needitem); ++.@i) { + if (@itemid == .needitem[.@i]) + return true; + } + return false; + +OnAirShipRequest: + if (callsub(S_AirShipIsNeedItem) == false) { + airship_respond(P_AIRSHIP_ITEM_INVALID); + end; + } + if (countitem(@itemid) < 1) { + airship_respond(P_AIRSHIP_ITEM_NOT_ENOUGH); + end; + } + if (getmapflag(strcharinfo(PC_MAP), mf_pairship_startable) != true) { + airship_respond(P_AIRSHIP_INVALID_START_MAP); + end; + } + if (getmapflag(@mapname$, mf_pairship_endable) != true) { + airship_respond(P_AIRSHIP_INVALID_END_MAP); + end; + } + + delitem(@itemid, 1); + warp(@mapname$, 0, 0); + end; + +OnInit: + setarray(.needitem, 6909, 25464); + end; +} diff --git a/npc/re/other/clans.txt b/npc/re/other/clans.txt index 1260cdcd1..f411b149d 100644 --- a/npc/re/other/clans.txt +++ b/npc/re/other/clans.txt @@ -193,7 +193,7 @@ prt_in,37,114,4 script Berman Aire 4_M_BIRMAN,{ next(); switch (select("Introducing Clan", "Join.", "Leave.")) { case 1: - switch (select("Clans are", "About the Crossbow Clan", "Cancel.")) { + switch (select("Clans are", "About the Golden Mace Clan", "Cancel.")) { case 1: mes("[Berman Aire]"); mes("The ^3131FFClans^000000 are established by the Kingdom to help adventurers connect and share information."); @@ -323,7 +323,7 @@ prt_in,35,114,4 script Debon Aire 4_M_DEBON,{ next(); switch (select("Introducing Clan", "Join.", "Leave.")) { case 1: - switch (select("Clans are::About the Crossbow Clan:Cancel.")) { + switch (select("Clans are", "About the Arc Wand Clan", "Cancel.")) { case 1: mes("[Debon Aire]"); mes("The ^3131FFClans^000000 are ran by the Kingdom, not privately like others."); @@ -463,7 +463,7 @@ prt_in,33,114,4 script Laperm Oranpere 4_F_LAPERM,{ next(); switch (select("Introducing Clan", "Join.", "Leave.")) { case 1: - switch (select("Clans are", "About the Crossbow Clan", "Cancel.")) { + switch (select("Clans are", "About the Sword Clan", "Cancel.")) { case 1: mes("[Laperm Oranpere]"); mes("The ^3131FFClans^000000 are a type of guild ran by the Kingdom."); diff --git a/npc/scripts.conf b/npc/scripts.conf index d56d7cb73..f03ac50f0 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -225,6 +225,7 @@ // - Turbo Track Arena "npc/other/turbo_track.txt", "npc/other/item_merge.txt", +"npc/other/private_airship.txt", //================= Quests ================================================ // - Quests-Tutorials for basic classes (1st class quests) ------ diff --git a/npc/scripts_mapflags.conf b/npc/scripts_mapflags.conf index c662f7562..eed3c3d3d 100644 --- a/npc/scripts_mapflags.conf +++ b/npc/scripts_mapflags.conf @@ -57,3 +57,4 @@ "npc/mapflag/skillmodifier.txt", "npc/mapflag/skillduration.txt", "npc/mapflag/notomb.txt", +"npc/mapflag/private_airship.txt", diff --git a/src/char/pincode.c b/src/char/pincode.c index 01c1f482c..73d9809fa 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -82,6 +82,7 @@ void pincode_check(int fd, struct char_session_data* sd) return; safestrncpy(pin, RFIFOP(fd, 6), sizeof(pin)); + pincode->decrypt(sd->pincode_seed, pin); if (pincode->check_blacklist && pincode->isBlacklisted(pin)) { pincode->loginstate(fd, sd, PINCODE_LOGIN_RESTRICT_PW); @@ -205,7 +206,7 @@ void pincode_makestate(int fd, struct char_session_data *sd, enum pincode_make_r WFIFOHEAD(fd, 8); WFIFOW(fd, 0) = 0x8bb; WFIFOW(fd, 2) = state; - WFIFOW(fd, 4) = 0; + WFIFOL(fd, 4) = sd->pincode_seed; WFIFOSET(fd, 8); } @@ -223,7 +224,7 @@ void pincode_editstate(int fd, struct char_session_data *sd, enum pincode_edit_r WFIFOHEAD(fd, 8); WFIFOW(fd, 0) = 0x8bf; WFIFOW(fd, 2) = state; - WFIFOW(fd, 4) = sd->pincode_seed = rnd() % 0xFFFF; + WFIFOL(fd, 4) = sd->pincode_seed = rnd() % 0xFFFF; WFIFOSET(fd, 8); } diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index f8a55218e..0a54038b5 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -587,6 +587,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_CZ_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_CZ_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP }, { "PACKET_CZ_CHECKNAME", sizeof(struct PACKET_CZ_CHECKNAME), SERVER_TYPE_MAP }, { "PACKET_CZ_OPEN_UI", sizeof(struct PACKET_CZ_OPEN_UI), SERVER_TYPE_MAP }, + { "PACKET_CZ_PRIVATE_AIRSHIP_REQUEST", sizeof(struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST), SERVER_TYPE_MAP }, { "PACKET_CZ_REQ_DELETE_MAIL", sizeof(struct PACKET_CZ_REQ_DELETE_MAIL), SERVER_TYPE_MAP }, { "PACKET_CZ_REQ_ITEM_FROM_MAIL", sizeof(struct PACKET_CZ_REQ_ITEM_FROM_MAIL), SERVER_TYPE_MAP }, { "PACKET_CZ_REQ_NEXT_MAIL_LIST", sizeof(struct PACKET_CZ_REQ_NEXT_MAIL_LIST), SERVER_TYPE_MAP }, @@ -616,6 +617,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_NOTIFY_CLAN_CONNECTINFO", sizeof(struct PACKET_ZC_NOTIFY_CLAN_CONNECTINFO), SERVER_TYPE_MAP }, { "PACKET_ZC_NOTIFY_UNREADMAIL", sizeof(struct PACKET_ZC_NOTIFY_UNREADMAIL), SERVER_TYPE_MAP }, { "PACKET_ZC_OPEN_UI", sizeof(struct PACKET_ZC_OPEN_UI), SERVER_TYPE_MAP }, + { "PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE", sizeof(struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE), SERVER_TYPE_MAP }, { "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP }, { "PACKET_ZC_SKILL_SCALE", sizeof(struct PACKET_ZC_SKILL_SCALE), SERVER_TYPE_MAP }, { "PACKET_ZC_UI_ACTION", sizeof(struct PACKET_ZC_UI_ACTION), SERVER_TYPE_MAP }, diff --git a/src/common/grfio.c b/src/common/grfio.c index fba3dda86..d328f9c68 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -786,8 +786,8 @@ static bool grfio_parse_restable_row(const char *row) if (strstr(w2, ".gat") == NULL && strstr(w2, ".rsw") == NULL) return false; // we only need the maps' GAT and RSW files - sprintf(src, "data\\%s", w1); - sprintf(dst, "data\\%s", w2); + safesnprintf(src, 256, "data\\%s", w1); + safesnprintf(dst, 256, "data\\%s", w2); entry = grfio_filelist_find(dst); if (entry != NULL) { diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 3c7e25a0c..0056aee1e 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -321,7 +321,7 @@ bool sysinfo_git_get_revision(char **out) while (*ref) { FILE *fp; - snprintf(filepath, sizeof(filepath), ".git/%s", ref); + safesnprintf(filepath, sizeof(filepath), ".git/%s", ref); if ((fp = fopen(filepath, "r")) != NULL) { if (fgets(line, sizeof(line)-1, fp) == NULL) { fclose(fp); diff --git a/src/common/utils.c b/src/common/utils.c index 0d76a885e..74c44d147 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -216,7 +216,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*)) if (strcmp(entry->d_name, "..") == 0) continue; - sprintf(tmppath,"%s%c%s",path, PATHSEP, entry->d_name); + safesnprintf(tmppath, sizeof(tmppath), "%s%c%s", path, PATHSEP, entry->d_name); // check if the pattern matches. if (strstr(entry->d_name, pattern)) { diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 990761137..aa8c9375b 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3956,6 +3956,10 @@ ACMD(mapinfo) strcat(atcmd_output, msg_fd(fd, 1063)); // NoAutoloot | if (map->list[m_id].flag.noviewid != EQP_NONE) strcat(atcmd_output, msg_fd(fd,1079)); // NoViewID | + if (map->list[m_id].flag.pairship_startable) + strcat(atcmd_output, msg_fd(fd, 1292)); // PrivateAirshipStartable | + if (map->list[m_id].flag.pairship_endable) + strcat(atcmd_output, msg_fd(fd, 1293)); // PrivateAirshipEndable | clif->message(fd, atcmd_output); switch (list) { @@ -6193,7 +6197,7 @@ ACMD(cleanarea) { *------------------------------------------*/ ACMD(npctalk) { - char name[NAME_LENGTH],mes[100],temp[100]; + char name[NAME_LENGTH], mes[100], temp[200]; struct npc_data *nd; bool ifcolor=(*(info->command + 7) != 'c' && *(info->command + 7) != 'C')?0:1; unsigned int color = 0; @@ -6230,7 +6234,7 @@ ACMD(npctalk) ACMD(pettalk) { - char mes[100],temp[100]; + char mes[100], temp[200]; struct pet_data *pd; if (battle_config.min_chat_delay) { @@ -7036,7 +7040,7 @@ ACMD(homhungry) *------------------------------------------*/ ACMD(homtalk) { - char mes[100],temp[100]; + char mes[100], temp[200]; if (battle_config.min_chat_delay) { if (DIFF_TICK(sd->cantalk_tick, timer->gettick()) > 0) diff --git a/src/map/clif.c b/src/map/clif.c index 47d5a1586..06f054ff2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -19990,9 +19990,9 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ } inner->Titlelength = (int16)strlen(msg->title) + 1; if (open_type != RODEX_OPENTYPE_RETURN) { - strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name)); + strncpy(inner->SenderName, msg->sender_name, sizeof(inner->SenderName)); } else { - strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name)); + strncpy(inner->SenderName, msg->receiver_name, sizeof(inner->SenderName)); } strncpy(inner->title, msg->title, inner->Titlelength); size += sizeof(*inner) + inner->Titlelength; @@ -20051,9 +20051,9 @@ void clif_rodex_send_mails_all(int fd, struct map_session_data *sd, int64 mail_i } inner->Titlelength = (int16)strlen(msg->title) + 1; if (msg->opentype != RODEX_OPENTYPE_RETURN) { - strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name)); + strncpy(inner->SenderName, msg->sender_name, sizeof(inner->SenderName)); } else { - strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name)); + strncpy(inner->SenderName, msg->receiver_name, sizeof(inner->SenderName)); } strncpy(inner->title, msg->title, inner->Titlelength); size += sizeof(*inner) + inner->Titlelength; @@ -20122,9 +20122,9 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type } inner->Titlelength = (int16)strlen(msg->title) + 1; if (open_type != RODEX_OPENTYPE_RETURN) { - strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name)); + strncpy(inner->SenderName, msg->sender_name, sizeof(inner->SenderName)); } else { - strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name)); + strncpy(inner->SenderName, msg->receiver_name, sizeof(inner->SenderName)); } strncpy(inner->title, msg->title, inner->Titlelength); size += sizeof(*inner) + inner->Titlelength; @@ -20597,6 +20597,11 @@ void clif_parse_attendance_reward_request(int fd, struct map_session_data *sd) #endif } +void clif_parse_cz_blocking_play_cancel(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_cz_blocking_play_cancel(int fd, struct map_session_data *sd) +{ +} + void clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data) { @@ -20610,6 +20615,49 @@ void clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data) clif->send(&p, sizeof(p), &sd->bl, SELF); } + +void clif_parse_private_airship_request(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_private_airship_request(int fd, struct map_session_data *sd) +{ +#if defined(PACKETVER_RE) && PACKETVER >= 20180321 + char evname[EVENT_NAME_LENGTH]; + struct event_data *ev = NULL; + const struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST *p = RP2PTR(fd); + + safestrncpy(evname, "private_airship::OnAirShipRequest", EVENT_NAME_LENGTH); + if ((ev = strdb_get(npc->ev_db, evname))) { + pc->setregstr(sd, script->add_str("@mapname$"), p->mapName); + pc->setreg(sd, script->add_str("@itemid"), p->ItemID); + script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id); + } else { + ShowError("clif_parse_private_airship_request: event '%s' not found, operation failed\n", evname); + } +#else + ShowWarning("clif_parse_private_airship_request: private airship is not supported in this client version, possible packet manipulation."); +#endif +} + +void clif_private_airship_response(struct map_session_data *sd, uint32 flag) +{ +#if defined(PACKETVER_RE) && PACKETVER >= 20180321 + struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE p; + + nullpo_retv(sd); + + if (flag > P_AIRSHIP_ITEM_INVALID) { + ShowError("clif_private_airship_response: invalid flag given '%d', defaulting to 0.\n", flag); + flag = 0; + } + + p.PacketType = 0xA4A; + p.flag = flag; + + clif->send(&p, sizeof(p), &sd->bl, SELF); +#else + ShowWarning("clif_private_airship_response: private airship works only for clients >= 20180321."); +#endif +} + /*========================================== * Main client packet processing function *------------------------------------------*/ @@ -21623,6 +21671,7 @@ void clif_defaults(void) { clif->pDebug = clif_parse_debug; clif->pSkillSelectMenu = clif_parse_SkillSelectMenu; clif->pMoveItem = clif_parse_MoveItem; + clif->p_cz_blocking_play_cancel = clif_parse_cz_blocking_play_cancel; /* dull */ clif->pDull = clif_parse_dull; /* BGQueue */ @@ -21715,4 +21764,6 @@ void clif_defaults(void) { clif->open_ui = clif_open_ui; clif->pAttendanceRewardRequest = clif_parse_attendance_reward_request; clif->ui_action = clif_ui_action; + clif->pPrivateAirshipRequest = clif_parse_private_airship_request; + clif->PrivateAirshipResponse = clif_private_airship_response; } diff --git a/src/map/clif.h b/src/map/clif.h index f0eaaf6eb..58eb6b357 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -589,6 +589,18 @@ enum ui_types { ATTENDANCE_UI }; /** +* Private Airship Responds +**/ +enum private_airship { + P_AIRSHIP_NONE, + P_AIRSHIP_RETRY, + P_AIRSHIP_INVALID_START_MAP, + P_AIRSHIP_INVALID_END_MAP, + P_AIRSHIP_ITEM_NOT_ENOUGH, + P_AIRSHIP_ITEM_INVALID +}; + +/** * Structures **/ typedef void (*pFunc)(int, struct map_session_data *); //cant help but put it first @@ -1356,6 +1368,7 @@ struct clif_interface { void (*pSkillSelectMenu) (int fd, struct map_session_data *sd); void (*pMoveItem) (int fd, struct map_session_data *sd); void (*pDull) (int fd, struct map_session_data *sd); + void (*p_cz_blocking_play_cancel) (int fd, struct map_session_data *sd); /* BGQueue */ void (*pBGQueueRegister) (int fd, struct map_session_data *sd); void (*pBGQueueCheckState) (int fd, struct map_session_data *sd); @@ -1450,6 +1463,8 @@ struct clif_interface { void (*open_ui) (struct map_session_data *sd, int8 UIType); void (*pAttendanceRewardRequest) (int fd, struct map_session_data *sd); void (*ui_action) (struct map_session_data *sd, int32 UIType, int32 data); + void (*pPrivateAirshipRequest) (int fd, struct map_session_data *sd); + void (*PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag); }; #ifdef HERCULES_CORE diff --git a/src/map/map.c b/src/map/map.c index 90b304865..8386b3c3d 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -5119,11 +5119,12 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { } } else if (!strcmpi(flag,"adjust_unit_duration")) { int skill_id, k; - char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH]; - size_t len = strlen(params); + char skill_name[MAX_SKILL_NAME_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH]; + size_t len; modifier[0] = '\0'; - memcpy(skill_name, params, MAP_ZONE_MAPFLAG_LENGTH); + safestrncpy(skill_name, params, MAX_SKILL_NAME_LENGTH); + len = strlen(skill_name); for(k = 0; k < len; k++) { if( skill_name[k] == '\t' ) { @@ -5152,11 +5153,12 @@ bool map_zone_mf_cache(int m, char *flag, char *params) { } } else if (!strcmpi(flag,"adjust_skill_damage")) { int skill_id, k; - char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH]; - size_t len = strlen(params); + char skill_name[MAX_SKILL_NAME_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH]; + size_t len; modifier[0] = '\0'; - memcpy(skill_name, params, MAP_ZONE_MAPFLAG_LENGTH); + safestrncpy(skill_name, params, MAX_SKILL_NAME_LENGTH); + len = strlen(skill_name); for(k = 0; k < len; k++) { if( skill_name[k] == '\t' ) { diff --git a/src/map/map.h b/src/map/map.h index d6afdc160..b77b68813 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -740,7 +740,7 @@ enum map_zone_merge_type { #define MAP_ZONE_BG_NAME "Battlegrounds" #define MAP_ZONE_CVC_NAME "CvC" #define MAP_ZONE_PK_NAME "PK Mode" -#define MAP_ZONE_MAPFLAG_LENGTH 50 +#define MAP_ZONE_MAPFLAG_LENGTH 65 struct map_zone_data { char name[MAP_ZONE_NAME_LENGTH];/* 20'd */ @@ -857,6 +857,8 @@ struct map_data { unsigned notomb : 1; unsigned nocashshop : 1; unsigned noautoloot : 1; + unsigned pairship_startable : 1; + unsigned pairship_endable : 1; uint32 noviewid; ///< noviewid (bitmask - @see enum equip_pos) } flag; struct point save; diff --git a/src/map/npc.c b/src/map/npc.c index b72cc06cc..f256cbd7d 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -4517,6 +4517,10 @@ const char *npc_parse_mapflag(const char *w1, const char *w2, const char *w3, co map->list[m].flag.nocashshop = (state) ? 1 : 0; } else if (!strcmpi(w3,"noviewid")) { map->list[m].flag.noviewid = (state) ? atoi(w4) : 0; + } else if (!strcmpi(w3, "pairship_startable")) { + map->list[m].flag.pairship_startable = (state) ? 1 : 0; + } else if (!strcmpi(w3, "pairship_endable")) { + map->list[m].flag.pairship_endable = (state) ? 1 : 0; } else { npc->parse_unknown_mapflag(mapname, w3, w4, start, buffer, filepath, retval); } diff --git a/src/map/packets.h b/src/map/packets.h index a723463b4..29a0e0090 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -1534,7 +1534,12 @@ packet(0x96e,-1,clif->ackmergeitems); //packet(0x07d4,4); //packet(0x07d5,4); //packet(0x07d6,4); - //packet(0x0447,2); +#endif + +// 2009-05-20aRagexe, 2009-05-20aRagexeRE +#if PACKETVER >= 20090520 +// new packets + packet(0x0447,2,clif->p_cz_blocking_play_cancel); // PACKET_CZ_BLOCKING_PLAY_CANCEL #endif //2009-06-03aRagexeRE @@ -2310,7 +2315,6 @@ packet(0x96e,-1,clif->ackmergeitems); // Shuffle End // New Packets (wrong version or packet not exists) - packet(0x0447,2); // PACKET_CZ_BLOCKING_PLAY_CANCEL packet(0x099f,24); // New Packets End #endif @@ -3823,7 +3827,7 @@ packet(0x96e,-1,clif->ackmergeitems); // changed packet sizes packet(0x006d,157); // HC_ACCEPT_MAKECHAR packet(0x08e3,157); // HC_UPDATE_CHARINFO - packet(0x0a49,20); + packet(0x0a49, 20, clif->pPrivateAirshipRequest); #endif // 2017-09-06cRagexeRE @@ -3993,7 +3997,7 @@ packet(0x96e,-1,clif->ackmergeitems); // new packets packet(0x0af2,40,clif->pDull/*,XXX*/); packet(0x0af3,-1,clif->pDull/*,XXX*/); - packet(0x0af4,11,clif->pDull/*,XXX*/); + packet(0x0af4,11,clif->pUseSkillToPos,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND // changed packet sizes packet(0x0ae6,10,clif->pDull/*,XXX*/); #endif @@ -4017,7 +4021,7 @@ packet(0x96e,-1,clif->ackmergeitems); // 2018-02-07bRagexeRE, 2018-02-07bRagexe #if PACKETVER >= 20180207 // new packets - packet(0x0af4,11); + packet(0x0af4,11,clif->pUseSkillToPos,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND packet(0x0af5,3); packet(0x0af6,88); packet(0x0af7,32); @@ -4096,4 +4100,13 @@ packet(0x96e,-1,clif->ackmergeitems); #endif #endif +#ifdef PACKETVER_ZERO +// 2018-04-25_3aRagexe_zero +#if PACKETVER >= 20180425 +// new packets + packet(0x0afb,-1,clif->pDull/*,XXX*/); +// changed packet sizes +#endif +#endif // PACKETVER_ZERO + #endif /* MAP_PACKETS_H */ diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h index 1f6a3ca6d..5890377d6 100644 --- a/src/map/packets_keys_main.h +++ b/src/map/packets_keys_main.h @@ -874,7 +874,7 @@ packetKeys(0x6A596301,0x76866D0E,0x32294A45); #endif -// 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE +// 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE #if PACKETVER == 20131223 || \ PACKETVER == 20140508 || \ PACKETVER == 20140611 || \ @@ -883,7 +883,9 @@ PACKETVER == 20180321 || \ PACKETVER == 20180328 || \ PACKETVER == 20180404 || \ - PACKETVER >= 20180418 + PACKETVER == 20180418 || \ + PACKETVER == 20180425 || \ + PACKETVER >= 20180502 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h index d9625f716..8540ff5a5 100644 --- a/src/map/packets_keys_zero.h +++ b/src/map/packets_keys_zero.h @@ -29,7 +29,7 @@ /* This file is autogenerated, please do not commit manual changes */ -// 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero +// 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero #if PACKETVER == 20171019 || \ PACKETVER == 20171023 || \ PACKETVER == 20171024 || \ @@ -42,7 +42,8 @@ PACKETVER == 20180315 || \ PACKETVER == 20180321 || \ PACKETVER == 20180328 || \ - PACKETVER >= 20180411 + PACKETVER == 20180411 || \ + PACKETVER >= 20180425 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h index 4bb998652..6ef63aae9 100644 --- a/src/map/packets_shuffle_main.h +++ b/src/map/packets_shuffle_main.h @@ -3345,14 +3345,16 @@ packet(0x0969,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE #endif -// 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE +// 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE #if PACKETVER == 20140611 || \ PACKETVER == 20150225 || \ PACKETVER == 20180315 || \ PACKETVER == 20180321 || \ PACKETVER == 20180328 || \ PACKETVER == 20180404 || \ - PACKETVER >= 20180418 + PACKETVER == 20180418 || \ + PACKETVER == 20180425 || \ + PACKETVER >= 20180502 packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h index 087eb119f..e7083e200 100644 --- a/src/map/packets_shuffle_zero.h +++ b/src/map/packets_shuffle_zero.h @@ -36,7 +36,7 @@ /* This file is autogenerated, please do not commit manual changes */ -// 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero +// 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero #if PACKETVER == 20171019 || \ PACKETVER == 20171023 || \ PACKETVER == 20171024 || \ @@ -49,7 +49,8 @@ PACKETVER == 20180315 || \ PACKETVER == 20180321 || \ PACKETVER == 20180328 || \ - PACKETVER >= 20180411 + PACKETVER == 20180411 || \ + PACKETVER >= 20180425 packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 5b9a4344a..cae794e92 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -1729,6 +1729,17 @@ struct PACKET_ZC_UI_ACTION { int32 data; } __attribute__((packed)); +struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST { + int16 PacketType; + char mapName[MAP_NAME_LENGTH_EXT]; + uint16 ItemID; +} __attribute__((packed)); + +struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE { + int16 PacketType; + uint32 flag; +} __attribute__((packed)); + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris diff --git a/src/map/script.c b/src/map/script.c index 8e6ad5dcf..67dd4214c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -12937,7 +12937,9 @@ BUILDIN(getmapflag) case MF_NOTOMB: script_pushint(st,map->list[m].flag.notomb); break; case MF_NOCASHSHOP: script_pushint(st,map->list[m].flag.nocashshop); break; case MF_NOAUTOLOOT: script_pushint(st, map->list[m].flag.noautoloot); break; - case MF_NOVIEWID: script_pushint(st,map->list[m].flag.noviewid); break; + case MF_NOVIEWID: script_pushint(st, map->list[m].flag.noviewid); break; + case MF_PAIRSHIP_STARTABLE: script_pushint(st, map->list[m].flag.pairship_startable); break; + case MF_PAIRSHIP_ENDABLE: script_pushint(st, map->list[m].flag.pairship_endable); break; } } @@ -13063,6 +13065,8 @@ BUILDIN(setmapflag) { case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 1; break; case MF_NOAUTOLOOT: map->list[m].flag.noautoloot = 1; break; case MF_NOVIEWID: map->list[m].flag.noviewid = (val <= 0) ? EQP_NONE : val; break; + case MF_PAIRSHIP_STARTABLE: map->list[m].flag.pairship_startable = 1; break; + case MF_PAIRSHIP_ENDABLE: map->list[m].flag.pairship_endable = 1; break; } } @@ -19674,7 +19678,7 @@ BUILDIN(getunitdata) #undef getunitdata_sub - return false; + return true; } /** @@ -23970,6 +23974,23 @@ BUILDIN(clan_master) return true; } +BUILDIN(airship_respond) +{ + struct map_session_data *sd = map->id2sd(st->rid); + int32 flag = script_getnum(st, 2); + + if (sd == NULL) + return false; + + if (flag < P_AIRSHIP_NONE || flag > P_AIRSHIP_ITEM_INVALID) { + ShowWarning("buildin_airship_respond: invalid flag %d has been given.", flag); + return false; + } + + clif->PrivateAirshipResponse(sd, flag); + return true; +} + /** * hateffect(EffectID, Enable_State) */ @@ -24719,6 +24740,7 @@ void script_parse_builtin(void) { BUILDIN_DEF2(rodex_sendmail, "rodex_sendmail_acc", "isss???????????"), BUILDIN_DEF(rodex_sendmail2, "isss?????????????????????????????????????????"), BUILDIN_DEF2(rodex_sendmail2, "rodex_sendmail_acc2", "isss?????????????????????????????????????????"), + BUILDIN_DEF(airship_respond, "i"), BUILDIN_DEF(_,"s"), BUILDIN_DEF2(_, "_$", "s"), @@ -25094,6 +25116,14 @@ void script_hardcoded_constants(void) script->set_constant("MST_AROUND4", MST_AROUND4, false, false); script->set_constant("MST_AROUND", MST_AROUND , false, false); + script->constdb_comment("private airship responds"); + script->set_constant("P_AIRSHIP_NONE", P_AIRSHIP_NONE, false, false); + script->set_constant("P_AIRSHIP_RETRY", P_AIRSHIP_RETRY, false, false); + script->set_constant("P_AIRSHIP_INVALID_START_MAP", P_AIRSHIP_INVALID_START_MAP, false, false); + script->set_constant("P_AIRSHIP_INVALID_END_MAP", P_AIRSHIP_INVALID_END_MAP, false, false); + script->set_constant("P_AIRSHIP_ITEM_NOT_ENOUGH", P_AIRSHIP_ITEM_NOT_ENOUGH, false, false); + script->set_constant("P_AIRSHIP_ITEM_INVALID", P_AIRSHIP_ITEM_INVALID, false, false); + script->constdb_comment("Renewal"); #ifdef RENEWAL script->set_constant("RENEWAL", 1, false, false); diff --git a/src/map/script.h b/src/map/script.h index ede786481..0eaf5c539 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -337,7 +337,9 @@ enum { MF_NOTOMB, MF_NOCASHSHOP, MF_NOAUTOLOOT, - MF_NOVIEWID + MF_NOVIEWID, + MF_PAIRSHIP_STARTABLE, + MF_PAIRSHIP_ENDABLE }; enum navigation_service { diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 90d6945c2..5044dd45a 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -2268,6 +2268,8 @@ typedef void (*HPMHOOK_pre_clif_pMoveItem) (int *fd, struct map_session_data **s typedef void (*HPMHOOK_post_clif_pMoveItem) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pDull) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pDull) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_p_cz_blocking_play_cancel) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_p_cz_blocking_play_cancel) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pBGQueueRegister) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pBGQueueRegister) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pBGQueueCheckState) (int *fd, struct map_session_data **sd); @@ -2426,6 +2428,10 @@ typedef void (*HPMHOOK_pre_clif_pAttendanceRewardRequest) (int *fd, struct map_s typedef void (*HPMHOOK_post_clif_pAttendanceRewardRequest) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_ui_action) (struct map_session_data **sd, int32 *UIType, int32 *data); typedef void (*HPMHOOK_post_clif_ui_action) (struct map_session_data *sd, int32 UIType, int32 data); +typedef void (*HPMHOOK_pre_clif_pPrivateAirshipRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPrivateAirshipRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_PrivateAirshipResponse) (struct map_session_data **sd, uint32 *flag); +typedef void (*HPMHOOK_post_clif_PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index d07c83187..747ec357e 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1864,6 +1864,8 @@ struct { struct HPMHookPoint *HP_clif_pMoveItem_post; struct HPMHookPoint *HP_clif_pDull_pre; struct HPMHookPoint *HP_clif_pDull_post; + struct HPMHookPoint *HP_clif_p_cz_blocking_play_cancel_pre; + struct HPMHookPoint *HP_clif_p_cz_blocking_play_cancel_post; struct HPMHookPoint *HP_clif_pBGQueueRegister_pre; struct HPMHookPoint *HP_clif_pBGQueueRegister_post; struct HPMHookPoint *HP_clif_pBGQueueCheckState_pre; @@ -2022,6 +2024,10 @@ struct { struct HPMHookPoint *HP_clif_pAttendanceRewardRequest_post; struct HPMHookPoint *HP_clif_ui_action_pre; struct HPMHookPoint *HP_clif_ui_action_post; + struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_pre; + struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_post; + struct HPMHookPoint *HP_clif_PrivateAirshipResponse_pre; + struct HPMHookPoint *HP_clif_PrivateAirshipResponse_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -8203,6 +8209,8 @@ struct { int HP_clif_pMoveItem_post; int HP_clif_pDull_pre; int HP_clif_pDull_post; + int HP_clif_p_cz_blocking_play_cancel_pre; + int HP_clif_p_cz_blocking_play_cancel_post; int HP_clif_pBGQueueRegister_pre; int HP_clif_pBGQueueRegister_post; int HP_clif_pBGQueueCheckState_pre; @@ -8361,6 +8369,10 @@ struct { int HP_clif_pAttendanceRewardRequest_post; int HP_clif_ui_action_pre; int HP_clif_ui_action_post; + int HP_clif_pPrivateAirshipRequest_pre; + int HP_clif_pPrivateAirshipRequest_post; + int HP_clif_PrivateAirshipResponse_pre; + int HP_clif_PrivateAirshipResponse_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 488792200..06c1b2c88 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -955,6 +955,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pSkillSelectMenu, HP_clif_pSkillSelectMenu) }, { HP_POP(clif->pMoveItem, HP_clif_pMoveItem) }, { HP_POP(clif->pDull, HP_clif_pDull) }, + { HP_POP(clif->p_cz_blocking_play_cancel, HP_clif_p_cz_blocking_play_cancel) }, { HP_POP(clif->pBGQueueRegister, HP_clif_pBGQueueRegister) }, { HP_POP(clif->pBGQueueCheckState, HP_clif_pBGQueueCheckState) }, { HP_POP(clif->pBGQueueRevokeReq, HP_clif_pBGQueueRevokeReq) }, @@ -1034,6 +1035,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->open_ui, HP_clif_open_ui) }, { HP_POP(clif->pAttendanceRewardRequest, HP_clif_pAttendanceRewardRequest) }, { HP_POP(clif->ui_action, HP_clif_ui_action) }, + { HP_POP(clif->pPrivateAirshipRequest, HP_clif_pPrivateAirshipRequest) }, + { HP_POP(clif->PrivateAirshipResponse, HP_clif_PrivateAirshipResponse) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 718aa77d7..dae598218 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -24274,6 +24274,32 @@ void HP_clif_pDull(int fd, struct map_session_data *sd) { } return; } +void HP_clif_p_cz_blocking_play_cancel(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_p_cz_blocking_play_cancel_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_p_cz_blocking_play_cancel_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_p_cz_blocking_play_cancel_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.p_cz_blocking_play_cancel(fd, sd); + } + if (HPMHooks.count.HP_clif_p_cz_blocking_play_cancel_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_p_cz_blocking_play_cancel_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_p_cz_blocking_play_cancel_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} void HP_clif_pBGQueueRegister(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pBGQueueRegister_pre > 0) { @@ -26334,6 +26360,58 @@ void HP_clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data) { } return; } +void HP_clif_pPrivateAirshipRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pPrivateAirshipRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPrivateAirshipRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pPrivateAirshipRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPrivateAirshipRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pPrivateAirshipRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPrivateAirshipRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pPrivateAirshipRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_PrivateAirshipResponse(struct map_session_data *sd, uint32 flag) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_PrivateAirshipResponse_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint32 *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PrivateAirshipResponse_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_PrivateAirshipResponse_pre[hIndex].func; + preHookFunc(&sd, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PrivateAirshipResponse(sd, flag); + } + if (HPMHooks.count.HP_clif_PrivateAirshipResponse_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint32 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PrivateAirshipResponse_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_PrivateAirshipResponse_post[hIndex].func; + postHookFunc(sd, flag); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; |