Skip to content

Commit

Permalink
Merge pull request #97 from tanjeffreyz/dev
Browse files Browse the repository at this point in the history
Fixed urgent rune solving error
  • Loading branch information
tanjeffreyz authored May 29, 2022
2 parents 124e5b9 + f93b4ee commit d5aa516
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/modules/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down Expand Up @@ -228,7 +223,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:
Expand Down

0 comments on commit d5aa516

Please sign in to comment.