diff --git a/profiles/base.yaml b/profiles/base.yaml index e132680fd7..6e3b1aeb96 100644 --- a/profiles/base.yaml +++ b/profiles/base.yaml @@ -633,6 +633,12 @@ force_healer_town: safe_room_withdraw_amount: 4_000 # Amount to deposit back in back after healing (only used if force_healer_town is set) safe_room_keep_bank_amount: +# use performance.lic while waiting for healing / being healed +# assumes you have performance setup properly +performance_while_healing: false +# use tome.lic while waiting for healing / being healed +# assumes you have tome setup properly +tome_while_healing: false # override the repair location to use instead of hometown force_repair_town: diff --git a/safe-room.lic b/safe-room.lic index aca216ae89..1472b8eba1 100644 --- a/safe-room.lic +++ b/safe-room.lic @@ -18,6 +18,10 @@ class SafeRoom @health_threshold = settings.saferoom_health_threshold @withdraw_amount = settings.safe_room_withdraw_amount @keep_bank_amount = settings.safe_room_keep_bank_amount + @performance_while_healing = settings.performance_while_healing + @stop_performance_after_heal = false + @tome_while_healing = settings.tome_while_healing + @stop_tome_after_heal = false @plant_regex = /vela'tohr (briar|bush|plant|shrub|thicket|thornbush)/ @@ -74,6 +78,8 @@ class SafeRoom DRCM.ensure_copper_on_hand(@withdraw_amount, settings, hometown_name) wait_at_empath(hometown['npc_empath']['id']) + stop_script('performance') if Script.running?('performance') && @stop_performance_after_heal + stop_script('tome') if Script.running?('tome') && @stop_tome_after_heal DRC.fix_standing if (settings.hometown != hometown_name) bank_amount = DRCM.deposit_coins(0, settings, hometown_name) @@ -207,6 +213,16 @@ class SafeRoom fput("touch #{Regexp.last_match(1)}") end + # check for safe-room idle thing to do + if @performance_while_healing && !(Script.running?('performance') || Script.running?('play')) + start_script('performance', ['noclean']) + @stop_performance_after_heal = true + end + if @tome_while_healing && !Script.running?('tome') + start_script('tome', ['active']) + @stop_tome_after_heal = true + end + if DRRoom.pcs.empty? || DRRoom.pcs_prone.empty? || Room.current.id == 8393 wait_for_healing return diff --git a/tome.lic b/tome.lic index 4e242938d0..c525977aab 100644 --- a/tome.lic +++ b/tome.lic @@ -102,12 +102,12 @@ class Tome def monitor_routine loop do if DRSkill.getxp('Scholarship') >= @scholarship_limit && !@passive - DRC.fix_standing + DRC.fix_standing unless Script.running?('safe-room') exit end Flags.reset('study-complete') if !@passive - DRC.bput('sit', 'You sit', 'You are already sitting', 'You rise', 'While swimming?') unless sitting? + DRC.bput('sit', 'You sit', 'You are already sitting', 'You rise', 'While swimming?') unless sitting? || Script.running?('safe-room') end pause 10 until should_train? and DRStats.concentration == 100 @@ -152,7 +152,7 @@ end before_dying do Flags.delete('study-complete') - DRC.fix_standing + DRC.fix_standing unless Script.running?('safe-room') DRCI.stow_item?(Tome.tome) if !Tome.tome.nil? && DRCI.in_hands?(Tome.tome) end