-
Notifications
You must be signed in to change notification settings - Fork 4
/
anjianjingling arknights
88 lines (76 loc) · 1.97 KB
/
anjianjingling arknights
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//单局时间
ftime = 85000
//循环次数
times = 80
//初始化随机数生成器
Randomize
//teamviewer关闭时间,可删
Delay 3000
//下面这句是查找窗口类名("LDPlayerMainFrame")或者标题(0),返回找到的句柄Hwnd
Hwnd = Plugin.Window.Find("LDPlayerMainFrame", 0)
//下面这句是得到窗口句柄的客户区大小
sRect = Plugin.Window.GetClientRect(Hwnd)
//将窗口置于最前
Call Plugin.Window.Top(Hwnd, 0)
//下面这句用于分割字符串,将横坐标和纵坐标分成两个字符串
Dim MyArray
MyArray = Split(sRect, "|")
//下面这句将字符串转换成数值
L = Clng(MyArray(0)):
T = Clng(MyArray(1)):
R = Clng(MyArray(2)):
B = Clng(MyArray(3)):
//左上角坐标
x0 = L + 2
y0 = T + 36
//右下角坐标
x1 = R - 39
y1 = B - 3
//相对坐标
x = x1 - x0
y = y1 - y0
//跳过坐标
ax = x0 + Int(x * 0.870314)
ay = y0 + Int(y * 0.322522)
//确认坐标
bx = x0 + Int(x * 0.833839)
by = y0 + Int(y * 0.823423)
//开始1坐标
cx = x0 + Int(x * 0.898682)
cy = y0 + Int(y * 0.909909)
//开始2坐标
dx = x0 + Int(x * 0.861195)
dy = y0 + Int(y * 0.699099)
For steps = 1 To times
TracePrint steps
//将窗口置于最前Call Plugin.Window.Top(Hwnd, 0)
MoveTo ax +int(Rnd()*30), ay +int(Rnd()*30)
Delay 2000+int(Rnd()*2000)
LeftClick 1
Delay 1000
IfColor bx, by, "FFFFFF", 0 Then
MoveTo ax +int(Rnd()*30), ay +int(Rnd()*30)
Delay 1000+int(Rnd()*1000)
LeftClick 1
Delay 3000+int(Rnd()*1000)
LeftClick 1
Delay 29+int(Rnd()*1000)
MoveTo cx+int(Rnd()*10), cy+int(Rnd()*5)
Delay 3000+int(Rnd()*1000)
LeftClick 1
MoveTo dx+int(Rnd()*10), dy+int(Rnd()*10)
Delay 3000+int(Rnd()*1000)
LeftClick 1
MoveTo ax+int(Rnd()*30), ay+int(Rnd()*30)
Delay ftime +int(Rnd()*1000)
LeftDown 1
MoveTo ax+int(Rnd()*10), ay+int(Rnd()*10)
Delay 1000+int(Rnd()*1000)
LeftUp 1
MoveTo ax+int(Rnd()*30), ay+int(Rnd()*30)
Delay 8000+int(Rnd()*1000)
LeftClick 1
End If
Next
//取消将窗口置于最前
Call Plugin.Window.Top(Hwnd, 1)