设备:1920*1080
系统:Windows11
程序:CircuitPython
英雄:琴女
功能:
自动释放加血自动释放攻击自动对线
import timeimport usb_hidimport boardimport digitaliofrom adafruit_hid.mouse import Mousefrom adafruit_hid.keyboard import Keyboardfrom adafruit_hid.keycode import Keycodeimport circuitpython_schedule as schedulemouse = Mouse(usb_hid.devices)kbd = Keyboard(usb_hid.devices)led = digitalio.DigitalInOut(board.GP25)led.direction = digitalio.Direction.OUTPUTj = 6i = 1led.value = False# time.sleep(3)# LED闪烁def Blinking():led.value = Truetime.sleep(1)led.value = False# 鼠标归位def CursorCenter():mouse.move(x = -3000) # 左mouse.move(y = -3000) # 上mouse.move(x = 383) # 右mouse.move(y = 259) # 下# 寻找对局def Find_a_Match():CursorCenter()mouse.click(Mouse.LEFT_BUTTON) # 给队友点赞mouse.move(x = -55)mouse.move(y = 91)time.sleep(1)mouse.click(Mouse.LEFT_BUTTON) # xxxtime.sleep(1)mouse.click(Mouse.LEFT_BUTTON) # 再来一局time.sleep(0.1)mouse.click(Mouse.LEFT_BUTTON) # 再来一局time.sleep(1)mouse.click(Mouse.LEFT_BUTTON) # 寻找对局time.sleep(0.1)mouse.click(Mouse.LEFT_BUTTON) # 寻找对局# 加入战斗def Join_the_battle():Find_a_Match()mouse.move(x = 50)mouse.move(y = -44)kk = 0while kk < 30:time.sleep(1)mouse.click(Mouse.LEFT_BUTTON) # 参加战斗kk += 1# 选择英雄def SelectSummoner():Join_the_battle()CursorCenter()mouse.move(x = 102)mouse.move(y = -19)mouse.click(Mouse.LEFT_BUTTON) # 选择time.sleep(0.5)mouse.click(Mouse.LEFT_BUTTON) # 选择time.sleep(0.5)mouse.click(Mouse.LEFT_BUTTON) # 选择time.sleep(1)mouse.move(x = -80)mouse.move(y = 85)time.sleep(1)mouse.click(Mouse.LEFT_BUTTON) # 锁定time.sleep(0.5)mouse.click(Mouse.LEFT_BUTTON) # 锁定time.sleep(0.5)CursorCenter()# 购买装备def Equipment():CursorCenter()time.sleep(0.2)kbd.send(Keycode.P)mouse.move(x = -300)mouse.move(y = 25)mouse.click(Mouse.LEFT_BUTTON)time.sleep(0.2)mouse.click(Mouse.LEFT_BUTTON)CursorCenter()mouse.move(x = -277)mouse.move(y = -65)time.sleep(0.3)mouse.click(Mouse.LEFT_BUTTON)mouse.click(Mouse.LEFT_BUTTON)time.sleep(0.3)mouse.move(y = 97)time.sleep(0.3)mouse.click(Mouse.LEFT_BUTTON)mouse.click(Mouse.LEFT_BUTTON)time.sleep(0.3)mouse.move(y = 53)time.sleep(0.3)mouse.click(Mouse.LEFT_BUTTON)mouse.click(Mouse.LEFT_BUTTON)time.sleep(0.3)kbd.send(Keycode.P)# 跟随def Follow():global iglobal jif i == 2:kbd.press(Keycode.F2)elif i == 3:kbd.press(Keycode.F4)elif i == 4:kbd.press(Keycode.F3)elif i == 5:kbd.press(Keycode.F5)else:kbd.press(Keycode.F5)CursorCenter()j = j*(-1)mouse.move(x = j)j = j*(-1)mouse.click(Mouse.LEFT_BUTTON)mouse.move(y = j)j = j*(-1)time.sleep(0.01)mouse.click(Mouse.RIGHT_BUTTON)time.sleep(0.01)kbd.release_all()# 升级技能def Upgrade():kbd.send(Keycode.CONTROL, Keycode.W)time.sleep(0.01)kbd.send(Keycode.CONTROL, Keycode.E)time.sleep(0.01)kbd.send(Keycode.CONTROL, Keycode.Q)time.sleep(0.01)kbd.send(Keycode.CONTROL, Keycode.R)time.sleep(0.01)# 切换跟随def Swith():global ii += 1# 释放技能Wdef ReleaseW():kbd.send(Keycode.W)# 释放技能Qdef ReleaseE():kbd.send(Keycode.E)# Ddef TreatD():kbd.send(Keycode.D)# Fdef TreatF():kbd.send(Keycode.F)# schedule every 1 secondsschedule.every(0.9).seconds.do(Follow)schedule.every(60).seconds.do(ReleaseW)schedule.every(10).seconds.do(ReleaseE)schedule.every(4).seconds.do(Upgrade)schedule.every(10).seconds.do(TreatD)schedule.every(10).seconds.do(TreatF)schedule.every(60*5).seconds.do(Swith)schedule.every(60*22).seconds.do(SelectSummoner)# schedule.every(20).seconds.do(Equipment)SelectSummoner()while True:schedule.run_pending()time.sleep(0.1)
欢迎评论