Browse Source

Script bug fixes.
- Added Renewal location for "Knight De Thomas" NPC (previously inaccessible), and upgraded the script to the latest version.
- Fixed Pre-Renewal Merchant Quest questlog commands. (bugreport:9218)
http://rathena.org/board/tracker/issue-9218-merchant-quest-add-error-quest-add-1010/
- Corrected a handful of 'rand(1)' statements.

Signed-off-by: Euphy <euphy.raliel@rathena.org>

Euphy 10 years ago
parent
commit
17bace0ae6

+ 4 - 2
npc/jobs/2-1/hunter.txt

@@ -1259,9 +1259,11 @@ OnTouch:
 	set HNTR_Q,16;
 	changequest 4011,4012;
 	savepoint "payon",104,99;
-	if (rand(1))
+	if (rand(2))
 		warp "payon_in02",21,27;
-	warp "payon_in03",128,7;
+	else
+		warp "payon_in03",128,7;
+	end;
 }
 
 // Hunter Job test traps.

+ 1 - 1
npc/jobs/2-1/wizard.txt

@@ -157,7 +157,7 @@ gef_tower,111,37,4	script	Wizard Guildsman	70,{
 				set wizard_m1,rand(1,2);
 				mes "[Catherine]";
 				mes "The items you must collect are...";
-				if (rand(1)) {
+				if (rand(2)) {
 					set WIZ_Q,1;
 					setquest 9013;
 					mes "^3355FFRed Gemstone^000000 10 each,";

+ 10 - 18
npc/pre-re/jobs/1-1/merchant.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= kobra_k88; L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 2.3
+//= 2.4
 //===== Compatible With: ===================================== 
 //= rAthena Project
 //===== Description: ========================================= 
@@ -28,6 +28,7 @@
 //= 2.1 Fixed mistake in condition check. [L0ne_W0lf]
 //= 2.2 Added Quest Log commands. [L0ne_W0lf]
 //= 2.3 Fixed an issue with completequest by adding checkquest. [Kisuka]
+//= 2.4 Quest log fixes. [Euphy]
 //============================================================ 
 
 alberta_in,53,43,6	script	Merchant#mer	86,{
@@ -198,12 +199,10 @@ alberta_in,53,43,6	script	Merchant#mer	86,{
 			if (job_merchant_q2 == 1) {
 				mes "[Chief Mahnsoo]";
 				mes "Remember, the Serial Number of the package is ^3355FF2485741^000000.";
-				setquest 1009;
 			}
 			else {
 				mes "[Chief Mahnsoo]";
 				mes "Remember, the Serial Number of the package is ^3355FF2328137^000000.";
-				setquest 1009;
 			}
 		}
 		else if (job_merchant_q2 == 3 || job_merchant_q2 == 4) {
@@ -212,12 +211,10 @@ alberta_in,53,43,6	script	Merchant#mer	86,{
 			if (job_merchant_q2 == 3) {
 				mes "[Chief Mahnsoo]";
 				mes "When you get there, give the package to the Mage Guildsman in charge. Remember, the packages Serial Number is ^3355FF2989396^000000.";
-				setquest 1010;
 			}
 			else {
 				mes "[Chief Mahnsoo]";
 				mes "When you get there, give the package to the Mage Guildsman in charge. Remember, the packages Serial Number is ^3355FF2191737^000000.";
-				setquest 1010;
 			}
 		}
 		else if (job_merchant_q2 == 5 || job_merchant_q2 == 6) {
@@ -229,12 +226,10 @@ alberta_in,53,43,6	script	Merchant#mer	86,{
 			if (job_merchant_q2 == 5) {
 				mes "[Chief Mahnsoo]";
 				mes "But he's a little forgetful, so give it to one of his students. Remember, the package's Serial Number is ^3355FF3012685^000000.";
-				setquest 1011;
 			}
 			else {
 				mes "[Chief Mahnsoo]";
 				mes "But he's a little forgetful, give it to one of his students. Remember, the package's Serial Number is ^3355FF3487372^000000.";
-				setquest 1011;
 			}
 		}
 		else if (job_merchant_q2 == 7 || job_merchant_q2 == 8) {
@@ -243,12 +238,10 @@ alberta_in,53,43,6	script	Merchant#mer	86,{
 			if (job_merchant_q2 == 7) {
 				mes "[Chief Mahnsoo]";
 				mes "Remember, the package's Serial Number is ^3355FF3318702^000000.";
-				setquest 1012;
 			}
 			else {
 				mes "[Chief Mahnsoo]";
 				mes "Remember, the package's Serial Number is ^3355FF3543625^000000.";
-				setquest 1012;
 			}
 		}
 		if (job_merchant_q2 == 7 || job_merchant_q2 == 8) {
@@ -402,22 +395,22 @@ alberta_in,53,43,6	script	Merchant#mer	86,{
 				mes "[Chief Mahnsoo]";
 				mes "When you get there, visit the Kafra Employee stationed there. Her name is Blossom. Did you get";
 				mes "all of that?";
-				callsub S_GiveSerial,2485741,1,2328137,2;
+				callsub S_GiveSerial,2485741,1,2328137,2,1009;
 				break;
 			case 2:
 				mes "First, get the delivery package from the storehouse, and then go to the Mage Guild in Geffen. When you get there, visit the Mage Guildsman in charge.";
-				callsub S_GiveSerial,2989396,3,2191737,4;
+				callsub S_GiveSerial,2989396,3,2191737,4,1010;
 				break;
 			case 3:
 				mes "First, get the delivery package from the storehouse, and then go to Morroc. There you must find Java Dullihan, the dyemaker.";
 				next;
 				mes "[Chief Mahnsoo]";
 				mes "He's a bit forgetful, so you should probably give the package to one of his students.";
-				callsub S_GiveSerial,3012685,5,3487372,6;
+				callsub S_GiveSerial,3012685,5,3487372,6,1011;
 				break;
 			case 4:
 				mes "First, get the delivery package from the storehouse, and then give it to the Kafra Employee stationed on Byalan Island.";
-				callsub S_GiveSerial,3318702,7,3543625,8;
+				callsub S_GiveSerial,3318702,7,3543625,8,1012;
 				next;
 				mes "[Chief Mahnsoo]";
 				mes "Ummmm...";
@@ -496,18 +489,17 @@ S_GiveSerial:
 	next;
 	mes "[Chief Mahnsoo]";
 	mes "Remember...";
-	if (rand(1)) {
-		mes "The package's";
-		mes "Serial Number is";
+	mes "The package's";
+	mes "Serial Number is";
+	if (rand(2)) {
 		mes "^3355FF"+getarg(0)+"^000000.";
 		set job_merchant_q2,getarg(1);
 	}
 	else {
-		mes "The package's";
-		mes "Serial Number is";
 		mes "^3355FF"+getarg(2)+"^000000.";
 		set job_merchant_q2,getarg(3);
 	}
+	setquest getarg(4);
 	return;
 }
 

+ 15 - 0
npc/pre-re/quests/skills/swordman_skills.txt

@@ -0,0 +1,15 @@
+//===== rAthena Script =======================================
+//= Swordsman Skills Quests
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena Project
+//===== Description: =========================================
+//= Quests for skills: Mobile HP Recovery
+//===== Additional Comments: =================================
+//= 1.0 Moved Izlude NPC to pre-re/re paths.
+//============================================================
+
+izlude_in,175,130,2	duplicate(KnightDeThomas)	Knight De Thomas	98,4,4

+ 3 - 0
npc/pre-re/scripts_jobs.conf

@@ -12,3 +12,6 @@ npc: npc/pre-re/jobs/1-1/swordman.txt
 npc: npc/pre-re/jobs/1-1/thief.txt
 // - Novice
 npc: npc/pre-re/jobs/novice/novice.txt
+
+// ------------------------ Skill Quests ------------------------
+npc: npc/pre-re/quests/skills/swordman_skills.txt

+ 81 - 82
npc/quests/skills/swordman_skills.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= kobra_k88
 //===== Current Version: =====================================
-//= 1.8
+//= 1.9
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
@@ -13,22 +13,95 @@
 //= 1.6 Rescripted to Aegis 10.3 stadards. [L0ne_W0lf]
 //= 1.7 Updated to latest available official file. [Masao]
 //= 1.8 Fixed JobLevel requirements. [Euphy]
+//= 1.9 Moved Izlude NPC to pre-re/re paths. [Euphy]
+//=     Updated "Knight De Thomas" NPC to latest version.
 //============================================================
 
-izlude_in,175,130,2	script	Knight De Thomas	98,4,4,{
-	if ((BaseClass == Job_Swordman) && (sm_movingrecovery_x < 1)) {
+-	script	::KnightDeThomas	98,4,4,{
+	if ((BaseClass == Job_Swordman) && (JobLevel >= 35 || (BaseJob == Job_Knight || BaseJob == Job_Crusader))) {
+		if (getskilllv("SM_MOVINGRECOVERY") == 1) {
+			mes "[De Thomas]";
+			mes "Oh, it's you?";
+			mes "Long time no see!";
+			mes "You seem healthier than before.";
+			mes "Hahahaha!";
+			mes "Take care! See you again!";
+			close;
+		} else if (countitem(713) >= 200 && countitem(1058) >= 1) {
+			mes "[De Thomas]";
+			mes "Welcome back...";
+			mes "Are you ready to learn Body Movin'?";
+			next;
+			switch (select("Yes.:No, I'm not ready yet.")) {
+			case 1:
+				mes "[De Thomas]";
+				mes "Let's see.....";
+				next;
+				mes "[De Thomas]";
+				mes "Ok! I shall now teach you...";
+				mes "...The Body Movin' skill!";
+				next;
+				delitem 713,200; //Empty_Bottle
+				delitem 1058,1; //Wing_Of_Moth
+				skill "SM_MOVINGRECOVERY",1,0;
+				mes "[De Thomas]";
+				mes "There you go!";
+				mes "Try it yourself.";
+				mes "But don't overdo it.";
+				next;
+				mes "[De Thomas]";
+				mes "Oh yeah, I won't be needing your";
+				mes "armor so you can keep it.";
+				mes "Good luck now!";
+				close;
+			case 2:
+				mes "[De Thomas]";
+				mes "Is that so?";
+				mes "Then come when you are prepared.";
+				close;
+			}
+		} else {
+			mes "[De Thomas]";
+			mes "Hmmm... He's a swordsman...";
+			mes "You know that I am De Thomas Carlos, right?";
+			mes "Knight of Prontera's 3rd Calvary.";
+			mes "De Thomas Carlos!";
+			next;
+			mes "[De Thomas]";
+
+			// bug: official script always states that job level is too low
+			//mes "Wait a second, your Job level isn't above ^00880035^000000!";
+			//mes "Come back when it is.";
+
+			// custom: old dialog
+			mes "You do not have all the items I asked for.";
+			next;
+			mes "[De Thomas]";
+			mes "Remember, I need ^008800200 empty bottles^000000, your armor, and a ^008800Moth Wing^000000. Come back when you have it all.";
+			close;
+		}
+	} else {
+		mes "[De Thomas]";
+		mes "My name is De Thomas Carlos.";
+		mes "Knight of Prontera's 3rd Calvary.";
+		mes "I have a certain duty these days.";
+		mes "Ehem! Need I say more.";
+		close;
+	}
+	end;
+
+OnTouch:
+	if ((BaseClass == Job_Swordman) && (JobLevel >= 35 || (BaseJob == Job_Knight || BaseJob == Job_Crusader))) {
 		mes "[De Thomas]";
 		mes "Oh, no! You must have been hurt! Are you ok?";
 		mes "You must have fought hard to get such serious injuries..";
 		mes "Being a swordsman must come with a lot of responsibility and sacrifice.";
 		next;
 		mes "[De Thomas]";
-		if (Sex == 0) {
+		if (Sex == 0)
 			mes "For these swordsmen and knights, there is a wonderful skill.";
-		}
-		else {
+		else
 			mes "For these swordswomen and knights, there is a wonderful skill young lady.";
-		}
 		mes "I present to you - HP Recovery While Moving!";
 		mes "Body moving is a splendid skill";
 		mes "that allows you to regain strength(HP)";
@@ -66,8 +139,6 @@ izlude_in,175,130,2	script	Knight De Thomas	98,4,4,{
 			mes "Don't you think it is pitiful that I have to stay in once place everyday, not being able to go outside?";
 			mes "Please, find me one...*sniffsniff*";
 			mes "If you don't...";
-			set sm_movingrecovery_x,1;
-			mes "You won't get anything! Muahahaha.";
 			close;
 		case 2:
 			mes "[De Thomas]";
@@ -75,82 +146,10 @@ izlude_in,175,130,2	script	Knight De Thomas	98,4,4,{
 			close;
 		}
 	}
-	else if ((BaseClass == Job_Swordman) && (sm_movingrecovery_x > 1)) {
-		mes "[De Thomas]";
-		mes "Oh, it's you?";
-		mes "Long time no see!";
-		mes "You seem healthier than before.";
-		mes "Hahahaha!";
-		mes "Take care! See you again!";
-		close;
-	}
-	else if ((BaseClass == Job_Swordman) && (sm_movingrecovery_x == 1)) {
-		mes "[De Thomas]";
-		mes "Welcome back...";
-		mes "are you ready to learn Body Movin'?";
-		next;
-		switch (select("Yes.:No, I'm not ready yet.")) {
-		case 1:
-			if ((JobLevel > 34 || (BaseJob == Job_Knight || BaseJob == Job_Crusader)) && (countitem(713) > 199) && (countitem(1058) > 0)) {
-				mes "[De Thomas]";
-				mes "Let's see.....";
-				next;
-				mes "[De Thomas]";
-				mes "Ok! I shall now teach you...";
-				mes "...The Body Movin' skill!";
-				next;
-				delitem 713,200; //Empty_Bottle
-				delitem 1058,1; //Wing_Of_Moth
-				skill "SM_MOVINGRECOVERY",1,0;
-				set sm_movingrecovery_x,2;
-				mes "[De Thomas]";
-				mes "There you go!";
-				mes "Try it yourself.";
-				mes "But don't overdo it.";
-				next;
-				mes "[De Thomas]";
-				mes "Oh yeah, I won't be needing your";
-				mes "armor so you can keep it.";
-				mes "Good luck now!";
-				close;
-			}
-			else if (JobLevel < 35 && (BaseJob != Job_Knight && BaseJob != Job_Crusader)) {
-				mes "[De Thomas]";
-				mes "Wait a second, your Job level isn't above ^00880035^000000!";
-				mes "Come back when it is.";
-				close;
-			}
-			else if ((countitem(713) < 200) || (countitem(1058) < 1)) {
-				mes "[De Thomas]";
-				mes "You do not have all the items I asked for.";
-				next;
-				mes "[De Thomas]";
-				mes "Remember I need, ^008800200 empty bottles^000000, your armor, and a ^008800Moth Wing^000000. Come back when you have it all.";
-				close;
-			}
-			mes "[De Thomas]";
-			mes "You do not have all the items I asked for.";
-			next;
-			mes "[De Thomas]";
-			mes "Remember I need, ^008800200 empty bottles^000000, your armor, and a ^008800Moth Wing^000000. Come back when you have it all.";
-			close;
-		case 2:
-			mes "[De Thomas]";
-			mes "Is that so?";
-			mes "Then come when you are prepared.";
-			close;
-		}
-	}
-	mes "[De Thomas]";
-	mes "My name is De Thomas Carlos.";
-	mes "Knight of Prontera's 3rd Calvary.";
-	mes "I have a certain duty these days.";
-	mes "Ehem! Need I say more.";
-	close;
+	end;
 }
 
 prt_in,75,88,5	script	Leon Von Frich	85,3,3,{
-
 	if ((BaseClass == Job_Swordman) && (JobLevel >= 25 || (BaseJob == Job_Knight || BaseJob == Job_Crusader))) {
 		if (getskilllv("SM_FATALBLOW") == 1) {
 			mes "[Leon]";

+ 3 - 3
npc/re/quests/quests_malaya.txt

@@ -160,7 +160,7 @@ malaya,266,76,3	script	Rodel the Guard#malaya	570,4,4,{
 				getexp 200000,200000;
 				erasequest 7404;
 				setquest 7405;
-				if (rand(1))
+				if (rand(2))
 					$malayaNames$[1] = strcharinfo(0);
 //				SavePPL Jejellopy
 				close;
@@ -711,7 +711,7 @@ malaya,169,350,5	script	Imelda#malaya	475,{
 		else
 			getitem 6497, 1; // Lesser_Agimat
 		getexp 200000,200000;
-		if (rand(1))
+		if (rand(2))
 			$malayaNames$[0] = strcharinfo(0);
 		close;
 	} else {
@@ -817,7 +817,7 @@ malaya,169,350,5	script	Imelda#malaya	475,{
 				else
 					getitem 6497, 1; // Lesser_Agimat
 				getexp 200000,200000;
-				if (rand(1))
+				if (rand(2))
 					$malayaNames$[0] = strcharinfo(0);
 				close;
 			} else {

+ 15 - 0
npc/re/quests/skills/swordman_skills.txt

@@ -0,0 +1,15 @@
+//===== rAthena Script =======================================
+//= Swordsman Skills Quests
+//===== By: ==================================================
+//= Euphy
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena Project
+//===== Description: =========================================
+//= Quests for skills: Mobile HP Recovery
+//===== Additional Comments: =================================
+//= 1.0 Moved Izlude NPC to pre-re/re paths.
+//============================================================
+
+izlude_in,118,175,2	duplicate(KnightDeThomas)	Knight De Thomas	98,4,4

+ 3 - 0
npc/re/scripts_jobs.conf

@@ -32,3 +32,6 @@ npc: npc/re/jobs/novice/novice.txt
 npc: npc/re/jobs/novice/supernovice_ex.txt
 // - Job Repairs
 npc: npc/re/jobs/repair.txt
+
+// ------------------------ Skill Quests ------------------------
+npc: npc/re/quests/skills/swordman_skills.txt