diff --git a/assets/templates/a5_town/a5_red_portal.png b/assets/templates/a5_town/a5_red_portal.png index a525d8e..01b58b9 100644 Binary files a/assets/templates/a5_town/a5_red_portal.png and b/assets/templates/a5_town/a5_red_portal.png differ diff --git a/config/game.ini b/config/game.ini index 835e0db..8c81793 100644 --- a/config/game.ini +++ b/config/game.ini @@ -100,7 +100,7 @@ mana_slice=961,610,7,101 cut_skill_bar=0,0,1280,653 reduce_to_center=120,60,1040,540 search_npcs=120,0,1040,620 -merc_icon=10,9,50,50 +merc_icon=15,14,40,40 loading_left_black=0,0,350,720 death=444,198,397,71 tp_search=353,120,547,400 diff --git a/config/params.ini b/config/params.ini index 154d079..d40be3b 100644 --- a/config/params.ini +++ b/config/params.ini @@ -8,7 +8,7 @@ ; bnet_pass=${BOTTY_BNET_PASS} ; char_name=${BOTTY_CHAR_NAME} ; difficulty: game difficulty to create ("normal", "nightmare", "hell") -difficulty=hell +difficulty=nightmare ; name: bot profile name used in logs/messages and mod launch option replacement name=fistman ; randomize_runs: 0 = run in listed order, 1 = shuffle run order @@ -167,7 +167,7 @@ skill_mistake_chance = 0.015 ; run_countess (Act 1 Forgotten Tower) ; run_mephisto (Act 3 Durance of Hate) ; run_baal (Act 5 Throne of Destruction) -order=run_pindle +order=run_countess, run_arcane, run_nihlathak,run_diablo, run_pindle [char] ; ========================== @@ -262,10 +262,10 @@ take_health_potion=0.90 take_mana_potion=0.80 take_rejuv_potion_health=0.75 take_rejuv_potion_mana=0.50 -heal_merc=0.7 -heal_rejuv_merc=0.25 +heal_merc=0.8 +heal_rejuv_merc=0.50 chicken=0.75 -merc_chicken=0.25 +merc_chicken=0.35 ; Misc. ; helps reduce accidental pickups when enabled especially on walking characters @@ -294,7 +294,7 @@ protect_shields_from_sell=1 ; Requires sell_junk=1 to convert extra pickups into gold. pick_rares_for_gold=0 ; pick_gold: 1 = pick up ground gold piles, 0 = ignore all ground gold -pick_gold=0 +pick_gold=1 [transmute] ;stash tabs by priority where to put transmuted gems diff --git a/src/bot.py b/src/bot.py index f750bdf..8b7e173 100644 --- a/src/bot.py +++ b/src/bot.py @@ -464,12 +464,23 @@ class Bot: # Check if merc needs to be revived if Config().char["use_merc"]: + merc_visible = False try: merc_visible = is_visible(ScreenObjects.MercIcon) except Exception: - # ROI/template shape error - skip resurrect check - Logger.debug("Merc icon detection error (ROI/template issue), skipping resurrect check") + Logger.debug("Merc icon detection error, skipping resurrect check") merc_visible = True + # Confirm with 'O' key - opens merc panel if alive, does nothing if dead + if not merc_visible and not self._game_stats._merc_resurrect_failed: + Logger.debug("Merc icon not visible, confirming with merc panel check") + keyboard.send("o") + wait(0.3, 0.4) + merc_panel_open = is_visible(ScreenObjects.LeftPanel) + if merc_panel_open: + # Merc is alive - panel opened, close it + keyboard.send("o") + wait(0.2, 0.3) + merc_visible = True if not merc_visible and not self._game_stats._merc_resurrect_failed: Logger.info("Resurrect merc") new_loc = self._town_manager.resurrect(self._curr_loc) diff --git a/src/ui_manager.py b/src/ui_manager.py index 4809755..c201d02 100644 --- a/src/ui_manager.py +++ b/src/ui_manager.py @@ -59,9 +59,9 @@ class ScreenObjects: use_grayscale=True ) MercIcon=ScreenObject( - ref=["MERC_A2", "MERC_A1", "MERC_A5", "MERC_A3"], + ref=["MERC_A2", "MERC_A2_2", "MERC_A1", "MERC_A5", "MERC_A3"], roi="merc_icon", - threshold=0.9, + threshold=0.85, use_grayscale=True ) PlayBtn=ScreenObject(