From fae151286434d901b7627c3f6465e10845c8111c Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 21:47:16 -0700 Subject: [PATCH 01/28] add inventory methods: storage book, vault book, pocket --- inventory-manager.lic | 60 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index d3bf2494d3..85b3cc15e9 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -16,9 +16,10 @@ class InventoryManager ], [ { name: 'save', regex: /save/i, description: "Save new or update current character's items to the database." }, - { name: 'vault_book', regex: /vault_book/i, optional: true, description: "DEPRECATED. Will call vault_standard." }, + { name: 'vault_book', regex: /vault_book/i, optional: true, description: "Uses vault book for inventory." }, { name: 'vault_regular', regex: /vault_regular/i, optional: true, description: "Rummages your vault to save items NOTE: must be standing by your open vault." }, { name: 'storage_box', regex: /storage_box/i, optional: true, description: "Rummages caravan storage box for items." }, + { name: 'storage_book', regex: /storage_book/i, optional: true, description: "Uses storage book for caravan items instead of rummaging." }, { name: 'family_vault', regex: /family_vault/i, optional: true, description: "Rummages your family vault to save items NOTE: must be standing by your open vault." }, { name: 'register', regex: /register/i, optional: true, description: "Reads contents of deed register." }, { name: 'eddy', regex: /eddy/i, optional: true, description: "Save the contents of an eddy (HE 436 Gift)." }, @@ -26,6 +27,7 @@ class InventoryManager { name: 'home', regex: /home/i, optional: true, description: "Save home inventory." }, { name: 'servant', regex: /servant/i, optional: true, description: "Save shadow servant inventory." }, { name: 'shop', regex: /shop/i, optional: true, description: "Save your Trader shop inventory." }, + { name: 'pocket', regex: /pocket/i, optional: true, description: "Rummages your secret pocket container to save items." }, { name: 'vault_standard', regex: /vault_standard/i, optional: true, description: "Uses VAULT STANDARD to get a list of items." } ], [ @@ -45,12 +47,11 @@ class InventoryManager args = parse_args(arg_definitions) @settings = get_settings @inventory_ignores = @settings.inventory_manager_ignores - + @vault_surfaces = @settings.inventory_manager_vault_surfaces setup if args.vault_book - DRC.message('Vault Book support has been removed in favor of VAULT STANDARD.') - add_vault_standard + add_vault_book elsif args.vault_standard add_vault_standard elsif args.vault_regular @@ -64,6 +65,8 @@ class InventoryManager add_eddy_inv elsif args.storage_box add_storage_box_inv + elsif args.storage_book + add_storage_book elsif args.scrolls add_scrolls elsif args.home @@ -72,6 +75,8 @@ class InventoryManager add_shadow_servant elsif args.shop add_trader_shop + elsif args.pocket + add_pocket_inv elsif args.save add_current_inv elsif args.count @@ -124,7 +129,7 @@ class InventoryManager end def valid_data_row(item) - if item.include?('(vault)') || item.include?('(register)') || item.include?('(eddy)') || item.include?('(caravan_box)') || item.include?('(Family)') + if item.include?('(vault)') || item.include?('(register)') || item.include?('(eddy)') || item.include?('(caravan_box)') || item.include?('(Family)') || item.include?('(pocket)') true else false @@ -185,7 +190,6 @@ class InventoryManager get_item_data(inventory_type) capture = Lich::Util.issue_command(command, end_pattern) - lines = capture # when rummaging, this block splits the items, including the last two that are split by and instead of a comma if command.start_with?("rummage") @@ -207,7 +211,10 @@ class InventoryManager next if item.empty? next if item.start_with?(*@inventory_ignores) - + if item.start_with?(*@vault_surfaces) + container = item.to_s + next + end # if the item starts with a -, it's in a container if item[0].eql? '-' item[0] = '' @@ -223,6 +230,20 @@ class InventoryManager else container = item.to_s end + elsif /vault book/.match(command) + # items in vault book output are prefixed by 6 spaces + if line =~ /\s{6}(?:a|an|some) / + item.concat(" (in container - #{container})") + else + container = item.to_s + end + elsif /storage book/.match(command) + # items in a storage book are prefixed by 6 spaces + if line =~ /\s{6}(?:a|an|some) / + item.concat(" (in container - #{container})") + else + container = item.to_s + end elsif command == 'vault standard' # items in a container are prefixed by 11 spaces once the item count is removed if line =~ /\s{11}(?:a|an|some) / @@ -242,6 +263,7 @@ class InventoryManager item.concat(" (#{inventory_type})") + next if item.start_with?(*@inventory_ignores) @item_data[@active_character] << item end @@ -262,6 +284,15 @@ class InventoryManager check_inventory("vault standard", /^Vault Inventory:/, 'vault') end + def add_vault_book + unless DRCI.get_item_if_not_held?("vault book") + DRC.message("Unable to find your vault book, exiting!") + exit + end + check_inventory("read my vault book", /^Vault Inventory/, 'vault') + DRCI.stow_item?("book") + end + def add_current_inv check_inventory("inv list", /^You have:/, 'character') end @@ -284,7 +315,16 @@ class InventoryManager end def add_storage_box_inv - check_inventory("rummage storage boc", /^You rummage through a storage box/, 'caravan_box', 41) + check_inventory("rummage storage box", /^You rummage through a storage box/, 'caravan_box', 41) + end + + def add_storage_book + unless DRCI.get_item_if_not_held?("storage book") + DRC.message("Unable to find your storage book, exiting!") + exit + end + check_inventory("read my storage book", /^\W+in the known realms since 402/, 'caravan_box') + DRCI.stow_item?("book") end def add_family_vault @@ -295,6 +335,10 @@ class InventoryManager check_inventory("rummage vault", /^You rummage through a secure vault/, 'vault', 42) end + def add_pocket_inv + check_inventory("rummage my pocket", /^You rummage through a pocket/, 'pocket', 36) + end + def add_scrolls stacker_container = (@settings.scroll_sorter['stacker_container'] || @settings.stacker_container) unless stacker_container From 3a951925c933133fbbb8b7e76424180469be7723 Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 21:49:43 -0700 Subject: [PATCH 02/28] add storage book ignores, separate surfaces for container logic --- profiles/base.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/profiles/base.yaml b/profiles/base.yaml index e2ce31a29b..14acf37e31 100644 --- a/profiles/base.yaml +++ b/profiles/base.yaml @@ -2190,13 +2190,6 @@ inventory_manager_ignores: - 'Vault Inventory' - 'Done' - 'The last note' - - 'a brass hook' - - 'a steel wire rack' - - 'a small shelf' - - 'a top drawer' - - 'a middle drawer' - - 'a bottom drawer' - - 'a large shelf' - 'Inside a' - 'Page' - 'Stored Deeds' @@ -2205,6 +2198,17 @@ inventory_manager_ignores: - 'The home contains' - 'Within the belly' - 'Your Servant is holding' + - 'in the known realms' + - 'A notation at' + +inventory_manager_vault_surfaces: + - 'a brass hook' + - 'a steel wire rack' + - 'a small shelf' + - 'a top drawer' + - 'a middle drawer' + - 'a bottom drawer' + - 'a large shelf' stabbity: From 4d166f4d7a5094ea25ea1f3bc2e5c4ef0bc21c6a Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 21:59:37 -0700 Subject: [PATCH 03/28] fix linting issues --- inventory-manager.lic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 85b3cc15e9..a72743cd2b 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -76,7 +76,7 @@ class InventoryManager elsif args.shop add_trader_shop elsif args.pocket - add_pocket_inv + add_pocket_inv elsif args.save add_current_inv elsif args.count @@ -211,6 +211,7 @@ class InventoryManager next if item.empty? next if item.start_with?(*@inventory_ignores) + if item.start_with?(*@vault_surfaces) container = item.to_s next @@ -263,7 +264,6 @@ class InventoryManager item.concat(" (#{inventory_type})") - next if item.start_with?(*@inventory_ignores) @item_data[@active_character] << item end From 98595d14c1cce4d63ad5895cd8d37aaaf501c853 Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 22:34:59 -0700 Subject: [PATCH 04/28] update argument descriptions --- inventory-manager.lic | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index a72743cd2b..673be345f6 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -16,10 +16,10 @@ class InventoryManager ], [ { name: 'save', regex: /save/i, description: "Save new or update current character's items to the database." }, - { name: 'vault_book', regex: /vault_book/i, optional: true, description: "Uses vault book for inventory." }, + { name: 'vault_book', regex: /vault_book/i, optional: true, description: "Uses vault book to get a list of items from your vault." }, { name: 'vault_regular', regex: /vault_regular/i, optional: true, description: "Rummages your vault to save items NOTE: must be standing by your open vault." }, { name: 'storage_box', regex: /storage_box/i, optional: true, description: "Rummages caravan storage box for items." }, - { name: 'storage_book', regex: /storage_book/i, optional: true, description: "Uses storage book for caravan items instead of rummaging." }, + { name: 'storage_book', regex: /storage_book/i, optional: true, description: "Uses storage book to get a list of items from your caravan storage box." }, { name: 'family_vault', regex: /family_vault/i, optional: true, description: "Rummages your family vault to save items NOTE: must be standing by your open vault." }, { name: 'register', regex: /register/i, optional: true, description: "Reads contents of deed register." }, { name: 'eddy', regex: /eddy/i, optional: true, description: "Save the contents of an eddy (HE 436 Gift)." }, @@ -27,7 +27,7 @@ class InventoryManager { name: 'home', regex: /home/i, optional: true, description: "Save home inventory." }, { name: 'servant', regex: /servant/i, optional: true, description: "Save shadow servant inventory." }, { name: 'shop', regex: /shop/i, optional: true, description: "Save your Trader shop inventory." }, - { name: 'pocket', regex: /pocket/i, optional: true, description: "Rummages your secret pocket container to save items." }, + { name: 'pocket', regex: /pocket/i, optional: true, description: "Rummages your secret pocket container for list of items. NOTE: Must be wearing the container." }, { name: 'vault_standard', regex: /vault_standard/i, optional: true, description: "Uses VAULT STANDARD to get a list of items." } ], [ From 54ccb23fcd1e648160f7d9fa7d065a25a122e7a5 Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 23:30:14 -0700 Subject: [PATCH 05/28] loop issue_command until proper response --- inventory-manager.lic | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 673be345f6..3e50bfdd93 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -16,10 +16,10 @@ class InventoryManager ], [ { name: 'save', regex: /save/i, description: "Save new or update current character's items to the database." }, - { name: 'vault_book', regex: /vault_book/i, optional: true, description: "Uses vault book to get a list of items from your vault." }, + { name: 'vault_book', regex: /vault_book/i, optional: true, description: "Uses vault book for inventory." }, { name: 'vault_regular', regex: /vault_regular/i, optional: true, description: "Rummages your vault to save items NOTE: must be standing by your open vault." }, { name: 'storage_box', regex: /storage_box/i, optional: true, description: "Rummages caravan storage box for items." }, - { name: 'storage_book', regex: /storage_book/i, optional: true, description: "Uses storage book to get a list of items from your caravan storage box." }, + { name: 'storage_book', regex: /storage_book/i, optional: true, description: "Uses storage book for caravan items instead of rummaging." }, { name: 'family_vault', regex: /family_vault/i, optional: true, description: "Rummages your family vault to save items NOTE: must be standing by your open vault." }, { name: 'register', regex: /register/i, optional: true, description: "Reads contents of deed register." }, { name: 'eddy', regex: /eddy/i, optional: true, description: "Save the contents of an eddy (HE 436 Gift)." }, @@ -27,7 +27,7 @@ class InventoryManager { name: 'home', regex: /home/i, optional: true, description: "Save home inventory." }, { name: 'servant', regex: /servant/i, optional: true, description: "Save shadow servant inventory." }, { name: 'shop', regex: /shop/i, optional: true, description: "Save your Trader shop inventory." }, - { name: 'pocket', regex: /pocket/i, optional: true, description: "Rummages your secret pocket container for list of items. NOTE: Must be wearing the container." }, + { name: 'pocket', regex: /pocket/i, optional: true, description: "Rummages your secret pocket container to save items." }, { name: 'vault_standard', regex: /vault_standard/i, optional: true, description: "Uses VAULT STANDARD to get a list of items." } ], [ @@ -154,7 +154,10 @@ class InventoryManager count, closed = 0, 0 if desc.nil? # Counting all items in inventory - capture = Lich::Util.issue_command('inv list', /^You have:/) + capture = [] + until capture != [] + capture = Lich::Util.issue_command('inv list', /^You have:/) + end capture.each do |line| item = line.lstrip @@ -167,7 +170,10 @@ class InventoryManager DRC.message("You have #{count} items, #{closed} of which are (closed) containers.") else # Counting items matching the description, i.e., inv count pouch - capture = Lich::Util.issue_command("inv search #{desc}", /rummage about your person/) + capture = [] + until capture != [] + capture = Lich::Util.issue_command("inv search #{desc}", /rummage about your person/) + end capture.each do |line| item = line.lstrip @@ -189,7 +195,10 @@ class InventoryManager get_item_data(inventory_type) - capture = Lich::Util.issue_command(command, end_pattern) + capture = [] + until capture != [] + capture = Lich::Util.issue_command(command, end_pattern) + end lines = capture # when rummaging, this block splits the items, including the last two that are split by and instead of a comma if command.start_with?("rummage") @@ -382,7 +391,10 @@ class InventoryManager def check_scroll_stacker(stacker) spells = [] - capture = Lich::Util.issue_command("flip my #{stacker.split.last}", /^You flip through the #{stacker.split.last}, checking each section before closing it.$/) + capture = [] + until capture != [] + capture = Lich::Util.issue_command("flip my #{stacker.split.last}", /^You flip through the #{stacker.split.last}, checking each section before closing it.$/) + end capture.each do |line| if line =~ /The (.+) section has (\d+)/ spell = "#{Regexp.last_match(1)} (#{Regexp.last_match(2)})" @@ -423,7 +435,10 @@ class InventoryManager get_item_data('trader_shop') surfaces = Hash.new - capture = Lich::Util.issue_command("shop customer", /^The following items contain goods for sale:/) + capture = [] + until capture != [] + capture = Lich::Util.issue_command("shop customer", /^The following items contain goods for sale:/) + end capture.each do |line| line = line.lstrip @@ -436,7 +451,10 @@ class InventoryManager end surfaces.each do |surface| - capture = Lich::Util.issue_command(surface[1], /, you see:/) + capture = [] + until capture != [] + capture = Lich::Util.issue_command(surface[1], /, you see:/) + end capture.each do |line| line = line.lstrip From a2ae59dc311881d89554b831a6bcdf85c8b90de4 Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 23:41:14 -0700 Subject: [PATCH 06/28] update to resolve undefined method --- inventory-manager.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 3e50bfdd93..3082462b86 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -320,7 +320,7 @@ class InventoryManager end def add_eddy_inv - checkInventory("inv eddy", /^Inside a/, 'eddy') + check_inventory("inv eddy", /^Inside a/, 'eddy') end def add_storage_box_inv From cfdc2a8386a3572fa33ad9cda852e87dd95e6927 Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 23:45:09 -0700 Subject: [PATCH 07/28] handle empty register --- inventory-manager.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 3082462b86..7a8c8d4c28 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -314,7 +314,7 @@ class InventoryManager DRC.bput("turn my register to contents", 'You flip your deed register', 'already at the table of contents') - check_inventory("read my register", /^Stored Deeds:/, 'register') + check_inventory("read my register", /^Stored Deeds:|You haven't stored any deeds in this register/, 'register') DRCI.stow_item?("register") end From 4f2b8ef0f4ae766b428734f4e3a05558668abdf4 Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 23:51:24 -0700 Subject: [PATCH 08/28] add ignore for empty storage book --- profiles/base.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/profiles/base.yaml b/profiles/base.yaml index 14acf37e31..e132680fd7 100644 --- a/profiles/base.yaml +++ b/profiles/base.yaml @@ -2200,6 +2200,7 @@ inventory_manager_ignores: - 'Your Servant is holding' - 'in the known realms' - 'A notation at' + - '...You have nothing currently stored' inventory_manager_vault_surfaces: - 'a brass hook' From 228949b150fb94b18b92b682f9655b336761b51f Mon Sep 17 00:00:00 2001 From: desertkaz Date: Sun, 7 Jul 2024 23:55:21 -0700 Subject: [PATCH 09/28] update argument descriptions --- inventory-manager.lic | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 7a8c8d4c28..e9d2971eb9 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -16,10 +16,10 @@ class InventoryManager ], [ { name: 'save', regex: /save/i, description: "Save new or update current character's items to the database." }, - { name: 'vault_book', regex: /vault_book/i, optional: true, description: "Uses vault book for inventory." }, + { name: 'vault_book', regex: /vault_book/i, optional: true, description: "Uses vault book to get a list of items from your vault." }, { name: 'vault_regular', regex: /vault_regular/i, optional: true, description: "Rummages your vault to save items NOTE: must be standing by your open vault." }, { name: 'storage_box', regex: /storage_box/i, optional: true, description: "Rummages caravan storage box for items." }, - { name: 'storage_book', regex: /storage_book/i, optional: true, description: "Uses storage book for caravan items instead of rummaging." }, + { name: 'storage_book', regex: /storage_book/i, optional: true, description: "Uses storage book to get a list of items from your caravan storage box." }, { name: 'family_vault', regex: /family_vault/i, optional: true, description: "Rummages your family vault to save items NOTE: must be standing by your open vault." }, { name: 'register', regex: /register/i, optional: true, description: "Reads contents of deed register." }, { name: 'eddy', regex: /eddy/i, optional: true, description: "Save the contents of an eddy (HE 436 Gift)." }, @@ -27,7 +27,7 @@ class InventoryManager { name: 'home', regex: /home/i, optional: true, description: "Save home inventory." }, { name: 'servant', regex: /servant/i, optional: true, description: "Save shadow servant inventory." }, { name: 'shop', regex: /shop/i, optional: true, description: "Save your Trader shop inventory." }, - { name: 'pocket', regex: /pocket/i, optional: true, description: "Rummages your secret pocket container to save items." }, + { name: 'pocket', regex: /pocket/i, optional: true, description: "Rummages your secret pocket container for list of items. NOTE: Must be wearing the container." }, { name: 'vault_standard', regex: /vault_standard/i, optional: true, description: "Uses VAULT STANDARD to get a list of items." } ], [ From 28c3f474769c4ae575c5a770f52b73f7306be59a Mon Sep 17 00:00:00 2001 From: desertkaz Date: Mon, 8 Jul 2024 19:04:14 -0700 Subject: [PATCH 10/28] combine vault and storage book behavior, add some spacing for consistency --- inventory-manager.lic | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index e9d2971eb9..876acae8bd 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -240,15 +240,8 @@ class InventoryManager else container = item.to_s end - elsif /vault book/.match(command) - # items in vault book output are prefixed by 6 spaces - if line =~ /\s{6}(?:a|an|some) / - item.concat(" (in container - #{container})") - else - container = item.to_s - end - elsif /storage book/.match(command) - # items in a storage book are prefixed by 6 spaces + elsif command == "read my storage book" || command == "read my vault book" + # items in vault/storage book output are prefixed by 6 spaces if line =~ /\s{6}(?:a|an|some) / item.concat(" (in container - #{container})") else @@ -298,7 +291,9 @@ class InventoryManager DRC.message("Unable to find your vault book, exiting!") exit end + check_inventory("read my vault book", /^Vault Inventory/, 'vault') + DRCI.stow_item?("book") end @@ -332,7 +327,9 @@ class InventoryManager DRC.message("Unable to find your storage book, exiting!") exit end + check_inventory("read my storage book", /^\W+in the known realms since 402/, 'caravan_box') + DRCI.stow_item?("book") end From 5c125602353fd06200a943f78f44e21d593dd6cb Mon Sep 17 00:00:00 2001 From: desertkaz Date: Mon, 8 Jul 2024 19:05:36 -0700 Subject: [PATCH 11/28] fix linting issues --- inventory-manager.lic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 876acae8bd..cd3b9e9a63 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -291,9 +291,9 @@ class InventoryManager DRC.message("Unable to find your vault book, exiting!") exit end - + check_inventory("read my vault book", /^Vault Inventory/, 'vault') - + DRCI.stow_item?("book") end From 048ef8cf8bc28bedde8e5d299b6e11075384970f Mon Sep 17 00:00:00 2001 From: desertkaz Date: Mon, 8 Jul 2024 19:31:58 -0700 Subject: [PATCH 12/28] reduce timeout to 3s for retry on Lich::Util. Made nested match N+ characters to prevent overflow into default case. --- inventory-manager.lic | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index cd3b9e9a63..48c55e3f31 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -156,7 +156,7 @@ class InventoryManager # Counting all items in inventory capture = [] until capture != [] - capture = Lich::Util.issue_command('inv list', /^You have:/) + capture = Lich::Util.issue_command('inv list', /^You have:/, timeout: 3) end capture.each do |line| item = line.lstrip @@ -172,7 +172,7 @@ class InventoryManager # Counting items matching the description, i.e., inv count pouch capture = [] until capture != [] - capture = Lich::Util.issue_command("inv search #{desc}", /rummage about your person/) + capture = Lich::Util.issue_command("inv search #{desc}", /rummage about your person/, timeout: 3) end capture.each do |line| item = line.lstrip @@ -197,7 +197,7 @@ class InventoryManager capture = [] until capture != [] - capture = Lich::Util.issue_command(command, end_pattern) + capture = Lich::Util.issue_command(command, end_pattern, timeout: 3) end lines = capture # when rummaging, this block splits the items, including the last two that are split by and instead of a comma @@ -214,6 +214,7 @@ class InventoryManager end container = "" + sub_container = "" lines.each do |line| line.sub!(/\(\d+\)/, '') if command == 'vault standard' item = line.lstrip @@ -242,18 +243,24 @@ class InventoryManager end elsif command == "read my storage book" || command == "read my vault book" # items in vault/storage book output are prefixed by 6 spaces - if line =~ /\s{6}(?:a|an|some) / - item.concat(" (in container - #{container})") - else - container = item.to_s - end + if line =~ /\s{8,}(?:a|an|some) / + item.concat(" (nested container - #{sub_container})") + elsif line =~ /\s{6}(?:a|an|some) / + item.concat(" (in container - #{container})") + sub_container = item.to_s + else + container = item.to_s + end elsif command == 'vault standard' # items in a container are prefixed by 11 spaces once the item count is removed - if line =~ /\s{11}(?:a|an|some) / - item.concat(" (in container - #{container})") - else - container = item.to_s - end + if line =~ /\s{16,}(?:a|an|some) / + item.concat(" (nested container - #{sub_container})") + elsif line =~ /\s{11}(?:a|an|some) / + item.concat(" (in container - #{container})") + sub_container = item.to_s + else + container = item.to_s + end elsif inventory_type == 'home' if !item.start_with?("Attached:") item = clean_home_string(item) @@ -390,7 +397,7 @@ class InventoryManager spells = [] capture = [] until capture != [] - capture = Lich::Util.issue_command("flip my #{stacker.split.last}", /^You flip through the #{stacker.split.last}, checking each section before closing it.$/) + capture = Lich::Util.issue_command("flip my #{stacker.split.last}", /^You flip through the #{stacker.split.last}, checking each section before closing it.$/, timeout: 3) end capture.each do |line| if line =~ /The (.+) section has (\d+)/ @@ -434,7 +441,7 @@ class InventoryManager surfaces = Hash.new capture = [] until capture != [] - capture = Lich::Util.issue_command("shop customer", /^The following items contain goods for sale:/) + capture = Lich::Util.issue_command("shop customer", /^The following items contain goods for sale:/, timeout: 3) end capture.each do |line| line = line.lstrip @@ -450,7 +457,7 @@ class InventoryManager surfaces.each do |surface| capture = [] until capture != [] - capture = Lich::Util.issue_command(surface[1], /, you see:/) + capture = Lich::Util.issue_command(surface[1], /, you see:/, timeout: 3) end capture.each do |line| line = line.lstrip From a62e66b557b2a33145542a7822804031f2c5ac8f Mon Sep 17 00:00:00 2001 From: desertkaz Date: Mon, 8 Jul 2024 20:22:55 -0700 Subject: [PATCH 13/28] add waitrt? to the Lich::Util call. Add container nesting logic to character inventory. --- inventory-manager.lic | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 48c55e3f31..3ebaf149da 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -156,7 +156,7 @@ class InventoryManager # Counting all items in inventory capture = [] until capture != [] - capture = Lich::Util.issue_command('inv list', /^You have:/, timeout: 3) + capture = Lich::Util.issue_command('inv list', /^You have:/, timeout: 3) unless waitrt? end capture.each do |line| item = line.lstrip @@ -172,7 +172,7 @@ class InventoryManager # Counting items matching the description, i.e., inv count pouch capture = [] until capture != [] - capture = Lich::Util.issue_command("inv search #{desc}", /rummage about your person/, timeout: 3) + capture = Lich::Util.issue_command("inv search #{desc}", /rummage about your person/, timeout: 3) unless waitrt? end capture.each do |line| item = line.lstrip @@ -197,7 +197,7 @@ class InventoryManager capture = [] until capture != [] - capture = Lich::Util.issue_command(command, end_pattern, timeout: 3) + capture = Lich::Util.issue_command(command, end_pattern, timeout: 3) unless waitrt? end lines = capture # when rummaging, this block splits the items, including the last two that are split by and instead of a comma @@ -229,7 +229,14 @@ class InventoryManager # if the item starts with a -, it's in a container if item[0].eql? '-' item[0] = '' - item.concat(" (in container - #{container})") + if line =~ /\s{8,}-(?:a|an|some) / + item.concat(" (nested container - #{sub_container})") + elsif line =~ /\s{5}-(?:a|an|some) / + item.concat(" (in container - #{container})") + sub_container = item.to_s + else + container = item.to_s + end elsif inventory_type == 'character' # We don't want the inventory_type here as it's extra noise, so we do a .to_s so container doesn't get updated by changing item later container = (item.include?("eddy") ? "eddy" : item).to_s @@ -397,7 +404,7 @@ class InventoryManager spells = [] capture = [] until capture != [] - capture = Lich::Util.issue_command("flip my #{stacker.split.last}", /^You flip through the #{stacker.split.last}, checking each section before closing it.$/, timeout: 3) + capture = Lich::Util.issue_command("flip my #{stacker.split.last}", /^You flip through the #{stacker.split.last}, checking each section before closing it.$/, timeout: 3) unless waitrt? end capture.each do |line| if line =~ /The (.+) section has (\d+)/ @@ -441,7 +448,7 @@ class InventoryManager surfaces = Hash.new capture = [] until capture != [] - capture = Lich::Util.issue_command("shop customer", /^The following items contain goods for sale:/, timeout: 3) + capture = Lich::Util.issue_command("shop customer", /^The following items contain goods for sale:/, timeout: 3) unless waitrt? end capture.each do |line| line = line.lstrip @@ -457,7 +464,7 @@ class InventoryManager surfaces.each do |surface| capture = [] until capture != [] - capture = Lich::Util.issue_command(surface[1], /, you see:/, timeout: 3) + capture = Lich::Util.issue_command(surface[1], /, you see:/, timeout: 3) unless waitrt? end capture.each do |line| line = line.lstrip From 11c7a22f70cbb5c2f35f4f31680843887005c07a Mon Sep 17 00:00:00 2001 From: desertkaz Date: Mon, 8 Jul 2024 20:26:04 -0700 Subject: [PATCH 14/28] fix linting issues --- inventory-manager.lic | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index 3ebaf149da..ca6e5d4b7e 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -230,12 +230,12 @@ class InventoryManager if item[0].eql? '-' item[0] = '' if line =~ /\s{8,}-(?:a|an|some) / - item.concat(" (nested container - #{sub_container})") + item.concat(" (nested container - #{sub_container})") elsif line =~ /\s{5}-(?:a|an|some) / - item.concat(" (in container - #{container})") - sub_container = item.to_s + item.concat(" (in container - #{container})") + sub_container = item.to_s else - container = item.to_s + container = item.to_s end elsif inventory_type == 'character' # We don't want the inventory_type here as it's extra noise, so we do a .to_s so container doesn't get updated by changing item later @@ -251,23 +251,23 @@ class InventoryManager elsif command == "read my storage book" || command == "read my vault book" # items in vault/storage book output are prefixed by 6 spaces if line =~ /\s{8,}(?:a|an|some) / - item.concat(" (nested container - #{sub_container})") - elsif line =~ /\s{6}(?:a|an|some) / - item.concat(" (in container - #{container})") - sub_container = item.to_s - else - container = item.to_s - end + item.concat(" (nested container - #{sub_container})") + elsif line =~ /\s{6}(?:a|an|some) / + item.concat(" (in container - #{container})") + sub_container = item.to_s + else + container = item.to_s + end elsif command == 'vault standard' # items in a container are prefixed by 11 spaces once the item count is removed if line =~ /\s{16,}(?:a|an|some) / - item.concat(" (nested container - #{sub_container})") - elsif line =~ /\s{11}(?:a|an|some) / - item.concat(" (in container - #{container})") - sub_container = item.to_s - else - container = item.to_s - end + item.concat(" (nested container - #{sub_container})") + elsif line =~ /\s{11}(?:a|an|some) / + item.concat(" (in container - #{container})") + sub_container = item.to_s + else + container = item.to_s + end elsif inventory_type == 'home' if !item.start_with?("Attached:") item = clean_home_string(item) From d514db9eff4e1680f3d7cb222af426cadb0b1d47 Mon Sep 17 00:00:00 2001 From: desertkaz Date: Tue, 9 Jul 2024 19:46:06 -0700 Subject: [PATCH 15/28] combine shadow servant w/ vault/storage books for formatting and add edge case first words. --- inventory-manager.lic | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index ca6e5d4b7e..d239c98736 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -229,9 +229,9 @@ class InventoryManager # if the item starts with a -, it's in a container if item[0].eql? '-' item[0] = '' - if line =~ /\s{8,}-(?:a|an|some) / + if line =~ /\s{8,}-(?:a|an|some|the|several|clusters|one) / item.concat(" (nested container - #{sub_container})") - elsif line =~ /\s{5}-(?:a|an|some) / + elsif line =~ /\s{5}-(?:a|an|some|the|several|clusters|one) / item.concat(" (in container - #{container})") sub_container = item.to_s else @@ -241,18 +241,11 @@ class InventoryManager # We don't want the inventory_type here as it's extra noise, so we do a .to_s so container doesn't get updated by changing item later container = (item.include?("eddy") ? "eddy" : item).to_s item.concat(' (worn)') - elsif inventory_type == 'shadow_servant' - # items in a container are prefixed by 6 spaces - if line =~ /\s{6}(?:a|an|some) / - item.concat(" (in container - #{container})") - else - container = item.to_s - end - elsif command == "read my storage book" || command == "read my vault book" - # items in vault/storage book output are prefixed by 6 spaces - if line =~ /\s{8,}(?:a|an|some) / + elsif command == "read my storage book" || command == "read my vault book" || inventory_type == "shadow_servant" + # Vault book, storage book and shadow servant via PG all have same output formatting + if line =~ /\s{8,}(?:a|an|some|the|several|clusters|one) / item.concat(" (nested container - #{sub_container})") - elsif line =~ /\s{6}(?:a|an|some) / + elsif line =~ /\s{6}(?:a|an|some|the|several|clusters|one) / item.concat(" (in container - #{container})") sub_container = item.to_s else @@ -260,9 +253,9 @@ class InventoryManager end elsif command == 'vault standard' # items in a container are prefixed by 11 spaces once the item count is removed - if line =~ /\s{16,}(?:a|an|some) / + if line =~ /\s{16,}(?:a|an|some|the|several|clusters|one) / item.concat(" (nested container - #{sub_container})") - elsif line =~ /\s{11}(?:a|an|some) / + elsif line =~ /\s{11}(?:a|an|some|the|several|clusters|one) / item.concat(" (in container - #{container})") sub_container = item.to_s else From 143c2e5ab878dc3659eef3467628030379ab58c5 Mon Sep 17 00:00:00 2001 From: "Ryan P. McKinnon" <15917743+mrhoribu@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:28:45 -0400 Subject: [PATCH 16/28] [script][bescort.lic] get_fare? bug in variable name get_fare? def has a missed `@settings` call that wasn't updated from `settings` causing a failure in code execution due to invalid variable/method. --- bescort.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bescort.lic b/bescort.lic index 2bac60a369..78097034bf 100644 --- a/bescort.lic +++ b/bescort.lic @@ -2029,7 +2029,7 @@ class Bescort end @settings.hometown = town succeeded = false - DRCM.minimize_coins(amount).each { |each_amount| succeeded = DRCM.get_money_from_bank(each_amount, settings) } + DRCM.minimize_coins(amount).each { |each_amount| succeeded = DRCM.get_money_from_bank(each_amount, @settings) } echo "Put some fare money in the #{town} bank!" unless succeeded manual_go2(room) succeeded From 6219e1e2e2ef5d4b0dc3134d15149a2703579899 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 12 Jul 2024 00:30:58 -0700 Subject: [PATCH 17/28] make nested container information an option vs default for output --- inventory-manager.lic | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/inventory-manager.lic b/inventory-manager.lic index d239c98736..6d58c30ae1 100644 --- a/inventory-manager.lic +++ b/inventory-manager.lic @@ -32,11 +32,13 @@ class InventoryManager ], [ { name: 'search', regex: /search/i, description: 'Start a search across all characters for specified item.' }, - { name: 'item', regex: /\w+/i, optional: false, description: 'Item to find.' } + { name: 'item', regex: /\w+/i, optional: false, description: 'Item to find.' }, + { name: 'nest', regex: /nest|-n/i, optional: true, description: 'Print the nesting container data', default: false } ], [ { name: 'list', regex: /list/i, description: "Print out a list of names in the database." }, - { name: 'name', regex: /\w+/i, optional: true, description: "List full inventory for specified character. (Can spam!)" } + { name: 'name', regex: /\w+/i, optional: true, description: "List full inventory for specified character. (Can spam!)" }, + { name: 'nest', regex: /nest|-n/i, optional: true, description: 'Print the nesting container data', default: false } ], [ { name: 'remove', regex: /remove/i, description: "Remove character's inventory." }, @@ -84,9 +86,9 @@ class InventoryManager elsif args.remove remove_character_data(args.name) elsif args.search - search_for_item(args.item) + search_for_item(args.item, args.nest) elsif args.list - list_character_inv(args.name) + list_character_inv(args.name, args.nest) else DRC.message('Type ;inventory-manager help for a usage guide') end @@ -471,7 +473,7 @@ class InventoryManager save_item_data('trader_shop') end - def list_character_inv(name) + def list_character_inv(name, nested) if name.nil? DRC.message("There is inventory data for:") @item_data.each do |k, v| @@ -489,13 +491,18 @@ class InventoryManager name_sym = name.capitalize.to_sym if @item_data.has_key?(name_sym) DRC.message("Inventory for #{name.capitalize}") - @item_data[name_sym].each { |item| DRC.message(" - #{item}") } + @item_data[name_sym].each { |item| + if !nested + item = strip_nesting(item) + end + DRC.message(" - #{item}") + } else DRC.message("No data found for the character #{name.capitalize}!") end end - def search_for_item(item) + def search_for_item(item, nested) total_found = 0 @item_data.each do |k, v| next if k == @version_string @@ -503,6 +510,9 @@ class InventoryManager total_found = 0 DRC.message("Checking #{k}:") v.each { |data| + if !nested + data = strip_nesting(data) + end if data.downcase.include?(item) total_found += 1 DRC.message("Match #{total_found}): #{data}") @@ -512,6 +522,14 @@ class InventoryManager end 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)) + return "#{match["tap"]} #{match["origin"]}" + else + return item + end + end + def remove_character_data(name_to_remove) return if name_to_remove == "version" From c050529b6eb7be402d0bea6b02ff7ae0bdf1c135 Mon Sep 17 00:00:00 2001 From: hat071af Date: Fri, 12 Jul 2024 23:12:19 -0700 Subject: [PATCH 18/28] Update textsubs.lic - added fix for regex used with textsubs_use_plat_grouping for extremely large plat values. When `textsubs_use_plat_grouping: true` is set the output of currency amounts >=1000 plat was not displaying correctly. Fixed the regex to properly sub in such cases. Before: `You are certain that the icesteel mask is worth exactly 1156,2500 Kronars.` `You think it is likely that the icesteel hauberk is worth around 1,8749,9987 Kronars.` After: `You think it is likely that the icesteel mask is worth exactly 1,156,2500 Kronars.` `You estimate that the icesteel hauberk is worth about 18,749,9993 Kronars.` --- textsubs.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/textsubs.lic b/textsubs.lic index 516c9a9b75..9f2b3fd3ea 100644 --- a/textsubs.lic +++ b/textsubs.lic @@ -823,7 +823,7 @@ end # Commas when dealing with coins if settings.textsubs_use_plat_grouping - TextSubs.add('(?!.*>)\d{1,3}(?=(\d{4})+(?!\d)(?! platinum).*(Kronar|Dokora|Lirum))', '\&,') + TextSubs.add('(?!.*>)\d{1,3}(?=((\d{3})+|)(\d{4})(?!\d)(?! platinum).*(Kronar|Dokora|Lirum))', '\&,') TextSubs.add('(?!.*>)\d{1,3}(?=(\d{3})+(?!\d) platinum.*(Kronar|Dokora|Lirum))', '\&,') else TextSubs.add('(?!.*>)\d{1,3}(?=(\d{3})+(?!\d).*(Kronar|Dokora|Lirum))', '\&,') From 9efdb672c39062d010b1d0b363dcd56f23b03692 Mon Sep 17 00:00:00 2001 From: hat071af Date: Sat, 13 Jul 2024 00:13:48 -0700 Subject: [PATCH 19/28] Update textsubs.lic - slightly cleaner regex, no functional change from initial commit --- textsubs.lic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/textsubs.lic b/textsubs.lic index 9f2b3fd3ea..099c484f36 100644 --- a/textsubs.lic +++ b/textsubs.lic @@ -823,7 +823,7 @@ end # Commas when dealing with coins if settings.textsubs_use_plat_grouping - TextSubs.add('(?!.*>)\d{1,3}(?=((\d{3})+|)(\d{4})(?!\d)(?! platinum).*(Kronar|Dokora|Lirum))', '\&,') + TextSubs.add('(?!.*>)\d{1,3}(?=((\d{3})*(\d{4}))(?!\d)(?! platinum).*(Kronar|Dokora|Lirum))', '\&,') TextSubs.add('(?!.*>)\d{1,3}(?=(\d{3})+(?!\d) platinum.*(Kronar|Dokora|Lirum))', '\&,') else TextSubs.add('(?!.*>)\d{1,3}(?=(\d{3})+(?!\d).*(Kronar|Dokora|Lirum))', '\&,') From 532357ac2abaf6f5c111b8731a170d29c23f3327 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 14 Jul 2024 18:38:48 -0700 Subject: [PATCH 20/28] 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 21/28] 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 22/28] 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 23/28] 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 24/28] 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 25/28] 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 26/28] 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 27/28] 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 ef5c54c32ea023d5c382c9ff2d1585a7f8c37508 Mon Sep 17 00:00:00 2001 From: Dantia Date: Tue, 16 Jul 2024 15:58:28 -0500 Subject: [PATCH 28/28] 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