当前位置: 首页 > news >正文

专业3合1网站建设价格建设网站 容量

专业3合1网站建设价格,建设网站 容量,有什么好的推广平台,官方网站怎么制作三国杀钓鱼脚本 前言 本来是想做必杀的#xff0c;但是后来测试了大约400钓发现纯靠连点没有漏掉的鱼#xff0c;所以必杀功能就舍弃了。 我pyinstaller打包后运行.exe居然黑屏了#xff1f;#xff1f;#xff1f;可能是多进程报错处理没写好#xff0c;反正还是用vsc…三国杀钓鱼脚本 前言 本来是想做必杀的但是后来测试了大约400钓发现纯靠连点没有漏掉的鱼所以必杀功能就舍弃了。 我pyinstaller打包后运行.exe居然黑屏了可能是多进程报错处理没写好反正还是用vscode运行python吧。这样最起码可以保证不死机。 环境配置 python 3.12.7 Visual Studio Code 任何版本 雷电模拟器9 Win11 23H2 雷电模拟器安装 通过官网https://www.ldmnq.com下载。这个没啥好说的没有网络问题直接下一步下一步就行了。 说一下问题我运行vivo端的游戏商店或者三国杀时发现不能使用。最后查阅信息有一个解决方法是将模拟器的手机型号设置为除了vivo以外的任意一款手机型号。 python 安装 通过官网https://www.python.org/downloads/release/python-3127找到下面Windows installer (64-bit)下载。 链接为https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe可以点击此处直接下载 之后安装python安装步骤这里不是重点。推荐一位bilibili的up主的视频根据他的安装即可后面会讲。 Visual Studio Code 安装 通过官网https://code.visualstudio.com找到Download for Windows下载即可。 同样安装步骤后面会讲。 如何安装 https://www.bilibili.com/video/BV1w7411N7Ti这个up主的BV1w7411N7Ti视频可以很好的讲解。记得Visual Studio Code 需要加插件别忘了看文档安装一下。 脚本 脚本代码-python 这是一段python代码复制到文本文件更改后缀名为py即可运行。也可以继续观看B站up的视频稍微学习一点点怎么运行代码。 from PIL import ImageGrab import multiprocessing import pygetwindow import pyautogui import keyboard import numpy import json import timeclass CustomError(Exception):def __init__(self,message):self.messagemessage class Fishing():standWidth1962standHeight1115def __init__(self,window):self.window window self.leftwindow.leftself.topwindow.topself.jsonDir./position.jsonself.configNoneself.GameInit()def WindowJudge(self,window):return (window.width,window.height)(Fishing.standWidth,Fishing.standHeight)def GameInit(self):if not self.WindowJudge(self.window):raise CustomError(window size is not match!)else:self.configdict(json.loads(self.__read(self.jsonDir)))def Click(self,position):pyautogui.click(self.leftposition[0],self.topposition[1])def DragTo(self,position,speed):pyautogui.dragTo(self.leftposition[0],self.topposition[1],speed,buttonleft)def __read(self,file):fopen(file,r,encodingutf-8)resf.read()f.close()return res def StateFishing(CodeRun):while CodeRun.value:#不可更改if keyboard.is_pressed(esc):CodeRun.valueFalseexit(0)def FishingRun(codeRun,runTime,slow,stink,again,queue,queueNumber):window pygetwindow.getWindowsWithTitle(雷电模拟器)[0]fishingGameFishing(window)queueNumber.value0queue.put((window.left,window.top))queue.put(fishingGame.config[slowColor])queue.put(fishingGame.config[WatchRange])time.sleep(0.1)queueNumber.value1queue.put((window.left,window.top))queue.put(fishingGame.config[stinkColor])queue.put(fishingGame.config[stinkOffset])queue.put(fishingGame.config[StinkyRange])time.sleep(0.1)queueNumber.value2queue.put((window.left,window.top))queue.put(fishingGame.config[againColor])queue.put(fishingGame.config[AgainRange])time.sleep(0.1)queueNumber.value3queue.put((window.left,window.top))queue.put(fishingGame.config[energyColor])queue.put(fishingGame.config[EnergyRange])time.sleep(0.1)while runTime0 and codeRun.value:runTime-1print(剩余%d次垂钓%runTime)time.sleep(0.5)fishingGame.Click(fishingGame.config[beginButton])time.sleep(0.5)fishingGame.DragTo(fishingGame.config[dragToPosition],0.3)time.sleep(5.3)startTimetime.time()while not stink.value and codeRun:if time.time()-startTime2:breakfishingGame.Click(fishingGame.config[liftingPosition])stink.valueFalsewhile codeRun.value:if slow.value :fishingGame.Click(fishingGame.config[fishingButton])if again.value:fishingGame.Click(fishingGame.config[againButton])breakcodeRun.valueFalseexit(0) def WatchSpeed(codeRun,slow,queue,queueNumber):while queueNumber.value!0:passwindowqueue.get()slowColorqueue.get()watchRangequeue.get()left,topwatchRange[position1]right,downwatchRange[position2]while codeRun.value:screenshot numpy.array( ImageGrab.grab(bbox(window[0]left, window[1]top, window[0]right, window[1]down)))screenshotShapescreenshot.shapecnt0for i in range(screenshotShape[0]):for j in range(screenshotShape[1]):tempscreenshot[i][j]if ((int(temp[0])-slowColor[0])**2(int(temp[1])-slowColor[1])**2(int(temp[2])-slowColor[2])**2)**0.55:cnt1slow.value cnt/(screenshotShape[0]*screenshotShape[1])0.6exit(0) def WatchStinky(codeRun,stink,queue,queueNumber):while queueNumber.value!1:passwindowqueue.get()stinkColorqueue.get()stinkOffsetqueue.get()watchRangequeue.get()left,topwatchRange[position1]right,downwatchRange[position2]topstinkOffsetdownstinkOffsetwhile codeRun.value:screenshot numpy.array( ImageGrab.grab(bbox(window[0]left, window[1]top, window[0]right, window[1]down)))screenshotShapescreenshot.shapecnt0for i in range(screenshotShape[0]):for j in range(screenshotShape[1]):tempscreenshot[i][j]if ((int(temp[0])-stinkColor[0])**2(int(temp[1])-stinkColor[1])**2(int(temp[2])-stinkColor[2])**2)**0.550:cnt1stink.value cnt/(screenshotShape[0]*screenshotShape[1])0.1exit(0)def WatchAgain(codeRun,again,queue,queueNumber):while queueNumber.value!2:passwindowqueue.get()againColorqueue.get()watchRangequeue.get()left,topwatchRange[position1]right,downwatchRange[position2]while codeRun.value:screenshot numpy.array( ImageGrab.grab(bbox(window[0]left, window[1]top, window[0]right, window[1]down)))screenshotShapescreenshot.shapecnt0for i in range(screenshotShape[0]):for j in range(screenshotShape[1]):tempscreenshot[i][j]if ((int(temp[0])-againColor[0])**2(int(temp[1])-againColor[1])**2(int(temp[2])-againColor[2])**2)**0.550:cnt1again.value cnt/(screenshotShape[0]*screenshotShape[1])0.8exit(0) def WatchEnergy(codeRun,energy,queue,queueNumber):while queueNumber.value!3:passwindowqueue.get()energyColorqueue.get()watchRangequeue.get()left,topwatchRange[position1]right,downwatchRange[position2]while codeRun.value:screenshot numpy.array( ImageGrab.grab(bbox(window[0]left, window[1]top, window[0]right, window[1]down)))screenshotShapescreenshot.shapecnt0for i in range(screenshotShape[0]):for j in range(screenshotShape[1]):tempscreenshot[i][j]if ((int(temp[0])-energyColor[0])**2(int(temp[1])-energyColor[1])**2(int(temp[2])-energyColor[2])**2)**0.550:cnt1energy.value cnt/(screenshotShape[0]*screenshotShape[1])0.8 if __name__ __main__:runTime999# 运行次数codeRun multiprocessing.Value(b, True)queueNumber multiprocessing.Value(i, -1)slow multiprocessing.Value(b, True)stink multiprocessing.Value(b, True)again multiprocessing.Value(b, False)queuemultiprocessing.Queue(20)processList[]processList.append(multiprocessing.Process(targetStateFishing, args(codeRun,)))processList.append(multiprocessing.Process(targetFishingRun, args(codeRun,runTime,slow,stink,again,queue,queueNumber)))processList.append(multiprocessing.Process(targetWatchSpeed,args(codeRun,slow,queue,queueNumber)))processList.append(multiprocessing.Process(targetWatchStinky,args(codeRun,stink,queue,queueNumber)))processList.append(multiprocessing.Process(targetWatchAgain,args(codeRun,again,queue,queueNumber)))for each in processList:each.start()for each in processList:each.join() 脚本代码-json 此处需要创建在你的上述python脚本文件的同一目录下命名为position.json注意扩展名为json。此处由于电脑性能不同需要手动调节一下stinkOffset负号代表检测区间向上方偏移像素。由于本脚本设计原理是通过监控并对进程通信实现的所以由于电脑性能问题需要平移一定距离以留充足反应。如果刺鱼点太靠上数值应当由-32适当调大如果太靠下应当由-32适当调小。防呆小tips-40比-32小。 {stinkOffset:-32,beginButton:[1625,880],dragToPosition:[1625,630],liftingPosition:[1625,880],fishingButton:[1625,880],againButton:[1420,950],WatchRange:{position1:[1195,135],position2:[1305,140]},AgainRange:{position1:[1250,920],position2:[1290,960]},StinkyRange:{position1:[626,530],position2:[629,600]},EnergyRange:{position1:[1366,189],position2:[1367,209]},stinkColor:[239,199,107],slowColor:[99,77,66],againColor:[255, 199, 99],energyColor:[255,170,90] }安装库 复制下面的命令在命令框中输入即可自动安装清华镜像下的依赖库。如果不会安装还是去看一下上文B站up的视频会有讲解pip指令的教程这里也只是需要知道在哪里输入就可以了。或者去搜一下别人的文档只要能确定在那里输入就可以。 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple keyboard pillow pyautogui pygetwindow numpy说明 脚本是针对雷电模拟器做的适配因此最好不要换模拟器而且甚至版本都不要变。窗口分辨率设置为平板版 1920x1080(dpi 280)。代码中做了窗口检测而且需要做到像素匹配。这里代码中像素匹配是1962x1115设置分辨率后应该就是这个尺寸不要缩放如果缩放了改成其他分辨率后再改回来。再runTime中输入此次运行次数如果不写就会按照我的代码默认参数999次去运行下去了。且换鱼饵是要重开的。脚本是模拟鼠标操作所以不要让任何可能影响点击的操作置于模拟器前运行脚本时模拟器必须处于显示的状态而不是最小化。可以按下esc退出如果前10秒左右按下其他功能会终止由于代码中的延迟语句的缘故代码整体会等一会才能终止。10秒左右之后可以立即终止。运行时要先进入开始垂钓的界面中运行脚本。本脚本中所有用到的位置信息全部存放在position.json中可以根据自己的需求进行更改。但是需要注意的是分辨率的更改可能会引起操作、监控位置以及阈值信息的改变需要手动测试。 By-Round Moon 后继 这个脚本没有对其他电脑做过测试我的电脑比较好的OMEN所以运行流畅但是我的脚本是基于监控信息加进程通信实现的有可能不同电脑性能不一样导致无法运行而且刺鱼操作需要调试但是基本无妨。 另外最近脚本交易盛行有可能会被他人使用这里标识一下我的创作日期是2024年10月19日晚22点为了完成2024年的1024任务所以等到1024当天再发布。本脚本完全开源欢迎大家交流且未经本人允许禁止转载。
http://www.dnsts.com.cn/news/245824.html

相关文章:

  • 手机网站对企业用户的好处wordpress微信公众号开发
  • 培训网站网站建设seo网站设计哪里好
  • 兰州网站建设与优化推广好的营销网站设计公司
  • 广州专业做网站多少钱深圳建科院公司网站
  • 建设银行网站个人银行上不去简述几种网络营销的方法
  • 网站搭建语言做好网站改版工作
  • 西安学校网站制作网页制作平台
  • 新华社两学一做网站微信官方网站登陆
  • ios风格网站模板怎么做网站推广
  • 药品网站网络营销推广怎么做电影资源采集网站咋做
  • 网站开发设计工具行业应用服务类app
  • 珍岛网站建设临淄信息网港
  • 企业网站加视频wordpress七牛云教程
  • 石大网页设计与网站建设云南省建设培训中心网站
  • 网站建设哪里接活杭州小程序搭建
  • c mvc网站开发怎么添加字体到电脑wordpress
  • 个人论坛类网站2023年最新时政热点
  • 合肥优秀网站建设服装类的网站建设
  • 触屏音乐网站源码国外做调查的网站
  • 网站开发有关书籍抖音代运营推广
  • 网站建设任务执行书北京公司注册在哪个网站
  • 龙海网站建设价格建设商场黄金网站
  • 郑州网站推广地址全铝家居全屋定制十大名牌
  • 付费 视频 网站 怎么做昆山网站建设哪家便宜
  • 网站管理助手 建设中百度爱采购推广一个月多少钱
  • jcms网站建设太原网站的公司
  • 南通网站设计公司咨询网站搭建
  • 潍坊建设银行网站南昌网站建设公司
  • 做seo要明白网站内容网站数据库空间增大
  • 企业门户网站建设jsp网站建设后如何修改