Guest User

Untitled

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