summaryrefslogtreecommitdiff
path: root/world/map/npc/017-4
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/017-4')
-rw-r--r--world/map/npc/017-4/_import.txt3
-rw-r--r--world/map/npc/017-4/guardingspirit.txt89
-rw-r--r--world/map/npc/017-4/orum.txt795
-rw-r--r--world/map/npc/017-4/waric.txt144
4 files changed, 1031 insertions, 0 deletions
diff --git a/world/map/npc/017-4/_import.txt b/world/map/npc/017-4/_import.txt
index bccded3b..d09e325f 100644
--- a/world/map/npc/017-4/_import.txt
+++ b/world/map/npc/017-4/_import.txt
@@ -3,3 +3,6 @@
map: 017-4.gat
npc: npc/017-4/_mobs.txt
npc: npc/017-4/_warps.txt
+npc: npc/017-4/guardingspirit.txt
+npc: npc/017-4/orum.txt
+npc: npc/017-4/waric.txt
diff --git a/world/map/npc/017-4/guardingspirit.txt b/world/map/npc/017-4/guardingspirit.txt
new file mode 100644
index 00000000..b6e38d0d
--- /dev/null
+++ b/world/map/npc/017-4/guardingspirit.txt
@@ -0,0 +1,89 @@
+// Author: Jenalya
+
+017-4.gat,173,47,0|script|#Guarding Spirit#_M|204,0,0{
+
+L_Talk:
+ if (OrumQuest < 14)
+ goto L_Block;
+ if (OrumQuest > 14)
+ goto L_Chat;
+
+ mes "[Guarding Spirit]";
+ mes "\"Hold on! My master doesn't wish to get disturbed! I can't let you enter.\"";
+ menu
+ "Who is your master?", L_Master,
+ "But I have important things I need to discuss with your master!", L_Helped,
+ "Oh, so he's finally back?", L_Back,
+ "Ok, ok.", L_Close;
+
+L_Back:
+ mes "[Guarding Spirit]";
+ mes "\"Yeah, finally... He was gone for quite a while, and now he came back with this scary and quainty guy...\"";
+ next;
+ mes "\"Ehem, I mean. Yes, mortal. He came back into his residence and doesn't wish to interact with those below his dignity. Leave.\"";
+ goto L_Close;
+
+L_Master:
+ mes "[Guarding Spirit]";
+ mes "\"He's a powerful wizard. He can force the elements to obey his will. He talks to demons and higher beings from the astral plane, such as I am.\"";
+ next;
+ mes "\"Mankind knows him with under the name 'Orum'.\"";
+ menu
+ "Hey, I helped him out some while ago!", L_Helped,
+ "Orum? That guy who feels weary due to some transmution spells?", L_Disrespectful,
+ "Then I better respect his wish and leave!", L_Close;
+
+L_Disrespectful:
+ mes "[Guarding Spirit]";
+ mes "\"WHAT are you saying? Are you making fun of my master?! You'll regret that!\"";
+ set Hp, 1 + Hp/5;
+ goto L_Close;
+
+L_Helped:
+ mes "[Guarding Spirit]";
+ mes "\"Really? That sounds unplausible to me...\"";
+ next;
+ mes "\"Why should my master mess around with such a puny mortal as you are?\"";
+ menu
+ "I'd like to offer him my humble services...", L_Pass,
+ "Listen, he'll get angry if you don't let me pass. ", L_Pass,
+ "You're right, I was just bluffing.", L_Close;
+
+L_Pass:
+ mes "[Guarding Spirit]";
+ mes "\"Mh. Mh... All right, I let you pass.\"";
+ next;
+ mes "\"Remember to talk to him with befitting respect.\"";
+ set OrumQuest, 15;
+ warp "017-4.gat", 201, 26;
+ goto L_Close;
+
+L_Block:
+ mes "[Guarding Spirit]";
+ mes "\"Stop, mortal! I can't let you pass!\"";
+ menu
+ "What? Who are you?", -,
+ "Why?", -,
+ "Ok...", L_Close;
+ mes "[Guarding Spirit]";
+ mes "\"My master summoned me for the sole purpose to prevent his refuge being entered during his absence.";
+ mes "I'll guard this cave with all my power!\"";
+ next;
+ mes "\"Because... otherwise he'll punish me. That hurts.\"";
+ goto L_Close;
+
+L_Chat:
+ mes "[Guarding Spirit]";
+ mes "Oh, it's you. You may enter.";
+ // TODO: more chat, maybe depending on the quest progress?
+ goto L_Close;
+
+L_Close:
+ close;
+
+OnTouch:
+ if (OrumQuest < 15)
+ goto L_Talk;
+ warp "017-4.gat", 201, 26;
+ end;
+}
diff --git a/world/map/npc/017-4/orum.txt b/world/map/npc/017-4/orum.txt
new file mode 100644
index 00000000..014830a5
--- /dev/null
+++ b/world/map/npc/017-4/orum.txt
@@ -0,0 +1,795 @@
+// Author: Jenalya
+// Quest states:
+// 14: Completed first part of the quest
+// 15: Persuaded the Guarding Spirit to let you into the cave
+// 16: Got task to bring materials for first magical flower
+// 17: Got task to place the first magical flower
+// 18: Placed first magical flower
+// 19: Got task to bring materials for second magical flower
+// 20: Got task to place the second magical flower
+// 21: Placed second magical flower
+// 22: Got task to bring materials for third magical flower
+// 23: Completed easy minigame and got task to place the third magical flower
+// 24: Placed third magical flower
+// 25: Got task to bring materials for fourth magical flower
+// 26: Completed difficult minigame and got task to place the fourth magical flower
+// 27: Placed fourth magical flower
+// 28: Got task to bring materials for fifth magical flower
+// 29: Failed unbeatable minigame and got the flower hat
+// 30: Got task to place the fifth flower
+// 31: Placed fifth flower
+// 32: Got reward
+
+017-4.gat,211,32,0|script|Orum|158,{
+
+ // first flower
+ set @AMOUNT_SMALLMUSHROOM, 5;
+ set @AMOUNT_ASH, 5;
+ set @RECOMPENSATION_1, 5000;
+ // second flower
+ set @AMOUNT_PINKPETAL, 5;
+ set @AMOUNT_STINGER, 5;
+ set @RECOMPENSATION_2, 10000;
+ // third flower
+ set @AMOUNT_WHITEFUR, 5;
+ set @AMOUNT_REDSTINGER, 5;
+ set @RECOMPENSATION_3, 20000;
+ // fourth flower
+ set @AMOUNT_HARDSPIKE, 5;
+ set @AMOUNT_ANGRYSTINGER, 5;
+ set @RECOMPENSATION_4, 40000;
+ // fifth flower
+ set @AMOUNT_ACORN, 20;
+ set @AMOUNT_PEARL, 3;
+ set @AMOUNT_BLACKSTINGER, 5;
+ set @RECOMPENSATION_5, 80000;
+
+ set @REWARD_MONEY, 100000;
+ set @REWARD_EXP, 100000;
+
+ if (OrumQuest == 32) goto L_Done;
+
+ if (OrumQuest == 31) goto L_PlacedFifthFlower;
+ if (OrumQuest == 30) goto L_PlaceFifthFlower;
+ if (OrumQuest == 29) goto L_FailedFifthFlower;
+ if (OrumQuest == 28) goto L_FifthFlower;
+
+ if (OrumQuest == 27) goto L_PlacedFourthFlower;
+ if (OrumQuest == 26) goto L_PlaceFourthFlower;
+ if (OrumQuest == 25) goto L_FourthFlower;
+
+ if (OrumQuest == 24) goto L_PlacedThirdFlower;
+ if (OrumQuest == 23) goto L_PlaceThirdFlower;
+ if (OrumQuest == 22) goto L_ThirdFlower;
+
+ if (OrumQuest == 21) goto L_PlacedSecondFlower;
+ if (OrumQuest == 20) goto L_PlaceSecondFlower;
+ if (OrumQuest == 19) goto L_SecondFlower;
+
+ if (OrumQuest == 18) goto L_PlacedFirstFlower;
+ if (OrumQuest == 17) goto L_PlaceFirstFlower;
+ if (OrumQuest == 16) goto L_FirstFlower;
+
+ if (OrumQuest == 15) goto L_InitialTalk;
+
+ goto L_Banish;
+
+L_InitialTalk: // 15: Persuaded the Guarding Spirit to let you into the cave
+ mes "[Orum]";
+ mes "\"I... My Guarding Spirit... You... What...\"";
+ mes "[Waric]";
+ mes "\"Pull yourself together!\"";
+ next;
+ mes "[Orum]";
+ mes "\"Y-yes, master.\"";
+ mes "He turns to you.";
+ mes "\"I told you not to follow us! Are you so eager to die?\"";
+ menu
+ "I'm here to offer my service...", -,
+ "Hah, you thought you could hide from me?", L_Banish,
+ "Keep calm, I want to work together with you.", -,
+ "D-d-die?!", L_Banish;
+
+ mes "[Orum]";
+ mes "\"You want to help us?\"";
+ mes "Waric raises his eyebrows...";
+ next;
+ mes "[Orum]";
+ mes "\"I don't think that's a good idea.\"";
+ menu
+ "You won't know until you try.", -,
+ "You have no choice, I found your hideout!", L_Banish;
+
+ mes "[Orum]";
+ mes "\"Well, why not. Here is a simple task to proof you're serious.";
+ mes "Bring me " + @AMOUNT_SMALLMUSHROOM + " Small Mushrooms, " + @AMOUNT_ASH + " Piles of Ash and one Orange Tulip.\"";
+
+ set OrumQuest, 16;
+ menu
+ "Sure!", L_Close,
+ "Why do you need that?", -;
+
+ mes "[Orum]";
+ mes "\"Don't ask stupid questions! Do what I told you.\"";
+ mes "...";
+ mes "\"Those things are ingredients for a magical artifact. You don't need to know more at the moment.\"";
+ goto L_Close;
+
+L_Banish:
+ mes "[Orum]";
+ mes "\"This will be the last mistake you did...\"";
+ mes "He starts mumbering and you suddenly feel weirdly weightless. Your vision fades...";
+ mes "The last thing you hear is Waric shouting something about untalented apprentices.";
+ set Hp, 1 + rand(5);
+ warp "017-1.gat", 0, 0;
+ goto L_Close;
+
+L_FirstFlower: // 16: Got task to bring materials for first magical flower
+ mes "[Orum]";
+ mes "\"So? Where are the " + @AMOUNT_SMALLMUSHROOM + " Small Mushrooms, " + @AMOUNT_ASH + " Piles of Ash and Orange Tulip you should bring?\"";
+ menu
+ "I have everything you want!", -,
+ "I don't have it yet.", L_Close;
+
+ if ((countitem("SmallMushroom") < @AMOUNT_SMALLMUSHROOM)
+ || (countitem("PileOfAsh") < @AMOUNT_ASH)
+ || (countitem("OrangeTulip") < 1))
+ goto L_NoItem;
+
+ delitem "SmallMushroom", @AMOUNT_SMALLMUSHROOM;
+ delitem "PileOfAsh", @AMOUNT_SMALLMUSHROOM;
+ delitem "OrangeTulip", 1;
+ getitem "OrangeSummonFlower", 1;
+ set OrumQuest, 17;
+
+ mes "Orum takes the items and starts to pulverize them, mixes some of it together in the caldron and finally dips the tulip into it, mumbering enchantements. The tulip changes its appearance. Then he hands it over to you.";
+ mes "[Orum]";
+ mes "\"Phew, done. Now I feel exhausted. You need to place it at its destination.\"";
+ next;
+L_WayFirstFlower:
+ mes "\"We prepared a place for this in the forest outside the caves. When you left the cave, go some steps to the east and you'll find a spot of grass with flowers on a small hill. There you have to place it, right in the middle.\"";
+ goto L_Close;
+
+L_PlaceFirstFlower: // 17: Got task to place the first magical flower
+ mes "[Orum]";
+ mes "\"Go ahead and place the first magical flower.\"";
+ menu
+ "Ok, will do that.", L_Close,
+ "Can you explain the way again?", L_WayFirstFlower,
+ "I... I lost it.", -;
+
+ mes "[Orum]";
+ mes "\"What?! I can't believe it! How can you handle a powerful magical artifact in such a careless way?\"";
+ next;
+ mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_1 + " GP, and I'm going to allow you to continue helping us. So?\"";
+ menu
+ "Ok.", -,
+ "No way, that's too much!", L_NoRecompensation;
+
+ if (Zeny < @RECOMPENSATION_1)
+ goto L_NoMoney;
+ set Zeny, Zeny - @RECOMPENSATION_1;
+ set OrumQuest, 16;
+
+ mes "[Orum]";
+ mes "\"Very well. Now bring me " + @AMOUNT_SMALLMUSHROOM + " Small Mushrooms, " + @AMOUNT_ASH + " Piles of Ash and one Orange Tulip again, so we can start over.\"";
+ goto L_Close;
+
+L_PlacedFirstFlower: // 18: Placed first magical flower
+ mes "[Orum]";
+ mes "\"I felt the eruption of magical power when you placed it! Wonderful! Let's start with the next one right now.\"";
+ menu
+ "Ok, what should I do now?", -,
+ "Weird monsters appeared when I placed it!", L_AskMonsters;
+
+ set OrumQuest, 19;
+ goto L_SecondFlower;
+
+L_AskMonsters:
+ mes "[Orum]";
+ mes "\"Oh, right. Well, that was to be expected, some of the power seeped out when you placed it. I hope those monsters didn't harm you?";
+ mes "However, we should continue.\"";
+ set OrumQuest, 19;
+ next;
+ goto L_SecondFlower;
+
+L_SecondFlower: // 19: Got task to bring materials for second magical flower
+ mes "[Orum]";
+ mes "\"Bring me " + @AMOUNT_PINKPETAL + " Pink Petals, " + @AMOUNT_STINGER + " Scorpion Stingers and one Pink Tulip.\"";
+ menu
+ "I have it.", -,
+ "All right, I'll get it.", L_Close,
+ "What's the purpose of this?", L_AskPurpose;
+
+ if ((countitem("PinkPetal") < @AMOUNT_PINKPETAL)
+ || (countitem("ScorpionStinger") < @AMOUNT_STINGER)
+ || (countitem("PinkTulip") < 1))
+ goto L_NoItem;
+
+ delitem "PinkPetal", @AMOUNT_PINKPETAL;
+ delitem "ScorpionStinger", @AMOUNT_STINGER;
+ delitem "PinkTulip", 1;
+ getitem "PurpleSummonFlower", 1;
+ set OrumQuest, 20;
+
+ mes "Orum starts to handle the material similiar to the ones for the first flower. Suddenly something from the pulver gets on his hand and it makes a nasty frizzling sound. He yells in pain. After cleaning his hand he continues. At the end he gives you another magical flower while rubbing his hand.";
+ next;
+ mes "[Orum]";
+ mes "\"Ouch, it still hurts. I need to recover. You're going to place it.\"";
+ next;
+L_WaySecondFlower:
+ mes "[Orum]";
+ mes "\"The next spot is in the Woodland Hills. When you left our caves, go south until you come out of the forest and then to the west, past the hut of that old man.";
+ mes "The spot where you have to place it is on higher ground, so you eventually have to find a way through the caves to reach it.\"";
+ goto L_Close;
+
+L_AskPurpose:
+ mes "[Orum]";
+ mes "\"Purpose? Well... We're building a pentagram.\"";
+ goto L_Close;
+
+L_PlaceSecondFlower: // 20: Got task to place the second magical flower
+ mes "[Orum]";
+ mes "\"Go to place second magical flower.\"";
+ menu
+ "I'm on my way.", L_Close,
+ "Where do I have to put it again?", L_WaySecondFlower,
+ "Sorry, I lost it.", -;
+
+ mes "[Orum]";
+ mes "\"What?! You incompetent dumbhead! I got hurt while creating this powerful magical artifact and you lose it!\"";
+ next;
+ mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_2 + " GP, and I'm going to allow you to continue helping us. So?\"";
+ menu
+ "Ok.", -,
+ "No way, that's too much!", L_NoRecompensation;
+
+ if (Zeny < @RECOMPENSATION_2)
+ goto L_NoMoney;
+ set Zeny, Zeny - @RECOMPENSATION_2;
+ set OrumQuest, 19;
+
+ mes "[Orum]";
+ mes "\"Ok, now that this is settled, bring me " + @AMOUNT_PINKPETAL + " Pink Petals, " + @AMOUNT_STINGER + " Scorpion Stingers and one Pink Tulip again.\"";
+ goto L_Close;
+
+L_PlacedSecondFlower: // 21: Placed second magical flower
+ mes "[Orum]";
+ mes "\"Very good. You placed the second flower, right? I was able to feel it here.";
+ mes "Everything is going very well.\"";
+ mes "Orum grins pleased.";
+ menu
+ "What do you need next?", -,
+ "How can we build a pentagram by randomly planting flowers?", L_AskPentagram;
+
+ set OrumQuest, 22;
+ goto L_ThirdFlower;
+
+L_AskPentagram:
+ mes "[Orum]";
+ mes "\"Randomly? The places are very carefully chosen! You see, it's going to be a very BIG pentagram.\"";
+ set OrumQuest, 22;
+ next;
+ goto L_ThirdFlower;
+
+L_ThirdFlower: // 22: Got task to bring materials for third magical flower
+ mes "[Orum]";
+ mes "\"Now we need " + @AMOUNT_WHITEFUR + " White Fur, " + @AMOUNT_REDSTINGER + " Red Scorpion Stingers and one White Tulip.\"";
+ menu
+ "I got everything you want.", -,
+ "I'm still searching.", L_Close,
+ "And what is the pentagram going to do?", L_AskPentaEffect;
+
+ if ((countitem("WhiteFur") < @AMOUNT_WHITEFUR)
+ || (countitem("RedScorpionStinger") < @AMOUNT_REDSTINGER)
+ || (countitem("WhiteTulip") < 1))
+ goto L_NoItem;
+
+ delitem "WhiteFur", @AMOUNT_WHITEFUR;
+ delitem "RedScorpionStinger", @AMOUNT_REDSTINGER;
+ delitem "WhiteTulip", 1;
+
+ mes "Orum takes the things out of your hands and starts to prepare them.";
+ mes "[Orum]";
+ mes "\"This time you're going to help me. It's safer when I don't have to handle all of it myself. Ok, listen.\"";
+ next;
+ mes "\"Here is the rheological additive that you have to pour on it when the reaction between the pulvers is on its peak level. I'm going to slowly add a little more of the pulver, which will make it react faster. Got it?\"";
+ menu
+ "Rheo-what?", -,
+ "Ok, let's try.", -,
+ "I'm not sure I understand...", -;
+
+ mes "[Orum]";
+ mes "\"Well, just pour when it's bubbling really hard.\"";
+ mes "He starts to mix the powders together in the caldron.";
+ next;
+
+ setarray @bubblingLevels$, "calmly", "slightly", "noticeably", "heavily";
+ set @bubblingLevel, rand(10);
+
+L_EasyMinigame:
+ mes "The mixture is bubbling " + @bubblingLevels$[@bubblingLevel/7] + ". What do you want to do?";
+ menu
+ "Wait.", -,
+ "Pour.", L_EasyCheck;
+
+ if (@menu == 1)
+ set @bubblingLevel, @bubblingLevel + rand(1,10);
+ if (@bubblingLevel > 27)
+ goto L_EasyTooHigh;
+ mes "Orum adds some more pulver.";
+ goto L_EasyMinigame;
+
+L_EasyCheck:
+ set @bubblingLevel, @bubblingLevel + 3 - rand(7);
+ if (@bubblingLevel < 22)
+ goto L_EasyTooEarly;
+ if (@bubblingLevel > 27)
+ goto L_EasyTooHigh;
+ goto L_EasySuccess;
+
+L_EasyTooHigh:
+ mes "Suddenly the mixture glows brightly. Then it calms down very quickly and turns into a weird greyish color.";
+ mes "[Orum]";
+ mes "\"Are you sleeping? Now it's wasted. You waited too long.\"";
+ next;
+ mes "\"Now you have to collect the ingredients again.\"";
+ goto L_Close;
+
+L_EasyTooEarly:
+ mes "You pour the liquid Orum gave you on this mixture.";
+ mes "It stops bubbling and gets thicker... and thicker... and thicker...";
+ mes "[Orum]";
+ mes "\"No! That was too early. See what you've done. It's hard as a rock now.\"";
+ next;
+ mes "\"How annoying. You have to get new ingredients.\"";
+ goto L_Close;
+
+L_EasySuccess:
+ getitem "WhiteSummonFlower", 1;
+ set OrumQuest, 23;
+
+ mes "As you pour the liquid on the bubbling mixture, it calms down and becomes viscous. Orum takes the tulip and dips it into the mixture.";
+ mes "[Orum]";
+ mes "\"Very well! Here it is.\"";
+ next;
+L_WayThirdFlower:
+ mes "[Orum]";
+ mes "\"This flower needs to be placed on top of the Hurnscald mines. It might be a bit hard to reach, but I'm sure you'll do fine.\"";
+ goto L_Close;
+
+L_AskPentaEffect:
+ mes "[Orum]";
+ mes "\"Don't you have at least tiny knowledge of Astral magic? A pentagram is used to summon, of course.\"";
+ goto L_Close;
+
+L_PlaceThirdFlower: // 23: Completed easy minigame and got task to place the third magical flower
+ mes "[Orum]";
+ mes "\"What are you waiting for? Bring the third flower to its destination.\"";
+ menu
+ "Ok.", L_Close,
+ "I forget where to put it.", L_WayThirdFlower,
+ "Unfortunately... I don't have it anymore.", -;
+
+ mes "Orum sighs.";
+ mes "[Orum]";
+ mes "\"I hope this is a joke. No, you're serious? What an effrontery! This was a valuable and powerful magical artifact.\"";
+ next;
+ mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_3 + " GP, and I'm going to allow you to continue helping us. So?\"";
+ menu
+ "Here it is.", -,
+ "That's too much!", L_NoRecompensation;
+
+ if (Zeny < @RECOMPENSATION_3)
+ goto L_NoMoney;
+ set Zeny, Zeny - @RECOMPENSATION_3;
+ set OrumQuest, 22;
+
+ mes "[Orum]";
+ mes "\"Once again we need " + @AMOUNT_WHITEFUR + " White Fur, " + @AMOUNT_REDSTINGER + " Red Scorpion Stingers and one White Tulip.\"";
+ goto L_Close;
+
+L_PlacedThirdFlower: // 24: Placed third magical flower
+ mes "[Orum]";
+ mes "\"We're making very good progress. Now that you placed the third magical flower, only two more are missing.";
+ mes "But we shouldn't become careless now, each flower gets more difficult.\"";
+ menu
+ "Understood! What next?", -,
+ "What are we going to summon with that pentagram?", L_AskSummon;
+
+ set OrumQuest, 25;
+ goto L_FourthFlower;
+
+L_AskSummon:
+ mes "[Orum]";
+ mes "\"Beings from the astral plane of course. Some of them are already coming over when you place the flowers.";
+ mes "But that is NOTHING compared to what will happen when the pentagram is complete! Hahaha!\"";
+ set OrumQuest, 25;
+ next;
+ goto L_FourthFlower;
+
+L_FourthFlower: // 25: Got task to bring materials for fourth magical flower
+ mes "[Orum]";
+ mes "\"Now we need " + @AMOUNT_HARDSPIKE + " Hard Spikes, " + @AMOUNT_ANGRYSTINGER + " Angry Scorpion Stingers and one Yellow Rose.\"";
+ menu
+ "I managed to get everything.", -,
+ "I will get that.", L_Close,
+ "Won't it be dangerous to summon so many aggressive monsters?", L_AskDanger;
+
+ if ((countitem("HardSpike") < @AMOUNT_HARDSPIKE)
+ || (countitem("AngryScorpionStinger") < @AMOUNT_ANGRYSTINGER)
+ || (countitem("YellowRose") < 1))
+ goto L_NoItem;
+
+ delitem "HardSpike", @AMOUNT_HARDSPIKE;
+ delitem "AngryScorpionStinger", @AMOUNT_ANGRYSTINGER;
+ delitem "YellowRose", 1;
+
+ mes "Orum takes the materials and starts to pulverize them once again. You notice that his movements are slower this time and he looks very concentrated.";
+ mes "[Orum]";
+ mes "\"Ok. We're going to do it together again, but this time we switch the roles. You're going to mix the pulvers and I'm going to pour the rheological additive on it.\"";
+ next;
+ mes "\"This is because... ahm, because you will learn something from it, yes.";
+ mes "But remember to handle the pulvers very careful, they're vitriolic.\"";
+ next;
+ mes "\"You have two powders, one of them will make the mixture turn yellow, the other one will make it turn red.";
+ mes "You need to bring it some clear, strong orange and hold that for a moment, so I have to time to pour the rheological additive.\"";
+ menu
+ "Let's try it.", -,
+ "I'm unsure...", -;
+
+ mes "[Orum]";
+ mes "\"Just use the red powder when it's too bright, and the yellow powder when it's too dark. And be careful how much you use, additionally the mixture will randomly fluctuate a bit.\"";
+ mes "He mixes together a few of each pulver and then hands you the small bowls with the powders.";
+ next;
+
+ setarray @colorLevels$, "red", "light red", "dark orange", "orange", "light orange", "dark yellow", "yellow";
+ set @colorLevel, rand(49);
+ set @goodColor, 0;
+
+L_HardMinigame:
+ mes "The color of the mixture is " + @colorLevels$[@colorLevel/7] + ". What do you want to do?";
+ menu
+ "Add a small portion of Red Powder.", -,
+ "Add a large portion of Red Powder.", -,
+ "Add a small portion of Yellow Powder.", -,
+ "Add a large portion of Yellow Powder.", -;
+
+ if (@menu == 1)
+ set @colorLevel, @colorLevel - rand(1,3);
+ if (@menu == 2)
+ set @colorLevel, @colorLevel - rand(6,8);
+ if (@menu == 3)
+ set @colorLevel, @colorLevel + rand(1,3);
+ if (@menu == 4)
+ set @colorLevel, @colorLevel + rand(6,8);
+
+ if (@colorLevel > 48)
+ goto L_TooYellow;
+ if (@colorLevel < 0)
+ goto L_TooRed;
+
+ mes "Due to your addition, the mixture is now " + @colorLevels$[@colorLevel/7] + ".";
+
+ if ((@colorLevel > 20) && (@colorLevel < 28))
+ goto L_Good;
+
+L_HardRandom:
+ set @colorLevel, @colorLevel + 3 - rand(6);
+ mes "The mixture frizzles and bubbles.";
+
+ if ((@colorLevel < 21) || (@colorLevel > 27))
+ set @goodColor, 0;
+
+ if (@colorLevel > 48)
+ goto L_TooYellow;
+ if (@colorLevel < 0)
+ goto L_TooRed;
+ next;
+ goto L_HardMinigame;
+
+L_Good:
+ set @goodColor, @goodColor + 1;
+ if (@goodColor == 3)
+ goto L_HardSuccess;
+ mes "Hold it like this for a moment!";
+ next;
+ goto L_HardRandom;
+
+L_TooYellow:
+ next;
+ mes "The mixture can't get any more yellow. The bubbling increases and quickly most of the liquid turns into steam that makes you cough.";
+ goto L_HardTooExtreme;
+L_TooRed:
+ next;
+ mes "The mixture can't get any more red. Suddenly the bubbling gets even more violent, it seems it's corroding the caldron! Orum hastily pours the rheological additive on it to make it stop.";
+ goto L_HardTooExtreme;
+
+L_HardTooExtreme:
+ mes "[Orum]";
+ mes "\"What are you doing? It is supposed to turn into orange. You have to use both powders for that!\"";
+ next;
+ mes "\"This is waste now. Go and collect new ingredients.\"";
+ goto L_Close;
+
+L_HardSuccess:
+ getitem "YellowSummonFlower", 1;
+ set OrumQuest, 26;
+
+ mes "Orum pours the rheological additive on the mixture and then drips the flower into the caldron.";
+ mes "[Orum]";
+ mes "\"Excellent! Wonderful. Here's the flower. I need to clean up the caldron, so you have to place the flower.\"";
+ next;
+L_WayFourthFlower:
+ mes "[Orum]";
+ mes "\"To find the place, go south after leaving our cave, and then follow the path to the east. Watch out for that nasty forest witch living there, she doesn't like humans.";
+ mes "You have to place the flower on some small island in front of the coast, to get there you have to find a way through the caves that connect it with the mainland.\"";
+ goto L_Close;
+
+L_AskDanger:
+ mes "[Orum]";
+ mes "\"Dangerous? Well, not really, since Waric and I are going to stay here in this cave.\"";
+ menu
+ "That's... very appeasing.", -,
+ "And what about everyone outside? Like me!?", -;
+
+ mes "[Orum]";
+ mes "\"Uhm, well. You won't be in the center of it, of course, where most of the monsters will appear.";
+ mes "And you can handle a few of them, right?\"";
+ goto L_Close;
+
+L_PlaceFourthFlower: // 26: Completed difficult minigame and got task to place the fourth magical flower
+ mes "[Orum]";
+ mes "\"I can't await it! Everything is going so well! Why are you dawdling away? Go and place the fourth magical flower!\"";
+ menu
+ "All right.", L_Close,
+ "Please describe where to place it again.", L_WayFourthFlower,
+ "The magical flower... I lost it.", -;
+
+ mes "Orum shakes his head in disbelief.";
+ mes "[Orum]";
+ mes "\"Lost it? Unbelievable! How can you lose it?\"";
+ next;
+ mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_4 + " GP, and I'm going to allow you to continue helping us. So?\"";
+ menu
+ "Here it is.", -,
+ "That's too expensive!", L_NoRecompensation;
+
+ if (Zeny < @RECOMPENSATION_4)
+ goto L_NoMoney;
+ set Zeny, Zeny - @RECOMPENSATION_4;
+ set OrumQuest, 25;
+
+ mes "[Orum]";
+ mes "\"Now bring " + @AMOUNT_HARDSPIKE + " Hard Spikes, " + @AMOUNT_ANGRYSTINGER + " Angry Scorpion Stingers and one Yellow Rose again.\"";
+ goto L_Close;
+
+L_PlacedFourthFlower: // 27: Placed fourth magical flower
+ mes "[Orum]";
+ mes "\"Oh, almost! Only the last flower needs to be placed. Don't lose concentration now!";
+ mes "This last flower is the most complicated one. Pay attention.\"";
+ menu
+ "Tell me what you need!", -,
+ "Why do you want to summon so many beings?", L_AskReason;
+
+ set OrumQuest, 28;
+ goto L_FifthFlower;
+
+L_AskReason:
+ mes "[Orum]";
+ mes "\"Let's say... it's about paying back an old debt.";
+ mes "I'll give you a hint: think about what's in the middle of the pentagram. Or rather who is.\"";
+ next;
+ mes "\"However, let's get back to business!\"";
+ set OrumQuest, 28;
+ next;
+ goto L_FifthFlower;
+
+L_FifthFlower: // 28: Got task to bring materials for fifth magical flower
+ mes "[Orum]";
+ mes "\"For the last flower we need " + @AMOUNT_ACORN + " Acorns, " + @AMOUNT_PEARL + " Pearls, " + @AMOUNT_BLACKSTINGER + " Black Scorpion Stingers and 1 Red Rose.\"";
+ menu
+ "Here it is.", -,
+ "Understood.", L_Close,
+ "Sagatha is the target of the spell, right?", L_AskSagatha;
+
+ if ((countitem("Acorn") < @AMOUNT_ACORN)
+ || (countitem("Pearl") < @AMOUNT_PEARL)
+ || (countitem("BlackScorpionStinger") < @AMOUNT_BLACKSTINGER)
+ || (countitem("RedRose") < 1))
+ goto L_NoItem;
+
+ delitem "Acorn", @AMOUNT_ACORN;
+ delitem "Pearl", @AMOUNT_PEARL;
+ delitem "BlackScorpionStinger", @AMOUNT_BLACKSTINGER;
+ delitem "RedRose", 1;
+
+ mes "Orum takes the materials and takes a deep breath. Then he prepares them similiarly to the materials for the other flowers.";
+ mes "[Orum]";
+ mes "\"Well. Basically, we need to do the same as with the other flowers. But we need to be careful, this mixture is a bit more delicate. Would you like to do the add the rheological additive or mix the pulvers?\"";
+ menu
+ "I'll handle the additive.", L_Additive,
+ "Let me mix the pulvers.", L_Pulvers;
+
+L_Additive:
+ mes "Orum agrees and starts mixing the powders. You're ready to pour in the additive once the mixture reached a high level of bubbling.";
+ next;
+ mes "But the next dash of powder Orum adds causes the mixture to sputter, and you get something on your hand!";
+ heal -5, 0;
+ menu
+ "Ouch!",-,
+ "AAh!", -,
+ "Urgh!", -;
+ mes "As you step back from the caldron you jostle Orum, and the Red Rose falls out of his pocket into the caldron.";
+ goto L_FlowerHat;
+
+L_Pulvers:
+ mes "You start mixing together the powders. It bubbles much more than during the previous brewing.";
+ next;
+ mes "The next dash of powder you add causes the mixture to sputter, and some of it gets on Orums hand! He screams and jumps back while waving around his hand.";
+ next;
+ mes "This causes the flower to fall out of his pocket, landing exactly in the caldron.";
+ next;
+ mes "Orum stares at it.";
+ goto L_FlowerHat;
+
+L_FlowerHat:
+ mes "[Orum]";
+ mes "\"Fool! See what you've done! It's ruined!\"";
+ next;
+ mes "\"Though we have enough of the materials left to start over... Here, take this garbage out and get a new Red Rose!\"";
+ getitem "RedRoseHat", 1;
+ set OrumQuest, 29;
+ goto L_Close;
+
+L_AskSagatha:
+ mes "[Orum]";
+ mes "\"Ah, clever. Yes, you're right.";
+ mes "That self-righteous forest witch thinks she's better than other people. And she thinks that gives her the right to stick her nose into other mages' businesses.\"";
+ next;
+ mes "\"And even worse, she thinks she can PUNISH other mages for actions she considers wrong - \"";
+ mes "[Waric]";
+ mes "\"Orum! You don't need to get into the details with this.\"";
+ next;
+ mes "[Orum]";
+ mes "\"Oh, eh, of course. However, we'll teach her a lesson.";
+ mes "And you are going to help us.\"";
+ goto L_Close;
+
+L_FailedFifthFlower: // 29: Failed unbeatable minigame and got the flower hat
+ mes "[Orum]";
+ mes "\"Did you get a new Red Rose, so we can finally create the last magical flower?\"";
+ menu
+ "Yes.", -,
+ "Not yet.", L_Close,
+ "Will those monsters hurt Sagatha? Or... kill her?", L_AskHurtSagatha;
+
+ if (countitem("RedRose") < 1)
+ goto L_NoItem;
+
+ delitem "RedRose", 1;
+ mes "[Orum]";
+ mes "\"Finally! This time I'll do it all by myself. Step back with your clumsy fingers, so it doesn't get ruined again.\"";
+ next;
+ mes "You watch while Orum carefully prepares the last magic flower.";
+ next;
+ getitem "RedSummonFlower", 1;
+ set OrumQuest, 30;
+ mes "[Orum]";
+ mes "\"Here it is. We're almost done. Don't mess it up!\"";
+ next;
+L_WayFifthFlower:
+ mes "[Orum]";
+ mes "\"To place the last flower, go East and follow the road. At some point it might be difficult to get through, since the road isn't used anymore, and the forest is growing back.";
+ mes "But you have to find a way and reach a clearing with some very old and big tree. There you'll find another prepared spot with some flowers.\"";
+ goto L_Close;
+
+L_AskHurtSagatha:
+ mes "[Orum]";
+ mes "\"Oh, are you getting afraid? I thought you want to support us.\"";
+ next;
+ mes "\"However, no need to worry. Sagatha is much too powerful to get seriously injured by this, sadly.\"";
+ next;
+ mes "\"If we'd want to actually harm her, we'd need to summon some greater powers. But that'd be risky in the best case, and devastatingly costly in the worst.\"";
+ next;
+ mes "\"Unless... I assume you're not open to donating your soul for a pact with a higher astral being, are you?\"";
+ goto L_Close;
+
+L_PlaceFifthFlower: // 30: Got task to place the fifth flower
+ mes "[Orum]";
+ mes "\"What are you waiting for? We've almost reached our goal! Go and place the last magical flower to finish the pentagram!\"";
+ menu
+ "Yes.", L_Close,
+ "Where do I have to place it?", L_WayFifthFlower,
+ "Please keep calm, but I lost the flower.", -;
+
+ mes "[Orum]";
+ mes "\"Lost it? You incompetent excuse of a servant! What do you think you're doing?\"";
+ next;
+ mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_5 + " GP, and I'm going to allow you to continue helping us. You also have to bring the needed materials for a new flower.\"";
+ menu
+ "Ok, here it is.", -,
+ "What materials do we need?", L_MaterialFifth,
+ "That's too expensive!", L_NoRecompensation;
+
+ if (Zeny < @RECOMPENSATION_5)
+ goto L_NoMoney;
+ if ((countitem("Acorn") < @AMOUNT_ACORN)
+ || (countitem("Pearl") < @AMOUNT_PEARL)
+ || (countitem("BlackScorpionStinger") < @AMOUNT_BLACKSTINGER)
+ || (countitem("RedRose") < 1))
+ goto L_NoItem;
+
+ set Zeny, Zeny - @RECOMPENSATION_5;
+ delitem "Acorn", @AMOUNT_ACORN;
+ delitem "Pearl", @AMOUNT_PEARL;
+ delitem "BlackScorpionStinger", @AMOUNT_BLACKSTINGER;
+ delitem "RedRose", 1;
+ getitem "RedSummonFlower", 1;
+
+ mes "Orum takes the material and prepares a new flower.";
+ mes "[Orum]";
+ mes "\"Here is another one. Don't mess it up this time, understood?\"";
+ goto L_Close;
+
+L_MaterialFifth:
+ mes "[Orum]";
+ mes "\"For the last flower we need " + @AMOUNT_ACORN + " Acorns, " + @AMOUNT_PEARL + " Pearls, " + @AMOUNT_BLACKSTINGER + " Black Scorpion Stingers and 1 Red Rose.\"";
+ goto L_Close;
+
+L_PlacedFifthFlower: // 31: Placed fifth flower
+ mes "[Orum]";
+ mes "\"Hahahaha! Wonderful! We were able to hear Sagatha's screaming and ranting here in the cave!\"";
+ next;
+ mes "\"Well done, really. I think you've earned yourself a small reward. Here, take this.\"";
+ set Zeny, Zeny + @REWARD_MONEY;
+ getexp @REWARD_EXP, 0;
+ set OrumQuest, 32;
+ goto L_Close;
+
+L_Done:
+ mes "[Orum]";
+ mes "\"Ah, I still can't stop smiling when I remember Sagatha's reaction. You've done a very good job.\"";
+ goto L_Close;
+
+L_NoRecompensation:
+ mes "[Orum]";
+ mes "\"Well, you could still try to get back the magical flower instead. Your decision.\"";
+ goto L_Close;
+
+L_NoMoney:
+ mes "[Orum]";
+ mes "\"Hey, you don't have enough money!\"";
+ goto L_Close;
+
+L_NoItem:
+ mes "[Orum]";
+ mes "\"Hey, you don't have it!\"";
+ goto L_Close;
+
+L_Close:
+ set @AMOUNT_SMALLMUSHROOM, 0;
+ set @AMOUNT_ASH, 0;
+ set @RECOMPENSATION_1, 0;
+ set @AMOUNT_PINKPETAL, 0;
+ set @AMOUNT_STINGER, 0;
+ set @RECOMPENSATION_2, 0;
+ set @AMOUNT_WHITEFUR , 0;
+ set @AMOUNT_REDSTINGER , 0;
+ set @RECOMPENSATION_3, 0;
+ set @bubblingLevel, 0;
+ cleararray @bubblingLevels$[0], "", 4;
+ set @AMOUNT_HARDSPIKE , 0;
+ set @AMOUNT_ANGRYSTINGER , 0;
+ set @RECOMPENSATION_4, 0;
+ set @colorLevel, 0;
+ set @goodColor, 0;
+ cleararray @colorLevels$[0], "", 7;
+ set @AMOUNT_ACORN, 0;
+ set @AMOUNT_PEARL, 0;
+ set @AMOUNT_BLACKSTINGER, 0;
+ set @RECOMPENSATION_5, 0;
+ set @REWARD_MONEY, 0;
+ set @REWARD_EXP, 0;
+ close;
+}
diff --git a/world/map/npc/017-4/waric.txt b/world/map/npc/017-4/waric.txt
new file mode 100644
index 00000000..9f806b87
--- /dev/null
+++ b/world/map/npc/017-4/waric.txt
@@ -0,0 +1,144 @@
+// Author: Jenalya
+// Current state: only dialog, magic teaching not finished
+// Waric is intended to teach the player some dark magic spells
+// in case the player is not a follower of Sagatha and can't become
+// one anymore (killed the wounded mouboo or cut the druid tree).
+// Waric would teach the spells based on the progress in the pentagram
+// creation, but save which spells were taught in a different variable.
+
+017-4.gat,216,36,0|script|Waric|153,{
+
+ set @mouboo_status, ((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 3;
+ set @killed_mouboo, 0;
+ if ((@mouboo_status == 1) || (@mouboo_status == 2))
+ set @killed_mouboo, 1;
+ set @mouboo_status, 0;
+
+ if (MAGIC_FLAGS & MFLAG_DID_CUTTREE)
+ set @cut_tree, 1;
+
+ set @sagatha_follower, (QUEST_MAGIC & (NIBBLE_4_MASK | NIBBLE_5_MASK)) >> NIBBLE_4_SHIFT;
+
+ if (OrumQuest > 30) goto L_Flower5;
+ if (OrumQuest > 26) goto L_Flower4;
+ if (OrumQuest > 23) goto L_Flower3;
+ if (OrumQuest > 20) goto L_Flower2;
+ if (OrumQuest > 17) goto L_Flower1;
+ if (OrumQuest > 15) goto L_Mistrust;
+
+ mes "[Waric]";
+ mes "\"You! You're really more insistent than it's good for you...\"";
+ mes "He turns towards Orum.";
+ next;
+ mes "[Waric]";
+ mes "\"It seems your ridiculous Guarding Spirit failed his task.";
+ mes "Deal with this, we really can't afford more of this distractions.\"";
+ goto L_Close;
+
+L_Mistrust:
+ mes "[Waric]";
+ mes "\"So you say you want to help us? You don't look very competent.";
+ mes "Also, I don't see what motivates you to do this.\"";
+ next;
+ mes "\"Show your usefulness, then I might take you serious.\"";
+ goto L_Close;
+
+L_Flower1:
+ mes "[Waric]";
+ mes "\"You placed the first flower. I'm surprised, I didn't expect you to actually stay and be useful.\"";
+ goto L_Close;
+ // TODO: enable this when adding the spells
+ // also add logic to the other label's dialogs/eventually change their dialog to fit better
+ if (!getskilllv(SKILL_MAGIC))
+ goto L_Close;
+ menu
+ "Can you teach me some magic?", -,
+ "Of course!", L_Close;
+
+ if (@sagatha_follower)
+ goto L_Sagatha;
+ if (!@killed_mouboo && !@cut_tree)
+ goto L_Undecided;
+ mes "[Waric]";
+ mes "\"Hm. Actually, I could do that. You seem to have some potential.";
+ mes "But first go on with the next summoning artifact.\"";
+ goto L_Close;
+
+L_Flower2:
+ mes "[Waric]";
+ mes "\"You placed the second flower? It seems Orum's choice of tools is better than expected.\"";
+ goto L_Close;
+
+L_Flower3:
+ mes "[Waric]";
+ mes "\"I saw that you helped to create the third flower which you just placed. Good.\"";
+ goto L_Close;
+
+L_Flower4:
+ mes "[Waric]";
+ mes "\"We're very close to reach our goal, now that you've placed the fourth flower. Keep it up.\"";
+ goto L_Close;
+
+L_Flower5:
+ mes "[Waric]";
+ mes "\"Hahaha, excellent. You handled the creation of our pentagram very well. I'll keep that in mind.";
+ mes "I advised Orum to give you some reward, did you already talk to him?\"";
+ goto L_Close;
+
+L_Spells:
+ mes "TODO";
+ // teach spells
+ // doesn't trust the player at all if player is follower of sagatha
+ goto L_Close;
+
+L_Undecided:
+ mes "[Waric]";
+ mes "\"Well. I could. But I'm not sure you're trustworthy.\"";
+ next;
+ mes "\"How can I know you're not going to run to Sagatha with what I'd teach you?\"";
+ goto L_Close;
+
+L_Sagatha:
+ mes "[Waric]";
+ mes "\"You're already a student of Sagatha. I won't teach you anything.\"";
+ goto L_Close;
+
+L_Close:
+ set @killed_mouboo, 0;
+ set @cut_tree, 0;
+ set @sagatha_follower, 0;
+ close;
+}
+
+017-1.gat,74,32,0|script|DebugFlowerP|153,{
+ mes "Debug options for Orum's quest:";
+ menu
+ "Candle Helmet done.", L_CandleHelmet,
+ "Input quest variable.", L_Var,
+ "Show current quest state.", L_CurrentState,
+ "Reset quest.", L_Reset,
+ "Nevermind.", L_Close;
+
+L_CandleHelmet:
+ set OrumQuest, 14;
+ goto L_Close;
+
+L_Var:
+ input OrumQuest;
+ goto L_Close;
+
+L_CurrentState:
+ mes "The value of the quest variable OrumQuest is currently " + OrumQuest + ".";
+ goto L_Close;
+
+L_Reset:
+ set OrumQuest, 0;
+ goto L_Close;
+
+L_Close:
+ close;
+
+OnInit:
+ if (!debug)
+ disablenpc "DebugFlowerP";
+}