灵魂潮汐自动钓鱼脚本(基于按键精灵,适用于MuMu模拟器)

文章详细描述了一个在MuMu模拟器中通过按键精灵实现的灵魂潮汐自动钓鱼脚本,包括窗口定位、颜色块检测和钓鱼操作的逻辑。作者提供了脚本代码以及如何在其他模拟器上使用的指导。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

话不多说先上代码,后面有一些注意事项也请仔细阅读。

脚本代码

Dim hwnd
Dim LTX, LTY, RBX, RBY, screenWidth, screenHeight
Dim position, playing

Sub locate_screen
	hwnd = find_hwnd("MuMu模拟器12", "nemudisplay")
	screenRect = Plugin.Window.GetClientRect(hwnd)
	LTX = split(screenRect, "|")(0)
	LTY = split(screenRect, "|")(1)
	RBX = split(screenRect, "|")(2)
	RBY = split(screenRect, "|")(3)
	screenWidth = RBX - LTX
	screenHeight = RBY - LTY
End Sub

Sub start_fishing
	MoveTo LTX + (CInt(screenWidth) * 9 / 10), LTY + (CInt(screenHeight) * 2 / 3)
	LeftClick 1
	Delay 500
	MoveTo LTX + (CInt(screenWidth) / 2), LTY + (CInt(screenHeight) * 9 / 10)
	LeftClick 1
	playing = 1
End Sub

Call locate_screen

Function find_hwnd(fatherTitle, title)
	fatherHwnd = Plugin.Window.Find(0, fatherTitle)
	If fatherTitle = title Then 
		find_hwnd = fatherHwnd
	Else 
		tempHwnd = 0
		While tempHwnd = 0
			tempHwnd = Plugin.Window.FindEx(fatherHwnd, 0, 0, title)
			If tempHwnd = 0 Then 
				fatherHwnd = Plugin.Window.FindEx(fatherHwnd, 0, 0, 0)
			End If
		Wend
	End If
	find_hwnd = tempHwnd
End Function

While True
	Call start_fishing
	
	Delay 4000
	
	While playing = 1
		tempx1 = CInt(LTX) + CInt(screenWidth) * 8 / 30
		tempx2 = CInt(LTX) + CInt(screenWidth) * 22 / 30
		tempy = CInt(LTY) + CInt(screenHeight) * 4.2 / 17
		
		iNum1 = Plugin.Color.GetBlockRange(tempx1, tempy, tempx2, tempy, "ADCB10", 1)
        iNum2 = Plugin.Color.GetBlockRange(tempx1, tempy, tempx2, tempy, "FFFFFF", 1)
        iNum3 = Plug
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值