caiquan0

def wait_until_room_ready(wait_sec=50):

    for i in range(wait_sec):
        pyautogui.click(686,575)#shengji tongzhi

        pix = pyautogui.pixel(*pop_consts.UI_POS_ROOM_READY)
        if pix==pop_consts.UI_POS_ROOM_READY_COLOR:
            print('play is ready')
            return True
            
        time.sleep(1)
    
    return False
 
def auto_start(running_sec=120):
    if not wait_until_room_ready():
        print('room is not ready, return')
        return False

    mykb.press(SC_F5)
    print('start running, hold up')
    time.sleep(running_sec)
    print('checking result')
    return wait_until_rush_finish()

  
if __name__ == "__main__":
    time.sleep(5) # Time to switch to the game window
    #runLvZhou_blind() 
    for i in range(10):
        auto_start()

 

posted on 2026-05-12 09:29  PC167  阅读(15)  评论(0)    收藏  举报