-
Notifications
You must be signed in to change notification settings - Fork 7
/
BAR jellys.ahk
57 lines (52 loc) · 1.32 KB
/
BAR jellys.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
;; Made by Lessy / Saber
Menu, Tray, Tip, BAR jellys
Menu, Tray, Icon, %A_ScriptDir%\icons\treat_bitterberry.ico
#MaxThreads, 8
#MaxMem, 256
#Include functions.ahk
; "Pause" Hotkeys
$^q:: ; CTRL+Q
$^F11:: ; CTRL+F11
{
Reload
Return
}
; "Play" Hotkeys
;; Place cursor on the level of the bee and have the "use another royal jelly" menu open already
$^p:: ; CTRL+P
$^F4:: ; CTRL+F4
{
Menu, Tray, Icon, %A_ScriptDir%\icons\status\in-progress.ico
RollUntilBar(800)
}
RollUntilBar(delay_between_rolls)
{
is_bar_bee := False
MouseGetPos, level_x, level_y
Loop
{
ImageSearch, use_rj_x, use_rj_y, 0, 0, A_ScreenWidth, A_ScreenHeight, *30 %A_ScriptDir%\images\use_another_rj.png
If (ErrorLevel == 0)
{
MouseClick, Left, use_rj_x+50, use_rj_y+10
MouseMove, use_rj_x+50, use_rj_y-40
Sleep, delay_between_rolls
} Else {
Menu, Tray, Icon, %A_ScriptDir%\icons\status\failure.ico
Break
}
ImageSearch,,, level_x-10, level_y-10, level_x+10, level_y+10, *30 %A_ScriptDir%\images\BAR.png
If (ErrorLevel == 0)
{
Menu, Tray, Icon, %A_ScriptDir%\icons\status\success.ico
Break
}
ImageSearch,,, level_x-10, level_y-10, level_x+10, level_y+10, *30 %A_ScriptDir%\images\no_mutation.png
If (ErrorLevel == 0)
{
Menu, Tray, Icon, %A_ScriptDir%\icons\status\failure.ico
Break
}
}
MouseMove, level_x, level_y
}