Ejemplo n.º 1
0
def quit_battle():
    time.sleep(15)
    while True:
        time.sleep(1)
        Flag,Position = Base_func.match_template('Battlefinish_sign')
        if Flag:
            break
        Flag,Position = Base_func.match_template('Master_face')
        if Flag:
            break
    Flag,Position = Base_func.match_template('Master_face')
    if Flag:
        print(' 翻车,需要人工处理')          #翻车检测
        Serial.mouse_set_zero()
        sent_message(text='【FGO】: Encounter a battle error.')        
        sys.exit(0)
    print(' Battle finished')
    time.sleep(1)
    Flag,Position = Base_func.match_template('Rainbow_box')  #检测是否掉礼装,若掉落则短信提醒
    if Flag:
        sent_message()
    Serial.touch(986,565,6)    
    Serial.touch(235,525,2)                #拒绝好友申请
    Serial.mouse_set_zero()         #鼠标复位,防止误差累积
    print(' Quit success')
    time.sleep(1)
Ejemplo n.º 2
0
def quit_battle():
    global num_Craft
    time.sleep(15)
    while True:
        time.sleep(1)
        Flag, Position = Base_func.match_template('Battlefinish_sign')
        if Flag:
            break
        Flag, Position = Base_func.match_template('Attack_button')
        if Flag:
            break
    Flag, Position = Base_func.match_template('Attack_button')
    if Flag:
        print(' 翻车,进入补刀程序')  #翻车检测
        #Serial.mouse_set_zero()
        #sent_message(text='【FGO】: Encounter a battle error.')
        budao()
    print(' Battle finished')
    time.sleep(1)
    Flag, Position = Base_func.match_template('Rainbow_box')  #检测是否掉礼装,若掉落则短信提醒
    if Flag:
        sent_message()
        num_Craft += 1
    Serial.touch(986, 565, 6)
    Serial.touch(235, 525, 2)  #拒绝好友申请
    Serial.mouse_set_zero()  #鼠标复位,防止误差累积
    print(' Quit success')
    time.sleep(1)
 def alarm(self):
     if self.value == self.tolerant_time:
         sent_message(text='【FGO】: Encounter a fuse error.')