Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time, os, keyboard, mouse, random, threading
- cooldown_reset = 900
- #Tutaj ustawiasz co ile sekund ma byc reset wedki ^
- yoo = 1
- def follow(thefile):
- thefile.seek(0,2)
- while True:
- line = thefile.readline()
- if not line:
- time.sleep(0.1)
- continue
- yield line
- def Convert(string):
- li = list(string.split(" "))
- return li
- def foo():
- threading.Timer(cooldown_reset, foo).start()
- keyboard.press_and_release('2')
- time.sleep(1.5)
- keyboard.press_and_release('1')
- mouse.click(button='right')
- foo()
- if __name__ == "__main__":
- logfile = open("C://Users/Kuba/AppData/Roaming/.minecraft/logs/latest.log", "r")
- loglines = follow(logfile)
- for line in loglines:
- if "Musisz wpisac" in line:
- if "aby moc lowic dalej" in line:
- x = Convert(line)
- print(x[5])
- x2 = x[5]
- keyboard.press_and_release('T')
- time.sleep(0.1)
- keyboard.write(x2)
- keyboard.press_and_release('enter')
- time.sleep(1)
- keyboard.press_and_release('2')
- time.sleep(1)
- keyboard.press_and_release('1')
- mouse.click(button='right')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement