summaryrefslogtreecommitdiff
path: root/npc/009-2_Hurnscald/wyara.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/009-2_Hurnscald/wyara.txt')
-rw-r--r--npc/009-2_Hurnscald/wyara.txt135
1 files changed, 66 insertions, 69 deletions
diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt
index 89f2ea3f..d38bf04d 100644
--- a/npc/009-2_Hurnscald/wyara.txt
+++ b/npc/009-2_Hurnscald/wyara.txt
@@ -1,14 +1,39 @@
function script PurificationPotion {
- announce "Meh.", 7;
+ set @STATUS_PURIFY_ONCE, 2;
+ set @STATUS_PURIFY_TWICE, 3;
+
+ set @PURIFICATIONPOTION, 733;
+
+ if (isat("011-1.gat", 88,67))
+ goto L_correct;
+ announce "This doesn't seem to be the right place.", 7;
+ getitem @PURIFICATIONPOTION, 1;
+ close;
+L_correct:
+ set @Q_MASK, NIBBLE_2_MASK;
+ set @Q_SHIFT, NIBBLE_2_SHIFT;
+ set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT;
+
+ if (@Q_status == @STATUS_PURIFY_ONCE)
+ set @Q_status, @STATUS_PURIFY_TWICE;
+ if (@Q_status < @STATUS_PURIFY_ONCE)
+ set @Q_status, @STATUS_PURIFY_ONCE;
+
+ announce "You pour the potion into the pond.", 7;
+
+ set QUEST_MAGIC2,
+ (QUEST_MAGIC2 & ~(@Q_MASK)
+ | (@Q_status << @Q_SHIFT));
+ return;
}
// ----------------------------------------
// Wyara the Hurnscald witch
// ----------------------------------------
009-2.gat,121,26,0 script Wyara#_M 103,{
- set @Q_MASK, NIBBLE_7_MASK;
- set @Q_SHIFT, NIBBLE_7_SHIFT;
- set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT;
+ set @Q_MASK, NIBBLE_2_MASK;
+ set @Q_SHIFT, NIBBLE_2_SHIFT;
+ set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT;
set @STATUS_INITIAL, 0;
set @STATUS_PURIFY_EXPLAINED, 1;
@@ -23,9 +48,12 @@ function script PurificationPotion {
set @has_magic, getskilllv(SKILL_MAGIC);
- mes "[Wyara the Witch]";
- mes "The witch waves you in.";
- mes "\"Hello and welcome! Can I interested you in some potions?\"";
+
+ mes "[Wyara the witch]";
+ if (!Sex)
+ mes "\"Greetings, fair traveller! What can I do for you?\"";
+ if (Sex)
+ mes "\"Hello! What brings you here?\"";
next;
set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_WYARA;
@@ -43,64 +71,9 @@ L_Shop:
close;
L_Question:
- set @QQ_ELANORE, 1;
- set @QQ_MANASEED, 2;
- set @QQ_MANAPOTION, 3;
- set @QQ_SAGATHA, 4;
- set @QQ_AULDSBEL, 5;
-
- setarray @choice$, "", "", "", "", "", "";
- set @choices_nr, 0;
- setarray @choice_idx, 0, 0, 0, 0, 0, 0;
-
- set @choice$[@choices_nr], "...Elanore the Healer?";
- set @choice_idx[@choices_nr], @QQ_ELANORE;
- set @choices_nr, @choices_nr + 1;
-
- if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR)))
- goto L_Q_post_manaseed;
- set @choice$[@choices_nr], "...the Mana Seed?";
- set @choice_idx[@choices_nr], @QQ_MANASEED;
- set @choices_nr, @choices_nr + 1;
-L_Q_post_manaseed:
-
- if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION))
- goto L_Q_post_manapotion;
- set @choice$[@choices_nr], "...Mana Potions?";
- set @choice_idx[@choices_nr], @QQ_MANAPOTION;
- set @choices_nr, @choices_nr + 1;
-L_Q_post_manapotion:
-
- if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA))
- goto L_Q_post_sagatha;
- set @choice$[@choices_nr], "...Sagatha the Witch?";
- set @choice_idx[@choices_nr], @QQ_SAGATHA;
- set @choices_nr, @choices_nr + 1;
-L_Q_post_sagatha:
-
- if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL))
- goto L_Q_post_auldsbel;
- set @choice$[@choices_nr], "...Auldsbel the Wizard?";
- set @choice_idx[@choices_nr], @QQ_AULDSBEL;
- set @choices_nr, @choices_nr + 1;
-L_Q_post_auldsbel:
-
- set @choice$[@choices_nr], "...never mind.";
- set @choice_idx[@choices_nr], 0;
- set @choices_nr, @choices_nr + 1;
-
- menu @choice$[0], -,
- @choice$[1], -,
- @choice$[2], -,
- @choice$[3], -,
- @choice$[4], -;
-
- set @menu, @menu - 1;
-
- if (@menu >= @choices_nr)
- set @menu, 0;
-
- set @c, @choice_idx[@menu];
+ callfunc "MagicTalkOptionsSetup";
+ set @ignore, @QQ_WYARA;
+ callfunc "MagictalkMenu";
if (@c == 0) goto L_Main;
if (@c == @QQ_ELANORE) goto L_Q_elanore;
@@ -108,7 +81,25 @@ L_Q_post_auldsbel:
if (@c == @QQ_MANAPOTION) goto L_Q_manapotion;
if (@c == @QQ_SAGATHA) goto L_Q_sagatha;
if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel;
- close;
+ if (@c == @QQ_IMP) goto L_Q_imp;
+ if (@c == @QQ_OLDWIZ) goto L_Q_old_wizard;
+
+ mes "[Wyara the Witch]";
+ mes "\"I fear that I can't help you with that.\"";
+ next;
+ goto L_Main;
+
+
+L_Q_old_wizard:
+ mes "[Wyara the Witch]";
+ mes "\"I don't know his name, but I do know that he has been living in the mountains since I first came here. He is a master of many schools of magic, I believe.\"";
+ next;
+ mes "[Wyara the Witch]";
+ mes "She smiles.";
+ mes "\"He is also a nice and friendly person to talk to, and quite knowledgeable about the teas of this area.\"";
+ next;
+ goto L_Main;
+
L_Q_elanore:
mes "[Wyara the Witch]";
@@ -172,6 +163,12 @@ L_make_manapotion_lack:
goto L_Main;
+L_Q_imp:
+ mes "[Wyara the Witch]";
+ mes "\"Sagatha told me that she imprisoned an evil earth spirit in a dried-up well. She wants it to stay there until it has mended its ways, or forever, if it doesn't.\"";
+ next;
+ goto L_main_menu;
+
L_Q_sagatha:
mes "[Wyara the Witch]";
mes "Wyara smiles.";
@@ -223,7 +220,7 @@ L_Magic_explain:
next;
mes "[Wyara the Witch]";
- mes "\"There are different kinds of magic, too; nature, ether, and so on, but if this interest you, you should talk to a scholar.\"";
+ mes "\"There are different kinds of magic, too; nature, ether, and so on, but if this interests you, you should talk to a scholar.\"";
next;
goto L_Magic_main;
@@ -544,8 +541,8 @@ L_Magic_train_sagatha_fail:
goto L_Magic_main;
S_update_var:
- set QUEST_MAGIC,
- (QUEST_MAGIC & ~(@Q_MASK)
+ set QUEST_MAGIC2,
+ (QUEST_MAGIC2 & ~(@Q_MASK)
| (@Q_status << @Q_SHIFT));
return;
}