-
Notifications
You must be signed in to change notification settings - Fork 0
/
hb.ahk
executable file
·68 lines (52 loc) · 1.23 KB
/
hb.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
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
FileInstall, .\bag.png, %A_WorkingDir%\bag.png, 1
FileInstall, .\bag_2.png, %A_WorkingDir%\bag_2.png, 1
SetDefaultMouseSpeed, 0
#IfWinActive Helbreath Olympia 6.2
F1::INSERT
`::SendInput, {CTRL DOWN}p{CTRL UP}
LAlt & q::
OpenBag(20, -60)
return
LAlt & w::
OpenBag(68, -60)
return
LAlt & e::
OpenBag(116, -60)
return
OpenBag(x,y) {
KeyWait Control
BlockInput On
MouseGetPos, xpos, ypos
ImageSearch FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *130 bag.png
if ( errorlevel != 0 ) {
SendInput, {F6}
sleep 100
ImageSearch FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *130 bag.png
if ( errorlevel = 0 ) {
OriginX = %FoundX%
OriginY = %FoundY%
FoundX += x
FoundY += y
Found = 1
}
}
else {
OriginX = %FoundX%
OriginY = %FoundY%
FoundX += x
FoundY += y
Found = 1
}
if (Found) {
Click %FoundX%, %FoundY%, 11
sleep 40
SendInput, {F6}
MouseMove, xpos, ypos
}
BlockInput Off
return
}
MultiClick(x2,y2,i) {
Click %x2%, %y2%, %i%
sleep 100
}