Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2014
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.03 KB | None | 0 0
  1. #IfWinActive ahk_class Turbine Device Class
  2.  
  3. F1::
  4. MouseGetPos, xbag, ybag
  5. return
  6.  
  7. F2::
  8. MouseGetPos, xcbag, ycbag
  9. return
  10.  
  11. F3::
  12. MouseGetPos, xshared, yshared
  13. return
  14.  
  15. F4::
  16. MouseGetPos, xcrunch, ycrunch
  17. return
  18.  
  19. F5::
  20. MouseGetPos, xcard, ycard
  21. return
  22.  
  23.  
  24. F10::
  25.  
  26. SendMode Event
  27.  
  28. i=0
  29. coun=7
  30. j=0
  31. xbagoffset=35
  32. xcrunchoffset=-130
  33. ycrunchoffset=-80
  34. ycardoffset=40
  35. ahk_class = Turbine Device Class
  36.  
  37. while (i=0 and j<coun)
  38. {
  39.  
  40. pixelgetcolor, crunch, xcrunch, ycrunch
  41. while (crunch!=0x000000 and i=0)
  42. {
  43. MouseClick, left, Xcbag, Ycbag
  44. sleep 100
  45. MouseClick, left, Xcbag, Ycbag
  46. sleep 3000
  47.  
  48. send {q}
  49. sleep 100
  50. send {e}
  51. sleep 300
  52. WinGetPos, , , x, y, A
  53. mousemove, (x/2), (y/2-40)
  54. sleep 300
  55. send ^{F1}
  56. sleep 3000
  57.  
  58. MouseClick, left, (xcbag+xbagoffset), ycbag
  59. sleep 100
  60. MouseClick, left, (xcbag+xbagoffset), ycbag
  61. sleep 100
  62. MouseClick, left, (xcbag+xbagoffset), ycbag
  63. sleep 300
  64.  
  65. MouseClickDrag, left, xcard, ycard, (xcrunch+xcrunchoffset), (ycrunch+ycrunchoffset)
  66. sleep 300
  67. MouseClickDrag, left, xcard, (ycard+ycardoffset), (xcrunch+xcrunchoffset), (ycrunch+ycrunchoffset)
  68. sleep 300
  69. pixelgetcolor, crunch, xcrunch, ycrunch
  70. }
  71.  
  72. while (crunch=0x000000 and i=0 and j<coun)
  73. {
  74. MouseClick, left, (xcbag+xbagoffset), ycbag
  75. sleep 100
  76. MouseClick, left, (xcbag+xbagoffset), ycbag
  77. sleep 100
  78. MouseClick, left, (xcbag+xbagoffset), ycbag
  79. sleep 300
  80.  
  81. Run, wmic path win32_networkadapter where NetConnectionID="1" call disable, , hide
  82. sleep 500
  83. MouseClickDrag, left, (xcbag+xbagoffset), ycbag, xshared, yshared
  84. sleep 300
  85. j:=j+1
  86. MouseClick, left, (xcrunch+xcrunchoffset), ycrunch
  87. sleep 4500
  88. Run, wmic path win32_networkadapter where NetConnectionID="1" call enable, , hide
  89. sleep 300
  90.  
  91. pixelgetcolor, color, xshared, yshared
  92. while (color<0x111111 and i=0)
  93. {
  94. sleep 100
  95. pixelgetcolor, color, xshared, yshared
  96. }
  97.  
  98. MouseClickDrag, left, (xcbag+xbagoffset), ycbag, xbag, ybag
  99. sleep 300
  100. MouseClick, left, xshared, yshared
  101. sleep 100
  102. MouseClick, left, xshared, yshared
  103. sleep 100
  104. MouseClick, left, xshared, yshared
  105. sleep 300
  106.  
  107. pixelgetcolor, color, xshared, yshared
  108. while (color>0x111111 and i=0)
  109. {
  110. sleep 100
  111. pixelgetcolor, color, xshared, yshared
  112. }
  113.  
  114. pixelgetcolor, crunch, xcrunch, ycrunch
  115. }
  116.  
  117. }
  118. return
  119.  
  120.  
  121. F8::
  122. pause
  123. return
  124.  
  125.  
  126.  
  127.  
  128. F9::
  129. SendMode Play
  130. i=0
  131. speed=1 ;ебашь сюда 150/твоя_скорость епт
  132. delay=1000 ;задержка в миллисекундах после каждого {q}-{e}
  133. ahk_class = Turbine Device Class
  134. WinGetPos, , , wx, wy, A
  135. errorlevel=0
  136.  
  137. While i = 0
  138. {
  139. Send {s down} ;бежим взад
  140. sleep 2600*speed
  141. Send {s up}
  142. sleep 100
  143.  
  144. click, down, right ;зажимаем ПКМ
  145. sleep 50
  146. click, down, right
  147. sleep 300
  148. mousemove, 1100, 0, 100, R ;поворачиваем к крусиблу
  149. sleep 100
  150. click, up, right ;отжимаем ПКМ
  151. sleep 50
  152. click, up, right
  153. sleep 300
  154.  
  155. while errorlevel=0 ;цикл который будет работать пока не войдем в квест
  156. {
  157. send {q} ;открываем меню
  158. sleep 100
  159. send {e}
  160. sleep delay
  161. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\menu.bmp
  162. j=0
  163. while (errorlevel=1 and j<=10) ;ждем 1 сек как откроется меню
  164. {
  165. sleep 100
  166. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\menu.bmp
  167. j:=j+1
  168. }
  169.  
  170. if j>=10 ;если меню за 1 сек не открылось повторяем цикл с самого начала
  171. {
  172. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\ruins.bmp
  173. continue 1 ;возвращаемся к мэйну и бежим еще раз взад, мало ли
  174. }
  175.  
  176. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\reset.bmp ;смотрим нужно ли ресетить квест и ресетим
  177. if errorlevel=0
  178. {
  179. mouseclick, left, x, y ;reset button
  180. sleep 100
  181. mouseclick, left, x, y
  182. sleep 100
  183. MouseClick, left, (wx/2-48), (wy/2+60) ;Yes BUTTON
  184. sleep 100
  185. MouseClick, left, (wx/2-48), (wy/2+60)
  186. sleep 100
  187. send {q}
  188. sleep 100
  189. send {e}
  190. sleep delay
  191. j=0
  192. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\menu.bmp
  193. while (errorlevel=1 and j<=10)
  194. {
  195. sleep 100
  196. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\menu.bmp
  197. j:=j+1
  198. }
  199. if j>=10 ;если меню за 1 сек не открылось повторяем цикл с самого начала
  200. {
  201. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\ruins.bmp
  202. continue 1
  203. }
  204. }
  205.  
  206. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\elite.bmp ;ищем кнопку с элитной сложностью
  207. if errorlevel=0
  208. {
  209. mouseclick, left, x, y ;жмем элиту
  210. sleep 100
  211. mouseclick, left, x, y
  212. sleep 100
  213. }
  214.  
  215. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\enter.bmp ;ищем и жмем вход
  216. if errorlevel=0
  217. {
  218. mouseclick, left, x, y
  219. sleep 100
  220. mouseclick, left, x, y
  221. sleep 100
  222. }
  223.  
  224. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\ruins.bmp ;смотрим находимся ли мы еще в руинах
  225. }
  226.  
  227. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\crucible.bmp ;смотрим вошли ли мы в крусибл
  228. while errorlevel=1
  229. {
  230. sleep 100
  231. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\crucible.bmp
  232. }
  233.  
  234. mousemove, (wx/2), (wy/2) ;двигаем мышь в центр дабы ПКМ могли нажать
  235. click, down, right ;зажимаем ПКМ
  236. sleep 50
  237. click, down, right
  238.  
  239. Send {w down}
  240. sleep 5100*speed ;бежим до бочки
  241. Send {Space} ;прыгаем над бочком
  242. sleep 50
  243. MouseMove, -30, 0, 100, R ;поворачиваем чуть налево
  244. Sleep 4000*speed
  245. send {space} ;прыгаем меж шкафом и гоблином
  246. sleep 850*speed
  247. MouseMove, 120, 0, 100, R ;поворачиваем к гиганту
  248. Sleep 650*speed
  249. Send {w up}
  250. sleep 100
  251. MouseMove, 1090, 0, 100, R ;разворачиваемся на ~180 ибо триггер сработал
  252. sleep 100
  253. Send {w down}
  254. sleep 1900*speed ;бежим к первому
  255. Send {w up}
  256. MouseMove, 400, 0, 100, R ;разворачиваемся к первому
  257. sleep 100
  258.  
  259. Send {q} ;говорим с первым
  260. sleep, 100
  261. Send {e}
  262. sleep, delay
  263. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp ;жамкаем Ф1 пока трелка не пропадет
  264. while errorlevel=0
  265. {
  266. send ^{F1}
  267. sleep 100
  268. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  269. }
  270. MouseMove, -400, 0, 100, R ;разворачиваемся от первого
  271. sleep 100
  272.  
  273. Send {w down}
  274. sleep 2200*speed ;бежим ко второму
  275. Send {w up}
  276. MouseMove, 400, 0, 100, R ;разворачиваемся ко второму
  277. sleep 100
  278.  
  279. Send {q} ;говорим со вторым
  280. sleep, 100
  281. Send {e}
  282. sleep, delay
  283. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  284. while errorlevel=0
  285. {
  286. send ^{F1}
  287. sleep 100
  288. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  289. }
  290. MouseMove, 650, 0, 100, R ;разворачиваемся от второго
  291. sleep 100
  292.  
  293. Send {w down}
  294. sleep 2000*speed ;бежим к третьему
  295. MouseMove, 300, 0, 100, R ;первый поворот направо
  296. sleep 2150*speed
  297. MouseMove, -390, 0, 100, R ;второй поворот налево
  298. sleep 900*speed
  299. Send {w up}
  300. sleep, 100
  301.  
  302. Send {q} ;говорим с третьим
  303. sleep, 100
  304. Send {e}
  305. sleep, delay
  306. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  307. while errorlevel=0
  308. {
  309. send ^{F1}
  310. sleep 100
  311. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  312. }
  313. MouseMove, 1050, 0, 100, R ;разворачиваемся от третьего
  314. sleep 100
  315.  
  316. Send {w down}
  317. sleep 1000*speed ;бежим к третьему
  318. MouseMove, 300, 0, 100, R ;поворот направо
  319. sleep 2150*speed
  320. MouseMove, -200, 0, 100, R ;поворот налево
  321. sleep 1900*speed
  322. Send {w up}
  323. sleep, 100
  324.  
  325. Send {q} ;говорим с четвертым
  326. sleep, 100
  327. Send {e}
  328. sleep, delay
  329. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  330. while errorlevel=0
  331. {
  332. send ^{F1}
  333. sleep 100
  334. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  335. }
  336.  
  337. sleep 300 ;отжимаем ПКМ
  338. click, up, right
  339. sleep 50
  340. click, up, right
  341. sleep 300
  342.  
  343. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\recall.bmp ;ищем кнопку рекол, делаем это вне цикла дабы, если ддошка лагнет и будем грузиться дольше 20 секунд, не жамкать на рекол в гиантхолде
  344. while i=0 ;цикл будем крутить пока не среколимся
  345. {
  346. j=0
  347. mouseclick, left, x, y ;жмем рекол
  348. sleep 100
  349. mouseclick, left, x, y
  350. sleep 100
  351.  
  352. if z=1 ;жмем первую или вторую стоку
  353. {
  354. Send ^{1}
  355. z=0
  356. }
  357. else
  358. {
  359. send ^{3}
  360. z=1
  361. }
  362. sleep, 230
  363.  
  364. MouseClick, left, (wx/2-48), (wy/2+100) ;Yes BUTTON
  365.  
  366. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\ruins.bmp ;ждем 20 секунд или пока не среколимся
  367. while (errorlevel=1 and j<=200)
  368. {
  369. sleep 100
  370. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\ruins.bmp
  371. j:=j+1
  372.  
  373. }
  374. if errorlevel=0 ;если наконец в руинах - прекращаем
  375. break
  376. }
  377. }
  378. return
  379.  
  380. F11::
  381. Sendmode Play
  382. i=0
  383. ahk_class = Turbine Device Class
  384. while i=0
  385. {
  386. MouseMove, -200, 0, 100, R
  387. sleep 500
  388. MouseMove, 200, 0, 100, R
  389. sleep 500
  390. }
  391. return
  392.  
  393.  
  394. F12::
  395. if i = 1
  396. {
  397. Run, wmic path win32_networkadapter where NetConnectionID="1" call enable, , hide
  398. i=0
  399. }
  400. else
  401. {
  402. Run, wmic path win32_networkadapter where NetConnectionID="1" call disable, , hide
  403. i = 1
  404. }
  405. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement