From 85772fa33fa00ffde8318a8d4c46414978bbd087 Mon Sep 17 00:00:00 2001 From: Jeffrey Tan Date: Sat, 28 May 2022 16:28:16 -0700 Subject: [PATCH 1/2] added separator to loading submodules --- src/modules/bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/bot.py b/src/modules/bot.py index baeccde5..803d8a94 100644 --- a/src/modules/bot.py +++ b/src/modules/bot.py @@ -228,7 +228,8 @@ def load_commands(self, file): print(f" ! Command book '{module_name}' was not loaded") def update_submodules(self, force=False): - print('\n[~] Retrieving latest submodules:') + utils.print_separator() + print('[~] Retrieving latest submodules:') repo = git.Repo.init() changed = False with open('.gitmodules', 'r') as file: From f93b4eefb582274d78a451d6becfe44abdd4329e Mon Sep 17 00:00:00 2001 From: Jeffrey Tan Date: Sat, 28 May 2022 17:35:50 -0700 Subject: [PATCH 2/2] removed color conversion before solving rune --- src/modules/bot.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/modules/bot.py b/src/modules/bot.py index 803d8a94..2c69f96f 100644 --- a/src/modules/bot.py +++ b/src/modules/bot.py @@ -117,13 +117,11 @@ def _solve_rune(self, model): adjust(*self.rune_pos).execute() time.sleep(0.2) press(self.config['Interact'], 1, down_time=0.2) # Inherited from Configurable + print('\nSolving rune:') inferences = [] for _ in range(15): - frame = config.capture.screenshot() - if frame is None: - continue - frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR) + frame = config.capture.frame solution = detection.merge_detection(model, frame) if solution: print(', '.join(solution)) @@ -134,10 +132,7 @@ def _solve_rune(self, model): time.sleep(1) for _ in range(3): time.sleep(0.3) - frame = config.capture.screenshot() - if frame is None: - continue - frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR) + frame = config.capture.frame rune_buff = utils.multi_match(frame[:frame.shape[0] // 8, :], RUNE_BUFF_TEMPLATE, threshold=0.9)