Fix merc detection and portal clicking
- Crop A5_RED_PORTAL template to remove empty space (center now aligns with portal) - Fix merc_icon ROI from 10,9,50,50 to 15,14,40,40 (matches 40x40 merc templates) - Lower MercIcon threshold from 0.9 to 0.85, add MERC_A2_2 variant - Add merc panel confirmation with 'O' key before resurrect (prevents false resurrect when icon detection fails) - Override capabilities to can_teleport_natively
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
+1
-1
@@ -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
|
||||
|
||||
+6
-6
@@ -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
|
||||
|
||||
+13
-2
@@ -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)
|
||||
|
||||
+2
-2
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user