1 | #include <GUIConstants.au3> ; enable gui elements like forms buttons and pix |
---|
2 | #include "speak.au3" ; enble speak("text") function |
---|
3 | Opt("SendKeyDelay", 0) |
---|
4 | Opt("SendKeyDownDelay", 0) |
---|
5 | Opt("ColorMode", 0) |
---|
6 | Global $Paused |
---|
7 | HotKeySet("{PAUSE}", "TogglePause") |
---|
8 | HotKeySet("{ESC}", "Terminate") |
---|
9 | HotKeySet("^s","SetLoc") |
---|
10 | HotKeySet("^c","SetCombat") |
---|
11 | |
---|
12 | ;HotKeySet("{ESC}", "Quit") ;So we be able to exit from the loop |
---|
13 | |
---|
14 | ;setup our locations as globals so we can grab them anywhere & have them the same. |
---|
15 | Const $xc as 0 |
---|
16 | Const $yc as 1 |
---|
17 | Global $CombatLoc[2] |
---|
18 | $CombatLoc[$xc] = 133 |
---|
19 | $CombatLoc[$yc]=150 |
---|
20 | |
---|
21 | ;setup our color swatch for |
---|
22 | Global $CombatColor |
---|
23 | |
---|
24 | ;a toggle to see if we are in combat |
---|
25 | Global $InCombat as Binary |
---|
26 | $InCombat = 0 |
---|
27 | ;$run = 1 |
---|
28 | |
---|
29 | ;While $run = 1 |
---|
30 | |
---|
31 | ;WEnd |
---|
32 | |
---|
33 | Func CombatLoop |
---|
34 | While 1 |
---|
35 | Sleep(2000) |
---|
36 | ;set up a scanner that loops every second could be faster |
---|
37 | Do |
---|
38 | ToolTip(PixelGetColor(CombatLoc[$xc], $CombatLoc[$yc]),0,0) |
---|
39 | sleep(1000) |
---|
40 | Send("`") |
---|
41 | Until PixelGetColor(CombatLoc[$xc], $CombatLoc[$yc]) <> "101010" |
---|
42 | |
---|
43 | ; we are in combat so we need to do combat stuff now every second it spams skills |
---|
44 | ; since the smallest cool downs are about a second this works grate. |
---|
45 | While PixelGetColor(CombatLoc[$xc], $CombatLoc[$yc]) = "101010" |
---|
46 | ToolTip(PixelGetColor(CombatLoc[$xc], $CombatLoc[$yc]),6),0,0) |
---|
47 | sleep(1000) |
---|
48 | Send("15") |
---|
49 | WEnd |
---|
50 | Send("67") |
---|
51 | Sleep(1000) |
---|
52 | send("k") |
---|
53 | WEnd |
---|
54 | EndFunc |
---|
55 | |
---|
56 | Func Quit() |
---|
57 | Exit |
---|
58 | EndFunc |
---|
59 | |
---|
60 | |
---|
61 | Func TogglePause() |
---|
62 | $Paused = NOT $Paused |
---|
63 | While $Paused |
---|
64 | sleep(100) |
---|
65 | ToolTip('Script is "Paused"',0,0) |
---|
66 | WEnd |
---|
67 | ToolTip("") |
---|
68 | EndFunc |
---|
69 | |
---|
70 | Func Terminate() |
---|
71 | Speak("I hope you liked the fish!") |
---|
72 | Exit 0 |
---|
73 | EndFunc |
---|
74 | |
---|
75 | Func SetCombat() |
---|
76 | $InCombat = Binary |
---|
77 | EndFunc |
---|