Advertisement
Guest User

ah;

a guest
May 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #NoEnv
  2. SendMode, Input
  3. SetBatchLines -1
  4. CoordMode, Mouse, Screen
  5.  
  6. mouseXY(x, y)
  7. {
  8. DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
  9. }
  10.  
  11. strafe(left)
  12. {
  13. moveCount := 45
  14. sleepInterval := 1
  15. relativeMove := 35
  16.  
  17. if (left)
  18. {
  19. key := "d"
  20. move := relativeMove
  21. } else
  22. {
  23. key := "a"
  24. move := -relativeMove
  25. }
  26. send {%key% down}
  27. DllCall("Sleep", "UInt", 5)
  28. Loop, %moveCount%
  29. {
  30. mouseXY(move, -(move/4))
  31. DllCall("Sleep", "UInt", sleepInterval)
  32. }
  33. send {%key% up}
  34. }
  35.  
  36. $xbutton1::
  37. while getkeystate("xbutton1","P")
  38. {
  39. strafe(true)
  40. strafe(false)
  41. }
  42. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement