Browse Source

Fixed EndlessTower.txt : officially a player can't enter in endless tower if he has changed party and he already entered in the instance with his previous party. Thanks to RagEmu/Renewal@73ec00faa5639af473e4ba9bca5df260d73aeb1e

Fixed potential quest warning in SealedShrine.txt and quests/quests_13_1.txt
Atemo 9 years ago
parent
commit
109b30dd51
3 changed files with 50 additions and 36 deletions
  1. 32 29
      npc/instances/EndlessTower.txt
  2. 12 3
      npc/instances/SealedShrine.txt
  3. 6 4
      npc/quests/quests_13_1.txt

+ 32 - 29
npc/instances/EndlessTower.txt

@@ -214,7 +214,8 @@ e_tower,81,105,0	script	Tower Protection Stone	406,{
 		mes "Make or join a party with more than 1 member and try again.";
 		close;
 	}
-	if (.@etower_timer == -1) {
+	switch(.@etower_timer) {
+	case -1:
 		if (getcharid(0) == getpartyleader(.@party_id,2)) {
 			mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
 			next;
@@ -251,38 +252,39 @@ e_tower,81,105,0	script	Tower Protection Stone	406,{
 		case 3:
 			end;
 		}
-	} else if ((.@etower_timer >= 0) && (.@etower_timer2 < 2)) {
-		mes "If you have the dungeon generated already, you can enter it. ";
-		next;
-		switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
-		case 1:
-			callsub L_Enter,0,0;
-		case 2:
-			mes "I will move you to Alberta.";
+	case 0:
+	case 1:
+		if (.@etower_timer2 < 2 && getcharid(1) == etower_partyid) {
+			mes "If you have the dungeon generated already, you can enter it. ";
+			next;
+			switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
+			case 1:
+				callsub L_Enter,0,0;
+			case 2:
+				mes "I will move you to Alberta.";
+				close2;
+				warp "alberta",223,36;
+				end;
+			case 3:
+				close;
+			}
+		} else {
+			set .@dun_lim_time,etower_timer+604800; // 1 week
+			// set .@dun_lim_time2,etower_timer+14400; // 4 hours
+			set .@dun_cur_time,gettimetick(2);
+			set .@dun_ent_t,(.@dun_lim_time - .@dun_cur_time);
+			set .@dun_h,(.@dun_ent_t / 3600);
+			set .@dun_m,(.@dun_ent_t - (.@dun_h * 3600)) / 60;
+			set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
+
+			mes "Due to the tower's aftereffects, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
+			next;
+			mes "It is dangerous here. Let me move you to Alberta.";
 			close2;
 			warp "alberta",223,36;
 			end;
-		case 3:
-			break;
 		}
-		close;
-	} else if ((.@etower_timer >= 0) && (.@etower_timer < 2) && (.@etower_timer2 == 2)) {
-
-		set .@dun_lim_time,etower_timer+604800; // 1 week
-		set .@dun_lim_time2,etower_timer+14400; // 4 hours
-		set .@dun_cur_time,gettimetick(2);
-		set .@dun_ent_t,(.@dun_lim_time - .@dun_cur_time);
-		set .@dun_h,(.@dun_ent_t / 3600);
-		set .@dun_m,(.@dun_ent_t - (.@dun_h * 3600)) / 60;
-		set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
-
-		mes "Due to the tower's aftereffects, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
-		next;
-		mes "It is dangerous here. Let me move you to Alberta.";
-		close2;
-		warp "alberta",223,36;
-		end;
-	} else {
+	case 2:
 		set etower_timer,0;
 		erasequest 60200;
 		erasequest 60201;
@@ -306,6 +308,7 @@ L_Enter:
 		mapannounce "e_tower", strcharinfo(0) +" of the party, "+ getpartyname( getcharid(1) ) +", is entering the dungeon, Endless Tower.",bc_map,"0x00ff99",FW_NORMAL,12;
 		if (getarg(1)) {
 			set etower_timer,gettimetick(2);
+			set etower_partyid, getcharid(1);
 			setquest 60200;
 			setquest 60201;
 		}

+ 12 - 3
npc/instances/SealedShrine.txt

@@ -339,7 +339,10 @@ prt_monk,261,91,3	script	Rust Blackhand#edq	826,{
 				next;
 				mes "[Rust Blackhand]";
 				mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.";
-				changequest 3042,3043;
+				if (isbegin_quest(3042))
+					changequest 3042,3043;
+				else
+					setquest 3043;
 				close;
 			case 2:
 				mes "[Rust Blackhand]";
@@ -395,7 +398,12 @@ prt_monk,261,91,3	script	Rust Blackhand#edq	826,{
 				mes "[Rust Blackhand]";
 				mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.";
 				//recall_completequest 3043
-				changequest 3042,3043;
+				if (isbegin_quest(3042))
+					changequest 3042,3043;
+				else {
+					erasequest 3043;
+					setquest 3043;
+				}
 				close;
 			case 2:
 				mes "[Rust Blackhand]";
@@ -1229,7 +1237,8 @@ OnMyMobDead:
 	set .@map$, instance_mapname("2@cata");
 	if (mobcount(.@map$,instance_npcname("control_baphomet")+"::OnMyMobDead") < 1) {
 		set 'ins_baphomet,7;
-		erasequest 3041;
+		if (isbeginquest(3041))
+			erasequest 3041;
 		mapannounce .@map$, "Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!...",bc_map,"0xdb7093";
 		enablenpc instance_npcname("Ancient Hero's Soul#2F");
 		disablenpc instance_npcname("slave_down");

+ 6 - 4
npc/quests/quests_13_1.txt

@@ -1731,7 +1731,8 @@ moc_fild22b,230,197,5	script	Munkenro#2	967,{
 			mes "Ok, just have a good adventure.";
 			next;
 			set ep13_ryu,22;
-			changequest 10077,10078; 
+			if (isbegin_quest(10077) == 1)
+				changequest 10077,10078; 
 			donpcevent "Head of the Alliance#moo::OnEnable"; 
 			mes "[Munkenro]";
 			mes "If you are too late,";
@@ -9651,8 +9652,10 @@ mid_campin,94,118,3	script	Staff Officer Abidal	755,{
 				delitem 11016,1; //Expedition_Report_Vol4
 				getitem 11012,1; //Expedition_Report
 				set ep13_1_edq,8;
-				erasequest 3090;
-				erasequest 3091;
+				if (isbegin_quest(3090) > 0)
+					erasequest 3090;
+				if (isbegin_quest(3091) > 0)
+					erasequest 3091;
 				setquest 3092;
 				mes "[Staff Officer Abidal]";
 				mes "I'm glad that we were able to make this again. Please bring this report to the commander.";
@@ -10105,7 +10108,6 @@ man_fild01,315,95,3	script	Expedition Scout#1	707,{
 				}
 				if (.@playtime == -1) {
 					changequest 3090,3091;
-					erasequest 3090;
 				} else
 					erasequest 3091;
 				setquest 3091;