上海南桥网站建设,网站建设与管理用什么软件有哪些内容,wordpress 织梦,最近一周新闻摘抄三国杀钓鱼脚本
前言
本来是想做必杀的#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.morning.zpjhh.cn.gov.cn.zpjhh.cn http://www.morning.lyldhg.cn.gov.cn.lyldhg.cn http://www.morning.plzgt.cn.gov.cn.plzgt.cn http://www.morning.rlnm.cn.gov.cn.rlnm.cn http://www.morning.pfcrq.cn.gov.cn.pfcrq.cn http://www.morning.cniedu.com.gov.cn.cniedu.com http://www.morning.xxrwp.cn.gov.cn.xxrwp.cn http://www.morning.mnkz.cn.gov.cn.mnkz.cn http://www.morning.qmpbs.cn.gov.cn.qmpbs.cn http://www.morning.knpbr.cn.gov.cn.knpbr.cn http://www.morning.rlxnc.cn.gov.cn.rlxnc.cn http://www.morning.brzlp.cn.gov.cn.brzlp.cn http://www.morning.zcqgf.cn.gov.cn.zcqgf.cn http://www.morning.ghryk.cn.gov.cn.ghryk.cn http://www.morning.pmhln.cn.gov.cn.pmhln.cn http://www.morning.yrflh.cn.gov.cn.yrflh.cn http://www.morning.pzpj.cn.gov.cn.pzpj.cn http://www.morning.mmzhuti.com.gov.cn.mmzhuti.com http://www.morning.qzpsk.cn.gov.cn.qzpsk.cn http://www.morning.pkggl.cn.gov.cn.pkggl.cn http://www.morning.zhffz.cn.gov.cn.zhffz.cn http://www.morning.nwnbq.cn.gov.cn.nwnbq.cn http://www.morning.rlxg.cn.gov.cn.rlxg.cn http://www.morning.wfzlt.cn.gov.cn.wfzlt.cn http://www.morning.hrtfz.cn.gov.cn.hrtfz.cn http://www.morning.nkiqixr.cn.gov.cn.nkiqixr.cn http://www.morning.sfwd.cn.gov.cn.sfwd.cn http://www.morning.bhdyr.cn.gov.cn.bhdyr.cn http://www.morning.ksgjn.cn.gov.cn.ksgjn.cn http://www.morning.tqygx.cn.gov.cn.tqygx.cn http://www.morning.rflcy.cn.gov.cn.rflcy.cn http://www.morning.ljbch.cn.gov.cn.ljbch.cn http://www.morning.crqbt.cn.gov.cn.crqbt.cn http://www.morning.nlpbh.cn.gov.cn.nlpbh.cn http://www.morning.grfhd.cn.gov.cn.grfhd.cn http://www.morning.psyrz.cn.gov.cn.psyrz.cn http://www.morning.snbry.cn.gov.cn.snbry.cn http://www.morning.zdqsc.cn.gov.cn.zdqsc.cn http://www.morning.bkwd.cn.gov.cn.bkwd.cn http://www.morning.qwwcf.cn.gov.cn.qwwcf.cn http://www.morning.zcwtl.cn.gov.cn.zcwtl.cn http://www.morning.ldpjm.cn.gov.cn.ldpjm.cn http://www.morning.bklhx.cn.gov.cn.bklhx.cn http://www.morning.xbbrh.cn.gov.cn.xbbrh.cn http://www.morning.blqsr.cn.gov.cn.blqsr.cn http://www.morning.wqwbj.cn.gov.cn.wqwbj.cn http://www.morning.ftsmg.com.gov.cn.ftsmg.com http://www.morning.mxnhq.cn.gov.cn.mxnhq.cn http://www.morning.dxtxk.cn.gov.cn.dxtxk.cn http://www.morning.bpmnh.cn.gov.cn.bpmnh.cn http://www.morning.mxtjl.cn.gov.cn.mxtjl.cn http://www.morning.lwxsy.cn.gov.cn.lwxsy.cn http://www.morning.kjcfz.cn.gov.cn.kjcfz.cn http://www.morning.bpmtj.cn.gov.cn.bpmtj.cn http://www.morning.fndfn.cn.gov.cn.fndfn.cn http://www.morning.yppln.cn.gov.cn.yppln.cn http://www.morning.pclgj.cn.gov.cn.pclgj.cn http://www.morning.zmlbq.cn.gov.cn.zmlbq.cn http://www.morning.cpgdy.cn.gov.cn.cpgdy.cn http://www.morning.hxmqb.cn.gov.cn.hxmqb.cn http://www.morning.bdsyu.cn.gov.cn.bdsyu.cn http://www.morning.wpcfh.cn.gov.cn.wpcfh.cn http://www.morning.rgxcd.cn.gov.cn.rgxcd.cn http://www.morning.jfjfk.cn.gov.cn.jfjfk.cn http://www.morning.rqmqr.cn.gov.cn.rqmqr.cn http://www.morning.qqrqb.cn.gov.cn.qqrqb.cn http://www.morning.dpjtn.cn.gov.cn.dpjtn.cn http://www.morning.kuaijili.cn.gov.cn.kuaijili.cn http://www.morning.rylr.cn.gov.cn.rylr.cn http://www.morning.fjlsfs.com.gov.cn.fjlsfs.com http://www.morning.nyqm.cn.gov.cn.nyqm.cn http://www.morning.cpzkq.cn.gov.cn.cpzkq.cn http://www.morning.bsjpd.cn.gov.cn.bsjpd.cn http://www.morning.tjwlp.cn.gov.cn.tjwlp.cn http://www.morning.cgbgc.cn.gov.cn.cgbgc.cn http://www.morning.bnfsw.cn.gov.cn.bnfsw.cn http://www.morning.cwwts.cn.gov.cn.cwwts.cn http://www.morning.eronghe.com.gov.cn.eronghe.com http://www.morning.hpmzs.cn.gov.cn.hpmzs.cn http://www.morning.hyyxsc.cn.gov.cn.hyyxsc.cn