forked from babalae/bettergi-scripts-list
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbettergi.d.ts
More file actions
4054 lines (3669 loc) · 122 KB
/
bettergi.d.ts
File metadata and controls
4054 lines (3669 loc) · 122 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// AUTO-GENERATED FILE. DO NOT EDIT.
// This file was generated by add-capitalize-method-recast.js
/**
* BetterGenshinImpact JavaScript API 类型声明文件
* 此文件定义了在脚本中可用的所有全局对象和方法
* 注意: ClearScript 绑定后类型和方法的首字母会变为小写
*/
// ==================== 全局方法 ====================
/**
* 延迟执行(异步)
* @param millisecondsTimeout 延迟时间(毫秒)
*/
declare function sleep(millisecondsTimeout: number): Promise<void>;
/**
* 按下键盘按键
* @param key 按键名称,例如 "VK_W", "VK_SPACE", "VK_LBUTTON" 等
*/
declare function keyDown(key: string): void;
/**
* 释放键盘按键
* @param key 按键名称
*/
declare function keyUp(key: string): void;
/**
* 按下并释放键盘按键
* @param key 按键名称
*/
declare function keyPress(key: string): void;
/**
* 设置游戏窗口尺寸和 DPI
* @param width 游戏窗口宽度(必须是16:9分辨率)
* @param height 游戏窗口高度(必须是16:9分辨率)
* @param dpi DPI 缩放比例,默认为 1
*/
declare function setGameMetrics(width: number, height: number, dpi?: number): void;
/**
* 相对移动鼠标
* @param x X 轴偏移量
* @param y Y 轴偏移量
*/
declare function moveMouseBy(x: number, y: number): void;
/**
* 移动鼠标到指定游戏坐标
* @param x X 坐标(游戏窗口内)
* @param y Y 坐标(游戏窗口内)
*/
declare function moveMouseTo(x: number, y: number): void;
/**
* 点击指定游戏坐标
* @param x X 坐标
* @param y Y 坐标
*/
declare function click(x: number, y: number): void;
/**
* 左键单击
*/
declare function leftButtonClick(): void;
/**
* 按下左键
*/
declare function leftButtonDown(): void;
/**
* 释放左键
*/
declare function leftButtonUp(): void;
/**
* 右键单击
*/
declare function rightButtonClick(): void;
/**
* 按下右键
*/
declare function rightButtonDown(): void;
/**
* 释放右键
*/
declare function rightButtonUp(): void;
/**
* 中键单击
*/
declare function middleButtonClick(): void;
/**
* 按下中键
*/
declare function middleButtonDown(): void;
/**
* 释放中键
*/
declare function middleButtonUp(): void;
/**
* 鼠标垂直滚动
* @param scrollAmountInClicks 滚动量(正数向上,负数向下)
*/
declare function verticalScroll(scrollAmountInClicks: number): void;
/**
* 捕获游戏区域的图像
* @returns 图像区域对象
*/
declare function captureGameRegion(): ImageRegion;
/**
* 获取当前队伍中的角色名称列表
* @returns 角色名称数组
*/
declare function getAvatars(): string[];
/**
* 输入文本(通过剪贴板粘贴)
* @param text 要输入的文本
*/
declare function inputText(text: string): void;
/**
* 获取当前程序版本号
* @returns 版本号字符串
*/
declare function getVersion(): string;
/**
* 获取当前游戏窗口指标
* @returns [width, height, dpi] 数组
*/
declare function getGameMetrics(): number[];
// ==================== 全局对象 ====================
/**
* 键鼠脚本执行器
*/
declare const keyMouseScript: {
/**
* 执行键鼠宏 JSON
* @param json 键鼠宏 JSON 字符串
*/
run(json: string): Promise<void>;
/**
* 执行键鼠宏文件
* @param path 文件路径(相对于脚本根目录)
*/
runFile(path: string): Promise<void>;
// ==== BEGIN AUTO-GENERATED ALIASES ====
Run: typeof keyMouseScript.run;
RunFile: typeof keyMouseScript.runFile;
// ==== END AUTO-GENERATED ALIASES ====;
};
/**
* 自动路径追踪脚本
*/
declare const pathingScript: {
/**
* 执行路径追踪 JSON
* @param json 路径追踪 JSON 字符串
*/
run(json: string): Promise<void>;
/**
* 执行路径追踪文件
* @param path 文件路径(相对于脚本根目录)
*/
runFile(path: string): Promise<void>;
/**
* 从已订阅的内容中运行文件
* @param path 在 User\AutoPathing 目录下的文件路径
*/
runFileFromUser(path: string): Promise<void>;
// ==== BEGIN AUTO-GENERATED ALIASES ====
Run: typeof pathingScript.run;
RunFile: typeof pathingScript.runFile;
RunFileFromUser: typeof pathingScript.runFileFromUser;
// ==== END AUTO-GENERATED ALIASES ====;
};
/**
* 原神游戏操作相关接口
*/
declare const genshin: {
/** 游戏窗口宽度 */
readonly width: number;
/** 游戏窗口高度 */
readonly height: number;
/** 相对于 1080P 的缩放比例 */
readonly scaleTo1080PRatio: number;
/** 系统 DPI 缩放比例 */
readonly screenDpiScale: number;
/** 导航相关Instance,仅内部使用 */
readonly lazyNavigationInstance: any;
/**
* 传送到指定坐标(数值坐标)
* @param x X 坐标
* @param y Y 坐标
*/
tp(x: number, y: number): Promise<void>;
/**
* 传送到指定坐标(数值坐标,强制传送)
* @param x X 坐标
* @param y Y 坐标
* @param force 是否强制传送
*/
tp(x: number, y: number, force: boolean): Promise<void>;
/**
* 传送到指定坐标(数值坐标,指定地图)
* @param x X 坐标
* @param y Y 坐标
* @param mapName 地图名称
* @param force 是否强制传送
*/
tp(x: number, y: number, mapName: string, force: boolean): Promise<void>;
/**
* 传送到指定坐标(字符串坐标)
* @param x X 坐标
* @param y Y 坐标
*/
tp(x: string, y: string): Promise<void>;
/**
* 传送到指定坐标(字符串坐标,强制传送)
* @param x X 坐标
* @param y Y 坐标
* @param force 是否强制传送
*/
tp(x: string, y: string, force: boolean): Promise<void>;
/**
* 移动大地图到指定坐标
* @param x X 坐标
* @param y Y 坐标
* @param forceCountry 强制指定的国家(可选)
*/
moveMapTo(x: number, y: number, forceCountry?: string | null): Promise<void>;
/**
* 移动独立地图到指定坐标
* @param x X 坐标
* @param y Y 坐标
* @param mapName 地图名称
* @param forceCountry 强制指定的国家(可选)
*/
moveIndependentMapTo(x: number, y: number, mapName: string, forceCountry?: string | null): Promise<void>;
/**
* 获取当前大地图缩放等级
* @returns 缩放等级(1.0-6.0)
*/
getBigMapZoomLevel(): number;
/**
* 设置大地图缩放等级
* @param zoomLevel 缩放等级(1.0-6.0,1.0 为最大地图,6.0 为最小地图)
*/
setBigMapZoomLevel(zoomLevel: number): Promise<void>;
/**
* 传送到七天神像
*/
tpToStatueOfTheSeven(): Promise<void>;
/**
* 从大地图获取当前位置
* @returns 位置坐标,获取失败时返回 null
*/
getPositionFromBigMap(): Point2f | null;
/**
* 从大地图获取当前位置(指定地图)
* @param mapName 地图名称
* @returns 位置坐标,获取失败时返回 null
*/
getPositionFromBigMap(mapName: string): Point2f | null;
/**
* 从小地图获取当前位置(使用默认地图和缓存时间)
* @returns 位置坐标,获取失败时返回 null
*/
getPositionFromMap(): Point2f | null;
/**
* 从小地图获取当前位置(指定地图)
* @param mapName 地图名称
* @param cacheTimeMs 缓存时间(毫秒,默认 900ms)
* @returns 位置坐标,获取失败时返回 null
*/
getPositionFromMap(mapName: string, cacheTimeMs?: number): Point2f | null;
/**
* 从小地图获取当前位置(局部匹配)
* @param mapName 地图名称
* @param x 参考世界坐标 X
* @param y 参考世界坐标 Y
* @returns 位置坐标,获取失败时返回 null
*/
getPositionFromMap(mapName: string, x: number, y: number): Point2f | null;
/**
* 获取摄像机朝向
* @returns 朝向角度
*/
getCameraOrientation(): number;
/**
* 切换队伍
* @param partyName 队伍名称
* @returns 是否成功
*/
switchParty(partyName: string): Promise<boolean>;
/**
* 清除当前调度器的队伍缓存
*/
clearPartyCache(): void;
/**
* 自动点击空月祝福
*/
blessingOfTheWelkinMoon(): Promise<void>;
/**
* 持续对话并选择目标选项
* @param option 选项文本
* @param skipTimes 跳过次数(默认 10)
* @param isOrange 是否为橙色选项(默认 false)
*/
chooseTalkOption(option: string, skipTimes?: number, isOrange?: boolean): Promise<void>;
/**
* 一键领取纪行奖励
*/
claimBattlePassRewards(): Promise<void>;
/**
* 领取长效历练点奖励
*/
claimEncounterPointsRewards(): Promise<void>;
/**
* 前往冒险家协会领取奖励
* @param country 国家名称
*/
goToAdventurersGuild(country: string): Promise<void>;
/**
* 前往合成台
* @param country 国家名称
*/
goToCraftingBench(country: string): Promise<void>;
/**
* 返回主界面
*/
returnMainUi(): Promise<void>;
/**
* 自动钓鱼
* @param fishingTimePolicy 钓鱼时间策略(默认 0)
*/
autoFishing(fishingTimePolicy?: number): Promise<void>;
/**
* 重新登录原神
*/
relogin(): Promise<void>;
/**
* 进出千星奇域
*/
wonderlandCycle(): Promise<void>;
/**
* 调整时间(数值参数)
* @param hour 目标小时(0-24)
* @param minute 目标分钟(0-59)
* @param skip 是否跳过动画(默认 false)
*/
setTime(hour: number, minute: number, skip?: boolean): Promise<void>;
/**
* 调整时间(字符串参数)
* @param hour 目标小时(0-24 的字符串形式)
* @param minute 目标分钟(0-59 的字符串形式)
* @param skip 是否跳过动画(默认 false)
*/
setTime(hour: string, minute: string, skip?: boolean): Promise<void>;
// ==== BEGIN AUTO-GENERATED ALIASES ====
readonly Width: typeof genshin.width;
readonly Height: typeof genshin.height;
readonly ScaleTo1080PRatio: typeof genshin.scaleTo1080PRatio;
readonly ScreenDpiScale: typeof genshin.screenDpiScale;
readonly LazyNavigationInstance: typeof genshin.lazyNavigationInstance;
Tp: typeof genshin.tp;
MoveMapTo: typeof genshin.moveMapTo;
MoveIndependentMapTo: typeof genshin.moveIndependentMapTo;
GetBigMapZoomLevel: typeof genshin.getBigMapZoomLevel;
SetBigMapZoomLevel: typeof genshin.setBigMapZoomLevel;
TpToStatueOfTheSeven: typeof genshin.tpToStatueOfTheSeven;
GetPositionFromBigMap: typeof genshin.getPositionFromBigMap;
GetPositionFromMap: typeof genshin.getPositionFromMap;
GetCameraOrientation: typeof genshin.getCameraOrientation;
SwitchParty: typeof genshin.switchParty;
ClearPartyCache: typeof genshin.clearPartyCache;
BlessingOfTheWelkinMoon: typeof genshin.blessingOfTheWelkinMoon;
ChooseTalkOption: typeof genshin.chooseTalkOption;
ClaimBattlePassRewards: typeof genshin.claimBattlePassRewards;
ClaimEncounterPointsRewards: typeof genshin.claimEncounterPointsRewards;
GoToAdventurersGuild: typeof genshin.goToAdventurersGuild;
GoToCraftingBench: typeof genshin.goToCraftingBench;
ReturnMainUi: typeof genshin.returnMainUi;
AutoFishing: typeof genshin.autoFishing;
Relogin: typeof genshin.relogin;
WonderlandCycle: typeof genshin.wonderlandCycle;
SetTime: typeof genshin.setTime;
// ==== END AUTO-GENERATED ALIASES ====;
};
/**
* 日志输出
*/
declare const log: {
/**
* 输出调试日志
* @param message 消息
* @param args 参数
*/
debug(message?: string, ...args: any[]): void;
/**
* 输出信息日志
* @param message 消息
* @param args 参数
*/
info(message?: string, ...args: any[]): void;
/**
* 输出警告日志
* @param message 消息
* @param args 参数
*/
warn(message?: string, ...args: any[]): void;
/**
* 输出错误日志
* @param message 消息
* @param args 参数
*/
error(message?: string, ...args: any[]): void;
// ==== BEGIN AUTO-GENERATED ALIASES ====
Debug: typeof log.debug;
Info: typeof log.info;
Warn: typeof log.warn;
Error: typeof log.error;
// ==== END AUTO-GENERATED ALIASES ====;
};
/**
* 受限文件操作
*/
declare const file: {
/**
* 读取指定文件夹内所有文件和文件夹的路径(非递归)
* @param folderPath 文件夹路径(相对于根目录)
* @returns 文件和文件夹路径数组
*/
readPathSync(folderPath: string): string[];
/**
* 判断路径是否为文件夹
* @param path 文件或文件夹路径
* @returns 是否为文件夹
*/
isFolder(path: string): boolean;
/**
* 同步读取文本文件
* @param path 文件路径
* @returns 文件内容
*/
readTextSync(path: string): string;
/**
* 异步读取文本文件
* @param path 文件路径
* @returns 文件内容
*/
readText(path: string): Promise<string>;
/**
* 异步读取文本文件(带回调)
* @param path 文件路径
* @param callbackFunc 回调函数
* @returns 文件内容
*/
readText(path: string, callbackFunc: (error: string | null, data: string | null) => void): Promise<string>;
/**
* 同步读取图像文件为 Mat 对象
* @param path 图像文件路径
* @returns Mat 对象
*/
readImageMatSync(path: string): Mat;
/**
* 同步写入文本到文件
* @param path 文件路径
* @param content 要写入的内容
* @param append 是否追加到文件末尾(默认 false)
* @returns 是否写入成功
*/
writeTextSync(path: string, content: string, append?: boolean): boolean;
/**
* 异步写入文本到文件
* @param path 文件路径
* @param content 要写入的内容
* @param append 是否追加到文件末尾(默认 false)
* @returns 是否写入成功
*/
writeText(path: string, content: string, append?: boolean): Promise<boolean>;
/**
* 异步写入文本到文件(带回调)
* @param path 文件路径
* @param content 要写入的内容
* @param callbackFunc 回调函数
* @param append 是否追加到文件末尾(默认 false)
* @returns 是否写入成功
*/
writeText(path: string, content: string, callbackFunc: (error: string | null, success: boolean | null) => void, append?: boolean): Promise<boolean>;
/**
* 同步写入图像到文件(默认 PNG 格式)
* @param path 文件路径
* @param mat Mat 对象
* @returns 是否写入成功
*/
writeImageSync(path: string, mat: Mat): boolean;
/**
* 同步读取图像文件为 Mat 对象,并调整到指定尺寸
* @param path 图像文件路径
* @param width 调整后的宽度
* @param height 调整后的高度
* @param interpolation 插值算法(0=最近邻, 1=双线性(默认), 2=双三次, 3=区域重采样, 4=Lanczos, 5=精确双线性)
* @returns 调整尺寸后的 Mat 对象
*/
readImageMatWithResizeSync(path: string, width: number, height: number, interpolation?: number): Mat;
// ==== BEGIN AUTO-GENERATED ALIASES ====
ReadPathSync: typeof file.readPathSync;
IsFolder: typeof file.isFolder;
ReadTextSync: typeof file.readTextSync;
ReadText: typeof file.readText;
ReadImageMatSync: typeof file.readImageMatSync;
WriteTextSync: typeof file.writeTextSync;
WriteText: typeof file.writeText;
WriteImageSync: typeof file.writeImageSync;
ReadImageMatWithResizeSync: typeof file.readImageMatWithResizeSync;
// ==== END AUTO-GENERATED ALIASES ====;
};
/**
* HTTP 请求
*/
declare const http: {
/**
* 发送 HTTP 请求
* @param method HTTP 方法(GET, POST, PUT, DELETE 等)
* @param url 请求 URL
* @param body 请求体(可选)
* @param headersJson 请求头 JSON 字符串(可选)
* @returns HTTP 响应
*/
request(method: string, url: string, body?: string | null, headersJson?: string | null): Promise<HttpResponse>;
// ==== BEGIN AUTO-GENERATED ALIASES ====
Request: typeof http.request;
// ==== END AUTO-GENERATED ALIASES ====;
};
/**
* HTTP 响应
*/
interface HttpResponse {
/** HTTP 状态码 */
status_code: number;
/** 响应头 */
headers: { [key: string]: string };
/** 响应体 */
body: string;
}
/**
* 通知
*/
declare const notification: {
/**
* 发送通知
* @param message 通知消息
*/
send(message: string): void;
/**
* 发送错误通知
* @param message 通知消息
*/
error(message: string): void;
// ==== BEGIN AUTO-GENERATED ALIASES ====
Send: typeof notification.send;
Error: typeof notification.error;
// ==== END AUTO-GENERATED ALIASES ====;
};
/**
* 任务调度器
*/
declare const dispatcher: {
/**
* 添加实时任务(会清理之前的所有任务)
* @param timer 实时任务触发器
*/
addTimer(timer: RealtimeTimer): void;
/**
* 添加触发器(不会清理之前的任务)
* @param timer 实时任务触发器
*/
addTrigger(timer: RealtimeTimer): void;
/**
* 清理所有触发器
*/
clearAllTriggers(): void;
/**
* 运行独立任务
* @param soloTask 独立任务
* @param customCt 自定义取消令牌(可选)
* @returns 任务结果
*/
runTask(soloTask: SoloTask, customCt?: CancellationToken | null): Promise<any>;
/**
* 运行独立任务(带取消令牌源)
* @param soloTask 独立任务
* @param customCts 自定义取消令牌源
* @returns 任务结果
*/
runTask(soloTask: SoloTask, customCts: CancellationTokenSource): Promise<void>;
/**
* 获取链接的取消令牌源
* @returns 取消令牌源
*/
getLinkedCancellationTokenSource(): CancellationTokenSource;
/**
* 获取链接的取消令牌
* @returns 取消令牌
*/
getLinkedCancellationToken(): CancellationToken;
/**
* 运行自动秘境任务
* @param param 秘境任务参数
* @param customCt 自定义取消令牌(可选)
*/
runAutoDomainTask(param: AutoDomainParam, customCt?: CancellationToken | null): Promise<void>;
/**
* 运行自动战斗任务
* @param param 战斗任务参数
* @param customCt 自定义取消令牌(可选)
*/
runAutoFightTask(param: AutoFightParam, customCt?: CancellationToken | null): Promise<void>;
/**
* 运行自动地脉花任务
* @param param 自动地脉花任务参数
* @param customCt 自定义取消令牌(可选)
*/
runAutoLeyLineOutcropTask(param: AutoLeyLineOutcropParam, customCt?: CancellationToken | null): Promise<void>;
// ==== BEGIN AUTO-GENERATED ALIASES ====
AddTimer: typeof dispatcher.addTimer;
AddTrigger: typeof dispatcher.addTrigger;
ClearAllTriggers: typeof dispatcher.clearAllTriggers;
RunTask: typeof dispatcher.runTask;
GetLinkedCancellationTokenSource: typeof dispatcher.getLinkedCancellationTokenSource;
GetLinkedCancellationToken: typeof dispatcher.getLinkedCancellationToken;
RunAutoDomainTask: typeof dispatcher.runAutoDomainTask;
RunAutoFightTask: typeof dispatcher.runAutoFightTask;
RunAutoLeyLineOutcropTask: typeof dispatcher.runAutoLeyLineOutcropTask;
// ==== END AUTO-GENERATED ALIASES ====;
};
// ==================== 类型定义 ====================
/**
* 实时任务触发器
*/
declare class RealtimeTimer {
/** 任务名称 */
name?: string;
/** 触发间隔(毫秒,默认 50ms) */
interval: number;
/** 任务配置 */
config?: any;
constructor();
constructor(name: string);
constructor(name: string, config: any);
// ==== BEGIN AUTO-GENERATED ALIASES ====
declare Name: typeof RealtimeTimer.prototype.name;
declare Interval: typeof RealtimeTimer.prototype.interval;
declare Config: typeof RealtimeTimer.prototype.config;
// ==== END AUTO-GENERATED ALIASES ====
}
/**
* 独立任务
*/
declare class SoloTask {
/** 任务名称 */
name: string;
/** 任务配置 */
config?: any;
constructor(name: string);
constructor(name: string, config: any);
// ==== BEGIN AUTO-GENERATED ALIASES ====
declare Name: typeof SoloTask.prototype.name;
declare Config: typeof SoloTask.prototype.config;
// ==== END AUTO-GENERATED ALIASES ====
}
/**
* 取消令牌源
*/
declare class CancellationTokenSource {
/** 取消令牌 */
readonly token: CancellationToken;
/** 是否已请求取消 */
readonly isCancellationRequested: boolean;
constructor();
/**
* 创建关联的令牌源
* @param tokens 取消令牌列表
*/
static createLinkedTokenSource(...tokens: CancellationToken[]): CancellationTokenSource;
/**
* 取消操作
*/
cancel(): void;
/**
* 取消操作
* @param throwOnFirstException 是否在第一个异常时抛出
*/
cancel(throwOnFirstException: boolean): void;
/**
* 异步取消操作
*/
cancelAsync(): Promise<void>;
/**
* 在指定延迟后取消
* @param millisecondsDelay 延迟时间(毫秒)
*/
cancelAfter(millisecondsDelay: number): void;
/**
* 尝试重置令牌源
* @returns 是否成功
*/
tryReset(): boolean;
/**
* 释放资源
*/
dispose(): void;
// ==== BEGIN AUTO-GENERATED ALIASES ====
declare readonly Token: typeof CancellationTokenSource.prototype.token;
declare readonly IsCancellationRequested: typeof CancellationTokenSource.prototype.isCancellationRequested;
declare static CreateLinkedTokenSource: typeof CancellationTokenSource.createLinkedTokenSource;
declare Cancel: typeof CancellationTokenSource.prototype.cancel;
declare CancelAsync: typeof CancellationTokenSource.prototype.cancelAsync;
declare CancelAfter: typeof CancellationTokenSource.prototype.cancelAfter;
declare TryReset: typeof CancellationTokenSource.prototype.tryReset;
declare Dispose: typeof CancellationTokenSource.prototype.dispose;
// ==== END AUTO-GENERATED ALIASES ====
}
/**
* 取消令牌
*/
declare class CancellationToken {
/** 是否已请求取消 */
readonly isCancellationRequested: boolean;
/** 是否可以被取消 */
readonly canBeCanceled: boolean;
/** 等待句柄 */
readonly waitHandle: any;
static readonly none: any;
/**
* 注册取消回调
* @param callback 回调函数
*/
register(callback: Function): any;
/**
* 注册取消回调
* @param callback 回调函数
* @param state 状态对象
*/
register(callback: Function, state: any): any;
/**
* 注册取消回调
* @param callback 回调函数
* @param state 状态对象
* @param useSynchronizationContext 是否使用同步上下文
*/
register(callback: Function, state: any, useSynchronizationContext: boolean): any;
/**
* 注册取消回调(非安全)
* @param callback 回调函数
*/
unsafeRegister(callback: Function): any;
/**
* 注册取消回调(非安全)
* @param callback 回调函数
* @param state 状态对象
*/
unsafeRegister(callback: Function, state: any): any;
/**
* 如果已请求取消则抛出异常
*/
throwIfCancellationRequested(): void;
// ==== BEGIN AUTO-GENERATED ALIASES ====
declare readonly IsCancellationRequested: typeof CancellationToken.prototype.isCancellationRequested;
declare readonly CanBeCanceled: typeof CancellationToken.prototype.canBeCanceled;
declare readonly WaitHandle: typeof CancellationToken.prototype.waitHandle;
declare static readonly None: typeof CancellationToken.none;
declare Register: typeof CancellationToken.prototype.register;
declare UnsafeRegister: typeof CancellationToken.prototype.unsafeRegister;
declare ThrowIfCancellationRequested: typeof CancellationToken.prototype.throwIfCancellationRequested;
// ==== END AUTO-GENERATED ALIASES ====
}
/**
* PostMessage 模拟器
*/
declare class PostMessage {
constructor();
/**
* 按下键盘按键
* @param key 按键名称
*/
keyDown(key: string): void;
/**
* 释放键盘按键
* @param key 按键名称
*/
keyUp(key: string): void;
/**
* 按下并释放键盘按键
* @param key 按键名称
*/
keyPress(key: string): void;
/**
* 点击(无参数)
*/
click(): void;
// ==== BEGIN AUTO-GENERATED ALIASES ====
declare KeyDown: typeof PostMessage.prototype.keyDown;
declare KeyUp: typeof PostMessage.prototype.keyUp;
declare KeyPress: typeof PostMessage.prototype.keyPress;
declare Click: typeof PostMessage.prototype.click;
// ==== END AUTO-GENERATED ALIASES ====
}
/**
* 服务器时间
*/
declare class ServerTime {
/**
* 获取服务器时区偏移量(毫秒)
* @returns 偏移量(毫秒)
*/
static getServerTimeZoneOffset(): number;
// ==== BEGIN AUTO-GENERATED ALIASES ====
declare static GetServerTimeZoneOffset: typeof ServerTime.getServerTimeZoneOffset;
// ==== END AUTO-GENERATED ALIASES ====
}
/**
* 自动秘境任务参数
*/
declare class AutoDomainParam {
constructor(domainRoundNum: number, path: string);
constructor(domainRoundNum?: number);
/** 副本轮数 */
domainRoundNum: number;
/** 战斗策略路径 */
combatStrategyPath: string;
/** 队伍名称 */
partyName: string;
/** 副本名称 */
domainName: string;
/** 周日选择的值 */
sundaySelectedValue: string;
/** 结束后是否自动分解圣遗物 */
autoArtifactSalvage: boolean;
/** 分解圣遗物的最大星级 (1-4) */
maxArtifactStar: string;
/** 是否指定树脂使用 */
specifyResinUse: boolean;
/** 树脂使用优先级列表 */
resinPriorityList: string[];
/** 使用原粹树脂次数 */
originalResinUseCount: number;
/** 使用浓缩树脂次数 */
condensedResinUseCount: number;
/** 使用须臾树脂次数 */
transientResinUseCount: number;
/** 使用脆弱树脂次数 */
fragileResinUseCount: number;
/** 游戏文化信息 */
gameCultureInfo: any;
/** 字符串本地化器 */
stringLocalizer: any;
/**
* 设置默认值
*/
setDefault(): void;
/**
* 设置战斗策略路径
* @param strategyName 策略名称
* @returns 策略路径
*/
setCombatStrategyPath(strategyName?: string): string;
/**
* 设置树脂优先级列表
* @param list 优先级列表
*/
setResinPriorityList(...priorities: string[]): void;
// ==== BEGIN AUTO-GENERATED ALIASES ====
declare DomainRoundNum: typeof AutoDomainParam.prototype.domainRoundNum;
declare CombatStrategyPath: typeof AutoDomainParam.prototype.combatStrategyPath;
declare PartyName: typeof AutoDomainParam.prototype.partyName;
declare DomainName: typeof AutoDomainParam.prototype.domainName;
declare SundaySelectedValue: typeof AutoDomainParam.prototype.sundaySelectedValue;
declare AutoArtifactSalvage: typeof AutoDomainParam.prototype.autoArtifactSalvage;
declare MaxArtifactStar: typeof AutoDomainParam.prototype.maxArtifactStar;
declare SpecifyResinUse: typeof AutoDomainParam.prototype.specifyResinUse;
declare ResinPriorityList: typeof AutoDomainParam.prototype.resinPriorityList;
declare OriginalResinUseCount: typeof AutoDomainParam.prototype.originalResinUseCount;
declare CondensedResinUseCount: typeof AutoDomainParam.prototype.condensedResinUseCount;
declare TransientResinUseCount: typeof AutoDomainParam.prototype.transientResinUseCount;
declare FragileResinUseCount: typeof AutoDomainParam.prototype.fragileResinUseCount;
declare GameCultureInfo: typeof AutoDomainParam.prototype.gameCultureInfo;
declare StringLocalizer: typeof AutoDomainParam.prototype.stringLocalizer;
declare SetDefault: typeof AutoDomainParam.prototype.setDefault;
declare SetCombatStrategyPath: typeof AutoDomainParam.prototype.setCombatStrategyPath;
declare SetResinPriorityList: typeof AutoDomainParam.prototype.setResinPriorityList;
// ==== END AUTO-GENERATED ALIASES ====
}
/**
* 战斗结束检测配置
*/
declare class FightFinishDetectConfig {
/** 战斗结束进度条颜色 */
battleEndProgressBarColor: string;
/** 战斗结束进度条颜色容差 */
battleEndProgressBarColorTolerance: string;
/** 是否启用快速检测 */
fastCheckEnabled: boolean;
/** 快速检测参数 */
fastCheckParams: string;
/** 检测结束延迟 */
checkEndDelay: string;
/** 检测前延迟 */
beforeDetectDelay: string;
/** 是否启用旋转查找敌人 */
rotateFindEnemyEnabled: boolean;
// ==== BEGIN AUTO-GENERATED ALIASES ====
declare BattleEndProgressBarColor: typeof FightFinishDetectConfig.prototype.battleEndProgressBarColor;
declare BattleEndProgressBarColorTolerance: typeof FightFinishDetectConfig.prototype.battleEndProgressBarColorTolerance;
declare FastCheckEnabled: typeof FightFinishDetectConfig.prototype.fastCheckEnabled;
declare FastCheckParams: typeof FightFinishDetectConfig.prototype.fastCheckParams;
declare CheckEndDelay: typeof FightFinishDetectConfig.prototype.checkEndDelay;
declare BeforeDetectDelay: typeof FightFinishDetectConfig.prototype.beforeDetectDelay;
declare RotateFindEnemyEnabled: typeof FightFinishDetectConfig.prototype.rotateFindEnemyEnabled;
// ==== END AUTO-GENERATED ALIASES ====
}
/**