Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYX committed Jun 28, 2024
1 parent 759c040 commit fedd6ed
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
3 changes: 3 additions & 0 deletions actions/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
[
{
"text": "开始游戏"
},
{
"sleep": 1
}
]
},
Expand Down
39 changes: 19 additions & 20 deletions diver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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 == '位面':
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit fedd6ed

Please sign in to comment.