Advertisement
hkbruvold

Candy Box 2 create X Potion

Mar 12th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5.  
  6. ; script to create the x potion in candy box 2
  7.  
  8.  
  9. ; sleep variable
  10. s := 10
  11. bc := 10 ; boil cold
  12. bh := 7000 ; boil hot
  13.  
  14. ; reference position on the letter w in "What you want to put in the cauldron"
  15. ; using position relative to window
  16. WPosX := 940
  17. WPosY := 688
  18.  
  19. candiesY := 34
  20. lolliY := 64
  21. putInY := 94
  22.  
  23. Loop
  24. {
  25. Sleep, 100
  26. if (GetKeyState("CapsLock", "T"))
  27. {
  28. ; add 4 candies
  29. Loop, 4
  30. {
  31.     MouseClick, left, WPosX, WPosY+candiesY ; select candies entry
  32.     Sleep, s
  33.     Send {Blind}1
  34.     Sleep, s
  35.     MouseClick, left, WPosX, WPosY+putInY ; add to couldron
  36.     Sleep, s
  37.     Send {Blind}b ; boil
  38.     Sleep bc
  39.     Send {Blind}s ; stop
  40.     Sleep s
  41. }
  42.  
  43. ; add 1 lollipop
  44. MouseClick, left, WPosX, WPosY+lolliY ; select lollipop entry
  45. Sleep, s
  46. Send {Blind}1
  47. Sleep, s
  48. MouseClick, left, WPosX, WPosY+putInY ; add to couldron
  49. Sleep, s
  50. Send {Blind}b ; boil
  51. Sleep, bh
  52. Send {Blind}s ; stop
  53. Sleep, s
  54. Send {Blind}p ; put in bottle
  55.  
  56.  
  57. ;Send {Blind}m ;Blind otherwise it turns off capslock for the duration of the send
  58.  
  59. }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement