Skip to content

Commit

Permalink
enhance vial step
Browse files Browse the repository at this point in the history
drink the vial if you find it (with warning about how long this can take)
otherwise assume it's already been drunk like before
  • Loading branch information
vtcifer authored Sep 28, 2024
1 parent ec56756 commit 15164b2
Showing 1 changed file with 96 additions and 66 deletions.
162 changes: 96 additions & 66 deletions truffenyi-commune-quest.lic
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -175,81 +173,113 @@ 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

def do_shrine
echo 'not supported yet'
end

end

TruffenyiCommuneQuest.new

0 comments on commit 15164b2

Please sign in to comment.