-
Notifications
You must be signed in to change notification settings - Fork 6
/
normal.py
46 lines (37 loc) · 1.23 KB
/
normal.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# coding: utf-8
from base import Ops, dm
"""1280×720"""
class MyOps(Ops):
def run(self, click_pos):
self.setFront()
self.sleep_a_while(1)
# 1181,638 and 1182,656 是『开始行动』按钮的两个点
need_click = dm.GetColor(1181,638) == '0094d6' and dm.GetColor(1182,656) == 'fdffff'
if need_click:
# 1214,38 是编队界面右上角的垃圾箱图标
while self.get_color(1214,38) != '7d0000':
self.click(1181,638)
self.sleep_a_while(1)
# 1210,55 是战斗界面右上角的暂停图标
# 1126,468 是编队界面的『开始行动』图标
while self.get_color(1210,55) != 'ffffff':
self.click(1126,468)
self.sleep_a_while(1)
# 现在应该进入战斗
while not (dm.GetColor(1181, 638) == '0094d6' and dm.GetColor(1182, 656) == 'fdffff'):
self.click(*click_pos)
self.sleep_a_while(4)
LONGMEN5 = (927,168)
JINGYAN5 = (928,170)
JIAOMIE = (844,482)
M4_6 = (562,341)
M1_6 = (550,344)
M1_7 = (534,227)
PRB2 = (845,250)
if __name__ == '__main__':
import time
time.sleep(5)
o = MyOps()
# while True:
for i in range(10):
o.run(JINGYAN5)