forked from liantian-cn/logitech-pubg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
easy_mode.lua
40 lines (34 loc) · 829 Bytes
/
easy_mode.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
EnablePrimaryMouseButtonEvents (true)
local step = 2.0
local recoil = false
function OnEvent(event, arg)
OutputLogMessage("event = %s, arg = %d\n", event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 6) then
recoil = false
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
if (recoil == false) then
step = 2.0
recoil = true
else
step = step * 1.25
end
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 5) then
if (recoil == false) then
step = 2.0
recoil = true
else
step = step * 0.8
end
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
repeat
Sleep(8)
MoveMouseRelative(0, step)
until not IsMouseButtonPressed(1)
end
end