diff --git a/alchemy.lic b/alchemy.lic index e9dd8a5ba6..7f6b8d60de 100644 --- a/alchemy.lic +++ b/alchemy.lic @@ -23,7 +23,7 @@ class Alchemy exit if args.craft && (args.forage || args.prepare) settings = get_settings - @hometown = settings.hometown + hometown = settings.force_crafting_town || settings.hometown @alchemy_herb_quantity = settings.alchemy_herb_quantity @alchemy_herb_storage = settings.alchemy_herb_storage @herb_container = settings.herb_container @@ -36,10 +36,10 @@ class Alchemy ingredient = get_data('ingredients').ingredients.find { |each_ingredient| each_ingredient['name'] =~ /#{args.target}/i } unless args.craft # Set town for foraging - @forage_location = ingredient[@forage_override_room] || @forage_override_room || ingredient[@hometown] + @forage_location = ingredient[@forage_override_room] || @forage_override_room || ingredient[hometown] echo("@forage_location = #{@forage_location}") if @debug # Set press and grinder location - @press_location = @forage_override_town || @hometown + @press_location = @forage_override_town || hometown echo("@press_location = #{@press_location}") if @debug # Forage call section forage_ingredient(ingredient) if args.forage diff --git a/arrows.lic b/arrows.lic index 72bde06faa..0d38449fa6 100644 --- a/arrows.lic +++ b/arrows.lic @@ -10,7 +10,7 @@ class Arrows @bag = @settings.crafting_container @bag_items = @settings.crafting_items_in_container @belt = @settings.engineering_belt - @hometown = @settings.hometown + @hometown = @settings.force_crafting_town || @settings.hometown @engineering_room = @settings.engineering_room @hometown_data = get_data('crafting')['shaping'][@hometown] @@ -48,7 +48,7 @@ class Arrows @lumber = args.lumber @tools = args.tools - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) get_tools if @tools order_lumber check_flights diff --git a/bescort.lic b/bescort.lic index 78097034bf..ea4b2d3b73 100644 --- a/bescort.lic +++ b/bescort.lic @@ -1804,6 +1804,7 @@ class Bescort def ride_gondola(mode) case DRC.bput('go gondola', 'There is no wooden gondola here', 'Gondola, Cab') when /no wooden gondola here/i + DRC.bput('look gondola', 'The wooden gondola') hide? waitfor 'The gondola stops on the platform and the door silently swings open' ride_gondola(mode) diff --git a/bolts.lic b/bolts.lic index 11eb9b4b77..b884b7609e 100644 --- a/bolts.lic +++ b/bolts.lic @@ -12,7 +12,7 @@ class Bolts @bag = @settings.crafting_container @bag_items = @settings.crafting_items_in_container @belt = @settings.engineering_belt - @hometown = @settings.hometown + @hometown = @settings.force_crafting_town || @settings.hometown @engineering_room = @settings.engineering_room @hometown_data = get_data('crafting')['shaping'][@hometown] @@ -50,7 +50,7 @@ class Bolts @lumber = args.lumber @tools = args.tools - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) DRC.wait_for_script_to_complete('clerk-tools', ['engineering', 'get']) unless DRCI.exists?('shaper') if @tools order_lumber check_flights diff --git a/clean-leather.lic b/clean-leather.lic index 0a5c528599..18eb17fb11 100644 --- a/clean-leather.lic +++ b/clean-leather.lic @@ -26,6 +26,7 @@ class CleanLeather @bag = @settings.crafting_container @bag_items = @settings.crafting_items_in_container @belt = @settings.outfitting_belt + @hometown = @settings.force_crafting_town || @settings.hometown engineering_room = @settings.engineering_room outfitting_room = @settings.outfitting_room @@ -38,12 +39,12 @@ class CleanLeather # Set the proper stock rooms, preservative, and order number depending on whether we're # cleaning hides or bones. if args.hide =~ /^bones?$/i - @stock_room = get_data('crafting')['shaping'][@settings.hometown]['tool-room'] + @stock_room = get_data('crafting')['shaping'][@hometown]['tool-room'] @room = engineering_room @preservative = 'bleaching solution' @order_number = '7' else - @stock_room = get_data('crafting')['tailoring'][@settings.hometown]['tool-room'] + @stock_room = get_data('crafting')['tailoring'][@hometown]['tool-room'] @room = outfitting_room @preservative = 'tanning lotion' @order_number = '8' @@ -100,7 +101,7 @@ class CleanLeather # If we lack doses to complete the job, purchase what is required before starting our project bottles_to_purchase = ((required_doses - on_hand.to_f) / 30).ceil - DRCM.ensure_copper_on_hand(625 * bottles_to_purchase, @settings) + DRCM.ensure_copper_on_hand(625 * bottles_to_purchase, @settings, @hometown) bottles_to_purchase.times do DRCT.order_item(@stock_room, @order_number) DRCI.put_away_item?(@preservative, @bag) diff --git a/clerk-tools.lic b/clerk-tools.lic index 16ee356faa..4c006d701a 100644 --- a/clerk-tools.lic +++ b/clerk-tools.lic @@ -12,7 +12,7 @@ class Clerk action = args.action settings = get_settings - hometown = settings.hometown + hometown = settings.force_crafting_town || settings.hometown @bag = settings.crafting_container crafting_data = get_data('crafting') diff --git a/combat-trainer.lic b/combat-trainer.lic index 2650364951..8beda904e0 100644 --- a/combat-trainer.lic +++ b/combat-trainer.lic @@ -435,6 +435,9 @@ class LootProcess @make_zombie = settings.zombie['make'] echo(" @make_zombie: #{@make_zombie}") if $debug_mode_ct + @make_bonebug = settings.bonebug['make'] + echo(" @make_bonebug: #{@make_bonebug}") if $debug_mode_ct + @wound_level_threshold = settings.necromancer_healing['wound_level_threshold'] || 1 echo(" @wound_level_threshold: #{@wound_level_threshold}") if $debug_mode_ct @@ -719,6 +722,11 @@ class LootProcess do_necro_ritual(mob_noun, 'arise', game_state) return false end + if @make_bonebug && !game_state.necro_casting? && !game_state.cfw_active? + echo 'Making bone bug' if $debug_mode_ct + do_necro_ritual(mob_noun, 'arise', game_state) + return false + end ritual = if @redeemed 'dissect' @@ -760,7 +768,9 @@ class LootProcess case result when @rituals['arise'] echo 'Detected arise messaging' if $debug_mode_ct - game_state.prepare_cfb = true if @make_zombie + game_state.prepare_nr = true if @make_zombie && !game_state.cfb_active? + game_state.prepare_cfb = true if @make_zombie && !game_state.cfb_active? + game_state.prepare_cfw = true if @make_bonebug && !game_state.cfw_active? @last_ritual = ritual when @rituals['preserve'], @rituals['dissect'] echo 'Detected preserve or dissect messaging' if $debug_mode_ct @@ -826,8 +836,9 @@ class LootProcess return end - result = DRC.bput("put material in my #{@necro_container}", 'You put') + result = DRC.bput("put material in my #{@necro_container}", 'You put', 'material doesn\'t seem to fit') @current_harvest_count += 1 if result =~ /^You put/ + DRC.bput('drop material', 'you discard it') if result =~ /^material doesn't seem to fit/ end def dispose_body(game_state) @@ -1224,9 +1235,15 @@ class SpellProcess @necromancer_healing = settings.necromancer_healing echo(" @necromancer_healing: #{@necromancer_healing}") if $debug_mode_ct + @corpse_healing = settings.waggle_sets['corpse_healing'] + echo(" @corpse_healing: #{@corpse_healing}") if $debug_mode_ct + @necromancer_zombie = settings.waggle_sets['zombie'] echo(" @necromancer_zombie: #{@necromancer_zombie}") if $debug_mode_ct + @necromancer_bonebug = settings.waggle_sets['bonebug'] + echo(" @necromancer_bonebug: #{@necromancer_bonebug}") if $debug_mode_ct + @empath_spells = settings.empath_healing echo(" @empath_spells: #{@empath_spells}") if $debug_mode_ct @@ -1412,6 +1429,8 @@ class SpellProcess check_slivers(game_state) check_regalia(game_state) check_consume(game_state) + heal_corpse(game_state) + check_cfw(game_state) check_cfb(game_state) check_bless(game_state) check_ignite(game_state) @@ -1669,7 +1688,9 @@ class SpellProcess game_state.casting_weapon_buff = false game_state.casting_consume = false + game_state.casting_nr = false game_state.casting_cfb = false + game_state.casting_cfw = false game_state.casting_cyclic = false if game_state.casting_sorcery game_state.casting_sorcery = false @@ -1691,7 +1712,13 @@ class SpellProcess return unless @command - pause 0.5 until DRRoom.npcs.include?('warrior') + # escape valve in case spell immediately fails (due to anti magic?) + temp_count = 0 + until DRRoom.npcs.include?('warrior') || temp_count > 20 + pause 0.5 + temp_count += 1 + end + fput("command #{@command}") @command = nil end @@ -1917,6 +1944,30 @@ class SpellProcess prepare_spell(data, game_state, true) end + def check_cfw(game_state) + return unless DRStats.necromancer? + return unless @necromancer_bonebug['Call from Within'] + return if game_state.casting + return unless game_state.prepare_cfw + + game_state.casting_cfw = true + game_state.prepare_cfw = false + data = @necromancer_bonebug['Call from Within'] + prepare_spell(data, game_state, true) + end + + def heal_corpse(game_state) + return unless DRStats.necromancer? + return unless @corpse_healing['Necrotic Reconstruction'] + return if game_state.casting + return unless game_state.prepare_nr + + game_state.casting_nr = true + game_state.prepare_nr = false + data = @corpse_healing['Necrotic Reconstruction'] + prepare_spell(data, game_state, true) + end + def check_consume(game_state) return unless DRStats.necromancer? return unless @necromancer_healing @@ -1929,6 +1980,7 @@ class SpellProcess end return unless game_state.prepare_consume + return if @necromancer_healing.key?('Devour') && DRSpells.active_spells['Devour'] echo "@necromancer_healing.key?('Consume Flesh'): #{@necromancer_healing.key?('Consume Flesh')}" if $debug_mode_ct echo "@necromancer_healing.key?('Devour'): #{@necromancer_healing.key?('Devour')}" if $debug_mode_ct @@ -2124,6 +2176,8 @@ class PetProcess @zombie = settings.zombie echo(" @zombie: #{@zombie}") if $debug_mode_ct + @bonebug = settings.bonebug + echo(" @bonebug: #{@bonebug}") if $debug_mode_ct @is_present = false @current_stance = nil @@ -2134,6 +2188,7 @@ class PetProcess check_zombie(game_state) if game_state.dismiss_pet? dismiss_zombie(game_state) + dismiss_bonebug(game_state) game_state.next_clean_up_step return true end @@ -2155,6 +2210,13 @@ class PetProcess command_zombie('leave', game_state) end + def dismiss_bonebug(game_state) + return unless @is_present + return unless game_state.cfw_active? + + DRCA.release_cyclics + end + def update_behavior(game_state) return unless game_state.cfb_active? return unless @zombie['behavior'] @@ -4079,12 +4141,12 @@ class GameState $tactics_actions = ['bob', 'weave', 'circle'] attr_accessor :action_count, :aim_queue, :analyze_combo_array, :blessed_room, :cast_timer, - :casting, :casting_cfb, :casting_consume, :casting_cyclic, :casting_moonblade, + :casting, :casting_cfb, :casting_cfw, :casting_nr, :casting_consume, :casting_cyclic, :casting_moonblade, :casting_regalia, :casting_sorcery, :casting_weapon_buff, :charges, :charges_total, :clean_up_step, :constructs, :cooldown_timers, :current_weapon_skill, :currently_whirlwinding, :dance_queue, :dancing, :danger, :hide_on_cast, :last_regalia_type, :last_weapon_skill, :loaded, :mob_died, :need_bundle, - :no_loot, :no_skins, :no_stab_current_mob, :no_stab_mobs, :parrying, :prepare_cfb, + :no_loot, :no_skins, :no_stab_current_mob, :no_stab_mobs, :parrying, :prepare_cfb, :prepare_cfw, :prepare_nr, :prepare_consume, :regalia_cancel, :reset_stance, :retreating, :starlight_values, :swap_regalia_type, :target_weapon_skill, :use_charged_maneuvers, :whirlwind_trainables, :wounds @@ -4122,8 +4184,12 @@ class GameState @casting_weapon_buff = false @casting_consume = false @prepare_consume = false + @prepare_nr = false + @casting_nr = false @prepare_cfb = false @casting_cfb = false + @prepare_cfw = false + @casting_cfw = false @use_charged_maneuvers = false @wounds = {} @blessed_room = false @@ -4924,8 +4990,12 @@ class GameState def necro_casting? return false unless DRStats.necromancer? + return true if @prepare_nr + return true if @casting_nr return true if @prepare_cfb return true if @casting_cfb + return true if @prepare_cfw + return true if @casting_cfw return true if @prepare_consume return true if @casting_consume @@ -5149,6 +5219,10 @@ class GameState DRSpells.active_spells.include?('Call from Beyond') end + def cfw_active? + DRSpells.active_spells.include?('Call from Within') + end + def construct_mode? @construct_mode end diff --git a/common-arcana.lic b/common-arcana.lic index db7aa896a6..cd7669b291 100644 --- a/common-arcana.lic +++ b/common-arcana.lic @@ -67,7 +67,8 @@ module DRCA /^The Rite of Contrition matrix loses cohesion, leaving your aura naked/, # Rite of Contrition (ROC) /^The Rite of Forbearance matrix loses cohesion, leaving you to wallow in temptation/, # Rite of Forbearance (ROF) /^The Rite of Grace matrix loses cohesion, leaving your body exposed/, # Rite of Grace (ROG) - /^The greenish hues about you vanish as the Universal Solvent matrix loses its cohesion/ # Universal Solvent (USOL) + /^The greenish hues about you vanish as the Universal Solvent matrix loses its cohesion/, # Universal Solvent (USOL) + /^You sense your Call from Within spell weaken and disperse/ # Call from Within (CFW) ] def infuse_om(harness, amount) diff --git a/craft.lic b/craft.lic index 481dd866e3..371802cf23 100644 --- a/craft.lic +++ b/craft.lic @@ -14,7 +14,7 @@ class Craft args = parse_args(arg_definitions) @settings = get_settings - @hometown = @settings.hometown + @hometown = @settings.force_crafting_town || @settings.hometown @worn_trashcan = @settings.worn_trashcan @worn_trashcan_verb = @settings.worn_trashcan_verb @training_room = (@settings.training_rooms || [@settings.safe_room]).sample @@ -163,7 +163,7 @@ class Craft if rank <= 25 # Tier 1 Extremely Easy # Buy red flowers and nemoih root recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some blister cream/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb2_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) @@ -174,7 +174,7 @@ class Craft elsif rank <= 50 # Tier 2 - Very Easy # Buy red flowers and plovik leaf recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some moisturizing ointment/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb2_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) @@ -185,7 +185,7 @@ class Craft elsif rank <= 100 # Tier 3 - Easy # Buy plovik leaves recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some chest salve/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) DRCC.stow_crafting_item(DRC.left_hand, @bag, @belt) @@ -195,7 +195,7 @@ class Craft elsif rank <= 175 # Tier 4 - Simple # Buy riolur leaves recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /a neck potion/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) DRCC.stow_crafting_item(DRC.left_hand, @bag, @belt) @@ -205,7 +205,7 @@ class Craft elsif rank <= 300 # Tier 5 - Basic # Buy jadice flower recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some limb salve/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) DRCC.stow_crafting_item(DRC.left_hand, @bag, @belt) @@ -215,7 +215,7 @@ class Craft elsif rank <= 425 # Tier 6 - Somewhat Challenging # Buy plovik leaves recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some chest unguent/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) DRCC.stow_crafting_item(DRC.left_hand, @bag, @belt) @@ -225,7 +225,7 @@ class Craft elsif rank <= 550 # Tier 7 - Challenging # Buy riolur leaves recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some neck tonic/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) DRCC.stow_crafting_item(DRC.left_hand, @bag, @belt) @@ -235,7 +235,7 @@ class Craft elsif rank <= 700 # Tier 8 - Complicated # Buy aevaes leaves recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some eye tonic/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) DRCC.stow_crafting_item(DRC.left_hand, @bag, @belt) @@ -245,7 +245,7 @@ class Craft elsif rank <= 850 # Tier 9 - Intricate # Buy ojhenik root recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /a body elixir/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) DRCC.stow_crafting_item(DRC.left_hand, @bag, @belt) @@ -255,7 +255,7 @@ class Craft elsif rank <= 1175 # Tier 10 - Difficult # Forage belradi moss recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /a general elixir/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) DRC.wait_for_script_to_complete('alchemy', ['belradi', 'forage', '25']) DRC.wait_for_script_to_complete('alchemy', ['belradi', 'prepare']) DRCC.stow_crafting_item(DRC.right_hand, @bag, @belt) @@ -266,7 +266,7 @@ class Craft elsif rank <= 1400 # Tier 11 Very Difficult # Forage blue flowers and belradi moss recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some refreshment elixir/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) DRC.wait_for_script_to_complete('alchemy', ['blue', 'forage', '25']) DRC.wait_for_script_to_complete('alchemy', ['belradi', 'forage', '5']) DRC.wait_for_script_to_complete('alchemy', ['blue', 'prepare']) @@ -279,7 +279,7 @@ class Craft else # Tier 12 - Extremely Difficult # Buy red flowers and forage dioica sap recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /some vigor poultices/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) DRCT.order_item(crafting_data['remedies'][@hometown]['stock-room'], recipe['herb1_stock']) DRC.wait_for_script_to_complete('alchemy', ['dioica', 'forage', '5']) DRC.wait_for_script_to_complete('alchemy', ['dioica', 'prepare']) @@ -301,7 +301,7 @@ class Craft if rank <= 25 # Tier 1 Extremely Easy # Buy an abolition sigil and bone totem for Radiant Trinket recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /a radiant trinket/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -328,7 +328,7 @@ class Craft elsif rank <= 50 # Tier 2 - Very Easy # Buy an induction sigil and bone totem for Flash Trinket recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /a flash trinket/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -355,7 +355,7 @@ class Craft elsif rank <= 100 # Tier 3 - Easy # Buy an rarefaction sigil and bone totem for Wind Trinket recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /a wind trinket/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -382,7 +382,7 @@ class Craft elsif rank <= 175 # Tier 4 - Simple # Buy an permutation sigil and bone totem fo Earth Trinket recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /an earth trinket/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -409,7 +409,7 @@ class Craft elsif rank <= 300 # Tier 5 - Basic # Buy an abolition and congruence sigils and bone totem for Basic Holy Ritual focus recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /basic holy ritual focus/ } - DRCM.ensure_copper_on_hand(2000, @settings) + DRCM.ensure_copper_on_hand(2000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -441,7 +441,7 @@ class Craft elsif rank <= 425 # Tier 6 - Somewhat Challenging # Buy a permutation and rarefaction sigils and basic runestone for Strange Arrow recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /strange arrow runestone/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -473,7 +473,7 @@ class Craft elsif rank <= 550 # Tier 7 - Challenging # Buy a abolition and induction sigils and basic runestone for Gauge Flow recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /gauge flow runestone/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) # Check for first sigil. Purcahse if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -505,7 +505,7 @@ class Craft elsif rank <= 700 # Tier 8 - Complicated # Buy a rarefaction and induction sigils and basic runestone for Dispel recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /dispel runestone/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -537,7 +537,7 @@ class Craft elsif rank <= 850 # Tier 9 - Intricate # Buy a induction and rarefaction sigils and basic runestone for Lay Ward recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /lay ward runestone/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -568,7 +568,7 @@ class Craft DRCI.dispose_trash('runestone', @worn_trashcan, @worn_trashcan_verb) elsif rank <= 1175 # Tier 10 - Difficult - Need to use sigilhunter or similar to gather the sigils for Frost Focus recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /a frost focus/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -608,7 +608,7 @@ class Craft DRCI.dispose_trash('totem', @worn_trashcan, @worn_trashcan_verb) else # Tier 11 Very Difficult - Need to use sigilhunter or similar to gather the sigils for Electric Focus recipe = get_data('recipes').crafting_recipes.find { |each_recipe| each_recipe['name'] =~ /an electric focus/ } - DRCM.ensure_copper_on_hand(4000, @settings) + DRCM.ensure_copper_on_hand(4000, @settings, @hometown) # Check for first sigil. Purchase if required. tally += 1 if !DRCC.check_for_existing_sigil?(recipe['enchant_stock1_name'], recipe['enchant_stock1'], quantity, @bag, @belt, stock_room) @@ -650,7 +650,7 @@ class Craft end def money_for_training?(amount, skill) - if DRCM.ensure_copper_on_hand(amount, @settings) + if DRCM.ensure_copper_on_hand(amount, @settings, @hometown) true else echo("Low on funds, removing #{skill} from training") @@ -712,7 +712,7 @@ class Craft def buy_yarn(skipcoin = false) crafting_data = get_data('crafting') - DRCM.ensure_copper_on_hand(3000, @settings) unless skipcoin + DRCM.ensure_copper_on_hand(3000, @settings, @hometown) unless skipcoin DRCT.order_item(crafting_data['tailoring'][@hometown]['stock-room'], 13) DRC.bput('combine my yarn', 'You combine', 'You must be holding both') count = DRC.bput('count my yarn', 'You count out \d+ yards').scan(/\d+/).first.to_i @@ -722,7 +722,7 @@ class Craft def buy_thread(skipcoin = false) crafting_data = get_data('crafting') - DRCM.ensure_copper_on_hand(1000, @settings) unless skipcoin + DRCM.ensure_copper_on_hand(1000, @settings, @hometown) unless skipcoin DRCT.order_item(crafting_data['tailoring'][@hometown]['stock-room'], 6) DRCC.stow_crafting_item('thread', @bag, @belt) end diff --git a/data/base-shrines.yaml b/data/base-shrines.yaml index be7796c21e..c700a719fc 100644 --- a/data/base-shrines.yaml +++ b/data/base-shrines.yaml @@ -62,8 +62,24 @@ shrines: - location: The altar at Misenseor Abbey start_room: 6138 push: altar - # The shrine at Eluned's Pool - # The altar at Misenseor Abbey + - location: The Rebirth Altar in the Resurrection Creche + start_room: 5865 + push: altar +# Eluned's shrine commented out due to the need to wait for meditating then wait to not be a fish +# - location: The Crystal Cavern of Eluned +# start_room: 1192 +# path_in: +# - meditate +# push: statue +# path_out: +# - meditate +# Wildflower Meadow commented out due to perception check in order to get there. +# - location: Wildflower Meadow, Before the Gods +# start_room: 7306 +# push: boulder + - location: Huldah's altar at Knife Clan + start_room: 6217 + push: altar Leth Deriel: - location: The shrine at Hodierna's Solace start_room: 1938 @@ -77,10 +93,52 @@ shrines: path_out: - w - out + - location: The blackfruit's altar in the Forest of Night + start_room: 10049 + push: altar - location: The altar to Berengaria in the Gash start_room: 2258 push: altar + - location: A driftwood altar at River Clan + start_room: 17058 + push: altar Therenborough: + - location: Kuniyo's stone altar of the Forest's Path's End. + start_room: 3330 + push: altar + - location: The shrine of the Huntress in a dark thicket. + start_room: 3326 + path_in: + # Added because this is not mapped for Lich. + - search + - go forest trail + push: statue + path_out: + - go forest trail + - location: The altar in Ker'Leor, Zindalyi Lyba. + start_room: 13_972 + push: altar + - location: The Fornseted chapel. + start_room: 14_436 + push: altar + - location: A stone sliver in Siksraja. + start_room: 3537 + path_in: + - look in niche + push: sliver + - location: Therenborough's Village Chapel. + start_room: 11_539 + push: altar + - location: Chadatru's Chapel in Theren Keep + start_room: 7067 + push: altar + - location: The Temple of Ushnish. + start_room: 13_644 + push: slab + Throne City: + - location: Hodierna's Gift Cathedral. + start_room: 3049 + push: altar Riverhaven: - location: The shrine to Divyaush in the Riverhaven Temple start_room: 440 @@ -88,17 +146,75 @@ shrines: - location: The shrine of Harawep in Riverhaven start_room: 438 push: statue + - location: The shrine of Urrem'tier, a forsaken testament + start_room: 8545 + path_in: + # Added because lich isn't set to use the beak. + - climb vulture beak + - down + - down + - north + - north + push: altar + path_out: + - south + - south + - up + - up + - jump swamp + - location: The tongue-shaped altar of Aldauth in the Vulture's Maw, Kweld Gelvdael + start_room: 10_860 + path_in: + # Added because lich isn't set to use the beak. + - climb vulture beak + push: tongue + path_out: + - jump swamp + - location: The Scorpion's Stinger. + start_room: 10_860 + path_in: + # Added because lich isn't set to use the beak. + - climb vulture beak + - down + - down + - north + - north + - north + - climb jagged crevice + - up + - up + push: spire + path_out: + - down + - down + - climb jagged crevice + - southeast + - southwest + - south + - up + - up + - jump swamp - location: Drogor's sacrificial altar by Faldesu River start_room: 473 push: altar - - location: The shrine of Urrem'tier, a forsaken testament - start_room: 8545 - push: sliver Rossman's Landing: - location: Berengaria's altar in Rossman's Landing church start_room: 7693 push: altar - Langenfirth: + Muspar'i: + - location: The Ganen Eliza altar. + start_room: 7610 + push: altar + - location: The Temple of Hav'roth Muspar'i. + start_room: 296 + push: altar + - location: A battered altar construct in Muspar'i, Golden Heights. + start_room: 7 + push: construct +# Took out because it requires going thru the shifting maze to get to. +# - location: A basalt slab at Sand Clan. +# start_room: 7519 +# push: slab Ratha: - location: The altar of the dark aspects in Ratha start_room: 4957 @@ -152,8 +268,43 @@ shrines: - location: Kertigen's Temple, Ratha start_room: 7469 push: altar + - location: Eluned's Temple, Ratha. + start_room: 7489 + push: altar + - location: The shrine to Phelim on Taisgath. + start_room: 5016 + push: statue + - location: Truffenyi's Fountain, Ratha + start_room: 4991 + push: statue + - location: Sshoi-sson Palace + start_room: 7151 + push: altar + - location: The Alamhif statue on Shh'o'kumu Terrace. + start_room: 5092 + push: statue + - location: The shrine to Berengaria on Reshalia. + start_room: 5124 + push: altar Aesry: + - location: The shrine of Drogor, Aesry Surlaenis'a. + start_room: 12_479 + push: shrine +# Manual: https://elanthipedia.play.net/Pilgrim%27s_badge#Aesry_Surlaenis'a +# - location: The main altar in Halasa Temple, Aesry Surlaenis'a Mer'Kresh: + - location: The Clerics' Guild Chapel in Mer'Kresh. + start_room: 11814 + push: altar + - location: The living coral altar of the Carillon. + start_room: 6654 + push: coral + - location: The Clerics' Guild in Mer'Kresh. + start_room: 11_814 + push: altar + - location: The altar of Lost Hope + start_room: 11_879 + push: altar Shard: - location: Kuniyo's altar in the Prairie Grove, Gilen Otso Steppes start_room: 6327 @@ -161,9 +312,33 @@ shrines: - location: The chapel in Steelclaw clan start_room: 2888 push: altar - # - location: An ebony altar in a secluded shrine on the Darkmist Moor - This is broken due to pathing issues - # start_room: 8090 - # push: altar + - location: An ebony altar in a secluded shrine on the Darkmist Moor. + start_room: 2825 + path_in: + - go small bridge + - east + - search + - go dirt path + - southeast + - southeast + - southeast + - southwest + - east + - northeast + - southeast + - northeast + push: altar + path_out: + - southwest + - northwest + - northeast + - northwest + - northeast + - west + - northeast + - go path + - west + - go white bridge - location: The wedding chapel at Marachek's Oak start_room: 2943 push: disk @@ -182,6 +357,29 @@ shrines: - location: The Undershard temple start_room: 14487 push: altar + path_out: + # Added because lich kept going the wrong way to get out. + - south + - south + - west + - west + - west + - west + - north + - north + - northwest + - northwest + - north + - north + - west + - west + - up + - northeast + - northwest + - go opening + - southwest + - up + - up - location: A granite plinth at Shadow's Reach start_room: 11428 push: plinth @@ -198,6 +396,26 @@ shrines: - location: Traveler's Shrine, Hibarnhvidar start_room: 15867 push: altar + - location: Temple of the North Wind, Catacombs. + start_room: 46809 + push: statue + - location: Temple of the North Wind. + start_room: 34398 + push: altar + - location: A peregan tree altar at Boar Clan. + start_room: + push: altar + - location: The two-headed miracle in a black willow. + start_room: 4229 + path_in: + # Added because this room is not mapped for lich. + - climb black willow + push: skeleton + path_out: + - climb willow trunk + - location: Clerics' Guild, Courtyard + start_room: 4196 + push: statue - location: Albreda's Shrine, Hibarnhvidar start_room: 15872 push: altar @@ -210,3 +428,17 @@ shrines: - location: Divyaush's slab in an abandoned mine start_room: 4397 push: slab + - location: The Road Beneath the Mountain. + start_room: 3977 + push: statue + - location: Chapel of Raven's Point. + start_room: 4437 + push: altar + Ain Ghazal: + - location: The Green Glade of Ain Ghazal. + start_room: 11630 + push: altar + Fang Cove: + - location: A hidden cave in Fang Cove. + start_room: 8347 + push: boulder \ No newline at end of file diff --git a/data/base-spells.yaml b/data/base-spells.yaml index 1739c5ff53..abdf70c20a 100644 --- a/data/base-spells.yaml +++ b/data/base-spells.yaml @@ -262,6 +262,8 @@ cast_messages: - A thin layer of frost quickly forms on your .* before just as quickly evaporating. - A quick gust of wind picks up from out of nowhere and quickly swirls about you. - Sutures of reddish-black energy delve deep +- Tears of hot regret flow down your eyes +- Your eyes flare with a whorl khri_preps: - Releasing a deep breath, you focus on your ability to survive the @@ -2079,6 +2081,22 @@ spell_data: mana_type: arcane prep: target guild: Necromancer + Book Burning: + skill: Utility #Also Targeted Magic + abbrev: BB + mana: 300 + recast: 0 + # Wear after casting to free up hand + after: + - message: wear my spectral torch + matches: + - You toss your spectral torch aside + - You are already wearing that + - Wear what + mana_type: arcane + prep: prepare + ritual: true + guild: Necromancer Butcher's Eye: skill: Augmentation abbrev: BUE @@ -2103,6 +2121,15 @@ spell_data: mana_type: arcane prep: prepare guild: Necromancer + Call from Within: + skill: Utility #Also Targeted Magic + abbrev: CFW + mana: 5 + recast: -1 + mana_type: arcane + prep: prepare + cyclic: true + guild: Necromancer Chirurgia: abbrev: CHIR guild: Necromancer @@ -2184,6 +2211,12 @@ spell_data: skill: Utility abbrev: NR mana: 15 + before: + - message: perform cut + matches: + - You draw a slight cut across your palm in ritualized fashion, drawing forth a small but useful amount of blood without any real injury + - You draw a slight cut across your palm, repeating the ritual to ensure a supply of useful blood + - Lacking your knife, you cannot perform any rituals recast: 1 mana_type: arcane prep: prepare diff --git a/favor.lic b/favor.lic index 13bfb48ad5..b60636744e 100644 --- a/favor.lic +++ b/favor.lic @@ -114,7 +114,6 @@ class CrossingFavor when /^Wash the altar with what?/ get_water DRCT.walk_to(@room) - break when /^But the altar is perfectly clean/ break end diff --git a/makesteel.lic b/makesteel.lic index e1b3b266c0..795455d79a 100644 --- a/makesteel.lic +++ b/makesteel.lic @@ -18,9 +18,10 @@ class MakeSteel total_count = args.count.to_i type = args.type || 'h' @settings = get_settings - @stock_room = get_data('crafting')['blacksmithing'][@settings.hometown]['stock-room'] + @hometown = @settings.force_crafting_town || @settings.hometown + @stock_room = get_data('crafting')['blacksmithing'][@hometown]['stock-room'] - DRCM.ensure_copper_on_hand(2000 * total_count, @settings) + DRCM.ensure_copper_on_hand(2000 * total_count, @settings, @hometown) smelt_ingot(total_count, type) @@ -28,8 +29,8 @@ class MakeSteel end def refine - DRCT.order_item(get_data('crafting')['blacksmithing'][@settings.hometown]['finisher-room'], 9) unless DRCI.exists?('flux') - DRCC.find_empty_crucible(@settings.hometown) + DRCT.order_item(get_data('crafting')['blacksmithing'][@hometown]['finisher-room'], 9) unless DRCI.exists?('flux') + DRCC.find_empty_crucible(@hometown) DRCI.get_item('steel ingot') DRC.bput('put my steel ingot in crucible', /You put your.*in the.*crucible\./) DRC.wait_for_script_to_complete('smelt', ['refine']) @@ -44,7 +45,7 @@ class MakeSteel order_stow(2) if type == 'h' end - DRCC.find_empty_crucible(@settings.hometown) + DRCC.find_empty_crucible(@hometown) multiplier = case type when 'l' diff --git a/pilgrimage.lic b/pilgrimage.lic index 608516a27f..5fa25c1d31 100644 --- a/pilgrimage.lic +++ b/pilgrimage.lic @@ -6,8 +6,24 @@ custom_require.call(%w[common common-items common-money common-travel]) class Pilgrimage def initialize + arg_definitions = [ + [ + { name: 'town', options: $HOMETOWN_LIST, optional: true, description: 'Town to look for shrines in.' } + ] + ] + args = parse_args(arg_definitions) + + town_override = DRC.get_town_name(args.town) + + if args.town && !town_override + DRC.message("Could not identify town for argument: #{args.town}") + DRC.message("To avoid ambiguity, please use the town's full name: https://elanthipedia.play.net/Category:Cities") + exit + end + @settings = get_settings - hometown = @settings.hometown + hometown = town_override || @settings.hometown + buy_badge(hometown) visited = visited_shrines diff --git a/sew.lic b/sew.lic index e51d3180c3..0e7afec7d3 100644 --- a/sew.lic +++ b/sew.lic @@ -7,6 +7,7 @@ custom_require.call(%w[common common-arcana common-crafting common-items common- class Sew def initialize @settings = get_settings + @hometown = @settings.force_crafting_town || @settings.hometown @worn_trashcan = @settings.worn_trashcan @worn_trashcan_verb = @settings.worn_trashcan_verb @bag = @settings.crafting_container @@ -54,7 +55,7 @@ class Sew @knit = args.knit @mat_type = args.material @chapter = args.chapter.nil? ? 1 : args.chapter.to_i # chapter 5 for enhancements - @info = get_data('crafting')['tailoring'][@settings.hometown] + @info = get_data('crafting')['tailoring'][@hometown] @instructions = args.instructions @cloth = %w[silk wool burlap cotton felt linen electroweave steelsilk arzumodine bourde dergatine dragonar faeweave farandine imperial jaspe khaddar ruazin titanese zenganne] diff --git a/shape.lic b/shape.lic index 3cf6ae1b6a..21a39ca883 100644 --- a/shape.lic +++ b/shape.lic @@ -7,6 +7,7 @@ custom_require.call(%w[common common-arcana common-crafting common-items events] class Shape def initialize @settings = get_settings + @hometown = @settings.force_crafting_town || @settings.hometown @worn_trashcan = @settings.worn_trashcan @worn_trashcan_verb = @settings.worn_trashcan_verb @bag = @settings.crafting_container @@ -52,7 +53,7 @@ class Shape @instruction = args.instructions @material = args.material @chapter = args.chapter == nil ? 6 : args.chapter.to_i - @info = get_data('crafting')['shaping'][@settings.hometown] + @info = get_data('crafting')['shaping'][@hometown] DRC.wait_for_script_to_complete('buff', ['shape']) Flags.add('shaping-assembly', 'appears ready to be reinforced with some (backer)', 'appears ready to be strengthened with some leather (strips)', 'assembly with the (backing) material can begin', 'You need another bone, wood or horn (backing) material', 'another finished bow (string)', 'another finished (long|short) wooden (pole)', 'another finished (leather strips)', 'another .* (long|short) leather (cord)', 'You must assemble the (backer)', 'You must assemble the (strips)', 'another (arrow flights)', 'another (.* arrowheads)') diff --git a/smith.lic b/smith.lic index 7e22ad9426..365c78466f 100644 --- a/smith.lic +++ b/smith.lic @@ -24,19 +24,19 @@ class Smith args = parse_args(arg_definitions) @settings = get_settings + @hometown = @settings.force_crafting_town || @settings.hometown @bag = @settings.crafting_container @bag_items = @settings.crafting_items_in_container @belt = @settings.forging_belt - discipline = get_data('crafting')['blacksmithing'][@settings.hometown] + discipline = get_data('crafting')['blacksmithing'][@hometown] workorders_materials = @settings.workorders_materials @materials_info = get_data('crafting')['stock'][workorders_materials['metal_type']] - @hometown = @settings.hometown @container = get_settings.crafting_container recipes = get_data('recipes').crafting_recipes.select { |recipe| recipe['type'] =~ /blacksmithing|weaponsmithing|armorsmithing/i } recipe = DRCC.recipe_lookup(recipes, args.item_name) return unless recipe - DRCM.ensure_copper_on_hand(3000, @settings) unless args.here + DRCM.ensure_copper_on_hand(3000, @settings, @hometown) unless args.here parts = recipe['part'] || [] parts << "leather strip" if args.reinforce # adds part to the list for reinforce diff --git a/spin.lic b/spin.lic index 794b1dc71f..be1aca1e13 100644 --- a/spin.lic +++ b/spin.lic @@ -24,13 +24,14 @@ class Spin data = mat_data[args.material] @settings = get_settings + @hometown = @settings.force_crafting_town || @settings.hometown @bag = @settings.crafting_container @bag_items = @settings.crafting_items_in_container @belt = @settings.outfitting_belt - DRCM.ensure_copper_on_hand(data[:cost] * data[:count], @settings) + DRCM.ensure_copper_on_hand(data[:cost] * data[:count], @settings, @hometown) data[:count].times do |index| - stock_room = get_data('crafting')['tailoring'][@settings.hometown]['stock-room'] + stock_room = get_data('crafting')['tailoring'][@hometown]['stock-room'] DRCT.order_item(stock_room, data[:index]) if index == 0 && data[:name] == 'silk' DRC.bput('mark my fibers at 10', /mark it for cutting/) @@ -44,7 +45,7 @@ class Spin end end - until DRCC.find_wheel(@settings.hometown) + until DRCC.find_wheel(@hometown) move('go door') pause 30 end diff --git a/tinker.lic b/tinker.lic index d8d5cc4dee..ec124b5f45 100644 --- a/tinker.lic +++ b/tinker.lic @@ -7,12 +7,12 @@ custom_require.call(%w[common common-arcana common-crafting common-items]) class Tinker def initialize @settings = get_settings + @hometown = @settings.force_crafting_town || @settings.hometown @bag = @settings.crafting_container @bag_items = @settings.crafting_items_in_container @belt = @settings.engineering_belt @cube = @settings.cube_armor_piece @engineering_belt = @settings.engineering_belt - @hometown = @settings.hometown @stamp = @settings.mark_crafted_goods @adjustable_tongs = @settings.adjustable_tongs diff --git a/tome.lic b/tome.lic index f8f4dfce1e..4e242938d0 100644 --- a/tome.lic +++ b/tome.lic @@ -123,13 +123,15 @@ class Tome /^You are unable to focus on studying your/, /^You must complete or cancel your current magical research project/, /^Considering that you are in combat/, - /^However, you find that you lack the concentration to focus on your studies/) + /^However, you find that you lack the concentration to focus on your studies/, + /^This is not a good place for that/) DRC.safe_unpause_list @scripts_to_unpause if @passive case result when /^You are unable to focus on studying your/, /^You must complete or cancel your current magical research project/, /^Considering that you are in combat/, - /^However, you find that you lack the concentration to focus on your studies/ + /^However, you find that you lack the concentration to focus on your studies/, + /^This is not a good place for that/ pause_scripts if @passive DRCI.stow_item?(@@tome) DRC.safe_unpause_list @scripts_to_unpause if @passive diff --git a/workorders.lic b/workorders.lic index c7011cea86..8beb6101de 100644 --- a/workorders.lic +++ b/workorders.lic @@ -26,7 +26,7 @@ class WorkOrders @recipe_parts = crafting_data['recipe_parts'] @bag = @settings.crafting_container @bag_items = @settings.crafting_items_in_container - @hometown = @settings.hometown + @hometown = @settings.force_crafting_town || @settings.hometown @use_own_ingot_type = @settings.use_own_ingot_type @deed_own_ingot = @settings.deed_own_ingot deeds_data = get_data('crafting').deeds[@hometown] @@ -182,7 +182,7 @@ class WorkOrders def repair_items(info, tools) if @settings.workorders_repair_own_tools current = Room.current.id - DRCM.ensure_copper_on_hand(1500, @settings) + DRCM.ensure_copper_on_hand(1500, @settings, @hometown) DRCT.walk_to(current) DRCC.repair_own_tools(get_data('crafting')['blacksmithing'][@hometown], tools, @bag, @bag_items, @belt) return @@ -226,7 +226,7 @@ class WorkOrders end def carve_items(info, materials_info, item, quantity) - DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings) + DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings, @hometown) recipe, items_per_stock, spare_stock, scrap = find_recipe(materials_info, item, quantity) material_noun = %w[deed pebble stone rock rock boulder] material_volume = 0 @@ -300,7 +300,7 @@ class WorkOrders end def shape_items(info, materials_info, item, quantity) - DRCM.ensure_copper_on_hand(@cash_on_hand || 10_000, @settings) + DRCM.ensure_copper_on_hand(@cash_on_hand || 10_000, @settings, @hometown) recipe, items_per_stock, spare_stock, scrap = find_recipe(materials_info, item, quantity) quantity.times do |count| @@ -388,7 +388,7 @@ class WorkOrders end def sew_items(info, materials_info, recipe, quantity) - DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings) + DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings, @hometown) existing = if DRC.bput("get #{materials_info['stock-name']} cloth from my #{@bag}", 'What were', 'You get') == 'What were' 0 @@ -417,7 +417,7 @@ class WorkOrders end def knit_items(info, materials_info, recipe, quantity) - DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings) + DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings, @hometown) existing = if DRC.bput("get yarn from my #{@bag}", 'What were', 'You get') == 'What were' 0 @@ -540,7 +540,7 @@ class WorkOrders end def remedy_items(info, _materials_info, recipe, quantity) - DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings) + DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings, @hometown) herb2_needed = '' # Herb #1 @@ -602,7 +602,7 @@ class WorkOrders info['trash-room'] = nil if @worn_trashcan && @worn_trashcan_verb - DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings) + DRCM.ensure_copper_on_hand(@cash_on_hand || 5000, @settings, @hometown) quantity.times do if remaining_volume < recipe['volume'] @@ -639,9 +639,9 @@ class WorkOrders exit else volume = deed_ingot_volume - fput('tap deed') + fput('tap my deed') pause - fput("get #{@use_own_ingot_type} ingot") unless checkleft || checkright + DRCI.get_item_if_not_held?("#{@use_own_ingot_type} ingot") end end @@ -658,9 +658,9 @@ class WorkOrders exit else volume = deed_ingot_volume - fput('tap deed') + fput('tap my deed') pause - fput("get #{@use_own_ingot_type} ingot") unless checkleft || checkright + DRCI.get_item_if_not_held?("#{@use_own_ingot_type} ingot") end volume = ingot_volume end @@ -690,7 +690,7 @@ class WorkOrders return unless @deed_own_ingot unless DRC.bput('look my deed packet', /You count \d+ deed claim forms remaining/, /I could not find what you were referring to/) =~ /You count \d+ deed claim forms remaining/ - DRCM.ensure_copper_on_hand(@cash_on_hand || 10_000, @settings) + DRCM.ensure_copper_on_hand(@cash_on_hand || 10_000, @settings, @hometown) DRCT.order_item(@deeds_room, @deeds_number) fput('stow my packet') end @@ -706,7 +706,7 @@ class WorkOrders sigil_quantity = quantity - DRCM.ensure_copper_on_hand(@cash_on_hand || 20_000, @settings) + DRCM.ensure_copper_on_hand(@cash_on_hand || 20_000, @settings, @hometown) # Enchant Sigil #1 # Need to check if nil so we can check for all sigils. Some recipes only use ones # Tally is used to exit if 1 exists but will allow user to see which sigils they need to hunt.