update templates (#54)
@@ -77,8 +77,6 @@ run_shenk | Run shenk in each new game. Select "1" to run it "0" to leave it out
|
||||
type | Build type. Currently only "sorceress" or "hammerdin" is supported
|
||||
casting_frames | Depending on your char and fcr you will have a specific casting frame count. Check it here: https://diablo2.diablowiki.net/Breakpoints and fill in the right number. Determines how much delay there is after each teleport for example.
|
||||
slow_walk | With this set to 1 the char will have a large delay for each running action in town. Set this to 1 if you keep getting stuck during traversing town.
|
||||
static_path_pindle | If set to 1, the pathing is done by staticly recorded screen positions. Otherwise it uses reference templates
|
||||
static_path_eldritch | If set to 1, the pathing is done by staticly recorded screen positions. Otherwise it uses reference templates
|
||||
atk_len_pindle | Attack length for hdin or number of attack sequences for sorc when fighting pindle
|
||||
atk_len_eldritch | Attack length for hdin or number of attack sequences for sorc when fighting eldritch
|
||||
atk_len_shenk | Attack length for hdin or number of attack sequences for sorc when fighting shenk
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 42 KiB |
BIN
assets/templates_1280_720/eldritch/eldritch_start.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 42 KiB |
@@ -26,8 +26,6 @@ type=sorceress
|
||||
casting_frames=11
|
||||
slow_walk=0
|
||||
stash_gold=0
|
||||
static_path_pindle=1
|
||||
static_path_eldritch=1
|
||||
atk_len_pindle=3
|
||||
atk_len_eldritch=3
|
||||
atk_len_shenk=4
|
||||
|
||||
11
src/bot.py
@@ -218,7 +218,6 @@ class Bot:
|
||||
self.trigger_or_stop("end_game")
|
||||
|
||||
def _start_run(self, key, run):
|
||||
Logger.info(f"{key}")
|
||||
self._do_runs[key] = False
|
||||
run_thread = threading.Thread(target=run.doit, args=(self,))
|
||||
run_thread.start()
|
||||
@@ -252,6 +251,7 @@ class Bot:
|
||||
def __init__(self):
|
||||
self.success = False
|
||||
def doit(self, bot: Bot):
|
||||
Logger.info("Run Pindle")
|
||||
self.success = bot._pather.traverse_nodes(bot._curr_location, Location.NIHLATHAK_PORTAL, bot._char)
|
||||
if not self.success:
|
||||
return
|
||||
@@ -287,6 +287,7 @@ class Bot:
|
||||
def __init__(self):
|
||||
self.success = False
|
||||
def doit(self, bot: Bot):
|
||||
Logger.info("Run Eldritch")
|
||||
self.success = bot._pather.traverse_nodes(bot._curr_location, Location.A5_WP, bot._char)
|
||||
if not self.success:
|
||||
return
|
||||
@@ -296,7 +297,7 @@ class Bot:
|
||||
wait(1.0)
|
||||
bot._ui_manager.use_wp(4, 1)
|
||||
time.sleep(0.5)
|
||||
self.success = bot._template_finder.search_and_wait(["ELDRITCH_0", "ELDRITCH_1"], threshold=0.65, time_out=20)[0]
|
||||
self.success = bot._template_finder.search_and_wait(["ELDRITCH_0", "ELDRITCH_START"], threshold=0.65, time_out=20)[0]
|
||||
if not self.success:
|
||||
return
|
||||
if not bot._pre_buffed:
|
||||
@@ -315,15 +316,13 @@ class Bot:
|
||||
bot._pather.traverse_nodes_fixed("eldritch_save_tp", bot._char)
|
||||
# shenk
|
||||
if bot._route_config["run_shenk"]:
|
||||
Logger.info("Run Shenk")
|
||||
self.success = bot._pather.traverse_nodes(Location.SHENK_START, Location.SHENK_SAVE_DIST, bot._char)
|
||||
if not self.success:
|
||||
return
|
||||
wait(0.15, 0.2)
|
||||
bot._char.kill_shenk()
|
||||
wait(0.5)
|
||||
# do two pickups on shenk because flames sometimes mess up item search
|
||||
bot._picked_up_items |= bot._pickit.pick_up_items(bot._char)
|
||||
wait(1.5, 1.8)
|
||||
wait(1.9, 2.4)
|
||||
bot._picked_up_items |= bot._pickit.pick_up_items(bot._char)
|
||||
# in order to move away for items to have a clear tp, move to the end of the hall
|
||||
if not bot.is_last_run():
|
||||
|
||||
@@ -74,8 +74,9 @@ class Config:
|
||||
"atk_len_pindle": int(self._select_val("char", "atk_len_pindle")),
|
||||
"atk_len_eldritch": int(self._select_val("char", "atk_len_eldritch")),
|
||||
"atk_len_shenk": int(self._select_val("char", "atk_len_shenk")),
|
||||
"static_path_pindle": bool(int(self._select_val("char", "static_path_pindle"))),
|
||||
"static_path_eldritch": bool(int(self._select_val("char", "static_path_eldritch"))),
|
||||
# currently no need to have anything other then static pathing set
|
||||
"static_path_pindle": True,
|
||||
"static_path_eldritch": True,
|
||||
}
|
||||
|
||||
self.sorceress = dict(self._config["sorceress"])
|
||||
|
||||
@@ -53,6 +53,7 @@ class TemplateFinder:
|
||||
"PINDLE_6": [load_template(f"assets/templates{res_str}/pindle/pindle_6.png", self._scale_factor), self._scale_factor],
|
||||
"PINDLE_7": [load_template(f"assets/templates{res_str}/pindle/pindle_7.png", self._scale_factor), self._scale_factor],
|
||||
# Templates for nodes to Eldritch
|
||||
"ELDRITCH_START": [load_template(f"assets/templates{res_str}/eldritch/eldritch_start.png", self._scale_factor), self._scale_factor],
|
||||
"ELDRITCH_0": [load_template(f"assets/templates{res_str}/eldritch/eldritch_0.png", self._scale_factor), self._scale_factor],
|
||||
"ELDRITCH_1": [load_template(f"assets/templates{res_str}/eldritch/eldritch_1.png", self._scale_factor), self._scale_factor],
|
||||
"ELDRITCH_2": [load_template(f"assets/templates{res_str}/eldritch/eldritch_2.png", self._scale_factor), self._scale_factor],
|
||||
|
||||