def zhaotu(fenbianlv): # impath1 = "haha"+str(fenbianlv)+'.jpg' impath1 = 'screenshot.jpg' targetPath_a = "yellow" +str(fenbianlv)+'.jpg' win32gui.EnumWindows(get_all_hwnd, 0) hwnd = win32gui.FindWindow(None, 'C:\Windows\system32\cmd.exe') app = QApplication(sys.argv) screen = QApplication.primaryScreen() while 1>0: img = screen.grabWindow(hwnd ).toImage() img.save("screenshot.jpg") try: ls = get_pay_keyboard_number_location(impath1, targetPath_a,0.97) #在键盘图片找到字母a # print(ls) print('有提示框') send_message_to_slack('弹出框待解决') except: print("无提示框") sleep(5)
def fengyao_all(): # 2179 < x < 2265 # 605< y < 679 denglu() n1 = (1209, 467) n2 = (1701, 437) n3 = (1243, 847) n4 = (1719, 775) xx = random.sample(range(632, 674), 1) yy = random.sample(range(262, 332), 1) sleep(random_num(2)) d.click(xx[0], yy[0]) # 点击上方活动选项图标 sleep(random_num(2) + 1) # d.click(627,545)# 点击 封妖 quyu_click(702, 517, 761, 578) sleep(random_num(2)) finish_flag = 1 while finish_flag > 0: jiepin() sleep(1) finish = matchImg('home.jpg', './main_pic/fengyao_finish.jpg', 0.98) print(finish) if finish[0] > 0: finish_flag = 0 # send_message() tuichu() sleep(random_num(2)) # 切换角色 quyu_click(1567, 606, 1586, 623) # d.click(1450,640) send_message_to_slack('封妖结束') else: finish_flag = 1 quyu_click(119, 1098, 981, 1275) # weizhi = [(919,1169),(234,1177),(535,1176),(919,1169)] # xy = weizhi[random_num(3)] # x1 = 234 - 2* num_r() # y1 = 1177- 2* num_r() # x1 = xy[0] - num_r() # y1 = xy[1] - num_r() # d.click(x1 , y1) sleep(10 - num_r())
def close_ditu(): new_sleep() jiepin() sleep(1) temp = matchImg('./home_yabiao.jpg','./yabiaofile/closeIcon.jpg') new_sleep() if temp[0]>0: nn = random_num(9) d.click(temp[0]+nn,temp[1]+nn) else: send_message_to_slack('没找到地图关闭按钮')
def send_biao_npc(x1,y1,x2,y2): new_sleep() click_geiyu() delay_sleep() quyu_click(x1,y1,x2,y2) delay_sleep() jiepin() sleep(1) biaoyin = matchImg('./home_yabiao.jpg','./yabiaofile/biaoyin.jpg') if biaoyin[0]>0: d.click(biaoyin[0],biaoyin[1]) delay_sleep() quyu_click(769,935,906,979) #确定 new_sleep() else: send_message_to_slack('没有镖银') new_sleep()
def shimen_isFindsomething(): res = matchImg('home.jpg','wenzi_xunwu.jpg') fuhuoyao = matchImg('home.jpg','./shimen_wupin/wenzi_fuhuoyao.jpg') nvyi = matchImg('home.jpg','./shimen_wupin/wenzi_nvyi.jpg') if res[0]==0: #不是寻物任务 pass elif fuhuoyao[0]>0: shimen_fuhuoyao() elif nvyi[0]>0: shimen_nvyi() else: #是寻物任务 # send_message() send_message_to_slack('寻物') sleep(10) return 1
def fengyao(): finish_flag = 1 while finish_flag > 0: jiepin() sleep(1) finish = matchImg('home.jpg','./main_pic/fengyao_finish.jpg',0.98) print(finish) if finish[0]>0: finish_flag = 0 # send_message() send_message_to_slack('封妖结束') tuichu() else: finish_flag = 1 weizhi = [(919,1169),(234,1177),(535,1176),(919,1169)] xy = weizhi[random_num(3)] # x1 = 234 - 2* num_r() # y1 = 1177- 2* num_r() x1 = xy[0] - num_r() y1 = xy[1] - num_r() d.click(x1 , y1) sleep(20-num_r())
def start(zuobiao, close): print("kaishi") gogogo = 1 while gogogo > 0: #^ 判断人物是否在移动,静止返回-1,在移动返回0,只判断一次,实时返回 panduan1 = isMove_once() # panduan2 = isFight_once() if panduan1 == 0: while panduan1 == 0: sleep(1) panduan1 = isMove_once() jiepin() zidong = matchImg('saota_home.jpg', './chongzhi_pic.jpg', 0.40) # zidong = get_pay_keyboard_number_location('test_saota_home.jpg','chongzhi_pic.jpg',0.8) if zidong[0] <= 0: send_message_to_slack('主号需要处理') sleep(5) print("取消自动了") else: print("自动 ing") zhandou = matchImg('saota_home.jpg', './wenzi_huihe.jpg') if zhandou[0] > 0: # # if panduan1 ==0 : # time_start = time.time() #开始计时 # isfight = 0 # if zhandou[0]>0: print("fight中") isfight = 1 while isfight > 0: jiepin() sleep(0.5) zhandou = matchImg('saota_home.jpg', './wenzi_huihe.jpg') if zhandou[0] > 0: isfight = 1 print('fighting中') jiepin2() jiepin() sleep(1) zidong = matchImg('saota_home.jpg', './chongzhi_pic.jpg', 0.5) # zidong = get_pay_keyboard_number_location('test_saota_home.jpg','chongzhi_pic.jpg',0.8) if zidong[0] <= 0: # send_message_to_slack('主号需要处理') sleep(2) print("取消自动了") else: print("自动 ing") # time_end = time.time() #结束计时 # time_c= time_end - time_start #运行所花时间 # time_c=int(time_c) # print('战斗耗时: ' + str(time_c)) # if time_c > 70: # send_message_to_slack('fight超时') # time.sleep(30) # time_start = time.time() else: isfight = 0 print('fighting结束') else: # T5_move() long1_move() # long3_move() # huaguoshan_move() # beiju_move() # daidui_go_move(zuobiao,close) sleep(5) new_sleep()
def zhuagui_click_all_button(i): delay_sleep() denglu() delay_sleep() timenow = calendar.timegm(time.gmtime()) timenow = str(timenow) save_pic(timenow) # 从进入主界面开始 sleep(3) new_sleep() click_renwu() sleep(1) n1 = 1 while n1 > 0: jiepin() sleep(1) chacha = matchImg('home.jpg','renwu_x.jpg',0.95) if chacha[0]>0: print("进入了任务界面") n1 = -1 else: click_renwu() delay_sleep() click_zhuagui_caidan() delay_sleep() print("开始点击右下角") while 1> 0: jiepin() haoyou = matchImg('home.jpg','./main_pic/mix3_haoyouxinxi.jpg',0.90) if haoyou[0] >0: print("有好友界面") sleep(1) d.click(1026,767) d.click(1025,768) new_sleep() kaishi = matchImg('home.jpg','./main_pic/wenzi_kaishi.jpg') chufa = matchImg('home.jpg','./main_pic/wenzi_chufa.jpg') zhandou = matchImg('home.jpg','./main_pic/wenzi_huihe.jpg') pintu = matchImg('home.jpg','./main_pic/pintu_jiemian.jpg') finish = matchImg('home.jpg','./main_pic/zhuagui_finish.jpg') isfight = 0 if kaishi[0]>0: zhaogui() # d.click(kaishi[0],kaishi[1]) elif chufa[0] > 0: #quyu_click(784,690,1033,723) quyu_click(790,551,1028,605) #mix3 # d.click(chufa[0],chufa[1]) elif zhandou[0] > 0: #在fighting, 循环判断fighting是否结束 isfight = 1 while isfight > 0: jiepin() sleep(0.5) zhandou = matchImg('home.jpg','./main_pic/wenzi_huihe.jpg') if zhandou[0] > 0: isfight = 1 print('fighting中') else: isfight = 0 print('fighting结束') elif pintu[0]>0: print("是拼图") sigongge() # send_message() elif finish[0]>0: sleep(5) # nn = 1 # while nn > 0 : # jiepin() # sleep(1) # xx = matchImg('home.jpg','renwu_x.jpg',0.95) # if xx[0]>0: # print("有XX") # d.click(xx[0],xx[1]) # else: # nn = -1 jiepin() sleep(1) nn212= matchImg('home.jpg','zhuagui_wancheng_flag.jpg',0.91) if nn212[0]>0: print("抓鬼完成") quyu_click( 210,1561,800,1911) new_sleep() delay_sleep() quyu_click(1034,117,1038,129) #关闭任务界面 sleep(2) new_sleep() quyu_click(217,1369,330,1444) # 打开宝库 sleep(2) jietu_now() #截图 sleep(2) new_sleep() quyu_click(270,206,367,240) # 点击集市 sleep(2) new_sleep() quyu_click(340,337,400,356) # 点击 我的货架 sleep(2) new_sleep() jietu_now() #截图 quyu_click(1034,117,1038,129) #关闭界面 sleep(2) new_sleep() sell_hulu_zhuagui() sleep(1) tuichu() sleep(random_num(2)) rs = '第%s个号,zhuagui结束' % i send_message_to_slack(rs) return 0 click_youxiajiao() new_sleep(2) click_bangmangzhuagui() click_bangmangzhuagui() new_sleep(2) click_bangmangzhuagui() sleep(3)
def fengyao_all(i): print("第%s个开始"%i) # 2179 < x < 2265 # 605< y < 679 denglu() # n1=(1209,467) # n2 = (1701,437) # n3 = (1243,847) # n4 = (1719,775) sleep(5) delay_sleep() quyu_click(626,136,679,187) # quyu_click(663,340,769,415) delay_sleep() jiepin() sleep(1) # shimenshouwei = matchImg('home.jpg','./shimenshouwei.jpg') # benshiheshang = matchImg('home.jpg','./benshiheshang.jpg') fengyaotubiao = matchImg('home.jpg','./fengyao_tubiao.jpg') new_sleep() sleep(1) if fengyaotubiao[0]>0: # quyu_click(795,369,801,372) n = num_r() d.click(fengyaotubiao[0]+n,fengyaotubiao[1]+n) else: # quyu_click(578,351,655,402) send_message_to_slack('没找到封妖图标') #! 点击 封妖 # d.click(627,545) # quyu_click(600,358,660,420) #~ 日历, 封妖 # quyu_click(700,344,744,428) #~ 日历,封妖, 本事和尚 # quyu_click(578,351,655,402) #~ 日历,师门入侵,封妖 # quyu_click(795,369,801,372) #~ 周末活动 # quyu_click(520,390,524,392) sleep(random_num(2)) finish_flag = 1 while finish_flag > 0: jiepin() sleep(1) finish = matchImg('home.jpg','./main_pic/mix3_fengyao_finish.jpg',0.92) print(finish) if finish[0]>0: finish_flag = 0 # send_message() sleep(5) tuichu() sleep(random_num(2)) # 切换角色˙ # quyu_click(1530,598,1540,641) # quyu_click(1493,603,1545,630) #mix3 #~ 3.24注释掉, 完成一个号封妖后,不用在这里进入选择角色的界面 # d.click(1450,640) # send_message_to_slack('封妖结束') # sys.exit() else: haoyou = matchImg('home.jpg','./main_pic/mix3_haoyouxinxi.jpg',0.90) if haoyou[0] >0: sleep(1) d.click(1026,767) new_sleep() fengyaojiemian = matchImg('home.jpg','./main_pic/mix3_fengyaojiemian.jpg',0.95) if fengyaojiemian[0]>0: finish_flag = 1 quyu_click(114,1030,1000,1213) #mix3 sleep(10-num_r())
def shimen_click_all_button(): #右下角继续任务的按钮,可以放个线程一直点击 print("开始点击右下角") while 1> 0: jiepin() # kaishi = matchImg('home.jpg','./main_pic/wenzi_kaishi.jpg') # chufa = matchImg('home.jpg','./main_pic/wenzi_chufa.jpg') zhandou = matchImg('home.jpg','./main_pic/wenzi_huihe.jpg') pintu = matchImg('home.jpg','./main_pic/pintu_jiemian.jpg') xunwu = matchImg('home.jpg','./new_gui_pic/wenzi_xunwu.jpg') finish = matchImg('home.jpg','./main_pic/shimen_finish.jpg') isfight = 0 if zhandou[0] > 0: #在fighting, 循环判断fighting是否结束 isfight = 1 while isfight > 0: jiepin() sleep(0.5) zhandou = matchImg('home.jpg','./main_pic/wenzi_huihe.jpg') if zhandou[0] > 0: isfight = 1 print('fighting中') else: isfight = 0 print('fighting结束') elif pintu[0]>0: print("是拼图") sigongge() # send_message() elif xunwu[0]>0: # send_message() send_message_to_slack('寻物') elif finish[0]>0: # send_message() tuichu() sleep(random_num(2)) d.click(1450,640) # 切换角色 send_message_to_slack('师m结束') sys.exit() # if kaishi[0]>0: # zhaogui() # # d.click(kaishi[0],kaishi[1]) # elif chufa[0] > 0: # d.click(chufa[0],chufa[1]) # elif zhandou[0] > 0: # #在fighting, 循环判断fighting是否结束 # isfight = 1 # while isfight > 0: # jiepin() # sleep(0.5) # zhandou = matchImg('home.jpg','./main_pic/wenzi_huihe.jpg') # if zhandou[0] > 0: # isfight = 1 # print('fighting中') # else: # isfight = 0 # print('fighting结束') # elif pintu[0]>0: # print("是拼图") # sigongge() # send_message() click_youxiajiao() sleep(1) click_youxiajiao()
def zhaogui(): # jiepin() # pintu = matchImg('home.jpg','./main_pic/pintu_jiemian.jpg') # print(pintu) jiangshi = matchImg('home.jpg', './new_gui_pic/wenzi_jiangshi.jpg') niutou = matchImg('home.jpg', './new_gui_pic/wenzi_niutou.jpg') mamian = matchImg('home.jpg', './new_gui_pic/wenzi_mamian.jpg') yegui = matchImg('home.jpg', './new_gui_pic/wenzi_yegui.jpg') kulouguai = matchImg('home.jpg', './new_gui_pic/wenzi_kulouguai.jpg') paojiu = matchImg('home.jpg', './new_gui_pic/wenzi_jiu.jpg') xianglu = matchImg('home.jpg', './new_gui_pic/wenzi_xianglu.jpg') lazhu = matchImg('home.jpg', './new_gui_pic/wenzi_lazhu.jpg') huangzhi = matchImg('home.jpg', './new_gui_pic/wenzi_huangzhi.jpg') huangjin = matchImg('home.jpg', './new_gui_pic/wenzi_huangjin.jpg') # xunwu = matchImg('home.jpg','./new_gui_pic/wenzi_xunwu.jpg') if jiangshi[0] > 0: click_kaishi() sleep(1) find_gui('jiangshi') elif niutou[0] > 0: click_kaishi() sleep(1) print("找牛头") # find_gui('niutou') find_gui2('niutou') elif mamian[0] > 0: click_kaishi() sleep(1) find_gui2('mamian') elif yegui[0] > 0: click_kaishi() sleep(1) find_gui('yegui') elif kulouguai[0] > 0: click_kaishi() sleep(1) # find_gui('kulouguai') find_gui2('kulouguai') elif paojiu[0] > 0: click_kaishi() sleep(1) find_jiu() elif xianglu[0] > 0: click_kaishi() sleep(1) find_xianglu() elif lazhu[0] > 0: click_kaishi() sleep(1) find_gui('lazhu') elif huangzhi[0] > 0: click_kaishi() sleep(1) find_gui('huangzhi') elif huangjin[0] > 0: click_kaishi() sleep(1) find_gui('huangjin') # elif pintu[0]>0: # print("是拼图") # sigongge() # elif xunwu[0] > 0: else: # send_message() send_message_to_slack('来手动处理')
def zhuagui_click_all_button(): # 从进入主界面开始 sleep(1) new_sleep() click_renwu() sleep(1) new_sleep() click_zhuagui_caidan() sleep(2) print("开始点击右下角") while 1 > 0: jiepin() kaishi = matchImg('home.jpg', './main_pic/wenzi_kaishi.jpg') chufa = matchImg('home.jpg', './main_pic/wenzi_chufa.jpg') zhandou = matchImg('home.jpg', './main_pic/wenzi_huihe.jpg') pintu = matchImg('home.jpg', './main_pic/pintu_jiemian.jpg') finish = matchImg('home.jpg', './main_pic/zhuagui_finish.jpg') isfight = 0 if kaishi[0] > 0: zhaogui() # d.click(kaishi[0],kaishi[1]) elif chufa[0] > 0: quyu_click(784, 690, 1033, 723) # d.click(chufa[0],chufa[1]) elif zhandou[0] > 0: #在fighting, 循环判断fighting是否结束 isfight = 1 while isfight > 0: jiepin() sleep(0.5) zhandou = matchImg('home.jpg', './main_pic/wenzi_huihe.jpg') if zhandou[0] > 0: isfight = 1 print('fighting中') else: isfight = 0 print('fighting结束') elif pintu[0] > 0: print("是拼图") sigongge() # send_message() elif finish[0] > 0: sleep(5) delay_sleep() quyu_click(1027, 238, 1034, 294) delay_sleep() sell_hulu_zhuagui() sleep(1) tuichu() sleep(random_num(2)) # 点击选择角色的按钮 quyu_click(1567, 606, 1586, 623) # d.click(1450,640) send_message_to_slack('zhuagui结束') send_message() sys.exit() # print("开始进行师门任务") # d.click(334- num_r(),726- num_r()) # sleep(2) # shimen_click_all_button() click_youxiajiao() new_sleep(2) click_bangmangzhuagui() click_bangmangzhuagui() # click_youxiajiao() # click_youxiajiao() new_sleep(2) click_bangmangzhuagui() # x = 688 # y = 1257 # d.click(x,y) # d.click(x,y) # d.click(x,y) # d.click(x,y) # if finish_flag[0] == 0: # x = 688 # y = 1257 # d.click(x,y) # d.click(x,y) # d.click(x,y) # d.click(x,y) # else: # print("抓鬼任务结束,结束程序") # sys.exit() sleep(3)
def yabiao(): new_sleep() open_wupin() delay_sleep() jiepin() sleep(1) biaoju77 = matchImg('./home_ybiao.jpg','./yabiaofile/baise77.jpg') ##~ 旗子坐标是525,155 if biaoju77[0] > 0: d.click(biaoju77[0],biaoju77[1]) d.click(biaoju77[0],biaoju77[1]) delay_sleep() quyu_click(1905,378,2101,423) # 送我去那里 delay_sleep() close_wupin() delay_sleep() d.click(1579,489) # 进镖局 sleep(2) d.click(1479,419) #走近npc sleep(4) d.click(1602,507) # 点击npc delay_sleep() jiepin() sleep(1) shifoulingrenwu = matchImg('./home_ybiao.jpg','./yabiaofile/wenzi_sijibiao.jpg') if shifoulingrenwu[0] > 0: quyu_click(1904,600,2000,643) #点击四级镖银 delay_sleep() quyu_click(1914,650,2100,690) # 选 储备金模式 delay_sleep() jiepin() #保存目的地截图 sleep(1) chengyaojin = matchImg('./home_ybiao.jpg','./yabiaofile/wenzi_chengyaojin.jpg') delay_sleep() click_kongbai() delay_sleep() ##~ 出镖局 chubiaoju() ##~ 去目的地 if chengyaojin[0]>0: mudidi = 'chengyaojin' # yabiao_chengyaojin() new_sleep() # ca_dt() open_ditu() delay_sleep() d.click(1311,214) delay_sleep() close_ditu() sleep(60) d.click(768,31) sleep(5) delay_sleep() send_chengyaojin() new_sleep() #判断是否在移动,如果在移动则不处理,如果是静止,则判断是否进入战斗,如果进入战斗则点击自动,如果没进入战斗,则自动寻路去目的地 temp = 1 while temp > 0: yidong = isMove_once() # 静止返回-1,在移动返回0,只判断一次,实时返回 if yidong > -1 : # 在移动,不作处理 pass else: zhandou = isFight_once() # #fighting中,返回-1 if zhandou == -1 : #在战斗中 quyu_click(2236,1000,2269,1020) #点自动 new_sleep() quyu_click(2236,1000,2269,1020) #取消自动 new_sleep() quyu_click(2236,1000,2269,1020) #再点一次自动 new_sleep() sleep(8) else: # 判断是否到达目的地或入口 # 如果没有到达目的地,则继续打开地图走 pass elif kongdu[0]>0: yabiao_kongdu() else: send_message_to_slack('没打开领任务界面') sleep(60)
def gogo_lingrenwu(): # xiangdui_zuobiao = [(1197,395),(1116,454),(1278,425),(1292,333),(1196,344),(1197,395),(1116,454),(1278,425),(1292,333),(1196,344),(11,22)] # zhao_yizhanlaoban = [(1100,473),(1106,454),(999,600),(916,615),(848,580),(897,472),(11,22)] zhao_yizhanlaoban = [(1430, 457), (1382, 408), (1520, 422), (1524, 483), (1361, 491), (1461, 432)] # open_daoju() # open_changan7() # go_yizhan() # sleep(0.8) # close_daoju() # new_sleep() for i in zhao_yizhanlaoban: open_daoju() open_changan7() go_yizhan() sleep(0.8) close_daoju() d.click(i[0], i[1]) delay_sleep() print('当前用的坐标是: %s ' % str(i)) jiepin2() sleep(2) yy = matchImg('home_zhuagui.jpg', 'queren_flag.jpg') if yy[0] > 0: sleep(1) d.click(yy[0], yy[1]) print("找到了") break if i[0] == 1461: print("没找到") send_message_to_slack("出错了,没找到") nx = 1 while nx > 0: jiepin2() sleep(1) yy = matchImg('home_zhuagui.jpg', 'queren_flag.jpg') if yy[0] > 0: sleep(1) d.click(yy[0], yy[1]) print("找到了") nx = 0 break sleep(3) delay_sleep() open_ditu() new_sleep() ditu_guojing_to_difu() new_sleep() close_guojingditu() sleep(20) goin_difu() delay_sleep() delay_sleep() open_ditu() new_sleep() go_zhongkui() new_sleep() close_difu_ditu() sleep(22) new_sleep() click_zhongkui() delay_sleep() # ling_zhuagui() # sleep(1) quyu_click(1918, 654, 1935, 659) new_sleep()
def go_difang(): sleep(1) jiepin() sleep(2) wz = matchImg('home_zhuagui.jpg', './difang/wenzi_wz.jpg') jingwai = matchImg('home_zhuagui.jpg', './difang/wenzi_jingwai.jpg') ne = matchImg('home_zhuagui.jpg', './difang/wenzi_ne.jpg') al = matchImg('home_zhuagui.jpg', './difang/wenzi_al.jpg') cs = matchImg('home_zhuagui.jpg', './difang/wenzi_cs.jpg') jianye = matchImg('home_zhuagui.jpg', './difang/wenzi_jianye.jpg') yewai = matchImg('home_zhuagui.jpg', './difang/wenzi_yewai.jpg') zz = matchImg('home_zhuagui.jpg', './difang/wenzi_zz.jpg') xiliang = matchImg('home_zhuagui.jpg', './difang/wenzi_xiliang.jpg') # baoxiang = matchImg('home_zhuagui.jpg','./difang/wenzi_baoxiang.jpg') pt = matchImg('home_zhuagui.jpg', './difang/wenzi_pt.jpg') if wz[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 go_wz() elif jingwai[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 go_jingwai_left() elif ne[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 go_ne() elif al[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 open_al77() elif cs[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 open_cs77() elif jianye[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 go_jianye() elif yewai[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 go_yewai() elif zz[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 new_sleep() open_zz77() elif xiliang[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 go_xiliang() elif pt[0] > 0: quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 go_pt() else: image = d.screenshot(format='opencv') cv2.imwrite('baoxiang_wenzi_jiepin.jpg', image) sleep(1) # send_message_to_slack('没找到地方') # sleep(10) quyu_click(1360, 856, 1378, 915) #找到目的地.点击掉钟馗的对话框, 等抓到宝象国文字的图片后,这句代码可以合并到if的最上面 go_baoxiangguo() sleep(2) send_message_to_slack('到达目的地')