Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scripts][ranger-companion] Support for red meat pouch and feeding wolves into adulthood #6948

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 48 additions & 10 deletions ranger-companion.lic
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
##Added Functionality for Wolves
### Requires a Red Meat Pouch
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#ranger-companion
=end
Expand All @@ -7,6 +9,7 @@ custom_require.call(%w[common drinfomon])
no_pause_all

class Companion

def initialize
unless DRStats.ranger?
echo '***MUST BE A RANGER***'
Expand All @@ -18,15 +21,9 @@ class Companion
exit
end

while (line = get)
while line = get
waitrt?

# Dismiss wolf if it grows past the baby stage
if line =~ /^.*(young|full-grown) wolf (begins|howls|paws|looks|perks|sits|pants|stands|carefully)/
echo('*** Your companion is too old for this script to work ***')
exit
end

# A baby wolf stands up then paces back and forth nervously.
# A baby wolf paces back and forth.
if line =~ /^.*wolf( stands up then|) paces back and forth*/
Expand All @@ -44,7 +41,45 @@ class Companion
DRC.bput('pet raccoon', 'You pet', 'Touch what')
end

if line =~ /^A .* wolf begins to whimper./

if line =~ /^A .*(young|full-grown) wolf begins to whimper./
pause 1 until DRC.pause_all
waitrt?
DRC.bput('stow left', 'Stow what', 'You put')
case DRC.bput('rub my red pouch', 'brief flash of light emanates from inside', 'You rub', 'What were you referring to')
when 'What were you referring to'
DRC.bput('signal companion to sleep', 'wolf wanders off to find', 'Your companion is not', 'You have no companion', 'snapping your fingers')
exit
end
case DRC.bput('get my meat', 'You get', 'What were you referring to')
when 'What were you referring to'
DRC.bput('signal companion to sleep', 'wolf wanders off to find', 'Your companion is not', 'You have no companion', 'snapping your fingers')
exit
end
case DRC.bput('smell my meat', 'notice a pungent but flavorful smell', 'notice a slight odor', 'almost gag from the stench')
when 'notice a pungent but flavorful smell'
case DRC.bput('feed my meat to wolf', 'wolf greedily devours', "It doesn't seem hungry", "You can't feed with", 'wolf shies away from you')
when 'wolf shies away from you'
DRC.bput('feed my meat to second wolf', 'The baby wolf greedily drinks', "It doesn't seem hungry", "You can't feed with", 'wolf shies away from you')
when "You can't feed with"
DRC.bput('signal companion to sleep', 'wolf wanders off to find', 'Your companion is not', 'You have no companion', 'snapping your fingers')
exit
end
when 'notice a slight odor'
DRC.bput('drop my meat', 'You drop', 'What were you referring to')
DRC.bput('signal companion to sleep', 'wolf wanders off to find', 'Your companion is not', 'You have no companion', 'snapping your fingers')
exit
when 'almost gag from the stench'
DRC.bput('drop my meat', 'You drop', 'What were you referring to')
DRC.bput('signal companion to sleep', 'wolf wanders off to find', 'Your companion is not', 'You have no companion', 'snapping your fingers')
exit
end
DRC.unpause_all
end


if line =~ /^A .*baby wolf begins to whimper./
pause 1 until DRC.pause_all
waitrt?
DRC.bput('stow left', 'Stow what', 'You put')
case DRC.bput('get my milk', 'You get', 'You are already holding', 'What were you referring to')
Expand All @@ -59,12 +94,13 @@ class Companion
DRC.bput('signal companion to sleep', 'wolf wanders off to find', 'Your companion is not', 'You have no companion', 'snapping your fingers')
exit
end
DRC.bput('stow my milk', 'You put your', 'Stow what')
DRC.bput('put my milk in my greatcloak', 'You put your', 'Stow what')
DRC.unpause_all
end

# Move to next loop iteration unless we see racoon whimpering
next unless line =~ /^A .* raccoon begins to whimper./

pause 1 until DRC.pause_all
waitrt?

DRC.bput('stow left', 'Stow what', 'You put')
Expand All @@ -76,13 +112,15 @@ class Companion

DRC.bput('feed my corn to raccoon', 'raccoon greedily eats')
DRC.bput('stow my corn', 'You put your', 'Stow what')
DRC.unpause_all
end
end
end

before_dying do
DRC.bput('signal companion to sleep', 'wolf wanders off to find', 'Your companion is not', 'You have no companion', 'snapping your fingers', 'quiet place to sleep')
DRC.bput('signal companion to hunt', 'suddenly catches a scent', 'is too young to hunt', 'Your companion is not', 'You have no companion', 'snapping your fingers')
DRC.unpause_all
end

Companion.new
Loading