Advertisement
Muskar2

Auto Gifting :: Crush Crush

Feb 26th, 2016
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;This is the hotkey for starting script first time (and after reloading) - the hotkey for pausing script is in the bottom
  2. ^Y:: ; ^Y = Ctrl+Y
  3.  
  4. ;NB! All coordinates are relative to a maximized Firefox window, scrolled all the way to the top.
  5. ;If they aren't right for you, you'll have to edit them manually.
  6.  
  7. ;EDIT THE FOLLOWING (CODE)LINE FOR YOUR BROWSER'S EXACT TITLE:
  8. ;(To copy the exact title, run this script, right click the AutoHotkey icon, select "Window Spy",
  9. ;select the window with the game open, and then go directly to Windows Spy and copy it.)
  10.  
  11. if WinActive("Play Crush Crush, a free online game on Kongregate - Mozilla Firefox")
  12. {
  13.     timeleft := 2000 ;final delay after buying all gifts
  14.     delay := 40 ;delay between every click - adjust higher if your browser doesn't register all non-scrolling clicks
  15.     postScrollbarDelay := 60 ;in attempt to minimize the slips where it doesn't scroll properly
  16.  
  17.     buyShell(delay) {
  18.         Click 780, 590
  19.         Sleep, delay
  20.         Click 510, 565
  21.         Sleep, delay
  22.         Click 910, 645
  23.         Sleep, delay
  24.         return
  25.     }
  26.    
  27.     ;---------------;
  28.     ; Actual script ;
  29.     ;---------------;
  30.  
  31.     ;Scroll to top
  32.     Click down 300, 500
  33.     Click 300, 1000, 0
  34.     Click up
  35.     Sleep, 1000
  36.  
  37.     ;Scroll to fit Mio<->Elle
  38.     Click 400, 525 down
  39.     Sleep, delay
  40.     Click 400, 545 up
  41.     Sleep, delay
  42.  
  43.     ;Initial cassie select
  44.     Click 310, 520
  45.     Sleep, delay
  46.    
  47.     Loop {
  48.         buyShell(delay)
  49.        
  50.         ;Mio
  51.         Click 310, 610
  52.         Sleep, delay
  53.         buyShell(delay)
  54.        
  55.         ;Quill
  56.         Click 310, 700
  57.         Sleep, delay
  58.         buyShell(delay)
  59.        
  60.         ;Elle
  61.         Click 310, 775
  62.         Sleep, delay
  63.         buyShell(delay)
  64.  
  65.         ;Scroll to fit Iro<->Bonnibel
  66.         Click 400, 537 down
  67.         Sleep, delay
  68.         Click 400, 680 up
  69.         Sleep, postScrollbarDelay
  70.        
  71.         ;Iro
  72.         Click 310, 520
  73.         Sleep, delay
  74.         buyShell(delay)
  75.        
  76.         ;Bonnibel
  77.         Click 310, 610
  78.         Sleep, delay
  79.         buyShell(delay)
  80.  
  81.         ;Scroll back to Mio
  82.         Click 400, 680 down
  83.         Sleep, delay
  84.         Click 400, 537 up
  85.         Sleep, postScrollbarDelay
  86.        
  87.         ;Reselect Mio
  88.         Click 310, 520
  89.        
  90.         ;Wait until ready again
  91.         Sleep, timeleft
  92.    
  93.     }
  94. }
  95.  
  96. ;This is the hotkey for pausing script - has to be down here
  97. ^P::Pause  ; ^P = Ctrl+P
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement