Skip to content

Commit 8a654d4

Browse files
prototype
1 parent 8e6f93a commit 8a654d4

File tree

8 files changed

+547
-13
lines changed

8 files changed

+547
-13
lines changed

arrasbot.log

Lines changed: 516 additions & 0 deletions
Large diffs are not rendered by default.

arrasbot.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
from pathlib import Path
1111
from ping3 import ping
1212

13+
firefox = True
14+
1315
# Detect platform
1416
PLATFORM = platform.system().lower() # 'darwin' (macOS), 'linux', 'windows'
1517
print(f"Arrasbot running on: {PLATFORM}")
@@ -178,7 +180,10 @@ def start_input_listener():
178180
time.sleep(0.1)
179181
controller.tap(Key.enter)
180182
while working:
181-
p28925 = get_pixel_rgb(28, 925)
183+
if firefox:
184+
targetcolor = get_pixel_rgb(26, 930)
185+
else:
186+
targetcolor = get_pixel_rgb(28, 925)
182187
if color_close(get_pixel_rgb(1021, 716), (152, 232, 241)):
183188
disconnected = True
184189
log_file.write(f"Backroom crashed at {timestamp()}\n")
@@ -205,9 +210,9 @@ def start_input_listener():
205210
# time.sleep(0.1)
206211
# controller.release("`")
207212

208-
if (color_close(p28925, (167, 81, 68)) or color_close(p28925, (138, 27, 34)) or
209-
color_close(p28925, (201, 92, 75)) or color_close(p28925, (199, 118, 98)) or
210-
color_close(p28925, (213, 114, 93))):
213+
if (color_close(targetcolor, (167, 81, 68)) or color_close(targetcolor, (138, 27, 34)) or
214+
color_close(targetcolor, (201, 92, 75)) or color_close(targetcolor, (199, 118, 98)) or
215+
color_close(targetcolor, (213, 114, 93))):
211216
if get_pixel_rgb(686, 650) == (231, 137, 109) or get_pixel_rgb(837, 675) == (231, 137, 109):
212217
log_file.write(f"Temporarily banned at {timestamp()}\n")
213218
print(f"Temporarily banned at {timestamp()}")
@@ -249,12 +254,12 @@ def start_input_listener():
249254
for _ in range(200):
250255
mouse.click(Button.left, 1)
251256
time.sleep(pingm/1000)
252-
if color_close(p28925, (176, 100, 81)) and ((not disconnected or not died) or ((time.time() - lastdeath) > 5 and died)):
257+
if color_close(targetcolor, (176, 100, 81)) and ((not disconnected or not died) or ((time.time() - lastdeath) > 5 and died)):
253258
print(f"Checking death at {timestamp()}")
254259
log_file.write(f"Checking death at {timestamp()}\n")
255260
time.sleep(3)
256-
p28925_after = get_pixel_rgb(28, 925)
257-
if color_close(p28925_after, (176, 100, 81)) and (not disconnected and not died or ((time.time() - lastdeath) > 5 and died)):
261+
targetcolor_after = get_pixel_rgb(28, 925)
262+
if color_close(targetcolor_after, (176, 100, 81)) and (not disconnected and not died or ((time.time() - lastdeath) > 5 and died)):
258263
take_screenshot("died")
259264
log_file.write(f"[DEATH] screenshot taken at {timestamp()}\n")
260265
print(f"Died at {timestamp()}")
@@ -264,7 +269,7 @@ def start_input_listener():
264269
controller.tap(Key.enter)
265270

266271
# Reconnect detection (tolerant)
267-
if color_close(p28925, (223, 116, 90)) and (disconnected or died):
272+
if color_close(targetcolor, (223, 116, 90)) and (disconnected or died):
268273
take_screenshot("reconnected")
269274
log_file.write(f"[RECONNECTED] screenshot taken at {timestamp()}\n")
270275
print(f"Successfully reconnected at {timestamp()}")

arrasmouse.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#26, 930
2+
#28, 925
3+
from pynput.mouse import Controller
4+
Controller().position = (28, 925)

arrastools_nomacropanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def nuke():
153153
def shape():
154154
controller.press("`")
155155
controller.type("f"*500)
156-
controller.release("`")
156+
#controller.release("`")
157157

158158
def ballcrash():
159159
controller.press("`")

bps/bp.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,24 +103,33 @@ def place(queue):
103103
time.sleep(0.01)
104104
controller.release("z")
105105
time.sleep(0.01)
106+
controller.tap("x")
107+
time.sleep(0.01)
106108

107109
# Process each color group within this modifier
108110
for color in modifier_groups[modifier]:
109111
# Set color once for this group
112+
controller.tap("x")
113+
time.sleep(0.01)
110114
controller.press("c")
111115
time.sleep(0.01)
112116
exec(colorinstructions[colors.index(color)])
113117
time.sleep(0.01)
114118
controller.release("c")
115119
time.sleep(0.01)
120+
controller.tap("x")
121+
time.sleep(0.01)
116122

117123
# Place all walls with this modifier+color combination
118124
for datapoint in modifier_groups[modifier][color]:
119125
x = datapoint[2]
120126
y = datapoint[3]
121127
mouse.position = (int(x) + 404, int(y) + 179)
122128
time.sleep(0.01)
123-
controller.tap("x")
129+
controller.press("x")
130+
time.sleep(0.03)
131+
controller.release("x")
132+
time.sleep(0.01)
124133

125134
controller.release("`")
126135
time.sleep(0.01)

bps/color.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
nnnnnnnnrr
1+
nnnnnnnnnn
22
nn

bps/type.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
nnnnnnnnnn
2-
nn
2+
kk

bps/wall.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
nnnnrrrrnn
1+
nnnnnnnnnn
22
nn

0 commit comments

Comments
 (0)