梦幻手游抓鬼任务

news/2024/11/16 10:25:58/
# 创作者: anjdeng
# !/usr/bin/python
# -*- coding: UTF-8 -*-
# 雷电模拟器分别率选择1280*720
#游戏包裹满了一定要清
import pyautogui
import win32gui
import win32con
import time
import random
import pytesseract as pt
from PIL import Image
#周一晚上8点半以后不要做单机任务
hwnd = win32gui.FindWindow('LDPlayerMainFrame','雷电模拟器')
win32gui.ShowWindow(hwnd,win32con.SW_SHOWDEFAULT)
print("进入游戏画面...")
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
listsize = [left,top,right,bottom]
#print("%d" % listsize[0])
time.sleep(3)
worklistsize = ['宝图','师','秘境','运镖','抓鬼']
#-------------------操作界面-------------------
def 选择任务(a):return a
def gethamming(dif1=[], dif2=[]):hamming_distance = 0for i in range(len(dif1)):if dif1[i] != dif2[i]:hamming_distance += 1if hamming_distance>7:  #一般这个值需要自己调整,找一个合适的值return 0else:return 1
def get_hash(im):"""get image hash string"""# antialias 抗锯齿# convert 转换 L 代表灰度im = im.resize((8, 8), Image.ANTIALIAS).convert('L')# avg:像素的平均值avg = sum(list(im.getdata())) / 64.0# avg和每个像素比较,得到长度64的字符串str = ''.join(map(lambda i: '0' if i < avg else '1', im.getdata()))# str切割,每4个字符一组,转成16进制字符return ''.join(map(lambda x: '%x' % int(str[x:x + 4], 2), range(0, 64, 4)))
def 监听判断人物是否正在战斗():img1 = Image.open('战斗-取消_副本.png')img1 = get_hash(img1)im = pyautogui.screenshot(region=(listsize[0] + 1107, listsize[1] + 605, 85, 85)) #战斗-取消im.save('战斗-取消.png')img2 = Image.open('战斗-取消.png')img2 = get_hash(img2)i = gethamming(img1, img2)if i:return 1else:return 0
def 点击意外窗口确定按钮():pyautogui.click(listsize[0] + random.randint(650, 740), listsize[1] + random.randint(420, 450), duration=0.5)print("点击意外窗口确定...")time.sleep(1)return
def 点击意外窗口取消按钮():pyautogui.click(listsize[0] + random.randint(450, 540), listsize[1] + random.randint(420, 450), duration=0.5)print("点击意外窗口取消...")time.sleep(1)return
def 点击关闭刮刮乐界面():pyautogui.click(listsize[0] + random.randint(1060, 1075), listsize[1] + random.randint(70, 85), duration=0.5)print("点击关闭刮刮乐界面...")time.sleep(1)return
def 点击关闭福利界面():pyautogui.click(listsize[0] + random.randint(1010, 1020), listsize[1] + random.randint(95, 105), duration=0.5)print("点击关闭福利界面...")time.sleep(1)
def 点击关闭启动插件():pyautogui.click(listsize[0] + random.randint(865, 885), listsize[1] + random.randint(250, 265), duration=0.5)print("点击关闭插件...")time.sleep(1)
def 点击中心区域():pyautogui.click(listsize[0] + random.randint(600,620), listsize[1] + random.randint(400, 420), duration=0.5)print("点击中心区域...")time.sleep(1)
def 点击活动():pyautogui.click(listsize[0]+random.randint(295,340),listsize[1]+random.randint(40,90),duration=0.5)print("点击活动...")time.sleep(1)return
def 点击参加按钮(k,x,y,i): #i = 1if i == k:pyautogui.click(listsize[0] + random.randint(593, 664) + x, listsize[1] + random.randint(152, 185) + y, duration=0.5)print("点击参加...")time.sleep(1)returni = i + 1if i % 2 == 0:x = x + 383return  点击参加按钮(k,x,y,i)else:y = y + 106x = x - 383return 点击参加按钮(k,x,y,i)
def 点击任务按钮():pyautogui.click(listsize[0] + random.randint(967,1063), listsize[1] + random.randint(143,183), duration=0.5)print("点击任务按钮...")time.sleep(1)return
def 点击队伍按钮():pyautogui.click(listsize[0] + random.randint(1100, 1140), listsize[1] + random.randint(140, 180), duration=0.5)print("点击队伍按钮...")time.sleep(1)return
def 点击退出或创建队伍按钮():pyautogui.click(listsize[0] + random.randint(147, 300), listsize[1] + random.randint(630, 670), duration=0.5)print("点击退出或创建队伍按钮...")time.sleep(1)return
def 点击关闭队伍窗口按钮():pyautogui.click(listsize[0] + random.randint(1020, 1040), listsize[1] + random.randint(65, 82), duration=0.5)print("点击关闭队伍窗口...")time.sleep(1)return
def 点击关闭活动窗口按钮():pyautogui.click(listsize[0] + random.randint(1056, 1073), listsize[1] + random.randint(75, 90), duration=0.5)time.sleep(1)print("点击关闭活动窗口")return
def 点击任务窗口当前按钮():pyautogui.click(listsize[0] + random.randint(1054, 1084), listsize[1] + random.randint(148, 238), duration=0.5)print("点击当前...")time.sleep(1)return
def 点击常规任务按钮():pyautogui.click(listsize[0] + random.randint(186, 321), listsize[1] + random.randint(146, 186), duration=0.5)print("点击常规任务...")time.sleep(1)return
def 点击常规任务列表中的宝图任务按钮(y):pyautogui.click(listsize[0] + random.randint(186, 321), listsize[1] + random.randint(227+y, 267+y), duration=0.5)print("点击常规任务列表中的宝图任务...")time.sleep(1)return
def 点击马上传送按钮():pyautogui.click(listsize[0] + random.randint(830, 970), listsize[1] + random.randint(617, 647), duration=0.5)print("点击马上传送...")time.sleep(1)return
def 点击关闭任务窗口按钮():pyautogui.click(listsize[0] + random.randint(1020, 1040), listsize[1] + random.randint(67, 87), duration=0.5)print("点击关闭任务窗口...")time.sleep(1)
def 点击任务列表第一个任务按钮():pyautogui.click(listsize[0] + random.randint(1140, 1180), listsize[1] + random.randint(225, 275), duration=0.5)print("点击任务列表第一个任务...")time.sleep(1)return
def 点击商城购买按钮():pyautogui.click(listsize[0] + random.randint(870, 1000), listsize[1] + random.randint(630, 650), duration=0.5)print("点击商城购买...")time.sleep(1)return
def 点击商城列表的第一件物品按钮():pyautogui.click(listsize[0] + random.randint(380, 672), listsize[1] + random.randint(197, 270), duration=0.5)print("点击商城列表的第一件物品...")time.sleep(1)return
def 点击拉出任务列表按钮():pyautogui.click(listsize[0] + random.randint(1152, 1174), listsize[1] + random.randint(153, 173), duration=0.5)print("点击拉出任务列表...")time.sleep(1)return
def 点击普通商城购买按钮():pyautogui.click(listsize[0] + random.randint(830, 980), listsize[1] + random.randint(560, 600), duration=0.5)print("点击普通商城购买...")time.sleep(1)return
def 点击活动窗口日常任务按钮():pyautogui.click(listsize[0] + random.randint(151, 274), listsize[1] + random.randint(133, 175), duration=0.5)print("点击日常活动...")time.sleep(1)return
def 点击上交():pyautogui.click(listsize[0] + random.randint(953, 1058), listsize[1] + random.randint(555, 600), duration=0.5)print("点击上交...")time.sleep(1)return
def 识别任务(x,y,a,k):time.sleep(1)#保存截图im = pyautogui.screenshot(region=(listsize[0]+391+x,listsize[1]+118+y,188,55))im.save('做活动.png')#识别文字path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("做活动.png")img = img.convert('L')arm = pt.image_to_string(img,lang="chi_sim")print(arm)global worklistsizefor i in arm:if i in worklistsize[a]:k = k + 1print("检索任务成功...")return kk = k + 1if k % 2 != 0:x = x + 381return 识别任务(x,y,a,k)else:x = x -381y = y + 107return 识别任务(x,y,a,k)
def 识别地图():im = pyautogui.screenshot(region=(listsize[0] + 110, listsize[1] + 60, 100, 28))im.save('识别地图.png')path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别地图.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")print(arm)test1 = "瑶方寸山长寿宝象战两届魔王大雪唐官府塔长安狮女龙洛阳城建邺海宫女东阴花果傲来渔港普地"for i in test1:for i in arm:return 0return 1
def 识别队伍窗口():time.sleep(1)# 保存截图im = pyautogui.screenshot(region=(listsize[0] + 388, listsize[1] + 122, 180, 50))im.save('识别队伍窗口.png')# 识别文字path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别队伍窗口.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")test1 = "目标尚未创建"for i in test1:if i in arm:return 1return 0
def 识别活动窗口():time.sleep(1)im = pyautogui.screenshot(region=(listsize[0] + 151, listsize[1] + 133, 123, 42))im.save('识别活动窗口.png')# 识别文字path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别活动窗口.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")test1="日常活动"for i in arm:if i in test1:return 1return 0
def 判断是否尚未创建队伍():time.sleep(1)im = pyautogui.screenshot(region=(listsize[0] + 318, listsize[1] + 126, 540, 32))im.save('拉胯.png')path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("拉胯.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")time.sleep(1)test1 = "尚未创建"for i in test1:if i in arm:return 1return 0
def 识别创建两字():time.sleep(1)im = pyautogui.screenshot(region=(listsize[0] + 980, listsize[1] + 466, 89, 34))im.save('识别创建两字.png')path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别创建两字.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")print(arm)test1 = "创建"for i in test1:if i in arm:return 1return 0
def 识别任务窗口常规任务(y,v):time.sleep(1)im = pyautogui.screenshot(region=(listsize[0] + 186, listsize[1] + 227 + y, 135, 40))  # y加81im.save('识别任务窗口任务.png')# 识别文字path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别任务窗口任务.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")test1 = "活动支主线派引导"for i in test1:if i in arm:if v == 0:点击常规任务按钮()return 识别任务窗口常规任务(y,v)else:return -1test2 = "宝图"for j in test2:if j in arm:点击常规任务列表中的宝图任务按钮(y)return 1y = y + 81v = v + 1return 识别任务窗口常规任务(y,v)
def 识别商城窗口():time.sleep(1)im = pyautogui.screenshot(region=(listsize[0] + 179, listsize[1] + 115, 486, 36))im.save('识别商城窗口.png')path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别商城窗口.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")test1 = "购买出售物品"for i in test1:if i in arm:return 1return 0
def 识别任务列表():点击队伍按钮()点击队伍按钮()i = 识别队伍窗口()if i:点击关闭队伍窗口按钮()点击任务按钮()return 1return 0
def 识别普通商城窗口():time.sleep(1)im = pyautogui.screenshot(region=(listsize[0] + 746, listsize[1] + 380, 98, 35))im.save('识别普通商城窗口.png')path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别普通商城窗口.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")test1 = "购买"for i in test1:if i in arm:return 1return 0
def 识别请按任意键继续():im = pyautogui.screenshot(region=(listsize[0] + 96, listsize[1] + 73, 270, 42))im.save('识别请按任意键继续.png')path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别请按任意键继续.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")test1="请按任意键继续"for i in test1:if i in arm:return 1return 0
def 拖拽任务列表():pyautogui.moveTo(listsize[0] + 1067,listsize[1] + 215,duration=0.5)pyautogui.dragTo(listsize[0]+1100,listsize[1]+750,duration=0.5)print("拖拽任务列表...")return
def 识别使用():img1 = Image.open('使用_副本.png')img1 = get_hash(img1)im = pyautogui.screenshot(region=(listsize[0] + 968, listsize[1] + 549, 105, 45)) #使用im.save('使用.png')img2 = Image.open('使用.png')img2 = get_hash(img2)i = gethamming(img1, img2)if i:return 1else:return 0
def 识别战斗():img1 = Image.open('战斗-取消_副本.png')img1 = get_hash(img1)im = pyautogui.screenshot(region=(listsize[0] + 1107, listsize[1] + 605, 85, 85))  # 战斗-取消im.save('战斗-取消.png')img2 = Image.open('战斗-取消.png')img2 = get_hash(img2)i = gethamming(img1, img2)if i:return 1else:return 0
def 识别上交():img1 = Image.open('上交_副本.png')img1 = get_hash(img1)im = pyautogui.screenshot(region=(listsize[0] + 935, listsize[1] + 555, 105, 45)) #上交im.save('上交.png')img2 = Image.open('上交.png')img2 = get_hash(img2)i = gethamming(img1, img2)if i:return 1else:return 0
#-------------------宝图任务-----------------------------
def 点击听听无妨():pyautogui.click(listsize[0] + random.randint(890, 1125), listsize[1] + random.randint(455,485), duration=0.5)print("点击听听无妨...")time.sleep(1)return
def 监听宝图():j, k = 1, 0while j == 1:i = 0k = k + 1print("监听中... %d 次" % k)j = 监听判断人物是否正在战斗(i)return j
#-------------------秘境任务-----------------------------
def 点击进入():pyautogui.click(listsize[0] + random.randint(280, 420), listsize[1] + random.randint(610, 630), duration=0.5)print("点击进入...")time.sleep(1)return
def 点击第一关():pyautogui.click(listsize[0] + random.randint(295, 335), listsize[1] + random.randint(345, 375), duration=0.5)print("点击第一关...")time.sleep(1)return
def 点击挑战():pyautogui.click(listsize[0] + random.randint(570, 670), listsize[1] + random.randint(510, 540), duration=0.5)print("点击挑战...")time.sleep(1)return
def 正在秘境任务():i,s= 1,0点击关卡()while 1:time.sleep(30)i = 识别战斗()if i == 1 and s != 0:s = 0if i == 0:点击师门列表任务按钮(252)s = s + 1if s == 3:break
def 点击关卡():pyautogui.click(listsize[0] + random.randint(990, 1150), listsize[1] + random.randint(260, 310), duration=0.5)print("点击关卡...")time.sleep(1)return
def 点击离开():pyautogui.click(listsize[0] + random.randint(1100, 1150), listsize[1] + random.randint(350, 370), duration=0.5)print("点击离开...")time.sleep(1)return
#-------------------抓鬼任务-----------------------------
def 点击自动匹配():time.sleep(1)pyautogui.click(listsize[0] + random.randint(638, 800), listsize[1] + random.randint(626, 661) , duration=0.5)return
def 识别抓鬼匹配界面():im = pyautogui.screenshot(region=(listsize[0] + 185, listsize[1] + 125, 124, 42))im.save('识别是否匹配成功.png')# 识别文字path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别是否匹配成功.png")img = img.convert('L')arm = pt.image_to_string(img, lang="chi_sim")test1 = "抓鬼"for i in test1:if i in arm:time.sleep(1)return 0return 1
def 识别是否匹配成功(h):i  = 识别抓鬼匹配界面()if i == 1:return ih = h + 1print("匹配中... %d次" % h)if h == 11:return 2time.sleep(1)return 识别是否匹配成功(h)
def 监听抓鬼(a):j,k,g=1,0,0while j == 1:i = 0k = k + 1if g < 2:if 识别活动窗口():点击关闭活动窗口按钮()g = g + 1if 识别队伍窗口():点击关闭队伍窗口按钮()g = g + 1print("监听中... %d 次" % k)j = 监听判断人物是否正在战斗(i)return j
def 分析原因():print("自动分析原因...")#在执行任务,但是被系统错误检测了点击队伍按钮()i = 判断是否尚未创建队伍()if i == 1:print("尚未创建队伍...")return 0elif i == 0:i = 识别创建两字()if i == 1:print("队伍为空...")return 1elif i == 0:print("队伍不为空...")return 2
def 解决问题(reason):print("正在解决...")if reason == 0:点击关闭队伍窗口按钮()点击任务按钮()return 1elif reason == 1:点击任务按钮()return 1elif reason == 2:点击队伍按钮()点击退出或创建队伍按钮()点击关闭队伍窗口按钮()点击任务按钮()
#-------------------师门任务-----------------------------
def 点击师门选择按钮(x,l):if x == 0:time.sleep(1)pyautogui.click(listsize[0] + random.randint(390+x, 445+x),listsize[1] + random.randint(429,450),duration=0.5)  # x加111print("点击选择...")l = l + 1i = 识别师门任务选择窗口()if i:x = x + 111if l == 6:return 0return 点击师门选择按钮(x,l)else:return 1
def 识别师门任务选择窗口():time.sleep(1)im = pyautogui.screenshot(region=(listsize[0] + 511, listsize[1] + 529, 195, 32))im.save('识别师门任务选择窗口.png')# 识别文字path = r"E:\tesseract-ocr\tesseract.exe"pt.pytesseract.tesseract_cmd = pathimg = Image.open("识别师门任务选择窗口.png")arm = pt.image_to_string(img, lang="chi_sim")test1 = "选择"for i in test1:if i in arm:return 1return 0
def 识别师门任务列表(y,l):img1 = Image.open('师门任务_副本.png')img1 = get_hash(img1)im = pyautogui.screenshot(region=(listsize[0] + 880, listsize[1] + 130 + y, 20, 45))  # 加63 第一排 师门任务im.save('师门任务.png')img2 = Image.open('师门任务.png')img2 = get_hash(img2)i = gethamming(img1, img2)if i:jun = [y,l]return junelse:if l == 6:l = -1jun = [y,l]return juny = y + 63l = l + 1return 识别师门任务列表(y,l)
def 识别师门任务窗口():img1 = Image.open('门派关系_副本.png')img1 = get_hash(img1)im = pyautogui.screenshot(region=(listsize[0] + 956, listsize[1] + 507, 80, 80)) #门派关系im.save('门派关系-.png')img2 = Image.open('门派关系-.png')img2 = get_hash(img2)i = gethamming(img1, img2)if i:return 1else:return 0
def 识别任务列表师门任务():img1 = Image.open('师门-_副本.png')img1 = get_hash(img1)im = pyautogui.screenshot(region=(listsize[0] + 964, listsize[1] + 203, 60, 30))#师门-im.save('师门-.png')img2 = Image.open('师门-.png')img2 = get_hash(img2)i = gethamming(img1, img2)if i:return 1else:return 0
def 正在跑师门任务():end,i,sum,s= 1,0,0,0while end == 1:if sum == 0:点击任务列表第一个任务按钮()time.sleep(1)y,l=0,0jun = 识别师门任务列表(y,l)if jun[1] != -1:点击师门列表任务按钮(jun[0])if l <= 3 and l != -1:s = s + 1elif l>3:s = 0time.sleep(1)jun = 识别师门任务列表(jun[0],jun[1])if jun[1] != -1:s = 0点击师门列表任务按钮(jun[0])else:if s == 3:点击师门列表任务按钮(315)s = 0elif s == 4:点击师门列表任务按钮(-32)s = 0l = 识别商城窗口()while l:点击商城列表的第一件物品按钮()点击商城购买按钮()l = 识别商城窗口()l = 识别普通商城窗口()if l:点击普通商城购买按钮()l = 识别使用()if l:点击师门任务意外弹出窗口()点击中心区域()l = 识别上交()if l:点击上交()time.sleep(2)点击中心区域()time.sleep(1)l = 识别战斗()while l:time.sleep(10)l = 识别战斗()i = i + 1time.sleep(2)l = 识别任务列表师门任务()print("......")if l:end = 1sum = 0print("第 %d 次循环" % i)else:sum = sum + 1if sum == 4:end = 0elif sum == 2 or sum == 3:time.sleep(5)点击中心区域()end = 1else:time.sleep(5)end = 1
def 点击师门列表任务按钮(y):pyautogui.click(listsize[0] + random.randint(890, 930), listsize[1] + random.randint(130 + y, 175 + y), duration=0.5)print("点击师门任务...")time.sleep(1)return
def 点击师门任务意外弹出窗口():pyautogui.click(listsize[0] + random.randint(975, 995), listsize[1] + random.randint(565, 585),duration=0.5)print("点击意外窗口...")time.sleep(1)return
def 点击关闭做完师门任务弹出的窗口():pyautogui.click(listsize[0] + random.randint(1033, 1047), listsize[1] + random.randint(164, 178), duration=0.5)print("点击关闭师门任务窗口...")time.sleep(1)return
def 点击宝箱():pyautogui.click(listsize[0] + random.randint(390, 430), listsize[1] + random.randint(520, 560), duration=0.5)print("点击宝箱...")time.sleep(1)return
#-------------------控制台-------------------------------
a = 3
while a >= 0:a = 选择任务(a)if a == 0: #宝图i, j = 1, 0while i:点击活动()识别活动窗口()点击活动窗口日常任务按钮()time.sleep(1)j = j + 1print("任务寻找...")x, y, k, i = 0, 0, 0, 1k = 识别任务(x, y, a, k)点击参加按钮(k, x, y, i)i = 识别活动窗口()if j == 4:a = -1breakif a == -1:breakprint("自动寻路中...")time.sleep(20)y,v=0,0点击听听无妨()点击任务按钮()点击任务按钮() #点掉宝图老板的答话点击任务窗口当前按钮()i = 识别任务窗口常规任务(y,v)if i == -1:print("程序出错...")else:点击马上传送按钮()点击关闭任务窗口按钮()print("正在监听...")监听宝图()print("退出监听...")print("任务完成...")a = a + 1elif a == 1:  #师门i, j = 1, 0while i:点击活动()识别活动窗口()点击活动窗口日常任务按钮()time.sleep(1)j = j + 1print("任务寻找...")x, y, k, i = 0, 0, 0, 1k = 识别任务(x, y, a, k)点击参加按钮(k, x, y, i)i = 识别活动窗口()if j == 4:a = -1breakif a == -1:breaktime.sleep(1)x,l = 0,0x = 点击师门选择按钮(x,l)if x == 0:print("识别失败...")print("程序终止...")a = -1breakelse:print("开始任务...")点击中心区域()b = 识别任务列表()if b == 0:点击拉出任务列表按钮()拖拽任务列表()正在跑师门任务()print("结束任务...")while 识别使用():点击师门任务意外弹出窗口()if 识别师门任务窗口():点击宝箱()点击关闭做完师门任务弹出的窗口()time.sleep(1)点击中心区域()a = -1;elif a == 2: #秘境i,j= 1,0while i:点击活动()识别活动窗口()点击活动窗口日常任务按钮()time.sleep(1)j = j + 1print("任务寻找...")x, y, k, i = 0, 0, 0, 1k = 识别任务(x, y, a, k)点击参加按钮(k, x, y, i)i = 识别活动窗口()if j == 4:a = -1breakif a == -1:breaktime.sleep(1)y,l=0,0jun = 识别师门任务列表(y,l)if jun[1] != -1:点击师门列表任务按钮(jun[0])time.sleep(1)点击进入()time.sleep(1)点击意外窗口确定按钮()time.sleep(1)点击第一关()time.sleep(1)点击挑战()print('进入秘境...')正在秘境任务()while 识别使用():点击师门任务意外弹出窗口()time.sleep(1)点击离开()time.sleep(5)elif a == 3 : # 运镖i, j = 1, 0while i:点击活动()识别活动窗口()点击活动窗口日常任务按钮()time.sleep(1)j = j + 1print("任务寻找...")x, y, k, i = 0, 0, 0, 1k = 识别任务(x, y, a, k)点击参加按钮(k, x, y, i)i = 识别活动窗口()if j == 4:a = -1breakif a == -1:breaktime.sleep(15)s = 0while 1:s = s + 1点击师门列表任务按钮(252)time.sleep(1)点击意外窗口确定按钮()time.sleep(1)while 识别地图():time.sleep(10)if s == 3:breakelif a == 5:  #抓鬼任务anjdeng = 0while anjdeng >= 0:time.sleep(1)点击活动()i = 识别活动窗口()if i == 0:anjdeng = -1break;time.sleep(1)print("任务寻找...")x, y, k, i = 0, 0, 0, 1k = 识别任务(x, y, a, k)点击参加按钮(k, x, y, i)print("开始任务...")点击自动匹配()i,h= 1,0while i > 0:print("自动匹配中...")i = 识别是否匹配成功(h)if i == 1:print("自动识别:匹配成功...")i = 0elif i == 2:print("匹配时间过长...")time.sleep(1)点击自动匹配()print("取消自动匹配...")time.sleep(1)点击自动匹配()print("正在抓鬼...")print("监听中...")j = 监听抓鬼(a)print("退出监听...")reason = 分析原因()print("分析完成...")解决问题(reason)
print("错误,程序停止...")
#点击队伍


http://www.ppmy.cn/news/163434.html

相关文章

大二学生基于Html+Css+javascript的网页制作——动漫设计公司响应式网站模板 (10个页面)

HTML实例网页代码, 本实例适合于初学HTML的同学。该实例里面有设置了css的样式设置&#xff0c;有div的样式格局&#xff0c;这个实例比较全面&#xff0c;有助于同学的学习,本文将介绍如何通过从头开始设计个人网站并将其转换为代码的过程来实践设计。 ⚽精彩专栏推荐&#x1…

吃鸡ios和android灵敏度,吃鸡手游pc版怎么调灵敏度参数教程 | 手游网游页游攻略大全...

发布时间&#xff1a;2015-11-02 本文小编为大家带来网页版64位IE浏览器的登陆教程. 首先打开IE浏览器,然后打开浏览器设置,点击兼容性视图设置,在添加此网站下面输入163.com,点击添加关闭窗口后刷新网页安装插件即可. ... 标签&#xff1a; 梦幻西游手游网页版 梦幻西游手游网…

特意整理出来一百套游戏源码,免费分享给大家

前几天分享了几百套网站源码&#xff0c;反响不错。这两天好多csdn的网友私信我想要一些游戏源码&#xff0c;今天特意整理出来一百套游戏源码&#xff0c;免费分享给大家&#xff01; 希望大家多多支持我&#xff0c;给我点赞评论哟&#xff01; 所以的都是免费下载的&#x…

【方向盘】Spring Boot 2.5.0正式发布,环境变量可指定前缀的功能很赞

少年易学老难成&#xff0c;一寸光阴不可轻。 本文已被https://yourbatman.cn收录&#xff1b;女娲Knife-Initializr工程可公开访问啦&#xff1b;程序员专用网盘https://wangpan.yourbatman.cn&#xff1b;技术专栏源代码大本营&#xff1a;https://github.com/yourbatman/tec…

各种单机游戏假设

编码 游戏名称 链接 GM工具(客户端)备注1 大闹天宫 链接: http://pan.baidu.com/s/1hq7ZWmK 密码: gtck 2 七雄争霸 链接: http://pan.baidu.com/s/1eQxUD3O 密码: fskd 3 热血三国V1.2 链接: h…

梦幻之旅

题记&#xff1a; 梦幻西游是我上中学玩的一款游戏&#xff0c;也是我第一次接触的网络游戏&#xff0c;曾几何时&#xff0c;它为网易公司带来了不菲的收入&#xff0c;也深深的影响了我们这一代爱玩游戏的年轻人。虽然它的辉煌历史已经渐渐远去&#xff0c;现在很多3D效果的游…

笑傲江湖mysql设置gm_收集笑傲江湖网络版gm指令

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 功能指令 说明 /gotoobj [npc# or mon#] 直接移动到一对象旁。 /solve 将玩家Petition的内容叫出并处理。 /who 可以看到一个玩家的OID及帐号 /whonpc 可以看到所有NPC的OID及Location /allfactory 取得所有该区域定义的 npc 及 m…

梦5白泽版实时存档

此文已过期&#xff01; 2018.10.01国庆回家无聊玩起了梦幻西游单机&#xff08;梦幻群侠传5&#xff09;&#xff0c;从此一发不可收拾&#xff0c;陆续玩了很多大佬的版本&#xff1a; 梦5原版&#xff08;初版、日期版&#xff09; 浪西游 梦5唯美版 梦5白泽版 个人比较喜…