// TMW2 scripts. // Authors: // Jesusalva // TMW Org. // Description: // In charge to clear the mess // helperCleaning* + helperJanitor // Quest: NivalisQuest_BlueSageSlimes // 1: Acception state (0 - Not accepted, 1 - Accepted, 2 - Complete) // 2: Killed Slimes Control // 3: Killed Nests Control 020-7-1,50,63,6 script Pyry NPC_BLUESAGEWORKER_MB,{ function askQuestion; .@qt=getq3(NivalisQuest_BlueSageSlimes); mesn; if (.@qt == BS_SNESTALL) mesq l("It seems all of the slimes are gone now. I'm so glad! Thanks for your help. I mentioned your assistance to Nikolai."); else if (.@qt > 0) mesq l("It's very brave of you to fight against those slimes deeper in the library. Remember that you have to kill the entire group to prevent them from breeding. And do it @@!", b(l("Alone"))); else mesq l("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 were eaten by the slimes or damaged and we're working hard on cleaning up the mess."); askQuestion(); close; function askQuestion { do { .@q=getq(NivalisQuest_BlueSage); .@q2=getq2(NivalisQuest_BlueSage); .@q3=getq3(NivalisQuest_BlueSage); .@qs=BSQuestion(getq(NivalisQuest_BlueSage)); .@qo=getq(NivalisQuest_BlueSageSlimes); .@qt=getq3(NivalisQuest_BlueSageSlimes); next; mes ""; select rif(.@qt < BS_SNESTALL, "What are you doing?"), rif(.@qs & BS_QVISITOR, l("Do you know anything about the strange visitor?")), rif(.@qs & BS_QHELPER, l("What's your opinion of Peetu and his work?")), any(l("I need to leave."), l("See you."), l("Bye.")); mes ""; switch (@menu) { case 1: mesn; mesq l("Resting. I've been slaying slime nests the whole day."); next; if (.@qo) { mesn; mesq l("There are some slimes around in the deeper parts of the library. Remember to kill them alone, and beware, if they kill themselves it won't count."); } else { mesn; mesq l("Do you want to help? I promise you no reward, so you will do it of your own will."); next; if (askyesno() == ASK_YES) { mesn; mesq l("Great! Now, listen carefully: This library is laid out in nine squares."); next; mesn; mesq l("You have to kill, alone, and this means without the help of the slimes either, nine nests. One in each quadrant."); next; mesn; mesq l("Be careful when walking, because you may change quadrands and then... It won't count. You'll need to start over again."); next; mesn; mesq l("I wish you good luck!"); setq NivalisQuest_BlueSageSlimes, 1, 0, 0; } else { mesn; mesq l("Alright. Then please don't go too deep on the library, it is dangerous."); } } break; case 2: mesn; mesq l("Mh, yes. I remember him. He was very interested in the library and the research we do here. He had an unusual behaviour and appearance. But, well, that isn't a reason to refuse someone, right?"); break; case 3: mesn; mesq l("Peetu? I have always been glad to have him on the team. He's really brought forward our work here."); next; mesn; mesq l("I was very surprised when I heard that he's responsible for the failed sealing. I'd never have expected that from him."); if (!(.@q3 & .bsId)) setq3 NivalisQuest_BlueSage, .@q3 | .bsId; break; } } while (@menu != 4); close; } OnSlimeDeath: if (playerattached()) { getmapxy(.@m$, .@x, .@y, 0); // Capped at ~10% drop chance of book pages if (rand(0,10000) <= 460+(readparam(bLuck)*6)) makeitem SpellBookPage, 1, .@m$, .@x, .@y; if (rand(0,10000) <= 100) makeitem Candy, 1, .@m$, .@x, .@y; } end; OnInit: .bsId=BS_NPC06; .sex=G_MALE; .distance=5; npcsit; end; } 020-7-1,53,39,0 script Nea NPC_BLUESAGEWORKER_FA,{ function askQuestion; mesn; mesq l("Oh, hello. If I were you I wouldn't go deeper into the library. There are still some of those monsters left. Slipping between the bookshelves."); askQuestion(); close; function askQuestion { do { .@q=getq(NivalisQuest_BlueSage); .@q2=getq2(NivalisQuest_BlueSage); .@q3=getq3(NivalisQuest_BlueSage); .@qs=BSQuestion(getq(NivalisQuest_BlueSage)); .@qt=getq3(NivalisQuest_BlueSageSlimes); next; if (.@qt >= 255) { mesn; mesq l("I feel much safer now that you defeated the slimes. Thanks so much! Do you need anything else?"); } else if (.@qt) { mesn; mesq l("\"Oh, I'm so glad you're taking care of those scary slimes. You're so brave! How many of them are still left, do you think? Will it be safe to go there soon?"); } else { mesn; mesc l("She shudders."); mesq l("And they can explode! Nothing in the world could make me go in there. I'll just do my work right here, clean the floor and tidy up the books, and I'm keeping my eyes open in case they get over here."); // Cleaning the floor, aham. ¬.¬ next; mesn; mesq l("Do you need anything else?"); } mes ""; select rif(.@qt < BS_SNESTALL, ""), rif(.@qs & BS_QVISITOR, l("Do you know anything about the strange visitor?")), rif(.@qs & BS_QHELPER, l("What's your opinion of Peetu and his work?")), any(l("I need to leave."), l("See you."), l("Bye.")); mes ""; switch (@menu) { case 2: mesn; mesq l("With a mask? Mh, I think I know who are you talking about. I vaguely remember that there was someone with a mask... but I can't recall any details, I wasn't really paying attention."); close; break; case 3: mesn; mesq l("Petu? Yeah, he's the kind of person who always wants to do things perfectly. That makes it a bit difficult to work with him, since his expectations for others are as high as for himself."); next; mesn; mesq l("I really wonder how that accident could've happened. I'd have never expected him to mess something up like that."); if (!(.@q3 & .bsId)) setq3 NivalisQuest_BlueSage, .@q3 | .bsId; close; break; } } while (@menu != 4); close; } OnInit: .bsId=BS_NPC05; .sex=G_FEMALE; .distance=5; npcsit; end; } 020-7-1,79,70,0 script Arvo NPC_BLUESAGEWORKER_MA,{ function askQuestion; mesn; mesq l("Oh, this is so much work... I can't believe they let this happen! You would think they'd be careful when playing around with such powerful forces. Hah! Big mistake!"); askQuestion(); close; function askQuestion { next; if (.@qt >= 255) { mesn; mesq l("Good work with the slimes. This will make our task much easier."); next; mesn; mesc l("*sigh*"); mesq l("It appears we were focusing too much on research 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."); } else if (.@qt) { mesn; mesc l("*sighs*"); mesq l("We really appreciate your help with the slimes."); } else { mesn; mesq l("It's dangerous in the library right now, be careful. Do you need anything else?"); } // Mainframe Loop do { .@q=getq(NivalisQuest_BlueSage); .@q2=getq2(NivalisQuest_BlueSage); .@q3=getq3(NivalisQuest_BlueSage); .@qs=BSQuestion(getq(NivalisQuest_BlueSage)); .@qt=getq3(NivalisQuest_BlueSageSlimes); next; mes ""; select rif(.@qt < BS_SNESTALL, ""), rif(.@qs & BS_QVISITOR, l("Do you know anything about the strange visitor?")), rif(.@qs & BS_QHELPER, l("What's your opinion of Peetu and his work?")), any(l("I need to leave."), l("See you."), l("Bye.")); mes ""; switch (@menu) { case 2: mesn; mesq l("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 saying, though that's hard to tell with the mask."); next; mesn; mesq l("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 research and experiments. But it seems he was being rather disturbing, since they sent them back to the library part."); next; mesn; mesq l("I tried to keep an eye on 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 (!(.@q2 & .bsId)) setq2 NivalisQuest_BlueSage, .@q2 | .bsId; break; case 3: mesn; mesq l("Peetu? That's one of the high rank helpers. As far as I know, he's capable of magic and takes part in some important researches. But I don't really know about those things."); break; } } while (@menu != 4); close; } OnInit: .bsId=BS_NPC04; .sex=G_MALE; .distance=5; end; } 020-7-1,62,83,0 script Kristian NPC_BLUESAGEWORKER_MA,{ function askQuestion; mesn; mesq l("Welcome. Please don't go deeper into the library, there are still some slimes left. But in spite of that we have made quite a bit of progress. You should have seen the mess just after most of the slimes escaped!"); askQuestion(); close; function askQuestion { do { .@q=getq(NivalisQuest_BlueSage); .@q2=getq2(NivalisQuest_BlueSage); .@q3=getq3(NivalisQuest_BlueSage); .@qs=BSQuestion(getq(NivalisQuest_BlueSage)); .@qt=getq3(NivalisQuest_BlueSageSlimes); next; if (.@qt >= 255) { mesn; mesq l("I'm so glad that you took care of the remaining slimes. Thanks! Do you need anything else?"); } else if (.@qt) { mesn; mesq l("Wow, it's really generous of you to fight those slimes for us. Do you need anything else?"); } else { mesn; mesq l("Do you need anything else?"); } mes ""; select rif(.@qt < BS_SNESTALL, ""), rif(.@qs & BS_QVISITOR, l("Do you know anything about the strange visitor?")), rif(.@qs & BS_QHELPER, l("What's your opinion of Peetu and his work?")), any(l("I need to leave."), l("See you."), l("Bye.")); mes ""; switch (@menu) { case 2: mesn; mesq l("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; mesn; mesq l("But still, he can't just walk in there, fiddle with the experiments and disturb the helpers doing their work."); if (!(.@q2 & .bsId)) setq2 NivalisQuest_BlueSage, .@q2 | .bsId; break; case 3: mesn; mesq l("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."); break; } } while (@menu != 4); close; } OnInit: .bsId=BS_NPC05; .sex=G_MALE; .distance=5; end; } 020-7-1,40,78,0 script Mirjami NPC_BLUESAGEWORKER_FA,{ function askQuestion; mesn; mesq l("Where is it? Everything's upside down. These terrible slimes."); askQuestion(); close; function askQuestion { next; .@qt=getq3(NivalisQuest_BlueSageSlimes); if (.@qt >= BS_SNESTALL) { mesn; mesq l("I heard you fought the slimes that were still roaming between the bookshelves. Thank you!"); next; mesn; mesq l("I was a bit worried that they might ruin our efforts by messing everything up again after we just cleaned."); } else { mesn; mesq l("I'm just searching for some cleaning supplies. They must be somewhere around here, but everything went upside down when the slimes escaped."); } // Mainframe Loop do { .@q=getq(NivalisQuest_BlueSageSlimes); .@q2=getq2(NivalisQuest_BlueSage); .@q3=getq3(NivalisQuest_BlueSage); .@qs=BSQuestion(getq(NivalisQuest_BlueSage)); .@qt=getq3(NivalisQuest_BlueSageSlimes); next; mes ""; select rif(.@qt == BS_SNESTALL && .@q == 1, "Did you found the supplies yet?"), rif(.@qs & BS_QVISITOR, l("Do you know anything about the strange visitor?")), rif(.@qs & BS_QHELPER, l("What's your opinion of Peetu and his work?")), any(l("I need to leave."), l("See you."), l("Bye.")); mes ""; switch (@menu) { case 1: //mesq l("Not yet, blame Jesusalva, your reward was with them"); inventoryplace AlchemyBlueprintA, 1, RecipeBook, 1; mesn; mesq l("Yeah... I also found a @@. We don't need this crap, you can put it on your @@.", getitemlink(AlchemyBlueprintA), getitemlink(RecipeBook)); next; select l("Erm... I don't have a recipe book."), l("That's nice, but... I don't have a recipe book."), l("Pardon me, what is a recipe book?"); mes ""; mesn; mesq l("WHAT? Have you not gained one at birth? That's absurd!"); next; select l("Erm... I don't know my parents."), l("Maybe, but... I don't know my parents."), l("Pardon me, I don't remember my parents."); mes ""; mesn; mesq l("WHAT? That's twice absurd! Now you'll say that you were found stranded on a desert island without equipment and can't remember anything but your own name!"); next; select l("Erm... You're right."), l("Well... You're right."), l("How did you guess that?"); mes ""; mesn; mesq l("... ... ..."); next; mesn; mesq l("...Okay, this is not fun anymore."); next; mesn; mesq l("Here, you can take mine. I don't mind. Just be sure to don't lose it, you will NEVER get another copy EVER again, was I clear?!"); getitem AlchemyBlueprintA, 1; getitem RecipeBook, 1; setq1 NivalisQuest_BlueSageSlimes, 2; next; mesn; mesq l("You can be thankful later. Aren't you excited to see what exactly was on that blueprint? Go on, enjoy it! %%G"); break; case 2: mesn; mesq l("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 research. I suppose that's ok, but he didn't keep his hands to himself, and touched some experiments and I caught him near some storage racks."); next; mesn; mesq l("Visitors should keep away from those!"); if (!(.@q2 & .bsId)) setq2 NivalisQuest_BlueSage, .@q2 | .bsId; break; case 3: mesn; mesq l("Oh, eh, why are you asking me? I've only been here a short while and don't really know all of the people well enough yet."); break; } } while (@menu != 4); close; } OnInit: .bsId=BS_NPC06; .sex=G_FEMALE; .distance=5; end; }