From The Mana World

WARNING: This patch is part of a collection of very beta patches.

From ce9a0fb4da6b69300868e8c5be8f903230664187 Mon Sep 17 00:00:00 2001
From: Freeyorp <Freeyorp101@NOSPAM@hotmail.com>
Date: Fri, 17 Jul 2009 15:44:14 +1200
Subject: [PATCH] Make Alan hand out the make-terranite-arrows spell.

Also fixes some typos in Alans Dialogue.
---
 npc/009-2_Hurnscald/alan.txt |  169 ++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 163 insertions(+), 6 deletions(-)

diff --git a/npc/009-2_Hurnscald/alan.txt b/npc/009-2_Hurnscald/alan.txt
index 6dc9da6..5a89e0a 100644
--- a/npc/009-2_Hurnscald/alan.txt
+++ b/npc/009-2_Hurnscald/alan.txt
@@ -14,11 +14,13 @@
 
         set @Q_status, ((QUEST_Forestbow_state) & @Q_MASK) >> @Q_SHIFT;
 
+	set @has_magic, getskilllv(SKILL_MAGIC);
+
 	if (@Q_status == 1) goto L_State_1;
 	if (@Q_status == 2) goto L_State_2;
 	if (@Q_status == 3) goto L_State_3;
 	if (@Q_status == 4) goto L_State_4;
-	if (@Q_status == 5) goto L_State_5;
+	if (@Q_status > 4) goto L_State_5;
 	
 	mes "[Alan]";
 	mes "\"When you want to buy something then please speak to my apprentice. I am only doing special requests.\"";
@@ -152,7 +154,7 @@ L_State_3_success:
 	mes "Alan tries as hard as he can but the log won't bend.";
 	next;
 	mes "[Alan]";
-	mes "\"Aaah! Yes! That is a really fine piece of wood you bought me. It will make an excelent bow!\"";
+	mes "\"Aaah! Yes! That is a really fine piece of wood you bought me. It will make an excellent bow!\"";
 	next;
 	set @Q_status, 4;
         callsub S_Update_Var;
@@ -196,13 +198,19 @@ L_State_4_TooMany:
 
 L_State_5:
 	mes "[Alan]";
-	mes "\"I hope you are statisfied with your forest bow. It is one of my best works.\"";
-	next;
+	mes "\"I hope you are satisfied with your forest bow. It is one of my best works.\"";
+
+	if (@Q_status == 6)
+		close;
 
+	next;
 	if (Inspector == 1)
-		menu
-			"I am!", -,
+		menu	"I am!", -,
+			"Can you make some really good arrows?", L_Special_Arrows_0,
 			"Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
+	if (Inspector != 1)
+		menu	"I am!", -,
+			"Can you make some really good arrows?", L_Special_Arrows_0;
 	close;
 
 L_NohMask_Answer:
@@ -210,6 +218,155 @@ L_NohMask_Answer:
 	mes "\"No.\"";
 	close;
 
+L_Special_Arrows_0:
+	mes "[Alan]";
+	mes "\"The best arrows I can offer are the Iron tipped arrows; my apprentice will be happy to sell them.\"";
+	mes "\"Although...\"";
+	mes "He hesitates.";
+	next;
+	menu
+		"Ah, I'll talk to you apprentice then.", -,
+		"Hmm, never mind.", -,
+		"Oh?", L_Special_Arrows_1;
+	close;
+
+L_Special_Arrows_1:
+	mes "[Alan]";
+	mes "\"Well... I have seen something special, though the way they were made... isn't really in my line of work.\"";
+	next;
+	menu
+		"Never mind then...", -,
+		"Do you know of someone who is?", L_Special_Arrows_Who,
+		"What happened?", L_Special_Arrows_explain;
+	close;
+
+L_Special_Arrows_Who:
+	mes "[Alan]";
+	mes "\"There have been some new people around a lot lately; perhaps you could find someone better learned in the ways of magic to help you.\"";
+	next;
+	menu
+		"Magic!?", -,
+		"You're sure you can't help?", -,
+		"What happened?", L_Special_Arrows_explain;
+	mes "\"Yes...\"";
+	mes "\"Of course, magic is a mystery to me, I've never done any of that myself... so I won't be able to help much there...\"";
+	next;
+	menu
+		"Hmm...", -,
+		"Oh, okay then...", -,
+		"What happened?", L_Special_Arrows_explain;
+	close;
+
+L_Special_Arrows_explain:
+	mes "[Alan]";
+	mes "\"A while ago... there was this Wizard in town. Seems like he had everything in his pockets, a right colorful guy. He'd just stopped here to stay the night in the inn. Some people were curious, but I had work to do.\"";
+	mes "";
+	mes "He pauses, looking thoughtfully into the distance as he remembers.";
+	next;
+
+	mes "[Alan]";
+	mes "\"I went about my business as usual, and that evening was uneventful for me. However...\"";
+	next;
+
+	mes "[Alan]";
+	mes "\"The next day, he came into my shop. I did wonder if he came to ask about my forest bows; lots of people have wanted to ask me about those recently, you know. But no... he wanted to ask about arrows, much like you did, just now.\"";
+	mes "";
+	mes "He pauses again, and briefly looks back at you for a moment before continuing his tale.";
+	next;
+
+	mes "[Alan]";
+	mes "\"He bought fifty of my best iron arrows from my apprentice, then called me over to look.\"";
+	mes "\"He held them in his hand, muttered a word over them, and they all started to glow with this bright orange color.\"";
+	mes "";
+	mes "\"Now, normally this would be surprising enough on its own, but for what happened next...\"";
+	next;
+
+	mes "[Alan]";
+	mes "He looks around, then continues excitedly.";
+	mes "";
+	mes "\"His eyes never left the glowing bundle tied up in his hand. With his free hand, he reached in and pulled out some glowing shining object from his pocket, and then, suddenly, with a bright yellow flash, it fused with my arrows!\"";
+	next;
+
+	mes "[Alan]";
+	mes "\"When I'd recovered from the flash - I'd never seen anything so bright, it was like a glimpse into the sun! - there were seven arrows left in his hand, out of the fifty he had held there just moments before. But they were longer, they were unnaturally sharp, and it seems like they were glowing, just slightly, a shadow of the brilliance that had surrounded them before.\"";
+	next;
+
+	mes "[Alan]";
+	mes "\"He was smiling happily at the arrows that he had made. He murmured something like 'finally got it right', then turned to leave, but stopped, and offered me five of the arrows he had just made.\"";
+	mes "";
+	mes "\"I was surprised, at the time. He had paid for them, and he'd paid me for them, no less. But I had never seen anything like them, and I wasn't going to turn him down, he seemed truly happy.\"";
+	next;
+
+	mes "[Alan]";
+	mes "He continues, in a quieter voice.";
+	mes "";
+	mes "\"Now... those special arrows. I tried one the next day; I'd never seen anything so powerful. They were very sharp. Now, not to say that our iron arrows weren't sharp, of course, but these things were... unnaturally so. And they seemed to have a mind of their own! Seems that they knew the weak spots on a monster, and it was as if they would change direction midair, ever so slightly, in order to hit them!\"";
+	next;
+
+	mes "[Alan]";
+	mes "He stops briefly, then continues with a hint of sadness in his voice.";
+	mes "";
+	mes "\"I never got around to thanking him for them. By the time I found out their power, the next day, he had already left over the sea for the next town.\"";
+	mes "";
+	mes "\"Of course, back then, the dock was still up, and the ferry still came regularly.\"";
+	mes "";
+	next;
+
+	mes "[Alan]";
+	mes "He pauses again, then turns to face you directly.";
+	mes "";
+	mes "\"I'm sorry that I can't help much there, I haven't dealt with magic myself, and I don't really know anyone who has.\"";
+	next;
+
+	menu
+		"Ah, don't worry about it.", -,
+		"Zzzz..... wait, it's over?", L_Story_Sleep,
+		"Can you remember what he said over the arrows?", L_Get_Special_Arrow_Spell;
+	close;
+
+L_Story_Sleep:
+	mes "[Alan]";
+	mes "He looks at you, surprised.";
+	close;
+
+L_Get_Special_Arrow_Spell:
+	mes "[Alan]";
+	mes "He steps back as a thought strikes him.";
+	mes "";
+	mes "\"Actually... aha, I think I can help you there. One moment...\"";
+	mes "";
+	mes "He disappears out the back.";
+	next;
+
+	mes "After a while, he returns, holding an old note.";
+	mes "\"What he said really stuck in my mind somehow. I got this strange urge to write it down, and I don't buy into any of that magic stuff usually. I suggest you do the same, there's no guarantee that I'll be able to find it again, in fact, it's lucky that I was able to find it at all...\"";
+	mes "";
+	mes "\"But here...";
+	if (@has_magic)
+		mes "...maybe you can make use of it.\"";
+	if (!@has_magic)
+		mes "...maybe you can find someone that can make use of it.\"";
+	next;
+
+	mes "He shows you the note. It is badly crumpled and yellowed, but in the middle, you can just make out a scribbled word: '" + getspellinvocation("make-terranite-arrows") + "'.";
+	set @Q_status, 6;
+	callsub S_Update_Var;
+	next;
+
+	mes "[Alan]";
+	mes "He takes the note back, then smiles.";
+	mes "";
+	mes "\"There, I had something after all... I hope you find it useful!\"";
+	next;
+
+	menu
+		"Thank you, I surely will!", -,
+		"Goodbye!", -;
+
+	mes "[Alan]";
+	mes "\"Farewell.\"";
+	close;
+
 S_Update_Var:
         set QUEST_Forestbow_state,
         	(QUEST_Forestbow_state & ~(@Q_MASK)
-- 
1.6.0.4