Last active
September 19, 2024 23:36
This file contains hidden or 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
# Import things | |
import subprocess | |
import pyautogui | |
import time | |
import pydirectinput | |
from pathlib import Path | |
time.sleep(5) | |
def useEndlessAbility () : | |
roHoldKey('c',0.1) | |
def selectUnitSlotThree(): | |
roClick(959, 981) | |
def selectUnitSlotSix(): | |
roClick(1211, 981) | |
def roHoldKey(keyDown, timeDown): | |
pydirectinput.keyDown(keyDown) | |
time.sleep(timeDown) | |
pydirectinput.keyUp(keyDown) | |
time.sleep(0.1) | |
def roHover(mouseXPos, mouseYPos): | |
pydirectinput.moveTo((mouseXPos+1), (mouseYPos+1)) | |
time.sleep(0.1) | |
pydirectinput.moveTo(mouseXPos, mouseYPos) | |
time.sleep(0.1) | |
def roClick(mouseXPos, mouseYPos): | |
roHover(mouseXPos, mouseYPos) | |
pyautogui.click(x=mouseXPos, y=mouseYPos, clicks=1, interval=1, button='left') | |
time.sleep(0.1) | |
def clickAutoSkip(): | |
roClick(1031, 100) | |
def clickReconnect (): | |
roClick(1070, 610) | |
def selectTeleportMenu(): | |
roClick(156, 51) | |
def scrollAndSelectEndlessTeleport(): | |
# scrolls down to endless teleport | |
roHover(156, 156) | |
pydirectinput.scroll(-1) | |
time.sleep(0.1) | |
# clicks teleport to endless | |
roClick(154, 183) | |
def walkToendlessSquare (): | |
#walks forward towards entering endless | |
roHoldKey('w', 5) | |
#walks from the endless wall into a cubicle | |
roHoldKey('a', 0.1) | |
roHoldKey('s', 0.1) | |
def clickStartGame(): | |
roClick(983, 753) | |
time.sleep(25) | |
def placeMewingTV(): | |
selectUnitSlotSix() | |
roClick(939, 807) | |
def mewingUpgrade (): | |
roClick(939, 807) | |
roClick(120, 585) | |
def spawnToPlaceMewing(): | |
time.sleep(30) # waits for player and nessecary menus to load into lobby | |
selectTeleportMenu() | |
scrollAndSelectEndlessTeleport() | |
walkToendlessSquare() | |
clickStartGame() | |
clickAutoSkip() | |
time.sleep(15) # waits for money to afford mewing | |
placeMewingTV() | |
def clickLobby(): | |
roClick(1055, 763) | |
loopInfinite = 1 | |
# LOOP ALL THIS | |
while loopInfinite!=0: | |
loopInfinite+=1 | |
subprocess.run(["capture.bat", "out.png"]) | |
# check image | |
if loopInfinite%2==0: | |
subprocess.run(["C:\\Program Files\\Tesseract-OCR\\tesseract.exe", "out.png", "ocr", "-c", "thresholding_method=2"]) | |
else: | |
subprocess.run(["C:\\Program Files\\Tesseract-OCR\\tesseract.exe", "out.png", "ocr", "-c", "thresholding_method=0"]) | |
# if image text = restart (fortress) | |
txt = Path('ocr.txt').read_text(encoding='utf-8') | |
#click play again | |
if "ortress" in txt or "Beaten" in txt: | |
clickLobby() | |
spawnToPlaceMewing() | |
# if image text = disconnected | |
elif "connect" in txt: | |
print('string', "iscon_____", 'Found in File') | |
clickReconnect() | |
spawnToPlaceMewing() | |
else: | |
mewingUpgrade() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment