This repository has been archived by the owner on Aug 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
g600_script.lua
98 lines (79 loc) · 2.3 KB
/
g600_script.lua
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
98
-- Profile settings for G600
-- =========================
-- Use these parameters to assign keyboard-keys to mouse buttons G9,G10,G11,G12,G13
-- Type in your in-game key bindings to select which signs should be mapped to a mouse button.
-- Also type in what key you're using to cast a sign.
-- E.g. the default key mappings for Igni and Quen, which are "5" and "6" as well as "q" for casting.
sign1 = "3"; -- G9
sign2 = "4"; -- G10
sign3 = "5"; -- G11
sign4 = "6"; -- G12
sign5 = "7"; -- G13
cast = "q";
function OnEvent(event, arg)
-- Check if mouse button G9 is pressed
if event == "MOUSE_BUTTON_PRESSED" and arg == 9 then
mbG9_pressed = true
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 9 then
mbG9_pressed = false
ReleaseKey(cast);
ReleaseKey(sign1);
end
-- Check if mouse button G10 is pressed
if event == "MOUSE_BUTTON_PRESSED" and arg == 10 then
mbG10_pressed = true
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 10 then
mbG10_pressed = false
ReleaseKey(cast);
ReleaseKey(sign2);
end
-- Check if mouse button G11 is pressed
if event == "MOUSE_BUTTON_PRESSED" and arg == 11 then
mbG11_pressed = true
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 11 then
mbG11_pressed = false
ReleaseKey(cast);
ReleaseKey(sign3);
end
-- Check if mouse button G12 is pressed
if event == "MOUSE_BUTTON_PRESSED" and arg == 12 then
mbG12_pressed = true
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 12 then
mbG12_pressed = false
ReleaseKey(cast);
ReleaseKey(sign4);
end
-- Check if mouse button G13 is pressed
if event == "MOUSE_BUTTON_PRESSED" and arg == 13 then
mbG13_pressed = true
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 13 then
mbG13_pressed = false
ReleaseKey(cast);
ReleaseKey(sign5);
end
-- Action for mouse Button G9: Sign1
if mbG9_pressed then
PressKey(sign1);
PressKey(cast);
end
-- Action for mouse Button G10: Sign2
if mbG10_pressed then
PressKey(sign2);
PressKey(cast);
end
-- Action for mouse Button G11: Sign3
if mbG11_pressed then
PressKey(sign3);
PressKey(cast);
end
-- Action for mouse Button G12: Sign4
if mbG12_pressed then
PressKey(sign4);
PressKey(cast);
end
-- Action for mouse Button G13: Sign5
if mbG13_pressed then
PressKey(sign5);
PressKey(cast);
end
end