Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.49 KB | None | 0 0
  1. #include bezier_main.ahk
  2.  
  3. click_random()
  4. {
  5. global color
  6. global MouseyX
  7. global MouseyY
  8. global start_posit_x
  9. global start_posit_y
  10. global end_posit_x
  11. global end_posit_y
  12.  
  13.  
  14. click down
  15. Random, KKaper,-3,3
  16. Random,KKona,-3,3
  17. Random, TriHard,-3,3
  18. Random,cmonBruh,-3,3
  19. Random, rand,100,300
  20. RandomBezier( (start_posit_x+KKaper),(start_posit_y+KKona), (end_posit_x+TriHard),(end_posit_y+cmonBruh), "T"rand "P8 OT0 OB0 OL0 OR0")
  21. sleep 100
  22.  
  23. PixelGetColor, runtimecolor, %MouseyX%, %MouseyY%
  24. if(runtimecolor=color)
  25. {
  26. click
  27. }
  28. else
  29. {
  30. sleep 100
  31. if(runtimecolor=color)
  32. {
  33. click
  34. }
  35. else
  36. {
  37. sleep 100
  38. if(runtimecolor=color)
  39. {
  40. click
  41. }
  42. else
  43. {
  44. sleep 100
  45. if(runtimecolor=color)
  46. {
  47. click
  48. }else
  49. {sleep 100
  50. if(runtimecolor=color)
  51. {
  52. click
  53. }else
  54. {sleep 100
  55. if(runtimecolor=color)
  56. {
  57. click
  58. }else
  59. {sleep 100
  60. if(runtimecolor=color)
  61. {
  62. click
  63. }else
  64. {sleep 100
  65. if(runtimecolor=color)
  66. {
  67. click
  68. }else
  69. {sleep 100
  70. if(runtimecolor=color)
  71. {
  72. click
  73. }
  74. else
  75. {
  76. sleep 100
  77. if(runtimecolor=color)
  78. {
  79. click
  80. }else
  81. {
  82. sleep 100
  83. if(runtimecolor=color)
  84. {
  85. click
  86. }else
  87. {
  88. sleep 100
  89. if(runtimecolor=color)
  90. {
  91. click
  92. }else
  93. {
  94. sleep 100
  95. if(runtimecolor=color)
  96. {
  97. click
  98. }else
  99. {
  100. sleep 100
  101. if(runtimecolor=color)
  102. {
  103. click
  104. }else
  105. {
  106. sleep 100
  107. if(runtimecolor=color)
  108. {
  109. click
  110. }else
  111. {
  112. sleep 100
  113. if(runtimecolor=color)
  114. {
  115. click
  116. }else
  117. {
  118. sleep 100
  119. if(runtimecolor=color)
  120. {
  121. click
  122. }else
  123. {
  124. sleep 100
  125. if(runtimecolor=color)
  126. {
  127. click
  128. }else
  129. {
  130. sleep 100
  131. if(runtimecolor=color)
  132. {
  133. click
  134. }else
  135. {
  136. sleep 100
  137. if(runtimecolor=color)
  138. {
  139. click
  140. }else
  141. {
  142. sleep 100
  143. if(runtimecolor=color)
  144. {
  145. click
  146. }else
  147. {
  148. sleep 100
  149. if(runtimecolor=color)
  150. {
  151. click
  152. }else
  153. {
  154. sleep 100
  155. if(runtimecolor=color)
  156. {
  157. click
  158. }else
  159. {
  160. sleep 100
  161. if(runtimecolor=color)
  162. {
  163. click
  164. }else
  165. {
  166. sleep 100
  167. if(runtimecolor=color)
  168. {
  169. click
  170. }else
  171. {
  172. sleep 100
  173. if(runtimecolor=color)
  174. {
  175. click
  176. }
  177. else
  178. {
  179. SoundPlay, error.WAV
  180. MsgBox,0,,out of sync pausing script color:%color% runtime color:%runtimecolor%
  181. pause
  182. }}}}}}}}}}}}}}}}}}}}}}}}}}
  183. Random, KKaper,-3,3
  184. Random,KKona,-3,3
  185. Random, TriHard,-3,3
  186. Random,cmonBruh,-3,3
  187. RandomBezier((end_posit_x+KKaper),(end_posit_y+KKona),(start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"rand "P8 OT0 OB0 OL0 OR0")
  188. sleep 100
  189. click
  190. }
  191.  
  192. sleep_random(time_msec, range_msec = 100)
  193. {
  194. global exit_flag
  195.  
  196. time_start := A_TickCount
  197. Random, rand, -%range_msec%, %range_msec%
  198. time_msec := time_msec + rand
  199.  
  200. loop
  201. {
  202. sleep 100
  203. MouseGetPos, xnew, ynew
  204.  
  205. if (exit_flag)
  206. {
  207. exit_script()
  208. }
  209.  
  210. if (time_msec < (A_TickCount - time_start + 100))
  211. {
  212. st = time_msec - (A_TickCount - time_start)
  213. sleep %st%
  214. return
  215. }
  216. }
  217. }
  218. init_start_position()
  219. {
  220. global start_posit_x
  221. global start_posit_y
  222.  
  223. MouseGetPos,start_posit_x_t,start_posit_y_t
  224. start_posit_x:=start_posit_x_t
  225. start_posit_y:=start_posit_y_t
  226. }
  227. init_end_position()
  228. {
  229. global end_posit_x
  230. global end_posit_y
  231. MouseGetPos,end_posit_x_t,end_posit_y_t
  232. end_posit_x:=end_posit_x_t
  233. end_posit_y:=end_posit_y_t
  234. }
  235. init_color_pixel()
  236. {
  237. global color
  238. global MouseyX
  239. global MouseyY
  240. MouseGetPos, MouseyX, MouseyY
  241. PixelGetColor, color, %MouseyX%, %MouseyY%
  242. MsgBox,0,,%color%
  243. }
  244. take_a_break_routine()
  245. {
  246. global start_posit_x
  247. global start_posit_y
  248. global end_posit_x
  249. global end_posit_y
  250. global spell_book_pos_x
  251. global spell_book_pos_y
  252. global position_of_the_stats_bar_x
  253. global position_of_the_stats_bar_y
  254. global Position_off_screen_x
  255.  
  256.  
  257. SoundPlay, S_Blueprints_Buterrest.WAV
  258. Random, What_should_we_do ,1,4
  259. Random,random_speed,800,1200
  260. Random,Dither_x,50,-50
  261. Random,Dither_y,50,-50
  262. Random ,pos_alternatorx,-50,50
  263. Random ,pos_alternatory,-50,50
  264. Random, TriHard,-3,3
  265. Random,cmonBruh,-3,3
  266. Random, rand,100,300
  267. Random, rand_2, 400,450
  268. Random, rand_3,200,300
  269. Random,another_alternator,1,4
  270. Random,wait_time,100000,140000
  271. if(What_should_we_do=1)
  272. {click down
  273. RandomBezier( 0,0, (-200+pos_alternatorx),(100+pos_alternatory), "T"random_speed "RO RD P6 OT0 OB0 OL0 OR0")
  274. sleep %wait_time%
  275. RandomBezier( 0,0, (spell_book_pos_x+TriHard),(spell_book_pos_y+cmonBruh), "T"rand_2 "RO P7 OT0 OB0 OL0 OR0")
  276. sleep 50
  277. RandomBezier( 0,0, (start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"rand_3 "RO P4 OT0 OB0 OL0 OR0")
  278. sleep 50
  279. }
  280. if (What_should_we_do=2)
  281. {click down
  282. RandomBezier( 0,0, (position_of_the_stats_bar_x+TriHard),(position_of_the_stats_bar_y+cmonBruh), "T"rand "RO P4 OT0 OB0 OL0 OR0")
  283. sleep 50
  284. click
  285. sleep %wait_time%
  286. RandomBezier( 0,0, (spell_book_pos_x+TriHard),(spell_book_pos_y+cmonBruh), "T"rand_2 "RO P7 OT0 OB0 OL0 OR0")
  287. sleep 50
  288. click
  289. sleep 50
  290. RandomBezier( 0,0, (start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"rand_3 "RO P4 OT0 OB0 OL0 OR0")
  291. sleep 50
  292. }
  293. if(What_should_we_do=3)
  294. {
  295. click down
  296. if (another_alternator=1){
  297. RandomBezier( 0,0, (Position_off_screen_x+Dither_x),(800+Dither_y), "T"rand "RO P10 OT0 OB0 OL0 OR0")
  298. sleep %wait_time%
  299. RandomBezier( 0,0, (spell_book_pos_x+TriHard),(spell_book_pos_y+cmonBruh), "T"rand_2 "RO P7 OT0 OB0 OL0 OR0")
  300. sleep 50
  301. RandomBezier( 0,0, (start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"rand_3 "RO P10 OT0 OB0 OL0 OR0")
  302. sleep 50
  303. }
  304. if(another_alternator=2){
  305. RandomBezier( 0,0, (Position_off_screen_x+Dither_x),(600+Dither_y), "T"rand "RO P10 OT0 OB0 OL0 OR0")
  306. sleep %wait_time%
  307. RandomBezier( 0,0, (spell_book_pos_x+TriHard),(spell_book_pos_y+cmonBruh), "T"rand_2 "RO P7 OT0 OB0 OL0 OR0")
  308. sleep 50
  309. RandomBezier( 0,0, (start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"rand_3 "RO P10 OT0 OB0 OL0 OR0")
  310. sleep 50
  311. }
  312. if(another_alternator=3){
  313. RandomBezier( 0,0, (Position_off_screen_x+Dither_x),(400+Dither_y), "T"rand "RO P10 OT0 OB0 OL0 OR0")
  314. sleep %wait_time%
  315. RandomBezier( 0,0, (spell_book_pos_x+TriHard),(spell_book_pos_y+cmonBruh), "T"rand_2 "RO P7 OT0 OB0 OL0 OR0")
  316. sleep 50
  317. RandomBezier( 0,0, (start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"rand_3 "RO P10 OT0 OB0 OL0 OR0")
  318. sleep 50
  319. }
  320. if(another_alternator=4){
  321. RandomBezier( 0,0, (Position_off_screen_x+Dither_x),(200+Dither_y), "T"rand "RO P10 OT0 OB0 OL0 OR0")
  322. sleep %wait_time%
  323. RandomBezier( 0,0, (spell_book_pos_x+TriHard),(spell_book_pos_y+cmonBruh), "T"rand_2 "RO P7 OT0 OB0 OL0 OR0")
  324. sleep 50
  325. RandomBezier( 0,0, (start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"rand_3 "RO P10 OT0 OB0 OL0 OR0")
  326. sleep 50
  327. }
  328. }
  329. if (What_should_we_do =4)
  330. {click down
  331. RandomBezier( 0,0, (-300+pos_alternatorx),(100+pos_alternatory), "T"random_speed "RO RD P6 OT0 OB0 OL0 OR0")
  332. sleep %wait_time%
  333. RandomBezier( 0,0, (spell_book_pos_x+TriHard),(spell_book_pos_y+cmonBruh), "T"rand_2 "RO P7 OT0 OB0 OL0 OR0")
  334. sleep 50
  335. RandomBezier( 0,0, (start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"rand_3 "RO P4 OT0 OB0 OL0 OR0")
  336. sleep 50
  337. }
  338. }
  339. mistake_routine()
  340. {
  341. global mistake_array_position
  342. global mistake_array_x
  343. global mistake_array_y
  344. global spell_book_pos_x
  345. global spell_book_pos_y
  346. global start_posit_x
  347. global start_posit_y
  348. click down
  349. Random, TriHard,-3,3
  350. Random,cmonBruh,-3,3
  351. Random, rand_42500,100,300
  352. Random, rand_425001,400,500
  353. Random, rand_4250011,200,300
  354. Random choose_mistake_path,1,(mistake_array_position-1)
  355. gotox:=mistake_array_x[choose_mistake_path]
  356. gotoy:=mistake_array_y[choose_mistake_path]
  357. ;MsgBox, X: %gotox% Y: %gotoy% RANDOM_PATH: %choose_mistake_path%
  358. RandomBezier( 0,0, (gotox+TriHard),(gotoy+cmonBruh), "T"rand_42500 "RO P4 OT0 OB0 OL0 OR0")
  359. sleep 50
  360. click
  361. sleep 5000
  362. RandomBezier( 0,0, (spell_book_pos_x+TriHard),(spell_book_pos_y+cmonBruh), "T"(rand_425001+300) "RO P7 OT0 OB0 OL0 OR0")
  363. sleep 50
  364. click
  365. sleep 50
  366. RandomBezier( 0,0, (start_posit_x+TriHard),(start_posit_y+cmonBruh), "T"(rand_4250011+300) "RO P4 OT0 OB0 OL0 OR0")
  367. sleep 50
  368. }
  369. init_position_of_the_stats_bar()
  370. {
  371. global position_of_the_stats_bar_x
  372. global position_of_the_stats_bar_y
  373. MouseGetPos,position_of_the_stats_bar_x,position_of_the_stats_bar_y
  374. }
  375. init_mistake_click_array()
  376. {
  377. global mistake_array_x
  378. global mistake_array_y
  379. global mistake_array_position
  380.  
  381. MouseGetPos,random_x,random_y
  382.  
  383. MouseGetPos,mistakex,mistakey
  384. MsgBox,0,,current_x_location x: %random_x% y: %random_y% map: %mistake_array_position% mistakex: %mistakex% mistakey %mistakey%
  385. mistake_array_x.Push(mistakex)
  386. mistake_array_y.Push(mistakey)
  387. ;MsgBox,0,,mistake_array_x[1]
  388. mistake_array_position++
  389. bobby:=global mistake_array_x[(mistake_array_position-1)]
  390. bobbyy:=global mistake_array_y[(mistake_array_position-1)]
  391. MsgBox,0,,boby: %bobby%bobx: %bobbyy% %mistakex% %mistakey%
  392. }
  393. init_off_screen_position()
  394. {
  395. global Position_off_screen_x
  396. MouseGetPos,Position_off_screen_x,temp_variable
  397. }
  398. final_init()
  399. {
  400.  
  401. global color
  402. global start_posit_x
  403. global start_posit_y
  404. global end_posit_x
  405. global end_posit_y
  406. global MouseyX
  407. global MouseyY
  408. global position_of_the_stats_bar_y
  409. global position_of_the_stats_bar_x
  410. global Position_off_screen_x
  411. global spell_book_pos_x
  412. global spell_book_pos_y
  413. global mistakex
  414. global mistakey
  415. global mistake_array_x:= []
  416. global mistake_array_y:= []
  417. global mistake_array_position
  418. global color
  419. mistake_array_position:=1
  420.  
  421. }
  422. init_spell_book_pos()
  423. {
  424. global spell_book_pos_x
  425. global spell_book_pos_y
  426. MouseGetPos,spell_book_pos_x,spell_book_pos_y
  427. }
  428. set_exit_flag(new_value)
  429. {
  430. global exit_flag, script_start_tick, alch_cnt
  431. exit_flag := new_value
  432. if (0 == new_value)
  433. {
  434. script_start_tick := A_TickCount
  435. alch_cnt := 0
  436. }
  437. }
  438.  
  439. exit_script()
  440. {
  441. global script_start_tick, alch_cnt
  442. elapsed_time_min := (A_TickCount - script_start_tick)*0.0000167
  443. msgbox, 0, , Exiting. Alch Count = %alch_cnt%. Elapsed Time = %elapsed_time_min% minutes
  444. Exit
  445. }
  446.  
  447. count_alch()
  448. {
  449. global alch_cnt
  450. alch_cnt := alch_cnt + 1
  451. }
  452.  
  453.  
  454. F1::init_start_position()
  455. F2::init_end_position()
  456. F3::init_color_pixel()
  457. F4::init_spell_book_pos()
  458. F5::init_position_of_the_stats_bar()
  459. F6::init_off_screen_position()
  460. F7::init_mistake_click_array()
  461. F8::reload
  462. F9::mistake_routine()
  463. F10:: final_init()
  464. ^g::pause
  465. ^T::take_a_break_routine()
  466.  
  467. ^e::
  468. MouseGetPos, xStart, yStart
  469.  
  470.  
  471.  
  472. set_exit_flag(0)
  473.  
  474. loop 1000
  475. {
  476.  
  477. Random, variance_tick, 1, 60
  478. Random, mistake_tick, 1, 40
  479. click_random()
  480. count_alch()
  481. sleep_random(2300, 300)
  482. click_random()
  483. count_alch()
  484. sleep_random(2300, 300)
  485. if(variance_tick=14)
  486. {
  487. take_a_break_routine()
  488. }
  489. if (mistake_tick=13)
  490.  
  491. {
  492. mistake_routine()
  493. }
  494. }
  495.  
  496. exit_script()
  497.  
  498. ^r::
  499. set_exit_flag(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement