-
Notifications
You must be signed in to change notification settings - Fork 0
/
DivHelper.ahk
42 lines (38 loc) · 1.08 KB
/
DivHelper.ahk
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
coordmode, Mouse, Screen
^D::
{
MouseGetPos, currentCursorX, currentCursorY
Send {LControl Down}
Click
Send {LControl Up}
TradeDiv(600,654,733,744) ; Click on Trade
CollectDiv(602,702,630,645) ; CTRL Click result back to inventory
MouseBack(currentCursorX, currentCursorY) ; Move mouse back
}
return
TradeDiv(minX,maxX,minY,maxY,speedMin:=3,speedMax:=5) {
Random, rndX, %minX%, %maxX%
Random, rndY, %minY%, %maxY%
Random, MouseSpeed, %speedMin%, %speedMax%
BlockInput, On
MouseMove, %rndX%, %rndY%, %MouseSpeed%
Send {LControl Down}
Click
Send {LControl Up}
BlockInput, off
}
CollectDiv(minX,maxX,minY,maxY,speedMin:=3,speedMax:=5) {
Random, rndX, %minX%, %maxX%
Random, rndY, %minY%, %maxY%
Random, MouseSpeed, %speedMin%, %speedMax%
BlockInput, On
MouseMove, %rndX%, %rndY%, %MouseSpeed%
Send {LControl Down}
Click
Send {LControl Up}
BlockInput, off
}
MouseBack(mouseBackX, mouseBackY) {
Random, MouseSpeed, 3, 5
MouseMove, %mouseBackX%, %mouseBackY%, %MouseSpeed%
}