Python王者荣耀刷金币

import os
import time

os.system("adb shell screencap -p /sdcard/screen.png")  # 截屏
os.system("adb pull /sdcard/screen.png")  # 保存


def click(x, y):
    return os.system(f"adb shell input tap {x} {y}")


if __name__ == '__main__':
    for i in range(60):
        print(f"进行了{i}次")
        time.sleep(4)
        click(1435, 865)
        print("开始闯关")
        print("正在加载")
        time.sleep(15)
        print("正在战斗")
        time.sleep(100)
        click(100, 100)
        time.sleep(5)
        print("再次挑战")
        time.sleep(4)
        click(1618, 998)

需要 android adb

发布了139 篇原创文章 · 获赞 24 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/mbh12333/article/details/103601545