Skip to content

Instantly share code, notes, and snippets.

@cubedtear
Last active September 4, 2020 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cubedtear/07c090d5a5c9dc5065b0a47af1b7cfcf to your computer and use it in GitHub Desktop.
Save cubedtear/07c090d5a5c9dc5065b0a47af1b7cfcf to your computer and use it in GitHub Desktop.
Bot that plays Telegram Lumberjack (https://tbot.xyz/lumber)
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)
@rango1-h
Copy link

rango1-h commented Sep 4, 2020

hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment