Last active
September 4, 2020 19:04
-
-
Save cubedtear/07c090d5a5c9dc5065b0a47af1b7cfcf to your computer and use it in GitHub Desktop.
Bot that plays Telegram Lumberjack (https://tbot.xyz/lumber)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep # Bot for https://tbot.xyz/lumber | |
from mss import mss | |
from pyautogui import press | |
actions = ['left'] | |
sleep(2) | |
with mss() as sct: | |
while True: | |
color = sct.grab({'top': 440, 'width': 4, 'left': 517, 'height': 150}).rgb | |
actions.append('left' if any(map(lambda x: color[x] > max(color[x+1:x+2]), range(0, len(color), 3))) else 'right') | |
action = actions.pop(0) | |
press(action) | |
sleep(0.06) | |
press(action) | |
sleep(0.076) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi