-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRAAFK.ahk
More file actions
102 lines (85 loc) · 2.59 KB
/
Copy pathRAAFK.ahk
File metadata and controls
102 lines (85 loc) · 2.59 KB
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
#Requires AutoHotkey v2
; CONFIGURATION
; Keys to press
keys := ["W", "A", "S", "D", "Space", "I", "O", "Left", "Right"]
; Key press duration (ms)
min_press_time := 300
max_press_time := 2200
; Delay between each key press (ms)
min_key_delay := 300
max_key_delay := 800
; Delay between complete cycles (ms)
min_cycle_delay := 1500
max_cycle_delay := 4000
; Code loop
Loop
{
; Multi key press logic, max 3 keys at a time
if (Random(0, 3) = 0)
{
num_keys := Random(2, 3)
keys_to_press := []
; Select unique keys & check for duplicate keys
while (keys_to_press.Length < num_keys)
{
index := Random(1, keys.Length)
key := keys[index]
already_exists := false
for existing_key in keys_to_press
{
if (existing_key = key)
{
already_exists := true
break
}
}
if (!already_exists)
keys_to_press.Push(key)
}
; Press n release all selected keys randomly
for key in keys_to_press
{
Send("{" key " down}")
}
duration := RandInt(min_press_time, max_press_time)
Sleep duration
for key in keys_to_press
{
Send("{" key " up}")
}
; Random delay before the next cycle
cycle_delay := RandInt(min_cycle_delay, max_cycle_delay)
Sleep cycle_delay
}
else
{
; Random select single key
index := Random(1, keys.Length)
current_key := keys[index]
; Press n release keys randomly
duration := RandInt(min_press_time, max_press_time)
Send("{" current_key " down}")
Sleep duration
Send("{" current_key " up}")
key_delay := RandInt(min_key_delay, max_key_delay)
Sleep key_delay
; Extra key press for more chaos
if (Random(0, 1))
{
extra_key_index := Random(1, keys.Length)
extra_key := keys[extra_key_index]
extra_duration := RandInt(100, 400)
Send("{" extra_key " down}")
Sleep extra_duration
Send("{" extra_key " up}")
}
; Random delay before the next cycle
cycle_delay := RandInt(min_cycle_delay, max_cycle_delay)
Sleep cycle_delay
}
}
; Generate random integer
RandInt(min, max)
{
return Random(min, max)
}