-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathwarlock-fit-changer.ahk
97 lines (77 loc) · 1.51 KB
/
warlock-fit-changer.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#NoEnv
#SingleInstance Force
#KeyHistory 0
SetBatchLines -1
ListLines Off
SendMode Input
is_pending := 0
current_fit := 0
~*F2::
if (is_pending) {
return
}
is_pending := 1
current_fit := !current_fit
if (current_fit) {
SwapB()
} else {
SwapA()
}
is_pending := 0
return
~*F3::
if (is_pending) {
return
}
current_fit := 0
return
SwapA() {
WinGetPos, X, Y, Width, Height, Destiny 2
CoordMode, Mouse, Window
; open inventory
Send, {F1}
; up
x1 := Floor(Width * 0.725)
y1 := Floor(Height * 0.49)
Sleep, 1500
MouseMove, %x1%, %y1%
x2 := Floor(Width * 0.78)
y2 := Floor(Height * 0.49)
Click, %x2%, %y2%
; down
x3 := Floor(Width * 0.725)
y3 := Floor(Height * 0.6)
Sleep, 100
MouseMove, %x3%, %y3%
x4 := Floor(Width * 0.78)
y4 := Floor(Height * 0.6)
Sleep, 90
Click, %x4%, %y4%
; close inventory
Send, {F1}
}
SwapB() {
WinGetPos, X, Y, Width, Height, Destiny 2
CoordMode, Mouse, Window
; open inventory
Send, {F1}
; down
x1 := Floor(Width * 0.725)
y1 := Floor(Height * 0.6)
Sleep, 1500
MouseMove, %x1%, %y1%
x2 := Floor(Width * 0.78)
y2 := Floor(Height * 0.6)
Click, %x2%, %y2%
; up
x3 := Floor(Width * 0.725)
y3 := Floor(Height * 0.49)
Sleep, 100
MouseMove, %x3%, %y3%
x4 := Floor(Width * 0.78)
y4 := Floor(Height * 0.49)
Sleep, 90
Click, %x4%, %y4%
; close inventory
Send, {F1}
}