From ccf52095a3d2c76c0adad1345c6b5f58bd747f3b Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Sun, 28 Feb 2016 18:17:49 +0700 Subject: [PATCH 1/3] Follow up 26dcf345fe753dc43568bb118b6a22e2c93bc7bc * Added necessary mapflags. * Corrected documentation. * Fixed some typos. * Thanks to @Atemo Signed-off-by: Cydh Ramdh --- db/pre-re/skill_nocast_db.txt | 20 -------------------- db/re/skill_nocast_db.txt | 2 +- db/status_disabled.txt | 1 + doc/mapflags.txt | 3 ++- npc/mapflag/gvg.txt | 1 + npc/re/mapflag/gvg.txt | 4 +++- npc/re/mapflag/nomemo.txt | 5 ++++- npc/re/mapflag/nosave.txt | 5 ++++- npc/re/mapflag/restricted.txt | 34 ---------------------------------- src/map/script.c | 23 ++++++++++++++++++++++- src/map/script_constants.h | 2 ++ 11 files changed, 40 insertions(+), 60 deletions(-) diff --git a/db/pre-re/skill_nocast_db.txt b/db/pre-re/skill_nocast_db.txt index 6073a47fb4..5081ede917 100644 --- a/db/pre-re/skill_nocast_db.txt +++ b/db/pre-re/skill_nocast_db.txt @@ -100,26 +100,6 @@ 488,3 //CG_HERMODE 3013,3 //KO_KYOUGAKU -//---------------------------------------------------------------------------- -// Restircted in WOE:TE maps -//---------------------------------------------------------------------------- -26,16 //AL_TELEPORT -27,16 //AL_WARP -87,16 //WZ_ICEWALL -150,16 //TF_BACKSLIDING -219,16 //RG_INTIMIDATE -336,16 //WE_CALLPARTNER -361,16 //HP_ASSUMPTIO -362,16 //HP_BASILICA -395,16 //CG_MOONLIT -409,16 //WE_CALLPARENT -410,16 //WE_CALLBABY -491,16 //CR_CULTIVATION -530,16 //NJ_KIRIKAGE -691,16 //CASH_ASSUMPTIO -2284,16 //SC_FATALMENACE -2300,16 //SC_DIMENSIONDOOR - //---------------------------------------------------------------------------- // Zone 1 - Aldebaran Turbo Track //---------------------------------------------------------------------------- diff --git a/db/re/skill_nocast_db.txt b/db/re/skill_nocast_db.txt index 85925733fb..057d20652b 100644 --- a/db/re/skill_nocast_db.txt +++ b/db/re/skill_nocast_db.txt @@ -100,7 +100,7 @@ 3013,3 //KO_KYOUGAKU //---------------------------------------------------------------------------- -// Restircted in WOE:TE Castles +// Restricted in WOE:TE Castles //---------------------------------------------------------------------------- 26,16 // AL_TELEPORT 27,16 // AL_WARP diff --git a/db/status_disabled.txt b/db/status_disabled.txt index aef2f9251d..c89b984fdc 100644 --- a/db/status_disabled.txt +++ b/db/status_disabled.txt @@ -20,6 +20,7 @@ // 512 - restricted in zone 5 // 1024 - restricted in zone 6 // 2048 - restricted in zone 7 +// 4096 - restricted in zone 8 // // Example: // SC_ENDURE,4 // Endure status will be removed when the player enters GvG and WoE Castle maps; Also cannot be inflicted again. diff --git a/doc/mapflags.txt b/doc/mapflags.txt index 5786172112..7ddbb10e39 100644 --- a/doc/mapflags.txt +++ b/doc/mapflags.txt @@ -274,9 +274,10 @@ Enables Guild vs. Guild mode on a map and applies the corresponding damage adjus --------------------------------------- +*gvg_te *gvg_te_castle -Used to determines map is WOE:TE area. Special restrcitions are apllied. +Used to determines map is WOE:TE area. Special restrictions are apllied. --------------------------------------- diff --git a/npc/mapflag/gvg.txt b/npc/mapflag/gvg.txt index 5f3095e3d5..fec185a3a4 100644 --- a/npc/mapflag/gvg.txt +++ b/npc/mapflag/gvg.txt @@ -12,6 +12,7 @@ //= gvg: Turns on GvG mode. //= gvg_castle: Describes castle maps for WoE. //= gvg_dungeon: Describes dungeon maps for WoE. +//= gvg_te: Turns on GvG mode for WoE:TE. //= gvg_te_castle: Describes castle maps for WoE:TE. //===== Additional Comments: ================================= //= 1.1 Added Novice Guild Castles. diff --git a/npc/re/mapflag/gvg.txt b/npc/re/mapflag/gvg.txt index fce3d8502f..e0e3586031 100644 --- a/npc/re/mapflag/gvg.txt +++ b/npc/re/mapflag/gvg.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= rAthena Dev Team //===== Current Version: ===================================== -//= 1.0 +//= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= @@ -12,9 +12,11 @@ //= gvg: Turns on GvG mode. //= gvg_castle: Describes castle maps for WoE. //= gvg_dungeon: Describes dungeon maps for WoE. +//= gvg_te: Turns on GvG mode for WoE:TE. //= gvg_te_castle: Describes castle maps for WoE:TE. //===== Additional Comments: ================================= //= 1.0 Renewal split. [Euphy] +//= 1.1 Added GVG TE Castles. [Cydh] //============================================================ // Guild Dungeons ========= diff --git a/npc/re/mapflag/nomemo.txt b/npc/re/mapflag/nomemo.txt index 91379a65f7..de1afc61ab 100644 --- a/npc/re/mapflag/nomemo.txt +++ b/npc/re/mapflag/nomemo.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= rAthena Dev Team //===== Current Version: ===================================== -//= 1.0 +//= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= @@ -11,6 +11,7 @@ //= Also disables marriage warp skills. //===== Additional Comments: ================================= //= 1.0 Renewal split. [Euphy] +//= 1.1 Added GVG TE Maps. [Cydh] //============================================================ // Episode 13 ==================== @@ -137,3 +138,5 @@ te_aldecas2 mapflag nomemo te_aldecas3 mapflag nomemo te_aldecas4 mapflag nomemo te_aldecas5 mapflag nomemo +teg_dun01 mapflag nomemo +teg_dun02 mapflag nomemo diff --git a/npc/re/mapflag/nosave.txt b/npc/re/mapflag/nosave.txt index 1f73ed1830..e36273532a 100644 --- a/npc/re/mapflag/nosave.txt +++ b/npc/re/mapflag/nosave.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= rAthena Dev Team //===== Current Version: ===================================== -//= 1.0 +//= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= @@ -11,6 +11,7 @@ //= to the map specified in the last field, or "SavePoint". //===== Additional Comments: ================================= //= 1.0 Renewal split. [Euphy] +//= 1.1 Added GVG TE Guild Dungeons. [Cydh] //============================================================ // Job Quests ==================== @@ -43,6 +44,8 @@ gld2_ald mapflag nosave SavePoint gld2_gef mapflag nosave SavePoint gld2_pay mapflag nosave SavePoint gld2_prt mapflag nosave SavePoint +teg_dun01 mapflag nosave SavePoint +teg_dun02 mapflag nosave SavePoint // Misty Forest Labyrinth ========= 1@mist mapflag nosave SavePoint diff --git a/npc/re/mapflag/restricted.txt b/npc/re/mapflag/restricted.txt index 1e1b8e35d2..ae58ff71b3 100644 --- a/npc/re/mapflag/restricted.txt +++ b/npc/re/mapflag/restricted.txt @@ -41,37 +41,3 @@ mora mapflag restricted 7 // Restricted maps for WOE:TE Items == teg_dun01 mapflag restricted 8 teg_dun02 mapflag restricted 8 -//aldeg_cas01 mapflag restricted 8 -//aldeg_cas02 mapflag restricted 8 -//aldeg_cas03 mapflag restricted 8 -//aldeg_cas04 mapflag restricted 8 -//aldeg_cas05 mapflag restricted 8 -//gefg_cas01 mapflag restricted 8 -//gefg_cas02 mapflag restricted 8 -//gefg_cas03 mapflag restricted 8 -//gefg_cas04 mapflag restricted 8 -//gefg_cas05 mapflag restricted 8 -//payg_cas01 mapflag restricted 8 -//payg_cas02 mapflag restricted 8 -//payg_cas03 mapflag restricted 8 -//payg_cas04 mapflag restricted 8 -//payg_cas05 mapflag restricted 8 -//prtg_cas01 mapflag restricted 8 -//prtg_cas02 mapflag restricted 8 -//prtg_cas03 mapflag restricted 8 -//prtg_cas04 mapflag restricted 8 -//prtg_cas05 mapflag restricted 8 -//schg_cas01 mapflag restricted 8 -//schg_cas02 mapflag restricted 8 -//schg_cas03 mapflag restricted 8 -//schg_cas04 mapflag restricted 8 -//schg_cas05 mapflag restricted 8 -//arug_cas01 mapflag restricted 8 -//arug_cas02 mapflag restricted 8 -//arug_cas03 mapflag restricted 8 -//arug_cas04 mapflag restricted 8 -//arug_cas05 mapflag restricted 8 -//gld2_ald mapflag restricted 8 -//gld2_gef mapflag restricted 8 -//gld2_pay mapflag restricted 8 -//gld2_prt mapflag restricted 8 diff --git a/src/map/script.c b/src/map/script.c index 079321f0c7..2e537a198b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -363,7 +363,7 @@ enum { MF_NOTOMB, MF_SKILL_DAMAGE, //60 MF_GVG_TE_CASTLE, - MF_GVG_TE_DUNGEON, + MF_GVG_TE, }; const char* script_op2name(int op) @@ -11800,6 +11800,7 @@ BUILDIN_FUNC(getmapflag) case MF_NOLOCKON: script_pushint(st,map[m].flag.nolockon); break; case MF_NOTOMB: script_pushint(st,map[m].flag.notomb); break; case MF_GVG_TE_CASTLE: script_pushint(st,map[m].flag.gvg_te_castle); break; + case MF_GVG_TE: script_pushint(st,map[m].flag.gvg_te); break; #ifdef ADJUST_SKILL_DAMAGE case MF_SKILL_DAMAGE: { @@ -11924,6 +11925,16 @@ BUILDIN_FUNC(setmapflag) case MF_NOLOCKON: map[m].flag.nolockon = 1 ; break; case MF_NOTOMB: map[m].flag.notomb = 1; break; case MF_GVG_TE_CASTLE: map[m].flag.gvg_te_castle = 1; break; + case MF_GVG_TE: + { + struct block_list bl; + map[m].flag.gvg_te = 1; + clif_map_property_mapall(m, MAPPROPERTY_AGITZONE); + bl.type = BL_NUL; + bl.m = m; + clif_maptypeproperty2(&bl,ALL_SAMEMAP); + } + break; #ifdef ADJUST_SKILL_DAMAGE case MF_SKILL_DAMAGE: { @@ -12036,6 +12047,16 @@ BUILDIN_FUNC(removemapflag) case MF_NOLOCKON: map[m].flag.nolockon = 0 ; break; case MF_NOTOMB: map[m].flag.notomb = 0; break; case MF_GVG_TE_CASTLE: map[m].flag.gvg_te_castle = 0; break; + case MF_GVG_TE: + { + struct block_list bl; + bl.type = BL_NUL; + bl.m = m; + map[m].flag.gvg_te = 0; + clif_map_property_mapall(m, MAPPROPERTY_NOTHING); + clif_maptypeproperty2(&bl,ALL_SAMEMAP); + } + break; #ifdef ADJUST_SKILL_DAMAGE case MF_SKILL_DAMAGE: { diff --git a/src/map/script_constants.h b/src/map/script_constants.h index 9250d53bf3..c692c2ae11 100644 --- a/src/map/script_constants.h +++ b/src/map/script_constants.h @@ -393,6 +393,8 @@ export_constant(MF_NOLOCKON); export_constant(MF_NOTOMB); export_constant(MF_SKILL_DAMAGE); + export_constant(MF_GVG_TE_CASTLE); + export_constant(MF_GVG_TE); /* setcell types */ export_constant(CELL_WALKABLE); From 38aaba07ca2ebe3e982422270f66550e7926f59d Mon Sep 17 00:00:00 2001 From: Atemo Date: Tue, 1 Mar 2016 01:56:57 +0100 Subject: [PATCH 2/3] Corrected typo Thanks @aleos89 --- db/re/quest_db.txt | 2 +- doc/mapflags.txt | 2 +- doc/script_commands.txt | 16 +++++++++++++++- npc/re/merchants/te_merchant.txt | 7 +++---- npc/re/other/Global_Functions.txt | 4 ++-- npc/re/quests/woe_te/te_goditem_alde1.txt | 10 +++++----- npc/re/quests/woe_te/te_mission_main.txt | 2 +- 7 files changed, 28 insertions(+), 15 deletions(-) diff --git a/db/re/quest_db.txt b/db/re/quest_db.txt index 6d9238fbae..d830025890 100644 --- a/db/re/quest_db.txt +++ b/db/re/quest_db.txt @@ -1368,7 +1368,7 @@ 7494,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Cleanup of the mushroom farm" // WOE TE Mission -7501,14400,2451,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Suspicious Babe 1" +7501,14400,2451,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"1 Suspicious Babe" 7502,14400,2451,10,0,0,0,0,0,0,0,0,0,0,0,0,0,"10 Suspicious Babes" 7503,14400,2451,30,0,0,0,0,0,0,0,0,0,0,0,0,0,"30 Suspicious Babes" 7504,14400,1288,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Destroy 1 Emperium" diff --git a/doc/mapflags.txt b/doc/mapflags.txt index 7ddbb10e39..db71a66e69 100644 --- a/doc/mapflags.txt +++ b/doc/mapflags.txt @@ -277,7 +277,7 @@ Enables Guild vs. Guild mode on a map and applies the corresponding damage adjus *gvg_te *gvg_te_castle -Used to determines map is WOE:TE area. Special restrictions are apllied. +Used to determines map is WOE:TE area. Special restrictions are applied. --------------------------------------- diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 5c8b12a6e9..f51a50b37c 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -6640,6 +6640,20 @@ even though WoE itself may or may not actually be in effect. --------------------------------------- +*gvgon3 ""; +*gvgoff3 ""; + +Theses commands behave identically to gvgon/gvgoff, but apply GVG_TE mapflag. + +--------------------------------------- + +*canParticipateSiegeTE {}; + +Return 1 if player can participate in WOE:TE, 0 otherwise. +Currently third class, Kagerou/Oboro and Rebellion class can't participate in WOE:TE. + +--------------------------------------- + *flagemblem ; This command only works when run by the NPC objects which have sprite id 722, @@ -6690,7 +6704,7 @@ Type indicates what information to return: This command will return the relation between 2 guilds. -NOTE: This should be use in collaboration with 'requestguildinfo' as the +NOTE: This should be used in collaboration with 'requestguildinfo' as the map-server needs to request for information from the char-server. Return values: diff --git a/npc/re/merchants/te_merchant.txt b/npc/re/merchants/te_merchant.txt index 1f47e74c67..95ae1542d6 100644 --- a/npc/re/merchants/te_merchant.txt +++ b/npc/re/merchants/te_merchant.txt @@ -3,6 +3,7 @@ //===== Description: ========================================= //= [Official Conversion] //= Merchants and Rental merchant template for WoE TE +// (duplicates in re/woe_te/). //===== Changelogs: ========================================== //= 1.0 First Version. [Capuche] //============================================================ @@ -129,16 +130,14 @@ S_Rent: if (.@s <= .@total_item) { .@index = .@s *2 +1; mes "[Rental Items Manager]"; - if (countitem(getarg(.@index)) > 0) { + if (countitem(getarg(.@index)) > 0) mes "You already have "+ getarg(.@index+1) +"."; - mes "Do you need anything else?"; - } else { mes "Here is "+ getarg(.@index+1) +"."; mes "^4d4dffThis item is effective for the next 24 hours^000000 and after that it expires."; - mes "Do you need anything else?"; rentitem getarg(.@index),86400; } + mes "Do you need anything else?"; next; } return; diff --git a/npc/re/other/Global_Functions.txt b/npc/re/other/Global_Functions.txt index c9ebd24c0e..c4778c9b84 100644 --- a/npc/re/other/Global_Functions.txt +++ b/npc/re/other/Global_Functions.txt @@ -4,8 +4,8 @@ //===== Description: ========================================= //= General script functions. //===== Changelogs: ========================================== -//= 1.0 Added WoeTECheckHour(X) function to check if the woe -// will start in X hour. [Capuche] +//= 1.0 WoeTECheckHour(X) function check if the woe +// will start in X seconds. [Capuche] //============================================================ // WoeTETimeStart() : return 1 if the woe te will start in less than X seconds, 0 otherwise diff --git a/npc/re/quests/woe_te/te_goditem_alde1.txt b/npc/re/quests/woe_te/te_goditem_alde1.txt index 9cf731d874..1373240175 100644 --- a/npc/re/quests/woe_te/te_goditem_alde1.txt +++ b/npc/re/quests/woe_te/te_goditem_alde1.txt @@ -43,14 +43,14 @@ te_aldecas1,226,34,3 script Blacksmith Cano#tegod01 4_M_RACHMAN1,{ mes "I hope I can find that way here."; close; } - if ($@2012_tegod_kafra == 0) { + if ($@2012_tegod_kafra == 0) {// quest status mes "Ah... Master."; mes "I feel so thankful all the time."; mes "Since I owe you big time, I'll help you with anything anytime."; next; switch( select( "Make Jormungand.","Fuse materials.","Relax." ) ) { case 1: - if (.@economy > 29) {// economy + if (.@economy > 29) { if (countitem(6603) > 3 && countitem(6599) > 0 && countitem(6598) > 0 && countitem(6601) > 3 && countitem(6600) > 0 && countitem(6605) > 0 && countitem(6604) > 0 && countitem(1473) > 0) { mes "^ff0000Wizardry staff is needed in the process of making Jormungand."; mes "You should not possess any other items except for Wizardry Staffs in order to proceed with the quest.^ff0000"; @@ -369,7 +369,7 @@ S_Fuse: } OnInit: - if ($@2012_tegod_kafra == 3 || agitcheck3()) + if ($@2012_tegod_kafra == 3 || agitcheck3())// 3 -> quest failed disablenpc strnpcinfo(0); else enablenpc strnpcinfo(0); @@ -498,7 +498,7 @@ OnTimer4210000: OnTimer4220000: mapannounce "te_aldecas1","Aira: Ah! I can't take it anymore! Girls, come here!",bc_map,"0x00ff00",FW_NORMAL,12; - $@2012_tegod_kafra = 3;// event off until someone break the emp + $@2012_tegod_kafra = 3;// quest off until someone break the emp callsub S_EventReset; enablenpc "aldeg-1-11_aldeg-1-15#te"; end; @@ -599,7 +599,7 @@ S_MobRedondant: end; OnInit: - $@2012_tegirls_alde01 = 0; + $@2012_tegirls_alde01 = 0;// mob killed count if ($@2012_tegod_kafra < 3) $@2012_tegod_kafra = 0; OnMyMobDead: diff --git a/npc/re/quests/woe_te/te_mission_main.txt b/npc/re/quests/woe_te/te_mission_main.txt index 6347cc59c0..58d818361d 100644 --- a/npc/re/quests/woe_te/te_mission_main.txt +++ b/npc/re/quests/woe_te/te_mission_main.txt @@ -7,7 +7,7 @@ //= 1.0 First Version. [Capuche] //============================================================ -// call duplicate of pop_mission_TE npc to spawn the mobs mission +// This npc call the duplicate of pop_mission_TE npc in order to spawn the mobs mission. - script #popswitch -1,{ OnInit: if (strnpcinfo(4) == "") end; From 292098d9116158f6d95d7deeb97ad601af54b8e7 Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Sat, 12 Mar 2016 06:29:30 +0700 Subject: [PATCH 3/3] Documentation update for * `canParticipateSiegeTE` script Signed-off-by: Cydh Ramdh --- doc/script_commands.txt | 8 ++++++++ src/map/pc.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index f51a50b37c..6f059a225a 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -4126,6 +4126,14 @@ job (for example, if you try to get the baby version of a Taekwon class). --------------------------------------- +*canParticipateSiegeTE([]); + +Returns 1 if player is allowed to participate in Siege/WOE TE. +Player with 3rd classes, Kagerou/Oboro, and Rebellion cannot participate, +the return value is 0. + +--------------------------------------- + *changebase {,}; This command will change a character's appearance to that of the specified job diff --git a/src/map/pc.c b/src/map/pc.c index 7960bc8f87..54da608493 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -11895,7 +11895,7 @@ void pc_show_questinfo_reinit(struct map_session_data *sd) { /** * Check if player can participate in WOE:TE - * @param sd + * @param mapid Player's class @see enum e_mapid * @return True:If allowed, False:Doesn't **/ bool pc_canParticipateSiegeTE(uint32 mapid) {