From 532357ac2abaf6f5c111b8731a170d29c23f3327 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 14 Jul 2024 18:38:48 -0700 Subject: [PATCH 01/13] fix missing double quote and duplicate character range in strip_nesting pattern --- inventory-manager.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 6d58c30ae1..17bb2705db 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -523,7 +523,7 @@ class InventoryManager end def strip_nesting(item) - if (match = /^(?[a-z "':!-]*(?\(closed\))?)\s\((?(?nested container[A-Za-z "':!-]*)\s\()?(?
in container[a-z '-]*)\)?\)\s(?\(.*\))$/i.match(item)) + if (match = /^(?[a-z "':!-]*(?\(closed\))?)\s\((?(?nested container[a-z "':!-]*)\s\()?(?
in container[a-z "':!-]*)\)?\)\s(?\(.*\))$/i.match(item)) return "#{match["tap"]} #{match["origin"]}" else return item From e7765cf1ab80c84821cc75990fd760be28d8ca36 Mon Sep 17 00:00:00 2001 From: Dantia Date: Mon, 15 Jul 2024 17:36:19 -0500 Subject: [PATCH 02/13] Improve foraged ingredient handling Add pause after putting foraged ingredient into herb storage container, to better prevent hitting RT. Changed from using "stow" ingredient to putting the ingredient in the desired crafting container. Stow was putting ingredients into other containers, causing issues with getting ingredients out again (particularly crushed vs uncrushed versions). --- alchemy.lic | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/alchemy.lic b/alchemy.lic index c4b19c6639..030a769ee5 100644 --- a/alchemy.lic +++ b/alchemy.lic @@ -81,6 +81,7 @@ class Alchemy end quantity_needed -= 6 # Forage forages 6 units. fput("put my #{ingredient['name']} in my #{@alchemy_herb_storage}") + pause 0.5 # Track the count down to make sure it stops when enough foraged. echo("quantity_needed = #{quantity_needed}") if @debug end @@ -107,9 +108,9 @@ class Alchemy f_stack = DRC.bput("count my first #{ingredient['output']}", 'You count out \d+ pieces').scan(/\d+/).first.to_i s_stack = DRC.bput("count my second #{ingredient['output']}", 'I could not find', 'You count out \d+ pieces').scan(/\d+/).first.to_i if f_stack == 75 - DRC.bput("stow my first #{ingredient['output']}", "You put") + DRC.bput("put my first #{ingredient['output']} in my #{@herb_container}", "You put") elsif s_stack == 75 - DRC.bput("stow my second #{ingredient['output']}", "You put", "Stow what?") + DRC.bput("put my second #{ingredient['output']} in my #{@herb_container}", "You put", "Stow what?") end end end From 88b1037ecf3ed07e59e23bd651d845bb290fdf0f Mon Sep 17 00:00:00 2001 From: Dantia <96893334+dantiadr@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:45:05 -0500 Subject: [PATCH 03/13] Fixed spacing --- alchemy.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alchemy.lic b/alchemy.lic index 030a769ee5..a5509b735d 100644 --- a/alchemy.lic +++ b/alchemy.lic @@ -81,7 +81,7 @@ class Alchemy end quantity_needed -= 6 # Forage forages 6 units. fput("put my #{ingredient['name']} in my #{@alchemy_herb_storage}") - pause 0.5 + pause 0.5 # Track the count down to make sure it stops when enough foraged. echo("quantity_needed = #{quantity_needed}") if @debug end From 38884c0d826615b34bfb7d4074cfe63c7bfa9a57 Mon Sep 17 00:00:00 2001 From: Dantia <96893334+dantiadr@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:44:00 -0500 Subject: [PATCH 04/13] Update alchemy.lic Co-authored-by: Mahtra <93822896+MahtraDR@users.noreply.github.com> --- alchemy.lic | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/alchemy.lic b/alchemy.lic index a5509b735d..860be6c030 100644 --- a/alchemy.lic +++ b/alchemy.lic @@ -80,8 +80,7 @@ class Alchemy waitrt? end quantity_needed -= 6 # Forage forages 6 units. - fput("put my #{ingredient['name']} in my #{@alchemy_herb_storage}") - pause 0.5 + DRCI.put_away_item?(ingredient['name'], @alchemy_herb_storage) # Track the count down to make sure it stops when enough foraged. echo("quantity_needed = #{quantity_needed}") if @debug end From d31eafe800246222a641644791f3ae352724312d Mon Sep 17 00:00:00 2001 From: Dantia <96893334+dantiadr@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:44:15 -0500 Subject: [PATCH 05/13] Update alchemy.lic Co-authored-by: Mahtra <93822896+MahtraDR@users.noreply.github.com> --- alchemy.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alchemy.lic b/alchemy.lic index 860be6c030..161252e06c 100644 --- a/alchemy.lic +++ b/alchemy.lic @@ -107,7 +107,7 @@ class Alchemy f_stack = DRC.bput("count my first #{ingredient['output']}", 'You count out \d+ pieces').scan(/\d+/).first.to_i s_stack = DRC.bput("count my second #{ingredient['output']}", 'I could not find', 'You count out \d+ pieces').scan(/\d+/).first.to_i if f_stack == 75 - DRC.bput("put my first #{ingredient['output']} in my #{@herb_container}", "You put") + DRCI.put_away_item?("first #{ingredient['output']}", @herb_container) elsif s_stack == 75 DRC.bput("put my second #{ingredient['output']} in my #{@herb_container}", "You put", "Stow what?") end From 42a0f9d340da015c44f0119f763bb449a6c2e0f5 Mon Sep 17 00:00:00 2001 From: Dantia <96893334+dantiadr@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:44:20 -0500 Subject: [PATCH 06/13] Update alchemy.lic Co-authored-by: Mahtra <93822896+MahtraDR@users.noreply.github.com> --- alchemy.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alchemy.lic b/alchemy.lic index 161252e06c..e9dd8a5ba6 100644 --- a/alchemy.lic +++ b/alchemy.lic @@ -109,7 +109,7 @@ class Alchemy if f_stack == 75 DRCI.put_away_item?("first #{ingredient['output']}", @herb_container) elsif s_stack == 75 - DRC.bput("put my second #{ingredient['output']} in my #{@herb_container}", "You put", "Stow what?") + DRCI.put_away_item?("second #{ingredient['output']}", @herb_container) end end end From 3023b5b1c26794fc3f68f36317a7feaea391ab9a Mon Sep 17 00:00:00 2001 From: Dantia Date: Tue, 16 Jul 2024 15:36:55 -0500 Subject: [PATCH 07/13] Add additional successful dissect message Added successful dissect message seen when dissecting telga orek. --- combat-trainer.lic | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index e320ca69d8..e9a0c3b1eb 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -956,8 +956,9 @@ class LootProcess /You learn something/i, 'A failed or completed ritual has rendered', 'You realize after a few seconds', - 'prevents a meaningful dissection') - when /You succeed in dissecting the corpse/, /You learn something/i + 'prevents a meaningful dissection', + "With less concern than you'd give a fresh corpse") + when /You succeed in dissecting the corpse/, /You learn something/i, /With less concern than you'd give a fresh corpse/ return true when /You'll gain no insights from this attempt/ waitrt? From 80fd603626482173641ac5259f132a42d25df745 Mon Sep 17 00:00:00 2001 From: Dantia Date: Tue, 16 Jul 2024 15:41:11 -0500 Subject: [PATCH 08/13] Revert "Add additional successful dissect message" This reverts commit 3023b5b1c26794fc3f68f36317a7feaea391ab9a. --- combat-trainer.lic | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index e9a0c3b1eb..e320ca69d8 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -956,9 +956,8 @@ class LootProcess /You learn something/i, 'A failed or completed ritual has rendered', 'You realize after a few seconds', - 'prevents a meaningful dissection', - "With less concern than you'd give a fresh corpse") - when /You succeed in dissecting the corpse/, /You learn something/i, /With less concern than you'd give a fresh corpse/ + 'prevents a meaningful dissection') + when /You succeed in dissecting the corpse/, /You learn something/i return true when /You'll gain no insights from this attempt/ waitrt? From 78d6cd736198b2032157f479da74f728412e84cf Mon Sep 17 00:00:00 2001 From: Dantia Date: Tue, 16 Jul 2024 15:45:43 -0500 Subject: [PATCH 09/13] Add successful dissect message Add additional successful dissect message seen when dissecting telga orek. --- combat-trainer.lic | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index e320ca69d8..e9a0c3b1eb 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -956,8 +956,9 @@ class LootProcess /You learn something/i, 'A failed or completed ritual has rendered', 'You realize after a few seconds', - 'prevents a meaningful dissection') - when /You succeed in dissecting the corpse/, /You learn something/i + 'prevents a meaningful dissection', + "With less concern than you'd give a fresh corpse") + when /You succeed in dissecting the corpse/, /You learn something/i, /With less concern than you'd give a fresh corpse/ return true when /You'll gain no insights from this attempt/ waitrt? From ef5c54c32ea023d5c382c9ff2d1585a7f8c37508 Mon Sep 17 00:00:00 2001 From: Dantia Date: Tue, 16 Jul 2024 15:58:28 -0500 Subject: [PATCH 10/13] Add magic disabled messaging With wild magic, a specific room might have magic disabled temporarily. Adding this message will allow the script to continue smoothly. --- attunement.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attunement.lic b/attunement.lic index a1ba26632c..d963a650e8 100644 --- a/attunement.lic +++ b/attunement.lic @@ -153,7 +153,7 @@ class Attunement end return true end - case DRC.bput(get_perceive_command, "You fail to sense", "You're not ready to do that again, yet", "You reach out", "You sense:", "Roundtime") + case DRC.bput(get_perceive_command, "You fail to sense", "You're not ready to do that again, yet", "You reach out", "You sense:", "Roundtime", "Something in the area is interfering") when "You reach out", "You sense:" true else From 6e9af3c446b8ff54771d5bfb875499403dd226f6 Mon Sep 17 00:00:00 2001 From: MahtraDR <93822896+MahtraDR@users.noreply.github.com> Date: Wed, 17 Jul 2024 13:57:36 +1200 Subject: [PATCH 11/13] [scripts][combat-trainer] Honor stop_hunting_if_bleeding for exiting combat We were defaulting to exiting combat with untendable bleeders. Now we honor the `stop_hunting_if_bleeding` setting, as with weird necros who want to heal in combat... --- combat-trainer.lic | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index e320ca69d8..7757faa189 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -1061,12 +1061,13 @@ class SafetyProcess Flags.add('ct-parasite', 'blood mite on your (?.*)\.') @equipment_manager = equipment_manager @health_threshold = settings.health_threshold + @stop_on_bleeding = settings.stop_hunting_if_bleeding echo(" @health_threshold: #{@health_threshold}") if $debug_mode_ct @untendable_counter = 0 end def execute(game_state) - if @untendable_counter >= 3 + if @untendable_counter >= 3 && @stop_on_bleeding echo('Skipping tendme check due to untendable backoff') if $debug_mode_ct echo("Couldn't tend bleeders after trying three times. Stopping hunt to heal.") $HUNTING_BUDDY.stop_hunting From 2c2ad764b613c33d1abdfacc793fc74f07439837 Mon Sep 17 00:00:00 2001 From: Dantia Date: Wed, 17 Jul 2024 10:07:28 -0500 Subject: [PATCH 12/13] Add Performance check Don't try to kick off performance if skill is capped. --- crossing-repair.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crossing-repair.lic b/crossing-repair.lic index 3a3ae972da..1e54c015cb 100644 --- a/crossing-repair.lic +++ b/crossing-repair.lic @@ -64,7 +64,7 @@ class CrossingRepair @hometown_data = get_data('town')[settings.hometown] # Start performance script for some sweet TDPs. - start_script('performance', ['noclean']) unless settings.instrument + start_script('performance', ['noclean']) unless settings.instrument || DRSkill.getrank('Performance') >= 1750 # Call our main repair handler function. repair_handler(town, settings) From 2fb1f7dd187ad534c30af2c3cd1c6d065f1d5fa8 Mon Sep 17 00:00:00 2001 From: Dantia Date: Wed, 17 Jul 2024 15:34:10 -0500 Subject: [PATCH 13/13] Fix slashes to double quotes Fixed slashes to double quotes for consistency. --- combat-trainer.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/combat-trainer.lic b/combat-trainer.lic index e9a0c3b1eb..b626ef1948 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -958,7 +958,7 @@ class LootProcess 'You realize after a few seconds', 'prevents a meaningful dissection', "With less concern than you'd give a fresh corpse") - when /You succeed in dissecting the corpse/, /You learn something/i, /With less concern than you'd give a fresh corpse/ + when /You succeed in dissecting the corpse/, /You learn something/i, "With less concern than you'd give a fresh corpse" return true when /You'll gain no insights from this attempt/ waitrt?