def Skill(): PressKey(Z) PressKey(X) time.sleep(0.1) ReleaseKey(Z) ReleaseKey(X) time.sleep(0.01)
def Mid_Jump(): PressKey(C) time.sleep(0.2) PressKey(X) time.sleep(0.2) ReleaseKey(X) ReleaseKey(C)
def Attack_Down(): PressKey(DOWN_ARROW) PressKey(X) time.sleep(0.05) ReleaseKey(X) ReleaseKey(DOWN_ARROW) time.sleep(0.01)
def Attack_Up(): # print("Attack up--->") PressKey(UP_ARROW) PressKey(X) time.sleep(0.05) ReleaseKey(X) ReleaseKey(UP_ARROW) time.sleep(0.01)
def Short_Jump(): PressKey(C) PressKey(DOWN_ARROW) PressKey(X) time.sleep(0.2) ReleaseKey(X) ReleaseKey(DOWN_ARROW) ReleaseKey(C)
def Rush(): PressKey(L_SHIFT) time.sleep(0.1) ReleaseKey(L_SHIFT) Nothing() PressKey(X) time.sleep(0.03) ReleaseKey(X)
def Skill_Down(): PressKey(DOWN_ARROW) PressKey(Z) PressKey(X) time.sleep(0.2) ReleaseKey(X) ReleaseKey(DOWN_ARROW) ReleaseKey(Z) Nothing() time.sleep(0.3)
def Skill_Up(): PressKey(UP_ARROW) PressKey(Z) PressKey(X) time.sleep(0.15) ReleaseKey(UP_ARROW) ReleaseKey(Z) ReleaseKey(X) Nothing() time.sleep(0.15)
def Skill_Up(): PressKey(UP_ARROW) PressKey(Z) PressKey(X) time.sleep(0.3) ReleaseKey(UP_ARROW) ReleaseKey(Z) ReleaseKey(X) time.sleep(0.1) PressKey(X) time.sleep(0.1) ReleaseKey(X) time.sleep(0.1)
def Skill_Down(): PressKey(DOWN_ARROW) PressKey(Z) PressKey(X) time.sleep(0.2) ReleaseKey(X) ReleaseKey(DOWN_ARROW) ReleaseKey(Z) for i in range(2): time.sleep(0.1) PressKey(X) time.sleep(0.15) ReleaseKey(X) time.sleep(0.01)
def restart(): station_size = (230, 230, 1670, 930) while True: station = cv2.resize( cv2.cvtColor(grab_screen(station_size), cv2.COLOR_RGBA2RGB), (1000, 500)) if station[187][300][0] != 0: time.sleep(1) else: break time.sleep(1) Look_up() time.sleep(1.5) Look_up() time.sleep(1) while True: station = cv2.resize( cv2.cvtColor(grab_screen(station_size), cv2.COLOR_RGBA2RGB), (1000, 500)) if station[187][612][0] > 200: # PressKey(DOWN_ARROW) # time.sleep(0.1) # ReleaseKey(DOWN_ARROW) PressKey(C) time.sleep(0.1) ReleaseKey(C) break else: Look_up() time.sleep(0.2)
def Move_Left(): PressKey(LEFT_ARROW) time.sleep(0.01)
def Look_up(): PressKey(UP_ARROW) time.sleep(0.1) ReleaseKey(UP_ARROW)
def Cure(): PressKey(A) time.sleep(1.4) ReleaseKey(A) time.sleep(0.1)
def Mid_Jump(): PressKey(C) time.sleep(0.5) ReleaseKey(C) time.sleep(0.05)
def Turn_Right(): PressKey(RIGHT_ARROW) time.sleep(0.01) ReleaseKey(RIGHT_ARROW)
def Attack(): PressKey(X) time.sleep(0.05) ReleaseKey(X) time.sleep(0.01)
def Move_Right(): ReleaseKey(LEFT_ARROW) PressKey(RIGHT_ARROW) time.sleep(0.01)
def Rush(): PressKey(L_SHIFT) time.sleep(0.25) ReleaseKey(L_SHIFT) time.sleep(0.05)
def Move_Right(): PressKey(RIGHT_ARROW) time.sleep(0.01)
def Turn_Left(): PressKey(LEFT_ARROW) time.sleep(0.01) ReleaseKey(LEFT_ARROW)
def Move_Left(): ReleaseKey(RIGHT_ARROW) time.sleep(0.03) PressKey(LEFT_ARROW) time.sleep(0.02)
def Attack(): PressKey(X) time.sleep(0.15) ReleaseKey(X) Nothing() time.sleep(0.01)
def Short_Jump(): PressKey(C) time.sleep(0.1) ReleaseKey(C) time.sleep(0.05)