From aacf6527a0ae9d440f9271906400825c9722275f Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 27 Dec 2008 22:22:21 -0700 Subject: Magic quests 0, 2, 4 --- npc/001-1_Tulimshar/bard.txt | 145 +++++++++++++++++++++++++++++++++++++++- npc/001-1_Tulimshar/elanore.txt | 129 +++++++++++++++++++++++++++++++++++ 2 files changed, 273 insertions(+), 1 deletion(-) (limited to 'npc/001-1_Tulimshar') diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index 8d53fc72..d361b860 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -1,10 +1,153 @@ // -001-1.gat,50,44,0 script Bard 152,{ +001-1.gat,37,73,0 script Bard 152,{ setarray @songs$, "\"There once was a bard, who had it hard, because a man in dark green, was very mean.\"", "\"At Hurnscald inn, there was a person of fairest skin, declining wedding bands from quite a many hands.\"", "\"As the Sun sets down in the forest's brown, she whom the fragrance holds counts her gold.\""; set @id, rand(3); + mes "[Bill Wobbleball the Bard]"; + if (Sex) + mes "\"Greetings, traveler! Have you come to listen to my stories?\""; + if (!Sex) + mes "\"Greetings, fair lady! Well met, on such a lovely day! Might I entertain you with a tale or two?\""; + next; + +L_Main: + menu "Sing me a song, lute man!", L_Song, + "Have you heard any news?", L_News, + "What do you know about...", L_Question, + "Farewell!", -; + close; + +L_News: + mes "[Bill Wobbleball the Bard]"; + mes "\"News I have for you indeed, lest you have already overheard (for then it would no longer be news to you!)\""; + next; + mes "[Bill Wobbleball the Bard]"; + mes "\"Rumor has it that an ancient source of magic, a Mana Seed, has been sighted in the west, beyond the fair town of Hurnscald.\""; + next; + set MFLAG, MFLAG | MFLAG_MANASEED_RUMOUR; + mes "[Bill Wobbleball the Bard]"; + mes "\"Whence it came, nobody knows... but they say that sometimes such Mana Seeds may choose a powerful individual to impart some of its mystic power to!\""; + next; + mes "[Bill Wobbleball the Bard]"; + mes "\"I wonder who might be qualified?\""; + next; + goto L_Main; + +L_Question: + set @QQ_ELANORE, 1; + set @QQ_MANASEED, 2; + set @QQ_WYARA, 3; + set @QQ_SAGATHA, 4; + set @QQ_AULDSBEL, 5; + + setarray @choice$, "", "", "", "", "", ""; + set @choices_nr, 0; + setarray @choice_idx, 0, 0, 0, 0, 0, 0; + + set @choice$[@choices_nr], "...Elanore the Healer?"; + set @choice_idx[@choices_nr], @QQ_ELANORE; + set @choices_nr, @choices_nr + 1; + + if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) + goto L_Q_post_manaseed; + set @choice$[@choices_nr], "...the Mana Seed?"; + set @choice_idx[@choices_nr], @QQ_MANASEED; + set @choices_nr, @choices_nr + 1; +L_Q_post_manaseed: + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) + goto L_Q_post_wyara; + set @choice$[@choices_nr], "...Wyara the Witch?"; + set @choice_idx[@choices_nr], @QQ_WYARA; + set @choices_nr, @choices_nr + 1; +L_Q_post_wyara: + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) + goto L_Q_post_sagatha; + set @choice$[@choices_nr], "...Sagatha the Witch?"; + set @choice_idx[@choices_nr], @QQ_SAGATHA; + set @choices_nr, @choices_nr + 1; +L_Q_post_sagatha: + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) + goto L_Q_post_auldsbel; + set @choice$[@choices_nr], "...Auldsbel the Wizard?"; + set @choice_idx[@choices_nr], @QQ_AULDSBEL; + set @choices_nr, @choices_nr + 1; +L_Q_post_auldsbel: + + set @choice$[@choices_nr], "...never mind."; + set @choice_idx[@choices_nr], 0; + set @choices_nr, @choices_nr + 1; + + menu @choice$[0], -, + @choice$[1], -, + @choice$[2], -, + @choice$[3], -, + @choice$[4], -; + + set @menu, @menu - 1; + + if (@menu >= @choices_nr) + set @menu, 0; + + set @c, @choice_idx[@menu]; + + if (@c == 0) goto L_Main; + if (@c == @QQ_ELANORE) goto L_Q_elanore; + if (@c == @QQ_MANASEED) goto L_Q_manaseed; + if (@c == @QQ_WYARA) goto L_Q_wyara; + if (@c == @QQ_SAGATHA) goto L_Q_sagatha; + if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; + close; + +L_Q_elanore: + mes "[Bill Wobbleball the Bard]"; + mes "\"Elanore is this town's healer. Rumor has it that she traveled far and wide when she was younger, to learn the deepest secrets of healing magic, after her brother caught a mysterious illness.\""; + next; + goto L_Main; + +L_Q_manaseed: + mes "[Bill Wobbleball the Bard]"; + mes "\"The Mana Seed is said to be a source of great magic. Perhaps some witch or wizard might know more about it?\""; + next; + goto L_Main; + +L_Q_wyara: + mes "[Bill Wobbleball the Bard]"; + mes "\"Wyara is not actually from Hurnscald. As a young witch, she decided to settle down there to help the people of Hurnscald. She is kind and gentle, except towards the Doctor, who seems to have little respect for her potions.\""; + next; + goto L_Main; + +L_Q_sagatha: + mes "[Bill Wobbleball the Bard]"; + mes "\"Sagatha! Ah, such a wonderful and mysterious being; the center of many a tale...\""; + next; + mes "[Bill Wobbleball the Bard]"; + mes "\"Some say that she is the most powerful witch in all of Argaes. I don't know whether that is true, but I am quite certain that the is the most beautiful of all the witches! Alas, she will let no man touch her...\""; + mes "He sighs."; + next; + mes "[Bill Wobbleball the Bard]"; + mes "\"I met her only twice, back in my traveling days, but there are two pieces of advice I can give you:\""; + next; + mes "[Bill Wobbleball the Bard]"; + mes "\"First, she will suffer no fool easily, particularly no man.\""; + next; + mes "[Bill Wobbleball the Bard]"; + mes "\"Second, the creatures of the forest mean everything to her. Harm them, and you may find her an enemy-- and a powerful one at that...\""; + next; + goto L_Main; + +L_Q_auldsbel: + mes "[Bill Wobbleball the Bard]"; + mes "\"Auldsbel is some wizard from further north, from what I have gathered. He bought a hut near Hurnscald some years back and often comes here to experiment on things, probably because he is not allowed to do these experiments where he comes from.\""; + next; + goto L_Main; + + +L_Song: mes @songs$[@id]; close; } diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 4171e54f..99d52b3f 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -2,6 +2,8 @@ 001-1.gat,58,68,0 script Elanore 108,{ + set @has_magic, getskilllv(SKILL_MAGIC); + if (baselevel > 10) goto L_NoHeal; set @TEMP,rand(4); @@ -78,7 +80,10 @@ Heal_4: close; L_NoHeal: + if (MAGIC_FLAGS) + goto L_Chat; +L_NoHealMessage: mes "[Elanore the Healer]"; mes "\"I'm sorry but unless you are young and in need, I can't help you, and your level is already higher than ten."; mes "With so many people still injured from the earthquake, I really have no time to help."; @@ -86,5 +91,129 @@ L_NoHeal: close; +L_Chat: + mes "[Elanore the Healer]"; + mes "\"Hello! Can I help you?\""; + next; +L_Main: + if (@has_magic) + menu + "Can you heal me?", L_NoHealMessage, + "Can you teach me magic?", L_Teach, + "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; + +L_Teach: + close; + +L_Question: + set @QQ_MANAPOTION, 1; + set @QQ_MANASEED, 2; + set @QQ_WYARA, 3; + set @QQ_SAGATHA, 4; + set @QQ_AULDSBEL, 5; + + setarray @choice$, "", "", "", "", "", ""; + set @choices_nr, 0; + setarray @choice_idx, 0, 0, 0, 0, 0, 0; + + if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) + goto L_Q_post_manaseed; + set @choice$[@choices_nr], "...the Mana Seed?"; + set @choice_idx[@choices_nr], @QQ_MANASEED; + set @choices_nr, @choices_nr + 1; +L_Q_post_manaseed: + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) + goto L_Q_post_manapotion; + set @choice$[@choices_nr], "...Mana Potions?"; + set @choice_idx[@choices_nr], @QQ_MANAPOTION; + set @choices_nr, @choices_nr + 1; +L_Q_post_manapotion: + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) + goto L_Q_post_wyara; + set @choice$[@choices_nr], "...Wyara the Witch?"; + set @choice_idx[@choices_nr], @QQ_WYARA; + set @choices_nr, @choices_nr + 1; +L_Q_post_wyara: + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) + goto L_Q_post_sagatha; + set @choice$[@choices_nr], "...Sagatha the Witch?"; + set @choice_idx[@choices_nr], @QQ_SAGATHA; + set @choices_nr, @choices_nr + 1; +L_Q_post_sagatha: + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) + goto L_Q_post_auldsbel; + set @choice$[@choices_nr], "...Auldsbel the Wizard?"; + set @choice_idx[@choices_nr], @QQ_AULDSBEL; + set @choices_nr, @choices_nr + 1; +L_Q_post_auldsbel: + + set @choice$[@choices_nr], "...never mind."; + set @choice_idx[@choices_nr], 0; + set @choices_nr, @choices_nr + 1; + + menu @choice$[0], -, + @choice$[1], -, + @choice$[2], -, + @choice$[3], -, + @choice$[4], -; + + set @menu, @menu - 1; + + if (@menu >= @choices_nr) + set @menu, 0; + + set @c, @choice_idx[@menu]; + + if (@c == 0) goto L_Main; + if (@c == @QQ_MANASEED) goto L_Q_manaseed; + if (@c == @QQ_MANAPOTION) goto L_Q_manapotion; + if (@c == @QQ_WYARA) goto L_Q_wyara; + if (@c == @QQ_SAGATHA) goto L_Q_sagatha; + if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; + close; + +L_Q_manaseed: + mes "[Elanore the Healer]"; + mes "She smiles."; + mes "\"If the rumors are true and there really is a Mana Seed, then that would be wonderful news-- perhaps we will have a few more healers soon!\""; + next; + goto L_Main; + +L_Q_manapotion: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but I can't help you with that.\""; + next; + goto L_Main; + +L_Q_wyara: + mes "[Elanore the Healer]"; + mes "\"Wyara is the Hurnscald town witch. She was also the town healer before the Doctor moved there.\""; + next; + goto L_Main; + +L_Q_sagatha: + mes "[Elanore the Healer]"; + mes "\"Oh, I have only met Sagatha once or twice, while collecting herbs. She is a warm and gentle person, but she tries to hide it.\""; + next; + goto L_Main; + +L_Q_auldsbel: + mes "[Elanore the Healer]"; + mes "\"Oh, sorry-- I don't really know him very well.\""; + next; + goto L_Main; + + + } -- cgit v1.2.3-60-g2f50 From 8e2419ffd3aa0cc4e564e82b2cfac0b227a7af05 Mon Sep 17 00:00:00 2001 From: Fate Date: Wed, 31 Dec 2008 11:35:01 -0700 Subject: Pre-planned level 0 spells all available (except for 'make sulphur' and 'detect magic') --- conf/magic.conf | 69 +++++++++-- db/const.txt | 4 +- npc/001-1_Tulimshar/children.txt | 32 +++-- npc/001-1_Tulimshar/elanore.txt | 178 +++++++++++++++++++++++++++- npc/002-3_Desert_mines/miners.txt | 10 +- npc/008-1_Hurnscald_outskirts/hinnak.txt | 131 +++++++++++++++++++- npc/009-3_Cave_beneath_Hurnscald/sword.txt | 126 ++++++++++++++++++++ npc/011-1_Woodland/alchemist.txt | 71 ++++++++++- npc/011-1_Woodland/auldsbel.txt | 89 +++++++++++++- npc/012-1_Woodland_Hills/injured-mouboo.txt | 17 +-- npc/013-1_Woodland_hills/sagatha.txt | 101 ++++++++++++++++ npc/015-1_Woodland/sword.txt | 155 ++++++++++++++++++++++++ npc/functions/mob_points.txt | 35 +++++- 13 files changed, 975 insertions(+), 43 deletions(-) create mode 100644 npc/009-3_Cave_beneath_Hurnscald/sword.txt create mode 100644 npc/015-1_Woodland/sword.txt (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf b/conf/magic.conf index 21a8ddf8..83fe031d 100644 --- a/conf/magic.conf +++ b/conf/magic.conf @@ -48,6 +48,8 @@ CONST SCRIPT_XP_MASK = 0xffff CONST SCRIPT_XP_SHIFT = 0 CONST SCRIPT_LASTSPELL_MASK = 0xff CONST SCRIPT_LASTSPELL_SHIFT = 16 +CONST SCRIPT_HEALSPELL_MASK = 0xff +CONST SCRIPT_HEALSPELL_SHIFT = 24 CONST DEBUG = 0 # Default sfx on caster @@ -60,6 +62,16 @@ PROCEDURE sfx_generic(target) = PROCEDURE set_var(name, mask, shift, value) = set_script_variable(caster, name, script_int(caster, name) & (neg (mask << shift)) | ((value & mask) << shift)); +PROCEDURE gain_heal_xp(value, gain) = # `gain' influences the likelihood of an increase + last_heal_xp = (script_int(caster, SCRIPT_XP) >> SCRIPT_HEALSPELL_SHIFT) & SCRIPT_HEALSPELL_MASK; + IF (target <> caster + && value > (20 + last_heal_xp + random(last_heal_xp + 1) + random(last_heal_xp + 1))) ( + heal_xp = last_heal_xp + gain; + IF (heal_xp > SCRIPT_HEALSPELL_MASK) + heal_xp = SCRIPT_HEALSPELL_MASK; + set_var(SCRIPT_XP, SCRIPT_HEALSPELL_MASK, SCRIPT_HEALSPELL_SHIFT, heal_xp); + ) + PROCEDURE gain_xp(gain) = IF (level + 3 > skill(caster, MAGIC)) # Level 4 and 5 magic users don't gain anything from spell levels 0 resp. 0+1 THEN ( @@ -214,8 +226,9 @@ SPELL lesser-heal (target : STRING) : "#L00" = THEN (IF ((target = "mouboo" || target = "Mouboo") && rdistance(location(caster), location(npc("Mouboo"))) < 2 + (spellpower / 100)) THEN { mes "Your spell seems to have no effect on the mouboo."; next; close; } - ELSE target = caster); + ELSE target = caster;) ELSE target = pc(target); + CALL gain_heal_xp(100, 1); # report half values for non-instaheal CALL heal(target, 200); CALL gain_xp(1); @@ -272,7 +285,7 @@ SPELL aggravate : "#N00" = LOCAL SPELL summon-maggots : "#A00" = LET level = 0 school = ASTRAL - IN (MANA 21, CASTTIME 6000, + IN (MANA 21, CASTTIME 20000, REQUIRE skill(caster, MAGIC) > level, COMPONENTS ["MaggotSlime"]) => EFFECT CALL adjust_spellpower(school); @@ -384,7 +397,7 @@ SPELL lay-on-hands (target : STRING) : "#L10" = }) ELSE (target = caster; needed = max_hp(target) - hp(target); - )); + )) ELSE (target = pc(target); needed = max_hp(target) - hp(target);) @@ -397,8 +410,7 @@ SPELL lay-on-hands (target : STRING) : "#L10" = ELSE (payment = available; power = (available * 200) / pay_fraction; ) - - instaheal(caster, 0 - payment, 0); + CALL gain_heal_xp(power, 1); CALL quickheal(target, power); status_change(caster, SC_HALT_REGENERATE, 0, 0, 0, 0, 10000); IF ((caster <> target) && (payment >= 100)) @@ -550,6 +562,11 @@ LOCAL SPELL rain : "#N13" = CALL gain_xp(1); range = min(MAX_RAIN_SPELL_RADIUS, 3 + spellpower / 30); area = rbox(location(caster), range); + IF (is_in(location(npc("#DruidTree0#_M", area))) + || is_in(location(npc("#DruidTree1#_M", area)))) { + set @flag, 1; + callfunc "QuestTreeTrigger"; + }; FOR i = 0 TO spellpower DO ( FOR j = 0 TO spellpower / 100 DO ( location = random_location(area); @@ -583,7 +600,7 @@ SPELL barrier (target : PC) : "#A10" = LOCAL SPELL summon-scorps : "#A11" = LET level = 1 school = ASTRAL - IN (MANA 33, CASTTIME 3000, + IN (MANA 33, CASTTIME 20000, REQUIRE skill(caster, MAGIC) > level, REQUIRE skill(caster, school) > level, COMPONENTS ["ScorpionStinger"]) @@ -595,7 +612,7 @@ LOCAL SPELL summon-scorps : "#A11" = LOCAL SPELL summon-red-scorps : "#A12" = LET level = 1 school = ASTRAL - IN (MANA 39, CASTTIME 3000, + IN (MANA 39, CASTTIME 20000, REQUIRE skill(caster, MAGIC) > level, REQUIRE skill(caster, school) > level, COMPONENTS ["RedScorpionStinger"]) @@ -646,7 +663,8 @@ SPELL enchant-lifestone : "#G12" = IN (MANA 15, CASTTIME 4000, REQUIRE skill(caster, MAGIC) > level, REQUIRE skill(caster, school) > level, - (COMPONENTS ["BugLeg"] OR COMPONENTS["MaggotSlime"])) + (COMPONENTS ["MaggotSlime"] OR COMPONENTS["BugLeg"] + OR COMPONENTS ["MauveHerb", "AlizarinHerb", "CobaltHerb", "GambogeHerb"])) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); create_item(caster, "LifeStone", 1); @@ -874,3 +892,38 @@ LOCAL SPELL mouboo-smell : "#s" = FOREACH PC p IN rbox(location(caster), 30) DO message(p, "You notice a strange smell all around you."); + + +PROCEDURE hug_tree(target) = + IF (target = "" + || target = "tree" || target = "tree*" + || target = "Tree" || target = "Tree*" + || target = "druid" || target = "druid*" + || target = "Druid" || target = "Druid*") { + set @flag, 2; + callfunc "QuestTreeTrigger"; + }; + +NONMAGIC SPELL hug0 (target : STRING) : "hug" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug1 (target : STRING) : "*hug*" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug2 (target : STRING) : "*hug" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug3 (target : STRING) : "hugs" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug4 (target : STRING) : "*hugs*" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); + +NONMAGIC SPELL hug5 (target : STRING) : "*hugs" = REQUIRE ((rdistance(location(caster), location(npc("#DruidTree0#_M"))) <= 1 + || rdistance(location(caster), location(npc("#DruidTree1#_M"))) <= 1)) + => EFFECT CALL hug_tree(target); diff --git a/db/const.txt b/db/const.txt index a2d4788a..43739b9b 100644 --- a/db/const.txt +++ b/db/const.txt @@ -195,4 +195,6 @@ MFLAG_KNOWS_SAGATHA 64 // Character has met Sagatha MFLAG_KNOWS_MANAPOTION 128 // Has heard about the mana potion MFLAG_MANASEED_RUMOUR 256 // Has heard rumour about mana seed - +MFLAG_KNOWS_CUTTREE 512 // Knows about the `cut the tree' quest +MFLAG_DID_CUTTREE 1024 // Did cut off a branch from the druid tree +MFLAG_KNOWS_DRUIDTREE 2048 // Knows about the druid tree quest 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; } -- cgit v1.2.3-60-g2f50 From 07e3793f15a3da083628c5af3ae8b06a5bf70c97 Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 4 Jan 2009 02:20:51 -0700 Subject: Advancing in life, transmutation, and war magic. Also added half a story to the Bard. --- npc/001-1_Tulimshar/bard.txt | 162 ++++++++++++++++++++++++++--- npc/001-1_Tulimshar/elanore.txt | 47 +++++++++ npc/009-3_Cave_beneath_Hurnscald/sword.txt | 34 +++--- npc/011-1_Woodland/auldsbel.txt | 74 +++++++++++++ npc/015-1_Woodland/sword.txt | 121 +++++++++++++++++---- 5 files changed, 389 insertions(+), 49 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index d361b860..924a9cfa 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -5,7 +5,8 @@ "\"At Hurnscald inn, there was a person of fairest skin, declining wedding bands from quite a many hands.\"", "\"As the Sun sets down in the forest's brown, she whom the fragrance holds counts her gold.\""; set @id, rand(3); - mes "[Bill Wobbleball the Bard]"; + set @name, "Bill Ballshaker the Bard"; + mes "[" + @name + "]"; if (Sex) mes "\"Greetings, traveler! Have you come to listen to my stories?\""; if (!Sex) @@ -16,21 +17,22 @@ L_Main: menu "Sing me a song, lute man!", L_Song, "Have you heard any news?", L_News, "What do you know about...", L_Question, + "Can you tell me a story?", L_Tales, "Farewell!", -; close; L_News: - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"News I have for you indeed, lest you have already overheard (for then it would no longer be news to you!)\""; next; - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"Rumor has it that an ancient source of magic, a Mana Seed, has been sighted in the west, beyond the fair town of Hurnscald.\""; next; set MFLAG, MFLAG | MFLAG_MANASEED_RUMOUR; - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"Whence it came, nobody knows... but they say that sometimes such Mana Seeds may choose a powerful individual to impart some of its mystic power to!\""; next; - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"I wonder who might be qualified?\""; next; goto L_Main; @@ -104,49 +106,181 @@ L_Q_post_auldsbel: close; L_Q_elanore: - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"Elanore is this town's healer. Rumor has it that she traveled far and wide when she was younger, to learn the deepest secrets of healing magic, after her brother caught a mysterious illness.\""; next; goto L_Main; L_Q_manaseed: - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"The Mana Seed is said to be a source of great magic. Perhaps some witch or wizard might know more about it?\""; next; goto L_Main; L_Q_wyara: - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"Wyara is not actually from Hurnscald. As a young witch, she decided to settle down there to help the people of Hurnscald. She is kind and gentle, except towards the Doctor, who seems to have little respect for her potions.\""; next; goto L_Main; L_Q_sagatha: - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"Sagatha! Ah, such a wonderful and mysterious being; the center of many a tale...\""; next; - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"Some say that she is the most powerful witch in all of Argaes. I don't know whether that is true, but I am quite certain that the is the most beautiful of all the witches! Alas, she will let no man touch her...\""; mes "He sighs."; next; - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"I met her only twice, back in my traveling days, but there are two pieces of advice I can give you:\""; next; - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"First, she will suffer no fool easily, particularly no man.\""; next; - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"Second, the creatures of the forest mean everything to her. Harm them, and you may find her an enemy-- and a powerful one at that...\""; next; goto L_Main; L_Q_auldsbel: - mes "[Bill Wobbleball the Bard]"; + mes "[" + @name + "]"; mes "\"Auldsbel is some wizard from further north, from what I have gathered. He bought a hut near Hurnscald some years back and often comes here to experiment on things, probably because he is not allowed to do these experiments where he comes from.\""; next; goto L_Main; +L_Tales: + mes "[" + @name + "]"; + mes "\"With pleasure! What would you like to hear about? Would you like to hear about the founding of Tulimshar, or about the fall of Grenxen?\""; + next; + + menu + "Founding of Tulimshar", L_Tale_0, + "Fall of Grenxen", L_Tale_1, + "Nothing, really.", -; + close; + +L_Tale_0: + mes "[" + @name + "]"; + mes "\"Many centuries ago, this here was a barren wasteland-- rocks and water, devoid of any life. Only the occasional scorpion would pass by, perhaps in vain hope of finding a forgotten insect or half-dead snake to prey on.\""; + next; + + mes "[" + @name + "]"; + mes "\"But somewhere south of here there was a great oasis, the only source of water and life far and wide. So large was this oasis that even a heard of mouboos lived there, among pinkies and fluffies.\""; + next; + + mes "[" + @name + "]"; + mes "\"Palm trees grew there, more than twice as big as the ones we have here, and mananas grew on those trees. Wild bushes with berries, too-- greenberries and hayberries and manaberries. It was a haven not only for animals, but also for human travelers: for both the nomads and the brigands that roamed the land.\""; + next; + + mes "[" + @name + "]"; + mes "\"In the south, much further south than that, there stood a citadel and a city around it, ruled by Sesmar the Silver, son of Sesmar the Golden, Pecarch of Potamia, for his realm was the empire of Potamia, the greatest empire of this age.\""; + next; + + mes "[" + @name + "]"; + mes "\"Sesmar ruled with an iron fist. He built statues and temples and walls and armies, and a reputation for successful and ruthless warfare. Unlike his father, whose time had been a time of peace, Sesmar the Silver yearned for conquest: he wanted no less than to be ruler of the entire world.\""; + next; + + mes "[" + @name + "]"; + mes "\"So Sesmar built a great fleet, and catapults, and siege machines; he raised an army the likes of which the world had never seen before.\""; + next; + + mes "[" + @name + "]"; + mes "\"Then he built a chariot for himself, plated with silver and flaring in the sun, so as to blind his enemies. So large and heavy was the chariot that it had to be pulled by a dozen trained war mouboos, each mouboo shielded by a polished steel harness.\""; + next; + + mes "[" + @name + "]"; + mes "\"In this chariot he let his troops into battle. 'Zergamur', they called it, after the legendary silver dragon, for where it had plowed, no man was left standing.\""; + next; + + mes "[" + @name + "]"; + mes "\"And into battle he rode, over and over, and one kingdom after another fell before his force.\""; + next; + + mes "[" + @name + "]"; + mes "\"But not far north of his capital, resistance formed. Troops loyal to defeated leaders, monarchs wary of Sesmar, merchants and priests who had been driven out by Sesmar, but also some of Sesmar's former most trusted allies\""; + next; + + mes "[" + @name + "]"; + mes "\"Hurn the marksman was one of them, but that is another story, to be told another time.\""; + next; + + mes "[" + @name + "]"; + mes "\"But their leader was Bekel, once one of Sesmar's generals. He had seen his master the Pecarch's true intentions and intended to have no part his goals.\""; + next; + + mes "[" + @name + "]"; + mes "\"Bekel led the alliance south from here. With their combined force, they took the capital of Potamia with ease, for Sesmar had withdrawn most of his troops to fight or as garrison for newly conquered areas.\""; + next; + + mes "[" + @name + "]"; + mes "\"The Pecarch's revenge was swift and cruel. When his armies returned, he retook the city in a single night, and anyone who had been found not loyal to him was put to death.\""; + next; + + mes "[" + @name + "]"; + mes "\"The alliance troops fled north, Sesmar on their heels. \""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + close; + +L_Tale_1: + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + mes "[" + @name + "]"; + mes "\"\""; + next; + + close; + L_Song: mes @songs$[@id]; close; diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index fabb0e24..9fa5f7cb 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -270,7 +270,54 @@ L_Teach_Initial_Noroom: close; L_Teach_CheckAdvanceTo2: + mes "[Elanore the Healer]"; + if (@Q_heal_exp < 30) + goto L_Teach_CheckAdvanceTo2_fail; + mes "Elanore smiles at you."; + mes "\"From what I have been hearing, you seem to be doing well on your way to becoming a healer. I have decided to accept you as a student of the School of Life Magic.\""; + next; + + if (getskilllv(SKILL_MAGIC) < 2) + goto L_Teach_AdvanceTo2_warn; + + goto L_Teach_AdvanceTo2_skip; +L_Teach_AdvanceTo2_warn: + mes "[Elanore the Healer]"; + mes "\"But be warned: you won't be able to use advanced healing magic until you are more capable in your regular magic usage.\""; + next; +L_Teach_AdvanceTo2_skip: + + mes "[Elanore the Healer]"; + mes "\"Please stand still.\""; + mes "She walks up to you, holds your shoulders, and smiles at you."; + next; + + mes "[Elanore the Healer]"; + mes "Then, she rises up on her tiptoes and kisses you on your forehead."; + next; + + mes "[Elanore the Healer]"; + mes "You feel a strange, tingling kind of warmth spread through your body."; + mes "[5000 experience points]"; + mes "[Level 2 in Life Magic]"; + + set @Q_status, @STATUS_MASTERED_LIGHT_HEAL; + callsub S_update_var; + getexp 5000, 0; + if (getskilllv(SKILL_MAGIC_LIFE) < 2) + skill SKILL_MAGIC_LIFE, 2; + close; + +L_Teach_CheckAdvanceTo2_fail: + mes "\"I think I would like to observe you for a little longer to see if you would make a good healer.\""; + if (@Q_heal_exp < 5) + mes "\"You are still at the beginning of your path, but do keep practicing.\""; + if ((@Q_heal_exp >= 5) && (@Q_heal_exp < 20) + mes "\"You are making progress, but you still need more practice.\""; + if (@Q_heal_exp >= 20) + mes "\"You have made good progress, but please do continue in your efforts.\""; close; + L_Teach_CheckAdvanceToLOH: close; diff --git a/npc/009-3_Cave_beneath_Hurnscald/sword.txt b/npc/009-3_Cave_beneath_Hurnscald/sword.txt index a99c4a6b..b042bce7 100644 --- a/npc/009-3_Cave_beneath_Hurnscald/sword.txt +++ b/npc/009-3_Cave_beneath_Hurnscald/sword.txt @@ -11,31 +11,32 @@ L_message: set @STATUS_INITIAL, 0; set @STATUS_LEARNED_FLAREDART, 1; set @STATUS_LEARNED_MAGICBLADE, 2; + set @STATUS_LEVEL2, 3; 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; + if (@Q_status == @STATUS_LEARNED_MAGICBLADE) goto L_PostFlareDart_teach; - mes "[Mystic Sword]"; + mes "[Magic Sword]"; mes "Come back when thou art stronger."; next; close; L_Initial: - mes "[Mystic Sword]"; + mes "[Magic 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 "[Magic Sword]"; mes "Well, either you are going mad, or that sword in the stone is talking to you."; next; - mes "[Mystic Sword]"; + mes "[Magic Sword]"; mes "Or, well, both."; next; - mes "[Mystic Sword]"; + mes "[Magic 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; @@ -48,13 +49,13 @@ L_Initial: "Can I help?", -, "Can you teach me magic?", -; - mes "[Mystic Sword]"; + mes "[Magic Sword]"; mes "There is no answer."; next; close; L_PostFlareDart: - mes "[Mystic Sword]"; + mes "[Magic Sword]"; mes "As you look at the sword, you hear a deep voice resounding in your head."; mes "\"Welcome, mortal!\""; next; @@ -67,13 +68,13 @@ L_PostFlareDart: close; L_PostFlareDart_hi: - mes "[Mystic Sword]"; + mes "[Magic 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 "[Magic 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; @@ -81,11 +82,11 @@ L_PostFlareDart_sister: menu "She asked me to ask you to teach me a spell.", -; L_PostFlareDart_teach: - mes "[Mystic Sword]"; + mes "[Magic 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 "[Magic 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; @@ -94,30 +95,31 @@ L_PostFlareDart_teach: "Yes.", -, "No.", L_Close; - mes "[Mystic Sword]"; + mes "[Magic Sword]"; mes "\"So thou art bound to the path of War, as am I, as is my sister...\""; next; - mes "[Mystic Sword]"; + mes "[Magic 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 "[Magic 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 "[Magic 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) diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index 30124d79..31bd7811 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -27,10 +27,12 @@ set @ASH, 701; set @SULPHUR, 703; set @IRONPOWDER, 704; + set @MOUBOO_FIGURINE, 728; 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_STATUS_STUDENT, 3; // accepted as student set @Q_wants_sulphur, (QUEST_MAGIC & NIBBLE_6_MASK); @@ -895,6 +897,7 @@ L_component_quest_missing: L_learn_spell: if (@Q_main_status == @Q_STATUS_INITIATION) goto LL_initiation; + if (@Q_main_status == @Q_STATUS_STUDENT) goto LL_student_start; 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?\""; @@ -914,12 +917,83 @@ L_learn_spell: callsub S_update_var; goto L_main_menu; +LL_repeat_spell: + mes "[Auldsbel the Wizard]"; + mes "\"The invocation is 'kular', followed by the last syllable of the name of the creature you want to shape the log into. But this only works if you know the old Tritan name of the creature.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"And make sure to keep notes of your spells! In the future, I will only tell you once.\""; + next; + + goto L_main_menu; + LL_initiation: mes "[Auldsbel the Wizard]"; mes "\"So, have you managed to transmute something?\""; next; + + if (countitem(@MOUBOO_FIGURINE)) + menu + "Not yet.", -, + "How about this mouboo figurine?", LL_initiation_check; + if (!countitem(@MOUBOO_FIGURINE)) + menu + "Not yet.", -, + "What was the spell again?", LL_repeat_spell; + + goto L_main_menu; + +LL_initiation_fail; + mes "[Auldsbel the Wizard]"; + mes "\"No, no, no. This is no good-- too many imperfections.\""; + mes "He throws it away."; + mes "\"Keep practicing-- and make sure to vary the spells you cast a little; that will make it easier to learn.\""; + next; + goto L_main_menu; + +LL_initiation_check: + if (!countitem (@MOUBOO_FIGURINE)) + goto L_main_menu; + delitem (@MOUBOO_FIGURINE); + set @mexp, MAGIC_EXPERIENCE & 65535; + + mes "[Auldsbel the Wizard]"; + mes "Auldsbel inspects your figurine."; + next; + + if (@mexp < 40) + goto LL_initiation_fail; + + mes "[Auldsbel the Wizard]"; + mes "Auldsbel nods."; + mes "\"This looks good.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "He pockets the figurine."; + mes "\"Very well, then. I shall accept you as my student.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "Auldsbel presses his index and middle finger against your forehead."; + mes "\"Accept my blessing!\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "You feel new powers curse flowing into your body!"; + mes "[5000 experience points]"; + mes "[Level 2 in Transmutation Magic]"; + + set @Q_status, @Q_STATUS_STUDENT; + callsub S_update_var; + getexp 5000, 0; + if (getskilllv(SKILL_MAGIC_TRANSMUTE) < 2) + skill SKILL_MAGIC_TRANSMUTE, 2; goto L_main_menu; +LL_student_start: + S_update_var: set @Q_status, @Q_main_status | (@Q_component_quest << 5); set QUEST_MAGIC, diff --git a/npc/015-1_Woodland/sword.txt b/npc/015-1_Woodland/sword.txt index 07b2d9b6..a32b3b13 100644 --- a/npc/015-1_Woodland/sword.txt +++ b/npc/015-1_Woodland/sword.txt @@ -11,28 +11,29 @@ L_message: set @STATUS_INITIAL, 0; set @STATUS_LEARNED_FLAREDART, 1; set @STATUS_LEARNED_MAGICBLADE, 2; + set @STATUS_LEVEL2, 3; 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; + if (@Q_status == @STATUS_LEARNED_MAGICBLADE) goto L_MagicBladeStage; - mes "[Magic Sword]"; + mes "[Mystic Sword]"; mes "\"I have taught thee all I can teach for now.\""; next; close; L_Initial: - mes "[Magic Sword]"; + mes "[Mystic 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 "[Mystic 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 "[Mystic Sword]"; mes "\"What is it is that brings thee to this place?\""; next; @@ -44,24 +45,24 @@ L_Initial: close; L_noq: - mes "[Magic Sword]"; + mes "[Mystic 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 "[Mystic Sword]"; mes "\"Then I wish thee well in thy travels, wanderer!\""; next; close; L_Initial_learn: - mes "[Magic Sword]"; + mes "[Mystic 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 "[Mystic 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; @@ -75,29 +76,29 @@ L_Initial_learn: close; L_Initial_selfish: - mes "[Magic Sword]"; + mes "[Mystic 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 "[Mystic 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 "[Mystic 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 "[Mystic 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 "[Mystic 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; @@ -112,14 +113,14 @@ L_FlareStage: close; L_FlareStage_impolite: - mes "[Magic Sword]"; + mes "[Mystic 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 "[Mystic Sword]"; mes "\"Well met once more, mortal! What brings thee here?\""; next; @@ -130,19 +131,101 @@ L_FlareStage_hello: close; L_FlareStage_moremagic: - mes "[Magic Sword]"; + mes "[Mystic 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 "[Mystic Sword]"; mes "\"I do not know, though I suggest to seek out a local alchemist, if there is any.\""; next; goto L_Farewell; +L_MagicBladeStage: + mes "[Mystic Sword]"; + mes "\"Welcome back! Thou hast now learned two basic spells of War magic.\""; + next; + + mes "[Mystic Sword]"; + mes "\"Dost thou wish to continue thy pursuits of this school of magic?\""; + next; + + menu + "No.", -, + "Yes.", L_Levelup2_yes; + + goto L_Farewell; + +L_Levelup2_yes: + mes "[Mystic Sword]"; + mes "\"Beware of what thou wishest for, mortal...\""; + next; + + if (!MPQUEST) goto L_Levelup2_must_reg; + if (MPQUEST && (Mobpt < 1000)) goto L_Levelup2_must_practice; + + mes "[Mystic Sword]"; + mes "\"Thou hast collected " + Mobpt + " Monster Points. For one thousand of them, I shall admit thee to the school of war magic.\""; + next; + + menu + "OK!", -, + "No... never mind.", L_Farewell; + + set Mobpt, Mobpt - 1000; + + mes "[Mystic Sword]"; + mes "The sword begins to chant in your head!"; + mes " \"Lords of Thunder, Fire, Rage!\""; + mes " \"Grant your powers to this mage,\""; + mes " \"Rising with your dreadful roar,\""; + if (Sex) + mes " \"Answer to his call to War!\""; + if (!Sex) + mes " \"Answer to her call to War!\""; + next; + + mes "[Mystic Sword]"; + mes "Your heart starts pounding, and suddenly you can hear the sound of drums in your head."; + mes "You smell something metallic..."; + next; + + mes "[Mystic Sword]"; + mes "The sensation and the noises vanish as quickly as they came."; + mes "[5000 experience points]"; + mes "[Level 2 in War Magic]"; + + set @Q_status, @STATUS_LEVEL2; + callsub S_update_var; + getexp 5000, 0; + if (getskilllv(SKILL_MAGIC_WAR) < 2) + skill SKILL_MAGIC_WAR, 2; + next; + + mes "[Mystic Sword]"; + mes "\"You have now taken your first true step down the path of war magic. Seek out my brother for thy next spell!\""; + next; + goto L_Farewell; + + +L_Levelup2_must_reg: + mes "[Mystic Sword]"; + mes "\"To learn further magic, thou must advance in the school of war magic. I shall grant thee this advance if thou provest thy worthiness as a warrior.\""; + next; + mes "[Mystic Sword]"; + mes "\"Travel to the city of Tulimshar, and talk to Aidan. Then, collect one thousand Monster Points and return to me.\""; + next; + goto L_Farewell; + +L_Levelup2_must_practice: + mes "[Mystic Sword]"; + mes "\"To advance thy magical powers, I must admit thee to the school of war magic. Prove to me that thou art a worthy warrior by collecting one thousand Monster Points, and return.\""; + next; + goto L_Farewell; + L_Farewell: - mes "[Magic Sword]"; + mes "[Mystic Sword]"; mes "\"Farewell for now!\""; next; close; -- cgit v1.2.3-60-g2f50 From c226d805845e2717b101788c4db5750abcce7c5b Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 4 Jan 2009 02:21:39 -0700 Subject: Removed the Bard's Tale. --- npc/001-1_Tulimshar/bard.txt | 134 ------------------------------------------- 1 file changed, 134 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index 924a9cfa..698a3b3a 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -17,7 +17,6 @@ L_Main: menu "Sing me a song, lute man!", L_Song, "Have you heard any news?", L_News, "What do you know about...", L_Question, - "Can you tell me a story?", L_Tales, "Farewell!", -; close; @@ -148,139 +147,6 @@ L_Q_auldsbel: next; goto L_Main; - -L_Tales: - mes "[" + @name + "]"; - mes "\"With pleasure! What would you like to hear about? Would you like to hear about the founding of Tulimshar, or about the fall of Grenxen?\""; - next; - - menu - "Founding of Tulimshar", L_Tale_0, - "Fall of Grenxen", L_Tale_1, - "Nothing, really.", -; - close; - -L_Tale_0: - mes "[" + @name + "]"; - mes "\"Many centuries ago, this here was a barren wasteland-- rocks and water, devoid of any life. Only the occasional scorpion would pass by, perhaps in vain hope of finding a forgotten insect or half-dead snake to prey on.\""; - next; - - mes "[" + @name + "]"; - mes "\"But somewhere south of here there was a great oasis, the only source of water and life far and wide. So large was this oasis that even a heard of mouboos lived there, among pinkies and fluffies.\""; - next; - - mes "[" + @name + "]"; - mes "\"Palm trees grew there, more than twice as big as the ones we have here, and mananas grew on those trees. Wild bushes with berries, too-- greenberries and hayberries and manaberries. It was a haven not only for animals, but also for human travelers: for both the nomads and the brigands that roamed the land.\""; - next; - - mes "[" + @name + "]"; - mes "\"In the south, much further south than that, there stood a citadel and a city around it, ruled by Sesmar the Silver, son of Sesmar the Golden, Pecarch of Potamia, for his realm was the empire of Potamia, the greatest empire of this age.\""; - next; - - mes "[" + @name + "]"; - mes "\"Sesmar ruled with an iron fist. He built statues and temples and walls and armies, and a reputation for successful and ruthless warfare. Unlike his father, whose time had been a time of peace, Sesmar the Silver yearned for conquest: he wanted no less than to be ruler of the entire world.\""; - next; - - mes "[" + @name + "]"; - mes "\"So Sesmar built a great fleet, and catapults, and siege machines; he raised an army the likes of which the world had never seen before.\""; - next; - - mes "[" + @name + "]"; - mes "\"Then he built a chariot for himself, plated with silver and flaring in the sun, so as to blind his enemies. So large and heavy was the chariot that it had to be pulled by a dozen trained war mouboos, each mouboo shielded by a polished steel harness.\""; - next; - - mes "[" + @name + "]"; - mes "\"In this chariot he let his troops into battle. 'Zergamur', they called it, after the legendary silver dragon, for where it had plowed, no man was left standing.\""; - next; - - mes "[" + @name + "]"; - mes "\"And into battle he rode, over and over, and one kingdom after another fell before his force.\""; - next; - - mes "[" + @name + "]"; - mes "\"But not far north of his capital, resistance formed. Troops loyal to defeated leaders, monarchs wary of Sesmar, merchants and priests who had been driven out by Sesmar, but also some of Sesmar's former most trusted allies\""; - next; - - mes "[" + @name + "]"; - mes "\"Hurn the marksman was one of them, but that is another story, to be told another time.\""; - next; - - mes "[" + @name + "]"; - mes "\"But their leader was Bekel, once one of Sesmar's generals. He had seen his master the Pecarch's true intentions and intended to have no part his goals.\""; - next; - - mes "[" + @name + "]"; - mes "\"Bekel led the alliance south from here. With their combined force, they took the capital of Potamia with ease, for Sesmar had withdrawn most of his troops to fight or as garrison for newly conquered areas.\""; - next; - - mes "[" + @name + "]"; - mes "\"The Pecarch's revenge was swift and cruel. When his armies returned, he retook the city in a single night, and anyone who had been found not loyal to him was put to death.\""; - next; - - mes "[" + @name + "]"; - mes "\"The alliance troops fled north, Sesmar on their heels. \""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - close; - -L_Tale_1: - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - mes "[" + @name + "]"; - mes "\"\""; - next; - - close; - L_Song: mes @songs$[@id]; close; -- cgit v1.2.3-60-g2f50 From b2ec357e68a1b2e692f1c1081c4cc4f11682576a Mon Sep 17 00:00:00 2001 From: Fate Date: Wed, 7 Jan 2009 15:10:18 -0700 Subject: Misc. fixes, added most of Wyara --- db/item_db.txt | 1 + npc/001-1_Tulimshar/bard.txt | 2 +- npc/001-1_Tulimshar/children.txt | 28 ++- npc/001-1_Tulimshar/elanore.txt | 14 +- npc/005-1_Snake_desert/tree.txt | 6 +- npc/008-1_Hurnscald_outskirts/hinnak.txt | 14 +- npc/009-2_Hurnscald/wyara.txt | 420 ++++++++++++++++++++++++++++++- npc/011-1_Woodland/alchemist.txt | 2 +- npc/011-1_Woodland/auldsbel.txt | 12 +- npc/013-1_Woodland_hills/sagatha.txt | 29 +-- 10 files changed, 472 insertions(+), 56 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/db/item_db.txt b/db/item_db.txt index 543b847f..3e5e6bce 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -222,6 +222,7 @@ 730, Lifestone, Lifestone, 3, 0, 0, 1, , , , , , , , , , , , {}, {} 731, AssassinPants, Assassin Pants, 5, 10000, 3000, 10, , 5, , -5, 0, 10477567, 2, 1, , 0, 0, {}, {} 732, DruidTreeBranch, Druid Tree Branch, 3, 0, 0, 2, , , , , , 10477567, , , , , , {}, {} +733, PurificationPotion, Purification Potion, 0, 0, 0, 5, , , , , , 10477567, , , , , , { callfunc "PurificationPotion"; }, {} #ID, Name, Label, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Job, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript} 1198, JackOSoul, Jack O Soul, 3, 100000, 1, 1, , , , , , , , , , , , {}, {} diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index 698a3b3a..5d52f0a6 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -4,7 +4,6 @@ setarray @songs$, "\"There once was a bard, who had it hard, because a man in dark green, was very mean.\"", "\"At Hurnscald inn, there was a person of fairest skin, declining wedding bands from quite a many hands.\"", "\"As the Sun sets down in the forest's brown, she whom the fragrance holds counts her gold.\""; - set @id, rand(3); set @name, "Bill Ballshaker the Bard"; mes "[" + @name + "]"; if (Sex) @@ -148,6 +147,7 @@ L_Q_auldsbel: goto L_Main; L_Song: + set @id, rand(3); mes @songs$[@id]; close; } diff --git a/npc/001-1_Tulimshar/children.txt b/npc/001-1_Tulimshar/children.txt index e2771cf0..452df411 100644 --- a/npc/001-1_Tulimshar/children.txt +++ b/npc/001-1_Tulimshar/children.txt @@ -101,14 +101,30 @@ L_8: 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; + mes "\"I know a very bad word. But I must not say it, because monsters will come and get me if I do!\""; + menu + "A bad word?", L_tell, + "Oh, you better keep it for yourself then.", -; + close; + +L_tell: + mes "[Nina]"; + mes "\"Yes, I heard my mother say it once. And she made me promise her to never say it. Never.\""; + next; + menu "If I promise to never tell anyone, can you tell me the word?", L_keepword, + "I understand, you do not need to tell...", L_giveword, + "Goodbye!", -; + close; + +L_keepword: + mes "[Nina]"; + mes "\"No.\""; + close; -L_badword +L_giveword: mes "[Nina]"; - mes "She looks around nervously, then motions you to come closer."; - mes "\"It's '" + getspellinvocation("aggravate") + "', she whispers in your ear.\""; + mes "Nina looks around as she hushes you to silence. After a few seconds she whispers to you."; + mes "\"I like you! So I will tell you the bad word. But you can't tell anyone else about it! The bad word is '" + getspellinvocation("aggravate") + "'.\""; next; mes "[Nina]"; diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 9fa5f7cb..2efaab93 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -126,7 +126,7 @@ L_Main: menu "Can you heal me?", L_NoHealMessage, "Can you teach me more?", L_Teach, - "Where can I get more lifestones?, L_Lifestones, + "Where can I get more lifestones?", L_Lifestones, "What do you know about...", L_Question; if (!@has_magic) @@ -140,10 +140,10 @@ OnPCKillEvent: set @Q_heal_exp, MAGIC_EXPERIENCE >> 24; if (@Q_heal_exp < 8) goto L_OnPcKillWipe; - @Q_heal_exp = @Q_heal_exp - 8; + set @Q_heal_exp, @Q_heal_exp - 8; goto L_OnPcKillFinish; L_OnPcKillWipe: - @Q_heal_exp = 0; + set @Q_heal_exp, 0; L_OnPcKillFinish: set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24); close; @@ -180,8 +180,8 @@ L_Lifestones_Trade: 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.\""; + 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."; @@ -251,7 +251,7 @@ L_Teach_Initial: next; getinventorylist; - if (@inventorylist_count == 100 && countitem(@LIFESTONE) == 0) + if ((@inventorylist_count == 100) && (countitem(@LIFESTONE) == 0)) goto L_Teach_Initial_Noroom; getitem @LIFESTONE, 1; @@ -312,7 +312,7 @@ L_Teach_CheckAdvanceTo2_fail: mes "\"I think I would like to observe you for a little longer to see if you would make a good healer.\""; if (@Q_heal_exp < 5) mes "\"You are still at the beginning of your path, but do keep practicing.\""; - if ((@Q_heal_exp >= 5) && (@Q_heal_exp < 20) + if ((@Q_heal_exp >= 5) && (@Q_heal_exp < 20)) mes "\"You are making progress, but you still need more practice.\""; if (@Q_heal_exp >= 20) mes "\"You have made good progress, but please do continue in your efforts.\""; diff --git a/npc/005-1_Snake_desert/tree.txt b/npc/005-1_Snake_desert/tree.txt index 1f033c63..d0072259 100644 --- a/npc/005-1_Snake_desert/tree.txt +++ b/npc/005-1_Snake_desert/tree.txt @@ -53,13 +53,13 @@ function script QuestTreeTouch { if (@Q_status == 3) goto L_happy; - if (@Q_KNOWS_CUTTREE && (!(MAGIC_FLAGS & MFLAG_KNOWS_DRUIDTREE))) + if ((MAGIC_FLAGS & (MFLAG_KNOWS_DRUIDTREE | MFLAG_KNOWS_CUTTREE)) == MFLAG_KNOWS_CUTTREE) goto L_cut; - if (!@Q_KNOWS_CUTTREE && ((MAGIC_FLAGS & MFLAG_KNOWS_DRUIDTREE))) + if ((MAGIC_FLAGS & (MFLAG_KNOWS_DRUIDTREE | MFLAG_KNOWS_CUTTREE)) == MFLAG_KNOWS_DRUIDTREE) goto L_water; - if (@Q_KNOWS_CUTTREE && ((MAGIC_FLAGS & MFLAG_KNOWS_DRUIDTREE))) + if ((MAGIC_FLAGS & (MFLAG_KNOWS_DRUIDTREE | MFLAG_KNOWS_CUTTREE)) > 0) //i.e., both are set goto L_both; close; diff --git a/npc/008-1_Hurnscald_outskirts/hinnak.txt b/npc/008-1_Hurnscald_outskirts/hinnak.txt index 96e6e145..cb7503b1 100644 --- a/npc/008-1_Hurnscald_outskirts/hinnak.txt +++ b/npc/008-1_Hurnscald_outskirts/hinnak.txt @@ -107,7 +107,7 @@ L_ThanksAgain: "You shouldn't drink while working!", -; mes "[Farmer Hinnak]"; - mes "\"Well, I'm done for the day...\"; + mes "\"Well, I'm done for the day...\""; menu "Sorry... here you are.", L_GiveBeer, @@ -167,7 +167,7 @@ L_GiveBeer: 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...\""; + mes "\"Then she yells out some gobbledygook 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]"; @@ -178,10 +178,10 @@ L_GiveBeer: mes "\"But all she says is, 'if you'd stayed inside, you wouldn't be wet now'.\""; next; - next + menu "Hahaha!", L_Sagatha_hahaha, "Whoah, scary...", L_Sagatha_scary, - "What was that gobbledygood word?", L_Sagatha_word, + "What was that gobbledygook word?", L_Sagatha_word, "I better go now.", -; goto L_Bye; @@ -189,20 +189,20 @@ L_Sagatha_hahaha: mes "[Farmer Hinnak]"; mes "\"Yeah, funny now... But you should've seen that stare! Ah, well, never mind.\""; next; - close + 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 + close; L_Sagatha_word: mes "[Farmer Hinnak]"; mes "\"Oh, I can be sure... but something like '" + getspellinvocation("summon-maggots") + "', I think.\""; next; - close + close; L_NoBeer: mes "[Farmer Hinnak]"; diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt index f0492368..89f2ea3f 100644 --- a/npc/009-2_Hurnscald/wyara.txt +++ b/npc/009-2_Hurnscald/wyara.txt @@ -1,26 +1,46 @@ +function script PurificationPotion { + announce "Meh.", 7; +} + +// ---------------------------------------- +// Wyara the Hurnscald witch +// ---------------------------------------- 009-2.gat,121,26,0 script Wyara#_M 103,{ + set @Q_MASK, NIBBLE_7_MASK; + set @Q_SHIFT, NIBBLE_7_SHIFT; + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + set @STATUS_INITIAL, 0; + set @STATUS_PURIFY_EXPLAINED, 1; + set @STATUS_PURIFY_ONCE, 2; + set @STATUS_PURIFY_TWICE, 3; set @MAUVE, 680; + set @MAGGOTSLIME, 505; set @BOTTLE_WATER, 541; set @MANAPOTION, 705; + set @PURIFICATIONPOTION, 733; set @has_magic, getskilllv(SKILL_MAGIC); mes "[Wyara the Witch]"; + mes "The witch waves you in."; + mes "\"Hello and welcome! Can I interested you in some potions?\""; next; set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_WYARA; L_Main: - menu "Q: generic", L_Question, - "Q: buy", L_Shop, + menu "No. What do you know about...", L_Question, + "Can you help me learn magic?", L_Magic, + "Yes, I would like to buy potions.", L_Shop, "Bye", -; close; L_Shop: mes "[Wyara the Witch]"; - mes "cf. Potion Shelf behind me"; + mes "\"Please have a look at the shelf behind me.\""; next; - goto L_Main; + close; L_Question: set @QQ_ELANORE, 1; @@ -100,20 +120,23 @@ L_Q_manaseed: if (!@has_magic && (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED)) goto L_Q_manaseed_unabsorbed; mes "[Wyara the Witch]"; - mes "\"FIXME: No idea\""; + mes "\"A mana seed? I'm afraid that I can't help you with that.\""; next; goto L_Main; L_Q_manaseed_unabsorbed: mes "[Wyara the Witch]"; - mes "\"FIXME: Perhaps a mana potion would help\""; + mes "\"So you touched the mana seed but weren't able to absorb its powers? That means that you're lacking a natural magical ability. Still, there are ways around that.\""; + next; + mes "[Wyara the Witch]"; + mes "\"If you drink a mana potion, you should be able to retain this magical power and slowly build up a magical skill.\""; set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_MANAPOTION; next; goto L_Main; L_Q_manapotion: mes "[Wyara the Witch]"; - mes "\"FIXME: Can make one for you: 40 mauve, bottle of water\""; + mes "\"I have a simple recipe for making mana potions, but I don't have one ready right now. Can you bring me 40 mauve leaves and a bottle of water? I can make one from those quite easily.\""; next; menu "OK", L_make_manapotion, "No", L_Main; @@ -128,26 +151,401 @@ L_make_manapotion: getitem @MANAPOTION, 1; mes "[Wyara the Witch]"; - mes "\"FIXME: Here.\""; + mes "Wyara takes your mauve leaves, grinds them, and pours some of the resultant paste into her cauldron. She then takes your bottle and sticks it into her brew, head-first."; + next; + + mes "[Wyara the Witch]"; + mes "The water in the bottle takes on a strange golden hue, but doesn't flow out."; + mes "After a while, she retrieves the bottle, fills some of the liquid into a smaller, clay bottle, mixes in the rest of the paste, plugs the bottle and shakes it."; + next; + + mes "[Wyara the Witch]"; + mes "\"I shall keep the rest of your water and the bottle as a payment, if you don't mind. But here is the potion; let it rest for a minute before you use it for maximum effect.\""; + next; goto L_Main; L_make_manapotion_lack: mes "[Wyara the Witch]"; - mes "\"FIXME: Need: 40 mauve, bottle of water\""; + mes "\"No, we need forty mauve leaves and a bottle of water.\""; + next; + goto L_Main; L_Q_sagatha: mes "[Wyara the Witch]"; - mes "\"FIXME\""; + mes "Wyara smiles."; + mes "\"You have met Sagatha? She's a wonderful person, isn't she? Well, she does hold back a little towards humans, but deep down she feels for them, too.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"She does hold all plants and animals very dear, though. Well, the peaceful ones more than the aggressive ones, I suppose.\""; next; + goto L_Main; L_Q_auldsbel: mes "[Wyara the Witch]"; - mes "\"FIXME\""; + mes "\"Auldsbel... the guild wizard? I don't know him very well; as far as I know, he is only visiting.\""; next; + goto L_Main; +L_Magic_no: + mes "[Wyara the Witch]"; + mes "\"I am sorry, but you don't seem to be able to control any magic. That means that I really can't help you with that.\""; + next; + goto L_Main; + +L_Magic: + if (!@has_magic) + goto L_Magic_no; + mes "[Wyara the Witch]"; + mes "\"Perhaps I can help you a little, but I am not a master of any school of magic.\""; + next; + +L_Magic_main: + menu + "Can you explain magic to me?", L_Magic_explain, + "Can you teach me a spell?", L_Magic_spell, + "Can you train me?", L_Magic_train, + "Never mind.", -; + + goto L_Main; + +L_Magic_explain: + mes "[Wyara the Witch]"; + mes "\"Magic is just a name for the force that lives in all plants and animals and emenates from there into all things, living or dead.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"Some things it finds easier to pass through-- natural things, living things-- but dead things, such as rock or metal, can slow it down.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"There are different kinds of magic, too; nature, ether, and so on, but if this interest you, you should talk to a scholar.\""; + next; + + goto L_Magic_main; + +L_Magic_spell: + if (getskilllv(SKILL_MAGIC) > 1) + goto L_Magic_spell2; + if (getskilllv(SKILL_MAGIC_NATURE) > 1) + goto L_Magic_spell3; + mes "[Wyara the Witch]"; + mes "\"No... I don't think that you are ready yet. But please ask me again when you have some more control over your magical powers.\""; + next; + + goto L_Magic_main; + +L_Magic_spell3: + mes "[Wyara the Witch]"; + mes "\"Now that you know the basics of nature magic, here is one of my favourites: '" + getspellinvocation("rain") + "' will summon rain, whereever you are standing. It will consume a bottle of water, though.\""; + next; + +L_Magic_spell2: + mes "[Wyara the Witch]"; + mes "\"Here is an easy and useful one: '" + getspellinvocation("detect-players") + "'. It will tell you the names of everyone nearby, but beware that there are ways to protect against it.\""; + next; + + if (!getpartnerid2(0)) + goto L_Magic_main; + + mes "[Wyara the Witch]"; + mes "\"Married partners can find each other even more easily. Use the '" + getspellinvocation("detect-spouse") + "' spell instead.\""; + next; + goto L_Magic_main; + +L_Magic_train: + if (getskilllv(SKILL_MAGIC_NATURE) > 1) + goto L_Magic_train_no; + mes "[Wyara the Witch]"; + mes "\"Train you? No... you should talk to Sagatha.\""; + mes "She hesitates."; + next; + + callfunc "SagathaStatus"; + + mes "[Wyara the Witch]"; + mes "\"It would be difficult to ask her to accept you unless you understand some of the basics already, though.\""; + if (@evil) + mes "\"However, I have heard that you have done something unforgiveable; I doubt that she will train you now, and I refuse to do so, too.\""; + next; + if (@evil) + goto L_Magic_main; + + if (@Q_status == @STATUS_PURIFY_TWICE) + goto L_Magic_purify_done; + if (@Q_status == @STATUS_PURIFY_ONCE) + goto L_Magic_purify_once; + if (@Q_status == @STATUS_PURIFY_EXPLAINED) + goto L_Magic_purify_explained; + + mes "[Wyara the Witch]"; + mes "\"Well, let me help you get started, then! But first, to make sure that you are serious, I have a small task for you.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"There is a pond west of Tulimshar, a very small one, almost square in shape, with a rock on its southern ledge leading to its center. This pond is close to dying.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"I want to save it; for that, someone will have to pour a purification potion into it.\""; + next; + + set @Q_status, @STATUS_PURIFY_EXPLAINED; + callsub S_update_var; +L_Magic_purify_explained: + if (countitem(@PURIFICATIONPOTION)) + goto L_Magic_purify_doit; + + mes "[Wyara the Witch]"; + mes "\"To make the purification potion, I will need twenty maggot slimes and twenty leaves of mauve.\""; + next; + + menu + "I shall get them later.", Magic_main, + "Booring.", Magic_main, + "Here they are.", -, + getinventorylist; + if ((@inventorylist_count == 100) && (countitem(@MAUVE) > 20) && (countitem(@MAGGOTSLIME) > 20)) + goto L_Magic_purify_nospace; + + if (countitem(@MAUVE) < 20) + goto L_Magic_purify_lacking; + if (countitem(@MAGGOTSLIME) < 20) + goto L_Magic_purify_lacking; + + delitem @MAUVE, 20; + delitem @MAGGOTSLIME, 20; + getitem @PURIFICATIONPOTION, 1; + mes "[Wyara the Witch]"; + mes "\"Wyara grinds the leaves and mixes them with the slime, boils them, then speaks a brief incantation over them and hands you the result.\""; + next; + +L_Magic_purify_doit: + mes "[Wyara the Witch]"; + mes "\"Take your purification potion to the pond, right next to its center, and pour the potion in.\""; + next; + close; + +L_Magic_purify_nospace: + mes "[Wyara the Witch]"; + mes "\"You don't have enough space to carry the potion. Please come back later.\""; + next; + goto L_Magic_main; + +L_Magic_purify_lacking: + mes "[Wyara the Witch]"; + mes "\"You'll need twenty mauve leaves and twenty maggot slimes for the potion.\""; + next; + goto L_Magic_main; + +L_Magic_purify_once: + mes "[Wyara the Witch]"; + mes "Wyara nods."; + mes "\"You have purified the pond a little, but not enough, I think. We'll need another potion.\""; + next; + + if (countitem(@PURIFICATIONPOTION)) + goto L_Magic_purify_doit2; + + mes "[Wyara the Witch]"; + mes "\"I'll need twenty more maggot slimes and leaves of mauve.\""; + next; + + menu + "I'll get them later.", Magic_main, + "No way.", Magic_main, + "Here you are.", -, + getinventorylist; + if ((@inventorylist_count == 100) && (countitem(@MAUVE) > 20) && (countitem(@MAGGOTSLIME) > 20)) + goto L_Magic_purify_nospace; + + if (countitem(@MAUVE) < 20) + goto L_Magic_purify_lacking; + if (countitem(@MAGGOTSLIME) < 20) + goto L_Magic_purify_lacking; + + delitem @MAUVE, 20; + delitem @MAGGOTSLIME, 20; + getitem @PURIFICATIONPOTION, 1; + mes "[Wyara the Witch]"; + mes "\"Wyara brews another purification potion.\""; + next; +L_Magic_purify_doit2: + mes "[Wyara the Witch]"; + mes "\"Please apply this one quickly, again.\""; + next; + close; + +L_Magic_purify_twice: + mes "[Wyara the Witch]"; + mes "Wyara smiles at you."; + mes "\"A friend told me... you have saved the pond for now. Perhaps it will need some more attention later, but I'll ask others for this.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"Please kneel down and touch the ground.\""; + next; + + menu + "Very well.", -, + "No way!", L_Magic_purify_abort; + + mes "[Wyara the Witch]"; + mes "You kneel down and touch the ground, and so does Wyara."; + next; + + mes "[Wyara the Witch]"; + mes "You sense the earth, through the floor boards, and begin to feel one with it, as if you were a plant or rock."; + next; + + mes "[Wyara the Witch]"; + mes "The gentle breeze coming in through the window begins to take on a very different quality, as if it were the gentle caress of a mother soothing her child."; + next; + + mes "[Wyara the Witch]"; + mes "You can sense the water within the ground, and from it you sense your sisters and brothers, plants, animals, people..."; + next; + + mes "[Wyara the Witch]"; + mes "Slowly, the sensation recedes, but you feel changed."; + mes "[5000 experience points]"; + mes "[Level 2 in Nature Magic]"; + + getexp 5000, 0; + if (getskilllv(SKILL_MAGIC_NATURE) < 2) + skill SKILL_MAGIC_NATURE, 2; + close; + + +L_Magic_purify_abort: + mes "[Wyara the Witch]"; + mes "\"I can't help you if you don't subject yourself to the ritual.\""; + next; + close; + +L_Magic_train_no: + mes "[Wyara the Witch]"; + mes "\"I can't teach you anything at this time. Perhaps Sagatha can help you, but I'm not sure if she will accept you as a student.\""; + next; + +L_Magic_train_sagatha: + menu + "OK.", L_Magic_main, + "How can I convince her to accept me?", -; + + callfunc "SagathaStatus"; + mes "[Wyara the Witch]"; + if (@evil) + L_Magic_train_sagatha_fail; + if (@good > 1) + mes "\"Come to think of it, I have heard good things about you. Perhaps she will be willing to accept you as a student now?\""; + if (@good == 1) + mes "\"I have heard some good things about you, but I'm not sure if it will be enough to sway her-- she is hesitant to accept students.\""; + if (@good == 0) + mes "\"Sagatha cares greatly about all living creatures, but particularly about the creatures of the forest. If you are kind to them, she will be more likely to be kind to you.\""; + next; + + if (@druid == 3) + goto L_Magic_main; + + mes "[Wyara the Witch]"; + mes "She smiles."; + mes "\"Actually, I think I know of a good thing you could do. There is a very special tree in the desert south-east of Tulimshar, a tree that has been there for a very long time.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"The tree is slowly dying-- and has been for a long time-- but it is there because of a wonderful thing that happened long ago. Tend to it, and I am sure that she will learn about this.\""; + next; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_DRUIDTREE; + + menu + "What is that tree?", L_Magic_train_tree_backgd, + "How should I tend to it?", -, + "Nah.", L_Magic_main; + + mes "[Wyara the Witch]"; + mes "\"The tree has been there alone and unattended for a long time; what he needs most is water and affection. Give him both.\""; + next; + goto Magic_main; + +L_Magic_train_tree_backgd: + mes "[Wyara the Witch]"; + mes "\"Many generations ago, there was a lush, green oasis in the desert south-east of Tulimshar. Plants of all kinds grew there, and many animals, including mouboos, made this place their home.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"Then there came war, and some people pleaded to the demon Grenxen. He founded Tulimshar, and to provide it with water he changed the underground waterflow. The oasis began to dry out quickly.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"But the oasis, like many such places back in the old days, had a druid watching over it. The druid refused to accept what Grenxen had done, but he was powerless to revert or change it.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"All he could do was to delay the inevitable, to give the animals and nomads some time to adapt.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"But to do so, he had to reach the water streams deep underground. Thus, he turned himself into a tree, a deep-rooted fyrad, so that his roots could reach underground.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"He had to exert himself tremendously; he had to grow deep, quickly; I believe that no druid or witch has summoned such magic before or since. But he succeeded, and for a while he saved the oasis.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"Many generations he remained the only one ever to have successfully defied Grenxen, but this came at a price: he had to remain a tree, and he never turned back.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"I believe that he has not forgotten his old magic, because even though a tree remembers many things for a very long time, trees are not keen to change things, not even themselves.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"Now he stands alone in the desert, dried-up and forgotten, with no-one remembering him.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"Please give him water, for he is always in need of it, and thank him for his sacrifice. It is all we can do for him now.\""; + next; + +L_Magic_tree_menu: + menu + "How should I give him water?", L_Magic_tree_water, + "How should I thank him?", L_Magic_tree_remind, + "OK.", -, + "No.", -; + goto L_Magic_menu; + +L_Magic_tree_water: + mes "[Wyara the Witch]"; + mes "\"A bottle of water would probably not be enough. No, you would have to water the ground all around... that's too many bottles. You will have to get water from elsewhere.\""; + next; + goto L_Magic_tree_menu; + +L_Magic_tree_remind: + mes "[Wyara the Witch]"; + mes "\"Give him a sign of affection. Something that works with a tree, but also something that humans might do to each other, to remind him of his days as a human.\""; + next; + + mes "[Wyara the Witch]"; + mes "\"Yes... that would be important. Show your affection in the same way that you might towards a human.\""; + next; + goto L_Magic_tree_menu; + +L_Magic_train_sagatha_fail: + mes "She shakes her head."; + mes "\"No... from what I have heard, you have done something unforgivable. I very much doubt that you can be her student now, and I won't teach you any further either.\""; + next; + goto L_Magic_main; +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 8ce50f06..f6067d39 100644 --- a/npc/011-1_Woodland/alchemist.txt +++ b/npc/011-1_Woodland/alchemist.txt @@ -97,7 +97,7 @@ L_certain_condition: set @menuitems$[@c], "Can you make sulphur powder?"; set @menuID[@c], @CHOICE_SULPHUR; set @c, @c + 1; -L_post_sulphur_option; +L_post_sulphur_option: if (@Q_status == @SETZER_INITIAL) goto L_main_menu; diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index 31bd7811..ef88277f 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -211,25 +211,25 @@ L_sulphur_buy: 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.\""; + mes "\"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.\""; + mes "\"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.\""; + mes "\"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.\""; + mes "\"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; @@ -944,7 +944,7 @@ LL_initiation: goto L_main_menu; -LL_initiation_fail; +LL_initiation_fail: mes "[Auldsbel the Wizard]"; mes "\"No, no, no. This is no good-- too many imperfections.\""; mes "He throws it away."; @@ -955,7 +955,7 @@ LL_initiation_fail; LL_initiation_check: if (!countitem (@MOUBOO_FIGURINE)) goto L_main_menu; - delitem (@MOUBOO_FIGURINE); + delitem @MOUBOO_FIGURINE, 1; set @mexp, MAGIC_EXPERIENCE & 65535; mes "[Auldsbel the Wizard]"; diff --git a/npc/013-1_Woodland_hills/sagatha.txt b/npc/013-1_Woodland_hills/sagatha.txt index a0b1c1b8..e2e71cdb 100644 --- a/npc/013-1_Woodland_hills/sagatha.txt +++ b/npc/013-1_Woodland_hills/sagatha.txt @@ -32,23 +32,11 @@ L_write: set QUEST_MAGIC, (QUEST_MAGIC & ~NIBBLE_3_MASK) | (@unhappiness << NIBBLE_3_SHIFT); } - -//---------------------------------------- -013-1.gat,131,24,0 script Sagatha#_M 167,{ +function script SagathaStatus { 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) @@ -58,9 +46,22 @@ L_write: if (@mouboo == 1) set @evil, 1; + if (MAGIC_FLAGS & FLAG_DID_CUTTREE) + set @evil, 1; + set @druid, (((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 12) >> 2; if (@druid == 3) set @good, @good + 1; +} + +//---------------------------------------- +013-1.gat,131,24,0 script Sagatha#_M 167,{ + callfunc "SagathaStatus"; + + set @Q_MASK, NIBBLE_4_MASK; + set @Q_SHIFT, NIBBLE_4_SHIFT; + + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; if (MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA) mes "[Sagatha the Witch]"; @@ -74,7 +75,7 @@ L_write: 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) -- cgit v1.2.3-60-g2f50 From 072189e7036fa29d9849b992ce2f4a55c63cc066 Mon Sep 17 00:00:00 2001 From: Fate Date: Fri, 9 Jan 2009 16:01:13 -0700 Subject: Finished first pass of magic quest scripting --- conf/magic.conf | 44 +++- db/const.txt | 3 + npc/001-1_Tulimshar/bard.txt | 77 ++----- npc/001-1_Tulimshar/elanore.txt | 119 +++++------ npc/005-1_Snake_desert/_import.txt | 2 + npc/005-1_Snake_desert/spirit.txt | 303 +++++++++++++++++++++++++++ npc/005-1_Snake_desert/tree.txt | 32 ++- npc/009-2_Hurnscald/misc.txt | 49 +++++ npc/009-2_Hurnscald/wyara.txt | 135 ++++++------ npc/009-3_Cave_beneath_Hurnscald/sword.txt | 63 +++++- npc/011-1_Woodland/alchemist.txt | 72 ++++++- npc/011-1_Woodland/auldsbel.txt | 309 ++++++++++++++++++++++------ npc/013-1_Woodland_hills/sagatha.txt | 317 +++++++++++++++++++++-------- npc/013-2_Magic_house/wizard.txt | 68 ++++++- npc/015-1_Woodland/sword.txt | 99 ++++++++- npc/functions/magic.txt | 120 +++++++++++ 16 files changed, 1441 insertions(+), 371 deletions(-) create mode 100644 npc/005-1_Snake_desert/spirit.txt (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf b/conf/magic.conf index 83fe031d..a46055b5 100644 --- a/conf/magic.conf +++ b/conf/magic.conf @@ -23,6 +23,7 @@ CONST ELT_GHOST = 8 CONST ELT_UNDEAD = 9 # Schools of magic +CONST SC_HIDE = 194 CONST SC_HALT_REGENERATE = 195 CONST SC_FLYING_BACKPACK = 196 CONST SC_MBARRIER = 197 @@ -65,11 +66,12 @@ PROCEDURE set_var(name, mask, shift, value) = PROCEDURE gain_heal_xp(value, gain) = # `gain' influences the likelihood of an increase last_heal_xp = (script_int(caster, SCRIPT_XP) >> SCRIPT_HEALSPELL_SHIFT) & SCRIPT_HEALSPELL_MASK; IF (target <> caster - && value > (20 + last_heal_xp + random(last_heal_xp + 1) + random(last_heal_xp + 1))) ( + && value > (20 + last_heal_xp + random(last_heal_xp + 1) + random(last_heal_xp + 1))) + THEN ( heal_xp = last_heal_xp + gain; IF (heal_xp > SCRIPT_HEALSPELL_MASK) - heal_xp = SCRIPT_HEALSPELL_MASK; - set_var(SCRIPT_XP, SCRIPT_HEALSPELL_MASK, SCRIPT_HEALSPELL_SHIFT, heal_xp); + THEN heal_xp = SCRIPT_HEALSPELL_MASK; + CALL set_var(SCRIPT_XP, SCRIPT_HEALSPELL_MASK, SCRIPT_HEALSPELL_SHIFT, heal_xp); ) PROCEDURE gain_xp(gain) = @@ -162,6 +164,9 @@ PROCEDURE elt_damage(target, damage, dmgplus, bonus_elt, malus_elt, effect) = PROCEDURE melee_damage(target, damage, dmgplus) = CALL attack_check(target); d = damage + random(dmgplus); + evade = level(target) + mdef(target); + IF (spellpower - random(100) < evade) + THEN d = 0; injure(caster, target, d, 0); @@ -324,7 +329,7 @@ SPELL make-arrows : "#T10" = COMPONENTS ["RawLog"]) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); - CALL create_item("Arrow", 1 + spellpower / 40 + (random(max(1, 800 - spellpower)) / 80), "WarpedLog", 250); + CALL create_item("Arrow", 1 + spellpower / 40 + (random(max(1, 800 - spellpower)) / 80), "WarpedLog", 500); CALL gain_xp(1); SPELL make-shirt : "#T11" = @@ -336,7 +341,7 @@ SPELL make-shirt : "#T11" = COMPONENTS [5 * "CottonCloth"]) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); - CALL create_item("CottonShirt", 1, "CottonCloth", 400); + CALL create_item("CottonShirt", 1, "CottonCloth", 425); CALL gain_xp(2); SPELL make-tanktop : "#T12" = @@ -348,7 +353,7 @@ SPELL make-tanktop : "#T12" = COMPONENTS [4 * "CottonCloth"]) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); - CALL create_item("WhiteTankTop", 1, "CottonCloth", 500); + CALL create_item("WhiteTankTop", 1, "CottonCloth", 350); CALL gain_xp(2); SPELL make-short-tanktop : "#T13" = @@ -360,7 +365,7 @@ SPELL make-short-tanktop : "#T13" = COMPONENTS [3 * "CottonCloth"]) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); - CALL create_item("WhiteShortTankTop", 1, "CottonCloth", 550); + CALL create_item("WhiteShortTankTop", 1, "CottonCloth", 250); CALL gain_xp(2); SPELL make-iron-powder : "#T14" = @@ -562,8 +567,9 @@ LOCAL SPELL rain : "#N13" = CALL gain_xp(1); range = min(MAX_RAIN_SPELL_RADIUS, 3 + spellpower / 30); area = rbox(location(caster), range); - IF (is_in(location(npc("#DruidTree0#_M", area))) - || is_in(location(npc("#DruidTree1#_M", area)))) { + IF (is_in(location(npc("#DruidTree0#_M")), area) + || is_in(location(npc("#DruidTree1#_M")), area)) + THEN { set @flag, 1; callfunc "QuestTreeTrigger"; }; @@ -632,7 +638,8 @@ SPELL detect-players : "#G10" = CALL default_effect(); message = ""; FOREACH PC target IN rbox(location(caster), spellpower / 2) - DO IF target <> caster + DO IF ((target <> caster) + && not (running_status_update(pc(target), SC_HIDE))) THEN (IF message <> "" THEN message = message + ", "; message = message + name_of (target); @@ -707,6 +714,20 @@ SPELL sense-spouse : "#G13" = ELSE message(caster, "You sense " + name + " in the " + dir + "."); ) +SPELL hide (target : PC) : "#A13" = + LET level = 1 + school = ASTRAL + IN (MANA 11, CASTTIME 1000, + REQUIRE skill(caster, MAGIC) > level, + REQUIRE skill(caster, school) > level, + (REQUIRE skill(caster, school) > 3 OR COMPONENTS ["CottonCloth"]), + REQUIRE rdistance(location(target), location(caster)) < 2 + spellpower / 30) + => EFFECT CALL adjust_spellpower(school); + sfx(target, SFX_DEFAULT, 0); + IF (caster <> target) + THEN CALL default_effect(); + status_change(target, SC_HIDE, 0, 0, 0, 0, 5000 + (spellpower * 2500)); + CALL gain_xp(2); #-------------------------------------------------------------------------------- # Level 2 spells @@ -899,7 +920,8 @@ PROCEDURE hug_tree(target) = || target = "tree" || target = "tree*" || target = "Tree" || target = "Tree*" || target = "druid" || target = "druid*" - || target = "Druid" || target = "Druid*") { + || target = "Druid" || target = "Druid*") + THEN { set @flag, 2; callfunc "QuestTreeTrigger"; }; diff --git a/db/const.txt b/db/const.txt index 43739b9b..0cccd5dc 100644 --- a/db/const.txt +++ b/db/const.txt @@ -198,3 +198,6 @@ MFLAG_MANASEED_RUMOUR 256 // Has heard rumour about mana seed MFLAG_KNOWS_CUTTREE 512 // Knows about the `cut the tree' quest MFLAG_DID_CUTTREE 1024 // Did cut off a branch from the druid tree 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 diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index 5d52f0a6..a740b1d5 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -36,64 +36,9 @@ L_News: goto L_Main; L_Question: - set @QQ_ELANORE, 1; - set @QQ_MANASEED, 2; - set @QQ_WYARA, 3; - set @QQ_SAGATHA, 4; - set @QQ_AULDSBEL, 5; - - setarray @choice$, "", "", "", "", "", ""; - set @choices_nr, 0; - setarray @choice_idx, 0, 0, 0, 0, 0, 0; - - set @choice$[@choices_nr], "...Elanore the Healer?"; - set @choice_idx[@choices_nr], @QQ_ELANORE; - set @choices_nr, @choices_nr + 1; - - if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) - goto L_Q_post_manaseed; - set @choice$[@choices_nr], "...the Mana Seed?"; - set @choice_idx[@choices_nr], @QQ_MANASEED; - set @choices_nr, @choices_nr + 1; -L_Q_post_manaseed: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) - goto L_Q_post_wyara; - set @choice$[@choices_nr], "...Wyara the Witch?"; - set @choice_idx[@choices_nr], @QQ_WYARA; - set @choices_nr, @choices_nr + 1; -L_Q_post_wyara: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) - goto L_Q_post_sagatha; - set @choice$[@choices_nr], "...Sagatha the Witch?"; - set @choice_idx[@choices_nr], @QQ_SAGATHA; - set @choices_nr, @choices_nr + 1; -L_Q_post_sagatha: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) - goto L_Q_post_auldsbel; - set @choice$[@choices_nr], "...Auldsbel the Wizard?"; - set @choice_idx[@choices_nr], @QQ_AULDSBEL; - set @choices_nr, @choices_nr + 1; -L_Q_post_auldsbel: - - set @choice$[@choices_nr], "...never mind."; - set @choice_idx[@choices_nr], 0; - set @choices_nr, @choices_nr + 1; - - menu @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -; - - set @menu, @menu - 1; - - if (@menu >= @choices_nr) - set @menu, 0; - - set @c, @choice_idx[@menu]; + callfunc "MagicTalkOptionsSetup"; + set @ignore, 0; + callfunc "MagictalkMenu"; if (@c == 0) goto L_Main; if (@c == @QQ_ELANORE) goto L_Q_elanore; @@ -101,7 +46,21 @@ L_Q_post_auldsbel: if (@c == @QQ_WYARA) goto L_Q_wyara; if (@c == @QQ_SAGATHA) goto L_Q_sagatha; if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; - close; + if (@c == @QQ_OLDWIZ) goto L_Q_oldwiz; + + mes "[" + @name + "]"; + mes "\"Alas, I know very little about this matter.\""; + next; + goto L_Main; + +L_Q_oldwiz: + mes "[" + @name + "]"; + mes "\"The old wizard has been an old man for as long as I remember, living near the mountains in his magic hut-- a hut that is bigger on the inside, just like in the old tales of Gyer Filla the Wise....\""; + next; + mes "[" + @name + "]"; + mes "\"I doubt that they are the same person, though. For one, I have never seen his hut fly. For another, Gyer never took apprentices.\""; + next; + goto L_Main; L_Q_elanore: mes "[" + @name + "]"; diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 2efaab93..3f18c80c 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -4,10 +4,10 @@ set @has_magic, getskilllv(SKILL_MAGIC); - set @Q_MASK, NIBBLE_5_MASK; - set @Q_SHIFT, NIBBLE_5_SHIFT; + set @Q_MASK, NIBBLE_1_MASK; + set @Q_SHIFT, NIBBLE_1_SHIFT; - set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; set @Q_heal_exp, MAGIC_EXPERIENCE >> 24; set @BUGLEG, 518; @@ -319,6 +319,37 @@ L_Teach_CheckAdvanceTo2_fail: close; L_Teach_CheckAdvanceToLOH: + if (getskilllv(SKILL_MAGIC) < 2) + goto L_Teach_LOH_advance_abort0; + if (@Q_heal_exp < 30) + goto L_Teach_LOH_advance_abort1; + + mes "[Elanore the Healer]"; + mes "\"I will now teach you how to heal by laying on your hands. The technique is similar to the spell I taught you at the beginning, but this time you transfer your own health instead of drawing health from a lifestone.\""; + next; + + mes "[Elanore the Healer]"; + mes "\"First, lay your hand on the person you wish to heal. You needn't touch the injury itself, though you have to touch the skin until you are a little more experienced. Then, medidate on the word '" + getspellinvocation("lay-on-hands") + "'\""; + next; + + mes "[Elanore the Healer]"; + mes "\"This will let your own life force flow into the person you are healing. If you are badly injured yourself, you will not be able to do this.\""; + mes "[1000 experience points]"; + next; + + getexp 1000, 0; + set @Q_status, @STATUS_LEARNED_LAY_ON_HANDS; + callsub S_update_var; + close; + +L_Teach_LOH_advance_abort0: + mes "[Elanore the Healer]"; + mes "\"You don't have enough magical power to learn the next healing spell yet.\""; + close; + +L_Teach_LOH_advance_abort1: + mes "[Elanore the Healer]"; + mes "\"I'm sorry, but I am not yet convinced that you are a good enough healer. Please continue in your endeavours.\""; close; L_NoMagicNoTeach: @@ -329,67 +360,9 @@ L_NoMagicNoTeach: goto L_Main; L_Question: - set @QQ_MANAPOTION, 1; - set @QQ_MANASEED, 2; - set @QQ_WYARA, 3; - set @QQ_SAGATHA, 4; - set @QQ_AULDSBEL, 5; - - setarray @choice$, "", "", "", "", "", ""; - set @choices_nr, 0; - setarray @choice_idx, 0, 0, 0, 0, 0, 0; - - if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) - goto L_Q_post_manaseed; - set @choice$[@choices_nr], "...the Mana Seed?"; - set @choice_idx[@choices_nr], @QQ_MANASEED; - set @choices_nr, @choices_nr + 1; -L_Q_post_manaseed: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) - goto L_Q_post_manapotion; - set @choice$[@choices_nr], "...Mana Potions?"; - set @choice_idx[@choices_nr], @QQ_MANAPOTION; - set @choices_nr, @choices_nr + 1; -L_Q_post_manapotion: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) - goto L_Q_post_wyara; - set @choice$[@choices_nr], "...Wyara the Witch?"; - set @choice_idx[@choices_nr], @QQ_WYARA; - set @choices_nr, @choices_nr + 1; -L_Q_post_wyara: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) - goto L_Q_post_sagatha; - set @choice$[@choices_nr], "...Sagatha the Witch?"; - set @choice_idx[@choices_nr], @QQ_SAGATHA; - set @choices_nr, @choices_nr + 1; -L_Q_post_sagatha: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) - goto L_Q_post_auldsbel; - set @choice$[@choices_nr], "...Auldsbel the Wizard?"; - set @choice_idx[@choices_nr], @QQ_AULDSBEL; - set @choices_nr, @choices_nr + 1; -L_Q_post_auldsbel: - - set @choice$[@choices_nr], "...never mind."; - set @choice_idx[@choices_nr], 0; - set @choices_nr, @choices_nr + 1; - - menu @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -; - - set @menu, @menu - 1; - - if (@menu >= @choices_nr) - set @menu, 0; - - set @c, @choice_idx[@menu]; + callfunc "MagicTalkOptionsSetup"; + set @ignore, @QQ_ELANORE; + callfunc "MagictalkMenu"; if (@c == 0) goto L_Main; if (@c == @QQ_MANASEED) goto L_Q_manaseed; @@ -397,7 +370,19 @@ L_Q_post_auldsbel: if (@c == @QQ_WYARA) goto L_Q_wyara; if (@c == @QQ_SAGATHA) goto L_Q_sagatha; if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; - close; + if (@c == @QQ_OLDWIZ) goto L_Q_oldwiz; + + mes "[Elanore the Healer]"; + mes "Elanore shakes her head."; + mes "\"I am sorry, but I don't think that I know anything that would help you.\""; + next; + goto L_Main; + +L_Q_oldwiz: + mes "[Elanore the Healer]"; + mes "\"He is a kind old man. He stays mostly with his books and his apprentice, though we have chatted a few times.\""; + next; + goto L_Main; L_Q_manaseed: mes "[Elanore the Healer]"; @@ -432,8 +417,8 @@ L_Q_auldsbel: S_update_var: - set QUEST_MAGIC, - (QUEST_MAGIC & ~(@Q_MASK) + set QUEST_MAGIC2, + (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); return; } diff --git a/npc/005-1_Snake_desert/_import.txt b/npc/005-1_Snake_desert/_import.txt index 3174cc31..997fde69 100644 --- a/npc/005-1_Snake_desert/_import.txt +++ b/npc/005-1_Snake_desert/_import.txt @@ -2,3 +2,5 @@ map: 005-1.gat npc: npc/005-1_Snake_desert/_mobs.txt npc: npc/005-1_Snake_desert/_warps.txt npc: npc/005-1_Snake_desert/npcs.txt +npc: npc/005-1_Snake_desert/spirit.txt +npc: npc/005-1_Snake_desert/tree.txt diff --git a/npc/005-1_Snake_desert/spirit.txt b/npc/005-1_Snake_desert/spirit.txt new file mode 100644 index 00000000..2ab3bf03 --- /dev/null +++ b/npc/005-1_Snake_desert/spirit.txt @@ -0,0 +1,303 @@ +function script EarthImpTouch { + if (getskilllv(SKILL_MAGIC)) + goto L_message; + close; + +L_message: + set @Q_MASK, NIBBLE_0_MASK; + set @Q_SHIFT, NIBBLE_0_SHIFT; + set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + + set @Q_STATUS_INITIAL, 0; + set @Q_STATUS_ONQUEST, 1; + set @Q_STATUS_STUDENT0, 2; + set @Q_STATUS_STUDENT1, 3; + set @Q_STATUS_STUDENT2, 4; + set @Q_STATUS_STUDENT3, 5; + + set @BRANCH, 732; + + set @s, "girl"; + if (Sex) + set @s, "boy"; + + if (MAGIC_FLAGS & MFLAG_KNOWS_IMP) + goto L_wb; + + mes "[Well]"; + mes "Something is inside that well, and now that you have turned your attention towards it, it seems to be talking to you!"; + next; + + mes "[Well]"; + mes "\"Hey! You there! Yes, I'm talking to you!\""; + mes "That strange voice seems to be coming from inside your head!"; + next; + + menu + "Who, me?", -, + "Leave me alone!", L_close, + "Aaah! I'm hearing voices!", L_silly_close; + + mes "[Well]"; + mes "\"I'm in here, in the well, talking to you! If I'm not very mistaken, you are a powerful wizard-to-be, except that nobody has showed you how to properly do magic yet!\""; + next; + + menu + "Who are you?", -, + "Aaaah! The voices are after me!", L_silly_close, + "Whatever it is, I'm not interested.", L_close; + + mes "[Earth Spirit]"; + mes "\"I'm a forest spirit; my name isn't important... all that matters is that I like you, and that I will help you become a powerful wizard if you help me. A fair deal, if you will...\""; + next; + + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_IMP; + + goto L_main; +L_wb: + mes "[Earth Spirit]"; + mes "\"It's excellent to see you again!\""; + next; + +L_main: + menu + "How did you get trapped?", L_Q_trapped, + "Can you teach me magic and spells?", L_Q_magic, + "What do you know about...", L_Q, + "Goodbye!", -; + close; + +L_Q_trapped: + mes "[Earth Spirit]"; + mes "\"Oh, a wicked witch grew jealous of my power and locked me up in this well.\""; + next; + goto L_main; + +L_Q: + mes "[Earth Spirit]"; + mes "\"Stop bothering me with your questions, will you? I'm trying to make you a powerful wizard, after all!\""; + next; + goto L_main; + +L_Q_magic: + if (@Q_status == @Q_STATUS_ONQUEST) + goto L_Q_magic_1; + if (@Q_status == @Q_STATUS_STUDENT0) + goto L_Q_magic_2; + if (@Q_status == @Q_STATUS_STUDENT1) + goto L_Q_magic_3; + if (@Q_status == @Q_STATUS_STUDENT2) + goto L_Q_magic_4; + + mes "[Earth Spirit]"; + mes "\"Good, good... that's the right attitude! Yes, I can teach you magic, but first you must prove that you are worthy to be my student!\""; + next; + + mes "[Earth Spirit]"; + mes "\"North-west of here sits and old, dead tree. Well, not completely dead, not yet, but almost. It's nothing special. Well, maybe a little, but not really. I want you to cut off one of its branches.\""; + next; + + menu + "No way.", L_silly_close, + "Sure.", L_Q_tree_ok, + "Why that particular tree?", -; + + mes "[Earth Spirit]"; + mes "\"Oh, you and your questions! Well, that tree was a druid once, so the branches contain a bit of its lifeforce. And that's useful.\""; + next; + + menu + "Yuck.", L_silly_close, + "Sure, whatever.", L_Q_tree_ok, + "Isn't that like cutting off someone's arm?", -; + + mes "[Earth Spirit]"; + mes "\"Oooh... now come on! Don't be so sentimental. He turned himself into a tree, he can hardly expect everyone to leave him alone.\""; + next; + + mes "[Earth Spirit]"; + mes "\"Besides, think of it like that: if you want to bake a cake, you've got to break a few eggs. Not everything's sweetness in life, my " + @s + "!.\""; + next; + + menu + "No way.", L_silly_close, + "Alright, that makes sense.", L_Q_tree_ok; + +L_Q_tree_ok: + mes "[Earth Spirit]"; + mes "\"Good, good, good! Yes, that will be very good! So, come back when you have the branch. Oh, and bring 100,000 GP, too, as an enrollment fee.\""; + set @Q_status, @Q_STATUS_ONQUEST; + callsub S_update_var; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_CUTTREE; + next; + goto L_main; + +L_Q_magic_1: + mes "[Earth Spirit]"; + mes "\"Yes, yes, if you brought me the branch and the money, then I will!\""; + next; + menu + "Here is the branch and the money.", -, + "How much money did you want again?", L_Q_tree_howmuch, + "How can I cut it?", L_Q_tree_how, + "Where was the tree again?", L_Q_tree_where, + "What is that tree?", L_Q_tree_what; + + if (countitem(@BRANCH) < 1) + goto L_Q_tree_none; + if (!(MAGIC_FLAGS & MFLAG_DID_CUTTREE)) + goto L_Q_tree_dry; + if (zeny < 100000) + goto L_Q_tree_nomoney; + + set zeny, zeny - 100000; + delitem @BRANCH, 1; + + mes "[Earth Spirit]"; + mes "Following the earth sprite's instructions, you throw branch and GP into the well."; + next; + + mes "[Earth Spirit]"; + mes "\"Well done, very well done! Consider yourself my student now.\""; + + mes "[5000 experience points]"; + if (getskilllv(SKILL_MAGIC_NATURE) < 2) + mes "[Level 2 in Nature Magic]"; + getexp 5000, 0; + if (getskilllv(SKILL_MAGIC_NATURE) < 2) + skill SKILL_MAGIC_NATURE, 2; + next; + + set @Q_status, @Q_STATUS_STUDENT0; + callsub S_update_var; + goto L_main; + +L_Q_magic_finish: + mes "[1000 experience points]"; + set @Q_status, @Q_status + 1; + callsub S_update_var; + getexp 1000,0; + next; + goto L_main; + +L_Q_magic_2: + mes "[Earth Spirit]"; + mes "\"Yes, of course! For just 20,000 GP I will teach you your first spell!\""; + next; + + menu + "Here you are.", -, + "No.", L_main; + + if (zeny < 20000) + goto L_no20k; + + set zeny, zeny - 20000; + + mes "[Earth Spirit]"; + mes "\"Kekeke... excellent! Yes, here goes your first spell, the flying backpack! If you are overloaded, it will take the load off your shoulders.\""; + next; + + mes "[Earth Spirit]"; + mes "\"Take a cocoon, living or dead, and suffuse it in magic. Whisper '" + getspellinvocation("flying-backpack") + "', and feel it float!\""; + goto L_Q_magic_finish; + +L_Q_magic_3: + mes "[Earth Spirit]"; + mes "\"But yes, yes! Only 20,000 GP, once again, and I will teach you a far more useful spell!\""; + next; + + menu + "Here you are.", -, + "No.", L_main; + + if (zeny < 20000) + goto L_no20k; + + set zeny, zeny - 20000; + + mes "[Earth Spirit]"; + mes "\"Yeees, good! This one is a protection spell, making your skin harder. You need a hard spike for it, though. Hold that spike in your hands, and focus on it.\""; + next; + + mes "[Earth Spirit]"; + mes "\"Next, say '" + getspellinvocation("protect") + "', and feel your skin grow rigid! Very useful against stings and stabs and pokes and pricks and that sort of stuff.\""; + goto L_Q_magic_finish; + +L_Q_magic_4: + mes "[Earth Spirit]"; + mes "\"Naah, you're too weak now! Come back later when you have grown!\""; + next; + goto L_main; + +L_no20k: + mes "[Earth Spirit]"; + mes "\"You can't pay me 20,000 if you don't have that much!\""; + next; + goto L_main; + +L_Q_tree_none: + mes "[Earth Spirit]"; + mes "\"Where is your branch?\""; + next; + goto L_main; + +L_Q_tree_dry: + mes "[Earth Spirit]"; + mes "\"That won't do. This branch is completely dead; you'll have to get another.\""; + next; + goto L_main; + +L_Q_tree_nomoney: + mes "[Earth Spirit]"; + mes "\"No, you don't have enough money! Come back when you have 100,000.\""; + next; + goto L_main; + +L_Q_tree_howmuch: + mes "[Earth Spirit]"; + mes "\"It's only 100,000 GP to become my student.\""; + next; + goto L_main; + +L_Q_tree_how: + mes "[Earth Spirit]"; + mes "\"Oh... right, the tree might be protected. Only a bone knife will cut that. No idea where you can find one, but I'm sure you will manage!\""; + next; + goto L_main; + +L_Q_tree_where: + mes "[Earth Spirit]"; + mes "\"North-west of here.\""; + next; + goto L_main; + +L_Q_tree_what: + mes "[Earth Spirit]"; + mes "\"Just some silly druid who turned himself into a tree; nothing important.\""; + next; + goto L_main; + +L_silly_close: + if (MAGIC_FLAGS & MFLAG_KNOWS_IMP) + mes "[Earth Spirit]"; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_IMP)) + mes "[Well]"; + mes "\"Silly " + @s + ".\""; +L_close: + close; + +S_update_var: + set QUEST_MAGIC2, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} + +005-1.gat,118,70,0 script #EarthImp0#_M 127,{ + callfunc "EarthImpTouch"; +} + +005-1.gat,119,70,0 script #EarthImp1#_M 127,{ + callfunc "EarthImpTouch"; +} diff --git a/npc/005-1_Snake_desert/tree.txt b/npc/005-1_Snake_desert/tree.txt index d0072259..7c85c44b 100644 --- a/npc/005-1_Snake_desert/tree.txt +++ b/npc/005-1_Snake_desert/tree.txt @@ -78,17 +78,38 @@ L_water: mes "This must be the druid tree."; next; menu - "Water the tree", L_water, + "Water the tree", L_givewater, "Kiss tree", L_kiss, "Leave it alone", -; close; L_both: mes "[Dying Tree]"; - mes "This must be the druid tree, the one the earth spirit asked you to cut."; + mes "This must be the druid tree that Wyara and the earth spirit were talking about."; next; menu - "Water the + "Water the tree", L_givewater, + "Kiss tree", L_kiss, + "Cut off a branch", L_do_cut, + "Leave it alone", -; + close; + +L_givewater: + set @WATER, 541; + set @BOTTLE, 540; + + if (countitem(@WATER) < 1) + goto L_no_water; + delitem @WATER, 1; + getitem @BOTTLE, 541; + + mes "[Dying Tree]"; + mes "You pour a bottle of water into the sand. The water dissipates quickly, without any effect."; + next; + close; + +L_no_water: + mes "[Dying Tree]"; mes "You don't have any water."; next; close; @@ -118,7 +139,7 @@ L_do_cut: "Yes, let's cut!", L_really_cut; close; -L_really_cut; +L_really_cut: set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_DID_CUTTREE; getitem 732, 1; mes "[Dying Tree]"; @@ -133,10 +154,7 @@ L_no_boneknife: next; close; -L_do_cut: - L_happy: - close; } diff --git a/npc/009-2_Hurnscald/misc.txt b/npc/009-2_Hurnscald/misc.txt index 56d02bf9..f3bbe545 100644 --- a/npc/009-2_Hurnscald/misc.txt +++ b/npc/009-2_Hurnscald/misc.txt @@ -9,3 +9,52 @@ close; // In case you don't get the joke - it's a parody on Illutia. } + +//Bookshelf +009-2.gat,109,44,0 script #Book 127, { + if (getskilllv(SKILL_MAGIC)) + goto L_magic; + mes "[Bookshelf]"; + mes "This bookshelf seems to have a selection of diaries and manuscripts, though you can't make out anything that strikes you as being particularly interesting."; + close; + +L_magic: + mes "[Bookshelf]"; + mes "Browsing through the books, you come across a manuscript entitled 'Notes of Potaffe, On Transmutation'."; + next; + + if (getskilllv(SKILL_MAGIC_TRANSMUTE) < 2) + goto L_magic_boring; + + mes "[Bookshelf]"; + mes "Leafing through the manuscript, you find that you can read little of the tiny handwriting, and understand only a fraction of what is said."; + next; + + mes "[Bookshelf]"; + mes "After a while, you stumble across a section that appears to be in more careful handwriting. The author notes that he (or she?) is describing a completely new transmutation there."; + next; + + mes "[Bookshelf]"; + mes "Excitedly, you turn the page-- only to find that it is stuck to the next, and won't get unstuck!"; + next; + + mes "[Bookshelf]"; + mes "The page after that is more scribbly again, with many crossed-out words and sections, and side remarks such as 'It almost worked' or 'Worked fine yesterday.'"; + next; + + mes "[Bookshelf]"; + mes "The last word on that page is '" + getspellinvocation("make-iron-powder") + "', underlined twice, with a comment saying 'finally got it right'."; + next; + + mes "[Bookshelf]"; + mes "Unfortunately, you can't make out from the text what the transmutation is for or whether it requires any material components..."; + next; + + mes "[Bookshelf]"; + mes "You can't make out anything else of value, so you place the manuscript back in the bookshelf."; + next; + +L_magic_boring: + mes "[Bookshelf]"; + mes "Leafing through the manuscript, you find that you understand too little of what is said there to make any sense of it."; +} diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt index 89f2ea3f..d38bf04d 100644 --- a/npc/009-2_Hurnscald/wyara.txt +++ b/npc/009-2_Hurnscald/wyara.txt @@ -1,14 +1,39 @@ function script PurificationPotion { - announce "Meh.", 7; + set @STATUS_PURIFY_ONCE, 2; + set @STATUS_PURIFY_TWICE, 3; + + set @PURIFICATIONPOTION, 733; + + if (isat("011-1.gat", 88,67)) + goto L_correct; + announce "This doesn't seem to be the right place.", 7; + getitem @PURIFICATIONPOTION, 1; + close; +L_correct: + set @Q_MASK, NIBBLE_2_MASK; + set @Q_SHIFT, NIBBLE_2_SHIFT; + set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; + + if (@Q_status == @STATUS_PURIFY_ONCE) + set @Q_status, @STATUS_PURIFY_TWICE; + if (@Q_status < @STATUS_PURIFY_ONCE) + set @Q_status, @STATUS_PURIFY_ONCE; + + announce "You pour the potion into the pond.", 7; + + set QUEST_MAGIC2, + (QUEST_MAGIC2 & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; } // ---------------------------------------- // Wyara the Hurnscald witch // ---------------------------------------- 009-2.gat,121,26,0 script Wyara#_M 103,{ - set @Q_MASK, NIBBLE_7_MASK; - set @Q_SHIFT, NIBBLE_7_SHIFT; - set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + set @Q_MASK, NIBBLE_2_MASK; + set @Q_SHIFT, NIBBLE_2_SHIFT; + set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT; set @STATUS_INITIAL, 0; set @STATUS_PURIFY_EXPLAINED, 1; @@ -23,9 +48,12 @@ function script PurificationPotion { set @has_magic, getskilllv(SKILL_MAGIC); - mes "[Wyara the Witch]"; - mes "The witch waves you in."; - mes "\"Hello and welcome! Can I interested you in some potions?\""; + + mes "[Wyara the witch]"; + if (!Sex) + mes "\"Greetings, fair traveller! What can I do for you?\""; + if (Sex) + mes "\"Hello! What brings you here?\""; next; set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_WYARA; @@ -43,64 +71,9 @@ L_Shop: close; L_Question: - set @QQ_ELANORE, 1; - set @QQ_MANASEED, 2; - set @QQ_MANAPOTION, 3; - set @QQ_SAGATHA, 4; - set @QQ_AULDSBEL, 5; - - setarray @choice$, "", "", "", "", "", ""; - set @choices_nr, 0; - setarray @choice_idx, 0, 0, 0, 0, 0, 0; - - set @choice$[@choices_nr], "...Elanore the Healer?"; - set @choice_idx[@choices_nr], @QQ_ELANORE; - set @choices_nr, @choices_nr + 1; - - if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) - goto L_Q_post_manaseed; - set @choice$[@choices_nr], "...the Mana Seed?"; - set @choice_idx[@choices_nr], @QQ_MANASEED; - set @choices_nr, @choices_nr + 1; -L_Q_post_manaseed: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) - goto L_Q_post_manapotion; - set @choice$[@choices_nr], "...Mana Potions?"; - set @choice_idx[@choices_nr], @QQ_MANAPOTION; - set @choices_nr, @choices_nr + 1; -L_Q_post_manapotion: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) - goto L_Q_post_sagatha; - set @choice$[@choices_nr], "...Sagatha the Witch?"; - set @choice_idx[@choices_nr], @QQ_SAGATHA; - set @choices_nr, @choices_nr + 1; -L_Q_post_sagatha: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) - goto L_Q_post_auldsbel; - set @choice$[@choices_nr], "...Auldsbel the Wizard?"; - set @choice_idx[@choices_nr], @QQ_AULDSBEL; - set @choices_nr, @choices_nr + 1; -L_Q_post_auldsbel: - - set @choice$[@choices_nr], "...never mind."; - set @choice_idx[@choices_nr], 0; - set @choices_nr, @choices_nr + 1; - - menu @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -; - - set @menu, @menu - 1; - - if (@menu >= @choices_nr) - set @menu, 0; - - set @c, @choice_idx[@menu]; + callfunc "MagicTalkOptionsSetup"; + set @ignore, @QQ_WYARA; + callfunc "MagictalkMenu"; if (@c == 0) goto L_Main; if (@c == @QQ_ELANORE) goto L_Q_elanore; @@ -108,7 +81,25 @@ L_Q_post_auldsbel: if (@c == @QQ_MANAPOTION) goto L_Q_manapotion; if (@c == @QQ_SAGATHA) goto L_Q_sagatha; if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; - close; + if (@c == @QQ_IMP) goto L_Q_imp; + if (@c == @QQ_OLDWIZ) goto L_Q_old_wizard; + + mes "[Wyara the Witch]"; + mes "\"I fear that I can't help you with that.\""; + next; + goto L_Main; + + +L_Q_old_wizard: + mes "[Wyara the Witch]"; + mes "\"I don't know his name, but I do know that he has been living in the mountains since I first came here. He is a master of many schools of magic, I believe.\""; + next; + mes "[Wyara the Witch]"; + mes "She smiles."; + mes "\"He is also a nice and friendly person to talk to, and quite knowledgeable about the teas of this area.\""; + next; + goto L_Main; + L_Q_elanore: mes "[Wyara the Witch]"; @@ -172,6 +163,12 @@ L_make_manapotion_lack: goto L_Main; +L_Q_imp: + mes "[Wyara the Witch]"; + mes "\"Sagatha told me that she imprisoned an evil earth spirit in a dried-up well. She wants it to stay there until it has mended its ways, or forever, if it doesn't.\""; + next; + goto L_main_menu; + L_Q_sagatha: mes "[Wyara the Witch]"; mes "Wyara smiles."; @@ -223,7 +220,7 @@ L_Magic_explain: next; mes "[Wyara the Witch]"; - mes "\"There are different kinds of magic, too; nature, ether, and so on, but if this interest you, you should talk to a scholar.\""; + mes "\"There are different kinds of magic, too; nature, ether, and so on, but if this interests you, you should talk to a scholar.\""; next; goto L_Magic_main; @@ -544,8 +541,8 @@ L_Magic_train_sagatha_fail: goto L_Magic_main; S_update_var: - set QUEST_MAGIC, - (QUEST_MAGIC & ~(@Q_MASK) + set QUEST_MAGIC2, + (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); return; } diff --git a/npc/009-3_Cave_beneath_Hurnscald/sword.txt b/npc/009-3_Cave_beneath_Hurnscald/sword.txt index b042bce7..a1f9949a 100644 --- a/npc/009-3_Cave_beneath_Hurnscald/sword.txt +++ b/npc/009-3_Cave_beneath_Hurnscald/sword.txt @@ -12,10 +12,18 @@ L_message: set @STATUS_LEARNED_FLAREDART, 1; set @STATUS_LEARNED_MAGICBLADE, 2; set @STATUS_LEVEL2, 3; + set @STATUS_W11, 4; + set @STATUS_W12, 5; + set @STATUS_W11_12, 6; + set @STATUS_L2_ALLSPELLS, 7; 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_PostFlareDart_teach; + if (@Q_status == @STATUS_LEVEL2) goto L_L2_W11; + if (@Q_status == @STATUS_W12) goto L_L2_W11; + if (@Q_status == @STATUS_W11) goto L_L2_almost_done; + if (@Q_status == @STATUS_W11_12) goto L_L2_almost_done; mes "[Magic Sword]"; mes "Come back when thou art stronger."; @@ -107,7 +115,7 @@ L_PostFlareDart_teach: next; mes "[Magic 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...\""; + mes "\"But beware... the path of war that thou hast embarked upon is one from which few return. May luck be on thy side...\""; next; close; @@ -119,6 +127,59 @@ L_PostFlareDart_teach: L_Close: close; +L_L2_W11: + mes "[Magic Sword]"; + mes "\"You have returned. That must mean that thy wish to learn the magic of war is still alive?\""; + next; + menu + "No, I just wanted to say `hi'.", L_sayhi, + "Yes, teach me more!", -; + + mes "[Magic Sword]"; + mes "\"If that is thy wish, I shall not stop thee. But do not expect to find merriment down this road.\""; + mes "\"I must ask that you sacrifice a thousand monster points for this, however.\""; + + "No, I don't want that.", L_farewell, + "I agree.", -; + + if (Mobpt < 1000) goto L_lacking_mobpoints; + + mes "[Magic Sword]"; + mes "\"So be it, then.\""; + mes "[1000 experience points]"; + set Mobpt, Mobpt - 1000; + getexp 1000, 0; + set @Q_status, @Q_status + 1; + callsub S_update_var; + next; + + mes "[Magic Sword]"; + mes "\"The spell I shall teach thee is the hail of arrows spell. It will make arrows fall down from the heavens unto thy enemies.\""; + next; + + mes "[Magic Sword]"; + mes "\"Take twenty arrows, sprinkle sulphur powder over them, and then speak '" + getspellinvocation("arrow-hail") + "'. Throw them high up in the air, and watch the hail unfold before thy feet.\""; + next; + close; + + +L_L2_almost_done: + mes "[Magic Sword]"; + mes "\"Return to my sister now. I expect that she shall teach you one more spell.\""; + next; + close; + +L_lacking_mobpoints: + mes "[Magic Sword]"; + mes "\"Thou lackest the monster points needed to prove thy worthiness. I shall not reveal more to you until thou hast slain more monsters.\""; + next; + close; + +L_sayhi: + mes "[Magic Sword]"; + mes "\"Please leave me in peace.\""; + next; + close; S_update_var: set QUEST_MAGIC, diff --git a/npc/011-1_Woodland/alchemist.txt b/npc/011-1_Woodland/alchemist.txt index f6067d39..bc7b53f3 100644 --- a/npc/011-1_Woodland/alchemist.txt +++ b/npc/011-1_Woodland/alchemist.txt @@ -9,7 +9,8 @@ set @Q_MASK, NIBBLE_3_MASK; set @Q_SHIFT, NIBBLE_3_SHIFT; - set @wants_sulphur, (QUEST_MAGIC & NIBBLE_6_MASK); + set @wants_sulphur, (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)); + set @wants_ironpowder, (((QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT) >= 7); set @Q_status, (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT; // End of Setzer quest/monster oil quest participation @@ -38,9 +39,10 @@ set @CHOICE_MONSTER_OIL, 4; set @CHOICE_MANA_POTION, 5; set @CHOICE_SULPHUR_POWDER, 6; - set @CHOICE_ABORT, 7; + set @CHOICE_IRON_POWDER, 7; + set @CHOICE_ABORT, 8; - setarray @menuitems$, "", "", "", "", "", ""; + setarray @menuitems$, "", "", "", "", "", "", "", ""; set @c, 0; set @menuitems$[@c], "Iron potion."; @@ -95,10 +97,17 @@ 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 @menuID[@c], @CHOICE_SULPHUR_POWDER; set @c, @c + 1; L_post_sulphur_option: + if (!@wants_ironpowder) + goto L_post_ironpowder_option; + set @menuitems$[@c], "Can you make iron powder?"; + set @menuID[@c], @CHOICE_IRON_POWDER; + set @c, @c + 1; +L_post_ironpowder_option: + if (@Q_status == @SETZER_INITIAL) goto L_main_menu; set @menuitems$[@c], "Can you make monster oil?"; @@ -117,7 +126,8 @@ L_main_menu: @menuitems$[3], -, @menuitems$[4], -, @menuitems$[5], -, - @menuitems$[6], -; + @menuitems$[6], -, + @menuitems$[7], -; set @menu, @menu - 1; @@ -128,8 +138,58 @@ 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_SULPHUR_POWDER) goto L_sulphur; + if (@menuID[@menu] == @CHOICE_IRON_POWDER) goto L_iron_powder; if (@menuID[@menu] == @CHOICE_ABORT) goto L_abort; + goto L_abort; + +L_iron_powder: + mes "[Rauk the Alchemist]"; + mes "\"Iron powder? Hmm, I can extract some iron powder out of a chunk of iron ore, but that will require me to dissolve it. If you give me a chunk of iron ore and 100 GP for the acid, I can do it.\""; + menu + "Never mind.", L_abort, + "Here you are!", -; + + if (countitem(@ORE) < 1) + goto L_iron_powder_noore; + if (zeny < 100) + goto L_iron_powder_nozeny; + getinventorylist; + if (@inventorylist_count == 100 + && countitem(@ORE) > 1 + && countitem(@IRONPOWDER) < 1) + goto L_iron_powder_full; + delitem @ORE, 1; + set zeny, zeny - 100; + getitem @IRONPOWDER, 4; + mes "[Rauk the Alchemist]"; + mes "Rauk places your chunk of ore in a strange glass container, then pours a steaming yellow liquid over it. Before your eyes, the ore dissolves.\""; + next; + + mes "[Rauk the Alchemist]"; + mes "Rauk pours another liquid over the resultant mixture, then pours the result through a piece of cloth placed in a funnel. He removes some amount of metal powder from the cloth and hands it to you.\""; + mes "\"This is about as fine as I can make it without mechanical help.\""; + next; + + close; + +L_iron_powder_noore: + mes "[Rauk the Alchemist]"; + mes "\"I do need a chunk of iron ore. Please return when you have one.\""; + next; + close; + +L_iron_powder_nozeny: + mes "[Rauk the Alchemist]"; + mes "\"I'm sorry, but I must ask that you pay 100 GP-- the acid I use is not cheap.\""; + next; + close; + +L_iron_powder_full: + mes "[Rauk the Alchemist]"; + mes "\"I don't think that you have room to carry this. Please come back later.\""; + next; + close; L_sulphur: mes "[Rauk the Alchemist]"; diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index ef88277f..c71694ca 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -9,6 +9,7 @@ set @MAUVE, 680; set @PETAL, 565; set @PEARL, 700; + set @WOOD, 569; set @BOTTLE_WATER, 541; set @MANA_POTION, 705; set @SMALL_HEALING_POTION, 685; @@ -28,13 +29,20 @@ set @SULPHUR, 703; set @IRONPOWDER, 704; set @MOUBOO_FIGURINE, 728; + set @BUGLEG, 518; 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_STATUS_STUDENT, 3; // accepted as student + set @Q_STATUS_STUDENT0, 4; // accepted as student + set @Q_STATUS_STUDENT1, 5; + set @Q_STATUS_STUDENT2, 6; + set @Q_STATUS_STUDENT3, 7; + set @Q_STATUS_STUDENT4, 8; - set @Q_wants_sulphur, (QUEST_MAGIC & NIBBLE_6_MASK); + set @wants_sulphur, (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)); + set @wants_ironpowder, (((QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT) >= 7); set @Q_MASK, NIBBLE_0_MASK | NIBBLE_1_MASK; set @Q_SHIFT, NIBBLE_0_SHIFT; @@ -168,6 +176,15 @@ L_main_menu: close; L_main_menu_magic: + 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, + "Do you need help with your experiments?", L_quest, + "What do you know about...", L_question, + "Can you make sulphur powder?", L_sulphur, + "Can you make iron powder?", L_ironpowder, + "Goodbye.", -; if (@wants_sulphur) menu "How does magic work?", L_about_magic, "Can you teach me a spell?", L_learn_spell, @@ -185,12 +202,28 @@ L_main_menu_magic: "Goodbye.", -; close; +L_ironpowder: + mes "[Auldsbel the Wizard]"; + mes "\"No, I do not know the spell for this. I expect that it shouldn't be too hard an invocation, but I'm too busy to work it out.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"I know that they used to make iron ore around here, though, many years ago. Perhaps the secret is still hidden somewhere?\""; + next; + goto L_main_menu; + 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 + if (@Q_status >= @Q_STATUS_STUDENT) + menu + "No, thank you.", -, + "I will see what I can find.", -, + "Can you teach me how to make it myself?", L_sulphur_teach_spell, + "Here you are.", L_sulphur_buy; + if (@Q_status < @Q_STATUS_STUDENT) + menu "No, thank you.", -, "I will see what I can find.", -, "Here you are.", L_sulphur_buy; @@ -231,7 +264,34 @@ L_sulphur_noroom: mes "[Auldsbel the Wizard]"; mes "\"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; + goto L_main_menu; + +L_sulphur_teach_spell: + if (@Q_component_quest <= 4) + goto L_sulphur_teach_spell_no; + mes "[Auldsbel the Wizard]"; + mes "\"Very well, then. You have been quite helpful with my experiments, after all. As you may have noticed, the spell takes a pile of volcanic ashes. Close your hands around it, then whisper the invocation.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"That invocation is '" + getspellinvocation("make-sulphur") + "'.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"You may find that you can transmute the powder more effectively after a while; that is perfectly natural.\""; + next; + goto L_main_menu; + +L_sulphur_teach_spell_no: + mes "[Auldsbel the Wizard]"; + mes "\"Hmm... how about this: you help me with a few of my experiments, and I tell you?\""; + next; + menu + "Very well, I will help you.", L_quest, + "No.", -; + + mes "[Auldsbel the Wizard]"; + mes "\"Then I fear that I shall not reveal the spell to you either.\""; + next; + goto L_main_menu; L_about_magic: mes "[Auldsbel the Wizard]"; @@ -454,66 +514,37 @@ L_learn_magic: goto L_main_menu; L_question: - set @QQ_ELANORE, 1; - set @QQ_MANASEED, 2; - set @QQ_WYARA, 3; - set @QQ_SAGATHA, 4; - - setarray @choice$, "", "", "", "", ""; - set @choices_nr, 0; - setarray @choice_idx, 0, 0, 0, 0, 0; - - set @choice$[@choices_nr], "...Elanore the Healer?"; - set @choice_idx[@choices_nr], @QQ_ELANORE; - set @choices_nr, @choices_nr + 1; - - if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) - goto L_Q_post_manaseed; - set @choice$[@choices_nr], "...the Mana Seed?"; - set @choice_idx[@choices_nr], @QQ_MANASEED; - set @choices_nr, @choices_nr + 1; -L_Q_post_manaseed: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) - goto L_Q_post_wyara; - set @choice$[@choices_nr], "...Wyara the Witch?"; - set @choice_idx[@choices_nr], @QQ_WYARA; - set @choices_nr, @choices_nr + 1; -L_Q_post_wyara: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) - goto L_Q_post_sagatha; - set @choice$[@choices_nr], "...Sagatha the Witch?"; - set @choice_idx[@choices_nr], @QQ_SAGATHA; - set @choices_nr, @choices_nr + 1; -L_Q_post_sagatha: - - set @choice$[@choices_nr], "...never mind."; - set @choice_idx[@choices_nr], 0; - set @choices_nr, @choices_nr + 1; - - menu @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -; - - set @menu, @menu - 1; - - if (@menu >= @choices_nr) - set @menu, 0; - - set @c, @choice_idx[@menu]; - -// mes "menu = " + @menu + ", c = " + @c + " nr=" + @choices_nr + ", ids = " + @choice_idx[0]; -// next; + callfunc "MagicTalkOptionsSetup"; + set @ignore, @QQ_AULDSBEL; + callfunc "MagictalkMenu"; if (@c == 0) goto L_main_menu; if (@c == @QQ_ELANORE) goto L_Q_elanore; if (@c == @QQ_MANASEED) goto L_Q_manaseed; if (@c == @QQ_WYARA) goto L_Q_wyara; if (@c == @QQ_SAGATHA) goto L_Q_sagatha; - close; + if (@c == @QQ_IMP) goto L_Q_imp; + if (@c == @QQ_OLDWIZ) goto L_Q_old_wizard; + + mes "[Auldsbel the Wizard]"; + mes "\"Let us talk about something else.\""; + next; + goto L_main_menu; + +L_Q_oldwiz: + mes "[Auldsbel the Wizard]"; + mes "\"I'm still not sure what exactly to make of him. At first appearance, he seems like a senile old man, but there can be no doubt that he has-- or at least had, at some point-- a very deep understanding of magic.\""; + next; + mes "[Auldsbel the Wizard]"; + mes "\"I have not had the opportunity to talk to him too much, though.\""; + next; + goto L_main_menu; + +L_Q_imp: + mes "[Auldsbel the Wizard]"; + mes "\"There are many different kinds of spirits in the world. Some are good-natured, others evil; some are weak, others very powerful. I don't know the particular one you have encountered, though I urge caution.\""; + next; + goto L_main_menu; L_Q_elanore: mes "[Auldsbel the Wizard]"; @@ -898,6 +929,11 @@ L_component_quest_missing: L_learn_spell: if (@Q_main_status == @Q_STATUS_INITIATION) goto LL_initiation; if (@Q_main_status == @Q_STATUS_STUDENT) goto LL_student_start; + if (@Q_main_status == @Q_STATUS_STUDENT0) goto LL_student_0; + if (@Q_main_status == @Q_STATUS_STUDENT1) goto LL_student_1; + 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; 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?\""; @@ -981,7 +1017,7 @@ LL_initiation_check: next; mes "[Auldsbel the Wizard]"; - mes "You feel new powers curse flowing into your body!"; + mes "You feel new powers flowing into your body!"; mes "[5000 experience points]"; mes "[Level 2 in Transmutation Magic]"; @@ -993,6 +1029,163 @@ LL_initiation_check: goto L_main_menu; LL_student_start: + mes "[Auldsbel the Wizard]"; + mes "\"Next, I shall teach you a higher-level transmutation spell.\""; + if (getskilllv(SKILL_MAGIC) < 2) + msg "\"Beware, for you will not be able to use it yet.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"Bring me ten bug legs, and I will reveal its invocation to you.\""; + next; + + menu + "Here you are.", -, + "I'll be back with them.", L_main_menu; + + if (countitem(@BUGLEG) < 10) + goto L_component_quest_missing; + + delitem @BUGLEG, 10; + getexp 1000, 0; + set @Q_status, @Q_STATUS_STUDENT0; + callsub S_update_var; + + mes "[Auldsbel the Wizard]"; + mes "He picks up the bug legs."; + mes "\"Good. These will come in handy later...\""; + mes "He grins."; + mes "[1000 experience points]"; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"Now, listen carefully: to make a short tank top out of three pieces of cloth, you must use the invocation '" + getspellinvocation("make-short-tanktop") + "'.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"But be careful; transmutations can go wrong, and that can injure you. When you have some more overall spellcasting practice, come back to me.\""; + next; + goto L_main_menu; + +LL_notready: + mes "[Auldsbel the Wizard]"; + mes "\"You still need more practice with spellcasting; I won't give you another spell until you are ready.\""; + next; + goto L_main_menu; + +LL_student_0: + if (@mexp < 350) goto LL_notready; + + mes "[Auldsbel the Wizard]"; + mes "\"The next transmutation spell is a little harder than the last one I taught you, but you should be able to manage.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"Bring me twenty mauve leaves, and I will reveal its invocation.\""; + next; + + menu + "Here you are.", -, + "I'll be back with them.", L_main_menu; + + if (countitem(@MAUVE) < 20) + goto L_component_quest_missing; + + delitem @MAUVE, 20; + getexp 1000, 0; + set @Q_status, @Q_STATUS_STUDENT1; + callsub S_update_var; + + mes "[Auldsbel the Wizard]"; + mes "He pockets your mauve leaves."; + mes "\"Those should go very well with the salmon.\""; + mes "[1000 experience points]"; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"The next spell I have will make a normal tank top out of four pieces of cloth. The invocation is '" + getspellinvocation("make-tanktop") + "', make sure to write this down.\""; + next; + + goto L_main_menu; + +LL_student_1: + if (@mexp < 425) goto LL_notready; + + mes "[Auldsbel the Wizard]"; + mes "\"Up next is the transmutation spell for regular shirts.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"For this, I would like ten scorpion stingers.\""; + next; + + menu + "Here you are.", -, + "I'll be back with them.", L_main_menu; + + if (countitem(@STINGER) < 10) + goto L_component_quest_missing; + + delitem @STINGER, 10; + getexp 1000, 0; + set @Q_status, @Q_STATUS_STUDENT2; + callsub S_update_var; + + mes "[Auldsbel the Wizard]"; + mes "He carefully takes the stingers."; + mes "\"You are being quite helpful. If my experiments go well, I will make sure to acknowledge you in a footnote somewhere.\""; + mes "[1000 experience points]"; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"To make a shirt, use the invocation '" + getspellinvocation("make-shirt") + "'. This will require five pieces of cloth.\""; + next; + + goto L_main_menu; + +LL_student_2: + if (@mexp < 500) goto LL_notready; + + mes "[Auldsbel the Wizard]"; + mes "\"You may find the next spell particularly useful.\""; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"Bring me twenty wooden logs, and I will teach you.\""; + next; + + menu + "Here you are.", -, + "I'll be back with them.", L_main_menu; + + if (countitem(@WOOD) < 20) + goto L_component_quest_missing; + + delitem @WOOD, 20; + getexp 1000, 0; + set @Q_status, @Q_STATUS_STUDENT3; + callsub S_update_var; + + mes "[Auldsbel the Wizard]"; + mes "Auldsbel places the logs next to his hut."; + mes "\"I'm hoping to animate them into the shape of one of those odd log heads.\""; + mes "[1000 experience points]"; + next; + + mes "[Auldsbel the Wizard]"; + mes "\"This spell makes arrows out of a single wooden log. Its invocation is '" + getspellinvocation("make-arrows") + "'.\""; + next; + + goto L_main_menu; + +LL_student_3: + // Future extensions go here + 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; + + goto L_main_menu; + S_update_var: set @Q_status, @Q_main_status | (@Q_component_quest << 5); diff --git a/npc/013-1_Woodland_hills/sagatha.txt b/npc/013-1_Woodland_hills/sagatha.txt index e2e71cdb..51de9191 100644 --- a/npc/013-1_Woodland_hills/sagatha.txt +++ b/npc/013-1_Woodland_hills/sagatha.txt @@ -33,6 +33,7 @@ L_write: } function script SagathaStatus { + set @mexp, MAGIC_EXPERIENCE & 65535; set @has_magic, getskilllv(SKILL_MAGIC); set @evil, 0; set @good, 0; @@ -58,9 +59,17 @@ function script SagathaStatus { 013-1.gat,131,24,0 script Sagatha#_M 167,{ callfunc "SagathaStatus"; - set @Q_MASK, NIBBLE_4_MASK; + set @Q_MASK, NIBBLE_4_MASK | NIBBLE_5_MASK; set @Q_SHIFT, NIBBLE_4_SHIFT; + set @STATUS_INITIAL, 0; + set @STATUS_STUDENT, 1; // N10 + set @STATUS_STUDENT_A10, 2; + set @STATUS_STUDENT_A11, 3; + set @STATUS_STUDENT_A12, 4; + set @STATUS_STUDENT_N11, 5; + set @STATUS_STUDENT_LEVEL_3, 6; + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; if (MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA) @@ -74,6 +83,9 @@ function script SagathaStatus { if (@unhappy > 10) goto L_unhappy; + if (MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA) + goto L_wb; + mes "Before you stands a beautiful woman, dressed in dark purple robes and wearing a witch's hat."; if (Sex) @@ -82,7 +94,39 @@ function script SagathaStatus { mes "She looks at you impassively."; next; + menu + "Who are you?", -, + "What's your name?", L_intro_name, + "Hello! My name is " + strcharinfo(0) + ".", L_intro_givename, + "Goodbye.", L_close; + + mes "[Witch]"; + mes "\"I am what you humans call a witch. I am a human who has chosen all living creatures as what you call family.\""; + next; + + menu + "No, I mean... what's your name?", L_intro_name, + "Hello! My name is " + strcharinfo(0) + ".", L_intro_givename, + "Uh.... goodbye.", L_close; + + close; + +L_intro_name: + mes "[Sagatha the Witch]"; + mes "\"They call me Sagatha.\""; set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_SAGATHA; + next; + goto L_main; + +L_intro_givename: + mes "[Witch]"; + mes "\"Ah.\""; + next; + + menu + "What's yours?", L_intro_name, + "Uhm... bye.", -; + close; L_evil: mes "The witch's eyes flare up in anger as she notices you, and she turns away from you."; @@ -92,95 +136,193 @@ L_evil: 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!\""; + mes "\"I wonder if you can still sleep after killing those innocent forest creatures! I am sure that they will come back to haunt you in your dreams!\""; next; close; -L_Main: - menu "What do you know about...", L_Question; +L_wb: + mes "[Sagatha the Witch]"; + if (@good > 1) + msg "Sagatha nods as she notices you."; + if (@good == 1) + msg "Sagatha raises an eyebrow as you address her."; + if (@good == 0) + msg "Sagatha glances at you, suspicion evident in her eyes."; + next; + +L_main: + if (@Q_status) + menu + "Can you explain magic to me?", L_explain_magic, + "Can you teach me more magic?", L_teach, + "What do you know about...", L_Question; + if (!@Q_status) + menu + "Can you explain magic to me?", L_explain_magic, + "Can you teach me magic?", L_teach_initial, + "What do you know about...", L_Question; close; +L_teach_initial: + if (@good < 2) + goto L_teach_initial_nogood; + if (getskilllv(SKILL_MAGIC_NATURE) < 2) + goto L_teach_initial_nonature; + + mes "[Sagatha the Witch]"; + mes "She nods."; + mes "\"For now, yes. But you will have to prove that you really care about more than yourself.\""; + next; + + mes "[Sagatha the Witch]"; + mes "She snaps her fingers, and without warning you begin to acutely sense the magical energies around you, for a brief instant!"; + mes "[5000 experience points]"; + mes "[Level 2 in Ether Magic]"; + + set @Q_status, @STATUS_STUDENT; + callsub S_update_var; + getexp 5000, 0; + if (getskilllv(SKILL_MAGIC_ETHER) < 2) + skill SKILL_MAGIC_ETHER, 2; + + mes "[Sagatha the Witch]"; + mes "\"In the future, I will teach you nature and ether magic. For the other schools there are better teachers around.\""; + next; + + goto L_main; + + +L_teach_initial_nogood: + mes "[Sagatha the Witch]"; + mes "\"I don't take strangers as students.\""; + next; + goto L_main; + +L_teach_initial_nonature: + mes "[Sagatha the Witch]"; + mes "\"I might, but you don't even understand the basics of nature magic.\""; + next; + goto L_main; + +L_explain_magic: + mes "[Sagatha the Witch]"; + mes "\"No.\""; + next; + goto L_main; + +L_teach: + if (@Q_status == @STATUS_STUDENT) + goto L_teach_N10; + if (@Q_status == @STATUS_STUDENT_A10) + goto L_teach_A10; + if (@Q_status == @STATUS_STUDENT_A11) + goto L_teach_A11; + if (@Q_status == @STATUS_STUDENT_A12) + goto L_teach_A12; + if (@Q_status == @STATUS_STUDENT_N11) + goto L_teach_N11; + + mes "[Sagatha the Witch]"; + mes "\"Not yet. You have to ask the mana seed to give you more power.\""; + next; + goto L_main; + +L_practice: + mes "[1000 experience points]"; + set @Q_status, @Q_status + 1; + callsub S_update_var; + getexp 1000,0; + next; + mes "[Sagatha the Witch]"; + mes "\"Now go and practice.\""; + next; + goto L_main; + +L_teach_N10: + if (@mexp < 150) goto L_teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"First, a nature spell. Take a cocoon shell. Hold it in your hand. Feel its lightness.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"Now whisper '" + getspellinvocation("flying-backpack") + "', and if your backpack was pressing on you you should no longer feel it now.\""; + goto L_practice; + +L_teach_A10: + if (@mexp < 250) goto L_teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"To protect against others' magic, take a small mushroom from a shady place. Mushrooms draw things out of the earth. Rub your mushroom into pieces between your hands.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"Then say '" + getspellinvocation("barrier") + "' and let the musroom's power take over.\""; + next; + goto L_practice; + +L_teach_A11: + if (@mexp < 350) goto L_teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"If you must fight, call allies. You can call scorpions with a scorpion stinger. Hold up the stinger and call out to them: '" + getspellinvocation("summon-scorps") + "'.\""; + next; + goto L_practice; + +L_teach_A12: + if (@mexp < 450) goto L_teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"You can call red scorpions, too. But for them you must call out '" + getspellinvocation("summon-red-scorps") + "' instead.\""; + next; + goto L_practice; + +L_teach_N11: + if (@mexp < 550) goto L_teach_noexp; + mes "[Sagatha the Witch]"; + mes "\"You can harden your skin with a hard spike. Hold it in your hands and speak '" + getspellinvocation("protect") + "', then draw its hardness into your skin.\""; + next; + mes "[Sagatha the Witch]"; + mes "\"Or call it into someone else's skin, by saying that someone's name right after the '" + getspellinvocation("protect") + "'.\""; + next; + goto L_practice; + +L_teach_noexp: + mes "[Sagatha the Witch]"; + mes "\"You must practice more first.\""; + next; + goto L_main; + L_Question: - set @QQ_ELANORE, 1; - set @QQ_MANASEED, 2; - set @QQ_WYARA, 3; - set @QQ_AULDSBEL, 5; - - setarray @choice$, "", "", "", "", "", ""; - set @choices_nr, 0; - setarray @choice_idx, 0, 0, 0, 0, 0, 0; - - set @choice$[@choices_nr], "...Elanore the Healer?"; - set @choice_idx[@choices_nr], @QQ_ELANORE; - set @choices_nr, @choices_nr + 1; - - if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) - goto L_Q_post_manaseed; - set @choice$[@choices_nr], "...the Mana Seed?"; - set @choice_idx[@choices_nr], @QQ_MANASEED; - set @choices_nr, @choices_nr + 1; -L_Q_post_manaseed: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) - goto L_Q_post_manapotion; - set @choice$[@choices_nr], "...Mana Potions?"; - set @choice_idx[@choices_nr], @QQ_MANAPOTION; - set @choices_nr, @choices_nr + 1; -L_Q_post_manapotion: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) - goto L_Q_post_wyara; - set @choice$[@choices_nr], "...Wyara the Witch?"; - set @choice_idx[@choices_nr], @QQ_WYARA; - set @choices_nr, @choices_nr + 1; -L_Q_post_wyara: + callfunc "MagicTalkOptionsSetup"; + set @ignore, @QQ_SAGATHA; + callfunc "MagictalkMenu"; - if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) - goto L_Q_post_sagatha; - set @choice$[@choices_nr], "...Sagatha the Witch?"; - set @choice_idx[@choices_nr], @QQ_SAGATHA; - set @choices_nr, @choices_nr + 1; -L_Q_post_sagatha: - - if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) - goto L_Q_post_auldsbel; - set @choice$[@choices_nr], "...Auldsbel the Wizard?"; - set @choice_idx[@choices_nr], @QQ_AULDSBEL; - set @choices_nr, @choices_nr + 1; -L_Q_post_auldsbel: - - set @choice$[@choices_nr], "...never mind."; - set @choice_idx[@choices_nr], 0; - set @choices_nr, @choices_nr + 1; - - menu @choice$[0], -, - @choice$[1], -, - @choice$[2], -, - @choice$[3], -, - @choice$[4], -; - - set @menu, @menu - 1; - - if (@menu >= @choices_nr) - set @menu, 0; - - set @c, @choice_idx[@menu]; - - if (@c == 0) goto L_Main; + if (@c == 0) goto L_main; if (@c == @QQ_ELANORE) goto L_Q_elanore; if (@c == @QQ_MANASEED) goto L_Q_manaseed; if (@c == @QQ_MANAPOTION) goto L_Q_manapotion; if (@c == @QQ_WYARA) goto L_Q_wyara; if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; - close; + if (@c == @QQ_IMP) goto L_Q_imp; + if (@c == @QQ_OLDWIZ) goto L_Q_old_wizard; + + mes "[Sagatha the Witch]"; + mes "\"That doesn't concern you.\""; + next; + goto L_main; + +L_Q_old_wizard: + mes "[Sagatha the Witch]"; + mes "\"A kind and wise wizard.\""; + next; + goto L_main_menu; + +L_Q_imp: + mes "[Sagatha the Witch]"; + mes "\"He is an evil and cruel one. He lies and cheats and will try to take advantage of you. Stay away from him.\""; + next; + goto L_main_menu; L_Q_elanore: mes "[Sagatha the Witch]"; - mes "\"FIXME.\""; + mes "\"Elanore is the Tulimshar town healer.\""; next; - goto L_Main; + goto L_main; L_Q_manaseed: mes "[Sagatha the Witch]"; @@ -188,40 +330,43 @@ L_Q_manaseed: goto L_Q_manaseed_unabsorbed; if (@has_magic) goto L_Q_manaseed_m; - mes "\"arimasu\""; + mes "\"There is a mana seed around here, but I don't see how this concerns you.\""; next; - goto L_Main; + goto L_main; L_Q_manaseed_unabsorbed: mes "[Sagatha the Witch]"; - mes "\"...unattuned.\""; + mes "\"If the mana seed didn't pass its magic to you, you clearly aren't attuned to magic.\""; next; - goto L_Main; + goto L_main; L_Q_manaseed_m: mes "[Sagatha the Witch]"; - mes "\"...\""; + mes "\"You were lucky that the mana seed gave you its magic.\""; next; - goto L_Main; + goto L_main; L_Q_manapotion: mes "[Sagatha the Witch]"; - mes "\"Can't make one without a cauldron.\""; + mes "\"I won't make one without a cauldron, that would be wasteful. And I'm not going to start carrying a cauldron around.\""; next; - goto L_Main; + goto L_main; L_Q_wyara: mes "[Sagatha the Witch]"; - mes "\"\""; + mes "\"Wyara decided to live with humans, in Hurnscald. She tries to make the world a better place in her own way. Please be kind to her, she is a very good person.\""; next; - goto L_Main; + goto L_main; L_Q_auldsbel: mes "[Sagatha the Witch]"; - mes "\"\""; + mes "She frowns."; + mes "\"He's a transmutation wizard, member of the northern council. Reasonably competent wizard, too.\""; next; - goto L_Main; + goto L_main; +L_close: + close; S_update_var: set QUEST_MAGIC, diff --git a/npc/013-2_Magic_house/wizard.txt b/npc/013-2_Magic_house/wizard.txt index 25f30122..3abb0bb3 100644 --- a/npc/013-2_Magic_house/wizard.txt +++ b/npc/013-2_Magic_house/wizard.txt @@ -1,22 +1,78 @@ -013-2.gat,66,39,0 script Old Wizard 116,{ +013-2.gat,66,39,0 script Old Wizard#_W 116,{ + set @has_magic, getskilllv(SKILL_MAGIC); + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_OLD_WIZARD; + + mes "[Old Wizard]"; mes "\"Welcome, dear wanderer! Come into my humble home. Take a rest, eat and drink.\""; next; + menu - "Thanks, that's very kind of you!",thanks, - "Oh, shut up!",shutup; + "Thanks, that's very kind of you!",thanks, + "Can you teach me magic?", L_teach_rude, + "Oh, shut up!",shutup; + close; + +L_teach_rude: + mes "[Old Wizard]"; + mes "\"I certainly could, but I already have an apprentice.\""; + close; + shutup: + mes "[Old Wizard]"; mes "\"That attitude isn't going to get you very far, my dear.\""; close; thanks: + mes "[Old Wizard]"; mes "\"Behind this door, my apprentice will serve you.\""; next; - menu - "Alright.",ok, - "Your apprentice? ... No thanks.",nothx; + if (@has_magic) + menu + "Alright.",ok, + "I am studying magic, can you help?", L_new_student, + "Your apprentice? ... No thanks.",nothx; + if (!@has_magic) + menu + "Alright.",ok, + "Your apprentice? ... No thanks.",nothx; nothx: + mes "[Old Wizard]"; mes "\"Goodbye, then!\""; close; + +L_new_student: + mes "[Old Wizard]"; + mes "\"Studying is always an excellent use of one's mind! I fear that I can't offer too much assistance to you, however. But if you are interested, I could perhaps teach you a simple spell?\""; + + menu + "That would be very kind of you!", -, + "No, but thank you!", nothx; + + mes "[Old Wizard]"; + mes "\"This one may not seem too powerful, but it can be quite handy; it's the 'hide' spell. It will shield you from some forms of detection magic.\""; + next; + + mes "[Old Wizard]"; + mes "\"Put a piece of cotton cloth on your head, and speak out '" + getspellinvocation("hide") + "', loudly and clearly. The protection lasts quite long, but you may have to renew it on occasion.\""; + next; + + mes "[Old Wizard]"; + mes "\"You can also cast it on others, of course. Just speak their name after you prononuce the invocation.\""; + next; + + mes "[Old Wizard]"; + mes "\"You may find it useful for getting a little peace and quiet at times, but it can also get in the way of friends trying to find you, so use it with care.\""; + next; + + if (getskilllv(SKILL_MAGIC_ASTRAL) >= 2) + close; + + mes "[Old Wizard]"; + mes "\"I'm not sure if you are experienced enough to cast it yet, though. You may need to first learn astral magic.\""; + next; + close; + ok: + mes "[Old Wizard]"; mes "\"Beware the flying notes though, some of them are really dangerous. I haven't been able to persuade them to get back into their book. And avoid the mirror, it's been acting strange lately.\""; next; mes "\"Oh, and please don't take my apprentice too seriously. He still has a lot to learn.\""; diff --git a/npc/015-1_Woodland/sword.txt b/npc/015-1_Woodland/sword.txt index a32b3b13..d666777e 100644 --- a/npc/015-1_Woodland/sword.txt +++ b/npc/015-1_Woodland/sword.txt @@ -4,7 +4,7 @@ close; L_message: - set @Q_MASK, NIBBLE_6_MASK; + set @Q_MASK, (NIBBLE_6_MASK | NIBBLE_7_MASK); set @Q_SHIFT, NIBBLE_6_SHIFT; set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; @@ -12,10 +12,20 @@ L_message: set @STATUS_LEARNED_FLAREDART, 1; set @STATUS_LEARNED_MAGICBLADE, 2; set @STATUS_LEVEL2, 3; + set @STATUS_W11, 4; + set @STATUS_W12, 5; + set @STATUS_W11_12, 6; + set @STATUS_L2_ALLSPELLS, 7; + set @ORE, 640; + set @IRONPOWDER, 704; if (@Q_status == @STATUS_INITIAL) goto L_Initial; if (@Q_status == @STATUS_LEARNED_FLAREDART) goto L_FlareStage; if (@Q_status == @STATUS_LEARNED_MAGICBLADE) goto L_MagicBladeStage; + if (@Q_status == @STATUS_LEVEL2) goto L_L2_W12; + if (@Q_status == @STATUS_W11) goto L_L2_W12; + if (@Q_status == @STATUS_W12) goto L_L2_almost_done; + if (@Q_status == @STATUS_W11_12) goto L_L2_W10; mes "[Mystic Sword]"; mes "\"I have taught thee all I can teach for now.\""; @@ -230,6 +240,93 @@ L_Farewell: next; close; +L_L2_W12: + mes "[Mystic Sword]"; + mes "\"Welcome back, traveler! Hast thou returned to advance in thy quest for magic?\""; + next; + menu + "No.", L_farewell, + "Yes.", -; + + mes "[Mystic Sword]"; + mes "\"Very well. I shall teach thee another spell, if thou provest thy progress by sacrificing another one thousand monster points.\""; + next; + menu + "No, I don't want that.", L_farewell, + "I agree.", -; + + if (Mobpt < 1000) goto L_lacking_mobpoints; + + mes "[Mystic Sword]"; + mes "\"Indeed thou art worthy. The next spell I shall teach thee will enchant thy knuckles to turn them into powerful weapons; the component is a mere beer.\""; + mes "[1000 experience points]"; + set Mobpt, Mobpt - 1000; + getexp 1000, 0; + set @Q_status, @Q_status + 2; + callsub S_update_var; + next; + + mes "[Mystic Sword]"; + mes "\"Speak '" + getspellinvocation("magic-knuckles") + "' and take a glass of beer and drink it, without ever taking it off your lips. This will harden and enchant thy fists, turning them into powerful weapons.\""; + next; + close; + +L_L2_almost_done: + mes "[Mystic Sword]"; + mes "\"Greetings once more, traveler! I have another spell I wish to teach thee, but first thou must learn my brother's arrow spell.\""; + next; + close; + +L_L2_W10: + mes "[Mystic Sword]"; + mes "\"Welcome back!\""; + next; + + mes "[Mystic Sword]"; + mes "\"I shall now teach thee the final spell of this level of war magic. For further spells thou wilt have to increase thy magical powers more.\""; + next; + + mes "[Mystic Sword]"; + mes "\"For this spell, I ask that thou bringest a lump of iron ore. Thou must also sacrifice five thousand monster points.\""; + next; + + menu + "OK.", -; + "No way.", L_farewell; + + if (countitem(@ORE) < 1) + goto L_no_ore; + if (MPQUEST && (Mobpt < 5000)) goto L_lacking_mobpoints; + + mes "[Mystic Sword]"; + mes "\"Raise up the ore, mortal!\""; + mes "As you do so, the ore begins to crumble, leaving only iron powder behind."; + mes "[1000 experience points]"; + set Mobpt, Mobpt - 5000; + getexp 1000, 0; + delitem @ORE, 1; + getitem @IRONPOWDER, 5; + set @Q_status, @STATUS_L2_ALLSPELLS; + callsub S_update_var; + next; + + mes "[Mystic Sword]"; + mes "\"This powder thou shalst need to cast the lightning spell. Throw it up into the air and shout '" + getspellinvocation("lightning-strike") + "', and smite thine enemies with lightning.\""; + next; + + +L_farewell: + mes "[Mystic Sword]"; + mes "\"Then I bid thee farewell for now!\""; + next; + close; + +L_lacking_mobpoints: + mes "[Mystic Sword]"; + mes "\"Thou dost not have enough monster points to prove thy worthiness. Return when thou hast slain more monsters!\""; + next; + close; + S_update_var: set QUEST_MAGIC, (QUEST_MAGIC & ~(@Q_MASK) diff --git a/npc/functions/magic.txt b/npc/functions/magic.txt index eab4b60a..470323c2 100644 --- a/npc/functions/magic.txt +++ b/npc/functions/magic.txt @@ -3,6 +3,9 @@ // Magic system uses: // - MAGIC_EXP (magic experience points, gained for spellcasting) // - MAGIC_FLAGS +// Magic quests use: +// - QUEST_MAGIC +// - QUEST_MAGIC2 // ------------------------------------------------------------ // Gain initial magic skill @@ -13,3 +16,120 @@ function script MagicGainBasic { close; } + +// ------------------------------------------------------------ +// Initialise Menu for selecting a choice of things to ask about +// ------------------------------------------------------------ +function script MagicTalkOptionsSetup { + set @QQ_ELANORE, 1; + set @QQ_MANASEED, 2; + set @QQ_MANAPOTION, 3; + set @QQ_WYARA, 4; + set @QQ_SAGATHA, 5; + set @QQ_AULDSBEL, 6; + set @QQ_IMP, 7; + set @QQ_OLDWIZ, 8; +} + +// ------------------------------------------------------------ +// Print and run menu for choice of things to ask about +// Ignores the entry in @ignore +// Returns the result in `@c, or `0' +// ------------------------------------------------------------ + +function script MagicTalkMenu { + setarray @choice$, "", "", "", "", "", "", "", "", ""; + set @choices_nr, 0; + setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0; + + if (@ignore == @QQ_ELANORE) + goto L_Q_post_elanore; + set @choice$[@choices_nr], "...Elanore the Healer?"; + set @choice_idx[@choices_nr], @QQ_ELANORE; + set @choices_nr, @choices_nr + 1; +L_Q_post_elanore: + + if (@ignore == @QQ_MANASEED) + goto L_Q_post_manaseed; + if (!(MAGIC_FLAGS & (MFLAG_KNOWS_MANASEED | MFLAG_MANASEED_RUMOUR))) + goto L_Q_post_manaseed; + set @choice$[@choices_nr], "...the Mana Seed?"; + set @choice_idx[@choices_nr], @QQ_MANASEED; + set @choices_nr, @choices_nr + 1; +L_Q_post_manaseed: + + if (@ignore == @QQ_MANAPOTION) + goto L_Q_post_manapotion; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) + goto L_Q_post_manapotion; + set @choice$[@choices_nr], "...Mana Potions?"; + set @choice_idx[@choices_nr], @QQ_MANAPOTION; + set @choices_nr, @choices_nr + 1; +L_Q_post_manapotion: + + if (@ignore == @QQ_WYARA) + goto L_Q_post_wyara; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_WYARA)) + goto L_Q_post_wyara; + set @choice$[@choices_nr], "...Wyara the Witch?"; + set @choice_idx[@choices_nr], @QQ_WYARA; + set @choices_nr, @choices_nr + 1; +L_Q_post_wyara: + + if (@ignore == @QQ_SAGATHA) + goto L_Q_post_sagatha; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_SAGATHA)) + goto L_Q_post_sagatha; + set @choice$[@choices_nr], "...Sagatha the Witch?"; + set @choice_idx[@choices_nr], @QQ_SAGATHA; + set @choices_nr, @choices_nr + 1; +L_Q_post_sagatha: + + if (@ignore == @QQ_AULDSBEL) + goto L_Q_post_auldsbel; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_AULDSBEL)) + goto L_Q_post_auldsbel; + set @choice$[@choices_nr], "...Auldsbel the Wizard?"; + set @choice_idx[@choices_nr], @QQ_AULDSBEL; + set @choices_nr, @choices_nr + 1; +L_Q_post_auldsbel: + + if (@ignore == @QQ_OLDWIZ) + goto L_Q_post_oldwiz; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_OLD_WIZARD)) + goto L_Q_post_oldwiz; + set @choice$[@choices_nr], "...the Old Wizard?"; + set @choice_idx[@choices_nr], @QQ_OLDWIZ; + set @choices_nr, @choices_nr + 1; +L_Q_post_oldwiz: + + if (@ignore == @QQ_IMP) + goto L_Q_post_imp; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_IMP)) + goto L_Q_post_imp; + set @choice$[@choices_nr], "...the Earth Spirit in the desert well?"; + set @choice_idx[@choices_nr], @QQ_IMP; + set @choices_nr, @choices_nr + 1; +L_Q_post_imp: + + set @choice$[@choices_nr], "...never mind."; + set @choice_idx[@choices_nr], 0; + set @choices_nr, @choices_nr + 1; + + menu @choice$[0], -, + @choice$[1], -, + @choice$[2], -, + @choice$[3], -, + @choice$[4], -, + @choice$[5], -, + @choice$[6], -, + @choice$[7], -, + @choice$[8], -; + + set @menu, @menu - 1; + + if (@menu >= @choices_nr) + set @menu, 0; + + set @c, @choice_idx[@menu]; +} -- cgit v1.2.3-60-g2f50 From 2dd4918c51930301faa4eea5f0f88e9fc08162a8 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 10 Jan 2009 04:19:52 -0700 Subject: Added debug magic, properly linked chat helper functions --- conf/magic.conf.template | 99 +++++++++++++++++++++++++++++++++++++++++++- npc/001-1_Tulimshar/bard.txt | 37 +++++++++-------- npc/scripts.conf | 1 + 3 files changed, 118 insertions(+), 19 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf.template b/conf/magic.conf.template index 0a994eab..5b86e021 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -51,7 +51,7 @@ CONST SCRIPT_LASTSPELL_MASK = 0xff CONST SCRIPT_LASTSPELL_SHIFT = 16 CONST SCRIPT_HEALSPELL_MASK = 0xff CONST SCRIPT_HEALSPELL_SHIFT = 24 -CONST DEBUG = 0 +CONST DEBUG = 1 # Default sfx on caster PROCEDURE default_effect() = @@ -813,6 +813,101 @@ SPELL teleport (destination : STRING) : "#A40" = warp(caster, random_location(anchor(destination))); sfx(location(caster), SFX_TELEPORT, 100); +#-------------------------------------------------------------------------------- +# Debug keywords +#-------------------------------------------------------------------------------- + +SPELL debug : "debug" = + REQUIRE DEBUG + => EFFECT message (caster, "FLAGS: " + + "drank=" + ((script_int(caster, "MAGIC_FLAGS") & 1) > 0) + ", " + + "Kmseed=" + ((script_int(caster, "MAGIC_FLAGS") & 2) > 0) + ", " + + "touched-mseed=" + ((script_int(caster, "MAGIC_FLAGS") & 4) > 0) + ", " + + "mseed-max=" + ((script_int(caster, "MAGIC_FLAGS") & 8) > 0) + ", " + + "Kauldsbel=" + ((script_int(caster, "MAGIC_FLAGS") & 16) > 0) + ", " + + "Kwyara=" + ((script_int(caster, "MAGIC_FLAGS") & 32) > 0) + ", " + + "Ksagatha=" + ((script_int(caster, "MAGIC_FLAGS") & 64) > 0) + ", " + + "Kmpotion=" + ((script_int(caster, "MAGIC_FLAGS") & 128) > 0) + ", " + + "mseed-rumour=" + ((script_int(caster, "MAGIC_FLAGS") & 256) > 0) + ", " + + "Kcuttree=" + ((script_int(caster, "MAGIC_FLAGS") & 512) > 0) + ", " + + "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)); + 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)); + message (caster, "STATUS: " + + "auldsbel:" + (script_int(caster, "QUEST_MAGIC") & 0x1f) + "," + (script_int(caster, "QUEST_MAGIC") >> 5) + ", " + + "dt/mb:" + ((script_int(caster, "QUEST_MAGIC") >> 8) & 0xf) + ", " + + "s-unhappy:" + ((script_int(caster, "QUEST_MAGIC") >> 12) & 0xf) + ", " + + "sagatha:" + ((script_int(caster, "QUEST_MAGIC") >> 16) & 0xff) + ", " + + "swords:" + ((script_int(caster, "QUEST_MAGIC") >> 24) & 0xff) + ", " + + "imp:" + ((script_int(caster, "QUEST_MAGIC2") >> 0) & 0xf) + ", " + + "elanore:" + ((script_int(caster, "QUEST_MAGIC2") >> 4) & 0xf) + ", " + + "wyara:" + ((script_int(caster, "QUEST_MAGIC2") >> 8) & 0xf)); + +PROCEDURE debug_xmod(name, mask, shift, gain) = + value = ((script_int(caster, name) >> shift) & mask) + gain; + IF (value < 0) + THEN value = 0; + IF (value > mask) + THEN value = mask; + CALL set_var(name, mask, shift, value); + +PROCEDURE debug_mod(name, delta) = + IF (name = "mexp") THEN CALL debug_xmod("MAGIC_EXP", 0xffff, 0, delta); + ELSE IF (name = "lastspell") THEN CALL debug_xmod("MAGIC_EXP", 0xff, 16, delta); + ELSE IF (name = "lifeexp") THEN CALL debug_xmod("MAGIC_EXP", 0xff, 24, delta); + ELSE IF (name = "F:drank") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 0, delta); + ELSE IF (name = "F:Kmseed") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 1, delta); + ELSE IF (name = "F:touched-mseed") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 2, delta); + ELSE IF (name = "F:mseed-max") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 3, delta); + ELSE IF (name = "F:Kauldsbel") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 4, delta); + ELSE IF (name = "F:Kwyara") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 5, delta); + ELSE IF (name = "F:Ksagatha") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 6, delta); + ELSE IF (name = "F:Kmpotion") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 7, delta); + ELSE IF (name = "F:mseed-rumour") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 8, delta); + ELSE IF (name = "F:Kcuttree") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 9, delta); + ELSE IF (name = "F:cut") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 10, delta); + ELSE IF (name = "F:Kdruidtree") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 11, delta); + ELSE IF (name = "F:Kimp") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 12, delta); + ELSE IF (name = "F:oldwiz") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 13, 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); + ELSE IF (name = "mb") THEN CALL debug_xmod("QUEST_MAGIC", 0x3, 8, delta); + ELSE IF (name = "s-unhappy") THEN CALL debug_xmod("MAGIC_EXP", 0xff, 12, delta); + ELSE IF (name = "sagatha") THEN CALL debug_xmod("QUEST_MAGIC", 0xff, 16, delta); + ELSE IF (name = "swords") THEN CALL debug_xmod("QUEST_MAGIC", 0xff, 24, 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 message(caster, "Unknown"); + +SPELL debug-up1 (name : STRING) : "debug+1" = + REQUIRE DEBUG + => EFFECT CALL debug_mod(name, 1); + +SPELL debug-down1 (name : STRING) : "debug-1" = + REQUIRE DEBUG + => EFFECT CALL debug_mod(name, 0 - 1); + +SPELL debug-up16 (name : STRING) : "debug+16" = + REQUIRE DEBUG + => EFFECT CALL debug_mod(name, 16); + +SPELL debug-down16 (name : STRING) : "debug-16" = + REQUIRE DEBUG + => EFFECT CALL debug_mod(name, 0 - 16); + +SPELL debug-reset : "debug-reset" = + REQUIRE DEBUG + => EFFECT set_script_variable(caster, "QUEST_MAGIC", 0); + set_script_variable(caster, "QUEST_MAGIC2", 0); + set_script_variable(caster, "MAGIC_FLAGS", 0); + set_script_variable(caster, "MAGIC_EXP", 0); + #-------------------------------------------------------------------------------- # Special-purpose quasispells #-------------------------------------------------------------------------------- @@ -978,3 +1073,5 @@ TELEPORT-ANCHOR desert : "##02" = @("005-1.gat", 160, 64) @+ (5, 5); TELEPORT-ANCHOR forest : "##03" = @("015-1.gat", 35, 35) @+ (40, 40); TELEPORT-ANCHOR snakecave : "##04" = @("011-4.gat", 50, 75) @+ (3, 3); TELEPORT-ANCHOR dimondscove : "##05" = @("010-2.gat", 23, 79) @+ (3, 3); + + diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index a740b1d5..9420d9fb 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -4,8 +4,8 @@ setarray @songs$, "\"There once was a bard, who had it hard, because a man in dark green, was very mean.\"", "\"At Hurnscald inn, there was a person of fairest skin, declining wedding bands from quite a many hands.\"", "\"As the Sun sets down in the forest's brown, she whom the fragrance holds counts her gold.\""; - set @name, "Bill Ballshaker the Bard"; - mes "[" + @name + "]"; + set @name$, "Bill Ballshaker the Bard"; + mes "[" + @name$ + "]"; if (Sex) mes "\"Greetings, traveler! Have you come to listen to my stories?\""; if (!Sex) @@ -20,17 +20,17 @@ L_Main: close; L_News: - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"News I have for you indeed, lest you have already overheard (for then it would no longer be news to you!)\""; next; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Rumor has it that an ancient source of magic, a Mana Seed, has been sighted in the west, beyond the fair town of Hurnscald.\""; next; set MFLAG, MFLAG | MFLAG_MANASEED_RUMOUR; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Whence it came, nobody knows... but they say that sometimes such Mana Seeds may choose a powerful individual to impart some of its mystic power to!\""; next; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"I wonder who might be qualified?\""; next; goto L_Main; @@ -48,64 +48,65 @@ L_Question: if (@c == @QQ_AULDSBEL) goto L_Q_auldsbel; if (@c == @QQ_OLDWIZ) goto L_Q_oldwiz; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Alas, I know very little about this matter.\""; next; goto L_Main; L_Q_oldwiz: - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"The old wizard has been an old man for as long as I remember, living near the mountains in his magic hut-- a hut that is bigger on the inside, just like in the old tales of Gyer Filla the Wise....\""; next; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"I doubt that they are the same person, though. For one, I have never seen his hut fly. For another, Gyer never took apprentices.\""; next; goto L_Main; L_Q_elanore: - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Elanore is this town's healer. Rumor has it that she traveled far and wide when she was younger, to learn the deepest secrets of healing magic, after her brother caught a mysterious illness.\""; next; goto L_Main; L_Q_manaseed: - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"The Mana Seed is said to be a source of great magic. Perhaps some witch or wizard might know more about it?\""; next; goto L_Main; L_Q_wyara: - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Wyara is not actually from Hurnscald. As a young witch, she decided to settle down there to help the people of Hurnscald. She is kind and gentle, except towards the Doctor, who seems to have little respect for her potions.\""; next; goto L_Main; L_Q_sagatha: - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Sagatha! Ah, such a wonderful and mysterious being; the center of many a tale...\""; next; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Some say that she is the most powerful witch in all of Argaes. I don't know whether that is true, but I am quite certain that the is the most beautiful of all the witches! Alas, she will let no man touch her...\""; mes "He sighs."; next; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"I met her only twice, back in my traveling days, but there are two pieces of advice I can give you:\""; next; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"First, she will suffer no fool easily, particularly no man.\""; next; - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Second, the creatures of the forest mean everything to her. Harm them, and you may find her an enemy-- and a powerful one at that...\""; next; goto L_Main; L_Q_auldsbel: - mes "[" + @name + "]"; + mes "[" + @name$ + "]"; mes "\"Auldsbel is some wizard from further north, from what I have gathered. He bought a hut near Hurnscald some years back and often comes here to experiment on things, probably because he is not allowed to do these experiments where he comes from.\""; next; goto L_Main; L_Song: + mes "[" + @name$ + "]"; set @id, rand(3); mes @songs$[@id]; close; diff --git a/npc/scripts.conf b/npc/scripts.conf index 01cc93eb..ae6b9a83 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -9,6 +9,7 @@ npc: npc/functions/mob_points.txt npc: npc/functions/process_equip.txt npc: npc/functions/slot_machine.txt npc: npc/functions/soul_menhir.txt +npc: npc/functions/magic.txt import: npc/_import.txt -- cgit v1.2.3-60-g2f50 From d075f25617f1306ad2aef2b1e87567f6c683aa7f Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 10 Jan 2009 04:52:20 -0700 Subject: Fixed broken function usage and menus --- conf/magic.conf.template | 5 +++++ npc/001-1_Tulimshar/bard.txt | 4 ++-- npc/001-1_Tulimshar/elanore.txt | 2 +- npc/009-2_Hurnscald/wyara.txt | 10 +++++----- npc/011-1_Woodland/auldsbel.txt | 3 +-- npc/013-1_Woodland_hills/sagatha.txt | 5 ++++- npc/functions/magic.txt | 9 ++++++--- 7 files changed, 24 insertions(+), 14 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf.template b/conf/magic.conf.template index 5b86e021..646b412e 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -908,6 +908,11 @@ SPELL debug-reset : "debug-reset" = set_script_variable(caster, "MAGIC_FLAGS", 0); set_script_variable(caster, "MAGIC_EXP", 0); +SPELL debug-gotonpc (name : STRING) : "warpnpc" = + REQUIRE DEBUG + => EFFECT warp(caster, location(npc(name))); + + #-------------------------------------------------------------------------------- # Special-purpose quasispells #-------------------------------------------------------------------------------- diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index 9420d9fb..8b416ec5 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -26,7 +26,7 @@ L_News: mes "[" + @name$ + "]"; mes "\"Rumor has it that an ancient source of magic, a Mana Seed, has been sighted in the west, beyond the fair town of Hurnscald.\""; next; - set MFLAG, MFLAG | MFLAG_MANASEED_RUMOUR; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_MANASEED_RUMOUR; mes "[" + @name$ + "]"; mes "\"Whence it came, nobody knows... but they say that sometimes such Mana Seeds may choose a powerful individual to impart some of its mystic power to!\""; next; @@ -38,7 +38,7 @@ L_News: L_Question: callfunc "MagicTalkOptionsSetup"; set @ignore, 0; - callfunc "MagictalkMenu"; + callfunc "MagicTalkMenu"; if (@c == 0) goto L_Main; if (@c == @QQ_ELANORE) goto L_Q_elanore; diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 3f18c80c..729a41bf 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -362,7 +362,7 @@ L_NoMagicNoTeach: L_Question: callfunc "MagicTalkOptionsSetup"; set @ignore, @QQ_ELANORE; - callfunc "MagictalkMenu"; + callfunc "MagicTalkMenu"; if (@c == 0) goto L_Main; if (@c == @QQ_MANASEED) goto L_Q_manaseed; diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt index d38bf04d..1666643d 100644 --- a/npc/009-2_Hurnscald/wyara.txt +++ b/npc/009-2_Hurnscald/wyara.txt @@ -58,10 +58,10 @@ L_correct: set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_WYARA; L_Main: - menu "No. What do you know about...", L_Question, + menu "What do you know about...", L_Question, "Can you help me learn magic?", L_Magic, - "Yes, I would like to buy potions.", L_Shop, - "Bye", -; + "I would like to buy potions.", L_Shop, + "Bye!", -; close; L_Shop: @@ -73,7 +73,7 @@ L_Shop: L_Question: callfunc "MagicTalkOptionsSetup"; set @ignore, @QQ_WYARA; - callfunc "MagictalkMenu"; + callfunc "MagicTalkMenu"; if (@c == 0) goto L_Main; if (@c == @QQ_ELANORE) goto L_Q_elanore; @@ -103,7 +103,7 @@ L_Q_old_wizard: L_Q_elanore: mes "[Wyara the Witch]"; - mes "\"FIXME\""; + mes "\"Elanore is the Tulimshar healer. She is a very nice person and was very helpful when I first moved here.\""; next; goto L_Main; diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index c71694ca..688fd690 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -516,7 +516,7 @@ L_learn_magic: L_question: callfunc "MagicTalkOptionsSetup"; set @ignore, @QQ_AULDSBEL; - callfunc "MagictalkMenu"; + callfunc "MagicTalkMenu"; if (@c == 0) goto L_main_menu; if (@c == @QQ_ELANORE) goto L_Q_elanore; @@ -569,7 +569,6 @@ L_Q_sagatha: goto L_main_menu; L_Q_manaseed_rumour: - mes "[Auldsbel the Wizard]"; mes "\"A mana seed? Around here? Nah, they've been pulling your leg. Those things are extremely rare, after all.\""; next; goto L_main_menu; diff --git a/npc/013-1_Woodland_hills/sagatha.txt b/npc/013-1_Woodland_hills/sagatha.txt index 51de9191..ed2a20b6 100644 --- a/npc/013-1_Woodland_hills/sagatha.txt +++ b/npc/013-1_Woodland_hills/sagatha.txt @@ -14,6 +14,7 @@ L_zero: L_write: set QUEST_MAGIC, (QUEST_MAGIC & ~NIBBLE_3_MASK) | (@unhappiness << NIBBLE_3_SHIFT); + return; } //---------------------------------------- @@ -30,6 +31,7 @@ L_max: L_write: set QUEST_MAGIC, (QUEST_MAGIC & ~NIBBLE_3_MASK) | (@unhappiness << NIBBLE_3_SHIFT); + return; } function script SagathaStatus { @@ -53,6 +55,7 @@ function script SagathaStatus { set @druid, (((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 12) >> 2; if (@druid == 3) set @good, @good + 1; + return; } //---------------------------------------- @@ -290,7 +293,7 @@ L_teach_noexp: L_Question: callfunc "MagicTalkOptionsSetup"; set @ignore, @QQ_SAGATHA; - callfunc "MagictalkMenu"; + callfunc "MagicTalkMenu"; if (@c == 0) goto L_main; if (@c == @QQ_ELANORE) goto L_Q_elanore; diff --git a/npc/functions/magic.txt b/npc/functions/magic.txt index 470323c2..0094e94a 100644 --- a/npc/functions/magic.txt +++ b/npc/functions/magic.txt @@ -20,7 +20,7 @@ function script MagicGainBasic { // ------------------------------------------------------------ // Initialise Menu for selecting a choice of things to ask about // ------------------------------------------------------------ -function script MagicTalkOptionsSetup { +function script MagicTalkOptionsSetup { set @QQ_ELANORE, 1; set @QQ_MANASEED, 2; set @QQ_MANAPOTION, 3; @@ -29,15 +29,17 @@ function script MagicTalkOptionsSetup { set @QQ_AULDSBEL, 6; set @QQ_IMP, 7; set @QQ_OLDWIZ, 8; + return; } // ------------------------------------------------------------ // Print and run menu for choice of things to ask about // Ignores the entry in @ignore -// Returns the result in `@c, or `0' +// Returns the result in @c, or returns 0 if there is no result // ------------------------------------------------------------ -function script MagicTalkMenu { + +function script MagicTalkMenu { setarray @choice$, "", "", "", "", "", "", "", "", ""; set @choices_nr, 0; setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0; @@ -132,4 +134,5 @@ L_Q_post_imp: set @menu, 0; set @c, @choice_idx[@menu]; + return @c; } -- cgit v1.2.3-60-g2f50 From 54238fbc5acca341449cd0b73b12e3b257a6d2cb Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 10 Jan 2009 13:21:56 -0700 Subject: Numerous fixes. Magic level 0 should be fully operational now. --- conf/magic.conf.template | 54 ++++++++++++-------------- db/const.txt | 4 +- npc/001-1_Tulimshar/children.txt | 1 + npc/005-1_Snake_desert/spirit.txt | 8 ++-- npc/005-1_Snake_desert/tree.txt | 2 +- npc/008-1_Hurnscald_outskirts/hinnak.txt | 11 +++--- npc/009-2_Hurnscald/wyara.txt | 38 ++++++++++++------- npc/009-3_Cave_beneath_Hurnscald/_import.txt | 1 + npc/009-3_Cave_beneath_Hurnscald/sword.txt | 20 +++++----- npc/011-1_Woodland/alchemist.txt | 21 +++++++++- npc/011-1_Woodland/auldsbel.txt | 57 ++++++++++++++++++---------- npc/012-1_Woodland_Hills/injured-mouboo.txt | 34 +++++++++-------- npc/012-3_Cave/mana-seed.txt | 6 +-- npc/013-1_Woodland_hills/sagatha.txt | 25 ++++++------ npc/015-1_Woodland/_import.txt | 1 + npc/015-1_Woodland/sword.txt | 39 +++++++++++++------ 16 files changed, 192 insertions(+), 130 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf.template b/conf/magic.conf.template index 646b412e..66e44cfa 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -121,11 +121,13 @@ PROCEDURE adjust_spellpower(school) = experience = (script_int(caster, SCRIPT_XP) >> SCRIPT_XP_SHIFT) & SCRIPT_XP_MASK; spellpower = spellpower + (skill(caster, MAGIC) + skill(caster, school)) * 10; # Below, we adjust by special items - IF ((school = LIFE || school = NATURE) && (target = partner(caster))) - THEN (spellpower = spellpower + 200; + IF (not(failed(target)) && (school = LIFE || school = NATURE)) + THEN IF (target) + THEN IF (pc(target) = partner(caster)) + THEN (spellpower = spellpower + 200; IF is_equipped(caster, "WeddingRing") THEN spellpower = spellpower + 50; - IF is_equipped(target, "WeddingRing") + IF is_equipped(pc(target), "WeddingRing") THEN spellpower = spellpower + 50;) PROCEDURE heal(target, max_heal) = @@ -198,7 +200,6 @@ SPELL transmute-wood-to-mouboo : "#T00" = school = TRANSMUTE IN (MANA 5, CASTTIME 4000, REQUIRE skill(caster, MAGIC) > level, - REQUIRE skill(caster, school) > level, COMPONENTS ["RawLog"]) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); @@ -210,7 +211,6 @@ SPELL make-sulphur : "#T01" = school = TRANSMUTE IN (MANA 4, CASTTIME 4000, REQUIRE skill(caster, MAGIC) > level, - REQUIRE skill(caster, school) > level, COMPONENTS ["PileOfAsh"]) => EFFECT CALL adjust_spellpower(school); CALL default_effect(); @@ -233,7 +233,7 @@ SPELL lesser-heal (target : STRING) : "#L00" = THEN { mes "Your spell seems to have no effect on the mouboo."; next; close; } ELSE target = caster;) ELSE target = pc(target); - CALL gain_heal_xp(100, 1); # report half values for non-instaheal + CALL gain_heal_xp(min(100, max_hp(target) - hp(target)) / 2, 1); # report half values for non-instaheal CALL heal(target, 200); CALL gain_xp(1); @@ -838,7 +838,7 @@ SPELL debug : "debug" = + ", lastspell=" + ((script_int(caster, "MAGIC_EXPERIENCE") >> 16) & 0xff) + ", healexp=" + ((script_int(caster, "MAGIC_EXPERIENCE") >> 24) & 0xff)); message (caster, "STATUS: " - + "auldsbel:" + (script_int(caster, "QUEST_MAGIC") & 0x1f) + "," + (script_int(caster, "QUEST_MAGIC") >> 5) + ", " + + "auldsbel:" + (script_int(caster, "QUEST_MAGIC") & 0x1f) + "," + ((script_int(caster, "QUEST_MAGIC") >> 5) & 0x7) + ", " + "dt/mb:" + ((script_int(caster, "QUEST_MAGIC") >> 8) & 0xf) + ", " + "s-unhappy:" + ((script_int(caster, "QUEST_MAGIC") >> 12) & 0xf) + ", " + "sagatha:" + ((script_int(caster, "QUEST_MAGIC") >> 16) & 0xff) + ", " @@ -856,28 +856,28 @@ PROCEDURE debug_xmod(name, mask, shift, gain) = CALL set_var(name, mask, shift, value); PROCEDURE debug_mod(name, delta) = - IF (name = "mexp") THEN CALL debug_xmod("MAGIC_EXP", 0xffff, 0, delta); - ELSE IF (name = "lastspell") THEN CALL debug_xmod("MAGIC_EXP", 0xff, 16, delta); - ELSE IF (name = "lifeexp") THEN CALL debug_xmod("MAGIC_EXP", 0xff, 24, delta); - ELSE IF (name = "F:drank") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 0, delta); - ELSE IF (name = "F:Kmseed") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 1, delta); - ELSE IF (name = "F:touched-mseed") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 2, delta); - ELSE IF (name = "F:mseed-max") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 3, delta); - ELSE IF (name = "F:Kauldsbel") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 4, delta); - ELSE IF (name = "F:Kwyara") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 5, delta); - ELSE IF (name = "F:Ksagatha") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 6, delta); - ELSE IF (name = "F:Kmpotion") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 7, delta); - ELSE IF (name = "F:mseed-rumour") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 8, delta); - ELSE IF (name = "F:Kcuttree") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 9, delta); - ELSE IF (name = "F:cut") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 10, delta); - ELSE IF (name = "F:Kdruidtree") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 11, delta); - ELSE IF (name = "F:Kimp") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 12, delta); - ELSE IF (name = "F:oldwiz") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 13, delta); + IF (name = "mexp") THEN CALL debug_xmod("MAGIC_EXPERIENCE", 0xffff, 0, delta); + ELSE IF (name = "lastspell") THEN CALL debug_xmod("MAGIC_EXPERIENCE", 0xff, 16, delta); + ELSE IF (name = "lifeexp") THEN CALL debug_xmod("MAGIC_EXPERIENCE", 0xff, 24, delta); + ELSE IF (name = "drank") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 0, delta); + ELSE IF (name = "Kmseed") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 1, delta); + ELSE IF (name = "touched-mseed") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 2, delta); + ELSE IF (name = "mseed-max") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 3, delta); + ELSE IF (name = "Kauldsbel") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 4, delta); + ELSE IF (name = "Kwyara") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 5, delta); + ELSE IF (name = "Ksagatha") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 6, delta); + ELSE IF (name = "Kmpotion") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 7, delta); + ELSE IF (name = "mseed-rumour") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 8, delta); + ELSE IF (name = "Kcuttree") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 9, delta); + ELSE IF (name = "cut") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 10, 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 = "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); ELSE IF (name = "mb") THEN CALL debug_xmod("QUEST_MAGIC", 0x3, 8, delta); - ELSE IF (name = "s-unhappy") THEN CALL debug_xmod("MAGIC_EXP", 0xff, 12, delta); + ELSE IF (name = "s-unhappy") THEN CALL debug_xmod("QUEST_MAGIC", 0xff, 12, delta); ELSE IF (name = "sagatha") THEN CALL debug_xmod("QUEST_MAGIC", 0xff, 16, delta); ELSE IF (name = "swords") THEN CALL debug_xmod("QUEST_MAGIC", 0xff, 24, delta); ELSE IF (name = "imp") THEN CALL debug_xmod("QUEST_MAGIC2", 0xf, 0, delta); @@ -908,10 +908,6 @@ SPELL debug-reset : "debug-reset" = set_script_variable(caster, "MAGIC_FLAGS", 0); set_script_variable(caster, "MAGIC_EXP", 0); -SPELL debug-gotonpc (name : STRING) : "warpnpc" = - REQUIRE DEBUG - => EFFECT warp(caster, location(npc(name))); - #-------------------------------------------------------------------------------- # Special-purpose quasispells diff --git a/db/const.txt b/db/const.txt index 0cccd5dc..c5d06c7a 100644 --- a/db/const.txt +++ b/db/const.txt @@ -172,8 +172,8 @@ NIBBLE_5_MASK 15728640 NIBBLE_6_SHIFT 24 NIBBLE_6_MASK 251658240 -NIBBLE_7_SHIFT 28 -NIBBLE_7_MASK 4026531840 +NIBBLE_7_SHIFT 28 // Only three bits available in this one +NIBBLE_7_MASK 1879048192 // should be 4026531840 // Magic skills SKILL_MAGIC 340 diff --git a/npc/001-1_Tulimshar/children.txt b/npc/001-1_Tulimshar/children.txt index 452df411..3f3ec522 100644 --- a/npc/001-1_Tulimshar/children.txt +++ b/npc/001-1_Tulimshar/children.txt @@ -102,6 +102,7 @@ L_8: L_9: mes "\"I know a very bad word. But I must not say it, because monsters will come and get me if I do!\""; + next; menu "A bad word?", L_tell, "Oh, you better keep it for yourself then.", -; diff --git a/npc/005-1_Snake_desert/spirit.txt b/npc/005-1_Snake_desert/spirit.txt index 2ab3bf03..f51b242c 100644 --- a/npc/005-1_Snake_desert/spirit.txt +++ b/npc/005-1_Snake_desert/spirit.txt @@ -17,9 +17,9 @@ L_message: set @BRANCH, 732; - set @s, "girl"; + set @s$, "girl"; if (Sex) - set @s, "boy"; + set @s$, "boy"; if (MAGIC_FLAGS & MFLAG_KNOWS_IMP) goto L_wb; @@ -116,7 +116,7 @@ L_Q_magic: next; mes "[Earth Spirit]"; - mes "\"Besides, think of it like that: if you want to bake a cake, you've got to break a few eggs. Not everything's sweetness in life, my " + @s + "!.\""; + mes "\"Besides, think of it like that: if you want to bake a cake, you've got to break a few eggs. Not everything's sweetness in life, my " + @s$ + "!.\""; next; menu @@ -283,7 +283,7 @@ L_silly_close: mes "[Earth Spirit]"; if (!(MAGIC_FLAGS & MFLAG_KNOWS_IMP)) mes "[Well]"; - mes "\"Silly " + @s + ".\""; + mes "\"Silly " + @s$ + ".\""; L_close: close; diff --git a/npc/005-1_Snake_desert/tree.txt b/npc/005-1_Snake_desert/tree.txt index 7c85c44b..5e576cea 100644 --- a/npc/005-1_Snake_desert/tree.txt +++ b/npc/005-1_Snake_desert/tree.txt @@ -101,7 +101,7 @@ L_givewater: if (countitem(@WATER) < 1) goto L_no_water; delitem @WATER, 1; - getitem @BOTTLE, 541; + getitem @BOTTLE, 1; mes "[Dying Tree]"; mes "You pour a bottle of water into the sand. The water dissipates quickly, without any effect."; diff --git a/npc/008-1_Hurnscald_outskirts/hinnak.txt b/npc/008-1_Hurnscald_outskirts/hinnak.txt index cb7503b1..c2a547d4 100644 --- a/npc/008-1_Hurnscald_outskirts/hinnak.txt +++ b/npc/008-1_Hurnscald_outskirts/hinnak.txt @@ -107,14 +107,15 @@ L_ThanksAgain: "You shouldn't drink while working!", -; mes "[Farmer Hinnak]"; - mes "\"Well, I'm done for the day...\""; + mes "\"Well, I'm done for the day, and I'm quite old enough to decide when I can have a beer, thank you!\""; + next; menu "Sorry... here you are.", L_GiveBeer, "I don't have any.", L_NoBeer; L_GiveBeer: - if (countitem(@BEER) < 0) goto L_NoBeer; + if (countitem(@BEER) < 1) goto L_NoBeer; delitem @BEER, 1; mes "[Farmer Hinnak]"; mes "Hinnak takes a sip."; @@ -155,11 +156,11 @@ L_GiveBeer: next; mes "[Farmer Hinnak]"; - mes "\"So I go inside. I've barely entered when it starts raining outside, pouring cats and mouboos!\""; + mes "\"So I go inside. I'm barely in 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...\""; + mes "\"Not so weird, perhaps, except that it was been bright and sunny just a second before! So I rush out, my wife telling me to leave the witch alone, and I see her standing there in the middle of the rain...\""; next; mes "[Farmer Hinnak]"; @@ -194,7 +195,7 @@ L_Sagatha_hahaha: 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."; + mes "He stares into his empty beer jug, as if wishing it weren't empty yet."; next; close; diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt index 1666643d..d97f6c86 100644 --- a/npc/009-2_Hurnscald/wyara.txt +++ b/npc/009-2_Hurnscald/wyara.txt @@ -103,7 +103,7 @@ L_Q_old_wizard: L_Q_elanore: mes "[Wyara the Witch]"; - mes "\"Elanore is the Tulimshar healer. She is a very nice person and was very helpful when I first moved here.\""; + mes "\"Elanore is the Tulimshar healer. She is a very kind person and an outstanding healer.\""; next; goto L_Main; @@ -129,16 +129,28 @@ L_Q_manapotion: mes "[Wyara the Witch]"; mes "\"I have a simple recipe for making mana potions, but I don't have one ready right now. Can you bring me 40 mauve leaves and a bottle of water? I can make one from those quite easily.\""; next; - menu "OK", L_make_manapotion, - "No", L_Main; + menu "Sure!", L_make_manapotion, + "No.", L_Main; + goto L_Main; + +L_manapotion_toomany: + mes "[Wyara the Witch]"; + mes "\"Hmm... looking at you, I don't think that you would be able to carry it.\""; + next; goto L_Main; L_make_manapotion: if(countitem(@MAUVE) < 40) goto L_make_manapotion_lack; - if(countitem(@WATER) < 1) goto L_make_manapotion_lack; + if(countitem(@BOTTLE_WATER) < 1) goto L_make_manapotion_lack; + getinventorylist; + if ((@inventorylist_count == 100) + && (countitem(@MAUVE) > 40) + && (countitem(@BOTTLE_WATER) > 100) + && (countitem(@MANAPOTION) < 1)) + goto L_manapotion_toomany; delitem @MAUVE, 40; - delitem @WATER, 1; + delitem @BOTTLE_WATER, 1; getitem @MANAPOTION, 1; mes "[Wyara the Witch]"; @@ -176,7 +188,7 @@ L_Q_sagatha: next; mes "[Wyara the Witch]"; - mes "\"She does hold all plants and animals very dear, though. Well, the peaceful ones more than the aggressive ones, I suppose.\""; + mes "\"She does hold all plants and animals very dear, though. Well, the peaceful ones more than the aggressive ones, I suppose, and scorpions not very much at all.\""; next; goto L_Main; @@ -226,10 +238,10 @@ L_Magic_explain: goto L_Magic_main; L_Magic_spell: - if (getskilllv(SKILL_MAGIC) > 1) - goto L_Magic_spell2; if (getskilllv(SKILL_MAGIC_NATURE) > 1) goto L_Magic_spell3; + if (getskilllv(SKILL_MAGIC) > 1) + goto L_Magic_spell2; mes "[Wyara the Witch]"; mes "\"No... I don't think that you are ready yet. But please ask me again when you have some more control over your magical powers.\""; next; @@ -246,11 +258,11 @@ L_Magic_spell2: mes "\"Here is an easy and useful one: '" + getspellinvocation("detect-players") + "'. It will tell you the names of everyone nearby, but beware that there are ways to protect against it.\""; next; - if (!getpartnerid2(0)) + if (!(getpartnerid2(0))) goto L_Magic_main; mes "[Wyara the Witch]"; - mes "\"Married partners can find each other even more easily. Use the '" + getspellinvocation("detect-spouse") + "' spell instead.\""; + mes "\"Married partners can find each other even more easily. Use the '" + getspellinvocation("sense-spouse") + "' spell instead.\""; next; goto L_Magic_main; @@ -467,7 +479,7 @@ L_Magic_train_sagatha: mes "[Wyara the Witch]"; mes "\"The tree has been there alone and unattended for a long time; what he needs most is water and affection. Give him both.\""; next; - goto Magic_main; + goto L_Magic_main; L_Magic_train_tree_backgd: mes "[Wyara the Witch]"; @@ -514,9 +526,9 @@ L_Magic_tree_menu: menu "How should I give him water?", L_Magic_tree_water, "How should I thank him?", L_Magic_tree_remind, - "OK.", -, + "I will.", -, "No.", -; - goto L_Magic_menu; + goto L_Magic_main; L_Magic_tree_water: mes "[Wyara the Witch]"; diff --git a/npc/009-3_Cave_beneath_Hurnscald/_import.txt b/npc/009-3_Cave_beneath_Hurnscald/_import.txt index 0297260b..6a2a2a8e 100644 --- a/npc/009-3_Cave_beneath_Hurnscald/_import.txt +++ b/npc/009-3_Cave_beneath_Hurnscald/_import.txt @@ -2,3 +2,4 @@ map: 009-3.gat npc: npc/009-3_Cave_beneath_Hurnscald/_mobs.txt npc: npc/009-3_Cave_beneath_Hurnscald/_warps.txt npc: npc/009-3_Cave_beneath_Hurnscald/monsters.txt +npc: npc/009-3_Cave_beneath_Hurnscald/sword.txt diff --git a/npc/009-3_Cave_beneath_Hurnscald/sword.txt b/npc/009-3_Cave_beneath_Hurnscald/sword.txt index a1f9949a..d60ac123 100644 --- a/npc/009-3_Cave_beneath_Hurnscald/sword.txt +++ b/npc/009-3_Cave_beneath_Hurnscald/sword.txt @@ -19,7 +19,7 @@ L_message: 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_PostFlareDart_teach; + if (@Q_status == @STATUS_LEARNED_MAGICBLADE) goto L_PostFlareDart_teach2; if (@Q_status == @STATUS_LEVEL2) goto L_L2_W11; if (@Q_status == @STATUS_W12) goto L_L2_W11; if (@Q_status == @STATUS_W11) goto L_L2_almost_done; @@ -46,7 +46,7 @@ L_Initial: mes "[Magic 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.\""; + mes "\"I know not what brought thee hither, but I kindly ask that thou leavest me alone in my sorrow.\""; next; menu @@ -68,7 +68,7 @@ L_PostFlareDart: mes "\"Welcome, mortal!\""; next; - mes + menu "Hi! How are you?", L_PostFlareDart_hi, "Can you teach me magic?", L_PostFlareDart_teach, "Your sister sent me.", L_PostFlareDart_sister, @@ -109,7 +109,7 @@ L_PostFlareDart_teach: mes "[Magic 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.\""; + mes "\"Hold a knife, sharp or regular, when thou speakest it.\""; set @Q_status, @STATUS_LEARNED_MAGICBLADE; callsub S_update_var; next; @@ -119,7 +119,7 @@ L_PostFlareDart_teach: next; close; -L_PostFlareDart_teach: +L_PostFlareDart_teach2: mes "[Magic Sword]"; mes "\"Seek out my sister, and leave me alone in my sorrows.\""; next; @@ -129,7 +129,7 @@ L_Close: L_L2_W11: mes "[Magic Sword]"; - mes "\"You have returned. That must mean that thy wish to learn the magic of war is still alive?\""; + mes "\"Thou hast returned. That must mean that thy wish to learn the magic of war is still alive?\""; next; menu "No, I just wanted to say `hi'.", L_sayhi, @@ -137,8 +137,8 @@ L_L2_W11: mes "[Magic Sword]"; mes "\"If that is thy wish, I shall not stop thee. But do not expect to find merriment down this road.\""; - mes "\"I must ask that you sacrifice a thousand monster points for this, however.\""; - + mes "\"I must ask that thou sacrificest a thousand monster points for this, however.\""; + menu "No, I don't want that.", L_farewell, "I agree.", -; @@ -165,13 +165,13 @@ L_L2_W11: L_L2_almost_done: mes "[Magic Sword]"; - mes "\"Return to my sister now. I expect that she shall teach you one more spell.\""; + mes "\"Return to my sister now. I expect that she shall teach thee one more spell.\""; next; close; L_lacking_mobpoints: mes "[Magic Sword]"; - mes "\"Thou lackest the monster points needed to prove thy worthiness. I shall not reveal more to you until thou hast slain more monsters.\""; + mes "\"Thou lackest the monster points needed to prove thy worthiness. I shall not reveal more to thee until thou hast slain more monsters.\""; next; close; diff --git a/npc/011-1_Woodland/alchemist.txt b/npc/011-1_Woodland/alchemist.txt index bc7b53f3..a821a3c1 100644 --- a/npc/011-1_Woodland/alchemist.txt +++ b/npc/011-1_Woodland/alchemist.txt @@ -109,16 +109,18 @@ L_post_sulphur_option: L_post_ironpowder_option: if (@Q_status == @SETZER_INITIAL) - goto L_main_menu; + goto L_post_monster_oil; set @menuitems$[@c], "Can you make monster oil?"; set @menuID[@c], @CHOICE_MONSTER_OIL; set @c, @c + 1; -L_main_menu: +L_post_monster_oil: set @menuitems$[@c], "No thanks."; set @menuID[@c], @CHOICE_ABORT; set @c, @c + 1; +L_main_menu: + menu @menuitems$[0], -, @menuitems$[1], -, @@ -260,6 +262,14 @@ L_get_mana_potion: if(countitem(@ASH) < 5) goto L_mana_potion_lacking; if(countitem(@PEARL) < 1) goto L_mana_potion_lacking; if(countitem(@WATER) < 1) goto L_mana_potion_lacking; + getinventorylist; + if ((@inventorylist_count == 100) + && (countitem(@MAUVE) > 30) + && (countitem(@ASH) > 5) + && (countitem(@PEARL) > 1) + && (countitem(@WATER) > 1) + && (countitem(@MANAPOTION) < 1)) + goto L_mana_potion_toomuch; delitem @MAUVE, 30; delitem @YELLOW, 20; @@ -284,9 +294,16 @@ L_get_mana_potion: goto L_main_menu; +L_mana_potion_toomuch: + mes "[Rauk the Alchemist]"; + mes "\"You look quite burdened already. Why don't you drop off a few things first, and come back later?\""; + next; + goto L_main_menu; + L_mana_potion_lacking: mes "[Rauk the Alchemist]"; mes "\"Sorry, but I need one pearl, one bottle of water, 30 mauve leaves, 20 gamboge leaves, and five piles of volcanic ash.\""; + next; goto L_main_menu; L_iron: diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index 688fd690..f6d9c8a8 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -58,7 +58,7 @@ if (Sex == 0) set @address$, "girl"; - if (@Q_status >= @Q_STATUS_POSTINTRO) + if (@Q_main_status >= @Q_STATUS_POSTINTRO) goto L_short_intro; mes "[Robed Man]"; @@ -105,7 +105,7 @@ L_intro_identity: set @xmsg$, "Right... my name is " + strcharinfo(0) + "."; if (strcharinfo(0) == "Padric") - set @xmsg$, "Actually, I am, but I don't know you..?"; + set @xmsg$, "Actually, I am, but I don't know you...?"; menu @xmsg$, L_intro_wrongperson, "You're not very good with faces, are you?", L_intro_nogood, @@ -213,16 +213,16 @@ L_ironpowder: 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.\""; + set @cost, 400 - (@Q_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 " + @cost + " GP.\""; next; - if (@Q_status >= @Q_STATUS_STUDENT) + if (@Q_main_status >= @Q_STATUS_STUDENT) menu "No, thank you.", -, "I will see what I can find.", -, "Can you teach me how to make it myself?", L_sulphur_teach_spell, "Here you are.", L_sulphur_buy; - if (@Q_status < @Q_STATUS_STUDENT) + if (@Q_main_status < @Q_STATUS_STUDENT) menu "No, thank you.", -, "I will see what I can find.", -, @@ -242,7 +242,7 @@ L_sulphur_buy: set zeny, zeny - @cost; delitem @ASH, 1; - getitem @SULPHUR, 1; + getitem @SULPHUR, 5; mes "[Auldsbel the Wizard]"; mes "\"I shall transmute it later. Here, have five half-ounces from my own stock.\""; next; @@ -521,6 +521,7 @@ L_question: if (@c == 0) goto L_main_menu; if (@c == @QQ_ELANORE) goto L_Q_elanore; if (@c == @QQ_MANASEED) goto L_Q_manaseed; + if (@c == @QQ_MANAPOTION) goto L_make_mana_potion; if (@c == @QQ_WYARA) goto L_Q_wyara; if (@c == @QQ_SAGATHA) goto L_Q_sagatha; if (@c == @QQ_IMP) goto L_Q_imp; @@ -531,7 +532,7 @@ L_question: next; goto L_main_menu; -L_Q_oldwiz: +L_Q_old_wizard: mes "[Auldsbel the Wizard]"; mes "\"I'm still not sure what exactly to make of him. At first appearance, he seems like a senile old man, but there can be no doubt that he has-- or at least had, at some point-- a very deep understanding of magic.\""; next; @@ -586,7 +587,7 @@ L_Q_manaseed: mes "\"You have found an acual Mana Seed? That's impossible! Well, very unlikely... Then again, some others have told me similar rumours. I find it hard to believe that...\""; next; mes "[Auldsbel the Wizard]"; - mes "\"Well, if it's true, then try touching it. It should do you no harm, but if you are very, very lucky, it just might grant you some minuscle magical power.\""; + mes "\"Well, if it's true, then try touching it. That should do you no harm, but if you are very, very lucky, it just might grant you some minuscule amount of magical power.\""; next; goto L_main_menu; @@ -600,7 +601,7 @@ L_Q_manaseed_touched: goto L_Q_manaseed_touched_short; mes "[Auldsbel the Wizard]"; - mes "\"Legend has it that you can substitute for such control by imbibing a Mana Potion. I am not sure whether that legend is true, but it might be worth trying out for you.\""; + mes "\"Legend has it that you can substitute for such control by imbibing a Mana Potion. I am not sure whether that legend is true, but for you it might be worth trying it out.\""; next; set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_MANAPOTION; @@ -619,7 +620,7 @@ L_where_mana_potion: L_make_mana_potion: mes "[Auldsbel the Wizard]"; - mes "\"Certainly, I can transmute some components into a Mana Potion for you. Let's see... I will need one pearl, 10,000 GP, about twenty Mauve leaves, and some Gamboge ones... ten should do, I think. Oh, and a bottle of water, of course.\""; + mes "\"Well, I can transmute some components into a Mana Potion for you. Let's see... I will need one pearl, 10,000 GP, about twenty Mauve leaves, and some Gamboge ones... ten should do, I think. Oh, and a bottle of water, of course.\""; next; menu "Here you are.", -, @@ -636,6 +637,14 @@ L_make_mana_potion: goto L_make_mana_potion_missing; if (countitem(@BOTTLE_WATER) < 1) goto L_make_mana_potion_missing; + getinventorylist; + if (@inventorylist_count == 100 + && countitem(@YELLOW) > 10 + && countitem(@MAUVE) > 20 + && countitem(@PEARL) > 1 + && countitem(@BOTTLE_WATER) > 1 + && countitem(@MANA_POTION) < 1) + goto L_mana_potion_toomuch; set zeny, zeny - 10000; delitem @YELLOW, 10; @@ -664,11 +673,17 @@ L_make_mana_potion: goto L_main_menu; +L_mana_potion_toomuch: + mes "[Auldsbel the Wizard]"; + mes "\"Burndened as you are, I doubt you could carry it. Get rid of some of your old things first, will you?\""; + next; + goto L_main_menu; + L_make_mana_potion_missing: mes "[Auldsbel the Wizard]"; mes "\"No, I need one pearl, 10,000 GP, 20 Mauve leaves, 10 Gamboge leaves, and one bottle of water.\""; next; - goto L_Q_manaseed_touched_short; + goto L_main_menu; L_Q_manaseed_prepared: mes "\"So you found a Mana Seed and preprared yourself by drinking a mana potion? I recommend that you visit the seed again and see if that actually works...\""; @@ -972,7 +987,8 @@ LL_initiation: menu "Not yet.", -, "How about this mouboo figurine?", LL_initiation_check; - if (!countitem(@MOUBOO_FIGURINE)) + + if (!(countitem(@MOUBOO_FIGURINE))) menu "Not yet.", -, "What was the spell again?", LL_repeat_spell; @@ -988,7 +1004,7 @@ LL_initiation_fail: goto L_main_menu; LL_initiation_check: - if (!countitem (@MOUBOO_FIGURINE)) + if (!(countitem(@MOUBOO_FIGURINE))) goto L_main_menu; delitem @MOUBOO_FIGURINE, 1; set @mexp, MAGIC_EXPERIENCE & 65535; @@ -1020,18 +1036,19 @@ LL_initiation_check: mes "[5000 experience points]"; mes "[Level 2 in Transmutation Magic]"; - set @Q_status, @Q_STATUS_STUDENT; + set @Q_main_status, @Q_STATUS_STUDENT; callsub S_update_var; getexp 5000, 0; if (getskilllv(SKILL_MAGIC_TRANSMUTE) < 2) skill SKILL_MAGIC_TRANSMUTE, 2; + next; goto L_main_menu; LL_student_start: mes "[Auldsbel the Wizard]"; mes "\"Next, I shall teach you a higher-level transmutation spell.\""; if (getskilllv(SKILL_MAGIC) < 2) - msg "\"Beware, for you will not be able to use it yet.\""; + mes "\"Beware, for you will not be able to use it yet.\""; next; mes "[Auldsbel the Wizard]"; @@ -1047,7 +1064,7 @@ LL_student_start: delitem @BUGLEG, 10; getexp 1000, 0; - set @Q_status, @Q_STATUS_STUDENT0; + set @Q_main_status, @Q_STATUS_STUDENT0; callsub S_update_var; mes "[Auldsbel the Wizard]"; @@ -1092,7 +1109,7 @@ LL_student_0: delitem @MAUVE, 20; getexp 1000, 0; - set @Q_status, @Q_STATUS_STUDENT1; + set @Q_main_status, @Q_STATUS_STUDENT1; callsub S_update_var; mes "[Auldsbel the Wizard]"; @@ -1127,7 +1144,7 @@ LL_student_1: delitem @STINGER, 10; getexp 1000, 0; - set @Q_status, @Q_STATUS_STUDENT2; + set @Q_main_status, @Q_STATUS_STUDENT2; callsub S_update_var; mes "[Auldsbel the Wizard]"; @@ -1162,7 +1179,7 @@ LL_student_2: delitem @WOOD, 20; getexp 1000, 0; - set @Q_status, @Q_STATUS_STUDENT3; + set @Q_main_status, @Q_STATUS_STUDENT3; callsub S_update_var; mes "[Auldsbel the Wizard]"; diff --git a/npc/012-1_Woodland_Hills/injured-mouboo.txt b/npc/012-1_Woodland_Hills/injured-mouboo.txt index c017a35a..c248b8e6 100644 --- a/npc/012-1_Woodland_Hills/injured-mouboo.txt +++ b/npc/012-1_Woodland_Hills/injured-mouboo.txt @@ -108,15 +108,17 @@ L_give: setarray @choice_eat, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; set @n, 0; + set @ct, 0; L_nloop: set @k, @items[@n]; if (countitem(@k) == 0) goto L_nloop_skip; set @name$, getitemname(@k); - set @choice$[@n], @name$; - set @choice_idx[@n], @k; - set @choice_eat[@n], @itemeat[@n]; + set @choice$[@ct], @name$; + set @choice_idx[@ct], @k; + set @choice_eat[@ct], @itemeat[@n]; + set @ct, @ct + 1; L_nloop_skip: @@ -124,19 +126,18 @@ L_nloop_skip: if (@n < @items_nr) goto L_nloop; - menu - @choice$[0], - - @choice$[1], - - @choice$[2], - - @choice$[3], - - @choice$[4], - - @choice$[5], - - @choice$[6], - - @choice$[7], - - @choice$[8], - - @choice$[9], - - @choice$[10], - - @choice$[11], -; + menu @choice$[0], -, + @choice$[1], -, + @choice$[2], -, + @choice$[3], -, + @choice$[4], -, + @choice$[5], -, + @choice$[6], -, + @choice$[7], -, + @choice$[8], -, + @choice$[9], -, + @choice$[10], -, + @choice$[11], -; set @menu, @menu - 1; set @choice, @choice_idx[@menu]; @@ -163,6 +164,7 @@ L_consume: mes "[Injured Mouboo]"; mes "Unfortunately, it seems to have had no effect."; + next; goto L_menu; L_do_heal: diff --git a/npc/012-3_Cave/mana-seed.txt b/npc/012-3_Cave/mana-seed.txt index 6ad8a37e..7b8c7796 100644 --- a/npc/012-3_Cave/mana-seed.txt +++ b/npc/012-3_Cave/mana-seed.txt @@ -127,8 +127,6 @@ L_magic_level_1: mes "It is a light-headed feeling, and you find yourself forced to sit down for a few seconds to recover."; mes "Something is different. A new power has grown within you and is waiting to be understood."; mes "[1000 experience points]"; - next; - skill SKILL_MAGIC, 1; getexp 1000, 0; next; @@ -182,7 +180,7 @@ L_magic_touch: L_magic_levelup: set @baselevel_needed, @min_level[getskilllv(SKILL_MAGIC) + 1]; - if (base_level < @baselevel_needed) + if (BaseLevel < @baselevel_needed) goto L_insufficient_baselevel; mes "Its energy permeates you, surrounds you. You are suddenly uncertain if it is you who is containing the orb's powers or if it is the orb who is seeking out yours."; next; @@ -248,7 +246,7 @@ L_magic_maxed_out: goto L_magic_mainmenu; -L_insufficent_baselevel: +L_insufficient_baselevel: mes "Its energies rush through you. You fight to keep them under control, to contain them in your body. Alas, your body is too frail-- you have to let go."; mes "Frustrated, you give up. You have the skill needed to control this power, but you will have to grow up some more before your body can handle it."; next; diff --git a/npc/013-1_Woodland_hills/sagatha.txt b/npc/013-1_Woodland_hills/sagatha.txt index ed2a20b6..222c1aa1 100644 --- a/npc/013-1_Woodland_hills/sagatha.txt +++ b/npc/013-1_Woodland_hills/sagatha.txt @@ -1,7 +1,7 @@ // Sagatha the witch, expert for nature and ether magic //---------------------------------------- -function script QuestSagathaHappy { +function script QuestSagathaHappy { set @unhappiness, (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; if (@unhappiness < @value) goto L_zero; @@ -18,7 +18,7 @@ L_write: } //---------------------------------------- -function script QuestSagathaAnnoy { +function script QuestSagathaAnnoy { set @unhappiness, (QUEST_MAGIC & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT; if ((@unhappiness + @value) > 15) goto L_max; @@ -34,7 +34,7 @@ L_write: return; } -function script SagathaStatus { +function script SagathaStatus { set @mexp, MAGIC_EXPERIENCE & 65535; set @has_magic, getskilllv(SKILL_MAGIC); set @evil, 0; @@ -139,18 +139,18 @@ L_evil: L_unhappy: mes "The witch glares at you in anger."; - mes "\"I wonder if you can still sleep after killing those innocent forest creatures! I am sure that they will come back to haunt you in your dreams!\""; + mes "\"I wonder if you can still sleep after killing those innocent forest creatures!"; + mes "I am sure that they will come back to haunt you in your dreams!\""; next; close; L_wb: - mes "[Sagatha the Witch]"; if (@good > 1) - msg "Sagatha nods as she notices you."; + mes "Sagatha nods as she notices you."; if (@good == 1) - msg "Sagatha raises an eyebrow as you address her."; + mes "Sagatha raises an eyebrow as you address her."; if (@good == 0) - msg "Sagatha glances at you, suspicion evident in her eyes."; + mes "Sagatha glances at you, suspicion evident in her eyes."; next; L_main: @@ -187,6 +187,7 @@ L_teach_initial: getexp 5000, 0; if (getskilllv(SKILL_MAGIC_ETHER) < 2) skill SKILL_MAGIC_ETHER, 2; + next; mes "[Sagatha the Witch]"; mes "\"In the future, I will teach you nature and ether magic. For the other schools there are better teachers around.\""; @@ -313,13 +314,13 @@ L_Q_old_wizard: mes "[Sagatha the Witch]"; mes "\"A kind and wise wizard.\""; next; - goto L_main_menu; + goto L_main; L_Q_imp: mes "[Sagatha the Witch]"; mes "\"He is an evil and cruel one. He lies and cheats and will try to take advantage of you. Stay away from him.\""; next; - goto L_main_menu; + goto L_main; L_Q_elanore: mes "[Sagatha the Witch]"; @@ -338,14 +339,12 @@ L_Q_manaseed: goto L_main; L_Q_manaseed_unabsorbed: - mes "[Sagatha the Witch]"; mes "\"If the mana seed didn't pass its magic to you, you clearly aren't attuned to magic.\""; next; goto L_main; L_Q_manaseed_m: - mes "[Sagatha the Witch]"; - mes "\"You were lucky that the mana seed gave you its magic.\""; + mes "\"You were lucky that the mana seed gave you its magic. I hope that you will use this power for something good now.\""; next; goto L_main; diff --git a/npc/015-1_Woodland/_import.txt b/npc/015-1_Woodland/_import.txt index d92e0749..fcefd199 100644 --- a/npc/015-1_Woodland/_import.txt +++ b/npc/015-1_Woodland/_import.txt @@ -3,3 +3,4 @@ npc: npc/015-1_Woodland/_mobs.txt npc: npc/015-1_Woodland/_warps.txt npc: npc/015-1_Woodland/alice.txt npc: npc/015-1_Woodland/monsters.txt +npc: npc/015-1_Woodland/sword.txt diff --git a/npc/015-1_Woodland/sword.txt b/npc/015-1_Woodland/sword.txt index d666777e..5713656b 100644 --- a/npc/015-1_Woodland/sword.txt +++ b/npc/015-1_Woodland/sword.txt @@ -74,11 +74,19 @@ L_Initial_learn: mes "[Mystic 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; + menu + "I am not interested in that.", L_Farewell, + "It might be good for me to learn that.", -, + "I am quite interested.", -; + + mes "[Mystic Sword]"; + mes "\"Why is it that thou seekest this power?\""; + next; + + menu + "Never mind.", L_Farewell, "To become stronger!", L_Initial_selfish, "To kill!", L_Initial_selfish, "I don't know yet...", L_Initial_dontknow, @@ -113,10 +121,19 @@ L_Initial_ok: set @Q_status, @STATUS_LEARNED_FLAREDART; callsub S_update_var; next; - close; + + mes "[Mystic Sword]"; + mes "\"From then on, thou canst shoot fiery missiles from thy fingers, for a limited time.\""; + next; + + mes "[Mystic Sword]"; + mes "\"Use it wisely, mortal!.\""; + next; + + goto L_Farewell; L_FlareStage: - menu; + 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; @@ -142,7 +159,7 @@ L_FlareStage_hello: L_FlareStage_moremagic: mes "[Mystic 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.\""; + 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, he shall teach thee another spell.\""; next; goto L_Farewell; @@ -188,8 +205,8 @@ L_Levelup2_yes: mes "[Mystic Sword]"; mes "The sword begins to chant in your head!"; mes " \"Lords of Thunder, Fire, Rage!\""; - mes " \"Grant your powers to this mage,\""; - mes " \"Rising with your dreadful roar,\""; + mes " \"Grant thy powers to this mage,\""; + mes " \"Rising with thy dreadful roar,\""; if (Sex) mes " \"Answer to his call to War!\""; if (!Sex) @@ -214,7 +231,7 @@ L_Levelup2_yes: next; mes "[Mystic Sword]"; - mes "\"You have now taken your first true step down the path of war magic. Seek out my brother for thy next spell!\""; + mes "\"Thou hast now taken thy first true step down the path of war magic. Seek out my brother for thy next spell!\""; next; goto L_Farewell; @@ -267,7 +284,7 @@ L_L2_W12: next; mes "[Mystic Sword]"; - mes "\"Speak '" + getspellinvocation("magic-knuckles") + "' and take a glass of beer and drink it, without ever taking it off your lips. This will harden and enchant thy fists, turning them into powerful weapons.\""; + mes "\"Speak '" + getspellinvocation("magic-knuckles") + "' and take a glass of beer and drink it, without ever taking it off thy lips. This will harden and enchant thy fists, turning them into powerful weapons.\""; next; close; @@ -291,7 +308,7 @@ L_L2_W10: next; menu - "OK.", -; + "OK.", -, "No way.", L_farewell; if (countitem(@ORE) < 1) -- cgit v1.2.3-60-g2f50 From 23518b19a828eb36e56c0cb0cd4a8f8778934ad6 Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 11 Jan 2009 14:24:01 -0700 Subject: Fixed a number of remaining bugs --- conf/magic.conf.template | 7 ++++-- npc/001-1_Tulimshar/elanore.txt | 7 +++--- npc/005-1_Snake_desert/spirit.txt | 10 ++++----- npc/009-2_Hurnscald/misc.txt | 1 + npc/009-2_Hurnscald/wyara.txt | 33 +++++++++++++++++------------ npc/009-3_Cave_beneath_Hurnscald/sword.txt | 12 +++++------ npc/011-1_Woodland/alchemist.txt | 5 +++-- npc/011-1_Woodland/auldsbel.txt | 6 ++++-- npc/013-1_Woodland_hills/sagatha.txt | 8 ++----- npc/013-2_Magic_house/wizard.txt | 1 + npc/015-1_Woodland/sword.txt | 34 ++++++++++++++++++------------ 11 files changed, 70 insertions(+), 54 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf.template b/conf/magic.conf.template index 66e44cfa..a03e78ac 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -728,6 +728,9 @@ SPELL hide (target : PC) : "#A13" = THEN CALL default_effect(); status_change(target, SC_HIDE, 0, 0, 0, 0, 5000 + (spellpower * 2500)); CALL gain_xp(2); + message(target, "You are hidden!"); + message(caster, "You hid someone!"); + ATEND message(target, "It's over!"); #-------------------------------------------------------------------------------- # Level 2 spells @@ -808,7 +811,7 @@ SPELL teleport (destination : STRING) : "#A40" = REQUIRE skill(caster, MAGIC) > level, REQUIRE skill(caster, school) > level) => EFFECT CALL default_effect(); - WAIT (100000 / (spellpower + 10)); + WAIT 1000 + (200000 / (spellpower + 10)); sfx(location(caster), SFX_TELEPORT, 1); warp(caster, random_location(anchor(destination))); sfx(location(caster), SFX_TELEPORT, 100); @@ -858,7 +861,7 @@ PROCEDURE debug_xmod(name, mask, shift, gain) = PROCEDURE debug_mod(name, delta) = IF (name = "mexp") THEN CALL debug_xmod("MAGIC_EXPERIENCE", 0xffff, 0, delta); ELSE IF (name = "lastspell") THEN CALL debug_xmod("MAGIC_EXPERIENCE", 0xff, 16, delta); - ELSE IF (name = "lifeexp") THEN CALL debug_xmod("MAGIC_EXPERIENCE", 0xff, 24, delta); + ELSE IF (name = "healexp") THEN CALL debug_xmod("MAGIC_EXPERIENCE", 0xff, 24, delta); ELSE IF (name = "drank") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 0, delta); ELSE IF (name = "Kmseed") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 1, delta); ELSE IF (name = "touched-mseed") THEN CALL debug_xmod("MAGIC_FLAGS", 0x1, 2, delta); diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 729a41bf..bd601104 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -209,7 +209,7 @@ L_Lifestones_MakeSelf: 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!.\""; + 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; @@ -305,7 +305,7 @@ L_Teach_AdvanceTo2_skip: callsub S_update_var; getexp 5000, 0; if (getskilllv(SKILL_MAGIC_LIFE) < 2) - skill SKILL_MAGIC_LIFE, 2; + setskill SKILL_MAGIC_LIFE, 2; close; L_Teach_CheckAdvanceTo2_fail: @@ -335,11 +335,10 @@ L_Teach_CheckAdvanceToLOH: mes "[Elanore the Healer]"; mes "\"This will let your own life force flow into the person you are healing. If you are badly injured yourself, you will not be able to do this.\""; mes "[1000 experience points]"; - next; - getexp 1000, 0; set @Q_status, @STATUS_LEARNED_LAY_ON_HANDS; callsub S_update_var; + next; close; L_Teach_LOH_advance_abort0: diff --git a/npc/005-1_Snake_desert/spirit.txt b/npc/005-1_Snake_desert/spirit.txt index f51b242c..5ef46cbc 100644 --- a/npc/005-1_Snake_desert/spirit.txt +++ b/npc/005-1_Snake_desert/spirit.txt @@ -48,7 +48,7 @@ L_message: "Whatever it is, I'm not interested.", L_close; mes "[Earth Spirit]"; - mes "\"I'm a forest spirit; my name isn't important... all that matters is that I like you, and that I will help you become a powerful wizard if you help me. A fair deal, if you will...\""; + mes "\"I'm an earth spirit; my name isn't important... all that matters is that I like you, and that I will help you become a powerful wizard if you help me. Just a fair deal, no more than that...\""; next; set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_IMP; @@ -116,7 +116,7 @@ L_Q_magic: next; mes "[Earth Spirit]"; - mes "\"Besides, think of it like that: if you want to bake a cake, you've got to break a few eggs. Not everything's sweetness in life, my " + @s$ + "!.\""; + mes "\"Who knows if he can even feel anything anymore? I'm sure he can't, being wooden and all. Besides, it's only a measly tree. Not like I'm asking you to cut him down!.\""; next; menu @@ -134,10 +134,10 @@ L_Q_tree_ok: L_Q_magic_1: mes "[Earth Spirit]"; - mes "\"Yes, yes, if you brought me the branch and the money, then I will!\""; + mes "\"Yes, yes, if you bring me the branch and the money, then I will!\""; next; menu - "Here is the branch and the money.", -, + "Here are the branch and the money.", -, "How much money did you want again?", L_Q_tree_howmuch, "How can I cut it?", L_Q_tree_how, "Where was the tree again?", L_Q_tree_where, @@ -165,7 +165,7 @@ L_Q_magic_1: mes "[Level 2 in Nature Magic]"; getexp 5000, 0; if (getskilllv(SKILL_MAGIC_NATURE) < 2) - skill SKILL_MAGIC_NATURE, 2; + setskill SKILL_MAGIC_NATURE, 2; next; set @Q_status, @Q_STATUS_STUDENT0; diff --git a/npc/009-2_Hurnscald/misc.txt b/npc/009-2_Hurnscald/misc.txt index f3bbe545..9a929203 100644 --- a/npc/009-2_Hurnscald/misc.txt +++ b/npc/009-2_Hurnscald/misc.txt @@ -53,6 +53,7 @@ L_magic: mes "[Bookshelf]"; mes "You can't make out anything else of value, so you place the manuscript back in the bookshelf."; next; + close; L_magic_boring: mes "[Bookshelf]"; diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt index d97f6c86..d3f5b2d1 100644 --- a/npc/009-2_Hurnscald/wyara.txt +++ b/npc/009-2_Hurnscald/wyara.txt @@ -6,7 +6,7 @@ function script PurificationPotion { if (isat("011-1.gat", 88,67)) goto L_correct; - announce "This doesn't seem to be the right place.", 7; + message strcharinfo(0), "This doesn't seem to be the right place."; getitem @PURIFICATIONPOTION, 1; close; L_correct: @@ -19,7 +19,7 @@ L_correct: if (@Q_status < @STATUS_PURIFY_ONCE) set @Q_status, @STATUS_PURIFY_ONCE; - announce "You pour the potion into the pond.", 7; + message strcharinfo(0), "You pour the potion into the pond."; set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) @@ -39,6 +39,7 @@ L_correct: set @STATUS_PURIFY_EXPLAINED, 1; set @STATUS_PURIFY_ONCE, 2; set @STATUS_PURIFY_TWICE, 3; + set @STATUS_PURIFY_OVER, 4; set @MAUVE, 680; set @MAGGOTSLIME, 505; @@ -48,6 +49,10 @@ L_correct: set @has_magic, getskilllv(SKILL_MAGIC); + if (@Q_status == @STATUS_PURIFY_ONCE) + goto L_Magic_purify_once; + if (@Q_status == @STATUS_PURIFY_TWICE) + goto L_Magic_purify_done; mes "[Wyara the witch]"; if (!Sex) @@ -314,9 +319,10 @@ L_Magic_purify_explained: next; menu - "I shall get them later.", Magic_main, - "Booring.", Magic_main, - "Here they are.", -, + "I shall get them later.", L_Magic_main, + "Booring.", L_Magic_main, + "Here they are.", -; + getinventorylist; if ((@inventorylist_count == 100) && (countitem(@MAUVE) > 20) && (countitem(@MAGGOTSLIME) > 20)) goto L_Magic_purify_nospace; @@ -365,9 +371,9 @@ L_Magic_purify_once: next; menu - "I'll get them later.", Magic_main, - "No way.", Magic_main, - "Here you are.", -, + "I'll do that later.", L_Main, + "No way.", L_Main, + "Here you are.", -; getinventorylist; if ((@inventorylist_count == 100) && (countitem(@MAUVE) > 20) && (countitem(@MAGGOTSLIME) > 20)) goto L_Magic_purify_nospace; @@ -389,14 +395,14 @@ L_Magic_purify_doit2: next; close; -L_Magic_purify_twice: +L_Magic_purify_done: mes "[Wyara the Witch]"; mes "Wyara smiles at you."; mes "\"A friend told me... you have saved the pond for now. Perhaps it will need some more attention later, but I'll ask others for this.\""; next; mes "[Wyara the Witch]"; - mes "\"Please kneel down and touch the ground.\""; + mes "\"Please sit down and touch the ground.\""; next; menu @@ -404,7 +410,7 @@ L_Magic_purify_twice: "No way!", L_Magic_purify_abort; mes "[Wyara the Witch]"; - mes "You kneel down and touch the ground, and so does Wyara."; + mes "You sit down and touch the ground, and so does Wyara."; next; mes "[Wyara the Witch]"; @@ -426,10 +432,11 @@ L_Magic_purify_twice: getexp 5000, 0; if (getskilllv(SKILL_MAGIC_NATURE) < 2) - skill SKILL_MAGIC_NATURE, 2; + setskill SKILL_MAGIC_NATURE, 2; + set @Q_status, @STATUS_PURIFY_OVER; + callsub S_update_var; close; - L_Magic_purify_abort: mes "[Wyara the Witch]"; mes "\"I can't help you if you don't subject yourself to the ritual.\""; diff --git a/npc/009-3_Cave_beneath_Hurnscald/sword.txt b/npc/009-3_Cave_beneath_Hurnscald/sword.txt index d60ac123..2b5c5f75 100644 --- a/npc/009-3_Cave_beneath_Hurnscald/sword.txt +++ b/npc/009-3_Cave_beneath_Hurnscald/sword.txt @@ -26,7 +26,7 @@ L_message: if (@Q_status == @STATUS_W11_12) goto L_L2_almost_done; mes "[Magic Sword]"; - mes "Come back when thou art stronger."; + mes "\"Come back when thou art stronger.\""; next; close; @@ -136,18 +136,18 @@ L_L2_W11: "Yes, teach me more!", -; mes "[Magic Sword]"; - mes "\"If that is thy wish, I shall not stop thee. But do not expect to find merriment down this road.\""; - mes "\"I must ask that thou sacrificest a thousand monster points for this, however.\""; + mes "\"If that is thou wishest, I shall not stop thee. But do not expect to find merriment down this road.\""; + mes "\"I must ask that thou sacrificest five thousand monster points for this, however.\""; menu "No, I don't want that.", L_farewell, - "I agree.", -; + "Very well.", -; - if (Mobpt < 1000) goto L_lacking_mobpoints; + if (Mobpt < 5000) goto L_lacking_mobpoints; mes "[Magic Sword]"; mes "\"So be it, then.\""; mes "[1000 experience points]"; - set Mobpt, Mobpt - 1000; + set Mobpt, Mobpt - 5000; getexp 1000, 0; set @Q_status, @Q_status + 1; callsub S_update_var; diff --git a/npc/011-1_Woodland/alchemist.txt b/npc/011-1_Woodland/alchemist.txt index a821a3c1..a15884cc 100644 --- a/npc/011-1_Woodland/alchemist.txt +++ b/npc/011-1_Woodland/alchemist.txt @@ -148,6 +148,7 @@ L_main_menu: L_iron_powder: mes "[Rauk the Alchemist]"; mes "\"Iron powder? Hmm, I can extract some iron powder out of a chunk of iron ore, but that will require me to dissolve it. If you give me a chunk of iron ore and 100 GP for the acid, I can do it.\""; + next; menu "Never mind.", L_abort, "Here you are!", -; @@ -165,11 +166,11 @@ L_iron_powder: set zeny, zeny - 100; getitem @IRONPOWDER, 4; mes "[Rauk the Alchemist]"; - mes "Rauk places your chunk of ore in a strange glass container, then pours a steaming yellow liquid over it. Before your eyes, the ore dissolves.\""; + mes "Rauk places your chunk of ore in a strange glass container, then pours a steaming yellow liquid over it. Before your eyes, the ore dissolves."; next; mes "[Rauk the Alchemist]"; - mes "Rauk pours another liquid over the resultant mixture, then pours the result through a piece of cloth placed in a funnel. He removes some amount of metal powder from the cloth and hands it to you.\""; + mes "Rauk pours another liquid over the resultant mixture, then pours the result through a piece of cloth placed in a funnel, followed by a cup of water. He removes the residual metal powder from the cloth and hands it to you."; mes "\"This is about as fine as I can make it without mechanical help.\""; next; diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index f6d9c8a8..da41c63a 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -31,6 +31,8 @@ set @MOUBOO_FIGURINE, 728; set @BUGLEG, 518; + set @mexp, MAGIC_EXPERIENCE & 65535; + set @Q_STATUS_INITIAL, 0; set @Q_STATUS_POSTINTRO, 1; set @Q_STATUS_INITIATION, 2; // quest for being able to cast `create mouboo figurine' @@ -1007,7 +1009,6 @@ LL_initiation_check: if (!(countitem(@MOUBOO_FIGURINE))) goto L_main_menu; delitem @MOUBOO_FIGURINE, 1; - set @mexp, MAGIC_EXPERIENCE & 65535; mes "[Auldsbel the Wizard]"; mes "Auldsbel inspects your figurine."; @@ -1040,11 +1041,12 @@ LL_initiation_check: callsub S_update_var; getexp 5000, 0; if (getskilllv(SKILL_MAGIC_TRANSMUTE) < 2) - skill SKILL_MAGIC_TRANSMUTE, 2; + setskill SKILL_MAGIC_TRANSMUTE, 2; next; goto L_main_menu; LL_student_start: + if (@mexp < 200) goto LL_notready; mes "[Auldsbel the Wizard]"; mes "\"Next, I shall teach you a higher-level transmutation spell.\""; if (getskilllv(SKILL_MAGIC) < 2) diff --git a/npc/013-1_Woodland_hills/sagatha.txt b/npc/013-1_Woodland_hills/sagatha.txt index 222c1aa1..6165709c 100644 --- a/npc/013-1_Woodland_hills/sagatha.txt +++ b/npc/013-1_Woodland_hills/sagatha.txt @@ -49,7 +49,7 @@ function script SagathaStatus { if (@mouboo == 1) set @evil, 1; - if (MAGIC_FLAGS & FLAG_DID_CUTTREE) + if (MAGIC_FLAGS & MFLAG_DID_CUTTREE) set @evil, 1; set @druid, (((QUEST_MAGIC & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) & 12) >> 2; @@ -186,7 +186,7 @@ L_teach_initial: callsub S_update_var; getexp 5000, 0; if (getskilllv(SKILL_MAGIC_ETHER) < 2) - skill SKILL_MAGIC_ETHER, 2; + setskill SKILL_MAGIC_ETHER, 2; next; mes "[Sagatha the Witch]"; @@ -258,21 +258,18 @@ L_teach_A10: next; mes "[Sagatha the Witch]"; mes "\"Then say '" + getspellinvocation("barrier") + "' and let the musroom's power take over.\""; - next; goto L_practice; L_teach_A11: if (@mexp < 350) goto L_teach_noexp; mes "[Sagatha the Witch]"; mes "\"If you must fight, call allies. You can call scorpions with a scorpion stinger. Hold up the stinger and call out to them: '" + getspellinvocation("summon-scorps") + "'.\""; - next; goto L_practice; L_teach_A12: if (@mexp < 450) goto L_teach_noexp; mes "[Sagatha the Witch]"; mes "\"You can call red scorpions, too. But for them you must call out '" + getspellinvocation("summon-red-scorps") + "' instead.\""; - next; goto L_practice; L_teach_N11: @@ -282,7 +279,6 @@ L_teach_N11: next; mes "[Sagatha the Witch]"; mes "\"Or call it into someone else's skin, by saying that someone's name right after the '" + getspellinvocation("protect") + "'.\""; - next; goto L_practice; L_teach_noexp: diff --git a/npc/013-2_Magic_house/wizard.txt b/npc/013-2_Magic_house/wizard.txt index 3abb0bb3..d1e18f00 100644 --- a/npc/013-2_Magic_house/wizard.txt +++ b/npc/013-2_Magic_house/wizard.txt @@ -42,6 +42,7 @@ nothx: L_new_student: mes "[Old Wizard]"; mes "\"Studying is always an excellent use of one's mind! I fear that I can't offer too much assistance to you, however. But if you are interested, I could perhaps teach you a simple spell?\""; + next; menu "That would be very kind of you!", -, diff --git a/npc/015-1_Woodland/sword.txt b/npc/015-1_Woodland/sword.txt index 5713656b..0128d819 100644 --- a/npc/015-1_Woodland/sword.txt +++ b/npc/015-1_Woodland/sword.txt @@ -204,13 +204,13 @@ L_Levelup2_yes: mes "[Mystic Sword]"; mes "The sword begins to chant in your head!"; - mes " \"Lords of Thunder, Fire, Rage!\""; - mes " \"Grant thy powers to this mage,\""; - mes " \"Rising with thy dreadful roar,\""; + mes "\"Lords of Thunder, Fire, Rage!\""; + mes "\"Grant thy powers to this mage,\""; + mes "\"Rising with thy dreadful roar,\""; if (Sex) - mes " \"Answer to his call to War!\""; + mes "\"Answer to his call to War!\""; if (!Sex) - mes " \"Answer to her call to War!\""; + mes "\"Answer to her call to War!\""; next; mes "[Mystic Sword]"; @@ -227,11 +227,11 @@ L_Levelup2_yes: callsub S_update_var; getexp 5000, 0; if (getskilllv(SKILL_MAGIC_WAR) < 2) - skill SKILL_MAGIC_WAR, 2; + setskill SKILL_MAGIC_WAR, 2; next; mes "[Mystic Sword]"; - mes "\"Thou hast now taken thy first true step down the path of war magic. Seek out my brother for thy next spell!\""; + mes "\"Thou hast now taken thy first true step down the path of war magic.\""; next; goto L_Farewell; @@ -266,18 +266,18 @@ L_L2_W12: "Yes.", -; mes "[Mystic Sword]"; - mes "\"Very well. I shall teach thee another spell, if thou provest thy progress by sacrificing another one thousand monster points.\""; + mes "\"Very well. I shall teach thee another spell, if thou provest thy progress by sacrificing another five thousand monster points.\""; next; menu "No, I don't want that.", L_farewell, - "I agree.", -; + "So be it.", -; - if (Mobpt < 1000) goto L_lacking_mobpoints; + if (Mobpt < 5000) goto L_lacking_mobpoints; mes "[Mystic Sword]"; mes "\"Indeed thou art worthy. The next spell I shall teach thee will enchant thy knuckles to turn them into powerful weapons; the component is a mere beer.\""; mes "[1000 experience points]"; - set Mobpt, Mobpt - 1000; + set Mobpt, Mobpt - 5000; getexp 1000, 0; set @Q_status, @Q_status + 2; callsub S_update_var; @@ -304,7 +304,7 @@ L_L2_W10: next; mes "[Mystic Sword]"; - mes "\"For this spell, I ask that thou bringest a lump of iron ore. Thou must also sacrifice five thousand monster points.\""; + mes "\"For this spell, I ask that thou bringest a lump of iron ore. Thou must also sacrifice ten thousand monster points.\""; next; menu @@ -313,13 +313,13 @@ L_L2_W10: if (countitem(@ORE) < 1) goto L_no_ore; - if (MPQUEST && (Mobpt < 5000)) goto L_lacking_mobpoints; + if (MPQUEST && (Mobpt < 10000)) goto L_lacking_mobpoints; mes "[Mystic Sword]"; mes "\"Raise up the ore, mortal!\""; mes "As you do so, the ore begins to crumble, leaving only iron powder behind."; mes "[1000 experience points]"; - set Mobpt, Mobpt - 5000; + set Mobpt, Mobpt - 10000; getexp 1000, 0; delitem @ORE, 1; getitem @IRONPOWDER, 5; @@ -330,7 +330,13 @@ L_L2_W10: mes "[Mystic Sword]"; mes "\"This powder thou shalst need to cast the lightning spell. Throw it up into the air and shout '" + getspellinvocation("lightning-strike") + "', and smite thine enemies with lightning.\""; next; + goto L_farewell; +L_no_ore: + mes "[Mystic Sword]"; + mes "\"Thou dost appear to lack ore. We cannot continue; please fare well and return swiftly!\""; + next; + close; L_farewell: mes "[Mystic Sword]"; -- cgit v1.2.3-60-g2f50 From 056fc24010643c76e5c97e24f09c095d7b36caca Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 11 Jan 2009 17:47:07 -0700 Subject: Improvements to Elanore's description of the enchant-lifestone spell --- npc/001-1_Tulimshar/elanore.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index bd601104..a303af19 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -206,10 +206,21 @@ L_Lifestones_Trade_Missing: 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!\""; + goto L_Lifestones_MakeSelf_no; + next; + close; + +L_Lifestones_MakeSelf_yes: + 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.\""; + next; + mes "[Elanore the Healer]"; + mes "\"You will have to make sure that your powers are pure, though, either by wearing a white robe or some other special magical item that does this for you.\""; + next; + close; + +L_Lifestones_MakeSelf_no: + 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; -- cgit v1.2.3-60-g2f50 From 4e98d4621f225766abb32d30ab6cea8d2739a419 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Fri, 23 Jan 2009 16:52:05 +0000 Subject: Start converting scripts over to "ItemName" Instead of using the item number. A few small bug fixes are also here. --- db/item_db.txt | 4 +-- npc/001-1_Tulimshar/elanore.txt | 42 +++++++++++----------------- npc/001-1_Tulimshar/guide.txt | 2 +- npc/001-1_Tulimshar/rewards_master.txt | 8 +++--- npc/001-1_Tulimshar/sandra.txt | 14 +++++----- npc/001-1_Tulimshar/vincent.txt | 4 +-- npc/001-2_Tulimshar/casino.txt | 14 +++++----- npc/001-2_Tulimshar/troupe_leader.txt | 2 +- npc/002-1_Sandstorm/_import.txt | 1 - npc/002-1_Sandstorm/dark_mage.txt | 48 -------------------------------- npc/002-4_Desert_mines/chest.txt | 8 +++--- npc/005-1_Snake_desert/spirit.txt | 6 ++-- npc/005-1_Snake_desert/tree.txt | 9 +++--- npc/006-1_Desert_mountains/pachua.txt | 39 ++++++++++++-------------- npc/008-1_Hurnscald_outskirts/hinnak.txt | 16 ++++------- npc/013-3_Cave/sword_chest.txt | 8 +++--- npc/functions/slot_machine.txt | 6 ++-- npc/items/purification_potion.txt | 14 +++------- 18 files changed, 86 insertions(+), 159 deletions(-) delete mode 100644 npc/002-1_Sandstorm/dark_mage.txt (limited to 'npc/001-1_Tulimshar') diff --git a/db/item_db.txt b/db/item_db.txt index d57758f9..dbf42473 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -39,7 +39,7 @@ 537, TreasureKey, Treasure Key, 3, 100, 50, 5, , , , , , , , , , , , {}, {} 538, GreenPresentBox, Green Present Box, 0, 20, 10, 10, , , , , , 10477567, 2, , , 0, , {}, {} 539, Beer, Beer, 0, 175, 87, 10, , , , , , 10477567, 2, , , 0, , { itemheal 200,0; }, {} -540, Empty Bottle, Empty Bottle, 3, 20, 10, 10, , , , , , , , , , , , {}, {} +540, EmptyBottle, Empty Bottle, 3, 20, 10, 10, , , , , , , , , , , , {}, {} 541, BottleOfWater, Bottle of Water, 0, 200, 100, 10, , , , , , 10477567, 2, , , 0, , { itemheal 250,0; getitem 540,1; }, {} 542, BottleOfSand, Bottle of Sand, 3, 70, 35, 10, , , , , , , , , , , , {}, {} 543, StandardHeadband, Standard Headband, 5, 800, 400, 10, , 3, , -3, 0, 10477567, 2, 256, , 0, 0, {}, {} @@ -222,7 +222,7 @@ 730, Lifestone, Lifestone, 3, 0, 0, 1, , , , , , , , , , , , {}, {} 731, AssassinPants, Assassin Pants, 5, 10000, 3000, 10, , 5, , -5, 0, 10477567, 2, 1, , 0, 0, {}, {} 732, DruidTreeBranch, Druid Tree Branch, 3, 0, 0, 2, , , , , , 10477567, , , , , , {}, {} -733, PurificationPotion, Purification Potion, 0, 0, 0, 5, , , , , , 10477567, 2, , , , , { callfunc "PurificationPotion"; }, {} +733, PurificationPotion, Purification Potion, 0, 0, 0, 5, , , , , , 10477567, 2, , , , , { callfunc "usePurificationPotion"; }, {} 734, BlackBoots, Black Boots, 5, 20000, 3000, 35, , 4, , -10, 0, 10477567, 2, 64, , 0, 0, {}, {} 735, WhiteCottonBoots, White Cotton Boots, 5, 2000, 500, 10, , 1, , 1, 0, 10477567, 2, 64, , 0, 0, {}, {} 736, WhiteCake, WhiteCake, 0, 500, 100, 10, , , , , , 10477567, 2, , , 0, , { itemheal 10,0; }, {} diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index a303af19..5179760b 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -10,14 +10,6 @@ set @Q_status, (QUEST_MAGIC2 & @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; @@ -161,22 +153,22 @@ L_Lifestones: 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; + if (countitem("MauveHerb") < 10) goto L_Lifestones_Trade_Missing; + if (countitem("GambogeHerb") < 10) goto L_Lifestones_Trade_Missing; + if (countitem("AlizarinHerb") < 10) goto L_Lifestones_Trade_Missing; + if (countitem("CobaltHerb") < 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; + if (@inventorylist_count == 100 && countitem("Lifestone") == 0 + && countitem("MauveHerb") > 10 + && countitem("GambogeHerb") > 10 + && countitem("AlizarinHerb") > 10 + && countitem("CobaltHerb") > 10) goto L_Lifestones_NoRoom; + + delitem "MauveHerb", 10; + delitem "GambogeHerb", 10; + delitem "AlizarinHerb", 10; + delitem "CobaltHerb", 10; + getitem "LifeStone", 5; getexp 200, 1; mes "[Elanore the Healer]"; mes "Elanore carefully goes over your leaves, then smiles."; @@ -262,10 +254,10 @@ L_Teach_Initial: next; getinventorylist; - if ((@inventorylist_count == 100) && (countitem(@LIFESTONE) == 0)) + if ((@inventorylist_count == 100) && (countitem("LifeStone") == 0)) goto L_Teach_Initial_Noroom; - getitem @LIFESTONE, 1; + getitem "LifeStone", 1; set @Q_status, @STATUS_LEARNED_LIGHT_HEAL; callsub S_update_var; diff --git a/npc/001-1_Tulimshar/guide.txt b/npc/001-1_Tulimshar/guide.txt index d4367616..30a9cb51 100644 --- a/npc/001-1_Tulimshar/guide.txt +++ b/npc/001-1_Tulimshar/guide.txt @@ -153,7 +153,7 @@ S_Grad: mes "[Ian the Guide]"; mes "\"Hey, you've been doing good, let me give you this.\""; - getitem 675, 1; + getitem "GraduationCap", 1; set TUT_var, TUT_var | 2; next; diff --git a/npc/001-1_Tulimshar/rewards_master.txt b/npc/001-1_Tulimshar/rewards_master.txt index 657b82f4..cc64da8c 100644 --- a/npc/001-1_Tulimshar/rewards_master.txt +++ b/npc/001-1_Tulimshar/rewards_master.txt @@ -5,7 +5,7 @@ if (tvis == 0) set tvis, 1; if (Mobpt < tvis) goto L_NotEnough; - setarray @Items, 502, 502, 503, 504, 505, 506, 507, 508, 509, 510, 586, 512, 513, 514, 515, 516, 517, 518, 519, 520; + setarray @Items$, "CactusPotion", "CactusPotion", "CasinoCoins", "DecorCandy", "MaggotSlime", "CandyCane", "ScorpionStinger", "XmasCake", "ChocolateBar", "Candy", "GingerBreadMan", "Cake", "XmasCandyCane", "PurplePresentBox", "BluePresentBox", "RedScorpionStinger", "BugLeg", "CherryCake", "EasterEgg", "CottonShirt", "CottonShorts"; mes "[Ishi the Rewards Master]"; mes "\"Welcome! I see you have " + Mobpt + " Monster Points. Would you like to exchange some of those for items?\""; @@ -79,11 +79,11 @@ L_Menu_Done: SUB_give_item: set Mobpt, Mobpt - tvis; set tvis, tvis + 1; - set @ID, @Items[rand(getarraysize(@Items))]; + set @item$, @Items$[rand(getarraysize(@Items$))]; - getitem @ID, 1; + getitem @item$, 1; - mes "You received one " + getitemname(@ID) + "!"; + mes "You received one " + getitemname(@item$) + "!"; return; } diff --git a/npc/001-1_Tulimshar/sandra.txt b/npc/001-1_Tulimshar/sandra.txt index 314e009a..e1e2f652 100644 --- a/npc/001-1_Tulimshar/sandra.txt +++ b/npc/001-1_Tulimshar/sandra.txt @@ -70,17 +70,17 @@ L_Set: close; L_Progress: - if (countitem(507) < 5) goto L_NotEnough; - if (countitem(517) < 1) goto L_NotEnough; + if (countitem("ScorpionStinger") < 5) goto L_NotEnough; + if (countitem("RedScorpionStinger") < 1) goto L_NotEnough; mes "[Sandra]"; mes "\"Excellent!"; mes "You brought me 5 [Scorpion Stingers] and 1 [Red Scoprion Stinger]!\""; getinventorylist; - if ((@inventorylist_count - (countitem(507) == 5) - (countitem(517) == 1)) > 99 - (countitem(1199) == 0)) goto L_TooMany; - delitem 507, 5; - delitem 517, 1; - getitem 1200, 1; - getitem 1199, 100; + if ((@inventorylist_count - (countitem("ScorpionStinger") == 5) - (countitem("RedScorpionStinger") == 1)) > 99 - (countitem("Arrow") == 0)) goto L_TooMany; + delitem "ScorpionStinger", 5; + delitem "RedScorpionStinger", 1; + getitem "Bow", 1; + getitem "Arrow", 100; set Scorp, 2; close; diff --git a/npc/001-1_Tulimshar/vincent.txt b/npc/001-1_Tulimshar/vincent.txt index b0412517..b8997e8f 100644 --- a/npc/001-1_Tulimshar/vincent.txt +++ b/npc/001-1_Tulimshar/vincent.txt @@ -80,13 +80,13 @@ L_Wait: close; L_Progress: - if(countitem(518) >= 30) goto L_Have; + if(countitem("BugLeg") >= 30) goto L_Have; mes "[Vincent]"; mes "\"Please help me collect 30 [Bug Legs]!\""; close; L_Have: - delitem 518, 30; + delitem "BugLeg", 30; mes "[Vincent]"; mes "\"Excellent! Finally I can complete the model!!\""; next; diff --git a/npc/001-2_Tulimshar/casino.txt b/npc/001-2_Tulimshar/casino.txt index b5da3933..079f163d 100644 --- a/npc/001-2_Tulimshar/casino.txt +++ b/npc/001-2_Tulimshar/casino.txt @@ -33,8 +33,8 @@ close; L_Begin: - if(countitem(503) < 15) goto L_NoCoin; - delitem 503, 15; + if(countitem("CasinoCoins") < 15) goto L_NoCoin; + delitem "CasinoCoins", 15; set @croupier, rand(0, 4); set @croupier, @croupier + 17; set @player, rand(4, 21); @@ -65,7 +65,7 @@ L_End: mes "\"Congratulations, you won!"; mes "I had " + @croupier + "."; mes "You get 45 casino coins.\""; - getitem 503, 45; + getitem "CasinoCoins", 45; close; L_NoCoin: @@ -129,8 +129,8 @@ L_b100: goto L_Check; L_Check: - if(countitem(503) < @bet) goto L_NoCoin; - delitem 503, @bet; + if(countitem("CasinoCoins") < @bet) goto L_NoCoin; + delitem "CasinoCoins", @bet; menu "Choose a color", -, "Choose a number", L_Number; @@ -140,7 +140,7 @@ L_Check: set @color,rand(2); if(@color == 1) goto L_Lost; mes "You won!"; - getitem 503, @bet * 2; + getitem "CasinoCoins", @bet * 2; close; L_Number: @@ -159,7 +159,7 @@ L_Number: if (@roulette < 37) mes "The ball stopped on " + @roulette; if (@number != @roulette) goto L_Lost; mes "\"You won!\""; - getitem 503, @bet * 10; + getitem "CasinoCoins", @bet * 10; close; L_NoCoin: diff --git a/npc/001-2_Tulimshar/troupe_leader.txt b/npc/001-2_Tulimshar/troupe_leader.txt index d5c8bbfd..7bace781 100644 --- a/npc/001-2_Tulimshar/troupe_leader.txt +++ b/npc/001-2_Tulimshar/troupe_leader.txt @@ -37,7 +37,7 @@ L_NohMask_Found: mes "[1500 experience points]"; getexp 1500, 0; set Inspector, 14; - getitem 678, 1; + getitem "NohMask", 1; next; mes "[Troupe Leader]"; mes "\"We don't need it anymore. We're doing different shows here.\""; diff --git a/npc/002-1_Sandstorm/_import.txt b/npc/002-1_Sandstorm/_import.txt index cb6b0a78..0066d7bd 100644 --- a/npc/002-1_Sandstorm/_import.txt +++ b/npc/002-1_Sandstorm/_import.txt @@ -1,7 +1,6 @@ map: 002-1.gat npc: npc/002-1_Sandstorm/_mobs.txt npc: npc/002-1_Sandstorm/_warps.txt -npc: npc/002-1_Sandstorm/dark_mage.txt npc: npc/002-1_Sandstorm/merchant.txt npc: npc/002-1_Sandstorm/nomads.txt npc: npc/002-1_Sandstorm/rogue.txt diff --git a/npc/002-1_Sandstorm/dark_mage.txt b/npc/002-1_Sandstorm/dark_mage.txt deleted file mode 100644 index 002b5ed9..00000000 --- a/npc/002-1_Sandstorm/dark_mage.txt +++ /dev/null @@ -1,48 +0,0 @@ -// - -// 002-1.gat,24,24,0 script SoulThief 103,{ - -// if (class == 1) goto L_Soul; -// mes "[Dark Mage]"; -// mes "\"Psss hey would you like to have more power?\""; -// next; - -// menu -// "You fool, that's not possible", -, -// "I'm listening...", L_Go; -// close; - -// L_Go: -// mes "[Dark Mage]"; -// mes "\"I can give you ancient powers that will let you become the greatest warrior in The Mana World, or the best merchant."; -// mes "But everything has got his price...\""; -// next; - -// mes "[Dark Mage]"; -// mes "\"Oh nothing important nor expensive."; -// mes "Just your soul!\""; -// next; - -// menu -// "My soul? Here it is", L_Soul, -// "I need a better explanation!", -; - -// mes "[Dark Mage]"; -// mes "Well there's a very small possibility that your player will be translated into the new server."; -// mes "I said a very, very small possibility."; -// mes "Players without a soul instead will be lost forever..."; -// mes "Come on, you won't loose that much!\""; -// next; - -// menu -// "Hmmm ok, I guess you can take it.", L_Soul, -// "Maybe I'll think about it a bit more", -; -// mes "\"I know you'll come here again when you'll get killed by a maggot, begging me to help you\""; -// close; - -// L_Soul: -// mes "[Dark Mage]"; -// mes "\"Hrhrhr, your soul is finally mine!\""; -// jobchange 1; -// close; -// } diff --git a/npc/002-4_Desert_mines/chest.txt b/npc/002-4_Desert_mines/chest.txt index e76332fd..e1825d0f 100644 --- a/npc/002-4_Desert_mines/chest.txt +++ b/npc/002-4_Desert_mines/chest.txt @@ -12,13 +12,13 @@ close; L_Yes: - if(countitem(537) < 3) goto L_Not_Enough; + if(countitem("TreasureKey") < 3) goto L_Not_Enough; getinventorylist; - if (@inventorylist_count == 100 && countitem(537) > 3) goto L_TooMany; + if (@inventorylist_count == 100 && countitem("TreasureKey") > 3) goto L_TooMany; mes "[Chest]"; mes "You opened it and found a short sword!"; - delitem 537, 3; - getitem 536, 1; + delitem "TreasureKey", 3; + getitem "ShortSword", 1; set ChestQuest, ChestQuest | 1; close; diff --git a/npc/005-1_Snake_desert/spirit.txt b/npc/005-1_Snake_desert/spirit.txt index 5ef46cbc..ad835121 100644 --- a/npc/005-1_Snake_desert/spirit.txt +++ b/npc/005-1_Snake_desert/spirit.txt @@ -15,8 +15,6 @@ L_message: set @Q_STATUS_STUDENT2, 4; set @Q_STATUS_STUDENT3, 5; - set @BRANCH, 732; - set @s$, "girl"; if (Sex) set @s$, "boy"; @@ -143,7 +141,7 @@ L_Q_magic_1: "Where was the tree again?", L_Q_tree_where, "What is that tree?", L_Q_tree_what; - if (countitem(@BRANCH) < 1) + if (countitem("DruidTreeBranch") < 1) goto L_Q_tree_none; if (!(MAGIC_FLAGS & MFLAG_DID_CUTTREE)) goto L_Q_tree_dry; @@ -151,7 +149,7 @@ L_Q_magic_1: goto L_Q_tree_nomoney; set zeny, zeny - 100000; - delitem @BRANCH, 1; + delitem "DruidTreeBranch", 1; mes "[Earth Spirit]"; mes "Following the earth sprite's instructions, you throw branch and GP into the well."; diff --git a/npc/005-1_Snake_desert/tree.txt b/npc/005-1_Snake_desert/tree.txt index 5e576cea..093cbe1e 100644 --- a/npc/005-1_Snake_desert/tree.txt +++ b/npc/005-1_Snake_desert/tree.txt @@ -95,13 +95,12 @@ L_both: close; L_givewater: - set @WATER, 541; set @BOTTLE, 540; - if (countitem(@WATER) < 1) + if (countitem("BottleOfWater") < 1) goto L_no_water; - delitem @WATER, 1; - getitem @BOTTLE, 1; + delitem "BottleOfWater", 1; + getitem "EmptyBottle", 1; mes "[Dying Tree]"; mes "You pour a bottle of water into the sand. The water dissipates quickly, without any effect."; @@ -141,7 +140,7 @@ L_do_cut: L_really_cut: set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_DID_CUTTREE; - getitem 732, 1; + getitem "DruidTreeBranch", 1; mes "[Dying Tree]"; mes "You cut off a branch from the tree."; mes "For an instant, you have an uneasy feeling, as if the branch were writhing in your hand..."; diff --git a/npc/006-1_Desert_mountains/pachua.txt b/npc/006-1_Desert_mountains/pachua.txt index 51c2d3b2..e0fcef7f 100644 --- a/npc/006-1_Desert_mountains/pachua.txt +++ b/npc/006-1_Desert_mountains/pachua.txt @@ -1,8 +1,5 @@ 006-1.gat,23,100,0 script Pachua 143,{ - set @LEATHER_PATCH, 708; - set @SNAKE_SKIN, 641; - set @LEATHER_PATCH_PRICE, 300; set @wants_leather_patch, QUEST_Forestbow_state & NIBBLE_4_MASK; @@ -19,9 +16,9 @@ next; L_Check_Shops: - if((countitem(610) > 0 && countitem(@SNAKE_SKIN) > 9) && (countitem(524) > 0 && countitem(@SNAKE_SKIN) > 1)) goto L_Super_store; - if(countitem(610) > 0 && countitem(@SNAKE_SKIN) > 9) goto L_Chaps_store; - if(countitem(524) > 0 && countitem(@SNAKE_SKIN) > 1) goto L_Cowboy_store; + if((countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) && (countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1)) goto L_Super_store; + if(countitem("JeansShorts") > 0 && countitem("SnakeSkin") > 9) goto L_Chaps_store; + if(countitem("FancyHat") > 0 && countitem("SnakeSkin") > 1) goto L_Cowboy_store; mes "[Chief Pachua]"; mes "\"Maybe if you bring me the right materials I can make something for you.\""; @@ -101,31 +98,31 @@ L_Chaps_store: L_BuyChaps: if (zeny < 10000) goto L_NoMoney; - if (countitem(610) < 1) goto L_NoJeans; - if (countitem(@SNAKE_SKIN) < 10) goto L_NoSkin; + if (countitem("JeansShorts") < 1) goto L_NoJeans; + if (countitem("SnakeSkin") < 10) goto L_NoSkin; set zeny, zeny - 10000; - delitem @SNAKE_SKIN, 10; - delitem 610, 1; - getitem 642, 1; + delitem "SnakeSkin", 10; + delitem "JeansShorts", 1; + getitem "JeansChaps", 1; goto L_DealDone; L_BuyCowboy: if (zeny < 5000) goto L_NoMoney; - if (countitem(524) < 1) goto L_NoFancy; - if (countitem(@SNAKE_SKIN) < 2) goto L_NoSkin; + if (countitem("FancyHat") < 1) goto L_NoFancy; + if (countitem("SnakeSkin") < 2) goto L_NoSkin; set zeny, zeny - 5000; - delitem @SNAKE_SKIN, 2; - delitem 524, 1; + delitem "SnakeSkin", 2; + delitem "FancyHat", 1; set @temp,rand(2); if(@temp == 0) goto L_Cowboy_white; goto L_Cowboy_black; L_Cowboy_white: - getitem 643, 1; + getitem "CowboyWhite", 1; goto L_DealDone; L_Cowboy_black: - getitem 644, 1; + getitem "CowboyBlack", 1; goto L_DealDone; L_leather_patch: @@ -137,14 +134,14 @@ L_leather_patch: "OK, I'll be back later.", L_End, "That's too expensive!.", L_NoDeal; - if (countitem(@SNAKE_SKIN) < 1) goto L_NoSkins; + if (countitem("SnakeSkin") < 1) goto L_NoSkins; if (zeny < @LEATHER_PATCH_PRICE) goto L_NoMoney; getinventorylist; - if (@inventorylist_count == 100 && countitem(@SNAKE_SKIN) > 1) goto L_TooMany; + if (@inventorylist_count == 100 && countitem("SnakeSkin") > 1) goto L_TooMany; set zeny, zeny - @LEATHER_PATCH_PRICE; - delitem @SNAKE_SKIN, 1; - getitem @LEATHER_PATCH, 1; + delitem "SnakeSkin", 1; + getitem "LeatherPatch", 1; goto L_DealDone; L_DealDone: diff --git a/npc/008-1_Hurnscald_outskirts/hinnak.txt b/npc/008-1_Hurnscald_outskirts/hinnak.txt index c2a547d4..0aa10570 100644 --- a/npc/008-1_Hurnscald_outskirts/hinnak.txt +++ b/npc/008-1_Hurnscald_outskirts/hinnak.txt @@ -56,19 +56,17 @@ L_Exchange: mes "\"Have you got the 10 antennae?\""; next; - if (countitem(614) < 10) goto L_Exchange_Notenough; - menu "Not yet, but I am working on it.", -, "Sure, here they are!", L_Exchange_Exchange; close; L_Exchange_Exchange: - if (countitem(614) < 10) goto L_Exchange_Notenough; + if (countitem("PinkAntenna") < 10) goto L_Exchange_Notenough; getinventorylist; - if (@inventorylist_count == 100) goto L_Exchange_TooMany; - delitem 614, 10; - getitem 623, 1; + if (@inventorylist_count == 100 && countitem("PinkAntenna") > 10) goto L_Exchange_TooMany; + delitem "PinkAntenna", 10; + getitem "Scythe", 1; set QUEST_Scythe_state, 2; mes "[Farmer Hinnak]"; mes "\"Thank you very much. I've got something for you. My old scythe. Maybe you can use it as a weapon. It is a bit cumbersome but its strikes are deadly.\""; @@ -88,8 +86,6 @@ L_ThanksAgain: mes "[Farmer Hinnak]"; mes "\"Good to see you again, and thanks again for helping me with the pinkies!\""; - set @BEER, 539; - next; menu @@ -115,8 +111,8 @@ L_ThanksAgain: "I don't have any.", L_NoBeer; L_GiveBeer: - if (countitem(@BEER) < 1) goto L_NoBeer; - delitem @BEER, 1; + if (countitem("Beer") < 1) 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!\""; diff --git a/npc/013-3_Cave/sword_chest.txt b/npc/013-3_Cave/sword_chest.txt index c570bfcd..5d2c97b7 100644 --- a/npc/013-3_Cave/sword_chest.txt +++ b/npc/013-3_Cave/sword_chest.txt @@ -12,11 +12,11 @@ close; L_Yes: - if(countitem(537) < 10) goto L_Not_Enough; + if(countitem("TreasureKey") < 10) goto L_Not_Enough; getinventorylist; - if (@inventorylist_count == 100 && countitem(537) > 10) goto L_TooMany; - delitem 537, 10; - getitem 536, 1; + if (@inventorylist_count == 100 && countitem("TreasureKey") > 10) goto L_TooMany; + delitem "TreasureKey", 10; + getitem "ShortSword", 1; mes "[Chest]"; mes "You opened it and found a short sword!"; set ChestQuest, ChestQuest | 2; diff --git a/npc/functions/slot_machine.txt b/npc/functions/slot_machine.txt index 024a2e8a..8f4482cc 100644 --- a/npc/functions/slot_machine.txt +++ b/npc/functions/slot_machine.txt @@ -9,8 +9,8 @@ function script SlotMachine { close; L_Play: - if(countitem(503) < 1) goto L_NoCoin; - delitem 503, 1; + if(countitem("CasinoCoins") < 1) goto L_NoCoin; + delitem "CasinoCoins", 1; set @Temp1,rand(7); set @Temp2,rand(7); set @Temp3,rand(7); @@ -22,7 +22,7 @@ L_Play: if(@Temp1 != @Temp3) goto L_Lost; mes "Congratulations! You won!"; mes "You get 10 casino coins"; - getitem 503, 10; + getitem "CasinoCoins", 10; close; L_Lost: diff --git a/npc/items/purification_potion.txt b/npc/items/purification_potion.txt index 9f3c7e5e..85b07010 100644 --- a/npc/items/purification_potion.txt +++ b/npc/items/purification_potion.txt @@ -1,15 +1,13 @@ -// - -function script PurificationPotion { - set @PURIFICATIONPOTION, 733; +// THis is the function to use the PurificationPotion +function script usePurificationPotion { if (isat("011-1.gat", 88,67)) goto L_Wyara_Pond; L_NoUse: message strcharinfo(0), "You don't know what to do with this."; - getitem @PURIFICATIONPOTION, 1; - close; + getitem "PurificationPotion", 1; + return; L_Wyara_Pond: set @Q_MASK, NIBBLE_2_MASK; @@ -29,8 +27,4 @@ L_Wyara_Pond: (QUEST_MAGIC2 & ~(@Q_MASK) | (@Q_status << @Q_SHIFT)); return; - -L_NoUse: - message strcharinfo(0), "You don't know what to do with this."; - return; } -- cgit v1.2.3-60-g2f50 From 60f058e32d8197572cb847dd4202fa9609e43904 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 25 Jan 2009 17:28:22 +0000 Subject: Fix a bug in Elanore's dialog --- npc/001-1_Tulimshar/elanore.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 5179760b..bc565fb2 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -200,8 +200,6 @@ L_Lifestones_MakeSelf: mes "[Elanore the Healer]"; if (@has_magic < 2) goto L_Lifestones_MakeSelf_no; - next; - close; L_Lifestones_MakeSelf_yes: 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.\""; -- cgit v1.2.3-60-g2f50 From be353ed4ca60438bee73a59711eef109139abe08 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 26 Jan 2009 19:10:02 +0000 Subject: Make Elanore glow with detect-magic --- npc/001-1_Tulimshar/elanore.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'npc/001-1_Tulimshar') diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index bc565fb2..62e664b1 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -1,6 +1,6 @@ // -001-1.gat,58,68,0 script Elanore 108,{ +001-1.gat,58,68,0 script Elanore#_M 108,{ set @has_magic, getskilllv(SKILL_MAGIC); -- cgit v1.2.3-60-g2f50 From c7283150f0b331508b62262be149d91ccf5f0fce Mon Sep 17 00:00:00 2001 From: Fate Date: Thu, 29 Jan 2009 15:46:14 -0700 Subject: Fixed lay-on-hands to require life magic level 2 --- conf/magic.conf.template | 1 + npc/001-1_Tulimshar/bard.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf.template b/conf/magic.conf.template index 2f475aa5..69b6c019 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -426,6 +426,7 @@ SPELL lay-on-hands (target : STRING) : "#L10" = IN (MANA 10, CASTTIME 500, REQUIRE hp(caster) > max_hp(caster) / 20, REQUIRE skill(caster, MAGIC) > level, + REQUIRE skill(caster, school) > level, REQUIRE if_then_else(failed(pc(target)), 1, (rdistance(location(caster), location(pc(target))) < 2 + (spellpower / 50)) diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index 8b416ec5..3aa33668 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -4,7 +4,7 @@ setarray @songs$, "\"There once was a bard, who had it hard, because a man in dark green, was very mean.\"", "\"At Hurnscald inn, there was a person of fairest skin, declining wedding bands from quite a many hands.\"", "\"As the Sun sets down in the forest's brown, she whom the fragrance holds counts her gold.\""; - set @name$, "Bill Ballshaker the Bard"; + set @name$, "Bill Ballshaker the Bardフェイト"; mes "[" + @name$ + "]"; if (Sex) mes "\"Greetings, traveler! Have you come to listen to my stories?\""; -- cgit v1.2.3-60-g2f50 From aaf35991589f4d2dc1c23a91c1859b646bfec007 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 31 Jan 2009 10:09:07 -0700 Subject: Made levelling up in life magic practical. --- conf/magic.conf.template | 4 ++-- npc/001-1_Tulimshar/elanore.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf.template b/conf/magic.conf.template index f1690473..092402a6 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -63,10 +63,10 @@ PROCEDURE sfx_generic(target) = PROCEDURE set_var(name, mask, shift, value) = set_script_variable(caster, name, script_int(caster, name) & (neg (mask << shift)) | ((value & mask) << shift)); -PROCEDURE gain_heal_xp(value, gain) = # `gain' influences the likelihood of an increase +PROCEDURE gain_heal_xp(value, gain) = # `value' influences the likelihood of an increase last_heal_xp = (script_int(caster, SCRIPT_XP) >> SCRIPT_HEALSPELL_SHIFT) & SCRIPT_HEALSPELL_MASK; IF (target <> caster - && value > (20 + last_heal_xp + random(last_heal_xp + 1) + random(last_heal_xp + 1))) + && value > (10 + last_heal_xp + random(last_heal_xp + 1) + random(last_heal_xp + 1))) THEN ( heal_xp = last_heal_xp + gain; IF (heal_xp > SCRIPT_HEALSPELL_MASK) diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 62e664b1..0c56ecf7 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -272,7 +272,7 @@ L_Teach_Initial_Noroom: L_Teach_CheckAdvanceTo2: mes "[Elanore the Healer]"; - if (@Q_heal_exp < 30) + if (@Q_heal_exp < 20) goto L_Teach_CheckAdvanceTo2_fail; mes "Elanore smiles at you."; mes "\"From what I have been hearing, you seem to be doing well on your way to becoming a healer. I have decided to accept you as a student of the School of Life Magic.\""; @@ -313,9 +313,9 @@ L_Teach_CheckAdvanceTo2_fail: mes "\"I think I would like to observe you for a little longer to see if you would make a good healer.\""; if (@Q_heal_exp < 5) mes "\"You are still at the beginning of your path, but do keep practicing.\""; - if ((@Q_heal_exp >= 5) && (@Q_heal_exp < 20)) + if ((@Q_heal_exp >= 5) && (@Q_heal_exp < 15)) mes "\"You are making progress, but you still need more practice.\""; - if (@Q_heal_exp >= 20) + if (@Q_heal_exp >= 15) mes "\"You have made good progress, but please do continue in your efforts.\""; close; -- cgit v1.2.3-60-g2f50 From 9165019f4b67526f2d52e89e2201ccfbc55b6c87 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 31 Jan 2009 10:34:50 -0700 Subject: Ian now points players to the bard for magic --- npc/001-1_Tulimshar/guide.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'npc/001-1_Tulimshar') diff --git a/npc/001-1_Tulimshar/guide.txt b/npc/001-1_Tulimshar/guide.txt index 30a9cb51..d53c43a8 100644 --- a/npc/001-1_Tulimshar/guide.txt +++ b/npc/001-1_Tulimshar/guide.txt @@ -128,7 +128,7 @@ L_Stats: L_Magic: mes "[Ian the Guide]"; mes "\"In decades past, there was a Mana Seed south of Tulimshar, from which people could draw magical energies. Unfortunately, the seed is gone."; - mes "Until we find a new Mana Seed, there will be no magic, except for those who already possess magical powers.\""; + mes "However, I've overheard the bard mentioning something about this recently... if you are interested in magic, try talking to him!\""; next; goto L_Menu_A; -- cgit v1.2.3-60-g2f50 From 0b8359405a742e4b409b12009089260d8df0fe21 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Tue, 3 Feb 2009 08:13:22 +0000 Subject: Remove extra characters from bard's name --- npc/001-1_Tulimshar/bard.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'npc/001-1_Tulimshar') diff --git a/npc/001-1_Tulimshar/bard.txt b/npc/001-1_Tulimshar/bard.txt index 3aa33668..8b416ec5 100644 --- a/npc/001-1_Tulimshar/bard.txt +++ b/npc/001-1_Tulimshar/bard.txt @@ -4,7 +4,7 @@ setarray @songs$, "\"There once was a bard, who had it hard, because a man in dark green, was very mean.\"", "\"At Hurnscald inn, there was a person of fairest skin, declining wedding bands from quite a many hands.\"", "\"As the Sun sets down in the forest's brown, she whom the fragrance holds counts her gold.\""; - set @name$, "Bill Ballshaker the Bardフェイト"; + set @name$, "Bill Ballshaker the Bard"; mes "[" + @name$ + "]"; if (Sex) mes "\"Greetings, traveler! Have you come to listen to my stories?\""; -- cgit v1.2.3-60-g2f50 From 967dd2d8e80a559883152a1d0377801d418a554f Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 16 May 2009 13:55:26 +0000 Subject: Elanore and the Doctor can now heal poisoning. Also added sc_poison constant to db/const.txt. --- db/const.txt | 2 ++ npc/001-1_Tulimshar/elanore.txt | 13 +++++++++++++ npc/009-2_Hurnscald/doctor.txt | 20 ++++++++++++++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) (limited to 'npc/001-1_Tulimshar') diff --git a/db/const.txt b/db/const.txt index c5d06c7a..b3895c97 100644 --- a/db/const.txt +++ b/db/const.txt @@ -151,6 +151,8 @@ cOrange 7 cPurple 8 cDarkGreen 9 +sc_poison 132 + NIBBLE_0_SHIFT 0 NIBBLE_0_MASK 15 diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index f75e154b..f0781924 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -15,6 +15,8 @@ set @STATUS_MASTERED_LIGHT_HEAL, 2; set @STATUS_LEARNED_LAY_ON_HANDS, 3; + if (sc_check(sc_poison)) + goto L_CurePoison; if (baselevel > 10) goto L_NoHeal; @@ -416,6 +418,17 @@ L_Q_auldsbel: goto L_Main; +L_CurePoison: + mes "[Elanore the Healer]"; + mes "\"Oh dear! That looks like poison; hang on...\""; + mes "She performs a complicated gesture."; + sc_end(sc_poison); + next; + + mes "[Elanore the Healer]"; + mes "\"There you are, right as rain! Now you take care, all right?\""; + close; + S_update_var: set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) diff --git a/npc/009-2_Hurnscald/doctor.txt b/npc/009-2_Hurnscald/doctor.txt index 2d7c2602..84cf97de 100644 --- a/npc/009-2_Hurnscald/doctor.txt +++ b/npc/009-2_Hurnscald/doctor.txt @@ -24,9 +24,25 @@ L_Cure: mes "[Doctor]"; - mes "\"That is impossible. Status ailments aren't ingame yet!\""; + if (sc_check(sc_poison)) + goto L_CurePoison; + mes "The doctor examines you briefly."; + mes "\"Nonsense! You look fine and dandy to me. All you need is a bit more exercise and fresh fruit in your diet!\""; close; +L_CurePoison: + mes "\"Well, well, well! Look at all those green bubbles coming out of your head; that looks like poisoning to me! Did you eat something rotten?\""; + next; + mes "[Doctor]"; + mes "The doctor pulls out a syringe and fills it with a white liquid from a jar on his desk."; + mes "\"Now hold still, this won't hurt a bit...\""; + next; + mes "[Doctor]"; + sc_end(sc_poison); + mes "*Ouch!*"; + mes "\"Next time, be more careful! Make sure to cook any meats before you eat them, and don't eat fish once it starts to smell.\""; + close; + L_Axe: mes "[Doctor]"; mes "\"Oh my, what happened to you?\""; @@ -56,7 +72,7 @@ L_Eyepatch_GlassEye: next; mes "[Doctor]"; - mes "\"I can't seem to find where I put that box. YOu should come back later, I may have found them by then.\""; + mes "\"I can't seem to find where I put that box. You should come back later, I may have found them by then.\""; next; close; -- cgit v1.2.3-60-g2f50 From f10165d86c7697b90a1edb3c4b99844ed47cb39f Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 24 May 2009 15:35:45 +0000 Subject: Added magic level 3 quests for Aulsbel and Elanore. Also added appropriate quest items and extended magic debug functionality as needed. --- conf/magic.conf.template | 29 ++- db/const.txt | 2 + db/item_db.txt | 3 + npc/001-1_Tulimshar/elanore.txt | 166 +++++++++++++++- npc/001-2_Tulimshar/omar.txt | 339 ++++++++++++++++++++++++++++++++ npc/010-2_Dimonds_Cove/_import.txt | 1 + npc/010-2_Dimonds_Cove/chef.txt | 111 +++++++++++ npc/010-2_Dimonds_Cove/dimonds.txt | 5 - npc/011-1_Woodland/auldsbel.txt | 95 ++++++++- npc/012-3_Cave/mana-seed.txt | 2 +- npc/018-2_Woodland_mining_camp/caul.txt | 337 ++++++++++++++++++++++++++----- npc/021-2_Tulimshar/bakery.txt | 84 ++++++++ npc/024-1_Tulimshar_Canyon/ched.txt | 22 ++- 13 files changed, 1134 insertions(+), 62 deletions(-) create mode 100644 npc/010-2_Dimonds_Cove/chef.txt (limited to 'npc/001-1_Tulimshar') 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]"; -- cgit v1.2.3-60-g2f50 From e2338c522a4eb22c431e23d181bde27b0849d668 Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 24 May 2009 16:08:53 +0000 Subject: Added #L20, the cure-poison spell, and made Elanore explain it. --- conf/magic.conf.template | 20 ++++++++++++++++++++ npc/001-1_Tulimshar/elanore.txt | 25 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+) (limited to 'npc/001-1_Tulimshar') diff --git a/conf/magic.conf.template b/conf/magic.conf.template index 48a685f4..8c5ac05d 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -23,6 +23,7 @@ CONST ELT_GHOST = 8 CONST ELT_UNDEAD = 9 # Schools of magic +CONST SC_POISON = 132 CONST SC_SHEARED = 194 # This is the same as SC_HIDE, since mobs can't hide and shearing is only used for mobs. Feel free to fix! CONST SC_HIDE = 194 CONST SC_HALT_REGENERATE = 195 @@ -935,6 +936,25 @@ SPELL hide (target : PC) : "#A13" = # Level 2 spells #-------------------------------------------------------------------------------- +SPELL cure-poison (target : PC) : "#L20" = + LET level = 2 + school = LIFE + IN (MANA 15, CASTTIME 1000, + REQUIRE skill(caster, MAGIC) > level, + REQUIRE skill(caster, school) > level, + REQUIRE (rdistance(location(caster), + location(pc(target))) < 1 + (spellpower / 60)), + COMPONENTS ["GambogeHerb"]) + => EFFECT CALL adjust_spellpower(school); + CALL default_effect(); + IF (running_status_update (target, SC_POISON)) + THEN (CALL gain_heal_xp(40, 1, 2, 2); + stop_status_change (target, SC_POISON); + CALL gain_xp(2); + IF caster <> target + THEN sfx(target, SFX_HEAL, 0);); + + SPELL fire-ball : "#W22" = LET level = 2 school = WAR diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 1402f044..a2afb2d3 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -16,6 +16,7 @@ set @STATUS_LEARNED_LAY_ON_HANDS, 3; set @STATUS_WAITING_FOR_KADIYA, 4; set @STATUS_READY_TO_LEARN_CURE_POISON, 5; + set @STATUS_LEARNED_CURE_POISON, 6; if (sc_check(sc_poison)) goto L_CurePoison; @@ -228,6 +229,7 @@ L_Teach: 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; + if (@Q_status == @STATUS_LEARNED_CURE_POISON) goto L_Teach_dunno; 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.\""; @@ -502,6 +504,29 @@ L_Teach_AdvanceTo3Ready: goto L_Main; L_Teach_CurePosion: + mes "[Elanore the Healer]"; + mes "\"Thank you again for your help with Kadiya!\""; + mes "\"Curing sicknesses is often quite difficult; most of them require complicated potions to be brewed.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Fortunately, things are much easier with most poisons. For those we have a simple spell that only requires a Gamboge leaf.\""; + mes "\"This is the next spell that I would like to teach you.\""; + next; + mes "[Elanore the Healer]"; + mes "\"If you would like to cure someone who is poisoned, first rub a Gamboge leaf between your hands. Your hands must be covered in Gamboge liquid for this to work.\""; + mes "\"Speak the invocation, `" + getspellinvocation("cure-poison") + "'.\""; + mes "\"Next, you either touch the poisoned person with your hands, or speak their name. You have to be close for this to work, though.\""; + next; + mes "[Elanore the Healer]"; + mes "\"Once again, the invocation is `" + getspellinvocation("cure-poison") + "'.\""; + mes "\"Come back again soon; there is another spell I would like to teach you.\""; + next; + set @Q_status, @STATUS_LEARNED_CURE_POISON; + callsub S_update_var; + + goto L_Main; + +L_Teach_dunno: mes "[Elanore the Healer]"; mes "\"Hmm. I wanted to teach you something, but I've forgotten what it was... please come back later.\""; next; -- cgit v1.2.3-60-g2f50