Skip to content

Commit

Permalink
click f faster
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed Jul 12, 2024
1 parent 8c2225f commit dab98be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/task/BaseCombatTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def combat_once(self, wait_combat_time=180, wait_before=2):

def run_in_circle_to_find_echo(self, circle_count=3):
directions = ['w', 'a', 's', 'd']
step = 1.5
duration = 0.5
step = 1.2
duration = 0.8
total_index = 0
for count in range(circle_count):
logger.debug(f'running first circle_count{circle_count} circle {total_index} duration:{duration}')
Expand Down Expand Up @@ -205,6 +205,9 @@ def send_key_and_wait_f(self, direction, raise_if_not_found, time_out, running=F
f_found = self.wait_feature('pick_up_f', horizontal_variance=0.05, vertical_variance=0.05,
use_gray_scale=True, threshold=0.8,
wait_until_before_delay=0, time_out=time_out, raise_if_not_found=False)
if f_found:
self.send_key('f')
self.sleep(0.1)
self.send_key_up(direction)
if running:
self.mouse_up(key='right')
Expand All @@ -215,7 +218,6 @@ def send_key_and_wait_f(self, direction, raise_if_not_found, time_out, running=F
logger.warning(f"can't find the f to enter")
return False
remaining = time.time() - start
self.send_key('f')

if self.handle_claim_button():
self.sleep(0.5)
Expand Down

0 comments on commit dab98be

Please sign in to comment.