Advertisement
Guest User

Untitled

a guest
Mar 25th, 2020
1,002
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. #RequireAdmin
  2. #include <Misc.au3>
  3. If WinExists(@ScriptName) Then Exit
  4. AutoItWinSetTitle(@ScriptName)
  5. Global $Paused = 0
  6. HotKeySet("{F3}", "TogglePause")
  7. HotKeySet("{F2}", "Terminate")
  8. Local $hDLL = DllOpen("user32.dll")
  9.  
  10. While 1
  11. IsHoldingAlt()
  12. WEnd
  13.  
  14.  
  15. Func IsHoldingAlt()
  16. If _IsPressed("12", $hDLL) Then
  17. ConsoleWrite("_IsPressed - Pressed Shift." & @crlf)
  18. ; Standby cycle until the key is released.
  19.  
  20. While _IsPressed("12", $hDLL)
  21. Shoot()
  22. WEnd
  23. EndIf
  24. EndFunc
  25.  
  26.  
  27. ;you will have to update the color value in PixelSearch function to match your games colors
  28. ;take a screenshot of your game, extract the hex value of the trigger color and paste it over 0xBA0A0B in the function
  29. ;PixelSearch ( left, top, right, bottom, color [, shade-variation = 0 [, step = 1 [, hwnd]]] )
  30. Func Shoot()
  31. ;check if crosshair is white to reduce false positives such as character names
  32. Local $coord = PixelSearch(@desktopWidth / 2 - 1, @desktopHeight / 2 + 1, @desktopWidth / 2, @desktopHeight / 2 + 20, 0xDEDEDE, 30)
  33. If @error Then
  34. ;check if crosshair is red
  35. Local $coord = PixelSearch(@desktopWidth / 2 - 1, @desktopHeight / 2 + 1, @desktopWidth / 2, @desktopHeight / 2 + 20, 0xE57F72, 50)
  36. If Not @error Then
  37. MouseClick("Left")
  38. EndIf
  39. EndIf
  40. EndFunc
  41.  
  42.  
  43. ;function to pause the script
  44. Func TogglePause()
  45. $Paused = Not $Paused
  46. While $Paused
  47. Sleep(100)
  48. WEnd
  49. ToolTip("")
  50. EndFunc
  51.  
  52.  
  53. ;function to exit the script
  54. Func Terminate()
  55. Exit 0
  56. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement