From 371db803633dcc4185e147f5ddff08c7bd5aa613 Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Thu, 8 Apr 2010 15:56:50 +1200 Subject: Easter 2010 --- conf/magic.conf.template | 260 +++++ data/028-1.wlk | Bin 0 -> 19604 bytes data/028-3.wlk | Bin 0 -> 10004 bytes data/resnametable.txt | 2 + db/const.txt | 102 ++ db/item_db.txt | 40 +- npc/001-1_Tulimshar/bleacher.txt | 5 + npc/001-1_Tulimshar/elanore.txt | 19 +- npc/009-1_Hurnscald/old_woman.txt | 251 ++++- npc/009-2_Hurnscald/selim.txt | 9 + npc/009-2_Hurnscald/wyara.txt | 15 +- npc/011-1_Woodland/auldsbel.txt | 47 +- npc/013-1_Woodland_hills/sagatha.txt | 32 + npc/013-2_Magic_house/wizard.txt | 65 +- npc/028-1/Blocker.txt | 13 + npc/028-1/Doctor.txt | 1919 ++++++++++++++++++++++++++++++++++ npc/028-1/_import.txt | 5 + npc/028-1/_mobs.txt | 54 + npc/028-1/_warps.txt | 2 + npc/028-3/_import.txt | 3 + npc/028-3/_mobs.txt | 26 + npc/028-3/_warps.txt | 3 + npc/_import.txt | 2 + npc/easter/2010/_import.txt | 3 + npc/easter/2010/egg_func.txt | 114 ++ npc/easter/2010/eggs.txt | 934 +++++++++++++++++ npc/easter/2010/helper.txt | 15 + npc/items/restricted_item.txt | 6 +- npc/scripts.conf | 3 + 29 files changed, 3909 insertions(+), 40 deletions(-) create mode 100755 data/028-1.wlk create mode 100755 data/028-3.wlk create mode 100644 npc/028-1/Blocker.txt create mode 100644 npc/028-1/Doctor.txt create mode 100755 npc/028-1/_import.txt create mode 100755 npc/028-1/_mobs.txt create mode 100755 npc/028-1/_warps.txt create mode 100755 npc/028-3/_import.txt create mode 100755 npc/028-3/_mobs.txt create mode 100755 npc/028-3/_warps.txt mode change 100644 => 100755 npc/_import.txt create mode 100644 npc/easter/2010/_import.txt create mode 100644 npc/easter/2010/egg_func.txt create mode 100755 npc/easter/2010/eggs.txt create mode 100644 npc/easter/2010/helper.txt diff --git a/conf/magic.conf.template b/conf/magic.conf.template index 5777ca49..5125d0cd 100644 --- a/conf/magic.conf.template +++ b/conf/magic.conf.template @@ -1304,6 +1304,266 @@ LOCAL SPELL mouboo-smell : "#s" = message(p, "You notice a strange smell all around you."); +CONST E10_FLAG_USED_FREE_WARP_SHIFT = 17 + +NONMAGIC SILENT SPELL easter (type : STRING) : "#m" = + (REQUIRE name_of(caster) == "Freeyorp") => + EFFECT IF (type == "EE_RF") THEN ( + { + doevent("Old Woman::OnReplenish"); + } + ) ELSE IF (type == "EE_SUS") THEN ( + { + doevent "Old Woman::OnManualStopTimer"; + } + ) ELSE IF (type == "EE_INIT") THEN ( + { + doevent "Old Woman::OnManualStartTimer"; + } + ) ELSE IF (type == "DOC_SHIFT_NOW") THEN ( + { + doevent "Doctor#who::OnDoWarp"; + } + ) ELSE IF (type == "DOC_HALT_SHIFT") THEN ( + { + doevent "Doctor#who::OnManualStopTimer"; + } + ) ELSE IF (type == "DOC_SHIFT_RESUME") THEN ( + { + doevent "Doctor#who::OnManualStartTimer"; + } + ) ELSE IF (type == "DOC_HIDE") THEN ( + { + doevent "Doctor#who::OnManualDisable"; + } + ) ELSE IF (type == "BLOCKER_DISABLE") THEN ( + { + doevent "Control#Helper::OnBarrierDisable"; + } + ) ELSE IF (type == "BLOCKER_ENABLE") THEN ( + { + doevent "Control#Helper::OnBarrierEnable"; + } + ) ELSE message(caster, "Unknown action '" + type + "'!"); + +// Invader spells + +NONMAGIC SILENT SPELL easter-invader-init : "#i" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT warp(caster, @("028-1.gat", 139, 46)); + { + gmcommand strcharinfo(0)+":@blvl -255"; + gmcommand strcharinfo(0)+":@blvl 199"; + gmcommand strcharinfo(0)+":@setmagic all 5 Xakelbael the Dark"; + gmcommand strcharinfo(0)+":@allstats"; + savepoint "028-1.gat", 130, 46; + } + create_item(caster, "DarkTalisman", 1); + +NONMAGIC SILENT SPELL easter-invader-hide : "#h" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT { if (checkoption(4096)) goto L_toggle; + setoption(4096); + end; + L_toggle: + setoption(0); + end; }; + warp(caster, location(caster)); + +NONMAGIC SILENT SPELL easter-invader-warp-taunt : "#o" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT warp(caster, @("009-1.gat", 48, 35)); + WAIT 80; + sfx(caster, 32, 0); + WAIT 80; + FOREACH PC p IN rbox(location(caster), 50) + DO IF (p <> caster) THEN ( + message(p, "A powerful explosion " + if_then_else(distance(location(caster), location(p)) < 10, "right around you nearly deafens you!", if_then_else(distance(location(caster), location(p)) < 30, "nearby shocks you!", "in the distance erupts... you're not sure of the source, but it will be something big..."))); + itemheal(p, -1 - random(hp(p)), 0-(random(sp(p) >> 2))); + ) + WAIT 1000; + FOREACH PC p IN rbox(location(caster), 15) + DO ( + message(p, "As the smoke clears, you hear a distant, sickly laughing ringing in your ears..."); + ) + +NONMAGIC SILENT SPELL easter-invader-warp-taunt-explosion : "#q" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT sfx(caster, 32, 0); + WAIT 100; + sfx(caster, 31, 0); + WAIT 30; + sfx(caster, 30, 0); + WAIT 30; + sfx(caster, 30, 0); + WAIT 20; + sfx(caster, 30, 0); + WAIT 10; + sfx(caster, 30, 0); + WAIT 10; + +NONMAGIC SILENT SPELL easter-invader-warp-taunt-end : "#p" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT FOREACH PC p IN rbox(location(caster), 50) DO IF (p <> caster) + THEN ( script_target = p; + { gmcommand strcharinfo(0)+":@jump"; } + message(p, "A powerful force sends you flying!"); + ) + warp(caster, @("028-1.gat", 130, 46)); + + +NONMAGIC SILENT SPELL easter-invader-attack-pulse : "#a" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT IF (script_int(caster, "InvState") == 1) THEN ( set_script_variable(caster, "InvState", 0); ABORT; ); + set_script_variable(caster, "InvState", 1); + FOR i = 1 TO 500 + DO ( sfx(caster, 31, 0); + WAIT 80; + FOREACH PC p IN rbox(location(caster), 4) + DO IF (p <> caster) THEN ( injure(caster, p, 30 - random(random(25)) - random(5) + random(i), 0); ) + WAIT 420; + IF (script_int(caster, "InvState") == 0) THEN ABORT; + ) + set_script_variable(caster, "InvState", 0); + +NONMAGIC SILENT SPELL easter-invader-command : "#d" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT override_attack(caster, 3, ((200 - agi(caster)) * 5000) / 200, + 8, ATTACK_ICON_GENERIC, 31, 0); + ATTRIGGER CALL attack_check(target); + area = rbox(location(target), 8); + FOREACH MOB m IN area + DO (message(caster, "Class Id: " + mob_id(m)); + IF (mob_id(m) = 1040 || mob_id(m) == 1042 || mob_id(m) == 1047) THEN ( + CALL sfx_generic(m); + aggravate(m, 0, target); + ) + ) + +NONMAGIC SILENT SPELL easter-invader-spike : "#w" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT FOR i = 1 TO 40 + DO ( point = random_location(rbox(location(caster), sqrt(i) << 1)); + IF (random(3)) + THEN (sfx(point, 32, 0); + WAIT 50; + FOREACH PC p IN rbox(point, sqrt(i) >> 1) + DO IF (p <> caster) + THEN (injure(caster, p, i + random(i << 1), random(random(i)));) + ) ELSE (sfx(point, 31, 0); + WAIT 50; + FOREACH PC p IN rbox(point, sqrt(i)) + DO IF (p <> caster) + THEN (injure(caster, p, i + random(i << 2), random(random(i)));) + ) + WAIT 400 - (i << 3); + ) + +NONMAGIC SILENT SPELL easter-invader-jump (t : STRING) : "#j" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT IF not (status_option(caster, 4096)) THEN ( sfx(caster, 33, 0); + WAIT 200; ); + IF (t == "r") THEN ( warp(caster, @("028-1.gat", 139, 46)); ) + ELSE IF (t == "s") THEN ( warp(caster, @("028-1.gat", 69, 96)); ) + ELSE IF (t == "c") THEN ( warp(caster, @("028-3.gat", 50, 58)); ) + ELSE IF (t == "t") THEN ( warp(caster, @("009-1.gat", 48, 35)); ) + ELSE { gmcommand strcharinfo(0)+":@jump"; }; + +NONMAGIC SILENT SPELL easter-invader-taunt-local (s : STRING) : "#l" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT FOREACH PC p IN rbox(location(caster), 20) DO message(p, s); + +NONMAGIC SILENT SPELL easter-invader-taunt-global (s : STRING) : "#b" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT FOREACH PC p IN rbox(location(caster), 100) DO message(p, s); + +NONMAGIC SILENT SPELL easter-invader-spawn : "#c" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT spawn(rbox(location(caster), 20), caster, 1040, random(random(5)), 1, 100000); + spawn(rbox(location(caster), 20), caster, 1042, random(random(5)), 1, 100000); + spawn(rbox(location(caster), 20), caster, 1047, random(random(5)), 1, 100000); + +NONMAGIC SILENT SPELL world-shift : "#S00" = + (((REQUIRE (script_int(caster, "Easter_2010_QuestState") >> 7) & 3 == 2) + => (REQUIRE rdistance(location(caster), @("028-1.gat", 63, 67)) < 5) => + EFFECT sfx(location(caster), SFX_TELEPORT, 200); + WAIT 8000; + warp(caster, @("009-1.gat", 55, 37)); + sfx(location(caster), SFX_TELEPORT, 200); + | + (REQUIRE (map_nr(location(caster)) != 28 && count_item(caster, "DarkPetal"))) => + EFFECT inithp = hp(caster); // Store this value. + sfx(location(caster), SFX_TELEPORT, 200); + WAIT 8000; + IF (hp(caster) < inithp) THEN ABORT; // Cancel teleport if the player took damage during channel time (hacky, but for most purposes should work.) + warp(caster, @("028-1.gat", 63, 67)); + sfx(location(caster), SFX_TELEPORT, 200); + ) + | REQUIRE (rdistance(location(caster), @("028-1.gat", 63, 67)) < 5 && (script_int(caster, "Easter_2010_QuestState") >> 17) & 1 == 0) + => EFFECT set_script_variable(caster, Easter_2010_QuestState, script_int(caster, "Easter_2010_QuestState") | (1 << 17)); + sfx(location(caster), SFX_TELEPORT, 200); + WAIT 8000; + warp(caster, @("009-1.gat", 55, 37)); + sfx(location(caster), SFX_TELEPORT, 200); + ) + +NONMAGIC SILENT SPELL easter-invader-killer : "#z" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT { gmcommand strcharinfo(0)+"@killer"; } + +NONMAGIC SILENT SPELL easter-invader-killable : "#x" = + (REQUIRE name_of(caster) == "Xakelbael the Dark") => + EFFECT { gmcommand strcharinfo(0)+"@killable"; } + +NONMAGIC SILENT SPELL easter-debug-reset (s : STRING) : "#r" = + (REQUIRE name_of(caster) == "Freeyorp") => + EFFECT set_script_variable(pc(s), "Easter_2010_QuestState", 0); + +NONMAGIC SILENT SPELL easter-set-flag (s : PC) : "#k" = + (REQUIRE name_of(caster) == "Freeyorp" || name_of(caster) == "Xakelbael the Dark") => + EFFECT IF (s == caster) THEN ABORT; + IF ((script_int(s, "Easter_2010_QuestState") >> 16) & 1) THEN ( message(caster, s + " already has the flag set!"); ABORT; ) + script_target = s; + { set Easter_2010_QuestState, Easter_2010_QuestState | (1 << 16); // RETURN_READY flag + mes "As the smoke clears, you feel stronger, vivified."; + next; + mes "The world seems more vibrant. It looks the same as ever, but you get a sense of something more."; + next; + mes "You feel something familiar."; + next; + mes "This sensation... could it be home?"; + next; + mes "A single word comes to your mind - " + getspellinvocation("world-shift") + ". While it sounds magical, you know with certainty that you will not need any magical power to use it."; + next; + mes "Could this be the way to move to and from the worlds? Either way, the dark petal the rose vanished into seems to be the key."; + next; + mes "Though you might be able to succeed in one trip without it, returning home."; + if ((Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK == E10_STATE_ROSE_ROSE_COMPLETE) close; + next; + mes "But the world is still not quite right. Perhaps there is someone you should help before the world releases its hold on you?"; + close; + } + +NONMAGIC SILENT SPELL easter-get-debug : "#e" = + (REQUIRE name_of(caster) == "Freeyorp" || name_of(caster) == "Xakelbael the Dark") => + EFFECT { message strcharinfo(0), "Global state egg1: " + $Easter_2010_Egg_Loc_State1; + message strcharinfo(0), "Global state egg2: " + $Easter_2010_Egg_Loc_State2; + message strcharinfo(0), "Global state egg3: " + $Easter_2010_Egg_Loc_State3; + message strcharinfo(0), "Global state egg4: " + $Easter_2010_Egg_Loc_State4; + message strcharinfo(0), "Global state egg5: " + $Easter_2010_Egg_Loc_State5; + message strcharinfo(0), "Global npc state1: " + $Easter_2010_Npc_State1; + message strcharinfo(0), "Global npc state2: " + $Easter_2010_Npc_State2; + }; + message(caster, "Local state egg1: " + script_int(caster, "Easter_2010_EggState1")); + message(caster, "Local state egg2: " + script_int(caster, "Easter_2010_EggState1")); + message(caster, "Local state egg3: " + script_int(caster, "Easter_2010_EggState1")); + message(caster, "Local state egg4: " + script_int(caster, "Easter_2010_EggState1")); + message(caster, "Local state egg5: " + script_int(caster, "Easter_2010_EggState1")); + message(caster, "Local state quest: " + script_int(caster, "Easter_2010_QuestState")); + + + + PROCEDURE hug_tree(target) = IF (target = "" || target = "tree" || target = "tree*" diff --git a/data/028-1.wlk b/data/028-1.wlk new file mode 100755 index 00000000..253a953f Binary files /dev/null and b/data/028-1.wlk differ diff --git a/data/028-3.wlk b/data/028-3.wlk new file mode 100755 index 00000000..67493a1a Binary files /dev/null and b/data/028-3.wlk differ diff --git a/data/resnametable.txt b/data/resnametable.txt index 4982fd3e..4fc83a70 100644 --- a/data/resnametable.txt +++ b/data/resnametable.txt @@ -56,4 +56,6 @@ 026-1.gat#026-1.wlk# 027-1.gat#027-1.wlk# 027-2.gat#027-2.wlk# +028-1.gat#028-1.wlk# +028-3.gat#028-3.wlk# botcheck.gat#botcheck.wlk# diff --git a/db/const.txt b/db/const.txt index 7e28f040..8a2ddd04 100644 --- a/db/const.txt +++ b/db/const.txt @@ -237,3 +237,105 @@ MFLAG_ELANORE_OMAR 32768 // Told Omar about Elanore's involvement DOCK_tulimshar 1 DOCK_hurnscald 2 + +// ----------------- +// -- Easter 2010 -- +// ----------------- + +// Dealing with the Old Woman's token quest +E10_STATE_EGG_MASK 3 +E10_STATE_EGGS_COLLECTED_MASK 31 +E10_STATE_EGGS_COLLECTED_SHIFT 2 +E10_STATE_EGG_COLLECTING 1 +E10_STATE_EGG_COLLECTED 2 +E10_STATE_EGG_REWARDED 3 +E10_STATE_ROSE_MASK 3 +E10_STATE_ROSE_SHIFT 7 +E10_STATE_ROSE_ROSE_USED 1 +E10_STATE_ROSE_ROSE_COMPLETE 2 +E10_STATE_ROSE_RETURNED 3 + + +// Dealing with $Easter_2010_Npc_State1 +E10_TIMER_STATE_EGGS_MASK 31 +E10_TIMER_STATE_TREES_MASK 31 +E10_TIMER_STATE_TREES_SHIFT 5 +E10_TIMER_STATE_DOCTOR_MASK 31 +E10_TIMER_STATE_DOCTOR_SHIFT 10 +E10_EGGS_TIMER_OVERTICK_MASK 31 +E10_EGGS_TIMER_OVERTICK_SHIFT 15 +E10_TREES_OVERTICK_MASK 31 +E10_TREES_OVERTICK_SHIFT 20 +E10_DOCTOR_TIMER_OVERTICK_MASK 31 +E10_DOCTOR_TIMER_OVERTICK_SHIFT 25 + + +// Dealing with $Easter_2010_Npc_State2 +E10_DOCTOR_POSITION_MASK 7 +E10_DOCTOR_POSITION_SHIFT 0 +E10_DOCTOR_POSITION_NULL 0 +E10_DOCTOR_POSITION_BIGTREE 1 +E10_DOCTOR_POSITION_ISLAND 2 +E10_DOCTOR_POSITION_STONES 3 +E10_DOCTOR_POSITION_FRUIT 4 +E10_DOCTOR_POSITION_CAVE 5 +E10_BARRIER_MASK 1 +E10_BARRIER_SHIFT 4 +E10_BARRIER_OPEN 0 +E10_BARRIER_ACTIVE 1 + +// Dealing with the doctor +E10_DOCTOR_HELP_STATES_MASK 15 +E10_DOCTOR_HELP_STATES_SHIFT 11 +E10_FLAG_KNOWS_DOCTOR_MASK 1 +E10_FLAG_KNOWS_DOCTOR_SHIFT 10 +E10_FLAG_KNOWS_DOCTOR 1 +E10_FLAG_HELPED_DOCTOR_TREE_MASK 1 +E10_FLAG_HELPED_DOCTOR_TREE_SHIFT 11 +E10_FLAG_HELPED_DOCTOR_TREE 1 +E10_FLAG_HELPED_DOCTOR_ISLAND_MASK 1 +E10_FLAG_HELPED_DOCTOR_ISLAND_SHIFT 12 +E10_FLAG_HELPED_DOCTOR_ISLAND 1 +E10_FLAG_HELPED_DOCTOR_STONES_MASK 1 +E10_FLAG_HELPED_DOCTOR_STONES_SHIFT 13 +E10_FLAG_HELPED_DOCTOR_STONES 1 +E10_FLAG_HELPED_DOCTOR_FRUIT_MASK 1 +E10_FLAG_HELPED_DOCTOR_FRUIT_SHIFT 14 +E10_FLAG_HELPED_DOCTOR_FRUIT 1 +E10_HELPED_DOCTOR_SHIFT 11 +E10_HELPED_DOCTOR_MASK 15 +E10_FLAG_MID_REWARD 1 +E10_FLAG_MID_REWARD_SHIFT 15 +E10_FLAG_MID_REWARD_MASK 1 +E10_FLAG_RETURN_READY 1 +E10_FLAG_RETURN_READY_SHIFT 16 +E10_FLAG_RETURN_READY_MASK 1 +E10_FLAG_USED_FREE_WARP_SHIFT 17 +E10_STATE_REWARDS_SHIFT 18 +E10_STATE_REWARDS_MASK 3 +E10_STATE_REWARD_RABBIT_EARS 1 +E10_STATE_REWARD_EGGSHELL 2 + +// Menus +E10_STONES_WISP 0 +E10_STONES_SPECTRE 1 +E10_STONES_POLTERGEIST 2 +E10_STONES_SOUL 3 +E10_STONES_HEART 4 +E10_STONES_EAR 5 +E10_STONES_EYE 6 +E10_STONES_BONE 7 +E10_STONES_SKULL 8 +E10_STONES_CRYSTAL 9 +E10_STONES_RAGS 10 +E10_STONES_PETAL 11 +E10_ISLAND_MENU_DEATH_AWE 12 +E10_ISLAND_MENU_SCARED 13 +E10_ISLAND_MENU_WISPS 14 +E10_ISLAND_MENU_OFFER_LIFESTONE 15 + + +// Miscellaneous +E10_COLLECT_EGGS_ID 1246 +E10_TOKEN_ID 666 +E10_MIDREWARD_ID 1247 // Valentine's Glasses (as described) diff --git a/db/item_db.txt b/db/item_db.txt index f5ddd67a..b9f37a46 100644 --- a/db/item_db.txt +++ b/db/item_db.txt @@ -330,20 +330,20 @@ 1241, SnowmanSnowGlobe, Snowman Snow Globe, 3, 7500, 5000, 1, , , , , , 2, , , 0, , {}, {} 1242, SnowGoggles, Snow Goggles, 5, 7500, 5000, 10, , 5, , -2, 0, 2, 256, , 0, 0, {}, {} 1243, PaperHat, Paper Party Hat, 5, 10, 5, 1, , 1, , 0, 0, 2, 256, , 0, 0, {}, {} -//1244 -//1245 -//1246 -//1247 -//1248 -//1249 -//1250 -//1251 -//1252 -//1253 -//1254 -//1255 -//1256 -//1257 +1244, DarkTalisman, Dark Talisman, 5, 0, 0, 0, , 30, , 100, 0, 2, 512, , 0, 0, {}, { set @minLvl, 1; callfunc "RestrictedItem"; set @val, getopt2; if (!(@val & 1024)) setopt2 getopt2 | 1024; bonus bMaxHp, 30000; bonus bFlee, -100; } +1245, BentNeedle, Bent Needle, 3, 700, 500, 1, , , , , , 2, , , 0, 0, {}, {} +1246, DarkEasterEgg, Dark Easter Egg, 3, 700, 500, 10, , , , , , 2, , , 0, 0, {}, {} +1247, HeartGlasses, Heart Glasses, 5, 7500, 5000, 10, , 4, , 5, 0, 2, 256, , 0, 0, {}, {} +1248, Blueberries, Blueberries, 0, 1000, 500, 120, , , , , , 2, , , 0, , { itemheal 800, 0; }, {} +1249, StrangeCoin, Strange Coin, 3, 7000, 5000, 180, , , , , , 2, , , 0, 0, {}, {} +1250, Pear, Pear, 0, 1000, 500, 48, , , , , , 2, , , 0, , { itemheal 200, 0; }, {} +1251, Plum, Plum, 0, 1000, 500, 48, , , , , , 2, , , 0, , { itemheal 300, 0; }, {} +1252, Cherry, Cherry, 0, 1000, 500, 48, , , , , , 2, , , 0, , { itemheal 250, 0; }, {} +1253, GoldenDeliciousApple, GoldenDeliciousApple, 0, 1000, 500, 48, , , , , , 2, , , 0, , { itemheal 200, 0; }, {} +1254, DarkPetal, Dark Petal, 3, 15000, 8000, 250, , , , , , 2, , , 0, , {}, {} +1255, WhiteRabbitEars, White Rabbit Ears, 5, 10, 5, 1, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +1256, EggshellHat, Eggshell Hat, 5, 10, 5, 1, , 12, , 0, 0, 2, 256, , 1, 0, { bonus bAgi, -1; }, {} +1257, FlawedLens, Flawed Lens, 3, 10000, 5000, 112, , , , , , 2, , , 0, 0, {}, {} 1258, Honey, Honey, 0, 100, 80, 2, , , , , , 2, , , , , { itemheal 45, 0; }, {} //1259, BeeEgg @@ -364,7 +364,6 @@ //1274, SmallClub //1275, LoinCloth - 2050, RedCottonShirt, Red Cotton Shirt, 5, 10, 5, 10, , 2, , -4, 0, 2, 512, , 0, 0, {}, {} 2051, GreenCottonShirt, Green Cotton Shirt, 5, 10, 5, 10, , 2, , -4, 0, 2, 512, , 0, 0, {}, {} 2052, DarkBlueCottonShirt, Dark Blue Cotton Shirt, 5, 10, 5, 10, , 2, , -4, 0, 2, 512, , 0, 0, {}, {} @@ -505,4 +504,13 @@ 2187, OrangePaperhat, Orange Paper Party Hat, 5, 10, 5, 1, , 1, , 0, 0, 2, 1, , 1, 0, {}, {} 2188, PurplePaperhat, Purple Paper Party Hat, 5, 10, 5, 1, , 1, , 0, 0, 2, 1, , 1, 0, {}, {} 2189, DarkGreenPaperhat, Dark Green Paper Party Hat, 5, 10, 5, 1, , 1, , 0, 0, 2, 1, , 1, 0, {}, {} - +2190, RedRabbitEars, Red Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2191, GreenRabbitEars, Green Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2192, DarkBlueRabbitEars, Dark Blue Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2193, YellowRabbitEars, Yellow Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2194, LightBlueRabbitEars, Light Blue Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2195, PinkRabbitEars, Pink Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2196, BlackRabbitEars, Black Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2197, OrangeRabbitEars, Orange Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2198, PurpleRabbitEars, Purple Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} +2199, DarkGreenRabbitEars, Dark Green Rabbit Ears, 5, 10, 5, 5, , 5, , 4, 0, 2, 256, , 1, 0, {}, {} diff --git a/npc/001-1_Tulimshar/bleacher.txt b/npc/001-1_Tulimshar/bleacher.txt index 883bd628..57731dbd 100644 --- a/npc/001-1_Tulimshar/bleacher.txt +++ b/npc/001-1_Tulimshar/bleacher.txt @@ -32,6 +32,7 @@ L_bleach_menu: "Desert hat", L_desert_hat, "Cotton boots", L_cotton_boots, "Cotton gloves", L_cotton_gloves, + "Rabbit ears", L_rabbit_ears, "Nevermind", -; goto L_close; @@ -92,6 +93,10 @@ L_cotton_gloves: set @dyeBase, 2160; goto L_choose_color; +L_rabbit_ears: + set @normal, 1255; + set @dyeBase, 2190; + L_choose_color: mes "[Candide]"; mes "\"And the color?\""; diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt index 7dea2a32..48062d10 100644 --- a/npc/001-1_Tulimshar/elanore.txt +++ b/npc/001-1_Tulimshar/elanore.txt @@ -145,6 +145,7 @@ L_Chat: L_Main: if (@has_magic && (@Q_status == @STATUS_INITIAL)) menu + "Are you okay? You seem worried.", L_easter_worried, "Can you heal me?", L_NoHealMessage, "Can you teach me magic?", L_Teach, "What do you know about...", L_Question, @@ -152,6 +153,7 @@ L_Main: if (@has_magic && (@Q_status > @STATUS_INITIAL)) menu + "Are you okay? You seem worried.", L_easter_worried, "Can you heal me?", L_NoHealMessage, "Can you teach me more?", L_Teach, "Where can I get more lifestones?", L_Lifestones, @@ -160,6 +162,7 @@ L_Main: if (!@has_magic) menu + "Are you okay? You seem worried.", L_easter_worried, "Can you heal me?", L_NoHealMessage, "What do you know about...", L_Question, "Goodbye!", L_bye; @@ -180,7 +183,7 @@ L_OnPcKillFinish: L_Lifestones: mes "[Elanore the Healer]"; - mes "\"I always need components for my own healing spells. If you bring me ten gamboge leaves, ten alizarin leaves, ten mauve leaves and ten cobalt leaves, I can make ten lifestones; I will give you half of them.\""; + mes "\"I always need components for my own healing spells. If you bring me ten gamboge leaves, ten alizarin leaves, ten mauve leaves and ten cobalt leaves, I suppose I can make ten lifestones; I will give you half of them.\""; next; menu @@ -636,6 +639,20 @@ L_bye: mes "\"Goodbye!\""; close; +L_easter_worried: + mes "[Elanore the Healer]"; + mes "\"Oh... well... no, not really. I'm just feeling worried some reason.\""; + next; + menu + "Is there anything I can do?", L_easter_offer, + "That's too bad. But I've got chocolate to stuff myself on - haha, seeya round!", -, + close; + +L_easter_offer: + mes "[Elanore the Healer]"; + mes "\"It's very kind of you to offer, but I don't think there's anything you can do.\""; + close; + S_update_var: set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) diff --git a/npc/009-1_Hurnscald/old_woman.txt b/npc/009-1_Hurnscald/old_woman.txt index 1df4229f..b021ae0b 100644 --- a/npc/009-1_Hurnscald/old_woman.txt +++ b/npc/009-1_Hurnscald/old_woman.txt @@ -7,9 +7,12 @@ mes "\"Hello deary.\""; next; + if ((Inspector >= 1 && Inspector <= 7) || Inspector == 9) goto L_NohMask; + goto L_Easter; + L_Continue: - if ((Inspector >= 1 && Inspector <= 7) || Inspector == 9) goto L_NohMask; - close; + if ((Inspector >= 1 && Inspector <= 7) || Inspector == 9) goto L_NohMask; + close; L_Lower: mes "[Old Woman]"; @@ -63,4 +66,248 @@ L_NohMask_Fake_Satchel: mes "\"I've remembered something else. The night the troupe left, I saw someone with a theater mask take a large satchel out of town. He was heading north.\""; set Inspector, 10; close; + +L_Easter: + if ((Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK == E10_STATE_ROSE_ROSE_COMPLETE) goto L_Easter_Complete; + if ((Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK == E10_STATE_ROSE_RETURNED) goto L_Easter_Gaveup; + if ((Easter_2010_QuestState & E10_STATE_EGG_MASK) == E10_STATE_EGG_COLLECTING) goto L_Easter_Check; + if ((Easter_2010_QuestState & E10_STATE_EGG_MASK) == E10_STATE_EGG_COLLECTED) goto L_Easter_Reward; + if ((Easter_2010_QuestState & E10_STATE_EGG_MASK) == E10_STATE_EGG_REWARDED) goto L_Easter_Hint; + + mes "[Old Woman]"; + mes "\"Would you be able to do something for me, dear?\""; + next; + menu "Sure", L_Easter_Accept_Explain, + "What do you need?", L_Easter_Explain, + "No.", -; + close; + +L_Easter_Explain: + mes "[Old Woman]"; + mes "\"Well, my grandchildren are coming to stay for Easter, and I'm afraid I've forgotten to buy any eggs. Now, there're three of them, and the youngest will want... four eggs. And the middle child will want... seven eggs. And the eldest child will want... nine eggs. And the youngest child will want... four eggs. And the middle child will want...\""; + next; + +L_Easter_Menu: + menu "\"Uh... yeah, I can do that.\"", L_Easter_Accept, + "What did you need again?", L_Easter_Explain, + "No.", -; + close; + +L_Easter_Accept_Explain: + mes "[Old Woman]"; + mes "\"Oh! Thank you very much, " + strcharinfo(0) + ". Please bring me those Easter eggs as quickly as you can - my grandchildren will be here soon, and if they arrive and there's no chocolate for them they will be most upset!\""; + set Easter_2010_QuestState, (Easter_2010_QuestState & ~E10_STATE_EGG_MASK) | E10_STATE_EGG_COLLECTING; + close; + +L_Easter_Accept: + mes "[Old Woman]"; + mes "\"Thank you, dear. What luck you dropped by here!\""; + set Easter_2010_QuestState, (Easter_2010_QuestState & ~E10_STATE_EGG_MASK) | E10_STATE_EGG_COLLECTING; + close; + +L_Easter_Check: + mes "[Old Woman]"; + if (countitem(E10_COLLECT_EGGS_ID) + ((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK) < 20) goto L_Easter_Check_Not_Enough; + mes "\"Thank you, dear; that should be all I need.\""; + delitem E10_COLLECT_EGGS_ID, 20 - ((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK); + set Easter_2010_QuestState, (Easter_2010_QuestState & ~((E10_STATE_EGGS_COLLECTED_MASK << E10_STATE_EGGS_COLLECTED_SHIFT) | E10_STATE_EGG_MASK)) | (20 << E10_STATE_EGGS_COLLECTED_SHIFT) | E10_STATE_EGG_COLLECTED; + close; + +L_Easter_Check_Not_Enough: + if (countitem(E10_COLLECT_EGGS_ID) + ((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK) == 0) goto L_Easter_Check_None; + if (countitem(E10_COLLECT_EGGS_ID) == 0) goto L_Easter_No_More_To_Add; + set Easter_2010_QuestState, (Easter_2010_QuestState & ~((E10_STATE_EGGS_COLLECTED_MASK << E10_STATE_EGGS_COLLECTED_SHIFT) | E10_STATE_EGG_MASK)) | ((countitem(E10_COLLECT_EGGS_ID) + ((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK)) << E10_STATE_EGGS_COLLECTED_SHIFT) | E10_STATE_EGG_COLLECTING; + delitem E10_COLLECT_EGGS_ID, countitem(E10_COLLECT_EGGS_ID); // In order to reach this point, the player must not have enough eggs to complete the quest anyway + + mes "\"Thank you... that makes " + ((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK) + " eggs from you so far.\""; + if (((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK) > 15) mes "\"If you could get just a few more, it would be very much appreciated...\""; + if (((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK) <= 15) mes "\"My mind isn't what it used to be, but if you could get somewhere around " + (20 - ((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK) + rand(3) - rand(3)) + " more for us, it would be very much appreciated...\""; // Add some jitter to make her seem more absent-minded. Rand called twice to create a curve + close; + +L_Easter_No_More_To_Add: + if (((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK) > 15) mes "\"Thank you for you help so far... if you could get just a few more, it would be very much appreciated...\""; + if (((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK) <= 15) mes "\"Thank you for your help so far. You don't have to, but if you could find " + (20 - ((Easter_2010_QuestState >> E10_STATE_EGGS_COLLECTED_SHIFT) & E10_STATE_EGGS_COLLECTED_MASK)) + " more eggs, it would be very helpful to this old lady, and much appreciated...\""; + close; + +L_Easter_Check_None: + mes "\"My memory isn't what it used to be, dear, but I think I saw some people looking around under rocks and trees outside town... maybe there're some eggs out there you can find?\""; + close; + +L_Easter_Reward: + mes "[Old Woman]"; + mes "\"Ah, your reward... I was going to give you a hat, as seems to be the tradition around here, but I have a feeling of... something that I have not felt in a long time.\""; + mes "She hesitates."; + next; + + getinventorylist; + if (@inventorylist_count == 100) + goto L_Easter_No_Room; + + mes "[Old Woman]"; + mes "\"In light of this... you had best take this... rose with you. It might not seem like much, but in the right place, it can do much, much more than you think...\""; + mes "She seems restless, and not at all as frail as she was moments before."; + next; + + mes "[Old Woman]"; + mes "\"Take this, and carry it with you wherever you go... even in the darkest of moments, you may yet see the light with this...\""; + set Easter_2010_QuestState, (Easter_2010_QuestState & ~E10_STATE_EGG_MASK) | E10_STATE_EGG_REWARDED; + getitem E10_TOKEN_ID, 1; + close; + +L_Easter_No_Room: + mes "[Old Woman]"; + mes "She looks at you briefly with a sudden, fierce searching look."; + mes "She mutters, \"Though it doesn't matter right now I suppose... you wouldn't have the room for it anyway...\""; + next; + + mes "[Old Woman]"; + mes "\"Yet you have shown yourself to be kind and good... if you make some room, I will have something very special for you when you return.\""; + close; + +L_Easter_Hint: + mes "[Old Woman]"; + setarray @hints$, "\"The rose I gave you? To be honest with you, some strange things have been happening...\"", "\"This world knows many perils, and in times of uncertainty we often need something--to hold, dear, to guide us...\"", "\"I can't quite describe it, but if I were you, I'd hold on to that rose, especially when the light seems to fade...\"", "\"A power beyond my understanding seems to be stirring, I'm afraid.\""; + mes @hints$[rand(getarraysize(@hints$))]; + close; + + +L_Easter_Complete: + if ((Easter_2010_QuestState >> E10_STATE_REWARDS_SHIFT) & E10_STATE_REWARDS_MASK == 0) goto L_Easter_Complete_New_Rewards; + if ((Easter_2010_QuestState >> E10_STATE_REWARDS_SHIFT) & E10_STATE_REWARDS_MASK == E10_STATE_REWARDS_MASK) goto L_Easter_Done_All; + + // Done some. + if ((~(Easter_2010_QuestState >> E10_DOCTOR_HELP_STATES_SHIFT) & E10_DOCTOR_HELP_STATES_MASK) == 0) goto L_Easter_Finish_Reward; + // Helped thrice, and has already been rewarded. Hint that there is more to be done, but still thank the player for the help. + mes "[Old Woman]"; + mes "\"I just can't get over how helpful you've been lately. You know, I hear there might be more to do still, if you're interested. Either way, you have my sincerest thanks.\""; + close; + +L_Easter_Complete_New_Rewards: +// Player hasn't been rewarded yet. Give them the items and set states accordingly. + if ((~(Easter_2010_QuestState >> E10_DOCTOR_HELP_STATES_SHIFT) & E10_DOCTOR_HELP_STATES_MASK) == 0) goto L_Easter_Reward_All; + // Player helped thrice. Give one of the two items, and set one of the flags accordingly. + if (rand(2) == 0) goto L_Half_Reward_Rabbit_Hat; + getinventorylist; + if (@inventorylist_count == 100) goto L_Hats_No_Room; + // Reward Eggshell hat here + mes "[Old Woman]"; + mes "\"Oh, it's good to see you again, sweetie! After giving out gifts to all the children I noticed I still had quite a few of them left. I thought you might enjoy one yourself.\""; + getitem "EggshellHat", 1; + set Easter_2010_QuestState, Easter_2010_QuestState | (E10_STATE_REWARD_EGGSHELL << E10_STATE_REWARDS_SHIFT); + close; + +L_Half_Reward_Rabbit_Hat: + // Reward Rabbit hat here + getinventorylist; + if (@inventorylist_count == 100) goto L_Hats_No_Room; + mes "[Old Woman]"; + mes "\"Hehe, oh, I'm glad I ran into you again! Look at these! Aren't they just adorable? You should have seen my grandchildren, bless them. Of course I saved you a pair!\""; + getitem "WhiteRabbitEars", 1; + set Easter_2010_QuestState, Easter_2010_QuestState | (E10_STATE_REWARD_RABBIT_EARS << E10_STATE_REWARDS_SHIFT); + close; + +L_Easter_Finish_Reward: + // The player has already been rewarded once, but has gone back and helped. Give the other reward here. + if ((Easter_2010_QuestState >> E10_STATE_REWARDS_SHIFT) & E10_STATE_REWARDS_MASK == E10_STATE_REWARD_RABBIT_EARS) goto L_Easter_Finish_Reward_Eggshell; + + // Give the Rabbit ears, as the player already has the eggshell. + getinventorylist; + if (@inventorylist_count == 100) goto L_Hats_No_Room; + mes "[Old Woman]"; + mes "The old woman looks upon you as though you had been missing. \"Oh, so wonderful to see your kind face again! Rumour has it that you've been hopping about being more helpful. At least that's what I had heard.\""; + getitem "WhiteRabbitEars", 1; + set Easter_2010_QuestState, Easter_2010_QuestState | (E10_STATE_REWARD_RABBIT_EARS << E10_STATE_REWARDS_SHIFT); + + goto L_Easter_All_done; + +L_Easter_Finish_Reward_Eggshell: + // Give the eggshll, as the player already has the ears. + getinventorylist; + if (@inventorylist_count == 100) goto L_Hats_No_Room; + mes "[Old Woman]"; + mes "\"Oh, I knew you could do it! I'm sure it was difficult, but you showed real patience throughout. I was saving this for you, just in case you came back. I think it's... eggsquisite!\" She giggles and gives you a hat."; + getitem "EggshellHat", 1; + set Easter_2010_QuestState, Easter_2010_QuestState | (E10_STATE_REWARD_EGGSHELL << E10_STATE_REWARDS_SHIFT); + goto L_Easter_All_Done; + +L_Easter_Reward_All: + // The player has not yet been rewarded, but has helped with everything. Give both hats and set flags accordingly. + mes "[Old Woman]"; + mes "\"Oh my, you're safe and sound! I was so worried, but it seems you have done so well.\""; + next; + mes "[Old Woman]"; + mes "After a moment, she continues. \"I believe reflecting upon one's actions to be very revealing.\""; + next; + mes "[Old Woman]"; + mes "\"You, my dear, are a shining example, demonstrating, among other things, perseverance and compassion.\""; + next; + mes "[Old Woman]"; + mes "\"So for that, and for helping me with my grandchildren, I would like to give you these tokens of my appreciation.\""; + next; + getinventorylist; + if (@inventorylist_count > 98) goto L_Hats_No_Room; + mes "[Old Woman]"; + mes "\"Hold out your hands please, sweetie.\" You do so, and receive two very well-crafted hats."; + getitem "EggshellHat", 1; + getitem "WhiteRabbitEars", 1; + set Easter_2010_QuestState, Easter_2010_QuestState | ((E10_STATE_REWARD_EGGSHELL | E10_STATE_REWARD_RABBIT_EARS) << E10_STATE_REWARDS_SHIFT); + next; + +L_Easter_Done_All: + mes "[Old Woman]"; + mes "\"Hehe, I could tell you were a little confused by my first gift, yes? People really seem to enjoy these sorts of things, so I decided to reconsider my hat policy. And you've earned everything, every step of the way.\""; + close; + +L_Easter_Gaveup: + mes "[Old Woman]"; + mes "\"Oh no,\" she gasps, extremely disheartened at your early return. \"I was expecting so much more from you once I heard what had happened.\""; + next; + mes "[Old Woman]"; + mes "She shakes her head, obviously upset. \"In fact, I had planned on giving you some extra treats for being so helpful and brave.\""; + next; + mes "[Old Woman]"; + mes "\"But I guess you did your best, honey. Maybe that's all that matters.\""; + close; + +L_Hats_No_Room: + mes "[Old Woman]"; + mes "\"Oh, no, no, that won't do. I'll wait until you have some more room for carrying things. I wouldn't want you to lose a gift.\""; + mes "\"Please see me again when you are ready, honey.\""; + close; + +// The all important rose die script. Hooked into the old woman script for now. +OnPCDieEvent: + if (countitem(E10_TOKEN_ID) < 1) end; + if ((Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK >= E10_STATE_ROSE_ROSE_USED) end; + savepoint "028-1", 63, 68; + delitem E10_TOKEN_ID, 1; + set Easter_2010_QuestState, (Easter_2010_QuestState & ~(E10_STATE_ROSE_MASK << E10_STATE_ROSE_SHIFT)) | (E10_STATE_ROSE_ROSE_USED << E10_STATE_ROSE_SHIFT); + getitem "DarkPetal", 1; + end; + +OnManualStartTimer: + initnpctimer; + end; + +OnManualStopTimer: + stopnpctimer; + end; + + +OnTimer30000: + setnpctimer 0; + if ($Easter_2010_Npc_State1 & E10_TIMER_STATE_EGGS_MASK < ($Easter_2010_Npc_State1 >> E10_EGGS_TIMER_OVERTICK_SHIFT) & E10_EGGS_TIMER_OVERTICK_MASK) goto L_timer_increment; + +OnResetReplenish: + set $Easter_2010_Npc_State1, $Easter_2010_Npc_State1 & ~E10_TIMER_STATE_EGGS_MASK; +OnReplenish: + set $Easter_2010_Egg_Loc_State1, $Easter_2010_Egg_Loc_State1 | (rand(2147483647) & rand(2147483647)); + set $Easter_2010_Egg_Loc_State2, $Easter_2010_Egg_Loc_State2 | (rand(2147483647) & rand(2147483647)); + set $Easter_2010_Egg_Loc_State3, $Easter_2010_Egg_Loc_State3 | (rand(2147483647) & rand(2147483647)); + set $Easter_2010_Egg_Loc_State4, $Easter_2010_Egg_Loc_State4 | (rand(2147483647) & rand(2147483647)); + set $Easter_2010_Egg_Loc_State5, $Easter_2010_Egg_Loc_State5 | (rand(2147483647) & rand(2147483647)); + end; + +L_timer_increment: + set $Easter_2010_Npc_State1, ($Easter_2010_Npc_State1 & ~E10_TIMER_STATE_EGGS_MASK) | (($Easter_2010_Npc_State1 & E10_TIMER_STATE_EGGS_MASK) + 1 ); } diff --git a/npc/009-2_Hurnscald/selim.txt b/npc/009-2_Hurnscald/selim.txt index 520aad30..d118b8a0 100644 --- a/npc/009-2_Hurnscald/selim.txt +++ b/npc/009-2_Hurnscald/selim.txt @@ -31,6 +31,7 @@ L_clothes_choice: "Desert hat", L_desert_hat, "Cotton boots", L_cottonboots, "Cotton gloves", L_cottongloves, + "Rabbit ears", L_rabbitears, "I'm fine for now, thanks.", -; close; @@ -114,6 +115,14 @@ L_cottongloves: set @name$, "cotton gloves"; goto L_picked_item; +L_rabbitears: + set @del, 1255; + set @new, 2190; + set @name$, "rabbit ears"; + set @pronoun$, "them"; + set @is_verb$, "are"; + goto L_picked_item; + L_picked_item: if (countitem(@del) == 0) goto L_havenone; L_colour: diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt index 256c036c..2a8a2062 100644 --- a/npc/009-2_Hurnscald/wyara.txt +++ b/npc/009-2_Hurnscald/wyara.txt @@ -33,21 +33,23 @@ mes "[Wyara the witch]"; if (!Sex) - mes "\"Greetings, fair traveller! What can I do for you?\""; + mes "\"Oh! Er, sorry, you startled me... How can I help?\""; if (Sex) - mes "\"Hello! What brings you here?\""; + mes "\"Ah! Oh, er, hello... what are you doing here?\""; next; set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_WYARA; L_Main: if (!@has_magic && (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED)) - menu "What do you know about...", L_Question, + menu "Hello! You seem worried, are you alright?", L_easter_worried, + "What do you know about...", L_Question, "Can you help me use the mana seed?", L_Q_manaseed_unabsorbed, "Can you help me learn magic?", L_Magic, "I would like to buy potions.", L_Shop, "Bye!", -; if (!(!@has_magic && (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED))) - menu "What do you know about...", L_Question, + menu "You seem worried. Are you alright?", L_easter_worried, + "What do you know about...", L_Question, "Can you help me learn magic?", L_Magic, "I would like to buy potions.", L_Shop, "Bye!", -; @@ -577,6 +579,11 @@ L_Magic_train_sagatha_lvl1: next; goto L_Magic_main; +L_easter_worried: + mes "[Wyara the Witch]"; + mes "\"I don't know. I'm just - maybe I should talk to Sagatha...\""; + close; + S_update_var: set QUEST_MAGIC2, (QUEST_MAGIC2 & ~(@Q_MASK) diff --git a/npc/011-1_Woodland/auldsbel.txt b/npc/011-1_Woodland/auldsbel.txt index 595c1a9f..24f051ae 100644 --- a/npc/011-1_Woodland/auldsbel.txt +++ b/npc/011-1_Woodland/auldsbel.txt @@ -141,7 +141,7 @@ L_intro_who_are_you: L_short_intro: mes "[Auldsbel the Wizard]"; - mes "\"Welcome back, Padric!\""; + mes "\"Padric, you're back. Well done. I mean...\""; next; goto L_main_menu; @@ -149,7 +149,8 @@ L_main_menu: if (@has_magic) goto L_main_menu_magic; - menu "How does this 'magic' work?", L_about_magic, + menu "Why the long face?", L_easter_nomagic, + "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, @@ -159,7 +160,8 @@ L_main_menu: L_main_menu_magic: if (@wants_sulphur && @wants_ironpowder) - menu "How does magic work?", L_about_magic, + menu "Are you alright? You seem worried.", L_easter_magic, + "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, @@ -186,7 +188,7 @@ L_main_menu_magic: L_ironpowder: mes "[Auldsbel the Wizard]"; - mes "\"No, I do not know the spell for this. I expect that it shouldn't be too hard an invocation, but I'm too busy to work it out.\""; + mes "\"I'm afraid I don't know the spell for this.. I expect that it shouldn't be too hard an invocation, but I'm too busy to work it out.\""; next; mes "[Auldsbel the Wizard]"; mes "\"I know that they used to make iron ore around here, though, many years ago. Perhaps the secret is still hidden somewhere?\""; @@ -196,7 +198,7 @@ L_ironpowder: L_sulphur: mes "[Auldsbel the Wizard]"; set @cost, 400 - (@Q_component_quest * 30); - mes "\"Sulphur powder? Ah, so we have picked up a little offensive magic, haven't we? Good thinking, good thinking. And yes, of course I can transmute volcanic ashes into sulphur powder at a ratio of 1:5, for " + @cost + " GP.\""; + mes "\"Sulphur Powder? Picked up a little offensive magic, h'm? Good thinking, I suppose... oh, and of course I can transmute volcanic ashes into sulphur powder... at a ratio of 1:5? For " + @cost + " GP.\""; next; if (@Q_main_status >= @Q_STATUS_STUDENT) menu @@ -244,7 +246,7 @@ L_sulphur_noash: L_sulphur_noroom: mes "[Auldsbel the Wizard]"; - mes "\"Hmm, you really managed to squeeze something into every little place you had that we could have stored the powder in... you might want to return once you have resolved this matter.\""; + mes "\"How do you expect me to give you this sulphur powder when you've got no room in your pack? Please come back when you've made some room!\""; next; goto L_main_menu; @@ -252,7 +254,7 @@ L_sulphur_teach_spell: if (@Q_component_quest <= 4) goto L_sulphur_teach_spell_no; mes "[Auldsbel the Wizard]"; - mes "\"Very well, then. You have been quite helpful with my experiments, after all. As you may have noticed, the spell takes a pile of volcanic ashes. Close your hands around it, then whisper the invocation.\""; + mes "\"Very well, then. You have been quite helpful with my experiments, after all, even if they... uh, well, as you may have noticed, the spell takes a pile of volcanic ashes. Close your hands around it, then whisper the invocation.\""; next; mes "[Auldsbel the Wizard]"; mes "\"That invocation is '" + getspellinvocation("make-sulphur") + "'.\""; @@ -481,14 +483,14 @@ L_about_auldsbel: L_about_auldsbel_2: mes "[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 specimen for experimentation.\""; + mes "\"Oh, myself? Well... I was just vacationing here, but lately... I don't know. And my newest experiment isn't going well either, I'm afraid.\""; next; goto L_main_menu; L_learn_magic: mes "[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.\""; + mes "Auldsbel frowns."; + mes "\"Oh, 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; mes "[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.\""; @@ -552,7 +554,7 @@ L_Q_sagatha: 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.\""; + mes "\"A mana seed? Around here? No, I'm afraid they've been pulling your leg... Those things are extremely rare, after all.\""; next; goto L_main_menu; @@ -566,7 +568,7 @@ L_Q_manaseed: goto L_Q_manaseed_prepared; if (MAGIC_FLAGS & MFLAG_TOUCHED_MANASEED) goto L_Q_manaseed_touched; - mes "\"You have found an acual Mana Seed? That's impossible! Well, very unlikely... Then again, some others have told me similar rumours. I find it hard to believe that...\""; + 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; mes "[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.\""; @@ -958,6 +960,27 @@ L_learn_spell: callsub S_update_var; goto L_main_menu; +L_easter_nomagic: + mes "[Auldsbel the Wizard]"; + mes "\"H'm? What? Long face? My face is perfectly normal, thank you very much. Although... I am a little worried about my current experiment. It's not going well.\""; + next; + goto L_main_menu; + +L_easter_magic: + mes "[Auldsbel the Wizard]"; + mes "\"Ah, Padric. It's my experiments... they're confusing me, and I fear they're not going at all well.\""; + next; + menu + "Is there anything I can do?", L_easter_help, + "Well that's just too bad.", -; + close; + +L_easter_help: + mes "[Auldsbel the Wizard"; + mes "\"Alas... you've helped with my experiments before, but I fear that this is beyond your capabilities. Thank you for the offer, though.\""; + next; + goto L_main_menu; + LL_repeat_spell: mes "[Auldsbel the Wizard]"; mes "\"The invocation is `" + getspellinvocation("transmute-wood-to-figurine") + ",' followed by the last syllable of the name of the creature you want to shape the log into. So `" + getspellinvocation("transmute-wood-to-figurine") + " lurk' for a Skrytlurk figurine.\""; diff --git a/npc/013-1_Woodland_hills/sagatha.txt b/npc/013-1_Woodland_hills/sagatha.txt index f5e2f606..cb1fd6ad 100644 --- a/npc/013-1_Woodland_hills/sagatha.txt +++ b/npc/013-1_Woodland_hills/sagatha.txt @@ -110,6 +110,7 @@ L_next: next; menu + "Hi, lady. Why are you sad?", L_easter_inquireone, "Who are you?", -, "What's your name?", L_intro_name, "Hello! My name is " + strcharinfo(0) + ".", L_intro_givename, @@ -183,12 +184,14 @@ L_wb: L_main: if (@Q_status) menu + "You seem upset. Are you okay?", L_easter_inquiretwo, "Can you explain magic to me?", L_explain_magic, "Can you teach me more magic?", L_teach, "What do you know about...", L_Question, "Goodbye.", L_close; if (!@Q_status) menu + "You seem upset. Are you okay?", L_easter_inquiretwo, "Can you explain magic to me?", L_explain_magic, "Can you teach me magic?", L_teach_initial, "What do you know about...", L_Question, @@ -410,6 +413,35 @@ L_Q_auldsbel: next; goto L_main; +L_easter_inquireone: + mes "[Sagatha the Witch]"; + mes "\"Never you mind.\""; + close; + +L_easter_inquiretwo: + mes "[Sagatha the Witch]"; + mes "\"Well... *she looks at you for a moment* I don't know exactly... there's something... the animals can feel it too. They're worried as well...\""; + menu + "Okay... is there anything I can do?", L_easter_offer, + "How can you tell what animals are feeling?", L_easter_feelings, + "Gee, I hope nothing happens to the little animals!", L_easter_gee, + close; + +L_easter_offer: + mes "[Sagatha the Witch]"; + mes "\"Thank you for the offer, but no, there isn't anything...\""; + close; + +L_easter_feelings: + mes "[Sagatha the Witch]"; + mes "\"Hm? What? Oh... the same way you do, I suppose.\""; + close; + +L_easter_gee: + mes "[Sagatha the Witch]"; + mes "\"Yes, so do I...\""; + close; + L_close: close; diff --git a/npc/013-2_Magic_house/wizard.txt b/npc/013-2_Magic_house/wizard.txt index e74b15ec..45fd8034 100644 --- a/npc/013-2_Magic_house/wizard.txt +++ b/npc/013-2_Magic_house/wizard.txt @@ -3,10 +3,11 @@ set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_OLD_WIZARD; mes "[Old Wizard]"; - mes "\"Welcome, dear wanderer! Come into my humble home. Take a rest, eat and drink.\""; + mes "\"Ah, hello... \""; next; menu + "Hey old man, you look worried - you okay?", L_easter_worried, "Thanks, that's very kind of you!",thanks, "Can you teach me magic?", L_teach_rude, "Oh, shut up!",shutup; @@ -41,7 +42,7 @@ nothx: L_new_student: mes "[Old Wizard]"; - mes "\"Studying is always an excellent use of one's mind! I fear that I can't offer too much assistance to you, however. But if you are interested, I could perhaps teach you a simple spell?\""; + mes "\"Studying is very good for the mind... um, I'm afraid that just at the moment I'm - well, I suppose I could teach you one spell.\""; next; menu @@ -77,5 +78,65 @@ ok: next; mes "\"Oh, and please don't take my apprentice too seriously. He still has a lot to learn.\""; close; + +L_easter_worried: + mes "[Old Wizard]"; + setarray @cryptic$, "\"Mm, I'm alright. But you'd better head off home... doesn't do to be abroad of late.\"", "\"An intruder is abroad, my young man. It may be nothing, but I doubt it! Best go home before it gets dark.\"", "\"Darkness, my boy, darkness. I'm not afraid, but I'm worried!\"", "\"I was out gathering herbs, but... well, you should go home as well.\""; + set @random_index, rand(getarraysize(@cryptic$)); + mes @cryptic$[@random_index]; + if (@random_index == 1) goto L_easter_abroad; + if (@random_index == 2) goto L_easter_abroad; + if (@random_index == 3) goto L_easter_darkness; + if (@random_index == 4) goto L_easter_gohome; + close; + +L_easter_abroad: + menu + "Abroad? You mean like, the beach? Sand, sun and... palm trees?", L_easter_holiday, + "Um, okay.", -, + close; + +L_easter_holiday: + mes "[Old Wizard]"; + mes "\"No, you fool! I mean like... about. You know? *sigh* Never mind...\""; + close; + +L_easter_darkness: + menu + "Ha! Bet you are afraid.", L_easter_afraid, + "Worried? Why?", L_easter_whyworried, + "Okay. Bye.", -; + close; + +L_easter_afraid: + mes "[Old Wizard]"; + mes "\"Don't be ridiculous! Humph!\""; + close; + +L_easter_whyworried: + mes "[Old Wizard]"; + mes "\"I'm afraid I can't tell you that...\""; + next; + mes "\"I don't know myself!\""; + close; + +L_easter_gohome: + menu + "Leave me alone, you crazy old man.", L_easter_crazy, + "Thanks for the advice, I guess...", L_easter_thanks, + "Yeah, I think so too.", -, + close; + +L_easter_crazy: + mes "[Old Wizard]"; + mes "\"Humph! Young scoundrel, be off with you! Do something useful for once... I hear the old woman in Hurnscald was looking for some help.\""; + close; + +L_easter_thanks: + mes "[Old Wizard]"; + mes "\"Take care, now, my boy.\""; + close; + + } diff --git a/npc/028-1/Blocker.txt b/npc/028-1/Blocker.txt new file mode 100644 index 00000000..8b3aa120 --- /dev/null +++ b/npc/028-1/Blocker.txt @@ -0,0 +1,13 @@ +028-1.gat,114,121,0 script #28Barrier#_M 127,1,1{ + end; +OnTouch: + if (($Easter_2010_Npc_State2 >> E10_BARRIER_SHIFT) & E10_BARRIER_MASK == E10_BARRIER_ACTIVE) goto L_block; + + warp "028-3.gat", 33, 76; + end; + +L_block: + message strcharinfo(0), "There is some strange field around this opening. You cannot see any possible way to bypass it."; + end; + +} diff --git a/npc/028-1/Doctor.txt b/npc/028-1/Doctor.txt new file mode 100644 index 00000000..be5dcfd5 --- /dev/null +++ b/npc/028-1/Doctor.txt @@ -0,0 +1,1919 @@ + +// Yes, it really does start at 0,0. +028-1.gat,0,0,0 script Doctor#who 184,{ + // States here + callsub S_Helped_Count; + if (@Easter_2010_helper >= 2 && !((Easter_2010_QuestState >> E10_FLAG_MID_REWARD_SHIFT) & E10_FLAG_MID_REWARD_MASK)) + goto L_MidReward; + if (@Easter_2010_helper == 4 && !((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK)) + goto L_Defeat_Invader; + set @pos, ($Easter_2010_Npc_State2 >> E10_DOCTOR_POSITION_SHIFT) & E10_DOCTOR_POSITION_MASK; + if ((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK == E10_FLAG_RETURN_READY && (Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK == E10_STATE_ROSE_ROSE_COMPLETE) + goto L_Return_Ready_Optional; + +L_Choose_Location: + if (@pos == E10_DOCTOR_POSITION_BIGTREE) goto L_At_Tree; + if (@pos == E10_DOCTOR_POSITION_ISLAND) goto L_At_Island; + if (@pos == E10_DOCTOR_POSITION_STONES) goto L_At_Stones; + if (@pos == E10_DOCTOR_POSITION_FRUIT) goto L_At_Fruit; + if (@pos == E10_DOCTOR_POSITION_CAVE) goto L_At_Cave; + + // Fallthrough. We've handled all the positions we can think of. If this still doesn't catch, then warp. + mes "[Doctor]"; + mes ""; + mes "\"You shouldn't be here!\""; + close2; + goto OnDoWarp; + +// The player has defeated the invader and helped enough times. +L_Return_Ready_Optional: + // if (@pos == E10_DOCTOR_POSITION_CAVE) goto L_At_Cave; + callsub S_Has_Helped_At, @pos; + if (!(~(Easter_2010_QuestState >> E10_HELPED_DOCTOR_SHIFT) & E10_HELPED_DOCTOR_MASK) || @Easter_2010_helper) + goto L_Return_Ready; + + // Player can help one more time, if so desired. + mes "[Doctor]"; + mes ""; + mes "\"Well... this has been quite an adventure, hasn't it? I'd say it's about timey--er, time for me to go, but I think I can stick around for a little while longer to tie up some loose ends for myself.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Oh, did you want to help again?\""; + next; + menu "Sure, that sounds good", L_Choose_Location, + "Hm, I can't right now, but maybe later.", L_Return_Ready, + "I was looking for a way to go home.", L_At_Stones_Capable, + "No, sorry, I don't think so.", L_Return_Ready; + close; + +// Player has done "everything" to do in this world, just talking to the Doctor. +L_Return_Ready: + set @parting$, "!"; + if (strcharinfo(0) == "Alonso" || strcharinfo(0) == "AlOnS") set @parting$, ", Alonso!"; + mes "[Doctor]"; + mes ""; + mes "\"Well, you have been absolutely brilliant! Brilliant! Very impressive.\" He smiles kindly and shakes your hand. \"It has been a pleasure. Now for the next adventure. Allons-y" + @parting$ + "\""; + close; + +L_Defeat_Invader: + mes "[Doctor]"; + mes ""; + mes "\"Ah-ha! It's nice to see you again. How goes the battle?\""; + next; + menu "I'm having a hard time, actually. I'd like to go home...", -, + "Regrouping now for the next encounter, actually.", L_Encourage; + if (($Easter_2010_Npc_State2 >> E10_DOCTOR_POSITION_SHIFT) & E10_DOCTOR_POSITION_MASK == E10_DOCTOR_POSITION_STONES) + goto L_At_Stones_Turn_Back; + +L_Encourage: + mes "[Doctor]"; + mes ""; + mes "\"Oh, well, I think you'll prevail in the end! If you'll excuse me, I still have some things to see to.\""; + close; + +S_Dialogue_Knows: + mes "[Doctor]"; + mes ""; + mes "\"Oh, hello again... hm...\""; + next; + mes "[Doctor]"; + mes ""; + mes @responses$[rand(getarraysize(@responses$))]; + return; + +S_Update_Knows: + // Working "name" for when he hasn't introduced himself (can be changed). + mes "[Mysterious Man]"; + mes ""; + mes @responses$[rand(getarraysize(@responses$))]; + next; + set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_KNOWS_DOCTOR_MASK << E10_FLAG_KNOWS_DOCTOR_SHIFT) | (E10_FLAG_KNOWS_DOCTOR << E10_FLAG_KNOWS_DOCTOR_SHIFT); + mes "[Doctor]"; + mes ""; + mes "\"Oh, excuse me,\" he gestures. \"I'm the Doctor.\""; + return; + +S_Update_Helped: + if (getarg(0) == E10_DOCTOR_POSITION_BIGTREE) + set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_HELPED_DOCTOR_TREE_MASK << E10_FLAG_HELPED_DOCTOR_TREE_SHIFT) | (E10_FLAG_HELPED_DOCTOR_TREE << E10_FLAG_HELPED_DOCTOR_TREE_SHIFT); + if (getarg(0) == E10_DOCTOR_POSITION_ISLAND) + set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_HELPED_DOCTOR_ISLAND_MASK << E10_FLAG_HELPED_DOCTOR_ISLAND_SHIFT) | (E10_FLAG_HELPED_DOCTOR_ISLAND << E10_FLAG_HELPED_DOCTOR_ISLAND_SHIFT); + if (getarg(0) == E10_DOCTOR_POSITION_STONES) + set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_HELPED_DOCTOR_STONES_MASK << E10_FLAG_HELPED_DOCTOR_STONES_SHIFT) | (E10_FLAG_HELPED_DOCTOR_STONES << E10_FLAG_HELPED_DOCTOR_STONES_SHIFT); + if (getarg(0) == E10_DOCTOR_POSITION_FRUIT) + set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_HELPED_DOCTOR_FRUIT_MASK << E10_FLAG_HELPED_DOCTOR_FRUIT_SHIFT) | (E10_FLAG_HELPED_DOCTOR_FRUIT << E10_FLAG_HELPED_DOCTOR_FRUIT_SHIFT); + callsub S_Helped_Count; + if (@Easter_2010_helper == 3) set Easter_2010_QuestState, (Easter_2010_QuestState & ~(E10_STATE_ROSE_MASK << E10_STATE_ROSE_SHIFT)) | (E10_STATE_ROSE_ROSE_COMPLETE << E10_STATE_ROSE_SHIFT); + return; + +S_Helped_Count: + set @Easter_2010_helper, 0; + if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_TREE_SHIFT) & E10_FLAG_HELPED_DOCTOR_TREE_MASK == E10_FLAG_HELPED_DOCTOR_TREE) + set @Easter_2010_helper, @Easter_2010_helper + 1; + if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_ISLAND_SHIFT) & E10_FLAG_HELPED_DOCTOR_ISLAND_MASK == E10_FLAG_HELPED_DOCTOR_ISLAND) + set @Easter_2010_helper, @Easter_2010_helper + 1; + if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_STONES_SHIFT) & E10_FLAG_HELPED_DOCTOR_STONES_MASK == E10_FLAG_HELPED_DOCTOR_STONES) + set @Easter_2010_helper, @Easter_2010_helper + 1; + if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_FRUIT_SHIFT) & E10_FLAG_HELPED_DOCTOR_FRUIT_MASK == E10_FLAG_HELPED_DOCTOR_FRUIT) + set @Easter_2010_helper, @Easter_2010_helper + 1; + return; + +S_Has_Helped_At: + set @Easter_2010_helper, 0; + if (getarg(0) == E10_DOCTOR_POSITION_BIGTREE) + set @Easter_2010_helper, (Easter_2010_QuestState >> E10_HELPED_DOCTOR_TREE_SHIFT) & E10_HELPED_DOCTOR_TREE_MASK; + if (getarg(0) == E10_DOCTOR_POSITION_ISLAND) + set @Easter_2010_helper, (Easter_2010_QuestState >> E10_HELPED_DOCTOR_ISLAND_SHIFT) & E10_HELPED_DOCTOR_ISLAND_MASK; + if (getarg(0) == E10_DOCTOR_POSITION_STONES) + set @Easter_2010_helper, (Easter_2010_QuestState >> E10_HELPED_DOCTOR_STONES_SHIFT) & E10_HELPED_DOCTOR_STONES_MASK; + if (getarg(0) == E10_DOCTOR_POSITION_FRUIT) + set @Easter_2010_helper, (Easter_2010_QuestState >> E10_HELPED_DOCTOR_FRUIT_SHIFT) & E10_HELPED_DOCTOR_FRUIT_MASK; + return; + +L_MidReward: + if (((Easter_2010_QuestState >> E10_FLAG_MID_REWARD_SHIFT) & E10_FLAG_MID_REWARD_MASK)) close; + mes "[Doctor]"; + mes ""; + mes "\"Fantastic! You have really been quite helpful.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Er, now that I think about it, perhaps I have something you'd be interested in.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"While visiting another dimension--hm, as a matter of fact, it was quite like this one. But their choices in the past seem to have differed from the ones here...\""; + next; + mes "[Doctor]"; + mes ""; + mes "The Doctor reflects on his words. \"Interesting how things turn out. Well, I now have a lot of these Valentine's Glasses, if you'd like a pair.\""; + next; + getinventorylist; + if (@inventorylist_count == 100) + goto L_MidReward_NoRoom; + mes "[Doctor]"; + mes ""; + mes "He hands you the glasses."; + mes "\"They're not too brainy, or suited for detecting background radiation, but they are charming.\""; + set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_FLAG_MID_REWARD_MASK << E10_FLAG_MID_REWARD_SHIFT) | (E10_FLAG_MID_REWARD << E10_FLAG_MID_REWARD_SHIFT); + getitem E10_MIDREWARD_ID, 1; + close; + +L_MidReward_NoRoom: + mes "[Doctor]"; + mes ""; + mes "\"Oh, I don't think you have room for these. Well, I suppose I'll hold on to them for now.\""; + close; + +// ====================== +// === First location === +// ====================== + +L_At_Tree: + // Checks for if the player has already helped the doctor, either here or elsewhere, go here. + if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_TREE_SHIFT) & E10_FLAG_HELPED_DOCTOR_TREE_MASK == E10_FLAG_HELPED_DOCTOR_TREE) + goto L_At_Tree_Helped; + + if ((Easter_2010_QuestState >> E10_FLAG_KNOWS_DOCTOR_SHIFT) & E10_FLAG_KNOWS_DOCTOR_MASK == E10_FLAG_KNOWS_DOCTOR) + goto L_At_Tree_Knows_Doctor; + // Fallthrough, reaction to a player that is completely new. + + setarray @responses$, "\"This tree, I'm sure it's - \"The man looks up distractedly.\" Oh, hello. Can't talk now, I'm afraid, this world needs my help...\"", "He looks up, confused. \"Withering... why is this world dying? Perhaps--er, who are you? You'll have to excuse me, I'm a little preoccupied with this tree...\"", "\"What-what? I mean, sorry, hello! Can't quite talk, a bit busy trying to save this world.\" He seems to be deep in thought, brandishing what looks to be a small tool near the tree.", "\"You there! Do you realise what's happening here? This world is dying, much like a human would, perhaps. Nevertheless...\""; // Not many responses are needed here, since init only happens one per player. + callsub S_Update_Knows; + next; + if (countitem("LifeStone") > 0) + goto L_has_lifestone; + close; + +L_At_Tree_Knows_Doctor: + // More responses than the initial here, and need to be more of a hint. + setarray @responses$, "\"I just don't know what's wrong. My analysis tells me this tree is important, but I don't seem to have the right tool...\"", "A distinct... whirring noise sounds from the device the Doctor wields. \"You see this tree? Right here, this one! There's something amiss here, perhaps beyond my expertise.\"", "\"Yes, yes, all evidence points to this tree. \"He leans in for a closer look. \"Brilliant! No! Um... that's not right.\"", "He withdraws what appear to be glasses from his pocket and puts them on, peering intently at the tree.", "\"Mm-hmm, yes! Do you see what's wrong with this tree? No?\" He sounds somewhat dejected, but still determined. \"Well, neither do I, I'm afraid.\"", "The Doctor turns with a look of panic on his face, gesturing for you to stop talking. He turns back to the tree, muttering \"some way to heal...\""; + callsub S_Dialogue_Knows; + next; + + if (countitem("LifeStone") > 0) + goto L_has_lifestone; + mes "[Doctor]"; + mes ""; + mes "\"I'm trying to understand something, but it's got me quite confused, I'm afraid. I need something to assist me... something to counter the death...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Unfortunately, I really can't think of anything to use. Please leave me alone while I think.\""; + close; + +L_has_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"I'm busy right now, I'm afraid I - what's that thing you've got there?\""; + next; + goto L_spotted_lifestone; + +L_spotted_lifestone: + menu + "That? That's just a Life Stone. Basic level one magic item.", L_want_lifestone, + "Sorry, I'm not interested in talking right now.", -; + close; + +L_want_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"A Life Stone? It is not of this world... and it's just what I need! Where did you get it?\""; + next; + menu + "I made it myself!", L_made_lifestone, + "Elanore the Healer made it for me.", L_elanore_lifestone, + "I bought it off someone.", L_bought_lifestone, + "What? You expect me to remember where I get every single lifestone?", L_expect_lifestone; + close; + +L_made_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"You made it? But then you... you must be from elsewhere as well! How did you get here?\""; + next; + menu + "A mysterious old woman gave me a flower, and then I appeared here.", L_woman_lifestone, + "I died.", L_dead_lifestone, + "I think I've told you enough for now...", -; + close; + +L_elanore_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Elanore the Healer... I have not heard of her, but she must be a powerful being indeed. But there are more pressing matters - will you lend me this... 'Life Stone'?\""; + next; + menu + "Yeah, whatever.", L_offer_lifestone, + "I'm not giving you my stuff!", -; + close; + +L_bought_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"And you could afford it? Something as powerful as this must be worth a fortune.\""; + next; + menu + "Actually, it was only 100 GP.", L_cheap_lifestone, + "Yeah, well, I got a few million in the bank.", L_rich_lifestone, + "Powerful? I thought it just did minor healing.", L_powerful_lifestone; + close; + +L_expect_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Well, I suppose so. I need something like this, however... I must be sure it has not been tainted with darkness. If you don't remember where you got it, it's no use to me.\""; + close; + +L_woman_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"An old woman gave you - ? Well, never mind that. This 'Life Stone'... I think I need it. Will you lend it to me?\""; + next; + menu + "Sure.", L_offer_lifestone, + "Sorry, I need it.", -; + close; + +L_dead_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"So... you're dead? Then maybe this world is some kind of... afterlife to yours?\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"But if this world is dying, how can it be an afterlife? That doesn't make sense...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Unless you were already dead, and you've been reincarnated...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"But surely you wouldn't be able to make a powerful thing like this... this 'Life Stone' in a world for the dead?\""; + mes "\"But since you are here, and you do have this Life Stone - can I borrow it? I think I may need it, and quite soon.\""; + next; + menu + "Yes, take it.", L_offer_lifestone, + "No, I need it.", -; + close; + +L_cheap_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Then that was a bargain, my friend. This must surely be worth thousands! And I'm afraid I'm going to have to ask you if I may borrow it.\""; + next; + menu + "Yeah, you can.", L_offer_lifestone, + "Nope, sorry.", -; + close; + +L_rich_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Ah! I'm afraid I expected you to be poor... being the warrior type, I mean. Well... I'm going to need this Life Stone. It's quite important. Might I purchase it from you?\""; + next; + menu + "Indeed. That will be 50,000 GP, please.", L_expensive_lifestone, + "Better. You can have it for free!", L_offer_lifestone, + "No. It's mine.", -; + close; + +L_powerful_lifestone: + if (getskilllv(SKILL_MAGIC)) goto L_hasmagic_lifestone; + mes "[Doctor]"; + mes ""; + mes "\"It contains a strange power which I have never detected before... and I think I can use it. Can I borrow it off you?\""; + next; + menu + "Yeah, if you want.", L_offer_lifestone, + "Er... no. My powerful rock! Ha!", -; + close; + +L_hasmagic_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"It contains a strange power which I have never detected before... except... in you. You have this power in you!\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Anyway... this stone, this Life Stone, can I borrow it?\""; + next; + menu + "Sure. Here you are.", L_offer_lifestone, + "Tell me more about this power.", L_power_lifestone, + "No.", -; + close; + +L_power_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"There's nothing I can really tell you. I just know it's there, I don't know what it is. Can I borrow the Stone?\""; + next; + menu + "Yeah, sure.", L_offer_lifestone, + "No.", -; + close; + +L_help_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Just the boost I needed... hm? No, that's all for now, thank you. Is there anything *you* need?\""; + next; + menu "I might have some questions later, if you'll be here...", -, + "Thank you for the offer, really, but I'm fine.", -; + mes "[Doctor]"; + mes ""; + mes "\"Well, I'll still be gathering information myself, so perhaps we'll cross paths again.\""; + close; + +L_expensive_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Oh, excuse me. I'm not sure about your currency, but I don't think I can cover that right now. Please let me know if you change your mind.\""; + close; + +L_only_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Yes... uh, well, I suppose if you wanted I could pay you for it. Let me see now...\""; + next; + mes "\"Here we are! It's all I've got on me at the moment, I'm afraid.\""; + getitem "StrangeCoin", 1; + next; + menu + "Is there anything else you need?", L_help_lifestone, + "Alright then. Bye!", -; + close; + +L_offer_lifestone: + if (countitem("LifeStone") < 1) + goto L_lost_lifestone; + + delitem "LifeStone", 1; + callsub S_Update_Helped, E10_DOCTOR_POSITION_BIGTREE; + + if (countitem("LifeStone") == 0) + goto L_one_lifestone; + + mes "[Doctor]"; + mes ""; + mes "\"Wonderful! What a spot of luck it was you coming here with this. You don't know how much you deserve thanks.\""; + mes "He takes your lifestone and places it into a curious device, then waves the device up and down the tree. It makes a number of beeping sounds, and the Doctor seems happy."; + next; + goto L_given_lifestone; + +L_one_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Wonderful! What a spot of luck it was you coming here with this. You don't know how much you deserve thanks.\""; + mes "He takes your lifestone and places it into a curious device, then waves the device up and down the tree. It makes a number of beeping sounds, and the Doctor seems happy."; + next; + menu + "Is there anything else you need?", L_help_lifestone, + "That was the only one I had, I'm glad it helped.", L_only_lifestone, + "Alright then. Bye!", -; + close; + +L_lost_lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Brilliant! Fantastic! This will surely help... Wait, I thought you had a lifestone for me? Well, maybe you can come by again when you do.\""; + close; + +L_given_lifestone: + menu + "Is there anything else you need?", L_help_lifestone, + "Alright then. Bye!", -; + close; + +L_At_Tree_Helped: + mes "[Doctor]"; + mes ""; + mes "\"Fantastic! Your help with this tree is much appreciated. I believe we are that much closer to solving this mystery.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"I suspect there is still much to do. Please feel free to look around, there might be more information to gather elsewhere.\""; + close; + +// ======================= +// === Second location === +// ======================= + +L_At_Island: + // Checks for if the player has already helped the doctor, either here or elsewhere, go here. + if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_ISLAND_SHIFT) & E10_FLAG_HELPED_DOCTOR_ISLAND_MASK == E10_FLAG_HELPED_DOCTOR_ISLAND) + goto L_At_Island_Helped; + + if ((Easter_2010_QuestState >> E10_FLAG_KNOWS_DOCTOR_SHIFT) & E10_FLAG_KNOWS_DOCTOR_MASK == E10_FLAG_KNOWS_DOCTOR) + goto L_At_Island_Knows_Doctor; + + setarray @responses$, "\"Odd spheres of energy floating about... Interesting. The decay is very severe here...\" He looks over, as if only now noticing your presence. \"Excuse me, how do you do? Don't mean to be rude, just lost in thought...\"", "There's a man in glasses, scanning the area carefully. \"There are more trees affected than I had thought.\" He extends his hand, waving a small device around carefully.", "\"Well, so what does that mea--oh, sorry! Please don't mind me, but right now I'm trying to figure out why this world is dying.\"", "A somewhat oddly dressed man turns about. Suddenly, he speaks up, \"No, no, something's definitely wrong. Explain it? Well... it's complicated.\""; + callsub S_Update_Knows; + close; + +L_At_Island_Knows_Doctor: + setarray @responses$, "\"Oi! What killed these trees...\" He takes a moment, studying carefully. \"And this open area--there don't seem to be any creatures around. Interesting.", + "\"Hm, do you know anything about those spheres of energy?\" The device he's holding glows briefly. \"Well, that's what I thought. If you'll excuse me for a moment.\" He adjusts his glasses and continues his work.", + "\"There's the other, big tree... Then there are these trees, and... glowing orbs. Some... force is slowly destroying this world.\" The Doctor finishes his thought and continues pacing.", + "The Doctor takes out the same strange device, anticipating a question and responding. \"Oh, this, it's good for everything. Right now I'm looking for what might be controlling these blobs of light; they don't seem to be moving on their own.\"", + "\"I know there is some other agent at work here. I don't quite know what it is yet, but... Well, if you have any information that could help, please do share.\""; + + callsub S_Dialogue_Knows; + next; + +L_At_Island_Menu: + setarray @menuitems$, "", "", "", "", ""; + set @c, 0; + + set @menuitems$[@c], "What's going on here? It looks like everything is dying! The trees are dead and decaying, the grass is weak and easily crushed, and the animals are gone!"; + set @menuid[@c], E10_ISLAND_MENU_DEATH_AWE; + set @c, @c + 1; + + set @menuitems$[@c], "There's an eerie sort of silence about this place, don't you think? ... Er, what was that?! ... It doesn't seem all that safe here..."; + set @menuid[@c], E10_ISLAND_MENU_SCARED; + set @c, @c + 1; + + set @menuitems$[@c], "The orbs of light flying about? Wisps. And you know, they do seem to be behaving strangely, or as much is possible given the circumstances. You think there's a reason for that?"; + set @menuid[@c], E10_ISLAND_MENU_WISPS; + set @c, @c + 1; + + + if (!(Easter_2010_QuestState & (E10_FLAG_HELPED_DOCTOR_TREE << E10_FLAG_HELPED_DOCTOR_TREE_SHIFT))) goto L_post_tree_help; + set @menuitems$[@c], "This place looks dead... do you need any more lifestones?"; + set @menuid[@c], E10_ISLAND_MENU_OFFER_LIFESTONE; + set @c, @c + 1; + +L_post_tree_help: + menu + @menuitems$[0], -, + @menuitems$[1], -, + @menuitems$[2], -, + @menuitems$[3], -, + @menuitems$[4], -; + + set @menu, @menu -1; + if (@menu >= @c) close; + if (@menuid[@menu] == E10_ISLAND_MENU_DEATH_AWE) goto L_At_Island_Death_Awe; + if (@menuid[@menu] == E10_ISLAND_MENU_SCARED) goto L_At_Island_Scared; + if (@menuid[@menu] == E10_ISLAND_MENU_WISPS) goto L_At_Island_Wisps; + if (@menuid[@menu] == E10_ISLAND_MENU_OFFER_LIFESTONE) goto L_At_Island_Offer_Lifestone; + close; + +L_At_Island_Death_Awe: + mes "[Doctor]"; + mes ""; + mes "\"Yes, yes. For most, death can't be avoided, but this...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"So much death, and so quickly, even. It doesn't seem quite natural, does it?\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Take a look at this, won't you?\""; + next; + menu "I'm not sure, what am I looking for exactly?", -; + mes "[Doctor]"; + mes ""; + mes "\"Ah, you don't see it? Well, these glasses of mine--well, here, take a look\""; + next; + mes "[Doctor]"; + mes ""; + mes "The Doctor takes off his red-blue glasses and holds them up. You peer through and examine the surroundings."; + next; + menu "I... don't see anything unusual, sorry.", -, + "Oh, something about the grass?", L_At_Island_Grass, + "Er, what exactly do these glasses do?", L_At_Island_Glasses, + "Oh, so the... the um... that?", -, + "Right, of course, that is... very... interesting?", -, + "Could you hold that thought? I need to check on something else first.", -; + close; + +L_At_Island_Grass: + mes "[Doctor]"; + mes ""; + mes "The Doctor pauses, examining the ground. \"Now that you mention it...\" He holds up a blade of grass between his fingers. \"There is a sort of strange texture about it, perhaps slightly grating.\""; + next; + menu "Yes, I had noticed that, too. Do you think it's relevant?", L_At_Island_Explain, + "Hm, now that I think about it, it doesn't seem all too different from my own world's.", L_At_Island_Explain, + "Do you think it's a result of all the death here?", L_At_Island_Explain, + "Oh, excuse me for just a second.", -; + close; + +L_At_Island_Glasses: + mes "[Doctor]"; + mes ""; + mes "\"Well, I had suspected that what may have been causing damage to this world was in fact from another universe.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"So you can think of these glasses as the means to identifying when something or someone has gone through the Void.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Here, let me show you.\" The Doctor turns the glasses so you can view him and moves around."; + next; + menu "Oh, wow. There's a sort of... grainy effect about you. Like particles?", -; + mes "[Doctor]"; + mes ""; + mes "\"Yes, stuff from the Void. I saw something earlier, but nothing now. Strange.\""; + close; + +L_At_Island_Explain: + mes "[Doctor]"; + mes ""; + mes "\"Well, from the other things I've seen here, I wouldn't couldn't say so definitively, but it's possible.\""; + next; + mes "Your eyes follow the Doctor as he begins to pace. He pauses to continue his thought."; + next; + mes "[Doctor]"; + mes ""; + if ((Easter_2010_QuestState >> E10_HELPED_DOCTOR_SHIFT) & E10_HELPED_DOCTOR_MASK) + goto L_At_Island_Theory; + mes "\"Well, it's interesting. I'll have to take a closer look.\""; + close; + +L_At_Island_Theory: + mes "[Doctor]"; + mes ""; + mes "\"Based on what we had uncovered before, I think some force is exerting its will on those glowing entities.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"How it all ties together is what I'm still trying to figure out.\" He adjusts his glasses again."; + next; + menu "It is very strange, can't argue there.", -, + "I have faith in you.", -, + "What if--oh, are you thinking about something?", L_At_Island_Knows_Doctor, + "Yes, that is an interesting idea. I will think it over for a bit.", -; + close; + +L_At_Island_Scared: + mes "[Doctor]"; + mes ""; + mes "\"Ahh, feeling a bit anxious are we? I don't blame you, chap, it is a bit unnerving here.\" The Doctor continues to analyze the environment with his various instruments, apparently lost in thought."; + next; + mes "[Doctor]"; + mes ""; + mes "\"It's really quite strange... the levels of electromagnetic energy in the area seem to be spiking regularly, almost in time with the movements of these glowing blobs.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Judging from these readouts, it would seem that either some force is acting upon these orbs of light, or they are in fact creating a sporadic magnetic field.\""; + next; + menu "What? I'm just really, really scared!", L_At_Island_Terror, + "Electromagnetic what now?", L_At_Island_Magnetic, + "I've got to get out of here!", L_At_Island_Terror, + "Um, uh, I... gotta run... to some place more safe.", L_At_Island_Terror; + close; + +L_At_Island_Terror: + mes "[Doctor]"; + mes ""; + if (baselevel == 99) + mes "\"Really? Out of those I've detected here, I would have thought you'd be among the most skilled.\""; + if (baselevel >= 90 && baselevel <= 98) + mes "\"Er, um? I'm so sorry, I had assumed you were more than capable for this sort of thing."; + if (baselevel >= 70 && baselevel <= 89) + mes "\"Please excuse me, but I had sensed you were stronger than that.\""; + if (baselevel >= 50 && baselevel <= 69) + mes "\"Ah... well, I have seen others here, too. Perhaps you could work together?\""; + if (baselevel <= 49) + mes "\"Don't lose hope, you're not alone in all this. We'll get through it.\""; + next; + menu "I don't know what to say...", -, + "Yes, yes, you're absolutely right!", L_At_Island_Calm, + "I-I need a moment to think.", -; + close; + +L_At_Island_Magnetic: + mes "[Doctor]"; + mes ""; + mes "\"Well, haven't you noticed the strange behaviour of those blobs of light?\""; + next; + menu "Um, strange doesn't even begin to cover this world.", -, + "Sure, I can never find enough stuff after fighting them.", L_At_Island_Loot, + "Other than the fact that they wish to kill me?", L_At_Island_Wisps, + "Blobs? I hadn't noticed anything.",L_At_Island_Knows_Doctor; + close; + +L_At_Island_Calm: + mes "[Doctor]"; + mes ""; + mes "\"There, isn't that better?\" He smiles warmly. \"Now, I was thinking--\""; + next; + menu "Sorry to interrupt, but...", L_At_Island_Menu, + "*I* was thin--oh, thought you were pausing. Sorry, please continue.", L_At_Island_Theory, + "Sorry, I need another moment to regain my composure.", -; + close; + +L_At_Island_Loot: + mes "[Doctor]"; + mes ""; + mes "He seems confused. \"Find enough stuff? I'm not sure I could help you there, but perhaps someone else can?\""; + close; + +L_At_Island_Wisps: + mes "[Doctor]"; + mes ""; + mes "\"I'm glad you asked! You see, the behaviour of these creatures doesn't appear to be very natural at all; the elephant in the room if you will.\" The Doctor pauses temporarily to check his instruments again."; + next; + menu "Well, they are normally very peaceful; they'll only attack if you attack them.", -; + mes "[Doctor]"; + mes ""; + mes "\"Interesting! I've seen them attack with no discernable provocation. This is quite ominous. \""; + next; + mes "[Doctor]"; + mes ""; + mes "\If it didn't sound so mad, I'd postulate that something is controlling these things... some malevolent force or entity.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Oh, sorry, what do you think?\""; + next; + menu "That doesn't seem quite right, to be honest.", -, + "Now that you mention it, I had some ideas.", L_At_Island_Ideas, + "Malevolent? Where did you get that idea?", -, + "Instruments? They seem quite versatile.", L_At_Island_Devices, + "That's a lot for me to take in right now. Excuse me.", -; + close; + +L_At_Island_Ideas: + menu "Strange behaviour comes up with magic in my world, like agitating creatures to do harm.", L_At_Island_Magic, + "Maybe something or someone is summoning them?", L_At_Island_Summon, + "Could it be possible they're not from this place, either?", L_At_Island_Void, + "Maybe this sounds crazy, but... could these be the remains of all the entities that have died?", L_At_Island_Spirits, + "I don't understand time all that well, but perhaps the wisps indicate a rip... in the fabric?", L_At_Island_Time, + "Er, how embarrassing. I seem to have forgotten what I was going to say.", -; + close; + +L_At_Island_Devices: + mes "[Doctor]"; + mes ""; + mes "\"Hm? Oh, ha-ha, like this?\" The Doctor points out one of the instruments."; + next; + mes "[Doctor]"; + mes ""; + mes "\"They are very useful, yes! Fantastic, even. Proved invaluable in so many circumstances.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Yes. Well, then.\" He continues his analysis, putting something away, almost in anticipation of your next question."; + close; + +L_At_Island_Magic: + mes "[Doctor]"; + mes ""; + mes "\"Magic, you say? Yes, I have been hearing about that from others, too.\""; + mes "The Doctor looks off into the distance."; + next; + menu "Erm? Hello?", -; + mes "[Doctor]"; + mes ""; + mes "\"Still here, just wondering. So you say it's possible to aggravate creatures where you come from?\""; + next; + menu "Yes, within a certain radius of the caster, it is possible.", -; + mes "[Doctor]"; + mes ""; + mes "\"Really? Ha-ha! I knew it. Tell me more, could you? Anything particular about the practice of magic in your world?\""; + next; + menu "Well... it is possible to follow a darker path, so to speak, when it comes to practicing magic.", L_At_Island_Dark, + "Hm. Not sure if it's relevant, but I have often suspected an unknown evil in my own world.", L_At_Island_Dark, + "Even the 'good' practicioners seem to exhibit malicious behaviour at times.", L_At_Island_Evil, + "I don't know much more than that, I'm afraid.", -; + close; + +L_At_Island_Summon: + mes "[Doctor]"; + mes ""; + mes "\"Summoning them? Via some sort of magic, presumably, or do you mean by other means?\""; + next; + menu "Yes, with magic, I think. The creatures can be aggravated, even.", L_At_Island_Magic, + "Other means? I never thought of that. Could you explain?", L_At_Island_Void, + "On second thought, I've lost my train of thought.", -; + close; + +L_At_Island_Void: + mes "[Doctor]"; + mes ""; + mes "\"Sure, it is a distinct possibility.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"The Void, or otherwise this sort of, empty space between universes.\""; + mes "\"It might be easier to think about the universes as being stacked on top of one another, though can't quite say there's an up or a down about the Void.\""; + close; + +L_At_Island_Spirits: + mes "[Doctor]"; + mes ""; + mes "\"Sort of like spirits?\" Or are you suggesting that these blobs are the collective energy lost upon death?\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Um, I'm not sure what to make of that.\""; + close; + +L_At_Island_Time: + mes "[Doctor]"; + mes "\"Time, did you say?\" He takes a moment. \"Well, it's more like a big ball--it's probably not what you think. But you know? I have detected temporal abnormalities here.\""; + close; + +L_At_Island_Dark: + mes "[Doctor]"; + mes ""; + mes "\"Your home isn't all that safe? Are there regular patrols, or is there a shortage of help?\""; + next; + menu "I forgot what we were talking about. Something about the wisps?", L_At_Island_Wisps, + "Well, either way, I can't quite compare that to this... sinister atmosphere.", -, + "It--wait, a shortage? Well...", L_At_Island_Help; + mes "[Doctor]"; + mes ""; + mes "\"That feeling does pervade this world. A darkness that wishes to smother and extinguish all in its path.\""; + next; + menu "Maybe a poison was unleashed, and it's what's causing the death, and the erratic behaviour?", -, + "So, could the behaviour of these wisps be explained by magic?", -, + "Could we start over? I was trying to recall what you said--hello?", L_At_Island_Knows_Doctor, + "Well, the effects, though widespread, seem to be more severe at times.", L_At_Island_Evil; + mes "[Doctor]"; + mes ""; + mes "\"A very valid idea. Hm...\""; + close; + +L_At_Island_Evil: + mes "[Doctor]"; + mes ""; + mes "\"Yes, sadly that does seem to be the case at times. I feel we've almost solved at least this mystery. Just... definitively, what would you say is going on here?\""; + next; + setarray @menuitems$, + "I think the wisps are drawn to those that have died, like... me? And when they become aggravated they end up destroying more of the world.", + "In order to escape, the beings that have died and ended up here are forced to... fight?", + "An evil force placed a curse on all of us, dooming us to fight here, pitted against one another in pointless battle--for all eternity!", + "The trees are dead as a result of the fighting, and the wisps are angry spirits looking for revenge?", + "This world is in disarray, subject to chaos, and ultimately, utter destruction. Those, like me, have been given an opportunity, a choice--to put an end to this, to drive out the evil stench that plagues this land.", + "Unlike me, the old woman that led me here was not without hidden motives. So, she planted a way to bring me here, and in doing so, eliminated the ones that could foil her plans.", + "When I died and came here, my soul was fragmented, and part of it manifested as the tormented wisps here now?", + "You do seem rather odd, using those alien devices. I think you're to blame for what's happened here!", + "Something, or someone, perhaps, walks this world, appearing from the shadows. With it come misery and pain. But it is up to us to rid this world of its blight.", + "There is an intermittent, evil presence in this world. When it arrives it brings about more destruction, resulting in these dead trees. Then, at the whim of its madness, it uses magic to incite the wisps to attack and be unwilling accomplices."; + setarray @submenu$, "", "", "", ""; + setarray @submenuindex, 0, 0, 0, 0; + set @c, 0; + +L_island_end_menu_loop: + set @index, rand(getarraysize(@menuitems$)); + set @i, 0; + if (@c == 0) goto L_island_post_menu_loop_sub; +L_island_end_menu_loop_sub: + if (@submenu$[@c] == @menuitems$[@index]) goto L_island_end_menu_loop; + set @i, @i + 1; + if (@i < @c) goto L_island_end_menu_loop_sub; +L_island_post_menu_loop_sub: + set @submenu$[@i], @menuitems$[@index]; + set @submenuindex[@i], @index; + set @c, @c + 1; + if (@c < 4) goto L_island_end_menu_loop; + + menu @submenu$[0], -, + @submenu$[1], -, + @submenu$[2], -, + @submenu$[3], -; + set @menu, @menu - 1; + if (@menu >= 4) goto L_island_oo_range; + if (@submenuindex[@menu] == 8 || @submenuindex[@menu] == 9) + goto L_At_Island_Resolve; + +L_island_oo_range: + mes "[Doctor]"; + mes ""; + mes "\"Ah, I'm sorry, but that doesn't seem to fit with what we know. Perhaps we should give this some more thought.\""; + close; + +L_At_Island_Help: + menu "Yes, help is probably needed, but I hadn't really considered my own role...", -, + "Perhaps, but it's not really my problem.", -; + mes "[Doctor]"; + mes ""; + mes "\"Just as you are helping here, I believe that if it is what you desire, you can find a suitable way to help elsewhere, too.\""; + close; + +L_At_Island_Resolve: + callsub S_Update_Helped, E10_DOCTOR_POSITION_ISLAND; + mes "[Doctor]"; + mes ""; + mes "\"Ha-ha, that's it! Brilliant!\" He shakes your hand enthusiastically. \"I knew you could do it! You don't know how much your help means!\""; + close; + +L_At_Island_Offer_Lifestone: + mes "[Doctor]"; + mes ""; + mes "\"Hm, no, while I appreciate your generosity, I don't think that will be necessary.\""; + mes "He looks off into the distance. \"Strange things...\""; + close; + +L_At_Island_Helped: + mes "[Doctor]"; + mes ""; + mes "The Doctor smiles. \"A disturbing force is devastating this world. But with your help I think we're well on our way. Indeed.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Well, I won't keep you, still rather busy. Should probably survey some other regions, too.\" The Doctor's words trail off as he returns to thought."; + close; + +// ======================= +// === Third location === +// ======================= + +L_At_Stones: + // Checks for if the player has already helped the doctor, either here or elsewhere, go here. + if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_STONES_SHIFT) & E10_FLAG_HELPED_DOCTOR_STONES_MASK == E10_FLAG_HELPED_DOCTOR_STONES) + goto L_At_Stones_Helped; + + if ((Easter_2010_QuestState >> E10_FLAG_KNOWS_DOCTOR_SHIFT) & E10_FLAG_KNOWS_DOCTOR_MASK == E10_FLAG_KNOWS_DOCTOR) + goto L_At_Stones_Knows_Doctor; + + setarray @responses$, "\"There's something definitely unsettling about this region. Do you sense it, too?\" His acknowledgement comes suddenly and as a surprise. Something whirs and beeps as he continues, \"Oh, yes, this very spot.\"", "\"An abnormality! Yes, yes, here! Here! No, not quite imperceptible, but we must exercise caution, wouldn't you agree?\"", "\"The mysterious man paces from side to side, quickly taking notice. \"Um, I would be careful around here if I were you. I'm detecting something very powerful nearby.\"", "\"Er, that's interesting. Do you see this? It's remarkable, really. Terrifying all the same, but remarkable. Still not quite sure what makes *this* spot special.\""; + callsub S_Update_Knows; + close; + +L_At_Stones_Knows_Doctor: + setarray @responses$, "\"So from what I've gathered, this area here is somehow involved. See the stones? Yes, right there. The readings suggest it's something very, very strong.\"", "The Doctor takes a closer look at the stones on the ground. \"Interesting, don't you think?\" He waves the small device about as it beeps. \"Perhaps I'm missing something.\"", "\"If I had a, um... well, I don't know what it is. Yet. But what I do know is that there's a dark, disturbing presence here.\"", "\"Hm. The readings here were the highest.\" You take a second to look around as the Doctor continues. \"Ah, yes! I will likely be needing something... maybe similar in nature to this evil presence?\"", "\"Shouldn't get too close there. Ah, yes, be careful there. An evil consumes the life os this world, and my analysis led me to this area.\"", "\"Well, you don't see that every day, do you? Er, well, it's not that strange for me, I think. If I am correct, some agent is at work here, behind the scenes. For now, if you think of anything that might help, please let me know.\""; + callsub S_Dialogue_Knows; + next; + +L_At_Stones_Menu: + mes "[Doctor]"; + mes ""; + mes "\"This place... there's something, I'm not sure what. But I know there's something... something dark!\""; + next; + menu + "Wow! How can you tell?", L_stones_light, + "Do you need any more help?", L_stones_offer, + "Er, pardon me? Did you hear what I said?", L_At_Stones_Pardon, + "Actually, I was hoping you could help me leave this world.", L_At_Stones_Warning, + "Good luck with that.", -; + close; + +L_At_Stones_Pardon: + mes "[Doctor]"; + mes ""; + mes "\"H'm, what? Oh, hello...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"But this...\" - the man waves a strange, beeping device in the air - \"surely that must mean... oh? You're still here?\""; + next; + menu + "What's that thing you've got there?", L_stones_device, + "Sure I am. Do you need help with anything?", L_stones_offer, + "I was just leaving.", -; + close; + +L_stones_device: + mes "[Doctor]"; + mes ""; + mes "\"This? Oh, it's just an ordinary megalectrometer. Good model, though.\""; + next; + menu + "I'm intrigued. Do you need any help?", L_stones_offer, + "Megalawhat? I knew you were a crazy!", -; + close; + +L_stones_light: + mes "[Doctor]"; + mes ""; + mes "\"Well, it's obvious.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"The red light on my megalectrometer's come on.\""; + next; + menu + "Uh, okay. So... you need any more help?", L_stones_offer, + "I've got better things to do. Bye.", -; + close; + +// Now comes the confusing part. +L_stones_offer: + setarray @menuitems$, "", "", "", "", "", "", "", "", "", "", "", "", "", ""; + set @c, 0; + + if (countitem("WispPowder") < 1) goto L_stones_wisp; + set @menuitems$[@c], "Wisp Powder?"; + set @menuid[@c], E10_STONES_WISP; + set @c, @c + 1; + +L_stones_wisp: + if (countitem("SpectrePowder") < 1) goto L_stones_spectre; + set @menuitems$[@c], "Spectre Powder?"; + set @menuid[@c], E10_STONES_SPECTRE; + set @c, @c + 1; + +L_stones_spectre: + if (countitem("PoltergeistPowder") < 1) goto L_stones_poltergeist; + set @menuitems$[@c], "Poltergeist Powder?"; + set @menuid[@c], E10_STONES_POLTERGEIST; + set @c, @c + 1; + +L_stones_poltergeist: + if (countitem("DiseasedHeart") < 1) goto L_stones_soul; + set @menuitems$[@c], "A Diseased Heart?"; + set @menuid[@c], E10_STONES_HEART; + set @c, @c + 1; + +L_stones_soul: + if (countitem("JackOSoul") < 1) goto L_stones_heart; + set @menuitems$[@c], "A Jack O Soul?"; + set @menuid[@c], E10_STONES_SOUL; + set @c, @c + 1; + +L_stones_heart: + if (countitem("UndeadEar") < 1) goto L_stones_ear; + set @menuitems$[@c], "An Undead Ear?"; + set @menuid[@c], E10_STONES_EAR; + set @c, @c + 1; + +L_stones_ear: + if (countitem("UndeadEye") < 1) goto L_stones_eye; + set @menuitems$[@c], "An Undead Eye?"; + set @menuid[@c], E10_STONES_EYE; + set @c, @c + 1; + +L_stones_eye: + if (countitem("Bone") < 1) goto L_stones_bone; + set @menuitems$[@c], "A Bone?"; + set @menuid[@c], E10_STONES_BONE; + set @c, @c + 1; + +L_stones_bone: + if (countitem("Skull") < 1) goto L_stones_skull; + set @menuitems$[@c], "A Skull?"; + set @menuid[@c], E10_STONES_SKULL; + set @c, @c + 1; + +L_stones_skull: + if (countitem("DarkCrystal") < 1) goto L_stones_crystal; + set @menuitems$[@c], "A Dark Crystal?"; + set @menuid[@c], E10_STONES_CRYSTAL; + set @c, @c + 1; + +L_stones_crystal: + if (countitem("RottenRags") < 1) goto L_stones_rags; + set @menuitems$[@c], "Rotten Rags?"; + set @menuid[@c], E10_STONES_RAGS; + set @c, @c +1; + + if (countitem("DarkPetal") < 1) goto L_stones_petal; + set @menuitems$[@c], "A Dark Petal?"; + set @menuid[@c], E10_STONES_PETAL; + set @c, @c + 1; + +L_stones_petal: + set @menuitems$[@c], "No, I don't have anything like that."; + set @menuid[@c], E10_STONES_NEVERMIND; + set @c, @c + 1; + + mes "[Doctor]"; + mes ""; + mes "\"I doubt you could help, since you wouldn't have - actually, you might. Coming from another world and all.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"I need something dark. Something connected with death... a deathly item. Sort of thing. Do you have anything of this kind?\""; + next; + menu + @menuitems$[0], -, + @menuitems$[1], -, + @menuitems$[2], -, + @menuitems$[3], -, + @menuitems$[4], -, + @menuitems$[5], -, + @menuitems$[6], -, + @menuitems$[7], -, + @menuitems$[8], -, + @menuitems$[9], -, + @menuitems$[10], -, + @menuitems$[11], -, + @menuitems$[12], -, + @menuitems$[13], -; + + set @menu, @menu -1; + if (@menu >= @c) close; + if (@menuid[@menu] == E10_STONES_WISP) goto L_stones_offer_wisp; + if (@menuid[@menu] == E10_STONES_SPECTRE) goto L_stones_offer_spectre; + if (@menuid[@menu] == E10_STONES_POLTERGEIST) goto L_stones_offer_poltergeist; + if (@menuid[@menu] == E10_STONES_SOUL) goto L_stones_offer_soul; + if (@menuid[@menu] == E10_STONES_HEART) goto L_stones_offer_heart; + if (@menuid[@menu] == E10_STONES_EAR) goto L_stones_offer_ear; + if (@menuid[@menu] == E10_STONES_EYE) goto L_stones_offer_eye; + if (@menuid[@menu] == E10_STONES_BONE) goto L_stones_offer_bone; + if (@menuid[@menu] == E10_STONES_SKULL) goto L_stones_offer_skull; + if (@menuid[@menu] == E10_STONES_CRYSTAL) goto L_stones_offer_crystal; + if (@menuid[@menu] == E10_STONES_RAGS) goto L_stones_offer_rags; + if (@menuid[@menu] == E10_STONES_PETAL) goto L_stones_offer_petal; + if (@menuid[@menu] == E10_STONES_NEVERMIND) goto L_stones_nevermind; + close; + +L_stones_offer_wisp: + if (countitem("WispPowder") < 1) goto L_stones_noitem; + delitem "WispPowder", 1; + goto L_stones_thanks; + +L_stones_offer_spectre: + if (countitem("SpectrePowder") < 1) goto L_stones_noitem; + delitem "SpectrePowder", 1; + goto L_stones_thanks; + +L_stones_offer_poltergeist: + if (countitem("PoltergeistPowder") < 1) goto L_stones_noitem; + delitem "PoltergeistPowder", 1; + goto L_stones_thanks; + +L_stones_offer_soul: + if (countitem("JackOSoul") < 1) goto L_stones_noitem; + delitem "JackOSoul", 1; + goto L_stones_nothanks; + +L_stones_offer_heart: + if (countitem("DiseasedHeart") < 1) goto L_stones_noitem; + delitem "DiseasedHeart", 1; + goto L_stones_thanks; + +L_stones_offer_ear: + if (countitem("UndeadEar") < 1) goto L_stones_noitem; + delitem "UndeadEar", 1; + goto L_stones_thanks; + +L_stones_offer_eye: + if (countitem("UndeadEye") < 1) goto L_stones_noitem; + delitem "UndeadEye", 1; + goto L_stones_thanks; + +L_stones_offer_bone: + if (countitem("Bone") < 1) goto L_stones_noitem; + delitem "Bone", 1; + goto L_stones_thanks; + +L_stones_offer_skull: + if (countitem("Skull") < 1) goto L_stones_noitem; + delitem "Skull", 1; + goto L_stones_thanks; + +L_stones_offer_crystal: + if (countitem("DarkCrystal") < 1) goto L_stones_noitem; + delitem "DarkCrystal", 1; + goto L_stones_thanks; + +L_stones_offer_rags: + if (countitem("RottenRags") < 1) goto L_stones_noitem; + delitem "RottenRags", 1; + goto L_stones_nothanks; + +L_stones_offer_petal: + if (countitem("DarkPetal") < 1) goto L_stones_noitem; + mes "[Doctor]"; + mes ""; + mes "\"Let me examine it... h'm...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Well now... this is quite... impressive.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"I think I've figured out how you came here...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"This item will certainly serve my purposes. However, when it comes time for you to go home, you may find it a little more difficult.\""; + mes "\"Not impossible, but difficult.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Do you want to give it to me anyway?\""; + next; + menu + "I'm a tough guy, I'll still make it home.", L_stones_tough, + "Sorry, I'm a coward. Maybe I've got something else...", L_stones_offer; + close; + +L_stones_nevermind: + mes "[Doctor]"; + mes ""; + mes "\"H'm, well, if you come by anything please let me know!\""; + close; + +L_stones_thanks: + callsub S_Update_Helped, E10_DOCTOR_POSITION_STONES; + mes "[Doctor]"; + mes ""; + mes "\"Let me examine it... h'm...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Yes, that should do perfectly! Thank you very much.\""; + next; + menu + "Is there anything else you need?", L_stones_help, + "Yep, that's fine. Bye then!", -; + close; + +L_stones_nothanks: + mes "[Doctor]"; + mes ""; + mes "\"Let me examine it... h'm...\""; + mes "\"No, I'm afraid that won't work. Do you have anything else?\""; + goto L_stones_offer; + +L_stones_noitem: + mes "[Doctor]"; + mes ""; + mes "\"Let me examine it... h'm...\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Wait a minute! You don't even have one of those!\""; + next; + menu + "Well, I did, but I dropped it halfway through the dialogue.", L_stones_dropped, + "Sorry, I thought I did. Let's see what else I have...", L_stones_offer, + "Aha! Got you all excited there!", -; + close; + +L_stones_tough: + mes "[Doctor]"; + mes ""; + mes "\"Well, if you're sure...\""; + next; + menu + "I am! Just take the petal, okay?", L_give_petal, + "Er, actually, I'm not. Maybe I have something else...", L_stones_offer; + close; + +L_give_petal: + if (countitem("DarkPetal") < 1) goto L_stones_noitem; + delitem "DarkPetal", 1; + goto L_stones_thanks; + +L_stones_help: + mes "[Doctor]"; + mes ""; + mes "\"Hmm, that's all for now, thank you. I'm going to have a look around this area, though, and I might need some assistance later on.\""; + close; + +// Warning about the potential perils ahead, but the player must still want to abort the quest. +L_At_Stones_Warning: + mes "[Doctor]"; + mes ""; + mes "\"There is no doubt in my mind that what awaits us is both powerful and dangerous, to say the least.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"If this... destruction, this disregard for life isn't an indication, what is?\""; + mes "He takes a moment, searching your face."; + next; + mes "[Doctor]"; + mes ""; + if (((Easter_2010_QuestState >> E10_HELPED_DOCTOR_SHIFT) & E10_HELPED_DOCTOR_MASK)) + mes "\"I do appreciate your help thus far, really. And I did look forward to working with you again in putting an end to this devastation.\""; + if (!((Easter_2010_QuestState >> E10_HELPED_DOCTOR_SHIFT) & E10_HELPED_DOCTOR_MASK)) + mes "\"Despite the danger, I think pressing on would certainly be a brave choice.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"But if you were to leave now, I'm afraid it would be impossible to return...\""; + mes "He pauses again. \"There is still time for you to turn back now, while it's relatively easy.\""; + next; + menu "N-no, I-I think I will continue... Yes, I'm ready!", L_At_Stones_Menu, + "Now that you mention it, maybe I'd better leave now while I can.", L_At_Stones_Turn_Back, + "Um, could I have a minute to think it over?", -; + close; + +L_At_Stones_Turn_Back: + mes "[Doctor]"; + mes ""; + mes "\"You really want to turn back now?\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"I don't think there's any shame in going back. Quite the contrary. You're brave for even being here.\""; + mes "He hesitates ever so slightly, choosing his words. \"I just wanted to make sure you were certain about your decision.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Once you've left, I don't see how you'll be able to return.\""; + next; + menu "On second thought, perhaps I will stick around.", -, + "No, no, I'm quite sure I want to leave.", L_At_Stones_Really_Return; + close; + +// The player definitely wants to go back, and there's no returning. +L_At_Stones_Really_Return: + if ((Easter_2010_QuestState >> E10_FLAG_RETURN_READY_SHIFT) & E10_FLAG_RETURN_READY_MASK == E10_FLAG_RETURN_READY && (Easter_2010_QuestState >> E10_STATE_ROSE_SHIFT) & E10_STATE_ROSE_MASK == E10_STATE_ROSE_ROSE_COMPLETE) + goto L_At_Stones_Capable; + mes "[Doctor]"; + mes ""; + mes "\"If that is what you want, then consider it done. And good luck.\""; + next; + goto L_At_Stones_Return; + +L_At_Stones_Return: + callsub S_Helped_Count; + if (countitem("DarkPetal") == 0 && @Easter_2010_helper < 3) goto L_At_Stones_Difficult_Return; + set Easter_2010_QuestState, (Easter_2010_QuestState & ~(E10_STATE_ROSE_MASK << E10_STATE_ROSE_SHIFT)) | (E10_STATE_ROSE_RETURNED << E10_STATE_ROSE_SHIFT); + if (@Easter_2010_helper < 3) + delitem "DarkPetal", 1; + savepoint "009-1", 52, 40; + warp "009-1", 0, 0; + close; + +L_At_Stones_Difficult_Return: + mes "[Doctor]"; + mes ""; + mes "\"Hm... you don't seem to have the thing that brought you here, that petal, that I could have used to send you back... assuming you really do want to give up.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Others have been able to battle some darkness directly, which might serve as a substitute.\""; + mes "\"You could still help me here and elsewhere if you want to try to get this done once and for all, but if you want to go early you will need to fight, somehow.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Though there are others helping, too. No doubt that soon enough, you'll be able to go anyway...\""; + close; + +L_At_Stones_Capable: + mes "[Doctor]"; + mes ""; + mes "\"Hm. Oh, it looks like you've learned how to travel between these worlds on your own. Don't you remember the way?\""; + next; + menu "Oh, you're right! It was a spell, um..." + getspellinvocation("world-shift") + " was the name!", -; + close; + +L_At_Stones_Helped: + mes "[Doctor]"; + mes ""; + mes "A smile appears on the Doctor's face. \"You really have done splendidly here.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Will have to see about taking care of these other loose ends, though. Well, I should be getting back to my observations. Please feel free to let me know if you have some new information for me.\""; + close; + +// ======================= +// === Fourth location === +// ======================= + +//From Freeyorp on IRC: +//The fourth position is the only position with any serious sign of life - there are quite a lot of living trees there, packed quite densely +//In the middle of this area, atop cliffs overlooking water, is a fruit tree + +L_At_Fruit: + if ((Easter_2010_QuestState >> E10_FLAG_HELPED_DOCTOR_FRUIT_SHIFT) & E10_FLAG_HELPED_DOCTOR_FRUIT_MASK == E10_FLAG_HELPED_DOCTOR_FRUIT) + goto L_At_Fruit_Helped; + if ((Easter_2010_QuestState >> E10_FLAG_KNOWS_DOCTOR_SHIFT) & E10_FLAG_KNOWS_DOCTOR_MASK == E10_FLAG_KNOWS_DOCTOR) + goto L_At_Fruit_Known; + + setarray @responses$, "\"This tree... it bears remarkable signs of life for such a dead world...\"", "\"But this red light here in conjunction with the blue... that means it must be...\"", "\"Oh dear! Pressed the wrong dratted button again. I wish they'd make them just a little larger...\"", "\"But why so alive? It's surprising to find something that isn't long dead...\""; + + callsub S_Update_Knows; + close; + +L_At_Fruit_Known: + setarray @responses$, "\"Hmm...\" He pauses. \"Ah, hello there. Could you help with a few things for a bit? Might be a bit dangerous, though...\"", + "\"Hello again. Mind helping out again for a bit?\"", + "He wanders around, apparently lost in thought. \"Hm. Are you able to help with something? Er, but just so that you know, it could be dangerous...\"", + "\"Ah, it's you. Thanks for your help back there, by the way. There is something else, though it might be a bit dangerous, that I need help with if you don't mind?\""; + set @i, rand(getarraysize(@responses$) >> 1) << 1; + if ((Easter_2010_QuestState >> E10_DOCTOR_HELP_STATES_SHIFT) & E10_DOCTOR_HELP_STATES_MASK) set @i, @i + 1; + mes @responses$[@i]; + next; + +L_lens_main_menu: + menu "What do I need to do?", L_lens_minigame_explain, + "Dangerous?", L_lens_minigame_dangers, + "Let's start!", L_lens_loop_init, + "Actually, I'd rather not...", -; + close; + +L_lens_minigame_explain: + mes "[Doctor]"; + mes ""; + mes "\"I need a special sort of lens, one that might be used to detect what's going on around here.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"To do this, I'll need a special concoction... but I'll need an extra set of hands, and some dark crystal - they seem to match the dark presence here quite nicely.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"We'll probably need other items as well, to get the concoction to the right state. Hm...\""; + next; + mes "[Doctor]"; + mes ""; + if (countitem("Pearl") < 1) mes "\"If you get some solid, shiny object that could be used in the mix, that would help. A lot.\""; + if (countitem("Pearl") > 0) mes "\"Your pearl there would be great in the mix, as such things help in removing color. Though adding too much would make the wrong kind of texture, and also make it difficult to see through...\""; + if (countitem("IronPotion") < 1) mes "\"From what I've heard about potions from your world, one of them would be excellent at removing an unwanted presence while we make this. I can't remember the name right now, but I think it was orange...\""; + if (countitem("IronPotion") > 0) mes "\"That orange potion there... an Iron Potion, isn't it? It looks like a fairly thick brew, but something that strong should be useful for getting rid of this presence if it gets too much.\""; + if (countitem("ConcentrationPotion") < 1) mes "\"If you could find some potion to refine the concoction, that should be quite useful.\""; + if (countitem("ConcentrationPotion") > 0) mes "\"That purple potion there... a Concentration Potion, you say? That's closer to the sort of texture we're looking for, but it might draw the attention of that presence...\""; + if (countitem("SlowPoisonPotion") < 1) mes "\"And any other potion you can think of, really. I just make it up as I go along, most of the time.\""; + if (countitem("SlowPoisonPotion") > 0) mes "\"Ah, a potion to slow the effects of poison? Interesting, interesting, perhaps something like that could also protect our mix from this evil influence.\""; + if (countitem("BottleOfWater") < 1) mes "\"Though you don't seem to have any water... there is water all around in this place, but whenever I try to do anything with it, things never work. I think it might be tainted here. Maybe there are other things from your world that could help?\""; + if (countitem("BottleOfWater") > 0) mes "\"Ah, water. That will be fantastic for getting rid of unwanted coloration and make the mixture clearer, but of course, too much of it and we'll lose the properties that I was looking for in the first place...\""; + next; + goto L_lens_main_menu; + +L_lens_minigame_dangers: + mes "[Doctor]"; + mes ""; + mes "\"Well. There's some sort of malign force around here, and the things I want to do will probably draw its attention.\""; + next; + goto L_lens_main_menu; + +// ##### Initialise the minigame. ##### + +L_lens_loop_init: + + // Insert sanity checks here + if (countitem("DarkCrystal") < 1) goto L_lens_no_crystal; + + set @MAX_LENS_CRYSTAL_ENERGY_INCREASE, 70; + + // Texture: + setarray @textures$, "finely powdered", "thick", "slightly thick", "slightly thin", "thin"; + set @textureID, rand(3); + + // Coloration is more interesting. 1 for red, 2 for blue, 4 for yellow. So 7 has everything, 0 is clear. + setarray @tints$, "clear", "red", "blue", "purple", "yellow", "orange", "green", "dark"; + set @tintID, rand(7); + + // Opacity, final explicitly displayed value + setarray @opacities$, "opaque", "moderately opaque", "moderately transparent", "transparent"; + set @opacityID, rand(2); + + set @crystalEnergy, rand(rand(@MAX_LENS_CRYSTAL_ENERGY_INCREASE) + 1); // Yes, things _can_ go wrong right from the start. + set @dilution, 4; + set @rounds, 0; // Things go spectacularly wrong as time goes on. + set @damage, 0; // When this hits 4, game over. + + mes "The Doctor places the dark crystal in a small metal container. Looking away, and shielding his face with one hand, he uses a small thin metallic device to emit a sharp, piecing sound, shattering the dark crystal."; + delitem "DarkCrystal", 1; + mes "There is a cloud of smoke, and purple flames leap from the container."; + next; + +// ---------------------- +// ===== Main loop. ===== +// ---------------------- + +L_lens_loop_main: + set @retloc, 0; + set @oldtextureID, @textureID; + set @oldtintID, @tintID; + set @oldopacityID, @opacityID; + + mes "[Lens concoction]"; + mes ""; + mes "The concoction is currently a " + @textures$[@textureID] + ", " + @tints$[@tintID] + " " + @opacities$[@opacityID] + " concoction."; + set @mod, 0; + if (rand(@crystalEnergy) / 3 + rand(@crystalEnergy >> 1) > 30) set @mod, 1; + if (@mod == 1) mes "The Doctor seems uneasy. \"We seem to have drawn the attention of something. Be careful...\""; + next; + +L_lens_loop_menu: + set @LENS_CHOICE_PEARL, 0; + set @LENS_CHOICE_IRON_POTION, 1; + set @LENS_CHOICE_CONC_POTION, 2; + set @LENS_CHOICE_SLOW_POISON_POTION, 3; + set @LENS_CHOICE_WATER, 4; + set @LENS_CHOICE_WAIT, 5; + set @LENS_CHOICE_DISCARD, 6; + + setarray @lensmenu$, "", "", "", "", "", "", ""; + set @lensmenuiter, 0; + + if (countitem("Pearl") < 1) goto L_lens_loop_post_pearl_choice; + + set @lensmenu$[@lensmenuiter], "Pearl"; + set @lensmenuID[@lensmenuiter], @LENS_CHOICE_PEARL; + set @lensmenuiter, @lensmenuiter + 1; + +L_lens_loop_post_pearl_choice: + if (countitem("IronPotion") < 1) goto L_lens_loop_post_iron_potion_choice; + + set @lensmenu$[@lensmenuiter], "Iron potion"; + set @lensmenuID[@lensmenuiter], @LENS_CHOICE_IRON_POTION; + set @lensmenuiter, @lensmenuiter + 1; + +L_lens_loop_post_iron_potion_choice: + if (countitem("ConcentrationPotion") < 1) goto L_lens_loop_post_conc_potion_choice; + + set @lensmenu$[@lensmenuiter], "Concentration potion"; + set @lensmenuID[@lensmenuiter], @LENS_CHOICE_CONC_POTION; + set @lensmenuiter, @lensmenuiter + 1; + +L_lens_loop_post_conc_potion_choice: + if (countitem("SlowPoisonPotion") < 1) goto L_lens_loop_post_slow_poison_potion_choice; + + set @lensmenu$[@lensmenuiter], "Slow poison potion"; + set @lensmenuID[@lensmenuiter], @LENS_CHOICE_SLOW_POISON_POTION; + set @lensmenuiter, @lensmenuiter + 1; + +L_lens_loop_post_slow_poison_potion_choice: + if (countitem("BottleOfWater") < 1) goto L_lens_loop_post_water_choice; + + set @lensmenu$[@lensmenuiter], "Bottle of Water"; + set @lensmenuID[@lensmenuiter], @LENS_CHOICE_WATER; + set @lensmenuiter, @lensmenuiter + 1; + +L_lens_loop_post_water_choice: + set @lensmenu$[@lensmenuiter], "Wait for a moment"; + set @lensmenuID[@lensmenuiter], @LENS_CHOICE_WAIT; + set @lensmenuiter, @lensmenuiter + 1; + + set @lensmenu$[@lensmenuiter], "Discard the brew"; + set @lensmenuID[@lensmenuiter], @LENS_CHOICE_DISCARD; + set @lensmenuiter, @lensmenuiter + 1; + + menu @lensmenu$[0], -, + @lensmenu$[1], -, + @lensmenu$[2], -, + @lensmenu$[3], -, + @lensmenu$[4], -, + @lensmenu$[5], -, + @lensmenu$[6], -; + + set @menu, @menu - 1; + set @pcmod, 0; + if (@menu >= @lensmenuiter) goto L_lens_loop_menu_invalid; + + if (@lensmenuID[@menu] == @LENS_CHOICE_PEARL) goto L_lens_pc_use_pearl; // set @pcmod, rand(2); + if (@lensmenuID[@menu] == @LENS_CHOICE_IRON_POTION) goto L_lens_pc_use_ironpot; + if (@lensmenuID[@menu] == @LENS_CHOICE_CONC_POTION) goto L_lens_pc_use_concpot; + if (@lensmenuID[@menu] == @LENS_CHOICE_SLOW_POISON_POTION) goto L_lens_pc_use_slowpoisonpot; + if (@lensmenuID[@menu] == @LENS_CHOICE_WATER) goto L_lens_pc_use_water; + if (@lensmenuID[@menu] == @LENS_CHOICE_WAIT) set @pcmod, 6; + if (@lensmenuID[@menu] == @LENS_CHOICE_DISCARD) goto L_lens_discard_confirm; + +L_lens_loop_automodify: + set @rounds, @rounds + 1; + set @inc, rand(rand(@MAX_LENS_CRYSTAL_ENERGY_INCREASE / (1+(@crystalEnergy >> 2))) + 1); + if (!(@pcmod & 1)) set @crystalEnergy, @crystalEnergy + @MAX_LENS_CRYSTAL_ENERGY_INCREASE * @inc / (2 + @inc); + set @crystalEnergy, @crystalEnergy - rand(rand(@MAX_LENS_CRYSTAL_ENERGY_INCREASE) + 1); + if (@crystalEnergy < 0) set @crystalEnergy, 0; + set @effects, rand(20 + rand(40 + @crystalEnergy)); + + if (!(@effects & 1)) goto L_lens_loop_automodify_post_texture; + +// --- Automatically modify the texture --- + if (@textureID == 0) set @retloc, 1; + if (@textureID == 0) goto L_lens_auto_alter_texture_dry; +L_lens_loop_automodify_ret: + set @mod, rand(3); + if (@mod == 1) goto L_lens_loop_post_automods; + set @textureID, @textureID - 1 + @mod; + goto L_lens_loop_automodify_post_texture; + +L_lens_loop_automodify_post_texture: + if (@effects & 2) goto L_lens_auto_alter_color; +L_lens_loop_auto_post_color: + if (@effects & 4) goto L_lens_auto_alter_transparency; +L_lens_loop_auto_post_transparency: + if (@effects > 50) goto L_lens_warp_pc_hair; +L_lens_loop_auto_post_warp_hair: + if (@effects > @crystalEnergy) goto L_lens_autofix_texture; +L_lens_loop_auto_post_fix_texture: + set @temp, 0; + if (!(@effects > 80 && rand(@dilution) && !(@effects & 1))) set @temp, 1; + if (@temp == 1) set @retloc, 2; + if (@temp == 1) goto L_lens_drydamage; +L_lens_loop_auto_post_drydamage: + set @temp, 0; + if (@effects + @crystalEnergy / 3 > 120 && (!(@pcmod & 1) || @pcmod & 2)) set @temp, 1; + if (@temp == 1) set @retloc, 3; + if (@temp == 1) goto L_lens_directdamage; + set @temp, 0; + +L_lens_loop_post_automods: + if (@oldtintID & (@tintID ^ @oldtintID)) mes "The mixture becomes less " + @tints$[@oldtintID & (@tintID ^ @oldtintID)] + ", changing to a " + @tints$[@oldtintID & ~(@oldtintID & (@tintID ^ @oldtintID))] + " tint."; + if (@tintID & (@tintID ^ @oldtintID)) mes "The mixture becomes more " + @tints$[@tintID & (@tintID ^ @oldtintID)] + ", changing to a " + @tints$[@tintID] + " tint."; + if (@textureID == @oldtextureID) goto L_lens_nochange_texture; + if (@textureID < 0) set @textureID, 0; + if (@textureID > 4) set @textureID, 4; + if (@oldtextureID == 0) mes "The powder becomes more fluid, changing into a " + @textures$[@textureID] + " concoction."; + if (@oldtextureID > @textureID) mes "The concoction thickens, changing into a " + @textures$[@textureID] + " concoction."; + if (@oldtextureID < @textureID && !(@oldtextureID == 0)) mes "The concoction thins, changing into a " + @textures$[@textureID] + " concoction."; + +L_lens_nochange_texture: + if (@oldopacityID > @opacityID) mes "The concoction becomes more opaque."; + if (@oldopacityID < @opacityID) mes "The concoction becomes more transparent."; + +L_lens_loop_check: + // Check to whether you finished here + if ((@textureID == 3 || @textureID == 2) && @tintID == 0 && @opacityID == 0 && @rounds < 3) goto L_lens_early; + if ((@textureID == 3 || @textureID == 2) && @tintID == 0 && @opacityID == 0) goto L_lens_complete; + if (@textureID == 0 && @rounds / @dilution > 4) goto L_lens_dry_destroyed; + if ((@damage > 3 && @crystalEnergy > 80) || (@damage > 2 && @crystalEnergy > 80 && @textureID == 0)) goto L_lens_violently_destroyed; + next; + goto L_lens_loop_main; + +L_lens_early: + mes "[Doctor]"; + mes ""; + mes "\"That's the sort of thing I'm aiming for - too bad that we haven't added enough for it to complete, though.\""; + next; + goto L_lens_loop_main; + +L_lens_discard_confirm: + // Make sure that the player really does want to discard the mix. + mes "[Doctor]"; + mes ""; + if (@mod == 1 && @damage < 2) mes "\"Are you sure? It didn't seem so bad before...\""; + if (@mod == 0 || @damage > 1) mes "\"If you are sure... there's a lot of dark energy around, so that might be the best option...\""; + next; + menu "Yes, get rid of it!", L_lens_really_discard, + "No, on second thoughts, better not...", -; + goto L_lens_loop_menu; + +L_lens_really_discard: + mes "The Doctor takes out a curious glass instrument, and carefully moves it over the mixture. The device takes on a sickly purple hue, and the remnants of the mixture crumbles into nothingness as the light fades into the device."; + close; + +L_lens_loop_menu_invalid: + mes "[Lens concoction]"; + mes "That doesn't seem right, somehow..."; + next; + goto L_lens_loop_menu; + +L_lens_pc_use_pearl: + if (countitem("Pearl") < 1) goto L_lens_pc_use_missing; + delitem "Pearl", 1; + mes "You pass the pearl to the Doctor, who awkwardly takes it with one hand, grinds it into powder with another device, all the while keeping the container firmly in place. After he finishes, you sprinkle the powder evenly over the concoction."; + if (@textureID > 1) set @textureID, @textureID - 1; + if (rand(3 * @rounds / @dilution) > 0) set @tintID, @tintID & ~1; // Remove red + if (rand(2) > 0) set @tintID, @tintID & ~2; // Remove blue + if (rand(3) > 0) set @tintID, @tintID & ~4; // Remove yellow + if (rand(@opacityID) == 0) set @opacityID, @opacityID + 1; + goto L_lens_loop_automodify; + +L_lens_pc_use_ironpot: + if (countitem("IronPotion") < 1) goto L_lens_pc_use_missing; + delitem "IronPotion", 1; + mes "You pour the iron potion into the mix."; + if (@textureID > 2) set @textureID, @textureID - 1; + if (@textureID == 1 || (@textureID == 0 && rand(2) == 0)) set @textureID, @textureID + 1; + set @tintID, @tintID | 4; + if (rand(3) > 0) set @tintID, @tintID | 1; + set @crystalEnergy, 10 * (@crystalEnergy + 5) >> 4; + goto L_lens_loop_automodify; + +L_lens_pc_use_concpot: + if (countitem("ConcentrationPotion") < 1) goto L_lens_pc_use_missing; + delitem "ConcentrationPotion", 1; + mes "You pour the concentration potion into the mix."; + if (@textureID > 1 && rand(5) <= 2) set @textureID, @textureID - 1; + if (@textureID == 0 && rand(3) > 0) set @textureID, @textureID + 1; + set @pcmod, rand(2); + goto L_lens_loop_automodify; + +L_lens_pc_use_slowpoisonpot: + if (countitem("SlowPoisonPotion") < 1) goto L_lens_pc_use_missing; + delitem "SlowPoisonPotion", 1; + mes "You pour the slow poison potion into the mix."; + if ((@textureID < 4 && @textureID > 0 && rand(5) > 2) || (@textureID == 0 && rand(5))) set @textureID, @textureID + 1; + set @crystalEnergy, @crystalEnergy - rand(rand(10 * (@crystalEnergy + 15) >> 4) + 5); + set @pcmod, 1; + goto L_lens_loop_automodify; + +L_lens_pc_use_water: + if (countitem("BottleOfWater") < 1) goto L_lens_pc_use_missing; + delitem "BottleOfWater", 1; + mes "You empty the bottle of water into the mix."; + if ((@textureID < 4 && @textureID > 0) || (@textureID == 0 && rand(5) < 2)) set @textureID, @textureID + 1; + if (rand(7) < 2) set @tintID, @tintID & ~3; + if (rand(7) < 2) set @tintID, @tintID & ~5; + if (rand(7) < 2) set @tintID, @tintID & ~6; + if (rand(@opacityID + 2) > 1) set @opacityID, @opacityID - 1; + set @pcmod, rand(3); + set @dilution, @dilution + 1; + goto L_lens_loop_automodify; + +L_lens_pc_use_missing: + mes "Odd, you seemed to have it just moments before. Somewhat confused, you go back to consider what to do next."; + next; + goto L_lens_loop_menu; + +// ----------------------------------------------------------------- +// ##### The various automatic subroutines for various effects ##### +// ----------------------------------------------------------------- + +L_lens_auto_alter_color: + set @mod, 1 << rand(3); + if (rand(@crystalEnergy) > 40) set @mod, @mod | 4; + if (@crystalEnergy - rand(@crystalEnergy) < 30) set @mod, @mod | rand(3); + set @tintID, @tintID | @mod; + goto L_lens_loop_auto_post_color; + +L_lens_auto_alter_transparency: + set @mod, rand(3); + if ((@opacityID == 0 && @mod < 1) || (@opacityID == 3 && @mod > 1)) goto L_lens_loop_auto_post_transparency; + if (@mod == 1) goto L_lens_loop_auto_post_transparency; + set @opacityID, @opacityID - 1 + @mod; + if (@mod > 1) mes "The mixture alters, and becomes easier to see through."; + if (@opacityID == 3) mes "The mixture is now completely clear."; + if (@mod < 1) mes "The mixture alters, and becomes harder to see through."; + goto L_lens_loop_auto_post_transparency; + +L_lens_warp_pc_hair: + mes "You feel something around your head change..."; + set @style,rand(6); + set @color,rand(9); + setlook 1,@style+1; + setlook 6,@color; + goto L_lens_loop_auto_post_warp_hair; + +L_lens_autofix_texture: + set @textureID, @textureID + rand(3) - 1; + if (@textureID > 3) set @textureID, @textureID -1; + if (@textureID < 3) set @textureID, @textureID +1; + goto L_lens_loop_auto_post_fix_texture; + +L_lens_directdamage: + mes "A flash of sickly yellow light blinds you, the mixture distorts for a moment, then reappears."; + set @textureID, rand(3); + set @tintID, @tintID | rand(7); + set @opacityID, 0; + + set @mod, 0; + if (rand(readparam(bAgi)) > 30) set @mod, 1; + if (@mod == 1) mes "You barely manage to dive out of the way as the yellow flash sharply hisses through a space which, until a few moments ago, you had occupied..."; + if (@mod == 0) mes "The light burns all around you, with a strong sensation as if you were crushed under a great weight..."; + if (@mod == 0) itemheal readparam(bVit) * readparam(bVit) / 12 - 820, 0; + if (hp < 1) close; + set @mod, 1; + +L_lens_auto_alter_texture_dry: + // If the mix dries up, and too much of the mix was water, then the mixture become damaged. However, the chance that it does dry up decreases with the proportion of water used so far + if (@mod == 0 && rand(2) == 0 && @dilution > 4) set @dilution, @dilution - 1; + if (rand(3) == 0 && @dilution > 5 && rand(@dilution * @dilution) > 12 && (!@pcmod & 1)) goto L_lens_drydamage; + goto L_lens_loop_return_fix; + +L_lens_drydamage: + if (@mod == 0 && @pcmod & 1) goto L_lens_loop_return_fix; + if (@mod == 0) mes "With a flash of purple light, the mixture spontaneously becomes very dry."; + if (@mod == 0 && rand(2) == 0 && @dilution > 5) set @dilution, @dilution / 2; + if (@mod == 0) set @textureID, 0; + +L_lens_damagelens: + if (rand(@damage * @damage) >= 6) goto L_lens_loop_return_fix; + set @damage, @damage + 1; + if (@damage == 1) mes "The container starts vibrating slightly."; + if (@damage == 2) mes "The container begins to shake unsteadily."; + if (@damage == 3 && @textureID == 0) goto L_lens_violently_destroyed; + if (@damage == 3) mes "The container is now shaking violently. The concoction gives off an acrid smell, and dark purple sparks occasionally fly out of the container. He watches you uneasily."; + if (@damage == 4) goto L_lens_violently_destroyed; + goto L_lens_loop_return_fix; + +L_lens_loop_return_fix: + if (@retloc == 0) mes "FATAL ERROR: @retloc undefined in L_lens_loop_return_fix, closing script."; + if (@retloc == 0) close; + // Hacky. + set @temp, 0; + if (@retloc == 1) set @temp, 1; + if (@retloc == 2) set @temp, 2; + if (@retloc == 3) set @temp, 3; + set @retloc, 0; + if (@temp == 0) mes "FATAL ERROR: @retloc out of range in L_lens_loop_return_fix, closing script."; + if (@temp == 0) close; + if (@temp == 1) goto L_lens_loop_automodify_ret; + if (@temp == 2) goto L_lens_loop_auto_post_drydamage; + if (@temp == 3) goto L_lens_loop_post_automods; + +L_lens_no_crystal: + mes "[Doctor]"; + mes ""; + mes "\"Looks like neither of us have a dark crystal. I'll try something else, but if you want to look around for one in the meantime, we could try again later.\""; + close; + +// --------------------------------- +// ##### The possible outcomes ##### +// --------------------------------- + +L_lens_violently_destroyed: + mes "A high pitched whine echoes around you. A series of blinding flashes force you to cover your eyes as the container is sent flying into the air. The grass around where the concoction landed takes on a sickly yellow hue."; + next; + mes "[Doctor]"; + mes ""; + mes "The Doctor sighs."; + mes "\"That could have gone better...\""; + next; + mes "The Doctor takes out a curious glass device, and carefully moves it over the tainted grass. Purple and black energies are sucked into the device, and the grass gradually returns to its normal color."; + close; + +L_lens_dry_destroyed: + mes "[Doctor]"; + mes ""; + mes "The Doctor frowns."; + mes ""; + mes "\"It's has become too dry... I fear that the mix has become damaged beyond repair, at least for the purposes I had in mind..."; + mes "I'll do what I can to salvage what is there, but it would be unrealistic to be expect that the end result will be anything other than deeply flawed.\""; + +L_lens_salvage: + mes "[Doctor]"; + mes ""; + mes "The Doctor takes out a vial containing a crystal clear fluid, an oddly shaped bowl, and a curious glass device. He then tips the remnants of the concoction into the bowl, then moves the device counterclockwise around the bowl five times, while pouring the clear fluid into the bowl"; + mes "A weak yellow glow surrounds the device as it moves around the outside of the bowl, and the concoction slowly fuses together as more of the clear fluid is added to it. But the concoction is still very lumpy, and doesn't fit properly within the bowl."; + next; + mes "[Doctor]"; + mes ""; + mes "He mutters distractedly as he moves the device directly over the bowl, then around, twice clockwise then once counterclockwise. \"...all going wrong... shouldn't be yellow...\""; + next; + mes "[Doctor]"; + mes ""; + mes "He then holds the device vertically over the bowl, and takes out a vial of bright red fluid, inverts the device, and mixes the red fluid into the dark purple energy that shoots out of the device into the centre of the remnants."; + mes "The red fluid darkens the energy it comes into contact with, then spreads out over the remnants of the concoction, giving of copious amounts of smoke."; + next; + + mes "[Doctor]"; + mes ""; + mes "After a few moments, he steps back and puts away the vial and the glass device, which is now completely devoid of any color."; + mes "The smoke gradually clears, leaving a perceptively warped lump of glass in the middle."; + + mes "[Doctor]"; + mes ""; + mes "\"You might as well take this.\""; + mes ""; + mes "\"I did what I could, but the lens is still warped beyond use, for me... I'm not sure that there's much that you'll be able to do with that as it is, but perhaps you could find someone that still has a use for it somewhere, or something.\""; + getitem "FlawedLens", 1; + close; + +L_lens_complete: + mes "The Doctor grins broadly."; + next; + mes "[Doctor]"; + mes ""; + mes "\"Yes, yes. That's it, that's just what I need!\""; + next; + mes "[Doctor]"; + mes ""; + mes "The Doctor takes out an oddly shaped bowl and a curious glass device. He quickly pours the concoction in, then moves the device over the bowl. A faint blue glow surrounds the bowl as he does so."; + next; + mes "[Doctor]"; + mes ""; + mes "He then moves the device around the edges, twice clockwise then once counterclockwise."; + mes "After this, he holds the device vertically over the bowl. He takes out a vial of bright red fluid, and inverts the device, sending a stream of pure black energy directly downwards into the concoction. He moves with incredible speed as he pours the red fluid evenly over the concoction as the black energy hits the concoction, giving off a tremendous amount of steam."; + next; + mes "[Doctor]"; + mes ""; + mes "He stares at the bowl with intense concentration, then abruptly cuts off the stream of red fluid, despite no visible change in the mixture that you can see through the steam."; + next; + mes "As the steam clears, you see that the concoction has hardened into a single solid shape, smoothly curving outwards, but completely opaque."; + next; + mes "[Doctor]"; + mes ""; + mes "\"Nothing to worry about.. it might be opaque now, but give it a moment to cool down first. Ah, there, it's clearing up nicely now.\""; + mes ""; + mes "He waits a moment, as the lens becomes more and more transparent."; + next; + mes "[Doctor]"; + mes ""; + mes "The Doctor carefully picks up the lens and holds it in a small piece of fabric. He turns it over a few times, checking to make sure there aren't any imperfections."; + mes ""; + mes "\"The glass formed perfectly! The lens is done.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"This is just what I needed. You were a great help, thank you!\""; + mes ""; + mes "[You gain 150,000 experience points!]"; + getexp 150000, 0; + callsub S_Update_Helped, E10_DOCTOR_POSITION_FRUIT; + close; + // Yay! + +L_At_Fruit_Helped: + mes "As you approach, you see him looking through a collection of devices."; + next; + mes "There is an odd humming sound, and a blue glow from somewhere."; + next; + mes "[Doctor]"; + mes ""; + mes "\"Oh, hello.\" You notice the sound has stopped. \"Ah, and thanks for the help back there, I should be able to get this done in no time now.\""; + mes "He wanders around, and you can see him do something complicated with yet another of his devices and the lens that you made."; + next; + mes "You can't be quite sure, but this area feels healthier already..."; + close; + +// ====================== +// === Fifth location === +// ====================== + +// There was no time to complete this to the original plan, so a short easter egg was included here. + +L_At_Cave: + mes "[Doctor]"; + mes ""; + mes "\"It's funny, isn't it? Um, time, that is. Yes...you could say I know a lot about it.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"For all our planning, it gets the better of us at times. And we may not always be able to realise our plans at time's mercy.\""; + next; + mes "[Doctor]"; + mes ""; + mes "\"Alas, what can we do? You seem like the patient sort, perhaps you know something about it?\""; + next; + menu "Patient, me? Not at all! I've had to wait too much these days!", -, + "Yes, I think I can understand that sentiment.", -; + mes "[Doctor]"; + mes ""; + mes "\"Ah, well. I thought there was something to do here, but it seems there's no time for that.\""; + mes "He looks off, quietly upset. \"Well, there's no reason to be down, is there!\" Suddenly he's vibrant again. \"Still much that can be done!\""; + close; + + +// ======================= +// === Event functions === +// ======================= + + +OnTimer30000: + setnpctimer 0; + if (($Easter_2010_Npc_State1 & E10_TIMER_STATE_DOCTOR_MASK) >> E10_TIMER_STATE_DOCTOR_SHIFT < ($Easter_2010_Npc_State1 >> E10_DOCTOR_TIMER_OVERTICK_SHIFT) & E10_DOCTOR_TIMER_OVERTICK_MASK) goto L_timer_increment; + +OnResetWarp: + set $Easter_2010_Npc_State1, $Easter_2010_Npc_State1 & (~E10_TIMER_STATE_DOCTOR_MASK << E10_TIMER_STATE_DOCTOR_SHIFT); +OnDoWarp: + setarray $@xcoord, 0, 21, 83, 65, 116, 110; + setarray $@ycoord, 0, 105, 34, 95, 69, 124; + set $@index, rand(getarraysize($@xcoord) - 1); + if (rand(3)) set $@index, $@index + 1; + npcwarp $@xcoord[$@index], $@ycoord[$@index], "Doctor#who"; + message "Freeyorp", "Doctor warped. New location: " + $@index + "."; + set $Easter_2010_Npc_State2, $Easter_2010_Npc_State2 & ~(E10_DOCTOR_POSITION_MASK << E10_DOCTOR_POSITION_SHIFT) | ($@index << E10_DOCTOR_POSITION_SHIFT); + end; + +L_timer_increment: + set $Easter_2010_Npc_State1, ($Easter_2010_Npc_State1 & (~E10_TIMER_STATE_DOCTOR_MASK << E10_TIMER_STATE_DOCTOR_SHIFT)) | (((($Easter_2010_Npc_State1 & E10_TIMER_STATE_DOCTOR_MASK) + 1 ) << E10_TIMER_STATE_DOCTOR_SHIFT)); + end; + +OnManualStartTimer: + initnpctimer; + end; + +OnManualStopTimer: + stopnpctimer; + end; + +OnManualDisable: + npcwarp 0, 0, "Doctor#who"; + stopnpctimer; + end; + +OnInit: + set $Easter_2010_Npc_State2, $Easter_2010_Npc_State2 & ~(E10_DOCTOR_POSITION_MASK << E10_DOCTOR_POSITION_SHIFT) | (E10_DOCTOR_POSITION_NULL << E10_DOCTOR_POSITION_SHIFT); +} diff --git a/npc/028-1/_import.txt b/npc/028-1/_import.txt new file mode 100755 index 00000000..53a49234 --- /dev/null +++ b/npc/028-1/_import.txt @@ -0,0 +1,5 @@ +map: 028-1.gat +npc: npc/028-1/_mobs.txt +npc: npc/028-1/_warps.txt +npc: npc/028-1/Doctor.txt +npc: npc/028-1/Blocker.txt diff --git a/npc/028-1/_mobs.txt b/npc/028-1/_mobs.txt new file mode 100755 index 00000000..45a97279 --- /dev/null +++ b/npc/028-1/_mobs.txt @@ -0,0 +1,54 @@ +// 028-1 mobs + +028-1.gat,115,72,27,25 monster SpikyMushrooms 1019,18,20000,600,Mob028-1::On1019 +028-1.gat,83,69,25,19 monster Bat 1017,18,100000,1200,Mob028-1::On1017 +028-1.gat,93,33,48,32 monster Wisp 1040,8,200000,15000,Mob028-1::On1040 +028-1.gat,93,33,46,34 monster Spectre 1042,8,200000,15000,Mob028-1::On1042 +028-1.gat,93,33,44,36 monster Poltergeist 1047,8,200000,15000,Mob028-1::On1047 +028-1.gat,35,64,38,9 monster Sea Slime 1017,18,100000,1200,Mob028-1::On1017 +028-1.gat,45,75,22,10 monster Sea Slime 1017,18,100000,1200,Mob028-1::On1017 +028-1.gat,23,101,1,1 monster squirrel 1038,1,300000,50000,Mob028-1::On1038 +028-1.gat,68,95,71,18 monster Wisp 1040,8,200000,15000,Mob028-1::On1040 +028-1.gat,76,100,93,16 monster Spectre 1042,8,200000,15000,Mob028-1::On1042 +028-1.gat,104,114,61,14 monster Poltergeist 1047,8,200000,15000,Mob028-1::On1047 +028-1.gat,54,42,1,1 monster Fallen 1045,1,700000,300000,Mob028-1::On1045 + + +028-1.gat,0,0,0 script Mob028-1 -1,{ +On1017: + set @mobID, 1017; + callfunc "MobPoints"; + break; + +On1019: + set @mobID, 1019; + callfunc "MobPoints"; + break; + +On1038: + set @mobID, 1038; + callfunc "MobPoints"; + break; + +On1040: + set @mobID, 1040; + callfunc "MobPoints"; + break; + +On1042: + set @mobID, 1042; + callfunc "MobPoints"; + break; + +On1045: + set @mobID, 1045; + callfunc "MobPoints"; + break; + +On1047: + set @mobID, 1047; + callfunc "MobPoints"; + break; + + end; +} diff --git a/npc/028-1/_warps.txt b/npc/028-1/_warps.txt new file mode 100755 index 00000000..74d3cd30 --- /dev/null +++ b/npc/028-1/_warps.txt @@ -0,0 +1,2 @@ +// 028-1 warps + diff --git a/npc/028-3/_import.txt b/npc/028-3/_import.txt new file mode 100755 index 00000000..16bcb2fb --- /dev/null +++ b/npc/028-3/_import.txt @@ -0,0 +1,3 @@ +map: 028-3.gat +npc: npc/028-3/_mobs.txt +npc: npc/028-3/_warps.txt diff --git a/npc/028-3/_mobs.txt b/npc/028-3/_mobs.txt new file mode 100755 index 00000000..1daa99ed --- /dev/null +++ b/npc/028-3/_mobs.txt @@ -0,0 +1,26 @@ +// 028-3 mobs + +028-3.gat,51,49,22,15 monster Silkworm 1035,10,0,3000,Mob028-3::On1035 +028-3.gat,43,35,1,1 monster EvilMushroom 1013,3,40000,5000,Mob028-3::On1013 +028-3.gat,27,31,1,1 monster EvilMushroom 1013,3,40000,5000,Mob028-3::On1013 +028-3.gat,50,49,61,60 monster Bat 1017,10,60000,10000,Mob028-3::On1017 + + +028-3.gat,0,0,0 script Mob028-3 -1,{ +On1013: + set @mobID, 1013; + callfunc "MobPoints"; + break; + +On1017: + set @mobID, 1017; + callfunc "MobPoints"; + break; + +On1035: + set @mobID, 1035; + callfunc "MobPoints"; + break; + + end; +} diff --git a/npc/028-3/_warps.txt b/npc/028-3/_warps.txt new file mode 100755 index 00000000..dd0e452c --- /dev/null +++ b/npc/028-3/_warps.txt @@ -0,0 +1,3 @@ +// 028-3 warps + +028-3.gat,33,78 warp To028-1 -1,-1,028-1.gat,114,122 diff --git a/npc/_import.txt b/npc/_import.txt old mode 100644 new mode 100755 index 0d4c90bf..5f0e6e24 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -54,3 +54,5 @@ import: npc/026-1_Swamp/_import.txt import: npc/027-1_Graveyard/_import.txt import: npc/027-2_Caretakers_House/_import.txt import: npc/botcheck/_import.txt +import: npc/028-1/_import.txt +import: npc/028-3/_import.txt diff --git a/npc/easter/2010/_import.txt b/npc/easter/2010/_import.txt new file mode 100644 index 00000000..1f543006 --- /dev/null +++ b/npc/easter/2010/_import.txt @@ -0,0 +1,3 @@ +npc: npc/easter/2010/egg_func.txt +npc: npc/easter/2010/eggs.txt +npc: npc/easter/2010/helper.txt diff --git a/npc/easter/2010/egg_func.txt b/npc/easter/2010/egg_func.txt new file mode 100644 index 00000000..9dbf669e --- /dev/null +++ b/npc/easter/2010/egg_func.txt @@ -0,0 +1,114 @@ +function script Easter2010Loc_Check1 { + set @result, ~Easter_2010_EggState1 & (1 << @obj) & $Easter_2010_Egg_Loc_State1; + if (@result == 0) goto L_NotHere; + getinventorylist; + if (@inventorylist_count == 100 && countitem(E10_COLLECT_EGGS_ID) == 0) + goto L_TooMany; + if (rand(10)) set $Easter_2010_Egg_Loc_State1, $Easter_2010_Egg_Loc_State1 & ~(1 << @obj); + set Easter_2010_EggState1, Easter_2010_EggState1 | (1 << @obj); + mes "You pick up an egg."; + getitem E10_COLLECT_EGGS_ID, 1; + return; + +L_NotHere: + mes "You can't find an egg here."; + set @result, 0; + return; + +L_TooMany: + mes "You don't have room for this egg."; + set @result, 0; + return; +} + +function script Easter2010Loc_Check2 { + set @result, ~Easter_2010_EggState2 & (1 << @obj) & $Easter_2010_Egg_Loc_State2; + if (@result == 0) goto L_NotHere; + getinventorylist; + if (@inventorylist_count == 100 && countitem(E10_COLLECT_EGGS_ID) == 0) + goto L_TooMany; + if (rand(10)) set $Easter_2010_Egg_Loc_State2, $Easter_2010_Egg_Loc_State2 & ~(1 << @obj); + set Easter_2010_EggState2, Easter_2010_EggState2 | (1 << @obj); + mes "You pick up an egg."; + getitem E10_COLLECT_EGGS_ID, 1; + return; + +L_NotHere: + mes "You can't find an egg here."; + set @result, 0; + return; + +L_TooMany: + mes "You don't have room for this egg."; + set @result, 0; + return; +} + +function script Easter2010Loc_Check3 { + set @result, ~Easter_2010_EggState3 & (1 << @obj) & $Easter_2010_Egg_Loc_State3; + if (@result == 0) goto L_NotHere; + getinventorylist; + if (@inventorylist_count == 100 && countitem(E10_COLLECT_EGGS_ID) == 0) + goto L_TooMany; + if (rand(10)) set $Easter_2010_Egg_Loc_State3, $Easter_2010_Egg_Loc_State3 & ~(1 << @obj); + set Easter_2010_EggState3, Easter_2010_EggState3 | (1 << @obj); + mes "You pick up an egg."; + getitem E10_COLLECT_EGGS_ID, 1; + return; + +L_NotHere: + mes "You can't find an egg here."; + set @result, 0; + return; + +L_TooMany: + mes "You don't have room for this egg."; + set @result, 0; + return; +} + +function script Easter2010Loc_Check4 { + set @result, ~Easter_2010_EggState4 & (1 << @obj) & $Easter_2010_Egg_Loc_State4; + if (@result == 0) goto L_NotHere; + getinventorylist; + if (@inventorylist_count == 100 && countitem(E10_COLLECT_EGGS_ID) == 0) + goto L_TooMany; + if (rand(10)) set $Easter_2010_Egg_Loc_State4, $Easter_2010_Egg_Loc_State4 & ~(1 << @obj); + set Easter_2010_EggState4, Easter_2010_EggState4 | (1 << @obj); + mes "You pick up an egg."; + getitem E10_COLLECT_EGGS_ID, 1; + return; + +L_NotHere: + mes "You can't find an egg here."; + set @result, 0; + return; + +L_TooMany: + mes "You don't have room for this egg."; + set @result, 0; + return; +} + +function script Easter2010Loc_Check5 { + set @result, ~Easter_2010_EggState5 & (1 << @obj) & $Easter_2010_Egg_Loc_State5; + if (@result == 0) goto L_NotHere; + getinventorylist; + if (@inventorylist_count == 100 && countitem(E10_COLLECT_EGGS_ID) == 0) + goto L_TooMany; + if (rand(10)) set $Easter_2010_Egg_Loc_State5, $Easter_2010_Egg_Loc_State5 & ~(1 << @obj); + set Easter_2010_EggState5, Easter_2010_EggState5 | (1 << @obj); + mes "You pick up an egg."; + getitem E10_COLLECT_EGGS_ID, 1; + return; + +L_NotHere: + mes "You can't find an egg here."; + set @result, 0; + return; + +L_TooMany: + mes "You don't have room for this egg."; + set @result, 0; + return; +} diff --git a/npc/easter/2010/eggs.txt b/npc/easter/2010/eggs.txt new file mode 100755 index 00000000..5f174beb --- /dev/null +++ b/npc/easter/2010/eggs.txt @@ -0,0 +1,934 @@ +// + +007-1.gat,38,22,0 script Flowers 127,{ + set @obj, 0; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,40,41,0 script Grass 127,{ + set @obj, 1; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,18,71,0 script Stone 127,{ + set @obj, 2; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,58,33,0 script Tree 127,{ + set @obj, 3; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,36,58,0 script Flowers 127,{ + set @obj, 4; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,91,25,0 script Plant 127,{ + set @obj, 5; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,66,52,0 script Sign 127,{ + set @obj, 6; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,104,33,0 script Tree 127,{ + set @obj, 7; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,99,39,0 script Plant 127,{ + set @obj, 8; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,125,20,0 script Rock 127,{ + set @obj, 9; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,117,33,0 script Plant 127,{ + set @obj, 10; + callfunc "Easter2010Loc_Check1"; + close; +} + +007-1.gat,114,54,0 script Tree 127,{ + set @obj, 11; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,97,28,0 script Haystack 127,{ + set @obj, 12; + callfunc "Easter2010Loc_Check1"; + if (@result != 0) close; + if (rand(100) == 0) getitem "BentNeedle", 1; + close; +} + +008-1.gat,88,48,0 script Target 127,{ + set @obj, 13; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,137,85,0 script Tree 127,{ + set @obj, 14; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,46,18,0 script Rocks 127,{ + set @obj, 15; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,36,28,0 script Rock 127,{ + set @obj, 16; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,44,26,0 script Flowers 127,{ + set @obj, 17; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,68,21,0 script Wheat 127,{ + set @obj, 18; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,103,27,0 script Scythe 127,{ + set @obj, 19; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,128,25,0 script Trees 127,{ + set @obj, 20; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,134,39,0 script Flowers 127,{ + set @obj, 21; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,134,61,0 script Tree 127,{ + set @obj, 22; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,129,77,0 script Flowers 127,{ + set @obj, 23; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,121,95,0 script Tree 127,{ + set @obj, 24; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,99,91,0 script Tree 127,{ + set @obj, 25; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,64,90,0 script Grass 127,{ + set @obj, 26; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,46,83,0 script Pond 127,{ + set @obj, 27; + callfunc "Easter2010Loc_Check1"; + close; +} + +008-1.gat,43,64,0 script Tree 127,{ + set @obj, 28; + callfunc "Easter2010Loc_Check1"; + close; +} + +009-1.gat,26,32,0 script Tree 127,{ + set @obj, 29; + callfunc "Easter2010Loc_Check1"; + close; +} + +009-1.gat,25,51,0 script Flowers 127,{ + set @obj, 30; + callfunc "Easter2010Loc_Check1"; + close; +} + +009-1.gat,44,46,0 script Stump 127,{ + set @obj, 31; + callfunc "Easter2010Loc_Check1"; + close; +} + +009-1.gat,36,34,0 script Sign 127,{ + set @obj, 0; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,45,25,0 script Tree 127,{ + set @obj, 1; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,54,31,0 script Flower pot 127,{ + set @obj, 2; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,61,34,0 script Sign 127,{ + set @obj, 3; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,67,33,0 script Pots 127,{ + set @obj, 4; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,78,34,0 script Sign 127,{ + set @obj, 5; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,85,35,0 script Flower pot 127,{ + set @obj, 6; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,95,33,0 script Flowers 127,{ + set @obj, 7; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,90,27,0 script Bench 127,{ + set @obj, 8; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,94,52,0 script Tree 127,{ + set @obj, 9; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,82,51,0 script Tree 127,{ + set @obj, 10; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,77,45,0 script Barrel 127,{ + set @obj, 11; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,62,46,0 script Chimney 127,{ + set @obj, 12; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-1.gat,54,38,0 script Tree 127,{ + set @obj, 13; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,67,48,0 script Shelf 127,{ + set @obj, 14; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,37,24,0 script Table 127,{ + set @obj, 15; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,68,29,0 script Bed 127,{ + set @obj, 16; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,94,25,0 script Display 127,{ + set @obj, 17; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,123,21,0 script Shelf 127,{ + set @obj, 18; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,151,25,0 script Candle 127,{ + set @obj, 19; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,57,48,0 script Fireplace 127,{ + set @obj, 20; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,62,56,0 script Table 127,{ + set @obj, 21; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,101,44,0 script Bed 127,{ + set @obj, 22; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,123,44,0 script Plant 127,{ + set @obj, 23; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,112,43,0 script Window 127,{ + set @obj, 24; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,146,42,0 script Table 127,{ + set @obj, 25; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,153,46,0 script Railing 127,{ + set @obj, 26; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,18,103,0 script Chair 127,{ + set @obj, 27; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,27,97,0 script Shield 127,{ + set @obj, 28; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,148,64,0 script Counter 127,{ + set @obj, 29; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,177,58,0 script Display 127,{ + set @obj, 30; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,184,63,0 script Display 127,{ + set @obj, 31; + callfunc "Easter2010Loc_Check2"; + close; +} + +009-2.gat,148,80,0 script Container 127,{ + set @obj, 0; + callfunc "Easter2010Loc_Check3"; + close; +} + +009-2.gat,143,85,0 script Shelf 127,{ + set @obj, 1; + callfunc "Easter2010Loc_Check3"; + close; +} + +009-2.gat,150,83,0 script Shelf 127,{ + set @obj, 2; + callfunc "Easter2010Loc_Check3"; + close; +} + +009-2.gat,151,88,0 script Bag 127,{ + set @obj, 3; + callfunc "Easter2010Loc_Check3"; + close; +} + +009-2.gat,126,69,0 script Cupboard 127,{ + set @obj, 4; + callfunc "Easter2010Loc_Check3"; + close; +} + +009-2.gat,118,68,0 script Fireplace 127,{ + set @obj, 5; + callfunc "Easter2010Loc_Check3"; + close; +} + +009-2.gat,111,72,0 script Shield 127,{ + set @obj, 6; + callfunc "Easter2010Loc_Check3"; + close; +} + +009-2.gat,103,74,0 script Table 127,{ + set @obj, 7; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,24,66,0 script Rock 127,{ + set @obj, 8; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,120,84,0 script Rock 127,{ + set @obj, 9; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,27,95,0 script Barrel 127,{ + set @obj, 10; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,51,34,0 script Sign 127,{ + set @obj, 11; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,71,74,0 script Dead Tree 127,{ + set @obj, 12; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,48,82,0 script Flowerpot 127,{ + set @obj, 13; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,21,97,0 script Water 127,{ + set @obj, 14; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,130,45,0 script Grass 127,{ + set @obj, 15; + callfunc "Easter2010Loc_Check3"; + close; +} + +010-1.gat,45,102,0 script Plant 127,{ + set @obj, 16; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,38,36,0 script Cave 127,{ + set @obj, 17; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,87,33,0 script Oscar's Hat 127,{ + set @obj, 18; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,91,37,0 script Lattice 127,{ + set @obj, 19; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,97,37,0 script Drain 127,{ + set @obj, 20; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,88,66,0 script Bullrushes 127,{ + set @obj, 21; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,104,69,0 script Plant 127,{ + set @obj, 22; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,112,76,0 script Crevice 127,{ + set @obj, 23; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,108,89,0 script Grass 127,{ + set @obj, 24; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,83,85,0 script Stump 127,{ + set @obj, 25; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,59,92,0 script Sign 127,{ + set @obj, 26; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,36,90,0 script Tree 127,{ + set @obj, 27; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,50,103,0 script Tree 127,{ + set @obj, 28; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,26,89,0 script Stream 127,{ + set @obj, 29; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,35,75,0 script Tree 127,{ + set @obj, 30; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,48,79,0 script Flowers 127,{ + set @obj, 31; + callfunc "Easter2010Loc_Check3"; + close; +} + +011-1.gat,70,69,0 script Tree 127,{ + set @obj, 0; + callfunc "Easter2010Loc_Check4"; + close; +} + +011-1.gat,100,41,0 script Field 127,{ + set @obj, 1; + callfunc "Easter2010Loc_Check4"; + close; +} + +011-1.gat,89,37,0 script Flower pot 127,{ + set @obj, 2; + callfunc "Easter2010Loc_Check4"; + close; +} + +011-1.gat,77,32,0 script Foundation 127,{ + set @obj, 3; + callfunc "Easter2010Loc_Check4"; + close; +} + +011-1.gat,65,39,0 script Cattails 127,{ + set @obj, 4; + callfunc "Easter2010Loc_Check4"; + close; +} + +011-1.gat,45,35,0 script Plant 127,{ + set @obj, 5; + callfunc "Easter2010Loc_Check4"; + close; +} + +011-2.gat,29,29,0 script Torch 127,{ + set @obj, 6; + callfunc "Easter2010Loc_Check4"; + close; +} + +011-2.gat,33,51,0 script Water 127,{ + set @obj, 7; + callfunc "Easter2010Loc_Check4"; + close; +} + +011-2.gat,39,48,0 script Stalagmite 127,{ + set @obj, 8; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,124,137,0 script Tree 127,{ + set @obj, 9; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,143,121,0 script Treestump 127,{ + set @obj, 10; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,136,72,0 script Treestump 127,{ + set @obj, 11; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,110,44,0 script Grass 127,{ + set @obj, 12; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,123,115,0 script Island 127,{ + set @obj, 13; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,96,129,0 script Rock 127,{ + set @obj, 14; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,109,147,0 script Treestump 127,{ + set @obj, 15; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,118,98,0 script Waterfall 127,{ + set @obj, 16; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-1.gat,99,110,0 script Rock 127,{ + set @obj, 17; + callfunc "Easter2010Loc_Check4"; + close; +} + +012-3.gat,62,141,0 script Torch 127,{ + set @obj, 18; + callfunc "Easter2010Loc_Check4"; + close; +} + +013-1.gat,135,71,0 script Treestump 127,{ + set @obj, 19; + callfunc "Easter2010Loc_Check4"; + close; +} + +013-1.gat,124,23,0 script Flower 127,{ + set @obj, 20; + callfunc "Easter2010Loc_Check4"; + close; +} + +013-1.gat,128,100,0 script Plant 127,{ + set @obj, 21; + callfunc "Easter2010Loc_Check4"; + close; +} + +013-1.gat,41,88,0 script Rock 127,{ + set @obj, 22; + callfunc "Easter2010Loc_Check4"; + close; +} + +013-1.gat,89,28,0 script Rock 127,{ + set @obj, 23; + callfunc "Easter2010Loc_Check4"; + close; +} + +013-1.gat,131,21,0 script Flowers 127,{ + set @obj, 24; + callfunc "Easter2010Loc_Check4"; + close; +} + +013-1.gat,116,48,0 script Treestump 127,{ + set @obj, 25; + callfunc "Easter2010Loc_Check4"; + close; +} + +013-1.gat,62,70,0 script Tree 127,{ + set @obj, 26; + callfunc "Easter2010Loc_Check4"; + close; +} + +014-1.gat,97,92,0 script Tree 127,{ + set @obj, 27; + callfunc "Easter2010Loc_Check4"; + close; +} + +014-1.gat,102,72,0 script Rock 127,{ + set @obj, 28; + callfunc "Easter2010Loc_Check4"; + close; +} + +014-1.gat,61,85,0 script Stump 127,{ + set @obj, 29; + callfunc "Easter2010Loc_Check4"; + close; +} + +014-1.gat,49,66,0 script Stump 127,{ + set @obj, 30; + callfunc "Easter2010Loc_Check4"; + close; +} + +014-1.gat,80,91,0 script Tree 127,{ + set @obj, 31; + callfunc "Easter2010Loc_Check4"; + close; +} + +018-1.gat,71,98,0 script Tree 127,{ + set @obj, 0; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,63,87,0 script Cattails 127,{ + set @obj, 1; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,62,74,0 script Foundation 127,{ + set @obj, 2; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,65,78,0 script Firepit 127,{ + set @obj, 3; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,94,88,0 script Tree 127,{ + set @obj, 4; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,82,67,0 script Plant 127,{ + set @obj, 5; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,81,59,0 script Barrel 127,{ + set @obj, 6; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,102,73,0 script Tree 127,{ + set @obj, 7; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,135,63,0 script Tree 127,{ + set @obj, 8; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-1.gat,131,93,0 script Tree 127,{ + set @obj, 9; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,57,26,0 script Flower pot 127,{ + set @obj, 10; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,51,20,0 script Shield 127,{ + set @obj, 11; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,36,21,0 script Bag 127,{ + set @obj, 12; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,33,32,0 script Container 127,{ + set @obj, 13; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,25,45,0 script Anvil 127,{ + set @obj, 14; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,23,28,0 script Table 127,{ + set @obj, 15; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,82,19,0 script Bookcase 127,{ + set @obj, 16; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,91,31,0 script Table 127,{ + set @obj, 17; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,79,46,0 script Bed 127,{ + set @obj, 18; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,116,22,0 script Chair 127,{ + set @obj, 19; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,123,19,0 script Mug 127,{ + set @obj, 20; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,118,24,0 script Woodpile 127,{ + set @obj, 21; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,119,40,0 script Teapot 127,{ + set @obj, 22; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-2.gat,125,49,0 script Corner 127,{ + set @obj, 23; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-3.gat,34,22,0 script Skull 127,{ + set @obj, 24; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-3.gat,24,32,0 script Stalagmite 127,{ + set @obj, 25; + callfunc "Easter2010Loc_Check5"; + close; +} + +018-3.gat,65,30,0 script Torch 127,{ + set @obj, 26; + callfunc "Easter2010Loc_Check5"; + close; +} + diff --git a/npc/easter/2010/helper.txt b/npc/easter/2010/helper.txt new file mode 100644 index 00000000..2e37bbd2 --- /dev/null +++ b/npc/easter/2010/helper.txt @@ -0,0 +1,15 @@ +028-1.gat,130,47,0 script Control#Helper 127,{ +end; + +OnBarrierEnable: + set $Easter_2010_Npc_State2, ($Easter_2010_Npc_State2 & ~(E10_BARRIER_MASK << E10_BARRIER_SHIFT)) | (E10_BARRIER_ACTIVE << E10_BARRIER_SHIFT); + end; + +OnBarrierDisable: + set $Easter_2010_Npc_State2, ($Easter_2010_Npc_State2 & ~(E10_BARRIER_MASK << E10_BARRIER_SHIFT)) | (E10_BARRIER_OPEN << E10_BARRIER_SHIFT); + end; + +OnInit: + goto OnBarrierEnable; + +} diff --git a/npc/items/restricted_item.txt b/npc/items/restricted_item.txt index adf7aff5..8016b0a8 100644 --- a/npc/items/restricted_item.txt +++ b/npc/items/restricted_item.txt @@ -8,11 +8,11 @@ function script RestrictedItem { if (!@minLvl) set @minLvl, 60; - if (debug || getgmlevel(0) >= @minLvl) end; // If the active character is staff, do nothing. + if (debug || getgmlevel(0) >= @minLvl) return; // If the active character is staff, do nothing. message strcharinfo(0), "This item repells you with extreme force. It does not seem to be meant for you."; unequipbyid @slotId; - if (getgmlevel(0)) end; + if (getgmlevel(0)) return; gmcommand strcharinfo(0) + " : @wgm Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'."; gmcommand strcharinfo(0) + " : @l Restricted item '" + @itemId + "' used by character '" + strcharinfo(0) + "'."; - end; + return; } diff --git a/npc/scripts.conf b/npc/scripts.conf index 06b7c1d7..a6ce4b41 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -66,3 +66,6 @@ import: npc/_import.txt // Christmas 2009 // npc: npc/xmas/2009/event.txt + +// Easter 2010 +import: npc/easter/2010/_import.txt -- cgit v1.2.3-70-g09d2