-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.lua
64 lines (58 loc) · 1.23 KB
/
run.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
do
local dealnow
dealnow = function()
pat[5] = itm
if func == "comm" then pat[2] = 0
if comm == "ON" then pat[6] = 2
else pat[6] = 0
end
end
if func == "comf" then pat[2] = 2
if comm == "ON" then pat[6] = 2
else pat[6] = 0
end
end
if func == "coft" then
pat[2] = (itm > 20) and 2 or 0
pat[6] = 25
local time = tonumber(comm) or 0
if time < 256 then
pat[7] = 5
pat[8] = time
else
pat[7] = 6
pat[8] = bit.band(time, 0xFF)
pat[9] = bit.rshift(time, 8)
end
end
if func == "askf" then
pat[2] = 2
pat[6] =128
end
if func == "bitr" then
pat[2] = 0
pat[3] = 0
if comm == "ON" then pat[6] = 15
else pat[6] = 9
end
end
if func == "bitf" then
pat[2] = 2
pat[3] = 0
if comm == "ON" then pat[6] = 15
else pat[6] = 9
end
end
if func == "birc" then
pat[2] = 1
pat[3] = 3
if comm == "ON" then pat[6] = 15
else
pat[6] = 9
pat[3] = 5
end
end
dofile('writeMTRF.lua')
end
dealnow()
end