def tansuo(): while runFlag: screen = util.getScreen() # 设定目标,开始查找 # 进入后 want = util.imgs['tu'] pts = util.action.locate(screen, want, 0) if not len(pts) == 0: msg = '%s-处于地图中\n' % (util.getTimeFormat()) logMsg(log, msg) want = util.imgs['left'] pts = util.action.locate(screen, want, 0) if not len(pts) == 0: right = (854, 527) right = util.action.cheat(right, 10, 10) pyautogui.click(right) t = random.randint(30, 60) / 100 time.sleep(t) continue screen = util.getScreen() want = util.imgs['jian'] pts = util.action.locate(screen, want, 0) if not len(pts) == 0: msg = '%s-点击小怪\n' % (util.getTimeFormat()) logMsg(log, msg) xx = util.action.cheat(pts[0], 10, 10) pyautogui.click(xx) elif not util.click(screen, 'boss'): for i in ['queren', 'tuichu']: screen = util.getScreen() if util.click(screen, i): msg = '%s-退出中\n' % (util.getTimeFormat()) logMsg(log, msg) t = random.randint(15, 30) / 100 time.sleep(t) break if util.checkMan(): count = count + 3 changeCost(cost, count) if (count >= PhysicalLimit) & (PhysicalLimit != 0): msg = '%s-已消耗体力-%d\n' % (util.getTimeFormat(), count) logMsg(log, msg) stop(log, Btn_start, Btn_stop) for i in ['28', 'tansuo', 'ying', 'jiangli', 'jixu', 'jujue']: screen = util.getScreen() result = util.click(screen, i) if result: t = random.randint(10, 20) / 100 time.sleep(t) continue else: continue
def jiejietupo(): global runFlag, log, cost, PhysicalLimit, Btn_start, Btn_stop, count while runFlag: screen = util.getScreen() if util.click(screen, 'test'): count = count + 3 changeCost(cost, count) if (count >= PhysicalLimit) & (PhysicalLimit != 0): msg = '%s-已消耗体力-%d\n' % (util.getTimeFormat(), count) logMsg(log, msg) stop(log, Btn_start, Btn_stop)
def yuling(): while runFlag: for i in [ 'yulintiaozhan', 'huntujiesuan', 'huntujiangli', 'huntujiesuan1', 'jiangli', 'jujue' ]: screen = util.getScreen() if util.click(screen, i): t = random.randint(10, 20) / 100 time.sleep(t) continue else: continue
def yeyuanhuo(): while runFlag: for i in [ 'yeyuanhuotiaozhan', 'yeyuanhuojiesuan', 'yeyuanhuojiangli', 'yeyuanhuojiesuan1', 'jiangli', 'jujue' ]: screen = util.getScreen() result = util.click(screen, i) if result: t = random.randint(10, 20) / 100 time.sleep(t) continue else: continue
def tansuo(): global count, PhysicalLimit while runFlag: # 设定目标,开始查找 # 进入后 want = util.imgs['tu'] pts = util.action.locate(util.getScreen(), want, 0) if not len(pts) == 0: msg = '%s-处于地图中\n' % (util.getTimeFormat()) logMsg(log, msg) want = util.imgs['left'] pts = util.action.locate(util.getScreen(), want, 0) if not len(pts) == 0: right = (854, 527) right = util.action.cheat(right, 10, 10) pyautogui.click(right) time.sleep(random.randint(30, 60) / 100) continue want = util.imgs['jian'] pts = util.action.locate(util.getScreen(), want, 0) if len(pts) >= 1: msg = '%s-点击小怪\n' % (util.getTimeFormat()) logMsg(log, msg) xx = util.action.cheat(pts[0], 10, 10) pyautogui.click(xx) else: for i in ['queren', 'tuichu']: if util.click(i): msg = '%s-退出中\n' % (util.getTimeFormat()) logMsg(log, msg) time.sleep(random.randint(15, 30) / 100) break if util.checkMan(): count = count + 3 changeCost(cost, count) if (count >= PhysicalLimit) & (PhysicalLimit != 0): msg = '%s-已消耗体力-%d\n' % (util.getTimeFormat(), count) logMsg(log, msg) stop(log, Btn_start, Btn_stop) want = util.imgs['jjtpman'] pts = util.action.locate(util.getScreen(), want, 0) if len(pts) >= 1: print('结界突破满') util.click('28guanbi') time.sleep(random.randint(50, 80) / 100) util.click('jjtpkaishi') while True: if util.click('jjtpjieshu'): while not util.click('jjtpguanbi'): pass break elif util.click('shuaxinqueren'): pass elif util.click('jjtpjingong'): pass elif util.click('jjtp'): pass else: util.click('jjtpshuaxin') for i in [ 'jjtpjiesuan', 'jjtpjiesuan1', 'jjtpjiesuan2', 'jjtpshibai', 'jujue' ]: if util.click(i): time.sleep(random.randint(10, 20) / 100) continue else: continue for i in [ '28', 'tansuo', 'ying', 'jiangli', 'jixu', 'jujue', 'yuhunqueren' ]: if util.click(i): time.sleep(random.randint(10, 20) / 100) continue else: continue