-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapex.lua
485 lines (395 loc) · 12.4 KB
/
apex.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
--ORIGINAL BY SARK1TAMA
version = 1
Logitech = "LGS"
KaiGuan="capslock" --KaiGuanJian
Target=1 --Target Key 1:light 2:right 3:middle
SetGunKey_User1=7 --mouse key
R99_Key="lalt"
R301_Key="lshift"
PX_Key="lctrl"
DN_Key="ralt"
M600_Key="rshift"
RE45_Key="rctrl"
SetGunKey_User2=6
ZHZ_Key="lalt"
ZZ_Key="lshift"
LS_Key="lctrl"
LSTAR_Key="ralt"
HWK_Key="rshift"
HWK_WL_Key="rctrl"
------------------------------------------------------------------------------------
turbo_index = 1
-----------------------------------------------------------------------------------------------
None_offset_list = {{1 ,0,0,5}}
None_offset_time = 25
G7_offset_list = {
{1 ,0,5,5}, {2 ,0,5,5}, {3 ,2,5,5},
{4 ,2,5,5}, {5 ,2,5,5}, {6 ,0,5,5},
{7 ,0,6,5}, {8 ,0,6,5}, {9 ,-2,6,5},
{10,0,4,5}, {11,0,4,5}, {12,1,4,5},
{13,-1,6,5}, {14,-1,5,5}, {15,-1,4,5},
{16,1,5,5}, {17,0,4,5}, {18,0,4,5},
{19,0,5,5}, {20,0,4,5}
}
G7_offset_time = 48
PXDD_offset_list = {
{1 ,0,4,5}, {2 ,0,6,5}, {3 ,1,4,5},
{4 ,3,5,5}, {5 ,1,5,5}, {6 ,4,5,5},
{7 ,-2,7,5}, {8 ,-2,3,5}, {9 ,-2,5,5},
{10,-1,4,5}, {11,0,7,5}, {12,0,4,5},
{13,5,3,5}, {14,3,3,5}, {15,2,4,5}
}
PXDD_offset_time = 66
R301DD_offset_list = {
{1 ,0,4,5}, {2 ,0,5,5}, {3 ,0,3,5},
{4 ,-1,3,5}, {5 ,0,5,5}, {6 ,0,5,5},
{7 ,-2,5,5}, {8 ,-1,5,5}, {9 ,0,5,5},
{10,2,3,5}, {11,2,3,5}, {12,1,3,5},
{13,0,5,5}, {14,0,3,5}
}
R301DD_offset_time = 54
RE45_offset_list = {
{1 ,-1,2,5}, {2 ,-1,2,5}, {3 ,-1,2,5},
{4 ,-1,2,5}, {5 ,-1,2,5}, {6 ,-1,1,5},
{7 ,-1,1,5}, {8 ,-1,1,5}, {9 ,-1,2,5},
{10,-1,2,5}, {11,0,2,5}, {12,-1,1,5},
{13,0,1,5}, {14,0,1,5}, {15,-1,1,5},
{16,-1,1,5}, {17,-1,1,5}, {18,0,2,5},
{19,-1,0,5}, {20,-1,0,5}, {21,-1,0,5},
{22,0,1,5}, {23,0,1,5}, {24,-1,1,5},
{25,-1,0,5}
}
RE45_offset_time = 14
XBS_offset_list = {
{1 ,0,10,5}, {2 ,0,8,5}, {3 ,0,8,5},
{4 ,0,8,5}, {5 ,0,8,5}, {6 ,0,8,5},
{7 ,0,6,5}, {8 ,0,6,5}, {9 ,0,6,5}
}
XBS_offset_time = 50
LSTAR_offset_list = {
{1 ,4,4,4}, {2 ,3,3,4}, {3 ,3,3,4},
{4 ,-3,3,4}, {5 ,-3,3,4}, {6 ,-3,3,4},
{7 ,1,3,4}, {8 ,-1,3,4}, {9 ,0,3,4},
{10,0,3,4}, {11,-1,3,4}, {12,0,3,4},
{13,0,3,4}, {14,-1,3,4}, {15,0,3,4},
{16,0,3,4}, {17,-1,3,4}, {18,0,3,4},
{19,0,3,4}, {20,-1,2,4}, {21,-1,2,4},
{22,0,2,4}, {23,0,2,4}
}
LSTAR_offset_time = 25
M600_offset_list = {
{1 ,0,3,3}, {2 ,1,2,3}, {3 ,1,2,3},
{4 ,1,2,3}, {5 ,1,2,3}, {6 ,1,2,3},
{7 ,-2,0,3}, {8 ,-1,0,3}, {9 ,-1,0,3},
{10,-1,1,3}, {11,1,1,3}, {12,1,1,3},
{13,1,1,3}, {14,2,1,3}, {15,2,0,3},
{16,1,1,3}, {17,0,1,3}, {18,0,1,3},
{19,0,1,3}, {20,1,1,3}, {21,1,0,3},
{22,1,0,3}, {23,-1,1,3}, {24,-2,1,3},
{25,-1,0,3}, {26,-1,0,3}, {27,-2,1,3},
{28,-1,1,3}, {29,-1,1,3}, {30,-1,1,3},
{31,-1,0,3}, {32,-1,0,3}, {33,-1,0,3},
{34,0,1,3}, {35,-2,1,3}, {36,1,0,3},
{37,2,1,3}, {38,2,0,3}, {39,2,1,3},
{40,1,1,3}, {41,0,1,3}, {42,0,2,3},
{43,2,0,3}, {44,2,1,3}, {45,1,1,3},
{46,-2,0,3}, {47,-2,1,3}, {48,-2,1,3},
{49,-2,1,3}, {50,-2,0,3}, {51,-2,0,3},
{52,-2,1,3}, {53,-2,2,3}, {54,-1,2,3},
{55,-1,0,3}
}
M600_offset_time = 35
R301_offset_list = {
{1,-3,4,3}, {2,0,3,3}, {3,-1,3,3},
{4,0,3,3}, {5,-1,4,3}, {6,0,3,3},
{7,-1,1,3}, {8,-1,1,3}, {9,-1,1,3},
{10,-1,1,3}, {11,-1,0,3}, {12,-1,1,3},
{13,2,1,3}, {14,2,0,3}, {15,2,1,3},
{16,2,1,3}, {17,1,1,3}, {18,1,0,3},
{19,1,0,3}, {20,1,1,3}, {21,2,0,3},
{22,2,1,3}, {23,2,0,3}, {24,-2,1,3},
{25,-3,-1,3}, {26,-3,0,3}, {27,-3,0,3},
{28,-1,0,3}
}
R301_offset_time = 20
R99_offset_list = {
{1,-1,3,5}, {2,1,2,5}, {3,0,2,5},
{4,-1,2,5}, {5,-1,3,5}, {6,-1,3,5},
{7,-1,3,5}, {8,-1,3,5}, {9,0,2,5},
{10,2,2,5}, {11,1,2,5}, {12,1,1,5},
{13,0,2,5}, {14,-2,2,5}, {15,-2,2,5},
{16,-1,1,5}, {17,3,0,5}, {18,2,0,5},
{19,2,0,5}, {20,-3,0,5}, {21,-2,-1,5},
{22,1,1,5}, {23,-3,1,5}, {24,-2,1,5},
{25,-2,1,6}, {26,-1,1,6}, {27,-1,0,6},
}
R99_offset_time = 55
ZHZ_offset_list = {
{1,1,3,5}, {2,-1,3,5}, {3,1,3,5},
{4,-1,3,5}, {5,1,3,5}, {6,-1,3,5},
{7,1,2,5}, {8,-1,2,5}, {9,1,1,5},
{10,-1,1,5}, {11,1,1,5}, {12,-1,1,5},
{13,1,1,5}, {14,-1,1,5}, {15,1,1,5},
{16,-1,1,5}, {17,1,1,5}, {18,0,1,5},
{19,1,1,5}, {20,0,1,6}, {21,1,1,5},
{22,0,1,5}, {23,1,1,5}, {24,0,1,5},
{25,1,0,5}, {26,0,1,5}, {27,0,0,5},
}
ZHZ_offset_time = 17
PX_offset_list = {
{1 ,2,5,3}, {2 ,1,4,3}, {3 ,2,4,3},
{4 ,2,4,3}, {5 ,1,3,3}, {6 ,1,3,3},
{7 ,-2,1,3}, {8 ,-2,-1,3}, {9 ,-1,-1,3},
{10,-1,1,3}, {11,0,2,3}, {12,0,2,3},
{13,2,3,3}, {14,2,1,3}, {15,2,0,3},
{16,3,0,3}, {17,2,0,3}, {18,2,5,3},
{19,0,2,3}, {20,2,2,3}, {21,3,2,3},
{22,2,2,3}, {23,-2,1,3}, {24,-3,1,3},
{25,-3,1,3}, {26,-2,1,3}, {27,-3,0,3},
{28,-3,0,3}, {29,-1,2,3}, {30,0,2,3}
}
PX_offset_time = 32
LS_offset_list = {
{1 ,1,6,3}, {2 ,2,6,3}, {3 ,2,4,3},
{4 ,0,3,3}, {5 ,2,3,3}, {6 ,0,3,3},
{7 ,0,2,3}, {8 ,0,2,3}, {9 ,1,2,3},
{10,3,2,3}, {11,2,2,3}, {12,-2,2,3},
{13,0,2,3}, {14,0,2,3}, {15,0,1,3},
{16,-4,3,3}, {17,-3,1,3}, {18,-3,1,3},
{19,-3,1,3}, {20,-3,1,3}, {21,2,3,3},
{22,2,2,3}, {23,3,2,3}, {24,3,1,3},
{25,2,2,3}, {26,0,1,3}, {27,2,1,3},
{28,-3,2,3}, {29,-3,1,3}, {30,3,2,3},
{31,-3,1,3}, {32,-2,2,3}, {33,1,1,3},
{34,0,1,3}, {35,0,1,3}
}
LS_offset_time = 22
HWK_offset_list = {
{1 ,-2,7,3}, {2 ,-2,6,3}, {3 ,0,5,3},
{4 ,0,6,3}, {5 ,0,5,3}, {6 ,0,3,3},
{7 ,1,3,3}, {8 ,1,3,3}, {9 ,2,3,3},
{10,1,3,3}, {11,-2,0,3}, {12,-2,1,3},
{13,-2,1,3}, {14,-2,0,3}, {15,-2,1,3},
{16,0,2,3}, {17,2,1,3}, {18,2,1,3},
{19,2,1,3}, {20,2,0,3}, {21,2,1,3},
{22,2,2,3}, {23,0,2,3}, {24,0,2,3},
{25,0,3,3}, {26,2,3,3}, {27,2,3,3},
{28,2,4,3}, {29,2,3,3}, {30,2,3,3},
{31,0,3,3}, {32,0,3,3}, {33,0,3,3},
{34,0,3,3}, {35,0,2,3}, {36,0,3,3}
}
HWK_offset_time = 25
ZZ_offset_list = {
{1 ,0,6,4}, {2 ,0,6,4}, {3 ,2,5,4},
{4 ,2,4,4}, {5 ,2,3,4}, {6 ,3,2,4},
{7 ,3,1,4}, {8 ,3,1,4}, {9 ,-4,0,4},
{10,-5,0,4}, {11,-3,2,4}, {12,-2,2,4},
{13,-1,1,4}, {14,0,1,4}, {15,-3,1,4},
{16,-4,0,4}, {17,-3,0,4}, {18,-3,0,4},
{19,1,1,4}, {20,-1,2,4}, {21,-1,1,4},
{22,2,2,4}, {23,2,2,4}, {24,2,1,4}
}
ZZ_offset_time = 20
DN_offset_list = {
{1 ,-1,5,4}, {2 ,0,4,4}, {3 ,0,4,4},
{4 ,0,3,4}, {5 ,-1,3,4}, {6 ,-2,3,4},
{7 ,1,3,4}, {8 ,-1,3,4}, {9 ,-1,3,4},
{10,1,2,4}, {11,1,1,4}, {12,0,1,4},
{13,3,1,4}, {14,2,0,4}, {15,-1,1,4},
{16,-2,0,4}, {17,0,1,4}, {18,0,0,4},
{19,1,1,4}, {20,0,1,4}, {21,1,1,4},
{22,1,0,4}, {23,1,0,4}, {24,1,1,4},
{25,1,0,4}, {26,0,0,4}
}
DN_offset_time = 21
P20_offset_list = {
{1 ,1,6,4}, {2 ,1,5,4}, {3 ,0,7,4},
{4 ,2,3,4}, {5 ,2,3,4}, {6 ,2,3,4},
{7 ,2,4,4}, {8 ,2,4,4}, {9 ,1,4,4},
{10,0,3,4}, {11,-1,3,4}, {12,0,4,4},
{13,1,4,4}, {14,0,4,4}, {15,1,4,4},
{16,0,3,4}, {17,0,3,4}, {18,0,3,4}
}
P20_offset_time = 35
BZ_offset_list = {
{1 ,0,4,3}, {2 ,3,4,3}, {3 ,1,4,3},
{4 ,-2,4,3}, {5 ,0,4,3}, {6 ,0,4,3},
{7 ,-2,3,3}, {8 ,-2,3,3}, {9 ,-2,4,3},
{10,-2,3,3}, {11,0,3,3}, {12,3,0,3},
{13,3,1,3}, {14,2,2,3}, {15,2,1,3},
{16,2,2,3}, {17,1,1,3}, {18,0,1,3},
{19,0,1,3}, {20,0,1,3}, {21,0,1,3},
{22,0,1,3}, {23,0,2,3}, {24,0,2,3},
{25,0,2,3}, {26,1,2,3}, {27,1,2,3},
{28,1,2,3}, {29,1,2,3}, {30,0,2,3},
{31,0,2,3}, {32,0,2,3}, {33,0,2,3},
{34,0,2,3}, {35,0,2,3}, {36,0,2,3},
{37,0,2,3}, {38,0,2,3}, {39,0,2,3},
{40,0,1,3},
}
BZ_offset_time = 61
HMLK_DD_offset_list = {
{1 ,0,7,4}, {2 ,0,7,4}, {3 ,0,5,4},
{4 ,0,5,4}, {5 ,0,5,4}, {6 ,1,4,4},
{7 ,2,5,4}, {8 ,2,4,4}, {9 ,2,4,4},
{10,1,3,4}, {11,2,3,4}, {12,1,3,4},
{13,2,3,4}, {14,1,3,4}, {15,2,2,4},
{16,1,2,4}, {17,2,2,4}, {18,1,1,4},
{19,1,2,4}, {20,-1,3,4}, {21,0,3,4},
{22,-1,2,4}, {23,-2,3,4}, {24,-2,3,4},
{25,-2,2,4}, {26,-3,1,4}, {27,-3,2,4},
{28,-2,2,4}, {29,-3,1,4}, {30,-2,1,4},
}
HMLK_DD_offset_time = 40
-----------------------------------------------------------------------------------------------
function MsSleep(n)
local t0 = GetRunningTime()
while GetRunningTime() - t0 < n do end
end
function ManualSetGun(arg1)
if(arg1 == SetGunKey_User1 )then
if(IsModifierPressed(R99_Key))then
GunSet("R99")
elseif(IsModifierPressed(R301_Key))then
GunSet("R301")
elseif(IsModifierPressed(DN_Key))then
GunSet("DN")
elseif(IsModifierPressed(M600_Key))then
GunSet("M600")
elseif(IsModifierPressed(PX_Key))then
GunSet("PX")
elseif(IsModifierPressed(RE45_Key))then
GunSet("RE45")
else
GunSet("None")
end
elseif(arg1 == SetGunKey_User2 )then
if(IsModifierPressed(ZHZ_Key))then
GunSet("ZHZ")
elseif(IsModifierPressed(ZZ_Key))then
GunSet("ZZ")
elseif(IsModifierPressed(LS_Key))then
GunSet("LS")
elseif(IsModifierPressed(LSTAR_Key))then
GunSet("LSTAR")
elseif(IsModifierPressed(HWK_Key))then
GunSet("HWK")
text_wl = text_wwl
turbo_index=0
elseif(IsModifierPressed(HWK_WL_Key))then
GunSet("HWK")
text_wl = text_ywl
turbo_index=1
else
GunSet("None")
end
end
end
function OnEvent(event, arg)
if (event == "PROFILE_ACTIVATED") then
ClearLog() end
if(version == 1)then
if(arg == SetGunKey_User1 or arg == SetGunKey_User2)then
ManualSetGun(arg)
end
end
EnablePrimaryMouseButtonEvents(true)
if (event == "MOUSE_BUTTON_PRESSED" and arg == Target) then
ClearLog()
ij = 1
clickpd = 1
sark1tb = oranlist1
sark1ta = orantime1
if turbo_index == 0 then MsSleep(437) end
click()
end
if (event == "MOUSE_BUTTON_RELEASED" and arg == Target) then
clickpd = 0
if(kg == 2) then end end
if (event == "M_RELEASED" and arg == 2 and clickpd==1) then
click()
end
end
function click()
local ismouse = true
repeat
if(ij<=getTblLen(sark1tb)) then
if(offset_state == "P20" or offset_state == "HMLK_DD" or offset_state == "XBS" or offset_state == "R301DD" or offset_state == "PXDD" or offset_state =="G7") then
ReleaseMouseButton(1)
MsSleep(20)
PressMouseButton(1)
--PressAndReleaseMouseButton(1)
end
offset = sark1tb[ij];
for var_i=1,offset[4] do
MoveMouseRelative(offset[2], offset[3])
if(offset_state == "BZ" and IsModifierPressed(boost_key))then
MsSleep(47)
else
MsSleep(sark1ta)
end
end
ij = ij + 1
else
ij = listLen + 1
end
if Logitech == "GHUB" then
ismouse = IsMouseButtonPressed(Target)
end
until not ismouse or Logitech ~= "GHUB"
if (clickpd==1 and Logitech == "LGS") then
SetMKeyState(2)
end
end
function GunSet(qx)
oranlist1,orantime1 = ToGun(qx)
end
function ToGun(qx1)
if qx1 == "R301" then
return R301_offset_list,R301_offset_time;
elseif qx1 == "ZZ" then
return ZZ_offset_list,ZZ_offset_time;
elseif qx1 == "PX" then
return PX_offset_list,PX_offset_time;
elseif qx1 == "HWK" then
return HWK_offset_list,HWK_offset_time;
elseif qx1 == "R99" then
return R99_offset_list,R99_offset_time;
elseif qx1 == "DN" then
return DN_offset_list,DN_offset_time;
elseif qx1 == "LS" then
return LS_offset_list,LS_offset_time;
elseif qx1 == "ZHZ" then
return ZHZ_offset_list,ZHZ_offset_time;
elseif qx1 == "P20" then
return P20_offset_list,P20_offset_time;
elseif qx1 == "HMLK_DD" then
return HMLK_DD_offset_list,HMLK_DD_offset_time;
elseif qx1 == "M600" then
return M600_offset_list,M600_offset_time;
elseif qx1 == "LSTAR" then
return LSTAR_offset_list,LSTAR_offset_time;
elseif qx1 == "XBS" then
return XBS_offset_list,XBS_offset_time;
elseif qx1 == "BZ" then
return BZ_offset_list,BZ_offset_time;
elseif qx1 == "RE45" then
return RE45_offset_list,RE45_offset_time;
elseif qx1 == "R301DD" then
return R301DD_offset_list,R301DD_offset_time;
elseif qx1 == "PXDD" then
return PXDD_offset_list,PXDD_offset_time;
elseif qx1 == "G7" then
return G7_offset_list,G7_offset_time;
elseif qx1 == "None" then
return None_offset_list,None_offset_time;
else return
end
end
function getTblLen(tbl)
local len = 0
for sikis, yarrak in pairs(tbl) do
len = len + 1
end
return len
end