按键精灵吧 关注:499,505贴子:1,008,260
  • 2回复贴,共1

麻烦大佬,以前找人弄的脚本。最近换了系统不能运行了。

只看楼主收藏回复

PutAttachment "c:\辅助脚本", "*.dll"
PutAttachment ".\plugin", "dmreg.dll"
PutAttachment "c:\辅助脚本", "*.bmp"
PutAttachment "c:\辅助脚本", "*.txt"
Public Declare Function SetDllPathW Lib "c:\辅助脚本\dmreg.dll" Alias "SetDllPathW" (ByVal path As String, ByVal mode As Long) As Long
TracePrint (SetDllPathW("c:\辅助脚本\dm.dll", 0))
hwnd = Plugin.Window.find(0, "World of Qin - Client")
TracePrint hwnd
Call 大漠注册过程
Call 注册乐玩插件(hwnd)
hwnd = dm.GetMousePointWindow()
天骄句柄= hwnd
process_id = dm.GetWindowProcessId(天骄句柄)
hwnd = dm.FindWindowByProcessId(process_id,"","World of Qin - Client")
dm_ret = dm.BindWindowEx(hwnd,"dx2","dx.mouse.position.lock.api|dx.mouse.position.lock.message|dx.mouse.clip.lock.api|dx.mouse.input.lock.api|dx.mouse.state.api|dx.mouse.api|dx.mouse.cursor","dx.keypad.input.lock.api|dx.keypad.state.api|dx.keypad.api","dx.mouse.focus.input.message",103)
TracePrint dm_ret
Call 找路(hwnd)
//
Rem 重新开始
//
枚举窗口 = dm.EnumWindowByProcessId(process_id, "", "", 16)
TracePrint 枚举窗口
hwnds1 = split(枚举窗口, ",")
ycount= UBound(hwnds1)
TracePrint ycount
// TracePrint hwnds1(3)
TracePrint hwnd
If ycount < 1 Then
//TracePrint "无异常"
Else
dm.SwitchBindWindow (hwnds1(0))
Delay 200
dm.KeyPress 13
Delay 100
dm.SwitchBindWindow (hwnds1(3))
End If
call 内存call到道人
Call 和npc对话
Delay 300
Call 兑换材料
Delay 1000
// dm.KeyPress 27
Call 走路内存(139, 174, hwnd)
Delay 2000
Call 走路call(139, 174, 140, 172)
Delay 700
dm_ret = dm.OcrEx(0, 0, 2000, 2000, "c8ccb8-000000", 1.0)//对话
TracePrint dm_ret
// sss1= split(dm_ret, "$")
//
dm.moveto 232, 631
Delay 200
dm.LeftClick
Delay 400
dm.moveto 312, 184
Delay 400
dm.LeftClick
Delay 200
dm.moveto 311, 182
Delay 400
dm.LeftClick
// Delay 1000
dm.moveto 322, 484
Delay 600
dm.LeftClick
dm.moveto 320, 483
Delay 400
dm.LeftClick
// Delay 700
Call 卖材料
// TracePrint "执行1"
// dm.KeyPress 27
//
//Delay 1000
//TracePrint "执行2"
Goto 重新开始
Function 和npc对话
Delay 1000
dm_ret3 = dm.OcrEx(0, 0, 2000, 2000, "f8b000-000000", 1.0)//对话
If dm_ret3 = "" Then
TracePrint "点不到npc"
Call 内存call到道人
// Call 走路call(137, 178, 138, 180)
Delay 400
//和npc对话
End If
TracePrint dm_ret3
sss= split(dm_ret3, "$")
dm.moveto 320, 646
Delay 200
dm.LeftClick
//第二次对话
dm_ret4 = dm.OcrEx(0, 0, 2000, 2000, "c8ccb8-000000", 1.0)//对话
TracePrint dm_ret4
ssss= split(dm_ret4, "$")
dm.moveto 232, 631
Delay 200
dm.LeftClick
//第三次
dm_ret5 = dm.OcrEx(0, 0, 2000, 2000, "c8ccb8-000000", 1.0)//对话
TracePrint dm_ret5
sssss= split(dm_ret5, "$")
dm.moveto 232, 631
Delay 200
dm.LeftClick
Delay 500
//第四次
dm_ret6 = dm.OcrEx(0, 0, 2000, 2000, "f8b000-000000", 1.0)//对话
TracePrint dm_ret6
// sssss= split(dm_ret5, "$")
//
//
dm.moveto 232, 631
Delay 200
dm.LeftClick
// Delay 500
// dm.MoveTo 182, 631
Delay 500
End Function
Function 兑换材料
Delay 200
材料 = dm.FindPic(0, 0, 2000, 2000, "c:\辅助脚本\铁木.bmp", "785c28", 1.0, 0, xx, yy)
TracePrint 材料
TracePrint xx&","&yy
If xx > 0 Then
dm.moveto xx, yy
index = 0
Do While index < 24 and dm.FindPic(0, 0, 2000, 2000, "c:\辅助脚本\巡查木.bmp", "000000", 1.0, 0, xxss, yyss) = 0
dm.LeftClick
Delay 200
dm.KeyPress 13
Delay 200
index=index+1
Loop
dm.moveto 650,510
dm.LeftClick
Else
TracePrint "刷新了"
End If
// Delay 300
End Function
Function 卖材料
//Delay 200
待卖材料 = dm.FindPic(0, 0, 2000, 2000, "c:\辅助脚本\铁木2.bmp", "41270a", 1.0, 0, xxs, yys)
TracePrint xxs & "," & yys
If xxs > 0 and dm.FindPic(0, 0, 2000, 2000, "c:\辅助脚本\巡查皮.bmp", "000000", 1.0, 0, xxss1, yyss2) = 0 Then
TracePrint xxss1
dm.moveto xxs, yys+10
//Delay 100
dm.LeftClick
//dm.moveto 500, 320
//dm.LeftClick
//Delay 100
卖材料
Else
TracePrint "卖完了"
dm.rightClick
Delay 100
dm.moveto 650,510
dm.LeftClick
End If
End Function
//Rem 循环开始
//Delay 500
// 初始画面 = dm.FindPic(0, 0, 2000, 2000, "c:\辅助脚本\清屏.bmp", "706838", 1.0, 0, xx, yy)
// TracePrint 初始画面
// TracePrint xx
// If xx > 0 Then
// dm.KeyPress 13
// End If
//
//Call 换礼包
//Delay 400
//Call 开幸运礼盒
//
//
//Goto 循环开始
Function 走路内存(x坐标, y坐标, hwdn)
TracePrint hwdn
lw.AsmAdd "mov ecx,dword ptr ds:[0x" & 基址 & "]"
lw.AsmAdd "push 0x0"
lw.AsmAdd "push 0"& hex(y坐标)
lw.AsmAdd "push 0"& hex(x坐标)
lw.AsmAdd "push 0x1"
lw.AsmAdd "call 0" & 寻路call
lw.asmcall hwnd, 1
End Function
Function 内存call到道人
Call 走路内存(137, 178, hwnd)
Delay 2000
Call 走路call(137, 178, 137, 179)
Delay 400
End Function
Function 内存call到道人1
Call 走路内存(135, 178, hwnd)
Delay 2000
Call 走路call(135, 178, 138, 180)
Delay 400
End Function
Sub 走路call(自身x,自身y,目标x,目标y)
hx = (512 + ((目标x - 自身x) * 32)) - (((目标y - 自身y) * 32))
TracePrint HX
hy = (384 + ((目标x - 自身x) * 16)) + (((目标y - 自身y) * 16))
TracePrint HY
dm.moveto hx-10, hy
Delay 300
dm.LeftClick
Delay 100
End Sub
Function 注册乐玩插件(hwnd)//默认开启内存读写功能
ret = Plugin.lwex.RegCom("c:\辅助脚本\lw.dll")//注册COM组件,注意设置正确的DLL路路径.
Set lw = createobject("lw.lwsoft3")
ver = lw.Ver()
// TracePrint ver
If len(ver) > 0 Then
TracePrint ("注册成功")
End If
ret = lw.SetShowErrorMsg(0)//设置错误为不弹出
ret = lw.SetMemoryProcess(hwnd, 1)//置窗口读写内存开启
If ret = 1 Then
Else
TracePrint "错误,查看句柄是否有问题"
End If
End Function
Sub 大漠注册过程
Set dm = createobject("dm.dmsoft")
dm_ret = dm.Reg("xf30557fc317f617eead33dfc8de3bdd4ab9043", "advmdm120")// abcdefg是您的注册码. 在大漠插件网站后台可以直接获取.
TracePrint dm.Ver()
dm.SetMouseDelay "dx",70
dm.SetKeypadDelay "dx", 40
dm_ret = dm.SetDict(0, "c:\辅助脚本\换金币.txt")
End Sub
Sub OnScriptExit()
dm_ret = dm.UnBindWindow()
TracePrint "dm_ret:"&dm_ret
End Sub
Function 找路(hwnd)
基址=hex(lw.FindCode("8B 0D *???????? 85 C9 74 ?? 56 8B 74 24 ?? 57 8B 7C 24 ?? 56 57 E8 ???????? 8B 0D ???????? 6A ?? 56 57 6A ?? E8 ????????",0,"poqclient.bin",0 ))
TracePrint 基址
TracePrint 乐玩写的定位地址("poqclient.bin", +2,"8B 0D *???????? 85 C9 74 ?? 56 8B 74 24 ?? 57 8B 7C 24 ?? 56 57 E8 ???????? 8B 0D ???????? 6A ?? 56 57 6A ?? E8 ????????")
寻路call=hex( lw.FindCode("8B 0D ???????? 85 C9 74 ?? 56 8B 74 24 ?? 57 8B 7C 24 ?? 56 57 E8 ???????? 8B 0D ???????? 6A ?? 56 57 6A ?? E8* ????????",0,"poqclient.bin",0 ))
TracePrint 寻路call
End Function
Function 乐玩写的定位地址(模块名, 偏移, 特征码)
Dim ret2,ret1,result,定位地址值
result = lw.FindCode(特征码, 0, 模块名, 1)
TracePrint result
ret1 = Lib.算法.十六进制转十进制(hex(result))
ret2 = 偏移
定位地址值 = int(ret1) + int(ret2)
定位地址值2=定位地址值
地址 = lw.ReadIntEx(hex(定位地址值))
乐玩写的定位地址=hex(地址)
End Function


IP属地:云南1楼2022-10-06 11:01回复
    都用的内存了可以啊


    IP属地:浙江来自Android客户端3楼2022-10-08 12:22
    回复