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