Skip to content

Commit

Permalink
Merge branch 'rpherbig:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
OdnaZvezda authored Nov 11, 2023
2 parents 8530d09 + 6e27010 commit 3e19735
Show file tree
Hide file tree
Showing 17 changed files with 201 additions and 84 deletions.
22 changes: 11 additions & 11 deletions athletics.lic
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ class Athletics
end

def crossing_athletics
if UserVars.athletics <= 50
if UserVars.athletics.to_i <= 50
swim_loop(get_data('athletics').swimming_options['arthe_dale']['rooms'])
elsif UserVars.athletics < 290
elsif UserVars.athletics.to_i < 290
waitrt?
pause @performance_pause # to give performance time to complete before_dying if stopped from the previous script
start_script('performance') unless Script.running?('performance')
Expand All @@ -223,28 +223,28 @@ class Athletics
break unless climb?(data['room'], data['targets'])
end
end
elsif UserVars.athletics < 450
elsif UserVars.athletics.to_i < 450
override_location_and_practice('segoltha_bank')
else
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics > 650
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics.to_i > 650
override_location_and_practice('arthelun_rocks')
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics > 650
DRC.message("The xalas argument will train faster at 650+ athletics. Be aware that it's potentially dangerous.") if UserVars.athletics.to_i > 650
end
end

def shard_athletics
until done_training?
if UserVars.athletics < 240
if UserVars.athletics.to_i < 240
until done_training?
@athletics_options['shard']
.reject { |data| @settings.avoid_athletics_in_justice && data['justice'] }
.each do |data|
break unless climb?(data['room'], data['targets'])
end
end
elsif UserVars.athletics < 540
elsif UserVars.athletics.to_i < 540
climb_cliffs
elsif UserVars.athletics < 850
elsif UserVars.athletics.to_i < 850
climb_branch
elsif UserVars.athletics
climb_wyvern
Expand Down Expand Up @@ -342,10 +342,10 @@ class Athletics
end

def climb_branch
if UserVars.athletics < 540
if UserVars.athletics.to_i < 540
override_location_and_practice('undergondola_branch')
else
DRC.message("Warning: Using the undergondola arg with more than 850 athletics is not best use and you may consider the wyvern option instead.") if UserVars.athletics > 850
DRC.message("Warning: Using the undergondola arg with more than 850 athletics is not best use and you may consider the wyvern option instead.") if UserVars.athletics.to_i > 850
DRCT.walk_to(9607)
DRCT.walk_to(9515)
until done_training?
Expand Down Expand Up @@ -375,7 +375,7 @@ class Athletics
def climb_wyvern
DRCT.walk_to(19_464)
until done_training?
DRCT.walk_to(2245) if UserVars.athletics > 540
DRCT.walk_to(2245) if UserVars.athletics.to_i > 540
DRCT.walk_to(9607)
DRCT.walk_to(11_126)
DRCT.walk_to(19_464)
Expand Down
10 changes: 10 additions & 0 deletions combat-trainer.lic
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ class SafetyProcess
Flags.add('ct-itemdropped', '^Your (?<item>.*) falls to your feet\.', '^You cannot maintain your grip on the (?<item>.*), and it falls to the ground!')
Flags.add('ct-germshieldlost', 'It jerks the.* (?<shield>\w+) out of your hands')
Flags.add('active-mitigation', 'You believe you could \b(?<action>\w+) out of the way of the \b(?<obstacle>\w+)')
Flags.add('ct-parasite', 'blood mite on your (?<body_part>.*)\.')
@equipment_manager = equipment_manager
@health_threshold = settings.health_threshold
echo(" @health_threshold: #{@health_threshold}") if $debug_mode_ct
Expand All @@ -1080,6 +1081,7 @@ class SafetyProcess
DRC.fix_standing
check_item_recovery(game_state)
tend_lodged
tend_parasite
active_mitigation
game_state.danger = in_danger?(game_state.danger)
keep_away if !game_state.danger && game_state.retreating?
Expand Down Expand Up @@ -1147,6 +1149,13 @@ class SafetyProcess
Flags.reset('ct-lodged')
end

def tend_parasite
return unless Flags['ct-parasite']

DRC.wait_for_script_to_complete('tendme')
Flags.reset('ct-parasite')
end

def keep_away
return unless Flags['ct-engaged']

Expand Down Expand Up @@ -5322,6 +5331,7 @@ before_dying do
Flags.delete('pouch-full')
Flags.delete('container-full')
Flags.delete('ct-lodged')
Flags.delete('ct-parasite')
Flags.delete('ct-engaged')
Flags.delete('active-mitigation')
Flags.delete('ct-spelllost')
Expand Down
4 changes: 3 additions & 1 deletion common-items.lic
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,9 @@ module DRCI
/There (?:is|are) (?:only )?(.+) parts? left/,
/There's (?:only )?(.+) parts? left/,
/The (?:.+) has (.+) uses remaining./,
/There are enough left to create (.+) more/
/There are enough left to create (.+) more/,
/You count out (.+) pieces? of material there/,
/There (?:is|are) (.+) scrolls? left for use with crafting/
]
count = 0
$ORDINALS.each do |ordinal|
Expand Down
2 changes: 1 addition & 1 deletion common.lic
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ module DRC

_respond(
"<pushStream id=\"#{window_name}\"/>" + (make_bold ? bold(text) : text),
"<popStream id=\"#{window_name}\" /><prompt time=\"#{Time.now.to_i}\">&gt;</prompt>"
"<popStream id=\"#{window_name}\" /><prompt time=\"#{XMLData.server_time.to_i}\">&gt;</prompt>"
)
end

Expand Down
20 changes: 7 additions & 13 deletions corn-maze.lic
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class CornMaze
end

def count_he_bottle
DRC.bput("count my bottle", /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i
DRC.bput("count my bottle", /^That doesn't tell you much of anything/, /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i
end

def do_short_task(task)
Expand Down Expand Up @@ -720,19 +720,13 @@ class CornMaze
def stow_thing(thing)
if @settings.cornmaze_containers.any?
@settings.cornmaze_containers.each do |container|
unless DRCI.put_away_item?(thing, container)
unless DRCI.stow_item?(thing)
DRC.message("#{thing} didn't fit anywhere. Dropping it.")
DRCI.dispose_trash(thing, @worn_trashcan, @worn_trashcan_verb)
end
end
end
else
unless DRCI.stow_item?(thing)
DRC.message("YOU'VE RUN OUT OF ROOM! GET SOME MORE SPACE, YOU LAZY SLOB!")
DRCI.dispose_trash(thing, @worn_trashcan, @worn_trashcan_verb)
return if DRCI.put_away_item?(thing, container)
end
end
unless DRCI.stow_item?(thing)
DRC.message("YOU'VE RUN OUT OF ROOM! GET SOME MORE SPACE, YOU LAZY SLOB!")
DRCI.dispose_trash(thing, @worn_trashcan, @worn_trashcan_verb)
end
end

def recover_stun
Expand All @@ -745,7 +739,7 @@ class CornMaze
end

before_dying do
kernel_count = DRC.bput("count my bottle", /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i
kernel_count = DRC.bput("count my bottle", /^That doesn't tell you much of anything/, /^I could not find what you were referring to/, /^You count the number of kernels inside the bottle and find that there are \d+,?\d*/).tr(',', '').scan(/\d+/).first.to_i
DRC.message("CM: Exiting script with #{kernel_count} kernels.")
Flags.delete('maze_done')
Flags.delete('poisoned')
Expand Down
18 changes: 18 additions & 0 deletions data/base-recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,24 @@ crafting_recipes:
part:
- shield handle
- long cord
- name: a metal deflector
noun: deflector
volume: 25
type: Armorsmithing
work_order: true
chapter: 4
part:
- shield handle
- long cord
- name: a metal bulwark
noun: bulwark
volume: 50
type: armorsmithing
work_order: true
chapter: 4
part:
- shield handle
- long cord
# Blacksmithing Chapter 2 recipes
- name: a diagonal-peen mallet
noun: mallet
Expand Down
18 changes: 17 additions & 1 deletion data/base-shrines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ shrines:
push: altar
- location: Berengaria's stone shrine
start_room: 2867
push: altar
push: shrine
- location: The rebirth altar in the Temple of Light
start_room: 11381
push: altar
Expand All @@ -194,3 +194,19 @@ shrines:
- location: A purple osage heartwood altar at Horse Clan
start_room: 6366
push: altar
Hibarnhvidar:
- location: Traveler's Shrine, Hibarnhvidar
start_room: 15867
push: altar
- location: Albreda's Shrine, Hibarnhvidar
start_room: 15872
push: altar
- location: The central altar of the Temple of Kertigen
start_room: 3867
push: altar
- location: A peregan tree altar at Boar Clan
start_room: 11756
push: altar
- location: Divyaush's slab in an abandoned mine
start_room: 4397
push: slab
7 changes: 5 additions & 2 deletions drinfomon.lic
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Documentation: https://elanthipedia.play.net/Lich_script_development#drinfomon
=end

$DRINFOMON_VERSION = '2.0.33'
$DRINFOMON_VERSION = '2.0.34'

no_kill_all
no_pause_all
Expand Down Expand Up @@ -1367,7 +1367,10 @@ check_exp_all.call

# Wait for exp/info to have been parsed before we continue
# otherwise scripts that rely on this data will error.
pause 0.05 while DRSkill.list.empty?
# 10 October 2023 - Commenting this line out, as it causes on a hang fresh out of the character creator
# and seemingly adds no real value otherwise. Will delete this line in a month, along with these comment
# lines.
# pause 0.05 while DRSkill.list.empty?
# Note, while dead we cannot check your info, so we skip in that scenario.
# If you're alive, we wait til a reasonable sample of info has been populated.
# Race and Guild represent the start of info lines, Favors and TDPs represent the end.
Expand Down
8 changes: 4 additions & 4 deletions forge.lic
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class Forge
]

args = parse_args(arg_definitions)
Flags.add('forge-assembly', 'another finished \S+ shield (handle)', 'another finished wooden (hilt|haft)', 'another finished (long|short|small|large) leather (cord|backing)', 'another finished (small|large) cloth (padding)', 'another finished (long|short) wooden (pole)')
Flags.add('work-done', 'from the successful .* process', 'shows a slightly reduced weight', 'Applying the final touches', /^The .* was successfully/)
Flags.add('forge-assembly', 'another finished \S+ shield (handle)', 'another finished wooden (hilt|haft)', 'another finished (long|short|small|large) leather (cord|backing)', 'another finished (small|large) cloth (padding)', 'another finished (long|short) wooden (pole)', 'appears ready to be reinforced with some (leather strips)')
Flags.add('work-done', 'from the successful .* process', 'shows a slightly reduced weight', 'shows improved protection', 'Applying the final touches', /^The .* was successfully/)
Flags.add('ingot-restow', /^You realize .* will not require as much metal as you have, and so you split the ingot and leave the portion you won't be using in your (.*)./)

settings = get_settings
Expand Down Expand Up @@ -221,7 +221,7 @@ class Forge
magic_cleanup
exit
end
if /not required/ =~ DRC.bput("assemble my #{@item} with my #{part}", 'affix it securely in place', 'and tighten the pommel to secure it', 'carefully mark where it will attach when you continue crafting', 'is not required to continue crafting')
if /not required/ =~ DRC.bput("assemble my #{@item} with my #{part}", 'affix it securely in place', 'and tighten the pommel to secure it', 'carefully mark where it will attach when you continue crafting', 'You layer the leather strips', 'is not required to continue crafting')
DRC.bput("stow my #{part}")
end
swap_tool(tool) if tool
Expand Down Expand Up @@ -366,7 +366,7 @@ class Forge
when 'not spinning fast enough' # grindstone slowed before we used
spin_grindstone
when 'ready for grinding away of the excess metal', 'now appears ready for grinding and polishing',
'thinning the armor\'s metal at a grindstone', 'The armor is ready to be lightened', 'ready to be ground away' # grindstone time
'thinning the armor\'s metal at a grindstone', 'The armor is ready to be lightened', 'ready to be ground away', 'You think adjusting the armor' # grindstone time
unless DRCI.in_left_hand?(@item)
DRCC.stow_crafting_item(@hammer, @bag, @forging_belt) if DRCI.in_hands?(@hammer)
DRCC.stow_crafting_item('tongs', @bag, @forging_belt) if DRCI.in_hands?('tongs')
Expand Down
2 changes: 1 addition & 1 deletion inventory-manager.lic
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class InventoryManager
total_found = 0
DRC.message "Checking #{k}:"
v.each { |data|
if data.include?(item)
if data.downcase.include?(item)
total_found += 1
DRC.message "Match #{total_found}): #{data}"
end
Expand Down
16 changes: 9 additions & 7 deletions profiles/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2512,17 +2512,19 @@ base_wayto_overrides:
end_room: 13603
str_proc: start_script('bescort', ['coffin']); wait_while{running?('bescort')};

#Settings for task-forage (completing foraging tasks for Mags and similar NPCs, primarily for Trading experience)
# Settings for task-forage (completing foraging tasks for Mags and similar NPCs, primarily for Trading experience)
task_forage_settings:
#Where foraged items should be temporarily stored
# Where foraged items should be temporarily stored
container: backpack
#Whether or not to use BOOST TASK in order to reduce task cooldowns
# Whether or not to use BOOST TASK in order to reduce task cooldowns
task_boosts: false
#Use COLLECT for large tasks instead of FORAGE (only use if you know you can COLLECT reliably)
# Use COLLECT for large tasks instead of FORAGE (only use if you know you can COLLECT reliably)
collect: false
#When to exit the script and stop training Trading
# When to exit the script and stop training Trading
trading_limit: 30
#Exit as soon as a cooldown is encountered.
# Exit as soon as a cooldown is encountered.
never_wait: false
#Show verbose debug messaging
# If waiting for a cooldown, do it by collecting rocks at the task giver. If false, task-forage will run outdoorsmanship.lic at your outdoors_room or safe_Room
wait_in_place: true
# Show verbose debug messaging
debug: false
6 changes: 3 additions & 3 deletions remedy.lic
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class Remedy
when 'none'
# this part is to avoid the message "You are already holding that."
# in cases where it won't get more herbs, it takes a longer route to get herbs from other bags (not @bag nor @herb_container)
@count = Integer(DRC.bput("count my #{@herb1}", '\d+'))
@count = DRC.bput("count my #{@herb1}", '^You count out \d+').scan(/\d+/).first.to_i
while @count < 25
DRC.bput("put my #{@herb1} in my #{@container}", 'You put', 'already has something in it.', 'you count off and place only that many inside')
fput("stow my #{@herb1}") # in case there are extra
Expand All @@ -209,11 +209,11 @@ class Remedy
if DRC.bput("combine my #{@herb1}", 'You combine', 'too large to add', 'You must be holding both') == 'You must be holding both'
@count = 25 # 25 used to break loops
else
@count += Integer(DRC.bput("count my #{@herb1}", '\d+')) # increment to run again
@count += DRC.bput("count my #{@herb1}", '^You count out \d+').scan(/\d+/).first.to_i # increment to run again
end
end
else
@count += Integer(DRC.bput("count my #{@herb1}", '\d+'))
@count += DRC.bput("count my #{@herb1}", '^You count out \d+').scan(/\d+/).first.to_i
if DRC.bput("combine my #{@herb1}", 'You combine', 'too large to add', 'You must be holding both') == 'too large to add'
f_stack = DRC.bput("count my first #{@herb1}", 'You count out \d+ pieces').scan(/\d+/).first.to_i
s_stack = DRC.bput("count my second #{@herb1}", 'I could not find', 'You count out \d+ pieces').scan(/\d+/).first.to_i
Expand Down
2 changes: 1 addition & 1 deletion safe-room.lic
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class SafeRoom
end

def use_divine_charm?
return false unless exists?("divine charm") # charm gone (likely too high circle/skill), couldn't heal, return false, heal normal way
return false unless DRCI.exists?("divine charm") # charm gone (likely too high circle/skill), couldn't heal, return false, heal normal way

if /is currently "facing" left/ !~ DRC.bput('look my divine charm', /^Suspended along a rawhide cord is a .*/)
while /You get an intuitive sense from the charm that it will now heal you if invoked/ !~ DRC.bput('turn my divine charm', /^You get an intuitive sense from.*/)
Expand Down
Loading

0 comments on commit 3e19735

Please sign in to comment.