1 Star 0 Fork 25

Pqv4iYDX55jJ/懒人原神AI

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
auto.py 94.76 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842
# -*- coding: utf-8 -*-
import random
import threading
import traceback
import tangbaowss
from lanrenauto.findpic.findimg import *
from lanrenauto.tools.screenshot import screenshot
import state
from lanrenauto.yolov.lanrenonnx import LanRenOnnxYolov
from lanrenauto.moni.moni import *
import pyautogui
import re
imgs_duihuahuopengren = [
cv2.imdecode(np.fromfile(file="./datas/对话.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED),
cv2.imdecode(np.fromfile(file="./datas/烹饪.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED),
cv2.imdecode(np.fromfile(file="./datas/钓鱼.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED),
cv2.imdecode(np.fromfile(file="./datas/齿轮.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
]
imgs_pianpianhua = [cv2.imdecode(np.fromfile(file="./datas/薄荷.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED),
cv2.imdecode(np.fromfile(file="./datas/甜甜花.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
]
def 开伞():
__t=time.time()
if -state.状态_开伞时间 > 2 or state.状态_开伞时间==-1:
state.状态_开伞时间=__t
logger.info("检测到可能在下落 打风之翼")
pyautogui.keyDown('space')
time.sleep(0.2)
pyautogui.keyUp('space')
time.sleep(0.4)
pyautogui.keyDown('space')
time.sleep(0.2)
pyautogui.keyUp('space')
state.计次_误差过大 += 1
state.状态_开伞时间=-1
class YolovYuanShen():
def __init__(self, weights, providers=["CUDAExecutionProvider",'CPUExecutionProvider'],dic_labels={},model_h=320, model_w=320):
pyautogui.PAUSE = 0.01
pyautogui.FAILSAFE = False
self.yolov = LanRenOnnxYolov(weights=weights, providers=providers,dic_labels=dic_labels,model_h=model_h, model_w=model_w)
self.interaction_label = ["怪物", "采集物", "矿石","掉落物"]
self.centre_point = [(1920 // 2), (1080 // 2) + 100]
self.key_w_down = True
self.小地图区域 = (87 - 10, 45 - 10, 246 + 10, 204 + 10)
state.状态_YOLOV = True
def run_fight(self,wakuang=False,caiji=False,daguai=False):
global loop
state.计时_未寻路 = 0
# 获取窗口句柄
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
while True:
if state.状态_循环开关 == False:
logger.info("强制退出!")
pyautogui.keyUp('w')
state.状态_是否回放中 = False
state.计数_没找到任何目标 = 0
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_检测中=False
return
if get_window_handle_at_mouse_position() == hwnd:
break
state.计数_没找到任何目标 = 0
state.计数_没找到怪物 = 0
state.状态_在爬墙 = False
state.状态_检测中 = True
state.状态_开伞时间 = -1
已经_F了=False
历史_上次玩家高度 = 0.1
玩家高度 = 0.1
计数_没有玩家 = 0
isIn_wxl = False
set_window_activate(hwnd)
jiaoben = (os.path.abspath(os.path.join(state.PATH_JIAOBEN, state.LIANZHAO)))
# 临时发送消息给指定客户端
message = f"解析脚本#@@#{jiaoben}"
tangbaowss.send_msg(message)
time.sleep(2)
while True:
try:
if state.状态_循环开关 == False:
state.状态_是否回放中 = False
state.计数_没找到任何目标 = 0
state.状态_检测中 = False
tangbaowss.send_msg( "是否回放#@@#假")
return
time.sleep(0.005)
rect = win32gui.GetWindowRect(hwnd)
w_p, h_p = (rect[2] - rect[0]) - 1920, (rect[3] - rect[1]) - 1080
# 设定截图区域的左上角坐标 (x, y) 和右下角坐标 (x, y)
left, top, right, bottom = 0, 0, 1920, 1080 # 替换成你实际的区域坐标
# F交互框位置
left_dh, top_dh, right_dh, bottom_dh = [1161, 508, 1319, 572] # 替换成你实际的区域坐标
p_left = rect[0] + w_p
p_top = rect[1] + h_p
计数_没有玩家 += 1
if state.状态_寻路中 == False:
state.计数_没找到任何目标 += 1
state.计数_没找到怪物 += 1
state.状态_在爬墙 = False
if state.状态_已经有寻路了 == False or state.状态_检测中==False:
state.状态_是否回放中 = False
state.计数_没找到任何目标 = 0
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_检测中 = False
return
if state.状态_全局暂停:
tangbaowss.send_msg( "是否回放#@@#假")
time.sleep(2)
continue
if get_window_handle_at_mouse_position() != hwnd:
tangbaowss.send_msg( "是否回放#@@#假")
time.sleep(0.1)
# 激活hwnd
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
time.sleep(0.2)
if state.状态_传送中:
time.sleep(1)
continue
# 设定保存截图的文件夹路径和文件名前缀
# filename = f"./原神截图/{int(time.time())}{random.randint(1000,9999)}.jpg"
ret_scr = screenshot(hwnd, left, top, right, bottom, filename=None)
if type(ret_scr) == bool:
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
logger.info("截图失败了!可能是内存溢出了")
time.sleep(2)
continue
datas, state.图片_YOLOV = self.yolov.detect(ret_scr, plot_box=state.开关_是否展预测结果)
if state.开关_是否展预测结果:
state.QT_信号.mysig_show_yolov.emit()
if state.状态_全局暂停:
pyautogui.keyUp('w')
tangbaowss.send_msg( "是否回放#@@#假")
time.sleep(2)
continue
if datas == []:
if state.状态_是否回放中 == False:
if state.状态_在爬墙 == False and state.状态_寻路中 == True:
计数_没有玩家 = 0
ttt = threading.Thread(target=开伞)
if state.python_var > 9:
ttt.daemon = True
else:
ttt.setDaemon(True)
ttt.start()
else:
# 将离屏幕中心最近的点排在前面
datas = sorted(datas, key=self.distance_to_target)
isIn, idex = find_dict_index(datas, 'label', '往上跳')
if isIn:
state.状态_在爬墙 = True
else:
state.状态_在爬墙 = False
isIn_wxl, _ = find_dict_index(datas, 'label', '往下落')
isIn, idex = find_dict_index(datas, 'label', '被控了')
if isIn:
logger.info("被控了!")
pyautogui.press('space')
pyautogui.press('space')
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
continue
isIn_jhdh, idex = find_dict_index(datas, 'label', 'F交互')
if isIn_jhdh: # 路过的顺手捡了
# 二次排除对话烹饪 并且识别骗骗花
if random.randint(1, 2) == 1:
pyautogui.scroll(300)
else:
pyautogui.scroll(-300)
pyautogui.keyUp('w')
if not self.find_duihuahuopengren(hwnd, left_dh, top_dh, right_dh, bottom_dh, p_left,
p_top) or self.find_pianpianhua(hwnd, left_dh, top_dh,
right_dh, bottom_dh, p_left,
p_top):
self.key_w_down = False
已经_F了 =True
state.计次_识别次数 = 0
state.计数_卡主次数 = 0
logger.info(f"顺手捡采集物!{datas[idex]}")
state.状态_有目标 = True
pyautogui.keyDown('f')
time.sleep(0.1)
pyautogui.keyUp('f')
time.sleep(0.1)
pyautogui.keyDown('f')
time.sleep(0.1)
pyautogui.keyUp('f')
time.sleep(0.5)
state.计次_识别次数 = 0
state.计数_卡主次数 = 0
ret_scr = screenshot(hwnd, left, top, right, bottom, filename=None)
datas, state.图片_YOLOV = self.yolov.detect(ret_scr, plot_box=state.开关_是否展预测结果)
else:
pyautogui.keyDown('w')
logger.info(f"是对话或烹饪{datas[idex]}")
isIn_jhdh = False
isIn, idex = find_dict_index(datas, 'label', '在水面')
if isIn:
logger.info("在水面!")
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_寻路中 = True
self.key_w_down = True
if random.randint(1, 4) == 2:
pyautogui.keyDown('shiftleft')
time.sleep(0.6)
pyautogui.keyUp('shiftleft')
isIn, idex = find_dict_index(datas, 'label', '确定')
if isIn:
if state.状态_寻路中:
state.状态_寻路中 = False
state.状态_有目标 = True
state.状态_是否回放中 = False
if self.key_w_down:
self.key_w_down = False
pyautogui.keyUp('w')
tangbaowss.send_msg( "是否暂停#@@#真")
time.sleep(0.2)
mouse_move(p_left + datas[idex]["x"], p_top + datas[idex]["y"])
logger.info(f"发现确定按钮,可能是吃复活药{datas[idex]}")
time.sleep(0.1)
mouse_left_down()
time.sleep(0.1)
mouse_left_up()
time.sleep(0.5)
state.计数_卡主次数 = 0
state.计次_识别次数 = 0
ret_scr = screenshot(hwnd, left, top, right, bottom, filename=None)
datas, state.图片_YOLOV = self.yolov.detect(ret_scr, plot_box=state.开关_是否展预测结果)
isIn, idex = find_dict_index(datas, 'label', '确定')
tangbaowss.send_msg( "是否暂停#@@#假")
if not isIn:
logger.info("停止脚本")
tangbaowss.send_msg( "是否回放#@@#假")
isIn, idex = find_dict_index(datas, 'label', '取消')
if isIn:
if state.状态_寻路中:
state.状态_寻路中 = False
state.状态_是否回放中 = False
if self.key_w_down:
self.key_w_down = False
pyautogui.keyUp('w')
# 判断是否死亡
ret_sw = self.find_zhuyidiren(hwnd, left, top, right, bottom, p_left, p_top)
state.状态_有目标 = True
tangbaowss.send_msg( "是否暂停#@@#真")
time.sleep(0.2)
mouse_move(p_left + datas[idex]["x"], p_top + datas[idex]["y"])
logger.info(f"发现取消按钮,可能是吃复活药{datas[idex]}")
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.3)
pyautogui.keyDown('shift')
time.sleep(0.2)
pyautogui.keyUp('shift')
state.计数_卡主次数 = 0
state.计次_识别次数 = 0
tangbaowss.send_msg( "是否暂停#@@#假")
if ret_sw:
state.计次_移动停滞 = 1200
state.计次_定位失败 = 1200
state.状态_是否回放中 = False
state.计数_没找到任何目标 = 0
logger.info("全军覆没了!跳过该任务!")
pyautogui.keyDown('esc')
time.sleep(0.1)
pyautogui.keyUp('esc')
state.状态_检测中 = False
return
ret_scr = screenshot(hwnd, left, top, right, bottom, filename=None)
datas, state.图片_YOLOV = self.yolov.detect(ret_scr, plot_box=state.开关_是否展预测结果)
isIn, idex = find_dict_index(datas, 'label', '返回')
if isIn:
logger.info("在派蒙界面,点返回")
pyautogui.keyUp('w')
self.key_w_down = False
pyautogui.keyDown("esc")
time.sleep(0.2)
pyautogui.keyUp("esc")
time.sleep(2)
pyautogui.keyDown('shift')
time.sleep(0.2)
pyautogui.keyUp('shift')
continue
isIn, idex = find_dict_index(datas, 'label', '玩家')
if isIn:
玩家高度 = datas[idex]["points"][1][1] - datas[idex]["points"][0][1]
计数_没有玩家 = 0
isIn, idex = find_dict_index(datas, 'label', '关闭')
if isIn:
if state.状态_寻路中:
state.状态_寻路中 = False
state.状态_有目标 = True
logger.info(f"发现关闭按钮 点错了界面{datas[idex]}")
pyautogui.keyDown('esc')
time.sleep(0.2)
pyautogui.keyUp('esc')
time.sleep(1)
mouse_moveR(6 * 180, 0)
time.sleep(2)
pyautogui.keyDown("w")
time.sleep(0.1)
pyautogui.keyUp("w")
self.key_w_down = False
ret_scr = screenshot(hwnd, left, top, right, bottom, filename=None)
datas, state.图片_YOLOV = self.yolov.detect(ret_scr, plot_box=state.开关_是否展预测结果)
for data in datas:
if isIn_jhdh == True:
state.计数_卡主次数 = 0
state.计次_识别次数 = 0
break
# 发现怪物则进行视角移动 以及 接近目标
if data["label"] in self.interaction_label:
if state.状态_寻路中 == False:
# 将它的中心点和游戏正中间进行靠近
if data["label"] == "怪物" and data["points"][1][0] - \
data["points"][0][0] >= 70:
if not daguai:
continue
state.计数_没找到任何目标 = 0
state.计数_没找到怪物 = 0
# 如果怪物就再旁边则直接连招
if self.centre_point[1] - data["points"][1][1] <= 20:
if self.key_w_down:
self.key_w_down = False
pyautogui.keyUp('w')
state.计数_卡主次数 = 0
state.计次_识别次数 = 0
if not state.状态_是否回放中:
mouse_moveR(0, 800)
logger.info("在连招中....")
pyautogui.keyDown('x')
time.sleep(0.2)
pyautogui.keyUp('x')
state.状态_是否回放中 = True
tangbaowss.send_msg( "脚本执行#@@#2")
else:
angle=get_angle(self.centre_point, (data["x"], data["y"]))
angle_diff = abs(0 - angle)
if state.状态_在爬墙==True:
#如果角度大于45度则建议按X绕过柱子
if angle_diff>45:
pyautogui.keyDown('x')
time.sleep(0.2)
pyautogui.keyUp('x')
set_angle(0, angle)
if random.randint(1,2)==2:
pyautogui.keyDown('a')
time.sleep(0.2)
pyautogui.keyUp('a')
else:
pyautogui.keyDown('d')
time.sleep(0.2)
pyautogui.keyUp('d')
else:
pyautogui.keyDown('space')
time.sleep(0.2)
pyautogui.keyUp('space')
else:
set_angle(0, angle)
pyautogui.keyDown('w')
if random.randint(0, 50) == 5:
pyautogui.keyDown('space')
time.sleep(0.2)
pyautogui.keyUp('space')
self.key_w_down = True
break # 只判断第一只怪
elif data["label"] == "矿石":
if not wakuang:
continue
state.计数_没找到任何目标 = 0
state.计数_没找到怪物 = 0
set_angle(0, get_angle(self.centre_point, (data["x"], data["y"])))
# 如果矿石就再旁边则直接连招
if self.centre_point[1] - data["points"][1][1] <= 40:
if self.key_w_down:
self.key_w_down = False
time.sleep(0.2)
pyautogui.keyUp('w')
logger.info("在挖矿中....")
state.计数_卡主次数 = 0
state.计次_识别次数 = 0
if not state.状态_是否回放中:
logger.info("在挖矿中....")
pyautogui.press("x")
state.状态_是否回放中 = True
tangbaowss.send_msg( "脚本执行#@@#2")
else:
pyautogui.keyDown('w')
if random.randint(0, 50) == 5:
pyautogui.keyDown('space')
time.sleep(0.2)
pyautogui.keyUp('space')
self.key_w_down = True
break # 只判断第1个矿
else: # '发现采集物'或 "掉落物"
state.计数_没找到任何目标 = 0
angle_now = 0
angle_target = get_angle(self.centre_point, (data["x"], data["y"]))
r_caiji=set_angle(angle_now, angle_target)
pyautogui.keyDown('w')
if random.randint(0, 30) == 5:
pyautogui.keyDown('space')
pyautogui.keyUp('space')
self.key_w_down = True
if r_caiji==False:
pyautogui.keyDown('shift')
time.sleep(0.2)
pyautogui.keyUp('shift')
break # 只判断第一个采集物
else:
if data["sim"]>=0.6:
if state.状态_在爬墙==True:
continue
if data["label"] == "矿石":
if not wakuang:
continue
logger.info("发现有矿石.顺手挖一下吧!")
已经_F了 = False
elif data["label"] == "怪物" and data["points"][1][
0] - data["points"][0][0] >= 90:
if not daguai:
continue
已经_F了 = False
logger.info("发现有怪拦路.顺手消灭吧!")
elif data["label"] == "采集物":
if not caiji:
continue
已经_F了 = False
logger.info("发现有采集物.顺手捡一下吧!")
elif data["label"] =="掉落物":
if daguai or wakuang or caiji:
已经_F了 = False
logger.info("发现有掉落物.顺手捡一下吧!")
else:
continue
else:
continue
set_angle(0, get_angle(self.centre_point, (data["x"], data["y"])))
state.计时_未寻路 = int(time.time())
state.状态_寻路中 = False
state.游戏_打怪前坐标 = copy.copy(state.游戏_当前目标坐标)
state.计数_没找到任何目标 = 0
state.计数_没找到怪物 = 0
pyautogui.keyUp('w')
self.key_w_down = False
state.计数_卡主次数 = 0
state.计次_识别次数 = 0
mouse_left_down()
time.sleep(0.1)
mouse_left_up()
break
# print("state.计时_未寻路", state.计时_未寻路, "state.计数_没找到任何目标", state.计数_没找到任何目标,
# "state.计数_没找到怪物", state.计数_没找到怪物)
# 如果玩家突然不见了,说明正在快速下落的概率很大,则开伞
if state.状态_寻路中 == True and state.状态_在爬墙 == False and isIn_wxl == False:
if 计数_没有玩家 >= 3 or (历史_上次玩家高度 / 玩家高度 >= 1.5):
计数_没有玩家 = 0
ttt = threading.Thread(target=开伞)
if state.python_var > 9:
ttt.daemon = True
else:
ttt.setDaemon(True)
ttt.start()
if 计数_没有玩家 == 0:
历史_上次玩家高度 = copy.copy(玩家高度)
if state.状态_寻路中 == False:
# 如果按下了W键了,并且当前没有任何目标等于4次了,则松开w键
if state.计数_没找到任何目标 == 6:
self.key_w_down = False
state.计次_识别次数 = 0
state.计数_卡主次数 = 0
pyautogui.keyUp('w')
if state.计次_定位失败 > 0:
state.计数_没找到怪物 = 0
if state.ON_LIANZHAOBUJIANCE==0 and wakuang==False and state.计数_没找到怪物 >= 25 and state.计次_定位失败 == 0 and state.状态_是否回放中 == True:
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
# 如果连续8次没找到目标,则进行旋转
if 20 > state.计数_没找到任何目标 >= 15 or (
state.计数_没找到任何目标 >= 1 and state.计数_没找到怪物 >= 10 and state.状态_是否回放中 == True):
state.计数_卡主次数 = 0
state.计次_识别次数 = 0
历史_上次玩家高度 = 0
if state.计数_没找到任何目标 == 15:
if state.计次_定位失败 == 0:
if state.状态_是否回放中 == False:
logger.info("重置视角")
pyautogui.keyUp('w')
self.key_w_down = False
pyautogui.keyDown('x')
time.sleep(0.1)
pyautogui.keyUp('x')
# 重置镜头
mouse_middle_down()
time.sleep(0.2)
mouse_middle_up()
time.sleep(0.3)
mouse_moveR(0, 600)
state.计次_识别次数 = 0
state.计数_卡主次数 = 0
else:
state.计数_没找到任何目标 = 0
else:
state.计数_没找到任何目标 = 0
else:
mouse_moveR(700, 0)
time.sleep(0.1)
elif state.计数_没找到任何目标 == 13 and state.状态_是否回放中 == False:
mouse_moveR(0, 800)
time.sleep(0.1)
elif state.计数_没找到任何目标 == 10 and state.状态_是否回放中 == False:
if not 已经_F了:
pyautogui.keyDown('shift')
time.sleep(0.2)
pyautogui.keyUp('shift')
# 如果连续18次没找到目标,则继续寻路X
elif state.计数_没找到任何目标 >= 20:
if not state.状态_是否回放中:
logger.info("附近没有怪和采集物了.继续寻路吧!")
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_寻路中 = True
state.计次_识别次数 = 0
state.计数_卡主次数 = 0
state.计数_没找到任何目标 = 0
mouse_left_up()
pyautogui.keyUp('w')
continue
time_now=time.time()
if time_now-state.计时_未寻路 >= state.TIMEOUT_DAGUAI:
kkk = self.处理异常情况(hwnd, left, top, right, bottom, p_left, p_top)
if kkk == 0:
logger.info("在意外界面 超时!")
time.sleep(3)
state.状态_检测中 = False
state.状态_已经有寻路了 = False
state.状态_需重新传送 = False
state.计次_移动停滞 = 1200
state.计次_定位失败 = 1200
state.状态_是否回放中 = False
state.计数_没找到任何目标 = 0
return False
elif kkk == -1:
logger.info("全军覆没了!")
time.sleep(3)
state.计次_移动停滞 = 1200
state.计次_定位失败 = 1200
state.状态_是否回放中 = False
state.计数_没找到任何目标 = 0
state.状态_检测中 = False
state.状态_已经有寻路了 = False
state.状态_需重新传送 = True
return False
if state.计时_未寻路 != 0:
logger.info("附近可能还有怪,但是打不到.继续寻路吧!")
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_寻路中 = True
state.计数_卡主次数 = 0
mouse_left_up()
pyautogui.keyUp('w')
state.计数_没找到任何目标 = 0
state.游戏_打怪前坐标 = [0, 0]
time.sleep(5)
else:
state.状态_是否回放中 = False
tangbaowss.send_msg("是否回放#@@#假")
state.状态_寻路中 = True
state.计数_卡主次数 = 0
mouse_left_up()
pyautogui.keyUp('w')
state.计数_没找到任何目标 = 0
state.游戏_打怪前坐标 = [0, 0]
continue
elif time_now-state.计时_未寻路 == state.TIMEOUT_DAGUAI-15 and state.状态_是否回放中==False and state.计数_没找到怪物>=1:
mouse_left_up()
logger.info("可能是有矿石 连招中....")
if random.randint(1,3)==2:
pyautogui.press("x")
state.状态_是否回放中 = True
tangbaowss.send_msg( "脚本执行#@@#2")
elif state.TIMEOUT_DAGUAI//2<= time_now-state.计时_未寻路 >= state.TIMEOUT_DAGUAI//2-10 and state.状态_是否回放中==False and state.计数_没找到怪物==0:
mouse_left_up()
logger.info("可能是飞行物 连招中....")
if random.randint(1,3)==2:
pyautogui.press("x")
state.状态_是否回放中 = True
tangbaowss.send_msg( "脚本执行#@@#2")
except:
time.sleep(0.5)
logger.error(traceback.format_exc())
def run_fuben(self, cishu=99, isFanxiang=False):
global loop
state.状态_已经有寻路了 = True
# 获取窗口句柄
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
while True:
if state.状态_循环开关 == False:
logger.info("强制退出!")
pyautogui.keyUp('w')
state.状态_已经有寻路了 = False
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_需重新传送 = False
return False
if get_window_handle_at_mouse_position() == hwnd:
break
rect = win32gui.GetWindowRect(hwnd)
w_p, h_p = (rect[2] - rect[0]) - 1920, (rect[3] - rect[1]) - 1080
# 设定截图区域的左上角坐标 (x, y) 和右下角坐标 (x, y)
left, top, right, bottom = 0, 0, 1920, 1080 # 替换成你实际的区域坐标
p_left = rect[0] + w_p
p_top = rect[1] + h_p
paimeng_img = cv2.imdecode(np.fromfile(file="./datas/派蒙.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
kkk = self.处理异常情况(hwnd, left, top, right, bottom, p_left, p_top)
if kkk == 0:
logger.info("在意外界面 超时!")
time.sleep(3)
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
return False
elif kkk == -1:
logger.info("全军覆没了!")
time.sleep(3)
state.状态_需重新传送 = True
state.状态_已经有寻路了 = False
return False
计数_没有玩家 = 0
jiaoben = (os.path.abspath(os.path.join(state.PATH_JIAOBEN, state.LIANZHAO)))
# 临时发送消息给指定客户端
message = f"解析脚本#@@#{jiaoben}"
tangbaowss.send_msg(message)
try:
# 往前走或者往后走,直到找到 F
if not self.find_f_keep_going(hwnd, left, top, right, bottom, p_left, p_top,
isFanxiang): state.状态_需重新传送 = True;return False
# 点击 单人挑战
if not self.click_danrentiaozhan(hwnd, left, top, right, bottom, p_left,
p_top): state.状态_需重新传送 = True;return False
# 判断弹窗是否有树脂不够提醒
if self.find_shuzhibugou(hwnd, left, top, right, bottom, p_left, p_top):
pyautogui.keyDown('esc')
time.sleep(0.1)
pyautogui.keyUp('esc')
time.sleep(2)
pyautogui.keyDown('esc')
time.sleep(0.1)
pyautogui.keyUp('esc')
state.状态_已经有寻路了 = False
logger.info("没体力了 成功退出副本!")
time.sleep(10)
state.状态_需重新传送 = False
return True
# 如果没提醒则选择阵容
if not self.click_kaishitiaozhan(hwnd, left, top, right, bottom, p_left, p_top):
pyautogui.keyDown('esc')
time.sleep(0.1)
pyautogui.keyUp('esc')
state.状态_需重新传送 = True
state.状态_已经有寻路了 = False
return False
# 开始yolov自动进入副本
except:
time.sleep(0.5)
logger.error(traceback.format_exc())
state.状态_需重新传送 = True
state.状态_已经有寻路了 = False
return False
# 0 镜头对准北方向 走过去开副本
# 1 开始打怪阶段
# 2 打完了 开始找生命树 并且把自己移动到0° 对准生命树的位置
# 3 走路到 领取奖励 直到点击 继续挑战为止 完成一轮
阶段 = 0
计次_阶段0 = 0
计时_阶段3_开始时间 = 0
state.计数_没找到怪物=0
isinF = False
for i in range(cishu):
logger.info(f"刷副本中 {i + 1}/{cishu}")
while True:
try:
time.sleep(0.01)
if state.状态_循环开关 == False:
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
return False
rect = win32gui.GetWindowRect(hwnd)
w_p, h_p = (rect[2] - rect[0]) - 1920, (rect[3] - rect[1]) - 1080
# 设定截图区域的左上角坐标 (x, y) 和右下角坐标 (x, y)
left, top, right, bottom = 0, 0, 1920, 1080 # 替换成你实际的区域坐标
p_left = rect[0] + w_p
p_top = rect[1] + h_p
if state.状态_全局暂停:
tangbaowss.send_msg( "是否回放#@@#假")
time.sleep(2)
continue
if get_window_handle_at_mouse_position() != hwnd:
# 激活hwnd
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
# 设定保存截图的文件夹路径和文件名前缀
# filename = f"./datas/lanrenyolov{random.randint(1, 20)}.jpg"
# 游戏全图
ret_scr = screenshot(hwnd, left, top, right, bottom, filename=None)
if type(ret_scr) == bool:
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
logger.info("截图失败了!可能是内存溢出了")
time.sleep(2)
continue
# 这里是小地图的截图
left_small, top_small, right_small, bottom_small = self.小地图区域 # 替换成你实际的区域坐标
height_small = bottom_small - top_small
width_small = right_small - left_small
small_img = screenshot(hwnd, left_small, top_small, right_small, bottom_small,
filename=None) # RGBA
if type(small_img) == bool:
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
time.sleep(2)
continue
state.游戏_当前视野角度 = get_view2(small_img[int(height_small / 2) - 70:int(height_small / 2) + 70,
int(width_small / 2) - 70:int(width_small / 2) + 70], 70)
# -----------------------------YOLOV检测--------------------------------------------------
datas, state.图片_YOLOV = self.yolov.detect(ret_scr, plot_box=state.开关_是否展预测结果)
if state.开关_是否展预测结果:
state.QT_信号.mysig_show_yolov.emit()
if state.状态_全局暂停:
tangbaowss.send_msg( "是否回放#@@#假")
time.sleep(2)
continue
if datas == []:
pass
else:
# 将离屏幕中心最近的点排在前面
datas = sorted(datas, key=self.distance_to_target)
if 阶段 == 0: # 0 镜头对准北方向 走过去开副本
计次_阶段0 += 1
if 计次_阶段0 >= 2000:
pyautogui.keyDown('esc')
time.sleep(0.1)
pyautogui.keyUp('esc')
time.sleep(1)
state.状态_已经有寻路了 = False
logger.info("没体力了 成功退出副本!")
time.sleep(10)
state.状态_需重新传送 = False
return True
isIn, idex = find_dict_index(datas, 'label', '提示关闭')
if isIn: # 路过的顺手捡了
logger.info("发现 提示关闭")
mouse_move(p_left + datas[idex]["x"], p_top + datas[idex]["y"])
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(1)
continue
if self.click_dimaiyichang(hwnd, left, top, right, bottom, p_left, p_top):
time.sleep(1)
continue
if not set_angle(state.游戏_当前视野角度, 90, fault=5):
logger.info("调整整好")
# 角度对了 开始一路往前走 直到找到F按钮
pyautogui.keyDown("w")
if not self.find_f_keep_going(hwnd, left, top, right, bottom, p_left, p_top,
False): continue
pyautogui.keyUp("w")
阶段 = 1
isIn, idex = find_dict_index(datas, 'label', '确定')
isIn2, idex = find_dict_index(datas, 'label', '取消')
# 判断弹窗是否有树脂不够提醒 如果发现 则点击退出返回 阶段4走起
if isIn or isIn2:
pyautogui.keyDown('esc')
time.sleep(0.1)
pyautogui.keyUp('esc')
time.sleep(1)
state.状态_已经有寻路了 = False
logger.info("没体力了 成功退出副本!")
time.sleep(10)
state.状态_需重新传送 = True
return True
elif 阶段 == 1: # 1 开始打怪阶段
isinF = False
计次_阶段0 = 0
# 判断是否打完了副本
isIn, idex = find_dict_index(datas, 'label', '副本打完了')
#or self.find_zidongtuichu(hwnd, 745,905,1206,1002, p_left, p_top)
if isIn :
if idex!=None:
if datas[idex]["sim"]>0.75:
self.key_w_down = False
pyautogui.keyUp('w')
mouse_left_up()
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
logger.info("打完了")
time.sleep(2)
# 重置镜头
mouse_middle_down()
time.sleep(0.1)
mouse_middle_up()
阶段 = 2
continue
else:
self.key_w_down = False
pyautogui.keyUp('w')
mouse_left_up()
state.状态_是否回放中 = False
tangbaowss.send_msg( "是否回放#@@#假")
logger.info("打完了")
time.sleep(2)
# 重置镜头
mouse_middle_down()
time.sleep(0.1)
mouse_middle_up()
阶段 = 2
continue
isIn, idex = find_dict_index(datas, 'label', '往上跳')
if isIn:
logger.info("尝试跳起来")
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
isIn, idex = find_dict_index(datas, 'label', '被控了')
if isIn:
logger.info("被控了!")
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
time.sleep(0.1)
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
time.sleep(0.1)
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
time.sleep(0.1)
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
isIn, idex = find_dict_index(datas, 'label', '确定')
if isIn:
tangbaowss.send_msg( "是否暂停#@@#真")
time.sleep(0.2)
mouse_move(p_left + datas[idex]["x"], p_top + datas[idex]["y"])
logger.info(f"发现确定按钮,可能是吃复活药{datas[idex]}")
time.sleep(0.1)
mouse_left_down()
time.sleep(0.1)
mouse_left_up()
time.sleep(0.5)
ret_scr = screenshot(hwnd, left, top, right, bottom, filename=None)
datas, state.图片_YOLOV = self.yolov.detect(ret_scr, plot_box=state.开关_是否展预测结果)
isIn, idex = find_dict_index(datas, 'label', '确定')
tangbaowss.send_msg( "是否暂停#@@#假")
if not isIn:
logger.info("停止脚本")
tangbaowss.send_msg( "是否回放#@@#假")
isIn, idex = find_dict_index(datas, 'label', '取消')
if isIn:
tangbaowss.send_msg( "是否暂停#@@#真")
time.sleep(0.2)
mouse_move(p_left + datas[idex]["x"], p_top + datas[idex]["y"])
logger.info(f"发现取消按钮,可能是吃复活药{datas[idex]}")
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.3)
pyautogui.keyDown('shift')
time.sleep(0.2)
pyautogui.keyUp('shift')
tangbaowss.send_msg( "是否暂停#@@#假")
ret_scr = screenshot(hwnd, left, top, right, bottom, filename=None)
datas, state.图片_YOLOV = self.yolov.detect(ret_scr, plot_box=state.开关_是否展预测结果)
isIn, idex = find_dict_index(datas, 'label', '怪物')
if not isIn:
state.计数_没找到怪物+=1
if random.randint(1, 50) == 2:
mouse_middle_down()
time.sleep(0.2)
mouse_middle_up()
if state.计数_没找到怪物>=20:
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_是否回放中 = False
pyautogui.keyUp('w')
self.key_w_down=False
mouse_moveR(int(6 * 120), 0)
time.sleep(0.1)
if template_matching(ret_scr, paimeng_img, mask=None) != []:
logger.info("全军覆没了!跳重试该任务!")
state.状态_需重新传送 = True
state.状态_已经有寻路了 = False
return False
else:
state.计数_没找到怪物=0
for data in datas:
# 将它的中心点和游戏正中间进行靠近
if data["label"] == "怪物":
set_angle(0, get_angle(self.centre_point, (data["x"], data["y"])))
# 如果怪物就再旁边则直接连招
if self.centre_point[1] - data["points"][1][1] <= 80 and data["points"][1][0] - \
data["points"][0][0] >= 90:
if self.key_w_down:
self.key_w_down = False
pyautogui.keyUp('w')
if not state.状态_是否回放中:
logger.info("在连招中....")
pyautogui.press("x")
state.状态_是否回放中 = True
tangbaowss.send_msg( "脚本执行#@@#2")
else:
# 不在则继续跟着怪物方向走
pyautogui.keyDown('w')
self.key_w_down = True
break
elif 阶段 == 2: # 2 打完了 开始找生命树 并且把自己移动到0° 对准生命树的位置
调整视角 = set_angle(state.游戏_当前视野角度, 90, fault=6)
发现了目标了 = False
isIn, idex = find_dict_index(datas, 'label', '生命树')
for data in datas:
if data["label"] == "生命树":
发现了目标了 = True
x_p = data["x"] - self.centre_point[0]
if x_p >= 16:
pyautogui.keyUp('a')
logger.info("树偏右边 按下D键")
pyautogui.keyDown('d')
elif x_p <= -16:
pyautogui.keyUp('d')
logger.info("树偏左边 按下A键")
pyautogui.keyDown('a')
else:
if 调整视角 == False:
pyautogui.keyUp('d')
pyautogui.keyUp('a')
logger.info("树正对,走起!")
pyautogui.keyDown('w')
阶段 = 3
计时_阶段3_开始时间 = time.time()
break
logger.info("树正对 但是角度还不对")
elif data["label"] == "副本楼梯":
发现了目标了 = True
x_p = data["x"] - self.centre_point[0]
if x_p >= 16:
pyautogui.keyUp('a')
logger.info("副本楼梯偏右边 按下D键")
pyautogui.keyDown('d')
elif x_p <= -16:
pyautogui.keyUp('d')
logger.info("副本楼梯偏左边 按下A键")
pyautogui.keyDown('a')
else:
if 调整视角 == False:
pyautogui.keyUp('d')
pyautogui.keyUp('a')
logger.info("副本楼梯正对,走起!")
pyautogui.keyDown('w')
阶段 = 3
计时_阶段3_开始时间=time.time()
break
logger.info("副本楼梯正对 但是角度还不对")
elif data["label"] == "副本门框" and isIn == False:
发现了目标了 = True
x_p = data["x"] - self.centre_point[0]
if x_p >= 16:
pyautogui.keyUp('a')
logger.info("副本门框偏右边 按下D键")
pyautogui.keyDown('d')
elif x_p <= -16:
pyautogui.keyUp('d')
logger.info("副本门框偏左边 按下A键")
pyautogui.keyDown('a')
if 阶段 == 3:
continue
if 发现了目标了 == False:
rrrr = random.randint(1, 20)
if rrrr == 1:
pyautogui.keyDown('s')
pyautogui.keyDown('a')
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
time.sleep(0.2)
pyautogui.keyUp('a')
pyautogui.keyUp('s')
elif rrrr == 2:
pyautogui.keyDown('s')
pyautogui.keyDown('a')
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
time.sleep(0.2)
pyautogui.keyUp('a')
pyautogui.keyUp('s')
elif rrrr == 3:
pyautogui.keyDown('w')
pyautogui.keyDown('a')
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
time.sleep(0.2)
pyautogui.keyUp('a')
pyautogui.keyUp('w')
elif rrrr == 4:
pyautogui.keyDown('w')
pyautogui.keyDown('d')
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
time.sleep(0.2)
pyautogui.keyUp('d')
pyautogui.keyUp('w')
else:
pyautogui.keyDown('s')
time.sleep(0.1)
pyautogui.keyUp('s')
elif 阶段 == 3: # 3 走路到 领取奖励 直到点击 继续挑战为止 完成一轮
pyautogui.keyDown('w')
isIn, idex = find_dict_index(datas, 'label', 'F交互')
if isIn: # 路过的顺手捡了
logger.info("发现 F 交互")
pyautogui.keyDown('f')
time.sleep(0.1)
pyautogui.keyUp('f')
isinF = True
continue
isIn, idex = find_dict_index(datas, 'label', '捡东西')
if isIn: # 路过的顺手捡了
logger.info("发现 F 交互")
pyautogui.keyDown('f')
time.sleep(0.1)
pyautogui.keyUp('f')
isinF = True
continue
isIn, idex = find_dict_index(datas, 'label', '生命树')
if isIn and isinF==False : # 路过的顺手捡了
set_angle(0, get_angle(self.centre_point, (datas[idex]["x"], datas[idex]["y"])))
isIn, idex = find_dict_index(datas, 'label', '使用浓缩树脂')
if isIn: # 路过的顺手捡了
if datas[idex]['sim'] > 0.8:
logger.info("发现 使用浓缩树脂")
logger.info(str(datas[idex]))
mouse_move(p_left + datas[idex]["x"], p_top + datas[idex]["y"])
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.5)
continue
isIn, idex = find_dict_index(datas, 'label', '使用原粹树脂')
if isIn: # 路过的顺手捡了
if datas[idex]['sim'] > 0.8:
logger.info("发现 使用原粹树脂")
logger.info(str(datas[idex]))
mouse_move(p_left + datas[idex]["x"], p_top + datas[idex]["y"])
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.5)
continue
isIn, idex = find_dict_index(datas, 'label', '继续挑战')
if isIn or self.find_jixutiaozhan(hwnd, 953,923,1432,1065, p_left, p_top): # 路过的顺手捡了
if idex!=None:
if datas[idex]['sim'] > 0.75:
logger.info("发现 继续挑战")
mouse_move(p_left + 1178, p_top + 1006)
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.5)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(2)
# 判断弹窗是否有树脂不够提醒 如果发现 则点击退出返回 阶段4走起
if self.find_shuzhibugou2(hwnd, left, top, right, bottom, p_left, p_top):
pyautogui.keyDown('esc')
time.sleep(0.1)
pyautogui.keyUp('esc')
time.sleep(1)
state.状态_已经有寻路了 = False
logger.info("没体力了 成功退出副本!")
time.sleep(10)
state.状态_需重新传送 = False
return True
else:
isinF = False
阶段 = 0
break
else:
logger.info("发现 继续挑战")
mouse_move(p_left + 1178, p_top + 1006)
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.5)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(2)
# 判断弹窗是否有树脂不够提醒 如果发现 则点击退出返回 阶段4走起
if self.find_shuzhibugou2(hwnd, left, top, right, bottom, p_left, p_top):
pyautogui.keyDown('esc')
time.sleep(0.1)
pyautogui.keyUp('esc')
time.sleep(1)
state.状态_已经有寻路了 = False
logger.info("没体力了 成功退出副本!")
time.sleep(10)
state.状态_需重新传送 = False
return True
else:
isinF = False
阶段 = 0
break
if time.time() - 计时_阶段3_开始时间 > 30:
rand_cz = random.randint(0, 4)
if rand_cz == 0:
pyautogui.keyDown('x')
time.sleep(0.3)
pyautogui.keyUp('x')
pyautogui.keyUp('w')
pyautogui.keyDown('d')
time.sleep(0.5)
pyautogui.keyUp('d')
pyautogui.keyDown('w')
elif rand_cz == 1:
pyautogui.keyDown('x')
time.sleep(0.3)
pyautogui.keyUp('x')
pyautogui.keyUp('w')
pyautogui.keyDown('a')
time.sleep(0.5)
pyautogui.keyUp('a')
pyautogui.keyDown('w')
elif rand_cz == 2:
pyautogui.keyDown('x')
time.sleep(0.3)
pyautogui.keyUp('x')
elif rand_cz == 3:
pyautogui.keyDown('x')
time.sleep(0.3)
pyautogui.keyUp('x')
pyautogui.keyUp('w')
pyautogui.keyDown('s')
time.sleep(3)
pyautogui.keyUp('s')
pyautogui.keyDown('w')
else:
pyautogui.keyDown('space')
time.sleep(0.3)
pyautogui.keyDown('space')
计时_阶段3_开始时间 = time.time()
except:
logger.error(traceback.format_exc())
time.sleep(0.5)
state.状态_已经有寻路了 = False
logger.info("刷副本全部完成!")
def run_chuansongjiaoben(self, jiaoben,cbb_address="手动录制"):
global new_msg
try:
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
if state.状态_循环开关 == False:
tangbaowss.send_msg( "是否回放#@@#假")
logger.info("强制退出!")
return False
if get_window_handle_at_mouse_position() == hwnd:
set_window_activate(hwnd)
time.sleep(0.2)
rect = win32gui.GetWindowRect(hwnd)
w_p, h_p = (rect[2] - rect[0]) - 1920, (rect[3] - rect[1]) - 1080
p_left = rect[0] + w_p
p_top = rect[1] + h_p
set_window_activate(hwnd)
if cbb_address=="手动录制":
kkk = self.处理异常情况(hwnd, 0, 0, 1920, 1080, p_left, p_top)
if kkk == 0:
logger.info("在意外界面 超时!")
time.sleep(3)
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
return False
elif kkk == -1:
logger.info("全军覆没了!")
time.sleep(3)
state.状态_需重新传送 = True
state.状态_已经有寻路了 = False
return False
# 临时发送消息给指定客户端
message = f"解析脚本#@@#{jiaoben}"
tangbaowss.send_msg(message)
time.sleep(2)
state.状态_是否回放中 = True
tangbaowss.send_msg( "脚本执行#@@#1")
while True:
try:
time.sleep(0.1)
if state.状态_是否回放中 == False:
state.状态_需重新传送 = False
return True
if state.状态_循环开关 == False:
state.状态_需重新传送 = False
tangbaowss.send_msg( "是否回放#@@#假")
return False
if get_window_handle_at_mouse_position() != hwnd:
# 激活hwnd
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
time.sleep(0.2)
except:
time.sleep(0.5)
except:
logger.error(traceback.format_exc())
state.状态_需重新传送 = False
tangbaowss.send_msg( "是否回放#@@#假")
return False
def run_jiaoben(self,jiaoben,is_auto_f):
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
rect = win32gui.GetWindowRect(hwnd)
w_p, h_p = (rect[2] - rect[0]) - 1920, (rect[3] - rect[1]) - 1080
# F交互框位置
left_dh, top_dh, right_dh, bottom_dh = [1161, 508, 1319, 572] # 替换成你实际的区域坐标
p_left = rect[0] + w_p
p_top = rect[1] + h_p
set_window_activate(hwnd)
if state.状态_循环开关 == False:
logger.info("强制退出!")
state.状态_已经有寻路了 = False
return False
message = f"解析脚本#@@#{jiaoben}"
tangbaowss.send_msg(message)
time.sleep(2)
tangbaowss.send_msg( "脚本执行#@@#1")
state.状态_是否回放中 = True
try:
while True:
try:
time.sleep(0.1)
if state.状态_是否回放中 == False:
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
logger.info("脚本运行完毕!")
return True
if state.状态_循环开关 == False:
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
tangbaowss.send_msg( "是否回放#@@#假")
logger.info("强制退出!")
return False
if get_window_handle_at_mouse_position() != hwnd:
# 激活hwnd
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
time.sleep(0.2)
if is_auto_f:
if self.find_f(hwnd, 1050, 424, 1187, 648, p_left, p_top):
time.sleep(0.2)
if not self.find_duihuahuopengren(hwnd, left_dh, top_dh, right_dh, bottom_dh, p_left,
p_top) or self.find_pianpianhua(hwnd, left_dh, top_dh,
right_dh, bottom_dh, p_left,
p_top):
logger.info(f"顺手捡东西!")
state.状态_有目标 = True
pyautogui.keyDown('f')
time.sleep(0.1)
pyautogui.keyUp('f')
time.sleep(0.1)
pyautogui.keyDown('f')
time.sleep(0.1)
pyautogui.keyUp('f')
except:
time.sleep(0.5)
except:
logger.error(traceback.format_exc())
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
tangbaowss.send_msg( "是否回放#@@#假")
return False
def run_jixing(self):
'''
领取纪行奖励
:return:
'''
global new_msg
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
rect = win32gui.GetWindowRect(hwnd)
w_p, h_p = (rect[2] - rect[0]) - 1920, (rect[3] - rect[1]) - 1080
# 设定截图区域的左上角坐标 (x, y) 和右下角坐标 (x, y)
left, top, right, bottom = 0, 0, 1920, 1080 # 替换成你实际的区域坐标
p_left = rect[0] + w_p
p_top = rect[1] + h_p
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
time.sleep(0.2)
paimeng_img = cv2.imdecode(np.fromfile(file="./datas/派蒙.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
big_img = screenshot(hwnd, left, top, right, bottom, None)
if template_matching(big_img, paimeng_img, mask=None) == []:
pyautogui.keyDown("esc")
time.sleep(0.1)
pyautogui.keyUp("esc")
time.sleep(2)
pyautogui.keyDown('alt')
if not self.click_jixing(hwnd, left, top, right, bottom, p_left, p_top): logger.info(
"没有纪行要领取");pyautogui.keyUp('alt');return
time.sleep(1)
pyautogui.keyUp('alt')
time.sleep(2)
mouse_move(p_left + 962, p_top + 52)
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
if not self.click_jixing_yijianlingqu(hwnd, left, top, right, bottom, p_left, p_top): logger.info(
"领取纪行任务经验失败");return
time.sleep(1)
mouse_move(p_left + 863, p_top + 55)
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(1)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(1)
if not self.click_jixing_yijianlingqu(hwnd, left, top, right, bottom, p_left, p_top): logger.info(
"没有奖励能领取");return
time.sleep(1)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(1)
pyautogui.keyDown("esc")
time.sleep(0.1)
pyautogui.keyUp("esc")
def run_huanjue(self,path_list=[],zhanchagn="1"):
global new_msg
# 角色最多有多少人
MAX_CHARACTER_NUMBER = 90
state.状态_检测中 = False
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
rect = win32gui.GetWindowRect(hwnd)
w_p, h_p = (rect[2] - rect[0]) - 1920, (rect[3] - rect[1]) - 1080
# 设定截图区域的左上角坐标 (x, y) 和右下角坐标 (x, y)
left, top, right, bottom = 0, 0, 1920, 1080 # 替换成你实际的区域坐标
p_left = rect[0] + w_p
p_top = rect[1] + h_p
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
time.sleep(0.2)
kkk = self.处理异常情况(hwnd, left, top, right, bottom, p_left, p_top)
if kkk == 0:
logger.info("在意外界面 超时!")
time.sleep(3)
state.状态_检测中 = False
state.状态_已经有寻路了=False
state.状态_需重新传送 = False
return False
elif kkk == -1:
logger.info("全军覆没了!")
time.sleep(3)
state.状态_检测中 = False
state.状态_已经有寻路了 = False
state.状态_需重新传送 = True
return False
#按了后看有没有打开成功
n=0
while True:
if n==0:
n=0
kkk = self.处理异常情况(hwnd, left, top, right, bottom, p_left, p_top)
if kkk == 0:
logger.info("在意外界面 超时!")
time.sleep(3)
state.状态_检测中 = False
state.状态_已经有寻路了 = False
state.状态_需重新传送 = False
return False
elif kkk == -1:
logger.info("全军覆没了!")
time.sleep(3)
state.状态_检测中 = False
state.状态_已经有寻路了 = False
state.状态_需重新传送 = True
return False
pyautogui.keyDown("x")
time.sleep(0.2)
pyautogui.keyUp("x")
pyautogui.keyDown("l")
time.sleep(0.2)
pyautogui.keyUp("l")
time.sleep(2)
elif n>=20:
n = 0
time.sleep(1)
if state.状态_循环开关 == False:
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
tangbaowss.send_msg( "是否回放#@@#假")
logger.info("强制退出!")
return False
if get_window_handle_at_mouse_position() != hwnd:
# 激活hwnd
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
time.sleep(0.2)
if state.状态_全局暂停:
tangbaowss.send_msg( "是否回放#@@#假")
time.sleep(2)
continue
if self.click_kuaisubiandui(hwnd, left, top, right, bottom , p_left, p_top):
time.sleep(2)
break
n += 1
#加载角色图片数据
img_datas=[]
point_list=[[96,189],
[255,198],
[404,200],
[568,190],
]
for item in path_list:
img_datas.append( cv2.imdecode(np.fromfile(file=item, dtype=np.uint8),cv2.IMREAD_UNCHANGED))
#将历史角色清空掉
for point in point_list:
#点击对应坑位
mouse_move(p_left +point[0],p_top +point[1])
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.2)
if not self.find_baocunpeizhi(hwnd, left, top, right, bottom, p_left, p_top):
break
logger.info("清空角色成功!")
# 循环选择角色
max_page = MAX_CHARACTER_NUMBER / 15
a = 0
for i,img in enumerate(img_datas):
ret = False
attempt_times = 0
clothes_number = 1
while attempt_times < 2:
logger.info(str(a))
if state.状态_循环开关 == False:
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
tangbaowss.send_msg( "是否回放#@@#假")
logger.info("强制退出!")
return False
if get_window_handle_at_mouse_position() != hwnd:
# 激活hwnd
hwnd = win32gui.FindWindow("UnityWndClass", state.GAME_TITLE) # 替换成你实际的窗口句柄
set_window_activate(hwnd)
time.sleep(0.2)
if state.状态_全局暂停:
tangbaowss.send_msg( "是否回放#@@#假")
time.sleep(2)
continue
ret= find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, f"勾选 角色{i+1}", 1,
1,
threshold=0.76)
if ret:
time.sleep(1)
break
if max_page - 1 < a < 2 * max_page:
pyautogui.moveTo(p_left +342,p_top +415)
pyautogui.dragTo(p_left +346,p_top +833, duration=0.5, tween=pyautogui.easeOutSine)
else:
pyautogui.moveTo(p_left +346, p_top +833)
pyautogui.dragTo(p_left +342, p_top +415, duration=0.5, tween=pyautogui.easeOutSine)
a+=1
if a >= 2 * max_page:
attempt_times += 1
a=0
time.sleep(1)
if attempt_times == 2:
try:
img = cv2.imdecode(np.fromfile(file = re.sub(r'\d*\.png', f'{clothes_number + 1}.png', path_list[i]), dtype=np.uint8),cv2.IMREAD_UNCHANGED)
attempt_times = 0
clothes_number += 1
logger.info(f"没有找到 角色{i+1} 尝试第{clothes_number}款装扮")
except:
logger.info(f"更换 角色{i+1} 失败 推测 玩家没有获取")
#点击对应坑位
mouse_move(p_left +point_list[i][0],p_top +point_list[i][1])
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.2)
logger.info(f"尝试使用历史角色替代 角色{i+1}")
#保存配置
mouse_move(p_left +453,p_top +1016)
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(5)
if state.状态_循环开关 == False:
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
tangbaowss.send_msg( "是否回放#@@#假")
logger.info("强制退出!")
return False
pyautogui.keyDown("esc")
time.sleep(0.1)
pyautogui.keyUp("esc")
time.sleep(2)
pyautogui.keyDown(zhanchagn)
time.sleep(0.1)
pyautogui.keyUp(zhanchagn)
time.sleep(2)
state.状态_需重新传送 = False
state.状态_已经有寻路了 = False
return True
def 处理异常情况(self,hwnd,left,top,right,bottom,p_left,p_top):
'''
:param hwnd:
:param left:
:param top:
:param right:
:param bottom:
:param p_left:
:param p_top:
:return:
'''
paimeng_img = cv2.imdecode(np.fromfile(file="./datas/派蒙.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
# 判断是否卡在了对话界面
for nnn in range(120):
if state.状态_循环开关 == False:
logger.info("强制退出!")
pyautogui.keyUp('w')
state.状态_已经有寻路了 = False
state.状态_是否回放中 = False
state.状态_检测中=False
tangbaowss.send_msg( "是否回放#@@#假")
state.状态_需重新传送 = False
return 1
big_img = screenshot(hwnd, left, top, right, bottom, None)
rrrr = template_matching(big_img, paimeng_img, mask=None)
if rrrr == []:
rdd = random.randint(1, 4)
if rdd == 1:
pyautogui.keyDown("x")
time.sleep(0.2)
pyautogui.keyUp("x")
mouse_move(p_left + 1397, p_top + 804)
time.sleep(0.2)
mouse_left_down()
time.sleep(0.2)
mouse_left_up()
time.sleep(0.2)
elif rdd == 2:
pyautogui.keyDown("esc")
time.sleep(0.1)
pyautogui.keyUp("esc")
time.sleep(1)
else:
pyautogui.keyDown('space')
time.sleep(0.1)
pyautogui.keyUp('space')
logger.info("未知界面 按esc 和 点击对话! " + str(nnn))
# 判断是否死亡
ret_sw = self.find_zhuyidiren(hwnd, left, top, right, bottom, p_left, p_top)
if ret_sw:
state.状态_检测中 = False
return -1
else:
if rrrr != []:
return 1
time.sleep(1)
return 0
def find_f_keep_going(self, hwnd, left, top, right, bottom, p_left, p_top, isFanxiang):
img = cv2.imdecode(np.fromfile(file="./datas/F.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
if isFanxiang:
keepKey = 's'
else:
keepKey = 'w'
if find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 F", 1000, 0.05, False,
keepKey=keepKey):
if isFanxiang:
pyautogui.keyUp('s')
else:
pyautogui.keyUp('w')
pyautogui.keyDown('f')
time.sleep(0.2)
pyautogui.keyUp('f')
time.sleep(0.3)
pyautogui.keyDown('f')
time.sleep(0.2)
pyautogui.keyUp('f')
return True
else:
return False
def click_danrentiaozhan(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/单人挑战.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 单人挑战")
def click_dimaiyichang(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/地脉异常.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 地脉异常", 1, 0.01,
threshold=0.76)
def click_jixing(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/纪行.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
mask = img[:, :, 3] # 提取透明度通道作为掩码
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 纪行", 10, 1,
threshold=0.76, mask=mask, double_click=True)
def click_jixing_renwu(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/纪行_任务.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
mask = img[:, :, 3] # 提取透明度通道作为掩码
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 纪行_任务", 10, 1,
threshold=0.6, mask=mask)
def click_jixing_yijianlingqu(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/纪行_一键领取.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 纪行_一键领取", 10, 1,
threshold=0.76)
def click_kuaisubiandui(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/快速编队.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 快速编队", 1, 1,
threshold=0.76)
def find_baocunpeizhi(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/保存配置.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "查找 保存配置", 1, 1,
threshold=0.76,is_click=False)
def click_jixing_jixing(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/纪行_纪行.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
mask = img[:, :, 3] # 提取透明度通道作为掩码
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 纪行_纪行", 10, 1,
threshold=0.76, mask=mask)
def click_kaishitiaozhan(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/开始挑战.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 开始挑战")
def find_shuzhibugou(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/树脂不够.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
mask = img[:, :, 3] # 提取透明度通道作为掩码
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 树脂不够", 3,
threshold=0.65, is_click=False, mask=mask)
def find_shuzhibugou2(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/收取完成秘境.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
mask = img[:, :, 3] # 提取透明度通道作为掩码
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "发现 树脂不够", 3,
threshold=0.65, is_click=False, mask=mask)
def find_zidongtuichu(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/自动退出.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
mask = img[:, :, 3] # 提取透明度通道作为掩码
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "发现 自动退出", 1,
threshold=0.65, is_click=False, mask=mask,step=0.001)
def find_jixutiaozhan(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/继续挑战.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
mask = None # 提取透明度通道作为掩码
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "发现 继续挑战", 1,
threshold=0.65, is_click=False, mask=mask,step=0.001)
def find_f(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/f.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
mask =None# img[:, :, 3] # 提取透明度通道作为掩码
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "寻找 F", 1,step=0.001,
threshold=0.75, is_click=False, mask=mask)
def find_zhuyidiren(self, hwnd, left, top, right, bottom, p_left, p_top):
img = cv2.imdecode(np.fromfile(file="./datas/注意敌人.png", dtype=np.uint8), cv2.IMREAD_UNCHANGED)
return find_img_and_click(img, hwnd, left, top, right, bottom, p_left, p_top, "点击 注意敌人", 2,
step=0.01,
threshold=0.9, is_click=True)
def find_duihuahuopengren(self, hwnd, left, top, right, bottom, p_left, p_top):
global imgs_duihuahuopengren
return find_imgs_and_click(imgs_duihuahuopengren, hwnd, left, top, right, bottom, p_left, p_top, "发现 对话或烹饪", 1,
step=0.001, is_click=False)
def find_pianpianhua(self, hwnd, left, top, right, bottom, p_left, p_top):
global imgs_pianpianhua
return find_imgs_and_click(imgs_pianpianhua, hwnd, left, top, right, bottom, p_left, p_top, "发现 骗骗花", 1,
step=0.001, is_click=False)
def distance_to_target(self, d):
h = float(d["points"][1][0] - d["points"][0][0])
w = float(d["points"][1][1] - d["points"][0][1])
# # # 计算距离的平方,这里使用欧几里得距离的平方作为衡量标准
dist = (d["x"] - self.centre_point[0]) ** 2 + (d["y"] - self.centre_point[1]) ** 2
angle = get_angle(self.centre_point, [d["x"], d["y"]])
if angle >= 300 or angle <= 60:
dist *= 999
if w < 60:
dist *= 0.1
return dist + w * h
if __name__ == '__main__':
while True:
time.sleep(0.0001)
pass
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/Pqv4iYDX55jJ/lanren-genshin-impact-ai.git
git@gitee.com:Pqv4iYDX55jJ/lanren-genshin-impact-ai.git
Pqv4iYDX55jJ
lanren-genshin-impact-ai
懒人原神AI
master

搜索帮助