diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/001-1_Tulimshar/children.txt | 32 | ||||
-rw-r--r-- | npc/001-1_Tulimshar/elanore.txt | 178 | ||||
-rw-r--r-- | npc/002-3_Desert_mines/miners.txt | 10 | ||||
-rw-r--r-- | npc/008-1_Hurnscald_outskirts/hinnak.txt | 131 | ||||
-rw-r--r-- | npc/009-3_Cave_beneath_Hurnscald/sword.txt | 126 | ||||
-rw-r--r-- | npc/011-1_Woodland/alchemist.txt | 71 | ||||
-rw-r--r-- | npc/011-1_Woodland/auldsbel.txt | 89 | ||||
-rw-r--r-- | npc/012-1_Woodland_Hills/injured-mouboo.txt | 17 | ||||
-rw-r--r-- | npc/013-1_Woodland_hills/sagatha.txt | 101 | ||||
-rw-r--r-- | npc/015-1_Woodland/sword.txt | 155 | ||||
-rw-r--r-- | npc/functions/mob_points.txt | 35 |
11 files changed, 911 insertions, 34 deletions
diff --git a/npc/001-1_Tulimshar/children.txt b/npc/001-1_Tulimshar/children.txt index e68cfe95..e2771cf0 100644 --- a/npc/001-1_Tulimshar/children.txt +++ b/npc/001-1_Tulimshar/children.txt @@ -54,7 +54,8 @@ L_8: } 001-1.gat,39,67,0 script Nina 103,{ - set @TEMP,rand(8); + mes "[Nina]"; + set @TEMP,rand(10); if(@TEMP == 0) goto L_1; if(@TEMP == 1) goto L_1; if(@TEMP == 2) goto L_2; @@ -64,44 +65,55 @@ L_8: if(@TEMP == 6) goto L_6; if(@TEMP == 7) goto L_7; if(@TEMP == 8) goto L_8; + goto L_9; L_1: - mes "[Nina]"; mes "\"If I learned anything from school, Grenxen founded Tulimshar.\""; close; L_2: - mes "[Nina]"; mes "\"When I was picking rocks from the field, I saw a red scorpion.\""; close; L_3: - mes "[Nina]"; mes "\"Its polite to state your name before talking to anyone.\""; close; L_4: - mes "[Nina]"; + mes "\"I have a Scorpion Doll!\""; close; L_5: - mes "[Nina]"; mes "\"I always take some spare Cactus Juices with me on the field. They are heavy, though.\""; close; L_6: - mes "[Nina]"; mes "\"When you are feeling bad, eating something can usually help you heal faster.\""; close; L_7: - mes "[Nina]"; mes "\"Grenxen is the Demon that founded Tulimshar.\""; close; L_8: - mes "[Nina]"; - mes "That volcano eruption was terrifying; much of Tulimshar was destroyed. Fortunately the mayor had everything rebuilt quickly."; + mes "\"That volcano eruption was scary; much of Tulimshar was destroyed. But the mayor had everything rebuilt quickly.\""; close; + +L_9: + mes "\"I know a bad word, but I promised my mom that I wouldn't tell anyone.\""; + menu "That's good. You shouldn't tell such things.", -, + "What's that bad word?", L_badword; + +L_badword + mes "[Nina]"; + mes "She looks around nervously, then motions you to come closer."; + mes "\"It's '" + getspellinvocation("aggravate") + "', she whispers in your ear.\""; + next; + + mes "[Nina]"; + mes "Terrified, she looks around once more."; + mes "\"But you mustn't tell anyone!\""; + next; + close; } diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 99d52b3f..fabb0e24 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -4,6 +4,26 @@ set @has_magic, getskilllv(SKILL_MAGIC); + set @Q_MASK, NIBBLE_5_MASK; + set @Q_SHIFT, NIBBLE_5_SHIFT; + + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + set @Q_heal_exp, MAGIC_EXPERIENCE >> 24; + + set @BUGLEG, 518; + set @MAGGOTSLIME, 505; + set @MAUVE, 680; + set @GAMBOGE, 681; + set @COBALT, 682; + set @ALIZARIN, 683; + set @LIFESTONE, 730; + + set @STATUS_INITIAL, 0; + set @STATUS_LEARNED_LIGHT_HEAL, 1; + set @STATUS_MASTERED_LIGHT_HEAL, 2; + set @STATUS_LEARNED_LAY_ON_HANDS, 3; + + if (baselevel > 10) goto L_NoHeal; set @TEMP,rand(4); @@ -96,21 +116,171 @@ L_Chat: mes "\"Hello! Can I help you?\""; next; L_Main: - if (@has_magic) + if (@has_magic && (@Q_status == @STATUS_INITIAL)) menu "Can you heal me?", L_NoHealMessage, "Can you teach me magic?", L_Teach, "What do you know about...", L_Question; + if (@has_magic && (@Q_status > @STATUS_INITIAL)) + menu + "Can you heal me?", L_NoHealMessage, + "Can you teach me more?", L_Teach, + "Where can I get more lifestones?, L_Lifestones, + "What do you know about...", L_Question; + if (!@has_magic) menu "Can you heal me?", L_NoHealMessage, "What do you know about...", L_Question; close; +OnPCKillEvent: + attachrid(@killerrid); + set @Q_heal_exp, MAGIC_EXPERIENCE >> 24; + if (@Q_heal_exp < 8) + goto L_OnPcKillWipe; + @Q_heal_exp = @Q_heal_exp - 8; + goto L_OnPcKillFinish; +L_OnPcKillWipe: + @Q_heal_exp = 0; +L_OnPcKillFinish: + set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24); + close; + +L_Lifestones: + mes "[Elanore the Healer]"; + mes "\"I always need components for my own healing spells. If you bring me ten gamboge leaves, ten alizarin leaves, ten mauve leaves and ten cobalt leaves, I can make ten lifestones; I will give you half of them.\""; + next; + + menu + "OK, I will get them.", -, + "No way!", -, + "Here you are!", L_Lifestones_Trade, + "Can I make them myself?", L_Lifestones_MakeSelf; + close; + +L_Lifestones_Trade: + if (countitem(@MAUVE) < 10) goto L_Lifestones_Trade_Missing; + if (countitem(@GAMBOGE) < 10) goto L_Lifestones_Trade_Missing; + if (countitem(@ALIZARIN) < 10) goto L_Lifestones_Trade_Missing; + if (countitem(@COBALT) < 10) goto L_Lifestones_Trade_Missing; + getinventorylist; + if (@inventorylist_count == 100 && countitem(@LIFESTONE) == 0 + && countitem(@MAUVE) > 10 + && countitem(@GAMBOGE) > 10 + && countitem(@ALIZARIN) > 10 + && countitem(@COBALT) > 10) goto L_Lifestones_NoRoom; + + delitem @MAUVE, 10; + delitem @GAMBOGE, 10; + delitem @ALIZARIN, 10; + delitem @COBALT, 10; + getitem @LIFESTONE, 5; + getexp 200, 1; + mes "[Elanore the Healer]"; + mes "Elanore carefully goes over your leaves, then smiles."; + mes "\"These will do just fine.\"; + mes "She picks up all fourty and presses them together in her hands, then whispers something.\""; + next; + mes "[Elanore the Healer]"; + mes "As she opens her hands again, the leaves have turned into ten golden crystals."; + mes "\"Five for you and five for me.\""; + mes "She smiles."; + mes "[200 experience points]"; + next; + close; + +L_Lifestones_NoRoom: + mes "[Elanore the Healer]"; + mes "\"Oh... it seems that you have no room for the lifestones. But please do come back later when you have made a little space.\""; + next; + close; + +L_Lifestones_Trade_Missing: + mes "[Elanore the Healer]"; + mes "Elanore counts the leaves you show her."; + mes "\"No, I am sorry. Please bring me ten leaves each of gamboge, alizarin, mauve, and cobalt.\""; + next; + close; + +L_Lifestones_MakeSelf: + mes "[Elanore the Healer]"; + if (@has_magic >= 2) + mes "\"Oh, but of course! You are powerful enough to make your own lifestones, using the enchantment '" + getspellinvocation("enchant-lifestone") + "'. This will consume a bug leg or a maggot slime or one of each of the four healing herbs, though.\""; + if (@has_magic < 2) + mes "\"No, you are not powerful enough yet. Please come back and ask me again when you have learned to control more powerful magic, though!.\""; + next; + close; + L_Teach: + if (@Q_status == @STATUS_INITIAL) goto L_Teach_Initial; + if (@Q_status == @STATUS_LEARNED_LIGHT_HEAL) goto L_Teach_CheckAdvanceTo2; + if (@Q_status == @STATUS_MASTERED_LIGHT_HEAL) goto L_Teach_CheckAdvanceToLOH; + //if (@Q_status == @STATUS_LEARNED_LAY_ON_HANDS) goto L_Teach_CheckAdvanceTo3; // not done yet. :-) + + mes "[Elanore the Healer]"; + mes "\"You have made good progress, but you lack the magical power to advance further. Also, I would like to observe you some more to be certain that you will make a good healer.\""; + next; + close; + +L_Teach_Initial: + mes "[Elanore the Healer]"; + mes "\"I will only teach you magic of the school of Life, and that only if you prove yourself to be a good healer-- that is, if you use your powers to help others.\""; + mes "She hesistates."; + next; + mes "[Elanore the Healer]"; + mes "\"I don't know you very well, but I don't think that there is any harm in teaching you a simple spell.\""; + mes "She reaches inside her satchel and pulls out a piece of crystal, glittering in the sun."; + mes "\"This here is a lifestone, life energy encased in a crystal shell. You will need it for most healing magic.\""; + next; + mes "[Elanore the Healer]"; + mes "\"To heal someone, first locate the injury. As a beginner, you have to touch the wound; with practice, it will be enough to think about it. Hold the lifestone in one hand, touching the wound with the other.\""; + mes "\"Then say, '" + getspellinvocation("lesser-heal") + "', followed by the name of the one you wish to heal.\""; + next; + mes "[Elanore the Healer]"; + mes "\"You might want to write that down, actually. In fact, you might want to make sure to keep notes of all spells you hear, for you never now if you will hear them again!\""; + mes "\"The invocation was '" + getspellinvocation("lesser-heal") + "'.\""; + next; + mes "[Elanore the Healer]"; + mes "\"This will only cure cuts and bruises, though, and it will take some time to take effect. It will be useless to mend broken bones or more severe injuries!\""; + mes "\"To heal yourself, it's enough to just say '" + getspellinvocation("lesser-heal") + "' by itself.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Let me give you a lifestone to get started with.\""; + next; + + getinventorylist; + if (@inventorylist_count == 100 && countitem(@LIFESTONE) == 0) + goto L_Teach_Initial_Noroom; + + getitem @LIFESTONE, 1; + set @Q_status, @STATUS_LEARNED_LIGHT_HEAL; + callsub S_update_var; + + mes "[Elanore the Healer]"; + mes "Elanore hands you the crystal."; + mes "\"Here you are. I hope that it will allow you to do good!\""; + next; + close; + +L_Teach_Initial_Noroom: + mes "[Elanore the Healer]"; + mes "\"Oh... you managed to put things into every little nook and pocket, haven't you? Well, come back later, I will give it to you then.\""; close; +L_Teach_CheckAdvanceTo2: + close; +L_Teach_CheckAdvanceToLOH: + close; + +L_NoMagicNoTeach: + mes "[Elanore the Healer]"; + mes "Elanore shakes her head."; + mes "\"I am sorry, but you don't have any magical abilities. I can only teach those who already have the power to do magic.\""; + next; + goto L_Main; + L_Question: set @QQ_MANAPOTION, 1; set @QQ_MANASEED, 2; @@ -214,6 +384,10 @@ L_Q_auldsbel: goto L_Main; - +S_update_var: + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; } diff --git a/npc/002-3_Desert_mines/miners.txt b/npc/002-3_Desert_mines/miners.txt index 2ee99b26..7f120598 100644 --- a/npc/002-3_Desert_mines/miners.txt +++ b/npc/002-3_Desert_mines/miners.txt @@ -2,16 +2,24 @@ 002-3.gat,35,35,6 script Nathan 109,{ mes "[Nathan the Miner]"; + + if (getskilllv(SKILL_MAGIC)) + goto L_message; + mes "\"It's very dangerous in here."; mes "We had a big earthquake here"; mes "just recently, too... so be"; mes "careful!\""; close; + +L_message: + mes "\"We found a good way to carry our ores out of here safely: one of us always runs ahead shouting '" + getspellinvocation("aggravate") + "'. Somehow this seems to distract the monsters.\""; + close; } 002-3-1.gat,85,97,6 script Naem 109,{ mes "[Naem the Miner]"; mes "\"We discovered an underground palace."; - mes "You can get there using the passage ont he left.\""; + mes "You can get there using the passage on the left.\""; close; } diff --git a/npc/008-1_Hurnscald_outskirts/hinnak.txt b/npc/008-1_Hurnscald_outskirts/hinnak.txt index ce0af655..96e6e145 100644 --- a/npc/008-1_Hurnscald_outskirts/hinnak.txt +++ b/npc/008-1_Hurnscald_outskirts/hinnak.txt @@ -86,8 +86,135 @@ L_Exchange_TooMany: L_ThanksAgain: mes "[Farmer Hinnak]"; - mes "\"Thanks again for helping me with the pinkies.\""; - close; + mes "\"Good to see you again, and thanks again for helping me with the pinkies!\""; + + set @BEER, 539; + + next; + + menu + "Sure, any time!", -, + "Anything else you want me to do?", -, + "You're welcome. Bye!", L_Bye; + + mes "[Farmer Hinnak]"; + mes "\"Actually, it's been a long day. If it's no trouble, could you get me a beer?\""; + next; + + menu + "Here you are.", L_GiveBeer, + "Sure, I'll go get one. Bye!", L_Bye, + "You shouldn't drink while working!", -; + + mes "[Farmer Hinnak]"; + mes "\"Well, I'm done for the day...\"; + + menu + "Sorry... here you are.", L_GiveBeer, + "I don't have any.", L_NoBeer; + +L_GiveBeer: + if (countitem(@BEER) < 0) goto L_NoBeer; + delitem @BEER, 1; + mes "[Farmer Hinnak]"; + mes "Hinnak takes a sip."; + mes "\"Aaah! Nothing like a well-deserved beer after a long day of tending the crops!\""; + mes "\"Thanks, that was very kind of you!\""; + next; + + mes "[Farmer Hinnak]"; + mes "He takes another sip."; + mes "\"Thanks! You know, I had the strangest thing happen to me. I had this patch of ground that was really clumpy; lots of clay, you see.\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"Right over there.\""; + mes "He points to a stretch of soft, raked ground."; + mes "\"Looks much better now, doesn't it? But how I got there is kind-a scary...\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"I'd been trying to break it up for a while, but that kind of work is a pain. So my wife said that I should go and see the witch, just in case she knows something.\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"And sure enough I ask the witch, and she has a look at it. 'Nothing I can do', she says, 'but I can ask a friend'.\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"So the next day another witch shows up. Gorgeous woman, but when she looked at me, the scares went scuttling down my spine....\""; + mes "\"First thing she asked was if I'm a farmer. Said her friend had told her that I needed help.\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"I show her what the problem is, and she tells me to go inside and wait.\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"Hinnak drains his beer in one long sip, then hesitates."; + next; + + mes "[Farmer Hinnak]"; + mes "\"So I go inside. I've barely entered when it starts raining outside, pouring cats and mouboos!\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"Not so weird, perhaps, except that it had been bright and sunny just a second before! So I rush out, my wife telling me to leave her alone, and I see that witch standing there in the middle of the rain...\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"None of the raindrops touched her, as if they was afraid!\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"Then she yells out some gobbledygood word, and out of the ground there comes a swarm of maggots, crawling and digging and climbing over each other's backs...\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"And then she turns to me! Seeing her stare, for a moment there I think that she'll turn me into a pinkie, for sure...\""; + next; + + mes "[Farmer Hinnak]"; + mes "\"But all she says is, 'if you'd stayed inside, you wouldn't be wet now'.\""; + next; + + next + "Hahaha!", L_Sagatha_hahaha, + "Whoah, scary...", L_Sagatha_scary, + "What was that gobbledygood word?", L_Sagatha_word, + "I better go now.", -; + goto L_Bye; + +L_Sagatha_hahaha: + mes "[Farmer Hinnak]"; + mes "\"Yeah, funny now... But you should've seen that stare! Ah, well, never mind.\""; + next; + close + +L_Sagatha_scary: + mes "[Farmer Hinnak]"; + mes "\"Yeah, you could say that...\""; + mes "He stares into his empty beer jug, as if hoping for it to re-fill by magic."; + next; + close + +L_Sagatha_word: + mes "[Farmer Hinnak]"; + mes "\"Oh, I can be sure... but something like '" + getspellinvocation("summon-maggots") + "', I think.\""; + next; + close + +L_NoBeer: + mes "[Farmer Hinnak]"; + mes "\"Ah... no beer? Oh well.\""; + next; + close; + +L_Bye: + mes "[Farmer Hinnak]"; + mes "\"Bye!\""; + next; + close; L_NohMask: menu diff --git a/npc/009-3_Cave_beneath_Hurnscald/sword.txt b/npc/009-3_Cave_beneath_Hurnscald/sword.txt new file mode 100644 index 00000000..a99c4a6b --- /dev/null +++ b/npc/009-3_Cave_beneath_Hurnscald/sword.txt @@ -0,0 +1,126 @@ +009-3.gat,26,100,0 script #MysticSword#_M 127,{ + if (getskilllv(SKILL_MAGIC)) + goto L_message; + close; + +L_message: + set @Q_MASK, NIBBLE_6_MASK; + set @Q_SHIFT, NIBBLE_6_SHIFT; + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + set @STATUS_INITIAL, 0; + set @STATUS_LEARNED_FLAREDART, 1; + set @STATUS_LEARNED_MAGICBLADE, 2; + + if (@Q_status == @STATUS_INITIAL) goto L_Initial; + if (@Q_status == @STATUS_LEARNED_FLAREDART) goto L_PostFlareDart; + if (@Q_status == @STATUS_LEARNED_MAGICBLADE) goto L_PostMagicBlade; + + mes "[Mystic Sword]"; + mes "Come back when thou art stronger."; + next; + close; + +L_Initial: + mes "[Mystic Sword]"; + mes "As you look at the sword, you suddenly hear a voice in your head!"; + mes "\"Welcome to my prison, mortal!\""; + next; + + mes "[Mystic Sword]"; + mes "Well, either you are going mad, or that sword in the stone is talking to you."; + next; + + mes "[Mystic Sword]"; + mes "Or, well, both."; + next; + + mes "[Mystic Sword]"; + mes "The deep basso voice continues."; + mes "\"I know not what brought thee hither, but I kindly ask that you leave me alone in my sorrow.\""; + next; + + menu + "Leave", L_Close, + "Sorry.", -, + "Who or what are you?", -, + "What sorrow?", -, + "Can I help?", -, + "Can you teach me magic?", -; + + mes "[Mystic Sword]"; + mes "There is no answer."; + next; + close; + +L_PostFlareDart: + mes "[Mystic Sword]"; + mes "As you look at the sword, you hear a deep voice resounding in your head."; + mes "\"Welcome, mortal!\""; + next; + + mes + "Hi! How are you?", L_PostFlareDart_hi, + "Can you teach me magic?", L_PostFlareDart_teach, + "Your sister sent me.", L_PostFlareDart_sister, + "Bye!", -; + close; + +L_PostFlareDart_hi: + mes "[Mystic Sword]"; + mes "\"Mortal... I have seen pain and death beyond thine reckoning! Mock me not with thine idle questions!\""; + next; + close; + +L_PostFlareDart_sister: + mes "[Mystic Sword]"; + mes "\"My sister...? Alas! I remember now; abandoned she was, just as I; buried in stone, never to be wielded again.\""; + mes "\"Wherefore did she send thee?\""; + next; + + menu "She asked me to ask you to teach me a spell.", -; + +L_PostFlareDart_teach: + mes "[Mystic Sword]"; + mes "\"Beware, mortal... the only spells I can teach thee are those of the school of war. Dark and dreary spells, that lot! Pain and misery is all they bring...\""; + next; + + mes "[Mystic Sword]"; + mes "The sword's voice is growing apprehensive."; + mes "\"Once a spell has been learned, it cannot be taken back, no more than a death can be undone. So be careful, mortal... dost thou truly wish to know the secrets of thus destructive power?\""; + next; + + menu + "Yes.", -, + "No.", L_Close; + + mes "[Mystic Sword]"; + mes "\"So thou art bound to the path of War, as am I, as is my sister...\""; + next; + + mes "[Mystic Sword]"; + mes "\"So be it, fellow warrior. Hear the incantation for the blade spell: '" + getspellinvocation("magic-blade") + "'\""; + mes "\"Hold a knife, sharp or regular, when you speak it.\""; + set @Q_status, @STATUS_LEARNED_MAGICBLADE; + callsub S_update_var; + next; + + mes "[Mystic Sword]"; + mes "\"But beware... the path of war that thou hast embarked upon is one from which few return. May luck be on your side...\""; + next; + close; + +L_PostFlareDart_teach: + mes "[Mystic Sword]"; + mes "\"Seek out my sister, and leave me alone in my sorrows.\""; + next; + +L_Close: + close; + +S_update_var: + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/011-1_Woodland/alchemist.txt b/npc/011-1_Woodland/alchemist.txt index 0c1e7663..8ce50f06 100644 --- a/npc/011-1_Woodland/alchemist.txt +++ b/npc/011-1_Woodland/alchemist.txt @@ -9,6 +9,7 @@ set @Q_MASK, NIBBLE_3_MASK; set @Q_SHIFT, NIBBLE_3_SHIFT; + set @wants_sulphur, (QUEST_MAGIC & NIBBLE_6_MASK); set @Q_status, (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT; // End of Setzer quest/monster oil quest participation @@ -23,6 +24,8 @@ set @MANAPOTION, 705; set @ORE, 640; set @MAGGOTSLIME, 505; + set @SULPHUR, 703; + set @IRONPOWDER, 704; set @QUEST_CAN_GET_DYE_HERE, 2; set @QUEST_HAS_SOLVED_DYE_PUZZLE, 3; @@ -34,7 +37,8 @@ set @CHOICE_DYE, 3; set @CHOICE_MONSTER_OIL, 4; set @CHOICE_MANA_POTION, 5; - set @CHOICE_ABORT, 6; + set @CHOICE_SULPHUR_POWDER, 6; + set @CHOICE_ABORT, 7; setarray @menuitems$, "", "", "", "", "", ""; set @c, 0; @@ -81,13 +85,20 @@ L_skip_introducing: set @c, @c + 1; goto L_certain_condition; - L_pre_dyeing: + set @menuitems$[@c], "Actually, can you make dye?"; set @menuID[@c], @CHOICE_DYEING_INTRO; set @c, @c + 1; - L_certain_condition: + + if (!@wants_sulphur) + goto L_post_sulphur_option; + set @menuitems$[@c], "Can you make sulphur powder?"; + set @menuID[@c], @CHOICE_SULPHUR; + set @c, @c + 1; +L_post_sulphur_option; + if (@Q_status == @SETZER_INITIAL) goto L_main_menu; set @menuitems$[@c], "Can you make monster oil?"; @@ -104,8 +115,9 @@ L_main_menu: @menuitems$[1], -, @menuitems$[2], -, @menuitems$[3], -, - @menuitems$[4], -; - @menuitems$[5], -; + @menuitems$[4], -, + @menuitems$[5], -, + @menuitems$[6], -; set @menu, @menu - 1; @@ -116,8 +128,57 @@ L_main_menu: if (@menuID[@menu] == @CHOICE_DYE) goto L_pick_colour; if (@menuID[@menu] == @CHOICE_MONSTER_OIL) goto L_monster_oil; if (@menuID[@menu] == @CHOICE_MANA_POTION) goto L_mana_potion; + if (@menuID[@menu] == @CHOICE_SULPHUR) goto L_sulphur; if (@menuID[@menu] == @CHOICE_ABORT) goto L_abort; +L_sulphur: + mes "[Rauk the Alchemist]"; + mes "\"Oh, that is easy. Bring me three piles of volcanic ash and three mauve leaves, and I will extract twelve piles of sulphur ash for you.\""; + next; + menu + "I will be back.", L_abort, + "No, I won't!", L_abort, + "Here you are!", -; + + if (countitem(@ASH) < 3) goto L_sulphur_noash; + if (countitem(@MAUVE) < 3) goto L_sulphur_nomauve; + getinventorylist; + if (@inventorylist_count == 100 + && countitem(@SULPHUR) == 0 + && countitem(@ASH) > 3 + && countitem(@MAUVE) > 3) + goto L_sulphur_nospace; + + delitem @ASH, 3; + delitem @MAUVE, 3; + getitem @SULPHUR, 12; + mes "[Rauk the Alchemist]"; + mes "You watch Rauk burn the mauve leaves in the midst of the ashes. He then dissolves the result and pours it through a filter, finally heating up the residual liquid."; + next; + mes "[Rauk the Alchemist]"; + mes "The water having evaporated, only some yellow powder is left over. Rauk carefully pours it into your hand."; + mes "\"This should be precisely twelve half-ounces of sulphur powder.\""; + next; + close; + +L_sulphur_noash: + mes "[Rauk the Alchemist]"; + mes "\"You don't seem to have all three piles of volcanic ash.\""; + next; + close; + +L_sulphur_nomauve: + mes "[Rauk the Alchemist]"; + mes "\"You don't seem to have the three mauve leaves I asked for.\""; + next; + close; + +L_sulphur_nospace: + mes "[Rauk the Alchemist]"; + mes "\"Oh dear. You don't seem to be able to carry the sulphur powder.\""; + next; + close; + L_mana_potion: mes "[Rauk the Alchemist]"; mes "\"Humh... I do believe that I have a recipe somewhere. One moment...\""; diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index b632edf4..30124d79 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -24,9 +24,15 @@ set @MOUNTAIN_SNAKE_TONGUE, 711; set @GRASS_SNAKE_TONGUE, 712; set @MAGGOT_SLIME, 505; + set @ASH, 701; + set @SULPHUR, 703; + set @IRONPOWDER, 704; set @Q_STATUS_INITIAL, 0; set @Q_STATUS_POSTINTRO, 1; + set @Q_STATUS_INITIATION, 2; // quest for being able to cast `create mouboo figurine' + + set @Q_wants_sulphur, (QUEST_MAGIC & NIBBLE_6_MASK); set @Q_MASK, NIBBLE_0_MASK | NIBBLE_1_MASK; set @Q_SHIFT, NIBBLE_0_SHIFT; @@ -129,7 +135,7 @@ L_intro_who_are_you: mes "[Robed Man]"; mes "\"Oh, oh my... of course you wouldn't know me, being from the countryside and all.\""; mes "He laughs."; - mes "\"Well, my young friend, I am none other than Auldsbel the Mostly Grayish, of the Council of Transmuters!\""; + mes "\"Well, my young friend, I am none other than Auldsbel the Graying, of the Council of Transmuters!\""; next; set @Q_main_status, @Q_STATUS_POSTINTRO; @@ -160,7 +166,16 @@ L_main_menu: close; L_main_menu_magic: - menu "How does magic work?", L_about_magic, + if (@wants_sulphur) + menu "How does magic work?", L_about_magic, + "Can you teach me a spell?", L_learn_spell, + "Where are you from?", L_about_auldsbel, + "Do you need help with your experiments?", L_quest, + "What do you know about...", L_question, + "Can you make sulphur powder?", L_sulphur, + "Goodbye.", -; + if (!@wants_sulphur) + menu "How does magic work?", L_about_magic, "Can you teach me a spell?", L_learn_spell, "Where are you from?", L_about_auldsbel, "Do you need help with your experiments?", L_quest, @@ -168,6 +183,54 @@ L_main_menu_magic: "Goodbye.", -; close; +L_sulphur: + mes "[Auldsbel the Wizard]"; + set @cost, 400 - (@component_quest * 30); + mes "\"Sulphur powder? Ah, so we have picked up a little offensive magic, haven't we? Good thinking, good thinking. And yes, of course I can transmute volcanic ashes into sulphur powder at a ratio of 1:5, for a mere " + @cost + " GP.\""; + next; + menu + "No, thank you.", -, + "I will see what I can find.", -, + "Here you are.", L_sulphur_buy; + close; + +L_sulphur_buy: + if (zeny < @cost) + goto L_sulphur_nozeny; + if (countitem(@ASH) < 1) + goto L_sulphur_noash; + getinventorylist; + if (@inventorylist_count == 100 + && countitem(@SULPHUR) > 1 + && countitem(@ASH) == 0) + goto L_sulphur_noroom; + + set zeny, zeny - @cost; + delitem @ASH, 1; + getitem @SULPHUR, 1; + mes "[Auldsbel the Wizard]"; + next "\"I shall transmute it later. Here, have five half-ounces from my own stock.\""; + next; + goto L_main_menu; + +L_sulphur_nozeny: + mes "[Auldsbel the Wizard]"; + next "\"No GP, no service.\""; + next; + goto L_main_menu; + +L_sulphur_noash: + mes "[Auldsbel the Wizard]"; + next "\"Without volcanic ash, I can't give you any sulphur powder. Try hunting some fire goblins, or somesuch.\""; + next; + goto L_main_menu; + +L_sulphur_noroom: + mes "[Auldsbel the Wizard]"; + next "\"Hmm, you really managed to squeeze something into every little place you had that we could have stored the powder in... you might want to return once you have resolved this matter.\""; + next; + close; + L_about_magic: mes "[Auldsbel the Wizard]"; mes "\"Magic is a universal force that comes from within; only few individuals have the power to channel and manipulate it. Most magic users resort to spells-- prefabricated invocations-- to access and control their magical power.\""; @@ -831,7 +894,29 @@ L_component_quest_missing: goto L_main_menu; L_learn_spell: + if (@Q_main_status == @Q_STATUS_INITIATION) goto LL_initiation; + + mes "[Auldsbel the Wizard]"; + mes "\"Wellll.... you do seem to have some magical abilities. But do you possess the talent and diligence needed for a true wizard?\""; + mes "He raises an eyebrow at you, then grins."; + mes "\"Only one way to find out! Let me teach you a first spell.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"This spell is a simple transmutation invocation. All it takes is a clean wooden log. Hold it in your hand, focus your powers, and say the magic invocation.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"You can turn the log into a wooden figurine by saying 'kular' followed by the last syllable of the name of the creature you want to shape it as. And mind you, that syllable has to be from the Old-Tritan name...\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"Oh, actually, make sure to write that down. You should keep track of all spells and spell fragments, really. I always keep a notebook handy, in fact.\""; + next; + set @Q_main_status, @Q_STATUS_INITIATION; + callsub S_update_var; + goto L_main_menu; + +LL_initiation: mes "[Auldsbel the Wizard]"; + mes "\"So, have you managed to transmute something?\""; next; goto L_main_menu; diff --git a/npc/012-1_Woodland_Hills/injured-mouboo.txt b/npc/012-1_Woodland_Hills/injured-mouboo.txt index d6c536f2..c017a35a 100644 --- a/npc/012-1_Woodland_Hills/injured-mouboo.txt +++ b/npc/012-1_Woodland_Hills/injured-mouboo.txt @@ -26,6 +26,9 @@ function script QuestMoubooHeal { mes "[Injured Mouboo]"; mes "Visibly happy, the mouboo lies down on the ground and snuggles with a black piece of cloth it had been lying on."; mes "The healing process must have been exhausting, for it is asleep in an instant."; + next; + set @value, 15; + callfunc "QuestSagathaHappy"; close; L_nothing: @@ -56,11 +59,11 @@ S_update_var: set @STATE_TOOK_KILL_REWARD, 2; set @STATE_HEALED_MOUBOO, 3; - if (@Q_status = @STATE_KILLED_MOUBOO) + if (@Q_status == @STATE_KILLED_MOUBOO) goto L_dead; - if (@Q_status = @STATE_TOOK_KILL_REWARD) + if (@Q_status == @STATE_TOOK_KILL_REWARD) goto L_took_reward; - if (@Q_status = @STATE_HEALED_MOUBOO) + if (@Q_status == @STATE_HEALED_MOUBOO) goto L_healed; mes "[Injured Mouboo]"; @@ -90,7 +93,7 @@ L_examine: L_pickup_alive: mes "[Injured Mouboo]"; - mes "The Mouboo groans and pushes your hand away. It seems to be rather fond of the sweater." + mes "The Mouboo groans and pushes your hand away. It seems to be rather fond of the sweater."; next; goto L_menu; @@ -136,8 +139,8 @@ L_nloop_skip: @choice$[11], -; set @menu, @menu - 1; - set @choice = @choice_idx[@menu]; - set @choice_e = @choice_eat[@menu]; + set @choice, @choice_idx[@menu]; + set @choice_e, @choice_eat[@menu]; set @verb$, "drinks"; if (@choice_e) set @verb$, "eats"; @@ -213,7 +216,7 @@ L_nopickup: next; close; -L_healed; +L_healed: mes "[Mouboo]"; mes "The mouboo is sleeping soundly, smiling in its dreams."; next; diff --git a/npc/013-1_Woodland_hills/sagatha.txt b/npc/013-1_Woodland_hills/sagatha.txt index 4295043a..a0b1c1b8 100644 --- a/npc/013-1_Woodland_hills/sagatha.txt +++ b/npc/013-1_Woodland_hills/sagatha.txt @@ -1,7 +1,102 @@ +// Sagatha the witch, expert for nature and ether magic +//---------------------------------------- + +function script QuestSagathaHappy { + set @unhappiness, (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + if (@unhappiness < @value) + goto L_zero; + + set @unhappiness, @unhappiness - @value; + goto L_write; + +L_zero: + set @unhappiness, 0; + +L_write: + set QUEST_MAGIC, (QUEST_MAGIC & ~NIBBLE_3_MASK) | (@unhappiness << NIBBLE_3_SHIFT); +} + +//---------------------------------------- +function script QuestSagathaAnnoy { + set @unhappiness, (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + if ((@unhappiness + @value) > 15) + goto L_max; + + set @unhappiness, @unhappiness + @value; + goto L_write; + +L_max: + set @unhappiness, 15; + +L_write: + set QUEST_MAGIC, (QUEST_MAGIC & ~NIBBLE_3_MASK) | (@unhappiness << NIBBLE_3_SHIFT); +} + + +//---------------------------------------- 013-1.gat,131,24,0 script Sagatha#_M 167,{ set @has_magic, getskilllv(SKILL_MAGIC); + set @evil, 0; + set @good, 0; + set @unhappy, (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + + set @Q_MASK, NIBBLE_4_MASK; + set @Q_SHIFT, NIBBLE_4_SHIFT; + + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + + if (MAGIC_FLAGS & FLAG_DID_CUTTREE) + set @evil, 1; + + set @mouboo, ((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 3; + + if (@mouboo == 3) + set @good, @good + 1; + if (@mouboo == 2) + set @evil, 1; + if (@mouboo == 1) + set @evil, 1; + + set @druid, (((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 12) >> 2; + if (@druid == 3) + set @good, @good + 1; + + if (MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA) + mes "[Sagatha the Witch]"; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) + mes "[Witch]"; + + if (@evil) + goto L_evil; + + if (@unhappy > 10) + goto L_unhappy; + + mes "Before you stands a beautiful woman, dressed in dark purple robes and wearing a witch's hat."; + mes "At first glance, "; + if (Sex) + mes "She looks at you suspiciously."; + if (!Sex) + mes "She looks at you impassively."; + next; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_SAGATHA; +L_evil: + mes "The witch's eyes flare up in anger as she notices you, and she turns away from you."; + mes "Whatever the reason, she doesn't seem to like you."; + next; + close; + +L_unhappy: + mes "The witch glares at you in anger."; + mes "\"I hope you enjoyed killing those innocent forest creatures!\""; + mes "She turns away, clearly not interested in any discussion."; + mes "\"Don't come back until you have come to your senses!\""; + next; + close; + L_Main: menu "What do you know about...", L_Question; close; @@ -126,4 +221,10 @@ L_Q_auldsbel: next; goto L_Main; + +S_update_var: + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; } diff --git a/npc/015-1_Woodland/sword.txt b/npc/015-1_Woodland/sword.txt new file mode 100644 index 00000000..07b2d9b6 --- /dev/null +++ b/npc/015-1_Woodland/sword.txt @@ -0,0 +1,155 @@ +015-1.gat,97,97,0 script #MagicSword#_M 127,{ + if (getskilllv(SKILL_MAGIC)) + goto L_message; + close; + +L_message: + set @Q_MASK, NIBBLE_6_MASK; + set @Q_SHIFT, NIBBLE_6_SHIFT; + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + set @STATUS_INITIAL, 0; + set @STATUS_LEARNED_FLAREDART, 1; + set @STATUS_LEARNED_MAGICBLADE, 2; + + if (@Q_status == @STATUS_INITIAL) goto L_Initial; + if (@Q_status == @STATUS_LEARNED_FLAREDART) goto L_FlareStage; + if (@Q_status == @STATUS_LEARNED_FLAREDART) goto L_MagicBladeStage; + + mes "[Magic Sword]"; + mes "\"I have taught thee all I can teach for now.\""; + next; + close; + +L_Initial: + mes "[Magic Sword]"; + mes "At this point, the river deepens, slowing down to a leisurely pace. In its center you notice an unusual stone, waves breaking around it."; + mes "Sticking out of the rock is a sword hilt."; + next; + + mes "[Magic Sword]"; + mes "Suddenly, you hear a strange, metallic voice in your head, the voice of a woman."; + mes "\"A blissful day to thee, mortal!\""; + next; + + mes "[Magic Sword]"; + mes "\"What is it is that brings thee to this place?\""; + next; + + menu + "Who are you?", L_noq, + "Nothing in particular.", L_Initial_nothing, + "I was just exploring...", L_Initial_nothing, + "I am trying to learn magic!", L_Initial_learn; + close; + +L_noq: + mes "[Magic Sword]"; + mes "The voice sounds slightly amused."; + mes "\"How sad to hear how manners have degenerated in recent centuries. Farewell for now, dear mortal.\""; + next; + close; + +L_Initial_nothing: + mes "[Magic Sword]"; + mes "\"Then I wish thee well in thy travels, wanderer!\""; + next; + close; + +L_Initial_learn: + mes "[Magic Sword]"; + mes "\"Magic? Unless I am very mistaken thou already possessest some magic. Yet perhaps I can grant thee some slight aid by providing a magical invocation?\""; + next; + + mes "[Magic Sword]"; + mes "\"Alas, my nature is not quite conductive for spells of healing or protection, though I can bestow upon thee the powers for a rather more martial kind of power.\""; + mes "\"But first... why is it that thou seekest this power?\""; + next; + + mes + "Never mind.", L_Farewell; + "To become stronger!", L_Initial_selfish, + "To kill!", L_Initial_selfish, + "I don't know yet...", L_Initial_dontknow, + "To protect the ones I love!", L_Initial_protect; + close; + +L_Initial_selfish: + mes "[Magic Sword]"; + mes "\"Please return when thou art taking thy quest for magic a little more seriously.\""; + next; + close; + +L_Initial_dontknow: + mes "[Magic Sword]"; + mes "\"A fair and honest thought at so early a point in thine quest.\""; + goto L_Initial_ok; + +L_Initial_protect: + mes "[Magic Sword]"; + mes "\"Quite a high and laundable goal thou hast chosen for thyself! I do hope that thou canst live up to it.\""; + +L_Initial_ok: + mes "\"Hark, then, mortal! For I shall bestow upon thee the secret of the flare dart spell!\""; + next; + + mes "[Magic Sword]"; + mes "\"Oh, my apologies-- that was a little overly dramatic. But I do not get to talk to thy kin anymore all that often.\""; + next; + + mes "[Magic Sword]"; + mes "\"For the flare dart spell throw a handful of sulphur powder up into the air, and say, '" + getspellinvocation("flare-dart") + "'.\""; + set @Q_status, @STATUS_LEARNED_FLAREDART; + callsub S_update_var; + next; + close; + +L_FlareStage: + menu; + "Uhm... Hello, Sword?", L_FlareStage_hello, + "Can you teach me more magic?", L_FlareStage_impolite, + "Where can I get sulphur powder?", L_FlareStage_impolite; + close; + +L_FlareStage_impolite: + mes "[Magic Sword]"; + mes "You hear a metallic chime in your head. After a second, you come to the conclusion that it was probably the sword sighing."; + mes "\"Greetings to thee, too, mortal, and farewell until thou hast learned some proper manners.\""; + next; + close; + +L_FlareStage_hello: + mes "[Magic Sword]"; + mes "\"Well met once more, mortal! What brings thee here?\""; + next; + + menu + "Can you teach me more magic?", L_FlareStage_moremagic, + "Where can I find sulphur powder?", L_FlareStage_sulphur, + "Farewell!", L_Farewell; + close; + +L_FlareStage_moremagic: + mes "[Magic Sword]"; + mes "\"I can indeed! But first I must see if thou art worthy. Find my brother, and talk to him! If thou canst find him, she shall teach thee another spell.\""; + next; + goto L_Farewell; + +L_FlareStage_sulphur: + mes "[Magic Sword]"; + mes "\"I do not know, though I suggest to seek out a local alchemist, if there is any.\""; + next; + goto L_Farewell; + +L_Farewell: + mes "[Magic Sword]"; + mes "\"Farewell for now!\""; + next; + close; + +S_update_var: + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/functions/mob_points.txt b/npc/functions/mob_points.txt index 9e8dad92..ede2d474 100644 --- a/npc/functions/mob_points.txt +++ b/npc/functions/mob_points.txt @@ -5,13 +5,13 @@ function script MobPoints { setarray @points, 1, // Maggot - 2, // Scorpion - 20, // Red Scorpion + 2, // Scorpion [1003] + 20, // Red Scorpion [1004] 10, // Green Slime 30, // Giant Maggot 15, // Yellow Slime 25, // Red Slime - 45, // Black Scorpion + 45, // Black Scorpion [1009] 50, // Snake 4, // Fire Goblin 55, // Spider @@ -22,7 +22,7 @@ function script MobPoints { 2, // Bat 16, // Pinkie 17, // Shroom - 14, // Fluffy + 14, // Fluffy [1020] 25, // Cave Snake 100, // Jack-O 80, // Fire Skull @@ -30,7 +30,7 @@ function script MobPoints { 20, // Stumpy 70, // Mountain Snake 15, // Easter Fluffy - 40, // Mouboo + 40, // Mouboo [1028] 0, // Mauve Plant 0, // Gamboge Plant 0, // Cobalt Plant @@ -38,5 +38,30 @@ function script MobPoints { 20, // Sea Slime 0; // Silk Worm + if (MPQUEST == 1) set Mobpt, Mobpt + @points[@mobID - 1002]; + + if ((@mobID == 1003) || (@mobID == 1004) || (@mobID == 1009)) + goto L_good; + + + // Attitude adjustment for the witch (can we refactor this to another function? Not sure about max. recursion depth) + + set @value, 0; + if (@mobID == 1028) + set @value, 4; + if (@mobID == 1020) + set @value, 3; + + if (@value == 0) + goto L_end; + + callfunc "QuestSagathaAnnoy"; + goto L_end; + +L_good: + set @value, 1; + callfunc "QuestSagathaHappy"; +L_end: + set @value, 0; } |