Advertisement
Der3_Al3arab

Pet Catchers - AFK Claw Machine Minigame

Mar 22nd, 2024 (edited)
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; This macro is made by Der3_Al3arab.
  2. ; This macro is made to work on either fullscreen or a maximized window.
  3. ; To start this macro press F1 and if you want to stop it press F1 again and wait a few seconds for it to finish the rest of the code.
  4. ; Make sure you have followed all the steps and did them correctly or the macro won't work properly.
  5. ; If you are experiencing any problems re-check the variables values.
  6. ; IMPORTANT: This macro is made to work on a fixed window size, if you changed the window size you will probably have to re-enter the variables values.
  7. ; IMPORTANT: if your Ping is high or your FPS is low, the macro will most likely miss the prize.
  8. ; If you are experiencing any problem DM me on either Twitter or Discord (@Der3_Al3arab)
  9.  
  10. ; Ignore these 4 lines.
  11. #MaxThreadsPerHotKey, 2
  12. Toggle := 0
  13. BottomRightX := A_ScreenWidth - 1
  14. BottomRightY := A_ScreenHeight - 1
  15.  
  16.  
  17. ; Set the value of this to 0 if you DON'T want it to use all of your Tickets. Set it to 1 if you want it to use ALL of your Tickets.
  18. ; If you set it to 0, you will have to start the macro during the countdown when starting the minigame.
  19. ; If you set it to 1, you will have to start the macro in front of the claw machine and it will start the minigame by itself.
  20. UseAllTickets := 1
  21.  
  22. ; The coordinates of the "Drop" button in the claw machine minigame.
  23. DropButtonX :=
  24. DropButtonY :=
  25.  
  26. ; The coordinates of the first pet in the pet selection UI
  27. PetToUseX :=
  28. PetToUseY :=
  29.  
  30.  
  31.  
  32. F1::
  33. Toggle := !Toggle
  34. if (UseAllTickets) {
  35.     While (Toggle) {
  36.     Send, E
  37.     Sleep, 250
  38.     PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0x43EA37, 1, fast, RGB
  39.     While (Toggle && !tapX) {
  40.         Send, E
  41.         Sleep, 250
  42.         PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0x43EA37, 1, fast, RGB
  43.     }
  44.  
  45.     if (Toggle) {
  46.         MouseMove, tapX, tapY, 2
  47.         Sleep, 111
  48.         MouseMove, 10, 10, 2, R
  49.         Sleep, 111
  50.         Click,
  51.         Sleep, 250
  52.     }
  53.  
  54.     if (Toggle) {
  55.         MouseMove, PetToUseX, PetToUseY, 2
  56.         Sleep, 111
  57.         Click,
  58.         Sleep, 250
  59.     }
  60.  
  61.     PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0xFB79FF, 3, fast, RGB
  62.     While (Toggle && !tapX) {
  63.         Sleep, 111
  64.         PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0xFB79FF, 3, fast, RGB
  65.     }
  66.  
  67.     if (Toggle) {
  68.         MouseMove, tapX, tapY, 2
  69.         Sleep, 111
  70.         MouseMove, 10, 10, 2, R
  71.         Sleep, 111
  72.         Click,
  73.         Sleep, 250
  74.     }
  75.  
  76.     PixelSearch, tapX1, tapY1, 0, 0, BottomRightX, BottomRightY, 0xFF00FF, 3, fast, RGB
  77.     While (Toggle && !tapX1) {
  78.         Sleep, 25
  79.         PixelSearch, tapX1, tapY1, 0, 0, BottomRightX, BottomRightY, 0xFF00FF, 3, fast, RGB
  80.     }
  81.     MouseMove, DropButtonX, DropButtonY, 2
  82.  
  83.     While (Toggle && tapX1) {
  84.         Loop 50{
  85.             PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0x59FD3E, 3, fast, RGB
  86.             if(Toggle && tapX) {
  87.                 Click,
  88.             }
  89.             Sleep, 10
  90.         }
  91.         PixelSearch, tapX1, tapY1, 0, 0, BottomRightX, BottomRightY, 0xFF00FF, 3, fast, RGB
  92.     }
  93.  
  94.     PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0xFF4646, 3, fast, RGB
  95.     While (Toggle && !tapX) {
  96.         Sleep, 111
  97.         PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0xFF4646, 3, fast, RGB
  98.     }
  99.  
  100.     if (Toggle) {
  101.         MouseMove, tapX, tapY, 2
  102.         Sleep, 111
  103.         MouseMove, 5, 5, 2, R
  104.         Sleep, 111
  105.         Click,
  106.         Sleep, 250
  107.     }
  108.  
  109.     Sleep, 1000
  110.  
  111.     PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0xFF4646, 3, fast, RGB
  112.     if (Toggle && tapX) {
  113.         MouseMove, tapX, tapY, 2
  114.         Sleep, 111
  115.         MouseMove, 5, 5, 2, R
  116.         Sleep, 111
  117.         Click,
  118.         Sleep, 250
  119.     }
  120.      
  121.     }
  122. } else {
  123.     MouseMove, DropButtonX, DropButtonY, 2
  124.     While (Toggle) {
  125.         PixelSearch, tapX, tapY, 0, 0, BottomRightX, BottomRightY, 0x59FD3E, 3, fast, RGB
  126.         if(tapX) {
  127.             Click,
  128.         }
  129.         Sleep, 25
  130.     }
  131. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement