Advertisement
Guest User

Untitled

a guest
Jun 4th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.08 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. while errorlevel=0 ;цикл который будет работать пока не войдем в квест
  145. {
  146. send {q} ;открываем меню
  147. sleep 100
  148. send {e}
  149. sleep delay
  150. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\menu.bmp
  151. j=0
  152. while (errorlevel=1 and j<=10) ;ждем 1 сек как откроется меню
  153. {
  154. sleep 100
  155. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\menu.bmp
  156. j:=j+1
  157. }
  158.  
  159. if j>=10 ;если меню за 1 сек не открылось повторяем цикл с самого начала
  160. {
  161. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\ruins.bmp
  162. continue 1 ;возвращаемся к мэйну и бежим еще раз взад, мало ли
  163. }
  164.  
  165. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\reset.bmp ;смотрим нужно ли ресетить квест и ресетим
  166. if errorlevel=0
  167. {
  168. mouseclick, left, x, y ;reset button
  169. sleep 100
  170. mouseclick, left, x, y
  171. sleep 100
  172. MouseClick, left, (wx/2-48), (wy/2+60) ;Yes BUTTON
  173. sleep 100
  174. MouseClick, left, (wx/2-48), (wy/2+60)
  175. sleep 100
  176. send {q}
  177. sleep 100
  178. send {e}
  179. sleep delay
  180. j=0
  181. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\menu.bmp
  182. while (errorlevel=1 and j<=10)
  183. {
  184. sleep 100
  185. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\menu.bmp
  186. j:=j+1
  187. }
  188. if j>=10 ;если меню за 1 сек не открылось повторяем цикл с самого начала
  189. {
  190. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\ruins.bmp
  191. continue 1
  192. }
  193. }
  194.  
  195. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\elite.bmp ;ищем кнопку с элитной сложностью
  196. if errorlevel=0
  197. {
  198. mouseclick, left, x, y ;жмем элиту
  199. sleep 100
  200. mouseclick, left, x, y
  201. sleep 100
  202. }
  203.  
  204. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\enter.bmp ;ищем и жмем вход
  205. if errorlevel=0
  206. {
  207. mouseclick, left, x, y
  208. sleep 100
  209. mouseclick, left, x, y
  210. sleep 100
  211. }
  212.  
  213. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\ruins.bmp ;смотрим находимся ли мы еще в руинах
  214. }
  215.  
  216. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\crucible.bmp ;смотрим вошли ли мы в крусибл
  217. while errorlevel=1
  218. {
  219. sleep 100
  220. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\crucible.bmp
  221. }
  222.  
  223. MouseGetPos, x, y
  224. pixelgetcolor, color, (x-6), y
  225. while color!=0xfdfdfd
  226. {
  227. send {t}
  228. sleep 10
  229. MouseMove, 1, 0, 100, R
  230. MouseGetPos, x, y
  231. pixelgetcolor, color, (x-6), y
  232. }
  233.  
  234. Send {w down}
  235. sleep 5100*speed ;бежим до бочки
  236. Send {Space} ;прыгаем над бочком
  237. sleep 50
  238. MouseMove, -30, 0, 100, R ;поворачиваем чуть налево
  239. Sleep 4000*speed
  240. send {space} ;прыгаем меж шкафом и гоблином
  241. sleep 850*speed
  242. MouseMove, 120, 0, 100, R ;поворачиваем к гиганту
  243. Sleep 650*speed
  244. Send {w up}
  245. sleep 100
  246. MouseMove, 1090, 0, 100, R ;разворачиваемся на ~180 ибо триггер сработал
  247. sleep 100
  248. Send {w down}
  249. sleep 1900*speed ;бежим к первому
  250. Send {w up}
  251. MouseMove, 400, 0, 100, R ;разворачиваемся к первому
  252. sleep 100
  253.  
  254. Send {q} ;говорим с первым
  255. sleep, 100
  256. Send {e}
  257. sleep, delay
  258. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp ;жамкаем Ф1 пока трелка не пропадет
  259. while errorlevel=0
  260. {
  261. send ^{F1}
  262. sleep 100
  263. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  264. }
  265. MouseMove, -400, 0, 100, R ;разворачиваемся от первого
  266. sleep 100
  267.  
  268. Send {w down}
  269. sleep 2200*speed ;бежим ко второму
  270. Send {w up}
  271. MouseMove, 400, 0, 100, R ;разворачиваемся ко второму
  272. sleep 100
  273.  
  274. Send {q} ;говорим со вторым
  275. sleep, 100
  276. Send {e}
  277. sleep, delay
  278. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  279. while errorlevel=0
  280. {
  281. send ^{F1}
  282. sleep 100
  283. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  284. }
  285. MouseMove, 650, 0, 100, R ;разворачиваемся от второго
  286. sleep 100
  287.  
  288. Send {w down}
  289. sleep 2000*speed ;бежим к третьему
  290. MouseMove, 300, 0, 100, R ;первый поворот направо
  291. sleep 2150*speed
  292. MouseMove, -390, 0, 100, R ;второй поворот налево
  293. sleep 900*speed
  294. Send {w up}
  295. sleep, 100
  296.  
  297. Send {q} ;говорим с третьим
  298. sleep, 100
  299. Send {e}
  300. sleep, delay
  301. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  302. while errorlevel=0
  303. {
  304. send ^{F1}
  305. sleep 100
  306. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  307. }
  308. MouseMove, 1050, 0, 100, R ;разворачиваемся от третьего
  309. sleep 100
  310.  
  311. Send {w down}
  312. sleep 1000*speed ;бежим к третьему
  313. MouseMove, 300, 0, 100, R ;поворот направо
  314. sleep 2150*speed
  315. MouseMove, -200, 0, 100, R ;поворот налево
  316. sleep 1900*speed
  317. Send {w up}
  318. sleep, 100
  319.  
  320. Send {q} ;говорим с четвертым
  321. sleep, 100
  322. Send {e}
  323. sleep, delay
  324. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  325. while errorlevel=0
  326. {
  327. send ^{F1}
  328. sleep 100
  329. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\arrow.bmp
  330. }
  331.  
  332. MouseMove, 1, 0, 100, R
  333. sleep 100
  334. send {t}
  335. MouseGetPos, x, y
  336. pixelgetcolor, color, (x-6), y
  337. while color=0xfdfdfd
  338. {
  339. send {t}
  340. sleep 10
  341. MouseMove, 1, 0, 100, R
  342. MouseGetPos, x, y
  343. pixelgetcolor, color, (x-6), y
  344. }
  345. sleep, 500
  346.  
  347. imagesearch, x, y, 0, 0, wx, wy, %a_scriptdir%\recall.bmp ;ищем кнопку рекол, делаем это вне цикла дабы, если ддошка лагнет и будем грузиться дольше 20 секунд, не жамкать на рекол в гиантхолде
  348. while i=0 ;цикл будем крутить пока не среколимся
  349. {
  350. j=0
  351. mouseclick, left, x, y ;жмем рекол
  352. sleep 100
  353. mouseclick, left, x, y
  354. sleep 100
  355.  
  356. if z=1 ;жмем первую или вторую стоку
  357. {
  358. Send ^{1}
  359. z=0
  360. }
  361. else
  362. {
  363. send ^{3}
  364. z=1
  365. }
  366. sleep, 230
  367.  
  368. MouseClick, left, (wx/2-48), (wy/2+100) ;Yes BUTTON
  369.  
  370. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\ruins.bmp ;ждем 20 секунд или пока не среколимся
  371. while (errorlevel=1 and j<=200)
  372. {
  373. sleep 100
  374. imagesearch, , , 0, 0, wx, wy, %a_scriptdir%\ruins.bmp
  375. j:=j+1
  376.  
  377. }
  378. if errorlevel=0 ;если наконец в руинах - прекращаем
  379. break
  380. }
  381. }
  382. return
  383.  
  384. F11::
  385. Sendmode Play
  386. i=0
  387. ahk_class = Turbine Device Class
  388. while i=0
  389. {
  390. MouseMove, -200, 0, 100, R
  391. sleep 500
  392. MouseMove, 200, 0, 100, R
  393. sleep 500
  394. }
  395. return
  396.  
  397.  
  398. F12::
  399. if i = 1
  400. {
  401. Run, wmic path win32_networkadapter where NetConnectionID="1" call enable, , hide
  402. i=0
  403. }
  404. else
  405. {
  406. Run, wmic path win32_networkadapter where NetConnectionID="1" call disable, , hide
  407. i = 1
  408. }
  409. return
  410.  
  411. F6::
  412. ahk_class = Turbine Device Class
  413. i="x"
  414. j=0
  415. result:=dllcall("ReadProcessMemory", "Uint", 4568, "Uint", 0x017F2270, "float*", i, "Uint", 4, "Uint*", 0)
  416. msgbox %result% - %i% - %j%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement