全自动魔兽世界钓鱼脚本
魔兽世界钓鱼脚本思路:
1.找浮漂,使用鼠标在钓鱼区域滑行,每滑行10像素进行一次鼠标形状判断,碰到浮漂进入钓鱼模式
2.上钩判断,,打开windows 7 声音窗口,**有个声音输出指示,我这里判定声音指示条到3格判定鱼上钩,判定方法用 ifcolor
3.程序过程:查找声音窗口魔兽世界窗口并获取窗口大小---->确定鼠标滑行区域进行鼠标滑行---->监控鼠标形状直到找到浮漂-->监控鱼上钩声音直到上钩-->点击鼠标右键-->循环
4.源代码 如果复制到按键精灵里有问题,把注释删掉,似乎按键精灵加了中文注释会出现问题。 代码如下:
Rem begin Delay 100
Rem 国服魔兽世界自动钓鱼脚本 // normalshape = 965986689
// fishshape = 1053591638 //鼠标在浮漂上的形状 Rem 获取声音窗口大小(用来定位第三格声音的点): soundwin = Plugin.Window.Find(0, \声音\If soundwin = 0 Then
MsgBox \没有打开声音窗口\End If
soundRect = Plugin.Window.GetClientRect(soundwin) Dim soundArray
soundArray = split(soundRect, \//MessageBox(wowRect) sL = Clng(soundArray(0)) sT = Clng(soundArray(1)) sR = Clng(soundArray(2)) sB = Clng(soundArray(3)) plugin.Window.Active(soundwin)
wowin=Plugin.Window.Find(0, \魔兽世界\//MessageBox (wowin) Rem 窗口置顶:
plugin.Window.Active(wowin)
wowRect = Plugin.Window.GetClientRect(wowin) Dim wowArray
wowArray = split(wowRect, \L = Clng(wowArray(0)) T = Clng(wowArray(1)) R = Clng(wowArray(2)) B = Clng(wowArray(3)) L1 = L + R / 5 R1 = L + (R/5) * 4 T1 = T + B/2 + B/11 B1 = T + B / 2 + (B / 10) * 4 Delay 100
KeyDown \ Delay 200 KeyUp \Delay 500 Rem 鼠标滑动
Call mouse(L1, R1, T1, B1, 8, 25)
-----------------------------------------------以下全部是函数
Function mouse(l2, r2, t2, b2,ustep,vstep) //鼠标滑动函数,参数是滑动范围和滑动间隔 //滑动起始点 mbx = l2+5 mby = b2-5
while t2 If findfishmouse = 1 Then call fish End If delay 8 mbx = mbx+ustep Wend delay 8 mby = mby - vstep mbx = l2 + 1 Wend Goto begin End Function Function findfishmouse() //判断鼠标是否在浮漂上,是则返回1 mouseshape=GetCursorShape(0) If (mouseshape=1053591638) Then findfishmouse = 1 Else findfishmouse=0 End If End Function Function fish() //找到浮漂则进入此函数,18秒倒计时,没隔300毫秒进行一次声音判断 GetCursorPos x, y MoveTo x-5, y Delay 100 //MsgBox \找到浮漂!进入钓鱼模式!\fishtime=60 While fishtime>0 If fishsound = 1 Then RightClick 1 Delay 1000 Goto begin End If fishtime = fishtime - 1 Delay 300 Wend Goto begin End Function Function fishsound() //声音判断,跳到第三格则返回1 //MoveTo L + R * 0.911, T + B * 0.21 IfColor sL + sR * 0.911, sT + sB * 0.21, \ //坐标是声音窗口的相对坐标,颜色是声音指示的颜色 fishsound=1 Else fishsound=0 End If End Function
相关推荐: