made better fuck you kys

This commit is contained in:
APEX FIGHT 2025-04-08 21:50:59 -04:00
parent a2c522fea2
commit 57f3767d57
6 changed files with 30 additions and 16 deletions

View File

@ -3,7 +3,10 @@
A bot for eat drywall probably idk.
Setup with `start setup.bat`.
Run with `node main`.
Run with `python start.py`.
Press "q" anywhere to quit.
Configure in "config.jsonc".

View File

@ -6,6 +6,6 @@ x = int(sys.argv[1])
y = int(sys.argv[2])
print("\n" + str(x) + str(y) + "\n")
pyautogui.moveTo(x,y, .3)
pydirectinput.moveTo(x,y, .3)
pyautogui.click(clicks=2, interval=.35)
pyautogui.moveTo(x,y, .1)
pydirectinput.moveTo(x,y)
pyautogui.click(clicks=4, interval=.1)

View File

@ -1,5 +1,5 @@
{
"iterationsPerPhoto": 3,
"iterationsPerPhoto": 6,
"photoInterval": 2,
"targetColor": {
"r": 85,

13
main.js
View File

@ -3,6 +3,7 @@ const ss = require("node-screenshots");
const proc = require("child_process");
const fs = require("fs");
let config = JSON.parse(fs.readFileSync("./config.jsonc"));
const photoInterval = config.photoInterval;
@ -17,17 +18,7 @@ setInterval(eatDrywall, photoInterval * 1000);
var readline = require('readline');
readline.emitKeypressEvents(process.stdin);
if (process.stdin.isTTY)
process.stdin.setRawMode(true);
process.stdin.on('keypress', (chunk, key) => {
if (key && key.name == 'q')
process.exit();
});
async function eatDrywall() {
@ -66,7 +57,7 @@ async function clickRandomDrywalls(hits, width, repetitions) {
let target = deRasterize(hits[click], width);//get coordinates of random pixel
console.log("Clicking: " + JSON.stringify(target));
console.log(proc.exec("python click.py " + target.x + " " + target.y).toString());
await new Promise(resolve => setTimeout(resolve, 300));
await new Promise(resolve => setTimeout(resolve, 200));
}
}
function rasterize(x, y, width) { //scale to image

View File

@ -1,4 +1,5 @@
python -m ensurepip
pip install pyautogui
pip install PyDirectInput
pip install keyboard
npm i

19
start.py Normal file
View File

@ -0,0 +1,19 @@
import subprocess
import keyboard
#async def subp():
proc = subprocess.Popen("node main")
#asyncio.run(subp())
while True:
try:
if keyboard.is_pressed('q'):
proc.kill()
exit()
except:
print("q")
proc.kill()
exit()