- 积分
- 7
- 阅读权限
- 10
- 鲜花
- 0
- 猫粮
- 17
- 在线时间
- 5 小时
- 精华
- 0
- 注册时间
- 2024-8-6
- 性别
- 保密
- 最后登录
- 2024-11-5
学前班
- 鲜花
- 0
- 猫粮
- 17
|
Call 大漠注册
Call 八方寻路(725,493)
Function 八方寻路(x2, y2)
RightDown 1
Do
x1 = Abs(x坐标)//这里取人物x坐标
y1 = Abs(y坐标)//这里取人物y坐标
TracePrint x1&", "&y1
If x1 < x2 And y1 < y2 Then
TracePrint "↘(右下)"
MoveTo 1071,589
ElseIf x1 < x2 And y1 > y2 Then
TracePrint "↗(右上)"
' 向右上移动
MoveTo 1061,388
ElseIf x1 > x2 And y1 < y2 Then
TracePrint "↙(左下)"
' 向左下移动
MoveTo 809,592
ElseIf x1 > x2 And y1 > y2 Then
TracePrint "↖(左上)"
' 向左上移动
MoveTo 805, 399
ElseIf x1 < x2 Then
TracePrint "→(右)"
MoveTo 1124,509
' 向右移动
ElseIf x1 > x2 Then
TracePrint "←(左)"
' 向左移动
MoveTo 797,508
ElseIf y1 < y2 Then
TracePrint "↓(下)"
' 向下移动
MoveTo 955,633
ElseIf y1 > y2 Then
TracePrint "↑(上)"
' 向上移动
MoveTo 953, 377
End If
Loop Until Abs(x2 - x1) <= 2 and Abs(y2 - y1) <= 2
RightUp 1
End Function
Function y坐标
For i = 1539 To 1559 Step 7//遍历y坐标返回
dm_ret = dm.FindStr(i, 196, i + 8, 207, "0|1|2|3|4|5|6|7|8|9", "ffffff-000000", 0.9, intX, intY)
If intX >= 0 and intY >= 0 Then
y坐标 = y坐标 & dm_ret
End If
Next
End Function
Function x坐标
For i = 1514 To 1528 Step 7//遍历x坐标返回
dm_ret = dm.FindStr(i, 196, i + 8, 207, "0|1|2|3|4|5|6|7|8|9", "ffffff-000000", 0.9, intX, intY)
If intX >= 0 and intY >= 0 Then
x坐标 = x坐标 & dm_ret
End If
Next
End Function
Function 大漠注册()//注册大漠 路径自行更改
PutAttachment "D:\桌面\自动发货", "dm.dll"
Call Plugin.RegDll.Reg("D:\桌面\自动发货\dm.dll")
Set dm = createobject("dm.dmsoft")
If dm.Ver() <> "3.1233" Then
Set dm = nothing
set ws=createobject("Wscript.Shell")
ws.run "regsvr32 D:\桌面\自动发货\dm.dll /s"//这里把路径改了就行 /s不要动
Set ws = nothing
Delay 1500
TracePrint "注册"
End If
If len(dm.Ver()) = 0 Then
TracePrint "注册未成功,请检查您的系统是否禁用了VBS脚本权限"
Else
TracePrint "注册成功,当前的版本号:"&dm.Ver()
End If
dm.SetPath "D:\桌面\自动发货"//设置全局路径
dm_ret = dm.SetDict(0,"dm_寻路.txt")//设置字库
End Function |
|