예제 #1
0
def startup(state):
    '''run once at beginning of program
    to force application into desired state for iteration
    '''
    buy_item('animal courier')
    time.sleep(0.1)
    toggle('z')
    time.sleep(1)
    buy_item('blades of attack') #('boots of speed')
    time.sleep(0.1)
    level_up('e')
    time.sleep(0.1)
    # toggle('a')
    # left_click(96, 1358)
    # right_click(796, 758)
    # time.sleep(2)
    right_click(96, 1348)
    time.sleep(10)
    center_camera_on_hero()
    time.sleep(0.1)
    say_in_chat(['-startgame'])
    time.sleep(3)
    state['start_time'] = time.time()
예제 #2
0
def attack_creep_qf(state, creep):
    right_click(creep.x+30,creep.y+60, True)
    state['last_command'] = 'last_hit'
    time.sleep(0.3) # Don't move while attacking
    clear_cursor()
    log_action(state)
예제 #3
0
def move_to_ancient(state):
    if state['last_command'] != 'forward':
        right_click(360,1100)
        state['last_command'] = 'forward'
        log_action(state)
예제 #4
0
def move_to_mid_t3(state):
    if True: #state['last_command'] != 'retreat':
        right_click(96,1348)
        state['last_command'] = 'retreat'
        log_action(state)
예제 #5
0
def attack_creep(state, creep):
    right_click(creep.x + 30 * 1080 / 1440, creep.y + 60 * 1080 / 1440)
    state['last_command'] = 'last_hit'
    time.sleep(0.8)  # Don't move while attacking
    clear_cursor()
    log_action(state)