罗技鼠标宏 M16A4【绝地求生】

发布时间: 2017-09-10

适合M16和AK

  1. EnablePrimaryMouseButtonEvents (true)
  2. function OnEvent(event, arg, family)
  3. if (event == "PROFILE_ACTIVATED") then
  4. EnablePrimaryMouseButtonEvents(true)
  5. click = 0
  6. end
  7.  
  8. if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
  9. recoil = not recoil
  10. end
  11. if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
  12. click = 1
  13. Click()
  14. end
  15. if (event == "M_RELEASED" and arg == 3) then
  16. Click()
  17. end
  18. if (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
  19. Stopclick()
  20. end
  21. end
  22. function Click()
  23. PressAndReleaseMouseButton(1)
  24. Sleep (7)
  25. MoveMouseRelative(0, 2)
  26. if click == 0 then
  27. Stopclick()
  28. elseif click == 1 then SetMKeyState(3)
  29. else Stopclick()
  30. end
  31. end
  32. function Stopclick()
  33. click = 0
  34. end

适合M416和WZ的宏

  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4. Process, Priority, , High
  5. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  6.  
  7. _auto := true
  8.  
  9. ~LButton::autofire()
  10. F10:: ; Suspend key,beeps one when paused.
  11. Suspend, permit
  12. if (A_IsSuspended = )
  13. {
  14. TrayTip, Suspended, %A_ScriptName%, , 1
  15. SoundBeep 6000, 200
  16. }
  17. Else
  18. {
  19. TrayTip, UnSuspended, %A_ScriptName%, , 1
  20. SoundBeep 6000, 200
  21. SoundBeep 6000, 200
  22. }
  23. Suspend, Toggle
  24. Return
  25.  
  26. F12::ExitApp ; Exit key.
  27.  
  28.  
  29.  
  30. autofire()
  31.  
  32. {
  33. global _auto
  34. if _auto
  35. {
  36. Loop
  37. {
  38. if GetKeyState(, )
  39. {
  40. SendInput {LButton DownTemp}
  41. Sleep 15 ; Keypressed delay
  42. SendInput {LButton Up}
  43. moveAmount := (moveAmount = 3) ? 1 : 0 ; Recoil divider
  44. mouseXY(moveAmount,10.5)
  45.  
  46. Sleep 35 ; Non-pressed delay
  47.  
  48. }
  49. else
  50. break
  51. } ;; loop
  52. } ;; if
  53. } ;; autofire()
  54.  
  55. mouseXY(x,y)
  56. {
  57. DllCall(,uint,1,int,x,int,y,uint,0,int,0) ; Mover
  58. }

屏住呼吸开枪

  1. EnablePrimaryMouseButtonEvents (true)
  2. function OnEvent(event, arg, family)
  3. if (event == ) then
  4. EnablePrimaryMouseButtonEvents(true)
  5. click = 0
  6. end
  7.  
  8. if (event == and arg == 4) then
  9. recoil = not recoil
  10. end
  11. if (event == and arg == 1 and recoil) then
  12. click = 1
  13. Click()
  14. end
  15. if (event == and arg == 3) then
  16. Click()
  17. end
  18. if (event == and arg == 1) then
  19. Stopclick()
  20. end
  21. end
  22. function Click()
  23. PressAndReleaseMouseButton(1)
  24. Sleep (7)
  25. MoveMouseRelative(0, 2)
  26. if click == 0 then
  27. Stopclick()
  28. elseif click == 1 then SetMKeyState(3)
  29. else Stopclick()
  30. end
  31. end
  32. function Stopclick()
  33. click = 0
  34. end
  1. 1001215
    2019-05-10 20:32:31

    MoveMouseRelative(0, 2)怎么在后面实现30次定位呢

请在下方留下您的评论.加入TG吹水群