From da014e76778d55f0c90f47e07a2d66715d51099f Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Thu, 16 Feb 2012 00:37:49 +0100 Subject: Blue sage quests --- world/map/npc/048-2/_import.txt | 21 ++ world/map/npc/048-2/bluesageConfig.txt | 104 ++++++ world/map/npc/048-2/helperAccused.txt | 139 ++++++++ world/map/npc/048-2/helperBookpages1.txt | 114 ++++++ world/map/npc/048-2/helperBookpages2.txt | 87 +++++ world/map/npc/048-2/helperBookpages3.txt | 71 ++++ world/map/npc/048-2/helperChief.txt | 125 +++++++ world/map/npc/048-2/helperCleaning1.txt | 86 +++++ world/map/npc/048-2/helperCleaning2.txt | 76 ++++ world/map/npc/048-2/helperCleaning3.txt | 80 +++++ world/map/npc/048-2/helperCleaning4.txt | 71 ++++ world/map/npc/048-2/helperCleaning5.txt | 71 ++++ world/map/npc/048-2/helperJanitor.txt | 79 +++++ world/map/npc/048-2/helperMInk.txt | 106 ++++++ world/map/npc/048-2/helperMReed.txt | 96 +++++ world/map/npc/048-2/helperMSilk.txt | 91 +++++ world/map/npc/048-2/helperMYetiClaw.txt | 96 +++++ world/map/npc/048-2/helperResting1.txt | 72 ++++ world/map/npc/048-2/helperResting2.txt | 73 ++++ world/map/npc/048-2/sageNikolai.txt | 292 ++++++++++++++++ world/map/npc/048-2/slimes.txt | 579 +++++++++++++++++++++++++++++++ world/map/npc/048-2/visitors.txt | 40 +++ 22 files changed, 2569 insertions(+) create mode 100644 world/map/npc/048-2/bluesageConfig.txt create mode 100644 world/map/npc/048-2/helperAccused.txt create mode 100644 world/map/npc/048-2/helperBookpages1.txt create mode 100644 world/map/npc/048-2/helperBookpages2.txt create mode 100644 world/map/npc/048-2/helperBookpages3.txt create mode 100644 world/map/npc/048-2/helperChief.txt create mode 100644 world/map/npc/048-2/helperCleaning1.txt create mode 100644 world/map/npc/048-2/helperCleaning2.txt create mode 100644 world/map/npc/048-2/helperCleaning3.txt create mode 100644 world/map/npc/048-2/helperCleaning4.txt create mode 100644 world/map/npc/048-2/helperCleaning5.txt create mode 100644 world/map/npc/048-2/helperJanitor.txt create mode 100644 world/map/npc/048-2/helperMInk.txt create mode 100644 world/map/npc/048-2/helperMReed.txt create mode 100644 world/map/npc/048-2/helperMSilk.txt create mode 100644 world/map/npc/048-2/helperMYetiClaw.txt create mode 100644 world/map/npc/048-2/helperResting1.txt create mode 100644 world/map/npc/048-2/helperResting2.txt create mode 100644 world/map/npc/048-2/sageNikolai.txt create mode 100644 world/map/npc/048-2/slimes.txt create mode 100644 world/map/npc/048-2/visitors.txt diff --git a/world/map/npc/048-2/_import.txt b/world/map/npc/048-2/_import.txt index f078a7e4..ef7c2b74 100644 --- a/world/map/npc/048-2/_import.txt +++ b/world/map/npc/048-2/_import.txt @@ -3,3 +3,24 @@ map: 048-2.gat npc: npc/048-2/_mobs.txt npc: npc/048-2/_warps.txt +npc: npc/048-2/bluesageConfig.txt +npc: npc/048-2/helperAccused.txt +npc: npc/048-2/helperBookpages1.txt +npc: npc/048-2/helperBookpages2.txt +npc: npc/048-2/helperBookpages3.txt +npc: npc/048-2/helperChief.txt +npc: npc/048-2/helperCleaning1.txt +npc: npc/048-2/helperCleaning2.txt +npc: npc/048-2/helperCleaning3.txt +npc: npc/048-2/helperCleaning4.txt +npc: npc/048-2/helperCleaning5.txt +npc: npc/048-2/helperJanitor.txt +npc: npc/048-2/helperMInk.txt +npc: npc/048-2/helperMReed.txt +npc: npc/048-2/helperMSilk.txt +npc: npc/048-2/helperMYetiClaw.txt +npc: npc/048-2/helperResting1.txt +npc: npc/048-2/helperResting2.txt +npc: npc/048-2/sageNikolai.txt +npc: npc/048-2/slimes.txt +npc: npc/048-2/visitors.txt diff --git a/world/map/npc/048-2/bluesageConfig.txt b/world/map/npc/048-2/bluesageConfig.txt new file mode 100644 index 00000000..284aefb6 --- /dev/null +++ b/world/map/npc/048-2/bluesageConfig.txt @@ -0,0 +1,104 @@ +// Blue Sage quest +// The mansion of the Sage is in confusion, because a magic experiment with the slimes went wrong, +// the white and blue slimes got out of control, ate most of the books in the library +// and most of the slimes escaped to the outside world +// Variable used: QUEST_BlueSage +// Author: Jenalya + +// Subquests: + +// Byte 0: +// Bit 0 - 4: Collect missing book pages +// some of the helpers are working on recreating the more valuable books +// they need the missing bookpages for that +// value gives the number of new pages given to the helpers (up to 31) +// bit 5: got Grimoire as reward for collecting the bookpages and bringing material to repair the books +// Bit 6: got reward for defeating the remaining slimes in the library +// Bit 7: unused + +// Nibble 2 as flags: Bring material to repair the books and make new books +// Bit 0: Reed Bundles +// Bit 1: Silk Cocoons +// Bit 2: Yeti Claws +// Bit 3: Inks (Bottle of Water, Iron Powder, Wisp Powder, Spectre Powder, Poltergeist Powder) + +// Nibble 3: Investigation of how the accident could have happened +// state 1: helper who is considered to have caused the accident asks the player to talk to the chief helper to find out if he's going to loose his job +// state 2: talked to chief and get the mission to investigate about what exactly happened +// there are two independent circumstances to gather information about, one is about how the helpers did their job (a) and another about a suspicious visitor shortly before the accident happened (b) +// this is saved as described here: +// (a) (b) +// 0 0 (state 2) started investigation +// 0 1 (state 3) talked to Janitor +// 0 2 (state 4) got more information about visitor +// 1 0 (state 5) talked to Peetu +// 1 1 (state 6) talked to Peetu and talked to Janitor +// 1 2 (state 7) talked to Peetu and got more information about visitor +// 2 0 (state 8) got more information about Peetu +// 2 1 (state 9) got more information about Peetu and talked to Janitor +// 2 2 (state 10) got more information about Peetu and got more information about visitor +// (a) first talk to the helper in the bedroom, who describes how careful he has been +// (a) and then to at least one of the helpers in the library, who supports that +// (a) it's possible to talk to more helpers, who will support too, but it suffices to talk to one +// (b) first talk to the janitor in the entrance room, who mentions the suspicious visitor +// (b) then talk to at least one of the helpers in the entrance room/library who give more information about the visitor +// (b) it's possible to talk to more helpers, who will give redundant information, but it suffices to talk to one +// so to have somed progress in (a) add three to the variable, and for progress in (b) add one +// state 11: reported to chief helper and got a reward +// state 12: told Peetu about the result and eventually got another small reward + +// Byte 2: Hunt some remaining slimes between the bookshelves +// Bit 0: started the subquest +// Bit 1 - 7: each spawn point is unique and saved with a flag + +-|script|#bluesageconfig|-1,{ +OnInit: + set $@Q_BlueSageMinimumLevel, 60; + + set $@Q_BlueSageBookPages_MASK, 0x1F; + set $@Q_BlueSageBookPages_SHIFT, 0; + + set $@Q_BlueSageGrimoire, 0x20; + set $@Q_BlueSageIceSword, 0x40; + + set $@Q_BlueSageMaterial_MASK, NIBBLE_2_MASK; + set $@Q_BlueSageMaterial_SHIFT, NIBBLE_2_SHIFT; + + set $@Q_BlueSageMaterialReed, 0x100; + set $@Q_BlueSageMaterialSilk, 0x200; + set $@Q_BlueSageMaterialClaw, 0x400; + set $@Q_BlueSageMaterialInk, 0x800; + + set $@Q_BlueSageInvestigate_MASK, NIBBLE_3_MASK; + set $@Q_BlueSageInvestigate_SHIFT, NIBBLE_3_SHIFT; + + set $@Q_BlueSageSlimes_MASK, BYTE_2_MASK; + set $@Q_BlueSageSlimes_SHIFT, BYTE_2_SHIFT; + set $@Q_BlueSageSlimesStart, 0x010000; + set $@Q_BlueSageSlime0, 0x020000; + set $@Q_BlueSageSlime1, 0x040000; + set $@Q_BlueSageSlime2, 0x080000; + set $@Q_BlueSageSlime3, 0x100000; + set $@Q_BlueSageSlime4, 0x200000; + set $@Q_BlueSageSlime5, 0x400000; + set $@Q_BlueSageSlime6, 0x800000; + //white + set $@BlueSageSlime0_Amount, 6; + set $@BlueSageSlime1_Amount, 5; + set $@BlueSageSlime2_Amount, 4; + set $@BlueSageSlime3_Amount, 3; + // blue + set $@BlueSageSlime4_Amount, 3; + set $@BlueSageSlime5_Amount, 2; + set $@BlueSageSlime6_Amount, 1; +} + +function|script|updateBlueSageBookPages|{ + set QUEST_BlueSage, (QUEST_BlueSage & ~($@Q_BlueSageBookPages_MASK) | (@bookpages << $@Q_BlueSageBookPages_SHIFT)); + return; +} + +function|script|updateBlueSageInvestigate|{ + set QUEST_BlueSage, (QUEST_BlueSage & ~($@Q_BlueSageInvestigate_MASK) | (@investigate << $@Q_BlueSageInvestigate_SHIFT)); + return; +} diff --git a/world/map/npc/048-2/helperAccused.txt b/world/map/npc/048-2/helperAccused.txt new file mode 100644 index 00000000..5cd15965 --- /dev/null +++ b/world/map/npc/048-2/helperAccused.txt @@ -0,0 +1,139 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Peetu is the person who caused the accident +// involved investigation subquest + +048-2.gat,25,135,0|script|Peetu|366,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + + if (@investigate >= 12) goto L_Thank; + if (@investigate > 4) goto L_Investigate; + if (@investigate > 1) goto L_Query; + if (@investigate == 1) goto L_Help; + + mes "You see a rather stressed helper, mumbering to himself."; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_Close; + mes "[Peetu]"; + mes "\"How could this have happened? I don't understand it... I'm sure I did the sealing correctly, maybe the ingredients... but that doesn't make sense, they're checked regularly and...\""; + next; + mes "He startles as he notices you."; + mes "[Peetu]"; + mes "\"Oh, hello. What are you doing here? Ahm, visitors usually don't come up here. I mean, I don't mean to be rude, of course. I'm just surprised to see you here.\""; + menu + "I'm just having a look around.",L_Close, + "Sorry, I didn't mean to bother you.",L_Close, + "Why aren't you downstairs, helping everyone to clean up?",-; + mes "[Peetu]"; + mes "\"I would! But I'm ... under preliminary suspension.\""; + mes "He looks close to tears."; + next; + mes "[Peetu]"; + mes "\"It's all my fault! It was my job to seal the slimes away for the night, but I somehow messed it up! How could this have happened? And now I'm going to lose my job and I'll have to leave here and no other sage would give me a new appointment and I don't know what else to do, I mean, I spent my whole life on this so far, I don't even know anything else to do.\""; + next; + mes "He seems to have a nervous breakdown, he latches onto you and starts sobbing on your shoulder."; + menu + "(Try to solace him)",-, + "(Shake him and tell him to pull himself together)",-, + "(Push him away from you and leave.)",L_Close; + mes "He calms down a bit."; + mes "[Peetu]"; + mes "\"Uh. You're probably right. I'm very sorry. I'm just... You know, I wanted to become a scholar of the sages, studying and... Oh, how could I messed that up? Did you see the library? It caused so much damage! What else should they do than kicking me out?\""; + menu + "Maybe you should talk to your chief about that?",-, + "It doesn't make much sense to draw overhasty conclusions.",-, + "Do you have a clue about what went wrong?",-; + mes "[Peetu]"; + mes "\"Well... but... I mean... I don't know... "; + mes "I have an idea! Would you... ahm, would you talk to Chief Oskari for me? And ask him what he plans to do about me? I... I just don't feel capable of doing that myself right now. I'll try to pull myself together in the meanwhile.\""; + set @investigate, 1; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Help: + mes "[Peetu]"; + mes "\"Please talk to Chief Oskari for me and find out if I'll get fired."; + mes "You can probably find him in his office on the second floor.\""; + goto L_Close; + +L_Query: + mes "[Peetu]"; + mes "\"Did you talk to Chief Oskari?\""; + menu + "Yes, and he doesn't plan to fire you.",-, + "Not yet.",L_Close; + mes "You tell Peetu that Chief Oskari has a good opinion on him and explains about your task to find out what exactly happened."; + next; + mes "[Peetu]"; + mes "\"Alright, I understand. You see, I'm very confused too, because I usually pay a lot of attention on my work. Especially when doing something as delicate as sealing away the slimes for the night.\""; + menu + "Can you describe me what exactly you did?",-; + mes "[Peetu]"; + mes "\"Well, ok, sure. So, as you know we're doing some researches on the nature of slimes, their connection to minerals and gemstones, their breeding behaviour, and, well, ahm, doing some magical experiments to analyze their reactions on different kinds of magic."; + mes "This experiments caused some ... mutations, and the Blue and White Slimes developed some behaviour different from the slimes usual behaviour, making them more dangerous.\""; + next; + mes "\"This is the reason why they have to be magically sealed away for the night, since we didn't want them to get out in the wilderness... Oh, if I imagine what damage they do to the environment!\""; + mes "He sighs."; + next; + mes "\"However, the sealing involves several steps. I usually start to prepare it while the helpers are still working on their researches and experiments. So when they're done, they can just come and place the slimes under the seal."; + mes "I take the ingredients for the spell from the shelves, mix them together and cast the spell shortly before the other helpers finish their daily work.\""; + next; + mes "\"You can imagine the seal as something like a magical cage. This is a simplified explanation of course, it's rather advanced magic, a modified version of a shield spell, rather focused on the components that reduce the targets ability to move and... Oh, I seem to confuse you. Nevermind."; + mes "However, I create and open the 'cage', then I wait for all the helpers to drop in the slimes and close it when all are in. When it is closed, I additionally cast a guarding spell to prevent unauthorized access.\""; + next; + mes "\"That night when the slimes escaped, I did all of this as usual. Everything seemed alright after I cast the guarding spell, so I went to bed. But I woke up in the middle of the night because I felt the spells... oh, it's hard to describe... it seems the spell which defines the magical cage started to... inflate itself, causing the guarding spells to vanish, since they're intended against threads from the outside, not the inside."; + mes "While expanding, the cage went thinner and thinner until it just... faded.\""; + next; + mes "\"This left all the slimes free in the workshop, right next to the library. Of course I hasted there as fast as I could, yelling to wake up everyone, but that caused so much confusion that we fell over each other in the corridor and when we finally reached the librabry, the slimes were already spread all over the room, eating the books and dripping out of the windows.\""; + next; + mes "\"We tried to block the windows to prevent them escaping, but as most of the helpers aren't experienced in fighting and only some of us have a higher magical education, the slimes are rather dangerous for most of them."; + mes "We weren't able to get the situation under control until most of the slimes had escaped.\""; + next; + mes "\"Since it was my responsibility to sealing them away, I was preliminarily suspended and sent to my room. Since then I've been thinking over and over again about the happenings and how I cast the spell, trying to find the mistake I did."; + mes "But now that I described you the spells, I'm sure I casted it correctly. Thinking again about the effect of the sealing inflating, I suppose it might have to do with the ingredients I used for the spell.\""; + next; + mes "\"I never tried it, because it makes no sense to do that, but theoretically adding some Silk Cocoons could have such an effect. That's pretty basic nature magic."; + mes "But... how should that have gotten into the ingredients?\""; + set @investigate, @investigate + 3; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Investigate: + mes "[Peetu]"; + mes "\"Hello. Did you find out anything more yet?\""; + if (@investigate != 11) + menu + "I'm still collecting information.",L_Close; + if (@inventorylist_count == 100) + goto L_TooMany; + menu + "Yes, I already talked with Chief Oskari.",-, + "Not yet.",L_Close; + mes "You explain your gained insights to Peetu and what conclusions Chief Oskari drew."; + mes "[Peetu]"; + mes "\"Oh, I'm so relieved!"; + mes "I mean, this are alarming news, but I'm so glad that this isn't my fault and that I deserve keep my job.\""; + next; + mes "\"It isn't much, but please take this Silk Gloves. We use those when we have to protect our hands, but still need to perform magic.\""; + getitem "SilkGloves", 1; + set @investigate, 12; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Thank: + mes "[Peetu]"; + mes "\"Thanks for all your help.\""; + goto L_Close; + +L_TooMany: + mes "[Peetu]"; + mes "\"Wow, you have a lot of stuff with you! Isn't that uncomfortable?\""; + goto L_Close; + +L_Close: + set @investigate, 0; + set @inventorylist_count, 0; + close; +} diff --git a/world/map/npc/048-2/helperBookpages1.txt b/world/map/npc/048-2/helperBookpages1.txt new file mode 100644 index 00000000..b92802cf --- /dev/null +++ b/world/map/npc/048-2/helperBookpages1.txt @@ -0,0 +1,114 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Ensio is one of the helpers working on sorting the bookpages, can take bookpages +// can give second hint about the visitor in investigation subquest + +048-2.gat,104,86,0|script|Ensio|365,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + + set @old_bookpage_exp, 1000; + set @new_bookpage_exp, 10000; + + if (@bookpages == 31) goto L_Thank; + if (@bookpages > 0) goto L_Progress; + + mes "[Ensio]"; + mes "\"Hello. Did you come here to see the library? It's not much left... But we're working on recovering the books by collecting the ripped out book pages, sorting them and recreating the books.\""; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_Close; + menu + "Good luck with that. See you in ten years or something.",L_Investigate, + "Can I help somehow?",-; + mes "[Ensio]"; + mes "\"Oh, would you? That'd be great! You see, the slimes ate most of the books and it is difficult to get back the bookpages."; + mes "If you feel capable of this task, you could go out to hunt the Blue and White Slimes to get back the bookpages from them.\""; +L_Progress: + mes "[Ensio]"; + mes "\"Did you get some bookpage from the slimes?\""; + menu + "Yes, have a look.",-, + "No.",L_Investigate; + + if (countitem("BookPage") < 1) + goto L_NoItem; + delitem "BookPage", 1; + + if (rand(100 - @bookpages) > 50) + goto L_OldPage; + + set @bookpages, @bookpages + 1; + callfunc "updateBlueSageBookPages"; + getexp @new_bookpage_exp, 0; + mes "[Ensio]"; + mes "\"Ah, wonderful! This is a page we didn't find yet!\""; + if (@bookpages < 31) + goto L_Progress; + next; + mes "\"Amazing. I think you found all the missing pages of which we don't had a copy. This is a great help! I'll mention this towards Nikolai.\""; + goto L_Investigate; + +L_OldPage: + getexp @old_bookpage_exp, 0; + mes "[Ensio]"; + mes "\"Mh, let me see. We already have a copy of this page, but it's helpful nevertheless. Thank you.\""; + goto L_Progress; + +L_Thank: + mes "[Ensio]"; + mes "\"We'd never be able to recover our books so quickly without your help. Thanks!\""; + goto L_Investigate; + +L_NoItem: + mes "[Ensio]"; + mes "\"This isn't funny! Come back when you're serious.\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Ensio]"; + mes "\"Visitor with a mask? Ah, I think I know who are you talking about. Black clothes and a golden mask. Rather strange guy.\""; + next; + mes "\"He was looking around in the library a while, and then came to ask about our researches. He seemed to be particularly interested in our experiments with the slimes."; + mes "Heh, I wonder what he've had said if he'd have visited us a little bit later. Mh, now that I think about it, the accidenet with the slimes happened just the night after he was here.\""; + if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9)) + goto L_Close; + set @investigate, @investigate + 1; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Helper: + mes "[Ensio]"; + mes "\"Oh, I can't really tell. I'm mostly working in the library, while he's very involved in the researches. \""; + goto L_Close; + +L_Close: + set @investigate, 0; + set @bookpages, 0; + set @old_bookpage_exp, 0; + set @new_bookpage_exp, 0; + close; +} diff --git a/world/map/npc/048-2/helperBookpages2.txt b/world/map/npc/048-2/helperBookpages2.txt new file mode 100644 index 00000000..93eca664 --- /dev/null +++ b/world/map/npc/048-2/helperBookpages2.txt @@ -0,0 +1,87 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Henriikka is one of the helpers working on sorting the bookpages, sends the player to Ensio +// can be questioned as part of the investigation subquest, but doesn't give hints + +048-2.gat,94,86,0|script|Henriikka|363,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + + if (@bookpages == 31) goto L_Thank; + if (@bookpages > 0) goto L_Progress; + + mes "You see a helper looking through some papers which exhale a strange smell."; + mes "[Henriikka]"; + mes "\"Oh, hey. Welcome to the library, or what's left of that.\""; + mes "She sighs."; + menu + "What are you doing?",-, + "You seem to be busy. See you.",L_Close; + mes "[Henriikka]"; + mes "\"We're trying to repair the books by collecting the ripped out bookpages and sorting them and copying them for new books. It's a lot to do, and after being eaten by a slime they're stinking!"; + mes "And a lot of pages are missing, since most of the slimes escaped. I suppose we'll have to go out and hunt them once we're done here.\""; + menu + "Maybe I can help with that?",-, + "Good luck.",L_Close; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_Careful; + mes "[Henriikka]"; + mes "\"Oh, that'd be awesome! If you find some pages, you can bring them to Ensio.\""; + goto L_Investigate; + +L_Careful: + mes "[Henriikka]"; + mes "\"Oh, that's very kind, but those slimes are dangerous! Better become a bit stronger first.\""; + goto L_Close; + +L_Progress: + mes "[Henriikka]"; + mes "\"If you get any bookpages from the slimes, bring them to Ensio. Thanks for your help!\""; + goto L_Investigate; + +L_Thank: + mes "[Henriikka]"; + mes "\"I'm so glad we didn't have to go out to hunt the slimes! Thank you!\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Henriikka]"; + mes "\"With a mask? I don't really remember... We have so many visitors. Though I suppose someone wearing a mask would be noticeable... But I'm so worn out from the past days that I'm even glad that I can recall my own name, sorry.\""; + goto L_Close; + +L_Helper: + mes "[Henriikka]"; + mes "\"Oh, I never really thought about that. He was the one who failed the sealing spell, right? But I heard it's a quite difficult spell, so I suppose this could've happened to anyone. I don't know. Why are you asking so difficult questions?\""; + next; + mes "\"I need to go on with sorting the bookpages now.\""; + goto L_Close; + +L_Close: + set @investigate, 0; + set @bookpages, 0; + close; +} diff --git a/world/map/npc/048-2/helperBookpages3.txt b/world/map/npc/048-2/helperBookpages3.txt new file mode 100644 index 00000000..1d90aa76 --- /dev/null +++ b/world/map/npc/048-2/helperBookpages3.txt @@ -0,0 +1,71 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Teuvo is one of the helpers working on sorting the bookpages +// can give second hint about Peetu in investigation subquest + +048-2.gat,99,87,0|script|Teuvo|366,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + + if (@bookpages == 31) goto L_Thank; + if (@bookpages > 0) goto L_Progress; + + mes "[Teuvo]"; + mes "\"I always thought it's a bad idea to play around with the slimes. And as if holding them in here isn't bad enough, no, they also had to mess around with magic.\""; + mes "He seems to be rather upset."; + goto L_Investigate; + +L_Progress: + mes "[Teuvo]"; + mes "\"Did you find some bookpages? Ensio will take them.\""; + goto L_Investigate; + +L_Thank: + mes "[Teuvo]"; + mes "\"Thanks for helping out here.\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Teuvo]"; + mes "\"With a mask? Hm. I don't remember.\""; + goto L_Close; + +L_Helper: + mes "[Teuvo]"; + mes "\"Peetu? He's one of those magic wielders who think they can do anything. Heh, you see the result here."; + mes "But to be fair, from what I've seen Peetu always was very attentive and dutiful.\""; + if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7)) + goto L_Close; + set @investigate, @investigate + 3; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Close: + set @investigate, 0; + set @bookpages, 0; + close; +} diff --git a/world/map/npc/048-2/helperChief.txt b/world/map/npc/048-2/helperChief.txt new file mode 100644 index 00000000..c8085a4c --- /dev/null +++ b/world/map/npc/048-2/helperChief.txt @@ -0,0 +1,125 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Chief of the Blue Sage helpers +// involved in investigation subquest + +048-2.gat,146,26,0|script|Oskari|365,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + + if (@investigate >= 11) goto L_GoodJob; + if (@investigate > 1) goto L_Investigate; + + mes "[Oskari]"; + mes "\"Hello. Welcome to the residence of the Great Nikolai."; + mes "You have to excuse me, as you might have heard we're having some trouble at the moment and I, as Chief of Nikolai's helpers, have a lot to do.\""; + if (@investigate == 0) + goto L_Close; + menu + "Peetu asked me to talk to you about his mischance.",-, + "Ok, see you.",L_Close; + + mes "You explain about your conversation with Peetu, how he's blaming himself and his worries about loosing his job."; + next; + mes "Oskari keeps silent a moment after you ended, pondering. Then he talks to you."; + mes "[Oskari]"; + mes "\"You know, Peetu is one of my most experienced and reliable employees. This whole situation is very disquieting, not to say suspicious.\""; + next; + mes "\"Due to all the trouble I haven't had time to have a talk with him nor to make further investigations. You already showed some good knowledge of human nature by the way you calmed him down and talked to me.\""; + next; + mes "\"Would you be willing to talk with Peetu and the other helpers, doing some investigation about what actually happened?\""; + next; + mes "\"As someone who's not a member of our team you might be able to get a more unbiased view of the situation, beside of the fact that all of us are very busy with getting the situation under control again.\""; + next; + mes "\"I suggest to start by talking to Peetu again to get a precise idea of his workflow and what he thinks that happened."; + mes "Oh, and please tell him that I'm not considering to fire him in the current situation. It might be needed to calm him down to get meaningful information.\""; + next; + mes "\"You should find out if someone observed something unusual during the time before the accident happened.\""; + set @investigate, 2; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Investigate: + mes "[Oskari]"; + mes "\"Ah, hello. Did you get an overview over the happenings yet?\""; + if (@investigate != 10) + menu + "I'm still collecting information.",L_Close; + next; + mes "You explain who you talked to, the helpers positive opinion about Peetu and what you find out about the suspicious visitor."; + mes "[Oskari]"; + mes "\"With a mask you say? This reminds me... wait a moment.\""; + mes "He turns to his desk and searches through some papers."; + next; + mes "[Oskari]"; + mes "\"Mh... yes. It fits together."; + mes "Listen, this is a letter from Chief Warrick from Santa's team. It seems they encountered some sabotaging during their preparations for the Christmas time, the letter mentions a masked person as well.\""; + next; + mes "\"And this are some reports about cases of unusal behaviour of native animals in various places of Kaizei that came to the Sages notice.\""; + next; + mes "\"And now this accident in our house, also a person with a mask... and given the context of the recent frictions within the Sages...\""; + mes "Oskari seems rather excited."; + next; + mes "[Oskari]"; + mes "\"I think you revealed some important connections. I need to notify Nikolai and the other Sages.\""; + menu + "I'm confused now.",-, + "What are you talking about?",-, + "Could you stop speaking in fractions?",-; + mes "[Oskari]"; + mes "\"I'm sorry. I think you deserve some explanation. You see, the Sages of Kaizei are a circle of wise wizards who work together for the prosperity of this continent."; + mes "Recently there was some conflict among the Sages which caused one of the members to leave the circle. It's all very unfortunate."; + next; + mes "\"However, taking all this different events into account, I came to the suspicion that there might be a connection. Of course we don't have evidence yet, so I don't want to be too clear. Well, I'll bring this to the Sages notice.\""; + next; + mes "\"You were a great help! I'll inform Nikolai about your involvement in clarifing this matter.\""; + next; + mes "\"And you should also talk with Peetu, I'm sure he'll be relieved to hear about the clarification of this matter.\""; + set @investigate, 11; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_GoodJob: + mes "[Oskari]"; + mes "\"Thanks again for your investigations.\""; + menu + "You're welcome.",L_Close, + "Can you tell me something about the Sages?",-; + + mes "[Oskari]"; + mes "\"Oh, sure. I'm a bit busy right now, but you were a great help, so I think I can take some minutes for you. What do you want to know?\""; + menu + "What exactly are the Sages and what do they do?",L_Sages, + "What was that conflict you were talking about?",L_Conflict, + "Mh, I changed my mind.",L_Close; + +L_Sages: + mes "[Oskari]"; + mes "\"Well, as I said the Sages are a circle of powerful wizards. There are twelve of them - eh, actually, now there are only elven of them.\""; + mes "He sighs."; + next; + mes "[Oskari]"; + mes "\"However, they live in different places all over Kaizei, but meet sometimes to discuss about differents matters. They work hard for the prosperity of this continent, trying to improve the living conditions by both political work and magical researches, with the aid of their helpers.\""; + next; + mes "\"The politics on Kaizei are rather complicated, the Sages have great influence, but there are also other organziations and groups. Due to the harsh clima on this continent, villages or towns can be cut off the rest of the world for several weeks sometimes, so most of them tend to be rather independent.\""; + next; + mes "\"Also there's the Order of Ice, an organization which represents the national interests of Kaizei in a rather narrow-minded way compared to the Sages.\""; + goto L_Close; + +L_Conflict: + mes "[Oskari]"; + mes "\"Oh, I'm not sure if I should talk about that... It's a rather delicate situation.\""; + next; + mes "\"Basically there was a disagreement between the Sages. Usually those things can be solved by discussion, but this time... things got rather personal and one of the members accused Santa to value his own interests over the general good.\""; + next; + mes "\"This is of course nonsense, Santa would never do that and it's more that the person accusing him could be suspected to act this way. The other Sages were on Santa's side and I fear this harsh rejection caused a lot of hurt feelings.\""; + next; + mes "\"Personally I think that he was jealous about Santa's influence and supremacy position since quite a while. However, he took this as a reason to leave the Sages and based on our insights it seems he decided to work against the Sages."; + mes "It really is a shame.\""; + goto L_Close; + +L_Close: + set @investigate, 0; + close; +} diff --git a/world/map/npc/048-2/helperCleaning1.txt b/world/map/npc/048-2/helperCleaning1.txt new file mode 100644 index 00000000..a76ab7ad --- /dev/null +++ b/world/map/npc/048-2/helperCleaning1.txt @@ -0,0 +1,86 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Pyry works on cleaning the library, can start the slime subquest +// can give second hint about helper in investigation subquest + +048-2.gat,117,106,0|script|Pyry|365,{ + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Pyry]"; + mes "\"Welcome to the library of Sage Nikolai. I'm very sorry, but as you see it's not in a good shape at the moment. Most of the books got eaten by the slimes or damaged and we're working hard on cleaning up the mess."; + mes "I have to ask you not to go in the deeper parts of the library, since there are still some of the slimes left and they're dangerous.\""; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_Close; + menu + "I can fight them.",-, + "Ok, thanks for the warning.",L_Investigate; + mes "Pyry seems surprised."; + mes "[Pyry]"; + mes "\"That... I didn't think about this possibility. But it'd be a great help!"; + mes "Ok, there are some slimes left in the deeper parts of the library. They... erm, developed some very fast breeding behaviour, both the Blue Slimes and the White Slimes, but in a slightly different fashion.\""; + next; + mes "\"The Blue ones are able to generate smaller slimes which show a self-destructive behaviour to protect their... parent slime if you want to call it like that. You have to kill the big one, but be careful about the smaller ones while trying that.\""; + next; + mes "\"The White Slimes appear in groups and when you attack one of them, they also show some self-destructive behaviour to protect their group as a whole. You have to defeat all of one group, otherwise the remaining ones will breed new slimes to fill up their losses.\""; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageSlimesStart; + goto L_Investigate; + +L_Progress: + mes "[Pyry]"; + mes "\"It's very brave of you to fight against those slimes deeper in the library. Remember that you have to kill all of one group to prevent them from breeding.\""; + goto L_Investigate; + +L_Thank: + mes "[Pyry]"; + mes "\"It seems all of the slimes are gone now. I'm so glad! Thanks for your help. I mentioned your assistance to Nikolai.\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Pyry]"; + mes "\"Mh, yes. I remember him, he was very interested in the library and the researches we do here. He had an unordinary behaviour and appearance. But well, this isn't a reason to refuse someone, right?\""; + goto L_Close; + +L_Helper: + mes "[Pyry]"; + mes "\"Peetu? I was always glad to have him in the team. He really brought forward our work here.\""; + next; + mes "\"I was very surprised when I heard that he's responsible for the failed sealing spell. I'd never have expected that from him.\""; + if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7)) + goto L_Close; + set @investigate, @investigate + 3; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Close: + set @investigate, 0; + set @slimes, 0; + close; +} diff --git a/world/map/npc/048-2/helperCleaning2.txt b/world/map/npc/048-2/helperCleaning2.txt new file mode 100644 index 00000000..6018f4e6 --- /dev/null +++ b/world/map/npc/048-2/helperCleaning2.txt @@ -0,0 +1,76 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Nea works on cleaning the library +// can give second hint about helper in investigation subquest + +048-2.gat,123,87,0|script|Nea|363,{ + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Nea]"; + mes "\"Oh, hello. If I were you I wouldn't go deeper into the library. There are still some of those monsters left. Slipping around between the bookshelves.\""; + mes "She shudders."; + next; + mes "[Nea]"; + mes "\"And they can explode! Nothing in the world could make go there. I'll do my work just right here, clean the floor and tidy up the books, while I keep my eyes open if they get over here.\""; + goto L_Investigate; + +L_Progress: + mes "[Nea]"; + mes "\"Oh, I'm so glad you're taking care about this scary slimes. You're so brave!"; + mes "How much of the are still left, what do you think? Will it be secure to go there soon?\""; + goto L_Investigate; + +L_Thank: + mes "[Nea]"; + mes "\"I feel much safer now that you defeated the slimes. Thanks so much!\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Nea]"; + mes "\"With a mask? Mh, I think I know who are you talking about, I remember vaguely that there was someone with a mask... but I can't recall any details, I didn't really pay attention.\""; + goto L_Close; + +L_Helper: + mes "[Nea]"; + mes "\"Peetu? Yeah, he's that kind of person who always wants to do things perfectly. That makes him a bit wearisome to work with him, since he has as high expectations to everyone else as he has to himself.\""; + next; + mes "\"I really wonder how that accident with the sealing spell could've happened. I'd have never expected him to mess up something like that.\""; + if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7)) + goto L_Close; + set @investigate, @investigate + 3; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Close: + set @investigate, 0; + set @slimes, 0; + close; +} diff --git a/world/map/npc/048-2/helperCleaning3.txt b/world/map/npc/048-2/helperCleaning3.txt new file mode 100644 index 00000000..3d80dcaa --- /dev/null +++ b/world/map/npc/048-2/helperCleaning3.txt @@ -0,0 +1,80 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Arvo works on cleaning the library +// can give second hint about the visitor in investigation subquest + +048-2.gat,139,99,0|script|Arvo|366,{ + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Arvo]"; + mes "\"Oh, this is so much work... I can't believe they let this happen! You would think they're carful when playing around with such powerful forces. Hah! Big mistake!\""; + goto L_Investigate; + +L_Progress: + mes "[Arvo]"; + mes "\"We really appreciate your help with the slimes.\""; + mes "He sighs."; + goto L_Investigate; + +L_Thank: + mes "[Arvo]"; + mes "\"Good work with the slimes. This will make our task much easier.\""; + mes "He sighs and has a careful look around."; + next; + mes "[Arvo]"; + mes "\"But it shows that Nikolai's position isn't what it used to be. There's disturbance in the great circle of our Sages and things change. About one year ago the helpers of Nikolai wouldn't have needed help of a mere adventurer - no offense.\""; + next; + mes "\"But it seems we were focusing too much on researches and this lead to neglect of other duties of a Sage's household. This is dangerous in times of changes. I'm worried about the future.\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Arvo]"; + mes "\"Yes, I remember that one! I welcomed him in the libary and showed him around. But I didn't have the impression he was really listening to what I was selling, though that's hard to tell with the mask.\""; + next; + mes "\"But when I left him to look at the books on his own, he sneaked over to the workshop area. Visitors are allowed to have a look there, but only if they don't interfere with any researches and experiments. But it seems he was rather disturbing, they sent them back to the library part.\""; + next; + mes "\"I tried to have a look at him after that, but when I got distracted by some newly arriving visitor he went over to the workshop again! Usually I enjoy my job, because I like talking to people, but this guy... was a pain, really.\""; + if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9)) + goto L_Close; + set @investigate, @investigate + 1; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Helper: + mes "[Arvo]"; + mes "\"Peetu? That's one of the high rank helpers, as far as I know he's very talented with magic and takes part in some important researches. But I don't really know about those things.\""; + goto L_Close; + +L_Close: + set @investigate, 0; + set @slimes, 0; + close; +} diff --git a/world/map/npc/048-2/helperCleaning4.txt b/world/map/npc/048-2/helperCleaning4.txt new file mode 100644 index 00000000..19e180e2 --- /dev/null +++ b/world/map/npc/048-2/helperCleaning4.txt @@ -0,0 +1,71 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Kristian works on cleaning the library +// can give second hint about the visitor in investigation subquest + +048-2.gat,131,119,0|script|Kristian|366,{ + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Kristian]"; + mes "\"Welcome. Please don't go deeper in the library, there are still some slimes left. But beside of that we really did a good progress. You should've seen the mess just after most of the slimes escaped!\""; + goto L_Investigate; + +L_Progress: + mes "[Kristian]"; + mes "\"Wow, it's really generous from you to fight those slimes for us.\""; + goto L_Investigate; + +L_Thank: + mes "[Kristian]"; + mes "\"I'm so glad that you took care of the remaining slimes. Thanks!\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Kristian]"; + mes "\"Oh, there was such a visitor, yes. Strange guy, and didn't really know how to behave. He sneaked into the workshop area all the time, I think he was rather curious about the things going on there.\""; + next; + mes "\"But still, he can't just walk there, fiddle with the experiments and disturb the helpers doing their work.\""; + if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9)) + goto L_Close; + set @investigate, @investigate + 1; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Helper: + mes "[Kristian]"; + mes "\"Peetu? I think he's a good guy. Very focused on his work, I think. I don't have that much to do with him, so I can't really tell.\""; + goto L_Close; + +L_Close: + set @investigate, 0; + set @slimes, 0; + close; +} diff --git a/world/map/npc/048-2/helperCleaning5.txt b/world/map/npc/048-2/helperCleaning5.txt new file mode 100644 index 00000000..7ca7af4b --- /dev/null +++ b/world/map/npc/048-2/helperCleaning5.txt @@ -0,0 +1,71 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Mirjami is searching for some cleaning supplies +// can give second hint about visitor in investigation subquest + +048-2.gat,100,125,0|script|Mirjami|363,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (@slimes == 255) goto L_Thank; + + mes "[Mirjami]"; + mes "\"Where is it? Everything's upside down. These terrible slimes.\""; + menu + "What are you doing?",-; + mes "[Mirjami]"; + mes "\"Oh? I'm just searching for some cleaning supplies. They must be somewhere around here, but everything got upside down when the slimes escaped.\""; + goto L_Investigate; + +L_Thank: + mes "[Mirjami]"; + mes "\"I heard you fought the slimes that were still roaming between the bookshelves. Thank you!\""; + next; + mes "\"I was a bit worried that they might baffle our efforts by just messing everything up again after we just cleaned.\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Mirjami]"; + mes "\"Ohh, I think I know who you mean. That was a strange guy. He always came over here in the workshop, said he's very interested in the researches. I suppose that's ok, but he didn't keep his hands by himself, but touched some experiments and I catched him on some storage rack.\""; + next; + mes "\"Visitors should keep away from that!\""; + if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9)) + goto L_Close; + set @investigate, @investigate + 1; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Helper: + mes "[Mirjami]"; + mes "\"Oh, eh, why are you asking me? I'm here only since a short while and don't really know all the people well enough yet.\""; + goto L_Close; + +L_Close: + set @investigate, 0; + set @slimes, 0; + close; +} diff --git a/world/map/npc/048-2/helperJanitor.txt b/world/map/npc/048-2/helperJanitor.txt new file mode 100644 index 00000000..48298d50 --- /dev/null +++ b/world/map/npc/048-2/helperJanitor.txt @@ -0,0 +1,79 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Elias is the janitor of the mansion +// part of investigation subquest, gives initial hint on the visitor with the mask + +048-2.gat,40,41,0|script|Elias|365,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + + if (@investigate == 11) goto L_Thank; + if ((@investigate == 4) || (@investigate == 7) || (@investigate == 10)) goto L_Confirmed; + if ((@investigate == 3) || (@investigate == 6) || (@investigate == 9)) goto L_Worry; + if (QUEST_BlueSage > 0) goto L_ShortHello; + + mes "[Elias]"; + mes "\"Welcome in the residence of Nikolai, member of the Sages of Kaizei.\""; + next; + mes "\"Our house is famous for its extraordinary and well equipped library."; + mes "Ahm, usually well equipped.\""; + next; + mes "\"We had an accident with some magic experiment, that caused some slimes get out of control. They ate most of the books in the library.\""; + mes "He sighs with a regretful look on his face."; + next; + mes "[Elias]"; + mes "\"So, if you came because of the library, I'll have to disappoint you, there's not much left."; + mes "Though you look like a skilled adventurer. If you'd like to offer your help that'd be very appreciated.\""; + next; + mes "\"The library is on the third floor.\""; + goto L_Close; + +L_ShortHello: + mes "[Elias]"; + mes "\"Welcome back. I heard you're helping with the cleanup efforts in the library."; + mes "Thank you very much.\""; + if ((@investigate != 2) && (@investigate != 5) && (@investigate != 8)) + goto L_Close; + menu + "Can you tell me if there were any unusual visitors before the accident?",-; + mes "[Elias]"; + mes "\"Mh, let me think. There were quite a lot of visitors with different concerns, but that's usual at this time of the year."; + mes "One of them was a bit odd, he was wearing a mask and had a strange way of talking. He said he comes from Thermin, that's a mining town in the west. I figured his face might have gotten deformed in some mining accident, but I didn't ask, that would've been rude."; + mes "If I remember correctly he wanted to see the library.\""; + next; + mes "Elias gets a bit excited now."; + mes "[Elias]"; + mes "\"Do you think he might have something to do with the accident? We're a very hospitable house, so I didn't see a reason to deny him the entrance. I mean, his mask might have been a bit unusual, but hey, there could've been many reasons why someone would wear a mask, don't you think so?\""; + + set @investigate, @investigate + 1; + callfunc "updateBlueSageInvestigate"; + + menu + "Sure, but it's interesting he was here shortly before the accident.",L_Close, + "I'll ask some more people about that guy.",L_Close; + +L_Worry: + mes "[Elias]"; + mes "\"After your questions I'm really getting worried about this guy with the mask. In the afterthought it really seems suspicous."; + mes "It might be a good idea to ask around if someone else observed something odd connected to this person.\""; + goto L_Close; + +L_Confirmed: + mes "[Elias]"; + mes "\"I heard your investigations reminded other people that they observed suspicious behaviour too.\""; + next; + mes "\"It's all my fault, I should've paid more attention! You should talk to Chief Oskari about this.\""; + goto L_Close; + +L_Thank: + mes "[Elias]"; + mes "\"Now that Chief Oskari knows about the backgrounds, the Sages will take care about it. It's really a shame how malicious people can be.\""; + next; + mes "\"Thanks a lot for your help with revealing the truth.\""; + goto L_Close; + +L_Close: + set @investigate, 0; + close; +} diff --git a/world/map/npc/048-2/helperMInk.txt b/world/map/npc/048-2/helperMInk.txt new file mode 100644 index 00000000..36baa76c --- /dev/null +++ b/world/map/npc/048-2/helperMInk.txt @@ -0,0 +1,106 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Eevert asks for material to create inks for the illustrations in the new books +// can give second hint about Peetu in investigation subquest + +048-2.gat,95,103,0|script|Eevert|365,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @water_amount, 5; + set @spectre_amount, 3; + set @poltergeist_amount, 3; + set @wisp_amount, 3; + set @ironpowder_amount, 4; + set @ink_exp, 7000; + + if (QUEST_BlueSage & $@Q_BlueSageMaterialInk) goto L_Done; + + mes "[Eevert]"; + mes "\"Mh. I wonder how I'm expected to do my task with this meager equipment. The new books will look pathetic.\""; + mes "He sighs."; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_Close; + menu + "What do you need?",-, + "Not my problem.",L_Investigate; + mes "[Eevert]"; + mes "\"I'm doing the covers and illustrations for the new books we create from the pieces of the old ones. But due to all the chaos when the slimes escaped, most of the phials with colored ink were broken. How am I supposed to do the illustrations without color?\""; + next; + mes "\"I think I'll need at least " + @water_amount + " Bottles of Water, " + @spectre_amount + " Spectre Powders, " + @poltergeist_amount + " Poltergeist Powders, " + @wisp_amount + " Wisp Powders and " + @ironpowder_amount + " Iron Powders to create new ink.\""; + menu + "I have those with me!",-, + "I'll try to get those.",L_Close, + "Too bad.",L_Investigate; + + if ((countitem("BottleOfWater") < @water_amount) || (countitem("SpectrePowder") < @spectre_amount) || (countitem("PoltergeistPowder") < @poltergeist_amount) || (countitem("WispPowder") < @wisp_amount) || (countitem("IronPowder") < @ironpowder_amount)) + goto L_NoItem; + delitem "BottleOfWater", @water_amount; + delitem "SpectrePowder", @spectre_amount; + delitem "PoltergeistPowder", @poltergeist_amount; + delitem "WispPowder", @wisp_amount; + delitem "IronPowder", @ironpowder_amount; + getexp @ink_exp, 0; + set QUEST_BlueSage, (QUEST_BlueSage | $@Q_BlueSageMaterialInk); + mes "[Eevert]"; + mes "\"Wonderful! Now I can prepare the ink for magnificent illustrations! You're very generous.\""; + goto L_Investigate; + +L_Done: + mes "[Eevert]"; + mes "\"Thanks for your help with the inks! Now I'll be able to fulfill my tasks adequately. Some of these books were really valuable, and it's important to recreate them as good as possible.\""; + goto L_Investigate; + +L_NoItem: + mes "[Eevert]"; + mes "\"What does this mean? You don't have it!\""; + goto L_Close; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Eevert]"; + mes "\"A visitor? I don't really pay attention to visitors, except it's someone notably.\""; + goto L_Close; + +L_Helper: + mes "[Eevert]"; + mes "\"Ah, Peetu. I really appreciate his sense for high quality work. The requirements to become a helper of a sage are already high, but Peetu is outstanding. He has a talent for magic and combined with his diligence it's quite remarkable.\""; + next; + mes "\"That's why I'm really confused about this situation, since he was performing the sealing of the slimes. I wonder what went wrong.\""; + if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7)) + goto L_Close; + set @investigate, @investigate + 3; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Close: + set @investigate, 0; + set @water_amount, 0; + set @spectre_amount, 0; + set @poltergeist_amount, 0; + set @wisp_amount, 0; + set @ironpowder_amount, 0; + set @ink_exp, 0; + close; +} diff --git a/world/map/npc/048-2/helperMReed.txt b/world/map/npc/048-2/helperMReed.txt new file mode 100644 index 00000000..e8ef9ab4 --- /dev/null +++ b/world/map/npc/048-2/helperMReed.txt @@ -0,0 +1,96 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Kullervo asks for Reed Bundles to create paper for repairing the books +// can give second hint about both Peetu and visitor in investigation subquest + +048-2.gat,104,78,0|script|Kullervo|366,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @reed_amount, 20; + set @reed_exp, 10000; + + if (QUEST_BlueSage & $@Q_BlueSageMaterialReed) goto L_Done; + + mes "[Kullervo]"; + mes "\"Oh no! What should we do now?\""; + menu + "What's wrong?",-; + mes "[Kullervo]"; + mes "\"We're nearly out of paper. The new books require so much material... And it's not easy to get Reed Bundles for creating new.\""; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_Close; + menu + "I have some.",-, + "I'll try to get some.",L_Close, + "Too bad.",L_Investigate; + if(countitem("ReedBundle") < @reed_amount) + goto L_NoItem; + delitem "ReedBundle", @reed_amount; + getexp @reed_exp, 0; + set QUEST_BlueSage, (QUEST_BlueSage | $@Q_BlueSageMaterialReed); + mes "[Kullervo]"; + mes "\"Thank you! That's very generous of you.\""; + goto L_Investigate; + +L_Done: + mes "[Kullervo]"; + mes "\"Very well, now I can create more paper.\""; + goto L_Investigate; + +L_NoItem: + mes "[Kullervo]"; + mes "\"Oh, really? Ah, it's not enough. I need " + @reed_amount + " Reed Bundles.\""; + goto L_Close; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Kullervo]"; + mes "\"Oh, yes. There was such a guy, shortly before the accident I think. He sneaked into the workshop several times, sticking his nose into stuff that shouldn't be his business. We had to sent him back to the library part at least three times.\""; + next; + mes "\"Maybe he was confused, not sure. He talked very strangely.\""; + if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9)) + goto L_Close; + set @investigate, @investigate + 1; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Helper: + mes "[Kullervo]"; + mes "\"Are you asking because people say it's his fault? Listen, I know Peetu since many years now, we started our service here about the same time. We share our room and became really close friends."; + mes "And in all this years, I never experienced him messing up anything important. He's a perfectionist. He isn't satisfied with anything minor than the best possible result when doing his work.\""; + next; + mes "\"I don't understand what went wrong with that spell, it just has to have another cause than Peetu. I'm worried about him, he must feel very miserable. But I can't leave my duty here.\""; + if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7)) + goto L_Close; + set @investigate, @investigate + 3; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Close: + set @investigate, 0; + set @reed_amount, 0; + set @reed_exp, 0; + close; +} diff --git a/world/map/npc/048-2/helperMSilk.txt b/world/map/npc/048-2/helperMSilk.txt new file mode 100644 index 00000000..e65d81fe --- /dev/null +++ b/world/map/npc/048-2/helperMSilk.txt @@ -0,0 +1,91 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Janika asks for Silk Cocoons for repairing the books +// can give second hint about visitor in investigation subquest + +048-2.gat,104,103,0|script|Janika|363,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @silk_amount, 80; + set @silk_exp, 10000; + + if (QUEST_BlueSage & $@Q_BlueSageMaterialSilk) goto L_Done; + if (BaseLevel >= $@Q_BlueSageMinimumLevel) goto L_Quest; + + mes "[Janika]"; + mes "\"This is going to be difficult... oh, hello. I'm working on recreating some of the books that got destroyed.\""; + goto L_Close; + +L_Quest: + mes "[Janika]"; + mes "\"This is going to be difficult..."; + mes "Oh, hello. You don't have " + @silk_amount + " Silk Cocoons with you, have you? I need them for the book covers and binding of some of the more valuable books we're trying to recreate.\""; + menu + "I have!",-, + "I haven't, but I can try to get some.",L_Investigate, + "No.",L_Investigate; + if(countitem("SilkCocoon") < @silk_amount) + goto L_NoItem; + delitem "SilkCocoon", @silk_amount; + getexp @silk_exp, 0; + set QUEST_BlueSage, (QUEST_BlueSage | $@Q_BlueSageMaterialSilk); + mes "[Janika]"; + mes "\"Excellent! This is exactly what I need. Thanks a lot. I'll tell Nikolai about your generosity.\""; + goto L_Investigate; + +L_Done: + mes "[Janika]"; + mes "\"Thanks for the Silk Cocoons. With these the new books are going to be exquisite.\""; + goto L_Investigate; + +L_NoItem: + mes "[Janika]"; + mes "\"Are you kidding? You don't have it!\""; + goto L_Close; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Janika]"; + mes "\"Oh, I know who you mean! That impertinent person came over in the workshop area and fiddled about all kind of things here! Such a rude person! Didn't he understand that we had delicate things going on here? We had to send him back to the library area several times.\""; + next; + mes "She shakes her head."; + mes "\"Sometimes I think it'd be better not to allow visitors here. But the sages set a high value on keeping contact to the population. Politics.\""; + if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9)) + goto L_Close; + set @investigate, @investigate + 1; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Helper: + mes "[Janika]"; + mes "\"Mh, I don't know him closely.\""; + goto L_Close; + +L_Close: + set @investigate, 0; + set @silk_amount, 0; + set @silk_exp, 0; + close; +} diff --git a/world/map/npc/048-2/helperMYetiClaw.txt b/world/map/npc/048-2/helperMYetiClaw.txt new file mode 100644 index 00000000..805d8a5e --- /dev/null +++ b/world/map/npc/048-2/helperMYetiClaw.txt @@ -0,0 +1,96 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Santeri asks for Yeti Claws to make glue for repairing the books +// can give second hint about Peetu in investigation subquest + +048-2.gat,97,78,0|script|Santeri|366,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @claw_amount, 8; + set @claw_exp, 10000; + + if (QUEST_BlueSage & $@Q_BlueSageMaterialClaw) goto L_Done; + if (BaseLevel >= $@Q_BlueSageMinimumLevel) goto L_Quest; + + mes "[Santeri]"; + mes "\"Hm. Please don't disturb me, I'm trying to concentrate.\""; + goto L_Close; + +L_Quest: + mes "[Santeri]"; + mes "\"Welcome. Are you an adventurer? I could need some help.\""; + menu + "I am. What heroic action is needed?",-, + "How can I help?",-, + "I'm not interested.",L_Close; + mes "[Santeri]"; + mes "\"You see, we're working on repairing all the damaged books and creating new ones for those that are lost."; + mes "Therefore we need a lot of glue, but our supplies are nearly used up. I need " + @claw_amount + " Yeti Claws as ingredient to make new glue. Do you have that?\""; + menu + "Yes, here you go.",-, + "I need to look in my storage.",L_Close, + "No, sorry.",L_Investigate; + if(countitem("YetiClaw") < @claw_amount) + goto L_NoItem; + delitem "YetiClaw", @claw_amount; + getexp @claw_exp, 0; + set QUEST_BlueSage, (QUEST_BlueSage | $@Q_BlueSageMaterialClaw); + mes "[Santeri]"; + mes "\"Great! Thank you!\""; + goto L_Investigate; + +L_Done: + mes "[Santeri]"; + mes "\"Thanks to you our glue supply is replenished and we can repair those books.\""; + goto L_Investigate; + +L_NoItem: + mes "[Santeri]"; + mes "\"What are you telling me? You don't have it!\""; + goto L_Close; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Santeri]"; + mes "\"There was a visitor with a mask? I didn't notice. You see, I spent most of my time in the workshop, and concentrate on my work. There are other helpers who attend to the visitors. And hopefully keep them from disturbing my concentration.\""; + goto L_Close; + +L_Helper: + mes "[Santeri]"; + mes "\"Oh, that's an interesting question. I was really surpised when I heard that he was responsible for the sealing spell. I've worked together with him once in a while, and I have to say, it really was a pleasure. He's very accurate and diligent, but also polite and helpful.\""; + next; + mes "\"I really wonder what went wrong with that sealing spell, I can't imagine Peetu messing up something such important.\""; + if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7)) + goto L_Close; + set @investigate, @investigate + 3; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Close: + set @investigate, 0; + set @claw_amount, 0; + set @claw_exp, 0; + close; +} diff --git a/world/map/npc/048-2/helperResting1.txt b/world/map/npc/048-2/helperResting1.txt new file mode 100644 index 00000000..208ba68c --- /dev/null +++ b/world/map/npc/048-2/helperResting1.txt @@ -0,0 +1,72 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Lenita is one of the helpers working on sorting the bookpages, but is currently having a break +// can give second hint about the visitor in investigation subquest + +048-2.gat,36,26,0|script|Lenita|363,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + + if (@bookpages == 254) goto L_Thank; + if (@bookpages > 0) goto L_Progress; + + mes "[Lenita]"; + mes "\"Oh, hello. You didn't choose a good moment to visit. The library is a total mess. The slimes got out of control and ate most of the books.\""; + next; + mes "\"We're trying to repair some of the valuable and important books. It's so much work!"; + mes "I was up until late night yesterday, and went up so early today... I'm having a break right now.\""; + goto L_Investigate; + +L_Progress: + mes "[Lenita]"; + mes "\"Teuvo said you're helping to collect some of the missing bookpages to repair the books. That's very kind of you! It's so much work to do, so every help is welcome.\""; + goto L_Investigate; + +L_Thank: + mes "[Lenita]"; + mes "\"Wow, Ensio told me you collected so many of the lost book pages.\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "I need to leave.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "See you later.",L_Close; + +L_Ask_Both: + menu + "Can you tell me something about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "Bye.",L_Close; + +L_Visitor: + mes "[Lenita]"; + mes "\"With a mask? Yeah, I remember. That was a strange guy. He came to visit the library, but he lurked around at the workshop area and they had so sent him back to the books.\""; + if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9)) + goto L_Close; + set @investigate, @investigate + 1; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Helper: + mes "[Lenita]"; + mes "\"Mh, I can't really tell since I usually work in the library while he works at the workshop. Maybe you should ask around among the people who work there.\""; + goto L_Close; + +L_Close: + set @investigate, 0; + set @bookpages, 0; + close; +} diff --git a/world/map/npc/048-2/helperResting2.txt b/world/map/npc/048-2/helperResting2.txt new file mode 100644 index 00000000..71f50af9 --- /dev/null +++ b/world/map/npc/048-2/helperResting2.txt @@ -0,0 +1,73 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Miro is one of the helpers cleaning up the library, but it currently having a break +// can give second hint about the Peetu in investigation subquest + +048-2.gat,35,27,0|script|Miro|366,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + if (@slimes == 255) goto L_Thank; + if (@slimes > 0) goto L_Progress; + + mes "[Miro]"; + mes "\"Hm? Oh, excuse me. I'm feeling so tired. We currently have some problems with some slimes out of control in the library. They ate most of the books and caused a total chaos.\""; + next; + mes "\"We need to clean up the mess and it's so much to do. I was cleaning the floor for hours and I'm having a break now.\""; + goto L_Investigate; + +L_Progress: + mes "[Miro]"; + mes "\"Pyry mentioned you're helping with the leftover slimes. You're really brave! I'd be afraid they'd eat me like they ate the books!\""; + goto L_Investigate; + +L_Thank: + mes "[Miro]"; + mes "\"Wow, how you took care of the slimes in the library! Amazing! This makes our job there much easier... and safer. Thank you so much!\""; + goto L_Investigate; + +L_Investigate: + if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor; + if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper; + if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both; + goto L_Close; + +L_Ask_Visitor: + menu + "Do you know anything about the visitor with the mask?",L_Visitor, + "See you.",L_Close; + +L_Ask_Helper: + menu + "What's your impression about Peetu and how he does his work?",L_Helper, + "Bye.",L_Close; + +L_Ask_Both: + menu + "Do you know anything about the visitor with the mask?",L_Visitor, + "What's your impression about Peetu and how does he do his work?",L_Helper, + "I need to leave.",L_Close; + +L_Visitor: + mes "[Miro]"; + mes "\"With a mask? I really don't know. I'm usually working in the workshop and most of the visitors spent their time in the library. Though sometimes they come to have a quick look in the workshop too, but I don't really pay attention to that, so... I can't recall a visitor with a mask, sorry.\""; + goto L_Close; + +L_Helper: + mes "[Miro]"; + mes "\"Peetu? It was his job to seal away the slimes before the night, right? I have to say I'm really surprised about what happened, because he's a very cautious person. I'd have never guessed that he'd mess up something as important as this.\""; + next; + mes "\"If Nikolai's helpers wouldn't be that carefully chosen I'd think this was some kind of a bad joke from someone.\""; + if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7)) + goto L_Close; + set @investigate, @investigate + 3; + callfunc "updateBlueSageInvestigate"; + goto L_Close; + +L_Close: + set @investigate, 0; + set @slimes, 0; + close; +} diff --git a/world/map/npc/048-2/sageNikolai.txt b/world/map/npc/048-2/sageNikolai.txt new file mode 100644 index 00000000..82222309 --- /dev/null +++ b/world/map/npc/048-2/sageNikolai.txt @@ -0,0 +1,292 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Sage Nikolai gives hints about the different subquests and rewards + +048-2.gat,98,106,0|script|Nikolai|362,{ + + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @material, ((QUEST_BlueSage & $@Q_BlueSageMaterial_MASK) >> $@Q_BlueSageMaterial_SHIFT); + + if ((@bookpages == 31) + && (QUEST_BlueSage & $@Q_BlueSageMaterialInk) + && (QUEST_BlueSage & $@Q_BlueSageMaterialClaw) + && (QUEST_BlueSage & $@Q_BlueSageMaterialReed) + && (QUEST_BlueSage & $@Q_BlueSageMaterialSilk) + && !(QUEST_BlueSage & $@Q_BlueSageGrimoire)) + goto L_GrimoireReward; + + if ((@slimes == 255) && !(QUEST_BlueSage & $@Q_BlueSageIceSword)) + goto L_SlimesReward; + + if ((QUEST_BlueSage & $@Q_BlueSageGrimoire) && (QUEST_BlueSage & $@Q_BlueSageIceSword)) + goto L_Done; + + if (QUEST_BlueSage > 0) + goto L_Hints; + + mes "You see a very reputable looking man who is going through some papers. He looks up as you approach."; + mes "[Nikolai]"; + mes "\"Welcome to my mansion. I am Nikolai, member of the Sages of Kaizei."; + mes "I assume you came to see our famous library? As you can see, it isn't in a good shape due to some... misfortunes. I'm very sorry.\""; + if (BaseLevel < $@Q_BlueSageMinimumLevel) + goto L_Close; + next; + mes "\"You seem to be a quite experienced adventurer. I usually wouldn't ask for this, but since my dear friend Santa mentioned his good experiences with hiring additional helpers in times of pressure, I reconsidered."; + mes "If you don't mind, every help with our current situation would be appreciated.\""; + next; + mes "\"There are many things to take care of at the moment, so if you'd like to aid us, the helpers will be able to tell you what they need.\""; + goto L_Close; + +L_Hints: + mes "[Nikolai]"; + mes "\"I heard you started to help out a bit. That's very kind.\""; + + cleararray @choice_idx, 0, 10; + cleararray @choice$, "", 10; + + set @C_startBookpages, 1; + set @C_bookpages, 2; + set @C_startMaterials, 3; + set @C_materials, 4; + set @C_startSlimes, 5; + set @C_slimes, 6; + set @C_startInvestigate, 7; + set @C_investigate, 8; + set @C_investigate2, 9; + set @C_nevermind, 10; + + // counter of available answers + set @choices_nr, 0; + + if (@bookpages > 0) + goto L_NoStartBookpages; + set @choice_idx[@choices_nr], @C_startBookpages; + set @choice$[@choices_nr], "I heard the slimes ate most of the books..."; + set @choices_nr, @choices_nr + 1; + +L_NoStartBookpages: + if ((@bookpages == 0) || (@bookpages == 31)) + goto L_NoBookpages; + set @choice_idx[@choices_nr], @C_bookpages; + set @choice$[@choices_nr], "I'm collecting lost bookpages."; + set @choices_nr, @choices_nr + 1; + +L_NoBookpages: + if (@material > 0) + goto L_NoStartMaterials; + set @choice_idx[@choices_nr], @C_startMaterials; + set @choice$[@choices_nr], "There were many valuable books in your library, right?"; + set @choices_nr, @choices_nr + 1; + +L_NoStartMaterials: + if ((@material == 0) || (@material == 255)) + goto L_NoMaterials; + set @choice_idx[@choices_nr], @C_materials; + set @choice$[@choices_nr], "I brought some material to repair the books."; + set @choices_nr, @choices_nr + 1; + +L_NoMaterials: + if (@slimes > 0) + goto L_NoStartSlimes; + set @choice_idx[@choices_nr], @C_startSlimes; + set @choice$[@choices_nr], "Those slimes really caused a mess!"; + set @choices_nr, @choices_nr + 1; + +L_NoStartSlimes: + if ((@slimes == 0) || (@slimes == 255)) + goto L_NoSlimes; + set @choice_idx[@choices_nr], @C_slimes; + set @choice$[@choices_nr], "I'm hunting the remaining slimes in the library."; + set @choices_nr, @choices_nr + 1; + +L_NoSlimes: + if (@investigate > 0) + goto L_NoStartInvestigate; + set @choice_idx[@choices_nr], @C_startInvestigate; + set @choice$[@choices_nr], "How did this all happen?"; + set @choices_nr, @choices_nr + 1; + +L_NoStartInvestigate: + if ((@investigate < 2) || (@investigate > 11)) + goto L_NoInvestigate; + set @choice_idx[@choices_nr], @C_investigate; + set @choice$[@choices_nr], "I'm trying to find out how that accident could've happened."; + set @choices_nr, @choices_nr + 1; + +L_NoInvestigate: + if (@investigate != 11) + goto L_NoInvestigate2; + set @choice_idx[@choices_nr], @C_investigate2; + set @choice$[@choices_nr], "I told Chief Oskari what I found out about the accident."; + set @choices_nr, @choices_nr + 1; + +L_NoInvestigate2: + set @choice_idx[@choices_nr], @C_nevermind; + set @choice$[@choices_nr], "Nevermind."; + + menu + @choice$[0],-, + @choice$[1],-, + @choice$[2],-, + @choice$[3],-, + @choice$[4],-, + @choice$[5],-, + @choice$[6],-, + @choice$[7],-, + @choice$[8],-, + @choice$[9],-; + + set @menu, @menu - 1; + if (@choice_idx[@menu] == 0) + goto L_Close; + if (@choice_idx[@menu] == @C_startBookpages) + goto L_StartPagesAdvice; + if (@choice_idx[@menu] == @C_bookpages) + goto L_PagesAdvice; + if (@choice_idx[@menu] == @C_startMaterials) + goto L_StartMaterialAdvice; + if (@choice_idx[@menu] == @C_materials) + goto L_MaterialAdvice; + if (@choice_idx[@menu] == @C_startSlimes) + goto L_StartSlimesAdvice; + if (@choice_idx[@menu] == @C_slimes) + goto L_SlimesAdvice; + if (@choice_idx[@menu] == @C_startInvestigate) + goto L_StartInvestigateAdvice; + if (@choice_idx[@menu] == @C_investigate) + goto L_InvestigateAdvice; + if (@choice_idx[@menu] == @C_investigate2) + goto L_InvestigateAdvice2; + if ((@choice_idx[@menu] == @C_nevermind)) + goto L_Close; + goto L_Close; + +L_StartPagesAdvice: + // I heard the slimes ate most of the books... + mes "[Nikolai]"; + mes "\"This is true. But while hunting the slimes we discovered that they occasionaly drop bookpages that are still readable."; + mes "Since we had several copies of nearly all the books, we might be able to recreate most of them if we can get at least one copy of each page.\""; + goto L_Close; + +L_PagesAdvice: + // I'm collecting lost bookpages. + mes "[Nikolai]"; + mes "\"Excellent! This will save us a lot of time. Ensio coordinates the sorting of the pages.\""; + goto L_Close; + +L_StartMaterialAdvice: + // There were many valuable books in your library, right? + mes "He sighs."; + mes "[Nikolai]"; + mes "\"Yes. There were some really old and rare pieces.\""; + next; + mes "\"We're going to recreate some of them, but I'm not sure if we have all the needed materials. If you'd like to help you could ask around if someone is missing something.\""; + goto L_Close; + +L_MaterialAdvice: + // I brought some material to repair the books. + mes "[Nikolai]"; + mes "\"That's very generous! Though I think not everyone has all they need yet.\""; + goto L_Close; + +L_StartSlimesAdvice: + // Those slimes really caused a mess! + mes "[Nikolai]"; + mes "\"Indeed. My helpers did great work to clean the worst of it, but there are still some remaining slimes in the deeper parts of the library.\""; + goto L_Close; + +L_SlimesAdvice: + // I'm hunting the remaining slimes in the library. + mes "[Nikolai]"; + mes "\"You're a great help! All helpers who would be capable to deal with the slimes are occupied with other tasks.\""; + goto L_Close; + +L_StartInvestigateAdvice: + // How did this all happen? + mes "[Nikolai]"; + mes "\"We're not sure yet. The helper who was responsible to seal away the slimes has been sent to his room until they situation calms down and we can start an investigation.\""; + goto L_Close; + +L_InvestigateAdvice: + // I'm trying to find out how that accident could've happened. + mes "[Nikolai]"; + mes "\"I see. Well, we were too busy to start with that ourselves, but having someone unbiased looking at this case might be a good thing.\""; + next; + mes "\"It might be good if you talk to Elias at the reception. He usually has a very good overview of all the things going on and especially about visitors.\""; + goto L_Close; + +L_InvestigateAdvice2: + // I told Chief Oskari what I found out about the accident. + mes "[Nikolai]"; + mes "\"Yes, he already let me know. You're investigations were very helpful! This is surely something we need to look into further.\""; + next; + mes "\"Did you already talk to Peetu? I'm sure he'll be glad to know about your results as well.\""; + goto L_Close; + +L_GrimoireReward: + mes "[Nikolai]"; + mes "\"Ah, " + strcharinfo(0) + "! We're doing excellent progress with our attempts to recover the important and valuable of the destroyed books, all thanks to you.\""; + next; + mes "\"I'd like you to have this as a reward for your help.\""; + getinventorylist; + if ((checkweight("Grimoire", 1) == 0) || (@inventory_count == 100)) + goto L_Full_Inv; + getitem "Grimoire", 1; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageGrimoire; + mes "He hands you a very precious book."; + next; + mes "\"This is an artifact of great power, and holding it while attempting to use magic will allow you to access your inner magic power much better. Use it wisely.\""; + goto L_Close; + +L_SlimesReward: + mes "[Nikolai]"; + mes "\"Ah, I heard you took care about the remaining slimes in the library!\""; + next; + mes "\"While looking through some old artifacts that we found during the cleaning, we found this sword. We don't really have a use for it.\""; + getinventorylist; + if ((checkweight("IceGladius", 1) == 0) || (@inventory_count == 100)) + goto L_Full_Inv; + getitem "IceGladius", 1; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageIceSword; + mes "He gives you a sword with a shimmering blue blade."; + next; + mes "\"I'm sure you can use this well.\""; + goto L_Close; + +L_Full_Inv: + mes "[Nikolai]"; + mes "\"You have a very full backback. Please come back when you have more room available.\""; + goto L_Close; + +L_Done: + mes "[Nikolai]"; + mes "\"Thanks for all your help.\""; + goto L_Close; + +L_Close: + set @inventorylist_count, 0; + set @investigate, 0; + set @bookpages, 0; + set @slimes, 0; + close; +} + +048-2.gat,100,106,0|script|Debug|160,{ + set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT); + set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT); + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + + mes "QUEST_BlueSage: " + QUEST_BlueSage; + mes "investigate: " + @investigate; + mes "slimes: " + @slimes; + mes "bookpages: " + @bookpages; + menu + "reset quest",-, + "close",L_Close; + set QUEST_BlueSage, 0; +L_Close: + close; +} diff --git a/world/map/npc/048-2/slimes.txt b/world/map/npc/048-2/slimes.txt new file mode 100644 index 00000000..6266b0cd --- /dev/null +++ b/world/map/npc/048-2/slimes.txt @@ -0,0 +1,579 @@ +// Part of Blue Sage quests +// author: Jenalya +// see bluesageConfig for detailed quest description +// Slime spawns for the slime hunting subquest + +// Variables: +// $@Q_BlueSageSlimeX: Flag to save if a spawn point X is cleared +// $@BlueSageSlimeX_Amount: Number of slimes spawned at spawn point X +// $@BlueSageSlimeX_Spawn: Number of slimes alive from spawn point X +// $@SlimeXVictimID: ID of character that triggered the spawn at X + +// @slimes: Value of the byte 2 of QUEST_BlueSage, used only to check if started/complete +// @spawnSlimeX: Number of slimes killed by the character that triggered the spawn + +// white slimes +048-2.gat,181,95,0|script|#Slime0|32767,2,2,{ + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @spawnSlime0, 0; + + if (mobcount("048-2.gat", "#Slime0::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime0_Spawn, 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime0_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime0)) + end; + + set @chance, rand(10); + if (@chance < 3) + goto L_End; + if (@chance < 4) + goto L_BlowUp; + + set $@Slime0VictimID, getcharid(3); + donpcevent "#Slime0::OnSpawn"; + goto L_End; + +L_BlowUp: + percentheal -100, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + set @chance, 0; + set @slimes, 0; + end; + +OnSpawn: + if (attachrid($@Slime0VictimID) == 0) + goto L_Clean; + set $@BlueSageSlime0_Spawn, $@BlueSageSlime0_Amount; + areamonster "048-2.gat", 178, 92, 184, 98, "", 1093, $@BlueSageSlime0_Spawn, "#Slime0::OnSlimeDeath"; + end; + +OnSlimeDeath: + set $@BlueSageSlime0_Spawn, $@BlueSageSlime0_Spawn - 1; + if (mobcount("048-2.gat", "#Slime0::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime0_Spawn, 0; + + if ($@Slime0VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime0_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + set $@Slime0VictimID, 0; + end; + +L_Count: + set @spawnSlime0, @spawnSlime0 + 1; + if ($@BlueSageSlime0_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + set @spawnSlime0, 0; + message strcharinfo(0), "You don't see any slime of that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime0VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime0_Amount - @spawnSlime0) != 0) + goto L_SlimesEscaped; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageSlime0; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That had been a lot of slimes. You wonder if you're done now."; + set @slimes, 0; + goto L_Clean; +} + + +// white slimes +048-2.gat,164,123,0|script|#Slime1|32767,2,2,{ + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @spawnSlime1, 0; + + if (mobcount("048-2.gat", "#Slime1::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime1_Spawn, 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime1_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime1)) + end; + + set @chance, rand(10); + if (@chance < 3) + goto L_End; + if (@chance < 4) + goto L_BlowUp; + + set $@Slime1VictimID, getcharid(3); + donpcevent "#Slime1::OnSpawn"; + goto L_End; + +L_BlowUp: + percentheal -100, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + set @chance, 0; + set @slimes, 0; + end; + +OnSpawn: + if (attachrid($@Slime1VictimID) == 0) + goto L_Clean; + set $@BlueSageSlime1_Spawn, $@BlueSageSlime1_Amount; + areamonster "048-2.gat", 161, 120, 167, 126, "", 1093, $@BlueSageSlime1_Spawn, "#Slime1::OnSlimeDeath"; + end; + +OnSlimeDeath: + set $@BlueSageSlime1_Spawn, $@BlueSageSlime1_Spawn - 1; + if (mobcount("048-2.gat", "#Slime1::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime1_Spawn, 0; + + if ($@Slime1VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime1_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + set $@Slime1VictimID, 0; + end; + +L_Count: + set @spawnSlime1, @spawnSlime1 + 1; + if ($@BlueSageSlime1_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + set @spawnSlime1, 0; + message strcharinfo(0), "You don't see any slime of that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime1VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime1_Amount - @spawnSlime1) != 0) + goto L_SlimesEscaped; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageSlime1; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That had been a lot of slimes. You wonder if you're done now."; + set @slimes, 0; + goto L_Clean; +} + + +// white slimes +048-2.gat,198,115,0|script|#Slime2|32767,2,2,{ + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @spawnSlime2, 0; + + if (mobcount("048-2.gat", "#Slime2::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime2_Spawn, 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime2_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime2)) + end; + + set @chance, rand(10); + if (@chance < 3) + goto L_End; + if (@chance < 4) + goto L_BlowUp; + + set $@Slime2VictimID, getcharid(3); + donpcevent "#Slime2::OnSpawn"; + goto L_End; + +L_BlowUp: + percentheal -100, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + set @chance, 0; + set @slimes, 0; + end; + +OnSpawn: + if (attachrid($@Slime2VictimID) == 0) + goto L_Clean; + set $@BlueSageSlime2_Spawn, $@BlueSageSlime2_Amount; + areamonster "048-2.gat", 195, 112, 201, 118, "", 1093, $@BlueSageSlime2_Spawn, "#Slime2::OnSlimeDeath"; + end; + +OnSlimeDeath: + set $@BlueSageSlime2_Spawn, $@BlueSageSlime2_Spawn - 1; + if (mobcount("048-2.gat", "#Slime2::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime2_Spawn, 0; + + if ($@Slime2VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime2_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + set $@Slime2VictimID, 0; + end; + +L_Count: + set @spawnSlime2, @spawnSlime2 + 1; + if ($@BlueSageSlime2_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + set @spawnSlime2, 0; + message strcharinfo(0), "You don't see any slime of that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime2VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime2_Amount - @spawnSlime2) != 0) + goto L_SlimesEscaped; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageSlime2; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That had been a lot of slimes. You wonder if you're done now."; + set @slimes, 0; + goto L_Clean; +} + + +// white slimes +048-2.gat,167,79,0|script|#Slime3|32767,2,2,{ + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @spawnSlime3, 0; + + if (mobcount("048-2.gat", "#Slime3::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime3_Spawn, 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime3_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime3)) + end; + + set @chance, rand(10); + if (@chance < 3) + goto L_End; + if (@chance < 4) + goto L_BlowUp; + + set $@Slime3VictimID, getcharid(3); + donpcevent "#Slime3::OnSpawn"; + goto L_End; + +L_BlowUp: + percentheal -100, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + set @chance, 0; + set @slimes, 0; + end; + +OnSpawn: + if (attachrid($@Slime3VictimID) == 0) + goto L_Clean; + set $@BlueSageSlime3_Spawn, $@BlueSageSlime3_Amount; + areamonster "048-2.gat", 164, 76, 170, 82, "", 1093, $@BlueSageSlime3_Spawn, "#Slime3::OnSlimeDeath"; + end; + +OnSlimeDeath: + set $@BlueSageSlime3_Spawn, $@BlueSageSlime3_Spawn - 1; + if (mobcount("048-2.gat", "#Slime3::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime3_Spawn, 0; + + if ($@Slime3VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime3_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + set $@Slime3VictimID, 0; + end; + +L_Count: + set @spawnSlime3, @spawnSlime3 + 1; + if ($@BlueSageSlime3_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + set @spawnSlime3, 0; + message strcharinfo(0), "You don't see any slime of that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime3VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime3_Amount - @spawnSlime3) != 0) + goto L_SlimesEscaped; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageSlime3; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That had been a lot of slimes. You wonder if you're done now."; + set @slimes, 0; + goto L_Clean; +} + + +// blue slimes +048-2.gat,192,86,0|script|#Slime4|32767,2,2,{ + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @spawnSlime4, 0; + + if (mobcount("048-2.gat", "#Slime4::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime4_Spawn, 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime4_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime4)) + end; + + set @chance, rand(10); + if (@chance < 3) + goto L_End; + if (@chance < 4) + goto L_BlowUp; + + set $@Slime4VictimID, getcharid(3); + donpcevent "#Slime4::OnSpawn"; + goto L_End; + +L_BlowUp: + percentheal -100, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + set @chance, 0; + set @slimes, 0; + end; + +OnSpawn: + if (attachrid($@Slime4VictimID) == 0) + goto L_Clean; + set $@BlueSageSlime4_Spawn, $@BlueSageSlime4_Amount; + areamonster "048-2.gat", 189, 83, 195, 89, "", 1091, $@BlueSageSlime4_Spawn, "#Slime4::OnSlimeDeath"; + end; + +OnSlimeDeath: + set $@BlueSageSlime4_Spawn, $@BlueSageSlime4_Spawn - 1; + if (mobcount("048-2.gat", "#Slime4::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime4_Spawn, 0; + + if ($@Slime4VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime4_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + set $@Slime4VictimID, 0; + end; + +L_Count: + set @spawnSlime4, @spawnSlime4 + 1; + if ($@BlueSageSlime4_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + set @spawnSlime4, 0; + message strcharinfo(0), "You don't see any slime of that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime4VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime4_Amount - @spawnSlime4) != 0) + goto L_SlimesEscaped; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageSlime4; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That had been a lot of slimes. You wonder if you're done now."; + set @slimes, 0; + goto L_Clean; +} + + +// blue slimes +048-2.gat,183,110,0|script|#Slime5|32767,2,2,{ + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @spawnSlime5, 0; + + if (mobcount("048-2.gat", "#Slime5::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime5_Spawn, 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime5_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime5)) + end; + + set @chance, rand(10); + if (@chance < 3) + goto L_End; + if (@chance < 4) + goto L_BlowUp; + + set $@Slime5VictimID, getcharid(3); + donpcevent "#Slime5::OnSpawn"; + goto L_End; + +L_BlowUp: + percentheal -100, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + set @chance, 0; + set @slimes, 0; + end; + +OnSpawn: + if (attachrid($@Slime5VictimID) == 0) + goto L_Clean; + set $@BlueSageSlime5_Spawn, $@BlueSageSlime5_Amount; + areamonster "048-2.gat", 180, 107, 186, 113, "", 1091, $@BlueSageSlime5_Spawn, "#Slime5::OnSlimeDeath"; + end; + +OnSlimeDeath: + set $@BlueSageSlime5_Spawn, $@BlueSageSlime5_Spawn - 1; + if (mobcount("048-2.gat", "#Slime5::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime5_Spawn, 0; + + if ($@Slime5VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime5_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + set $@Slime5VictimID, 0; + end; + +L_Count: + set @spawnSlime5, @spawnSlime5 + 1; + if ($@BlueSageSlime5_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + set @spawnSlime5, 0; + message strcharinfo(0), "You don't see any slime of that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime5VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime5_Amount - @spawnSlime5) != 0) + goto L_SlimesEscaped; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageSlime5; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That had been a lot of slimes. You wonder if you're done now."; + set @slimes, 0; + goto L_Clean; +} + + +// blue slimes +048-2.gat,164,102,0|script|#Slime6|32767,2,2,{ + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + set @spawnSlime6, 0; + + if (mobcount("048-2.gat", "#Slime6::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime6_Spawn, 0; + + // if finished or haven't started yet or spawn already active or spawn already done, do nothing + if ((@slimes == 0) || ($@BlueSageSlime6_Spawn > 0) || (QUEST_BlueSage & $@Q_BlueSageSlime6)) + end; + + set @chance, rand(10); + if (@chance < 3) + goto L_End; + if (@chance < 4) + goto L_BlowUp; + + set $@Slime6VictimID, getcharid(3); + donpcevent "#Slime6::OnSpawn"; + goto L_End; + +L_BlowUp: + percentheal -100, 0; + message strcharinfo(0), "A slime dripped out of a bookshelf right in front of you and stepped onto it. It exploded. That hurt."; + goto L_End; + +L_End: + set @chance, 0; + set @slimes, 0; + end; + +OnSpawn: + if (attachrid($@Slime6VictimID) == 0) + goto L_Clean; + set $@BlueSageSlime6_Spawn, $@BlueSageSlime6_Amount; + areamonster "048-2.gat", 161, 99, 167, 105, "", 1091, $@BlueSageSlime6_Spawn, "#Slime6::OnSlimeDeath"; + end; + +OnSlimeDeath: + set $@BlueSageSlime6_Spawn, $@BlueSageSlime6_Spawn - 1; + if (mobcount("048-2.gat", "#Slime6::OnSlimeDeath") < 0) // returns -1 if no monsters + set $@BlueSageSlime6_Spawn, 0; + + if ($@Slime6VictimID == getcharid(3)) + goto L_Count; + if ($@BlueSageSlime6_Spawn == 0) + goto L_ClearedPoint; + end; + +L_Clean: + set $@Slime6VictimID, 0; + end; + +L_Count: + set @spawnSlime6, @spawnSlime6 + 1; + if ($@BlueSageSlime6_Spawn == 0) + goto L_ClearedPoint; + end; + +L_SlimesEscaped: + set @spawnSlime6, 0; + message strcharinfo(0), "You don't see any slime of that nest anymore. But did you really get all of them?"; + goto L_Clean; + +L_ClearedPoint: + if (attachrid($@Slime6VictimID) == 0) + goto L_Clean; + if (rand($@BlueSageSlime6_Amount - @spawnSlime6) != 0) + goto L_SlimesEscaped; + set QUEST_BlueSage, QUEST_BlueSage | $@Q_BlueSageSlime6; + message strcharinfo(0), "It wasn't easy, but you think that you extinguished this nest."; + + set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT); + if (@slimes == 255) + message strcharinfo(0), "That had been a lot of slimes. You wonder if you're done now."; + set @slimes, 0; + goto L_Clean; +} diff --git a/world/map/npc/048-2/visitors.txt b/world/map/npc/048-2/visitors.txt new file mode 100644 index 00000000..9d5d20ee --- /dev/null +++ b/world/map/npc/048-2/visitors.txt @@ -0,0 +1,40 @@ +// Part of Blue Sage quests +// author: Jenalya +// visitors that came to see the library and are now disappointed + +048-2.gat,46,44,0|script|Connor|150,{ + mes "[Connor]"; + mes "\"Oh, hello. There happened some big accident in the library! Most of the books were damaged or destroyed!\""; + next; + mes "\"As far as I understood it has to do with those weird slimes. They're white and blue! I never saw slimes with that color.\""; + next; + mes "\"I was so excited to get an opportunity to study some of the rare and valuable books and now this."; + mes "I'd never have expected something like this happening in a Sages household. I thought they're so powerful and wise...\""; + goto L_Close; + +L_Close: + close; +} + +048-2.gat,28,30,0|script|Parcival|153,{ + mes "[Parcival]"; + mes "\"Hello young one. Did you also come here to see the library?\""; + menu + "Nah, I'm just having a look around.",L_Close, + "Yes!",-; + mes "[Parcival]"; + mes "\"That's very commendable. But you'll be disappointed, there is some huge problem and the library is all upside down."; + mes "This is very annoying! I was planning this trip months ago and now this!\""; + mes "He sighs."; + next; + mes "[Parcival]"; + mes "\"I'll probably have to leave and come back another time. But I want to warm up first.\""; + next; + mes "\"I really wonder what they did... I can still feel some distortion in the magic pattern within this mansion. I mean, it's twisted anyway, because the Sages have their houses in a shifted dimension - that's why it is so much larger in the inside than from the outside.\""; + next; + mes "\"But there's something else... Well, I've heard about the researches being done here. Seems there's some very advanced magic involved.\""; + goto L_Close; + +L_Close: + close; +} -- cgit v1.2.3-70-g09d2