diff --git a/src/bot.py b/src/bot.py index 4fc7776..418ac11 100644 --- a/src/bot.py +++ b/src/bot.py @@ -323,7 +323,9 @@ class Bot: # Check if we are out of tps or need repairing need_repair = self._ui_manager.repair_needed() - need_routine_repair = self._config.char["runs_per_repair"] and ((self._game_stats._run_counter) % int(self._config.char["runs_per_repair"]) == 0) + need_routine_repair = False + if type(self._config.char["runs_per_repair"]) == int and self._config.char["runs_per_repair"] > 0: + need_routine_repair = self._game_stats._run_counter % self._config.char["runs_per_repair"] == 0 need_refill_teleport = self._char.capabilities.can_teleport_with_charges and self.need_refill_teleport_charges() if self._tps_left < random.randint(3, 5) or need_repair or need_routine_repair or need_refill_teleport: if need_repair: Logger.info("Repair needed. Gear is about to break") diff --git a/src/config.py b/src/config.py index d8eece9..9471dbc 100644 --- a/src/config.py +++ b/src/config.py @@ -242,7 +242,7 @@ class Config: "atk_len_diablo": float(Config._select_val("char", "atk_len_diablo")), "atk_len_cs_trashmobs": float(Config._select_val("char", "atk_len_cs_trashmobs")), "kill_cs_trash": float(Config._select_val("char", "kill_cs_trash")), - "runs_per_repair": Config._select_val("char", "runs_per_repair"), + "runs_per_repair": False if not Config._select_val("char", "runs_per_repair") else int(Config._select_val("char", "runs_per_repair")), "gamble_items": Config._select_val("char", "gamble_items").replace(" ","").split(","), } # Sorc base config