Advertisement
DevTricks

CS AutoShot

Sep 24th, 2020
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Threshold = 20
  2. *~$t::
  3. MouseGetPos, MouseX, MouseY
  4. PixelGetColor, Color1, (MouseX+2), (MouseY+2)
  5. StringSplit, Colorz, Color1
  6. Color1B = 0x%Colorz3%%Colorz4%
  7. Color1G = 0x%Colorz5%%Colorz6%
  8. Color1R = 0x%Colorz7%%Colorz8%
  9. Color1B += 0
  10. Color1G += 0
  11. Color1R += 0
  12.  
  13. while (GetKeyState("t", "P"))
  14.     {
  15.         BlockInput, MouseMove
  16.         sleep 1
  17.         MouseGetPos, MouseX, MouseY
  18.         PixelGetColor, Color2, (MouseX+2), (MouseY+2)
  19.         StringSplit, Colorz, Color2
  20.         Color2B = 0x%Colorz3%%Colorz4%
  21.         Color2G = 0x%Colorz5%%Colorz6%
  22.         Color2R = 0x%Colorz7%%Colorz8%
  23.         Color2B += 0
  24.         Color2G += 0
  25.         Color2R += 0
  26.         if (Color1R > (Color2R + Threshold)) or (Color1R < (Color2R - Threshold)) or (Color1G > (Color2G + Threshold)) or (Color1G < (Color2G - Threshold)) or (Color1B > (Color2B + Threshold)) or (Color1B < (Color2B - Threshold))
  27.             {
  28.                 send {LButton} ; это команда того самого клика, вместо сенда можно использовать MouseClick, left, 100, 200
  29.                    ; где 100 это координата по X, а 200 по Y
  30.             }
  31.     }
  32. BlockInput, MouseMoveOff
  33. Return
  34.  
  35. End::
  36. exitapp
  37. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement