Advertisement
Guest User

Untitled

a guest
Oct 15th, 2017
1,539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. Esc::ExitApp
  2. r::Reload
  3.  
  4. a::
  5. Process, priority, , High
  6.  
  7. loop {
  8.  
  9. i = 1
  10.  
  11. ; jump intervals
  12. a = 667
  13. b = 532
  14. c = 467
  15. d = 433
  16. e = 383
  17. ; f = not needed since 200-300 can be done with a single interval
  18.  
  19. g = 400
  20. g2 = 401
  21.  
  22. delay = 100
  23. balancer = 0
  24. currentInterval := a
  25. extraTime = 0
  26.  
  27. ToolTip, start, 400, 400
  28.  
  29. ; Initiate steps to begin
  30. Send {Enter down} ; Press down the Enter key.
  31. DllCall("Sleep", "Uint", 100)
  32. Send {Enter up} ; Release Enter key.
  33. Sleep, 2000
  34. Send {Enter down} ; Press down the Enter key.
  35. DllCall("Sleep", "Uint", 100)
  36. Send {Enter up} ; Release Enter key.
  37. Sleep, 3000
  38. Send {Enter down} ; Press down the Enter key.
  39. DllCall("Sleep", "Uint", 100)
  40. Send {Enter up} ; Release Enter key.
  41.  
  42. ; Detect 1st jump
  43. Loop {
  44. PixelSearch, x, y, 592, 514, 592, 514, 0xA1825D, 20, Fast RGB
  45. If (ErrorLevel = 0) {
  46. sleep, 800
  47. break
  48. }
  49. }
  50.  
  51. start := A_TickCount + 50
  52.  
  53. loop
  54. {
  55. ; Detect if failed and back at the start to retry
  56. PixelSearch, x, y, 643, 487, 643, 487, 0x3E5E78, 20, Fast RGB
  57. If (ErrorLevel = 0) { ; reset
  58. sleep, 3000
  59. Send {Enter down} ; Press down the Enter key.
  60. DllCall("Sleep", "Uint", 100)
  61. Send {Enter up} ; Release Enter key.
  62. sleep, 2000
  63. break
  64. }
  65.  
  66. ; Manual override
  67. GetKeystate, state, Enter
  68. if (state = "D" and stop = 0)
  69. {
  70. break
  71. }
  72.  
  73. timer := A_TickCount - start
  74.  
  75. if (i = 1) {
  76. currentInterval := a
  77. } else if (i = 21) {
  78. currentInterval := b
  79. balancer = 0
  80. } else if (i = 51) {
  81. currentInterval := c
  82. balancer = 0
  83. } else if (i = 101) {
  84. currentInterval := d
  85. balancer = 0
  86. } else if (i = 201) {
  87. extraTime = 0
  88. delay = 70
  89. currentInterval := e
  90. balancer = 0
  91. } else if (i = 260) {
  92. extraTime = 20
  93. balancer = 0
  94. } else if (i = 301) {
  95. currentInterval := g
  96. balancer = 0
  97. } else if (i = 500 or i = 800) {
  98. currentInterval := g2
  99. } else if (i = 600 or i = 900) {
  100. currentInterval := g
  101. } else if (i => 1001) {
  102. if (Mod(i,2) = 0) {
  103. currentInterval := g
  104. } else {
  105. currentInterval := g2
  106. }
  107. }
  108.  
  109. if(i > 1) {
  110. DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))
  111. }
  112. Gosub, jump
  113. }
  114. }
  115. return
  116.  
  117. jump:
  118. fullTime := A_TickCount - start - extraTime
  119. start := A_TickCount
  120. if(i > 1) {
  121. balancer += currentInterval - fullTime
  122. }
  123. ToolTip, %i% - %fullTime%, 400, 400
  124. Send {Enter down} ; Press down the Enter key.
  125. DllCall("Sleep", "Uint", delay)
  126. Send {Enter up} ; Release Enter key.
  127. ToolTip
  128. i += 1
  129. extraTime = 0
  130. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement