-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjattdilua.lua
More file actions
40 lines (39 loc) · 905 Bytes
/
jattdilua.lua
File metadata and controls
40 lines (39 loc) · 905 Bytes
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);
function OnEvent(event, arg)
local dir
OutputLogMessage("event = %s, arg = %s\n", event, arg)
if ( IsKeyLockOn("capslock" ) then
if (IsKeyLockOn("numlock")and IsKeyLockOn("scrolllock"))then
dir = "down"
elseif IsKeyLockOn("scrolllock")then
dir = "up"
elseif IsKeyLockOn("numlock") then
dir = "right"
else
dir = "left"
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 3) then
if dir == "up" then
MoveMouseRelative(0,-5)
OutputLogMessage("dir = %s \n",dir)
Sleep(10)
end
if dir == "down" then
MoveMouseRelative(0,5)
OutputLogMessage("dir = %s \n",dir)
Sleep(10)
end
if dir == "right" then
MoveMouseRelative(5,0)
OutputLogMessage("dir = %s \n",dir)
Sleep(10)
end
if dir == "left" then
MoveMouseRelative(-5,0)
OutputLogMessage("dir = %s \n",dir)
Sleep(10)
end
OutputLogMessage("end \n")
end
end
end