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/012-1_Woodland_Hills/injured-mouboo.txt | 228 ++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 npc/012-1_Woodland_Hills/injured-mouboo.txt (limited to 'npc/012-1_Woodland_Hills/injured-mouboo.txt') diff --git a/npc/012-1_Woodland_Hills/injured-mouboo.txt b/npc/012-1_Woodland_Hills/injured-mouboo.txt new file mode 100644 index 00000000..d6c536f2 --- /dev/null +++ b/npc/012-1_Woodland_Hills/injured-mouboo.txt @@ -0,0 +1,228 @@ +// The following auxiliary function is used both by appropriate magic and within the regular script: + +function script QuestMoubooHeal { + set @Q_MASK, NIBBLE_2_MASK; + set @Q_SHIFT, NIBBLE_2_SHIFT; + + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + set @Q_status_upper, @Q_status & 12; + set @Q_status, @Q_status & 3; + + set @STATE_INITIAL, 0; + set @STATE_HEALED_MOUBOO, 3; + + if (@Q_status != @STATE_INITIAL) + goto L_nothing; + + set @Q_status, @STATE_HEALED_MOUBOO; + callsub S_update_var; + mes "[Injured Mouboo]"; + mes "A soft white glow surrounds the mouboo's leg, which slowly shifts back into place."; + mes "As the glow subsides, the mouboo gets up, carefully, and takes a few steps. It seems to be fully healed!"; + mes "[5000 experience points]"; + getexp 5000, 0; + next; + + 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."; + close; + +L_nothing: + mes "Your spell has no effect."; + next; + close; + +S_update_var: + set @Q_wr_status, @Q_status | @Q_status_upper; + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_wr_status << @Q_SHIFT)); + return; +} + + + +012-1.gat,57,153,0 script Mouboo 171,{ + set @Q_MASK, NIBBLE_2_MASK; + set @Q_SHIFT, NIBBLE_2_SHIFT; + + set @Q_status, (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + set @Q_status_upper, @Q_status & 12; + set @Q_status, @Q_status & 3; + + set @STATE_INITIAL, 0; + set @STATE_KILLED_MOUBOO, 1; + set @STATE_TOOK_KILL_REWARD, 2; + set @STATE_HEALED_MOUBOO, 3; + + if (@Q_status = @STATE_KILLED_MOUBOO) + goto L_dead; + if (@Q_status = @STATE_TOOK_KILL_REWARD) + goto L_took_reward; + if (@Q_status = @STATE_HEALED_MOUBOO) + goto L_healed; + + mes "[Injured Mouboo]"; + mes "You notice a mouboo lying on the ground, groaning, as if in pain."; + next; + +L_menu: + menu + "Examine the mouboo", L_examine, + "Give the mouboo something", L_give, + "Kill the mouboo", L_kill, + "Leave", -; + close; + +L_examine: + mes "[Injured Mouboo]"; + mes "Looking closer, you notice that the mouboo's left hind leg is bent in a very unnatural angle-- that seems to be the cause for its pain."; + next; + mes "[Injured Mouboo]"; + mes "You also notice that the mouboo is lying on top of what appears to be a black turtleneck sweater."; + mes "Do you want to pick up the sweater?"; + next; + menu + "Yes.", L_pickup_alive, + "No.", L_menu; + goto L_menu; + +L_pickup_alive: + mes "[Injured Mouboo]"; + mes "The Mouboo groans and pushes your hand away. It seems to be rather fond of the sweater." + next; + goto L_menu; + +L_give: + set @items_nr, 12; + setarray @items, 501, 502, 509, 527, 534, 535, 539, 541, 684, 685, 686, 687; + setarray @itemeat, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0; + + setarray @choice$, "", "", "", "", "", "", "", "", "", "", "", ""; + set @choices_nr, 0; + setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; + setarray @choice_eat, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; + + set @n, 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]; + +L_nloop_skip: + + set @n, @n+1; + 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], -; + + set @menu, @menu - 1; + set @choice = @choice_idx[@menu]; + set @choice_e = @choice_eat[@menu]; + set @verb$, "drinks"; + if (@choice_e) + set @verb$, "eats"; + + if (@choice && countitem(@choice)) + goto L_consume; + + goto L_menu; + +L_consume: + mes "[Injured Mouboo]"; + + mes "The mouboo " + @verb$ + " your " + getitemname(@choice) + "."; + delitem @choice, 1; + next; + + if (@choice == 687) + goto L_do_heal; + + + mes "[Injured Mouboo]"; + mes "Unfortunately, it seems to have had no effect."; + goto L_menu; + +L_do_heal: + callfunc "QuestMoubooHeal"; + +L_kill: + mes "[Injured Mouboo]"; + if (BaseLevel > 44) + goto L_kill_success; + mes "The mouboo deflects your attack and counterattacks!"; + mes "It misses you only barely."; + mes "Injured though it may be, this mouboo is still more than a match for you!"; + next; + goto L_menu; + +L_kill_success: + mes "After some wrestling, the mouboo succumbs to your attacks."; + mes "[100 experience points]"; + getexp 100, 0; + + set @Q_status, @STATE_KILLED_MOUBOO; + callsub S_update_var; + + next; + +L_dead: + mes "[Dead Mouboo]"; + mes "The dead mouboo is lying on top of a black T-neck sweater."; + + getinventorylist; + if (@inventorylist_count == 100) + goto L_nopickup; + + getitem 2076, 1; + mes "You pull out the sweater and stuff it into your backpack."; + + set @Q_status, @STATE_TOOK_KILL_REWARD; + callsub S_update_var; + + next; + close; + +L_took_reward: + mes "[Dead Mouboo]"; + mes "You see a dead mouboo."; + next; + close; + +L_nopickup: + mes "Unfortunately, you can't carry any more."; + next; + close; + +L_healed; + mes "[Mouboo]"; + mes "The mouboo is sleeping soundly, smiling in its dreams."; + next; + close; + +S_update_var: + set @Q_wr_status, @Q_status | @Q_status_upper; + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_wr_status << @Q_SHIFT)); + return; +} -- cgit v1.2.3-70-g09d2 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/012-1_Woodland_Hills/injured-mouboo.txt') 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-70-g09d2 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/012-1_Woodland_Hills/injured-mouboo.txt') 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-70-g09d2 From b8e9095461ffd09ec7aec7cfcbcab502ea813bab Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 24 Jan 2009 13:17:14 +0000 Subject: Finish conversion to "ItemName" Some of the more complicated scripts (bleach/dye, for example) can't be converted so easily. --- npc/012-1_Woodland_Hills/injured-mouboo.txt | 20 ++--- npc/013-2_Magic_house/apprentice.txt | 8 +- npc/013-3_Cave/barrier.txt | 2 +- npc/013-3_Cave/mask_chest.txt | 129 ++++++++++++++-------------- npc/014-1_Woodland/wedding-officiator.txt | 4 +- npc/015-1_Woodland/sword.txt | 8 +- npc/015-3/katze.txt | 46 +++++----- npc/015-3/pot.txt | 20 ++--- npc/018-2_Woodland_mining_camp/caul.txt | 65 ++++++-------- npc/019-1_Snow_field/santa_helper.txt | 20 ++--- npc/019-1_Snow_field/snowman.txt | 21 ++--- npc/020-2_Nivalis/furquest.txt | 52 +++++------ 12 files changed, 192 insertions(+), 203 deletions(-) (limited to 'npc/012-1_Woodland_Hills/injured-mouboo.txt') diff --git a/npc/012-1_Woodland_Hills/injured-mouboo.txt b/npc/012-1_Woodland_Hills/injured-mouboo.txt index c248b8e6..0c32aaf3 100644 --- a/npc/012-1_Woodland_Hills/injured-mouboo.txt +++ b/npc/012-1_Woodland_Hills/injured-mouboo.txt @@ -99,7 +99,7 @@ L_pickup_alive: L_give: set @items_nr, 12; - setarray @items, 501, 502, 509, 527, 534, 535, 539, 541, 684, 685, 686, 687; + setarray @items$, "CactusDrink", "CactusPotion", "ChocolateBar", "Milk", "OrangeCupcake", "Apple", "Beer", "BottleOfWater", "TinyHealingPotion", "SmallHealingPotion", "MediumHealingPotion", "LargeHealingPotion"; setarray @itemeat, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0; setarray @choice$, "", "", "", "", "", "", "", "", "", "", "", ""; @@ -110,13 +110,13 @@ L_give: set @n, 0; set @ct, 0; L_nloop: - set @k, @items[@n]; - if (countitem(@k) == 0) + set @k$, @items$[@n]; + if (countitem(@k$) == 0) goto L_nloop_skip; set @name$, getitemname(@k); set @choice$[@ct], @name$; - set @choice_idx[@ct], @k; + set @choice_idx$[@ct], @k$; set @choice_eat[@ct], @itemeat[@n]; set @ct, @ct + 1; @@ -140,13 +140,13 @@ L_nloop_skip: @choice$[11], -; set @menu, @menu - 1; - set @choice, @choice_idx[@menu]; + set @choice$, @choice_idx[@menu]; set @choice_e, @choice_eat[@menu]; set @verb$, "drinks"; if (@choice_e) set @verb$, "eats"; - if (@choice && countitem(@choice)) + if (@choice$ && countitem(@choice$)) goto L_consume; goto L_menu; @@ -154,11 +154,11 @@ L_nloop_skip: L_consume: mes "[Injured Mouboo]"; - mes "The mouboo " + @verb$ + " your " + getitemname(@choice) + "."; - delitem @choice, 1; + mes "The mouboo " + @verb$ + " your " + getitemname(@choice$) + "."; + delitem @choice$, 1; next; - if (@choice == 687) + if (@choice$ == "LargeHealingPotion") goto L_do_heal; @@ -198,7 +198,7 @@ L_dead: if (@inventorylist_count == 100) goto L_nopickup; - getitem 2076, 1; + getitem "BlackTNeckSweater", 1; mes "You pull out the sweater and stuff it into your backpack."; set @Q_status, @STATE_TOOK_KILL_REWARD; diff --git a/npc/013-2_Magic_house/apprentice.txt b/npc/013-2_Magic_house/apprentice.txt index abb96e6b..89c0beb7 100644 --- a/npc/013-2_Magic_house/apprentice.txt +++ b/npc/013-2_Magic_house/apprentice.txt @@ -41,9 +41,9 @@ L_Beer: L_Beer_yes: if (zeny < 175) goto L_Low_money; getinventorylist; - if (@inventorylist_count == 100 && countitem(539) == 0) goto L_TooMany; + if (@inventorylist_count == 100 && countitem("Beer") == 0) goto L_TooMany; - getitem 539, 1; + getitem "Beer", 1; set zeny, zeny - 175; goto L_Finish; @@ -64,8 +64,8 @@ L_Milk: L_Milk_yes: if (zeny < 300) goto L_Low_money; getinventorylist; - if (@inventorylist_count == 100 && countitem(527) == 0) goto L_TooMany; - getitem 527, 1; + if (@inventorylist_count == 100 && countitem("Milk") == 0) goto L_TooMany; + getitem "Milk", 1; set zeny, zeny - 300; goto L_Finish; diff --git a/npc/013-3_Cave/barrier.txt b/npc/013-3_Cave/barrier.txt index 004452f9..85a7fc72 100644 --- a/npc/013-3_Cave/barrier.txt +++ b/npc/013-3_Cave/barrier.txt @@ -13,5 +13,5 @@ L_Has_Jack_O_Soul: mes "The barrier around the opening allows you passage."; set QUEST_demon_mines, 2; - delitem 1198, 1; + delitem "JackOSoul", 1; } diff --git a/npc/013-3_Cave/mask_chest.txt b/npc/013-3_Cave/mask_chest.txt index 0da8bab9..2e292e50 100644 --- a/npc/013-3_Cave/mask_chest.txt +++ b/npc/013-3_Cave/mask_chest.txt @@ -4,80 +4,81 @@ if (QUEST_demon_mines < 2) goto L_This_shouldn_t_happen; if (QUEST_demon_mines == 3) goto L_Finished; - if (countitem(505) == 0) goto L_No_maggot_slime; - if (countitem(566) == 0) goto L_No_mushroom; - if (countitem(565) == 0) goto L_No_petal; + if (countitem("MaggotSlime") == 0) goto L_No_maggot_slime; + if (countitem("SmallMushroom") == 0) goto L_No_mushroom; + if (countitem("Petal") == 0) goto L_No_petal; - if (countitem(700) == 0) goto L_No_pearl; - if (countitem(613) == 0) goto L_No_hard_spike; - if (countitem(569) == 0) goto L_No_raw_log; + if (countitem("Pearl") == 0) goto L_No_pearl; + if (countitem("HardSpike") == 0) goto L_No_hard_spike; + if (countitem("RawLog") == 0) goto L_No_raw_log; - if (countitem(614) == 0) goto L_No_pink_antenna; - if (countitem(710) == 0 || countitem(711) == 0 || countitem(712) == 0 || countitem(713) == 0) goto L_No_tongues; - if (countitem(537) == 0) goto L_No_treasure_key; + if (countitem("PinkAntenna") == 0) goto L_No_pink_antenna; + if (countitem("SnakeTongue") == 0 || countitem("MountainSnakeTongue") == 0 || countitem("GrassSnakeTongue") == 0 || countitem("CaveSnakeTongue") == 0) goto L_No_tongues; + if (countitem("TreasureKey") == 0) goto L_No_treasure_key; - if (countitem(701) == 0) goto L_No_ash; - if (countitem(680) == 0 || countitem(681) == 0 || countitem(682) == 0 || countitem(683) == 0) goto L_No_herbs; - if (countitem(518) == 0) goto L_No_bug_leg; + if (countitem("PileOfAsh") == 0) goto L_No_ash; + if (countitem("MauveHerb") == 0 || countitem("CobaltHerb") == 0 || countitem("GambogeHerb") == 0 || countitem("AlizarinHerb") == 0) goto L_No_herbs; + if (countitem("BugLeg") == 0) goto L_No_bug_leg; - if (countitem(612) == 0) goto L_No_lamp; - if (countitem(640) == 0) goto L_No_iron_ore; - if (countitem(507) == 0 || countitem(517) == 0 || countitem(709) == 0) goto L_No_stingers; + if (countitem("CaveSnakeLamp") == 0) goto L_No_lamp; + if (countitem("IronOre") == 0) goto L_No_iron_ore; + if (countitem("ScorpionStinger") == 0 || countitem("RedScorpionStinger") == 0 || countitem("BlackScorpionStinger") == 0) goto L_No_stingers; - if (countitem(718) == 0) goto L_No_silk; - if (countitem(611) == 0) goto L_No_fur; - if (countitem(631) == 0) goto L_No_dark_crystal; + if (countitem("SilkCocoon") == 0) goto L_No_silk; + if (countitem("WhiteFur") == 0) goto L_No_fur; + if (countitem("DarkCrystal") == 0) goto L_No_dark_crystal; - if (countitem(541) == 0) goto L_No_water; + if (countitem("BottleOfWater") == 0) goto L_No_water; getinventorylist; - if (@inventorylist_count == 100 && countitem(505) > 1 && countitem(518) > 1 && countitem(718) > 1 - && countitem(566) > 1 && countitem(565) > 1 && countitem(700) > 1 - && countitem(613) > 1 && countitem(569) > 1 && countitem(614) > 1 - && countitem(631) > 1 && countitem(640) > 1 && countitem(507) > 1 - && countitem(517) > 1 && countitem(709) > 1 && countitem(710) > 1 - && countitem(711) > 1 && countitem(712) > 1 && countitem(713) > 1 - && countitem(680) > 1 && countitem(681) > 1 && countitem(682) > 1 - && countitem(683) > 1 && countitem(537) > 1 && countitem(612) > 1 - && countitem(701) > 1 && countitem(541) > 1) goto L_TooMany; - - delitem 505, 1; - delitem 518, 1; - delitem 718, 1; - - delitem 566, 1; - delitem 565, 1; - delitem 700, 1; - - delitem 613, 1; - delitem 569, 1; - delitem 614, 1; - - delitem 631, 1; - delitem 640, 1; - delitem 507, 1; - - delitem 517, 1; - delitem 709, 1; - delitem 710, 1; - - delitem 711, 1; - delitem 712, 1; - delitem 713, 1; - - delitem 680, 1; - delitem 681, 1; - delitem 682, 1; - - delitem 683, 1; - delitem 537, 1; - delitem 612, 1; - - delitem 701, 1; - delitem 541, 1; + if (@inventorylist_count == 100 && countitem("MaggotSlime") > 1 && countitem("BugLeg") > 1 && countitem("SilkCocoon") > 1 + && countitem("SmallMushroom") > 1 && countitem("Petal") > 1 && countitem("Pearl") > 1 + && countitem("HardSpike") > 1 && countitem("RawLog") > 1 && countitem("PinkAntenna") > 1 + && countitem("DarkCrystal") > 1 && countitem("IronOre") > 1 && countitem("ScorpionStinger") > 1 + && countitem("RedScorpionStinger") > 1 && countitem("BlackScorpionStinger") > 1 && countitem("SnakeTongue") > 1 + && countitem("MountainSnakeTongue") > 1 && countitem("GrassSnakeTongue") > 1 && countitem("CaveSnakeTongue") > 1 + && countitem("MauveHerb") > 1 && countitem("CobaltHerb") > 1 && countitem("GambogeHerb") > 1 + && countitem("AlizarinHerb") > 1 && countitem("TreasureKey") > 1 && countitem("CaveSnakeLamp") > 1 + && countitem("PileOfAsh") > 1 && countitem("WhiteFur") > 1 && countitem("BottleOfWater") > 1) goto L_TooMany; + + delitem "MaggotSlime", 1; + delitem "BugLeg", 1; + delitem "SilkCocoon", 1; + + delitem "SmallMushroom", 1; + delitem "Petal", 1; + delitem "Pearl", 1; + + delitem "HardSpike", 1; + delitem "RawLog", 1; + delitem "PinkAntenna", 1; + + delitem "DarkCrystal", 1; + delitem "IronOre", 1; + delitem "ScorpionStinger", 1; + + delitem "RedScorpionStinger", 1; + delitem "BlackScorpionStinger", 1; + delitem "SnakeTongue", 1; + + delitem "MountainSnakeTongue", 1; + delitem "GrassSnakeTongue", 1; + delitem "CaveSnakeTongue", 1; + + delitem "MauveHerb", 1; + delitem "CobaltHerb", 1; + delitem "GambogeHerb", 1; + + delitem "AlizarinHerb", 1; + delitem "TreasureKey", 1; + delitem "CaveSnakeLamp", 1; + + delitem "WhiteFur", 1; + delitem "PileOfAsh", 1; + delitem "BottleOfWater", 1; mes "You managed to preform the ritual and open the chest."; - getitem 679, 1; + getitem "DemonMask", 1; mes "You found a demon mask inside."; set QUEST_demon_mines, 3; close; diff --git a/npc/014-1_Woodland/wedding-officiator.txt b/npc/014-1_Woodland/wedding-officiator.txt index 26f2fc56..8b25647e 100644 --- a/npc/014-1_Woodland/wedding-officiator.txt +++ b/npc/014-1_Woodland/wedding-officiator.txt @@ -99,8 +99,8 @@ L_get_married: if (@inventorylist_count > 98) goto L_No_Room_For_Rings; set zeny, zeny - @WEDDING_FEE; - getitem 702, 1; - getitem 702, 1; + getitem "WeddingRing", 1; + getitem "WeddingRing", 1; mes "[Wedding Officiator]"; mes "Wendy collects the fee."; diff --git a/npc/015-1_Woodland/sword.txt b/npc/015-1_Woodland/sword.txt index 0128d819..75142de3 100644 --- a/npc/015-1_Woodland/sword.txt +++ b/npc/015-1_Woodland/sword.txt @@ -16,8 +16,6 @@ L_message: 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; @@ -311,7 +309,7 @@ L_L2_W10: "OK.", -, "No way.", L_farewell; - if (countitem(@ORE) < 1) + if (countitem("IronOre") < 1) goto L_no_ore; if (MPQUEST && (Mobpt < 10000)) goto L_lacking_mobpoints; @@ -321,8 +319,8 @@ L_L2_W10: mes "[1000 experience points]"; set Mobpt, Mobpt - 10000; getexp 1000, 0; - delitem @ORE, 1; - getitem @IRONPOWDER, 5; + delitem "IronOre", 1; + getitem "IronPowder", 5; set @Q_status, @STATUS_L2_ALLSPELLS; callsub S_update_var; next; diff --git a/npc/015-3/katze.txt b/npc/015-3/katze.txt index c24a9f80..a3cc0626 100644 --- a/npc/015-3/katze.txt +++ b/npc/015-3/katze.txt @@ -70,17 +70,17 @@ L_NeedsFur: mes "\"Prrr. Meow, prrr...\""; next; - if (countitem(611) > 0) // White Fur + if (countitem("WhiteFur") > 0) menu "Make funny movements with the fur near the ground", L_MoveFur, "Throw a stone at the cat", L_ThrowStone, "Leave the cat alone", -; - if (countitem(611) == 0) + if (countitem("WhiteFur") == 0) menu "Throw a stone at the cat", L_ThrowStone, "Leave the cat alone", -; close; L_MoveFur: - delitem 611, 1; // Cat takes the white fur + delitem "WhiteFur", 1; set Katze, 3; mes "The cat jumps at the fur! You quickly let go of it. The cat happily returns to its spot, carrying the fur in its mouth."; next; @@ -93,7 +93,7 @@ L_NeedsWood: mes "\"Prrrr, now I'd like something to sharpen my claws on.\""; next; - if (countitem(569) > 0) // Raw log + if (countitem("RawLog") > 0) menu "Want this piece of wood?", L_GiveWood, "Ok, see you later", -; close; @@ -113,12 +113,12 @@ L_NeedsStuff: set Katze, 5; mes "[Katze]"; mes "\"You've been really kind to me. I can make you something nice, but I will need"; - mes "2 snake skins,"; - mes "2 snake tongues,"; - mes "2 maggot slimes,"; - mes "2 white furs,"; - mes "2 hard spikes and"; - mes "2 tiny healing potions.\""; + mes "2 [snake skin]s,"; + mes "2 [snake tongue]s,"; + mes "2 [maggot slime]s,"; + mes "2 [white fur]s,"; + mes "2 [hard spike]s and"; + mes "2 [tiny healing potion]s.\""; next; close; @@ -152,12 +152,12 @@ L_Please: close; L_CatChecksStuff: - if (countitem(641) > 1 && // Snake skin - countitem(710) > 1 && // Snake tongue - countitem(505) > 1 && // Maggot slime - countitem(611) > 1 && // White fur - countitem(613) > 1 && // Hard spike - countitem(684) > 1) // Tiny healing potion + if (countitem("SnakeSkin") > 1 && + countitem("SnakeTongue") > 1 && + countitem("MaggotSlime") > 1 && + countitem("WhiteFur") > 1 && + countitem("HardSpike") > 1 && + countitem("TinyHealingPotion") > 1) goto L_GiveStuff; mes "[Katze]"; mes "\"You don't seem to have everything yet. Come back later when you do.\""; @@ -165,12 +165,12 @@ L_CatChecksStuff: close; L_GiveStuff: - delitem 641, 2; - delitem 710, 2; - delitem 505, 2; - delitem 611, 2; - delitem 613, 2; - delitem 684, 2; + delitem "SnakeSkin", 2; + delitem "SnakeTongue", 2; + delitem "MaggotSlime", 2; + delitem "WhiteFur", 2; + delitem "HardSpike", 2; + delitem "TinyHealingPotion", 2; set Katze, 6; set KatzeBeenOutside, 0; mes "[Katze]"; @@ -185,7 +185,7 @@ L_PreGainEars: close; L_GainEars: - getitem 1217, 1; // Cat ears + getitem "CatEars", 1; set @xpval, 5000; getexp @xpval, 0; set Katze, 7; diff --git a/npc/015-3/pot.txt b/npc/015-3/pot.txt index bf3bd945..434954c7 100644 --- a/npc/015-3/pot.txt +++ b/npc/015-3/pot.txt @@ -20,14 +20,14 @@ if (Katze >= 4) goto L_Finished; L_NeedsMilk: - if (countitem(527) > 0) + if (countitem("Milk") > 0) menu "Pour in some milk", L_GiveMilk, "Leave it alone", -; close; L_GiveMilk: - delitem 527, 1; + delitem "Milk", 1; set Katze, 1; set KatzeBeenOutside, 0; close; @@ -41,29 +41,29 @@ L_NeedsFood: mes "The milk is gone!"; next; - if (countitem(562) > 0 && countitem(676) > 0) + if (countitem("ChickenLeg") > 0 && countitem("Steak") > 0) menu "Put in a chicken leg", L_GiveChicken, "Put in a steak", L_GiveSteak, "Leave it alone", -; - if (countitem(562) > 0 && countitem(676) == 0) + if (countitem("ChickenLeg") > 0 && countitem("Steak") == 0) menu "Put in a chicken leg", L_GiveChicken, "Leave it alone", -; - if (countitem(562) == 0 && countitem(676) > 0) + if (countitem("ChickenLeg") == 0 && countitem("Steak") > 0) menu "Put in a steak", L_GiveSteak, "Leave it alone", -; close; L_GiveChicken: - delitem 562, 1; + delitem "ChickenLeg", 1; set Katze, 2; set KatzeBeenOutside, 0; close; L_GiveSteak: - delitem 676, 1; + delitem "Steak", 1; set Katze, 2; set KatzeBeenOutside, 0; close; @@ -77,7 +77,7 @@ L_NeedsFur: mes "And it's empty!"; next; - if (countitem(611) > 0) // White Fur + if (countitem("WhiteFur") > 0) menu "Put a white fur next to the pot", L_GiveFur, "Leave it alone", -; close; @@ -88,13 +88,13 @@ L_GiveFur: close; L_NeedsWood: - if (countitem(569) > 0) // Raw log + if (countitem("RawLog") > 0) menu "Put a wooden log next to the pot", L_GiveWood, "Leave it alone", -; close; L_GiveWood: - delitem 569, 1; + delitem "RawLog", 1; set Katze, 4; set KatzeBeenOutside, 0; mes "You put the wooden log next to the pot. The cat eyes it suspiciously, but remains on her spot."; diff --git a/npc/018-2_Woodland_mining_camp/caul.txt b/npc/018-2_Woodland_mining_camp/caul.txt index 1aeda920..ff20e69f 100644 --- a/npc/018-2_Woodland_mining_camp/caul.txt +++ b/npc/018-2_Woodland_mining_camp/caul.txt @@ -13,22 +13,11 @@ set @SETZER_KNOWS_STINGER, 2; set @SETZER_FLAG_MADE_OIL, 4; - set @PEARL, 700; - set @SNAKE_SKIN, 641; - set @BLACK_STINGER, 709; - set @ASH_PILE, 701; - set @GOLDEN_STINGER, 706; - set @MONSTER_OIL, 707; set @MONSTER_OIL_XP, 100000; set @Q_MASK, NIBBLE_3_MASK; set @Q_SHIFT, NIBBLE_3_SHIFT; - set @MAUVE, 680; - set @COBALT, 681; - set @GAMBOGE, 682; - set @ALIZARIN, 683; - set @Q_status, (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT; mes "[Caul]"; @@ -92,10 +81,10 @@ L_brew: mes "\"Now put " + @num + " herbs of each kind into the cauldron, stir, and concentrate all your mental energy on it.\""; next; - if (countitem(@MAUVE) < @num) goto L_NotEnough; - if (countitem(@COBALT) < @num) goto L_NotEnough; - if (countitem(@GAMBOGE) < @num) goto L_NotEnough; - if (countitem(@ALIZARIN) < @num) goto L_NotEnough; + if (countitem("MauveHerb") < @num) goto L_NotEnough; + if (countitem("CobaltHerb") < @num) goto L_NotEnough; + if (countitem("GambogeHerb") < @num) goto L_NotEnough; + if (countitem("AlizarinHerb") < @num) goto L_NotEnough; set @a, @num; set @result1, 0; @@ -118,10 +107,10 @@ L_CraftLoop: set @a, @a - 1; if (@a > 0) goto L_CraftLoop; - delitem @MAUVE, @num; - delitem @COBALT, @num; - delitem @GAMBOGE, @num; - delitem @ALIZARIN, @num; + delitem "MauveHerb", @num; + delitem "CobaltHerb", @num; + delitem "GambogeHerb", @num; + delitem "AlizarinHerb", @num; getitem 684, @result1; getitem 685, @result2; @@ -221,16 +210,16 @@ L_monster_oil_where_gold: L_monster_oil_start_brew: set @main_menu, 0; - if (countitem (@PEARL) < 1) goto L_monster_oil_missing; - if (countitem (@SNAKE_SKIN) < 2) goto L_monster_oil_missing; - if (countitem (@BLACK_STINGER) < 3) goto L_monster_oil_missing; - if (countitem (@ASH_PILE) < 2) goto L_monster_oil_missing; - if (countitem (@GOLDEN_STINGER) < 1) goto L_monster_oil_missing_gold; + if (countitem ("Pearl") < 1) goto L_monster_oil_missing; + if (countitem ("SnakeSkin") < 2) goto L_monster_oil_missing; + if (countitem ("BlackScorpionStinger") < 3) goto L_monster_oil_missing; + if (countitem ("PileOfAsh") < 2) goto L_monster_oil_missing; + if (countitem ("GoldenScorpionStinger") < 1) goto L_monster_oil_missing_gold; - delitem @PEARL, 1; - delitem @SNAKE_SKIN, 2; - delitem @BLACK_STINGER, 3; - delitem @ASH_PILE, 2; + delitem "Pearl", 1; + delitem "SnakeSkin", 2; + delitem "BlackScorpionStinger", 3; + delitem "PileOfAsh", 2; set @bubble_mode, 0; setarray @bubble_modes$, @@ -301,35 +290,35 @@ L_monster_oil_out_of_leaves: goto L_monster_oil_loop; L_monster_oil_alizarin: - set @use_leaf, @ALIZARIN; + set @use_leaf$, "AlizarinHerb"; set @use_color, 1; goto L_monster_oil_leaf_color; L_monster_oil_gamboge: - set @use_leaf, @GAMBOGE; + set @use_leaf$, "GambogeHerb"; set @use_color, 2; goto L_monster_oil_leaf_color; L_monster_oil_cobalt: - set @use_leaf, @COBALT; + set @use_leaf$, "CobaltHerb"; set @use_color, 4; goto L_monster_oil_leaf_color; L_monster_oil_leaf_color: - if (countitem (@use_leaf) < 1) goto L_monster_oil_out_of_leaves; + if (countitem (@use_leaf$) < 1) goto L_monster_oil_out_of_leaves; callsub S_monster_oil_random_move; if (@color & @use_color) goto L_monster_oil_pc_bad; set @color, @color | @use_color; - delitem @use_leaf, 1; + delitem @use_leaf$, 1; mes "The brew changes its hue as your leaf dissolves."; next; goto L_monster_oil_loop; L_monster_oil_mauve: - if (countitem(@MAUVE) < 1) goto L_monster_oil_out_of_leaves; - delitem @MAUVE, 1; + if (countitem("MauveHerb") < 1) goto L_monster_oil_out_of_leaves; + delitem "MauveHerb", 1; callsub S_monster_oil_random_move; if (@intensity == 2 && @color == 7) goto L_monster_oil_done; @@ -432,12 +421,12 @@ L_monster_oil_done: mes "[Brewing monster oil]"; mes "As instructed, you toss in your golden scorpion stinger."; - if (countitem (@GOLDEN_STINGER) < 1) goto L_monster_oil_no_gold_end; + if (countitem ("GoldenScorpionStinger") < 1) goto L_monster_oil_no_gold_end; mes "The brew bubbles once more, then calms completely."; - delitem @GOLDEN_STINGER, 1; - getitem @MONSTER_OIL, 1; + delitem "GoldenScorpionStinger", 1; + getitem "MonsterOilPotion", 1; if (!(@Q_status & @SETZER_FLAG_MADE_OIL)) getexp @MONSTER_OIL_XP, 0; diff --git a/npc/019-1_Snow_field/santa_helper.txt b/npc/019-1_Snow_field/santa_helper.txt index a8a86af6..e9c0772d 100644 --- a/npc/019-1_Snow_field/santa_helper.txt +++ b/npc/019-1_Snow_field/santa_helper.txt @@ -19,26 +19,26 @@ L_Y: mes "[Santa's Helper]"; mes "\"Hmm, let me check what you have.\""; next; - if (countitem(515) < 25) goto L_NoItem; - if (countitem(516) < 20) goto L_NoItem; - if (countitem(538) < 5) goto L_NoItem; + if (countitem("PurplePresentBox") < 25) goto L_NoItem; + if (countitem("BluePresentBox") < 20) goto L_NoItem; + if (countitem("GreenPresentBox") < 5) goto L_NoItem; getinventorylist; if (@inventorylist_count > 99) goto L_TooMany; mes "[Santa's Helper]"; mes "\"Great! Here is something for you\""; - delitem 515, 25; - delitem 516, 20; - delitem 538, 5; - getitem 564, 1; + delitem "PurplePresentBox", 25; + delitem "BluePresentBox", 20; + delitem "GreenPresentBox", 5; + getitem "TurtleneckSweater", 1; set ChristmasQuest2,1; close; L_R: mes "[Santa's Helper]"; mes "\"I need:"; - mes "25 purple present boxes"; - mes "20 blue present boxes"; - mes "5 green present boxes\""; + mes "25 [purple present box]es"; + mes "20 [blue present box]es"; + mes "5 [green present box]es\""; next; goto L_M; diff --git a/npc/019-1_Snow_field/snowman.txt b/npc/019-1_Snow_field/snowman.txt index ca8c1f09..72b40a13 100644 --- a/npc/019-1_Snow_field/snowman.txt +++ b/npc/019-1_Snow_field/snowman.txt @@ -21,16 +21,17 @@ L_Sure: mes "[Snowman]"; mes "\"Hmm, let me see what you have.\""; next; - if(countitem(510) < 15) goto L_NoItem; - if(countitem(509) < 10) goto L_NoItem; - if(countitem(502) < 5) goto L_NoItem; + if(countitem("Candy") < 15) goto L_NoItem; + if(countitem("ChocolateBar") < 10) goto L_NoItem; + if(countitem("CactusPotion") < 5) goto L_NoItem; getinventorylist; if (@inventorylist_count > 99) goto L_TooMany; - delitem 510, 15; - delitem 509, 10; - delitem 502, 5; + delitem "Candy", 15; + delitem "ChocolateBar", 10; + delitem "CactusPotion", 5; + mes "[Snowman]"; mes "\"Here you go, enjoy your new hat!\""; - getitem 511, 1; + getitem "SantaHat", 1; set ChristmasQuest, 1; close; @@ -38,9 +39,9 @@ L_Need: mes "[Snowman]"; mes "\"For this special hat, I need a pint of magic and a little help."; mes "Just kidding. I would like to get some food:"; - mes "15 Candies"; - mes "10 Chocolate bars"; - mes "5 Cactus potions\""; + mes "15 pieces of [Candy]"; + mes "10 [Chocolate bar]s"; + mes "5 [Cactus potion]s\""; next; goto L_Menu; diff --git a/npc/020-2_Nivalis/furquest.txt b/npc/020-2_Nivalis/furquest.txt index 67a6eb10..2e804be2 100644 --- a/npc/020-2_Nivalis/furquest.txt +++ b/npc/020-2_Nivalis/furquest.txt @@ -74,59 +74,59 @@ L_State_0_3: L_State_0_4: mes "[Agostine, The Legendary Tailor]"; mes "\"So, a Cactus Drink?\""; - if (countitem(501) < 1) goto L_State_neg; + if (countitem("CactusDrink") < 1) goto L_State_neg; next; - delitem 501, 1; + delitem "CactusDrink", 1; goto L_State_bad; close; L_State_0_5: mes "[Agostine, The Legendary Tailor]"; mes "\"So, a Cactus Potion?\""; - if (countitem(502) < 1) goto L_State_neg; + if (countitem("CactusPotion") < 1) goto L_State_neg; next; - delitem 502, 1; + delitem "CactusPotion", 1; goto L_State_bad; close; L_State_0_6: mes "[Agostine, The Legendary Tailor]"; mes "\"So, some milk for me?\""; - if (countitem(527) < 1) goto L_State_neg; - delitem 527, 1; + if (countitem("Milk') < 1) goto L_State_neg; + delitem "Milk", 1; goto L_State_bad; close; L_State_0_7: mes "[Agostine, The Legendary Tailor]"; mes "\"So, a beer?\""; - if (countitem(539) < 1) goto L_State_neg; + if (countitem("Beer") < 1) goto L_State_neg; next; - delitem 539, 1; + delitem "Beer", 1; goto L_State_bad; close; L_State_0_8: mes "[Agostine, The Legendary Tailor]"; mes "\"So, a Concentration Potion?\""; - if (countitem(568) < 1) goto L_State_neg; + if (countitem("ConcentrationPotion") < 1) goto L_State_neg; next; - delitem 568, 1; + delitem "ConcentrationPotion", 1; goto L_State_bad; close; L_State_0_9: mes "[Agostine, The Legendary Tailor]"; mes "\"So, an Iron Potion?\""; - if (countitem(567) < 1) goto L_State_neg; + if (countitem("IronPotion") < 1) goto L_State_neg; next; - delitem 567, 1; + delitem "IronPotion", 1; mes "Agostine looks pleased as he drinks the potion."; next; mes "[Agostine, The Legendary Tailor]"; mes "\"Oh! This is damn good! I feel a new man, my friend!\""; next; - set zeny, zeny+500; + set zeny, zeny + 500; mes "[Agostine, The Legendary Tailor]"; mes "\"This is a little reward for your help. Take 500 GP, my friend!\""; set QUEST_WG_state, 2; @@ -176,7 +176,7 @@ L_State_3: L_State_4: mes "[Agostine, The Legendary Tailor]"; mes "\"Oh, my friend! Have you brought me some good furs?\""; - if (countitem(611) < 1) close; + if (countitem("WhiteFur") < 1) close; next; menu "Here, take a look!", L_State_4_try, @@ -188,14 +188,14 @@ L_State_4_try: mes "\"Let me see, my friend! It needs to be perfect for my gloves!\""; mes "Agostine examines the patch of fur."; next; - delitem 611, 1; + delitem "WhiteFur", 1; set @Temp1,rand(30); if (@Temp1 == 0) goto L_State_4_success; mes "Agostine throws away the white fur."; next; mes "[Agostine, The Legendary Tailor]"; mes "\"It was awfully cut! You should pay more attention when you kill fluffies!\""; - if (countitem(611) < 1) close; + if (countitem("WhiteFur") < 1) close; next; menu "Here I have another one!", L_State_4_try, @@ -224,8 +224,8 @@ L_State_5_pay: if (zeny < 15000) goto L_State_5_nocash; getinventorylist; if (@inventorylist_count == 100) goto L_TooMany; - set zeny, zeny-15000; - getitem 563, 1; + set zeny, zeny - 15000; + getitem "WinterGloves", 1; set QUEST_WG_state, 6; mes "[Agostine, The Legendary Tailor]"; mes "\"Here they are. You will have the more fashionable hands in the world!\""; @@ -260,7 +260,7 @@ L_State_10: L_State_11: mes "[Agostine, The Legendary Tailor]"; mes "\"So, my friend, have you brought me the right Fur?\""; - if (countitem(611) < 1) close; + if (countitem("WhiteFur") < 1) close; next; menu "Sure, I'm a fluffy hunter!", L_State_11_try, @@ -273,14 +273,14 @@ L_State_11_try: next; mes "Agostine examines the patch of fur."; next; - delitem 611, 1; + delitem "WhiteFur", 1; set @Temp2,rand(30); if (@Temp2 == 0) goto L_State_11_success; mes "Agostine rips the white fur."; next; mes "[Agostine, The Legendary Tailor]"; mes "\"That fur was terrible. I won't work with it!\""; - if (countitem(611) < 1) close; + if (countitem("WhiteFur") < 1) close; next; menu "Well, maybe this is better!", L_State_11_try, @@ -292,7 +292,7 @@ L_State_11_success: next; mes "[Agostine, The Legendary Tailor]"; mes "\"This one is good enough, my friend. Good job.\""; - delitem 611, 1; + delitem "WhiteFur", 1; set QUEST_WG_state, 8; goto L_State_12; @@ -308,11 +308,11 @@ L_State_12: L_State_12_pay: if (zeny < 15000) goto L_State_12_missing; - if (countitem(528) < 1) goto L_State_12_missing; + if (countitem("Boots") < 1) goto L_State_12_missing; // No inventory check needed, as boots are removed, opening a slot - set zeny, zeny-15000; - delitem 528, 1; - getitem 655, 1; + set zeny, zeny - 15000; + delitem "Boots", 1; + getitem "FurBoots", 1; set QUEST_WG_state, 9; mes "[Agostine, The Legendary Tailor]"; mes "\"Enjoy your new boots, my friend!\""; -- cgit v1.2.3-70-g09d2 From 4b353e978cccec57dc4bc1a065c86642dd6d936d Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 25 Jan 2009 14:47:52 +0000 Subject: Fix bugs in the injured mouboo's script --- npc/012-1_Woodland_Hills/injured-mouboo.txt | 42 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'npc/012-1_Woodland_Hills/injured-mouboo.txt') diff --git a/npc/012-1_Woodland_Hills/injured-mouboo.txt b/npc/012-1_Woodland_Hills/injured-mouboo.txt index 0c32aaf3..efa68ad5 100644 --- a/npc/012-1_Woodland_Hills/injured-mouboo.txt +++ b/npc/012-1_Woodland_Hills/injured-mouboo.txt @@ -102,9 +102,9 @@ L_give: setarray @items$, "CactusDrink", "CactusPotion", "ChocolateBar", "Milk", "OrangeCupcake", "Apple", "Beer", "BottleOfWater", "TinyHealingPotion", "SmallHealingPotion", "MediumHealingPotion", "LargeHealingPotion"; setarray @itemeat, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0; - setarray @choice$, "", "", "", "", "", "", "", "", "", "", "", ""; + setarray @menuItems$, "", "", "", "", "", "", "", "", "", "", "", ""; set @choices_nr, 0; - setarray @choice_idx, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; + setarray @menuNames$, "", "", "", "", "", "", "", "", "", "", "", ""; setarray @choice_eat, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; set @n, 0; @@ -114,9 +114,9 @@ L_nloop: if (countitem(@k$) == 0) goto L_nloop_skip; - set @name$, getitemname(@k); - set @choice$[@ct], @name$; - set @choice_idx$[@ct], @k$; + set @name$, getitemname(@k$); + set @menuItems$[@ct], @name$; + set @menuNames$[@ct], @k$; set @choice_eat[@ct], @itemeat[@n]; set @ct, @ct + 1; @@ -126,34 +126,32 @@ 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 @menuItems$[0], -, + @menuItems$[1], -, + @menuItems$[2], -, + @menuItems$[3], -, + @menuItems$[4], -, + @menuItems$[5], -, + @menuItems$[6], -, + @menuItems$[7], -, + @menuItems$[8], -, + @menuItems$[9], -, + @menuItems$[10], -, + @menuItems$[11], -; set @menu, @menu - 1; - set @choice$, @choice_idx[@menu]; - set @choice_e, @choice_eat[@menu]; + set @choice$, @menuNames$[@menu]; set @verb$, "drinks"; - if (@choice_e) + if (@choice_eat[@menu]) set @verb$, "eats"; - if (@choice$ && countitem(@choice$)) + if (@choice$ != "" && countitem(@choice$)) goto L_consume; goto L_menu; L_consume: mes "[Injured Mouboo]"; - mes "The mouboo " + @verb$ + " your " + getitemname(@choice$) + "."; delitem @choice$, 1; next; -- cgit v1.2.3-70-g09d2