summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/001-1_Tulimshar/bard.txt2
-rw-r--r--npc/001-1_Tulimshar/elanore.txt13
-rw-r--r--npc/001-1_Tulimshar/luca.txt455
-rw-r--r--npc/001-1_Tulimshar/rewards_master.txt84
-rw-r--r--npc/006-1_Desert_mountains/_warps.txt1
-rw-r--r--npc/006-1_Desert_mountains/pachua.txt10
-rw-r--r--npc/009-2_Hurnscald/nurse.txt551
-rw-r--r--npc/009-2_Hurnscald/wyara.txt16
-rw-r--r--npc/011-1_Woodland/auldsbel.txt64
-rw-r--r--npc/013-1_Woodland_hills/sagatha.txt17
-rw-r--r--npc/013-2_Magic_house/wizard.txt53
-rw-r--r--npc/016-1_Woodland/_import.txt1
-rw-r--r--npc/016-1_Woodland/gwendolyn.txt530
-rw-r--r--npc/018-2_Woodland_mining_camp/caul.txt337
-rw-r--r--npc/032-1_Outback/_import.txt4
-rw-r--r--npc/032-1_Outback/_mobs.txt7
-rw-r--r--npc/032-1_Outback/_warps.txt3
-rw-r--r--npc/032-1_Outback/miriam.txt142
-rw-r--r--npc/032-3_Cave/_import.txt3
-rw-r--r--npc/032-3_Cave/_mobs.txt7
-rw-r--r--npc/032-3_Cave/_warps.txt4
-rw-r--r--npc/_import.txt2
-rw-r--r--npc/functions/clear_vars.txt5
-rw-r--r--npc/functions/magic.txt47
24 files changed, 2111 insertions, 247 deletions
diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt
index e7fdd883..9de957e1 100644
--- a/npc/001-1_Tulimshar/bard.txt
+++ b/npc/001-1_Tulimshar/bard.txt
@@ -52,7 +52,7 @@ L_News:
L_Question:
callfunc "MagicTalkOptionsSetup";
- set @ignore, 0;
+ set @ignore, @QQ_ASTRALSOUL;
callfunc "MagicTalkMenu";
if (@c == 0) goto L_Main;
diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt
index 7dea2a32..22f3611e 100644
--- a/npc/001-1_Tulimshar/elanore.txt
+++ b/npc/001-1_Tulimshar/elanore.txt
@@ -125,7 +125,7 @@ Heal_4:
mes "\"Much better, right?!\"";
heal 10000,10000;
close;
-
+
L_NoHeal:
if (MAGIC_FLAGS)
goto L_Chat;
@@ -135,7 +135,7 @@ L_NoHealMessage:
mes "\"I'm sorry but unless you are young and in need, I can't help you, and your level is already higher than ten.";
mes "With so many people still injured from the earthquake, I really have no time to help.";
mes "You can get some rest in the inn near here.\"";
-
+
close;
L_Chat:
@@ -454,7 +454,7 @@ L_3_where:
mes "\"Kadiya and Omar live relatively close by. See this corner in the inner city wall east of here? Turn past it, then go north. It's the second house.\"";
next;
goto L_3_menu;
-
+
L_Teach_Explain3_abort:
mes "[Elanore the Healer]";
mes "\"I'm sorry, but you lack the magical power to advance.\"";
@@ -571,6 +571,7 @@ L_Question:
if (@c == @QQ_SAGATHA) goto L_Q_sagatha;
if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel;
if (@c == @QQ_OLDWIZ) goto L_Q_oldwiz;
+ if (@c == @QQ_ASTRALSOUL)goto L_Q_astralsoul;
mes "[Elanore the Healer]";
mes "Elanore shakes her head.";
@@ -578,6 +579,12 @@ L_Question:
next;
goto L_Main;
+L_Q_astralsoul:
+ mes "[Elanore the Healer]";
+ mes "\"The astral soul skill is one of the most important skills for mages. I learned this focus long time ago. Without that skill your magic is quite useless, isn't it? If the rumors are really true, there is an experienced mage in the Woodlands around Hurnscald.\"";
+ next;
+ goto L_Main;
+
L_Q_oldwiz:
mes "[Elanore the Healer]";
mes "\"He is a kind old man. He stays mostly with his books and his apprentice, though we have chatted a few times.\"";
diff --git a/npc/001-1_Tulimshar/luca.txt b/npc/001-1_Tulimshar/luca.txt
index bc048e65..f019cd7c 100644
--- a/npc/001-1_Tulimshar/luca.txt
+++ b/npc/001-1_Tulimshar/luca.txt
@@ -2,11 +2,13 @@
001-1.gat,108,55,0 script Luca 102,{
-// if (BaseLevel >= 45)
-// goto L_teach_soon;
+ set @EXP_BRAWLING, 2000;
-// if (BaseLevel >= 50)
-// goto L_teach;
+ if (BaseLevel >= 35)
+ goto L_teach;
+
+ if (BaseLevel >= 25)
+ goto L_teach_soon;
mes "[Luca the Hunter]";
mes "\"Ouch! It hurts, this wound I got from battle.\"";
@@ -15,10 +17,10 @@
L_Exp:
mes "[Luca the Hunter]";
- mes "\"I was just coming back from a long journey. I ran into a group of scorpions and started fighting them for experience.\"";
- next;
+ mes "\"I was just coming back from a long journey. I ran into a group of scorpions and started fighting them for experience.\"";
+ next;
mes "[Luca the Hunter]";
- mes "\"Then, out of a cave came a BLACK one! I had NEVER seen it before!\"";
+ mes "\"Then, out of a cave came a BLACK one! I had NEVER seen it before!\"";
next;
mes "[Luca the Hunter]";
mes "\"Luckily i had a camera with me! Here's a picture of it... Let me find it, I put it in my pocket somewhere...\"";
@@ -35,32 +37,32 @@ L_Nev:
L_teach_soon:
mes "[Luca the Hunter]";
- mes "\"You've grown quite a bit stronger since I first saw you, strolling around town like that! You know, if you train a little more, maybe we can help each other out a little?\"";
- close;
+ mes "\"You've grown quite a bit stronger since I first saw you, strolling around town like that! You know, if you train a little more, maybe we can help each other out a little?\"";
+ close;
L_teach:
if (getskilllv(SKILL_POOL))
goto L_teachmore;
mes "[Luca the Hunter]";
- mes "\"Hey there! You've become quite the adventurer, haven't you? I think it's time that someone taught you some basic skills.\"";
- next;
+ mes "\"Hey there! You've become quite the adventurer, haven't you? I think it's time that someone taught you some basic skills.\"";
+ next;
mes "[Luca the Hunter]";
mes "\"If you want, I can help with that!\"";
- next;
- menu
+ next;
+ menu
"Sure, that sounds fun!", -,
"I'm not interested.", L_Nev;
mes "[Luca the Hunter]";
- mes "\"All right! It's not all that easy, though. First you have to learn how to focus. That's because you can learn many skills, but you can't focus on all of them all the time.\"";
- next;
+ mes "\"All right! It's not all that easy, though. First you have to learn how to focus. That's because you can learn many skills, but you can't focus on all of them all the time.\"";
+ next;
mes "[Luca the Hunter]";
- mes "\"When you can do that, you can learn some real skills, and when you know them, you can come back to me to tell me which ones you want to focus on. Deal?\"";
- next;
+ mes "\"When you can do that, you can learn some real skills, and when you know them, you can come back to me to tell me which ones you want to focus on. Deal?\"";
+ next;
- menu
+ menu
"Yeah!", L_teach0_follow,
"Certainly!", L_teach0_follow,
"Wait... what do you mean?", -,
@@ -71,191 +73,344 @@ L_teach:
L_teach0_follow:
mes "[Luca the Hunter]";
- mes "\"Great! Now, before I can give you that skill, I have to make sure that those stories about you are all true and that you really are experienced enough.\"";
- next;
+ mes "\"Great! Now, before I can give you that skill, I have to make sure that those stories about you are all true and that you really are experienced enough.\"";
+ next;
mes "[Luca the Hunter]";
- mes "\"So I'm going to ask you some easy questions.\"";
- next;
+ mes "\"So I'm going to ask you some easy questions.\"";
+ next;
mes "[Luca the Hunter]";
- mes "\"First, who is the man who guards the entrance to the old Tulimshar underground arena?\"";
- next;
- input @anser$;
- if (@answer$ != "Phaet" && @answer$ != "phaet")
- goto L_wronganser;
+ mes "\"First, who is the man who guards the entrance to the old Tulimshar underground arena?\"";
+ next;
+ input @answer$;
+ if (@answer$ != "Phaet" && @answer$ != "phaet")
+ goto L_wronganswer;
mes "[Luca the Hunter]";
- mes "\"Good. Next, what's the name of the pipe-smoker who lives on top of Lore Mountain and makes leathery goods there?\"";
- next;
- input @anser$;
- if (@answer$ != "Pachua" && @answer$ != "pachua")
- goto L_wronganser;
+ mes "\"Good. Next, what's the name of the pipe-smoker who lives on top of Lore Mountain and makes leathery goods there?\"";
+ next;
+ input @answer$;
+ if (@answer$ != "Pachua" && @answer$ != "pachua")
+ goto L_wronganswer;
mes "[Luca the Hunter]";
- mes "\"Great! One more: Who was the adventurer who built Dimond's Cove for Dimond?\"";
- next;
- input @anser$;
- if (@answer$ != "Merlin" && @answer$ != "merlin")
- goto L_wronganser;
+ mes "\"Great! One more: Who was the adventurer who built Dimond's Cove for Dimond?\"";
+ next;
+ input @answer$;
+ if (@answer$ != "Merlin" && @answer$ != "merlin")
+ goto L_wronganswer;
mes "[Luca the Hunter]";
- mes "Luca laughs in excitement.";
- mes "\"All right! You're the real thing, my friend!\"";
- next;
+ mes "Luca laughs in excitement.";
+ mes "\"All right! You're the real thing, my friend!\"";
+ next;
mes "[Luca the Hunter]";
- mes "\"Now stand over there. This should only take a second...\"";
- mes "He takes of a pendant he is wearing and holds it up.";
- next;
+ mes "\"Now stand over there. This should only take a second...\"";
+ mes "He takes of a pendant he is wearing and holds it up.";
+ next;
mes "[Luca the Hunter]";
- mes "\"See that fang at the end of the chain? Keep staring at it at it.\"";
- next;
+ mes "\"See that fang at the end of the chain? Keep staring at it at it.\"";
+ next;
mes "[Luca the Hunter]";
- mes "He starts swinging the pendant back and forth.";
- mes "\"And whatever you do, don't blink. Don't look away, and don't blink.\"";
- next;
+ mes "He starts swinging the pendant back and forth.";
+ mes "\"And whatever you do, don't blink. Don't look away, and don't blink.\"";
+ next;
mes "[Luca the Hunter]";
- mes "The world slows down around you as you focus on the pendant going back...";
- next;
+ mes "The world slows down around you as you focus on the pendant going back...";
+ next;
- mes "and forth...";
- next;
+ mes "and forth...";
+ next;
- mes "and back...";
- next;
+ mes "and back...";
+ next;
- mes "and forth...";
- next;
+ mes "and forth...";
+ next;
- mes "and back...";
- next;
+ mes "and back...";
+ next;
- mes "and...";
- next;
+ mes "and...";
+ next;
- mes "You feel relaxed.";
- next;
+ mes "You feel relaxed.";
+ next;
mes "[Luca the Hunter]";
- mes "\"... still there?\"";
- mes "You hear the sound of fingers snapping. Why would someone do that on such a calm day?";
- next;
+ mes "\"... still there?\"";
+ mes "You hear the sound of fingers snapping. Why would someone do that on such a calm day?";
+ next;
mes "[Luca the Hunter]";
- mes "\"Oh, good... I think it worked. Nice job!\"";
- mes "He grins.";
- mes "[You gain 10,000 experience points]";
- mes "[You learned Skill Focus]";
- setskill SKILL_POOL, 1;
- getexp 10000, 0;
- next;
+ mes "\"Oh, good... I think it worked. Nice job!\"";
+ mes "He grins.";
+ mes "[You gain 10,000 experience points]";
+ mes "[You learned Skill Focus]";
+ setskill SKILL_POOL, 1;
+ getexp 10000, 0;
+ next;
- goto L_teachmore2;
+ goto L_teachmore2;
-L_wronganser:
+ L_wronganswer:
mes "[Luca the Hunter]";
- mes "\"No, that was wrong. I suppose you're not as experienced as I thought you'd be.\"";
- close;
+ mes "\"No, that was wrong. I suppose you're not as experienced as I thought you'd be.\"";
+ close;
S_explain:
- mes "[Luca the Hunter]";
- mes "\"Alright, what do you want to know?\"";
- next;
+ mes "[Luca the Hunter]";
+ mes "\"Alright, what do you want to know?\"";
+ next;
S_explain_loop:
menu
- "What's skill focus?", L_explain_focus,
- "What skills are there?", L_explain_skills,
- "How do skills work?", L_explain_work,
- "Thanks, I think I got it!", -;
+ "What's skill focus?", L_explain_focus,
+ "What skills are there?", L_explain_skills,
+ "How do skills work?", L_explain_work,
+ "Thanks, I think I got it!", -;
return;
L_explain_focus:
- mes "[Luca the Hunter]";
- mes "\"Well, you can learn many, many skills. But you can't really use all of them at once, not even old Aulsbels' head is big enough for that! So you have to focus.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"But you can change that focus whenever you want. It works like this: You come to me, you tell me what you want to focus on, and we do exercises until it's stuck in your head.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"If there's not enough space in your head, you'll first have to stop thinking about some other thing. There's an exercise I learned to do that, so when you talk to me you can just let me know what you want to forget.\"";
- next;
- mes "[Luca the Hunter]";
- if (getskilllv(SKILL_POOL) == 0)
- mes "\"Right now you can't focus on anything yet, so I'll first have to teach you a simple skill to keep your focus.\"";
- if (getskilllv(SKILL_POOL) == 1)
- mes "\"Right now you can only focus on one thing at a time. So if you want to change, you have to forget whatever else you've focused on.\"";
- if (getskilllv(SKILL_POOL) > 1)
- mes "\"You can focus on " + getskilllv(SKILL_POOL) + " skills right now.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"You can come back to me to focus or unfocus whenever you want, I'm here all day.\"";
- next;
- goto S_explain_loop;
+ mes "[Luca the Hunter]";
+ mes "\"Well, you can learn many, many skills. But you can't really use all of them at once, not even old Aulsbels' head is big enough for that! So you have to focus.\"";
+ next;
+ mes "[Luca the Hunter]";
+ mes "\"But you can change that focus whenever you want. It works like this: You come to me, you tell me what you want to focus on, and we do exercises until it's stuck in your head.\"";
+ next;
+ mes "[Luca the Hunter]";
+ mes "\"If there's not enough space in your head, you'll first have to stop thinking about some other thing. There's an exercise I learned to do that, so when you talk to me you can just let me know what you want to forget.\"";
+ next;
+ mes "[Luca the Hunter]";
+ if (getskilllv(SKILL_POOL) == 0)
+ mes "\"Right now you can't focus on anything yet, so I'll first have to teach you a simple skill to keep your focus.\"";
+ if (getskilllv(SKILL_POOL) == 1)
+ mes "\"Right now you can only focus on one thing at a time. So if you want to change, you have to forget whatever else you've focused on.\"";
+ if (getskilllv(SKILL_POOL) > 1)
+ mes "\"You can focus on " + getskilllv(SKILL_POOL) + " skills right now.\"";
+ next;
+ mes "[Luca the Hunter]";
+ mes "\"You can come back to me to focus or unfocus whenever you want, I'm here all day.\"";
+ next;
+ goto S_explain_loop;
L_explain_skills:
- mes "[Luca the Hunter]";
- mes "\"Well, I don't really know... lots, I think. I can teach you brawling, which is good when you've run out of arrows or don't have a weapon around.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"But there's other skills around. Some mages need special skills to concentrate, so ask around in that crowd, if that's your thing.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"I've also heard that there is someone in Hurnscald who can help you make your body more resistant against some things. But body and mind belong together, so you probably have to focus for that, too.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"Other than that, just ask around! There have to be some people who can teach you something...\"";
- next;
- goto S_explain_loop;
+ mes "[Luca the Hunter]";
+ mes "\"Well, I don't really know... lots, I think. I can teach you brawling, which is good when you've run out of arrows or don't have a weapon around.\"";
+ next;
+ mes "[Luca the Hunter]";
+ mes "\"But there's other skills around. Some mages need special skills to concentrate, so ask around in that crowd, if that's your thing.\"";
+ next;
+ mes "[Luca the Hunter]";
+ mes "\"I've also heard that there is someone in Hurnscald who can help you make your body more resistant against some things. But body and mind belong together, so you probably have to focus for that, too.\"";
+ next;
+ mes "[Luca the Hunter]";
+ mes "\"Other than that, just ask around! There have to be some people who can teach you something...\"";
+ next;
+ goto S_explain_loop;
L_explain_work:
- mes "[Luca the Hunter]";
- mes "\"Well, skills allow you to be better in some things, or just to do what you couldn't do without them. When you've learned a skill and are focussing on it, then it affects what you do.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"Now, when you start out with a skill, you won't be very good at it yet. But if you keep practicing you'll learn how to get better.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"My old teacher always called that getting `skill points' and that you can see them with [F5], whoever that is.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"She also said that with this [F5] thing you can get better at those skills, and that it costs you as many skill points as the level you want to go to.\"";
- next;
- mes "[Luca the Hunter]";
- mes "\"She always would have one cactus poition too many... but she was an amazing teacher.\"";
- mes "He nods emphatically.";
- next;
- goto S_explain_loop;
+ mes "[Luca the Hunter]";
+ mes "\"Well, skills allow you to be better in some things, or just to do what you couldn't do without them. When you've learned a skill and are focussing on it, then it affects what you do.\"";
+ next;
+ mes "[Luca the Hunter]";
+ mes "\"Now, when you start out with a skill, you won't be very good at it yet. But if you keep practicing you'll learn how to get better.\"";
+ next;
+ mes "[Luca the Hunter]";
+ mes "\"My old teacher always called that getting `skill points' and that you can see them with [F5], whoever that is.\"";
+ next;
+ //TODO:
+ //mes "[Luca the Hunter]";
+ //mes "\"She also said that with this [F5] thing you can get better at those skills, and that it costs you as many skill points as the level you want to go to.\"";
+ //next;
+ mes "[Luca the Hunter]";
+ mes "\"She always would have one cactus poition too many... but she was an amazing teacher.\"";
+ mes "He nods emphatically.";
+ next;
+ goto S_explain_loop;
L_teachmore:
- mes "[Luca the Hunter]";
- mes "\"Good to see you again!\"";
- next;
+ mes "[Luca the Hunter]";
+ mes "\"Good to see you again!\"";
+ next;
L_teachmore2:
- menu
- "I would like to focus.", L_focus,
- "I would like to unfocus.", L_unfocus,
- "Can you teach me a skill?", L_teach_brawling,
- "Can you explain skills again?", L_teachmore_explain,
- "I'm done for now, thanks!";
- close;
+ setarray @choices, 0,0,0,0,0;
+ setarray @choice$, "", "", "", "", "";
+ set @choice_nr, 0;
+
+ set @C_focus, 1;
+ set @C_unfocus, 2;
+ set @C_teachbrawling, 3;
+ set @C_teachnothing, 4;
+ set @C_explainagain, 5;
+ set @C_nvm, 6;
+
+ getactivatedpoolskilllist;
+ if (!((getskilllv(SKILL_POOL) - @skilllist_count) > 0)) goto L_teachmore2_nof;
+ getunactivatedpoolskilllist;
+ if (@skilllist_count == 0) goto L_teachmore2_nof;
+ set @choices[@choice_nr], @C_focus;
+ set @choice$[@choice_nr], "I would like to focus.";
+ set @choice_nr, @choice_nr + 1;
+L_teachmore2_nof:
+
+ getactivatedpoolskilllist;
+ if (@skilllist_count == 0) goto L_teachmore2_nounf;
+ set @choices[@choice_nr], @C_unfocus;
+ set @choice$[@choice_nr], "I would like to unfocus.";
+ set @choice_nr, @choice_nr + 1;
+L_teachmore2_nounf:
+
+ if (!(getskilllv(SKILL_BRAWLING)))
+ set @choices[@choice_nr], @C_teachbrawling;
+ if (getskilllv(SKILL_BRAWLING))
+ set @choices[@choice_nr], @C_teachnothing;
+ set @choice$[@choice_nr], "Can you teach me a skill?";
+ set @choice_nr, @choice_nr + 1;
+
+ set @choices[@choice_nr], @C_explainagain;
+ set @choice$[@choice_nr], "Can you explain skills again?";
+ set @choice_nr, @choice_nr + 1;
+
+ set @choices[@choice_nr], @C_nvm;
+ set @choice$[@choice_nr], "I'm done for now, thanks!";
+ set @choice_nr, @choice_nr + 1;
+
+ menu
+ @choice$[0],-,
+ @choice$[1],-,
+ @choice$[2],-,
+ @choice$[3],-,
+ @choice$[4],-;
+
+ set @menu, @menu - 1;
+ if (@choices[@menu] == 0) close;
+ if (@choices[@menu] == @C_focus) goto L_focus;
+ if (@choices[@menu] == @C_unfocus) goto L_unfocus;
+ if (@choices[@menu] == @C_teachbrawling) goto L_teach_brawling;
+ if (@choices[@menu] == @C_teachnothing) goto L_teach_nothing;
+ if (@choices[@menu] == @C_explainagain) goto L_teachmore_explain;
+ if (@choices[@menu] == @C_nvm) close;
+ close;
L_teachmore_explain:
callsub S_explain;
- goto L_teachmore2;
+ goto L_teachmore2;
L_focus:
-//FIXME
+ getunactivatedpoolskilllist;
+ set @skilllist_id[@skilllist_count], 0;
+ set @skilllist_name$[@skilllist_count], "Nevermind";
+ menu
+ @skilllist_name$[0], -,
+ @skilllist_name$[1], -,
+ @skilllist_name$[2], -,
+ @skilllist_name$[3], -,
+ @skilllist_name$[4], -,
+ @skilllist_name$[5], -,
+ @skilllist_name$[6], -,
+ @skilllist_name$[7], -;
+
+ set @menu, @menu - 1;
+ if (@skilllist_id[@menu] == 0)
+ goto L_teachmore2;
+
+ poolskill @skilllist_id[@menu];
+ goto L_teachmore2;
L_unfocus:
-//FIXME
+ if (countitem("DementiaPotion") > 0)
+ goto L_unfocus_menu;
+
+ if (MAGIG_FLAGS & MFLAG_KNOWS_UNFOCUS_RECIPE)
+ goto L_nopotion;
+
+ mes "[Luca the Hunter]";
+ mes "\"Unfocussing is one of the harder parts though, because it is sunk in. You see?\"";
+ next;
+ mes "\"So to remove that mental focus we will need a special potion.\"";
+ next;
+ mes "\"Maybe you should consult some very skilled alchemists.\"";
+ next;
+ mes "\"Ah yes, of course you will need a recipe. Although the alchemist usually knows it.\"";
+ next;
+ mes "\"The potion is called grimace of dementia. So the alchemist will know for sure.\"";
+ set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_UNFOCUS_RECIPE;
+ menu
+ "Ok, I will get a grimace of dementia potion", -,
+ "Alright, be right back!", -;
+ close;
+
+L_nopotion:
+ mes "[Luca the Hunter]";
+ mes "\"Hey, You really need that dementia potion for unfocussing.\"";
+ next;
+ mes "\"Come back, when you found a suitable alchemist, who can mix such a potion.\"";
+ next;
+ goto L_teachmore2;
+
+L_unfocus_menu:
+ mes "[Luca the Hunter]";
+ mes "\"Ahh, I see you have a dementia potion.\"";
+ next;
+ mes "\"What focus would you like to unfocus?\"";
+
+ if (countitem("DementiaPotion") == 0) goto L_nopotion;
+ delitem "DementiaPotion", 1;
+
+ getactivatedpoolskilllist;
+
+ set @skilllist_id[@skilllist_count], 0;
+ set @skilllist_name$[@skilllist_count], "Nevermind";
+ menu
+ @skilllist_name$[0], -,
+ @skilllist_name$[1], -,
+ @skilllist_name$[2], -,
+ @skilllist_name$[3], -,
+ @skilllist_name$[4], -,
+ @skilllist_name$[5], -,
+ @skilllist_name$[6], -,
+ @skilllist_name$[7], -;
+
+ set @menu, @menu - 1;
+ if (@skilllist_id[@menu] == 0)
+ goto L_teachmore2;
-L_teach_brawling:
-//FIXME
- close;
+ unpoolskill @skilllist_id[@menu];
+ close;
+L_teach_brawling:
+ mes "[Luca the Hunter]";
+ mes "\"Well, yes, I can teach you brawling. It's a nice thing, if you have nothing left but your hands to defend yourself.\"";
+ next;
+ mes "He is laughing.";
+ mes "\"And is handy, if some sapling starts getting naughty.\"";
+ next;
+ mes "He rises his hand in front of his face and clenches his fists.";
+ mes "\"Ok, let's go! Hold your hands like this.\"";
+ next;
+ mes ".......";
+ next;
+ mes "Some bruises later.";
+ mes "\"Great! I think, you got it.\"";
+ next;
+ set @SUP_id, SKILL_BRAWLING;
+ set @SUP_lvl, 1;
+ set @SUP_name$, "Brawling";
+ set @SUP_xp, @EXP_BRAWLING;
+ callfunc "SkillUp";
+ close;
+
+L_teach_nothing:
+ mes "[Luca the Hunter]";
+ mes "\"I was able to teach you brawling. For other professions you should visit someone else.\"";
+ next;
+ mes "\"You see, I am an adventurer. Everybody has his tricks. But you really should visit someone, who is a teacher, not an adventurer now.\"";
+ next;
+ goto L_teachmore2;
}
diff --git a/npc/001-1_Tulimshar/rewards_master.txt b/npc/001-1_Tulimshar/rewards_master.txt
index 571fe1c8..bd55b0ae 100644
--- a/npc/001-1_Tulimshar/rewards_master.txt
+++ b/npc/001-1_Tulimshar/rewards_master.txt
@@ -5,16 +5,16 @@
if (tvis == 0) set tvis, 1;
if (Mobpt < tvis) goto L_NotEnough;
- setarray @Items$, "AppleCake", "Arrow", "Beer", "Boots", "BugLeg", "CactusDrink", "CactusPotion", "Cake", "Candy", "CasinoCoins", "CherryCake", "ChickenLeg", "ChocolateBar", "ChocolateCake", "CottonBoots", "CottonCloth", "CottonShirt", "CottonShorts", "FancyHat", "GreenApple", "HardSpike", "IronOre", "Lifestone", "LightBlueDye", "MaggotSlime", "Milk", "Orange", "OrangeCake", "OrangeCupcake", "PinkPetal", "PileOfAsh", "PinkAntenna", "PoltergeistPowder", "RawLog", "RedApple", "RedDye", "ScorpionStinger", "SerfHat", "SmallHealingPotion", "SmallMushroom", "SnakeSkin", "SpectrePowder", "Steak", "TinyHealingPotion", "WhiteCake", "WhiteFur", "WispPowder", "YellowDye";
+ setarray @Items$, "AppleCake", "Arrow", "Beer", "Boots", "BugLeg", "CactusDrink", "CactusPotion", "Cake", "Candy", "CasinoCoins", "CherryCake", "ChickenLeg", "ChocolateBar", "ChocolateCake", "CottonBoots", "CottonCloth", "CottonShirt", "CottonShorts", "FancyHat", "GreenApple", "HardSpike", "IronOre", "Lifestone", "LightBlueDye", "MaggotSlime", "Milk", "Orange", "OrangeCake", "OrangeCupcake", "PinkPetal", "PileOfAsh", "PinkAntenna", "PoltergeistPowder", "RawLog", "RedApple", "RedDye", "ScorpionStinger", "SerfHat", "SmallHealingPotion", "SmallMushroom", "SnakeSkin", "SpectrePowder", "Steak", "TinyHealingPotion", "WhiteCake", "WhiteFur", "WispPowder", "YellowDye", "Coal";
mes "[Ishi the Rewards Master]";
mes "\"Welcome! I see you have " + Mobpt + " Monster Points. Would you like to exchange some of those for items?\"";
next;
-
+
set @i, 0;
setarray @Menu$, "", "", "", "", "", "", "", "", "", "", "";
callsub SUB_prep_menu;
-
+
menu
@Menu$[0], -,
@Menu$[1], -,
@@ -26,20 +26,24 @@
@Menu$[7], -,
@Menu$[8], -,
@Menu$[9], -,
- @Menu$[10], -;
+ @Menu$[10], -,
+ @Menu$[11], -;
+ // this is for the last entry "No thanks":
if (@menu > @i) close;
-
+ // this is for the "Give all" entry:
+ if (@menu == @i) goto L_Give_all;
+
set @req, @menu;
set @rec, 0;
-
+
L_Item_Loop:
if (@rec == @req || Mobpt < tvis) goto L_Item_Done;
-
+
callsub SUB_give_item;
set @rec, @rec + 1;
goto L_Item_Loop;
-
+
L_Item_Done:
if (@rec < @req) mes "It looks like your Monster Points were over estimated.";
close;
@@ -54,6 +58,34 @@ L_NotEnough:
mes "\"You don't have enough Monster Points for a reward. You'll need to kill some more monsters first.\"";
close;
+
+
+L_Give_all:
+ // we need to count how many loop iterations are done there,
+ // since the server complains about more than 250 (70 according to Jaxad0127)
+ // gotos without interrupting next statement.
+ set @gotocounter, 50;
+
+L_Give_all_loop:
+ set @gotocounter, @gotocounter - 1;
+ if (@gotocounter < 1) goto L_Give_all_next;
+ set @itemgiveerror, 0;
+ callsub SUB_give_item;
+ if (@itemgiveerror != 0) goto L_Give_all_done;
+ goto L_Give_all_loop;
+
+L_Give_all_next:
+ next;
+ mes "[Ishi the Rewards Master]";
+ mes "\"You have brought lots of items now. You have still " + Mobpt + " monster points. Shall we continue?\"";
+ menu
+ "yes", L_Give_all,
+ "no", L_Give_all_done;
+ close;
+
+L_Give_all_done:
+ close;
+
//////////////////////////////////////////////////
// Subroutines
//////////////////////////////////////////////////
@@ -61,29 +93,49 @@ L_NotEnough:
SUB_prep_menu:
set @pts, Mobpt;
set @dif, tvis;
-
+
L_Menu_Loop:
- if (@pts < @dif || @i == 10) goto L_Menu_Done;
-
+ if (@pts < @dif || @i == 10) goto L_Menu_Check;
+
set @Menu$[@i], @i + 1;
-
+
set @i, @i + 1;
set @pts, @pts - @dif;
set @dif, @dif + 1;
-
+
goto L_Menu_Loop;
+
+L_Menu_Check:
+ // if we are able to give 10, we can enable the option to give all we can have
+ if (@i != 10) goto L_Menu_Done;
+ set @Menu$[@i], "Please give me as many as I deserve!";
+ set @i, @i + 1;
+
L_Menu_Done:
set @Menu$[@i], "No thanks";
return;
SUB_give_item:
+ set @itemgiveerror, 0;
+ getinventorylist;
+ if (@inventorylist_count == 100) goto SUB_give_noinv;
+ if (Mobpt < tvis) goto SUB_give_nomobpts;
set Mobpt, Mobpt - tvis;
set tvis, tvis + 1;
set @item$, @Items$[rand(getarraysize(@Items$))];
-
+
getitem @item$, 1;
-
+
mes "You received one " + getitemname(@item$) + "!";
-
+ return;
+
+SUB_give_noinv:
+ mes "Your inventory is full!";
+ set @itemgiveerror, 1;
+ return;
+
+SUB_give_nomobpts:
+ mes "It looks like your Monster Points were over estimated.";
+ set @itemgiveerror, 1;
return;
}
diff --git a/npc/006-1_Desert_mountains/_warps.txt b/npc/006-1_Desert_mountains/_warps.txt
index 823e937e..32d267e7 100644
--- a/npc/006-1_Desert_mountains/_warps.txt
+++ b/npc/006-1_Desert_mountains/_warps.txt
@@ -32,3 +32,4 @@
006-1.gat,38,121 warp ToCave -1,-1,006-3.gat,38,122
006-1.gat,74,90 warp ToCave -1,-1,006-3.gat,74,91
006-1.gat,51,90 warp ToCave -1,-1,006-3.gat,51,91
+006-1.gat,30,123 warp ToCave -1,-1,032-3.gat,128,31
diff --git a/npc/006-1_Desert_mountains/pachua.txt b/npc/006-1_Desert_mountains/pachua.txt
index f4d2a653..b59de60d 100644
--- a/npc/006-1_Desert_mountains/pachua.txt
+++ b/npc/006-1_Desert_mountains/pachua.txt
@@ -4,10 +4,12 @@
set @wants_leather_patch, QUEST_Forestbow_state & NIBBLE_4_MASK;
+ if (QUEST_MIRIAM_start != 0) goto L_smoke;
+
mes "[Chief Pachua]";
mes "\"How!\"";
next;
-
+
if (getequipid(equip_head) == 643 || getequipid(equip_head) == 644) goto L_WearingCowboy;
if (getequipid(equip_legs) == 642) goto L_WearingChaps;
@@ -195,4 +197,10 @@ L_TooMany:
mes "[Chief Pachua]";
mes "\"You don't have room for a leather patch. Come back later.\"";
close;
+
+L_smoke:
+ message strcharinfo(0), "Parua quickly inhales from his pipe and releases a ring of smoke towards the sky!";
+ set QUEST_MIRIAM_run, gettimetick(1) - QUEST_MIRIAM_start;
+ set QUEST_MIRIAM_start, 0;
+ end;
}
diff --git a/npc/009-2_Hurnscald/nurse.txt b/npc/009-2_Hurnscald/nurse.txt
index 9fd759c8..f4d5df40 100644
--- a/npc/009-2_Hurnscald/nurse.txt
+++ b/npc/009-2_Hurnscald/nurse.txt
@@ -1,48 +1,521 @@
-// Nurse
-
-// heals player below level 10 for free and tells players about the doctor on the 3rd floor.
-009-2.gat,147,65,0 script Nurse 119,{
- mes "[Nurse]";
- mes "\"Can I help you?\"";
- next;
-
- if (Inspector == 1)
- menu
- "Oooh, these wounds! They hurts so much!", L_Heal,
- "I don't feel so well, I might be sick.", L_Doctor,
- "Have you seen anything out of the ordinary?", L_NohMask,
- "No, I'm fine.", -;
- if (Inspector != 1)
- menu
- "Oooh, these wounds! They hurts so much!", L_Heal,
- "I don't feel so well, I might be sick.", L_Doctor,
- "No, I'm fine.", -;
- mes "[Nurse]";
- mes "\"Then I would ask you to leave. There are people who really need our help.\"";
- close;
+ //######################################################################################
+//# Nurse
+//# AUTHORS: Jenalya and Pjotr Orial
+//# REVIEWED BY:
+//# heals player below level 20 for free and tells players about the doctor on the 3rd floor.
+//#
+//# gives the resist-poison skill, used global (!) variable: "$NPC_NURSE", split up in 4 bytes:
+//# byte0 (bit 0-7) = healing_needed, byte1 (bit 8-15) = venum_needed, byte2 (bit 16-23) = stabilizer_needed
+//# byte3 (bit 24-31) still unused
+//# used player-variable: QUEST_Forestbow, nibble7
+//# states:
+//# 0 if skills are available, she tells you about her plans of doing the antidote,
+//# need black scorpion stingers and snake tongues
+//# 1 waits for ingredients: black scorpion stingers and snake tongues
+//# 2 waits for ingredients: acorns, apples, orange, healing potion, when these ingreds are there,
+//# she mixes the stuff (modify global variable!)
+//# 3 you can start the minigame, 3 tries remaining
+//# 4 you can start the minigame, 2 tries remaining
+//# 5 you can start the minigame, 1 try remaining
+//# 6 not enough stuff remaining, jump to state 1
+//# 7 yay! you made it!
+
+
+//######################################################################################
+009-2.gat,147,65,0 script Nurse 119, {
+ set @SNAKET_AMOUNT, 5;
+ set @BSCORPIONST_AMOUNT, 10;
+ // This quest can be done very often: so give less xp
+ set @QUEST1_EXP, 300;
+ set @ACORNS_AMOUNT, 10;
+ set @GREENAPPLE_AMOUNT, 5;
+ set @REDAPPLE_AMOUNT, 5;
+ set @ORANGE_AMOUNT, 5;
+ set @HEALING_AMOUNT, 3;
+ // This quest can be done very often: so give less xp
+ set @QUEST2_EXP, 700;
+ set @ANTIDOTE_EXP, 10000;
+
+ set @Q_poison_MASK, NIBBLE_7_MASK;
+ set @Q_poison_SHIFT, NIBBLE_7_SHIFT;
+ set @Q_poison, (QUEST_Forestbow_state & @Q_poison_MASK) >> @Q_poison_SHIFT;
+
+ if (@Q_poison == 7) goto state7;
+ if (@Q_poison == 6) goto state6;
+ if (@Q_poison == 5) goto state5;
+ if (@Q_poison == 4) goto state4;
+ if (@Q_poison == 3) goto state3;
+ if (@Q_poison == 2) goto state2;
+ if (@Q_poison == 1) goto state1;
+ if (getskilllv(SKILL_POOL)) goto state0;
+
+L_Usual:
+ mes "[Nurse]";
+ mes "\"How can I help you?\"";
+ next;
+
+ if (Inspector == 1)
+ menu
+ "Oooh, these wounds! They hurts so much!", L_Heal,
+ "I don't feel so well, I might be sick.", L_Doctor,
+ "Have you seen anything out of the ordinary?", L_NohMask,
+ "No, I'm fine.", -;
+ if (Inspector != 1)
+ menu
+ "Oooh, these wounds! They hurts so much!", L_Heal,
+ "I don't feel so well, I might be sick.", L_Doctor,
+ "No, I'm fine.", -;
+ mes "[Nurse]";
+ mes "\"Then I would ask you to leave. There are people who really need our help.\"";
+ close;
L_Doctor:
- mes "[Nurse]";
- mes "\"Then you should better see the doctor. He is usually in his office on the 3rd floor.\"";
- close;
+ mes "[Nurse]";
+ mes "\"Then you should better see the doctor. He is usually in his office on the 3rd floor.\"";
+ close;
L_Heal:
- if (baselevel > 10) goto L_NoHeal;
- mes "[Nurse]";
- mes "\"Here, let me heal you.\"";
- next;
- heal 10000, 10000;
- close;
+ if (baselevel > 20) goto L_NoHeal;
+ mes "[Nurse]";
+ mes "\"Here, let me heal you.\"";
+ next;
+ heal 10000, 10000;
+ close;
L_NoHeal:
- mes "[Nurse]";
- mes "\"I'm sorry but I'm here only to help young people.";
- mes "Your level is already higher than 10.";
- mes "You can get some rest in the inn near here.\"";
- close;
+ mes "[Nurse]";
+ mes "\"I'm sorry but I'm here only to help young people.";
+ mes "Your level is already higher than 20.";
+ mes "You can get some rest in the inn near here.\"";
+ close;
L_NohMask:
- mes "[Nurse]";
- mes "\"I'm to busy here to observe the town.\"";
- close;
+ mes "[Nurse]";
+ mes "\"I'm to busy here to observe the town.\"";
+ close;
+
+state0:
+ mes "[Nurse]";
+ mes "\"Welcome! You really look like a competent person. Maybe you can help to deal with a problem we have.\"";
+ next;
+ mes "\"We recently had some accidents in the mines. It seems, that the creatures in the mines become more aggressive.\"";
+ next;
+ mes "\"Unfortunaly, some of them are poisonous and it is very difficult for us to help the miners.\"";
+ next;
+ mes "\"For that reason, I want to do some research on this subject, to create an anitdote. But I need help to get some ingredients, someone who is able to deal with the dangerous creatures in the mines.\"";
+ next;
+ menu
+ "I will do what I can. What do you need?", L_firstquest,
+ "I'm really sorry, but I don't think, I can help you.", -;
+
+ mes "\"That is disagreeable to hear. Maybe I can find another person to take this task.\"";
+ next;
+ goto L_Usual;
+
+L_firstquest:
+ set @Q_poison, 1;
+ callsub S_Update_Var;
+
+ mes "\"That's great! First, I need some parts of the creatures, that cause the poison.\"";
+ next;
+L_ExplainAgain1:
+ mes "\"Please bring me five tongues of snakes and ten stingers of black scorpions.\"";
+ close;
+
+state1:
+ mes "[Nurse]";
+ mes "\"You are back, wonderful! Did you get, what we need for the antidote?\"";
+ next;
+ menu
+ "Actually, I have another question.", L_Usual,
+ "Sorry, I forgot. What shall I bring you?", L_ExplainAgain1,
+ "I have what you asked for.", -,
+ "I'm still working on that.", quit;
+
+ if (countitem("SnakeTongue") < @SNAKET_AMOUNT || countitem("BlackScorpionStinger") < @BSCORPIONST_AMOUNT) goto L_NotEnough;
+ delitem "SnakeTongue", @SNAKET_AMOUNT;
+ delitem "BlackScorpionStinger", @BSCORPIONST_AMOUNT;
+ getexp @QUEST1_EXP, 0;
+
+ set @Q_poison, 2;
+ callsub S_Update_Var;
+
+ mes "[Nurse]";
+ mes "\"Very good. Now I have to extract the poison from this, it will take some time.\"";
+ next;
+ mes "\"But there are some other things we will need in any case. It would be courteous, if you could get them meanwhile.\"";
+ next;
+L_ExplainAgain2:
+ mes "\"Please bring me ten acorns, five red apples and five green apples, also five oranges. And we need some small healing potions. They will be useful to hold off the baneful effects. I guess, three of them will be enough.\"";
+ close;
+
+state2:
+ mes "You look at the nurse, who seems to be really tired with shadows under her eyes. When she regocnize you, she smiles.";
+ mes "[Nurse]";
+ mes "\"I managed to extract the poisonous components. We should be able to create an anitidote, if you have anything else we need.\"";
+ next;
+ menu
+ "Actually, I have another question.", L_Usual,
+ "I have a bad memory. Can you tell me again, what we need?", L_ExplainAgain2,
+ "I managed to get everything we need.", -,
+ "I will go and get it.", quit;
+
+ if (countitem("Acorn") < @ACORNS_AMOUNT || countitem("GreenApple") < @GREENAPPLE_AMOUNT || countitem("RedApple") < @REDAPPLE_AMOUNT || countitem("Orange") < @ORANGE_AMOUNT || countitem("SmallHealingPotion") < @HEALING_AMOUNT) goto L_NotEnough;
+ delitem "Acorn", @ACORNS_AMOUNT;
+ delitem "GreenApple", @GREENAPPLE_AMOUNT;
+ delitem "RedApple", @REDAPPLE_AMOUNT;
+ delitem "Orange", @ORANGE_AMOUNT;
+ delitem "SmallHealingPotion", @HEALING_AMOUNT;
+ getexp @QUEST2_EXP, 0;
+
+ set @Q_poison, 3;
+ callsub S_Update_Var;
+
+L_Chemistry:
+ callsub L_Shuffle_Need;
+ mes "The nurse takes the ingredients you brought and starts to squeeze the fruits and to crush the acorns. Then she put the fruit juices in some complicated looking chemical device.";
+ next;
+ mes "After some minutes, it is blubbering and steaming and some liquidity is dropping in a pot under the device.";
+ next;
+ mes "Then she takes the acorn flour and the liquidity and goes to a place back in the room, where she does something you don't see.";
+ next;
+ mes "After just a few moments, she comes back with a smiling face, holding two different bottles in her hand.";
+ next;
+ mes "[Nurse]";
+ mes "\"That was easy compared to the things to be done with the stingers and snake tongues.\"";
+ next;
+ mes "Then her facial expression gets more serious.";
+ next;
+ mes "\"When we try to find the right mixture for the antidote, we need to test it.\"";
+ next;
+ mes "\"For that purpose, I will poison you. Then you drink the antidote to see, if it works.\"";
+ next;
+ mes "\"If we make a mistake, this might be exhausting and painful, so you should rest a while and prepare yourself.\"";
+ next;
+ mes "\"Come back, when you feel ready for that task.\"";
+ close;
+
+state3:
+ mes "[Nurse]";
+ mes "\"Hello my friend. You feel prepared to test the antidote?\"";
+ next;
+ menu
+ "Actually, I have another question.", L_Usual,
+ "Yes, let us begin.",-;
+
+L_Exp_Game:
+ mes "[Nurse]";
+ mes "\"Listen carefully! I will explain, what you need to do.\"";
+ next;
+ mes "\"I have here two different distillates. One is the venom extract, the other one a stabilizer.\"";
+ next;
+ mes "\"We also have the healing potion.\"";
+ next;
+ mes "\"The problem is, that I can only guess the concentration of the venom and the stabilizer. My equipment isn't good enough to determine it precise.\"";
+ next;
+ mes "\"You need to find the right amount of each ingredient. I will tell you, what I can know with my analysis methods.\"";
+ next;
+ mes "\"Shall we start?\"";
+ next;
+ menu
+ "Please explain it again.", L_Exp_Game,
+ "Alright.", -;
+L_Game:
+ set @Q_poison, @Q_poison + 1;
+ callsub S_Update_Var;
+ // healing, venom, stabilizer
+ callsub L_Load_Need;
+ //descriptions
+ set @desc_length, 6;
+
+ setarray @desc$,"very little","only a little", "little","much", "a lot", "very much", "a huge amount";
+
+ set @divisor, @count / @desc_length;
+
+ set @hlIndex, (@hlNeed-@offset) /@divisor;
+ set @vnIndex, (@vnNeed-@offset) /@divisor;
+ set @stIndex, (@stNeed-@offset) /@divisor;
+
+ mes "[Nurse]";
+ mes "\"I guess you need " + @desc$[@hlIndex] + " of the healing potion.\"";
+ next;
+ mes "\"You need " + @desc$[@vnIndex] + " of the venom extracts, I suppose.\"";
+ next;
+ mes "\"As far as I can tell you will need " + @desc$[@stIndex] + " of the stabilizer.\"";
+ next;
+
+ if(@hlNeed/@vnNeed > 1 ) mes "\"I see that the healing potions are needed at least " + @hlNeed/@vnNeed + " times as much as the venom.\"";
+ if(@vnNeed/@hlNeed > 1 ) mes "\"I see that the venom extracts are needed at least " + @vnNeed/@hlNeed + " times as much as the healing potions.\"";
+ if ( (@hlNeed/@vnNeed > 1 ) || (@vnNeed/@hlNeed > 1 )) next;
+
+ if(@stNeed/@vnNeed > 1 ) mes "\"I see that the stabilizer is needed at least " + @stNeed/@vnNeed + " times as much as the venom extracts.\"";
+ if(@vnNeed/@stNeed > 1 ) mes "\"I see that the venom extracts are needed at least " + @vnNeed/@stNeed + " times as much as the stabilizer.\"";
+ if ((@vnNeed/@stNeed > 1 ) || (@stNeed/@vnNeed > 1 )) next;
+
+ if(@stNeed/@hlNeed > 1 ) mes "\"I see that the stabilizer is needed at least " + @stNeed/@hlNeed + " times as much as the healing potions.\"";
+ if(@hlNeed/@stNeed > 1 ) mes "\"I see that the healing potions are needed at least " + @hlNeed/@stNeed + " times as much as the stabilizer.\"";
+ if ((@hlNeed/@stNeed > 1 ) || (@stNeed/@hlNeed > 1 )) next;
+
+L_choosePut:
+ set @max, @count+@offset-1;
+ set @min, @offset;
+ mes "\"My scale goes up to " + @max + ". I suggest to put at least " + @min +" drops on the scale.\"";
+ next;
+
+ mes "\"How many drops of the healing potion should we use?\"";
+ input @hlPut;
+ if (@hlPut < @offset) goto L_Game_tooless;
+ if (@hlPut > @max) goto L_Game_toomuch;
+
+ mes "\"How many drops of the venom extract potion should we use? \"";
+ input @vnPut;
+ if (@vnPut < @offset) goto L_Game_tooless;
+ if (@vnPut > @max) goto L_Game_toomuch;
+
+ mes "\"How many drops of the stabilizer potion should we use? \"";
+ input @stPut;
+ if (@stPut < @offset) goto L_Game_tooless;
+ if (@stPut > @max) goto L_Game_toomuch;
+
+ mes "The nurse puts the potions together according to your instructions. Then she takes a spoon and stirs it.";
+ next;
+ mes "You take the glass and look suspiciously at the liquid, which has changed to an odd colour.";
+ next;
+ mes "[Nurse]";
+ mes "\"Allright, now I will inject the venom into you, then you should drink the antidote immidiatly. Are you ready?\"";
+ next;
+ mes "You take a deep breath and nod.";
+ next;
+ mes "The nurse take a scary looking syringe out of a drawer and swabs your arm with disinfection dabber.";
+ next;
+ mes "Then she stings the syringe in your vein and pushs it down. After a few seconds, your heart starts pounding quicker and you began to sweat all over your body.";
+ next;
+ mes "[Nurse]";
+ mes "\"Drink the antidote!\"";
+ next;
+ mes "You lift the glass to your lips and drink it all at once.";
+ next;
+
+ if ( (@hlPut > @hlNeed) && (@vnPut > @vnNeed) ) goto m_hl_m_vn;
+ if ( (@hlPut > @hlNeed) && (@vnPut <= @vnNeed) ) goto m_hl_l_vn;
+ if ( (@hlPut <= @hlNeed) && (@vnPut > @vnNeed) ) goto l_hl_m_vn;
+ if ( (@hlPut < @hlNeed) && (@vnPut < @vnNeed) ) goto l_hl_l_vn;
+
+ mes "You feel quite normal.";
+ mes "[Nurse]";
+ mes "\"Oh yes, the concentration of the healing potions and the venom extracts seem to be right.\"";
+ next;
+ set @hl_vn_ok, 1;
+ goto check_st;
+
+m_hl_m_vn:
+ //poison for 3 minutes
+ sc_start sc_poison, 1, 20;
+ mes "You began to feel really dizzy. And you feel so light - you can't help yourself and burst out with laughter. What a strange feeling!";
+ next;
+ mes "The nurse looks at you with a really worried look in her face. As you open your mouth to tell her, that you feel allright, the content of your stomache finds its way out through your throat and on the floor.";
+ next;
+ mes "The feeling of happieness disappears, but you seems to be still poisoned.";
+ goto check_st;
+
+m_hl_l_vn:
+ //poison for 1 minute
+ sc_start sc_poison, 1, 20;
+ mes "You feel the pain of the poison weaken. This seems promising. The thought, you might have been succesful makes you feel enormously happy.";
+ next;
+ mes "But a few seconds later, you wonder, what the reason for your happiness was.";
+ next;
+ mes "Anyway, what are you doing here? Actually, where are you?";
+ next;
+ mes "You don't care, you feel so great. You start to giggle and laugh uncontrollable. What a wonderful feeling. ";
+ next;
+ mes "Suddenly, the world has some really strange colors. As you watch this women in front of you chaning her color from dark green to a light purple, you become really tired.";
+ next;
+ mes "You lay down on the floor and fall asleep.";
+ next;
+ mes "As you open your eyes again, the nurse shines in your face with a lamp and pulls your eyelids open. Then she nodds.";
+ next;
+ mes "\"Very well, you are sober again.\"";
+ next;
+
+ goto check_st;
+
+l_hl_m_vn:
+ // first poison for 10 minutes, player will die anyway
+ sc_start sc_poison, 1, 20;
+ mes "You feel a sting in your stomach and your heart starts pounding loudly.";
+ next;
+ mes "The room is getting dark.";
+ next;
+ mes "...and darker...";
+ next;
+ mes ".......";
+ // bye bye player!
+ heal -Hp, 0;
+ // close instead of telling how much stabilizer is needed
+ close;
+ // goto check_st;
+
+l_hl_l_vn:
+ //poison for 1 minute
+ sc_start sc_poison, 1, 20;
+ mes "The antidote seems to have no effect.";
+ goto check_st;
+
+check_st:
+ if ( (@stPut < @stNeed) ) goto l_st;
+ if ( (@stPut > @stNeed) ) goto m_st;
+ if (@hl_vn_ok == 1) goto allcorrect;
+
+ mes "[Nurse]";
+ mes "\"The amount of the stabilizer seems alright, but we have to think again about the other ingredients.\"";
+ next;
+ goto notallcorrect;
+
+l_st:
+ mes "[Nurse]";
+ mes "\"It seems, as if we took not enough of the stabilizer, the antidote would loose its effect after some time.\"";
+ next;
+ goto notallcorrect;
+m_st:
+ mes "[Nurse]";
+ mes "\"It seems, as if we took too much of the stabilizer. The antidote would turn into venom again after some time.\"";
+ next;
+ goto notallcorrect;
+allcorrect:
+ mes "You feel totally normal again.";
+ next;
+ mes "[Nurse]";
+ mes "\"Wonderfull! You made it! Now I will be able to help all the people, who get poisoned in the mines!\"";
+ next;
+ mes "\"Thank you so much! Oh, and it seems, as if you have gained the skill to resist posion someway. This is great.\"";
+ next;
+ mes "\"You should talk to someone, who can help you to focus on your skills.\"";
+ next;
+ getexp @ANTIDOTE, 0;
+ setskill TMW_POISON_RESISTANCE, 1;
+ set @Q_poison, 7;
+ callsub S_Update_Var;
+ close;
+
+notallcorrect:
+ mes "[Nurse]";
+ mes "\"It didn't work. You are a really brave person. Now you should rest and recover. I hope, you won't give up now. Please come back later, so we can try it again.\"";
+ next;
+
+ close;
+state4:
+ mes "The nurse has a worried look in her face.";
+ mes "[Nurse]";
+ mes "\"Hello. I hope you recovered well?\"";
+ next;
+ mes "\"There is enough of the distillates left to have another try.\"";
+ next;
+ mes "\"Oh no, with all that trouble, I forgot to label your distillate.\"";
+ next;
+ mes "She holds up two ampullas.";
+ next;
+ mes "\"I hope, this one are yours. I'm sorry.\"";
+ next;
+ mes "\"If you feel ok, we could try it again.\"";
+ next;
+
+ menu
+ "I still feel a bit dizzy, so I don't want to do it now.", L_Usual,
+ "I'm ok. We can try, but please explain again.", L_Exp_Game,
+ "Let's start right now.", L_Game;
+
+state5:
+ mes "The nurse looks at you pitiful.";
+ mes "[Nurse]";
+ mes "\"Hello. I'm really sorry for causing you so much pain.\"";
+ next;
+ mes "\"But if we can suceed, you are a hero! I will be able to help a lot of people.\"";
+ next;
+ mes "\"Next time you might remember me to label the distillates right. I am sorry that it is screwed up again.\"";
+ next;
+ mes "\"There is enough stuff left for one last try.\"";
+ next;
+ mes "\"If we don't get it this time, you will have to get new ingredients.\"";
+ next;
+ mes "\"Do you want to have another try?\"";
+ next;
+
+ menu
+ "I still feel a bit dizzy, so I don't want to do it now.", L_Usual,
+ "I'm ok. We can try, but please explain again.", L_Exp_Game,
+ "Let's start right now.", L_Game;
+
+state6:
+ mes "The nurse looks at you pitiful.";
+ mes "[Nurse]";
+ mes "\"There is not enough stuff left for another try.\"";
+ next;
+ mes "\"We should try again, right?\"";
+ set @Q_poison, 1;
+ callsub S_Update_Var;
+
+ goto L_ExplainAgain1;
+
+state7: // geschafft
+ mes "[Nurse]";
+ mes "\"Thanks a lot, you can call yourself a true hero now!\"";
+ next;
+ mes "\"I am able to help the poisoned miners quite well now.\"";
+ next;
+ goto L_Usual;
+
+L_NotEnough:
+ mes "[Nurse]";
+ mes "\"This must be a missunderstanding. You don't have all the things I asked you for.\"";
+ if (@Q_poison == 1) goto L_ExplainAgain1;
+ if (@Q_poison == 2) goto L_ExplainAgain2;
+ // the following close *should* never be reached, but who knows, whoever will mess this script up!
+ close;
+
+quit:
+ close;
+
+S_Update_Var:
+ set QUEST_Forestbow_state,
+ (QUEST_Forestbow_state & ~(@Q_poison_MASK)
+ | (@Q_poison << @Q_poison_SHIFT));
+ return;
+
+L_Game_init_vars:
+ set @count, 24;
+ set @offset, 1;
+ return;
+
+L_Shuffle_Need:
+ callsub L_Game_init_vars;
+ set @hlNeed, @offset + rand(@count);
+ set @vnNeed, @offset + rand(@count);
+ set @stNeed, @offset + rand(@count);
+
+ set $NPC_NURSE,
+ ($NPC_NURSE & ~(BYTE_0_MASK | BYTE_1_MASK | BYTE_2_MASK)
+ | (@hlNeed << BYTE_0_SHIFT)
+ | (@vnNeed << BYTE_1_SHIFT)
+ | (@stNeed << BYTE_2_SHIFT));
+ return;
+
+L_Load_Need:
+ callsub L_Game_init_vars;
+ set @hlNeed, ($NPC_NURSE & BYTE_0_MASK) >> BYTE_0_SHIFT;
+ set @vnNeed, ($NPC_NURSE & BYTE_1_MASK) >> BYTE_1_SHIFT;
+ set @stNeed, ($NPC_NURSE & BYTE_2_MASK) >> BYTE_2_SHIFT;
+ return;
+
+L_Game_tooless:
+ mes "[Nurse]";
+ mes "\"That is nothing! So you need to put in there at least a small amount.";
+ goto L_choosePut;
+
+L_Game_toomuch:
+ mes "[Nurse]";
+ mes "\"This would be way too much for my scale. I don't want to break it.\"";
+ goto L_choosePut;
}
+
+
diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt
index 256c036c..fc80798c 100644
--- a/npc/009-2_Hurnscald/wyara.txt
+++ b/npc/009-2_Hurnscald/wyara.txt
@@ -30,7 +30,7 @@
goto L_Magic_purify_once;
if (@Q_status == @STATUS_PURIFY_TWICE)
goto L_Magic_purify_done;
-
+
mes "[Wyara the witch]";
if (!Sex)
mes "\"Greetings, fair traveller! What can I do for you?\"";
@@ -71,6 +71,7 @@ L_Question:
if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel;
if (@c == @QQ_IMP) goto L_Q_imp;
if (@c == @QQ_OLDWIZ) goto L_Q_old_wizard;
+ if (@c == @QQ_ASTRALSOUL)goto L_Q_astralsoul;
mes "[Wyara the Witch]";
mes "\"I fear that I can't help you with that.\"";
@@ -78,6 +79,15 @@ L_Question:
goto L_Main;
+L_Q_astralsoul:
+ mes "[Wyara the Witch]";
+ mes "\"The astral soul skill? Yes, I have heard about that. It can be taught by old and wise mages usually.\"";
+ next;
+ mes "\"You need lots of practise until you can handle the ability, and even more practises until you have the powers to teach it to someone else.\"";
+ 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.\"";
@@ -340,7 +350,7 @@ L_Magic_purify_explained:
goto L_Magic_purify_lacking;
if (countitem("MaggotSlime") < 20)
goto L_Magic_purify_lacking;
-
+
delitem "MauveHerb", 20;
delitem "MaggotSlime", 20;
getitem "PurificationPotion", 1;
@@ -390,7 +400,7 @@ L_Magic_purify_once:
goto L_Magic_purify_lacking;
if (countitem("MaggotSlime") < 20)
goto L_Magic_purify_lacking;
-
+
delitem "MauveHerb", 20;
delitem "MaggotSlime", 20;
getitem "PurificationPotion", 1;
diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt
index 595c1a9f..1c6487c0 100644
--- a/npc/011-1_Woodland/auldsbel.txt
+++ b/npc/011-1_Woodland/auldsbel.txt
@@ -20,7 +20,7 @@
set @Q_STATUS_STUDENT4, 8;
set @Q_STATUS_STUDENT5, 9;
set @Q_STATUS_STUDENT6, 10;
-
+
set @wants_sulphur, (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) // war quest
|| (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) >= 4); // Elanore's heal-Kadiya quest
@@ -508,12 +508,70 @@ L_question:
if (@c == @QQ_SAGATHA) goto L_Q_sagatha;
if (@c == @QQ_IMP) goto L_Q_imp;
if (@c == @QQ_OLDWIZ) goto L_Q_old_wizard;
+ if (@c == @QQ_ASTRALSOUL)goto L_Q_astralsoul;
mes "[Auldsbel the Wizard]";
mes "\"Let us talk about something else.\"";
next;
goto L_main_menu;
+L_Q_astralsoul:
+ if (!(getskilllv(SKILL_ASTRAL_SOUL)))
+ goto L_Q_astralsoul_L;
+ next;
+ mes "[Auldsbel the Wizard]";
+ mes "\"Oh that is a really useful focus. It will help you doing magic of all kinds.\"";
+ next;
+ mes "\"...uhm...\"";
+ next;
+ mes "\"Didn't I teach you the ability to focus on magic, did I?\"";
+ goto L_main_menu;
+
+L_Q_astralsoul_L:
+ mes "[Auldsbel the Wizard]";
+ mes "\"Oh that is a really useful focus. It will help you doing magic of all kinds.\"";
+ next;
+ mes "\"I can try to teach you this ability.\"";
+ next;
+ mes "\"But I will need some very expensive magical substances to focus your brain onto magic.\"";
+ next;
+ mes "\"It is about... erm 11300 GP. Do you have so much money?\"";
+ menu "Here you are", L_Q_astralsoul_L1,
+ "I will get it.", -;
+ goto L_main_menu;
+
+L_Q_astralsoul_L1:
+ if (zeny < 11300)
+ goto L_Q_astralsoul_nz;
+ set zeny, zeny - 11300;
+ mes "[Auldsbel the Wizard]";
+ mes "\"Okay, listen:\"";
+ next;
+ mes "\"Some parts of your brain is still unused. These parts will now get the ability to get focused to magic.\"";
+ next;
+ mes "\"To do so, think of a magic spell!\"";
+ next;
+ mes "Auldsbel mumbles some invocations";
+ next;
+ set @SUP_lvl, 1;
+ set @SUP_id, SKILL_ASTRAL_SOUL;
+ set @SUP_name$, "Astral Soul";
+ set @SUP_xp, 2500;
+ callfunc "SkillUp";
+ next;
+ mes "[Auldsbel the Wizard]";
+ mes "\"Now go and try to find someone, who can actually activate that focus.\"";
+ next;
+ mes "\"You have the powers to focus on magic, but you need to get magic focussed now.\"";
+ goto L_main_menu;
+
+L_Q_astralsoul_nz:
+ mes "[Auldsbel the Wizard]";
+ mes "\"When learning powerful stuff, you should try to make not so many jokes.\"";
+ next;
+ mes "\"Come back, when you have the money.\"";
+ goto L_main_menu;
+
L_Q_old_wizard:
mes "[Auldsbel the Wizard]";
mes "\"I'm still not sure what exactly to make of him. At first appearance, he seems like a senile old man, but there can be no doubt that he has-- or at least had, at some point-- a very deep understanding of magic.\"";
@@ -955,7 +1013,7 @@ L_learn_spell:
mes "\"Oh, actually, make sure to write that down. You should keep track of all spells and spell fragments, really. I always keep a notebook handy, in fact.\"";
next;
set @Q_main_status, @Q_STATUS_INITIATION;
- callsub S_update_var;
+ callsub S_update_var;
goto L_main_menu;
LL_repeat_spell:
@@ -1219,7 +1277,7 @@ LL_student_4:
menu
"What was the invocation again?", LL_student_3_repeat,
"No, still working on it...", L_main_menu,
- "Yes.", -;
+ "Yes.", -;
if (countitem("ConcentrationPotion") < 1)
goto LL_student_4_no_potion;
diff --git a/npc/013-1_Woodland_hills/sagatha.txt b/npc/013-1_Woodland_hills/sagatha.txt
index f5e2f606..84df4fe6 100644
--- a/npc/013-1_Woodland_hills/sagatha.txt
+++ b/npc/013-1_Woodland_hills/sagatha.txt
@@ -260,7 +260,7 @@ L_teach:
mes "[Sagatha the Witch]";
mes "\"Not yet. You have to ask the mana seed to give you more power.\"";
next;
- goto L_main;
+ goto L_main;
L_practice:
mes "[1000 experience points]";
@@ -347,12 +347,27 @@ L_Question:
if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel;
if (@c == @QQ_IMP) goto L_Q_imp;
if (@c == @QQ_OLDWIZ) goto L_Q_old_wizard;
+ if (@c == @QQ_ASTRALSOUL)goto L_Q_astralsoul;
mes "[Sagatha the Witch]";
mes "\"That doesn't concern you.\"";
next;
goto L_main;
+L_Q_astralsoul:
+ mes "[Sagatha the Witch]";
+ mes "\"Yes, there is a way to improve your magic.\"";
+ next;
+ mes "\"Did you ever hear about focusing?\"";
+ next;
+ mes "\"It is a mental ability, which improves you at a certain focused skill.\"";
+ next;
+ mes "\"Yes, I am focused on nature magic, but I cannot teach focusing. That is another realm of magic. Just a few people can really focus your brain to a specific art of magic.\"";
+ next;
+ mes "\"Maybe you should ask some other people experienced in magic.\"";
+ next;
+ goto L_main;
+
L_Q_old_wizard:
mes "[Sagatha the Witch]";
mes "\"A kind and wise wizard.\"";
diff --git a/npc/013-2_Magic_house/wizard.txt b/npc/013-2_Magic_house/wizard.txt
index e74b15ec..f3964cc0 100644
--- a/npc/013-2_Magic_house/wizard.txt
+++ b/npc/013-2_Magic_house/wizard.txt
@@ -44,10 +44,19 @@ L_new_student:
mes "\"Studying is always an excellent use of one's mind! I fear that I can't offer too much assistance to you, however. But if you are interested, I could perhaps teach you a simple spell?\"";
next;
- menu
- "That would be very kind of you!", -,
+ // check if the player has the knowledge of any skill
+ if (!(getskilllv(SKILL_POOL)))
+ menu
+ "That would be very kind of you!", L_teachspell,
+ "No, but thank you!", nothx;
+
+ if (getskilllv(SKILL_POOL))
+ menu
+ "That would be very kind of you!", L_teachspell,
+ "Actually I am looking for someone teaching me some more magic skills.", L_astralsoul,
"No, but thank you!", nothx;
+L_teachspell:
mes "[Old Wizard]";
mes "\"This one may not seem too powerful, but it can be quite handy; it's the 'hide' spell. It will shield you from some forms of detection magic.\"";
next;
@@ -71,6 +80,46 @@ L_new_student:
mes "\"I'm not sure if you are experienced enough to cast it yet, though. You may need to first learn astral magic.\"";
close;
+L_astralsoul:
+ mes "[Old Wizard]";
+ mes "\"Oh yes, there are lots of ways to improve your magic. Skills -some people say mental focus for that- are another way to improve your magic. Of course learning more and more spells is also a need for good mages.\"";
+ next;
+ mes "\"I can teach you the ability to focus on magical stuff.\"";
+ next;
+ mes "\"To do so, I am in need of a pearl and about 100 acorns.\"";
+
+ menu "Here we go.", -,
+ "Ok be right back. I'll get them", nothx;
+
+ if (countitem("Pearl") < 1 || countitem("Acorn") < 100) goto L_NotEnough;
+ delitem "Pearl", 1;
+ delitem "Acorn", 100;
+
+ mes "[Old Wizard]";
+ mes "\"Okay, listen:\"";
+ next;
+ mes "\"Some parts of your brain is still unused. These parts will now get the ability to get focused to magic.\"";
+ next;
+ mes "\"To do so, think of a magic spell!\"";
+ next;
+ mes "The old wizard mumbles some invocations";
+ next;
+ set @SUP_lvl, 1;
+ set @SUP_id, SKILL_ASTRAL_SOUL;
+ set @SUP_name$, "Astral Soul";
+ set @SUP_xp, 2500;
+ callfunc "SkillUp";
+ mes "\"Now go and try to find someone, who can actually activate that focus.\"";
+ next;
+ mes "\"You have the powers to focus on magic, but you need to get magic focussed now.\"";
+ close;
+
+L_NotEnough:
+ mes "[Old Wizard]";
+ mes "\"Please learn to count.\"";
+ next;
+ mes "\"When you are done with that, come back again.\"";
+ close;
ok:
mes "[Old Wizard]";
mes "\"Beware the flying notes though, some of them are really dangerous. I haven't been able to persuade them to get back into their book. And avoid the mirror, it's been acting strange lately.\"";
diff --git a/npc/016-1_Woodland/_import.txt b/npc/016-1_Woodland/_import.txt
index 6d6c7bc9..cab6a4ac 100644
--- a/npc/016-1_Woodland/_import.txt
+++ b/npc/016-1_Woodland/_import.txt
@@ -1,4 +1,5 @@
map: 016-1.gat
npc: npc/016-1_Woodland/_mobs.txt
npc: npc/016-1_Woodland/_warps.txt
+npc: npc/016-1_Woodland/gwendolyn.txt
npc: npc/016-1_Woodland/monsters.txt
diff --git a/npc/016-1_Woodland/gwendolyn.txt b/npc/016-1_Woodland/gwendolyn.txt
new file mode 100644
index 00000000..c81fefd1
--- /dev/null
+++ b/npc/016-1_Woodland/gwendolyn.txt
@@ -0,0 +1,530 @@
+//#################################################################################
+//#
+//# This script is for gaining the skill "Hawk's Eye"
+//#
+//# Needed: Forest Bow Quest
+//#
+//# Quest1: Proving Dexterity
+//# Needed: 10 cave snake eggs, 10 snake eggs, 10 mountain snake eggs, 10 grass snake eggs
+//# Reward: 10000 Exp
+//# Quest2: Hitting the Target
+//# Needed: win the minigame and hit the target depending on the wind, dex and agi
+//# Reward: Skill Hawk's Eye
+//#
+//# Variables used: @QUEST_Forestbow_state, nibble 6
+//#
+//# This nibble will have these values:
+//# 0, state0: never talked to Gwendolyn
+//# 1, state1: talked with her, but not a student yet
+//# 2, state2: student, but no bow (from alan of course)
+//# 3, state3: heard first lesson, she is waiting for the snake eggs
+//# 4, state4: quest done, but too young, or having the ability for skills not learned
+//# 5, state5: you are ready to do the targeting minigame
+//# 6, state6: you did the minigame
+//#################################################################################
+
+016-1.gat,33,45,0 script Gwendolyn 182, {
+ // schoolfee in gp
+ set @SCHOOLFEE, 25000;
+ // how many eggs do you need of each kind?
+ set @EGGS_AMOUNT, 10;
+ // experience for eggs
+ set @QUEST_EGG_EXP, 10000;
+ // The needed level for the minigame:
+ set @BASELEVEL_GAME, 50;
+ // experience gained for hitting the bullseye:
+ set @QUEST_HAWK_EXP, 10000;
+
+ set @Q_hawkseye_MASK, NIBBLE_6_MASK;
+ set @Q_hawkseye_SHIFT, NIBBLE_6_SHIFT;
+
+ set @Q_hawkseye, (QUEST_Forestbow_state & @Q_hawkseye_MASK) >> @Q_hawkseye_SHIFT;
+
+ set @Q_forestbow_MASK, NIBBLE_0_MASK;
+ set @Q_forestbow_SHIFT, NIBBLE_0_SHIFT;
+
+ set @FORESTBOW, ((QUEST_Forestbow_state) & @Q_forestbow_MASK) >> @Q_forestbow_SHIFT;
+
+ if (@Q_hawkseye == 6) goto state6;
+ if (@Q_hawkseye == 5) goto state5;
+ if (@Q_hawkseye == 4) goto state4;
+ if (@Q_hawkseye == 3) goto state3;
+ if (@Q_hawkseye == 2) goto state2;
+ if (@Q_hawkseye == 1) goto state1;
+
+state0:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Hello, and welcome to my reopened School of Archery. My name is Gwendolyn Bowmaker; I'm the granddaughter of the famous Gwendolyn Bowmaker.\"";
+ next;
+ mes "\"As you surely know, she was the greatest archer this world had ever seen and opened this School of Archery together with her husband Simon Bowmaker. He was able to make the most well-balanced and the finest bows.\"";
+ next;
+ mes "\"I am now back from my training journey and want to continue with my family's tradition, to teach the Way of Archery.\"";
+ next;
+ mes "\"Are you interested in becoming a student of Archery?\"";
+ next;
+ menu
+ "I want to become an archer!", -,
+ "I'm not interested right now.", no_student;
+fee:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Wonderful! The school's fee is " + @SCHOOLFEE + ".\"";
+ next;
+ menu
+ "That's a lot, but I think it will be worth it.", -,
+ "I'm not sure I want to spend that much.", no_student;
+
+ if (zeny < @SCHOOLFEE) goto no_money;
+
+ set zeny, zeny - @SCHOOLFEE;
+ set @Q_hawkseye, 2;
+ callsub S_Update_Var;
+
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"The first thing you need is, obviously, a bow. You should not use any you come across, but a high quality one. I think it would be best to go to Alan in Hurnscald. He is my cousin, and knows how to make Forest Bows of exquisite quality. \"";
+
+ if (countitem("ForestBow") < 1) close;
+ next;
+ menu
+ "I already have a Forest Bow.", -;
+
+state2:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Let me see your bow.\"";
+ next;
+
+ if (countitem("ForestBow") < 1) goto no_bow;
+
+ if (@FORESTBOW < 5) goto bow_bought;
+
+ set @Q_hawkseye, 3;
+ callsub S_Update_Var;
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Very well, this looks fine. It is time for your first lesson. \"";
+ next;
+
+lesson:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"The advantage of fighting with a ranged weapon is that you can stay out of the enemy's range. So there is no need to spend training on your resistibility.\"";
+ next;
+ mes "\"But remember: this makes you much more vulnerable, so watch your step and don't stumble into your enemy's attack.\"";
+ next;
+ mes "\"Also your strength doesn't matter much. You might be able to shoot a little harder, but not so much as to make it important.\"";
+ next;
+ mes "\"The most important thing to improve is your dexterity. When you use a bow, it is your dexterity that determines if you are able to hit your enemy where it hurts most.\"";
+ next;
+ mes "\"Also worth mentioning is how to improve your ability to shoot fast. You need to be agile to grab a new arrow from your quiver and aim for the next shot before your enemy has recoverd from your last.\"";
+ next;
+
+state3:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"To demonstrate that you understood what I'm trying to teach you, you should go and fight against some snakes. To prove me your results, bring me ten each of cave snake eggs, snake eggs, mountain snake eggs and grass snake eggs.\"";
+ next;
+
+ menu
+ "Can you please repeat your lesson?", lesson,
+ "I will go and hunt some snakes.", quit,
+ "I have what you want.", -;
+
+ if (countitem("CaveSnakeEgg") < @EGGS_AMOUNT ||countitem("SnakeEgg") < @EGGS_AMOUNT ||countitem("MountainSnakeEgg") < @EGGS_AMOUNT ||countitem("GrassSnakeEgg") < @EGGS_AMOUNT) goto not_enough_eggs;
+
+ delitem "CaveSnakeEgg", @EGGS_AMOUNT;
+ delitem "SnakeEgg", @EGGS_AMOUNT;
+ delitem "MountainSnakeEgg", @EGGS_AMOUNT;
+ delitem "GrassSnakeEgg", @EGGS_AMOUNT;
+
+ getexp @QUEST_EGG_EXP, 0;
+
+ set @Q_hawkseye, 4;
+ callsub S_Update_Var;
+
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Very well. That will make a great meal.\"";
+ next;
+
+state4:
+ if (baselevel < @BASELEVEL_GAME) goto not_ready;
+ if (!(getskilllv(SKILL_POOL))) goto not_ready;
+ mes "Gwendolyn takes an analyzing look at you. Then she noods.";
+ next;
+
+ set @Q_hawkseye, 5;
+ callsub S_Update_Var;
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Ok. You have made a great progress. I think you are ready for further tasks.\"";
+ next;
+
+game_explain:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"As you might have noticed, it depends on many circumstances if your arrow finds its target. Your shot may be too powerful or too weak, so the arrow goes far beyond your target or hits the ground before it reaches its destination.\"";
+ next;
+ mes "\"The greater the distance to your target is, the more important is the strength and direction of the wind. Even if you are exploring a cave, there might be air flow caused by the corners in the cave.\"";
+ next;
+ mes "\"Ok, you can see that target over there? I will tell you how strong the wind blows and from which direction. Then you will try to hit the target by moving right or left and decide how powerful you want to shoot.\"";
+ next;
+
+state5:
+ // needed for the minigame:
+ set @wdX, 0; // wind direction x-coordinate, rand
+ set @wdY, 0; // wind direction y-coordinate, rand
+ // set @wp, 0; // windpower
+ set @spX, 0; // start position x-coordinate, player decision
+ // set @spY, 0; // start position y-coordinate, const
+ set @sp, 0; // shotpower, player decision
+ //set @targetX, 0; // target position, const
+ //set @targetY, 20; // target position, const
+ set @pointX, 0; // point the player hits, x-coordinate
+ set @pointY, 0; // point the player hits, y-coordinate
+ set @wdIndex, 0;
+ //
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Show me what you can!\"";
+ next;
+
+ menu
+ "Can you please explain the task again?", game_explain,
+ "I'm ready, let's start!", -,
+ "I'm sorry, I will come back later.", quit;
+
+game:
+ if (countitem("ForestBow") < 1) goto no_bow;
+ if (countitem("Arrow") < 1) goto no_arrows;
+ delitem "Arrow", 1;
+ mes "You go to the training field and stand exactly on the same level with the target. The target is located about 43 feet north of you.You take one arrow and look at Gwendolyn.";
+ next;
+
+ // possibility for wdX and wdY to become zero is reduced, so windless status is less often
+ set @wdX, rand(9) - 4;
+ if (@wdX != 2 && @wdX !=-2) set @wdX, rand(9) - 4;
+ if (@wdX == 0) set @wdX, rand(9) - 4;
+
+ set @wdY, rand(9) - 4;
+ if (@wdY != 2 && @wdY !=-2) set @wdY, rand(9) - 4;
+ if (@wdY == 0) set @wdY, rand(9) - 4;
+
+ // wind direction array, where the wind blows to:
+ // 123
+ // 456
+ // 789
+ //here is where the wind comes from, that's why it is the opposite.
+ setarray @wd$,"error1, please report", "southeast", "south", "southwest", "east", "error2, please report", "west", "northeast", "north", "northwest" ;
+ set @paramX, @wdX;
+ set @paramY, @wdY;
+ callsub S_getDirection;
+ set @wdIndex, @returnIndex;
+
+ set @wp_sq, (@wdX * @wdX) + (@wdY * @wdY);
+
+ if (@wp_sq == 0) goto wp0;
+ if (@wp_sq < 3) goto wp1;
+ if (@wp_sq < 9) goto wp2;
+ if (@wp_sq < 19) goto wp3;
+ goto wp4;
+
+
+wp0:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"You're lucky. It is windless now.\"";
+ next;
+ goto choose_start_pos;
+wp1:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"There is a slight breeze coming from "+ @wd$[@wdIndex] + ".\"";
+ next;
+ goto choose_start_pos;
+wp2:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"The wind is blowing from "+ @wd$[@wdIndex] + ".\"";
+ next;
+ goto choose_start_pos;
+wp3:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Right now, there is a strong wind blowing from " + @wd$[@wdIndex] + ".\"";
+ next;
+ goto choose_start_pos;
+wp4:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Here we have a squall from "+ @wd$[@wdIndex] + ".\"";
+ next;
+ goto choose_start_pos;
+
+choose_start_pos:
+ mes "Do you want to go to the left, the right or stay where you are?";
+ next;
+
+ menu
+ "I want to move left.", step_left,
+ "I go right.", step_right,
+ "I stay.", step_no,
+ "I will try it later.", quit;
+
+step_no:
+ set @spX, -1;
+ mes "You stay where you are..";
+ next;
+ goto choose_shotpower;
+
+step_left:
+ mes "How many steps?";
+ next;
+ menu
+ "1", step_left1,
+ "2", step_left2,
+ "3", step_left3,
+ "4", step_left4;
+step_left1:
+ set @spX, -1;
+ mes "You take one step to the left.";
+ next;
+ goto choose_shotpower;
+step_left2:
+ set @spX, -2;
+ mes "You take two steps to the left.";
+ next;
+ goto choose_shotpower;
+step_left3:
+ set @spX, -3;
+ mes "You take three steps to the left.";
+ next;
+ goto choose_shotpower;
+step_left4:
+ set @spX, -4;
+ mes "You take four steps to the left.";
+ next;
+ goto choose_shotpower;
+
+step_right:
+ mes "How many steps?";
+ next;
+ menu
+ "1", step_right1,
+ "2", step_right2,
+ "3", step_right3,
+ "4", step_right4;
+step_right1:
+ set @spX, 1;
+ mes "You take one step to the right.";
+ next;
+ goto choose_shotpower;
+step_right2:
+ set @spX, 2;
+ mes "You take two steps to the right.";
+ next;
+ goto choose_shotpower;
+step_right3:
+ set @spX, 3;
+ mes "You take three steps to the right.";
+ next;
+ goto choose_shotpower;
+step_right4:
+ set @spX, 4;
+ mes "You take four steps to the right.";
+ next;
+ goto choose_shotpower;
+
+choose_shotpower:
+ mes "How powerfully do you want to shoot?";
+ next;
+
+ menu
+ "very weak shot", -,
+ "rather weak shot", -,
+ "weak shot", -,
+ "somewhat weak shot", -,
+ "medium shot", -,
+ "somewhat powerful shot", -,
+ "powerful shot", -,
+ "rather powerful shot", -,
+ "very powerful shot", -;
+
+ // we have 9 menu entries, so scale @menu, which is in range 1-9, to a scale in -4 to +4
+ set @sp, @menu - 5;
+ // calculate where you hit. You range is in [-8, 8] in X and Y as well
+ set @pointX, @wdX + @spX;
+ set @pointY, @wdY + @sp;
+
+ if( @pointX==0 && @pointY==0 ) goto target_hit;
+
+ //set @targethit to these numbers:
+ //1,2,3 for left above, above, right above,
+ //4,5,6 for left, hit, right
+ //7,8,9 for lower left, below, lower right;
+ setarray @target_direction$, "error3, please report", "left above", "above", "right above","left","error4, please report","right","lower left","below","lower right";
+
+ set @paramX , @pointX;
+ set @paramY , @pointY;
+ callsub S_getDirection;
+ set @targethit, @returnIndex;
+
+ //now check how close
+ //get the distance squared:
+ // so it is in range 0 - 64:
+ // 0 is hit
+ // < 5 is very close
+ // <17 is close
+ // rest is a quite fucking shot
+ set @target_dist_sq, (@pointX * @pointX) + (@pointY*@pointY);
+
+ if (@target_dist_sq < 5) goto target_veryclose;
+ if (@target_dist_sq < 17) goto target_close;
+
+ //here are bad shots:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"D'oh, what a terrible shot!\"";
+ next;
+ mes "\"Do you even know what a bow is?\"";
+ next;
+ mes "\"That was far "+@target_direction$[@targethit]+".\"";
+ next;
+ goto game;
+
+target_close:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"That was "+@target_direction$[@targethit]+".\"";
+ next;
+ mes "\"I suggest some training.\"";
+ next;
+ goto game;
+
+target_veryclose:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"That was quite close. Impressive!\"";
+ next;
+ mes "\"It was a little "+@target_direction$[@targethit]+".\"";
+ next;
+ mes "\"But you did not hit... have another try.\"";
+ next;
+ //like a coin toss: 2 possibilites, the same chance for both:
+ //if(0 == rand(2)) goto game;
+ mes "\"Hurry up, before the wind changes.\"";
+ next;
+ goto choose_start_pos;
+
+target_hit:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"Wonderful! That was great! Directly hit the bull's eye!\"";
+ next;
+ mes "\"Seems like you did it!\"";
+ next;
+ mes "\"Let me inspect it...\" She walks to the target.";
+ next;
+ if( rand(500) > (2*readparam(bDex) + readparam(bAgi))) goto target_nohit;
+ set @Q_hawkseye, 6;
+ callsub S_Update_Var;
+
+ setskill SKILL_MALLARDS_EYE, 1;
+ getexp @QUEST_HAWK_EXP, 0;
+
+ mes "\"You proved that you are worthy to call yourself a graduate of the School of Archery.\"";
+ next;
+ mes "\"But remember, there is always something new to learn. And you should not let your training down in order to keep and improve your abilities.\"";
+ close;
+
+target_nohit:
+ mes "\"Ohh! Half a fingerbreadth aside.\"";
+ next;
+ mes "\"That is quite impressive, but you can perform better with more training.\"";
+ next;
+ goto game;
+
+state6:
+ mes "[Gwendolyn Bowmaker]";
+ mes "\"You really have a reason to be proud.\"";
+ close;
+
+state1:
+ mes "[Gwendoly Bowmaker]";
+ mes "\"Welcome back. Did you decide to follow the Way of Archery?\"";
+ next;
+ menu
+ "I want to become an archer!", fee,
+ "I am not interested", -;
+
+no_student:
+ mes "\"That's a pity. Well, if you change your mind, come back any time.\"";
+ set @Q_hawkseye, 1;
+ callsub S_Update_Var;
+ close;
+
+no_money:
+ mes "\"I am sorry, but it seems, that you don't have enough money. Come back, when you have reorganized your finances.\"";
+ set @Q_hawkseye, 1;
+ callsub S_Update_Var;
+ close;
+
+no_bow:
+ mes "\"As an archer, you should carry your bow always with you. Go and get it.\"";
+ close;
+
+bow_bought:
+ mes "\"You just bought it? You won't learn anything from that. To understand the nature of this bow, you have to collect the needed material by yourself. Only this way you will get a feeling of what it means to use such a weapon. \"";
+ next;
+ mes "\"The best thing would be to let you make the bow by yourself. But I guess, that would go to far. And it would take ages to get a high quality bow.\"";
+ next;
+ mes "\"Ok, go to Alan and come back with a bow made out of the logs you collected.\"";
+ close;
+
+not_enough_eggs:
+ mes "\"Maybe I should also give you a lesson in how to count? You haven't enough.\"";
+ close;
+
+not_ready:
+ mes "\"I am pleased about your progrees, but you are not ready for the next step yet. Go and do some more training, before you come back. Remember also: It is wise to speak with people you meet on your journey, there is always something new to learn.\"";
+ close;
+
+no_arrows:
+ mes "Gwendolyn sighs and shake her head.";
+ next;
+ mes "\"Another lecture: Take always enough arrows with you. Go and come back, when you are equipped adequately.\"";
+ close;
+
+quit:
+ close;
+
+S_Update_Var:
+ set QUEST_Forestbow_state,
+ (QUEST_Forestbow_state & ~(@Q_hawkseye_MASK)
+ | (@Q_hawkseye << @Q_hawkseye_SHIFT));
+ return;
+
+S_getDirection:
+ // get @paramX @paramY as parameters
+ // returns an index where these parameters are in relation to origin
+ // 123
+ // 456 whereas 5 is the origin. (3,6,9 there is paramX>0); (1,2,3 there is paramY>0)
+ // 789
+ //first check the quadrants and after check more precisely
+ if(@paramX>0 && @paramY>0) set @returnIndex, 3;
+ if(@paramX>0 && @paramY<0) set @returnIndex, 9;
+ if(@paramX<0 && @paramY>0) set @returnIndex, 1;
+ if(@paramX<0 && @paramY<0) set @returnIndex, 7;
+
+ //straight left
+ if ( (@paramX < 0) && (@paramY >= @paramX/2) && (-@paramY >= @paramX/2) ) set @returnIndex, 4;
+
+ //straight right
+ if ( (@paramX > 0) && (@paramY <= @paramX/2) && (-@paramY <= @paramX/2) ) set @returnIndex, 6;
+
+ //straight above
+ if ( (@paramY > 0) && (@paramX <= @paramY/2) && (-@paramX <= @paramY/2) ) set @returnIndex, 2;
+
+ //straight below
+ if ( (@paramY < 0) && (@paramX >= @paramY/2) && (-@paramX >= @paramY/2) ) set @returnIndex, 8;
+
+ //check the origin, because the origin is found by the "straight" lines as well. (should not, but is.. maybe a bug?)
+ if( @paramX==0 && @paramY==0 ) set @returnIndex, 5;
+ return;
+}
+
+////////////////////////////////////
+// rand(X) returns a random number uniformly distributed between in range [0; X-1]
+//
+// A=rand(2) => (0,1) 50% for 0 50% for 1
+// B=rand(2) => (0,1) 50% for 0 50% for 1
+// C=rand(2) => (0,1) 50% for 0 50% for 1
+// D=rand(2) => (0,1) 50% for 0 50% for 1
+//
+// A+B => 0+0, 1+0, 0+1, 1+1 => [0,1,2] 25% for 0 50 % for 1 25 % for 2
+//
+// rand(3) => [0,1,2] 33% for 0 33% for 1 33% for 2
+
+
diff --git a/npc/018-2_Woodland_mining_camp/caul.txt b/npc/018-2_Woodland_mining_camp/caul.txt
index cd166796..c0b84544 100644
--- a/npc/018-2_Woodland_mining_camp/caul.txt
+++ b/npc/018-2_Woodland_mining_camp/caul.txt
@@ -35,10 +35,11 @@
set @C_monster_oil, 20;
set @C_mopox_cure, 21;
set @C_nohmask, 22;
- set @C_bye, 23;
+ set @C_dementiapotion, 23;
+ set @C_bye, 24;
- setarray @choice$, "One", "Five", "Ten", "Fifty", "", "", "", "";
- setarray @choice_idx, 1, 5, 10, 50, 0, 0, 0, 0;
+ setarray @choice$, "One", "Five", "Ten", "Fifty", "", "", "", "", "";
+ setarray @choice_idx, 1, 5, 10, 50, 0, 0, 0, 0, 0;
set @choices_nr, 4;
@@ -69,6 +70,15 @@ L_M_no_mopox_cure:
L_M_no_inspector:
+ if (!(MAGIC_FLAGS & MFLAG_KNOWS_UNFOCUS_RECIPE))
+ goto L_M_no_dempo;
+
+ set @choice_idx[@choices_nr], @C_dementiapotion;
+ set @choice$[@choices_nr], "I would like to brew Dementia Potion";
+ set @choices_nr, @choices_nr + 1;
+
+L_M_no_dempo:
+
set @choice_idx[@choices_nr], @C_bye;
set @choice$[@choices_nr], "Never mind";
set @choices_nr, @choices_nr + 1;
@@ -91,6 +101,8 @@ L_M_no_inspector:
goto L_mopox_cure_start;
if (@choice == @C_nohmask)
goto L_NohMask;
+ if (@choice == @C_dementiapotion)
+ goto L_DemPotion;
if (@choice == @C_bye)
goto L_close;
@@ -121,12 +133,12 @@ L_CraftLoop:
if (@throw >= 5) set @result, 2;
if (@throw >= 15) set @result, 3;
if (@throw >= 35) set @result, 4;
-
+
if (@result == 1) set @result1, @result1 + 1;
if (@result == 2) set @result2, @result2 + 1;
if (@result == 3) set @result3, @result3 + 1;
if (@result == 4) set @result4, @result4 + 1;
-
+
set @a, @a - 1;
if (@a > 0) goto L_CraftLoop;
@@ -259,7 +271,7 @@ L_monster_oil_start_brew:
"blue",
"purple",
"green",
- "gray";
+ "gray";
set @intensity, 1;
setarray @intensities$,
@@ -691,6 +703,314 @@ L_mopox_cure_win:
L_mopox_cure_win_quick:
close;
+L_DemPotion:
+ mes "[Caul]";
+ mes "\"Ok, you do know this potion is one of the most dangerous potions brewed? My cauldron is empty, you can try it yourself.\"";
+ next;
+ mes "Caul goes three steps away and watches your actions carefully.";
+ menu
+ "Please explain me what you know about that potion.", L_explain_dempo,
+ "Ok, I will start brewing.", L_brew_dempo_init,
+ "Nevermind", -;
+ close;
+L_explain_dempo:
+ mes "[Caul]";
+ mes "\"Hrrm. I have heard of that potion. I hope I can remember all the stuff needed.\"";
+ next;
+ mes "\"Basically this potion is a balancing between death and life. You see a balance between knowlegde and forgetting.\"";
+ next;
+ mes "\"So to get it balanced, we need ingredients for both sides.\"";
+ next;
+ mes "\"For the death and forgetting side we can use bones. Although bones do not work good. Best results we would get with a diseased heart of zombies. Of course we can use undead ears and skulls as well.\"";
+ next;
+ mes "\"For the life side we can use fresh mauve herbs. But life stones would be even better. Roots will do as well. Although these must be really fresh to show effect.\"";
+ next;
+ mes "\"Brewing such a powerful potion is dangerous. That is why you will need to do it yourself. I will try to assist you as best as I can.\"";
+ next;
+ mes "\"I don't know exactly, but there is a slight chance of exploding all time.\"";
+ next;
+ mes "\"The color of the mixture will give you a quite good impression what you need to do.\"";
+ mes "\"And to get that potion working, we need to stabilize it with a pearl at the end\"";
+ next;
+ mes "\"Ah yes the color will be in a range of really dark black to bright shining white. In between it is grey in different nuances.\"";
+ mes "\"When it is calm grey, the finalisation with a pearl will work best, so I have heard.\"";
+ next;
+ goto L_DemPotion;
+
+L_brew_dempo_init:
+ if ((countitem("BottleOfWater") == 0) || (countitem("Bone") == 0) || (countitem("Lifestone") == 0) || (countitem("Pearl") == 0))
+ goto L_dempo_noinit;
+ delitem "BottleOfWater", 1;
+ delitem "Bone", 1;
+ delitem "Lifestone", 1;
+
+ set @finish_dempo, 0;
+ // color can be either black or white at the beginning.
+ // with a slight randomness in there.
+ set @dempo_color, rand(10);
+ if (rand(2)==0)
+ set @dempo_color, @dempo_color + 90 ;
+ mes "To start with that potion you put in the cauldron a bone, a bottle of water and a lifestone.";
+ next;
+ goto L_brew_dempo;
+
+L_dempo_noinit:
+ mes "[Caul]";
+ mes "\"Hrrm. Usually you start that potion with a bone, a bottle of water and a lifestone.\"";
+ mes "\"I'd propose you do it exactly that way. You see maybe it would even work with a skull and a healing potion, but since we don't know, and I don't want to repair my cauldron again, please don't try other solutions.\"";
+ next;
+ mes "\"Please use only this way to start the recipe: a bone, a bottle of water and a lifestone. In this order!\"";
+ mes "\"Ah, and of course you will need at least one pearl with you. This pearl is needed to finalize the potion.\"";
+ close;
+
+L_brew_dempo:
+ callsub L_check_explosion;
+
+ callsub L_calc_dempo_color;
+ mes "After a little while of cooking you see its color turning into " + @dempo_color_S$+ ".";
+ next;
+
+ setarray @choice_idx, 0,0,0,0,0,0,0,0,0,0,0;
+ setarray @choice$, "","","","","","","","","","","";
+
+ set @C_root, 12;
+ set @C_mauve, 13;
+ set @C_lifestone, 14;
+ set @C_diseasedheart, 15;
+ set @C_bone, 16;
+ set @C_skull, 17;
+ set @C_undeadear, 18;
+ set @C_pearl, 19;
+ set @C_nevermind, 20;
+
+ // counter of avalable answers
+ set @choices_nr, 0;
+
+ if (countitem("Root") == 0) goto L_noroots;
+ set @choice_idx[@choices_nr], @C_root;
+ set @choice$[@choices_nr], "Add a root";
+ set @choices_nr, @choices_nr + 1;
+L_noroots:
+ if (countitem("MauveHerb") == 0) goto L_nomauve;
+ set @choice_idx[@choices_nr], @C_mauve;
+ set @choice$[@choices_nr], "Add a mauve herb";
+ set @choices_nr, @choices_nr + 1;
+L_nomauve:
+ if (countitem("Lifestone") == 0) goto L_nolifestone;
+ set @choice_idx[@choices_nr], @C_lifestone;
+ set @choice$[@choices_nr], "Add a lifestone";
+ set @choices_nr, @choices_nr + 1;
+L_nolifestone:
+ if (countitem("DiseasedHeart") == 0) goto L_noheart;
+ set @choice_idx[@choices_nr], @C_diseasedheart;
+ set @choice$[@choices_nr], "Add a diseased heart";
+ set @choices_nr, @choices_nr + 1;
+L_noheart:
+ if (countitem("Bone") == 0) goto L_nobone;
+ set @choice_idx[@choices_nr], @C_bone;
+ set @choice$[@choices_nr], "Add a bone";
+ set @choices_nr, @choices_nr + 1;
+L_nobone:
+ if (countitem("DiseasedHeart") == 0) goto L_noskull;
+ set @choice_idx[@choices_nr], @C_skull;
+ set @choice$[@choices_nr], "Add a skull";
+ set @choices_nr, @choices_nr + 1;
+L_noskull:
+ if (countitem("UndeadEar") == 0) goto L_noear;
+ set @choice_idx[@choices_nr], @C_undeadear;
+ set @choice$[@choices_nr], "Add an undead ear";
+ set @choices_nr, @choices_nr + 1;
+L_noear:
+ if (countitem("Pearl") == 0) goto L_nopearl;
+ set @choice_idx[@choices_nr], @C_pearl;
+ set @choice$[@choices_nr], "Finalize with a pearl.";
+ set @choices_nr, @choices_nr + 1;
+L_nopearl:
+ set @choice_idx[@choices_nr], @C_nevermind;
+ set @choice$[@choices_nr], "Nevermind and leave";
+
+ menu
+ @choice$[0],-,
+ @choice$[1],-,
+ @choice$[2],-,
+ @choice$[3],-,
+ @choice$[4],-,
+ @choice$[5],-,
+ @choice$[6],-,
+ @choice$[7],-,
+ @choice$[8],-,
+ @choice$[9],-,
+ @choice$[10],-;
+
+ set @menu, @menu - 1;
+ if (@choice_idx[@menu] == 0)
+ goto L_brew_dempo;
+ if ((countitem("Root") != 0) && (@choice_idx[@menu] == @C_root))
+ goto L_useroot;
+ if ((countitem("MauveHerb") != 0) && (@choice_idx[@menu] == @C_mauve))
+ goto L_usemauve;
+ if ((countitem("Lifestone") != 0) && (@choice_idx[@menu] == @C_lifestone))
+ goto L_uselifestone;
+ if ((countitem("DiseasedHeart") != 0) && (@choice_idx[@menu] == @C_diseasedheart))
+ goto L_usediseasedheart;
+ if ((countitem("Bone") != 0) && (@choice_idx[@menu] == @C_bone))
+ goto L_usebone;
+ if ((countitem("Skull") != 0) && (@choice_idx[@menu] == @C_skull))
+ goto L_useskull;
+ if ((countitem("UndeadEar") != 0) && (@choice_idx[@menu] == @C_undeadear))
+ goto L_useear;
+ if ((countitem("Pearl") != 0) && (@choice_idx[@menu] == @C_pearl))
+ goto L_usepearl;
+ if ((@choice_idx[@menu] == @C_nevermind))
+ goto L_ask_quit;
+
+ // fallthrough only when player remove the items while in menu, trying to cheat
+ // the potion will be lost then
+ mes "\"Do not try to betray me. Come back when you have a better morale.\"";
+ close;
+
+L_useroot:
+ delitem "Root", 1;
+ set @dempo_color, @dempo_color + 9 + rand(9);
+ goto L_brew_dempo;
+
+L_usemauve:
+ delitem "MauveHerb", 1;
+ set @dempo_color, @dempo_color + 1 + rand(2);
+ goto L_brew_dempo;
+
+L_uselifestone:
+ delitem "Lifestone", 1;
+ set @dempo_color, @dempo_color + 3 + rand(4);
+ goto L_brew_dempo;
+
+L_usediseasedheart:
+ delitem "DiseasedHeart", 1;
+ set @dempo_color, @dempo_color - 35 - rand(25);
+ goto L_brew_dempo;
+
+L_usebone:
+ delitem "Bone", 1;
+ set @dempo_color, @dempo_color - 3 - rand(3);
+ goto L_brew_dempo;
+
+L_useskull:
+ delitem "Skull", 1;
+ set @dempo_color, @dempo_color - 9 - rand(9);
+ goto L_brew_dempo;
+
+L_useear:
+ delitem "UndeadEar", 1;
+ set @dempo_color, @dempo_color - 15 - rand(13);
+ goto L_brew_dempo;
+
+L_usepearl:
+ delitem "Pearl", 1;
+ //ending it is a little dangerous as well,
+ // stay calm, when it smashes your fine tuned well done potion.
+ set @finish_dempo, 1;
+ callsub L_check_explosion;
+ // ok now you really did it. Here is your potion:
+ getitem "DementiaPotion",1;
+
+ mes "[Caul]";
+ mes "\"The potion is now ready. It seems as if it worked fine.\"";
+ next;
+ mes "\"Ok here is a flask of that potion. I'll care for the rest.\"";
+ mes "\"I mean it is a very dangerous fluid.\"";
+ next;
+ mes "\"See you later, alligator!\"";
+ close;
+
+L_ask_quit:
+ mes "[Caul]";
+ mes "\"The potion is not ready. You can't just leave now!\"";
+ menu
+ "Please throw away that stupid potion, I'm in a hurry!", -,
+ "Oh you are right, let me finish it.", L_brew_dempo;
+ close;
+
+L_check_explosion:
+ // set to range [-50 50];
+ set @prob, @dempo_color - 50;
+
+ set @prob, ((@prob * @prob) / 80) + 4;
+ if (@finish_dempo == 0)
+ goto L_check_exp_nof;
+
+ // square again, so you must be in the middle to get it work there;
+ // and multiply with 3 so there is definitly no chance to get it directly after starting
+ set @prob, (@prob * @prob) * 2;
+L_check_exp_nof:
+
+ //TODO remove next message:
+ mes "check explosion: + " +@prob +" / 1000";
+
+ // in about 95% of the cases anything is fine, so return.
+ if (rand(1000) > @prob) return;
+ // in some cases it is not:
+ // kabooom!
+ close2;
+ heal -(Hp/2), 0;
+ misceffect 5;
+ misceffect 16;
+ heal -Hp, 0;
+ end;
+
+L_calc_dempo_color:
+ // @dempo_color_S$ is set in here:
+
+ //really dark black 0-11
+ if (@dempo_color < 12)
+ set @dempo_color_S$, "really dark black";
+
+ //dark black 12-23
+ if ((@dempo_color > 11) && (@dempo_color < 24))
+ set @dempo_color_S$, "dark black";
+
+ //black 24-34
+ if ((@dempo_color > 23) && (@dempo_color < 35))
+ set @dempo_color_S$, "black";
+
+ //dark grey with little dark spots 35-41
+ if ((@dempo_color > 34) && (@dempo_color < 42))
+ set @dempo_color_S$, "dark grey with little dark spots";
+
+ //dark grey 42-47
+ if ((@dempo_color > 41) && (@dempo_color < 48))
+ set @dempo_color_S$, "dark grey";
+
+ //calm grey 48-52
+ if ((@dempo_color > 47) && (@dempo_color < 53))
+ set @dempo_color_S$, "calm grey";
+
+ //light grey 53-58
+ if ((@dempo_color > 52) && (@dempo_color < 59))
+ set @dempo_color_S$, "light grey";
+
+ //light grey with little light spots 59-65
+ if ((@dempo_color > 58) && (@dempo_color < 66))
+ set @dempo_color_S$, "light grey with little light spots";
+
+ //white 66-76
+ if ((@dempo_color > 65) && (@dempo_color < 77))
+ set @dempo_color_S$, "white";
+
+ //shining white 77-88
+ if ((@dempo_color > 76) && (@dempo_color < 89))
+ set @dempo_color_S$, "shining white";
+
+ //bright shining white 77-100
+ if (@dempo_color > 88)
+ set @dempo_color_S$, "bright shining white";
+
+ return;
+
+L_NohMask:
+ mes "[Caul]";
+ mes "\"I'm sorry, but I didn't. I'm staying in town. Try asking one of the miners.\"";
+ close;
+
L_close:
close;
@@ -699,9 +1019,4 @@ S_Update_Var:
(QUEST_Forestbow_state & ~(@Q_MASK)
| (@Q_status << @Q_SHIFT));
return;
-
-L_NohMask:
- mes "[Caul]";
- mes "\"I'm sorry, but I didn't. I'm staying in town. Try asking one of the miners.\"";
- close;
}
diff --git a/npc/032-1_Outback/_import.txt b/npc/032-1_Outback/_import.txt
new file mode 100644
index 00000000..ee0758e4
--- /dev/null
+++ b/npc/032-1_Outback/_import.txt
@@ -0,0 +1,4 @@
+map: 032-1.gat
+npc: npc/032-1_Outback/_mobs.txt
+npc: npc/032-1_Outback/_warps.txt
+npc: npc/032-1_Outback/miriam.txt
diff --git a/npc/032-1_Outback/_mobs.txt b/npc/032-1_Outback/_mobs.txt
new file mode 100644
index 00000000..e24c0fde
--- /dev/null
+++ b/npc/032-1_Outback/_mobs.txt
@@ -0,0 +1,7 @@
+// 032-1 Outback mobs
+
+
+
+032-1.gat,0,0,0 script Mob032-1 -1,{
+ end;
+}
diff --git a/npc/032-1_Outback/_warps.txt b/npc/032-1_Outback/_warps.txt
new file mode 100644
index 00000000..254b8738
--- /dev/null
+++ b/npc/032-1_Outback/_warps.txt
@@ -0,0 +1,3 @@
+// 032-1 Outback warps
+
+032-1.gat,64,52 warp ToCave -1,-1,031-3.gat,56,59
diff --git a/npc/032-1_Outback/miriam.txt b/npc/032-1_Outback/miriam.txt
new file mode 100644
index 00000000..d42d904e
--- /dev/null
+++ b/npc/032-1_Outback/miriam.txt
@@ -0,0 +1,142 @@
+// NPC place is provisory
+032-1.gat,55,20,0 script Miriam 175,{
+
+ if (getskilllv(SKILL_SPEED)) goto L_fast;
+ if (getequipid(equip_torso) < 0) goto L_naked;
+ if (QUEST_MIRIAM_run != 0) goto L_checktime;
+ if (QUEST_MIRIAM_start != 0) goto L_wasting;
+
+L_teach:
+ mes "[Miriam]";
+ mes "\"Hey, what is your problem? Why were you running like that? Are you hurt? Why so slow? I have seen slimes way faster than this!\"";
+ next;
+ menu
+ "What? Slow down! One question per time...", -,
+ "It seems like you need a rest.", L_rest;
+
+ set @agi, readparam(bAgi);
+ set @torso$, getitemname(getequipid(equip_torso));
+ set @weight, MaxWeight/Weight;
+ if (@weight < 3) goto L_heavyweight;
+ if (@agi < 90) goto L_slow;
+ if (countitem("SteelShield") > 0 || countitem("WarlordHelmet") > 0 || countitem("CrusadeHelmet") > 0 || countitem("WarlordPlate") > 0 || countitem("KnightsHelmet") > 0 || countitem("InfantryHelmet") > 0 || countitem("ChainmailShirt") > 0) goto L_heavymetal;
+ goto L_offer;
+
+L_heavyweight:
+ mes "[Miriam]";
+ mes "\"Wow... Why do you carry so many things with you? You must be carrying more than one third of your own weight! I can't understand it... \"";
+ close;
+
+L_heavymetal:
+ mes "[Miriam]";
+ mes "\"Hmm... I see... Another lazy slow warrior wasting his strenght carrying kilos of metal clothes... You people are very popular these days... \"";
+ next;
+ mes "\"Why no one sees the great advantages of a beautiful, flexible, lightweight armor nowadays? \"";
+ close;
+
+L_slow:
+ mes "[Miriam]";
+ mes "Oh, wait, wait... " +@agi+ " Agility? Are you serious? What do you do with all your Character points? Put them all to 'Strenght'? Really... I dont even want to know... \"";
+ close;
+
+L_offer:
+ mes "[Miriam]";
+ mes "\"Hmm! Even though you move like a snail, you look great on these clothes! They look very confortable too... And it seems like you are not carrying too much weight.\"";
+ next;
+ if (!(getskilllv(SKILL_POOL))) goto L_noskill;
+ menu
+ "Yes, I really like this " +@torso$+ ".",-;
+ next;
+ mes "[Miriam]";
+ mes "\"I see. I like the way you distributed your Character Points... " +@agi+ " points to Agility! You really know how to prepare yourself to a good fight!\"";
+ next;
+ mes "\"Well... I do not do this very often, but you really have a potential to be a good fighter and moving the way you do will not help! \"";
+ next;
+ mes "\"So, if you pass a small test I can teach you a skill! It will be very useful for you, since it can increase your running speed.\"";
+ next;
+ menu
+ "I'm in! What kind of test is it?",-,
+ "I dont think I need more speed right now",L_giveup;
+ next;
+ mes "[Miriam]";
+ mes "\"Great! The test is simple. You need to run as fast as you can from the place where I am sitting to the mountains and talk to Pachua, the chief. When you get there and talk to Pachua, he will send a special smoke signal to me, so I can know how much time it took for you to go there.\"";
+ next;
+ mes "\"If you make it in a good time, I will teach you the special speeding skill, if not, you can always try again. So, are you ready?\"";
+ next;
+ menu
+ "Yes, let's do it!",-,
+ "No, I need to stretch my muscles first!",L_stretch;
+
+ close2;
+ message strcharinfo(0), "Miriam quickly grabs your arm and pull you to the place where she is sitting.";
+ // Warp the player to the place where the NPC is defined, so he can't cheat.
+ warp "032-1.gat",55,21;
+ npctalk "Run " +strcharinfo(0)+ ", run!";
+ set QUEST_MIRIAM_start, gettimetick(1);
+ end;
+
+L_naked:
+ mes "[Miriam]";
+ mes "\"Hmmm?! Please put on some clothes before talking to me.\"";
+ close;
+
+L_rest:
+ mes "[Miriam]";
+ mes "\"I don't need to rest. In fact, it seems like you need some serious workout sessions to improve your physical skills!\"";
+ close;
+
+L_noskill:
+ mes "[Miriam]";
+ mes "\"For a person like you, I could even teach a useful skill! Too bad you don't have the basic abillities to learn it...\"";
+ close;
+
+L_giveup:
+ mes "[Miriam]";
+ mes "\"Oh, that is bad... But if you change your mind, come back!\"";
+ close;
+
+L_stretch:
+ mes "[Miriam]";
+ mes "\"Ok. Good idea... Stretching exercises can increase your flexibility and even prevent injuries!\"";
+ close;
+
+L_wasting:
+ mes "[Miriam]";
+ mes "\"Don't waste your time talking to me! RUN and talk to Pachua!\"";
+ close;
+
+L_checktime:
+ if (QUEST_MIRIAM_run > 60) goto L_tryagain;
+ if (QUEST_MIRIAM_run <= 60) goto L_goodjob;
+
+L_tryagain:
+ mes "[Miriam]";
+ mes "\"You needed " + QUEST_MIRIAM_run + " seconds to reach Pachua. It is not enough.\"";
+ set QUEST_MIRIAM_run, 0;
+ close;
+
+L_goodjob:
+ mes "[Miriam]";
+ mes "\"Great job! You needed " + QUEST_MIRIAM_run + " seconds to reach Pachua. Very impressive for a person like you.\"";
+ next;
+ mes "\"Now I need you to relax. Do NOT move. This teaching process can be painful sometimes.\"";
+ next;
+ mes "Miriam stares into your eyes and starts to scream some strange words very close to your ears.";
+ next;
+ mes "You feel dizzy and as soon as you move your head and look to the ground, Miriam pushes you hard, sending you meters away from her.";
+ close2;
+// warp player a few tiles back - Write it when the NPC place is defined
+ warp "032-1.gat",55,22;
+ set QUEST_MIRIAM_run, 0;
+ message strcharinfo(0), "[You gain 2500 experience points]";
+ message strcharinfo(0), "[You learned Speed Skill]";
+ setskill SKILL_SPEED, 1;
+ getexp 2500, 0;
+ close;
+
+L_fast:
+ mes "[Miriam]";
+ mes "\"I hope you make a good use of your new skill... Take care!\"";
+ close;
+
+}
diff --git a/npc/032-3_Cave/_import.txt b/npc/032-3_Cave/_import.txt
new file mode 100644
index 00000000..de6feea0
--- /dev/null
+++ b/npc/032-3_Cave/_import.txt
@@ -0,0 +1,3 @@
+map: 032-3.gat
+npc: npc/032-3_Cave/_mobs.txt
+npc: npc/032-3_Cave/_warps.txt
diff --git a/npc/032-3_Cave/_mobs.txt b/npc/032-3_Cave/_mobs.txt
new file mode 100644
index 00000000..ea5bb75a
--- /dev/null
+++ b/npc/032-3_Cave/_mobs.txt
@@ -0,0 +1,7 @@
+// 032-3 Cave mobs
+
+
+
+032-3.gat,0,0,0 script Mob032-3 -1,{
+ end;
+}
diff --git a/npc/032-3_Cave/_warps.txt b/npc/032-3_Cave/_warps.txt
new file mode 100644
index 00000000..d27b4bc2
--- /dev/null
+++ b/npc/032-3_Cave/_warps.txt
@@ -0,0 +1,4 @@
+// 032-3 Cave warps
+
+032-3.gat,128,33 warp ToDesert -1,-1,006-1.gat,30,124
+032-3.gat,56,61 warp toDesert -1,-1,032-1.gat,64,53
diff --git a/npc/_import.txt b/npc/_import.txt
index 55141677..990c5315 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -66,4 +66,6 @@ import: npc/030-1_Snow_field/_import.txt
import: npc/031-1_NivalisPort/_import.txt
import: npc/031-2_Angelas_House/_import.txt
import: npc/031-3_Cave/_import.txt
+import: npc/032-1_Outback/_import.txt
+import: npc/032-3_Cave/_import.txt
import: npc/botcheck/_import.txt
diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt
index ae83968f..a4c24ae5 100644
--- a/npc/functions/clear_vars.txt
+++ b/npc/functions/clear_vars.txt
@@ -94,6 +94,11 @@ function script ClearVariables {
set Xmas2010, 0;
set Golbenez_Inn_Cost, 0;
+ // these two vars are only used for time measurement.
+ // so it won't be needed after your run through the deserts.
+ set QUEST_MIRIAM_run, 0;
+ set QUEST_MIRIAM_start, 0;
+
if (#BankAccount < 0) goto FixBank;
return;
diff --git a/npc/functions/magic.txt b/npc/functions/magic.txt
index 2bf8ef64..4dadb2a9 100644
--- a/npc/functions/magic.txt
+++ b/npc/functions/magic.txt
@@ -23,12 +23,13 @@ function script MagicGainBasic {
function script MagicTalkOptionsSetup {
set @QQ_ELANORE, 1;
set @QQ_MANASEED, 2;
- set @QQ_MANAPOTION, 3;
- set @QQ_WYARA, 4;
- set @QQ_SAGATHA, 5;
- set @QQ_AULDSBEL, 6;
- set @QQ_IMP, 7;
- set @QQ_OLDWIZ, 8;
+ set @QQ_MANAPOTION, 4;
+ set @QQ_WYARA, 8;
+ set @QQ_SAGATHA, 16;
+ set @QQ_AULDSBEL, 32;
+ set @QQ_IMP, 64;
+ set @QQ_OLDWIZ, 128;
+ set @QQ_ASTRALSOUL, 256;
return;
}
@@ -40,11 +41,11 @@ function script MagicTalkOptionsSetup {
function script MagicTalkMenu {
- setarray @choice$, "", "", "", "", "", "", "", "", "";
+ setarray @choice$, "", "", "", "", "", "", "", "", "", "";
set @choices_nr, 0;
- setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0;
+ setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
- if (@ignore == @QQ_ELANORE)
+ if (@ignore & @QQ_ELANORE)
goto L_Q_post_elanore;
set @choice$[@choices_nr], "...Elanore the Healer?";
set @choice_idx[@choices_nr], @QQ_ELANORE;
@@ -60,7 +61,7 @@ L_Q_post_elanore:
set @choices_nr, @choices_nr + 1;
L_Q_post_manaseed:
- if (@ignore == @QQ_MANAPOTION)
+ if (@ignore & @QQ_MANAPOTION)
goto L_Q_post_manapotion;
if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION))
goto L_Q_post_manapotion;
@@ -69,7 +70,7 @@ L_Q_post_manaseed:
set @choices_nr, @choices_nr + 1;
L_Q_post_manapotion:
- if (@ignore == @QQ_WYARA)
+ if (@ignore & @QQ_WYARA)
goto L_Q_post_wyara;
if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA))
goto L_Q_post_wyara;
@@ -78,7 +79,7 @@ L_Q_post_manapotion:
set @choices_nr, @choices_nr + 1;
L_Q_post_wyara:
- if (@ignore == @QQ_SAGATHA)
+ if (@ignore & @QQ_SAGATHA)
goto L_Q_post_sagatha;
if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA))
goto L_Q_post_sagatha;
@@ -87,7 +88,7 @@ L_Q_post_wyara:
set @choices_nr, @choices_nr + 1;
L_Q_post_sagatha:
- if (@ignore == @QQ_AULDSBEL)
+ if (@ignore & @QQ_AULDSBEL)
goto L_Q_post_auldsbel;
if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL))
goto L_Q_post_auldsbel;
@@ -96,7 +97,7 @@ L_Q_post_sagatha:
set @choices_nr, @choices_nr + 1;
L_Q_post_auldsbel:
- if (@ignore == @QQ_OLDWIZ)
+ if (@ignore & @QQ_OLDWIZ)
goto L_Q_post_oldwiz;
if (!(MAGIC_FLAGS & MFLAG_KNOWS_OLD_WIZARD))
goto L_Q_post_oldwiz;
@@ -105,7 +106,7 @@ L_Q_post_auldsbel:
set @choices_nr, @choices_nr + 1;
L_Q_post_oldwiz:
- if (@ignore == @QQ_IMP)
+ if (@ignore & @QQ_IMP)
goto L_Q_post_imp;
if (!(MAGIC_FLAGS & MFLAG_KNOWS_IMP))
goto L_Q_post_imp;
@@ -114,6 +115,17 @@ L_Q_post_oldwiz:
set @choices_nr, @choices_nr + 1;
L_Q_post_imp:
+ if (@ignore & @QQ_ASTRALSOUL)
+ goto L_Q_post_astralsoul;
+ if (!(getskilllv(SKILL_MAGIC)))
+ goto L_Q_post_astralsoul;
+ if (!(getskilllv(SKILL_POOL)))
+ goto L_Q_post_astralsoul;
+ set @choice$[@choices_nr], "...ways to improve my magic?";
+ set @choice_idx[@choices_nr], @QQ_IMP;
+ set @choices_nr, @choices_nr + 1;
+L_Q_post_astralsoul:
+
set @choice$[@choices_nr], "...never mind.";
set @choice_idx[@choices_nr], 0;
set @choices_nr, @choices_nr + 1;
@@ -126,13 +138,14 @@ L_Q_post_imp:
@choice$[5], -,
@choice$[6], -,
@choice$[7], -,
- @choice$[8], -;
+ @choice$[8], -,
+ @choice$[9], -;
set @menu, @menu - 1;
if (@menu >= @choices_nr)
set @menu, 0;
-
+
set @c, @choice_idx[@menu];
return @c;
}