From 15164b2590643c17113269d60ececb2a525f49ee Mon Sep 17 00:00:00 2001 From: Derek Hoffmann Date: Sat, 28 Sep 2024 16:30:15 -0400 Subject: [PATCH] enhance vial step drink the vial if you find it (with warning about how long this can take) otherwise assume it's already been drunk like before --- truffenyi-commune-quest.lic | 162 +++++++++++++++++++++--------------- 1 file changed, 96 insertions(+), 66 deletions(-) diff --git a/truffenyi-commune-quest.lic b/truffenyi-commune-quest.lic index 492c570a93..d4c98e79bd 100644 --- a/truffenyi-commune-quest.lic +++ b/truffenyi-commune-quest.lic @@ -1,25 +1,23 @@ =begin Documentation: https://elanthipedia.play.net/Lich_script_repository#truffenyi-commune-quest =end - custom_require.call(%w[common common-items equipmanager]) class TruffenyiCommuneQuest def initialize - arg_definitions = [ [ - { name: 'step', options: %w[altar vial shrine], optional: fales, description: 'Which step to do?'} + { name: 'step', options: %w[altar vial shrine], optional: false, description: 'Which step to do?'} ] ] args = parse_args(arg_definitions) - + if args.step == 'altar' do_altar - elsif args.step == 'vial' - do_vial elsif args.step == 'shrine' do_shrine + else + do_vial end end @@ -175,73 +173,105 @@ class TruffenyiCommuneQuest end def do_vial - start = Time.now - echo 'This script does the actions for the truffenyi commune Cleric quest. It should be started after drinking the vial two times.' EquipmentManager.new.empty_hands - - while (line = get) - waitrt? - if line =~ /^Your vision fades and you suddenly see yourself working in front of a glowing forge/ - DRC.bput('pray Divyaush', 'In your') - end - if line =~ /^Your vision fades and you see yourself toiling in a dusty field/ - DRC.bput('pray Berengaria', 'In your') - end - if line =~ /^Your vision fades and you see yourself huddled in front of a fire in an icy cavern/ - DRC.bput('pray Kuniyo', 'In your') - end - if line =~ /^Your vision fades and you see yourself surrounded by occupied cots/ - DRC.bput("pray Peri'el", 'In your') - end - if line =~ /^Your vision fades and you see yourself alone on a raft/ - DRC.bput('pray Lemicus', 'In your') - end - if line =~ /^Your vision fades and you see yourself as a young child sitting in the corner/ - DRC.bput('pray Albreda', 'In your') - end - if line =~ /^Your vision fades and you find yourself travelling the desert/ - DRC.bput('pray Murrula', 'In your') - end - if line =~ /^Your vision fades and you see yourself tired and sore after a long day of harvesting crops/ - DRC.bput('pray Rutilor', 'In your') - end - if line =~ /^Your vision fades and you see yourself sitting on a bar stool/ - DRC.bput('pray Saemaus', 'In your') - end - if line =~ /^Your vision fades and you see yourself walking through one of your grain fields/ - DRC.bput('pray Asketi', 'In your') - end - if line =~ /^Your vision fades and you see yourself sitting amongst a group gathered at an outdoor wedding/ - DRC.bput("pray Be'ort", 'In your') - end - if line =~ /^Your vision fades and you see yourself sitting on a grassy hilltop/ - DRC.bput('pray Dergati', 'In your') - end - if line =~ /^In your vision the waters pull away from the shore/ - DRC.bput('pray Drogor', 'In your') - end - if line =~ /^Your vision fades and you see yourself facing a crackling fire next to the shore/ - DRC.bput('pray Drogor', 'In your') - end - if line =~ /^Your vision fades and you see yourself seated in the front row of a concert hall/ - DRC.bput('pray Idon', 'In your') - end - if line =~ /^Your vision fades and you see yourself entertaining a neighboring farmer at your house/ - DRC.bput('pray Kerenhappuch', 'In your') + + if DRCI.exists?('murky vial') + DRC.message("This next step will take many hours (approx 3+) to complete.\nYou should not be doing anything else except this during this time or you risk death and failure of the quest.") + pause 5 + DRC.message("If you are sure you wish to proceed, simply let the script continue, otherwise kill the script.") + pause 15 + DRC.message("Beginning quest process in 15 seconds. Hope you are in a safe area.") + pause 15 + if !DRCI.get_item?('murky vial') + echo "Somehow you lost your vial!" + echo "Bailing out!" + exit end - if line =~ /^Your vision fades and you see yourself battling a small peccary/ - DRC.bput('pray Trothfang', 'In your') + if /You tilt the vial back, but the liquid doesn't pour out/ !~ DRC.bput('drink my murky vial', /You tilt the vial back, but the liquid doesn't pour out/) + echo "Somehow you have the wrong vial!" + echo "Bailing out!" + exit end - if line =~ /^Your vision fades and you see yourself standing in the snow peering into the window of a rival/ - DRC.bput('pray Zachriedek', 'In your') + if /You tilt the vial back and drink deeply from it/ !~ DRC.bput('drink my murky vial', /You tilt the vial back and drink deeply from it/) + echo "Somehow you have the wrong vial!" + echo "Bailing out!" + exit end + else + DRC.message("Assuming you already drank the vial. If not, kill this script and figure out what happened to your vial.") + end + + + start = Time.now + DRC.message("Vial step started at #{start}.") + while line = get + waitrt? + ### Light Aspects + if line =~ /^Your vision fades and you suddenly see yourself working in front of a glowing forge/ + DRC.bput('pray Divyaush', 'In your') + end + if line =~ /^Your vision fades and you see yourself toiling in a dusty field/ + DRC.bput('pray Berengaria', 'In your') + end + if line =~ /^Your vision fades and you see yourself huddled in front of a fire in an icy cavern/ + DRC.bput('pray Kuniyo', 'In your') + end + if line =~ /^Your vision fades and you see yourself surrounded by occupied cots/ + DRC.bput("pray Peri'el", 'In your') + end + if line =~ /^Your vision fades and you see yourself alone on a raft/ + DRC.bput('pray Lemicus', 'In your') + end + if line =~ /^Your vision fades and you see yourself as a young child sitting in the corner/ + DRC.bput('pray Albreda', 'In your') + end + if line =~ /^Your vision fades and you find yourself travelling the desert/ + DRC.bput('pray Murrula', 'In your') + end + if line =~ /^Your vision fades and you see yourself tired and sore after a long day of harvesting crops/ + DRC.bput('pray Rutilor', 'In your') + end + if line =~ /^Your vision fades and you see yourself sitting on a bar stool/ + DRC.bput('pray Saemaus', 'In your') + end + ### Dark Aspects + if line =~ /^Your vision fades and you see yourself walking through one of your grain fields/ + DRC.bput('pray Asketi', 'In your') + end + if line =~ /^Your vision fades and you see yourself sitting amongst a group gathered at an outdoor wedding/ + DRC.bput("pray Be'ort", 'In your') + end + if line =~ /^Your vision fades and you see yourself sitting on a grassy hilltop/ + DRC.bput('pray Dergati', 'In your') + end + if line =~ /^In your vision the waters pull away from the shore/ + DRC.bput('pray Drogor', 'In your') + end + if line =~ /^Your vision fades and you see yourself facing a crackling fire next to the shore/ + DRC.bput('pray Drogor', 'In your') + end + if line =~ /Your vision fades and you see yourself seated in a small chapel/ + DRC.bput('pray Huldah', 'In your') + end + if line =~ /^Your vision fades and you see yourself seated in the front row of a concert hall/ + DRC.bput('pray Idon', 'In your') + end + if line =~ /^Your vision fades and you see yourself entertaining a neighboring farmer at your house/ + DRC.bput('pray Kerenhappuch', 'In your') + end + if line =~ /^Your vision fades and you see yourself battling a small peccary/ + DRC.bput('pray Trothfang', 'In your') + end + if line =~ /^Your vision fades and you see yourself standing in the snow peering into the window of a rival/ + DRC.bput('pray Zachriedek', 'In your') + end + ### Neutral Aspects: TBD? if line =~ /^Your stomach grumbles and you realize that you're holding a/ fput("drop #{checkright || checkleft}") if DRC.left_hand || DRC.right_hand end next unless line =~ /you have my attention, though really you are never far from my sight/ - - finish = ((Time.now - start) / 60.0).round - echo("All done! This part of the quest took #{finish} minutes to complete.") + finish = Time.now + DRC.message("Vial step finished at #{finish}! This part of the quest took #{((finish - start) / 60.0).round} minutes to complete.") exit end end @@ -249,7 +279,7 @@ class TruffenyiCommuneQuest def do_shrine echo 'not supported yet' end + end TruffenyiCommuneQuest.new -