Esempio n. 1
0
def battle(battle_num):
    
    sleep(3+2*random.random())

    change_battler(battle_num)

    clicklocoal_commd()
    sleep(0.631+abs(random.normalvariate(0.2, 0.1)))
    uts.checkamry()
    sleep(.631+abs(random.normalvariate(0.2, 0.1)))
    # 在左下机场下补给队

    sroll_y = 180
    while sroll_y > 0:  
        x = random.normalvariate(1300, 100)
        y = random.normalvariate(300, 30)
        pyautogui.moveTo(x, y, duration=0.25)
        dx = random.normalvariate(50, 20)
        dy = 180 + abs(random.normalvariate(50, 50))
        pyautogui.dragRel(-dx,dy,duration=1+random.random())
        sroll_y -= dy
    # 以上为屏幕下拉

    sleep(.631+abs(random.normalvariate(0.2, 0.1)))
    clickairport()
    sleep(0.531+abs(random.normalvariate(0.2, 0.1)))
    uts.checkamry()
    # 以上为在左上机场下练级队

    sleep(1.331+abs(random.normalvariate(0.2, 0.1)))
    uts.start_mission()
    sleep(4.431+abs(random.normalvariate(0.2, 0.1)))
    uts.supply(clicklocoal_commd__)
    sleep(0.431+abs(random.normalvariate(0.2, 0.1)))
    
    isload = False
    while not isload:
        isload = uts.checkisload()
        print("supplying")
        sleep(0.3)

    uts.army_back(clicklocoal_commd__,isselect=True)
    sleep(1.431+abs(random.normalvariate(0.2, 0.1)))

    uts.plainTask()
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
    clickairport()
    for aim in go_aim:
        sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
        uts.click_aim(aim, maxr=30)
    uts.start_plain()
    sleep(55+abs(random.normalvariate(10, 5)))
    while 1:
        if uts.planend(pos=(651,519)):
            print("Yes")
            break
        else:
            print("No")
            sleep(random.randint(1,3)+random.random())
    uts.restart()  # restart mission
Esempio n. 2
0
def battle():
    entry44e()
    sleep(3 + random.random())
    clicklocoal_commd()
    sleep(1 + random.random())
    uts.checkamry()

    sroll_y = 2400
    while sroll_y > 0:
        x = random.normalvariate(1300, 100)
        y = random.normalvariate(150, 30)
        pyautogui.moveTo(x, y, duration=0.25)
        dx = random.normalvariate(100, 20)
        dy = random.normalvariate(700, 50)
        pyautogui.dragRel(-dx, dy, duration=1 + random.random())
        sroll_y -= dy

    clickairport()
    sleep(1 + random.random())
    uts.checkamry()
    uts.start_mission()
    sleep(5 + 2 * random.random())

    clickairport()
    uts.plainTask()
    sleep(0.5 + random.random() / 2)
    uts.click_aim(round_aim[0], maxr=60)
    sleep(0.5 + random.random() / 2)
    uts.click_aim(round_aim[1], maxr=60)
    sleep(0.5 + random.random() / 2)

    sroll_x = 2400
    while sroll_x > 0:
        x = random.normalvariate(375, 20)
        y = random.normalvariate(555, 30)
        pyautogui.moveTo(x, y, duration=0.25)
        dx = random.normalvariate(700, 20)
        dy = random.normalvariate(100, 50)
        pyautogui.dragRel(dx, dy, duration=1 + random.random())
        sroll_x -= dx

    sleep(1 + random.random() / 2)
    uts.click_aim(round_aim[2], maxr=50)
    sleep(0.5 + random.random() / 2)
    uts.click_aim(round_aim[3], maxr=90)
    sleep(1 + random.random() / 2)

    uts.start_plain()
    print("start_plain")
    sleep(110 + abs(random.normalvariate(10, 5)))
    print("end mission")
    uts.start_mission()  # end mission
    sleep(12 + random.normalvariate(3, 1))
    print("end mission  click")
    for i in range(4):
        uts.click_aim(round_aim[3], maxr=10)
        sleep(1.5 + random.normalvariate(5, 2) / 5)
Esempio n. 3
0
def battle():

    sleep(3 + 2 * random.random())

    clicklocoal_commd()
    sleep(0.631 + abs(random.normalvariate(0.2, 0.1)))
    uts.checkamry()
    sleep(.631 + abs(random.normalvariate(0.2, 0.1)))
    clickairport()
    sleep(0.531 + abs(random.normalvariate(0.2, 0.1)))
    uts.checkamry()
    sleep(1.331 + abs(random.normalvariate(0.2, 0.1)))
    uts.start_mission()
    sleep(4.431 + abs(random.normalvariate(0.2, 0.1)))
    uts.supply(clicklocoal_commd)
    sleep(0.431 + abs(random.normalvariate(0.2, 0.1)))

    isload = False
    while not isload:
        isload = uts.checkisload()
        print("supplying")
        sleep(0.3)

    sleep(1.431 + abs(random.normalvariate(0.2, 0.1)))

    print("round 1")
    uts.plainTask()
    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))
    clicklocoal_commd()
    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))
    uts.click_aim(go_aim[0])
    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))
    uts.click_aim(go_aim[1])
    sleep(0.7 + random.random() / 2)
    uts.start_plain()
    sleep(55)
    while 1:
        print("check_out_plan")
        if planend((1104, 396)):
            print("yes")
            break
        sleep(1)
    uts.plainTask()
    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))
    for aim in back_aim:

        uts.click_aim(aim)
        sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))

    sleep(0.7 + random.random() / 2)
    uts.start_plain()
    sleep(5 + abs(random.normalvariate(0.7, 1)))
    uts.army_back(clicklocoal_commd)
    sleep(0.7 + random.random() / 2)
    uts.restart()  # restart mission
Esempio n. 4
0
def mistake(error_coor, correct_coor):
    """ 
    para: error_coor,correct_coor
    """
    if random.random() > random.normalvariate(0.96, 0.05):
        print("mistake")
        uts.click_aim(error_coor)
        sleep(0.456 + abs(random.normalvariate(0.2, 0.1)))
        uts.click_aim(correct_coor)
        sleep(0.456 + abs(random.normalvariate(0.2, 0.1)))
        uts.click_aim(error_coor)
Esempio n. 5
0
def battle(start, battle_num, fairy_state, nodelay):
    entry02()
    sleep(5 + random.random())

    start = change_battler(battle_num, start)

    sleep(1 + random.random())
    uts.start_mission()
    sleep(5 + random.random() + random.random())

    uts.supply(clickairport)
    sleep(0.431 + abs(random.normalvariate(0.2, 0.1)))
    isload = False
    while not isload:
        isload = uts.checkisload()
        print("supplying")
        sleep(0.3)

    print("round 1")
    """
    if (battle_num ==0 or fairy_state == 0) or (battle_num ==1 or fairy_state == 1):
        fairy_state = (fairy_state+1)%2
        uts.fairy(locoal_commd)
        sleep(0.656+abs(random.normalvariate(0.2, 0.1)))
    """

    sleep(0.631 + abs(random.normalvariate(0.2, 0.1)))

    uts.plainTask()

    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))
    clicklocoal_commd()
    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))

    mistake(round1_error[0], round1_aim[0])
    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))
    issroll = 0
    for step, aim in enumerate(round1_aim):
        sleep(0.5 + random.random() / 2)
        if step == 3:
            mistake(round1_error[1], aim)
            sleep(0.5 + random.random() / 2)
        uts.click_aim(aim)
        sleep(0.5 + random.random() / 2)
        if step == 0:
            sroll_y = 800
            while sroll_y > 0:
                x = random.normalvariate(1300, 100)
                y = random.normalvariate(300, 30)
                pyautogui.moveTo(x, y, duration=0.25)
                dx = random.normalvariate(50, 20)
                dy = random.normalvariate(400, 50)
                pyautogui.dragRel(-dx, dy, duration=1 + random.random())
                sroll_y -= dy

    sleep(0.5 + random.random() / 2)
    uts.start_plain()

    basic_delay = 110 + random.normalvariate(5, 10)
    print("basic_delay", basic_delay)
    sleep(basic_delay)
    print("judge round1end...")
    while 1:
        if round1end():
            print("Yes")
            break
        else:
            print("No")
            sleep(random.randint(1, 3) + random.random())

    radnum = random.random()
    print("radnum_round1", radnum)

    delaytime = 0
    if nodelay:
        radnum = 0
    if radnum > 0.999:
        delaytime = 180 + abs(random.normalvariate(20, 80))
    elif radnum > 0.9848:
        delaytime = 60 + abs(random.normalvariate(20, 40))
    elif radnum > 0.91354:
        delaytime = 40 + abs(random.normalvariate(15, 20))
    elif radnum > 0.85:
        delaytime = 20 + abs(random.normalvariate(10, 10))

    print("sleep ", delaytime)
    sleep(delaytime)

    uts.start_mission()  # end mission

    print("emeary turn")
    sleep(15 + abs(random.normalvariate(0, 2)))
    while 1:
        if round1end():
            break
        else:
            sleep(random.randint(1, 3) + random.random())
    # round 2
    print("round 2")
    sleep(random.randint(1, 3) + random.random())

    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))
    uts.plainTask()
    sleep(0.583 + abs(random.normalvariate(0.2, 0.1)))
    for aim in round2_aim:
        sleep(0.5 + random.random() / 2)
        uts.click_aim(aim)
    uts.start_plain()
    print("start plain")
    basic_delay = 60 + abs(random.normalvariate(5, 2))
    print("basic_delay", basic_delay)
    sleep(basic_delay)

    print("judge round2end...")
    while 1:
        if round2end():
            print("Yes")
            break
        else:
            print("No")
            sleep(random.randint(1, 3) + random.random())

    radnum = random.random()
    print("radnum_round2", radnum)

    delaytime = 0
    if nodelay:
        radnum = 0
    if radnum > 0.99:
        delaytime = 180 + abs(random.normalvariate(20, 80))
    elif radnum > 0.9648:
        delaytime = 60 + abs(random.normalvariate(20, 40))
    elif radnum > 0.88354:
        delaytime = 40 + abs(random.normalvariate(15, 20))
    elif radnum > 0.85:
        delaytime = 20 + abs(random.normalvariate(10, 10))

    print("sleep ", delaytime)
    sleep(delaytime)
    print("end mission")
    uts.start_mission()  # end mission
    sleep(12 + random.normalvariate(3, 1))
    print("end mission  click")
    for i in range(4):
        uts.end_click()
        sleep(0.5 + abs(random.normalvariate(2, 2) / 5))
    return start, battle_num, fairy_state
Esempio n. 6
0
def battle():
    entry01()
    sleep(3+2*random.random())
    sroll_y = 300
    while sroll_y > 0:  
        x = random.normalvariate(1300, 100)
        y = random.normalvariate(300, 30)
        pyautogui.moveTo(x, y, duration=0.25)
        dx = random.normalvariate(50, 20)
        dy = abs(random.normalvariate(sroll_y+50, 50))
        pyautogui.dragRel(-dx,dy,duration=1+random.random())
        sroll_y -= dy
    sleep(1.68+random.random()/2)
    clicklocoal_commd()
    sleep(0.431+abs(random.normalvariate(0.2, 0.1)))
    uts.checkamry()
    sleep(1.331+abs(random.normalvariate(0.2, 0.1)))
    uts.start_mission()

    #uts.supply(clickairport)
    sleep(1.431+abs(random.normalvariate(0.2, 0.1)))
    
    isload = False
    print("supplying")
    while not isload:
        isload = uts.checkisload()
        sleep(0.5)
    else:
        print("supplied")

    print("round 1")

    sleep(2.431+abs(random.normalvariate(0.2, 0.1)))
    uts.plainTask()
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
    clicklocoal_commd()
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))


    uts.click_aim(round1_aim[0])
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
    uts.start_plain()
    sleep(10)

    while 1:
        print("check_out_plan")
        if planend((1350, 150)) :
            print("yes")
            break
        sleep(1)

    sleep(2+random.random()/2)
    uts.addamry(locoal_commd)
    print("supplying")
    while not isload:
        isload = uts.checkisload()
        sleep(0.5)
    else:
        print("supplied")
    sleep(3+random.random()/2)
    uts.start_mission() # end mission

    print("emeary turn")
    sleep(5)
    while 1:
        if emeryroundend():
            print("Yes")
            break
        if uts.checkinbattle():
            sleep(0.3)
            while uts.checkinbattle():
                sleep(0.3)
            else:
                sleep(2)
                for i in range(4):
                    sleep(0.5)
                    x = random.normalvariate(900, 300)
                    y = random.normalvariate(550, 200)
                    pyautogui.moveTo(x, y, duration=0.25)
                    pyautogui.click()
                    sleep((0.383+abs(random.normalvariate(0.2, 0.1))))
        sleep(0.3)
    sleep(3.5)

    print("round 2")
    sleep(2.5)
    isload = False
    print("supplying")
    while not isload:
        isload = uts.checkisload()
        sleep(0.5)
    else:
        print("supplied")

    uts.plainTask()
    
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
    uts.click_aim(round1_aim[0])
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
    uts.click_aim(round2_aim[0])
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
    uts.click_aim(round2_aim[1])
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
    uts.click_aim(round2_aim[2])
    sleep(0.583+abs(random.normalvariate(0.2, 0.1)))
    uts.start_plain()
    sleep(25)

    while 1:
        sleep(1)
        print("check_out_plan")
        if planend((450, 298)) :
            print("yes")
            break
        

    uts.start_mission() # end mission
    sleep(12+random.normalvariate(3, 1))
    print("end mission  click")
    for i in range(4):
        uts.end_click()
        sleep(0.6+abs(random.normalvariate(2, 2)/5))
Esempio n. 7
0
def battle():
    entry24()
    sleep(5+random.random())



    sroll_y = 250
    while sroll_y > 0:  
        x = random.normalvariate(1300, 100)
        y = random.normalvariate(600, 30)
        pyautogui.moveTo(x, y, duration=0.25)
        dx = random.normalvariate(50, 20)
        dy = random.normalvariate(300, 50)
        pyautogui.dragRel(-dx,dy,duration=1+random.random())
        sroll_y -= dy

    clicklocoal_commd()
    sleep(1+random.random())
    uts.checkamry()

    sleep(1+random.random())
    uts.start_mission()
    sleep(3+2*random.random())

    isload = False
    while not isload:
        isload = uts.checkisload()
        print("supplying")
        sleep(0.3)

    print("round 1")
    clicklocoal_commd()
    uts.plainTask()
    sleep(0.5+random.random()/2)
    uts.click_aim(round_aim[0])
    sleep(0.5+random.random()/2)
    uts.click_aim(round_aim[1])
    sleep(0.5+random.random()/2)
    uts.start_plain()
    sleep(40+abs(random.normalvariate(2, 1)))

    uts.start_mission() # end mission
    print("emeary turn")
    sleep(50+abs(random.normalvariate(2, 1)))
    x = random.normalvariate(1300, 100)
    y = random.normalvariate(600, 30)
    pyautogui.moveTo(x, y, duration=0.25)
    pyautogui.click()
    sleep(10+abs(random.normalvariate(5, 3)))

    # round 2
    print("round 3")

    uts.fairy(round_aim[1])

    uts.plainTask()
    uts.click_aim(round_aim[1])
    sleep(0.5+random.random()/2)
    uts.click_aim(round_aim[2],maxr=40)
    sleep(0.5+random.random()/2)
    uts.click_aim(round_aim[3],maxr=50)
    sleep(1+random.random()/2)

    uts.start_plain()
    radnum = abs(random.normalvariate(0,1))
    print("radnum",radnum)
    if radnum>3.5:
        sleep(180+abs(random.normalvariate(10, 5)))
    elif radnum>2:
        sleep(70+abs(random.normalvariate(10, 5)))
    elif radnum>1:
        sleep(45+abs(random.normalvariate(10, 5)))
    else:
        sleep(35+abs(random.normalvariate(5, 2)))
    print("end mission")
    uts.start_mission() # end mission
    sleep(12+random.normalvariate(3, 1))
    print("end mission  click")
    for i in range(4):
        uts.end_click()
        sleep(1.5+random.normalvariate(5, 2)/5)