diff --git a/db/import-tmpl/job_noenter_map.txt b/db/import-tmpl/job_noenter_map.txt index c9a25607f7..20148796d6 100644 --- a/db/import-tmpl/job_noenter_map.txt +++ b/db/import-tmpl/job_noenter_map.txt @@ -10,6 +10,7 @@ // 2 - restricted in PVP // 4 - restricted in GVG // 8 - restricted in Battlegrounds +// 16 - restricted in WOE:TE castles // Restricted zones - configured by 'restricted ' mapflag // 32 - restricted in zone 1 // 64 - restricted in zone 2 diff --git a/db/pre-re/job_noenter_map.txt b/db/pre-re/job_noenter_map.txt index c9a25607f7..20148796d6 100644 --- a/db/pre-re/job_noenter_map.txt +++ b/db/pre-re/job_noenter_map.txt @@ -10,6 +10,7 @@ // 2 - restricted in PVP // 4 - restricted in GVG // 8 - restricted in Battlegrounds +// 16 - restricted in WOE:TE castles // Restricted zones - configured by 'restricted ' mapflag // 32 - restricted in zone 1 // 64 - restricted in zone 2 diff --git a/db/re/job_noenter_map.txt b/db/re/job_noenter_map.txt index c9a25607f7..2e6539b1ff 100644 --- a/db/re/job_noenter_map.txt +++ b/db/re/job_noenter_map.txt @@ -10,6 +10,7 @@ // 2 - restricted in PVP // 4 - restricted in GVG // 8 - restricted in Battlegrounds +// 16 - restricted in WOE:TE castles // Restricted zones - configured by 'restricted ' mapflag // 32 - restricted in zone 1 // 64 - restricted in zone 2 @@ -25,3 +26,69 @@ // NOTES: // - Restriction will be overwritten for multiple defines with the same Job ID // - The flag is used by 'jobcanentermap' script. + +JOB_RUNE_KNIGHT,4112,100 +JOB_WARLOCK,4112,100 +JOB_RANGER,4112,100 +JOB_ARCH_BISHOP,4112,100 +JOB_MECHANIC,4112,100 +JOB_GUILLOTINE_CROSS,4112,100 + +JOB_RUNE_KNIGHT_T,4112,100 +JOB_WARLOCK_T,4112,100 +JOB_RANGER_T,4112,100 +JOB_ARCH_BISHOP_T,4112,100 +JOB_MECHANIC_T,4112,100 +JOB_GUILLOTINE_CROSS_T,4112,100 + +JOB_ROYAL_GUARD,4112,100 +JOB_SORCERER,4112,100 +JOB_MINSTREL,4112,100 +JOB_WANDERER,4112,100 +JOB_SURA,4112,100 +JOB_GENETIC,4112,100 +JOB_SHADOW_CHASER,4112,100 + +JOB_ROYAL_GUARD_T,4112,100 +JOB_SORCERER_T,4112,100 +JOB_MINSTREL_T,4112,100 +JOB_WANDERER_T,4112,100 +JOB_SURA_T,4112,100 +JOB_GENETIC_T,4112,100 +JOB_SHADOW_CHASER_T,4112,100 + +JOB_RUNE_KNIGHT2,4112,100 +JOB_RUNE_KNIGHT_T2,4112,100 +JOB_ROYAL_GUARD2,4112,100 +JOB_ROYAL_GUARD_T2,4112,100 +JOB_RANGER2,4112,100 +JOB_RANGER_T2,4112,100 +JOB_MECHANIC2,4112,100 +JOB_MECHANIC_T2,4112,100 + +JOB_BABY_RUNE,4112,100 +JOB_BABY_WARLOCK,4112,100 +JOB_BABY_RANGER,4112,100 +JOB_BABY_BISHOP,4112,100 +JOB_BABY_MECHANIC,4112,100 +JOB_BABY_CROSS,4112,100 +JOB_BABY_GUARD,4112,100 +JOB_BABY_SORCERER,4112,100 +JOB_BABY_MINSTREL,4112,100 +JOB_BABY_WANDERER,4112,100 +JOB_BABY_SURA,4112,100 +JOB_BABY_GENETIC,4112,100 +JOB_BABY_CHASER,4112,100 + +JOB_BABY_RUNE2,4112,100 +JOB_BABY_GUARD2,4112,100 +JOB_BABY_RANGER2,4112,100 +JOB_BABY_MECHANIC2,4112,100 + +JOB_SUPER_NOVICE_E,4112,100 +JOB_SUPER_BABY_E,4112,100 + +JOB_KAGEROU,4112,100 +JOB_OBORO,4112,100 + +JOB_REBELLION,4112,100 diff --git a/db/re/quest_db.txt b/db/re/quest_db.txt index 27d63a22d7..9145a1bf0c 100644 --- a/db/re/quest_db.txt +++ b/db/re/quest_db.txt @@ -1383,6 +1383,7 @@ 7513,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"10 Paychecks" 7514,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"20 Paychecks" 7515,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"30 Paychecks" +7516,1200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"A break for Commercial Development" //7619,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"" //7621,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"" diff --git a/doc/script_commands.txt b/doc/script_commands.txt index b40761ce70..edfcb8d152 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -6716,13 +6716,6 @@ Theses commands behave identically to gvgon/gvgoff, but apply GVG_TE mapflag. --------------------------------------- -*getpermissionwoete({}); - -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, diff --git a/npc/re/merchants/te_merchant.txt b/npc/re/merchants/te_merchant.txt index 464dc1358f..60e5aa34d0 100644 --- a/npc/re/merchants/te_merchant.txt +++ b/npc/re/merchants/te_merchant.txt @@ -15,7 +15,7 @@ te_alde_gld,215,184,4 duplicate(TE Potion Merchant#prt) TE Potion Merchant#alde //======================================= - script rental_woe_TE -1,{ mes "[Rental Items Manager]"; - if (getpermissionwoete() == 1) { + if (jobcanentermap("te_prtcas01") == 1) { .@list01$ = "[Shield] [Armor] [Garment]"; .@list02$ = "[Helmet] [Accessory] [Shoes]"; .@list03$ = "[Sword] [Spear] [Axe] [Katar]"; diff --git a/npc/re/quests/woe_te/te_mission_main.txt b/npc/re/quests/woe_te/te_mission_main.txt index 8882c76ae3..3a06a3ec74 100644 --- a/npc/re/quests/woe_te/te_mission_main.txt +++ b/npc/re/quests/woe_te/te_mission_main.txt @@ -160,7 +160,7 @@ S_Coord: 7509,"30 Small Wooden Boxes" ); } mes "["+ .@npc_name$ +"]"; - if (getpermissionwoete() == 0) { + if (jobcanentermap("te_prtcas01") == 0) { mes "Ah... you..."; mes "based on TE rules, I won't be ordering you or asking you favors unfortunately."; next; @@ -242,7 +242,7 @@ S_Coord: mes "I don't understand why "+ .@mob_name$[0] +" appear at that time of the day."; mes "Anyway, good job."; if (.@num_tool_box == 0) { - erasequest 7510; + erasequest .@main_quest; getitem 11558,5;// TE_White_Slim_Potion getexp 5000,2500; close; @@ -514,6 +514,7 @@ S_Cancelquest: mes "You should cancel this mission. I would say it's failed."; next; switch( select( "I would like to go on.","Yes, I'll cancel it." ) ) { + case 1: mes "["+ .@npc_name$ +"]"; mes "I don't think it's worth it. Well, good luck!"; close; diff --git a/npc/re/warps/guildcastles.txt b/npc/re/warps/guildcastles.txt index a5df75f98d..74599f8316 100644 --- a/npc/re/warps/guildcastles.txt +++ b/npc/re/warps/guildcastles.txt @@ -78,16 +78,17 @@ OnTouch: end; S_Warp: - if (getpermissionwoete() == 0) { + .@castle$ = getarg(0); + if (jobcanentermap(.@castle$) == 0) { mes "3rd and expansion job level can't enter in WoE TE."; close; } - .@guild_id = getcastledata(getarg(0),1); + .@guild_id = getcastledata(.@castle$,1); .@my_guild_id = getcharid(2); if (.@guild_id && .@guild_id == .@my_guild_id) { - warp getarg(0),getarg(1),getarg(2); + warp .@castle$,getarg(1),getarg(2); end; } @@ -103,7 +104,7 @@ S_Warp: mes "Welcome alliance guild."; close2; } - warp getarg(0),getarg(1),getarg(2); + warp .@castle$,getarg(1),getarg(2); end; } diff --git a/npc/re/woe_te/main_TE.txt b/npc/re/woe_te/main_TE.txt index 35a932a93a..16fc41d860 100644 --- a/npc/re/woe_te/main_TE.txt +++ b/npc/re/woe_te/main_TE.txt @@ -1041,7 +1041,8 @@ OnTreasureDied: // Flag warp Template //============================================================ function script F_flag_woe_TE { - .@guild_id = getcastledata( getarg(1),1 ); + .@castle$ = getarg(1); + .@guild_id = getcastledata( .@castle$,1 ); if (.@guild_id == 0) { mes "[ Decree of Sacred Kingdom of Rune-Midgarts ]"; mes ""; @@ -1063,7 +1064,7 @@ function script F_flag_woe_TE { mes "Do you wish to return with honor?"; next; if (select( "Return to the fortress.","Forget it." ) == 1) { - if (getpermissionwoete() == 0) { + if (jobcanentermap(.@castle$) == 0) { mes "Tertiary job class and users with expanded levels are not allowed to participate in Siege Battles TE."; close; } diff --git a/src/map/pc.c b/src/map/pc.c index 2ee5c6462a..595a3c3685 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -12227,10 +12227,11 @@ bool pc_job_can_entermap(enum e_job jobid, int m, int group_lv) { if (!job_info[idx].noenter_map.zone || group_lv > job_info[idx].noenter_map.group_lv) return true; - if ((!map_flag_vs(m) && job_info[idx].noenter_map.zone&1) || // Normal + if ((!map_flag_vs2(m) && job_info[idx].noenter_map.zone&1) || // Normal (map[m].flag.pvp && job_info[idx].noenter_map.zone&2) || // PVP - (map_flag_gvg2(m) && job_info[idx].noenter_map.zone&4) || // GVG + (map_flag_gvg2_no_te(m) && job_info[idx].noenter_map.zone&4) || // GVG (map[m].flag.battleground && job_info[idx].noenter_map.zone&8) || // Battleground + (map_flag_gvg2_te(m) && job_info[idx].noenter_map.zone&16) || // WOE:TE (map[m].flag.restricted && job_info[idx].noenter_map.zone&(8*map[m].zone)) // Zone restriction ) return false; diff --git a/src/map/script.c b/src/map/script.c index 76cac0f477..7f6875655d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -21374,7 +21374,6 @@ BUILDIN_FUNC(navigateto){ uint8 flag = NAV_KAFRA_AND_AIRSHIP; bool hideWindow = true; - mapname = script_getstr(st,2); if( script_hasdata(st,3) )