summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--world/map/db/item_db.txt12
-rw-r--r--world/map/db/mob_db.txt8
-rw-r--r--world/map/npc/012-1/_import.txt1
-rw-r--r--world/map/npc/012-1/flowerpentagram2.txt96
-rw-r--r--world/map/npc/012-1/shops.txt71
-rw-r--r--world/map/npc/013-1/_import.txt1
-rw-r--r--world/map/npc/013-1/flowerpentagram.txt102
-rw-r--r--world/map/npc/017-1/_import.txt1
-rw-r--r--world/map/npc/017-1/flowerpentagram1.txt81
-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.txt145
-rw-r--r--world/map/npc/018-1/_import.txt1
-rw-r--r--world/map/npc/018-1/flowerpentagram3.txt110
-rw-r--r--world/map/npc/055-1/_import.txt1
-rw-r--r--world/map/npc/055-1/flowerpentagram4.txt124
-rw-r--r--world/map/npc/056-1/_import.txt1
-rw-r--r--world/map/npc/056-1/flowerpentagram5.txt139
-rw-r--r--world/map/npc/functions/mob_points.txt12
20 files changed, 1783 insertions, 10 deletions
diff --git a/world/map/db/item_db.txt b/world/map/db/item_db.txt
index 46139098..ad773101 100644
--- a/world/map/db/item_db.txt
+++ b/world/map/db/item_db.txt
@@ -1,3 +1,4 @@
+=======
// Name and Label MUST NOT exceed 23 characters (as marked)
//ID, Name===================, Label==================, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
0, DEFAULT, Default, 0, 20, 10, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {}, {}
@@ -407,6 +408,17 @@
889, MurdererCrown, Murderer Crown, 5, 75000, 12000, 240, 0, 4, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
890, BeanieCopter, Beanie Copter, 5, 8000, 2000, 20, 0, 4, 0, 2, 0, 2, 256, 0, 0, 0, {}, {}
891, SilkSheet, Silk Sheet, 3, 1000, 250, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
+892, OrangeSummonFlower, Orange Summon Flower, 3, 50, 25, 1, , , , , , , , , , , {}, {}
+893, PurpleSummonFlower, Purple Summon Flower, 3, 100, 50, 1, , , , , , , , , , , {}, {}
+894, WhiteSummonFlower, White Summon Flower, 3, 200, 100, 1, , , , , , , , , , , {}, {}
+895, YellowSummonFlower, Yellow Summon Flower, 3, 400, 200, 1, , , , , , , , , , , {}, {}
+896, RedSummonFlower, Red Summon Flower, 3, 600, 300, 1, , , , , , , , , , , {}, {}
+897, RedRoseHat, Red Rose Hat, 5, 5000, 1000, , , 1, , 8, 0, 2, 256, , 0, 0, {}, {}
+898, WhiteRoseHat, White Rose Hat, 5, 5000, 1000, , , 1, , 8, 0, 2, 256, , 0, 0, {}, {}
+899, PinkRoseHat, Pink Rose Hat, 5, 5000, 1000, , , 1, , 8, 0, 2, 256, , 0, 0, {}, {}
+900, YellowRoseHat, Yellow Rose Hat, 5, 5000, 1000, , , 1, , 8, 0, 2, 256, , 0, 0, {}, {}
+901, OrangeRoseHat, Orange Rose Hat, 5, 5000, 1000, , , 1, , 8, 0, 2, 256, , 0, 0, {}, {}
+902, BlueRoseHat, Blue Rose Hat, 5, 5000, 1000, , , 1, , 8, 0, 2, 256, , 0, 0, {}, {}
// Add new entries above here. For dyed entries,add to the bottom of the 2000s.
diff --git a/world/map/db/mob_db.txt b/world/map/db/mob_db.txt
index e257a6cb..8e336d48 100644
--- a/world/map/db/mob_db.txt
+++ b/world/map/db/mob_db.txt
@@ -113,10 +113,10 @@
1101, DemonicSpirit, DemonicSpirit, 72, 1505, 0, 0, 63, 1, 125, 175, 4, 6, 20, 40, 10, 10, 110, 45, 1, 1, 1, 0, 89, 133, 230, 900, 672, 480, 631, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1102, Luvia, Luvia, 127, 48044, 60, 0, 29216, 5, 339, 364, 50, 92, 1, 29, 55, 255, 255, 255, 31, 30, 1, 0, 69, 181, 220, 1200, 672, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1103, WitchGuard, WitchGuard, 84, 9742, 0, 0, 510, 2, 200, 220, 25, 50, 90, 65, 45, 5, 120, 69, 1, 1, 1, 0, 89, 133, 290, 1200, 672, 30, 631, 2000, 631, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 40
-//1104, Reserved for DemonicMouboo
-//1105, Reserved for ViciousSquirrel
-//1106, Reserved for WickedMushroom
-//1107, Reserved for Bluepar
+1104, DemonicMouboo, DemonicMouboo, 85, 800, 0, 0, 16, 2, 40, 70, 35, 15, 15, 5, 15, 0, 40, 10, 2, 2, 1, 3, 20, 133, 600, 1872, 672, 480, 660, 1000, 660, 500, 703, 750, 4004, 50, 806, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 30
+1105, ViciousSquirrel, ViciousSquirrel, 15, 140, 1, 0, 5, 1, 20, 25, 1, 6, 3, 3, 1, 0, 15, 40, 1, 1, 1, 3, 20, 133, 800, 800, 672, 480, 704, 7000, 680, 1000, 681, 1000, 682, 1000, 683, 1000, 807, 800, 4005, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 15
+1106, WickedMushroom, WickedMushroom, 110, 550, 0, 0, 35, 1, 70, 80, 4, 4, 16, 12, 10, 10, 35, 10, 1, 1, 1, 3, 22, 133, 800, 1800, 672, 480, 613, 500, 4007, 50, 567, 100, 566, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 60
+1107, Bluepar, Bluepar, 30, 350, 0, 0, 7, 2, 7, 15, 0, 5, 1, 1, 1, 0, 20, 25, 2, 2, 1, 3, 20, 133, 800, 1872, 672, 480, 567, 800, 568, 800, 4002, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 50
1108, AngryFireGoblin, AngryFireGoblin, 30, 320, 0, 0, 4, 1, 25, 40, 0, 10, 3, 3, 3, 2, 10, 50, 1, 1, 1, 3, 23, 133, 800, 1872, 672, 480, 505, 800, 501, 150, 518, 800, 502, 150, 521, 70, 522, 10, 701, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 30
1109, AngrySeaSlime, AngrySeaSlime, 80, 1200, 0, 0, 23, 1, 40, 70, 13, 17, 3, 30, 3, 0, 35, 35, 1, 1, 1, 0, 41, 135, 1500, 1872, 672, 480, 535, 800, 657, 800, 518, 500, 510, 1000, 700, 100, 1199, 5000, 568, 100, 541, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1110, AngryGreenSlime, AngryGreenSlime, 60, 1000, 0, 0, 126, 1, 100, 160, 20, 30, 20, 30, 10, 10, 30, 30, 1, 1, 1, 0, 21, 175, 1200, 1872, 672, 480, 502, 200, 4004, 20, 501, 100, 521, 250, 522, 200, 526, 500, 503, 500, 535, 750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 20
diff --git a/world/map/npc/012-1/_import.txt b/world/map/npc/012-1/_import.txt
index 095de153..0829616e 100644
--- a/world/map/npc/012-1/_import.txt
+++ b/world/map/npc/012-1/_import.txt
@@ -4,5 +4,6 @@ map: 012-1.gat
npc: npc/012-1/_mobs.txt
npc: npc/012-1/_warps.txt
npc: npc/012-1/amrak.txt
+npc: npc/012-1/flowerpentagram2.txt
npc: npc/012-1/injured-mouboo.txt
npc: npc/012-1/shops.txt
diff --git a/world/map/npc/012-1/flowerpentagram2.txt b/world/map/npc/012-1/flowerpentagram2.txt
new file mode 100644
index 00000000..d719ad00
--- /dev/null
+++ b/world/map/npc/012-1/flowerpentagram2.txt
@@ -0,0 +1,96 @@
+// Author: Jenalya
+
+012-1.gat,143,70,0|script|#FlowerPentagram2|400,
+{
+ if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+
+ if (OrumQuest > 20) goto L_PlacedSecondFlower;
+ if (OrumQuest == 20) goto L_SecondFlower;
+
+ message strcharinfo(0), "There is something odd about this place.";
+ end;
+
+L_SecondFlower:
+ mes "Orum described this place. You have to place the second magical flower here.";
+ menu
+ "Place the flower.", -,
+ "Leave.", L_Close;
+
+ if (isin("012-1.gat", 142, 69, 144, 71))
+ goto L_Place;
+
+ mes "This isn't working, you're too far away.";
+ goto L_Close;
+
+L_Place:
+ set @localMonsterCount,
+ mobcount("012-1.gat", "#FlowerPentagram2::OnSquirrelDeath") +
+ mobcount("012-1.gat", "#FlowerPentagram2::OnMushroomDeath") +
+ mobcount("012-1.gat", "#FlowerPentagram2::OnScorpionDeath") +
+ mobcount("012-1.gat", "#FlowerPentagram2::OnRScorpionDeath") +
+ 4; // the mobcount function has an offset of -1, so we add 4 to have the actual amount of monsters
+ if (@localMonsterCount > 2)
+ goto L_MonstersAlive;
+
+ if (countitem("PurpleSummonFlower") < 1)
+ goto L_NoFlower;
+ delitem "PurpleSummonFlower", 1;
+ mes "Remembering what happened the last time, you take a careful look around. Everything's calm. You proceed to place the second flower.";
+ mes "Sensing a certain tension build up around you, you can't help but feel alarmed.";
+ set OrumQuest, 21;
+ close2;
+ areamonster "012-1.gat", 140, 64, 146, 73, "", 1105, 2, "#FlowerPentagram2::OnSquirrelDeath";
+ areamonster "012-1.gat", 140, 64, 146, 73, "", 1106, 2, "#FlowerPentagram2::OnMushroomDeath";
+ areamonster "012-1.gat", 140, 64, 146, 73, "", 1003, 2, "#FlowerPentagram2::OnScorpionDeath";
+ areamonster "012-1.gat", 140, 64, 146, 73, "", 1004, 2, "#FlowerPentagram2::OnRScorpionDeath";
+ set @value, 15;
+ callfunc "QuestSagathaAnnoy";
+ set @value, 0;
+ end;
+
+OnSquirrelDeath:
+ set @mobID, 1105;
+ callfunc "MobPoints";
+ end;
+
+OnMushroomDeath:
+ set @mobID, 1106;
+ callfunc "MobPoints";
+ end;
+
+OnScorpionDeath:
+ set @mobID, 1003;
+ callfunc "MobPoints";
+ end;
+
+OnRScorpionDeath:
+ set @mobID, 1004;
+ callfunc "MobPoints";
+ end;
+
+L_MonstersAlive:
+ mes "As you get closer to the place, you feel an unnerving presence.";
+ mes "This place has recently been used to summon something! And the beings are still nearby!";
+ next;
+ mes "You should get rid of them before attempting the summoning yourself.";
+ goto L_Close;
+
+L_NoFlower:
+ mes "You look into your pocket, but the flower isn't there. Where did you put it?";
+ mes "If you can't find it, you should talk to Orum again.";
+ goto L_Close;
+
+L_PlacedSecondFlower:
+ mes "You placed the second of Orum's magical flowers on this spot.";
+ mes "You can still feel the magical power shimmering around this place, waiting to be unleashed.";
+ goto L_Close;
+
+L_PlacedFifthFlower:
+ mes "This is where you placed the second of Orum's magical flowers.";
+ mes "However, now that the summoning spell has been cast, everything is back to normal here.";
+ goto L_Close;
+
+L_Close:
+ set @localMonsterCount, 0;
+ close;
+}
diff --git a/world/map/npc/012-1/shops.txt b/world/map/npc/012-1/shops.txt
index 2c48b9b6..ac627e1f 100644
--- a/world/map/npc/012-1/shops.txt
+++ b/world/map/npc/012-1/shops.txt
@@ -1,3 +1,72 @@
//
-012-1.gat,36,99,0|shop|Blossom|163,RedRose :-1,PinkRose :-1,YellowRose :-1,WhiteRose :-1,OrangeRose :-1,DarkRedRose :-1,RedTulip :-1,PinkTulip :-1,YellowTulip :-1,WhiteTulip :-1,OrangeTulip :-1
+012-1.gat,36,99,0|shop|#FlowerShop|127,RedRose :-1,PinkRose :-1,YellowRose :-1,WhiteRose :-1,OrangeRose :-1,DarkRedRose :-1,RedTulip :-1,PinkTulip :-1,YellowTulip :-1,WhiteTulip :-1,OrangeTulip :-1
+
+012-1.gat,36,99,0|script|Blossom|163,
+{
+ mes "[Blossom]";
+ mes "\"Hello, would you like to buy some flowers?\"";
+ menu
+ "Sure.", L_Shop,
+ "Not right now.", L_Close,
+ "Can I trade this Rose Hat for a differently colored one?", L_RoseHat;
+
+L_Shop:
+ shop "#FlowerShop";
+
+L_RoseHat:
+ set @base_id, 897;
+ mes "[Blossom]";
+ mes "\"Certainly, which color do you have?\"";
+ menu
+ "A red one.", -,
+ "A white one.", -,
+ "A pink one.", -,
+ "A yellow one.", -,
+ "An orange one.", -,
+ "A blue one.", -;
+ set @have_id, @base_id + @menu - 1;
+
+ mes "[Blossom]";
+ mes "\"And which color would you like?\"";
+ menu
+ "A red one.", -,
+ "A white one.", -,
+ "A pink one.", -,
+ "A yellow one.", -,
+ "An orange one.", -,
+ "A blue one.", -;
+ set @receive_id, @base_id + @menu - 1;
+
+ if (@have_id == @receive_id)
+ goto L_SameColor;
+ if (countitem(@have_id) < 1)
+ goto L_NoItem;
+ delitem @have_id, 1;
+ getitem @receive_id, 1;
+ mes "[Blossom]";
+ mes "\"Here it is.\"";
+ goto L_Close;
+
+L_NoItem:
+ mes "[Blossom]";
+ mes "\"Oh, you don't have a Rose Hat in that color.";
+ mes "Did you mean a different color?\"";
+ menu
+ "Yes, I meant a different color.", L_RoseHat,
+ "No, I changed my mind.", L_Close;
+
+L_SameColor:
+ mes "[Blossom]";
+ mes "\"Oh, you already have a hat in that color.";
+ mes "Did you want something else?\"";
+ menu
+ "Yes, let me pick a different color.", L_RoseHat,
+ "No, I changed my mind.", L_Close;
+
+L_Close:
+ set @base_id, 0;
+ set @have_id, 0;
+ set @receive_id, 0;
+ close;
+}
diff --git a/world/map/npc/013-1/_import.txt b/world/map/npc/013-1/_import.txt
index 167433a3..2c096edd 100644
--- a/world/map/npc/013-1/_import.txt
+++ b/world/map/npc/013-1/_import.txt
@@ -3,4 +3,5 @@
map: 013-1.gat
npc: npc/013-1/_mobs.txt
npc: npc/013-1/_warps.txt
+npc: npc/013-1/flowerpentagram.txt
npc: npc/013-1/sagatha.txt
diff --git a/world/map/npc/013-1/flowerpentagram.txt b/world/map/npc/013-1/flowerpentagram.txt
new file mode 100644
index 00000000..73618c69
--- /dev/null
+++ b/world/map/npc/013-1/flowerpentagram.txt
@@ -0,0 +1,102 @@
+013-1.gat,1,1,0|script|#FlowerPentagram|127,
+{
+end;
+
+OnSummon:
+ announce "Sagatha: What kind of a foolish trick is this? Who dares to create such calamity in my forest?", 0;
+
+ callsub S_CleanUp;
+ // area closely to sagatha
+ areamonster "013-1.gat", 119, 21, 134, 36, "", 1105, 3, "#FlowerPentagram::OnSquirrelDeath";
+ areamonster "013-1.gat", 119, 21, 134, 36, "", 1106, 2, "#FlowerPentagram::OnMushroomDeath";
+ areamonster "013-1.gat", 119, 21, 134, 36, "", 1107, 3, "#FlowerPentagram::OnBlueparDeath";
+ areamonster "013-1.gat", 119, 21, 134, 36, "", 1104, 2, "#FlowerPentagram::OnMoubooDeath";
+ areamonster "013-1.gat", 119, 21, 134, 36, "", 1003, 10, "#FlowerPentagram::OnScorpionDeath";
+ areamonster "013-1.gat", 119, 21, 134, 36, "", 1004, 7, "#FlowerPentagram::OnRScorpionDeath";
+ areamonster "013-1.gat", 119, 21, 134, 36, "", 1057, 5, "#FlowerPentagram::OnAScorpionDeath";
+ areamonster "013-1.gat", 119, 21, 134, 36, "", 1009, 3, "#FlowerPentagram::OnBScorpionDeath";
+ // wider area around sagatha
+ areamonster "013-1.gat", 68, 25, 133, 73, "", 1105, 3, "#FlowerPentagram::OnSquirrelDeath";
+ areamonster "013-1.gat", 68, 25, 133, 73, "", 1106, 3, "#FlowerPentagram::OnMushroomDeath";
+ areamonster "013-1.gat", 68, 25, 133, 73, "", 1107, 5, "#FlowerPentagram::OnBlueparDeath";
+ areamonster "013-1.gat", 68, 25, 133, 73, "", 1104, 2, "#FlowerPentagram::OnMoubooDeath";
+ areamonster "013-1.gat", 68, 25, 133, 73, "", 1003, 6, "#FlowerPentagram::OnScorpionDeath";
+ areamonster "013-1.gat", 68, 25, 133, 73, "", 1004, 5, "#FlowerPentagram::OnRScorpionDeath";
+ areamonster "013-1.gat", 68, 25, 133, 73, "", 1057, 4, "#FlowerPentagram::OnAScorpionDeath";
+ areamonster "013-1.gat", 68, 25, 133, 73, "", 1009, 2, "#FlowerPentagram::OnBScorpionDeath";
+ // almost the entire map
+ areamonster "013-1.gat", 24, 22, 136, 100, "", 1105, 4, "#FlowerPentagram::OnSquirrelDeath";
+ areamonster "013-1.gat", 24, 22, 136, 100, "", 1106, 3, "#FlowerPentagram::OnMushroomDeath";
+ areamonster "013-1.gat", 24, 22, 136, 100, "", 1107, 5, "#FlowerPentagram::OnBlueparDeath";
+ areamonster "013-1.gat", 24, 22, 136, 100, "", 1104, 3, "#FlowerPentagram::OnMoubooDeath";
+ areamonster "013-1.gat", 24, 22, 136, 100, "", 1003, 5, "#FlowerPentagram::OnScorpionDeath";
+ areamonster "013-1.gat", 24, 22, 136, 100, "", 1004, 4, "#FlowerPentagram::OnRScorpionDeath";
+ areamonster "013-1.gat", 24, 22, 136, 100, "", 1057, 3, "#FlowerPentagram::OnAScorpionDeath";
+ areamonster "013-1.gat", 24, 22, 136, 100, "", 1009, 1, "#FlowerPentagram::OnBScorpionDeath";
+ end;
+
+OnSquirrelDeath:
+ set @mobID, 1105;
+ callfunc "MobPoints";
+ end;
+
+OnMushroomDeath:
+ set @mobID, 1106;
+ callfunc "MobPoints";
+ end;
+
+OnBlueparDeath:
+ set @mobID, 1107;
+ callfunc "MobPoints";
+ end;
+
+OnMoubooDeath:
+ set @mobID, 1104;
+ callfunc "MobPoints";
+ end;
+
+OnScorpionDeath:
+ set @mobID, 1003;
+ callfunc "MobPoints";
+ end;
+
+OnRScorpionDeath:
+ set @mobID, 1004;
+ callfunc "MobPoints";
+ end;
+
+OnAScorpionDeath:
+ set @mobID, 1057;
+ callfunc "MobPoints";
+ end;
+
+OnBScorpionDeath:
+ set @mobID, 1009;
+ callfunc "MobPoints";
+ end;
+
+S_CleanUp:
+ killmonster "013-1.gat", "#FlowerPentagram::OnSquirrelDeath";
+ killmonster "013-1.gat", "#FlowerPentagram::OnMushroomDeath";
+ killmonster "013-1.gat", "#FlowerPentagram::OnBlueparDeath";
+ killmonster "013-1.gat", "#FlowerPentagram::OnMoubooDeath";
+ killmonster "013-1.gat", "#FlowerPentagram::OnScorpionDeath";
+ killmonster "013-1.gat", "#FlowerPentagram::OnRScorpionDeath";
+ killmonster "013-1.gat", "#FlowerPentagram::OnAScorpionDeath";
+ killmonster "013-1.gat", "#FlowerPentagram::OnBScorpionDeath";
+ return;
+}
+
+function|script|FlowerPentagramCount|{
+ set $@Flower_Pentagram_Mobcount,
+ mobcount("013-1.gat", "#FlowerPentagram::OnSquirrelDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram::OnMushroomDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram::OnBlueparDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram::OnMoubooDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram::OnScorpionDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram::OnRScorpionDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram::OnAScorpionDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram::OnBScorpionDeath") +
+ 8; // the mobcount function has an offset of -1, so we add 8 to have the actual amount of monsters
+ return;
+}
diff --git a/world/map/npc/017-1/_import.txt b/world/map/npc/017-1/_import.txt
index 29858887..9ab66da3 100644
--- a/world/map/npc/017-1/_import.txt
+++ b/world/map/npc/017-1/_import.txt
@@ -3,3 +3,4 @@
map: 017-1.gat
npc: npc/017-1/_mobs.txt
npc: npc/017-1/_warps.txt
+npc: npc/017-1/flowerpentagram1.txt
diff --git a/world/map/npc/017-1/flowerpentagram1.txt b/world/map/npc/017-1/flowerpentagram1.txt
new file mode 100644
index 00000000..817e6909
--- /dev/null
+++ b/world/map/npc/017-1/flowerpentagram1.txt
@@ -0,0 +1,81 @@
+// Author: Jenalya
+
+017-1.gat,95,42,0|script|#FlowerPentagram1|400,
+{
+ if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+
+ if (OrumQuest > 17) goto L_PlacedFirstFlower;
+ if (OrumQuest == 17) goto L_FirstFlower;
+
+ message strcharinfo(0), "Something is odd about this place.";
+ end;
+
+L_FirstFlower:
+ mes "This looks like the place Orum described.";
+ menu
+ "Place the flower.", -,
+ "Leave.", L_Close;
+
+ if (isin("017-1.gat", 94, 41, 96, 43))
+ goto L_Place;
+
+ mes "You're too far away.";
+ goto L_Close;
+
+L_Place:
+ set @localMonsterCount,
+ mobcount("017-1.gat", "#FlowerPentagram1::OnSquirrelDeath") +
+ mobcount("017-1.gat", "#FlowerPentagram1::OnScorpionDeath") +
+ 2; // the mobcount function has an offset of -1, so we add 2 to have the actual amount of monsters
+ if (@localMonsterCount > 2)
+ goto L_MonstersAlive;
+
+ if (countitem("OrangeSummonFlower") < 1)
+ goto L_NoFlower;
+ delitem "OrangeSummonFlower", 1;
+ mes "You carefully place the magic flower on the marked spot. You feel some tension in the air around you.";
+ set OrumQuest, 18;
+ close2;
+ areamonster "017-1.gat", 91, 37, 101, 46, "", 1105, 2, "#FlowerPentagram1::OnSquirrelDeath";
+ areamonster "017-1.gat", 91, 37, 101, 46, "", 1003, 3, "#FlowerPentagram1::OnScorpionDeath";
+ set @value, 15;
+ callfunc "QuestSagathaAnnoy";
+ set @value, 0;
+ end;
+
+OnSquirrelDeath:
+ set @mobID, 1105;
+ callfunc "MobPoints";
+ end;
+
+OnScorpionDeath:
+ set @mobID, 1003;
+ callfunc "MobPoints";
+ end;
+
+L_MonstersAlive:
+ mes "As you get closer to the place, you feel an unnerving presence.";
+ mes "This place has recently been used to summon something! And the beings are still nearby!";
+ next;
+ mes "You should get rid of them before attempting the summoning yourself.";
+ goto L_Close;
+
+L_NoFlower:
+ mes "You don't have the flower with you. Where did you put it?";
+ mes "If you can't find it, you should talk to Orum again.";
+ goto L_Close;
+
+L_PlacedFirstFlower:
+ mes "You placed the first of Orum's magical flowers on this spot.";
+ mes "You can still feel the magical power shimmering around this place, waiting to be unleashed.";
+ goto L_Close;
+
+L_PlacedFifthFlower:
+ mes "This is where you placed the first of Orum's magical flowers.";
+ mes "However, now that the summoning spell has been cast, everything is back to normal here.";
+ goto L_Close;
+
+L_Close:
+ set @localMonsterCount, 0;
+ close;
+}
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..c3f2ebc8
--- /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 there! My master does not wish to be disturbed! I cannot 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,
+ "Okay, okay.", L_Close;
+
+L_Back:
+ mes "[Guarding Spirit]";
+ mes "\"Yes, he was gone for quite a while. When he arrived home, he had a rather frightening looking guy with him.\"";
+ next;
+ mes "\"Ahem, I mean, yes Mortal. He came back to his residence and does not wish to interact with those below his status. Leave!\"";
+ goto L_Close;
+
+L_Master:
+ mes "[Guarding Spirit]";
+ mes "\"He is a powerful wizard. He can force the very elements to obey his will! He regularly communes with demons and higher beings from the astral plane, such as myself.\"";
+ next;
+ mes "\"Mankind knows his name as 'Orum'.\"";
+ menu
+ "Hey, I helped him out some while ago!", L_Helped,
+ "Orum? That guy who feels weary due to some transmutation spells?", L_Disrespectful,
+ "Then I better respect his wish and leave!", L_Close;
+
+L_Disrespectful:
+ mes "[Guarding Spirit]";
+ mes "\"What are you saying? Who are you to mock my Master?! You will regret that!\"";
+ set Hp, 1 + Hp/5;
+ goto L_Close;
+
+L_Helped:
+ mes "[Guarding Spirit]";
+ mes "\"Really? That sounds implausible to me.\"";
+ next;
+ mes "\"Why would my master mess around with such a puny mortal as yourself?\"";
+ 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 "\"Alright, I will let you pass.\"";
+ next;
+ mes "\"Remember that when you speak with him, do so with respect for someone befitting his status.\"";
+ set OrumQuest, 15;
+ warp "017-4.gat", 201, 26;
+ goto L_Close;
+
+L_Block:
+ mes "[Guarding Spirit]";
+ mes "\"Stop, mortal! I cannot let you pass!\"";
+ menu
+ "What? Who are you?", -,
+ "Why?", -,
+ "Ok...", L_Close;
+ mes "[Guarding Spirit]";
+ mes "\"My master summoned me for the sole purpose of preventing anyone else from entering his refuge.";
+ mes "I'll stand guard and protect it with all my power!\"";
+ next;
+ mes "\"If I fail, he will punish me. I do not like being punished by his magic, it 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..79ba38b0
--- /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 services...", -,
+ "Ha! You thought you could hide from me?", L_Banish,
+ "Keep calm, I want to work 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've found your hideout!", L_Banish;
+
+ mes "[Orum]";
+ mes "\"Well, why not? Here is a simple enough task to prove 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 as you're told.\"";
+ 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 mumbling under his breath 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've brought?\"";
+ 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 crushing them, using a very old-looking mortar and pestle. As they turn into a fine powder, he mixes some of it together in the cauldron and finally dips the tulip into it, mumbling 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 leave the cave, go a couple of steps to the east and you'll find a spot of grass with flowers on a small hill. You have to place it there, 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
+ "Okay, I'll do that.", L_Close,
+ "Could you explain where to place it, one more time?", L_WayFirstFlower,
+ "I... I lost it.", -;
+
+ mes "[Orum]";
+ mes "\"What?! I can't believe this! How could 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
+ "Okay.", -,
+ "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
+ "Okay, 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 work on the materials you've gathered, in the same manner he did the first time. Suddenly something from the mortar gets on his hand and it makes a nasty sizzling noise. He yells in pain, clutching his hand to his chest. After cleaning his hand he continues. In the end he gives you another magical flower while rubbing his hand.";
+ next;
+ mes "[Orum]";
+ mes "\"Ouch, it still hurts. I need some time to recover. In the meantime, go and place the flower.\"";
+ next;
+L_WaySecondFlower:
+ mes "[Orum]";
+ mes "\"The next spot is in the Woodland Hills. When you leave our caves, go south until you come out of the forest. Then walk west, past the hut of that old man.";
+ mes "The spot where you have to place it is on higher ground, so you'll 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 and place the second magical flower.\"";
+ menu
+ "I'm on my way.", L_Close,
+ "Where do I have to put it again?", L_WaySecondFlower,
+ "Sorry, I've lost it.", -;
+
+ mes "[Orum]";
+ mes "\"What?! You incompetent dunderhead! I got hurt while creating this powerful magical artifact and you managed to 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 "\"Okay, 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 could feel it here.";
+ mes "Everything is going very well.\"";
+ mes "Orum grins contently.";
+ 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 spots for the flowers have been very carefully chosen! You see, it's going to be a very LARGE 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 Furs, " + @AMOUNT_REDSTINGER + " Red Scorpion Stingers and one White Tulip.\"";
+ menu
+ "I got everything you want.", -,
+ "I'm still trying to gather what you need.", 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 materials out of your hands and starts preparing 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. Okay, listen.\"";
+ next;
+ mes "\"Here is the rheological additive that you have to pour on it when the reaction between the powders is on its peak level. I'm going to slowly add a little more of the powder, which will make it react faster. Got it?\"";
+ menu
+ "Rheo-what?", -,
+ "Okay, 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 powder.";
+ 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 ruined. You waited too long.\"";
+ next;
+ mes "\"You have to collect all the ingredients again, now.\"";
+ goto L_Close;
+
+L_EasyTooEarly:
+ mes "You pour the liquid Orum gave you into the mixture.";
+ mes "It stops bubbling and gets thicker... and thicker... and thicker...";
+ mes "[Orum]";
+ mes "\"No! That was too early. Look at what you've done! It's hard as a rock now.\"";
+ next;
+ mes "\"How annoying! You have to gather new ingredients.\"";
+ goto L_Close;
+
+L_EasySuccess:
+ getitem "WhiteSummonFlower", 1;
+ set OrumQuest, 23;
+
+ mes "As you pour the liquid into the bubbling mixture, it calms down and becomes viscous. Orum takes the tulip and dips it into the mixture.";
+ mes "[Orum]";
+ mes "\"Excellent! 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 know anything about Astral magic? A pentagram is used for summoning, 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? Place the third flower where it's supposed to go.\"";
+ menu
+ "Okay.", L_Close,
+ "I forgot 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 impudence! 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 Furs, " + @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've placed the third magical flower, only two more are left.";
+ mes "But we shouldn't become careless now, with each flower the procedure gets more difficult.\"";
+ menu
+ "Understood! What's 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 through the rift 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'll go and gather the items.", 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 seems to be really concentrating.";
+ mes "[Orum]";
+ mes "\"Okay. We're going to do it together again, but this time we'll switch the roles. You're going to mix the powders and I'm going to pour the rheological additive into the mixture.\"";
+ next;
+ mes "\"This is because... ahm, because you will learn something from it, yes.";
+ mes "But remember to handle the powders carefuly, they're highly 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 make it a clear, strong orange and hold that for a moment. That way I'll have enough time to pour the rheological additive.\"";
+ menu
+ "Let's try it.", -,
+ "I'm not sure what to do...", -;
+
+ 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 powder you use. The mixture will randomly fluctuate a bit, too, so keep that in mind.\"";
+ mes "He mixes together a few of each ingredients and then hands you two 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 sizzles 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 most of the liquid quickly 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 to be corroding the cauldron! 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 orange. You have to use both powders for that!\"";
+ next;
+ mes "\"This is ruined 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 dips the flower into the cauldron.";
+ mes "[Orum]";
+ mes "\"Excellent! Wonderful. Here's the flower. I need to clean up the cauldron, so in the meantime go 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 a 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 the cave.\"";
+ menu
+ "That's... very comforting.", -,
+ "And what about everyone outside? Like me!?", -;
+
+ mes "[Orum]";
+ mes "\"Umm, well. You won't be in the center of it where the monsters will appear, of course.";
+ 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 wait! Everything is going so well! Why are you wasting time? 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 could you lose it?\"";
+ next;
+ mes "\"This behaviour shouldn't remain unpunished. Pay a recompensation fee of " + @RECOMPENSATION_4 + " GP, and I will 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 your focus 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 center of the pentagram. Or rather who is.\"";
+ next;
+ mes "\"Anyway, 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 draws a deep breath. He then begins to prepare them similarly to the materials for the other flowers.";
+ mes "[Orum]";
+ mes "\"Well, basically, we need to do the same as with the other flowers. We need to be careful, however, because this mixture is a bit more delicate. Would you like to do the add the rheological additive or mix the powders?\"";
+ menu
+ "I'll handle the additive.", L_Additive,
+ "Let me mix the powders.", 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 "The next dash of powder Orum adds causes the mixture to sputter and splash. Some of the hot liquid lands on the back of your hand!";
+ heal -5, 0;
+ menu
+ "Ouch!",-,
+ "Aah!", -,
+ "Urgh!", -;
+ mes "As you step back from the cauldron you jostle Orum, and the Red Rose falls out of his pocket into the cauldron.";
+ goto L_FlowerHat;
+
+L_Pulvers:
+ mes "You start mixing the powders together. It bubbles much more than during the previous brewing.";
+ next;
+ mes "The next dash of powder you add causes the mixture to bubble and splash. Some of the hot liquid lands on Orum's hand! He screams and jumps back while waving his hand around.";
+ next;
+ mes "This causes the flower to fall out of his pocket, landing right into the cauldron.";
+ 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 still 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. She thinks that gives her the right to stick her nose into other mages' affairs.\"";
+ next;
+ mes "\"What's even worse, she thinks she can punish other mages for actions she considers wrong - \"";
+ mes "[Waric]";
+ mes "\"Orum! You do not need to get into the details of this.\"";
+ next;
+ mes "[Orum]";
+ mes "\"Oh, heh, of course. However, we'll teach her a lesson.";
+ mes "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 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. You and your clumsy fingers need to take a step back so it won'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 a very old and tall tree. There you'll find another prepared spot with some flowers.\"";
+ goto L_Close;
+
+L_AskHurtSagatha:
+ mes "[Orum]";
+ mes "\"Oh, are you getting scared? I thought you wanted 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 wanted to actually harm her, we'd need to summon some greater powers. That'd be risky in the best case, and devastatingly costly in the worst.\"";
+ next;
+ mes "\"Unless... well, 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 for 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 necessary materials for a new flower.\"";
+ menu
+ "Okay, 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 materials and prepares a new flower.";
+ mes "[Orum]";
+ mes "\"Here is another flower. 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, whenever I think of Sagatha's reaction, it brings a smile to my face. You've done a very good job.\"";
+ goto L_Close;
+
+L_NoRecompensation:
+ mes "[Orum]";
+ mes "\"Well, you could still try to recover the magical flower instead. It's 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..559e3f1f
--- /dev/null
+++ b/world/map/npc/017-4/waric.txt
@@ -0,0 +1,145 @@
+// 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 really are far too persistent to know what is good for you!\"";
+ mes "He turns towards Orum.";
+ next;
+ mes "[Waric]";
+ mes "\"It seems your ridiculous Guarding Spirit has failed at his task.";
+ mes "Deal with this. We cannot afford any more of these distractions.\"";
+ goto L_Close;
+
+L_Mistrust:
+ mes "[Waric]";
+ mes "\"So, you say you want to help us? You do not look very competent.";
+ mes "Also, I do not see what motivation you have to help.\"";
+ next;
+ mes "\"Demonstrate your worth and I might take you seriously.\"";
+ goto L_Close;
+
+L_Flower1:
+ mes "[Waric]";
+ mes "\"You placed the first flower. Why, I am surprised! I did not expect you to actually stay and become 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 "\"Hmm. I suppose I could do that. You seem to have some potential.";
+ mes "First, proceed 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 and place the third flower. Good.\"";
+ goto L_Close;
+
+L_Flower4:
+ mes "[Waric]";
+ mes "\"Now that you have placed the fourth flower, we are very close to reaching our goal. Keep it up.\"";
+ goto L_Close;
+
+L_Flower5:
+ mes "[Waric]";
+ mes "\"Hahaha, excellent. You handled the creation of our pentagram very well. I will be keeping that in mind.";
+ mes "I have advised Orum to give you a reward. Go now and speak with 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. However, I am not sure you are all that trustworthy.\"";
+ next;
+ mes "\"How do I know you will not run off to Sagatha with what I would be teaching you?\"";
+ goto L_Close;
+
+L_Sagatha:
+ mes "[Waric]";
+ mes "\"You are already a student of Sagatha. I will not 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";
+}
diff --git a/world/map/npc/018-1/_import.txt b/world/map/npc/018-1/_import.txt
index 21971544..0089f9c3 100644
--- a/world/map/npc/018-1/_import.txt
+++ b/world/map/npc/018-1/_import.txt
@@ -3,6 +3,7 @@
map: 018-1.gat
npc: npc/018-1/_mobs.txt
npc: npc/018-1/_warps.txt
+npc: npc/018-1/flowerpentagram3.txt
npc: npc/018-1/mike.txt
npc: npc/018-1/miners.txt
npc: npc/018-1/sword.txt
diff --git a/world/map/npc/018-1/flowerpentagram3.txt b/world/map/npc/018-1/flowerpentagram3.txt
new file mode 100644
index 00000000..81f994eb
--- /dev/null
+++ b/world/map/npc/018-1/flowerpentagram3.txt
@@ -0,0 +1,110 @@
+// Author: Jenalya
+
+018-1.gat,83,29,0|script|#FlowerPentagram3|400,
+{
+ if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+
+ if (OrumQuest > 23) goto L_PlacedThirdFlower;
+ if (OrumQuest == 23) goto L_ThirdFlower;
+
+ message strcharinfo(0), "Something is odd about this place.";
+ end;
+
+L_ThirdFlower:
+ mes "You recognize this place as the spot where Orum wants you to place the third of his magical flowers.";
+ menu
+ "Place the flower.", -,
+ "Leave.", L_Close;
+
+ if (isin("018-1.gat", 82, 28, 84, 30))
+ goto L_Place;
+
+ mes "This isn't working, you're too far away.";
+ goto L_Close;
+
+L_Place:
+ set @localMonsterCount,
+ mobcount("018-1.gat", "#FlowerPentagram3::OnSquirrelDeath") +
+ mobcount("018-1.gat", "#FlowerPentagram3::OnMushroomDeath") +
+ mobcount("018-1.gat", "#FlowerPentagram3::OnBlueparDeath") +
+ mobcount("018-1.gat", "#FlowerPentagram3::OnScorpionDeath") +
+ mobcount("018-1.gat", "#FlowerPentagram3::OnRScorpionDeath") +
+ mobcount("018-1.gat", "#FlowerPentagram3::OnAScorpionDeath") +
+ 6; // the mobcount function has an offset of -1, so we add 6 to have the actual amount of monsters
+ if (@localMonsterCount > 4)
+ goto L_MonstersAlive;
+
+ if (countitem("WhiteSummonFlower") < 1)
+ goto L_NoFlower;
+ delitem "WhiteSummonFlower", 1;
+ mes "Knowing what will happen, you prepare yourself for a fight. Then you go ahead with the ritual and place the magical flower.";
+ mes "You feel the now familiar tension around you. Here they come.";
+ set OrumQuest, 24;
+ close2;
+ areamonster "018-1.gat", 73, 22, 89, 36, "", 1105, 1, "#FlowerPentagram3::OnSquirrelDeath";
+ areamonster "018-1.gat", 73, 22, 89, 36, "", 1106, 2, "#FlowerPentagram3::OnMushroomDeath";
+ areamonster "018-1.gat", 73, 22, 89, 36, "", 1107, 1, "#FlowerPentagram3::OnBlueparDeath";
+ areamonster "018-1.gat", 73, 22, 89, 36, "", 1003, 2, "#FlowerPentagram3::OnScorpionDeath";
+ areamonster "018-1.gat", 73, 22, 89, 36, "", 1004, 1, "#FlowerPentagram3::OnRScorpionDeath";
+ areamonster "018-1.gat", 73, 22, 89, 36, "", 1057, 2, "#FlowerPentagram3::OnAScorpionDeath";
+ set @value, 15;
+ callfunc "QuestSagathaAnnoy";
+ set @value, 0;
+ end;
+
+OnSquirrelDeath:
+ set @mobID, 1105;
+ callfunc "MobPoints";
+ end;
+
+OnMushroomDeath:
+ set @mobID, 1106;
+ callfunc "MobPoints";
+ end;
+
+OnBlueparDeath:
+ set @mobID, 1107;
+ callfunc "MobPoints";
+ end;
+
+OnScorpionDeath:
+ set @mobID, 1003;
+ callfunc "MobPoints";
+ end;
+
+OnRScorpionDeath:
+ set @mobID, 1004;
+ callfunc "MobPoints";
+ end;
+
+OnAScorpionDeath:
+ set @mobID, 1057;
+ callfunc "MobPoints";
+ end;
+
+L_MonstersAlive:
+ mes "As you get closer to the place, you feel an unnerving presence.";
+ mes "This place has recently been used to summon something! And the beings are still nearby!";
+ next;
+ mes "You should get rid of them before attempting the summoning yourself.";
+ goto L_Close;
+
+L_NoFlower:
+ mes "You reach into your inventory to take out the flower and place it, but you can't find it!";
+ mes "Did you lose it somewhere along the way? If you can't find it, go talk to Orum again.";
+ goto L_Close;
+
+L_PlacedThirdFlower:
+ mes "You placed the third of Orum's magical flowers on this spot.";
+ mes "You can feel the magical power around the place, waiting to be unleashed.";
+ goto L_Close;
+
+L_PlacedFifthFlower:
+ mes "You remember this place. You placed the third of Orum's magical flowers here.";
+ mes "However, now that the summoning spell has been cast, everything is back to normal here.";
+ goto L_Close;
+
+L_Close:
+ set @localMonsterCount, 0;
+ close;
+}
diff --git a/world/map/npc/055-1/_import.txt b/world/map/npc/055-1/_import.txt
index 383525f5..4169b0eb 100644
--- a/world/map/npc/055-1/_import.txt
+++ b/world/map/npc/055-1/_import.txt
@@ -3,4 +3,5 @@
map: 055-1.gat
npc: npc/055-1/_mobs.txt
npc: npc/055-1/_warps.txt
+npc: npc/055-1/flowerpentagram4.txt
npc: npc/055-1/pumpkins.txt
diff --git a/world/map/npc/055-1/flowerpentagram4.txt b/world/map/npc/055-1/flowerpentagram4.txt
new file mode 100644
index 00000000..10bf0539
--- /dev/null
+++ b/world/map/npc/055-1/flowerpentagram4.txt
@@ -0,0 +1,124 @@
+// Author: Jenalya
+
+055-1.gat,141,89,0|script|#FlowerPentagram4|400,
+{
+ if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+
+ if (OrumQuest > 26) goto L_PlacedFourthFlower;
+ if (OrumQuest == 26) goto L_FourthFlower;
+
+ message strcharinfo(0), "Something is odd about this place.";
+ end;
+
+L_FourthFlower:
+ mes "This is the spot where you have to place the fourth of Orum's magical flowers.";
+ menu
+ "Place the flower.", -,
+ "Leave.", L_Close;
+
+ if (isin("055-1.gat", 140, 88, 142, 90))
+ goto L_Place;
+
+ mes "This isn't working, you're too far away.";
+ goto L_Close;
+
+L_Place:
+ set @localMonsterCount,
+ mobcount("055-1.gat", "#FlowerPentagram4::OnSquirrelDeath") +
+ mobcount("055-1.gat", "#FlowerPentagram4::OnMushroomDeath") +
+ mobcount("055-1.gat", "#FlowerPentagram4::OnBlueparDeath") +
+ mobcount("055-1.gat", "#FlowerPentagram4::OnMoubooDeath") +
+ mobcount("055-1.gat", "#FlowerPentagram4::OnScorpionDeath") +
+ mobcount("055-1.gat", "#FlowerPentagram4::OnRScorpionDeath") +
+ mobcount("055-1.gat", "#FlowerPentagram4::OnAScorpionDeath") +
+ mobcount("055-1.gat", "#FlowerPentagram4::OnBScorpionDeath") +
+ 8; // the mobcount function has an offset of -1, so we add 8 to have the actual amount of monsters
+ if (@localMonsterCount > 4)
+ goto L_MonstersAlive;
+
+ if (countitem("YellowSummonFlower") < 1)
+ goto L_NoFlower;
+ delitem "YellowSummonFlower", 1;
+ mes "Worried about what will shift from the astral plane this time, you prepare yourself and put the flower in place.";
+ mes "As expected, you feel the magical tension building up. They're coming.";
+ set OrumQuest, 27;
+ close2;
+ areamonster "055-1.gat", 133, 87, 144, 99, "", 1105, 1, "#FlowerPentagram4::OnSquirrelDeath";
+ areamonster "055-1.gat", 133, 87, 144, 99, "", 1106, 1, "#FlowerPentagram4::OnMushroomDeath";
+ areamonster "055-1.gat", 133, 87, 144, 99, "", 1107, 2, "#FlowerPentagram4::OnBlueparDeath";
+ areamonster "055-1.gat", 133, 87, 144, 99, "", 1104, 2, "#FlowerPentagram4::OnMoubooDeath";
+ areamonster "055-1.gat", 133, 87, 144, 99, "", 1003, 2, "#FlowerPentagram4::OnScorpionDeath";
+ areamonster "055-1.gat", 133, 87, 144, 99, "", 1004, 2, "#FlowerPentagram4::OnRScorpionDeath";
+ areamonster "055-1.gat", 133, 87, 144, 99, "", 1057, 2, "#FlowerPentagram4::OnAScorpionDeath";
+ areamonster "055-1.gat", 133, 87, 144, 99, "", 1009, 1, "#FlowerPentagram4::OnBScorpionDeath";
+ set @value, 15;
+ callfunc "QuestSagathaAnnoy";
+ set @value, 0;
+ end;
+
+OnSquirrelDeath:
+ set @mobID, 1105;
+ callfunc "MobPoints";
+ end;
+
+OnMushroomDeath:
+ set @mobID, 1106;
+ callfunc "MobPoints";
+ end;
+
+OnBlueparDeath:
+ set @mobID, 1107;
+ callfunc "MobPoints";
+ end;
+
+OnMoubooDeath:
+ set @mobID, 1104;
+ callfunc "MobPoints";
+ end;
+
+OnScorpionDeath:
+ set @mobID, 1003;
+ callfunc "MobPoints";
+ end;
+
+OnRScorpionDeath:
+ set @mobID, 1004;
+ callfunc "MobPoints";
+ end;
+
+OnAScorpionDeath:
+ set @mobID, 1057;
+ callfunc "MobPoints";
+ end;
+
+OnBScorpionDeath:
+ set @mobID, 1009;
+ callfunc "MobPoints";
+ end;
+
+L_MonstersAlive:
+ mes "As you get closer to the place, you feel an unnerving presence.";
+ mes "This place has recently been used to summon something! And the beings are still nearby!";
+ next;
+ mes "You should get rid of them before attempting the summoning yourself.";
+ goto L_Close;
+
+L_NoFlower:
+ mes "You search your belongings for the magical flower. Where is it?";
+ mes "If you lost it, you should talk to Orum again.";
+ goto L_Close;
+
+L_PlacedFourthFlower:
+ mes "You placed the fourth of Orum's magical flowers here.";
+ mes "You can still feel the magical power shimmering around this place, waiting to be unleashed.";
+ goto L_Close;
+
+L_PlacedFifthFlower:
+ mes "This is where you placed the fourth of Orum's magical flowers.";
+ mes "However, now that the summoning spell has been cast, everything is back to normal here.";
+ goto L_Close;
+
+L_Close:
+ set @localMonsterCount, 0;
+ close;
+}
diff --git a/world/map/npc/056-1/_import.txt b/world/map/npc/056-1/_import.txt
index 8266df52..810fdb01 100644
--- a/world/map/npc/056-1/_import.txt
+++ b/world/map/npc/056-1/_import.txt
@@ -3,3 +3,4 @@
map: 056-1.gat
npc: npc/056-1/_mobs.txt
npc: npc/056-1/_warps.txt
+npc: npc/056-1/flowerpentagram5.txt
diff --git a/world/map/npc/056-1/flowerpentagram5.txt b/world/map/npc/056-1/flowerpentagram5.txt
new file mode 100644
index 00000000..345ecf2a
--- /dev/null
+++ b/world/map/npc/056-1/flowerpentagram5.txt
@@ -0,0 +1,139 @@
+// Author: Jenalya
+// $@Flower_Pentagram_Time saves the time when the last summoning happened
+
+056-1.gat,62,31,0|script|#FlowerPentagram5|400,
+{
+ if (OrumQuest >= 31) goto L_PlacedFifthFlower;
+
+ if (OrumQuest == 30) goto L_FifthFlower;
+
+ message strcharinfo(0), "Something is odd about this place.";
+ end;
+
+L_FifthFlower:
+ mes "This has to be the spot for the last magical flower. When you place it, the pentagram will be completed.";
+ menu
+ "Place the flower.", -,
+ "Leave.", L_Close;
+
+ if (isin("056-1.gat", 61, 30, 63, 32))
+ goto L_Place;
+
+ mes "This isn't working, you're too far away.";
+ goto L_Close;
+
+L_Place:
+ set @localMonsterCount,
+ mobcount("013-1.gat", "#FlowerPentagram5::OnSquirrelDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram5::OnMushroomDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram5::OnBlueparDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram5::OnMoubooDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram5::OnScorpionDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram5::OnRScorpionDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram5::OnAScorpionDeath") +
+ mobcount("013-1.gat", "#FlowerPentagram5::OnBScorpionDeath") +
+ 8; // the mobcount function has an offset of -1, so we add 8 to have the actual amount of monsters
+ if (@localMonsterCount > 4)
+ goto L_MonstersAlive;
+
+ mes "Nervous about what's going to happen, you take the last of the flowers and put it into its place.";
+ next;
+ mes "Tension builds up around you, much stronger than before. You can feel it compressing your head, and a liquid warmth spreads under your nose, leaving a metallic taste on your lips.";
+ heal -5, 0;
+ next;
+ callfunc "FlowerPentagramCount";
+ if (($@Flower_Pentagram_Time > gettimetick(2) - 3600) && ($@Flower_Pentagram_Mobcount > 15))
+ goto L_TooEarly;
+ set $@Flower_Pentagram_Time, gettimetick(2);
+ if (countitem("RedSummonFlower") < 1)
+ goto L_NoFlower;
+ delitem "RedSummonFlower", 1;
+
+ mes "The pressure builds to the point where you don't think you can endure it any longer; the fabric that binds your consciousness together seemingly unravels.";
+ set OrumQuest, 31;
+ close2;
+ areamonster "056-1.gat", 56, 26, 80, 46, "", 1105, 3, "#FlowerPentagram5::OnSquirrelDeath";
+ areamonster "056-1.gat", 56, 26, 80, 46, "", 1106, 2, "#FlowerPentagram5::OnMushroomDeath";
+ areamonster "056-1.gat", 56, 26, 80, 46, "", 1107, 3, "#FlowerPentagram5::OnBlueparDeath";
+ areamonster "056-1.gat", 56, 26, 80, 46, "", 1104, 2, "#FlowerPentagram5::OnMoubooDeath";
+ areamonster "056-1.gat", 56, 26, 80, 46, "", 1003, 3, "#FlowerPentagram5::OnScorpionDeath";
+ areamonster "056-1.gat", 56, 26, 80, 46, "", 1004, 2, "#FlowerPentagram5::OnRScorpionDeath";
+ areamonster "056-1.gat", 56, 26, 80, 46, "", 1057, 2, "#FlowerPentagram5::OnAScorpionDeath";
+ areamonster "056-1.gat", 56, 26, 80, 46, "", 1009, 2, "#FlowerPentagram5::OnBScorpionDeath";
+ set @value, 15;
+ callfunc "QuestSagathaAnnoy";
+ set @value, 0;
+ donpcevent "#FlowerPentagram::OnSummon";
+ end;
+
+OnSquirrelDeath:
+ set @mobID, 1105;
+ callfunc "MobPoints";
+ end;
+
+OnMushroomDeath:
+ set @mobID, 1106;
+ callfunc "MobPoints";
+ end;
+
+OnBlueparDeath:
+ set @mobID, 1107;
+ callfunc "MobPoints";
+ end;
+
+OnMoubooDeath:
+ set @mobID, 1104;
+ callfunc "MobPoints";
+ end;
+
+OnScorpionDeath:
+ set @mobID, 1003;
+ callfunc "MobPoints";
+ end;
+
+OnRScorpionDeath:
+ set @mobID, 1004;
+ callfunc "MobPoints";
+ end;
+
+OnAScorpionDeath:
+ set @mobID, 1057;
+ callfunc "MobPoints";
+ end;
+
+OnBScorpionDeath:
+ set @mobID, 1009;
+ callfunc "MobPoints";
+ end;
+
+L_TooEarly:
+ mes "Suddenly, everything calms down again and the tension vanishes. You find yourself confused about what's going on.";
+ next;
+ mes "You pick up the flower again.";
+ next;
+ mes "Looking at the place more closely, it seems another summoning has happened just before, leaving the pathway between this world and the astral plane drained and exhausted.";
+ next;
+ mes "You should wait a while until it recharges, or go and search for the creatures that were summoned.";
+ goto L_Close;
+
+L_MonstersAlive:
+ mes "As you get closer to the place, you feel an unnerving presence.";
+ mes "This place has recently been used to summon something! And the beings are still nearby!";
+ next;
+ mes "You should get rid of them before attempting the summoning yourself.";
+ goto L_Close;
+
+L_NoFlower:
+ mes "You reach into your pocket, but you can't find the flower! You're so close to completing your task.";
+ mes "How could you lose the last flower? If you can't get it back, you have to tell Orum.";
+ goto L_Close;
+
+L_PlacedFifthFlower:
+ mes "This is where you placed the last of Orum's magical flowers.";
+ mes "However, now that the summoning spell has been cast, everything is back to normal here.";
+ goto L_Close;
+
+L_Close:
+ set @localMonsterCount, 0;
+ close;
+}
diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt
index c5c7b7bd..e4deec13 100644
--- a/world/map/npc/functions/mob_points.txt
+++ b/world/map/npc/functions/mob_points.txt
@@ -107,18 +107,20 @@ function|script|MobPoints|,
80, // DemonicSpirit
940, // Luvia
150, // WitchGuard
+ 50, // DemonicMouboo
+ 15, // ViciousSquirrel
+ 20, // WickedMushroom
+ 18, // Bluepar
// Add more here
0; // END
-
if (MPQUEST == 1)
set Mobpt, Mobpt + @points[@mobID - 1002];
// Scorpion, Red Scorpion, Black Scorpion, Angry Scorpion
- if ((@mobID == 1003)
- || (@mobID == 1004)
- || (@mobID == 1009)
- || (@mobID == 1057))
+// DemonicMouboo, ViciousSquirrel, WickedMushroom, Bluepar
+ if ((@mobID == 1003) || (@mobID == 1004) || (@mobID == 1009) || (@mobID == 1057)
+ || (@mobID == 1104) || (@mobID == 1105) || (@mobID == 1106) || (@mobID == 1107))
goto L_good;