diff --git a/config/params.ini b/config/params.ini index 94e2bf8..6d008f4 100644 --- a/config/params.ini +++ b/config/params.ini @@ -37,25 +37,30 @@ order=run_pindle, run_eldritch_shenk ; These configs have to be alligned with your d2r settings and char build type=light_sorc casting_frames=10 -show_items=alt -inventory_screen=i -tp=f9 ;Note: loot columns are counted from left to right. Items on the left side of inventory will be considered lootable. num_loot_columns=5 -force_move=e -;Note: stand_still can not be the default "shift" as it would interfere with merc healing -stand_still=capslock ;Note: this is different from the default hotkey as "~" is for many keyboards not reachable without also pressing altgr -show_belt=k belt_rows=4 +cta_available=0 + +; hotkeys: +show_items=alt +inventory_screen=i +town_portal=f9 +; teleport--leave empty if you can't use +teleport= +force_move=e +; stand_still can not be the default "shift" as it would interfere with merc healing +stand_still=capslock +show_belt=k potion1=1 potion2=2 potion3=3 potion4=4 -cta_available=0 weapon_switch=x battle_orders=f7 battle_command=f8 + ; ========================== ; ==== Optional configs ==== ; ========================== @@ -80,7 +85,6 @@ atk_len_diablo=3.0 kill_cs_trash=0 cs_town_visits=0 cs_mob_detect=1 -; DIABLO END ;######################### ;Pots @@ -122,7 +126,6 @@ transmute=flawless ; ==== Builds: Sorceress ==== ; =========================== [sorceress] -teleport= frozen_armor= energy_shield= thunder_storm= @@ -158,7 +161,6 @@ hydra=f2 ; ==== Builds: Paladin ==== ; ========================= [paladin] -teleport= holy_shield= vigor= redemption= @@ -182,7 +184,6 @@ blessed_hammer= ; ========================== ; Currently no Trav implementaiton! [trapsin] -teleport= skill_left= burst_of_speed= fade= @@ -198,7 +199,6 @@ death_sentry= ; Make sure leap hotkey is set if you do not have Enigma ; Ensure Battle Order/Command hotkeys are set above in the [char] section [barbarian] -teleport= leap= shout= war_cry= @@ -217,7 +217,6 @@ cry_frequency=0.7 ;recomended to set skeleton mage to same as revive hot hey ;skeleton mages cause pathing issues not ideal to use yet [necro] -teleport= skill_left= bone_armor= clay_golem= @@ -230,7 +229,6 @@ clear_pindle_pack= heart_of_wolverine= [poison_necro] -teleport= poison_nova= # Not Required skill_left= @@ -247,7 +245,6 @@ clear_pindle_pack= heart_of_wolverine= [bone_necro] -teleport= teeth= bone_armor= clay_golem= @@ -266,7 +263,6 @@ damage_scaling=1 ;if the buffs are not set they are not used (they are part of the prebuff setup) [basic] -teleport= left_attack= right_attack= buff_1= @@ -281,7 +277,6 @@ buff_2= ;if the buffs are not set they are not used (they are part of the prebuff setup) [basic_ranged] -teleport= left_attack= right_attack= buff_1= diff --git a/src/bot.py b/src/bot.py index 4cc5dad..675ddc2 100644 --- a/src/bot.py +++ b/src/bot.py @@ -269,9 +269,9 @@ class Bot: belt.fill_up_belt_from_inventory(Config().char["num_loot_columns"]) self._char.discover_capabilities() if corpse_present and self._char.capabilities.can_teleport_with_charges and not self._char.select_tp(): - keybind = self._char._skill_hotkeys["teleport"] + keybind = Config().char["teleport"] Logger.info(f"Teleport keybind is lost upon death. Rebinding teleport to '{keybind}'") - self._char.remap_right_skill_hotkey("TELE_ACTIVE", self._char._skill_hotkeys["teleport"]) + self._char.remap_right_skill_hotkey("TELE_ACTIVE", Config().char["teleport"]) # Check for the current game ip and pause if we are able to obtain the hot ip if Config().dclone["region_ips"] != "" and Config().dclone["dclone_hotip"] != "": diff --git a/src/char/i_char.py b/src/char/i_char.py index 3735317..98d39db 100644 --- a/src/char/i_char.py +++ b/src/char/i_char.py @@ -62,7 +62,7 @@ class IChar: def _discover_capabilities(self) -> CharacterCapabilities: override = Config().advanced_options["override_capabilities"] if override is None: - if self._skill_hotkeys["teleport"]: + if Config().char["teleport"]: if self.select_tp(): if self.skill_is_charged(): return CharacterCapabilities(can_teleport_natively=False, can_teleport_with_charges=True) @@ -171,7 +171,7 @@ class IChar: return self._remap_skill_hotkey(skill_asset, hotkey, Config().ui_roi["skill_right"], Config().ui_roi["skill_right_expanded"]) def select_tp(self): - return skills.select_tp(self._skill_hotkeys["teleport"]) + return skills.select_tp(Config().char["teleport"]) def pre_move(self): # if teleport hotkey is set and if teleport is not already selected @@ -181,7 +181,7 @@ class IChar: def move(self, pos_monitor: tuple[float, float], force_tp: bool = False, force_move: bool = False): factor = Config().advanced_options["pathing_delay_factor"] - if "teleport" in self._skill_hotkeys and self._skill_hotkeys["teleport"] and ( + if "teleport" in Config().char and Config().char["teleport"] and ( force_tp or ( skills.is_right_skill_selected(["TELE_ACTIVE"]) diff --git a/src/config.py b/src/config.py index 728b8a2..faacb7a 100644 --- a/src/config.py +++ b/src/config.py @@ -256,6 +256,7 @@ class Config: "type": self._select_val("char", "type"), "show_items": self._select_val("char", "show_items"), "inventory_screen": self._select_val("char", "inventory_screen"), + "teleport": self._select_val("char", "teleport"), "stand_still": self._select_val("char", "stand_still"), "force_move": self._select_val("char", "force_move"), "num_loot_columns": int(self._select_val("char", "num_loot_columns")), @@ -267,7 +268,7 @@ class Config: "heal_rejuv_merc": float(self._select_val("char", "heal_rejuv_merc")), "chicken": float(self._select_val("char", "chicken")), "merc_chicken": float(self._select_val("char", "merc_chicken")), - "tp": self._select_val("char", "tp"), + "town_portal": self._select_val("char", "town_portal"), "belt_rows": int(self._select_val("char", "belt_rows")), "show_belt": self._select_val("char", "show_belt"), "potion1": self._select_val("char", "potion1"), diff --git a/src/ui/skills.py b/src/ui/skills.py index c307d75..d85aba0 100644 --- a/src/ui/skills.py +++ b/src/ui/skills.py @@ -23,8 +23,8 @@ def has_tps() -> bool: """ :return: Returns True if botty has town portals available. False otherwise """ - if Config().char["tp"]: - keyboard.send(Config().char["tp"]) + if Config().char["town_portal"]: + keyboard.send(Config().char["town_portal"]) if not (tps_remain := wait_until_visible(ScreenObjects.TownPortalSkill, timeout=4).valid): Logger.warning("You are out of tps") if Config().general["info_screenshots"]: