diff options
-rw-r--r-- | conf/magic.conf.template | 29 | ||||
-rw-r--r-- | db/const.txt | 2 | ||||
-rw-r--r-- | db/item_db.txt | 3 | ||||
-rw-r--r-- | npc/001-1_Tulimshar/elanore.txt | 166 | ||||
-rw-r--r-- | npc/001-2_Tulimshar/omar.txt | 339 | ||||
-rw-r--r-- | npc/010-2_Dimonds_Cove/_import.txt | 1 | ||||
-rw-r--r-- | npc/010-2_Dimonds_Cove/chef.txt | 111 | ||||
-rw-r--r-- | npc/010-2_Dimonds_Cove/dimonds.txt | 5 | ||||
-rw-r--r-- | npc/011-1_Woodland/auldsbel.txt | 95 | ||||
-rw-r--r-- | npc/012-3_Cave/mana-seed.txt | 2 | ||||
-rw-r--r-- | npc/018-2_Woodland_mining_camp/caul.txt | 337 | ||||
-rw-r--r-- | npc/021-2_Tulimshar/bakery.txt | 84 | ||||
-rw-r--r-- | npc/024-1_Tulimshar_Canyon/ched.txt | 22 |
13 files changed, 1134 insertions, 62 deletions
diff --git a/conf/magic.conf.template b/conf/magic.conf.template index 69660224..48a685f4 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -45,6 +45,10 @@ CONST SFX_HEAL = 3 CONST MAX_RAIN_SPELL_RADIUS = 20 +CONST MAGIC_FLAGS = "MAGIC_FLAGS" +CONST MFLAG_MADE_CONC_POTION = 16384 +CONST MFLAG_MADE_CONC_POTION_SHIFT = 14 + CONST SCRIPT_XP = "MAGIC_EXPERIENCE" CONST SCRIPT_XP_MASK = 0xffff CONST SCRIPT_XP_SHIFT = 0 @@ -52,7 +56,7 @@ CONST SCRIPT_LASTSPELL_MASK = 0xff CONST SCRIPT_LASTSPELL_SHIFT = 16 CONST SCRIPT_HEALSPELL_MASK = 0xff CONST SCRIPT_HEALSPELL_SHIFT = 24 -CONST DEBUG = 1 +CONST DEBUG = 0 CONST ATTACK_ICON_GENERIC = 2000 CONST ATTACK_ICON_SHEARING = 2001 @@ -101,10 +105,12 @@ PROCEDURE gain_xp(gain) = ) PROCEDURE create_item(good_item, count, bad_item, difficulty) = + success = 1; score = experience + random(min(spellpower, (experience / 3) + 1)); IF (score >= difficulty) THEN create_item(caster, good_item, count); ELSE ( + success = 0; score = score + random(luk(caster)) + random(luk(caster)); IF (score < difficulty / 3) THEN ( @@ -502,6 +508,8 @@ SPELL make-concentration-potion : "#T15" = CALL create_item( if_then_else(random(2000 + experience) < experience, "ConcentrationPotion", "DarkConcentrationPotion"), 1, if_then_else(random(2), 744, "DarkConcentrationPotion"), 2000); + IF (success) + THEN CALL set_var(MAGIC_FLAGS, 1, MFLAG_MADE_CONC_POTION_SHIFT, 1); CALL gain_xp(4); SPELL merge-concentration-potions : "#T16" = @@ -514,6 +522,9 @@ SPELL merge-concentration-potions : "#T16" = => EFFECT CALL adjust_spellpower(school); CALL default_effect(); CALL create_item("ConcentrationPotion", 1, 744, 1000); + message (caster, "success = " + success); + IF (success) + THEN CALL set_var(MAGIC_FLAGS, 1, MFLAG_MADE_CONC_POTION_SHIFT, 1); CALL gain_xp(4); @@ -1024,7 +1035,9 @@ SPELL debug : "debug" = + "cut=" + ((script_int(caster, "MAGIC_FLAGS") & 1024) > 0) + ", " + "Kdruidtree=" + ((script_int(caster, "MAGIC_FLAGS") & 2048) > 0) + ", " + "Kimp=" + ((script_int(caster, "MAGIC_FLAGS") & 4096) > 0) + ", " - + "Koldwiz=" + ((script_int(caster, "MAGIC_FLAGS") & 8192) > 0)); + + "Koldwiz=" + ((script_int(caster, "MAGIC_FLAGS") & 8192) > 0) + ", " + + "made-conc=" + ((script_int(caster, "MAGIC_FLAGS") & 16384) > 0) + ", " + + "elanore-omar=" + ((script_int(caster, "MAGIC_FLAGS") & 32768) > 0)); message (caster, "EXP: " + (script_int(caster, "MAGIC_EXPERIENCE") & 0xffff) + ", lastspell=" + ((script_int(caster, "MAGIC_EXPERIENCE") >> 16) & 0xff) + ", healexp=" + ((script_int(caster, "MAGIC_EXPERIENCE") >> 24) & 0xff)); @@ -1036,6 +1049,7 @@ SPELL debug : "debug" = + "swords:" + ((script_int(caster, "QUEST_MAGIC") >> 24) & 0xff) + ", " + "imp:" + ((script_int(caster, "QUEST_MAGIC2") >> 0) & 0xf) + ", " + "elanore:" + ((script_int(caster, "QUEST_MAGIC2") >> 4) & 0xf) + ", " + + "elanore-sub:" + ((script_int(caster, "QUEST_MAGIC2") >> 12) & 0xf) + ", " + "wyara:" + ((script_int(caster, "QUEST_MAGIC2") >> 8) & 0xf)); PROCEDURE debug_xmod(name, mask, shift, gain) = @@ -1064,6 +1078,8 @@ PROCEDURE debug_mod(name, delta) = ELSE IF (name = "Kdruidtree") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 11, delta); ELSE IF (name = "Kimp") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 12, delta); ELSE IF (name = "oldwiz") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 13, delta); + ELSE IF (name = "made-conc") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 14, delta); + ELSE IF (name = "elanore-omar") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 15, delta); ELSE IF (name = "auldsbel") THEN CALL debug_xmod("QUEST_MAGIC", 0x1f, 0, delta); ELSE IF (name = "Qauldsbel") THEN CALL debug_xmod("QUEST_MAGIC", 0x7, 5, delta); ELSE IF (name = "dt") THEN CALL debug_xmod("QUEST_MAGIC", 0x3, 10, delta); @@ -1074,6 +1090,7 @@ PROCEDURE debug_mod(name, delta) = ELSE IF (name = "imp") THEN CALL debug_xmod("QUEST_MAGIC2", 0xf, 0, delta); ELSE IF (name = "elanore") THEN CALL debug_xmod("QUEST_MAGIC2", 0xf, 4, delta); ELSE IF (name = "wyara") THEN CALL debug_xmod("QUEST_MAGIC2", 0xf, 8, delta); + ELSE IF (name = "elanore-sub") THEN CALL debug_xmod("QUEST_MAGIC2", 0xf, 12, delta); ELSE message(caster, "Unknown"); SPELL debug-up1 (name : STRING) : "debug+1" = @@ -1092,6 +1109,14 @@ SPELL debug-down16 (name : STRING) : "debug-16" = REQUIRE DEBUG => EFFECT CALL debug_mod(name, 0 - 16); +SPELL debug-up256 (name : STRING) : "debug+256" = + REQUIRE DEBUG + => EFFECT CALL debug_mod(name, 256); + +SPELL debug-down256 (name : STRING) : "debug-256" = + REQUIRE DEBUG + => EFFECT CALL debug_mod(name, 0 - 256); + SPELL debug-reset : "debug-reset" = REQUIRE DEBUG => EFFECT set_script_variable(caster, "QUEST_MAGIC", 0); diff --git a/db/const.txt b/db/const.txt index b3895c97..3bdcb3b4 100644 --- a/db/const.txt +++ b/db/const.txt @@ -203,3 +203,5 @@ MFLAG_KNOWS_DRUIDTREE 2048 // Knows about the druid tree quest MFLAG_KNOWS_IMP 4096 // Knows about the imprisoned forest spirit MFLAG_KNOWS_OLD_WIZARD 8192 // Knows Bjorn's old wizard +MFLAG_MADE_CONC_POTION 16384 // Made a concentration potion with T15 and/or T16 +MFLAG_ELANORE_OMAR 32768 // Told Omar about Elanore's involvement diff --git a/db/item_db.txt b/db/item_db.txt index ea5a1cec..ea66cae6 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -227,6 +227,9 @@ 743,Acorn,Acorn,0,50,10,1,,,,,,2,,,0,,{ itemheal 3,0; },{}, 744,DilutedConcentrationPotion,Diluted Concentration Potion,0,250,100,10,,,,,,2,,,0,,{ sc_start 37,30, 20; },{} 745,DarkConcentrationPotion,Dark Concentration Potion,0,50,25,10,,,,,,2,,,0,,{ sc_start 37,10, 40; sc_start sc_poison, 1, 50;},{} +746,MopoxCurePotion,Mopox Cure Potion,3,0,0,5,,,,,,2,,,,,{},{},, +747,LacedChocolateCake,Laced Chocolate Cake,0,550,125,10,,,,,,2,,,0,,{ itemheal 11,0; },{}, +748,LacedOrangeCupcake,Laced Orange Cupcake,0,90,45,5,,,,,,2,,,0,,{ itemheal 100,0; },{}, 1198,JackOSoul,Jack O Soul,3,100000,1,1,,,,,,,,,,,{},{},, 1199,Arrow,Arrow,10,3,1,1,25,0,0,,0,2,32768,,,,{},{},, 1200,Bow,Bow,4,1000,500,200,20,,5,,0,2,34,1,4,11,{},{},, diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index f0781924..1402f044 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -14,6 +14,8 @@ set @STATUS_LEARNED_LIGHT_HEAL, 1; set @STATUS_MASTERED_LIGHT_HEAL, 2; set @STATUS_LEARNED_LAY_ON_HANDS, 3; + set @STATUS_WAITING_FOR_KADIYA, 4; + set @STATUS_READY_TO_LEARN_CURE_POISON, 5; if (sc_check(sc_poison)) goto L_CurePoison; @@ -114,19 +116,22 @@ L_Main: menu "Can you heal me?", L_NoHealMessage, "Can you teach me magic?", L_Teach, - "What do you know about...", L_Question; + "What do you know about...", L_Question, + "Goodbye!", L_bye; 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; + "What do you know about...", L_Question, + "Goodbye!", L_bye; if (!@has_magic) menu "Can you heal me?", L_NoHealMessage, - "What do you know about...", L_Question; + "What do you know about...", L_Question, + "Goodbye!", L_bye; close; OnPCKillEvent: @@ -220,7 +225,9 @@ 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. :-) + if (@Q_status == @STATUS_LEARNED_LAY_ON_HANDS) goto L_Teach_Explain3; + if (@Q_status == @STATUS_WAITING_FOR_KADIYA) goto L_Teach_CheckAdvanceTo3; + if (@Q_status == @STATUS_READY_TO_LEARN_CURE_POISON) goto L_Teach_CurePosion; 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.\""; @@ -354,6 +361,152 @@ L_Teach_LOH_advance_abort1: mes "\"I'm sorry, but I am not yet convinced that you are a good enough healer. Please continue in your endeavours.\""; close; +L_Teach_Explain3: + if (getskilllv(SKILL_MAGIC) < 3) + goto L_Teach_Explain3_abort; + if (@Q_heal_exp < 50) + goto L_Teach_Explain3_fail; + + mes "[Elanore the Healer]"; + mes "Elanore smiles."; + mes "\"You seem to be ready to advance as a healer. There is one favour I must ask of you first, though.\""; + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(NIBBLE_3_MASK)); // Initialise Kadiya quest + set @Q_status, @STATUS_WAITING_FOR_KADIYA; + callsub S_update_var; + next; + + mes "[Elanore the Healer]"; + mes "\"There is a man here in Tulimshar with a beautiful young daughter; his name is Omar, and his daughter's name is Kadiya.\""; + mes "\"Once, when I was a young apprentice, I made a mistake treating Omar. Ever since, he no longer trusts me.\""; + next; + + mes "[Elanore the Healer]"; + mes "\"But his daugher has contracted Mopox, so she needs help. He doesn't trust me, but perhaps he will trust you; you have been helping quite a few people, after all.\""; + next; + +L_3_menu: + menu + "What should I do?", L_3_what_to_do, + "Where can I find the sick girl?", L_3_where, + "How did you mess up?", L_3_messup, + "I will get started right away.", -, + "Maybe later.", -; + + goto L_Main; + +L_3_what_to_do: + mes "[Elanore the Healer]"; + mes "\"You will have to brew a Mopox cure potion and give it to her. You should ask Caul to help you, he knows the recipe.\""; + next; + + mes "[Elanore the Healer]"; + mes "\"First, you will need a concentration potion and an iron potion-- toghether, they will give her her strength back. You also need a lifestone, and a gamboge leaf against the toxins in her body.\""; + next; + + mes "[Elanore the Healer]"; + mes "\"You then have to add in roots, water, mauve leaves and sulphur powder until the brew is gooey and neither light nor dark. Caul will explain the details to you.\""; + next; + + mes "[Elanore the Healer]"; + mes "\"There is a transmutation spell to make sulphur powder. If you don't know the magic, perhaps you can ask a transmutation mage to help you with this part.\""; + next; + goto L_3_menu; + +L_3_messup: + mes "[Elanore the Healer]"; + mes "\"Ah... well, Omar is a trader, and a frequent traveler. One day he came back from a journey with fleas in his beard and asked me to get rid of them.\""; + next; + + mes "[Elanore the Healer]"; + mes "\"Unfortunately I used the wrong lotion on the fleas, so instead of being scared away, they grew to enormous proportions and ate up all of his beard.\""; + next; + + mes "[Elanore the Healer]"; + mes "Elanore blushes."; + mes "\"Ever since then he hasn't been very trusting towards my skills, and I suppose that I can't blame him. But I don't want poor Kadiya to suffer because of that.\""; + next; + goto L_3_menu; + +L_3_where: + mes "[Elanore the Healer]"; + mes "\"Kadiya and Omar live relatively close by. See this corner in the inner city wall east of here? Turn past it, then go north. It's the second house.\""; + next; + goto L_3_menu; + +L_Teach_Explain3_abort: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but you lack the magical power to advance.\""; + close; + +L_Teach_Explain3_fail: + mes "[Elanore the Healer]"; + if (@Q_heal_exp < 30) + mes "\"You seem to have regressed as a healer. This is worrisome; please mend your ways or I will not teach you any further.\""; + if ((@Q_heal_exp >= 30) && (@Q_heal_exp < 40)) + mes "\"You still need more practice in the art of healing.\""; + if ((@Q_heal_exp >= 40)) + mes "\"You are doing well, but you need some more practice as a healer first.\""; + close; + +L_Teach_CheckAdvanceTo3: + callfunc "KadiyaSubquestConsts"; + + if (@Q_kadiya_status >= @Q_STATUS_COMPLETED) + goto L_Teach_AdvanceTo3Ready; + + mes "[Elanore the Healer]"; + mes "\"Please help Kadiya.\""; + next; + + goto L_3_menu; + +L_Teach_AdvanceTo3Ready: + mes "[Elanore the Healer]"; + mes "\"I have heard of what you did. Hiding the potion in her favorite food-- that was clever.\""; + mes "She smiles at you."; + mes "\"Omar let me have a look at her earlier, and she seems to be recovering. You did very well."; + next; + + mes "[Elanore the Healer]"; + mes "Elanor turns towards you, rises up on her toes and kisses you on the forehead."; + next; + + set @xp, 30000; + if (@Q_kadiya_status == @Q_STATUS_COMPLETED_ELANORE) + set @xp, 50000; + + mes "[Elanore the Healer]"; + mes "You feel a strange, tingling kind of warmth spread through your body."; + mes "[" + @xp + " experience points]"; + mes "[Level 3 in Life Magic]"; + + set @Q_status, @STATUS_READY_TO_LEARN_CURE_POISON; + callsub S_update_var; + getexp @xp, 0; + if (getskilllv(SKILL_MAGIC_LIFE) < 3) + setskill SKILL_MAGIC_LIFE, 3; + next; + + + if (@Q_kadiya_status != @Q_STATUS_COMPLETED_ELANORE) + goto L_Main; + + mes "[Elanore the Healer]"; + mes "\"Overall I am impressed by your progress. If you continue as you are doing now, you might become a great healer.\""; + mes "She hands you a handful of lifestones."; + mes "\"Please come back soon; there is more that I would like to teach you.\""; + next; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_ELANORE_OMAR; + getitem "LifeStone", 20; + + goto L_Main; + +L_Teach_CurePosion: + mes "[Elanore the Healer]"; + mes "\"Hmm. I wanted to teach you something, but I've forgotten what it was... please come back later.\""; + next; + goto L_Main; + L_NoMagicNoTeach: mes "[Elanore the Healer]"; mes "Elanore shakes her head."; @@ -429,6 +582,11 @@ L_CurePoison: mes "\"There you are, right as rain! Now you take care, all right?\""; close; +L_bye: + mes "[Elanore the Healer]"; + mes "\"Goodbye!\""; + close; + S_update_var: set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) diff --git a/npc/001-2_Tulimshar/omar.txt b/npc/001-2_Tulimshar/omar.txt index a495dd0a..2fd813ac 100644 --- a/npc/001-2_Tulimshar/omar.txt +++ b/npc/001-2_Tulimshar/omar.txt @@ -1,7 +1,346 @@ // +function script KadiyaSubquestConsts { + set @Q_kadiya_status, (QUEST_MAGIC2 & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; + + set @Q_STATUS_NONE, 0; + set @Q_STATUS_KNOWS_MOPOX, 1; + set @Q_STATUS_MADE_MOPOX, 2; + set @Q_STATUS_DIDNT_DRINK, 3; + set @Q_STATUS_WANTS_CHOCOCAKE, 4; + set @Q_STATUS_WANTS_ORANGECUPCAKE, 5; + set @Q_STATUS_COMPLETED, 6; + set @Q_STATUS_COMPLETED_ELANORE, 7; + set @Q_STATUS_COMPLETED_NOELANORE, 8; + set @Q_STATUS_COMPLETED_POST_ELANORE, 9; + + if (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) < 4) + set @Q_kadiya_status, @Q_STATUS_NONE; + + if (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) > 4) + set @Q_kadiya_status, @Q_STATUS_COMPLETED_POST_ELANORE; + + return; +} + 001-2.gat,70,60,0 script Omar 162,{ + callfunc "KadiyaSubquestConsts"; + + set @Q_status, @Q_kadiya_status; + + if (@Q_status >= @Q_STATUS_COMPLETED) + goto L_cured; + + if (@Q_status == @Q_STATUS_DIDNT_DRINK) + goto L_didnt_drink; + + if (@Q_status > @Q_STATUS_DIDNT_DRINK) + goto L_make_food; + mes "[Omar]"; mes "\"Welcome to my humble abode.\""; + next; + + menu + "Well met! May I ask who you are?", L_omar, + "What's wrong with your daughter?", L_kadiya_sick, + "Thank you!", -; close; + +L_omar: + mes "[Omar]"; + mes "\"My name is Omar; I am a trader of oils and spices.\""; + close; + +L_kadiya_sick: + mes "[Omar]"; + mes "\"Kadiya has caught Ponderpox, I fear.\""; + mes "He sighs."; + mes "\"She's has been feverish for many days now. I wish there were something I could do.\""; + next; + + menu + "Have you asked Elanore the healer?", L_sick_elanore, + "How about the Hurnscald hospital?", L_sick_hospital, + "Can I help?", L_sick_self, + "I'm sorry to hear that.", -; + + mes "[Omar]"; + mes "\"Well, she is a strong girl. I am sure that she will get over it eventually.\""; + mes "He smiles, but you see doubt in his eyes."; + close; + +L_sick_elanore: + mes "[Omar]"; + mes "\"Elanore?\""; + mes "He frowns."; + mes "\"She knows nothing. I see no point in talking to her.\""; + close; + +L_sick_hospital: + mes "[Omar]"; + mes "\"Hurnscald is too far away. I don't think that it would be good for her to go on such a long trip.\""; + close; + +L_sick_self: + mes "[Omar]"; + mes "\"You are very kind, but I don't think there is anything you can do.\""; + close; + +L_didnt_drink: + mes "[Omar]"; + mes "\"So she has Mopox, not Ponderpox, you say? Hmm. That is much harder to cure, I think.\""; + mes "\"I am grateful for the effort you put into brewing a potion for her. But it does smell vile...\""; + next; + + mes "[Omar]"; + mes "\"I promised my dear wife that I would never make Kadiya eat or drink anything she doesn't like. So I won't force her to drink this.\""; + next; + + mes "[Omar]"; + set @Q_status, (@Q_STATUS_WANTS_CHOCOCAKE + rand(2)); + callsub S_update_var; + + if (@Q_status == @Q_STATUS_WANTS_ORANGECUPCAKE) + mes "\"If only we could make it smell and taste like orange cupcakes... she really loves those cupcakes.\""; + if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) + mes "\"If only this were a chocolate cake and not a potion... she really loves chocolate cakes.\""; + close; + +L_make_food: + mes "[Omar]"; + mes "\"I should stay here to watch over her. I wish I could think of a way to convince her to drink the potion...\""; + if (@Q_status == @Q_STATUS_WANTS_ORANGECUPCAKE) + mes "\"Alas, it is not an orange cupcake.\""; + if (@Q_status == @Q_STATUS_WANTS_CHOCOCAKE) + mes "\"If only it were to smell and taste like her favourite chocolate cake...\""; + close; + +L_cured: + if (@Q_status == @Q_STATUS_COMPLETED) + goto L_cured_choice; + mes "[Omar]"; + mes "\"She is sleeping now, but she seems to be much better. I am sure that she will be up and running around again soon.\""; + close; + +L_cured_choice: + mes "[Omar]"; + mes "\"I am very grateful for your help. I really was sure that it was Ponderpox, not Mopox, that she had.\""; + next; + + menu + "Oh, it was nothing.", L_cured_nothing, + "I didn't do it alone; Elanore helped.", L_cured_elanore, + "That will be 5000 GP.", -; + + mes "[Omar]"; + mes "\"Ah, certainly.\""; + mes "He hands you a small bag of money."; + next; + + set @Q_status, @Q_STATUS_COMPLETED_NOELANORE; + callsub S_update_var; + + set zeny, zeny + 5000; + close; + +L_cured_nothing: + mes "[Omar]"; + mes "\"No, this wasn't nothing. She is everything to me. Here, you deserve a reward.\""; + mes "He hands you a bag of money containing 10,000 GP and two pearls."; + mes "\"And feel free to drop by again whenever you would like!\""; + + set @Q_status, @Q_STATUS_COMPLETED_NOELANORE; + callsub S_update_var; + + getitem "Pearl", 2; + set zeny, zeny + 10000; + close; + +L_cured_elanore: + mes "[Omar]"; + mes "Omar frowns."; + mes "\"That witch? You worked with her without telling me?\""; + mes "He looks over to his daughter, concern suddenly in his eyes."; + mes "\"She is looking better, though...\""; + next; + + mes "[Omar]"; + mes "Omar shakes his head."; + mes "\"I will have to think about this. Please leave me alone.\""; + next; + + set @Q_status, @Q_STATUS_COMPLETED_ELANORE; + callsub S_update_var; + + close; + +S_update_var: + set QUEST_MAGIC2, + (QUEST_MAGIC2 & ~(NIBBLE_3_MASK) + | (@Q_status << NIBBLE_3_SHIFT)); + return; +} + + +001-2.gat,76,59,0 script _______Kadiya 174,{ + set @Q_MASK, NIBBLE_3_MASK; + set @Q_SHIFT, NIBBLE_3_SHIFT; + + callfunc "KadiyaSubquestConsts"; + set @Q_status, @Q_kadiya_status; + + if (@Q_status >= @Q_STATUS_COMPLETED) + goto L_cured; + + mes "You see a young girl lying in bed. At first she doesn't seem to notice you approaching."; + mes "Finally, she turns her head towards you. Judging from the sweat on her forehead and look in her eyes, she is suffering from some kind of fever."; + next; + + mes "[Kadiya]"; + mes "\"Hello,\" she says in a tiny voice."; + next; + + set @M_NAME, 1; + set @M_CANDY, 2; + set @M_POTION, 3; + set @M_CHOCOCAKE, 4; + set @M_CUPCAKE, 5; + + setarray @choice$, "Hello! What's your name?", "Would you like some candy?", "", "", "", "", "", ""; + setarray @choice_idx, @M_NAME, @M_CANDY, 0, 0, 0, 0, 0, 0; + set @choices_nr, 2; + + if (countitem("MopoxCurePotion") == 0) + goto L_M_no_cure; + + set @choice_idx[@choices_nr], @M_POTION; + set @choice$[@choices_nr], "This potion will cure your illness!"; + set @choices_nr, @choices_nr + 1; + +L_M_no_cure: + + if ((countitem("LacedChocolateCake") == 0) || (@Q_status != @Q_STATUS_WANTS_CHOCOCAKE)) + goto L_M_no_chococake; + + set @choice_idx[@choices_nr], @M_CHOCOCAKE; + set @choice$[@choices_nr], "Would you like special chocolate cake?"; + set @choices_nr, @choices_nr + 1; + +L_M_no_chococake: + + if ((countitem("LacedOrangeCupcake") == 0) || (@Q_status != @Q_STATUS_WANTS_ORANGECUPCAKE)) + goto L_M_no_cupcake; + + set @choice_idx[@choices_nr], @M_CUPCAKE; + set @choice$[@choices_nr], "Would you like special orange cupcake?"; + set @choices_nr, @choices_nr + 1; + +L_M_no_cupcake: + + set @choice_idx[@choices_nr], 0; + set @choice$[@choices_nr], "Goodbye."; + set @choices_nr, @choices_nr + 1; + + menu + @choice$[0], -, + @choice$[1], -, + @choice$[2], -, + @choice$[3], -, + @choice$[4], -, + @choice$[5], -; + + set @choice, @choice_idx[@menu - 1]; + + if (@choice == @M_NAME) goto L_name; + if (@choice == @M_CANDY) goto L_no_candy; + if (@choice == @M_POTION) goto L_potion; + if (@choice == @M_CHOCOCAKE) goto L_chococake; + if (@choice == @M_CUPCAKE) goto L_cupcake; + + close; + +L_name: + mes "[Kadiya]"; + mes "She smiles a faint smile."; + mes "\"My name is Kadiya.\""; + + close; + +L_no_candy: + mes "[Kadiya]"; + mes "She hesitates for a moment."; + mes "\"No, thank you. I don't think I should.\""; + + close; + +L_potion: + mes "[Kadiya]"; + if (@Q_status < @Q_STATUS_DIDNT_DRINK) + set @Q_status, @Q_STATUS_DIDNT_DRINK; + callsub S_update_var; + + mes "Kadiya grimaces and pushes the bottle away."; + mes "\"That smells terrible!\""; + next; + + mes "[Kadiya]"; + mes "She pulls the sheets over her head."; + mes "\"I won't drink that!\""; + next; + + close; + +L_chococake: + delitem "LacedChocolateCake", 1; + goto L_do_cure; + +L_cupcake: + delitem "LacedOrangeCupcake", 1; + goto L_do_cure; + +L_do_cure: + if (@Q_status < @Q_STATUS_COMPLETED) + set @Q_status, @Q_STATUS_COMPLETED; + callsub S_update_var; + mes "[Kadiya]"; + mes "Kadiya's eyes widen."; + mes "\"Oh! Daddy, is it okay if I eat this?\""; + mes "Omar nods and smiles. \"You should eat a bit to regain your strength, sweetheart.\""; + next; + + mes "[Kadiya]"; + mes "Kadiya devours your gift in just a handful of bites."; + next; + + mes "[Kadiya]"; + mes "She smiles. \"Thank you! I feel better already!\"."; + next; + + mes "[Kadiya]"; + mes "She looks much healthier, too. Omar walks over and touches her forehead."; + mes "\"Now that is funny-- your fever has gone down quite a bit!\""; + mes "He smiles at you. \"Thank you for your help!\""; + next; + + mes "[Kadiya]"; + mes "\"You should get some sleep now, sweetheart. I'm sure that you will be better soon.\""; + close; + +L_goodbye: + mes "[Kadiya]"; + mes "Goodbye!"; + + close; + +L_cured: + mes "[Kadiya]"; + mes "Kadiya seems to be sleeping calmly. She looks much less sweaty than earlier; unless you are very much mistaken, her fever has disappeared."; + close; + +S_update_var: + set QUEST_MAGIC2, + (QUEST_MAGIC2 & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; } diff --git a/npc/010-2_Dimonds_Cove/_import.txt b/npc/010-2_Dimonds_Cove/_import.txt index 1a75f84a..a6d6af90 100644 --- a/npc/010-2_Dimonds_Cove/_import.txt +++ b/npc/010-2_Dimonds_Cove/_import.txt @@ -1,6 +1,7 @@ map: 010-2.gat npc: npc/010-2_Dimonds_Cove/_mobs.txt npc: npc/010-2_Dimonds_Cove/_warps.txt +npc: npc/010-2_Dimonds_Cove/chef.txt npc: npc/010-2_Dimonds_Cove/dimonds.txt npc: npc/010-2_Dimonds_Cove/doug.txt npc: npc/010-2_Dimonds_Cove/loratay.txt diff --git a/npc/010-2_Dimonds_Cove/chef.txt b/npc/010-2_Dimonds_Cove/chef.txt new file mode 100644 index 00000000..03149485 --- /dev/null +++ b/npc/010-2_Dimonds_Cove/chef.txt @@ -0,0 +1,111 @@ +010-2.gat,33,25,0 script Chef 148,{ + mes "[Chef]"; + mes "\"I'm too busy right now to talk.\""; + + callfunc "KadiyaSubquestConsts"; + if ((@Q_kadiya_status == @Q_STATUS_WANTS_CHOCOCAKE) && (countitem ("MopoxCurePotion") > 0)) + goto L_lace_chococake; + + if ((@Q_kadiya_status == @Q_STATUS_WANTS_ORANGECUPCAKE) && (countitem ("MopoxCurePotion") > 0)) + goto L_lace_cupcake; + close; + +L_lace_chococake: + next; + menu + "Sorry.", L_end, + "I need your help with a sick young girl!", -; + + mes "[Chef]"; + mes "You explain Kadiya's situation to him."; + mes "\"Hmrmf. I can't help you; I'm a chef, not a baker!\""; + close; + +L_lace_cupcake: + next; + menu + "Sorry.", L_end, + "I need your help with a sick young girl!", -; + + mes "[Chef]"; + mes "You explain Kadiya's situation to him."; + mes "\"Hmrmf. I was about to make another batch of orange cupcakes. Do you have that potion with you?\""; + next; + + menu + "No, sorry.", L_bringit, + "Yes, here you are.", -; + + if (countitem ("MopoxCurePotion") < 1) + goto L_bringit; + + mes "[Chef]"; + mes "He shudders as he smells the bottle."; + mes "\"That is disgusting! How do you expect me to mask this?\""; + mes "He ponders his own question for a moment."; + next; + + mes "[Chef]"; + mes "\"Ah yes. We need to bind the smell in gingerbread. Bring me three pieces of gingerbread, one orange, and 500 GP for the other ingredients, and I will make you your cupcake.\""; + next; + + menu + "I'll go and get it.", L_end, + "Here you are!", -, + "Not now.", L_end; + + if (countitem ("GingerBreadMan") < 3) goto L_no_gingerbread; + if (countitem ("Orange") < 1) goto L_no_orange; + if (countitem ("MopoxCurePotion") < 1) goto L_no_potion; + if (zeny < 500) goto L_no_zeny; + + set zeny, zeny - 500; + delitem "GingerBreadMan", 3; + delitem "Orange", 1; + delitem "MopoxCurePotion", 1; + + getitem "LacedOrangeCupcake", 1; + + mes "[Chef]"; + mes "\"Good, good. This should work.\""; + mes "He crumbles the gingerbread, mixes it with the potion and some spices, and finally adds some cupcake batter and the orange pieces."; + next; + + mes "[Chef]"; + mes "\"Take a seat.\""; + mes "He fills the mixture into a cupcake form and puts it into the oven. You watch the cupcake grow for a while."; + mes "Finally, he removes the form and carefully extracts the cupcake."; + next; + + mes "[Chef]"; + mes "\"Here you are. It's a bit bigger than a regular cupcake and will taste a bit like ginger, I think, but otherwise it should be fine.\""; + close; + +L_no_gingerbread: + mes "[Chef]"; + mes "\"I will need three pieces of gingerbread.\""; + close; + +L_no_orange: + mes "[Chef]"; + mes "\"Please bring me an orange for these cupcakes.\""; + close; + +L_no_zeny: + mes "[Chef]"; + mes "\"No. I need extra ingredients worth 500 GP, and I expect you to pay for those.\""; + close; + +L_no_potion: + mes "[Chef]"; + mes "\"Where did your Mopox potion go?\""; + close; + +L_bringit: + mes "[Chef]"; + mes "\"Bring it here when you do.\""; + next; + +L_end: + close; +} diff --git a/npc/010-2_Dimonds_Cove/dimonds.txt b/npc/010-2_Dimonds_Cove/dimonds.txt index 8f82fc97..d44a5303 100644 --- a/npc/010-2_Dimonds_Cove/dimonds.txt +++ b/npc/010-2_Dimonds_Cove/dimonds.txt @@ -123,8 +123,3 @@ callfunc "Inn"; } -010-2.gat,33,25,0 script Chef 148,{ - mes "[Chef]"; - mes "I'm too busy right now to talk."; - close; -} diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index b99bc814..142c96a5 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -14,8 +14,12 @@ set @Q_STATUS_STUDENT2, 6; set @Q_STATUS_STUDENT3, 7; set @Q_STATUS_STUDENT4, 8; + set @Q_STATUS_STUDENT5, 9; + set @Q_STATUS_STUDENT6, 10; + - set @wants_sulphur, (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)); + set @wants_sulphur, (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) // war quest + || (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) >= 4); // Elanore's heal-Kadiya quest set @wants_ironpowder, (((QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT) >= 7); set @Q_MASK, NIBBLE_0_MASK | NIBBLE_1_MASK; @@ -159,7 +163,7 @@ L_main_menu_magic: "Can you make sulphur powder?", L_sulphur, "Can you make iron powder?", L_ironpowder, "Goodbye.", -; - if (@wants_sulphur) + if (@wants_sulphur && !@wants_ironpowder) menu "How does magic work?", L_about_magic, "Can you teach me a spell?", L_learn_spell, "Where are you from?", L_about_auldsbel, @@ -922,6 +926,8 @@ L_learn_spell: if (@Q_main_status == @Q_STATUS_STUDENT2) goto LL_student_2; if (@Q_main_status == @Q_STATUS_STUDENT3) goto LL_student_3; if (@Q_main_status == @Q_STATUS_STUDENT4) goto LL_student_4; + if (@Q_main_status == @Q_STATUS_STUDENT5) goto LL_student_5; + if (@Q_main_status == @Q_STATUS_STUDENT6) goto LL_student_6; 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?\""; @@ -1178,7 +1184,90 @@ LL_student_2: goto L_main_menu; LL_student_3: - // Future extensions go here + if (getskilllv(SKILL_MAGIC) < 3) + goto LL_magic_skill_insufficient; + mes "[Auldsbel the Wizard]"; + mes "\"I believe that you may be ready for the next level of transmutation magic! Let me teach you one last spell that you can handle before your promotion, and if you can cast this one, I will advance you.\""; + next; + +LL_student_3_repeat: + mes "[Auldsbel the Wizard]"; + mes "\"This one has the invocation `" + getspellinvocation("make-concentration-potion") + "'. Put two cobalt leaves and two flower petals into a bottle of water, hold it up, and speak that phrase.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"It is a tricky spell, but if it works out, you will transform the bottle into a concentration potion.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"Hmm. That reminds me-- there was a similar spell, but I forgot what it was... anyway, try using this, and bring me the potion when you are done.\""; + next; + + set @Q_main_status, @Q_STATUS_STUDENT4; + callsub S_update_var; + goto L_main_menu; + +LL_student_4: + mes "[Auldsbel the Wizard]"; + mes "\"Did you manage to transmute into a concentration potion?\""; + next; + + menu + "What was the invocation again?", LL_student_3_repeat, + "No, still working on it...", L_main_menu, + "Yes.", -; + + if (countitem("ConcentrationPotion") < 1) + goto LL_student_4_no_potion; + + if (!(MAGIC_FLAGS & MFLAG_MADE_CONC_POTION)) + goto LL_student_4_wrong_potion; + + mes "[Auldsbel the Wizard]"; + mes "Auldsbel examines your potion and nods."; + mes "\"Good work! You are ready for a promotion!\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "Auldsbel presses his index and middle finger against your forehead."; + mes "\"Accept my blessing!\""; + next; + + set @Q_main_status, @Q_STATUS_STUDENT5; + callsub S_update_var; + getexp 30000, 0; + if (getskilllv(SKILL_MAGIC_TRANSMUTE) < 3) + setskill SKILL_MAGIC_TRANSMUTE, 3; + + mes "[Auldsbel the Wizard]"; + mes "You feel new powers flowing into your body!"; + mes "[30000 experience points]"; + mes "[Level 3 in Transmutation Magic]"; + next; + + goto L_main_menu; + +LL_student_4_wrong_potion: + mes "[Auldsbel the Wizard]"; + mes "Auldsbell examines your potion, then shakes his head."; + mes "\"This doesn't look quite right, though I can't quite point at what the problem is. You will have to continue trying.\""; + next; + + goto L_main_menu; + +LL_student_4_no_potion: + mes "[Auldsbel the Wizard]"; + mes "\"You seem to be rather lacking the concentration potion you need to justify your claim, my dear fellow.\""; + next; + + goto L_main_menu; + +LL_student_5: + mes "[Auldsbel the Wizard]"; + mes "\"Hmm. Come back some other time, please; I still haven't figured out what to teach you next.\""; + close; + +LL_magic_skill_insufficient: mes "[Auldsbel the Wizard]"; mes "\"No, not at this time. You will have to advance in your overall magic skill before I can teach you more.\""; next; diff --git a/npc/012-3_Cave/mana-seed.txt b/npc/012-3_Cave/mana-seed.txt index 58c2e3cd..30f9776e 100644 --- a/npc/012-3_Cave/mana-seed.txt +++ b/npc/012-3_Cave/mana-seed.txt @@ -24,7 +24,7 @@ 65, 80; // level 5 - set @visions_nr, 13; + set @visions_nr, 12; setarray @visions$, "You see a dark underground temple; you are kneeling, praying for the safety of the planet. You smile as a friend joins you in the dark-- but suddenly a shadow falls over you from above, and a stabbing pain...", "It is midnight; you are in an underground cavern deep inside the desert ruins. Slowly, as if half-asleep, you wander up the spiral pathway, towards the ancient vase at its center. As you reach out to touch it...", diff --git a/npc/018-2_Woodland_mining_camp/caul.txt b/npc/018-2_Woodland_mining_camp/caul.txt index f03aeff5..fdc76b21 100644 --- a/npc/018-2_Woodland_mining_camp/caul.txt +++ b/npc/018-2_Woodland_mining_camp/caul.txt @@ -14,67 +14,88 @@ set @SETZER_FLAG_MADE_OIL, 4; set @MONSTER_OIL_XP, 100000; + set @MOPOX_CURE_XP, 30000; set @Q_MASK, NIBBLE_3_MASK; set @Q_SHIFT, NIBBLE_3_SHIFT; set @Q_status, (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT; + set @Q_knows_mopox_cure, ((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) >= 4; // Elanore's quest for curing Kadiya + + // Can the player get XP for brewing the cure? + set @Q_can_score_mopox_cure, (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) == 4) // Elanore's quest for curing Kadiya + && (((QUEST_MAGIC2 & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT) < 2); // Haven't brewed it yet + mes "[Caul]"; mes "\"I can help you to brew healing potions out of mauve, cobalt, gamboge and alizarin herbs."; mes "How many potions do you want to brew?\""; next; + set @C_monster_oil, 20; + set @C_mopox_cure, 21; + set @C_nohmask, 22; + set @C_bye, 23; - if (@Q_status && Inspector == 10) - menu - "One", L_1, - "Five", L_5, - "Ten", L_10, - "Fifty", L_50, - "I would like to brew monster oil.", L_monster_oil_start, - "Actually...", L_NohMask, - "Never mind", L_close; - if (@Q_status && Inspector != 10) - menu - "One", L_1, - "Five", L_5, - "Ten", L_10, - "Fifty", L_50, - "I would like to brew monster oil.", L_monster_oil_start, - "Never mind", L_close; - if (!@Q_status && Inspector == 10) - menu - "One", L_1, - "Five", L_5, - "Ten", L_10, - "Fifty", L_50, - "Actually...", L_NohMask, - "Never mind", L_close; - if (!@Q_status && Inspector != 10) - menu - "One", L_1, - "Five", L_5, - "Ten", L_10, - "Fifty", L_50, - "Never mind", L_close; - -L_1: - set @num, 1; - goto L_brew; + setarray @choice$, "One", "Five", "Ten", "Fifty", "", "", "", ""; + setarray @choice_idx, 1, 5, 10, 50, 0, 0, 0, 0; + set @choices_nr, 4; + + + if !(@Q_status) + goto L_M_no_monster_oil; + + set @choice_idx[@choices_nr], @C_monster_oil; + set @choice$[@choices_nr], "I would like to brew monster oil."; + set @choices_nr, @choices_nr + 1; + +L_M_no_monster_oil: + + if (!@Q_knows_mopox_cure) + goto L_M_no_mopox_cure; + + set @choice_idx[@choices_nr], @C_mopox_cure; + set @choice$[@choices_nr], "I would like to brew a Mopox cure."; + set @choices_nr, @choices_nr + 1; + +L_M_no_mopox_cure: + + if (Inspector != 10) + goto L_M_no_inspector; -L_5: - set @num, 5; - goto L_brew; + set @choice_idx[@choices_nr], @C_nohmask; + set @choice$[@choices_nr], "Actually..."; + set @choices_nr, @choices_nr + 1; -L_10: - set @num, 10; - goto L_brew; +L_M_no_inspector: -L_50: - set @num, 50; - goto L_brew; + set @choice_idx[@choices_nr], @C_bye; + set @choice$[@choices_nr], "Never mind"; + set @choices_nr, @choices_nr + 1; + menu + @choice$[0], -, + @choice$[1], -, + @choice$[2], -, + @choice$[3], -, + @choice$[4], -, + @choice$[5], -, + @choice$[6], -, + @choice$[7], -; + + set @choice, @choice_idx[@menu - 1]; + + if (@choice == @C_monster_oil) + goto L_monster_oil_start; + if (@choice == @C_mopox_cure) + goto L_mopox_cure_start; + if (@choice == @C_nohmask) + goto L_NohMask; + if (@choice == @C_bye) + goto L_close; + + // otherwise the choice is the number of potions-to-brew + set @num, @choice; L_brew: mes "[Caul]"; @@ -450,9 +471,233 @@ L_monster_oil_no_gold_end: next; close; -L_close: +L_mopox_cure_start: + mes "[Caul]"; + mes "\"The mopox cure potion? Certainly, if you have all of the ingredients... oh, and make sure to bring water, roots, sulphur powder and Mauve leaves.\""; + mes "\"This is a very easy one, so I think I should let you do this yourself. It is very good exercise.\""; + next; + +L_mopox_cure_overview_menu: + menu + "I'm ready!", L_mopox_cure_setup, + "What are the ingredients?", L_mopox_cure_ingredients, + "How does this work?", L_mopox_cure_howto, + "I'd rather not try.", -; close; +L_mopox_cure_ingredients: + mes "[Caul]"; + mes "\"You will need one concentration potion, one iron potion, a lifestone, and one gamboge leaf.\""; + next; + goto L_mopox_cure_overview_menu; + +L_mopox_cure_howto: + mes "[Caul]"; + mes "\"When you start brewing, the liquid very rarely has the proper consistency and color. You need to make it gooey and medium dark.\""; + next; + + mes "[Caul]"; + mes "\"You can affect the consistency by adding ground roots and water, and you can change the color by adding mauve leaves (to darken it) and sulphur powder (to make it brighter).\""; + next; + + mes "[Caul]"; + mes "\"The ingredients have some side effects, though, so you will have to experiment a little.\""; + next; + + mes "[Caul]"; + mes "\"Oh, and be careful: water will evaporate over time, too.\""; + next; + goto L_mopox_cure_overview_menu; + +L_mopox_cure_no_lifestone: + mes "[Caul]"; + mes "\"You will need a lifestone.\""; + goto L_mopox_cure_overview_menu; + +L_mopox_cure_no_gamboge: + mes "[Caul]"; + mes "\"You will need a gamboge leaf.\""; + goto L_mopox_cure_overview_menu; + +L_mopox_cure_no_concentration: + mes "[Caul]"; + mes "\"You will need a concentration potion.\""; + goto L_mopox_cure_overview_menu; + +L_mopox_cure_no_iron: + mes "[Caul]"; + mes "\"You will need an iron potion.\""; + goto L_mopox_cure_overview_menu; + +L_mopox_cure_setup: + if (countitem("IronPotion") < 1) goto L_mopox_cure_no_iron; + if (countitem("ConcentrationPotion") < 1) goto L_mopox_cure_no_concentration; + if (countitem("GambogeHerb") < 1) goto L_mopox_cure_no_gamboge; + if (countitem("Lifestone") < 1) goto L_mopox_cure_no_lifestone; + + delitem "IronPotion", 1; + delitem "ConcentrationPotion", 1; + delitem "GambogeHerb", 1; + delitem "Lifestone", 1; + + mes "[Brewing Mopox Cure]"; + mes "You pour your two potions into the cauldron, then add a gamboge herb and a lifestone. Caul heats up the cauldron and you wait until it begins to boil."; + + setarray @colours$, "white", "almost white", "light", "medium-light", "dark", "very dark", "almost black", "black"; + setarray @stickinesses$, "watery", "very runny", "runny", "gooey", "sticky", "very sticky", "almost solid"; + set @stickiness, rand(7); + set @colour, 2 + rand(5); + + // Target: (@stickiness, @colour) = (3, 3) + + if (@stickiness == 3 && @colour == 3) + set @colour, 4; // don't allow insta-win; it's easy enough. + set @rounds, 0; + +L_mopox_cure_loop: + mes "[Brewing Mopox Cure]"; + mes "The brew is " + @colours$[@colour] + " and " + @stickinesses$[@stickiness] + "."; + + if (@colour == 3 && @stickiness == 3) + goto L_mopox_cure_win; + next; + + set @colour, @colour + 10; + set @stickiness, @stickiness + 10; + + menu + "Add root", L_mopox_B_root, + "Add water", L_mopox_B_water, + "Add sulphur powder", L_mopox_B_sulphur, + "Add mauve", L_mopox_B_mauve, + "...what should I do again?", L_mopox_reexplain, + "Wait", -; + +L_mopox_cure_next: + set @stickiness, @stickiness + @rounds; + set @rounds, 1 - @rounds; + + if (@stickiness < 10) + set @stickiness, 10; + if (@colour < 10) goto L_mopox_failed_badcolour; + if (@colour > 17) goto L_mopox_failed_badcolour; + if (@stickiness > 16) goto L_mopox_failed_hard; + if (@colour > 17) goto L_mopox_failed_badcolour; + + set @colour, @colour - 10; + set @stickiness, @stickiness - 10; + + goto L_mopox_cure_loop; + +L_mopox_reexplain: + mes "[Caul]"; + mes "\"Make this brew gooey and medium dark.\""; + mes "\"(Gooey is right between runny and sticky.)\""; + mes "\"You can add different items that will affect both color and stickiness.\""; + next; + mes "[Caul]"; + mes "\"Water and ground roots mostly affect stickiness.\""; + mes "\"Mauve and sulphur powder mostly affect color, with Mauve darkening the brew.\""; + next; + goto L_mopox_cure_next; + +L_mopox_B_none: + mes "[Brewing Mopox Cure]"; + mes "You don't have any left!"; + next; + goto L_mopox_cure_next; + +L_mopox_B_root: + if (countitem ("Root") < 1) goto L_mopox_B_none; + delitem "Root", 1; + + mes "[Brewing Mopox Cure]"; + mes "You grind a root and pour it into the brew."; + next; + set @colour, @colour + 1; + set @stickiness, @stickiness + 3; + goto L_mopox_cure_next; + +L_mopox_B_water: + if (countitem ("BottleOfWater") < 1) goto L_mopox_B_none; + delitem "BottleOfWater", 1; + getitem "EmptyBottle", 1; + + mes "[Brewing Mopox Cure]"; + mes "You pour a bottle of water into the brew."; + next; + set @colour, @colour; + set @stickiness, @stickiness - 2; + goto L_mopox_cure_next; + +L_mopox_B_sulphur: + if (countitem ("SulphurPowder") < 1) goto L_mopox_B_none; + delitem "SulphurPowder", 1; + + mes "[Brewing Mopox Cure]"; + mes "You mix some sulphur powder into the brew."; + next; + set @colour, @colour - 3; + set @stickiness, @stickiness + 1; + goto L_mopox_cure_next; + +L_mopox_B_mauve: + if (countitem ("MauveHerb") < 1) goto L_mopox_B_none; + delitem "MauveHerb", 1; + + mes "[Brewing Mopox Cure]"; + mes "You grind a mauve herb and toss it in."; + next; + set @colour, @colour + 2; + set @stickiness, @stickiness + 1; + goto L_mopox_cure_next; + +L_mopox_failed_badcolour: + mes "[Brewing Mopox Cure]"; + mes "The brew suddenly begins to bubble again, turning green."; + mes "\"Oh dear,\" Caul remarks, \"you let the color stray too much.\""; + next; + mes "[Caul]"; + mes "\"Better luck next time!\""; + close; + +L_mopox_failed_hard: + mes "[Brewing Mopox Cure]"; + mes "You find it almost impossible to stir the brew."; + mes "Suddenly, the thick mass bends outwards, a huge bubble bursting open right in your face!"; + next; + + if (rand(readparam(bVit)) < 40) + sc_start sc_poison, 1, 20; + + mes "[Brewing Mopox Cure]"; + mes "Yeech. That smelled bad."; + mes "\"Don't worry, I'll clean up the cauldron,\", interrupts Caul. \"You should wipe that off your face and make sure that you didn't get poisoned.\""; + next; + + mes "[Caul]"; + mes "\"Better luck next time!\""; + close; + +L_mopox_cure_win: + mes "Caul looks pleased. \"Well done! This looks very good to me.\""; + next; + + mes "[Caul]"; + mes "Caul picks a bottle from a shelf and fills it with your brew."; + mes "\"One potion of Mopox cure, here you are. Good luck!\""; + getitem "MopoxCurePotion", 1; + if (!@Q_can_score_mopox_cure) + goto L_mopox_cure_win_quick; + getexp @MOPOX_CURE_XP, 0; + mes "[" + @MOPOX_CURE_XP + " experience points]"; + set QUEST_MAGIC2, (QUEST_MAGIC2 & ~NIBBLE_3_MASK) | (2 << NIBBLE_3_SHIFT); // Make sure we can only get XP for brewing this once +L_mopox_cure_win_quick: + close; + +L_close: + close; + S_Update_Var: set QUEST_Forestbow_state, (QUEST_Forestbow_state & ~(@Q_MASK) diff --git a/npc/021-2_Tulimshar/bakery.txt b/npc/021-2_Tulimshar/bakery.txt index 7116503f..6458c781 100644 --- a/npc/021-2_Tulimshar/bakery.txt +++ b/npc/021-2_Tulimshar/bakery.txt @@ -4,7 +4,91 @@ 021-2.gat,95,21,0 script Riskim 148,{ mes "[Riskim]"; mes "\"Welcome to our bakery!\""; + + callfunc "KadiyaSubquestConsts"; + if ((@Q_kadiya_status == @Q_STATUS_WANTS_CHOCOCAKE) && (countitem ("MopoxCurePotion") > 0)) + goto L_lace_chococake; + + if ((@Q_kadiya_status == @Q_STATUS_WANTS_ORANGECUPCAKE) && (countitem ("MopoxCurePotion") > 0)) + goto L_lace_cupcake; + close; + +L_lace_chococake: + next; + + menu + "Thanks! Let me have a look around...", L_end, + "Can you put this potion into a chocolate cake?", -, + "Goodbye!", L_end; + + mes "[Riskim]"; + mes "As you show him the potion, Riskim leans back, away from it."; + mes "\"Ooooh, I remember that smell...\""; + mes "\"Elanore's Mopox potion, right? She made me drink that, too...\""; + mes "He chuckles."; + mes "\"Yes, well, you do want to hide that.\""; + next; + + mes "[Riskim]"; + mes "\"We'll need extra chocolate for that one. If you can give me ten pieces of chocolate and that potion, plus 400 GP, I will bake you a special chocolate cake that hides the taste.\""; + next; + + menu + "I will get them for you.", L_end, + "Here you are!", -, + "Maybe later.", L_end; + + if (countitem("ChocolateBar") < 10) + goto L_lacking_ingredients; + if (countitem("MopoxCurePotion") < 1) + goto L_lacking_ingredients; + if (zeny < 400) + goto L_lacking_zeny; + delitem "MopoxCurePotion", 1; + delitem "ChocolateBar", 10; + getitem "LacedChocolateCake", 1; + set zeny, zeny - 400; + + mes "[Riskim]"; + mes "\"Please have a seat.\""; + mes "You watch at Riskim melts the chocolate and stirs in the potion, then glazes a cake with it."; + mes "\"It's a bit more chocolaty than your average chocolate cake, of course...\""; + next; + + mes "[Riskim]"; + mes "Riskim hands you the cake."; + mes "\"Here you are. I hope that this works.\""; + close; + +L_lacking_zeny: + mes "[Riskim]"; + mes "\"I'm sorry, but I have to charge 400 GP.\""; + close; + +L_lacking_ingredients: + mes "[Riskim]"; + mes "\"Sorry, but I need ten chocolate bars AND your cure potion for this. Please come back later when you have everything.\""; + close; + +L_lace_cupcake: + next; + + menu + "Thanks! Let me have a look around...", L_end, + "Can you put this potion into an orange cupcake?", -, + "Goodbye!", L_end; + + mes "[Riskim]"; + mes "\"Orange cupcakes? Oh dear... I'm sorry, but I have a very bad orange allergy.\""; + next; + mes "[Riskim]"; + mes "\"Perhaps the Chef at Dimond's Cove can help you? We get all our cupcakes from him.\""; + next; + +L_end: + close; + } // Server? diff --git a/npc/024-1_Tulimshar_Canyon/ched.txt b/npc/024-1_Tulimshar_Canyon/ched.txt index 2f935364..43dd832e 100644 --- a/npc/024-1_Tulimshar_Canyon/ched.txt +++ b/npc/024-1_Tulimshar_Canyon/ched.txt @@ -5,9 +5,29 @@ if (isin("024-1.gat", 66, 43, 80, 54)) goto L_Canyon; mes "[Ched]"; - mes "\"I'm a student here.\""; + mes "\"I'm trying to get a spell to work. It's supposed to combine two potions, but I can't seem to figure out which two those are...\""; + next; + + menu + "Well, good luck with that!", L_Done, + "What spell is that?", -; + + + mes "[Ched]"; + mes "\"Well, I don't know what it's called... I took it out of `Timbleweed's Advanced Transmutations.' It seems awfully hard to cast, somehow.\""; + next; + + mes "[Ched]"; + mes "\"Well, the invocation is `" + getspellinvocation("merge-concentration-potions") + "'. You're supposed to just hold up the potions and cast it, and then they're supposed to merge.\""; close; + mes "[Ched]"; + mes "\"Maybe I should go back to `detect magic' until I can cast that one properly.\""; + close; + +L_Done: + close; + L_Garden: if (BaseLevel < 40) goto L_Warp; mes "[Ched]"; |