├── Config ├── Preset_Gamepad │ └── BH3_Hotkey.ini └── Preset_Keyboard │ └── BH3_Hotkey.ini ├── EXE └── Installer.exe ├── Functions_Combat.ahk ├── Functions_Management.ahk ├── GUI ├── Changelogs │ ├── v0.1.+.txt │ ├── v0.2.+.txt │ ├── v0.3.+.txt │ └── v0.4.+.txt └── Images │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── Backup │ ├── Bronya.psd │ ├── Kiana.psd │ └── Seele.psd ├── Hotkeys_Combat.ahk ├── Hotkeys_Management.ahk ├── Icon.ico ├── Installer.ahk ├── Interface.ahk ├── KeyList.ahk ├── LICENSE ├── Language.ahk ├── Lib └── FindText.ahk ├── Main.ahk ├── Others.ahk ├── README.md └── Updater.ahk /Config/Preset_Gamepad/BH3_Hotkey.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/Config/Preset_Gamepad/BH3_Hotkey.ini -------------------------------------------------------------------------------- /Config/Preset_Keyboard/BH3_Hotkey.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/Config/Preset_Keyboard/BH3_Hotkey.ini -------------------------------------------------------------------------------- /EXE/Installer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/EXE/Installer.exe -------------------------------------------------------------------------------- /Functions_Combat.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放战斗功能相关的函数 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | ;【函数 Function】隐藏光标 7 | Occlusion(Status_Occlusion) 8 | { 9 | If WinActive("ahk_exe BH3.exe") 10 | { 11 | If (Toggle_Occlusion) 12 | { 13 | If (Status_Occlusion) 14 | { 15 | MouseGetPos, , , HWND 16 | Gui, Cursor: +Owner%HWND% 17 | DllCall("ShowCursor", "UInt", 0) 18 | } 19 | Else 20 | { 21 | DllCall("ShowCursor", "UInt", 1) 22 | } 23 | } 24 | } 25 | } 26 | 27 | 28 | ;【函数 Function】定位光标 29 | ZoneDetect() 30 | { 31 | If WinActive("ahk_exe BH3.exe") 32 | { 33 | If (FirstTime_ZoneDetect) 34 | { 35 | WinGetPos, X, Y, W, H, ahk_exe BH3.exe 36 | ClientUpperLeftCorner_X := X 37 | ClientUpperLeftCorner_Y := Y 38 | Client_Width := W 39 | Client_Height := H 40 | 41 | FirstTime_ZoneDetect := !FirstTime_ZoneDetect 42 | } 43 | MouseGetPos, x1, y1 44 | If (x1 > (ClientUpperLeftCorner_X + Client_Width / 2 + Client_Width / 4) || x1 < (ClientUpperLeftCorner_X + Client_Width / 2 - Client_Width / 4) || y1 > (ClientUpperLeftCorner_Y + Client_Height / 2 + Client_Height / 4) || y1 < (ClientUpperLeftCorner_Y + Client_Height / 2 - Client_Height / 4)) 45 | { 46 | If (!IsZoneInteractive) 47 | IsZoneInteractive := True 48 | } 49 | Else 50 | { 51 | If (IsZoneInteractive) 52 | IsZoneInteractive := False 53 | } 54 | } 55 | } 56 | 57 | 58 | ;【函数 Function】重置光标 59 | CoordReset() 60 | { 61 | If WinActive("ahk_exe BH3.exe") 62 | { 63 | CoordMode, Mouse, Client 64 | Try 65 | MouseMove, Client_Width/2, Client_Height/2, 0 ; [建议保持数值] 使鼠标回正,居中于窗口 66 | Catch 67 | { 68 | WinGetPos, , , W, H, ahk_exe BH3.exe ; 获取崩坏3游戏窗口参数(同样适用于非全屏) 69 | Client_Width := W 70 | Client_Height := H 71 | CoordReset() 72 | } 73 | } 74 | } 75 | 76 | 77 | ;【函数 Function】限制光标 78 | Restriction() 79 | { 80 | ZoneDetect() 81 | If WinActive("ahk_exe BH3.exe") 82 | { 83 | If (Toggle_Restriction) 84 | { 85 | If (Status_Restriction) 86 | { 87 | If (IsZoneInteractive) 88 | { 89 | If (Status_ViewControl) 90 | { 91 | SendInput, {Click, Up Middle} 92 | Status_ViewControl := !Status_ViewControl 93 | } 94 | CoordReset() 95 | } 96 | } 97 | } 98 | } 99 | } 100 | 101 | 102 | ;【函数 Function】光标定位 103 | MouseDetect() 104 | { 105 | If WinActive("ahk_exe BH3.exe") 106 | { 107 | Restriction() 108 | Sleep, 1 ; [可调校数值 adjustable parameters] 设定采集当前光标坐标值的时间间隔(ms) 109 | MouseGetPos, x2, y2 110 | } 111 | } 112 | 113 | 114 | ;【函数 Function】冲突检测 115 | ConflictDetect() 116 | { 117 | If WinActive("ahk_exe BH3.exe") 118 | { 119 | If (Status_ViewControl) 120 | { 121 | If GetKeyState("MButton") 122 | { 123 | List := ["LButton", "RButton"] ;在光标位于非交互区时,其它鼠标键会打断中键的逻辑状态 124 | LEN := List.Length() 125 | IsConflictDetected := False 126 | While (Status_ViewControl) 127 | { 128 | If (A_Index <= LEN) 129 | NUM := A_Index 130 | Else 131 | NUM := abs(Mod(A_Index, LEN) - LEN) 132 | 133 | If GetKeyState(List[NUM]) 134 | { 135 | If (!IsConflictDetected) 136 | IsConflictDetected := True 137 | SendInput, {Click, Up Middle} ;SendEvent, MButton 138 | 139 | ConflictKey := List[NUM] 140 | KeyWait, %ConflictKey% ;KeyWait, %ConflictKey%, L 141 | 142 | ZoneDetect() 143 | If (!IsZoneInteractive) 144 | SendInput, {Click, Down Middle} 145 | Else 146 | Break 147 | } 148 | Else If (!IsConflictDetected && NUM == LEN) 149 | Break 150 | } 151 | } 152 | Else 153 | SendInput, {Click, Down Middle} 154 | } 155 | Else 156 | { 157 | If (!BreakFlag_View) 158 | BreakFlag_View := !BreakFlag_View 159 | ;Return 160 | } 161 | } 162 | Else 163 | { 164 | If (Status_ViewControl) 165 | { 166 | SendInput, {Click, Up Middle} 167 | Status_ViewControl := !Status_ViewControl 168 | } 169 | } 170 | } 171 | 172 | 173 | ;【函数 Function】视角跟随 174 | ViewControl() 175 | { 176 | MouseDetect() 177 | If WinActive("ahk_exe BH3.exe") 178 | { 179 | If (x1 != x2 or y1 != y2) 180 | { 181 | If (!Status_ViewControl) 182 | { 183 | Status_ViewControl := !Status_ViewControl 184 | ;SendInput, {Click, Down Middle} 185 | Switch ViewControl_Mod 186 | { 187 | Case "Mod1": 188 | ConflictDetect() 189 | 190 | Case "Mod2": 191 | SetTimer, ConflictDetect, %Timer_ConflictDetect% 192 | Loop, 120 193 | { 194 | If (BreakFlag_View) 195 | { 196 | BreakFlag_View := !BreakFlag_View 197 | Break 198 | } 199 | Sleep, 10 200 | } 201 | SetTimer, ConflictDetect, Delete 202 | 203 | Default : 204 | ;ConflictDetect() 205 | } 206 | } 207 | } 208 | Else 209 | { 210 | If (Status_ViewControl) 211 | { 212 | SendInput, {Click, Up Middle} 213 | Status_ViewControl := !Status_ViewControl 214 | } 215 | } 216 | } 217 | } 218 | 219 | 220 | ;【函数 Function】临时视角跟随 221 | ViewControlTemp() 222 | { 223 | MouseDetect() 224 | If WinActive("ahk_exe BH3.exe") 225 | { 226 | Threshold := 33 ; [可调校数值 adjustable parameters] 设定切换两种视角跟随模式的像素阈值 227 | If (abs(x1 - x2) > Threshold or abs(y1 - y2) > Threshold) 228 | { 229 | If (!Status_ViewControl) 230 | { 231 | Status_ViewControl := !Status_ViewControl 232 | ;SendInput, {Click, Down Middle} 233 | ConflictDetect() 234 | } 235 | } 236 | Else If (y1 > y2) 237 | { 238 | SendInput, {n Down} 239 | Sleep, 1 240 | SendInput, {n Up} 241 | } 242 | Else If (y1 < y2) 243 | { 244 | SendInput, {m Down} 245 | Sleep, 1 246 | SendInput, {m Up} 247 | } 248 | Else If (x1 > x2) 249 | { 250 | SendInput, {q Down} 251 | Sleep, 1 252 | SendInput, {q Up} 253 | } 254 | Else If (x1 < x2) 255 | { 256 | SendInput, {e Down} 257 | Sleep, 1 258 | SendInput, {e Up} 259 | } 260 | Else If (x1 > x2 and y1 > y2) 261 | { 262 | SendInput, {q Down}{n Down} 263 | Sleep, 1 264 | SendInput, {q Up}{n Up} 265 | } 266 | Else If (x1 < x2 and y1 > y2) 267 | { 268 | SendInput, {e Down}{n Down} 269 | Sleep, 1 270 | SendInput, {e Up}{n Up} 271 | } 272 | Else If (x1 > x2 and y1 < y2) 273 | { 274 | SendInput, {q Down}{m Down} 275 | Sleep, 1 276 | SendInput, {q Up}{m Up} 277 | } 278 | Else If (x1 < x2 and y1 < y2) 279 | { 280 | SendInput, {e Down}{m Down} 281 | Sleep, 1 282 | SendInput, {e Up}{m Up} 283 | } 284 | Else 285 | { 286 | If (Status_ViewControl) 287 | { 288 | SendInput, {Click, Up Middle} 289 | Status_ViewControl := !Status_ViewControl 290 | } 291 | } 292 | } 293 | } 294 | 295 | 296 | ;【函数 Function】准星控制 297 | AimControl() 298 | { 299 | MouseDetect() 300 | If WinActive("ahk_exe BH3.exe") 301 | { 302 | Loop 303 | { 304 | If (x1 != x2 or y1 != y2) 305 | { 306 | If (y1 > y2) 307 | { 308 | If (!Status_w) 309 | { 310 | Status_w := !Status_w 311 | SendInput, {w Down} 312 | } 313 | Else 314 | { 315 | If (Status_s) 316 | { 317 | SendInput, {s Up} 318 | Status_s := !Status_s 319 | } 320 | If (Status_a) 321 | { 322 | SendInput, {a Up} 323 | Status_a := !Status_a 324 | } 325 | If (Status_d) 326 | { 327 | SendInput, {d Up} 328 | Status_d := !Status_d 329 | } 330 | } 331 | } 332 | If (y1 < y2) 333 | { 334 | If (!Status_s) 335 | { 336 | Status_s := !Status_s 337 | SendInput, {s Down} 338 | } 339 | Else 340 | { 341 | If (Status_w) 342 | { 343 | SendInput, {w Up} 344 | Status_w := !Status_w 345 | } 346 | If (Status_a) 347 | { 348 | SendInput, {a Up} 349 | Status_a := !Status_a 350 | } 351 | If (Status_d) 352 | { 353 | SendInput, {d Up} 354 | Status_d := !Status_d 355 | } 356 | } 357 | } 358 | If (x1 > x2) 359 | { 360 | If (!Status_a) 361 | { 362 | Status_a := !Status_a 363 | SendInput, {a Down} 364 | } 365 | Else 366 | { 367 | If (Status_w) 368 | { 369 | SendInput, {w Up} 370 | Status_w := !Status_w 371 | } 372 | If (Status_s) 373 | { 374 | SendInput, {s Up} 375 | Status_s := !Status_s 376 | } 377 | If (Status_d) 378 | { 379 | SendInput, {d Up} 380 | Status_d := !Status_d 381 | } 382 | } 383 | } 384 | If (x1 < x2) 385 | { 386 | If (!Status_d) 387 | { 388 | Status_d := !Status_d 389 | SendInput, {d Down} 390 | } 391 | Else 392 | { 393 | If (Status_w) 394 | { 395 | SendInput, {w Up} 396 | Status_w := !Status_w 397 | } 398 | If (Status_s) 399 | { 400 | SendInput, {s Up} 401 | Status_s := !Status_s 402 | } 403 | If (Status_a) 404 | { 405 | SendInput, {a Up} 406 | Status_a := !Status_a 407 | } 408 | } 409 | } 410 | } 411 | Else 412 | { 413 | If (Status_w) 414 | { 415 | SendInput, {w Up} 416 | Status_w := !Status_w 417 | } 418 | If (Status_s) 419 | { 420 | SendInput, {s Up} 421 | Status_s := !Status_s 422 | } 423 | If (Status_a) 424 | { 425 | SendInput, {a Up} 426 | Status_a := !Status_a 427 | } 428 | If (Status_d) 429 | { 430 | SendInput, {d Up} 431 | Status_d := !Status_d 432 | } 433 | } 434 | Sleep, %Timer_AimControl% 435 | If (BreakFlag_Aim) ; (Abort the function when BreakFlag_Aim == 1) 436 | { 437 | BreakFlag_Aim := !BreakFlag_Aim 438 | break 439 | } 440 | } Until Not GetKeyState(A_ThisHotkey, "P") 441 | If (Status_w) 442 | { 443 | SendInput, {w Up} 444 | Status_w := !Status_w 445 | } 446 | If (Status_s) 447 | { 448 | SendInput, {s Up} 449 | Status_s := !Status_s 450 | } 451 | If (Status_a) 452 | { 453 | SendInput, {a Up} 454 | Status_a := !Status_a 455 | } 456 | If (Status_d) 457 | { 458 | SendInput, {d Up} 459 | Status_d := !Status_d 460 | } 461 | } 462 | } 463 | 464 | 465 | ;【函数 Function】输入重置 466 | InputReset() 467 | { 468 | If Not GetKeyState("E") 469 | { 470 | Try 471 | SetTimer, AimControl, Delete 472 | Catch 473 | SetTimer, AimControl, -1 474 | } 475 | Try 476 | { 477 | If GetKeyState("MButton") 478 | { 479 | If (Status_ViewControl) 480 | { 481 | If (!BreakFlag_View) 482 | BreakFlag_View := !BreakFlag_View 483 | Status_ViewControl := !Status_ViewControl 484 | } 485 | SendInput, {Click, Up Middle} 486 | } 487 | SetTimer, ViewControlTemp, Delete 488 | } 489 | Catch 490 | SetTimer, ViewControlTemp, -1 491 | } 492 | 493 | 494 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /Functions_Management.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放控制功能相关的函数 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | ;【函数 Function】屏幕检测 7 | ScreenDetect() 8 | { 9 | If WinActive("ahk_exe BH3.exe") 10 | { 11 | WinGetPos, X, Y, W, H, ahk_exe BH3.exe 12 | ClientUpperLeftCorner_X := X 13 | ClientUpperLeftCorner_Y := Y 14 | Client_Width := W 15 | Client_Height := H 16 | 17 | If (Client_Width / Client_Height == 1920 / 1080) 18 | { ; 默认数值源于1920*1080分辨率下的测试结果 19 | DetectionPerPixel_Width := 100 * 2 / 3840 20 | DetectionPerPixel_Height := 70 * 2 / 2160 21 | UpperLeftCorner_X := ClientUpperLeftCorner_X 22 | UpperLeftCorner_Y := ClientUpperLeftCorner_Y 23 | LowerRightCorner_X := UpperLeftCorner_X + Round(DetectionPerPixel_Width * Client_Width) 24 | LowerRightCorner_Y := UpperLeftCorner_Y + Round(DetectionPerPixel_Height * Client_Height) 25 | LowerRightCorner_X2 := ClientUpperLeftCorner_X + Client_Width 26 | LowerRightCorner_Y2 := ClientUpperLeftCorner_Y + Client_Height 27 | UpperLeftCorner_X2 := LowerRightCorner_X2 - Round(DetectionPerPixel_Width * Client_Width) 28 | UpperLeftCorner_Y2 := LowerRightCorner_Y2 - Round(DetectionPerPixel_Height * Client_Height) 29 | Switch Client_Height 30 | { 31 | Case "720": ; [已测试 tested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化96% + 颜色相似二值化100% + 颜色相似二值化90%) 32 | Icon := "|0x313131@1.00$20.C077k3tw0yzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTrk3tw0yC078" 33 | Icon .= "|0x422A2A@0.96$20.4027k3tw0yzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zT0Dbk3sM0MU" 34 | Icon .= "|0x522323@0.95$20.6067k3ty1yzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zzUTzs7zy1zTUTbk3sM0MU" 35 | Icon .= "|0xFFFFFF@1.00$15.0080300s0D03s0z0Ds3v0y8DU3s0y0DU3s0y07k0T01w07k0T01w07l0T81z07s0T01s0700M01U" 36 | Icon .= "|0x5B5B5B@0.90$1.w" 37 | 38 | Case "900": ; [已测试 tested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化96% + 颜色相似二值化100% + ) 39 | Icon := "|0x313131@1.00$25.200810043s0DXy0Dtz07xzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zrw0Tny0Dsy03s400EU" 40 | Icon .= "|0x422A2A@0.96$25.700Q3U0C7w0Tny0DvzUDzzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zzy0zvy0Dtz07wC00sU" 41 | Icon .= "|0x542222@0.96$25.700Q3U0T7w0Tny0DvzUDzzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zzy0zzz0TzzUDzzk7zzs3zzw1zzy0zvy0Dtz07wC00sU" 42 | Icon .= "|0xFFFFFF@1.00$18.00100300300700D00z01z01z03n0710S00w00w01s03U0D00S00S00y00S00D003U03U01s00w00S007107103l01z00z00D00D007003001U" 43 | Icon .= 44 | 45 | Case "1440": ; [已测试 tested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化96% + 颜色相似二值化100% + 颜色相似二值化96%) 46 | Icon := "|0x313131@1.00$40.3w000z0Ds007w3zk00zwDz003zkzw00DzDzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzDz003zkzw00Dz3zk00zw3y001z0Dk003w8" 47 | Icon .= "|0x422A2A@0.96$40.1s000S07U001s3zk00zwDz003zkzy00TzDzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzwzy00Tz3zk00zwDz003zk7U001s0S0007UU" 48 | Icon .= "|0x522323@0.96$40.1s000S07U001s3zk00zwDz003zkzy00TzDzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzzzz00zzzzw03zzzzk0Dzwzy00Tz3zk00zwDz003zk7U001s0S0007UU" 49 | Icon .= "|0xFFFFFF@1.00$29.00002000040000s0001k000DU000T0003y0007w000zs001zk00DzU00Tz003wC007sQ00z0801y0E0Dk000TU003w0007s000z0001y000Dk000TU003w0007s000z0001y000Dw000Ts000Dk000TU000Dk000TU000Dk000TU000Dk000TU000Dk000TU000Dk000TU000Dk200TU400Dk800TUE00DzU00Tz000Dy000Tw000Ds000Tk000DU000T0000C0000Q000080000M" 50 | Icon .= "|0xACACAD@0.96$1.y" 51 | 52 | Case "2160": ; [已测试 tested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化95% + 颜色相似二值化100% + 颜色相似二值化100%) 53 | Icon := "|0x313131@1.00$60.07U00001s00zw0000Dz00zw0000Dz03zz0000zzk3zz0000zzk3zz0000zzk7zz0000zzs7zzU001zzszzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzzzzzk003zzz7zzU001zzs7zz0000zzs3zz0000zzk3zz0000zzk3zz0000zzk0zw0000Dz00zw0000Dz007U00001s0U" 54 | Icon .= "|0x412A2A@0.96$60.0DU00001w00DU00001w00Tk00003y03zy0000Tzk7zz0000zzs7zz0000zzs7zzU001zzsDzzU001zzwzzzk003zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzk003zzzDzzU001zzw7zzU001zzs7zz0000zzs7zz0000zzs3zy0000Tzk0Tk00003y00Dk00003w00DU00001w0U" 55 | Icon .= "|0x522323@0.95$60.0Dk00003w00Dk00003w00Ts00007y03zz0000zzk7zz0000zzs7zzU001zzs7zzU001zzsDzzk003zzwzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzzzzs007zzzDzzk003zzw7zzU001zzs7zzU001zzs7zz0000zzs3zz0000zzk0Ts00007y00Dk00003w00Dk00003w0U" 56 | Icon .= "|0xFFFFFF@1.00$44.0000000k000000A00000030000007k000001w000000T000000zk00000Dw000003z000007zk00001zw00000Tz00000zzk0000Dzw00003zz00007zzk0001zzw0000Tzz0000zzzk000Dz1w0003zkT0007zw7k001zs0A000Ty03000zzU0k00Dz000003zk00007zw00001zs00000Ty00000zzU0000Dz000003zk00007zw00001zs00000Ty00000zzU0000Dz000003zk00007zw00001zs00000Ty00000zzU0000Dzs00003zy00000zzU00001zs00000Ty000007zw00000Dz000003zk00000zzU00001zs00000Ty000007zw00000Dz000003zk00000zzU00001zs00000Ty000007zw00000Dz000003zk00000zzU0k001zs0A000Ty030007zw0k000Dz0A0003zk30000zzzk0001zzw0000Tzz00007zzk0000Dzw00003zz00000zzk00001zw00000TzU" 57 | Icon .= "|0xD4D4D4@1.00$3.zzzw" 58 | 59 | Default: ; [已测试 tested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化95% + 颜色相似二值化100% + 颜色相似二值化100%) 60 | Icon := "|0x313131@1.00$30.7k03sDs07wDs07wDs07wzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0DzDs07wDs07wDs07w7k03sU" 61 | Icon .= "|0x422A2A@0.96$30.3U01k3U01kDs07wDs07wTw0Dyzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0DzTw0DyDs07wDs07w3U01kU" 62 | Icon .= "|0x532222@0.95$30.3U01k3U01kDs07wTs07yzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0Dzzw0DzTs07yDs07w3U01kU" 63 | Icon .= "|0xFFFFFF@1.00$22.0004000k003000w007k00T007w00zk03z00yA07UE0S107k00w003k00y007U00S007k00w003k00z000w003k007k007U00S000y000w003k007k007UE0S100y400zk03z007w007k00T000w000k0030006" 64 | Icon .= "|0xD4D4D4@1.00$1.s" 65 | } 66 | } 67 | 68 | Else If (Client_Width / Client_Height == 1360 / 768) 69 | { ; 默认数值源于1360*768分辨率下的测试结果 70 | DetectionPerPixel_Width := 38 * 2 / 1360 71 | DetectionPerPixel_Height := 25 * 2 / 768 72 | UpperLeftCorner_X := ClientUpperLeftCorner_X 73 | UpperLeftCorner_Y := ClientUpperLeftCorner_Y 74 | LowerRightCorner_X := UpperLeftCorner_X + Round(DetectionPerPixel_Width * Client_Width) 75 | LowerRightCorner_Y := UpperLeftCorner_Y + Round(DetectionPerPixel_Height * Client_Height) 76 | LowerRightCorner_X2 := ClientUpperLeftCorner_X + Client_Width 77 | LowerRightCorner_Y2 := ClientUpperLeftCorner_Y + Client_Height 78 | UpperLeftCorner_X2 := LowerRightCorner_X2 - Round(DetectionPerPixel_Height * Client_Width) 79 | UpperLeftCorner_Y2 := LowerRightCorner_Y2 - Round(DetectionPerPixel_Height * Client_Height) 80 | Switch Client_Height 81 | { 82 | Case "": 83 | 84 | Default: ; [已测试 tested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化95% + 颜色相似二值化100% + 颜色相似二值化96%) 85 | Icon := "|0x313131@1.00$21.4003s1yT0Drw1zzUDzw1zzUDzw1zzUDzw1zzUDzw1zzUDzw1zzUDzw1zzUDzw1zzUDzw1zzUDvs1yT0Dlk0wU" 86 | Icon .= "|0x402A2A@0.96$21.A033k0wT0Drw1zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUDvs1yT0DlU0MU" 87 | Icon .= "|0x522323@0.95$21.A033s0wT0Drw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzw3zzUTzs1yT0DlU0MU" 88 | Icon .= "|0xFFFFFF@1.00$15.0080100M0701s0T0781k0w0D03k0s0C03U0w03U0C00s07U0S01s07U0C00s03s0D00s0300A" 89 | Icon .= "|0xD4D4D4@0.96$5.w000T000V25so" 90 | } 91 | } 92 | 93 | Else If (Client_Width / Client_Height == 1440 / 900) 94 | { ; 默认数值源于1440*900分辨率下的测试结果 95 | DetectionPerPixel_Width := 40 * 2 / 1440 96 | DetectionPerPixel_Height := 27 * 2 / 900 97 | UpperLeftCorner_X := ClientUpperLeftCorner_X 98 | UpperLeftCorner_Y := ClientUpperLeftCorner_Y 99 | LowerRightCorner_X := UpperLeftCorner_X + Round(DetectionPerPixel_Width * Client_Width) 100 | LowerRightCorner_Y := UpperLeftCorner_Y + Round(DetectionPerPixel_Height * Client_Height) 101 | LowerRightCorner_X2 := ClientUpperLeftCorner_X + Client_Width 102 | LowerRightCorner_Y2 := ClientUpperLeftCorner_Y + Client_Height 103 | UpperLeftCorner_X2 := LowerRightCorner_X2 - Round(DetectionPerPixel_Width * Client_Width) 104 | UpperLeftCorner_Y2 := LowerRightCorner_Y2 - Round(DetectionPerPixel_Height * Client_Height) 105 | Switch Client_Height 106 | { 107 | Case "": 108 | 109 | Default: ; [已测试 tested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化95% + 颜色相似二值化100% + 颜色相似二值化96%) 110 | Icon := "|0x313131@1.00$22.D03lw0Dbk1yzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7xy0Tbk0yD03m" 111 | Icon .= "|0x432929@0.96$22.601Vw0Tbs1yzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zTU7tw0TVU0MU" 112 | Icon .= "|0x542222@0.95$22.601Vw0Tbs1yzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7zy0Tzs1zzU7xy0TXU0QU" 113 | Icon .= "|0xFFFFFF@1.00$16.00400k0300Q03k0T03w0Qk3V0w07U0S03k0Q03U0Q03k0700C00Q01s03k07U0D00C40QE0z01w03k0D00Q00k01U" 114 | Icon .= "|0xD4D4D4@0.96$4.s000w01aNiu" 115 | } 116 | } 117 | 118 | Else If (Client_Width / Client_Height == 1680 / 1050) 119 | { ; 默认数值源于1680*1050分辨率下的测试结果 120 | DetectionPerPixel_Width := 50 * 2 / 1680 121 | DetectionPerPixel_Height := 30 * 2 / 1050 122 | UpperLeftCorner_X := ClientUpperLeftCorner_X 123 | UpperLeftCorner_Y := ClientUpperLeftCorner_Y 124 | LowerRightCorner_X := UpperLeftCorner_X + Round(DetectionPerPixel_Width * Client_Width) 125 | LowerRightCorner_Y := UpperLeftCorner_Y + Round(DetectionPerPixel_Height * Client_Height) 126 | LowerRightCorner_X2 := ClientUpperLeftCorner_X + Client_Width 127 | LowerRightCorner_Y2 := ClientUpperLeftCorner_Y + Client_Height 128 | UpperLeftCorner_X2 := LowerRightCorner_X2 - Round(DetectionPerPixel_Width * Client_Width) 129 | UpperLeftCorner_Y2 := LowerRightCorner_Y2 - Round(DetectionPerPixel_Height * Client_Height) 130 | Switch Client_Height 131 | { 132 | Case "": 133 | 134 | Default: ; [未测试 untested](颜色相似二值化100% + 颜色相似二值化95% + 颜色相似二值化95% + 颜色相似二值化100% + 颜色相似二值化95%) 135 | Icon := "|0x313131@1.00$27.7U0D1y03wDk0TVy03wzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zDk0TVy03w7U0D4" 136 | Icon .= "|0x422A2A@0.95$27.30061y03wTk0zbz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zTs0zly03w7U0D0M00kU" 137 | Icon .= "|0x512323@0.95$27.30061y03wTk0zbz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zzs0zzz07zTs0zly03w7U0D0M00kU" 138 | Icon .= "|0xFFFFFF@1.00$19.000U00E00s00w00y00T00zU0wE0w00S00w00w00w01w00w00w00w01y00z007U01s00S00D001s00S007U03k00S007U01z00zU07k01s00Q006001U" 139 | Icon .= "|0xD4D4D4@0.95$13.k0M0A0703zzk0k0M0A060n0NUAk6M3Dzbzk0N" 140 | } 141 | } 142 | 143 | Else If (Client_Width / Client_Height == 2560 / 1080) 144 | { ; 默认数值源于2560*1080分辨率下的测试结果 145 | DetectionPerPixel_Width := 100 * 2 / 2560 ;- 33 * 2 / 2560 146 | DetectionPerPixel_Height := 36 * 2 / 1080 147 | UpperLeftCorner_X := ClientUpperLeftCorner_X ;+ 33 * Client_Width / 2560 148 | UpperLeftCorner_Y := ClientUpperLeftCorner_Y 149 | LowerRightCorner_X := UpperLeftCorner_X + Round(DetectionPerPixel_Width * Client_Width) 150 | LowerRightCorner_Y := UpperLeftCorner_Y + Round(DetectionPerPixel_Height * Client_Height) 151 | LowerRightCorner_X2 := ClientUpperLeftCorner_X + Client_Width ;- 30 * Client_Width / 2560 152 | LowerRightCorner_Y2 := ClientUpperLeftCorner_Y + Client_Height 153 | UpperLeftCorner_X2 := LowerRightCorner_X2 - Round(DetectionPerPixel_Width * Client_Width) 154 | UpperLeftCorner_Y2 := LowerRightCorner_Y2 - Round(DetectionPerPixel_Height * Client_Height) 155 | Switch Client_Height 156 | { 157 | Case "": 158 | 159 | Default: ; [已测试 tested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化96% + 颜色相似二值化100% + 颜色相似二值化100%) 160 | Icon := "|0x313131@1.00$31.7k01w7y01z3z00zVzU0Tvzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0DzDw03z7y01z1y00TUy00DW" 161 | Icon .= "|0x412A2A@0.96$31.1U00s1k00Q3z00zVzU0Ttzs0Txzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1ztzU0zszk0DwTs07w3U00sE" 162 | Icon .= "|0x4B2626@0.96$31.1U00s1k00Q3z00zVzU0Ttzs0Txzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zzzk0zzzs0Tzzw0Dzzy07zzz03zzzU1zvzU0zszk0DwTs07w3U00sE" 163 | Icon .= "|0xFFFFFF@1.00$22.0004000k003000w007k00T007w00zk03z00yA07UE0S107k00w003k00y007U00S007k00w003k00z000w003k007k007U00S000y000w003k007k007UE0S100y400zk03z007w007k00T000w000k0030006" 164 | Icon .= "|0xD4D4D4@1.00$11.ztzk000000001zzzs00000000k1U3060A0NznzU38" 165 | } 166 | } 167 | 168 | Else If (Client_Width / Client_Height == 2560 / 1600) 169 | { ; 默认数值源于2560*1080分辨率下的测试结果 170 | DetectionPerPixel_Width := 66 * 2 / 2560 ; 171 | DetectionPerPixel_Height := 50 * 2 / 1600 172 | UpperLeftCorner_X := ClientUpperLeftCorner_X 173 | UpperLeftCorner_Y := ClientUpperLeftCorner_Y 174 | LowerRightCorner_X := UpperLeftCorner_X + Round(DetectionPerPixel_Width * Client_Width) 175 | LowerRightCorner_Y := UpperLeftCorner_Y + Round(DetectionPerPixel_Height * Client_Height) 176 | LowerRightCorner_X2 := ClientUpperLeftCorner_X + Client_Width 177 | LowerRightCorner_Y2 := ClientUpperLeftCorner_Y + Client_Height 178 | UpperLeftCorner_X2 := LowerRightCorner_X2 - Round(DetectionPerPixel_Width * Client_Width) 179 | UpperLeftCorner_Y2 := LowerRightCorner_Y2 - Round(DetectionPerPixel_Height * Client_Height) 180 | Switch Client_Height 181 | { 182 | Case "": 183 | 184 | Default: ; [未测试 untested](颜色相似二值化100% + 颜色相似二值化96% + 颜色相似二值化96% + 颜色相似二值化100% + 颜色相似二值化100%) 185 | Icon := "|0x313131@1.00$41.0E000007w001z0Ts007y1zs00Ty3zk00zw7zU01zszzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zznzk00zw7zU01zsDz003zk7w001z0Ds003y4" 186 | Icon .= "|0x432929@0.96$41.0s000S07s001y0zw00Dz1zs00Ty3zs00zyTzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zyTz007zkzw00Dz1zs00Ty0T0007U0Q000D0U" 187 | Icon .= "|0x512323@0.96$41.0s000S07s001y0zw00Dz1zw00Tz3zs00zyTzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zzzzU0Dzzzz00Tzzzy00zzzzw01zzzzs03zzzzk07zyTz007zkzw00Dz1zs00Ty0T0007k0w000D0U" 188 | Icon .= "|0xFFFFFF@1.00$29.00002000040000s0001k000DU000T0003y0007w000zs001zk00DzU00Tz003wC007sQ00z0801y0E0Dk000TU003w0007s000z0001y000Dk000TU003w0007s000z0001y000Dw000Ts000Dk000TU000Dk000TU000Dk000TU000Dk000TU000Dk000TU000Dk000TU000Dk200TU400Dk800TUE00DzU00Tz000Dy000Tw000Ds000Tk000DU000T0000C0000Q000080000M" 189 | Icon .= "|0xABABAB@1.00$1.y" 190 | } 191 | } 192 | 193 | Else 194 | { ; 其它比率尚未测试 195 | ;MsgBox, 4,, 请检查当前是否为全屏模式或支持的分辨率! 196 | ;ExitApp 197 | } 198 | } 199 | } 200 | 201 | 202 | ;【函数 Function】自动控制 203 | AutoScale() 204 | { 205 | If WinActive("ahk_exe BH3.exe") 206 | { 207 | Try 208 | { 209 | If (!Toggle_ScreenDetect) 210 | { 211 | Toggle_ScreenDetect := !Toggle_ScreenDetect 212 | ;ScreenDetect() 213 | SetTimer, ScreenDetect, %Timer_ScreenDetect% 214 | } 215 | } 216 | 217 | Finally 218 | { 219 | If (FindText(X, Y, UpperLeftCorner_X, UpperLeftCorner_Y, LowerRightCorner_X, LowerRightCorner_Y, %FaultTolerance_CombatScene_Normal_T%, %FaultTolerance_CombatScene_Normal_B%, Icon)[1].id == "CombatSceneIcon_Normal" || FindText(X, Y, UpperLeftCorner_X, UpperLeftCorner_Y, LowerRightCorner_X, LowerRightCorner_Y, %FaultTolerance_CombatScene_LowHealth_T%, %FaultTolerance_CombatScene_LowHealth_B%, Icon)[1].id == "CombatSceneIcon_LowHealth1" || FindText(X, Y, UpperLeftCorner_X, UpperLeftCorner_Y, LowerRightCorner_X, LowerRightCorner_Y, %FaultTolerance_CombatScene_LowHealth_T%, %FaultTolerance_CombatScene_LowHealth_B%, Icon)[1].id == "CombatSceneIcon_LowHealth2") 220 | { 221 | If (!Status_CombatIcon) 222 | { 223 | Status_CombatIcon := !Status_CombatIcon 224 | } 225 | If (!Toggle_ManualSuspend) 226 | { 227 | If(A_IsSuspended) 228 | { 229 | If (!Status_Occlusion) 230 | Occlusion(Status_Occlusion := !Status_Occlusion) 231 | If (!Toggle_MouseFunction) 232 | { 233 | Toggle_MouseFunction := !Toggle_MouseFunction 234 | If (!Toggle_Restriction) 235 | CoordReset() 236 | Else If (!Status_Restriction) 237 | Status_Restriction := !Status_Restriction 238 | ViewControl_Mod := "Mod1" 239 | SetTimer, ViewControl, %Timer_ViewControl% 240 | } 241 | Suspend, Off 242 | } 243 | } 244 | } 245 | Else 246 | { 247 | If (Status_CombatIcon) 248 | { 249 | Status_CombatIcon := !Status_CombatIcon 250 | } 251 | If (!A_IsSuspended) 252 | { 253 | Suspend, On 254 | If (Toggle_MouseFunction) 255 | { 256 | If (Status_Restriction) 257 | Status_Restriction := !Status_Restriction 258 | SetTimer, ViewControl, Delete 259 | If GetKeyState(Key_SecondSkill, "P") 260 | BreakFlag_Aim := !BreakFlag_Aim 261 | InputReset() 262 | Toggle_MouseFunction := !Toggle_MouseFunction 263 | } 264 | If (Status_Occlusion) 265 | Occlusion(Status_Occlusion := !Status_Occlusion) 266 | } 267 | Else If (!Toggle_ManualSuspend) 268 | { 269 | If (FindText(X, Y, UpperLeftCorner_X, UpperLeftCorner_Y, LowerRightCorner_X, LowerRightCorner_Y, %FaultTolerance_ElysiumLobby_T%, %FaultTolerance_ElysiumLobby_B%, Icon)[1].id == "ElysiumLobbyIcon_UpperLeft" && FindText(X, Y, UpperLeftCorner_X2, UpperLeftCorner_Y2, LowerRightCorner_X2, LowerRightCorner_Y2, %FaultTolerance_ElysiumLobby_T%, %FaultTolerance_ElysiumLobby_B%, Icon)[1].id == "ElysiumLobbyIcon_LowerRight") 270 | { 271 | If (!Toggle_MouseFunction) 272 | { 273 | Toggle_MouseFunction := !Toggle_MouseFunction 274 | CoordReset() 275 | ;If (!Status_Restriction) 276 | ;Status_Restriction := !Status_Restriction 277 | ViewControl_Mod := "Mod2" 278 | SetTimer, ViewControl, %Timer_ViewControl% 279 | } 280 | } 281 | Else 282 | { 283 | If (Toggle_MouseFunction) 284 | { 285 | ;If (Status_Restriction) 286 | ;Status_Restriction := !Status_Restriction 287 | SetTimer, ViewControl, Delete 288 | InputReset() 289 | Toggle_MouseFunction := !Toggle_MouseFunction 290 | } 291 | } 292 | } 293 | } 294 | } 295 | } 296 | 297 | Else 298 | { 299 | InputReset() 300 | } 301 | 302 | Return "Done" 303 | } 304 | 305 | 306 | ; 【函数 Function】手动暂停 307 | ManualSuspend() 308 | { 309 | If (!Toggle_ManualSuspend) 310 | { 311 | Toggle_ManualSuspend := !Toggle_ManualSuspend 312 | Suspend, On 313 | If (Toggle_AutoScale) 314 | { 315 | SetTimer, AutoScale, Delete 316 | Try 317 | { 318 | SetTimer, ScreenDetect, Delete 319 | Toggle_ScreenDetect := False 320 | } 321 | If (Toggle_MouseFunction) 322 | { 323 | If (Status_Restriction) 324 | Status_Restriction := !Status_Restriction 325 | SetTimer, ViewControl, Delete 326 | If GetKeyState(Key_SecondSkill, "P") 327 | BreakFlag_Aim := !BreakFlag_Aim 328 | InputReset() 329 | Toggle_MouseFunction := !Toggle_MouseFunction 330 | } 331 | If (Status_Occlusion) 332 | Occlusion(Status_Occlusion := !Status_Occlusion) 333 | If (Status_CombatIcon) 334 | { 335 | SendEvent, {Esc} 336 | Status_CombatIcon := !Status_CombatIcon 337 | } 338 | } 339 | Else If (Toggle_MouseFunction) 340 | { 341 | SetTimer, ViewControl, Delete 342 | If GetKeyState(Key_SecondSkill, "P") 343 | BreakFlag_Aim := !BreakFlag_Aim 344 | InputReset() 345 | Toggle_MouseFunction := !Toggle_MouseFunction 346 | } 347 | ToolTip, 暂停中 Suspended, 0, 999 ;ToolTip, %Var_Suspended%, 0, 999 ; [可调校数值 adjustable parameters] Variable isn't working 348 | } 349 | Else ;If GetKeyState(Key_Suspend, "P") 350 | { 351 | If (Toggle_AutoScale) 352 | { 353 | SetTimer, AutoScale, %Timer_AutoScale% 354 | Loop 355 | { 356 | Sleep, 1 357 | } Until AutoScale() == "Done" 358 | If (Status_CombatIcon) 359 | { 360 | If (!Status_Occlusion) 361 | Occlusion(Status_Occlusion := !Status_Occlusion) 362 | If (!Toggle_MouseFunction) 363 | { 364 | Toggle_MouseFunction := !Toggle_MouseFunction 365 | If (!Toggle_Restriction) 366 | CoordReset() 367 | Else If (!Status_Restriction) 368 | Status_Restriction := !Status_Restriction 369 | ViewControl_Mod := "Mod1" 370 | SetTimer, ViewControl, %Timer_ViewControl% 371 | } 372 | } 373 | } 374 | Else If (!Toggle_MouseFunction) 375 | { 376 | Toggle_MouseFunction := !Toggle_MouseFunction 377 | If (!Toggle_Restriction) 378 | CoordReset() 379 | Else If (!Status_Restriction) 380 | Status_Restriction := !Status_Restriction 381 | ViewControl_Mod := "Mod1" 382 | SetTimer, ViewControl, %Timer_ViewControl% 383 | } 384 | Suspend, Off 385 | Toggle_ManualSuspend := !Toggle_ManualSuspend 386 | ToolTip, 已启用 Continued, 0, 999 ;ToolTip, %Var_Continued%, 0, 999 ; [可调校数值 adjustable parameters] Variable isn't working 387 | Sleep 210 ; [可调校数值 adjustable parameters] 388 | ToolTip 389 | } 390 | } 391 | 392 | 393 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /GUI/Changelogs/v0.1.+.txt: -------------------------------------------------------------------------------- 1 | [0.1.2] - 2022-02-28 2 | 3 | - [Fix] Now it won't affect other 3D programs anymore. 4 | > 5 | - [修复] 现在程序将不再对其它3D游戏造成影响。 6 | 7 | 8 | [0.1.1] - 2022-02-28 9 | 10 | - [Fix] Issues that occurred when switching active windows through keyboard shortcuts 11 | > 12 | - [修复] 使用快捷键切换窗口时程序仍在运行的问题 13 | 14 | 15 | [0.1.0] - 2022-02-04 16 | 17 | - Stable version release with several bugs fixed. 18 | > 19 | - 正式版已发布,修复了若干bug并完善了部分功能 20 | 21 | -------------------------------------------------------------------------------- /GUI/Changelogs/v0.2.+.txt: -------------------------------------------------------------------------------- 1 | [0.2.9] - 2022-05-08 2 | 3 | - [Fix] Modified some labels that might cause the occurrence of certain types of interruptions to the custom functions. 4 | - [Add] New function: After pressing down the activation button, options will pop up to let non-admin users choose whether to run program as administrators. 5 | > 6 | - [修复] 修改了部分可能导致自定义函数被中断的标签。 7 | - [增添] 新功能:按下启动按钮后,会弹出让非管理员用户选择是否以管理员身份运行程序的选项。 8 | 9 | 10 | [0.2.7] - 2022-05-05 11 | 12 | - [Fix] Delete and improved codes that would cause jumbled records. 13 | - [Add] New function: Aiming mode now supports using mouse to control cross hair. 14 | > 15 | - [修复] 删除并改进了会造成冗杂记录的代码。 16 | - [增添] 新功能:瞄准模式现已支持使用鼠标来操控准星。 17 | 18 | 19 | [0.2.5] - 2022-05-04 20 | 21 | - [Fix] Provide a more efficient scheme of View-control operation. 22 | - [Coming soon] New aiming mode that use mouse to control cross hair instead of using direction keys. (Still working on it) 23 | > 24 | - [修复] 提供了一种更为高效的视角操控方案。 25 | - [预告] 新的瞄准模式将用鼠标代替方向键来操控准星。(尚在制作中) 26 | 27 | 28 | [0.2.3] - 2022-03-26 29 | 30 | - [Fix] Issues that might occurred while hotkey "Left Shift" is pressed down. 31 | - [Fix] View-control and mouse-drag operations improved, 32 | - [Coming soon] New aiming mode that use mouse to control cross hair instead of using direction keys. 33 | > 34 | - [修复] 在按下键盘左侧Shift键时可能导致的一些问题。 35 | - [修复] 改进了视角操控与鼠标拖拽操作。 36 | - [预告] 新的瞄准模式将用鼠标代替方向键来操控准星。 37 | 38 | 39 | [0.2.1] - 2022-03-07 40 | 41 | - [Fix] No effects/ non-response when suspending or reloading scripts through hotkey "F1"/ "F3" . 42 | > 43 | - [修复] 通过F1键/F3键进行程序暂停或重启时没有效果/无响应。 44 | 45 | 46 | [0.2.0] - 2022-03-05 47 | 48 | - [Fix] Rewrote all the codes that related to the view-control function, so it won't be that easy to be interrupted. 49 | - [Fix] The mouse cruiser could sometimes flash back to the center of the window, now it's fixed and the graphic can be dragged when clicking down the mouse. 50 | - [Fix] Problems that occurred while hotkey "E" is released during the aiming mode. 51 | - [Add] New function: the middle mouse button can now be used to toggle the view-control function, there're also tips showing up in the screen's left corner to claim the current status when the function is activated or closed. 52 | > 53 | - [修复] 重写所有与视角操控功能相关的代码,使其抗打断能力大幅提升。 54 | - [修复] 鼠标光标有时会闪回到窗口正中央,现在已被修复且支持在按下鼠标键时进行画面拖动操作。 55 | - [修复] 松开E键退出瞄准模式时可能触发的问题。 56 | - [增添] 新功能:鼠标中键现在可用于触发视角操控功能,且屏幕左下角会有当前功能激活/关闭时的状态提示。 -------------------------------------------------------------------------------- /GUI/Changelogs/v0.3.+.txt: -------------------------------------------------------------------------------- 1 | [0.3.9] - 2022-11-03 2 | 3 | - [Fix] Cursor would still be restricted in the zone even after the combat. 4 | - [Add] Tray menu function: Config Delete (Located in the others bar) 5 | - [Add] Start-up interface function: Automatic Identification Params Tuning (Located in the function bar). Please note that this function is still in the pilot phase, parameters can be restored through the 'Config Reset' function if any exception occurs 6 | - [Add] Start-up interface function: Config Reset (Located in the settings bar) 7 | - [Improve] Start-up interface function: Changelog Check (Located in the settings bar) 8 | - [Improve] Dependency library updated 9 | - [Improve] Code structure reduxed for better operating speed and readability 10 | > 11 | - [修复] 进入非战斗界面时光标限制仍未解除的问题 12 | - [新增] 托盘菜单功能:删除配置文件(位于其它栏) 13 | - [新增] 启动界面功能:识别系统调参(位于功能栏),该功能处于试验阶段,若出现异常可以通过载入默认配置来恢复参数 14 | - [新增] 启动界面功能:载入默认配置(位于设置栏) 15 | - [改进] 启动界面功能:查看更新日志(位于设置栏) 16 | - [改进] 更新了依赖库 17 | - [改进] 重置了代码结构以提升运行速度和可读性 18 | 19 | 20 | [0.3.8] - 2022-10-22 21 | 22 | [Fix] The program gives an error while trying to open the configuration file via tray menus. 23 | [Fix] Issues that the surface cheking key (F3 by default) wouldn't response in combat. 24 | [Fix] While in combat, the cursor permanently disappeared after releasing LAlt key for the left-click function. 25 | [Fix] While in combat, the "cursor occlusion" took no effect when the suspending/continuing key (F1 by default) was pressed to resume the program. 26 | [Fix] Code structure ("Automatic Identification" function related) optimised. 27 | > 28 | [修复] 通过托盘菜单打开配置文件时程序报错的问题 29 | [修复] 在非战斗状态下调出界面键无法生效的问题 30 | [修复] 在战斗状态下按住Alt键以正常使用鼠标后光标永久消失的问题 31 | [修复] 在战斗状态下按下暂停/启用键以恢复程序运行时光标无法隐藏的问题 32 | [修复] 优化了识别系统相关的代码结构 33 | 34 | 35 | [0.3.7] - 2022-10-14 36 | 37 | [Fix] Wrong statements and needless functions revised 38 | [Add] New function: Better Keymap Costumizing. The whole keymap is now availabe for keyboard and mouse key adjustment. 39 | > 40 | [修复] 对一些错误语义和无用函数进行修正 41 | [增添] 新功能:更好的键位自定义。现支持对所有按键操作进行键盘、鼠标键位自定义 42 | 43 | 44 | [0.3.6] - 2022-10-07 45 | 46 | - [Fix] The middle mouse button would probabily remained as click-down status after switching out from the game, 47 | - [Fix] Issues that the mouse key can't be customized and displayed. However, so far the solution is to use combobox to adjust the mouse keys. 48 | - [Add] New function: better tray menu. By right-clicking on the tray icon and move to the "Else" section, can the configuration file be directly accessed. 49 | > 50 | - [修复] 切出游戏后鼠标中键按下状态有概率未解除的问题 51 | - [修复] 鼠标键无法显示和自定义的问题,但目前只能通过下拉栏目切换鼠标键 52 | - [增添] 新功能:功能化托盘菜单。在系统托盘处对图标右键可以在“其它”栏目中直接打开配置文件 53 | 54 | 55 | [0.3.5] - 2022-10-01 56 | 57 | - [Fix] Issues that the charged attack and main skills might get unexpectedly interrupted or toggled. 58 | - [Fix] The selection result of the option "Occluded Cursor" won't be saved properly after it's checked. 59 | - [Add] New function: Custom Key Map. To adjust the default key map, just click the box and press down the key you want (pressing Del or Backspace would set the box to empty). 60 | - [Warning] Due to the technical problem, some keys may not display in the box. However, it won't affect the usage of those keys. 61 | > 62 | - [修复] 蓄力攻击和主技能会被意外打断或触发的问题 63 | - [修复] 勾选了”可隐藏光标“选项的选择结果无法被正确保存的问题 64 | - [增添] 新功能:自定义键位。若要更改默认键位,点击框并按下想要的按键即可(按Del键或Backspace键可清空框) 65 | - [警告] 由于技术原因,部分按键可能无法显示在框中,不过并不影响它们的使用 66 | 67 | 68 | [0.3.4] - 2022-09-18 69 | 70 | - [Fix] Some unstable factors caused by the "Automatic Identification" function's parameters. 71 | - [Add] New function: The "Occluded Cursor". The cursor will automatically hide in combat after this option is toggled, but mind that this funtion would only work under the premise of toggling the "Automatic Identification". 72 | > 73 | - [修复] 部分由自动识别功能参数造成的不稳定因素 74 | - [增添] 新功能:可隐藏光标——启用该项后光标会在战斗场景下自动隐藏,但注意前提是启用了自动识别 75 | 76 | 77 | [0.3.3] - 2022-09-14 78 | 79 | - [Fix] Cursor would run out from the safe zone with probabilities. 80 | - [Fix] More fluent transititon between the normal attack and charge attack to make the operattion become consistent. 81 | > 82 | - [修复] 瞄准模式下光标一定概率漂出限制区域的问题 83 | - [修复] 蓄力攻击和非蓄力普攻之间的衔接流畅度问题 84 | 85 | 86 | [0.3.2] - 2022-09-13 87 | 88 | - [Fix] No key response in combat scene under the 2560*1440 resolution. 89 | - [Add] New resolution supported: 2560*1080. 90 | - [Add] New function: customizable ini file which is used to save users' configurations of the programm settings. It would be loaded each time after starting the programm. 91 | > 92 | - [修复] 2k分辨率下战斗时键位无响应的问题 93 | - [增添] 新支持的分辨率:2560*1080 94 | - [增添] 新功能:用于保存用户程序设置的可自定义配置文件(ini),每次启动程序后它都会被加载 95 | 96 | 97 | [0.3.1] - 2022-09-05 98 | 99 | - [Fix] The simplified version running isssues. 100 | - [Fix] No response in specific combat scene while "automatic identification" is toggled. 101 | - [Add] New function: The "Restricted Cursor". In combat, the cursor would be restricted in safe zone to avoid toggling the UI buttons. 102 | > 103 | - [修复] 精简版运行问题 104 | - [修复] 在部分场景下因识别故障而导致的战斗无响应的问题 105 | - [增添] 新功能:限制性光标——战斗场景下会将光标限制于安全区域内以避免触发UI 106 | 107 | 108 | [0.3.0] - 2022-08-29 109 | 110 | - [Fix] Issues that might occurred after "run as admin" option is chosen. 111 | - [Add] New function: The "automatic identification". Key maps only take effect in combat scene. 112 | - [Add] New function: Slacking helper! The game would automaticly pause while switching or rearranging windows by pressing shortcut AltTab or WinTab. 113 | - [Add] New function: GUI with customizable settings. 114 | > 115 | - [修复] 选择以管理员身份运行后可能出现的一些问题 116 | - [增添] 新功能:自动识别——键位仅在战斗场景生效 117 | - [增添] 新功能:摸鱼帮手——战斗场景内使用快捷键切换窗口时会自动暂停游戏 118 | - [增添] 新外观:支持自定义设置的界面 -------------------------------------------------------------------------------- /GUI/Changelogs/v0.4.+.txt: -------------------------------------------------------------------------------- 1 | [0.4.4] - 2023-02-03 2 | 3 | - [Fix] The Automatic Identification can't handle remapping properly while in low health status in combat scene 4 | - [Fix] The issue that the "FT_DangerCombat_" slider for param tuning took no effect 5 | - [Fix] Programm failure caused by invalid variables 6 | - [Add] Resolution support : 3840 x 2160 (tested), 2560 x 1600 (untested) 7 | - [Improve] Speed up program loading at first startup 8 | - [Improve] Brand new icon (self-made) 9 | > 10 | - [修复] 低血量战斗状态下由自动识别功能误判而导致的操作无响应的问题 11 | - [修复] “濒危战斗识别容错率”调参滑条失效的问题 12 | - [修复] 不合法参数导致的程序报错 13 | - [新增] 分辨率支持:3840 x 2160(已测试)、2560 x 1600(未测试) 14 | - [改进] 提升初次加载速度 15 | - [改进] 新的图标(自制) 16 | 17 | 18 | [0.4.3] - 2022-11-28 19 | 20 | - [Fix] The "Cursor Restriction" took no effect after unchecking the "Automatic Idendification" option. 21 | - [Fix] Update installation failure caused by path access error. 22 | - [Add] Global function: Language Detect. Automaticly detects system languagecode and provides corresponding translation (Currently supports Chinese and English). 23 | - [Improve] View-control function optimzed to speed up the response time of mouse movement. 24 | - [Improve] Startup interface layout adapted for English version. 25 | > 26 | - [修复] 在关闭全自动识别后无法使用限制性光标功能的问题 27 | - [修复] 由路径读取错误导致的更新安装失败的问题 28 | - [新增] 全局功能:检测语言,自动检测当前系统语言并提供相应的翻译(目前支持中文和英文) 29 | - [改进] 优化了视角跟随功能以增强对鼠标移动的响应速度 30 | - [改进] 调整了启动界面布局以适应英文版本 31 | 32 | 33 | [0.4.1] - 2022-11-22 34 | 35 | - [Fix] Unstable update service due to callback failure 36 | - [Fix] The iteration speed of Screen Detect Function would sometimes be abnormal. 37 | - [Fix] The left-click function might cause an error while in combat. 38 | - [Improve] View-control function enhanced for smoother camera rotation. 39 | - [Improve] Revised details of interface (layout adjustment, background image etc.) and code blocks. 40 | > 41 | - [修复] 回调函数故障导致的升级服务不稳定的问题 42 | - [修复] 屏幕检测功能的速率有概率出现异常的问题 43 | - [修复] 战斗中使用左键点击功能有概率报错的问题 44 | - [改进] 增强了视角跟随功能以减小镜头顿挫感 45 | - [改进] 修改了界面内容以及代码块的一些细节 46 | 47 | 48 | [0.4.0] - 2022-11-11 49 | 50 | - [Fix] Mouse Functions (View Control, Aim Control, Mouse Cursor, et cetera) would'nt be toggled automaticly in combat while the suspending/continuing key (F1 by default) was pressed to resume the suspended program. 51 | - [Fix] Failed to load key names correctly (also in wrong order) when customizing mouse buttons through combobox. 52 | - [Fix] Due to the invalid name of some parameters, the Automatic Identification Params Tuning function could't work properly. 53 | - [Add] Start-up interface function: Check for Update (Located in the settings bar). Download and installation would be provided when new version is available. 54 | - [Improve] Remastered the "Automatic Identification" function related code structure to raise the speed of program response. 55 | > 56 | - [修复] 在战斗界面内按下暂停/启用键以恢复程序运行时视角跟随等功能未自动生效的问题 57 | - [修复] 在启动界面内使用下拉列表自定义鼠标键时按键名未正常显示以及排序错误的问题 58 | - [修复] 由部分参数名称错误导致的识别系统调参功能无效化的问题 59 | - [新增] 启动界面功能:检查更新(位于设置栏),当检测到新版本时可直接下载并安装 60 | - [改进] 重制了识别系统相关的代码结构以提升响应速度 -------------------------------------------------------------------------------- /GUI/Images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/GUI/Images/1.png -------------------------------------------------------------------------------- /GUI/Images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/GUI/Images/2.png -------------------------------------------------------------------------------- /GUI/Images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/GUI/Images/3.png -------------------------------------------------------------------------------- /GUI/Images/Backup/Bronya.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/GUI/Images/Backup/Bronya.psd -------------------------------------------------------------------------------- /GUI/Images/Backup/Kiana.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/GUI/Images/Backup/Kiana.psd -------------------------------------------------------------------------------- /GUI/Images/Backup/Seele.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/GUI/Images/Backup/Seele.psd -------------------------------------------------------------------------------- /Hotkeys_Combat.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放战斗功能相关的热键 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | ;【热键 Hotkey】点击自定义键以激活鼠标控制 7 | ;Key_ViewControl: 8 | Key_MouseFunction: 9 | If GetKeyState(Key_MouseFunction, "P") ; 通过行为检测防止被部分函数 Function唤醒 10 | { 11 | Toggle_MouseFunction := !Toggle_MouseFunction 12 | If (Toggle_MouseFunction) 13 | { 14 | CoordReset() 15 | SetTimer, ViewControl, %Timer_ViewControl% 16 | ToolTip, %Var_View_Control_On%, 0, 999 ; [可调校数值 adjustable parameters] 17 | Sleep 999 ; [可调校数值 adjustable parameters] 18 | ToolTip 19 | } 20 | Else 21 | { 22 | SetTimer, ViewControl, Delete 23 | InputReset() 24 | ToolTip, %Var_View_Control_Off%, 0, 999 ; [可调校数值 adjustable parameters] 25 | Sleep 999 ; [可调校数值 adjustable parameters] 26 | ToolTip 27 | } 28 | } 29 | Return 30 | 31 | 32 | ;【热键 Hotkey】点按自定义键以发动普攻 33 | Key_NormalAttack: 34 | If GetKeyState(Key_NormalAttack, "P") ; 通过行为检测防止被ViewControlTemp函数唤醒 35 | { 36 | SendInput, {j Down} 37 | If (Toggle_MouseFunction) 38 | { 39 | SetTimer, ViewControl, Off 40 | Loop 41 | { 42 | ViewControlTemp() 43 | }Until Not GetKeyState(A_ThisHotkey, "P") 44 | SetTimer, ViewControl, On 45 | } 46 | Else 47 | KeyWait, %Key_NormalAttack% ;KeyWait, %Key_NormalAttack%, L 48 | SendInput, {j Up} 49 | } 50 | Return 51 | 52 | 53 | ;【热键 Hotkey】按下自定义键以发动必杀技 54 | Key_MainSkill: 55 | If GetKeyState(Key_MainSkill, "P") ; 通过行为检测防止被ViewControlTemp函数唤醒 56 | { 57 | SendInput, {i Down} 58 | If (Toggle_MouseFunction) 59 | { 60 | SetTimer, ViewControl, Off 61 | Loop 62 | { 63 | ViewControlTemp() 64 | }Until Not GetKeyState(A_ThisHotkey, "P") 65 | SetTimer, ViewControl, On 66 | } 67 | Else 68 | KeyWait, %Key_MainSkill% ;KeyWait, %Key_MainSkill%, L 69 | SendInput, {i Up} 70 | } 71 | Return 72 | 73 | 74 | ;【热键 Hotkey】按下自定义键以发动武器技/后崩坏书必杀技,长按自定义键进入瞄准模式时可用鼠标键操控准心 75 | Key_SecondSkill: 76 | If GetKeyState(Key_SecondSkill, "P") ; 通过行为检测防止被ViewControlTemp函数唤醒 77 | { 78 | SendInput, {u Down} 79 | If (Toggle_MouseFunction) 80 | AimControl() 81 | Else 82 | KeyWait, %Key_SecondSkill% ;KeyWait, %Key_SecondSkill%, T3 83 | SendInput, {u Up} 84 | } 85 | Return 86 | 87 | 88 | ;【热键 Hotkey】按下自定义键以发动人偶技 89 | Key_DollSkill: 90 | SendInput, {l Down} 91 | KeyWait, %Key_DollSkill% ;KeyWait, %Key_DollSkill%, L 92 | SendInput, {l Up} 93 | Return 94 | 95 | 96 | ;【热键 Hotkey】按下自定义键以发动闪避/冲刺 97 | Key_Dodging: 98 | SendInput, {k Down} 99 | KeyWait, %Key_Dodging1% ;KeyWait, %Key_Dodging1%, L 100 | SendInput, {k Up} 101 | Return 102 | 103 | 104 | ;【热键 Hotkey】按住键盘左侧ALT以正常使用鼠标左键 105 | ; ~*!LButton::LButton 106 | ~LAlt:: 107 | Try 108 | Hotkey, LButton, Off 109 | 110 | If (Toggle_AutoScale) 111 | { 112 | If (Toggle_MouseFunction) 113 | { 114 | SetTimer, ViewControl, Delete 115 | If GetKeyState(Key_SecondSkill, "P") 116 | BreakFlag_Aim := !BreakFlag_Aim 117 | InputReset() 118 | Toggle_MouseFunction := !Toggle_MouseFunction 119 | } 120 | If (Status_Occlusion) 121 | Occlusion(Status_Occlusion := !Status_Occlusion) 122 | KeyWait, LAlt 123 | If (Status_CombatIcon) 124 | { 125 | If (!Status_Occlusion) 126 | Occlusion(Status_Occlusion := !Status_Occlusion) 127 | If (!Toggle_MouseFunction) 128 | { 129 | Toggle_MouseFunction := !Toggle_MouseFunction 130 | CoordReset() 131 | SetTimer, ViewControl, %Timer_ViewControl% 132 | } 133 | } 134 | } 135 | Else If (Toggle_MouseFunction) 136 | { 137 | SetTimer, ViewControl, Delete 138 | If GetKeyState(Key_SecondSkill, "P") 139 | BreakFlag_Aim := !BreakFlag_Aim 140 | InputReset() 141 | KeyWait, LAlt 142 | SetTimer, ViewControl, %Timer_ViewControl% 143 | } 144 | Else 145 | KeyWait, LAlt 146 | 147 | Try 148 | Hotkey, LButton, On 149 | Return 150 | 151 | 152 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /Hotkeys_Management.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放控制功能相关的热键 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | ;【热键 Hotkey】按下自定义键以暂停/启用程序 7 | Key_Suspend: 8 | Suspend, Permit 9 | ManualSuspend() 10 | Return 11 | 12 | 13 | ;【热键 Hotkey】按下自定义键以重启程序(呼出启动界面) 14 | Key_Reload: 15 | Suspend, Permit 16 | ManualSuspend() 17 | Reload 18 | Return 19 | 20 | 21 | ;【热键 Hotkey】对Win+Tab快捷键的支持命令 22 | #Tab:: 23 | ManualSuspend() 24 | WinSet, AlwaysOnTop, Off, A 25 | SendInput, #{Tab} 26 | Return 27 | 28 | 29 | ;【热键 Hotkey】对Alt+Tab快捷键的支持命令 30 | !Tab:: 31 | ManualSuspend() 32 | WinSet, AlwaysOnTop, Off, A 33 | SendInput, !{Tab} 34 | Return 35 | 36 | 37 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/dbcd9b13d1d63cc3cbc8eb4e6555ed05d0a47ee9/Icon.ico -------------------------------------------------------------------------------- /Installer.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放安装功能相关的代码。记得在打包成可执行(EXE)文件后要放到EXE文件夹中哦 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | #SingleInstance, Force 7 | 8 | 9 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 10 | 11 | 12 | SetWorkingDir, ../%A_WorkingDir% 13 | 14 | 15 | FullCommandLine := DllCall("GetCommandLine", "str") 16 | If Not (A_IsAdmin or RegExMatch(FullCommandLine, " /restart(?!\S)")) 17 | { 18 | Try 19 | { 20 | If A_IsCompiled 21 | Run *RunAs "%A_ScriptFullPath%" /restart 22 | Else 23 | Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%" 24 | } 25 | ExitApp 26 | } 27 | 28 | 29 | Try 30 | RunWait, PowerShell.exe -Command "Move-Item -Path ./Temp/BH3_Hotkey.exe -Destination ./ -Force", , Hide 31 | Catch 32 | MsgBox, 16, Warning, Failed to run Shell! 33 | Finally 34 | Run, ./BH3_Hotkey.exe 35 | ExitApp 36 | 37 | 38 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /Interface.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放界面功能相关的代码 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | Global ForceToOverwrite := False ; Turn it to "True" for config overwriting. 7 | 8 | 9 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 10 | 11 | 12 | ;【函数 Function】禁用关闭按钮 13 | DisableButtonX() 14 | { 15 | WinGet, id, ID, A 16 | menu := DLLCall("user32/GetSystemMenu", "UInt", id, "UInt", 0) 17 | DLLCall("user32/DeleteMenu", "UInt", menu, "UInt", 0xF060, "UInt", 0x0) 18 | WinGetPos ,x, y, w, h, ahk_id %id% 19 | WinMove, ahk_id %id%,, %x%, %y%, %w%, % h-1 20 | WinMove, ahk_id %id%,, %x%, %y%, %w%, % h+1 21 | } 22 | 23 | 24 | ;【函数 Function】对话框自动消失 25 | AutoFadeMsgbox() 26 | { 27 | DLLCall("AnimateWindow", UInt, WinExist("ahk_class #32770"), Int, 500, UInt, 0x90000) 28 | } 29 | 30 | 31 | ;【函数 Function】终止进程 32 | ForceQuit() 33 | { 34 | SplitPath, A_AhkPath, AHK_name 35 | exe := A_IsCompiled ? A_ScriptName : AHK_name 36 | Run, %ComSpec% /c taskkill /f /IM %exe%, , Hide 37 | } 38 | 39 | 40 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 41 | 42 | 43 | ;【位置 Path】设定位置 44 | Try 45 | { 46 | RootDIR = C:/BH3_Hotkey 47 | 48 | FileCreateDir, %RootDIR% 49 | 50 | FileCreateDir, %RootDIR%/Config 51 | INI_DIR = %RootDIR%/Config/BH3_Hotkey.ini 52 | 53 | FileCreateDir, %RootDIR%/GUI 54 | FileCreateDir, %RootDIR%/GUI/Changelogs 55 | Changelog_DIR1 = %RootDIR%/GUI/Changelogs/v0.1.+.txt 56 | Changelog_DIR2 = %RootDIR%/GUI/Changelogs/v0.2.+.txt 57 | Changelog_DIR3 = %RootDIR%/GUI/Changelogs/v0.3.+.txt 58 | Changelog_DIR4 = %RootDIR%/GUI/Changelogs/v0.4.+.txt 59 | 60 | FileCreateDir, %RootDIR%/GUI/Images 61 | Image_DIR1 = %RootDIR%/GUI/Images/1.png 62 | Image_DIR2 = %RootDIR%/GUI/Images/2.png 63 | Image_DIR3 = %RootDIR%/GUI/Images/3.png 64 | FileInstall, GUI/Images/1.png, %Image_DIR1%, 1 65 | FileInstall, GUI/Images/2.png, %Image_DIR2%, 1 66 | FileInstall, GUI/Images/3.png, %Image_DIR3%, 1 67 | } 68 | 69 | 70 | ;【配置 INI】创建配置 71 | Try 72 | IniRead, TestString, %INI_DIR%, Initial, %Var_Execute_Initial_Setup% 73 | Catch 74 | { 75 | Reload 76 | } 77 | Finally 78 | { 79 | If (TestString == "ERROR" || ForceToOverwrite == True) 80 | { 81 | Try 82 | RunWait, PowerShell.exe -Command "Get-ChildItem -Path C:/ -Recurse -Filter '*BH3_Hotkey*.ini' | Remove-Item -Force" -Command "Exit", , Hide 83 | Catch 84 | MsgBox, 16, Warning, Failed to run Shell! 85 | /* 86 | TestString := %Var_Done% 87 | IniWrite, %TestString%, %INI_DIR%, Initial, %Var_Execute_Initial_Setup% 88 | 89 | IniWrite, Q, %INI_DIR%, Keymaps, %Var_Main_Skill%1 90 | IniWrite, %Var_None%, %INI_DIR%, Keymaps, %Var_Main_Skill%2 91 | IniWrite, E, %INI_DIR%, Keymaps, %Var_Weapon_Skill%1 92 | IniWrite, %Var_None%, %INI_DIR%, Keymaps, %Var_Weapon_Skill%2 93 | IniWrite, Z, %INI_DIR%, Keymaps, %Var_Doll_Skill%1 94 | IniWrite, %Var_None%, %INI_DIR%, Keymaps, %Var_Doll_Skill%2 95 | IniWrite, LShift, %INI_DIR%, Keymaps, %Var_Dodging%1 96 | IniWrite, RButton, %INI_DIR%, Keymaps, %Var_Dodging%2 97 | IniWrite, %Var_None%, %INI_DIR%, Keymaps, %Var_Normal_Attack%1 98 | IniWrite, LButton, %INI_DIR%, Keymaps, %Var_Normal_Attack%2 99 | ;IniWrite, LAlt + LButton, %INI_DIR%, Keymaps, 正常点击 100 | IniWrite, %Var_None%, %INI_DIR%, Keymaps, %Var_View_Control%1 101 | IniWrite, MButton, %INI_DIR%, Keymaps, %Var_View_Control%2 102 | IniWrite, F1, %INI_DIR%, Keymaps, %Var_StopOrBegin%1 103 | IniWrite, %Var_None%, %INI_DIR%, Keymaps, %Var_StopOrBegin%2 104 | IniWrite, F3, %INI_DIR%, Keymaps, %Var_Reload%1 105 | IniWrite, %Var_None%, %INI_DIR%, Keymaps, %Var_Reload%2 106 | 107 | IniWrite, 1, %INI_DIR%, Options, %Var_Run_as_Admin% ; Checked by default 108 | IniWrite, 1, %INI_DIR%, Options, %Var_Auto_Identification% ; Checked by default 109 | IniWrite, 1, %INI_DIR%, Options, %Var_Cursor_Occlusion% ; Checked by default 110 | IniWrite, 1, %INI_DIR%, Options, %Var_Cursor_Restriction% ; Checked by default 111 | 112 | IniWrite, 1, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_Normal_T_Percentage% 113 | IniWrite, 1, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_Normal_B_Percentage% 114 | IniWrite, 3, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_LowHealth_T_Percentage% 115 | IniWrite, 3, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_LowHealth_B_Percentage% 116 | IniWrite, 1, %INI_DIR%, Params, %Var_FaultTolerance_ElysiumLobby_T_Percentage% 117 | IniWrite, 1, %INI_DIR%, Params, %Var_FaultTolerance_ElysiumLobby_B_Percentage% 118 | */ 119 | FileInstall, Config/Preset_Keyboard/BH3_Hotkey.ini, %INI_DIR%, 1 120 | } 121 | Try ;IfExist, %INI_DIR% 122 | { 123 | IniRead, Key_MainSkill1, %INI_DIR%, Keymaps, %Var_Main_Skill%1 124 | IniRead, Key_MainSkill2, %INI_DIR%, Keymaps, %Var_Main_Skill%2 125 | IniRead, Key_SecondSkill1, %INI_DIR%, Keymaps, %Var_Weapon_Skill%1 126 | IniRead, Key_SecondSkill2, %INI_DIR%, Keymaps, %Var_Weapon_Skill%2 127 | IniRead, Key_DollSkill1, %INI_DIR%, Keymaps, %Var_Doll_Skill%1 128 | IniRead, Key_DollSkill2, %INI_DIR%, Keymaps, %Var_Doll_Skill%2 129 | IniRead, Key_Dodging1, %INI_DIR%, Keymaps, %Var_Dodging%1 130 | IniRead, Key_Dodging2, %INI_DIR%, Keymaps, %Var_Dodging%2 131 | IniRead, Key_NormalAttack1, %INI_DIR%, Keymaps, %Var_Normal_Attack%1 132 | IniRead, Key_NormalAttack2, %INI_DIR%, Keymaps, %Var_Normal_Attack%2 133 | ;IniRead, Key_LeftClick, %INI_DIR%, Keymaps, 正常点击 134 | IniRead, Key_MouseFunction1, %INI_DIR%, Keymaps, %Var_View_Control%1 135 | IniRead, Key_MouseFunction2, %INI_DIR%, Keymaps, %Var_View_Control%2 136 | IniRead, Key_Suspend1, %INI_DIR%, Keymaps, %Var_StopOrBegin%1 137 | IniRead, Key_Suspend2, %INI_DIR%, Keymaps, %Var_StopOrBegin%2 138 | IniRead, Key_Reload1, %INI_DIR%, Keymaps, %Var_Reload%1 139 | IniRead, Key_Reload2, %INI_DIR%, Keymaps, %Var_Reload%2 140 | 141 | IniRead, RunAsAdmin, %INI_DIR%, Options, %Var_Run_as_Admin% 142 | IniRead, EnableAutoScale, %INI_DIR%, Options, %Var_Auto_Identification% 143 | IniRead, EnableOcclusion, %INI_DIR%, Options, %Var_Cursor_Occlusion% 144 | IniRead, EnableRestriction, %INI_DIR%, Options, %Var_Cursor_Restriction% 145 | 146 | IniRead, FaultTolerance_CombatScene_Normal_T_Percentage, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_Normal_T_Percentage% 147 | IniRead, FaultTolerance_CombatScene_Normal_B_Percentage, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_Normal_B_Percentage% 148 | IniRead, FaultTolerance_CombatScene_LowHealth_T_Percentage, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_LowHealth_T_Percentage% 149 | IniRead, FaultTolerance_CombatScene_LowHealth_B_Percentage, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_LowHealth_B_Percentage% 150 | IniRead, FaultTolerance_ElysiumLobby_T_Percentage, %INI_DIR%, Params, %Var_FaultTolerance_ElysiumLobby_T_Percentage% 151 | IniRead, FaultTolerance_ElysiumLobby_B_Percentage, %INI_DIR%, Params, %Var_FaultTolerance_ElysiumLobby_B_Percentage% 152 | } 153 | Finally 154 | { 155 | ; Not working with dict 156 | /* 157 | Dict := {"MouseKey1": "LButton", "MouseKey2": "MButton", "MouseKey3": "RButton", "MouseKey4": %Var_None%} 158 | Counter := 0 159 | For Key, Value in Dict 160 | { 161 | Counter += 1 162 | If (Key_MainSkill2 == "%Value%") 163 | Key_MainSkill2_DDL := %Counter% 164 | If (Key_SecondSkill2 == "%Value%") 165 | Key_SecondSkill2_DDL := %Counter% 166 | If (Key_DollSkill2 == "%Value%") 167 | Key_DollSkill2_DDL := %Counter% 168 | If (Key_Dodging2 == "%Value%") 169 | Key_Dodging2_DDL := %Counter% 170 | If (Key_NormalAttack2 == "%Value%") 171 | Key_NormalAttack2_DDL := %Counter% 172 | If (Key_MouseFunction2 == "%Value%") 173 | Key_MouseFunction2_DDL := %Counter% 174 | If (Key_Suspend2 == "%Value%") 175 | Key_Suspend2_DDL := %Counter% 176 | If (Key_Reload2 == "%Value%") 177 | Key_Reload2_DDL := %Counter% 178 | } 179 | */ 180 | ; But works with list 181 | List := ["LButton", "MButton", "RButton", %Var_None%] 182 | Loop % List.Length() 183 | { 184 | If (Key_MainSkill2 == List[A_Index]) 185 | Key_MainSkill2_DDL := A_Index 186 | If (Key_SecondSkill2 == List[A_Index]) 187 | Key_SecondSkill2_DDL := A_Index 188 | If (Key_DollSkill2 == List[A_Index]) 189 | Key_DollSkill2_DDL := A_Index 190 | If (Key_Dodging2 == List[A_Index]) 191 | Key_Dodging2_DDL := A_Index 192 | If (Key_NormalAttack2 == List[A_Index]) 193 | Key_NormalAttack2_DDL := A_Index 194 | If (Key_MouseFunction2 == List[A_Index]) 195 | Key_MouseFunction2_DDL := A_Index 196 | If (Key_Suspend2 == List[A_Index]) 197 | Key_Suspend2_DDL := A_Index 198 | If (Key_Reload2 == List[A_Index]) 199 | Key_Reload2_DDL := A_Index 200 | } 201 | } 202 | } 203 | 204 | 205 | ;【菜单 Menu】托盘菜单 206 | Menu, Tray, NoStandard ; 删除原有托盘菜单 207 | 208 | Menu, Else, Add, %Var_Config_Check%, Config_Check 209 | Menu, Else, Add, %Var_Config_Delete%, Config_Delete 210 | ;Menu, Else, Add, Var_Debugging_Log, Debug 211 | Menu, Else, Add, %Var_Coming_Soon%, Nothing 212 | 213 | Menu, Tray, Add, %Var_Else%, :Else 214 | Menu, Tray, Add, %Var_Reload%, Menu_Reload 215 | Menu, Tray, Add, %Var_Exit%, Menu_Exit 216 | 217 | ;【界面 GUI】说明界面 218 | ;Gui, Start: Color, FFFFFF 219 | Gui, Start: +LastFound 220 | WinSet, TransColor, FEFFFF 222 ; WinSet, Transparent, 222 221 | Gui, Start: Font, s12, 新宋体 222 | Gui, Start: Add, Tab3, , %Var_Keymaps%|%Var_Functions%|%Var_Settings% 223 | 224 | Gui, Start: Tab, %Var_Keymaps% 225 | Gui, Start: Add, Text, Xm+18 Ym+18 ; 控距 226 | Gui, Start: Add, GroupBox, W333 H210, 战斗 Combat 227 | Gui, Start: Add, Text, Xp+18 Yp+18 ; 集体缩进 228 | Gui, Start: Add, Text, Xp Yp+15, : %Var_Main_Skill% 229 | Gui, Start: Add, Hotkey, Xp Yp W84 vKey_MainSkill1, %Key_MainSkill1% 230 | Gui, Start: Add, Text, Xp+87 Yp, / 231 | Gui, Start: Add, DropDownList, Xp+12 Yp W84 vKey_MainSkill2 Choose%Key_MainSkill2_DDL%, LButton|MButton|RButton|%Var_None% 232 | Gui, Start: Add, Text, Xp-99 Yp+33, : %Var_Weapon_Skill% 233 | Gui, Start: Add, Hotkey, Xp Yp W84 vKey_SecondSkill1, %Key_SecondSkill1% 234 | Gui, Start: Add, Text, Xp+87 Yp, / 235 | Gui, Start: Add, DropDownList, Xp+12 Yp W84 vKey_SecondSkill2 Choose%Key_SecondSkill2_DDL%, LButton|MButton|RButton|%Var_None% 236 | Gui, Start: Add, Text, Xp-99 Yp+33, : %Var_Doll_Skill% 237 | Gui, Start: Add, Hotkey, Xp Yp W84 vKey_DollSkill1, %Key_DollSkill1% 238 | Gui, Start: Add, Text, Xp+87 Yp, / 239 | Gui, Start: Add, DropDownList, Xp+12 Yp W84 vKey_DollSkill2 Choose%Key_DollSkill2_DDL%, LButton|MButton|RButton|%Var_None% 240 | Gui, Start: Add, Text, Xp-99 Yp+33, : %Var_Dodging% 241 | Gui, Start: Add, Hotkey, Xp Yp W84 vKey_Dodging1, %Key_Dodging1% 242 | Gui, Start: Add, Text, Xp+87 Yp, / 243 | Gui, Start: Add, DropDownList, Xp+12 Yp W84 vKey_Dodging2 Choose%Key_Dodging2_DDL%, LButton|MButton|RButton|%Var_None% 244 | Gui, Start: Add, Text, Xp-99 Yp+33, : %Var_Normal_Attack% 245 | Gui, Start: Add, Hotkey, Xp Yp W84 vKey_NormalAttack1, %Key_NormalAttack1% 246 | Gui, Start: Add, Text, Xp+87 Yp, / 247 | Gui, Start: Add, DropDownList, Xp+12 Yp W84 vKey_NormalAttack2 Choose%Key_NormalAttack2_DDL%, LButton|MButton|RButton|%Var_None% 248 | Gui, Start: Add, Text, Xm+18 Yp+39 ; 控距 249 | Gui, Start: Add, GroupBox, W333 H177, 其它 Others 250 | Gui, Start: Add, Text, Xp+18 Yp+18 ; 集体缩进 251 | Gui, Start: Add, Text, Xp Yp+15, %Var_LAltLButton_2_LeftClick% 252 | ;Gui, Start: Add, Hotkey, Xp Yp W84 vKey_LeftClick, %Key_LeftClick% 253 | Gui, Start: Add, Text, Xp Yp+33, : %Var_View_Control% 254 | Gui, Start: Add, Hotkey, Xp Yp W84 vKey_MouseFunction1, %Key_MouseFunction1% 255 | Gui, Start: Add, Text, Xp+87 Yp, / 256 | Gui, Start: Add, DropDownList, Xp+12 Yp W84 vKey_MouseFunction2 Choose%Key_MouseFunction2_DDL%, LButton|MButton|RButton|%Var_None% 257 | Gui, Start: Add, Text, Xp-99 Yp+33, : %Var_StopOrBegin% 258 | Gui, Start: Add, Hotkey, Xp Yp W84 vKey_Suspend1, %Key_Suspend1% 259 | Gui, Start: Add, Text, Xp+87 Yp, / 260 | Gui, Start: Add, DropDownList, Xp+12 Yp W84 vKey_Suspend2 Choose%Key_Suspend2_DDL%, LButton|MButton|RButton|%Var_None% 261 | Gui, Start: Add, Text, Xp-99 Yp+33, : %Var_Reload% 262 | Gui, Start: Add, Hotkey, Xp Yp W84 vKey_Reload1, %Key_Reload1% 263 | Gui, Start: Add, Text, Xp+87 Yp, / 264 | Gui, Start: Add, DropDownList, Xp+12 Yp W84 vKey_Reload2 Choose%Key_Reload2_DDL%, LButton|MButton|RButton|%Var_None% 265 | ;Gui, Start: Add, Text, Xm+18 Yp+39 ; 控距 266 | Gui, Start: Add, Picture, Xm+63 Ym+72 W234 H351 +BackgroundTrans, %Image_DIR1% 267 | 268 | Gui, Start: Tab, %Var_Functions% 269 | Gui, Start: Add, Text, Xm+18 Ym+18 ; 控距 270 | Gui, Start: Add, GroupBox, W333 H174, 选项 Options 271 | Gui, Start: Add, Text, Xp+18 Yp+18 ; 集体缩进 272 | Gui, Start: Add, CheckBox, Xp Yp+15 vRunAsAdmin Checked%RunAsAdmin%, %Var_Enable%%Var_Run_as_Admin%%Var_Recommanded% 273 | Gui, Start: Add, CheckBox, Xp Yp+33 vEnableAutoScale Checked%EnableAutoScale%, %Var_Enable%%Var_Auto_Identification%%Var_Recommanded% 274 | Gui, Start: Add, CheckBox, Xp Yp+33 vEnableOcclusion Checked%EnableOcclusion%, %Var_Enable%%Var_Cursor_Occlusion%%Var_Recommanded% 275 | Gui, Start: Add, CheckBox, Xp Yp+33 vEnableRestriction Checked%EnableRestriction%, %Var_Enable%%Var_Cursor_Restriction%%Var_Recommanded% 276 | Gui, Start: Add, Text, Xm+18 Yp+39 ; 控距 277 | Gui, Start: Add, GroupBox, W333 H222, 高级 Advance 278 | Gui, Start: Font, s9, 新宋体 279 | Gui, Start: Add, Text, Xp+18 Yp+18 ; 集体缩进 280 | Gui, Start: Add, Text, Xp Yp+15, %Var_FaultTolerance_CombatScene_Normal_T_Percentage% 281 | Gui, Start: Add, Slider, Xp+159 Yp Range0-100 Thick9 TickInterval100 ToolTipRight vFaultTolerance_CombatScene_Normal_T_Percentage, %FaultTolerance_CombatScene_Normal_T_Percentage% 282 | Gui, Start: Add, Text, Xp-159 Yp+33, %Var_FaultTolerance_CombatScene_Normal_B_Percentage% 283 | Gui, Start: Add, Slider, Xp+159 Yp Range0-100 Thick9 TickInterval100 ToolTipRight vFaultTolerance_CombatScene_Normal_B_Percentage, %FaultTolerance_CombatScene_Normal_B_Percentage% 284 | Gui, Start: Add, Text, Xp-159 Yp+33, %Var_FaultTolerance_CombatScene_LowHealth_T_Percentage% 285 | Gui, Start: Add, Slider, Xp+159 Yp Range0-100 Thick9 TickInterval100 ToolTipRight vFaultTolerance_CombatScene_LowHealth_T_Percentage, %FaultTolerance_CombatScene_LowHealth_T_Percentage% 286 | Gui, Start: Add, Text, Xp-159 Yp+33, %Var_FaultTolerance_CombatScene_LowHealth_B_Percentage% 287 | Gui, Start: Add, Slider, Xp+159 Yp Range0-100 Thick9 TickInterval100 ToolTipRight vFaultTolerance_CombatScene_LowHealth_B_Percentage, %FaultTolerance_CombatScene_LowHealth_B_Percentage% 288 | Gui, Start: Add, Text, Xp-159 Yp+33, %Var_FaultTolerance_ElysiumLobby_T_Percentage% 289 | Gui, Start: Add, Slider, Xp+159 Yp Range0-100 Thick9 TickInterval100 ToolTipRight vFaultTolerance_ElysiumLobby_T_Percentage, %FaultTolerance_ElysiumLobby_T_Percentage% 290 | Gui, Start: Add, Text, Xp-159 Yp+33, %Var_FaultTolerance_ElysiumLobby_B_Percentage% 291 | Gui, Start: Add, Slider, Xp+159 Yp Range0-100 Thick9 TickInterval100 ToolTipRight vFaultTolerance_ElysiumLobby_B_Percentage, %FaultTolerance_ElysiumLobby_B_Percentage% 292 | Gui, Start: Font, s12, 新宋体 293 | Gui, Start: Add, Picture, Xm+57 Ym+72 W258 H351 +BackgroundTrans, %Image_DIR2% 294 | 295 | Gui, Start: Tab, %Var_Settings% 296 | Gui, Start: Add, Text, Xm+18 Ym+18 ; 控距 297 | Gui, Start: Add, GroupBox, W333 H78, 配置 Config 298 | Gui, Start: Add, Text, Xp+18 Yp+18 ; 集体缩进 299 | Gui, Start: Add, Radio, Xp Yp+15 gConfig_Import, %Var_Load_Preset% 300 | Gui, Start: Add, Text, Xm+18 Yp+39 ; 控距 301 | Gui, Start: Add, GroupBox, W333 H177, 更新 Update 302 | Gui, Start: Add, Text, Xp+18 Yp+18 ; 集体缩进 303 | Gui, Start: Add, Radio, Xp Yp+15 gUpdateCheck, %Var_Check_for_Update% 304 | Gui, Start: Add, Link, Xp Yp+33, [URL] 百度云: 提取码:2022 305 | Gui, Start: Add, Link, Xp Yp+33, [URL] Github: New Release 306 | Gui, Start: Add, Text, Xp Yp+33, %Var_Changelogs%: 307 | Gui, Start: Add, DDL, Xp+192 Yp W87 gSelectVersion vVersion, %A_Space%||v0.4.+|v0.3.+|v0.2.+|v0.1.+ 308 | Gui, Start: Add, Text, Xm+18 Yp+39 ; 控距 309 | Gui, Start: Add, GroupBox, W333 H111, 其它 Others 310 | ;Gui, Start: Add, Text, Xm+18 Yp+39 ; 控距 311 | Gui, Start: Add, Picture, Xm+72 Ym+72 W204 H351 +BackgroundTrans, %Image_DIR3% 312 | 313 | Gui, Start: Tab 314 | Gui, Start: Add, Button, Default W366 gClickToRun, %Var_Run% 315 | Gui, Start: Add, Button, W366 gClickToExit, %Var_Exit% 316 | Gui, Start: Show, xCenter yCenter, %Var_Startup_Interface% 317 | DisableButtonX() 318 | Suspend, On 319 | Return 320 | 321 | 322 | ;【标签 Label】 323 | Config_Import: 324 | MsgBox, 0x24, %Var_Inquiry%, %Var_Ask_to_Proceed% 325 | IfMsgBox, Yes 326 | { 327 | IfExist, %INI_DIR% 328 | { 329 | Try 330 | { 331 | FileSetAttrib, -R, %INI_DIR% 332 | } 333 | FileDelete, %INI_DIR% 334 | } 335 | Gui, Presets: Add, Button, W33, %Var_Load_Preset_for_Keyboard% 336 | Gui, Presets: Add, Button, W33, %Var_Load_Preset_for_Gamepad% 337 | /* 338 | 对variable的百分号进行转义后会在compile时报错: 339 | FileInstall, Config/Preset_Keyboard/BH3_Hotkey_`%Version`%.ini, %INI_DIR%, 1 340 | 故不再采用这种命名方式 341 | */ 342 | FileInstall, Config/Preset_Keyboard/BH3_Hotkey.ini, %INI_DIR%, 1 343 | MsgBox, 0, %Var_Notifaction%, %Var_Preset_Loaded% 344 | Reload 345 | } 346 | Else 347 | Reload 348 | Return 349 | 350 | 351 | ;【标签 Label】 352 | UpdateCheck: 353 | Updater() 354 | Return 355 | 356 | 357 | ;【标签 Label】 358 | SelectVersion: 359 | GuiControlGet, Version 360 | Switch Version 361 | { 362 | Case "v0.4.+": 363 | FileInstall, GUI/Changelogs/v0.4.+.txt, %Changelog_DIR4%, 1 364 | Run, open %Changelog_DIR4% 365 | Case "v0.3.+": 366 | FileInstall, GUI/Changelogs/v0.3.+.txt, %Changelog_DIR3%, 1 367 | Run, open %Changelog_DIR3% 368 | Case "v0.2.+": 369 | FileInstall, GUI/Changelogs/v0.2.+.txt, %Changelog_DIR2%, 1 370 | Run, open %Changelog_DIR2% 371 | Case "v0.1.+": 372 | FileInstall, GUI/Changelogs/v0.1.+.txt, %Changelog_DIR1%, 1 373 | Run, open %Changelog_DIR1% 374 | Default : ;Case "": 375 | Return 376 | } 377 | Return 378 | 379 | 380 | ;【标签 Label】“开启”按钮的执行语句 381 | ClickToRun: ;StartButton%Var_Run%: 382 | 383 | Gui, Start: Submit ;Gui, Submit 384 | 385 | ;【配置 INI】写入配置 386 | IniWrite, %Key_MainSkill1%, %INI_DIR%, Keymaps, %Var_Main_Skill%1 387 | IniWrite, %Key_MainSkill2%, %INI_DIR%, Keymaps, %Var_Main_Skill%2 388 | IniWrite, %Key_SecondSkill1%, %INI_DIR%, Keymaps, %Var_Weapon_Skill%1 389 | IniWrite, %Key_SecondSkill2%, %INI_DIR%, Keymaps, %Var_Weapon_Skill%2 390 | IniWrite, %Key_DollSkill1%, %INI_DIR%, Keymaps, %Var_Doll_Skill%1 391 | IniWrite, %Key_DollSkill2%, %INI_DIR%, Keymaps, %Var_Doll_Skill%2 392 | IniWrite, %Key_Dodging1%, %INI_DIR%, Keymaps, %Var_Dodging%1 393 | IniWrite, %Key_Dodging2%, %INI_DIR%, Keymaps, %Var_Dodging%2 394 | IniWrite, %Key_NormalAttack1%, %INI_DIR%, Keymaps, %Var_Normal_Attack%1 395 | IniWrite, %Key_NormalAttack2%, %INI_DIR%, Keymaps, %Var_Normal_Attack%2 396 | ;IniWrite, Key_LeftClick, %INI_DIR%, Keymaps, 正常点击 397 | IniWrite, %Key_MouseFunction1%, %INI_DIR%, Keymaps, %Var_View_Control%1 398 | IniWrite, %Key_MouseFunction2%, %INI_DIR%, Keymaps, %Var_View_Control%2 399 | IniWrite, %Key_Suspend1%, %INI_DIR%, Keymaps, %Var_StopOrBegin%1 400 | IniWrite, %Key_Suspend2%, %INI_DIR%, Keymaps, %Var_StopOrBegin%2 401 | IniWrite, %Key_Reload1%, %INI_DIR%, Keymaps, %Var_Reload%1 402 | IniWrite, %Key_Reload2%, %INI_DIR%, Keymaps, %Var_Reload%2 403 | 404 | IniWrite, %RunAsAdmin%, %INI_DIR%, Options, %Var_Run_as_Admin% 405 | IniWrite, %EnableAutoScale%, %INI_DIR%, Options, %Var_Auto_Identification% 406 | IniWrite, %EnableOcclusion%, %INI_DIR%, Options, %Var_Cursor_Occlusion% 407 | IniWrite, %EnableRestriction%, %INI_DIR%, Options, %Var_Cursor_Restriction% 408 | 409 | IniWrite, %FaultTolerance_CombatScene_Normal_T_Percentage%, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_Normal_T_Percentage% 410 | IniWrite, %FaultTolerance_CombatScene_Normal_B_Percentage%, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_Normal_B_Percentage% 411 | IniWrite, %FaultTolerance_CombatScene_LowHealth_T_Percentage%, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_LowHealth_T_Percentage% 412 | IniWrite, %FaultTolerance_CombatScene_LowHealth_B_Percentage%, %INI_DIR%, Params, %Var_FaultTolerance_CombatScene_LowHealth_B_Percentage% 413 | IniWrite, %FaultTolerance_ElysiumLobby_T_Percentage%, %INI_DIR%, Params, %Var_FaultTolerance_ElysiumLobby_T_Percentage% 414 | IniWrite, %FaultTolerance_ElysiumLobby_B_Percentage%, %INI_DIR%, Params, %Var_FaultTolerance_ElysiumLobby_B_Percentage% 415 | 416 | Gui, Start: Destroy 417 | 418 | ;【热键 Hotkey】重定义热键到标签 419 | Loop, 2 420 | { 421 | If (Key_MainSkill%A_Index% != Var_None && Key_MainSkill%A_Index% != "") 422 | { 423 | Key_MainSkill = % Key_MainSkill%A_Index% 424 | Hotkey, %Key_MainSkill%, Key_MainSkill 425 | } 426 | If (Key_SecondSkill%A_Index% != Var_None && Key_SecondSkill%A_Index% != "") 427 | { 428 | Key_SecondSkill = % Key_SecondSkill%A_Index% 429 | Hotkey, %Key_SecondSkill%, Key_SecondSkill 430 | } 431 | If (Key_DollSkill%A_Index% != Var_None && Key_DollSkill%A_Index% != "") 432 | { 433 | Key_DollSkill = % Key_DollSkill%A_Index% 434 | Hotkey, %Key_DollSkill%, Key_DollSkill 435 | } 436 | If (Key_Dodging%A_Index% != Var_None && Key_Dodging%A_Index% != "") 437 | { 438 | Key_Dodging = % Key_Dodging%A_Index% 439 | Hotkey, %Key_Dodging%, Key_Dodging 440 | } 441 | If (Key_NormalAttack%A_Index% != Var_None && Key_NormalAttack%A_Index% != "") 442 | { 443 | Key_NormalAttack = % Key_NormalAttack%A_Index% 444 | Hotkey, %Key_NormalAttack%, Key_NormalAttack 445 | } 446 | ;Hotkey, %Key_LeftClick%, Key_LeftClick 447 | If (Key_MouseFunction%A_Index% != Var_None && Key_MouseFunction%A_Index% != "") 448 | { 449 | Key_MouseFunction = % Key_MouseFunction%A_Index% 450 | Hotkey, %Key_MouseFunction%, Key_MouseFunction 451 | } 452 | If (Key_Suspend%A_Index% != Var_None && Key_Suspend%A_Index% != "") 453 | { 454 | Key_Suspend = % Key_Suspend%A_Index% 455 | Hotkey, %Key_Suspend%, Key_Suspend 456 | } 457 | If (Key_Reload%A_Index% != Var_None && Key_Reload%A_Index% != "") 458 | { 459 | Key_Reload = % Key_Reload%A_Index% 460 | Hotkey, %Key_Reload%, Key_Reload 461 | } 462 | } 463 | 464 | If (RunAsAdmin) 465 | { 466 | FullCommandLine := DllCall("GetCommandLine", "str") 467 | If Not (A_IsAdmin or RegExMatch(FullCommandLine, " /restart(?!\S)")) 468 | { 469 | Try 470 | { 471 | If A_IsCompiled 472 | Run *RunAs "%A_ScriptFullPath%" /restart 473 | Else 474 | Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%" 475 | } 476 | ForceQuit() ;ExitApp 477 | } 478 | } 479 | 480 | If (EnableAutoScale) 481 | { 482 | If (!Toggle_AutoScale) 483 | { 484 | Toggle_AutoScale := !Toggle_AutoScale 485 | SetTimer, AutoScale, %Timer_AutoScale% 486 | } 487 | Else 488 | { 489 | MsgBox, 16, %Var_Warning%, %Var_Tip_of_Exit% 490 | ForceQuit() ;ExitApp 491 | } 492 | } 493 | 494 | If (EnableOcclusion) 495 | { 496 | If (!Toggle_Occlusion) 497 | { 498 | Toggle_Occlusion := !Toggle_Occlusion 499 | } 500 | Else 501 | { 502 | MsgBox, 16, %Var_Warning%, %Var_Tip_of_Exit% 503 | ForceQuit() ;ExitApp 504 | } 505 | } 506 | 507 | If (EnableRestriction) 508 | { 509 | If (!Toggle_Restriction) 510 | { 511 | Toggle_Restriction := !Toggle_Restriction 512 | } 513 | Else 514 | { 515 | MsgBox, 16, %Var_Warning%, %Var_Tip_of_Exit% 516 | ForceQuit() ;ExitApp 517 | } 518 | } 519 | 520 | SetTimer, AutoFadeMsgbox, -3000 ; [可调校数值 adjustable parameters] 使消息弹窗仅存在一段时间(ms) 521 | MsgBox, 0, %Var_Notifaction%, %Var_Tip_of_Start% 522 | SetTimer, AutoFadeMsgbox, Delete 523 | Suspend, Off 524 | Return 525 | 526 | 527 | ;【标签 Label】“退出”按钮的执行语句 528 | ClickToExit: ;StartButton%Var_Exit%: 529 | If WinExist("ahk_exe BH3.exe") 530 | { 531 | MsgBox, 0x24, %Var_Inquiry%, %Var_Ask_to_Quit% 532 | IfMsgBox, Yes 533 | ForceQuit() ;ExitApp 534 | } 535 | Else 536 | { 537 | MsgBox, 0x24, %Var_Inquiry%, %Var_Ask_to_Exit% 538 | IfMsgBox, Yes 539 | ForceQuit() ;ExitApp 540 | } 541 | Return 542 | 543 | 544 | ;【标签 Label】 545 | Config_Check: 546 | IfNotExist, %INI_DIR% 547 | { 548 | MsgBox, 0, %Var_Notifaction%, %Var_Tip_to_Run% 549 | } 550 | Else 551 | Run, open %INI_DIR% 552 | Return 553 | 554 | 555 | ;【标签 Label】 556 | Config_Delete: 557 | IfNotExist, %INI_DIR% 558 | { 559 | MsgBox, 0, %Var_Notifaction%, %Var_Tip_to_Run% 560 | } 561 | Else 562 | { 563 | Try 564 | { 565 | FileSetAttrib, -R, %INI_DIR% 566 | } 567 | FileDelete, %INI_DIR% 568 | MsgBox, 0, %Var_Notifaction%, %Var_Config_Removed% 569 | } 570 | Return 571 | 572 | /* 573 | 【标签 Label】 574 | Debug: 575 | OutputDebug, Text 576 | Return 577 | */ 578 | 579 | ;【标签 Label】 580 | Nothing: 581 | Return 582 | 583 | 584 | ;【标签 Label】 585 | Menu_Reload: 586 | Reload 587 | Return 588 | 589 | 590 | ;【标签 Label】 591 | Menu_Exit: 592 | ForceQuit() ;ExitApp 593 | Return 594 | 595 | 596 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /KeyList.ahk: -------------------------------------------------------------------------------- 1 | Global 普攻NormalAttack = J 2 | Global 必杀技MainSkill = I 3 | Global 武器技SecondSkill = U 4 | Global 人偶技DollSkill = L 5 | Global 闪避Dodging = K 6 | Global 视角上ViewUp = M 7 | Global 视角下ViewDown = N 8 | Global 视角左ViewLeft = Q 9 | Global 视角右ViewRight = E 10 | /* 11 | Hotkey, %普攻NormalAttack%, Key_NormalAttack_Origin 12 | Hotkey, %必杀技MainSkill%, Key_MainSkill_Origin 13 | Hotkey, %武器技SecondSkill%, Key_SecondSkill_Origin 14 | Hotkey, %人偶技DollSkill%, Key_DollSkill_Origin 15 | Hotkey, %闪避Dodging%, Key_Dodging_Origin 16 | Hotkey, %视角上ViewUp%, Key_ViewUp_Origin 17 | Hotkey, %视角下ViewDown%, Key_ViewDown_Origin 18 | Hotkey, %视角左ViewLeft%, Key_ViewLeft_Origin 19 | Hotkey, %视角右ViewRight%, Key_ViewRight_Origin 20 | */ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Spr_Aachen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Language.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放翻译功能相关的代码 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | ;【函数 Function】英文翻译 7 | English() 8 | { 9 | Global 10 | Var_Execute_Initial_Setup := "Execute Initial-Setup" 11 | Var_Done := "Done" 12 | 13 | Var_None := "None" 14 | 15 | Var_Config_Check := "Config Check" 16 | Var_Config_Delete := "Config Delete" 17 | Var_Debugging_Log := "Debugging Log" 18 | Var_Coming_Soon := "Coming Soon" 19 | Var_Else := "Else" 20 | Var_Reload := "Reload" 21 | Var_Exit := "Exit" 22 | 23 | Var_Keymaps := "Keymaps" 24 | Var_Main_Skill := "Main Skill " 25 | Var_Weapon_Skill := "Weapon Skill " 26 | Var_Doll_Skill := "Doll Skill " 27 | Var_Dodging := "Dodging " 28 | Var_Normal_Attack := "Normal Attack " 29 | Var_LAltLButton_2_LeftClick := "LAlt + LButton: Left-Click" 30 | Var_View_Control := "View-Control " 31 | Var_StopOrBegin := "Stop/Begin " 32 | 33 | Var_Functions := "Functions" 34 | Var_Enable := "Enable " 35 | Var_Run_as_Admin := "Run as Admin" 36 | Var_Auto_Identification := "Auto-Identification" 37 | Var_Cursor_Occlusion := "Cursor Occlusion" 38 | Var_Cursor_Restriction := "Cursor Restriction" 39 | Var_Recommanded := "" 40 | Var_FaultTolerance_CombatScene_Normal_T_Percentage := "FT_NormalCombat_Target" 41 | Var_FaultTolerance_CombatScene_Normal_B_Percentage := "FT_NormalCombat_Background" 42 | Var_FaultTolerance_CombatScene_LowHealth_T_Percentage := "FT_DangerCombat_Target" 43 | Var_FaultTolerance_CombatScene_LowHealth_B_Percentage := "FT_DangerCombat_Background" 44 | Var_FaultTolerance_ElysiumLobby_T_Percentage := "FT_ElysiumLobby_Target" 45 | Var_FaultTolerance_ElysiumLobby_B_Percentage := "FT_ElysiumLobby_Background" 46 | 47 | Var_Settings := "Settings" 48 | Var_Load_Preset := "Load Preset" 49 | Var_Check_for_Update := "Check for Update" 50 | Var_Changelogs := "Changelogs" 51 | 52 | Var_Run := "Run" 53 | 54 | Var_Startup_Interface := "Startup Interface" 55 | 56 | Var_Inquiry := "Inquiry" 57 | Var_Ask_to_Proceed := "This would overwrite the current config`nReady to proceed?" 58 | Var_Load_Preset_for_Keyboard := "Load preset for keyboard" 59 | Var_Load_Preset_for_Gamepad := "Load preset for gamepad" 60 | 61 | Var_Notifaction := "Notifaction" 62 | Var_Preset_Loaded := "Preset successfully loaded" 63 | 64 | Var_Warning := "Warning" 65 | Var_Tip_of_Exit := "Invalid param detected, exit procedures." 66 | 67 | Var_Tip_of_Start := "Program successfully started, enjoy!`n(This message will disappear in 3 sec)" 68 | 69 | Var_Ask_to_Quit := "Quit the app while Honkai Imapct 3 is still running?" 70 | 71 | Var_Ask_to_Exit := "Are you sure to exit?" 72 | 73 | Var_Tip_to_Run := "Can't find the config file, please run the program." 74 | 75 | Var_Config_Removed := "Config successfully removed." 76 | 77 | ;Var_Suspended := "Suspended" 78 | ;Var_Continued := "Continued" 79 | 80 | Var_View_Control_On := "View-Control On" 81 | Var_View_Control_Off := "View-Control Off" 82 | } 83 | 84 | 85 | ;【函数 Function】中文翻译 86 | Chinese() 87 | { 88 | Global 89 | Var_Execute_Initial_Setup := "执行初始化进程" 90 | Var_Done := "已执行" 91 | 92 | Var_None := "无" 93 | 94 | Var_Config_Check := "查看配置文件" 95 | Var_Config_Delete := "删除配置文件" 96 | Var_Debugging_Log := "调试日志" 97 | Var_Coming_Soon := "敬请期待" 98 | Var_Else := "其它" 99 | Var_Reload := "重启" 100 | Var_Exit := "退出" 101 | 102 | Var_Keymaps := "键位" 103 | Var_Main_Skill := "必杀技" 104 | Var_Weapon_Skill := "武器技/后崩技" 105 | Var_Doll_Skill := "人偶技/月之环" 106 | Var_Dodging := "闪避" 107 | Var_Normal_Attack := "普攻" 108 | Var_LAltLButton_2_LeftClick := "左Alt + 左键: 正常点击" 109 | Var_View_Control := "管理视角跟随" 110 | Var_StopOrBegin := "暂停/启用" 111 | 112 | Var_Functions := "功能" 113 | Var_Enable := "启用" 114 | Var_Run_as_Admin := "管理员权限" 115 | Var_Auto_Identification := "全自动识别" 116 | Var_Cursor_Occlusion := "可隐藏光标" 117 | Var_Cursor_Restriction := "限制性光标" 118 | Var_Recommanded := "(推荐)" 119 | Var_FaultTolerance_CombatScene_Normal_T_Percentage := "正常战斗识别容错率-目标" 120 | Var_FaultTolerance_CombatScene_Normal_B_Percentage := "正常战斗识别容错率-背景" 121 | Var_FaultTolerance_CombatScene_LowHealth_T_Percentage := "濒危战斗识别容错率-目标" 122 | Var_FaultTolerance_CombatScene_LowHealth_B_Percentage := "濒危战斗识别容错率-背景" 123 | Var_FaultTolerance_ElysiumLobby_T_Percentage := "乐土大厅识别容错率-目标" 124 | Var_FaultTolerance_ElysiumLobby_B_Percentage := "乐土大厅识别容错率-背景" 125 | 126 | Var_Settings := "设置" 127 | Var_Load_Preset := "载入配置预设" 128 | Var_Check_for_Update := "检查版本更新" 129 | Var_Changelogs := "查看更新日志" 130 | 131 | Var_Run := "开启" 132 | 133 | Var_Startup_Interface := "启动界面" 134 | 135 | Var_Inquiry := "询问" 136 | Var_Ask_to_Proceed := "操作将覆盖当前的配置`n是否继续?" 137 | Var_Load_Preset_for_Keyboard := "载入键鼠预设" 138 | Var_Load_Preset_for_Gamepad := "载入手柄预设" 139 | 140 | Var_Notifaction := "提示" 141 | Var_Preset_Loaded := "已成功载入预设" 142 | 143 | Var_Warning := "警告" 144 | Var_Tip_of_Exit := "检测到参数异常,即将退出程序" 145 | 146 | Var_Tip_of_Start := "程序启动成功(/≧▽≦)/,祝游戏愉快!`n(当前对话框将于3秒后自动消失)" 147 | 148 | Var_Ask_to_Quit := "检测到崩坏3正在运行`n\(≧□≦)/真的要退出吗?" 149 | 150 | Var_Ask_to_Exit := "是否确认退出当前程序`n(・-・*)?" 151 | 152 | Var_Tip_to_Run := "未找到配置文件,请先运行程序" 153 | 154 | Var_Config_Removed := "已成功移除配置文件" 155 | 156 | ;Var_Suspended := "暂停中" 157 | ;Var_Continued := "已启用" 158 | 159 | Var_View_Control_On := "视角跟随已手动激活" 160 | Var_View_Control_Off := "视角跟随已手动关闭" 161 | } 162 | 163 | 164 | ;【函数 Function】检测语言并选择翻译 165 | LanguageDetect() 166 | { 167 | If Not A_Language in [0404,0804,0c04,1004,1404] ; LanguageCode: 0404 "Chinese_Taiwan", 0804 "Chinese_PRC", 0c04 "Chinese_Hong_Kong", 1004 "Chinese_Singapore", 1404 "Chinese_Macau" 168 | { 169 | If A_Language in [] 170 | { 171 | Language := "" 172 | } 173 | Else 174 | Language := "ENG" 175 | } 176 | /* 177 | Else 178 | Language := "CHN" 179 | */ 180 | 181 | Switch Language 182 | { 183 | Case "ENG": 184 | English() 185 | Return 186 | Default: ;Case "CHN": 187 | Chinese() 188 | Return 189 | } 190 | } 191 | 192 | 193 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 194 | 195 | 196 | ; 运行主程序 197 | LanguageDetect() 198 | 199 | 200 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /Main.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放全局变量和文件调用指令,也就是主文件。要记得及时同步版本号哦 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | ;【变量 Variable】版本号 7 | Global Version := "0.4.4" 8 | 9 | 10 | ;【变量 Variable】默认语言 11 | Global Language := "CHN" 12 | 13 | 14 | ;【变量 Variable】对管理隐藏光标功能的全局变量进行赋值 15 | Global Toggle_Occlusion := False 16 | Global Status_Occlusion 17 | 18 | ;【变量 Variable】对管理定位光标功能的全局变量进行赋值 19 | Global FirstTime_ZoneDetect := True 20 | Global IsZoneInteractive 21 | Global x1 22 | Global y1 23 | 24 | ;【变量 Variable】对管理限制光标功能的全局变量进行赋值 25 | Global Toggle_Restriction := False 26 | Global Status_Restriction 27 | 28 | ;【变量 Variable】对管理光标定位功能的全局变量进行赋值 29 | Global x2 30 | Global y2 31 | 32 | ;【变量 Variable】对管理鼠标控制功能的全局变量进行赋值 33 | Global Toggle_MouseFunction := False 34 | 35 | ;【变量 Variable】对管理视角跟随功能的全局变量进行赋值 36 | Global Status_ViewControl := False 37 | Global ViewControl_Mod := "Mod1" 38 | Global Timer_ConflictDetect := 0 39 | Global BreakFlag_View := False 40 | Global Timer_ViewControl := 10 ; [可调校数值 adjustable parameters] 设定视角跟随命令的每执行时间间隔(ms) 41 | 42 | ;【变量 Variable】对管理准星跟随功能的全局变量进行赋值 43 | Global BreakFlag_Aim := False 44 | Global Status_w := False 45 | Global Status_a := False 46 | Global Status_s := False 47 | Global Status_d := False 48 | Global Timer_AimControl := 20 ; [可调校数值 adjustable parameters] 设定准星跟随命令的每执行间隔时间(ms) 49 | 50 | 51 | ;【变量 Variable】对管理屏幕检测功能的全局变量进行赋值 52 | Global ClientUpperLeftCorner_X 53 | Global ClientUpperLeftCorner_Y 54 | Global Client_Width 55 | Global Client_Height 56 | Global UpperLeftCorner_X 57 | Global UpperLeftCorner_Y 58 | Global LowerRightCorner_X 59 | Global LowerRightCorner_Y 60 | Global LowerRightCorner_X2 61 | Global LowerRightCorner_Y2 62 | Global UpperLeftCorner_X2 63 | Global UpperLeftCorner_Y2 64 | Global Icon 65 | 66 | ;【变量 Variable】对管理屏幕检测功能的全局变量进行赋值 67 | Global Toggle_ScreenDetect := False 68 | Global Timer_ScreenDetect := 2100 69 | 70 | ;【变量 Variable】对管理自动控制功能的全局变量进行赋值 71 | Global Toggle_AutoScale := False 72 | Global Status_CombatIcon := False 73 | Global Status_ElysiumIcon := False 74 | Global FaultTolerance_CombatScene_Normal_T := 0.01 * %FaultTolerance_CombatScene_Normal_T_Percentage% ;* 0.001 75 | Global FaultTolerance_CombatScene_Normal_B := 0.01 * %FaultTolerance_CombatScene_Normal_B_Percentage% ;* 0.001 76 | Global FaultTolerance_CombatScene_LowHealth_T := 0.01 * %FaultTolerance_CombatScene_LowHealth_T_Percentage% 77 | Global FaultTolerance_CombatScene_LowHealth_B := 0.01 * %FaultTolerance_CombatScene_LowHealth_B_Percentage% 78 | Global FaultTolerance_ElysiumLobby_T := 0.01 * %FaultTolerance_ElysiumLobby_T_Percentage% 79 | Global FaultTolerance_ElysiumLobby_B := 0.01 * %FaultTolerance_ElysiumLobby_B_Percentage% 80 | Global Timer_AutoScale := 81 ; [可调校数值 adjustable parameters] 设定自动识别命令的每执行时间间隔(ms),如果值过小可能不好使 81 | 82 | 83 | ;【变量 Variable】对管理手动暂停功能的全局变量进行赋值 84 | Global Toggle_ManualSuspend := False 85 | 86 | 87 | ;【变量 Variable】对管理检查更新功能的全局变量进行赋值 88 | Global IsRequestDone 89 | Global MirrorList := ["https://github.com", "https://ghproxy.com/https://github.com"] 90 | Global ChosenMirror 91 | Global Request := ComObjCreate("MSXML2.ServerXMLHTTP") ; XMLHTTP为客户端应用程序而设计,依赖于基于WinInet而构建的URLMon;而ServerXMLHTTP为服务器应用程序而设计,依赖于新的HTTP客户端堆栈WinHTTP 92 | Global ChosenMirror_Tried := Array() 93 | 94 | 95 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 96 | 97 | 98 | ;【命令 Directive】引用库文件 99 | #Include 100 | 101 | ;【命令 Directive】 102 | #Include Language.ahk 103 | 104 | ;【命令 Directive】 105 | #Include Updater.ahk 106 | 107 | ;【命令 Directive】 108 | #Include Interface.ahk 109 | 110 | 111 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 112 | 113 | 114 | ;【命令 Directive】检测崩坏3游戏窗口,使程序仅在崩坏3游戏运行时生效 115 | #IfWinActive ahk_exe BH3.exe 116 | 117 | ;【命令 Directive】修改AHK的默认掩饰键 118 | #MenuMaskKey vkE8 ; vkE8尚未映射 119 | 120 | ;【命令 Directive】安装并对以下热键使用钩子 121 | ;#InstallKeybdHook 122 | ;#InstallMouseHook 123 | ;#UseHook, On 124 | SendMode, InputThenPlay 125 | 126 | 127 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 128 | 129 | 130 | ;【命令 Directive】 131 | ;#Include KeyList.ahk 132 | 133 | ;【命令 Directive】 134 | #Include Functions_Combat.ahk 135 | 136 | ;【命令 Directive】 137 | #Include Functions_Management.ahk 138 | 139 | ;【命令 Directive】 140 | #Include Hotkeys_Combat.ahk 141 | 142 | ;【命令 Directive】 143 | #Include Hotkeys_Management.ahk 144 | 145 | 146 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 147 | ;目前就这些,可根据需要自行修改 148 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /Others.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放暂时未用到的函数 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | ;【函数 Function】管理输入法 7 | SwitchIME(dwLayout) 8 | { 9 | HKL := DllCall("LoadKeyboardLayout", Str, dwLayout, UInt, 1) 10 | ControlGetFocus, ctl, A 11 | SendMessage, 0x50, 0, HKL, %ctl%, A 12 | } 13 | 14 | 15 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 
2 | 3 | # 📢 这个项目已停止维护 📢
This repo is no longer maintained 4 | 5 |
6 | 7 | 本项目永久停止更新维护,感谢大家一直以来的支持和鼓励!
8 | This repository is no longer maintained. I would like to thank the people who supported me all the time. Thank you all.
9 | 10 | 11 |
12 | 13 | # 崩坏3仿原神PC端键鼠操控
Genshin to Honkai PC Control Modification Project 14 | 15 | [![Releases](https://img.shields.io/github/v/release/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project?color=green&label=Release&logo=Github&logoColor=white&style=flat-square)](https://github.com/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/releases) 16 | [![Bilibili](https://img.shields.io/badge/Bilibili-v0.3.0%20Intro-blue?logo=Bilibili&style=flat-square)](https://www.bilibili.com/video/BV1DY4y1T7aS) 17 | [![YouTube](https://img.shields.io/badge/YouTube-v0.4.3%20Intro-red?logo=YouTube&style=flat-square)](https://www.youtube.com/watch?v=_Z7MmzOzj2c) 18 | 19 |
20 | 21 | 本项目以AHK为基础语言进行编译。由于这仅是一个出自编程菜鸟之手的半成品,是故望乞诸位海涵。干杯! - ( ゜- ゜)つロ 22 |
The project is basicly built with AutoHotkey. Please remind that this is a WIP (work in progress) stuff and I'm totally a noob in coding. So... hope you guys won't push me too hard. Cheers! 23 | 24 | 25 | ## 【注意 Caution】 26 | 27 | 1. 请确保客户端为官方提供的PC端而非模拟器 28 |
Please ensure that the client you're using is served by MiHoYo official 29 | 30 | 2. 请确保游戏操作设置已重置为默认键位 31 |
Please ensure that the gaming operation settings have been reset to default 32 | 33 | 3. 请使用全屏模式游玩以确保自动识别的正常运行 34 |
Please use fullscreen mode in order for `Automatic Identification` function to run properly 35 | 36 |
支持与不支持的客户端分辨率如下:( :grey_exclamation: 表示未经测试) 37 |
Supported&unsupported client resolution is shown as follows: ( :grey_exclamation: means untested) 38 | 39 | | 分辨率 Resolution | 支持 Support | 40 | | ----------------- | ----------- | 41 | | 3840 x 2160 | :heavy_check_mark: | 42 | | 2560 x 1600 | :grey_exclamation: | 43 | | 2560 x 1440 | :heavy_check_mark: | 44 | | 2560 x 1080 | :heavy_check_mark: | 45 | | 1920 x 1080 | :heavy_check_mark: | 46 | | 1680 x 1050 | :grey_exclamation: | 47 | | 1600 x 1024 | :heavy_multiplication_x: | 48 | | 1600 x 900 | :heavy_check_mark: | 49 | | 1440 x 900 | :heavy_check_mark: | 50 | | 1366 x 768 | :heavy_multiplication_x: | 51 | | 1360 x 768 | :heavy_check_mark: | 52 | | 1280 x 720 | :heavy_check_mark: | 53 | | 720 x 480 | :heavy_multiplication_x: | 54 | 55 |
若需要其它分辨率支持可以联系我,亦或者提交issue 56 |
Contact me if any other resolution need to be supported, or submit an issue 57 | 58 |
如果您的设备分辨率不在以上支持列表内,可以尝试更改系统分辨率并在游戏中选择对应的全屏模式来使自动识别生效 59 |
If your device's screen resolution is not shown in the table above, you can try changing the system resolution and select the corresponding res with fullscreen mode in game settings to make `Automatic Identification` take effect. 60 | 61 | 62 | ## 【设定 Configurations】 63 | 64 | ### 键位 - 预设
Keymaps - Preset 65 | 66 | 以下键位会在战斗状态下生效且和原神PC端的默认键位设置较为相近(但注意瞄准模式的设定有所不同) 67 |
The following keymaps would take effect in combat, and they're pretty much close to the default settings from Genshin Impact (but mind that there's a little difference between those two's aiming mode) 68 | 69 | **Q键发动主技能(大招) Q key for main skill** 70 |
使用方法:点按或长按Q键[可改] 71 |
Usage: Press or long press `Q key`[Adjustable] 72 | 73 | **E键发动副技能(武器技)/后崩坏书主技能(大招) E key for second skill(weapon skill)/APHO(A Post-Honkai Odyssey) main skill** 74 |
使用方法:点按或长按E键[可改] 75 |
特殊设定:在长按E键进入瞄准模式后,可通过移动鼠标来操控准星 76 |
Usage: Press or long press `E key`[Adjustable] 77 |
Extra: After entering the aiming mode by long pressing `E key`, cross hair can be controled by the mouse-movement 78 | 79 | **Z键发动人偶技能/后崩坏书白热化状态(月之环) Z key for doll skill/APHO(A Post-Honkai Odyssey) white heat** 80 |
使用方法:按下Z键[可改] 81 |
Usage: Press down (Long press) `Z key`[Adjustable] 82 | 83 | **左侧Shift键或鼠标右键发动闪避/冲刺 LShift or RButton for dodging/dashing** 84 |
使用方法:点击或长按左侧Shift键/鼠标右键[可改] 85 |
Usage: Press (Click) or long press `LShift`/`RButton`[Adjustable] 86 | 87 | **鼠标左键发动普攻 LButton for normal attack** 88 |
使用方法:点击或长按鼠标左键[可改] 89 |
Usage: Press (Click) or long press `LButton`[Adjustable] 90 | 91 | 尽管已经能自动分辨战斗与其它场景,但在出现意外情况时仍可以通过以下键位进行手动控制 92 |
Although the combat scene can be automaticly identified, the following keys can still be needed for manual control especially when exceptions occured 93 | 94 | **左侧Alt键+鼠标左键以正常使用点击功能 LAlt+LButton for left-click function** 95 |
使用方法:按住左侧Alt键后点击鼠标左键[不可改] 96 |
Usage: Press down (Long press) `LAlt` and then click `LButton`[Unadjustable] 97 | 98 | **鼠标中键管理视角跟随功能 MButton for view-control function management** 99 |
使用方法:点击鼠标中键[可改] 100 |
特殊设定:关闭/激活时屏幕左下角有状态栏提示 101 |
Usage: Click `MButton`[Adjustable] 102 |
Extra: Tooltips will show up in the left lower corner of the screen when turning off/turning on the function 103 | 104 | **F1键暂停/启用程序 F1 key for program suspending/continuing** 105 |
使用方法:按下F1键[可改] 106 |
特殊设定:暂停/启用时屏幕左下角有状态栏提示 107 |
Usage: Press down (Long press) `F1 key`[Adjustable] 108 |
Extra: Tooltips will show up in the left lower corner of the screen when suspending/continuing the program 109 | 110 | **F3键重启程序 F3 key for program reloading** 111 |
使用方法:按下F3键[可改] 112 |
Usage: Press down (Long press) `F3 key`[Adjustable] 113 | 114 | ### 键位 - 更改
Keymaps - Customization 115 | 116 | 启动界面的键位栏中允许手动更改默认键位且不同控制器的设置如下: 117 |
The `Keymap Tab` which located in the startup interface allows users to customize the default keymap, different controllers should be set up as follows: 118 | 119 | **键盘 Keyboard** 120 |
点击框并按下想要的键盘按键(按Del键或Backspace键可清空框) 121 |
Click the `box` and press down the keyboard key you want (pressing `Delete` or `Backspace` would set the box to empty) 122 | 123 | **鼠标 Mouse** 124 |
点击下拉栏目切换到想要的鼠标按键(选择“无”可置空栏目) 125 |
Click the `combobox` to switch to the mouse button you want (choosing `None` would set the combobox to null) 126 | 127 | **手柄 GamePad** 128 |
暂不支持 129 |
Temporarily not supported 130 | 131 | ### 功能 - 选项
Functions - Option 132 | 133 | 启动界面的功能栏中允许手动选择是否启用以下辅助性选项: 134 |
The `Function Tab` which located in the startup interface allows users to choose whether toggle the following options: 135 | 136 | **管理员权限(默认启用) Run as Admin (Toggled by default)** 137 |
以管理员身份运行程序 138 |
Run program as administrator 139 | 140 | **全自动识别(默认启用) Automatic Identification (Toggled by default)** 141 |
使键位仅在战斗场景生效 142 |
Let the keymaps only take effect in combat scene 143 | 144 | **可隐藏光标(默认启用) Cursor Occlusion (Toggled by default)** 145 |
光标会在战斗场景下自动隐藏,但注意前提是启用了自动识别 146 |
Hide cursor automatically while in combat, but mind that this funtion would only work under the premise of toggling the "Automatic Identification" 147 | 148 | **限制性光标(默认启用) Cursor Restriction (Toggled by default)** 149 |
战斗场景下会将光标限制于安全区域内以避免触发UI 150 |
Restrict cursor in a "safe zone" to avoid toggling the UI buttons 151 | 152 | ### 功能 - 调参
Functions - Tuning 153 | 154 | 启动界面的功能栏中允许手动调节自动识别系统的以下参数: 155 |
The `Function Tab` which located in the startup interface allows users to adjust the following params of Automatic Identification: 156 | 157 | **正常战斗识别容错率-目标 FT_NormalCombat_Target** 158 |
在战斗场景中处于高血量状态时的识别区目标的容错百分率 159 |
Fault tolerance percentage of target in combat scene without low health alert 160 | 161 | **正常战斗识别容错率-背景 FT_NormalCombat_Background** 162 |
在战斗场景中处于高血量状态时的识别区背景的容错百分率 163 |
Fault tolerance percentage of background in combat scene without low health alert 164 | 165 | **濒危战斗识别容错率-目标 FT_DangerCombat_Target** 166 |
在战斗场景中处于低血量状态时的识别区目标的容错百分率 167 |
Fault tolerance percentage of target in combat scene with low health alert 168 | 169 | **濒危战斗识别容错率-背景 FT_DangerCombat_Background** 170 |
在战斗场景中处于低血量状态时的识别区背景的容错百分率 171 |
Fault tolerance percentage of background in combat scene with low health alert 172 | 173 | **乐土大厅识别容错率-目标 FT_ElysiumLobby_Target** 174 |
在往事乐土大厅场景中时的识别区目标的容错百分率 175 |
Fault tolerance percentage of target in Elysium Lobby scene 176 | 177 | **乐土大厅识别容错率-背景 FT_ElysiumLobby_Background** 178 |
在往事乐土大厅场景中时的识别区背景的容错百分率 179 |
Fault tolerance percentage of background in Elysium Lobby scene 180 | 181 | ### 附加设定
Addition 182 | 183 | 1. 战斗场景内使用快捷键AltTab、WinTab进行窗口切换时会自动暂停游戏,按下F1、F3时也是同理(以启用全自动识别为前提)。需要注意的是,为节省资源占用和提高容错率,在执行快速切换后程序亦会自动暂停,故在切回游戏界面后需手动按下F1键以恢复程序运行。 184 |
While switching or rearranging windows by pressing shortcut AltTab or WinTab, the game would automaticly pause, so as the `F1 key` and `F3 key` (Under the premise of toggling the `Automatic Identification`). Notably, the programm would also suspend automaticly after doing quick switch or arrangement in order to lower the usage of system resources. Therefore, to resume the program manually, you need to press F1 key after switching back to the game. 185 | 186 | 2. ~~新增对往世乐土大厅场景的识别支持(以启用全自动识别为前提)~~ 187 |
~~New scene supported: Elysium Lobby (Under the premise of toggling the `Automatic Identification`)~~ 188 | 189 | 3. ~~精简版去掉了除左键(普攻)外的所有战斗键位~~ 190 |
~~The simplified version removed all the combat keymaps except LButton (which is for normal attack).~~ 191 | 192 | 4. 启动界面的设置栏中可以直接重置当前配置 193 |
Current configuration can be reset from the `Settings Tab` which located in the start-up interface. 194 | 195 | 5. 在系统托盘处对图标右键可以在“其它”栏目中直接打开或删除配置文件 196 |
By right-clicking on the tray icon and move to the "Else" section, can the configuration file be directly accessed or deleted. 197 | 198 | 199 | ## 【缺陷 Bugs】 200 | 201 | 1. 目前未知视角缩放的设置键,无法实现该功能 202 |
So far the way to implement camera zooming is still unkown. 203 | 204 | 2. 视角跟随功能目前仍有延迟等问题,目前正在寻找更优方案 205 |
The view-control function has several problems like lagging. Been looking for better scheme to solve it. 206 | 207 | 3. 部分win11用户反映程序运行并未生效,目前尚未发现问题所在 208 |
Some Windows 11 system users reported that the programm won't work properly. Unfortunately I can't find out the problem. 209 | 210 | 4. 全自动识别功能对于硬件性能要求稍高,现已对其进行了数次优化 211 |
The Automatic Identification has a little high demand of hardware performance, though it has been optimized for several times. 212 | 213 | 5. 灵敏度(鼠标DPI)无法通过程序调节。虽然通过调教各函数的响应时间参数能够达到类似的效果,但是需要大量的数据采集和调试,这将是个漫长的过程。 214 |
Mouse DPI can't be simply adjusted through programm. Luckily a similar effect can be achieved by tuning each function's time response parameters, but large amount of data and debugging are needed, should be a long way to go. 215 | 216 | 217 | ## 【测试平台 Tested Devices】 218 | 219 | **1.Honor Hunter V700** 220 | - Type:NoteBook 221 | - GPU:GTX 1660Ti 222 | - CPU:i5-10300H 223 | - RAM:16G 224 | - Sys:Win10 225 | - Res:<=1920*1080 226 | 227 | **2. (Waiting to add other devices)** 228 | 229 | 230 | ## 【收藏趋势 Stargazers over time】 231 | 232 | [![Stargazers over time](https://starchart.cc/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project.svg)](https://starchart.cc/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project) 233 | 234 | 235 | ## 【联系方式 Contact Details】 236 | 237 | [![QQ](https://img.shields.io/badge/QQ-2835946988-brightgreen?style=flat-square&logo=tencent-qq&logoColor=white)]() 238 | 239 | 倘若大伙儿有什么好的建议欢迎随时叨扰哦~ 240 |
Please feel free to contact me at any time, any comments and suggestions will be appreciated:) -------------------------------------------------------------------------------- /Updater.ahk: -------------------------------------------------------------------------------- 1 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 | ; 这里用于存放更新功能相关的代码 3 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 4 | 5 | 6 | Global IsTesting := False ; Turn it to "True" for download testing. 7 | 8 | 9 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- 10 | 11 | 12 | Updater() 13 | { 14 | IsRequestDone := False 15 | Random, ChosenMirror, 1, MirrorList.Length() 16 | If (IsTesting) 17 | Request.Open("GET", MirrorList[ChosenMirror] "/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/releases/download/v0.4.0-beta/Version.txt", True) 18 | Else 19 | Request.Open("GET", MirrorList[ChosenMirror] "/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/releases/latest/download/Version.txt", True) ; 打开启用异步的请求,获取最新版本号记录 20 | Request.onreadystatechange := Func("Ready") ; 设置回调函数 21 | Request.Send() 22 | SetTimer, Retry, -9999 23 | Return 24 | } 25 | 26 | 27 | Ready() 28 | { 29 | If (Request.readyState == 4) ; readyState的每次变化都会触发onreadystatechange函数而status不会,故先判断readyStatus 30 | { 31 | If (!IsRequestDone) 32 | { 33 | IsRequestDone := !IsRequestDone 34 | If (Request.status == 200) 35 | { 36 | SetTimer, Retry, Off 37 | RegExMatch(Version, "(\d+)\.(\d+)\.(\d+)", Version_Current) 38 | RegExMatch(Request.responseText, "^(\d+)\.(\d+)\.(\d+)$", Version_Latest) ; DOMString是XMLHttpRequest返回的纯文本的值。当DOMString为null时,表示请求失败了;当DOMString为""时,表示这个请求还没有被send()。PS: StrLen(Request.responseText) <= 39 | If ((Version_Current1*10000 + Version_Current2*100 + Version_Current3) < (Version_Latest1*10000 + Version_Latest2*100 + Version_Latest3)) 40 | { 41 | MsgBox, 0x24, 询问, % "检测到新版本" Request.responseText "`n是否下载?" 42 | IfMsgBox Yes 43 | { 44 | Try 45 | { 46 | FileCreateDir, ./Temp 47 | If (IsTesting) 48 | UrlDownloadToFile, % MirrorList[ChosenMirror] "/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/releases/download/v0.4.0-beta/BH3_Hotkey.exe", ./Temp/BH3_Hotkey.exe 49 | Else 50 | UrlDownloadToFile, % MirrorList[ChosenMirror] "/Spr-Aachen/Genshin-to-Honkai-PC-Control-Modification-Project/releases/latest/download/BH3_Hotkey.exe", ./Temp/BH3_Hotkey.exe 51 | } 52 | Catch 53 | { 54 | MsgBox, 16, 警告, 下载失败`n进行再次尝试 55 | Return 56 | } 57 | Finally 58 | { 59 | MsgBox, 0, 提示, 更新下载完成`n软件即将重启 60 | FileInstall, EXE/Installer.exe, ./Temp/Installer.exe, 1 61 | Run, ./Temp/Installer.exe 62 | ExitAPP 63 | } 64 | } 65 | } 66 | Else 67 | MsgBox, 0, 提示, 当前已是最新版本 68 | } 69 | Else 70 | { 71 | ;TrayTip, , % "尝试更新失败`nStatus=" Request.status, , 0x3 72 | TryNextMirror() 73 | } 74 | } 75 | } 76 | } 77 | 78 | 79 | TryNextMirror() 80 | { 81 | ChosenMirror_Tried.Push(ChosenMirror) 82 | For Key, Value in MirrorList 83 | { 84 | Tried := False 85 | For _, Element in ChosenMirror_Tried ; "_"为占位符 86 | { 87 | If (Element == Key) 88 | { 89 | Tried := True 90 | Break 91 | } 92 | } 93 | If (!Tried) 94 | { 95 | ChosenMirror := Key 96 | Updater() 97 | Return 98 | } 99 | } 100 | TrayTip, , % "再次尝试更新失败`nStatus=" Request.status, , 0x3 101 | } 102 | 103 | 104 | Retry() 105 | { 106 | TryNextMirror() 107 | Return 108 | } 109 | 110 | 111 | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------