Skip to content

Instantly share code, notes, and snippets.

@KoMinkyu
Created January 19, 2016 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KoMinkyu/18b36b0861ef53b43ab9 to your computer and use it in GitHub Desktop.
Save KoMinkyu/18b36b0861ef53b43ab9 to your computer and use it in GitHub Desktop.
용구용구 ADB script
import subprocess
import time
adb_tap_command = ['./adb', 'shell', 'input', 'tap']
adb_tap_command = ['input', 'tap']
f_skill_position = ['107', '1190']
s_skill_position = ['284', '1190']
t_skill_position = ['445', '1190']
character_skill_position = ['107', '1407']
upgrade_position = ['1279', '1808']
def click_first_skill():
subprocess.Popen(adb_tap_command + f_skill_position, stdout=subprocess.PIPE)
def click_second_skill():
subprocess.Popen(adb_tap_command + s_skill_position, stdout=subprocess.PIPE)
def click_third_skill():
subprocess.Popen(adb_tap_command + t_skill_position, stdout=subprocess.PIPE)
def click_character_skill():
subprocess.Popen(adb_tap_command + character_skill_position, stdout=subprocess.PIPE)
def click_upgrade():
subprocess.Popen(adb_tap_command + upgrade_position, stdout=subprocess.PIPE)
time_now = time.time()
click_first_skill()
click_second_skill()
click_third_skill()
time_last_f_skill_clicked = time_now - 5 * 60
time_last_s_skill_clicked = time_now - 5 * 60
time_last_t_skill_clicked = time_now - 10 * 60
while True:
click_character_skill()
click_upgrade()
if (time_last_f_skill_clicked + (60 * 15) + 60 >= time.time()):
click_first_skill()
if (time_last_s_skill_clicked + (60 * 30) + 120 >= time.time()):
click_second_skill()
if (time_last_t_skill_clicked + (60 * 60) + 300 >= time.time()):
click_third_skill()
time.sleep(1.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment