TE Updates

* Implemented `job_noenter_map.txt` for TE maps.
* Added job list that cannot enter TE Castles and Guild Dungeons.
* Replaced `getpermissionwoete` with `jobcanentermap`.
* Added missing quest `7516`.
* Fixed typo in TE Mission NPC.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
This commit is contained in:
Cydh Ramdh 2016-08-31 14:42:49 +07:00
parent 65a90ff84c
commit 0df1ba0a20
11 changed files with 85 additions and 19 deletions

View File

@ -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 <number>' mapflag
// 32 - restricted in zone 1
// 64 - restricted in zone 2

View File

@ -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 <number>' mapflag
// 32 - restricted in zone 1
// 64 - restricted in zone 2

View File

@ -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 <number>' 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

View File

@ -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,""

View File

@ -6716,13 +6716,6 @@ Theses commands behave identically to gvgon/gvgoff, but apply GVG_TE mapflag.
---------------------------------------
*getpermissionwoete({<char id>});
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 <guild id>;
This command only works when run by the NPC objects which have sprite id 722,

View File

@ -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]";

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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) )