Ejemplo n.º 1
0
 def do(self, event):
     if eventtime.is_event_time():
         time.sleep(5)
         return False
     else:
         winkey.send_key(winkey.VK_CODE['q'])
     return True
Ejemplo n.º 2
0
Archivo: auto.py Proyecto: nnnlife/auto
def is_hunting_available(h):
    if eventtime.is_event_time():
        return False

    if datetime.datetime.now().hour is not h.get_last_no_ticket_time().hour:
        return True

    return False
Ejemplo n.º 3
0
Archivo: auto.py Proyecto: nnnlife/auto
                else:
                    found = False
                    for i, p in enumerate(players):
                        if screen.army_exists(current_screen, p.base_area()):
                            p.player_waiting_reset()
                            miners[i].set_wait_status(p)
                            found = True

                    if not found:
                        if not BLOCK_HUNTING and is_hunting_available(hunter):
                            print("START HUNTING")
                            hunt = hunting.Hunting(hunter.reset())
                            time.sleep(0.1)
                        else:
                            print("SLEEP")
                            if not eventtime.is_event_time():
                                time.sleep(5)
                                winkey.send_key(winkey.VK_CODE['o'])
                                time.sleep(5)
                                current_screen = win.capture()
                                if screen.is_time_reward(current_screen):
                                    winkey.send_key(winkey.VK_CODE['r'])
                                    time.sleep(6)
                                    winkey.send_key(winkey.VK_CODE['r'])
                                    time.sleep(5)
                                    winkey.send_key(winkey.VK_CODE['o'])
                                else:
                                    winkey.send_key(winkey.VK_CODE['o'])

                            time.sleep(random.randint(10, 20))
            else: