diff options
Diffstat (limited to 'npc/011-1')
-rw-r--r-- | npc/011-1/_import.txt | 9 | ||||
-rw-r--r-- | npc/011-1/_mobs.txt | 16 | ||||
-rw-r--r-- | npc/011-1/_warps.txt | 8 | ||||
-rw-r--r-- | npc/011-1/alchemist.txt | 1033 | ||||
-rw-r--r-- | npc/011-1/auldsbel.txt | 1291 | ||||
-rw-r--r-- | npc/011-1/mapflags.txt | 1 | ||||
-rw-r--r-- | npc/011-1/oscar.txt | 486 | ||||
-rw-r--r-- | npc/011-1/shops.txt | 18 |
8 files changed, 2862 insertions, 0 deletions
diff --git a/npc/011-1/_import.txt b/npc/011-1/_import.txt new file mode 100644 index 00000000..c24607c5 --- /dev/null +++ b/npc/011-1/_import.txt @@ -0,0 +1,9 @@ +// Map 011-1: Woodland +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/011-1/_mobs.txt", +"npc/011-1/_warps.txt", +"npc/011-1/alchemist.txt", +"npc/011-1/auldsbel.txt", +"npc/011-1/mapflags.txt", +"npc/011-1/oscar.txt", +"npc/011-1/shops.txt", diff --git a/npc/011-1/_mobs.txt b/npc/011-1/_mobs.txt new file mode 100644 index 00000000..0ac6cebe --- /dev/null +++ b/npc/011-1/_mobs.txt @@ -0,0 +1,16 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-1: Woodland mobs +011-1,0,0,0,0 monster Evil Mushroom 1013,30,0,0 +011-1,0,0,0,0 monster Pink Flower 1014,20,0,0 +011-1,0,0,0,0 monster Spiky Mushroom 1019,5,0,0 +011-1,0,0,0,0 monster Snail 1041,1,0,0 +011-1,0,0,0,0 monster Mouboo 1028,5,0,10 +011-1,0,0,0,0 monster Mauve Plant 1029,3,270000,180000 +011-1,0,0,0,0 monster Alizarin Plant 1032,1,2700000,1800000 +011-1,0,0,0,0 monster Silkworm 1035,2,60000,30000 +011-1,0,0,0,0 monster Clover Patch 1037,2,0,1000 +011-1,0,0,0,0 monster Squirrel 1038,25,30,20 +011-1,0,0,0,0 monster Butterfly 1055,10,30,20 +011-1,0,0,0,0 monster Mouboo 1028,5,0,10 +011-1,1,1,0,0 monster Mana Bug 1131,18,30,0 +011-1,92,44,17,14 monster Maggot 1002,10,30,0 diff --git a/npc/011-1/_warps.txt b/npc/011-1/_warps.txt new file mode 100644 index 00000000..f4752f4c --- /dev/null +++ b/npc/011-1/_warps.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 011-1: Woodland warps +011-1,58,92,0 warp #011-1_58_92 0,0,011-3,31,45 +011-1,30,61,0 warp #011-1_30_61 0,2,014-1,108,91 +011-1,49,104,0 warp #011-1_49_104 1,0,010-1,48,25 +011-1,124,62,0 warp #011-1_124_62 0,3,008-1,25,61 +011-1,73,14,0 warp #011-1_73_14 1,0,012-1,132,173 +011-1,38,36,0 warp #011-1_38_36 0,0,011-6,49,100 diff --git a/npc/011-1/alchemist.txt b/npc/011-1/alchemist.txt new file mode 100644 index 00000000..5f915236 --- /dev/null +++ b/npc/011-1/alchemist.txt @@ -0,0 +1,1033 @@ +011-1,117,77,0 script Rauk NPC103,{ + // Setzer quest/monster oil quest participation + @SETZER_INITIAL = 0; + @SETZER_KNOWS_OIL = 1; + @SETZER_KNOWS_STINGER = 2; + + @Q_MASK = NIBBLE_3_MASK; + @Q_SHIFT = NIBBLE_3_SHIFT; + + @wants_sulphur = (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)); + @wants_ironpowder = (((QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT) >= 7); + @Q_status = (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT; + // End of Setzer quest/monster oil quest participation + + @QUEST_CAN_GET_DYE_HERE = 2; + @QUEST_HAS_SOLVED_DYE_PUZZLE = 3; + @QUEST_GUESS_BASE = 4; + + @CHOICE_IRON = 0; + @CHOICE_CONCENTRATION = 1; + @CHOICE_DYEING_INTRO = 2; + @CHOICE_DYE = 3; + @CHOICE_MONSTER_OIL = 4; + @CHOICE_MANA_POTION = 5; + @CHOICE_SULPHUR_POWDER = 6; + @CHOICE_IRON_POWDER = 7; + @CHOICE_ABORT = 8; + + setarray @menuitems$, "", "", "", "", "", "", "", ""; + @c = 0; + + @menuitems$[@c] = "Iron potion."; + @menuid[@c] = @CHOICE_IRON; + @c = @c + 1; + + @menuitems$[@c] = "Concentration potion."; + @menuid[@c] = @CHOICE_CONCENTRATION; + @c = @c + 1; + + if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION)) + goto L_post_mana_potion_c; + @menuitems$[@c] = "Mana potion."; + @menuid[@c] = @CHOICE_MANA_POTION; + @c = @c + 1; + goto L_post_mana_potion_c; + +L_post_mana_potion_c: + if (QUEST_clothdyer_knowsdye >= @QUEST_CAN_GET_DYE_HERE) + goto L_skip_introducing; + + mes "[Rauk the Alchemist]"; + mes "\"I'm learning the ancient science of the alchemy."; + mes "I already know how to create a couple of potions!!\""; + mes "\"Do you want me to create one for you?\""; + next; + if (QUEST_clothdyer_knowsdye == 1) + goto L_pre_dyeing; + goto L_certain_condition; + +L_skip_introducing: + mes "[Rauk the Alchemist]"; + mes "\"Hello, welcome back! Are you interested in dyes again, or in one of my potions?\""; + next; + @menuitems$[@c] = "Dye, please."; + @menuid[@c] = @CHOICE_DYE; + @c = @c + 1; + goto L_certain_condition; + +L_pre_dyeing: + @menuitems$[@c] = "Actually, can you make dye?"; + @menuid[@c] = @CHOICE_DYEING_INTRO; + @c = @c + 1; + goto L_certain_condition; + +L_certain_condition: + if (!@wants_sulphur) + goto L_post_sulphur_option; + @menuitems$[@c] = "Can you make sulphur powder?"; + @menuid[@c] = @CHOICE_SULPHUR_POWDER; + @c = @c + 1; + goto L_post_sulphur_option; + +L_post_sulphur_option: + if (!@wants_ironpowder) + goto L_post_ironpwd_option; + @menuitems$[@c] = "Can you make iron powder?"; + @menuid[@c] = @CHOICE_IRON_POWDER; + @c = @c + 1; + goto L_post_ironpwd_option; + +L_post_ironpwd_option: + if (@Q_status == @SETZER_INITIAL) + goto L_post_monster_oil; + @menuitems$[@c] = "Can you make monster oil?"; + @menuid[@c] = @CHOICE_MONSTER_OIL; + @c = @c + 1; + goto L_post_monster_oil; + +L_post_monster_oil: + @menuitems$[@c] = "No thanks."; + @menuid[@c] = @CHOICE_ABORT; + @c = @c + 1; + goto L_Main_menu; + +L_Main_menu: + + menu + @menuitems$[0], L_MenuItems, + @menuitems$[1], L_MenuItems, + @menuitems$[2], L_MenuItems, + @menuitems$[3], L_MenuItems, + @menuitems$[4], L_MenuItems, + @menuitems$[5], L_MenuItems, + @menuitems$[6], L_MenuItems, + @menuitems$[7], L_MenuItems; + +L_MenuItems: + @menu = @menu - 1; + + if (@menu >= @c) + goto L_Abort; + if (@menuid[@menu] == @CHOICE_IRON) + goto L_Iron; + if (@menuid[@menu] == @CHOICE_CONCENTRATION) + goto L_concentration; + if (@menuid[@menu] == @CHOICE_DYEING_INTRO) + goto L_dyeing_intro; + 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_POWDER) + goto L_Sulphur; + if (@menuid[@menu] == @CHOICE_IRON_POWDER) + goto L_Iron_powder; + if (@menuid[@menu] == @CHOICE_ABORT) + goto L_Abort; + goto L_Abort; + +L_Iron_powder: + mes "[Rauk the Alchemist]"; + mes "\"Iron powder? Hmm, I can extract some iron powder out of a chunk of iron ore, but that will require me to dissolve it. If you give me a chunk of iron ore and 100 GP for the acid, I can do it.\""; + next; + menu + "Never mind.", L_Abort, + "Here you are!", L_Next; + +L_Next: + if (countitem("IronOre") < 1) + goto L_Iron_powder_noore; + if (Zeny < 100) + goto L_Iron_powder_noZeny; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("IronOre") > 1 + && countitem("IronPowder") < 1) + goto L_Iron_powder_full; + delitem "IronOre", 1; + Zeny = Zeny - 100; + getitem "IronPowder", 4; + mes "[Rauk the Alchemist]"; + mes "Rauk places your chunk of ore in a strange glass container, then pours a steaming yellow liquid over it. Before your eyes, the ore dissolves."; + next; + mes "[Rauk the Alchemist]"; + mes "Rauk pours another liquid over the resultant mixture, then pours the result through a piece of cloth placed in a funnel, followed by a cup of water. He removes the residual metal powder from the cloth and hands it to you."; + mes "\"This is about as fine as I can make it without mechanical help.\""; + close; + +L_Iron_powder_noore: + mes "[Rauk the Alchemist]"; + mes "\"I do need a chunk of iron ore. Please return when you have one.\""; + close; + +L_Iron_powder_noZeny: + mes "[Rauk the Alchemist]"; + mes "\"I'm sorry, but I must ask that you pay 100 GP – the acid I use is not cheap.\""; + close; + +L_Iron_powder_full: + mes "[Rauk the Alchemist]"; + mes "\"I don't think that you have room to carry this. Please come back later.\""; + close; + +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 forty eight piles of sulphur ash for you.\""; + next; + menu + "I will be back.", L_Abort, + "No, I won't!", L_Abort, + "Here you are!", L_Next1; + +L_Next1: + if (countitem("PileOfAsh") < 3) + goto L_Sulphur_noash; + if (countitem("MauveHerb") < 3) + goto L_Sulphur_nomauve; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("SulphurPowder") == 0 + && countitem("PileOfAsh") > 3 + && countitem("MauveHerb") > 3) + goto L_Sulphur_nospace; + + delitem "PileOfAsh", 3; + delitem "MauveHerb", 3; + getitem "SulphurPowder", 48; + 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.\""; + close; + +L_Sulphur_noash: + mes "[Rauk the Alchemist]"; + mes "\"You don't seem to have all three piles of volcanic ash.\""; + close; + +L_Sulphur_nomauve: + mes "[Rauk the Alchemist]"; + mes "\"You don't seem to have the three mauve leaves I asked for.\""; + close; + +L_Sulphur_nospace: + mes "[Rauk the Alchemist]"; + mes "\"Oh dear. You don't seem to be able to carry the sulphur powder.\""; + close; + +L_mana_potion: + mes "[Rauk the Alchemist]"; + mes "\"Humh... I do believe that I have a recipe somewhere. One moment...\""; + mes "Rauk pulls a small book out of his sleeve and leafs through it."; + mes "\"Aha, here we are. Hmm, I'm not convinced that this is the best possible recipe...\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"I shall need one pearl, one bottle of water, thirty mauve leaves, twenty gamboge leaves, and five piles of volcanic ash.\""; + next; + menu + "Here you are!", L_Get_mana_potion, + "Never mind.", L_Main_menu; + +L_Get_mana_potion: + if(countitem("MauveHerb") < 30) + goto L_mana_potion_lacking; + if(countitem("GambogeHerb") < 20) + goto L_mana_potion_lacking; + if(countitem("PileOfAsh") < 5) + goto L_mana_potion_lacking; + if(countitem("Pearl") < 1) + goto L_mana_potion_lacking; + if(countitem("BottleOfWater") < 1) + goto L_mana_potion_lacking; + getinventorylist; + if ((@inventorylist_count == 100) + && (countitem("MauveHerb") > 30) + && (countitem("PileOfAsh") > 5) + && (countitem("Pearl") > 1) + && (countitem("BottleOfWater") > 1) + && (countitem("ManaPotion") < 1)) + goto L_mana_potion_toomuch; + delitem "MauveHerb", 30; + delitem "GambogeHerb", 20; + delitem "PileOfAsh", 5; + delitem "Pearl", 1; + delitem "BottleOfWater", 1; + getitem "ManaPotion", 1; + mes "[Rauk the Alchemist]"; + mes "Rauk grinds the leaves, then crushes the pearl. Taking out a small charcoal oven, he heats up your water bottle and dissolves first the pearl powder, then the ashes."; + mes "The brew begins to bubble violently."; + next; + mes "[Rauk the Alchemist]"; + mes "Taking the bottle with a pair of tongs, he pours the liquid through a fine sieve, discarding the liquid."; + mes "He then mixes the residual paste with the leaves, stirs in a little water from the pond and fills the result into a separate bottle."; + next; + mes "[Rauk the Alchemist]"; + mes "\"Here you are. I hope that this is what you wanted.\""; + next; + 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 Ash.\""; + next; + goto L_Main_menu; + +L_Iron: + @COST_PER_IRON_POTION = 2; + + mes "\" To make them, I'm going to need " + @COST_PER_IRON_POTION + " Small Mushrooms per Iron Potion. How many Iron Potions would you like?\""; + input @count; + + if (@count == 0) + close; + @empty = countitem("SmallMushroom"); + + if (@empty < @count * @COST_PER_IRON_POTION) + goto L_No_iron; + getinventorylist; + if (@inventorylist_count == 100 && countitem("SmallMushroom") == 0 && @empty > @count) + goto L_TooMany; + + delitem "SmallMushroom", @COST_PER_IRON_POTION * @count; + getitem "IronPotion", @count; + close; + +L_concentration: + @COST_PER_CONCENTRATION_POTION = 2; + + mes "\" To make them, I'm going to need " + @COST_PER_CONCENTRATION_POTION + " Pink Petals per Concentration Potion. How many Concentration Potions would you like?\""; + input @count; + + if (@count == 0) + close; + @empty = countitem("PinkPetal"); + + if (@empty < @count * @COST_PER_CONCENTRATION_POTION) + goto L_No_concentration; + getinventorylist; + if (@inventorylist_count == 100 && countitem("PinkPetal") == 0 && @empty > @count) + goto L_TooMany; + + delitem "PinkPetal", @COST_PER_CONCENTRATION_POTION * @count; + getitem "ConcentrationPotion", @count; + close; + +L_No_iron: + mes "\"You have to bring me 2 Small Mushrooms for each Iron Potion.\""; + close; + +L_No_concentration: + mes "\"You have to bring me 2 Pink Petals for each Concentration Potion.\""; + close; + +L_dyeing_intro: + mes "[Rauk the Alchemist]"; + mes "Rauk pauses for a moment."; + mes "\"Hmm, I'm not very good at that... I can only make simple dyes, the ones that you can use for cotton and wool.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"For the truly powerful ones that you can use to dye a person or an entire lake with, I would need a powerful catalyst, like an Obsidian Spork or a Wumpus Egg...\""; + mes "Rauk seems to be lost in his thoughts."; + next; + menu + "I only want to dye clothes, though...", L_Next2, + "What's a 'Wumpus egg'?", L_wumpus_egg_intro, + "What's an 'Obsidian Spork'?", L_ObsidianSporkIntro, + "Er, never mind...", L_Abort; + +L_Next2: + mes "[Rauk the Alchemist]"; + mes "\"Oh, just for clothes? Well, that is easy. I can make red, yellow, light blue, orange, pink, green, dark blue, black and purple dye, if you can get me the ingredients for it.\""; + next; + QUEST_clothdyer_knowsdye = 2; + goto L_pick_colour; + +L_wumpus_egg_intro: + mes "[Rauk the Alchemist]"; + mes "Rauk's eyes brighten up."; + mes "\"Ah, a wumpus egg is one of the most powerful catalysts out there, useful for transmutation and transchromation! Unfortunately the Common Wumpus is almost completely extinct these days, so they are hard to find."; + mes "Should you find one, please let me know – I will pay well for one!\""; + close; + +L_ObsidianSporkIntro: + mes "[Rauk the Alchemist]"; + mes "Rauk scratches his head."; + mes "\"Hm, obsidian is a dark, glass-like material that you can normally find near volcanos. Shaping it isn't too hard, but shaping it without it losing its magical properties is almost impossible.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Obsidian sporks are therefore hard to make, but they are said to be very useful in certain kinds of alchemy."; + mes "Should you find one, please let me know!\""; + close; + +L_pick_colour: + menu + "What are the ingredients you need?", L_description, + "Red", L_Red, + "Yellow", L_Yellow, + "Light blue", L_light_blue, + "Green", L_Green, + "Orange", L_Orange, + "Pink", L_Pink, + "Dark blue", L_dark_blue, + "Black", L_black, + "Purple", L_Purple, + "Dark Green", L_dark_green, + "Nothing, really.", L_Abort; + +L_description: + mes "[Rauk the Alchemist]"; + mes "\"The kinds of dyes I know are made from herbs – alizarin for red, gamboge for yellow, cobalt for blue, and mauve as binding agent for dark colors.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Some of the colors need more ingredients, including some that you can't find here, so I have to charge money for them."; + mes "Oh, and for a proper dark blue and purple I also need a pearl; without pearl dust they would not shimmer properly.\""; + next; + goto L_description_quick; + +L_description_quick: + menu + "What do you need for red dye?", L_d_red, + "What do you need for yellow dye?", L_d_yellow, + "What do you need for light blue dye?", L_d_light_blue, + "What do you need for green dye?", L_d_green, + "What do you need for orange dye?", L_d_orange, + "What do you need for pink dye?", L_d_pink, + "What do you need for dark blue dye?", L_d_dark_blue, + "What do you need for black dye?", L_d_black, + "What do you need for purple dye?", L_d_purple, + "What do you need for dark green dye?", L_d_dark_green, + "Actually...", L_NextMenu; + +L_NextMenu: + menu + "Can you make some dye for me, please?", L_pick_colour, + "Where can I get the herbs?", L_d_herbs, + "Where can I find pink petals?", L_d_pink_petals, + "Where can I find iron ore?", L_d_ore, + "Where can I find a pearl?", L_d_pearl, + "Where can I find maggot slime?", L_d_maggot_slime, + "I see. Thank you, and a good day to you!", L_Abort; + +L_d_herbs: + mes "[Rauk the Alchemist]"; + mes "\"Alizarin, mauve, cobalt and gamboge bushes grow in this general area. I haven't seen them nearby, but take a look around; I am sure you will find some.\""; + next; + goto L_description_quick; + +L_d_pink_petals: + mes "[Rauk the Alchemist]"; + mes "\"Just take some from the pink flowers around here. But be careful, they seem to be a bit fond of them.\""; + next; + goto L_description_quick; + +L_d_ore: + mes "[Rauk the Alchemist]"; + mes "\"Iron ore you should be able to find in some mine, I think. That's where people usually get it from, I have been told.\""; + next; + goto L_description_quick; + +L_d_pearl: + mes "[Rauk the Alchemist]"; + mes "\"A pearl... hm, that might be tricky. You normally find them in clams, but I haven't seen many of those here in the woodlands.\""; + next; + goto L_description_quick; + +L_d_maggot_slime: + mes "[Rauk the Alchemist]"; + mes "\"As the name might have given away already, maggot slime is most easily obtained from maggots. Still, there are some other creatures – such as bats – that secrete a similar kind of slime that for alchemistic purposes is equivalent.\""; + next; + goto L_description_quick; + +L_intermediate: + menu + "Can you make some dye for me?", L_pick_colour, + "Can you describe the ingredients?", L_description_quick, + "Never mind.", L_Abort; + +L_Ok3: + mes "[Rauk the Alchemist]"; + mes "\"Here is your dye. Remember to use all of it at once or the color may bleach out.\""; + next; + goto L_pick_colour; + +L_Red: + if (countitem("AlizarinHerb") < 10) + goto L_Red_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("AlizarinHerb") > 10) + goto L_TooMany; + delitem "AlizarinHerb", 10; + getitem "RedDye", 1; + goto L_Ok3; + +L_Red_fail: + mes "[Rauk the Alchemist]"; + mes "\"Hmm, sorry, but I do need ten alizarin leaves to make red dye.\""; + next; + goto L_intermediate; + +L_d_red: + mes "[Rauk the Alchemist]"; + mes "\"Red dye is fairly simple to make. Bring me ten leaves of alizarin, and I can brew it for you right away.\""; + next; + goto L_intermediate; + +L_Yellow: + if (countitem("GambogeHerb") < 10) + goto L_Yellow_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("GambogeHerb") > 10) + goto L_TooMany; + delitem "GambogeHerb", 10; + getitem "YellowDye", 1; + goto L_Ok3; + +L_Yellow_fail: + mes "[Rauk the Alchemist]"; + mes "\"Without enough gamboge leaves – I would need at least ten--, I can't make yellow dye for you.\""; + next; + goto L_intermediate; + +L_d_yellow: + mes "[Rauk the Alchemist]"; + mes "\"Yellow dye is no more than gamboge extract. If you get me ten gamboge leaves, I can make it easily.\""; + next; + goto L_intermediate; + +L_light_blue: + if (countitem("CobaltHerb") < 10) + goto L_light_blue_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 10) + goto L_TooMany; + delitem "CobaltHerb", 10; + getitem "LightBlueDye", 1; + goto L_Ok3; + +L_light_blue_fail: + mes "[Rauk the Alchemist]"; + mes "\"Sorry, but I won't give it to you for less than ten cobalt leaves.\""; + next; + goto L_intermediate; + +L_d_light_blue: + mes "[Rauk the Alchemist]"; + mes "\"Light blue dye is what you get if you let cobalt leaves sit in alcohol over night. I have some here and will trade it for ten fresh cobalt leaves.\""; + next; + goto L_intermediate; + +L_Green: + if (countitem("CobaltHerb") < 20) + goto L_Green_fail; + if (countitem("GambogeHerb") < 20) + goto L_Green_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 20 + && countitem("GambogeHerb") > 20) + goto L_TooMany; + if (Zeny < 1000) + goto L_Green_fail; + delitem "CobaltHerb", 20; + delitem "GambogeHerb", 20; + Zeny = Zeny - 1000; + getitem "GreenDye", 1; + goto L_Ok3; + +L_Green_fail: + mes "[Rauk the Alchemist]"; + mes "\"No... I need enough gamboge and cobalt to make your dye.\""; + mes "\"Twenty gamboge leaves, twenty cobalt leaves, and 1000 GP should be sufficient.\""; + next; + goto L_intermediate; + +L_d_green: + mes "[Rauk the Alchemist]"; + mes "\"Green dye is a little tricky to make, since you have to boil gamboge leaves at just the right temperature while stirring in a cobalt ester."; + mes "Making the cobalt ester is not easy, and every time I try I end up melting a crystal flask beyond repair...\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Thus, I will need twenty gamboge leaves, twenty cobalt leaves, and 1000 GP for materials."; + next; + goto L_intermediate; + +L_d_no_green: + mes "[Rauk the Alchemist]"; + mes "\"Come back when you are a little more experienced. I might be able to tell you how to make green dye then.\""; + close; + +L_Orange: + if (countitem("AlizarinHerb") < 10) + goto L_Orange_fail; + if (countitem("GambogeHerb") < 10) + goto L_Orange_fail; + if (countitem("IronOre") < 2) goto L_Orange_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("AlizarinHerb") > 10 + && countitem("GambogeHerb") > 10 + && countitem("IronOre") > 2) + goto L_TooMany; + if (Zeny < 1000) + goto L_Orange_fail; + delitem "AlizarinHerb", 10; + delitem "GambogeHerb", 10; + delitem "IronOre", 2; + Zeny = Zeny - 1000; + getitem "OrangeDye", 1; + goto L_Ok3; + +L_Orange_fail: + mes "[Rauk the Alchemist]"; + mes "\"I'm sorry, but I need 1000 GP, two chunks of iron ore, and ten each of gamboge and alizarin leaves.\""; + next; + goto L_intermediate; + +L_d_orange: + mes "[Rauk the Alchemist]"; + mes "\"Orange dye is fun to make, but it requires some burnt iron, and also consummate sulphur powder, which you cannot get here easily."; + mes "\"Still, for 1000 GP, two pieces of iron ore, ten alizarin leaves and ten gamboge leaves, I can make you a vial of orange dye.\""; + next; + goto L_intermediate; + +L_Pink: + if (countitem("AlizarinHerb") < 10) + goto L_Pink_fail; + if (countitem("PinkPetal") < 6) + goto L_Pink_fail; + if (Zeny < 1000) + goto L_Pink_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("AlizarinHerb") > 10 + && countitem("PinkPetal") > 6) + goto L_TooMany; + delitem "AlizarinHerb", 10; + delitem "PinkPetal", 6; + Zeny = Zeny - 1000; + getitem "PinkDye", 1; + goto L_Ok3; + +L_Pink_fail: + mes "[Rauk the Alchemist]"; + mes "\"No, you don't have all I need, and that would be ten alizarin leaves, six pink flower petals, and 1000 GP.\""; + next; + goto L_intermediate; + +L_d_pink: + mes "[Rauk the Alchemist]"; + mes "\"Pink dye... that's a funny one: you can't get proper pink out of the usual herbs. You do need ten leaves of alizarin, but you also need six pink flower petals."; + mes "To properly extract the pink from the petals, you have to boil it in concentrated utenum; I will have to charge 1000 GP for that.\""; + next; + goto L_intermediate; + +L_dark_blue: + if (countitem("CobaltHerb") < 100) + goto L_dark_blue_fail; + if (countitem("MauveHerb") < 50) + goto L_dark_blue_fail; + if (countitem("Pearl") < 1) + goto L_dark_blue_fail; + if (Zeny < 10000) + goto L_dark_blue_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 100 + && countitem("MauveHerb") > 50 + && countitem("Pearl") > 1) + goto L_TooMany; + delitem "CobaltHerb", 100; + delitem "MauveHerb", 50; + delitem "Pearl", 1; + Zeny = Zeny - 10000; + getitem "DarkBlueDye", 1; + goto L_Ok3; + +L_dark_blue_fail: + mes "[Rauk the Alchemist]"; + mes "\"I will need all of the ingredients to make dark blue dye for you.\""; + mes "\"I need 100 cobalt leaves, 50 mauve leaves, one pearl, and 10,000 GP.\""; + next; + goto L_intermediate; + +L_d_dark_blue: + mes "[Rauk the Alchemist]"; + mes "\"Dark blue dye is one of the trickiest ones. You need concentrated extract from 100 leaves of cobalt and 50 mauve leaves for proper binding."; + mes "For the right shimmer, a pearl is indispensible, and the most expensive part is a rare kind of ayanamian sapphire dust that I have to charge 10,000 GP for.\""; + next; + goto L_intermediate; + +L_Purple: + if (countitem("CobaltHerb") < 100) + goto L_Purple_fail; + if (countitem("AlizarinHerb") < 100) + goto L_Purple_fail; + if (countitem("MauveHerb") < 20) + goto L_Purple_fail; + if (countitem("Pearl") < 1) + goto L_Purple_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 100 + && countitem("AlizarinHerb") > 100 + && countitem("MauveHerb") > 20 + && countitem("Pearl") > 1) + goto L_TooMany; + if (Zeny < 40000) + goto L_Purple_fail; + delitem "CobaltHerb", 100; + delitem "AlizarinHerb", 100; + delitem "MauveHerb", 20; + delitem "Pearl", 1; + Zeny = Zeny - 40000; + getitem "PurpleDye", 1; + goto L_Ok3; + +L_Purple_fail: + mes "[Rauk the Alchemist]"; + mes "\"No... I don't think that you have enough ingredients for this. Let me check my notes.\""; + mes "\"What I need are 100 cobalt leaves, 100 alizarin leaves, 20 mauve leaves, one pearl, and 40,000 GP.\""; + next; + goto L_intermediate; + +L_d_purple: + mes "[Rauk the Alchemist]"; + mes "\"Hm, Purple dye... proper Tritan Purple is hard to make. Fortunately, the correct recipe has survived... but some ingredients are quite costly."; + mes "I can't even tell you why, unfortunately, since this is a bit of an alchemistic secret, and I really don't want to argue this out with people who can turn my nose into a rhubarb.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Still, I can make it for you, out of 100 cobalt leaves, 100 alizarin leaves, 20 mauve leaves, one pearl, and 40,000 GP. Some other ingredients are covered by the GP.\""; + next; + goto L_intermediate; + +L_black: + if (countitem("CobaltHerb") < 40) + goto L_black_fail; + if (countitem("AlizarinHerb") < 40) + goto L_black_fail; + if (countitem("GambogeHerb") < 40) + goto L_black_fail; + if (countitem("MauveHerb") < 40) + goto L_black_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 40 + && countitem("AlizarinHerb") > 40 + && countitem("GambogeHerb") > 40 + && countitem("MauveHerb") > 40) + goto L_TooMany; + if (Zeny < 20000) + goto L_black_fail; + delitem "CobaltHerb", 40; + delitem "AlizarinHerb", 40; + delitem "GambogeHerb", 40; + delitem "MauveHerb", 40; + Zeny = Zeny - 20000; + getitem "BlackDye", 1; + goto L_Ok3; + +L_black_fail: + mes "[Rauk the Alchemist]"; + mes "\"I am sorry, but you don't have all the items I need to make black dye. I need fourty leaves of alizarin, cobalt, gamboge and mauve each, and 20,000 GP.\""; + next; + goto L_intermediate; + +L_d_black: + mes "[Rauk the Alchemist]"; + mes "\"Black? Ah! such a wonderful choice of color. It's my favorite! Well, if you too want something black, I would be delighted to make you some black dye."; + mes "Just bring me 40 leaves each of cobalt, alizarin, gamboge and mauve.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Oh, and 20,000 GP for the charcoal and diamond dust mixture you need to keep the mauve smell out.\""; + next; + goto L_intermediate; + +L_dark_green: + if (BaseLevel < 30) + goto L_d_no_green; + if (QUEST_clothdyer_knowsdye != @QUEST_HAS_SOLVED_DYE_PUZZLE) + goto L_d_dark_green; + if (countitem("CobaltHerb") < 10) + goto L_dark_green_fail; + if (countitem("GambogeHerb") < 10) + goto L_dark_green_fail; + if (countitem("MauveHerb") < 10) + goto L_dark_green_fail; + if (countitem("MaggotSlime") < 1) + goto L_dark_green_fail; + if (Zeny < 1000) + goto L_dark_green_fail; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("CobaltHerb") > 10 + && countitem("GambogeHerb") > 10 + && countitem("MauveHerb") > 10 + && countitem("MaggotSlime") > 1) + goto L_TooMany; + delitem "CobaltHerb", 10; + delitem "MauveHerb", 10; + delitem "GambogeHerb", 10; + delitem "MaggotSlime", 1; + Zeny = Zeny - 1000; + getitem "DarkGreenDye", 1; + goto L_Ok3; + +L_dark_green_fail: + mes "[Rauk the Alchemist]"; + mes "Rauk frowns as he examines the items you hand him."; + mes "\"No, this will not do. I need ten gamboge leaves, ten cobalt leaves, ten mauve leaves, slime from one maggot, and 1000 GP.\""; + next; + goto L_intermediate; + +L_d_dark_green: + mes "[Rauk the Alchemist]"; + if (QUEST_clothdyer_knowsdye != @QUEST_HAS_SOLVED_DYE_PUZZLE) + goto L_d_dark_green_quest; + mes "\"Since we have figured out how much maggot slime we need for you, all you have to bring me are 1000 GP, one maggot slime, and ten leaves each of mauve, cobalt, and gamboge.\""; + next; + goto L_intermediate; + +L_d_dark_green_quest: + mes "\"Ah, dark green... dark green dye is actually simple to make, except for one tiny little problem: dark green clothes fade very quickly when they touch human skin. By far the best way to fixate the color is argentum powder, mixed with dark green dye essence extracted from maggot slime.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"But just how much maggot slime goes into the fixative and how much into the rest of the mixture varies completely for every individual. We will have to figure out just how many thousandth ounces it is for you before I can make dark green dye for you.\""; + next; + if (QUEST_clothdyer_knowsdye == @QUEST_CAN_GET_DYE_HERE) + QUEST_clothdyer_knowsdye = (rand(1000) + @QUEST_GUESS_BASE); + goto L_d_dark_green_q_main; + +L_d_dark_green_q_main: + menu + "Uh... no thanks.", L_intermediate, + "So nobody else can wear clothes I dye?", L_dark_green_q_wear, + "OK, what should I do?", L_VerdeEscuro_qexp, + "Let's figure it out!", L_VerdeEscuro_qguess; + +L_dark_green_q_wear: + mes "[Rauk the Alchemist]"; + mes "\"The color stabilises after a week or so."; + mes "Others can wear the clothes you have dyed – just make sure that you wear those clothes for a week before passing them on.\""; + next; + goto L_d_dark_green_q_main; + +L_VerdeEscuro_qexp2: + mes "[Rauk the Alchemist]"; + mes "Rauk blinks."; + mes "\"Very well. It works like this: you give me a maggot slime and tell me how many thousandth parts go into one part of the dye potion.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Then we try whether that was the right ratio. I will tell you if you guessed right, but if you were wrong, I will tell you whether you guessed too high or too low.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"With enough slimes and enough tries we should be able to figure out just how much you need.\""; + next; + menu + "Er... can you explain that again?", L_VerdeEscuro_qexp2, + "Let's do it!", L_VerdeEscuro_qguess, + "I don't have time for this.", L_intermediate; + +L_VerdeEscuro_qexp: + mes "[Rauk the Alchemist]"; + mes "\"We have to measure the balance between your light and your dark bile – two of your humors – and use that as the maggot slime concentration.\""; + mes "\"This will probably take several tries; for each try we need maggot slime from one maggot.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Each time you tell me how many thousandth parts of one ounce of the concentrate you want to use in the fixative. I will stir the mixture appropriately and put the rest of the slime into the base mixture. We then put the two together, and you dip your finger in.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"If the mixture is too dark, then that means that we put too much maggot slime into the fixative. If it discolours, we put in too little. But if it retains its color, we are done.\""; + next; + mes "[Rauk the Alchemist]"; + mes "Rauk smiles."; + mes "\"But don't worry, I will happily do all this for free – I rather enjoy these little games.\""; + next; + menu + "Er... can you explain that again?", L_VerdeEscuro_qexp, + "Errr... what?", L_VerdeEscuro_qexp2, + "Let's do it!", L_VerdeEscuro_qguess, + "I don't have time for this.", L_intermediate; + +L_VerdeEscuro_qguess: + if (countitem("MaggotSlime") < 1) + goto L_VerdeEscuro_noslim; + delitem "MaggotSlime", 1; + + mes "[Rauk the Alchemist]"; + mes "Rauk fills your maggot slime into a small bottle and picks a glass bottle from within his robe."; + mes "\"Now we need to figure out just how many thousandths you need. First, tell me how many tenths of an ounce you want to put in.\""; + next; + menu + "none", L_MenuItems1, + "1 tenth", L_MenuItems1, + "2 tenths", L_MenuItems1, + "3 tenths", L_MenuItems1, + "4 tenths", L_MenuItems1, + "5 tenths", L_MenuItems1, + "6 tenths", L_MenuItems1, + "7 tenths", L_MenuItems1, + "8 tenths", L_MenuItems1, + "9 tenths", L_MenuItems1; + +L_MenuItems1: + @menu = @menu - 1; + @guess_accumulator = @menu * 100; + + mes "[Rauk the Alchemist]"; + if (@menu) + mes "Rauk pours a good-sized portion of maggot slime from the small bottle into the glass bottle."; + mes "\"We now have " + @guess_accumulator + " thousandths of an ounce. How many hundredths of an ounce should I add?\""; + next; + menu + "none", L_MenuItems2, + "1 hundredth", L_MenuItems2, + "2 hundredths", L_MenuItems2, + "3 hundredths", L_MenuItems2, + "4 hundredths", L_MenuItems2, + "5 hundredths", L_MenuItems2, + "6 hundredths", L_MenuItems2, + "7 hundredths", L_MenuItems2, + "8 hundredths", L_MenuItems2, + "9 hundredths", L_MenuItems2; + +L_MenuItems2: + @menu = @menu - 1; + @guess_accumulator = @guess_accumulator + (@menu * 10); + + mes "[Rauk the Alchemist]"; + if (@menu) + mes "Rauk pours a portion of maggot slime from the small bottle into the glass bottle."; + mes "\"These are now " + @guess_accumulator + " thousandths of an ounce. How many thousands more?\""; + next; + menu + "none", L_MenuItems3, + "1 thousandth", L_MenuItems3, + "2 thousandths", L_MenuItems3, + "3 thousandths", L_MenuItems3, + "4 thousandths", L_MenuItems3, + "5 thousandths", L_MenuItems3, + "6 thousandths", L_MenuItems3, + "7 thousandths", L_MenuItems3, + "8 thousandths", L_MenuItems3, + "9 thousandths", L_MenuItems3; + +L_MenuItems3: + @menu = @menu - 1; + @guess_accumulator = @guess_accumulator + @menu; + + mes "[Rauk the Alchemist]"; + if (@menu) + mes "Rauk pours a tiny amount of maggot slime from the small bottle into the glass bottle."; + mes "Rauk mixes some more ingredients into the bottles, stirs them, heats one of them and mixes the results together."; + next; + + mes "[Rauk the Alchemist]"; + mes "\"Please put your finger in.\""; + mes "Hesitantly. you stick your finger into the resulting brew. The mixture feels warm and smooth to the touch."; + next; + mes "[Rauk the Alchemist]"; + mes "You pull your finger out again."; + + if (@guess_accumulator + @QUEST_GUESS_BASE > QUEST_clothdyer_knowsdye) + goto L_VerdeEscuro_muito; + + if (@guess_accumulator + @QUEST_GUESS_BASE < QUEST_clothdyer_knowsdye) + goto L_dark_green_q_little; + + // otherwise correct guess + + mes "Nothing seems to be happening with the mixture. Rauk's eyes lighten up."; + mes "\"This is it! You need precisely " + @guess_accumulator + " thousandts. Let me write this down...\""; + next; + mes "[Rauk the Alchemist]"; + mes "Rauk is beaming."; + mes "\"I can now make dark green dye for you. All I need will be slime from one maggot, ten gamboge leaves, ten cobalt leaves, ten mauve leaves, and 1000 GP for other ingredients.\""; + mes "[You gain 20,000 experience points]"; + getexp 20000, 0; + QUEST_clothdyer_knowsdye = @QUEST_HAS_SOLVED_DYE_PUZZLE; + next; + goto L_intermediate; + +L_VerdeEscuro_muito: + mes "After only a second, the mixture begins to blacken. Rauk frowns."; + mes "\"That was too much... you need fewer than " + @guess_accumulator + " thousandths, I think."; + goto L_dark_green_q_again; + +L_dark_green_q_little: + mes "Almost instantaneously, the mixture loses its colour and turns transparent. Rauk sighs."; + mes "\"That was too little. Next time, try more than " + @guess_accumulator + " thousandths."; + goto L_dark_green_q_again; + +L_dark_green_q_again: + mes "\"Should we try again?\""; + next; + menu + "Yes!", L_VerdeEscuro_qguess, + "No, I've had enough.", L_Abort; + +L_VerdeEscuro_noslim: + mes "[Rauk the Alchemist]"; + mes "\"Oh, you don't have any maggot slime? That's unfortunate; I am out of it myself. Still it should be easy enough to find, just bring me one and we can continue testing.\""; + next; + goto L_intermediate; + +L_monster_oil: + mes "[Rauk the Alchemist]"; + mes "Rauk locks his eyes with you and continues in more serious tone."; + mes "\"I know how to create it, but you won't get it from me. It's far too dangerous; even the best alchemist may need multiple attempts and will risk blowing up! I can give you a recipe though, if you still are wanton.\""; + next; + menu + "Yes, tell me!", L_Next3, + "No, that sounds too dangerous.", L_Abort; + +L_Next3: + mes "[Rauk the Alchemist]"; + mes "You will need a pearl, a pair of snake skins, two piles of volcanic ash, three black scorpion stingers – and a golden scorpion stinger. In addition you must have plenty of herbs to stabilise the concoction; mauve, alizarin, cobalt and gamboge will do just fine."; + next; + mes "[Rauk the Alchemist]"; + mes "\"Take the pearl, skins, black stingers, ash, and cook briefly in a cauldron. Next add the mauve/alizarin/cobalt/gamboge as needed to stabilise into a black brew. Lastly, add the golden scorpion stinger and let boil briefly. And it's done.\""; + next; + mes "[Rauk the Alchemist]"; + mes "\"Good luck not blowing up!\""; + @Q_status = @Q_status | @SETZER_KNOWS_STINGER; + callsub L_Update_Var; + close; + +L_Abort: + close; + +L_Update_Var: + set QUEST_Forestbow_state, + (QUEST_Forestbow_state & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; + +L_TooMany: + mes "[Rauk the Alchemist]"; + mes "You don't have room for this."; + close; +} diff --git a/npc/011-1/auldsbel.txt b/npc/011-1/auldsbel.txt new file mode 100644 index 00000000..01abe364 --- /dev/null +++ b/npc/011-1/auldsbel.txt @@ -0,0 +1,1291 @@ + +011-1,50,68,0 script Auldsbel#_M NPC168,{ + @mexp = MAGIC_EXP; + + @Q_STATUS_INITIAL = 0; + @Q_STATUS_POSTINTRO = 1; + set @Q_STATUS_INITIATION, 2; // quest for being able to cast `create mouboo figurine' + set @Q_STATUS_STUDENT, 3; // accepted as student + set @Q_STATUS_STUDENT0, 4; // accepted as student + @Q_STATUS_STUDENT1 = 5; + @Q_STATUS_STUDENT2 = 6; + @Q_STATUS_STUDENT3 = 7; + @Q_STATUS_STUDENT4 = 8; + @Q_STATUS_STUDENT5 = 9; + + + set @wants_sulphur, (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) // war quest + || (((QUEST_MAGIC2 & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT) >= 4); // Elanore's heal-Kadiya quest + @wants_ironpowder = (((QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT) >= 7); + + @Q_MASK = NIBBLE_0_MASK | NIBBLE_1_MASK; + @Q_SHIFT = NIBBLE_0_SHIFT; + + @Q_status = (QUEST_MAGIC & @Q_MASK) >> @Q_SHIFT; + + @Q_main_status = @Q_status & 31; + @Q_component_quest = @Q_status >> 5; + + @has_magic = getskilllv(SKILL_MAGIC); + + if (@Q_main_status >= @Q_STATUS_POSTINTRO) + goto L_short_intro; + + mes "[Robed Man]"; + mes "You notice a middle-aged man in expensive-looking robes."; + mes "\"Ah, splendid, you finally came!\""; + mes "He motions you to come closer."; + next; + mes "[Robed Man]"; + mes "The man is visibly excited."; + mes "\"Here, I found a silk cocoon. Now if you can just give me the obsidian salt, we can see whether it works!\""; + next; + menu + "Whether what works?", L_Intro_explain, + "What are you talking about?", L_Intro_explain, + "I don't have any obsidian salt.", L_Intro_nopowder, + "Do I know you?", L_Intro_identity, + "Goodbye.", L_close; + +L_Intro_explain: + mes "[Robed Man]"; + mes "He frowns."; + mes "\"The transmutation experiment, of course! You can't have forgotten already...?\""; + next; + goto L_Intro_identity; + +L_Intro_nopowder: + mes "[Robed Man]"; + mes "\"What!? You traveled all this way without any obsidian...\""; + next; + goto L_Intro_identity; + +L_Intro_identity: + mes "[Robed Man]"; + mes "He eyes you more carefully."; + mes "\"Wait. You're not Padric.\""; + next; + @xmsg$ = "Right... my name is " + strcharinfo(0) + "."; + if (strcharinfo(0) == "Padric") + @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, + "Who are you?", L_Intro_who_are_you, + "Goodbye.", L_close; + +L_Intro_wrongperson: + mes "[Robed Man]"; + mes "He laughs."; + mes "\"Ah, I knew it... you're not the first one today, either. I should apologize, I am horrible with faces. Well, if you don't mind, please hurry along, I should go back to my experiments.\""; + next; + goto L_Intro_primary_menu; + +L_Intro_primary_menu: + menu + "Who are you?", L_Intro_who_are_you, + "Goodbye.", L_close; + +L_Intro_nogood: + mes "[Robed Man]"; + mes "He laughs."; + mes "\"Yes, you could say that. Well, I shall get back to my experiments, then; I think I shall manage something that requires no obsidian salt instead.\""; + next; + menu + "Who are you?", L_Intro_who_are_you, + "What is obsidian salt, anyway?", L_Intro_obsidian_salt, + "Goodbye.", L_close; + +L_Intro_obsidian_salt: + mes "[Robed Man]"; + mes "\"Oh, obsidian salt is a catalyst... or rather a theoretical catalyst. We know that it has to have an application somewhere, and I do have the strong suspicion that it may be linked to natural transmogrification...\""; + next; + goto L_Intro_primary_menu; + +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 Graying, of the Council of Transmuters!\""; + next; + + @Q_main_status = @Q_STATUS_POSTINTRO; + callsub S_Update_Var; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_AULDSBEL; + + mesn l("Auldsbel the Wizard"); + mes "\"That means that I'm a wizard, in case you were wondering.\""; + next; + goto L_Main_menu; + +L_short_intro: + mesn l("Auldsbel the Wizard"); + mes "\"Welcome back, Padric!\""; + next; + goto L_Main_menu; + +L_Main_menu: + if (@has_magic) + goto L_Main_menu_magic; + + menu + "How does this 'magic' work?", L_about_magic, + "I want to become a wizard!", L_learn_magic, + "Where are you from?", L_about_auldsbel, + "Do you need help with your experiments?", L_Quest, + "What do you know about...", L_Question, + "Goodbye.", L_close; + +L_Main_menu_magic: + if (@wants_sulphur && @wants_ironpowder) + menu + "How does magic work?", L_about_magic, + "Can you teach me a spell?", L_learn_spell, + "Where are you from?", L_about_auldsbel, + "Do you need help with your experiments?", L_Quest, + "What do you know about...", L_Question, + "Can you make sulphur powder?", L_Sulphur, + "Can you make iron powder?", L_Ironpowder, + "Goodbye.", L_close; + if (@wants_sulphur && !@wants_ironpowder) + menu + "How does magic work?", L_about_magic, + "Can you teach me a spell?", L_learn_spell, + "Where are you from?", L_about_auldsbel, + "Do you need help with your experiments?", L_Quest, + "What do you know about...", L_Question, + "Can you make sulphur powder?", L_Sulphur, + "Goodbye.", L_close; + 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, + "Goodbye.", L_close; + +L_Ironpowder: + mesn l("Auldsbel the Wizard"); + mes "\"No, I do not know the spell for this. I expect that it shouldn't be too hard an invocation, but I'm too busy to work it out.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"I know that they used to make iron ore around here, though, many years ago. Perhaps the secret is still hidden somewhere?\""; + next; + goto L_Main_menu; + +L_Sulphur: + mesn l("Auldsbel the Wizard"); + @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:20, for " + @Cost + " GP.\""; + next; + if (@Q_main_status >= @Q_STATUS_STUDENT) + menu + "No, thank you.", L_close, + "I will see what I can find.", L_close, + "Can you teach me how to make it myself?", L_Sul_t_s, + "Here you are.", L_Sulphur_buy; + menu + "No, thank you.", L_close, + "I will see what I can find.", L_close, + "Here you are.", L_Sulphur_buy; + +L_Sulphur_buy: + if (Zeny < @Cost) + goto L_Sulphur_noZeny; + if (countitem("PileOfAsh") < 1) + goto L_Sulphur_noash; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("SulphurPowder") > 1 + && countitem("PileOfAsh") == 0) + goto L_Sulphur_noroom; + + Zeny = Zeny - @Cost; + delitem "PileOfAsh", 1; + getitem SulphurPowder, 20; + mesn l("Auldsbel the Wizard"); + mes "\"I shall transmute it later. Here, have five half-ounces from my own stock.\""; + next; + goto L_Main_menu; + +L_Sulphur_noZeny: + mesn l("Auldsbel the Wizard"); + mes "\"No GP, no service.\""; + next; + goto L_Main_menu; + +L_Sulphur_noash: + mesn l("Auldsbel the Wizard"); + mes "\"Without volcanic ash, I can't give you any sulphur powder. Try hunting some fire goblins, or somesuch.\""; + next; + goto L_Main_menu; + +L_Sulphur_noroom: + mesn l("Auldsbel the Wizard"); + mes "\"Hmm, you really managed to squeeze something into every little place you had that we could have stored the powder in... you might want to return once you have resolved this matter.\""; + next; + goto L_Main_menu; + +L_Sul_t_s: + if (@Q_component_quest <= 4) + goto L_Sul_t_s_no; + mesn l("Auldsbel the Wizard"); + mesq l("Very well, then. You have been quite helpful with my experiments, after all. As you may have noticed, the spell takes a pile of volcanic ashes. Close your hands around it, then whisper the invocation."); + next; + mesn l("Auldsbel the Wizard"); + mesq l("That invocation is '%s'.", b("Gole")); + learnskill SKILL_GOLE; + next; + mesn l("Auldsbel the Wizard"); + mesq l("You may find that you can transmute the powder more effectively after a while; that is perfectly natural."); + next; + goto L_Main_menu; + +L_Sul_t_s_no: + mesn l("Auldsbel the Wizard"); + mesq l("Hmm... how about this: you help me with a few of my experiments, and I tell you?"); + next; + menu + "Very well, I will help you.", L_Quest, + "No.", L_Next; + +L_Next: + mesn l("Auldsbel the Wizard"); + mesq l("Then I fear that I shall not reveal the spell to you either."); + next; + goto L_Main_menu; + +L_about_magic: + mesn l("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.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Most spells are claimed by one of the five schools of magic. To properly use them, a magic user need not only have sufficient prowess in magic overall, but also in the specifics of that particular school.\""; + next; + goto L_a_m_minimenu; + +L_a_m_minimenu: + menu + "What are the five schools?", L_a_m_schools, + "How can I advance in magic?", L_a_m_advance, + "How do spells work?", L_a_m_spells, + "Where can I learn spells?", L_a_m_learn, + "Never mind.", L_Main_menu; + +L_a_m_schools: + mesn l("Auldsbel the Wizard"); + mes "\"With few exceptions, all spells belong to one of the five schools of magic: Transmutation, War, Astral, Life, and Nature.\""; + next; + goto L_a_s_minimenu; + +L_a_s_minimenu: + menu + "What's Transmutation magic?", L_about_transmutation, + "What's War magic?", L_about_war, + "What's Astral magic?", L_about_astral, + "What's Life magic?", L_about_life, + "What's Nature magic?", L_about_nature, + "Are there other spells?", L_about_other_spells, + "Thank you.", L_a_m_minimenu; + +L_about_transmutation: + mesn l("Auldsbel the Wizard"); + mes "\"Transmutation magic deals with forming matter into a new shape. Some advanced transmutation magic can also expose special properties of the material in question.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "He smiles."; + mes "\"Transmutation magic is the engine of human civilization. By allowing us to shape buildings, tools, and other items according to the power of our imagination, it gives us mastery over nature.\""; + next; + goto L_a_s_minimenu; + +L_about_astral: + mesn l("Auldsbel the Wizard"); + mes "\"Astral magic comprises a family of spells that connect the caster to the Astral World. This connection can be used to pull the caster 'through'-- effectively teleporting them – or to 'pull others through'-- summoning creatures.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"There are also some more direct uses of powers of the Astral World; mainly spells that affect other spells.\""; + next; + goto L_a_s_minimenu; + +L_about_war: + mesn l("Auldsbel the Wizard"); + mes "\"War magic deals with the inevitable necessity of struggle against other creatures, and sometimes even against other humans. War magic exclusively focuses on dealing damage and destruction.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"If you use War magic, you better have a Transmuter around for the aftermath, to clear up your collateral damage.\""; + next; + goto L_a_s_minimenu; + +L_about_life: + mesn l("Auldsbel the Wizard"); + mes "\"Life magic deals with healing. Not much of a surprise there.\""; + next; + goto L_a_s_minimenu; + +L_about_nature: + mesn l("Auldsbel the Wizard"); + mes "\"Nature magic is a rather subtle (and, in my eyes, rather weak) kind of magic that deals with manipulating nature as it is. Think of it as Transmutation magic without being able to actually shape things the way you want.\""; + next; + goto L_a_s_minimenu; + +L_about_other_spells: + mesn l("Auldsbel the Wizard"); + mesq l("A few spells are not claimed by any particular school of magic. In practice, this means that anyone can cast them if they just have sufficient magical power. The most prominent example is the '%s' spell.", b("monsterinfo")); + if (getskilllv(SKILL_MAGIC) > 1) + learnskill SKILL_MONSTERINFO; + next; + goto L_a_s_minimenu; + +L_a_m_advance: + mesn l("Auldsbel the Wizard"); + mes "\"Advancing in your magical powers must come from two sources: from within and from a person who can guide you in whichever school of magic you wish to advance.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"For advancing in your general magic power, you must practice magical spells. Make sure to vary them; you will learn little if you cast the same spell over and over. Also, spells that consume no components seem not to be very instructive in practice.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Once you have gathered enough spellcasting experience, you should be able to advance to the next level of magic. If you received your magic from a sponsor, you may have to seek out the sponsor again to advance.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Similarly, to advance in a particular school of magic, you should seek out someone sufficiently competent in that school. Each school has a different rite for advancing its students, so make sure to talk to the right person.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"I myself am a Transmutation Wizard. Of course I know some spells from the other schools, but my focus is on Transmutation. Theoretically speaking, I can advance you in this school.\""; + next; + goto L_a_m_minimenu; + +L_a_m_learn: + mesn l("Auldsbel the Wizard"); + mes "\"Finding and learning new spells is of course important in a magic user's quest towards becoming a full-fledged wizard.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Some wizards will be willing to share their knowledge, usually for a price. But they are not the only sources of magical spells: many magical books contain spells, and you can occasionally find them written down in the most unusual of places.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Some are even hiding as part of folklore or gossip. Of course, for those it can sometimes be hard to determine just what their prerequisites are...\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"If you decide to hunt for spells, make sure to keep a journal with you. Some spell invocations may only cross your path once in your lifetime; you must not allow them to get away!\""; + next; + goto L_a_m_minimenu; + +L_a_m_spells: + mesn l("Auldsbel the Wizard"); + mes "\"Magical spells are shortcuts, true magic bound to a word. No-one today remembers how they were created at the beginning of time, though many have tried to find it out, and failed...\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"These magical words are the spells' invocations. Spoken by someone who can't use magic, or by someone who doesn't satisfy the prerequisites, the word stands just for itself.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"But when spoken by a competent magic user, the word may unleash its effect – consuming any components it may require, draining the caster's mana, changing the world around it.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Some spells require catalysts on top of components, others vary in power depending on whom they are cast on or under what conditions. However, all spells are affected by the caster's astral power.\""; + next; + goto L_a_sp_minimenu; + +L_a_sp_minimenu: + menu + "What is this 'astral power'?", L_about_astral_power, + "What is a catalyst?", L_about_catalysts, + "What is a component?", L_about_components, + "What other prerequisites are there?", L_a_oth_prereq, + "Where can I learn spells?", L_a_m_learn, + "How often can I cast spells?", L_about_speed, + "Never mind.", L_a_m_minimenu; + +L_about_astral_power: + mesn l("Auldsbel the Wizard"); + mes "\"A person's astral power is determined by several factors: overall experience, intelligence, and any and all equipment the person may be wearing at a given time.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Greater astral power means more powerful spells. Since equipment can greatly decrease astral power, most magic users tend to be careful about what they wear – it takes a while to recover astral power even after armour is unequipped.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"The worst offenders are metal items, particularly shields and body armour. Helmets and gloves get in the way, too. Still, a few special or enchanted items may even increase magical power.\""; + next; + goto L_a_sp_minimenu; + +L_about_catalysts: + mesn l("Auldsbel the Wizard"); + mes "\"A catalyst is a material prerequisite to a spell that is not consumed as part of the spell. For example, the Transmuter's Tablet is required to properly perform many of the more powerful transmutation spells, but it is never consumed.\""; + next; + goto L_a_sp_minimenu; + +L_about_components: + mesn l("Auldsbel the Wizard"); + mes "\"A material component is an item that is consumed as part of the spells magic. For example, when transmuting wood into arrows, you must consume a raw log to shape the arrows out of it.\""; + next; + goto L_a_sp_minimenu; + +L_a_oth_prereq: + mesn l("Auldsbel the Wizard"); + mes "\"Some spells have additional requirements – they can only be cast underground, or when you are standing very close to the person you are casting them on, or only when you are wearing a particular enchanted item. Spells are quirky, so read their descriptions carefully – if you do find a description.\""; + next; + goto L_a_sp_minimenu; + +L_about_speed: + mesn l("Auldsbel the Wizard"); + mes "\"Most spells are effective immediately, unless they require some complex astral connection – summoning or teleporting can take a while to take effect, for example. Still, after casting a spell you usually need a moment to recover before casting the next.\""; + next; + goto L_a_sp_minimenu; + +L_about_auldsbel: + mesn l("Auldsbel the Wizard"); + mes "\"Well, there is no harm in giving you the general picture, I suppose.\""; + mes "He sighs, as if he had been forced to repeat something one time too many."; + mes "\"I am from the Council of Transmuters, the head organ of organized Transmutation magic in the known world.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"The council oversees recruitment, education, accreditation, and, if necessary, disciplining of Transmuters."; + mes "It ensures that Transmuter conduct is according to its statutes and acts as representative and point of contact towards other entities.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Of all the schools of magic, the School of Transmutation is the most organised by far, and held in high esteem by rulers all across the world. Of course this is not only due to the outstanding and rigid structure of the school, but also because of the exceptional services that its members provide.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"The Council, presently overseen by Lord Transmogrifier Pontorias the Plaid (May His Shape Reflect His Soul Forever), consists of fourty-nine members and is situated in the citadel of Dorngard, in the northern mountains near the Crimson Cascade.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"The Council is sovereign over three hundred acres of land and nearby farming communities and has been ever since Yorick the Younger shaped Dorngard out of a mountain by sheer power of will, to build a home for the school his father had founded.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"The Council has held peaceful relations with nearby realms for almost two centuries now and is widely regarded as a reliable partner in shaping civilization to allow it to evolve towards its next stage.\""; + next; + menu + "All right, but what about you?.", L_about_auldsbel_2, + "Never mind.", L_Main_menu; + +L_about_auldsbel_2: + mesn l("Auldsbel the Wizard"); + mes "\"Oh, myself? I am just vacationing in the area. Very relaxed and peaceful place, the Hurnscald area. And plenty of splendid specimens for experimentation.\""; + next; + goto L_Main_menu; + +L_learn_magic: + mesn l("Auldsbel the Wizard"); + mes "Auldsbel laughs heartily."; + mes "\"Hah, if only it were so easy! No, my young friend, I fear that 'learning magic' here is not an option. Either you are born with it, or without.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Sure, there are a few entities that may grant you magic – Ether Spirits or Mana Seeds or Great Dragons – but those are the stuff of legends, so I suggest that you don't waste your life trying to find one of them.\""; + next; + goto L_Main_menu; + +L_Question: + callfunc "MagicTalkOptionsSetup"; + @ignore = @QQ_AULDSBEL; + callfunc "MagicTalkMenu"; + + if (@c == 0) + goto L_Main_menu; + if (@c == @QQ_ELANORE) + goto L_Q_elanore; + if (@c == @QQ_MANASEED) + goto L_Q_manaseed; + if (@c == @QQ_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; + if (@c == @QQ_OLDWIZ) + goto L_Q_old_wizard; + if (@c == @QQ_ASTRALSOUL) + goto L_Q_astralsoul; + + mesn l("Auldsbel the Wizard"); + mes "\"Let us talk about something else.\""; + next; + goto L_Main_menu; + +L_Q_astralsoul: + if (!(getskilllv(SKILL_ASTRAL_SOUL))) + goto L_Q_astralsoul_L; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Oh that is a really useful focus. It will help you doing magic of all kinds.\""; + next; + mes "\"...uhm...\""; + next; + mes "\"Didn't I teach you the ability to focus on magic, did I?\""; + goto L_Main_menu; + +L_Q_astralsoul_L: + mesn l("Auldsbel the Wizard"); + mes "\"Oh that is a really useful focus. It will help you doing magic of all kinds.\""; + next; + mes "\"I can try to teach you this ability.\""; + next; + mes "\"But I will need some very expensive magical substances to focus your brain onto magic.\""; + next; + mes "\"It is about... erm, 11300 GP. Do you have so much money?\""; + menu + "Here you are", L_Q_astralsoul_L1, + "I will get it.", L_Main_menu; + +L_Q_astralsoul_L1: + if (Zeny < 11300) + goto L_Q_astralsoul_nz; + Zeny = Zeny - 11300; + mesn l("Auldsbel the Wizard"); + mes "\"Okay, listen:\""; + next; + mes "\"Some parts of your brain is still unused. These parts will now get the ability to get focused to magic.\""; + next; + mes "\"To do so, think of a magic spell!\""; + next; + mes "Auldsbel mumbles some invocations"; + next; + @SUP_lvl = 1; + @SUP_id = SKILL_ASTRAL_SOUL; + @SUP_name$ = "Astral Soul"; + @SUP_xp = 2500; + callfunc "SkillUp"; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Now go and try to find someone who can actually activate that focus.\""; + next; + mes "\"You have the powers to focus on magic, but you need to get magic focused now.\""; + goto L_Main_menu; + +L_Q_astralsoul_nz: + mesn l("Auldsbel the Wizard"); + mes "\"When learning powerful stuff, you should try not to make so many jokes.\""; + next; + mes "\"Come back when you have the money.\""; + goto L_Main_menu; + +L_Q_old_wizard: + mesn l("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; + mesn l("Auldsbel the Wizard"); + mes "\"I have not had the opportunity to talk to him too much, though.\""; + next; + goto L_Main_menu; + +L_Q_imp: + mesn l("Auldsbel the Wizard"); + mes "\"There are many different kinds of spirits in the world. Some are good-natured, others evil; some are weak, others very powerful. I don't know the particular one you have encountered, though I urge caution.\""; + next; + goto L_Main_menu; + +L_Q_elanore: + mesn l("Auldsbel the Wizard"); + mes "\"Ah, Elanore. A kind little woman. Also a very proficient healer, from what I have been told, though we have interacted little. If you are interested in Life magic, you might want to talk to her.\""; + next; + goto L_Main_menu; + +L_Q_wyara: + mesn l("Auldsbel the Wizard"); + mes "\"The village witch? Not exactly the brightest person, but she has managed to figure out how to brew potions. I doubt that she can do any real magic, though.\""; + next; + goto L_Main_menu; + +L_Q_sagatha: + mesn l("Auldsbel the Wizard"); + mes "Auldsbel frowns."; + mes "\"That witch, hmm? She's a well-known trouble-maker, and quite a clever one at that; she once prevented us from cutting down a forest near Dorngaard that the villages wanted to use for farming, using some ingenious magic.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"That woman has spent too much time alone in the forests... I have the strong suspicion that she is more loyal towards her animals than towards us humans! I recommend that you stay away from her, if you value your well-being.\""; + next; + goto L_Main_menu; + +L_Q_manaseed_rumour: + mes "\"A mana seed? Around here? Nah, they've been pulling your leg. Those things are extremely rare, after all.\""; + next; + goto L_Main_menu; + +L_Q_manaseed: + mesn l("Auldsbel the Wizard"); + if (@has_magic) + goto L_Q_manaseed_withmagic; + if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANASEED)) // rumour only? + goto L_Q_manaseed_rumour; + if (MAGIC_FLAGS & MFLAG_DRANK_POTION) + goto L_Q_manaseed_prepared; + if (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED) + goto L_Q_ms_tou; + mes "\"You have found an actual 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; + mesn l("Auldsbel the Wizard"); + 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; + +L_Q_ms_tou: + if (MAGIC_FLAGS & MFLAG_DRANK_POTION) + goto L_Q_manaseed_prepared; + mes "\"So you touched the Mana Seed, and its power flowed right through you? You are lucky – it is willing to share – but you are also unlucky, in that you lack the discipline and control needed to contain this power.\""; + next; + if (MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION) + goto L_Q_ms_tou_short; + mesn l("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 for you it might be worth trying it out.\""; + next; + MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_MANAPOTION; + goto L_Q_ms_tou_short; + +L_Q_ms_tou_short: + menu + "Where can I get a Mana Potion?", L_where_mana_potion, + "Can you make a Mana Potion?", L_make_mana_potion, + "Thank you.", L_Main_menu; + +L_where_mana_potion: + mesn l("Auldsbel the Wizard"); + mes "\"Well, quite a few alchemists should be able to brew one for you. Or maybe the village witch, even, though I personally would recommend seeing an alchemist.\""; + next; + goto L_Q_ms_tou_short; + +L_make_mana_potion: + mesn l("Auldsbel the Wizard"); + 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.", L_Next1, + "I will look for those items.", L_Main_menu, + "I'm not interested.", L_Q_ms_tou_short; + +L_Next1: + if (Zeny < 10000) + goto L_make_mp_miss; + if (countitem("GambogeHerb") < 10) + goto L_make_mp_miss; + if (countitem("MauveHerb") < 20) + goto L_make_mp_miss; + if (countitem("Pearl") < 1) + goto L_make_mp_miss; + if (countitem("BottleOfWater") < 1) + goto L_make_mp_miss; + getinventorylist; + if (@inventorylist_count == 100 + && countitem("GambogeHerb") > 10 + && countitem("MauveHerb") > 20 + && countitem("Pearl") > 1 + && countitem("BottleOfWater") > 1 + && countitem("ManaPotion") < 1) + goto L_mana_potion_toomuch; + Zeny = Zeny - 10000; + delitem "GambogeHerb", 10; + delitem "MauveHerb", 20; + delitem "Pearl", 1; + delitem "BottleOfWater", 1; + getitem "ManaPotion", 1; + + mesn l("Auldsbel the Wizard"); + mes "Auldsbel pockets your GP and the pearl, then stuffs the leaves into the bottle. Holding the bottle between his hands, he focuses briefly. The water and leaves flash bright red, then the leaves dissolve."; + next; + mesn l("Auldsbel the Wizard"); + mes "The wizard pours the resultant mixture into a different bottle. \"It will lose its power quickly if left in a glass bottle\", he explains."; + mes "He hands you the final result, which feels surprisingly heavy."; + next; + menu + "Thank you!", L_Main_menu, + "What about the pearl and GP?", L_Next2; + +L_Next2: + mesn l("Auldsbel the Wizard"); + mes "Auldsbel raises his eyebrows in surprise."; + mes "\"Those were payment. You don't expect me to work for free, now do you?\""; + next; + goto L_Main_menu; + +L_mana_potion_toomuch: + mesn l("Auldsbel the Wizard"); + mes "\"Burdened 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_mp_miss: + mesn l("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_Main_menu; + +L_Q_manaseed_prepared: + mes "\"So you found a Mana Seed and prepared yourself by drinking a mana potion? I recommend that you visit the seed again and see if that actually works...\""; + next; + goto L_Main_menu; + +L_Q_manaseed_withmagic: + if (MAGIC_FLAGS & MFLAG_MANASEED_MAXEDOUT) + goto L_Q_manaseed_maxedout; + mes "\"I still find it hard to believe that you have found an actual Mana Seed here, in the middle of nowhere... Well, I suggest that you keep visiting it. As your control over magic grows, it may grant you additional power.\""; + next; + goto L_Main_menu; + +L_Q_manaseed_maxedout: + mes "\"So the mana seed isn't giving you any more power? You might want to try again later; normally those seeds grow in power, over time.\""; + next; + goto L_Main_menu; + +L_Quest: + if (@Q_component_quest == 0) + goto L_c_quest_0; + if (@Q_component_quest == 1) + goto L_c_quest_1; + if (@Q_component_quest == 2) + goto L_c_quest_2; + if (@Q_component_quest == 3) + goto L_c_quest_3; + if (@Q_component_quest == 4) + goto L_c_quest_4; + if (@Q_component_quest == 5) + goto L_c_quest_5; + mesn l("Auldsbel the Wizard"); + mes "\"You have been very helpful, but at this point I have everything I need. Except perhaps for a Wumpus Egg, though I have no idea where you could find one... If you ever come across one, I will give you a special reward for it, though.\""; + next; + goto L_Main_menu; + +L_c_quest_0: + mesn l("Auldsbel the Wizard"); + mes "Auldsbel is visibly delighted."; + mes "\"Ah, indeed, indeed! I can often use help with my experiments, and you just happen to be arriving at a particularly opportune time. See, I found this...\""; + mes "He pulls something from his pocket and shows it to you."; + next; + mesn l("Auldsbel the Wizard"); + mes "\"It's a silk cocoon. This area has been virtually infested with silkworms, from what I have seen. This is splendid! I will try to... do something very special with this one. But for that I will need twenty Mauve leaves.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"There are plenty of Mauve plants around, so I'm sure that you won't have a hard time finding the leaves.\""; + next; + menu + "I have them here.", L_Next3, + "Sure, I will look for them.", L_Main_menu; + +L_Next3: + if (countitem ("MauveHerb") < 20) + goto L_c_quest_missing; + delitem "MauveHerb", 20; + Zeny = Zeny + 2500; + mesn l("Auldsbel the Wizard"); + mes "\"Well done, my young friend! Here is 2,500 GP to compensate you for your efforts.\""; + mes "[You gain 250 experience points]"; + getexp 250, 0; + @Q_component_quest = 1; + callsub S_Update_Var; + next; + goto L_Main_menu; + +L_c_quest_1: + mesn l("Auldsbel the Wizard"); + mes "\"Good, good... I am trying to come up with a way to best use the Mauve leaves you brought me, but it seems that I will need further components. I am not sure about the exact composition yet, but I will need a few potions.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Please be a good helper and get me an iron potion, a concentration potion, and three small and three medium healing potions.\""; + next; + menu + "Here you are.", L_Next4, + "I'm not your 'good helper'!", L_Main_menu, + "I'll see what I can do.", L_Main_menu; + +L_Next4: + if (countitem ("SmallHealingPotion") < 3) + goto L_c_quest_missing; + if (countitem ("MediumHealingPotion") < 3) + goto L_c_quest_missing; + if (countitem ("IronPotion") < 1) + goto L_c_quest_missing; + if (countitem ("ConcentrationPotion") < 1) + goto L_c_quest_missing; + delitem "SmallHealingPotion", 3; + delitem "MediumHealingPotion", 3; + delitem "IronPotion", 1; + delitem "ConcentrationPotion", 1; + Zeny = Zeny + 2500; + mesn l("Auldsbel the Wizard"); + mes "\"Ah, excellent, excellent! These are precisely what I needed. Here is another 2,500 GP to compensate you for your efforts.\""; + mes "[You gain 500 experience points]"; + getexp 500, 0; + @Q_component_quest = 2; + callsub S_Update_Var; + next; + goto L_Main_menu; + +L_c_quest_2: + mesn l("Auldsbel the Wizard"); + mes "\"Ah! Excellent! Yes, yes, indeed I need help. I have managed to transmute the components you brought me into a liquid that I believe to be a demetamorphosis stock, but it seems that the details still need some fine-tuning, and I am out of silk cocoons...\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"I would like to run the next batch of experiments on a larger scale, though. Would you be so kind as to fetch me one hundred silk cocoons, please?\""; + next; + menu + "One hundred cocoons, here you are.", L_Next5, + "That's a lot; I'll see what I can do.", L_Main_menu; + +L_Next5: + if (countitem ("SilkCocoon") < 100) + goto L_c_quest_missing; + delitem "SilkCocoon", 100; + Zeny = Zeny + 5000; + mesn l("Auldsbel the Wizard"); + mes "\"Splendid, splendid! Here is 5,000 GP for you.\""; + mes "Auldsbel attempts to cram the cocoons into his pockets, with little success. Finally he gives up and takes them into his hut."; + mes "[You gain 2,000 experience points]"; + getexp 2000, 0; + @Q_component_quest = 3; + callsub S_Update_Var; + next; + goto L_Main_menu; + +L_c_quest_3: + mesn l("Auldsbel the Wizard"); + mes "\"Yes... I'm actually not certain that my demetamorphosis stock will not drain the life out of these little creatures. Perhaps an alchemical revitalization tincture would be called for. Fortunately this one is easy, I can make it myself.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"I'm still not sure how to integrate it into the spell... but leave that to me. Can you get me twenty-five red scorpion stingers and twenty-five lumps of maggot slime? Those should be just what I need.\""; + next; + menu + "Here are your stingers and slimes.", L_Next6, + "I will get back to you once I have them.", L_Main_menu; + +L_Next6: + if (countitem ("RedScorpionStinger") < 25) + goto L_c_quest_missing; + if (countitem ("MaggotSlime") < 25) + goto L_c_quest_missing; + delitem "RedScorpionStinger", 25; + delitem "MaggotSlime", 25; + Zeny = Zeny + 5000; + mesn l("Auldsbel the Wizard"); + mes "\"Good helper! Another 5,000 GP for you.\""; + mes "\"I believe that I have figured out one possible way to integrate the tincture into the spell... I will let you know how that goes.\""; + mes "[You gain 10,000 experience points]"; + getexp 10000, 0; + @Q_component_quest = 4; + callsub S_Update_Var; + next; + goto L_Main_menu; + +L_c_quest_4: + mesn l("Auldsbel the Wizard"); + mes "\"Hmm, yes... See, the thing is that transmuting living beings is not normally something that transmutation magic can do. It seems that the beings' life force must be overcome to transmute them, but that in turn kills them.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"But I was wondering whether creatures that already can auto-transmute – or metamorphose, as some people call it – might not allow themselves to be subjected to magical transmutation more easily... Still, all of my demetamorphosis attempts so far have failed.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"I am thinking of injecting the life force of another creature, perhaps using some astral channeling. Snakes sound most promising, as they have a similar physical shape but a strong life force.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Could you get me twenty regular, cave, and mountain snake tongues, please? So a total of sixty tongues. This is where most of their life force is concentrated, incidentally.\""; + next; + menu + "Here are your tongues.", L_Next7, + "I will hunt some snakes for you.", L_Main_menu; + +L_Next7: + if (countitem ("SnakeTongue") < 20) + goto L_c_quest_missing; + if (countitem ("CaveSnakeTongue") < 20) + goto L_c_quest_missing; + if (countitem ("MountainSnakeTongue") < 20) + goto L_c_quest_missing; + delitem "SnakeTongue", 20; + delitem "CaveSnakeTongue", 20; + delitem "MountainSnakeTongue", 20; + Zeny = Zeny + 8000; + mesn l("Auldsbel the Wizard"); + mes "\"8,000 GP should cover your efforts, I think.\""; + mes "\"Now let's see if this works...\""; + mes "[You gain 40,000 experience points]"; + getexp 40000, 0; + @Q_component_quest = 5; + callsub S_Update_Var; + next; + mesn l("Auldsbel the Wizard"); + mes "Auldsbel focuses on the bundle of snake tongues, which begins to assume a bright red colour, then start to glow. Yellow sparks drop to the ground, as Auldsbel rolls the tongues into a ball."; + next; + mesn l("Auldsbel the Wizard"); + mes "He tosses in a cocoon, then squeezes everything together. A bright red flash blinds you momentarily."; + next; + mesn l("Auldsbel the Wizard"); + mes "As Auldsbel opens his hands, there is nothing there."; + next; + mesn l("Auldsbel the Wizard"); + mes "He frowns. \"Their life force was still not strong enough. Hmm.\""; + next; + goto L_Main_menu; + +L_c_quest_5: + mesn l("Auldsbel the Wizard"); + mes "\"I do have another assignment for you, but this one will be tricky. I will need fifty grass snake tongues. I believe that this may be just enough life force to return the silkworm back to its original shape.\""; + next; + menu + "Here they are.", L_Next8, + "That's quite a challenge.", L_Main_menu; + +L_Next8: + if (countitem ("GrassSnakeTongue") < 50) + goto L_c_quest_missing; + delitem "GrassSnakeTongue", 50; + Zeny = Zeny + 10000; + mesn l("Auldsbel the Wizard"); + mes "\"Excellent! Here is 10,000 GP for you, and now let's see how this goes.\""; + mes "[You gain 100,000 experience points]"; + getexp 100000, 0; + @Q_component_quest = 6; + callsub S_Update_Var; + next; + mesn l("Auldsbel the Wizard"); + mes "Auldsbel rolls the snake tongues into a ball again, whilst chanting some words that you fail to discern. As the ball begins to glow, he tosses in a silkworm cocoon."; + mes "He then presses his hands together; you are blinded by a blue flash."; + next; + mesn l("Auldsbel the Wizard"); + mes "The wizard steps back in horror."; + mes "\"Oh my... I should have known. I have stepped into Astral spell territory here. This is bad...\""; + mes "He mumbles a brief spell invocation."; + mes "\"I suggest that you run.\""; + next; + misceffect sfx_magic_transmute; + monster "this", 50, 68, "Grass Snake", 1034, 4, "Auldsbel#_M::OnSnakeDeath"; + close; + +OnSnakeDeath: + BOSS_POINTS = BOSS_POINTS + 5; + message strcharinfo(0), "You gain 5 Boss Points giving you a total of " + BOSS_POINTS + "."; + end; + +L_c_quest_missing: + mesn l("Auldsbel the Wizard"); + mes "\"No, you are missing some items. Come back later when you have everything!\""; + next; + goto L_Main_menu; + +L_learn_spell: + if (@Q_main_status == @Q_STATUS_INITIATION) + goto L_initiation; + if (@Q_main_status == @Q_STATUS_STUDENT) + goto L_stu_start; + if (@Q_main_status == @Q_STATUS_STUDENT0) + goto L_stu_0; + if (@Q_main_status == @Q_STATUS_STUDENT1) + goto L_stu_1; + if (@Q_main_status == @Q_STATUS_STUDENT2) + goto L_stu_2; + if (@Q_main_status == @Q_STATUS_STUDENT3) + goto L_stu_3; + if (@Q_main_status == @Q_STATUS_STUDENT4) + goto L_stu_4; + if (@Q_main_status == @Q_STATUS_STUDENT5) + goto L_stu_5; + + mesn l("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; + mesn l("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; + mesn l("Auldsbel the Wizard"); + mes l("You can turn the log into a wooden figurine by imagining the creature whose shape you want in your head and saying `%s' followed by the last syllable of the name of the creature you want to shape it into.", b("Parum")); + next; + mesn l("Auldsbel the Wizard"); + mes "\"Oh... and it has to be the old Tritan name. Most creatures nowadays have very different names, but some old Tritan names have survived. Just try some, until you find one that fits.\""; + next; + mesn l("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; + learnskill SKILL_PARUM; + @Q_main_status = @Q_STATUS_INITIATION; + callsub S_Update_Var; + goto L_Main_menu; + +L_repeat_spell: + mesn l("Auldsbel the Wizard"); + mesq l("The invocation is `%s' followed by the last syllable of the name of the creature you want to shape the log into.", b("Parum")); + next; + mesn l("Auldsbel the Wizard"); + mes "\"But keep two things in mind: First, you must KNOW what the creature looks like – so a Skrytlurk probably won't work – and second, you must use the old Tritan name of it. `Fluffy' and `Scorpion' are modern names, so those won't work, you should try some others.\""; + next; + mesn l("Auldsbel the Wizard"); + mesq l("And make sure to keep notes of your spells! Don't rely only on your skill tab (F5)."); + next; + goto L_Main_menu; + +L_initiation: + mesn l("Auldsbel the Wizard"); + mesq l("So, have you managed to transmute something?"); + next; + if (countitem(MoubooFigurine)) + menu + "Not yet.", L_Main_menu, + "How about this mouboo figurine?", L_initiation_check; + menu + "Not yet.", L_Main_menu, + "What was the spell again?", L_repeat_spell; + +L_initiation_fail: + mesn l("Auldsbel the Wizard"); + mes "\"No, no, no. This is no good – too many imperfections.\""; + mes "He throws it away."; + mes "\"Keep practicing – and make sure to vary the spells you cast a little; that will make it easier to learn.\""; + next; + goto L_Main_menu; + +L_initiation_check: + if (!(countitem("MoubooFigurine"))) + goto L_Main_menu; + delitem "MoubooFigurine", 1; + mesn l("Auldsbel the Wizard"); + mes "Auldsbel inspects your figurine."; + next; + if (@mexp < 40) + goto L_initiation_fail; + mesn l("Auldsbel the Wizard"); + mes "Auldsbel nods."; + mes "\"This looks good.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "He pockets the figurine."; + mes "\"Very well, then. I shall accept you as my student.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "Auldsbel presses his index and middle finger against your forehead."; + mes "\"Accept my blessing!\""; + next; + mesn l("Auldsbel the Wizard"); + mes "You feel new powers flowing into your body!"; + @Q_main_status = @Q_STATUS_STUDENT; + callsub S_Update_Var; + @SUP_id = SKILL_MAGIC_TRANSMUTE; + @SUP_name$ = "Transmutation Magic"; + @SUP_xp = 5000; + @SUP_lvl = 2; + callfunc "SkillUp"; + next; + goto L_Main_menu; + +L_stu_start: + if (@mexp < 200) goto L_Notready; + mesn l("Auldsbel the Wizard"); + mesq l("Next, I shall teach you a higher-level transmutation spell."); + if (getskilllv(SKILL_MAGIC) < 2) { + mesq l("Thinking well, you will not be able to use it yet; you will first have to gain a greater understanding of magic overall."); + close; + } + next; + mesn l("Auldsbel the Wizard"); + mesq l("Bring me ten bug legs, and I will reveal its invocation to you."); + next; + menu + "Here you are.", L_Next9, + "I'll be back with them.", L_Main_menu; + +L_Next9: + if (countitem(BugLeg) < 10) + goto L_c_quest_missing; + delitem BugLeg, 10; + getexp 1000, 0; + learnskill SKILL_PATVILOREE; + @Q_main_status = @Q_STATUS_STUDENT0; + callsub S_Update_Var; + mesn l("Auldsbel the Wizard"); + mes "He picks up the bug legs."; + mes "\"Good. These will come in handy later...\""; + mes "He grins."; + mes "[1000 experience points]"; + next; + mesn l("Auldsbel the Wizard"); + mesq l("Now, listen carefully: to make a short tank top out of three pieces of cloth, you must use the invocation '%s'.", b("Patviloree")); + next; + mesn l("Auldsbel the Wizard"); + mes "\"But be careful; transmutations can go wrong, and that can injure you. When you have more overall spellcasting practice, come back to me.\""; + next; + goto L_Main_menu; + +L_Notready: + mesn l("Auldsbel the Wizard"); + mes "\"You still need more practice with spellcasting; I won't give you another spell until you are ready.\""; + next; + goto L_Main_menu; + +L_stu_0: + if (@mexp < 350) + goto L_Notready; + mesn l("Auldsbel the Wizard"); + mes "\"The next transmutation spell is a little harder than the last one I taught you, but you should be able to manage.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Bring me twenty mauve leaves, and I will reveal its invocation.\""; + next; + menu + "Here you are.", L_Next10, + "I'll be back with them.", L_Main_menu; + +L_Next10: + if (countitem("MauveHerb") < 20) + goto L_c_quest_missing; + delitem "MauveHerb", 20; + getexp 1000, 0; + learnskill SKILL_PATLOREE; + @Q_main_status = @Q_STATUS_STUDENT1; + callsub S_Update_Var; + mesn l("Auldsbel the Wizard"); + mes "He pockets your mauve leaves."; + mes "\"Those should go very well with the salmon.\""; + mes "[1000 experience points]"; + next; + mesn l("Auldsbel the Wizard"); + mesq l("The next spell I have will make a normal tank top out of four pieces of cloth. The invocation is '%s', make sure to write this down.", b("Patloree")); + next; + goto L_Main_menu; + +L_stu_1: + if (@mexp < 425) + goto L_Notready; + mesn l("Auldsbel the Wizard"); + mes "\"Up next is the transmutation spell for regular shirts.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"For this, I would like ten scorpion stingers.\""; + next; + menu + "Here you are.", L_Next11, + "I'll be back with them.", L_Main_menu; + +L_Next11: + if (countitem("ScorpionStinger") < 10) + goto L_c_quest_missing; + delitem "ScorpionStinger", 10; + getexp 1000, 0; + learnskill SKILL_PATMUPLOO; + @Q_main_status = @Q_STATUS_STUDENT2; + callsub S_Update_Var; + mesn l("Auldsbel the Wizard"); + mes "He carefully takes the stingers."; + mes "\"You are being quite helpful. If my experiments go well, I will make sure to acknowledge you in a footnote somewhere.\""; + mes "[1000 experience points]"; + next; + mesn l("Auldsbel the Wizard"); + mesq l("To make a shirt, use the invocation '%s'. This will require five pieces of cloth.", b("Patmuploo")); + next; + goto L_Main_menu; + +L_stu_2: + if (@mexp < 500) + goto L_Notready; + mesn l("Auldsbel the Wizard"); + mes "\"You may find the next spell particularly useful.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Bring me twenty wooden logs, and I will teach you.\""; + next; + menu + "Here you are.", L_Next12, + "I'll be back with them.", L_Main_menu; + +L_Next12: + if (countitem(RawLog) < 20) + goto L_c_quest_missing; + delitem RawLog, 20; + getexp 1000, 0; + learnskill SKILL_KULARZUFRILL; + @Q_main_status = @Q_STATUS_STUDENT3; + callsub S_Update_Var; + mesn l("Auldsbel the Wizard"); + mesc l("Auldsbel places the logs next to his hut."); + mesq l("I'm hoping to animate them into the shape of one of those odd log heads."); + mes "[1000 experience points]"; + next; + mesn l("Auldsbel the Wizard"); + mesq l("This spell makes arrows out of a single wooden log. Its invocation is '%s'.", b("Kularzufrill")); + next; + goto L_Main_menu; + +L_stu_3: + if (getskilllv(SKILL_MAGIC) < 3) + goto L_mag_skill_ins; + mesn l("Auldsbel the Wizard"); + mes "\"I believe that you may be ready for the next level of transmutation magic! Let me teach you one last spell that you can handle before your promotion, and if you can cast this one, I will advance you.\""; + next; + goto L_stu_3_repeat; + +L_stu_3_repeat: + mesn l("Auldsbel the Wizard"); + mes "\"This one has the invocation `" + get(.invocation$, "make-concentration-potion") + "'. Put two cobalt leaves and two pink flower petals into a bottle of water, hold it up, and speak that phrase.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"It is a tricky spell, but if it works out, you will transform the bottle into a concentration potion.\""; + next; + mesn l("Auldsbel the Wizard"); + mes "\"Hmm. That reminds me – there was a similar spell, but I forgot what it was... anyway, try using this, and bring me the potion when you are done.\""; + next; + @Q_main_status = @Q_STATUS_STUDENT4; + callsub S_Update_Var; + goto L_Main_menu; + +L_stu_4: + mesn l("Auldsbel the Wizard"); + mes "\"Did you manage to transmute a concentration potion?\""; + next; + menu + "What was the invocation again?", L_stu_3_repeat, + "No, still working on it...", L_Main_menu, + "Yes.", L_Next13; + +L_Next13: + if (countitem("ConcentrationPotion") < 1) + goto L_stu_4_no_potion; + if (!(MAGIC_FLAGS & MFLAG_MADE_CONC_POTION)) + goto L_stu_4_wrong_potion; + mesn l("Auldsbel the Wizard"); + mes "Auldsbel examines your potion and nods."; + mes "\"Good work! You are ready for a promotion!\""; + next; + mesn l("Auldsbel the Wizard"); + mes "Auldsbel presses his index and middle finger against your forehead."; + mes "\"Accept my blessing!\""; + next; + @Q_main_status = @Q_STATUS_STUDENT5; + callsub S_Update_Var; + mesn l("Auldsbel the Wizard"); + mes "You feel new powers flowing into your body!"; + @SUP_id = SKILL_MAGIC_TRANSMUTE; + @SUP_name$ = "Transmutation Magic"; + @SUP_xp = 30000; + @SUP_lvl = 3; + callfunc "SkillUp"; + next; + goto L_Main_menu; + +L_stu_4_wrong_potion: + mesn l("Auldsbel the Wizard"); + mes "Auldsbell examines your potion, then shakes his head."; + mes "\"This doesn't look quite right, though I can't quite point at what the problem is. You will have to continue trying.\""; + next; + goto L_Main_menu; + +L_stu_4_no_potion: + mesn l("Auldsbel the Wizard"); + mes "\"You seem to be rather lacking the concentration potion you need to justify your claim, my dear fellow.\""; + next; + goto L_Main_menu; + +L_stu_5: + mesn l("Auldsbel the Wizard"); + mes "\"Hmm. Come back some other time, please; I still haven't figured out what to teach you next.\""; + close; + +L_mag_skill_ins: + mesn l("Auldsbel the Wizard"); + mes "\"No, not at this time. You will have to advance in your overall magic skill before I can teach you more.\""; + next; + goto L_Main_menu; + +L_close: + close; + +S_Update_Var: + @Q_status = @Q_main_status | (@Q_component_quest << 5); + set QUEST_MAGIC, + (QUEST_MAGIC & ~(@Q_MASK) + | (@Q_status << @Q_SHIFT)); + return; +} diff --git a/npc/011-1/mapflags.txt b/npc/011-1/mapflags.txt new file mode 100644 index 00000000..c36799bc --- /dev/null +++ b/npc/011-1/mapflags.txt @@ -0,0 +1 @@ +//011-1 mapflag resave 011-1,103,34 diff --git a/npc/011-1/oscar.txt b/npc/011-1/oscar.txt new file mode 100644 index 00000000..7e5f9481 --- /dev/null +++ b/npc/011-1/oscar.txt @@ -0,0 +1,486 @@ + + + + +function script HalloweenQuestWaterPumpkins { + if (Quest_Halloween != 5 || $@HalloweenQuest_PumpkinHunter$ != "") + goto L_Return; + $@HalloweenQuest_PumpkinHunter$ = strcharinfo(0); + donpcevent "Oscar::OnCommandSpg"; + goto L_Return; + +L_Return: + return; +} + +011-1,94,38,0 script Oscar NPC142,{ + // Check we are at the good time of the year + if (!(gettime(6) == 11 && (gettime(5) >= 4 && gettime(5) <= 30))) goto L_NoEvent; + // Check halloween quest has been done or not. + @halloween_year = (Annual_Quest & BYTE_0_MASK) >> BYTE_0_SHIFT; + if (@halloween_year < (gettime(7) - 2000)) goto L_AdjustYear; + goto L_Init; + +L_AdjustYear: + Quest_Halloween = 0; + @halloween_year = gettime(7) - 2000; + callsub S_Update_Annual_Quest; + goto L_Init; + +L_NoEvent: + mes "[Oscar]"; + mes "\"Welcome here!"; + mes "I'm the owner of this farm. I'm growing fruits around here as you can see.\""; + next; + mes "\"Some of my fruits are for sale in my shop right here."; + mes "Don't hesitate to drop by. They are cheap!\""; + close; + +L_Init: + if (@halloween_year == (gettime(7) - 2000) + 1) goto L_QuestAlreadyDone; + if (Quest_Halloween == 0) goto L_Introduce; + if (Quest_Halloween == 1 || Quest_Halloween == 2) goto L_CheckSeeds; + if (Quest_Halloween == 3) goto L_HelpGrowSeeds; + if (Quest_Halloween == 4) goto L_HelpFillWaters; + if (Quest_Halloween == 5 && $@HalloweenQuest_PumpkinHunter$ == "") goto L_HelpWaterPatches; + if (Quest_Halloween == 5 && $@HalloweenQuest_PumpkinHunter$ == strcharinfo(0)) goto L_HelpCleanPumpkins; + if (Quest_Halloween == 5 && $@HalloweenQuest_PumpkinHunter$ != "") goto L_WateringBusy; + if (Quest_Halloween == 6) goto L_GetReward; + if (Quest_Halloween == 10) goto L_GetSlap; + goto L_End; + +L_Introduce: + mes "[Oscar]"; + mes "\"Heya!\""; + next; + mes "\"I just came back from a long trip... Really tiring, but so interesting.\""; + menu + "Oh? Where did you go?", L_Next, + "Well... I believe.", L_End; + +L_Next: + mes "[Oscar]"; + mes "\"Well, I travelled to the economic center of this continent."; + mes "It's north-east of here. Quite far I must say.\""; + next; + mes "\"But it was worth it really."; + mes "I went there to see ways to improve my little plantation here."; + mes "Oh well, sell some of my fruits too, see some of my fellow farmers. Classic business.\""; + next; + mes "\"Until a few days ago, they were holding a large party to celebrate Halloween."; + mes "Very nice really... And in particular, I saw these strange veggies they call pumpkins.\""; + next; + mes "\"They taste really good you see, but ahah, they weren't really for eating at that moment!"; + mes "Anyway, I wondered if I could grow some here. Until now I only grow apples and oranges.\""; + menu + "That's an interesting idea!", L_Next1, + "Really, I hate pumpkins.", L_End; + +L_Next1: + mes "[Oscar]"; + mes "\"However, I couldn't get any seeds, but I heard rumors in that city, saying we could find pumpkins in the forests north-east of here."; + mes "Most likely there are pumpkin seeds laying around them.\""; + next; + mes "\"They also mentioned something strange about them, but hey, who cares! Just rumors!\""; + next; + + if (BaseLevel < 45) + goto L_TooYoung; + + mes "\"Do you think you can get some for me?\""; + menu + "Sure. Leave it to me!", L_Next2, + "Well, I don't have time for that right now.", L_End; + +L_Next2: + mes "[Oscar]"; + mes "\"Thanks so much " + strcharinfo(0) + "!"; + mes "I can't wait to try them!\""; + Quest_Halloween = 1; + goto L_End; + +L_TooYoung: + mes "\"Ahm... That may be a little dangerous for you though. I don't want to send a kid in the deep forest.\""; + goto L_End; + +L_End: + @halloween_year = 0; + close; + +L_CheckSeeds: + if (countitem("PumpkinSeeds") < $@halloween_num_seeds) + goto L_NotEnoughSeeds; + delitem "PumpkinSeeds", $@halloween_num_seeds; + Quest_Halloween = 3; + mes "[Oscar]"; + mes "\"Yes you found them! I can start to make them grow now!"; + mes "Thank you so much " + strcharinfo(0) + "!\""; + goto L_End; + +L_NotEnoughSeeds: + mes "[Oscar]"; + mes "\"Oh, it looks like you didn't find enough seeds yet...\""; + goto L_End; + +L_HelpGrowSeeds: + // Wait 20 seconds before triggering the next step. + if (@halloween_seeds_timer == 0) + @halloween_seeds_timer = gettimetick(2); + if ((gettimetick(2) - @halloween_seeds_timer) < 5) + goto L_WaitGrowSeeds; + mes "[Oscar]"; + mes "\"Oh, you are back!\""; + next; + mes "You notice Oscar looks quite disappointed."; + next; + mes "[Oscar]"; + mes "\"You see I could use some more help from you."; + mes "My supplies of water are quite low because of the long trip I made."; + mes "And I've been watering the pumpkin patches, but unfortunately I'm already out of water before I can see anything growing.\""; + next; + mes "\"If you could help me fill these " + $@halloween_num_water_bottles + " bottles with water, that would be very kind of you!\""; + + @nature_magic = getskilllv(SKILL_MAGIC_NATURE); + if (@nature_magic > 1) + goto L_ProposeUseKaflosh; + @nature_magic = 0; + menu + "Yeah sure!", L_Next3, + "That sounds boring to do. No thanks.", L_End; + +L_Next3: + getinventorylist; + if (@inventorylist_count == 100 && countitem("EmptyBottle") == 0) + goto L_InventoryFull; + @inventorylist_count = 0; + Quest_Halloween = 4; + goto L_GetEmptyBottles; + +L_ProposeUseKaflosh: + @nature_magic = 0; + menu + "Yeah sure!", L_Next4, + "Maybe I can help you water them with magic!", L_WaterWithKaflosh, + "That sounds boring to do. No thanks.", L_End; + +L_Next4: + getinventorylist; + if (@inventorylist_count == 100 && countitem("EmptyBottle") == 0) + goto L_InventoryFull; + Quest_Halloween = 4; + goto L_GetEmptyBottles; + +L_GetEmptyBottles: + mes "[Oscar]"; + mes "\"Ok, here are the " + $@halloween_num_water_bottles + " empty bottles.\""; + next; + mes "\"Oh and while you fill these bottles, why not bring some friends here as well?"; + mes "Let's not be reckless. Maybe these rumors about the pumpkins are true."; + mes "Oh, unless you consider yourself strong enough to take care of this alone!\""; + getitem "EmptyBottle", $@halloween_num_water_bottles; + goto L_End; + +L_WaitGrowSeeds: + mes "[Oscar]"; + mes "\"Thanks again " + strcharinfo(0) + "!"; + mes "I'm planting these seeds right now.\""; + next; + mes "\"Stay around if you want to see what it looks like!"; + mes "Amazing I tell you, amazing!\""; + goto L_End; + +L_HelpFillWaters: + mes "[Oscar]"; + mes "\"Hey, you again!\""; + next; + if ($@HalloweenQuest_PumpkinHunter$ != "") + goto L_WateringBusy; + mes "\"So do you have the " + $@halloween_num_water_bottles + " bottles filled with fresh water?\""; + menu + "Yes! Fresh and clear water.", L_Next5, + "Oh, not yet. I'm on my way.", L_End; + +L_Next5: + if (countitem("BottleOfWater") < $@halloween_num_water_bottles) + goto L_NotEnoughWaters; + + // make an additional check here, since the player had a dialog pause in the above menu. + if ($@HalloweenQuest_PumpkinHunter$ != "") + goto L_WateringBusy; + delitem "BottleOfWater", $@halloween_num_water_bottles; + + mes "[Oscar]"; + mes "\"Many thanks! I wonder what I would have done without you!"; + mes "I'll water the patches right away. Watch this!\""; + Quest_Halloween = 5; + $@HalloweenQuest_PumpkinHunter$ = strcharinfo(0); + callsub S_StartPumpkinsSpawn; + goto L_End; + +L_WaterWithKaflosh: + getinventorylist; + if (@inventorylist_count == 100 && countitem("BottleOfWater") == 0) + goto L_InventoryFull; + mes "[Oscar]"; + mes "\"Oh, I see!"; + next; + mes "\"So, I'm waiting you show me your skills!"; + mes "Water the pumpkin patches right here with your awesome magic!\""; + next; + mes "\"Here is one bottle of water to do it.\""; + next; + mes "\"By the way, I told you about the rumors concerning these pumpkins."; + mes "Why not bring some friends here? Oh, unless you consider yourself strong enough!\""; + Quest_Halloween = 5; + getitem "BottleOfWater", 1; + goto L_End; + +L_HelpWaterPatches: + // We check again here that the player has magic skills + // This case happens when the player has logged off + // during the infestation phase. + @nature_magic = getskilllv(SKILL_MAGIC_NATURE); + if (!(@nature_magic > 1)) + goto L_HelpFillWaters; + @nature_magic = 0; + mes "[Oscar]"; + mes "\"Come on, water the pumpkin patches right here with your awesome magic!"; + mes "For sure you will be more efficient than me!\""; + goto L_End; + +L_WateringBusy: + mes "[Oscar]"; + mes "\"Sorry. I'm really busy at the moment."; + mes "May you come back later? Thank you, thank you..."; + mes "Sorry I have to take care of this now!\""; + goto L_End; + +L_HelpCleanPumpkins: + mes "[Oscar]"; + mes "\"Help me clean all these pumpkins! It's a disaster!\""; + goto L_End; + +L_NotEnoughWaters: + mes "[Oscar]"; + mes "\"That's not enough bottles to water all these pumpkin patches."; + mes "Please bring me more.\""; + goto L_End; + +S_Update_Annual_Quest: + Annual_Quest = (Annual_Quest & ~(BYTE_0_MASK) | (@halloween_year << BYTE_0_SHIFT)); + return; + +OnCommandSpg: + callsub S_StartPumpkinsSpawn; + end; + +S_StartPumpkinsSpawn: + $@HalloweenQuest_PumpkinsCount = $@halloween_num_pumpkins; + $@HalloweenQuest_PumpkinsState = 0; + initnpctimer; + return; + +L_QuestAlreadyDone: + mes "[Oscar]"; + mes "\"I'm relieved all this mess is sorted out now."; + mes "That was interesting, but really, fruits are more quiet!\""; + goto L_End; + +OnInit: + $@halloween_num_seeds = 12; + $@halloween_num_water_bottles = 15; + $@halloween_num_pumpkins = $@halloween_num_seeds * 4; + end; + +OnTimer1000: + goto L_TimerFunction; + +OnTimer2000: + goto L_TimerFunction; + +OnTimer3000: + goto L_TimerFunction; + +L_TimerFunction: + if ($@HalloweenQuest_PumpkinsState != 1) + end; + callsub S_CheckPlayer; + $@HalloweenQuest_PumpkinsTimer = $@HalloweenQuest_PumpkinsTimer + 1; + if (mobcount("011-1", "Oscar::OnPD") <= 0 && + mobcount("011-1", "Oscar::OnPDP") <= 0 && + $@HalloweenQuest_PumpkinsCount <= 0) + goto L_AllPumpkinsDead; + // A quick "cheer up" + if ($@HalloweenQuest_PumpkinsTimer == 300) + npctalk strnpcinfo(0), "Hurry up " + $@HalloweenQuest_PumpkinHunter$ + "! My farm is being ruined!"; + // 7 mins max + if ($@HalloweenQuest_PumpkinsTimer > 420) + goto L_PumpkinsRuined; + + if (getnpctimer(0) >= 2900) + goto L_TrySpawnPumpkin; + end; + +L_TrySpawnPumpkin: + if ($@HalloweenQuest_PumpkinsCount > 0) + areamonster "011-1", 97, 40, 101, 44, "", 1063, 1, "Oscar::OnPD"; + setnpctimer 0; + end; + +OnTimer2500: + if ($@HalloweenQuest_PumpkinsState != 0) + end; + areamonster "011-1", 97, 40, 101, 44, "", 1063, 2, "Oscar::OnPD"; + end; + +OnTimer6000: + if ($@HalloweenQuest_PumpkinsState != 0) + end; + emotion EMOTE_AFRAID; + npctalk strnpcinfo(0), "Oh no, these pumpkins look strange and infested with bugs! Help me get rid of them " + $@HalloweenQuest_PumpkinHunter$ + "!"; + $@HalloweenQuest_PumpkinsState = 1; + setnpctimer 0; + end; + +OnPD: + if (strcharinfo(0) != $@HalloweenQuest_PumpkinHunter$) + goto L_KillBadHunter; + $@HalloweenQuest_PumpkinsCount = $@HalloweenQuest_PumpkinsCount - 1; + if (@discover_poisonous_pumpkin_again == 0) + message strcharinfo(0), "Oh no! These pumpkins are poisonous as well!"; + @discover_poisonous_pumpkin_again = 1; + // Small damages + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -10, 0; + sc_start SC_POISON, 1, 3; + // Spawn mobs or get items + @halloween_rand = rand(0,100); + // Seeds reward + if (@halloween_rand < 10) + getitem "PumpkinSeeds", 1; + // Pumpkin helmet reward + if (@halloween_rand >= 10 && @halloween_rand < 17) + getitem "PumpkinHelmet", 1; + // huntsman spider x1 + if (@halloween_rand < (15*BaseLevel)/100) + areamonster "011-1", 97, 40, 101, 44, "", 1083, 1, "Oscar::OnPDP"; + // Or spider x1 + if (@halloween_rand >= (15*BaseLevel)/100 && @halloween_rand < (75*BaseLevel)/100) + areamonster "011-1", 97, 40, 101, 44, "", 1012, 1, "Oscar::OnPDP"; + // Or archant x2 + if (@halloween_rand >= (75*BaseLevel)/100) + areamonster "011-1", 97, 40, 101, 44, "", 1060, 2, "Oscar::OnPDP"; + + @halloween_rand = 0; + end; + +OnPDP: + end; + +L_KillBadHunter: + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -Hp, 0; + end; + +L_PumpkinsRuined: + npctalk strnpcinfo(0), "No! " + $@HalloweenQuest_PumpkinHunter$ + " how could you let that happen? All my farm is a mess now! All my trees are infested with bugs!"; + goto L_Fail; + +L_AllPumpkinsDead: + goto L_Success; + +S_CheckPlayer: + if (attachrid(getcharid(3, $@HalloweenQuest_PumpkinHunter$)) == 0) + goto L_PlayerOff; + if (ispcdead()) + goto L_PlayerDead; + if (isin("011-1",20,5,130,110) == 0) + goto L_PlayerLeft; + detachrid; + return; + +L_PlayerOff: + npctalk strnpcinfo(0), "What? Where is " + $@HalloweenQuest_PumpkinHunter$ + "? Someone, help me!"; + goto L_Fail; + +L_PlayerLeft: + npctalk strnpcinfo(0), "What the!! " + $@HalloweenQuest_PumpkinHunter$ + " left me alone with all this! Someone, help me!"; + goto L_Fail; + +L_PlayerDead: + npctalk strnpcinfo(0), "Oh no I can't believe it! " + $@HalloweenQuest_PumpkinHunter$ + " just died! Someone, help me!"; + goto L_Fail; + +L_Fail: + // If the player is logged off, since we check every second that the player + // is online, we can consider it's an accident, so we will allow to redo the quest + // Otherwise, it's a "valid" fail. + if (attachrid(getcharid(3, $@HalloweenQuest_PumpkinHunter$))) + Quest_Halloween = 10; + goto L_Clean; + +L_Success: + // Make this check again or the server will crash. + if (attachrid(getcharid(3, $@HalloweenQuest_PumpkinHunter$)) == 0) + goto L_PlayerOff; + Quest_Halloween = 6; + emotion EMOTE_GRIN; + npctalk strnpcinfo(0), "Hurray, " + $@HalloweenQuest_PumpkinHunter$ + " you did it! Thank you thank you! Come here!"; + goto L_Clean; + +L_Clean: + killmonster "011-1", "Oscar::OnPD"; + killmonster "011-1", "Oscar::OnPDP"; + $@HalloweenQuest_PumpkinHunter$ = ""; + $@HalloweenQuest_PumpkinsCount = 0; + $@HalloweenQuest_PumpkinsState = 0; + $@HalloweenQuest_PumpkinsTimer = 0; + stopnpctimer; + detachrid; + end; + +L_GetReward: + mes "[Oscar]"; + mes "\"" + strcharinfo(0) + ", you were wonderful!"; + mes "My farm is safe thanks to you!\""; + next; + mes "\"Look, when I went to this city a few days ago, I could find this magnificient fruit."; + mes "I believe not many exist in the world, but hey, this one is for you!\""; + + getinventorylist; + if (@inventorylist_count == 100 && countitem("GoldenDeliciousApple") == 0) + goto L_InventoryFull; + @inventorylist_count = 0; + getitem "GoldenDeliciousApple", 1; + @halloween_year = gettime(7) - 2000 + 1; + Quest_Halloween = 0; + callsub S_Update_Annual_Quest; + goto L_End; + +L_GetSlap: + mes "[Oscar]"; + mes "\"Ah! There you are "+strcharinfo(0)+"!"; + next; + mes "\"As you can see, my farm is safe now."; + mes "I can't really say it's thanks to you though!\""; + next; + mes "\"Well, I won't be a bad guy."; + mes "Take this for your trouble and farewell!\""; + + getinventorylist; + if (@inventorylist_count == 100 && countitem("CandyPumpkin") == 0) + goto L_InventoryFull; + @inventorylist_count = 0; + getitem "CandyPumpkin", 5; + @halloween_year = gettime(7) - 2000 + 1; + Quest_Halloween = 0; + callsub S_Update_Annual_Quest; + goto L_End; + +L_InventoryFull: + @inventorylist_count = 0; + next; + mes "\"Ah, but you cannot carry anything else!"; + mes "Make some room first.\""; + goto L_End; +} diff --git a/npc/011-1/shops.txt b/npc/011-1/shops.txt new file mode 100644 index 00000000..8fd551b4 --- /dev/null +++ b/npc/011-1/shops.txt @@ -0,0 +1,18 @@ +// The Mana World Script +// (C) Jesusalva, 2021 +// Licensed under GPLv2 or later + +011-1,80,33,0 script Fruit Store NPC400,{ + shop .name$; + goodbye; + close; + +OnInit: + tradertype(NST_ZENY); + sellitem GreenApple; + sellitem RedApple; + sellitem Orange; + .distance = 5; + end; +} + |