try:
raise ImageNotFoundException
gb8 = pg.locateOnScreen('new_mission_complete.png', region=(0, 0, 450, 970), confidence=0.9)
print(gb8)
pg.moveTo(gb8)
t.sleep(0.3)
pg.click(gb8)
print('gb8nmc')
y += 2
t.sleep(0.5)
except ImageNotFoundException:
print('new_mission_complete not found')
try:
for pos in pg.locateAllOnScreen('new_mission_mob.png', region=(0, 0, 450, 970), confidence = 0.7):
print(pos)
pg.moveTo(pos)
t.sleep(0.1)
pg.click(pos)
except ImageNotFoundException:
print('img nf')
t.sleep(0.5)
files = [
'new_mission_boss.png',
'new_mission_holow.png',
'1confirm.png',
'1confirm2.png',
]
for f in files:
try:
gb85 = pg.locateOnScreen(f, region=(0, 0, 450, 970), confidence=0.8)
pg.moveTo(gb85)
t.sleep(0.1)
pg.click(gb85)
except pg.ImageNotFoundException:
t.sleep(0.5)
else:
print('no image')
endm = ['new_mission_complete.png']
for e in endm:
try:
gb8 = pg.locateOnScreen(e, region=(0, 0, 450, 970), confidence=0.95)
print(gb8)
pg.moveTo(gb8)
t.sleep(0.3)
pg.click(gb8)
print('gb8nmc2')
y += 2
t.sleep(0.5)
except pg.ImageNotFoundException:
t.sleep(0.5)
else:
print('no end image')
else:
print(':(')
import time as t
print('x')
x=int(input())
print('y')
y=int(input())
print('z')
z=int(input())
print('time')
tim=int(input())
def sc(x,y,z):
print(x,y,z)
print('begining of the cycle')
ecs = z+x+y
if ecs >0:
ec(x,y,z)
else:
print('no activities found')
t.sleep(1)
print('exec. file')
frm()
def ec(x,y,z):
while x>0 or y>0 or z>0:
if x > 0:
while x>0:
print('exec.x')
x -= 1
t.sleep(1)
else:
print('skiping x')
t.sleep(1)
if y > 0:
while y>0:
print('exec.y')
y -= 1
t.sleep(1)
else:
print('skiping y')
t.sleep(1)
if z > 0:
while z>0:
print('exec.z')
z -= 1
t.sleep(1)
#ec -= 1
else:
print('skiping z')
t.sleep(1)
sc(x,y,z)
print(x,y,z)
def frm():
print('executing script')
t.sleep(3)
tmr()
def tmr():
print('waiting')
t.sleep(tim)
while True:
sc(x,y,z)