diff --git a/scripts/_unpack/377/all.loc b/scripts/_unpack/377/all.loc index 890d932de0..a76ee857e0 100644 --- a/scripts/_unpack/377/all.loc +++ b/scripts/_unpack/377/all.loc @@ -35286,14 +35286,6 @@ multiloc=6,fenk_table multiloc=7,fenk_table multiloc=8,fenk_table -[fenk_door] -name=Door -desc=Looks wooden. Feels wooden. I wonder is it wooden? -model=loc_4487 -hillskew=yes -ambient=20 -op1=Open - [fenk_door_arch] model=loc_4488 hillskew=yes @@ -35311,32 +35303,6 @@ blockwalk=no mirror=yes active=no -[fenk_door_mirror] -name=Door -desc=Looks wooden. Feels wooden. I wonder is it wooden? -model=loc_4487 -hillskew=yes -ambient=20 -mirror=yes -op1=Open - -[fenk_door_open] -name=Door -desc=Looks wooden. Feels wooden. I wonder is it wooden? -model=loc_4487 -hillskew=yes -ambient=20 -op1=Close - -[fenk_door_open_mirror] -name=Door -desc=Looks wooden. Feels wooden. I wonder is it wooden? -model=loc_4487 -hillskew=yes -ambient=20 -mirror=yes -op1=Close - [fenk_skewsteps] model=skewsteps1 recol1s=15855 diff --git a/scripts/_unpack/377/all.varbit b/scripts/_unpack/377/all.varbit index a85a155943..3d0811856b 100644 --- a/scripts/_unpack/377/all.varbit +++ b/scripts/_unpack/377/all.varbit @@ -893,86 +893,6 @@ basevar=varp_396 startbit=17 endbit=17 -[fenk_gardener_directions] -basevar=fenk_flags -startbit=31 -endbit=31 - -[fenk_arms] -basevar=fenk_flags -startbit=0 -endbit=0 - -[fenk_legs] -basevar=fenk_flags -startbit=1 -endbit=1 - -[fenk_torso] -basevar=fenk_flags -startbit=2 -endbit=2 - -[fenk_head] -basevar=fenk_flags -startbit=3 -endbit=3 - -[fenk_needle] -basevar=fenk_flags -startbit=4 -endbit=4 - -[fenk_threads_given] -basevar=fenk_flags -startbit=5 -endbit=7 - -[fenk_coffin] -basevar=fenk_flags -startbit=8 -endbit=8 - -[fenk_spoken_to_gardener] -basevar=fenk_flags -startbit=9 -endbit=9 - -[fenk_conductor_repaired] -basevar=fenk_flags -startbit=10 -endbit=10 - -[fenk_wound_clock] -basevar=fenk_flags -startbit=11 -endbit=11 - -[fenk_counter] -basevar=fenk_flags -startbit=12 -endbit=16 - -[fenk_digresult] -basevar=fenk_flags -startbit=17 -endbit=19 - -[fenk_unlocked_tower] -basevar=fenk_flags -startbit=20 -endbit=20 - -[fenk_unlocked_cavern] -basevar=fenk_flags -startbit=21 -endbit=21 - -[fenk_unlocked_shed] -basevar=fenk_flags -startbit=22 -endbit=22 - [shadeattack] basevar=morttonmulti startbit=4 @@ -983,11 +903,6 @@ basevar=gnome_restaurant_progress startbit=1 endbit=1 -[fenk_read_signpost] -basevar=fenk_flags -startbit=23 -endbit=23 - [varbit_204] basevar=ahoy_varbits_1 startbit=0 diff --git a/scripts/_unpack/377/all.varp b/scripts/_unpack/377/all.varp index 365098ac0f..906cbdcb84 100644 --- a/scripts/_unpack/377/all.varp +++ b/scripts/_unpack/377/all.varp @@ -645,9 +645,6 @@ scope=perm [varp_398] -[fenk_quest] -transmit=yes - [fenk_flags] transmit=yes diff --git a/scripts/general/configs/quest.constant b/scripts/general/configs/quest.constant index e5703ee9b6..ad9019df1b 100644 --- a/scripts/general/configs/quest.constant +++ b/scripts/general/configs/quest.constant @@ -50,6 +50,7 @@ ^priestperil_complete = 60 ^death_complete = 80 ^golem_complete = 10 +^fenk_complete = 8 ^zombiequeen_complete = 15 ^upass_complete = 10 ^sheepherder_complete = 3 @@ -124,3 +125,4 @@ ^death_questpoints = 1 ^troll_love_questpoints = 2 ^golem_questpoints = 1 +^fenk_questpoints = 2 diff --git a/scripts/general/scripts/quests.rs2 b/scripts/general/scripts/quests.rs2 index 7f98655b24..6616f91a81 100644 --- a/scripts/general/scripts/quests.rs2 +++ b/scripts/general/scripts/quests.rs2 @@ -231,6 +231,9 @@ if (testbit(%elemental_workshop_bits, ^elemental_workshop_complete) = ^true) { if (%priestperil >= ^priestperil_complete) { $questpoints = add($questpoints, ^priestperil_questpoints); } +if (%fenk_quest = ^fenk_complete) { + $questpoints = add($questpoints, ^fenk_questpoints); +} if (%druidspirit = ^druidspirit_complete) { $questpoints = add($questpoints, ^druidspirit_questpoints); } @@ -313,10 +316,17 @@ if (testbit(%ibanmulti, ^upass_started_bit) = ^true & %upass ! ^upass_complete) ~send_quest_progress_colour(questlist:legends, %legendsquest, ^legends_complete); ~send_quest_progress_colour(questlist:elemental_workshop, %elemental_workshop_bits, sub(pow(2, ^elemental_workshop_complete), 1)); ~send_quest_progress_colour(questlist:priestperil, %priestperil, ^priestperil_complete); -~send_quest_progress_colour(questlist:druidspirit, %druidspirit, ^druidspirit_complete); -~send_quest_progress_colour(questlist:death, %death_equiproom, ^death_complete); ~send_quest_progress_colour(questlist:troll, %troll_quest, ^troll_complete); ~send_quest_progress_colour(questlist:troll_love, %troll_love, ^troll_love_complete); +if (%fenk_quest > 6) { // exactly like "int script_2193(int arg0)" + ~send_quest_progress_colour(questlist:creatureoffenkenstrain, %fenk_quest, ^fenk_complete); +} else if (%fenk_quest = 0 & %fenk_read_signpost = 0) { + ~send_quest_progress_colour(questlist:creatureoffenkenstrain, 0, ^fenk_complete); +} else { + ~send_quest_progress_colour(questlist:creatureoffenkenstrain, 1, ^fenk_complete); +} +~send_quest_progress_colour(questlist:druidspirit, %druidspirit, ^druidspirit_complete); +~send_quest_progress_colour(questlist:death, %death_equiproom, ^death_complete); ~send_quest_progress_colour(questlist:golem, %golem_a, ^golem_complete); if_settab(questlist, ^tab_quest_journal); diff --git a/scripts/ladders+stairs/scripts/stairs.rs2 b/scripts/ladders+stairs/scripts/stairs.rs2 index 3d43c45dfe..67a34f65bd 100644 --- a/scripts/ladders+stairs/scripts/stairs.rs2 +++ b/scripts/ladders+stairs/scripts/stairs.rs2 @@ -727,16 +727,10 @@ switch_coord (loc_coord) { } [oploc1,fenk_stairs_lv1] -// arrive delay? -switch_coord (loc_coord) { - case default : @unhandled_stairs(loc_coord); -} +p_telejump(movecoord(coord, 0, 1, 4)); [oploc1,fenk_stairs_lv1_top] -// arrive delay? -switch_coord (loc_coord) { - case default : @unhandled_stairs(loc_coord); -} +p_telejump(movecoord(coord, 0, -1, -4)); [oploc1,ahoy_cavern_stairs] // arrive delay? diff --git a/scripts/quests/quest_fenk/configs/fenk.constant b/scripts/quests/quest_fenk/configs/fenk.constant new file mode 100644 index 0000000000..76f3481f77 --- /dev/null +++ b/scripts/quests/quest_fenk/configs/fenk.constant @@ -0,0 +1,15 @@ +// %fenk_quest - Note: stages affects sceneries and npcs. +^fenk_not_started = 0 +^fenk_passed_interview = 1 +^fenk_brough_bodyparts = 2 +^fenk_brought_needle_threads = 3 // ! This value shows a monster on the table, disappears a stage before and after. +^fenk_repaired_lightning_conductor = 4 +^fenk_spoke_again = 5 +^fenk_creature_convince = 6 +// ^fenk_unused_stage_7 = 7 // Unused due to reverse eng, explained in fenk_journal.rs2 +// ^fenk_complete = 8 // in quest.constant // ! This value swaps rologath with fenkenstrain. + +// %fenk_read_signpost +^fenk_not_read_signpost = 0 +^fenk_have_read_signpost = 1 + diff --git a/scripts/quests/quest_fenk/configs/fenk.loc b/scripts/quests/quest_fenk/configs/fenk.loc new file mode 100644 index 0000000000..9dfc1d9407 --- /dev/null +++ b/scripts/quests/quest_fenk/configs/fenk.loc @@ -0,0 +1,42 @@ +[fenk_door] +name=Door +desc=Looks wooden. Feels wooden. I wonder is it wooden? +model=loc_4487 +hillskew=yes +ambient=20 +op1=Open +category=door_left_closed +param=next_loc_stage,fenk_door_open + +[fenk_door_mirror] +name=Door +desc=Looks wooden. Feels wooden. I wonder is it wooden? +model=loc_4487 +hillskew=yes +ambient=20 +mirror=yes +op1=Open +category=door_right_closed +param=next_loc_stage,fenk_door_open_mirror + +[fenk_door_open] +name=Door +desc=Looks wooden. Feels wooden. I wonder is it wooden? +model=loc_4487 +hillskew=yes +ambient=20 +op1=Close +category=door_left_opened +param=next_loc_stage,fenk_door + + +[fenk_door_open_mirror] +name=Door +desc=Looks wooden. Feels wooden. I wonder is it wooden? +model=loc_4487 +hillskew=yes +ambient=20 +mirror=yes +op1=Close +category=door_right_opened +param=next_loc_stage,fenk_door_mirror diff --git a/scripts/quests/quest_fenk/configs/fenk.obj b/scripts/quests/quest_fenk/configs/fenk.obj new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/scripts/quests/quest_fenk/configs/fenk.obj @@ -0,0 +1 @@ + diff --git a/scripts/quests/quest_fenk/configs/fenk.varbit b/scripts/quests/quest_fenk/configs/fenk.varbit new file mode 100644 index 0000000000..8ce2815333 --- /dev/null +++ b/scripts/quests/quest_fenk/configs/fenk.varbit @@ -0,0 +1,84 @@ +[fenk_gardener_directions] +basevar=fenk_flags +startbit=31 +endbit=31 + +[fenk_arms] +basevar=fenk_flags +startbit=0 +endbit=0 + +[fenk_legs] +basevar=fenk_flags +startbit=1 +endbit=1 + +[fenk_torso] +basevar=fenk_flags +startbit=2 +endbit=2 + +[fenk_head] +basevar=fenk_flags +startbit=3 +endbit=3 + +[fenk_needle] +basevar=fenk_flags +startbit=4 +endbit=4 + +[fenk_threads_given] +basevar=fenk_flags +startbit=5 +endbit=7 + +[fenk_coffin] +basevar=fenk_flags +startbit=8 +endbit=8 + +[fenk_spoken_to_gardener] +basevar=fenk_flags +startbit=9 +endbit=9 + +[fenk_conductor_repaired] +basevar=fenk_flags +startbit=10 +endbit=10 + +[fenk_wound_clock] +basevar=fenk_flags +startbit=11 +endbit=11 + +[fenk_counter] +basevar=fenk_flags +startbit=12 +endbit=16 + +[fenk_digresult] +basevar=fenk_flags +startbit=17 +endbit=19 + +[fenk_unlocked_tower] +basevar=fenk_flags +startbit=20 +endbit=20 + +[fenk_unlocked_cavern] +basevar=fenk_flags +startbit=21 +endbit=21 + +[fenk_unlocked_shed] +basevar=fenk_flags +startbit=22 +endbit=22 + +[fenk_read_signpost] +basevar=fenk_flags +startbit=23 +endbit=23 \ No newline at end of file diff --git a/scripts/quests/quest_fenk/configs/fenk.varp b/scripts/quests/quest_fenk/configs/fenk.varp new file mode 100644 index 0000000000..117a668d17 --- /dev/null +++ b/scripts/quests/quest_fenk/configs/fenk.varp @@ -0,0 +1,3 @@ +[fenk_quest] +transmit=yes +scope=perm diff --git a/scripts/quests/quest_fenk/scripts/fenk.rs2 b/scripts/quests/quest_fenk/scripts/fenk.rs2 new file mode 100644 index 0000000000..33434333e2 --- /dev/null +++ b/scripts/quests/quest_fenk/scripts/fenk.rs2 @@ -0,0 +1,577 @@ +// Organized according to first stage needed to interact. + +// TODO + +// ! Stage 0 + +// Signpost +[oploc1,fenk_signpost] +if (%fenk_quest = ^fenk_not_started) { + ~mesbox("The signpost has a note pinned onto it. The note says:|'---- Braindead Butler Wanted ----|Gravedigging skills essential - Hunchback advantageous|See Dr Fenkenstrain at the castle NE of Canifis'"); + %fenk_read_signpost = ^fenk_have_read_signpost; + ~update_questlist; +} else if(%fenk_quest < ^fenk_complete) { // youtu.be/CVq0ooYzxJY // youtu.be/7SeX7jEzLwY + ~mesbox("The signpost has a note pinned onto it. The note says:|'---- Braindead Butler Position Filled ----|****No Further Applicants Please****'"); +} else { + ~mesbox("The signpost has a note pinned onto it. The note says:|'AAARRGGGHHHHH!!!!!'"); +} + +// Bridge +[oploc1,fenk_bridgebroken] +mes("[oploc1,fenk_bridgebroken] - Not Implemented"); +[oploc1,fenk_bridgesurface] +mes("[oploc1,fenk_bridgesurface] - Not Implemented"); +// Supposed to be a zoomed out camera view of a broken bridge but I don't know the exact camera angle. +// https://www.youtube.com/watch?v=iuh-RrRo3vY + +// Clock +[oploc1,fenk_clock] +if(inv_total(inv, fenk_letter) >= 1) { + mes("You wind the old clock."); +} else { + inv_add(inv, fenk_letter, 1); + ~objbox(fenk_letter, "As you wind the old clock a letter falls out. Judging by the thick covering of dust it must have been here for some time.", 250, 0, 0); +} + +// Purely information clock letter +[opheld1,fenk_letter] +mes("You read the letter."); +// This might not be the right scroll, but I have no idea which one it is. +if_settext(inter_276:com_3, "Rologarric,"); +if_settext(inter_276:com_5, "I am writing to you, my brother, to ask for"); +if_settext(inter_276:com_6, "your aid, and to forgive me on behalf of all the"); +if_settext(inter_276:com_7, "poor souls that I have sacrificed to save my own"); +if_settext(inter_276:com_8, "neck. I have no doubt that my own soul lies"); +if_settext(inter_276:com_9, "forfeit, but I would wish to see you once again"); +if_settext(inter_276:com_10, "before I am cast into the eternal fire. You well"); +if_settext(inter_276:com_11, "know the history of our noble ancestors, who"); +if_settext(inter_276:com_12, "have stood against the wave of darkness covering"); +if_settext(inter_276:com_13, "all of Morytania, protecting the inhabitants of this"); +if_settext(inter_276:com_14, "castle by sheer force of personality. I, however,"); +if_settext(inter_276:com_15, "stand lacking in their all too dominating shadow."); +if_settext(inter_276:com_16, "I have been weak, my brother, letting Him rule"); +if_settext(inter_276:com_17, "in my stead."); +if_settext(inter_276:com_18, ""); +if_settext(inter_276:com_19, "You know of whom I speak but dare not name -"); +if_settext(inter_276:com_20, "my 'doctor' of many years, the very same"); +if_settext(inter_276:com_21, "creature you sought to escape ten years ago."); +if_settext(inter_276:com_22, "He advised me that the power in the South was"); +if_settext(inter_276:com_23, "rising, and soon our ancestral home would"); +if_settext(inter_276:com_24, "fall to the growing evil. He advised me to send a"); +if_settext(inter_276:com_25, "gift of tribute to the vampires, to satisfy their"); +if_settext(inter_276:com_26, "hunger for at least a while. I regret to say that"); +if_settext(inter_276:com_27, "I acceded to this request. I ordered a young"); +if_settext(inter_276:com_28, "girl out into the forest to pick mushrooms,"); +if_settext(inter_276:com_29, "knowing that I was sending her to her death, or"); +if_settext(inter_276:com_30, "worse, her undeath."); +if_settext(inter_276:com_31, ""); +if_settext(inter_276:com_32, "Of course, soon after my advisor told me that "); +if_settext(inter_276:com_33, "the vampires were again restive, and to send"); +if_settext(inter_276:com_34, "another 'gift' And of course, this I did, to"); +if_settext(inter_276:com_35, "ensure the safety of everyone in the castle."); +if_settext(inter_276:com_36, ""); +if_settext(inter_276:com_37, "But a vampire's hunger can never be sated."); +if_settext(inter_276:com_38, "Every innocent soul I have sent into the Forest"); +if_settext(inter_276:com_39, "to their doom both strengthens their power and"); +if_settext(inter_276:com_40, "increases their hunger."); +if_settext(inter_276:com_41, ""); +if_settext(inter_276:com_42, "He knows this. I look into his eyes and see"); +if_settext(inter_276:com_43, "amusement. In his eyes I see the truth - that he"); +if_settext(inter_276:com_44, "must have struck a deal with them some time"); +if_settext(inter_276:com_45, "ago. He sold my people to them in exchange"); +if_settext(inter_276:com_46, "for... this castle."); +if_settext(inter_276:com_47, ""); +if_settext(inter_276:com_48, "I have sent them all to their doom, and now I"); +if_settext(inter_276:com_49, "fear my own."); +if_settext(inter_276:com_50, ""); +if_settext(inter_276:com_51, "Your brother,"); +if_settext(inter_276:com_52, ""); +if_settext(inter_276:com_53, "Rologarth,"); +if_settext(inter_276:com_54, ""); +if_settext(inter_276:com_55, "15th Lord of the North Coast"); +if_settext(inter_276:com_56, ""); +if_settext(inter_276:com_57, ""); +if_settext(inter_276:com_58, ""); +if_settext(inter_276:com_59, ""); +if_settext(inter_276:com_60, ""); +if_settext(inter_276:com_61, ""); +if_settext(inter_276:com_62, ""); +if_settext(inter_276:com_63, ""); +if_settext(inter_276:com_64, ""); +if_settext(inter_276:com_65, ""); +if_settext(inter_276:com_66, ""); +if_settext(inter_276:com_67, ""); +if_settext(inter_276:com_68, ""); +if_settext(inter_276:com_69, ""); +if_settext(inter_276:com_70, ""); +if_settext(inter_276:com_71, ""); +if_settext(inter_276:com_72, ""); +if_settext(inter_276:com_73, ""); +if_settext(inter_276:com_74, ""); +if_settext(inter_276:com_75, ""); +if_settext(inter_276:com_76, ""); +if_settext(inter_276:com_77, ""); +if_settext(inter_276:com_78, ""); +if_settext(inter_276:com_79, ""); +if_settext(inter_276:com_80, ""); +if_settext(inter_276:com_81, ""); +if_settext(inter_276:com_82, ""); +if_settext(inter_276:com_83, ""); +if_settext(inter_276:com_84, ""); +if_settext(inter_276:com_85, ""); +if_settext(inter_276:com_86, ""); +if_settext(inter_276:com_87, ""); +if_settext(inter_276:com_88, ""); +if_settext(inter_276:com_89, ""); +if_settext(inter_276:com_90, ""); +if_settext(inter_276:com_91, ""); +if_settext(inter_276:com_92, ""); +if_settext(inter_276:com_93, ""); +if_settext(inter_276:com_94, ""); +if_settext(inter_276:com_95, ""); +if_settext(inter_276:com_96, ""); +if_settext(inter_276:com_97, ""); +if_settext(inter_276:com_98, ""); +if_settext(inter_276:com_99, ""); +if_settext(inter_276:com_100, ""); +if_settext(inter_276:com_101, ""); +if_settext(inter_276:com_102, ""); +if_settext(inter_276:com_103, ""); +if_settext(inter_276:com_104, ""); +if_openmain(inter_276); + +// ! Stage 1 + +// Bookcases - for star amulet +[oploc1,fenk_bookcase] +if (loc_coord = 1_55_55_22_38) { + @multi4_header( + "1001 Ways To Eat Fried Gizzards", fenk_book1, + "Practical Gardening For The Headless", fenk_book2, + "Human Taxidermy for Nincompoops", fenk_book3, + "The Joy of Gravedigging", fenk_star_book_west, + "Which book would you like to read?" + ); +} else if (loc_coord = 1_55_55_35_38) { + @multi4_header( + "Men are from Morytania, Women are from Lumbridge", fenk_book4, + "Chimney Sweeping on a Budget", fenk_book5, + "Handy Maggot Avoidance Techniques", fenk_star_book_east, + "My Family and Other Zombies", fenk_book6, + "Which book would you like to read?" + ); +} + +[label,fenk_star_book_east] +~objbox(fenk_journal, "As you pull the book a hidden latch springs into place, and the bookcase swings open, revealing a secret compartment.", 250, 0, 0); +if(inv_total(inv, fenk_obsidian_amulet) >= 1) { + ~mesbox("The secret compartment is empty."); +} else { + inv_add(inv, fenk_obsidian_amulet, 1); + ~objbox(fenk_obsidian_amulet, "You find a obsidian amulet in the secret compartment.", 250, 0, 0); +} + +[label,fenk_star_book_west] +// This book is a mesbox instead of an objbox as I assume by accident: https://www.youtube.com/watch?v=CVq0ooYzxJY +~mesbox("As you pull the book a hidden latch springs into place, and the bookcase swings open, revealing a secret compartment."); +if(inv_total(inv, fenk_marble_amulet) >= 1) { + ~mesbox("The secret compartment is empty."); +} else { + inv_add(inv, fenk_marble_amulet, 1); + ~objbox(fenk_marble_amulet, "You find a marble amulet in the secret compartment.", 250, 0, 0); +} + +[label,fenk_book1] +~objbox(fenk_journal, "This book leaves you contemplating vegetarianism.", 250, 0, 0); + +[label,fenk_book2] +~objbox(fenk_journal, "This book has some very enlightening points to make, but you are at a loss to know how anyone without a head could possibly read it.", 250, 0, 0); + +[label,fenk_book3] +~objbox(fenk_journal, "This book seems to have been read hundreds of times, and has scribbles and formulae on every page. One such scribble says None good enough - have to lock them in the caverns...", 250, 0, 0); + +[label,fenk_book4] +~objbox(fenk_journal, "You discover some fascinating insights into the mind of the kind.", 250, 0, 0); + +[label,fenk_book5] +@book_flip_page(0, 0, 0, chimney_sweeping_book); + +[label,fenk_book6] +~objbox(fenk_journal, "The book is appallingly dull.", 250, 0, 0); + +[proc,chimney_sweeping_book] +switch_int (%book_page) { + case 0 : ~book("Chimney Sweeping on a Budget", "Page 26|that sometimes a sweep|may find themselves|brushless and without the|funds to purchase the|one tool that is most|essential to their trade.|What is a chimney sweep|without his or her brush?|In this kind of situation|any normal long-handled|brush might be a suitable|replacement, although|when attaching extensions|to the handle make sure|to use something sturdy|like wire, otherwise a|sweep may find|themselves losing their|brush and livelyhood to|the forces of gravity"); +} + +// Join amulet together +[opheldu,fenk_marble_amulet] +if(last_useitem = fenk_obsidian_amulet) { + inv_del(inv, fenk_marble_amulet, 1); + inv_del(inv, fenk_obsidian_amulet, 1); + inv_add(inv, fenk_star_amulet, 1); + ~objbox(fenk_star_amulet, "The marble and obsidian amulets snap together tightly to form a six-pointed amulet.", 250, 0, 0); +} + +[oplocu,fenk_coffin] +if (last_useitem = fenk_star_amulet) { + inv_delslot(inv, last_useslot); + %fenk_coffin = 1; + ~objbox(fenk_star_amulet, "The star amulet fits exactly into the depression on the coffin lid.", 250, 0, 0); + return; +} +~displaymessage(^dm_default); + +// Coffin Push - to access the expeirments area and the three graves on the island. +[oploc1,fenk_coffin] +if (loc_coord = 0_55_55_58_7 & %fenk_coffin = 1) { + loc_anim(fenk_capstone_moves); + p_delay(2); + p_teleport(0_55_155_57_7); + return; +} +if (loc_coord = 0_54_55_49_51) { + loc_anim(fenk_capstone_moves); + p_delay(2); + p_teleport(0_54_155_48_49); + return; +} +mes("The coffin is incredibly heavy, and does not budge."); + +// Coffin Examine - Specifically for the star amulet. +[oploc2,fenk_coffin] +if (loc_coord = 0_55_55_58_7) { + if (%fenk_coffin = 1) { + // https://www.youtube.com/watch?v=CVq0ooYzxJY + mes("The memorial stone holds a star amulet in place on its lid."); + } else { + mes("You find a depression in the memorial stone in the shape of a six-pointed star."); + } + return; +} +mes("You find nothing remarkable about the memorial stone."); + +// Experiment Attack - limit after getting the key or unlocking the cavern. +[opnpc2,fenk_experiment_1] +if(%fenk_unlocked_cavern = 1 | inv_total(inv, fenk_mausoleum_key) >= 1) { + ~mesbox("You don't have the heart to kill the poor creature again."); + return; +} +@player_combat_start; + +// Experiments Gate - fences off the back area until you kill an experiment with a key +[oploc1,fenk_mausoleum_door] +if(inv_total(inv, fenk_mausoleum_key) >= 1) { + inv_del(inv, fenk_mausoleum_key, 1); + %fenk_unlocked_cavern = 1; +} +if (%fenk_unlocked_cavern = 1) { + // You remove a key, but even if you didn't have the key, you could still walk through. + // https://www.youtube.com/watch?v=GdQtnkgbMPY + ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); +} else { + // https://www.youtube.com/watch?v=zmvgzuA31S0 + mes("The door is locked."); +} + + +// Read grave - for wooden looking poor graves in center of forest +[oploc1,fenk_grave_poor] +mes("The grave says:"); // s57ElnRNhmU +switch_coord (loc_coord) { + case 0_56_54_35_13 : mes(" 'Here lies Anton Hayes - REST IN PEACE'"); + case 0_55_54_22_30 : mes(" 'Here lies Callum Elding - REST IN PEACE'"); + case 0_56_54_1_41 : mes(" 'Here lies Domin O'Raleigh - REST IN PEACE'"); + case 0_56_54_24_35 : mes(" 'Here lies Ed Lestwit - REST IN PEACE'"); + case 0_56_54_4_16 : mes(" 'Here lies Elena Frey - REST IN PEACE'"); + case 0_56_54_9_53 : mes(" 'Here lies Eryn Treforest - REST IN PEACE'"); + case 0_56_54_10_35 : mes(" 'Here lies Isla Skye - REST IN PEACE'"); + case 0_56_54_12_23 : mes(" 'Here lies Jayna Harrow - REST IN PEACE'"); + case 0_56_54_20_10 : mes(" 'Here lies Jayne Corbo - REST IN PEACE'"); + case 0_56_54_24_10 : mes(" 'Here lies Kandik Kludge - REST IN PEACE'"); + case 0_56_54_32_22 : mes(" 'Here lies Korvic Frey - REST IN PEACE'"); + case 0_56_54_35_13 : mes(" 'Here lies Marabella Kludge - REST IN PEACE'"); + case 0_56_54_42_39 : mes(" 'Here lies Marcus Harrow - REST IN PEACE'"); + case 0_56_54_45_27 : mes(" 'Here lies Petrik Corbo - REST IN PEACE'"); + case 0_56_54_47_20 : mes(" 'Here lies Serra Alcanthric - REST IN PEACE'"); + case 0_56_54_47_44 : mes(" 'Here lies Toran Alcanthric - REST IN PEACE'"); + // case 0_55_55_52_7 : mes(" 'Here lies Unknown - REST IN PEACE'"); + // case 0_55_55_56_6 : mes(" 'Here lies Unknown - REST IN PEACE'"); + case 0_56_54_55_14 : mes(" 'Here lies Lady Rolobrae - REST IN PEACE'"); + case 0_56_54_50_47 : mes(" 'Here lies Lord Rologarth - REST IN PEACE'"); + case default : mes(" 'Here lies Unknown - REST IN PEACE'"); +} + +// Dig grave - for wooden looking poor graves in center of forest, one contains the empty head +[oploc2,fenk_grave_poor] +if (inv_total(inv, spade) = 0) { + ~displaymessage(^dm_farming_spade); + return; +} +mes("You start digging..."); +anim(human_dig_long, 0); +p_delay(2); +switch_coord (loc_coord) { + case 0_56_54_24_35 : + if (inv_total(inv, fenk_head_empty) = 0 & inv_total(inv, fenk_head_full) = 0) { + inv_add(inv, fenk_head_empty, 1); + ~objbox(fenk_head_empty, "...and you unearth a decapitated head.", 250, 0, 0); + } else { + mes("...but the grave is empty."); + } + case default : + mes("...but the grave is empty."); +} +anim(null, 0); // stop digging animation + +// 3 graves in mausoleum island (after going through experiments) +[oploc1,fenk_grave] +mes("The grave says:"); // s57ElnRNhmU +switch_coord (loc_coord) { + case 0_54_55_46_56 : mes(" 'Here lies Rolomere, 14th Lord of the North Coast - REST IN PEACE'"); + case 0_54_55_48_57 : mes(" 'Here lies Rolovanne, 13th Lord of the North Coast - REST IN PEACE'"); + case 0_54_55_50_56 : mes(" 'Here lies Rologray, 12th Lord of the North Coast - REST IN PEACE'"); + case default : mes(" 'Here lies Unknown - REST IN PEACE'"); +} + +// Dig grave - for nice looking rich graves in mausoleum island (torso, arms, legs) +[oploc2,fenk_grave] +if (inv_total(inv, spade) = 0) { + ~displaymessage(^dm_farming_spade); + return; +} +mes("You start digging..."); +anim(human_dig_long, 0); +p_delay(2); +switch_coord (loc_coord) { + case 0_54_55_46_56 : + if (inv_total(inv, fenk_torso) = 0) { + inv_add(inv, fenk_torso, 1); + ~objbox(fenk_torso, "...and you unearth a torso.", 250, 0, 0); + } else { + mes("...but the grave is empty."); + } + case 0_54_55_48_57 : + if (inv_total(inv, fenk_arms) = 0) { + inv_add(inv, fenk_arms, 1); + ~objbox(fenk_arms, "...and you unearth a pair of arms.", 250, 0, 0); + } else { + mes("...but the grave is empty."); + } + case 0_54_55_50_56 : + if (inv_total(inv, fenk_legs) = 0) { + inv_add(inv, fenk_legs, 1); + ~objbox(fenk_legs, "...and you unearth a pair of legs.", 250, 0, 0); + } else { + mes("...but the grave is empty."); + } + case default : + mes("...but the grave is empty."); +} +anim(null, 0); // stop digging animation + +// Stuff empty head with brain. +[opheldu,fenk_brain] +if(last_useitem = fenk_head_empty) { + inv_del(inv, fenk_brain, 1); + inv_del(inv, fenk_head_empty, 1); + inv_add(inv, fenk_head_full, 1); + ~objbox(fenk_head_full, "You squeeze the pickled brain into the decapitated head.", 250, 0, 0); +} + +// ! Stage 3 + +// Fenk Cane Pile +[oploc1,fenk_canepile] +inv_add(inv, fenk_cane, 1); +mes("You take a garden cane from the pile."); + +// Fenk Shed Door +[oploc1,fenk_shed_door] +if (%fenk_unlocked_shed = 1) { + ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); +} else { + if(inv_total(inv, fenk_shed_key) >= 1) { + inv_del(inv, fenk_shed_key, 1); + %fenk_unlocked_shed = 1; + ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); + return; + } + mes("The door is locked."); +} + +[oploc1,fenk_broomcupboard] +p_arrivedelay; +anim(human_openchest,0); +sound_synth(cupboard_open, 0, 0); +p_delay(0); +loc_change(fenk_broomcupboard_open, 300); + +[oploc3,fenk_broomcupboard_open] +p_arrivedelay; +anim(human_closechest, 0); +sound_synth(cupboard_close, 0, 0); +p_delay(0); +loc_change(fenk_broomcupboard, 300); + +[oploc2,fenk_broomcupboard_open] +if(inv_total(inv, fenk_brush0) = 0) { + inv_add(inv, fenk_brush0, 1); + ~objbox(fenk_brush0, "You find a garden brush in the cupboard.", 250, 0, 0); +} else { + ~mesbox("The cupboard is empty."); +} + + +// Stuff empty head with brain. +[opheldu,fenk_brush0] +if(last_useitem = fenk_cane) { + inv_del(inv, fenk_brush0, 1); + inv_del(inv, fenk_cane, 1); + inv_add(inv, fenk_brush1, 1); + mes("You attach the cane to the brush."); +} +[opheldu,fenk_brush1] +if(last_useitem = fenk_cane) { + inv_del(inv, fenk_brush1, 1); + inv_del(inv, fenk_cane, 1); + inv_add(inv, fenk_brush2, 1); + mes("You attach the cane to the brush."); +} + +[opheldu,fenk_brush2] +if(last_useitem = fenk_cane) { + inv_del(inv, fenk_brush2, 1); + inv_del(inv, fenk_cane, 1); + inv_add(inv, fenk_brush3, 1); + mes("You attach the cane to the brush."); +} + +[opheldu,fenk_brush3] +if(last_useitem = fenk_cane) { + mes("The brush is too long to attach any more canes."); +} + +// Yes the animation authentically happens on the wall if you clean out the left or right column. Its dumb, I know. +[oplocu,fenk_fireplace_left] ~extended_brush; +[oplocu,fenk_fireplace] ~extended_brush; +[oplocu,fenk_fireplace_right] ~extended_brush; +[proc,extended_brush]() +if(last_useitem = fenk_brush3) { + p_arrivedelay; + anim(fenk_human_poke, 0); + sound_synth(brushing, 0, 0); + p_delay(3); + mes("You give the chimney a jolly good clean out."); + if(inv_total(inv, fenk_lightning_mould) = 0 & loc_coord = 1_55_55_24_35) { + inv_add(inv, fenk_lightning_mould, 1); + ~objbox(fenk_lightning_mould, "A lightning conductor mould falls down out of the chimney.", 250, 0, 0); + } +} + +[oploc1,fenk_conductor_broken] +if (%fenk_quest >= ^fenk_repaired_lightning_conductor) { + mes("The lightning conductor is now beyond repair."); // https://youtu.be/idakVqwlf-U + return; +} +if (%fenk_quest = ^fenk_brought_needle_threads & inv_total(inv, fenk_conductor) = 1) { + inv_del(inv, fenk_conductor, 1); + loc_change(fenk_conductor_repaired, 3); + loc_anim(fenk_lightning); + ~mesbox("You repair the lightning conductor not one moment too soon - a tremendous bold of lightning melts the new lightning conductor, and power blazes throughtout the castle, if only briefly."); + mes("At some point the lightning conductor has broken, rendering it useless."); + %fenk_conductor_repaired = 1; + %fenk_quest = ^fenk_repaired_lightning_conductor; + return; +} +mes("You need to repair it with a conductor."); + + +// Fenk Door - Unfortunately a double door on the second floor shares the same with the ground floor. +[oploc1,fenk_door] +if (coordy(loc_coord) = 1) { + if (%fenk_quest >= ^fenk_brought_needle_threads) { + ~open_and_close_double_door2(~check_axis(coord, loc_coord, loc_angle), ^left, door_open); + // no idea why the mirrored door doesn't open with it. + } else { + mes("The door to the lightning conductor is locked."); // s57ElnRNhmU + } +} else { + ~open_double_doors_left(500, door_right_closed, loc_param(open_sound)); +} + +[oploc1,fenk_door_mirror] +if (coordy(loc_coord) = 1) { + if (%fenk_quest >= ^fenk_brought_needle_threads) { + ~open_and_close_double_door2(~check_axis(coord, loc_coord, loc_angle), ^right, door_open); + // no idea why the mirrored door doesn't open with it. + } else { + mes("The door to the lightning conductor is locked."); // s57ElnRNhmU + } +} else { + ~open_double_doors_right(500, door_left_closed, loc_param(open_sound)); +} + +[oploc1,fenk_door_open] +~close_double_doors_left(500, door_right_opened, loc_param(close_sound)); + +[oploc1,fenk_door_open_mirror] +~close_double_doors_right(500, door_left_opened, loc_param(close_sound)); + + + +// Tower Door +[oploc1,fenk_tower_door] +// You can click on the door and go through if you have the key +if (%fenk_unlocked_tower = 1) { + ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); +} else { + if(inv_total(inv, fenk_tower_key) >= 1) { + inv_del(inv, fenk_tower_key, 1); + %fenk_unlocked_tower = 1; + ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); + return; + } + mes("The door is locked."); // s57ElnRNhmU +} + + +[opnpcu,fenk_fenkenstrain] + +[opobj3,fenk_brain] +if (distance(0_54_54_36_18, obj_coord) = 0 & npc_find(coord, werewolfinnkeeper, 20, 0) = true) { + if (%fenk_quest = ^fenk_not_started) { + ~chatnpc("Hey! Don't touch that."); + } else { + if (inv_total(inv, fenk_brain) = 0) { + ~chatnpc("You're interested in our speciality, I see. Would you like to buy some?"); + ~chatplayer("What exactly is in the jar?"); + @buy_pickled_brain; + } else { + ~chatnpc("You can leave that alone, my friend. I've already sold you one of your own - eat that. I can't afford to give away freebies in this business!"); + } + } +} else { + @pickup_obj; +} + +[label,buy_pickled_brain] +~chatnpc("Pickled brain, my friend. Only 50 gold to you."); +~chatplayer("Err... pickled brain from what animal?"); +~chatnpc("Animal? Don't be disgusting, man! No, this a human brain - only the best for my customers."); +if(inv_total(inv, coins) < 50) { + ~chatplayer("That sounds very nice, but I'm afraid I don't have enough gold at the moment."); +} else { + @multi2("Yes.", ill_buy_one, "No.", im_not_hungry); +} + +[label,ill_buy_one] +~chatplayer("Player: I'll buy one, please."); +if(inv_total(inv, coins) >= 50) { + inv_del(inv, coins, 50); + inv_add(inv, fenk_brain, 1); + ~chatnpc("A very wise choice, . Don't eat it all at once, savour every morsel - that's my advice to you."); +} + +[label,im_not_hungry] +~chatplayer("I'm afraid I'm not really hungry at the moment."); \ No newline at end of file diff --git a/scripts/quests/quest_fenk/scripts/fenk_books.rs2 b/scripts/quests/quest_fenk/scripts/fenk_books.rs2 new file mode 100644 index 0000000000..3344744674 --- /dev/null +++ b/scripts/quests/quest_fenk/scripts/fenk_books.rs2 @@ -0,0 +1,8 @@ + +[proc,chimney_book] +switch_int (%book_page) { + case 0 : ~book( + "Chimney Sweeping on a Budget", + "Page 26|that sometimes a sweep|may find themselves|brushless and without the|funds to purchase the|one tool that is most|essential to their trade.|What is a chimney sweep|without his or her brush?|In this kind of situation|any normal long-handled" + ); +} \ No newline at end of file diff --git a/scripts/quests/quest_fenk/scripts/fenk_creature.rs2 b/scripts/quests/quest_fenk/scripts/fenk_creature.rs2 new file mode 100644 index 0000000000..223a4d2efb --- /dev/null +++ b/scripts/quests/quest_fenk/scripts/fenk_creature.rs2 @@ -0,0 +1,45 @@ +[opnpc1,fenk_creature] +switch_int(%fenk_quest) { + case ^fenk_spoke_again : + @creature_first_meet; + case ^fenk_creature_convince : + @creature_how_to_stop; +} + +[label,creature_first_meet] +~chatplayer("I am commanded to destroy you, creature!"); +~chatnpc("Oh that's *hic* not very *hic* nice ..."); +~chatplayer("Are you feeling ok?"); +~chatnpc("Abso *hic* lutely. Never *buuurrp* better."); +~chatplayer("You don't look very dangerous."); +~chatnpc("How *hic* do I look?"); +~chatplayer("You really don't know, do you? Have a look for yourself."); +~mesbox("The creature stumbles over towards the mirror, focuses upon his reflection and..."); +~chatnpc("AAAAARRGGGGHHHH!"); +~mesbox("The creature becomes instantly sober, horror all too evident in his undead eyes."); +~chatplayer("I'm sorry. I suppose I'm partly to blame for this."); +~chatnpc("No - it was him I wager - Fenkenstrain - wasn't it? He's brought me back to life!"); +~chatplayer("Who are - were - you?"); +~chatnpc("I was Rologarth, Lord of the North Coast - this castle was once mine. Fenkenstrain was the castle doctor."); +~chatplayer("So the castle wasn't really abandoned when he found it?"); +~chatnpc("Is that what he told you? No, no, this castle was once full of people and life. Fenkenstrain advised me to sell them to the vampyres, which - I am sad to say - I did."); +~chatplayer("I found your brain in a jar in Canifis, so he must have sold you too."); +~chatnpc("Of that I will not speak. There lie memories that should rest with the dead, the living unable to bear them."); +~chatplayer("That's it - I'm leaving this dreadful place, whether I get paid or not. Is there anything I can do for you before I leave?"); +~chatnpc("Only one - please stop Fenkenstrain from carrying on his experiments, once and for all, so that no other poor soul has to endure suffering such as that of my people and I."); +%fenk_quest = ^fenk_creature_convince; + +[label,creature_how_to_stop] +~chatplayer("Do you know how I can stop Fenkenstrain's experiments?"); +~chatnpc("Take the Ring of Charos from him."); +~chatplayer("What is this ring?"); +~chatnpc("It was my birthright, passed down to me through the ages, its origin forgotten."); +~chatnpc("The Ring of Charos has many powers, but Fenkenstrain has bent them to his down evil purposes. Without the power of the ring, he will not be able to raise the dead from their sleep."); +~chatnpc("It has one other, extremely important use - it confuses the werewolves' senses, making them believe that they smell one of their own kind. Without the ring, Fenkenstrain will be at their mercy."); + +[opnpc1,fenk_creature_released] +~chatnpc("How goes it, friend?"); +~chatplayer("I stole the Ring of Charos from Fenkenstrain."); +~chatnpc("I saw him climb up into the Tower to hide. It doesn't matter - soon the werewolves will come for him, and his experiments will be forever ceased."); +~chatplayer("Do you want the ring back? It is yours after all."); +~chatnpc("No, you keep it, my friend. Werewolves hunger for the scent of live flesh - I have no need for the ring. I have my castle back, if not my soul."); diff --git a/scripts/quests/quest_fenk/scripts/fenk_experiment_1.rs2 b/scripts/quests/quest_fenk/scripts/fenk_experiment_1.rs2 new file mode 100644 index 0000000000..dd95b344be --- /dev/null +++ b/scripts/quests/quest_fenk/scripts/fenk_experiment_1.rs2 @@ -0,0 +1,13 @@ +[ai_queue3,fenk_experiment_1] +gosub(npc_death); +if (npc_findhero = ^false) { + return; +} + +// Default drop from config. +obj_add(npc_coord, npc_param(death_drop), 1, ^lootdrop_duration); + +// Key drop +if(%fenk_unlocked_cavern = 0 & inv_total(inv, fenk_mausoleum_key) = 0) { + obj_add(npc_coord, fenk_mausoleum_key, 1, ^lootdrop_duration); +} diff --git a/scripts/quests/quest_fenk/scripts/fenk_fenkenstrain.rs2 b/scripts/quests/quest_fenk/scripts/fenk_fenkenstrain.rs2 new file mode 100644 index 0000000000..ae2489a768 --- /dev/null +++ b/scripts/quests/quest_fenk/scripts/fenk_fenkenstrain.rs2 @@ -0,0 +1,251 @@ +[opnpc1,fenk_fenkenstrain] +switch_int(%fenk_quest) { + case ^fenk_not_started : + // If you did not read the signpost. + ~chatnpc("Have you come to apply for the job?"); + if (%fenk_read_signpost = 1) { + @multi2("Yes.", fenkenstrain_start, "No.", fenkenstrain_end); + } else { + @multi3("Yes.", fenkenstrain_start, "No.", fenkenstrain_end, "What job?", fenkenstrain_what_job); + } + case ^fenk_passed_interview : + if ( + (%fenk_head = 0 & inv_total(inv, fenk_head_full) >= 1) | + (%fenk_torso = 0 & inv_total(inv, fenk_torso) >= 1) | + (%fenk_arms = 0 & inv_total(inv, fenk_arms) >= 1) | + (%fenk_legs = 0 & inv_total(inv, fenk_legs) >= 1) + ) { + @fenkenstrain_have_bodyparts; + } else { + @fenkenstrain_no_bodyparts; + } + case ^fenk_brough_bodyparts : + @fenkenstrain_needle_and_threads; + case ^fenk_brought_needle_threads : + @fenkenstrain_how_to_repair_conductor; + case ^fenk_repaired_lightning_conductor : + @fenkenstrain_repaired_conductor; + case ^fenk_spoke_again : + @fenkenstrain_spoke_again; + case ^fenk_creature_convince : + @fenkenstrain_creature_convince; +} + +[opnpc3,fenk_fenkenstrain] +if (%fenk_quest = ^fenk_creature_convince & stat_base(thieving) >= 25) { + %fenk_quest = ^fenk_complete; + ~update_questlist; + inv_add(inv, ring_of_charos, 1); + stat_advance(thieving, 1000); + ~send_quest_complete(questlist:creatureoffenkenstrain, ring_of_charos, 250, ^fenk_questpoints, "You have completed Creature of Fenkenstrain!", "Ring of Charos|1000 Thieving XP"); + // Complete Quest +} else { + ~chatnpc("What do you think you're doing???"); +} + +// fenk_started + +[label,fenkenstrain_what_job] +~chatplayer("What job do you mean, sir?"); +~chatnpc("Oh, doesn't anybody read signposts anymore???"); +~chatplayer("What signpost?"); +~chatnpc("The signpost in the village nearby! Oh never mind."); +~chatnpc("I need a new butler. Would you like to apply?"); +@multi2("Yes.", fenkenstrain_start, "No.", fenkenstrain_end); + +[label,fenkenstrain_end] +~chatplayer("No thanks, I wouldn't work here if you paid me."); +~chatnpc("Charming."); + +[label,fenkenstrain_start] +~chatplayer("Yes, if it pays well."); +~chatnpc("I'll have to ask you some questions first."); +~chatplayer("Okay..."); +~chatnpc("How would you describe yourself in one word?"); +@multi4("Stunning", fenkenstrain_failed, "Awe-inspiring", fenkenstrain_failed, "Breathtaking", fenkenstrain_failed, "Braindead", fenkenstrain_second); + +[label,fenkenstrain_second] +~chatnpc("Mmmm, I see."); +~chatnpc("Just one more question. What would you say is your greatest skill?"); +@multi4("Combat", fenkenstrain_failed, "Magic", fenkenstrain_failed, "Cooking", fenkenstrain_failed, "Grave-digging", fenkenstrain_passed); + +[label,fenkenstrain_failed] +~chatnpc("Looks like you're not the for the job."); + +[label,fenkenstrain_passed] +~chatnpc("Mmmm, I see."); +%fenk_quest = ^fenk_passed_interview; +~chatnpc("Looks like you're just the for the job! Welcome aboard!"); +~chatplayer("Is there anything you'd like me to do for you, sir?"); +~chatnpc("Yes, there is. You're highly skilled at grave-digging, yes?"); +~chatplayer("Err...yes, that's what I said."); +~chatnpc("Excellent. Now listen carefully."); +~chatnpc("I need you to find some...stuff...for me."); +~chatplayer("Stuff?"); +~chatnpc("That's what I said...stuff."); +~chatplayer("What kind of stuff?"); +~chatnpc("Well...dead stuff."); +~chatplayer("Go on..."); +~chatnpc("I need you to get me enough dead body parts for me to stitch together a complete body, which I plan to bring to life."); +~chatplayer("Right...okay...if you insist."); + +// fenk_passed_interview + +[label,fenkenstrain_no_bodyparts] +@multi5( + "Do you know where I could find body parts?", fenkenstrain_where_bodyparts, + "Remind me what you want me to do.", fenkenstrain_remind_me, + "Why are you trying to make this creature?", fenkenstrain_why_creature, + "Will this creature put me out of a job?", fenkenstrain_out_of_job, + "I must get back to work, sir.", fenkenstrain_get_back_to_work +); + +[label,fenkenstrain_have_bodyparts] +@multi5( + "I have some body parts for you.", fenkenstrain_give_bodyparts, + "Remind me what you want me to do.", fenkenstrain_remind_me, + "Why are you trying to make this creature?", fenkenstrain_why_creature, + "Will this creature put me out of a job?", fenkenstrain_out_of_job, + "I must get back to work, sir.", fenkenstrain_get_back_to_work +); + +[label,fenkenstrain_where_bodyparts] +~chatplayer("Do you know where I could find body parts?"); +~chatnpc("The soil of Morytania is unique in its ability to preserve the bodies of the dead, which is one reason why I have chosen to carry out my experiments here."); +~chatnpc("I recommend digging up some graves in the local area. To the south-east you will find the Haunted Woods; I believe there are many graves there."); +~chatnpc("There is also a mausoleum on an island west of this castle. I expect the bodies that are buried there to be extremely well preserved, as they were wealthy in life."); + +[label,fenkenstrain_remind_me] +~chatplayer("What do you want me to do, again?"); +~chatnpc("I need you to get me enough dead body parts for me to stitch together a complete body, which I plan to bring to life."); +~chatplayer("Right...okay...if you insist."); + +[label,fenkenstrain_why_creature] +~chatplayer("Why do you want to make a creature?"); +~chatnpc("I came to the land of Morytania many years ago, to find a safe sanctuary for my experiments. This abandoned castle suited my purposes exactly."); +~chatplayer("What were you experimenting in?"); +~chatnpc("Oh, perfectly innocent experiments - for the good of mankind."); +~chatplayer("Then why did you need to come to Morytania?"); +~chatnpc("Enough questions, now. Get back to your work."); + +[label,fenkenstrain_out_of_job] +~chatplayer("Will this creature put me out of a job?"); +~chatnpc("No, my friend. I have a very special purpose in mind for this creature."); + +[label,fenkenstrain_get_back_to_work] +~chatplayer("I must get back to work, sir."); + +[label,fenkenstrain_give_bodyparts] +~chatplayer("I have some body parts for you."); +if (%fenk_head = 0 & inv_total(inv, fenk_head_full) >= 1) { + inv_del(inv, fenk_head_full, 1); + %fenk_head = 1; + ~chatnpc("Fantastic, you've brought me a head."); +} +if (%fenk_torso = 0 & inv_total(inv, fenk_torso) >= 1) { + inv_del(inv, fenk_torso, 1); + %fenk_torso = 1; + ~chatnpc("Splendid, you've brought me a torso."); +} +if (%fenk_arms = 0 & inv_total(inv, fenk_arms) >= 1) { + inv_del(inv, fenk_arms, 1); + %fenk_arms = 1; + ~chatnpc("Great, you've brought me some arms."); +} +if (%fenk_legs = 0 & inv_total(inv, fenk_legs) >= 1) { + inv_del(inv, fenk_legs, 1); + %fenk_legs = 1; + ~chatnpc("Excellent, you've brought me some legs."); +} +if (%fenk_head = 1 & %fenk_torso = 1 & %fenk_arms = 1 & %fenk_legs = 1) { + %fenk_quest = ^fenk_brough_bodyparts; + ~chatnpc("Superb!! Those are all the parts I need. Now to sew them together ..."); + ~chatnpc("Go and get me a needle, and I'll need 5 lots of thread."); +} + +// fenk_brough_bodyparts + +[label,fenkenstrain_needle_and_threads] +if (inv_total(inv, needle) = 0 & inv_total(inv, thread) = 0) { + if (%fenk_needle = 0 & %fenk_threads_given < 5) { + ~chatnpc("Where are my needle and thread, ?"); + } else if (%fenk_threads_given < 5) { + ~chatnpc("Where's my thread, ?"); + } else if (%fenk_needle = 0) { + ~chatnpc("Where's my needle, ?"); + } + return; +} +if (%fenk_needle = 0 & inv_total(inv, needle) >= 1) { + inv_del(inv, needle, 1); + %fenk_needle = 1; + ~chatnpc("Ah, a needle. Wonderful."); +} +return; +if (%fenk_threads_given < 5 & inv_total(inv, thread) >= 1) { + def_int $thread_count = min(inv_total(inv, thread), sub(5, %fenk_threads_given)); + inv_del(inv, thread, $thread_count); + %fenk_threads_given = add(%fenk_threads_given, $thread_count); + ~chatnpc("Some thread, excellent."); +} +if (%fenk_needle = 1 & %fenk_threads_given >= 5) { + %fenk_quest = ^fenk_brought_needle_threads; + ~mesbox("Fenkenstrain uses the needle and thread to sew the body parts together. Soon, a hideous creature lies inanimate on the ritual table."); + ~chatnpc("Perfect. But I need one more thing from you - flesh and bones by themselves do not make life."); + ~chatplayer("Really?"); + ~chatnpc("I have honed to perfection an ancient ritual that will give life to this creature, but for this I must harness the very power of Nature."); + ~chatplayer("And what power is this?"); + ~chatnpc("The power of lightning."); + ~chatplayer("Sorry, can't make lightning, you've got the wrong man-"); + ~chatnpc("Silence your insolent tongue! The storm that brews overhead will create the lightning. What I need you to do is to repair the lightning conductor on the balcony above."); + ~chatplayer("Repair the lightning conductor, right. Can I have a break, soon? By law I'm entitled to 15 minutes every-"); + ~chatnpc("Repair the conductor and BEGONE!!!"); +} + +// fenk_brought_needle_threads + +[label,fenkenstrain_how_to_repair_conductor] +~chatplayer("How do I repair the lightning conductor?"); +~chatnpc("Oh, it would be easier to do it myself! If you find a conductor mould you should be able to cast a new one."); +~chatnpc("Remember this, : my experiment will only work with a conductor made from silver."); + +[label,fenkenstrain_repaired_conductor] +~chatplayer("So did it work, then?"); +~chatnpc("Yes, I'm afraid it did, - all too well."); +~chatplayer("I can't see it anywhere."); +~chatnpc("I tricked it into going up to the Tower, and there it remains, imprisoned."); +~chatplayer("So the creature wasn't all you'd hoped then?"); +~chatnpc("...oh, what have I done..."); +~chatplayer("Oh, I see, we're developing a sense of right and wrong now are we?"); +~chatplayer("Bit late for that, I'd say."); +~chatnpc("I have no control over it! It's coming to get me!"); +~chatplayer("What do you want me to do about it?"); +~chatnpc("Destroy it!!! Take the key to the Tower and take back the life I never should have granted!!!"); +inv_add(inv, fenk_tower_key, 1); +%fenk_quest = ^fenk_spoke_again; + +[label,fenkenstrain_spoke_again] +~chatnpc("So have you destroyed it?!!?"); +if (inv_total(inv, fenk_tower_key) = 0) { + @fenkenstrain_lost_key; +} +~chatplayer("Not yet."); +~chatnpc("Please, hurry - save me!!!!"); + +[label,fenkenstrain_lost_key] +~chatplayer("I seem to have lost the Tower key."); +~chatnpc("Oh, for goodness sake. Here's a copy I had made."); +inv_add(inv, fenk_tower_key, 1); + +[label,fenkenstrain_creature_convince] +~chatnpc("So have you destroyed it?!!?"); +~chatplayer("Never, now that he has told me the truth!"); +~chatnpc("Oh my, oh my, this is exactly what I feared!"); +~chatnpc("Why did you have to pick Rologarth's brain of all brains?!?"); +~chatplayer("I'm through working for you."); +~chatnpc("No! I refuse to release you! You must help me build another creature to destroy this dreadful mistake!!"); + +[opnpc1,fenk_fenkenstrain_in_tower] +~chatnpc("theyrecomingtogetme theyrecomingtogetme..."); +~chatplayer("It is all you deserve. Lord Rologarth is master of this castle once more. Let him protect you - if he wants to."); +~chatnpc("theyrecomingtogetme theyrecomingtogetme..."); \ No newline at end of file diff --git a/scripts/quests/quest_fenk/scripts/fenk_gardener_ghost.rs2 b/scripts/quests/quest_fenk/scripts/fenk_gardener_ghost.rs2 new file mode 100644 index 0000000000..ff6e1b8098 --- /dev/null +++ b/scripts/quests/quest_fenk/scripts/fenk_gardener_ghost.rs2 @@ -0,0 +1,144 @@ +[opnpc1,fenk_gardener_multi_2] +switch_int(%fenk_quest) { + case ^fenk_not_started : + ~chatplayer("Who are you?"); + if(~check_ghostspeak = false) { return; }; + ~chatnpc("Oi'm the 'eadless gardener, mate."); + case ^fenk_passed_interview, ^fenk_brough_bodyparts : + @fenk_gardener_options; + case ^fenk_brought_needle_threads, ^fenk_repaired_lightning_conductor, ^fenk_spoke_again, ^fenk_creature_convince : + if (inv_total(inv, fenk_shed_key) = 0 & %fenk_unlocked_shed = 0) { + @fenk_gardener_without_key_options; + } else { + @fenk_gardener_already_with_key_options; + } + case ^fenk_complete : + ~chatplayer("How are you?"); + if(~check_ghostspeak = false) { return; }; + ~chatnpc("Same as ever, mate, just getting' on with it regardless."); + ~chatplayer("Good for you...err...mate."); +} + +// Helper proc returns true if no amulet and defaults to unable to speak mode +[proc,check_ghostspeak]()(boolean) +if (inv_total(worn, amulet_of_ghostspeak) = 0 & inv_total(worn, amulet_of_ghostspeak_enchanted) = 0) { + ~mesbox("The Headless Gardener's neck twitches at you, but the lack of any head prevents him from speaking."); + return (false); +} +~objbox(amulet_of_ghostspeak, "You feel power emanate from the Amulet of Ghostspeak, and the air around you vibrates with the ghostly voice of the Headless Gardener...", 200, 0, 0); +return (true); + +[label,fenk_gardener_options] +@multi3( + "Tell me about Fenkenstrain.", tell_me_about_fenky, + "What happened to your head?", tell_me_about_your_head, + "What's your name?", tell_me_your_name +); + +[label,fenk_gardener_without_key_options] +@multi4( + "Tell me about Fenkenstrain.", tell_me_about_fenky, + "Do you know where the key to the shed is?", tell_me_where_is_key, + "Do you know where a conductor mould is?", tell_me_how_get_mould, + "What happened to your head?", tell_me_about_your_head +); + +// https://youtu.be/idakVqwlf-U +[label,fenk_gardener_already_with_key_options] +@multi3( + "Tell me about Fenkenstrain.", tell_me_about_fenky, + "Do you know where a conductor mould is?", tell_me_how_get_mould, + "What happened to your head?", tell_me_about_your_head +); + +[label,tell_me_about_fenky] +~chatplayer("What can you tell me about Fenkenstrain?"); +if(~check_ghostspeak = false) { return; }; +~chatnpc("Oi could tell you a few things about old Fenky, yeah."); +~chatplayer("Go on."); +~chatnpc("Once, this castle were full o' good folk - my friends. Fenky was just the castle doctor, you know, to the lord and the castle folk."); +~chatnpc("I don't know what happened to them all, but one by one they all disappeared. When they were gone a while, I went an dug graves for 'em in the forest."); +~chatnpc("After a while there weren't no one left, but the lord, Fenkenstrain and meself."); +~chatnpc("Old Fenky sent me into the forest to dig 'im a pit - never said what for - then would you believe it, someone chops me 'ead off."); +~chatplayer("Did you see who did it...before...?"); +~chatnpc("Before oi kicked the bucket, you mean?"); +~chatplayer("Umm..."); +~chatnpc("Don't worry yerself. I'm not worried about bein' dead. Worse things could happen, I suppose."); +~chatnpc("One thing I do know is, there ain't no lord of the castle anymore, 'cept for old Fenky. Makes ya think a bit, don't it?"); + +[label,tell_me_about_your_head] +~chatplayer("What happened to your head?"); +if(~check_ghostspeak = false) { return; }; +~chatnpc("Oi was in the old 'aunted Forest to the south, diggin' a pit for moi old master, old Fenkenstrain, when would you believe it, someone chops me head off. Awful bad luck weren't it?"); +~chatplayer("Oh yes, dreadful bad luck."); +~chatnpc("So oi thinks to meself, I don't needs any 'ead to be getting on with me gardenin', long as I got me hands and me spade."); +if (%fenk_quest >= ^fenk_brough_bodyparts) { return; } +~chatplayer("Would you show me where the place was?"); +if (inv_total(inv, fenk_head_empty) >= 1 | inv_total(inv, fenk_head_full) >= 1) { + ~chatnpc("No mate, you've found my head already, oi think."); + return; +} +~chatnpc("Well, oi s'pose oi've got ten minutes to spare."); +~gardener_follows_you; + +[label,tell_me_your_name] +~chatplayer("What's your name?"); +if(~check_ghostspeak = false) { return; }; +~chatnpc("Me name? It's been a moivellous long while, mate, since I had any use for such a thing as a name."); +~chatplayer("Don't worry, I was just trying to make conversation."); +~chatnpc("No, no, I can't be havin' that. I'll remember in a minute..."); +~chatplayer("Please, don't worry."); +~chatnpc("Lestwit, that's it! Ed Lestwit."); + +[label,tell_me_where_is_key] +~chatplayer("Do you know where the key to the shed is?"); +// if(~check_ghostspeak = false) { return; }; // For authentically odd reasons, this wasn't checked. +~chatnpc("Got it right 'ere in my pocket. Here you go."); +inv_add(inv, fenk_shed_key, 1); +~objbox(fenk_shed_key, "The headless gardener hands you a rusty key.", 250, 0, 0); + +[label,tell_me_how_get_mould] +~chatplayer("Do you know where I can find a lightning conductor mould?"); +// if(~check_ghostspeak = false) { return; }; // For authentically odd reasons, this wasn't checked. +~chatnpc("A conductive mould, you say? Let me see-"); +~chatnpc("There used to be a bloke 'ere, sort of an 'andyman e was. Did everything round the place - fixed what was broke, swept the chimneys and the like. He would 'ave had a mould, I imagine."); +~chatplayer("Where is he now?"); +~chatnpc("E's dead, just like everyone else round 'ere ... 'cept for me."); + + + +[proc,gardener_follows_you] +%fenk_gardener_directions = 1; // This varbit will remove the current gardener. +npc_add(npc_coord, fenk_gardener_multi, 1000); +npc_setmode(playerfollow); + +// Gardener that follows you. I copied the directional stuff from kbd_dragonfire_far +[opnpc1,fenk_gardener_multi] +// if ($dx = 0 & $dz = 0) { +// mes("Here is the place where I met me' maker."); +// return; +// } +// if (inzone(...)) +def_int $z = calc(coordz(coord) - coordz(0_56_54_24_35)); +def_int $x = calc(coordx(coord) - coordx(0_56_54_24_35)); +if (calc($z / 2) <= $x & calc($x / 2) <= $z) { // south-west + npc_say("Go south-west, mate."); +} else if (calc($z / 2) <= multiply($x, -1) & calc($x / 2) >= multiply($z, -1)) { // south-east + npc_say("Go south-east, mate."); +} else if (calc($x / 2) >= $z & calc($z / 2) >= $x) { // north-east + npc_say("Go north-east, mate."); +} else if (calc($z / 2) >= multiply($x, -1) & calc($z / 2 * -1) >= $x) { // north-west + npc_say("Go north-west, mate."); +} else if (calc($x / 2) <= $z & calc($z / 2) >= $x) { // south + npc_say("Go south, mate."); +} else if (calc($x / 2) <= $z & calc($x / 2) <= multiply($z, -1)) { // east + npc_say("Go east, mate."); +} else if (calc($z / 2) <= $x & calc($z / 2 * -1) >= $x) { // north + npc_say("Go north, mate."); +} else { // west + npc_say("Go west, mate."); +} +// npc_say("You need to head off to them Haunted Woods, mate."); +npc_setmode(playerfollow); + +[mapzoneexit, 0_55_55] \ No newline at end of file diff --git a/scripts/quests/quest_fenk/scripts/fenk_journal.rs2 b/scripts/quests/quest_fenk/scripts/fenk_journal.rs2 new file mode 100644 index 0000000000..c2cd96585e --- /dev/null +++ b/scripts/quests/quest_fenk/scripts/fenk_journal.rs2 @@ -0,0 +1,150 @@ +[if_button,questlist:creatureoffenkenstrain] +def_string $x; +def_string $n = "Creature of Fenkenstrain"; + +// My investigations on the Varp 399 staging number (%fenk_quest) +// %fenk_quest only shows the body on the bed at stage 3. Fixing the midpoint needle/thread stage at that point. +// %fenk_quest also exchanges fenk and rologarth at stage 8. Setting the end of the quest at that point. +// Some clues from the reverse engineered script "int script_2193(int arg0)" +// This was why I made the guess that stage 7 is not used. +// case 26: +// if (standart_config_399 > 6) { +// return 2; +// } +// if (((boolean)standart_config_399) && ((boolean)bitconfig_203)) { +// return 0; +// } +// return 1; + +// Stage 0 +// Note this is the signpost part. The quest doesn't start(or turn yellow) until you talk to fenk. +if(%fenk_read_signpost = 0 & %fenk_quest = ^fenk_not_started) { + $x = append($x, "@dbl@I can start this quest by reading the signpost in the|"); + $x = append($x, "@dbl@centre of @dre@Canifis@dbl@.|"); + $x = append($x, "@dbl@I must be able to defeat a @dre@level 51 monster@dbl@, and need the|"); + $x = append($x, "@dbl@following skill levels:|"); + if (stat_base(crafting) >= 20) { + $x = append($x, "@str@Level 20 Crafting|"); + } else { + $x = append($x, "@dre@Level 20 Crafting|"); + } + if (stat_base(thieving) >= 25) { + $x = append($x, "@str@Level 25 Thieving|"); + } else { + $x = append($x, "@dre@Level 25 Thieving|"); + } + $x = append($x, "@dbl@I also need to have completed the following quests:|"); + if (%priestperil >= ^priestperil_complete) { + $x = append($x, "@str@Priest in Peril|"); + } else { + $x = append($x, "@dre@Priest in Peril|"); + } + if (%prieststart >= ^priest_complete) { + $x = append($x, "@str@The Restless Ghost|"); + } else { + $x = append($x, "@dre@The Restless Ghost|"); + } + ~quest_journal($n, $x); + return; +} +// zmvgzuA31S0 - if you do not read the signpost, you will not see this even at the end of the quest. +if(%fenk_read_signpost = 1) { + $x = append($x, "@str@I read the signpost in Canifis, which tells of a butler|"); + $x = append($x, "@str@position that is available at the castle to the northeast.|"); +} +// zmvgzuA31S0 - if you do not read the signpost, you will not see this. +if (%fenk_read_signpost = 1 & %fenk_quest = ^fenk_not_started) { + $x = append($x, "@dbl@I should go up to the castle and speak to @dre@Dr Fenkenstrain@dbl@|"); + ~quest_journal($n, $x); + return; +} + +// Stage 1 +$x = append($x, "@str@I spoke to Fenkenstrain, who wanted me to find him some|"); +$x = append($x, "@str@body parts so that he could build a creature.|"); +if (%fenk_quest = ^fenk_passed_interview) { + $x = append($x, "|@dbl@I need to find these body parts for @dre@Fenkenstrain@dbl@:|"); + // I am half sure if they need to be crossed out. I think authentically they are not. + if (%fenk_arms = 1) { + $x = append($x, "@str@a pair of arms|"); + } else { + $x = append($x, "@dbl@a pair of @dre@arms@dbl@|"); + } + if (%fenk_legs = 1) { + $x = append($x, "@str@a pair of legs|"); + } else { + $x = append($x, "@dbl@a pair legs @dre@legs@dbl@|"); + } + if (%fenk_torso = 1) { + $x = append($x, "@str@a torso|"); + } else { + $x = append($x, "@dbl@a @dre@torso@dbl@|"); + } + if (%fenk_head = 1) { + $x = append($x, "@str@a head|"); + } else { + $x = append($x, "@dbl@a @dre@head@dbl@|"); + } + $x = append($x, "|@dbl@Apparently the soil of @dre@Morytania@dbl@ has a unique quality|"); + $x = append($x, "@dbl@which preserves the bodies of the dead better than|"); + $x = append($x, "@dbl@elsewhere, so perhaps I should look at the graves in the|"); + $x = append($x, "@dbl@local area"); + ~quest_journal($n, $x); + return; +} + +// Stage 2 +$x = append($x, "@str@I gave a torso, some arms and legs, and a head to|"); +$x = append($x, "@str@Fenkenstrain, who then wanted a needle and 5 lots of|"); +$x = append($x, "@str@thread, so that he could sew the bodyparts together and|"); +$x = append($x, "@str@create his creature.|"); +if (%fenk_quest = ^fenk_brough_bodyparts) { + $x = append($x, "@dbl@I need to bring @dre@Fenkenstrain@dbl@ a @dre@needle@dbl@ and @dre@5 quantities@dbl@|"); + $x = append($x, "@dbl@@dre@of thread@dbl@.|"); + ~quest_journal($n, $x); + return; +} + +// Stage 3 +$x = append($x, "@str@I brought Fenkenstrain a needle and 5 quantities of|"); +$x = append($x, "@str@thread.|"); +if (%fenk_quest = ^fenk_brought_needle_threads) { + $x = append($x, "@dbl@@dre@Fenkenstrain@dbl@ has ordered me to repair the lightning|"); + $x = append($x, "@dbl@conductor.|"); + ~quest_journal($n, $x); + return; +} + +// Stage 4 +$x = append($x, "@str@I repaired the lightning conductor, and Fenkenstrain|"); +$x = append($x, "@str@brought the Creature to life.|"); +if (%fenk_quest = ^fenk_repaired_lightning_conductor) { + $x = append($x, "@dre@Fenkenstrain@dbl@ wants to talk to me.||"); // Disappears +} + +// Stage 5 +if (%fenk_quest = ^fenk_spoke_again) { + $x = append($x, "@dbl@The @dre@Creature@dbl@ went on a rampage, and @dre@Fenkenstrain@dbl@ wants|"); + $x = append($x, "@dbl@me to go up the @dre@Tower@dbl@ to destroy it.|"); + ~quest_journal($n, $x); + return; +} + +// Stage 6 +$x = append($x, "@str@The Creature went on a rampage, and Fenkenstrain sent|"); +$x = append($x, "@str@me up to the Tower to destroy it.|"); +$x = append($x, "@str@The Creature convinced me to stop Fenkenstrain's|"); +$x = append($x, "@str@experiments once and for all, and has told me the true|"); +$x = append($x, "@str@history of Fenkenstrain's treachery.|"); +if (%fenk_quest = ^fenk_creature_convince) { + $x = append($x, "@dbl@I must find a way to stop Fenkenstrain's experiments.|"); + ~quest_journal($n, $x); + return; +} + +// Stage 8 (End) +$x = append($x, "@str@I stole Fenkenstrain's Ring of Charos, and he released|"); +$x = append($x, "@str@me from his service.|"); +$x = append($x, "@red@QUEST COMPLETE!"); + +~quest_journal("Creature of Fenkenstrain", $x); \ No newline at end of file