import pyautogui
import time
import os
'''
# keyhold
# alt + L - Drones:Launch drone
# R - Drones:Return to drone bay
# Alt+H - Reprocessing Plant
# PointTogoX PointTogoY - point to jump in Asteroid belt
# need to install in linux next app - wmctrl
'''
def SetActiveWindow(name):
try:
time.sleep(0.1)
os.system('wmctrl -a "EVE - {}"'.format(name))
return 1
except Exception as e:
print("Window is not opened " + str(e))
return 0
#Constants
You_character_name = ''
PointComehomeX = 887
PointComehomeY = 475
PointComehomeX1 = 0
PointComehomeY1 = 0
teamViewerkillX = 1198
teamViewerkillY = 587
neut_checkX = 66
neut_checkY = 882
def killteamview():
detectteamview = os.system('wmctrl -l | grep Sponsored')
time.sleep(0.5)
if detectteamview == 256:
time.sleep(0.1)
else:
os.system('wmctrl -a "Sponsored session"')
pyautogui.moveTo(teamViewerkillX, teamViewerkillY)
time.sleep(0.5)
print("Kill this bug")
pyautogui.click()
def check_neut():
neutcheckX = neut_checkX
neutcheckY = neut_checkY
im = pyautogui.screenshot()
time.sleep(0.1)
#cheack wite color
for i in range(0, 30):
char1 = im.getpixel((neutcheckX, neutcheckY))
R = int(char1[0])
G = int(char1[1])
B = int(char1[2])
while R >= 250 and G >= 250 and B >= 250:
print("White pixel FUke")
neutcheckY = neutcheckY + 1
char1 = im.getpixel((neutcheckX, neutcheckY))
R = int(char1[0])
G = int(char1[1])
B = int(char1[2])
#print("valid")
neutcheckY = neutcheckY + 5
#cheack neutral in local
if R > G and R > B and R > 30:
print(R, G, B)
print("Neut in system i go home")
return_drone_to_board()
jump_to_home()
def jump_to_home():
time.sleep(1)
killteamview()
time.sleep(1)
if SetActiveWindow(You_character_name) == 1:
time.sleep(1)
# Way to home
PointComehomeX1 = PointComehomeX - 34
PointComehomeY1 = PointComehomeY + 47
pyautogui.moveTo(PointComehomeX, PointComehomeY)
pyautogui.click()
time.sleep(1)
pyautogui.click()
time.sleep(1)
pyautogui.moveTo(PointComehomeX1, PointComehomeY1)
time.sleep(1)
pyautogui.click()
time.sleep(1)
pyautogui.press('f2')
time.sleep(1)
pyautogui.click()
time.sleep(1)
pyautogui.press('d')
time.sleep(80)
pyautogui.press('d')
else:
print("Window is not opened")
def return_drone_to_board():
time.sleep(1)
killteamview()
time.sleep(1)
if SetActiveWindow(You_character_name) == 1:
# drone come home
time.sleep(2)
pyautogui.press('r')
time.sleep(3)
pyautogui.press('r')
else:
print("Window is not opened")
def start_working_day():
check_neut()
print("next")
time.sleep(5)
while True:
start_working_day()
import time
import os
'''
# keyhold
# alt + L - Drones:Launch drone
# R - Drones:Return to drone bay
# Alt+H - Reprocessing Plant
# PointTogoX PointTogoY - point to jump in Asteroid belt
# need to install in linux next app - wmctrl
'''
def SetActiveWindow(name):
try:
time.sleep(0.1)
os.system('wmctrl -a "EVE - {}"'.format(name))
return 1
except Exception as e:
print("Window is not opened " + str(e))
return 0
#Constants
You_character_name = ''
PointComehomeX = 887
PointComehomeY = 475
PointComehomeX1 = 0
PointComehomeY1 = 0
teamViewerkillX = 1198
teamViewerkillY = 587
neut_checkX = 66
neut_checkY = 882
def killteamview():
detectteamview = os.system('wmctrl -l | grep Sponsored')
time.sleep(0.5)
if detectteamview == 256:
time.sleep(0.1)
else:
os.system('wmctrl -a "Sponsored session"')
pyautogui.moveTo(teamViewerkillX, teamViewerkillY)
time.sleep(0.5)
print("Kill this bug")
pyautogui.click()
def check_neut():
neutcheckX = neut_checkX
neutcheckY = neut_checkY
im = pyautogui.screenshot()
time.sleep(0.1)
#cheack wite color
for i in range(0, 30):
char1 = im.getpixel((neutcheckX, neutcheckY))
R = int(char1[0])
G = int(char1[1])
B = int(char1[2])
while R >= 250 and G >= 250 and B >= 250:
print("White pixel FUke")
neutcheckY = neutcheckY + 1
char1 = im.getpixel((neutcheckX, neutcheckY))
R = int(char1[0])
G = int(char1[1])
B = int(char1[2])
#print("valid")
neutcheckY = neutcheckY + 5
#cheack neutral in local
if R > G and R > B and R > 30:
print(R, G, B)
print("Neut in system i go home")
return_drone_to_board()
jump_to_home()
def jump_to_home():
time.sleep(1)
killteamview()
time.sleep(1)
if SetActiveWindow(You_character_name) == 1:
time.sleep(1)
# Way to home
PointComehomeX1 = PointComehomeX - 34
PointComehomeY1 = PointComehomeY + 47
pyautogui.moveTo(PointComehomeX, PointComehomeY)
pyautogui.click()
time.sleep(1)
pyautogui.click()
time.sleep(1)
pyautogui.moveTo(PointComehomeX1, PointComehomeY1)
time.sleep(1)
pyautogui.click()
time.sleep(1)
pyautogui.press('f2')
time.sleep(1)
pyautogui.click()
time.sleep(1)
pyautogui.press('d')
time.sleep(80)
pyautogui.press('d')
else:
print("Window is not opened")
def return_drone_to_board():
time.sleep(1)
killteamview()
time.sleep(1)
if SetActiveWindow(You_character_name) == 1:
# drone come home
time.sleep(2)
pyautogui.press('r')
time.sleep(3)
pyautogui.press('r')
else:
print("Window is not opened")
def start_working_day():
check_neut()
print("next")
time.sleep(5)
while True:
start_working_day()