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