From fedd6edbae69b275b716b0fb5c5c0b4c3ee45dda Mon Sep 17 00:00:00 2001 From: ZYX Date: Sat, 29 Jun 2024 00:00:48 +0800 Subject: [PATCH] - --- actions/default.json | 3 +++ diver.py | 39 +++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/actions/default.json b/actions/default.json index b0b8d44..cf284fa 100644 --- a/actions/default.json +++ b/actions/default.json @@ -28,6 +28,9 @@ [ { "text": "开始游戏" + }, + { + "sleep": 1 } ] }, diff --git a/diver.py b/diver.py index a008135..d975fd9 100644 --- a/diver.py +++ b/diver.py @@ -503,14 +503,13 @@ def find_event_text(self, save=0): def align_event(self, key, deep=0): find = 0 - if deep == 0: + if deep == 0 and key == 'd': win32api.mouse_event(win32con.MOUSEEVENTF_MOVE, 0, int(-200 * self.multi * self.scale)) - if key == 'd': - event_text = self.find_event_text(1) - if not event_text: - self.press('s', 1) - else: - find = 1 + event_text = self.find_event_text(1) + if not event_text: + self.press('s', 1) + else: + find = 1 if not find: event_text = self.find_event_text(1) self.ts.forward(self.get_screen()) @@ -744,15 +743,20 @@ def area(self): self.press('w', 0.5) self.portal_opening_days(static=1) elif area_now == '财富': - self.press('w', 3.2) - self.press('a', 0.3) + self.press('w',3) + pyautogui.click() + time.sleep(0.6) + keyops.keyDown('w') + time.sleep(0.2) self.keys.fff = 1 - for key in ['a','d']: - keyops.keyDown(key) - for i in range(3): - self.press('w', 0.15) - time.sleep(0.15) - keyops.keyUp(key) + self.press('a', 0.5) + time.sleep(0.65) + keyops.keyUp('w') + if self.find_portal() is None: + self.press('a', 0.4) + self.press('s',1) + self.press('d',0.7) + self.press('w',0.8) self.keys.fff = 0 self.portal_opening_days(static=1) elif area_now == '位面': @@ -887,11 +891,6 @@ def stop(self, *_, **__): self.init_floor() except: pass - try: - stack_trace_list = traceback.format_stack() - print(''.join(stack_trace_list)) - except: - pass self._stop = True def on_key_press(self, event):