Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1829498647 | ||
|
|
cb53c74c6c | ||
|
|
4e6190ac7b | ||
|
|
bb374ee491 | ||
|
|
a06f0fcdb2 | ||
|
|
1a2b63fff7 | ||
|
|
220d6a4f9b | ||
|
|
d6860d5294 | ||
|
|
c37c43ce92 | ||
|
|
5984adf015 | ||
|
|
4276957837 | ||
|
|
a0691f1c19 | ||
|
|
ca6994a720 | ||
|
|
cb09a369c2 | ||
|
|
535f6b4551 | ||
|
|
1f798b9a3a | ||
|
|
1fd5320df2 | ||
|
|
5818bcd7ed | ||
|
|
93250f84cf | ||
|
|
010beebcb6 | ||
|
|
e6aa70a74c | ||
|
|
f6801eeaab | ||
|
|
522d0517a6 | ||
|
|
c90fb15557 | ||
|
|
5726e73d40 | ||
|
|
5d70782c49 | ||
|
|
3430e116e3 | ||
|
|
139b2089d5 | ||
|
|
0056dcfc11 | ||
|
|
c5d5ccab0e | ||
|
|
7c1febf307 | ||
|
|
5955f90c03 | ||
|
|
8931a633f1 | ||
|
|
ae5dbab855 | ||
|
|
fe09e9c35f | ||
|
|
023733d88f | ||
|
|
93944250e6 | ||
|
|
c9f7b3a14b | ||
|
|
ae75e9007d | ||
|
|
181b486db7 | ||
|
|
4e7349fac4 | ||
|
|
36da78cb78 | ||
|
|
bfddb53fa0 | ||
|
|
185ce4d930 | ||
|
|
7d82b1af9f | ||
|
|
cb47bf730b | ||
|
|
b2fecf1155 | ||
|
|
201ac734cb | ||
|
|
bb6aa9e121 | ||
|
|
b68b0d85f6 | ||
|
|
7f03157c25 | ||
|
|
461b0b00d1 | ||
|
|
24d798d6b2 | ||
|
|
447fd103de | ||
|
|
b7d492e5d2 | ||
|
|
3b701735e6 | ||
|
|
928f9612c0 | ||
|
|
a440729a67 | ||
|
|
64c5ab78bc | ||
|
|
c370410d53 | ||
|
|
98b1376111 | ||
|
|
622a4d5fde | ||
|
|
fb0c63f8a8 | ||
|
|
1610f1cd31 | ||
|
|
ab2d6c1de4 | ||
|
|
b62e4a7425 | ||
|
|
8f64c0ca4e | ||
|
|
57138a7be0 | ||
|
|
6aa02b94d9 | ||
|
|
be89383add | ||
|
|
0097bfa8c3 | ||
|
|
9393b0cb24 | ||
|
|
6812f30732 | ||
|
|
c6680ced12 | ||
|
|
b47ce6f529 | ||
|
|
9b874d3747 | ||
|
|
2b6465be22 | ||
|
|
d2574022fc | ||
|
|
87ae5e437a | ||
|
|
c486b860d0 | ||
|
|
4784551e10 | ||
|
|
030caec91f | ||
|
|
8b0bdef670 | ||
|
|
6651ec7d9f | ||
|
|
d4fe1f2ab0 | ||
|
|
4e1a0673c9 | ||
|
|
f904fe024b | ||
|
|
bb41bcb25e | ||
|
|
743debb58b | ||
|
|
180fc2d228 | ||
|
|
d148014b7f | ||
|
|
9fa721d5e4 | ||
|
|
8a5d1d5f64 | ||
|
|
cc245b0e8a | ||
|
|
49bc6befb7 | ||
|
|
f82e35382c | ||
|
|
224fc9917a | ||
|
|
eb0b681b9d | ||
|
|
f61a7c32d4 |
No files matched your search
@@ -0,0 +1,3 @@
|
||||
[submodule "BetterGenshinImpact/Script"]
|
||||
path = BetterGenshinImpact/Script
|
||||
url = https://github.com/babalae/bettergi-scripts.git
|
||||
@@ -19,9 +19,17 @@ public class AvatarClassifyGen
|
||||
// 读取基础图像
|
||||
// List<string> sideImageFiles = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "*.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
// 只用一个图像
|
||||
List<string> sideImageFiles = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "UI_AvatarIcon_Side_Sethos.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
// List<string> sideImageFiles2 = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "UI_AvatarIcon_Side_Clorinde.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
// sideImageFiles.AddRange(sideImageFiles2);
|
||||
List<string> sideImageFiles = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "UI_AvatarIcon_Side_Emilie.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
List<string> sideImageFiles2 = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "UI_AvatarIcon_Side_MomokaCostumeErrantry.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
sideImageFiles.AddRange(sideImageFiles2);
|
||||
List<string> sideImageFiles3 = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "UI_AvatarIcon_Side_NilouCostumeFairy.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
sideImageFiles.AddRange(sideImageFiles3);
|
||||
List<string> sideImageFiles4 = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "UI_AvatarIcon_Side_Kachina.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
sideImageFiles.AddRange(sideImageFiles4);
|
||||
List<string> sideImageFiles5 = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "UI_AvatarIcon_Side_Mualani.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
sideImageFiles.AddRange(sideImageFiles5);
|
||||
List<string> sideImageFiles6 = Directory.GetFiles(Path.Combine(BaseDir, "side_src"), "UI_AvatarIcon_Side_Kinich.png", SearchOption.TopDirectoryOnly).ToList();
|
||||
sideImageFiles.AddRange(sideImageFiles6);
|
||||
|
||||
// 生成训练集
|
||||
GenTo(sideImageFiles, Path.Combine(BaseDir, @"dateset\train"), 200);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="Test"
|
||||
Width="120"
|
||||
Width="240"
|
||||
Height="450"
|
||||
mc:Ignorable="d">
|
||||
<Canvas>
|
||||
@@ -43,7 +43,7 @@
|
||||
Width="100"
|
||||
Height="23"
|
||||
Click="MapDrawTeleportPoint"
|
||||
Content="超大地图标点" />
|
||||
Content="画传送点" />
|
||||
<Button Canvas.Left="10"
|
||||
Canvas.Top="190"
|
||||
Width="100"
|
||||
@@ -62,5 +62,13 @@
|
||||
Height="23"
|
||||
Click="MapPathView"
|
||||
Content="路线地图查看" />
|
||||
<Button Canvas.Left="120"
|
||||
Canvas.Top="10"
|
||||
Width="100"
|
||||
Height="23"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Click="ZoomOut"
|
||||
Content="缩小地图到256" />
|
||||
</Canvas>
|
||||
</Window>
|
||||
@@ -48,8 +48,8 @@ public partial class MainWindow : Window
|
||||
private void DoMatchTest(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
// KeyPointMatchTest.Test();
|
||||
EntireMapTest.Test();
|
||||
// EntireMapTest.Storage();
|
||||
// EntireMapTest.Test();
|
||||
EntireMapTest.Storage();
|
||||
// BigMapMatchTest.Test();
|
||||
|
||||
// FeatureTransfer.Transfer();
|
||||
@@ -74,4 +74,9 @@ public partial class MainWindow : Window
|
||||
{
|
||||
MapPathTest.Test();
|
||||
}
|
||||
|
||||
private void ZoomOut(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ScaleTest.ZoomOutTest();
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class MapPuzzle
|
||||
|
||||
public static void Put()
|
||||
{
|
||||
string folderPath = @"E:\HuiTask\更好的原神\地图匹配\UI_Map"; // 图片文件夹路径
|
||||
string folderPath = @"E:\HuiTask\更好的原神\地图匹配\UI_Map_5.0"; // 图片文件夹路径
|
||||
string pattern = @"UI_MapBack_([-+]?\d+)_([-+]?\d+)(.*)";
|
||||
var images = Directory.GetFiles(folderPath, "*.png", SearchOption.TopDirectoryOnly); // 获取所有图片文件路径
|
||||
|
||||
@@ -158,7 +158,7 @@ public class MapPuzzle
|
||||
}
|
||||
|
||||
// 保存大图
|
||||
Cv2.ImWrite(@"E:\HuiTask\更好的原神\地图匹配\map_46_2048.png", largeImage);
|
||||
Cv2.ImWrite(@"E:\HuiTask\更好的原神\地图匹配\map_50_2048.png", largeImage);
|
||||
// Cv2.ImWrite(@"E:\HuiTask\更好的原神\地图匹配\combined_image_sd4x.png", largeImage.Resize(new Size(largeImage.Width / 4, largeImage.Height / 4), 0, 0, InterpolationFlags.Cubic));
|
||||
// Cv2.ImWrite(@"E:\HuiTask\更好的原神\地图匹配\combined_image_small.png", largeImage.Resize(new Size(1400, 1300), 0, 0, InterpolationFlags.Cubic));
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
using BetterGenshinImpact.Service;
|
||||
using BetterGenshinImpact.GameTask.AutoTrackPath.Model;
|
||||
using BetterGenshinImpact.GameTask.Common.Map;
|
||||
using BetterGenshinImpact.Service;
|
||||
using OpenCvSharp;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using BetterGenshinImpact.GameTask.Common.Element.Assets;
|
||||
|
||||
namespace BetterGenshinImpact.Test.Simple.AllMap;
|
||||
|
||||
@@ -10,24 +13,28 @@ public class MapTeleportPointDraw
|
||||
{
|
||||
public static void Draw()
|
||||
{
|
||||
var pList = LoadTeleportPoint(@"E:\HuiTask\更好的原神\地图匹配\地图点位\Json_Integration\锚点&神像\");
|
||||
var map = new Mat(@"E:\HuiTask\更好的原神\地图匹配\genshin_map_带标记.png");
|
||||
DrawTeleportPoint(map, pList.ToArray());
|
||||
Cv2.ImWrite(@"E:\HuiTask\更好的原神\地图匹配\genshin_map_带标记_传送点.png", map);
|
||||
var pList = LoadTeleportPoint(@"E:\HuiTask\更好的原神\地图匹配\地图点位\5.0");
|
||||
pList.AddRange(MapAssets.Instance.TpPositions);
|
||||
var map = new Mat(@"E:\HuiTask\更好的原神\地图匹配\有用的素材\5.0\mainMap1024BlockColor.png");
|
||||
DrawTeleportPoint(map, pList);
|
||||
Cv2.ImWrite(@"E:\HuiTask\更好的原神\地图匹配\有用的素材\5.0\mainMap1024BlockColor_传送点.png", map);
|
||||
}
|
||||
|
||||
public static void DrawTeleportPoint(Mat map, Point[] points)
|
||||
public static void DrawTeleportPoint(Mat map, List<GiWorldPosition> points)
|
||||
{
|
||||
foreach (var point in points)
|
||||
{
|
||||
Cv2.Circle(map, new Point(point.X, point.Y), 10, Scalar.Red, 2);
|
||||
var p = MapCoordinate.GameToMain1024(point.Position);
|
||||
Cv2.Circle(map, p, 4, Scalar.Red, 2);
|
||||
// 写文字
|
||||
Cv2.PutText(map, $"[{point.X:F2},{point.Y:F2}]", new Point(p.X + 10, p.Y + 5), HersheyFonts.HersheySimplex, 1, Scalar.Red, 2);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Point> LoadTeleportPoint(string folderPath)
|
||||
public static List<GiWorldPosition> LoadTeleportPoint(string folderPath)
|
||||
{
|
||||
string[] files = Directory.GetFiles(folderPath, "*.*", SearchOption.AllDirectories);
|
||||
List<Point> points = new();
|
||||
List<GiWorldPosition> points = new();
|
||||
foreach (var file in files)
|
||||
{
|
||||
var gamePoint = JsonSerializer.Deserialize<GamePoint>(File.ReadAllText(file), ConfigService.JsonOptions);
|
||||
@@ -48,17 +55,12 @@ public class MapTeleportPointDraw
|
||||
/// </summary>
|
||||
/// <param name="position">[a,b,c]</param>
|
||||
/// <returns></returns>
|
||||
public static Point Transform(decimal[] position)
|
||||
public static GiWorldPosition Transform(decimal[] position)
|
||||
{
|
||||
// 四舍六入五取偶
|
||||
var a = (int)Math.Round(position[0]); // 上
|
||||
var c = (int)Math.Round(position[2]); // 左
|
||||
|
||||
// 转换1024区块坐标,大地图坐标系正轴是往左上方向的
|
||||
// 这里写最左上角的区块坐标(m,n)/(上,左),截止4.5版本,最左上角的区块坐标是(5,7)
|
||||
|
||||
int m = 5, n = 7;
|
||||
return new Point((n + 1) * 1024 - c, (m + 1) * 1024 - a);
|
||||
return new GiWorldPosition
|
||||
{
|
||||
Position = position,
|
||||
};
|
||||
}
|
||||
|
||||
class GamePoint
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using OpenCvSharp;
|
||||
|
||||
namespace BetterGenshinImpact.Test.Simple;
|
||||
|
||||
public class ScaleTest
|
||||
{
|
||||
public static void ZoomOutTest()
|
||||
{
|
||||
var mainMap2048BlockMat = new Mat(@"E:\HuiTask\更好的原神\地图匹配\有用的素材\5.0\mainMap2048Block.png", ImreadModes.Color);
|
||||
// 缩小 2048/512 = 4
|
||||
var targetFilePath = @"E:\HuiTask\更好的原神\地图匹配\有用的素材\5.0\mainMap1024BlockColor.png";
|
||||
// opencv 缩小
|
||||
var mainMap256BlockMat = mainMap2048BlockMat.Resize(new Size(mainMap2048BlockMat.Width / 2, mainMap2048BlockMat.Height / 2));
|
||||
mainMap256BlockMat.SaveImage(targetFilePath);
|
||||
}
|
||||
}
|
||||
@@ -13,22 +13,22 @@ internal class MapPathTest
|
||||
{
|
||||
public static void Test()
|
||||
{
|
||||
var wayJson = File.ReadAllText(Global.Absolute(@"log\way\yl3.json"));
|
||||
var way = JsonSerializer.Deserialize<GiPath>(wayJson, ConfigService.JsonOptions) ?? throw new Exception("way json deserialize failed");
|
||||
|
||||
var points = way.WayPointList.Select(giPathPoint => giPathPoint.MatchRect.GetCenterPoint()).ToList();
|
||||
|
||||
var pointsRect = Cv2.BoundingRect(points);
|
||||
var allMap = new Mat(@"E:\HuiTask\更好的原神\地图匹配\有用的素材\mainMap2048Block.png");
|
||||
|
||||
// 按顺序连线,每个点都画圈
|
||||
for (var i = 0; i < points.Count - 1; i++)
|
||||
{
|
||||
Cv2.Line(allMap, points[i], points[i + 1], Scalar.Red, 1);
|
||||
Cv2.Circle(allMap, points[i], 3, Scalar.Red, -1);
|
||||
}
|
||||
|
||||
var map = allMap[new Rect(pointsRect.X - 100, pointsRect.Y - 100, pointsRect.Width + 200, pointsRect.Height + 200)];
|
||||
Cv2.ImShow("map", map);
|
||||
// var wayJson = File.ReadAllText(Global.Absolute(@"log\way\yl3.json"));
|
||||
// var way = JsonSerializer.Deserialize<GiPath>(wayJson, ConfigService.JsonOptions) ?? throw new Exception("way json deserialize failed");
|
||||
//
|
||||
// var points = way.WayPointList.Select(giPathPoint => giPathPoint.MatchRect.GetCenterPoint()).ToList();
|
||||
//
|
||||
// var pointsRect = Cv2.BoundingRect(points);
|
||||
// var allMap = new Mat(@"E:\HuiTask\更好的原神\地图匹配\有用的素材\mainMap2048Block.png");
|
||||
//
|
||||
// // 按顺序连线,每个点都画圈
|
||||
// for (var i = 0; i < points.Count - 1; i++)
|
||||
// {
|
||||
// Cv2.Line(allMap, points[i], points[i + 1], Scalar.Red, 1);
|
||||
// Cv2.Circle(allMap, points[i], 3, Scalar.Red, -1);
|
||||
// }
|
||||
//
|
||||
// var map = allMap[new Rect(pointsRect.X - 100, pointsRect.Y - 100, pointsRect.Width + 200, pointsRect.Height + 200)];
|
||||
// Cv2.ImShow("map", map);
|
||||
}
|
||||
}
|
||||
@@ -2,18 +2,21 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:bgivc="clr-namespace:BetterGenshinImpact.View.Converters"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml">
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:vio="http://schemas.lepo.co/wpfui/2022/xaml/violeta">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ui:ThemesDictionary Theme="Dark" />
|
||||
<ui:ControlsDictionary />
|
||||
<vio:ControlsDictionary />
|
||||
<ResourceDictionary Source="/View/Controls/WpfUi/FaFontIconStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<FontFamily x:Key="TextThemeFontFamily">/Assets/Fonts/MiSans-Regular.ttf#MiSans</FontFamily>
|
||||
<FontFamily x:Key="DigitalThemeFontFamily">/Assets/Fonts/deluge-led.ttf#Deluge LED</FontFamily>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<bgivc:BooleanToVisibilityRevertConverter x:Key="BooleanToVisibilityRevertConverter" />
|
||||
<bgivc:BooleanToEnableTextConverter x:Key="BooleanToEnableTextConverter" />
|
||||
<bgivc:InverseBooleanConverter x:Key="InverseBooleanConverter" />
|
||||
<bgivc:NotNullConverter x:Key="NotNullConverter" />
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -87,13 +87,15 @@ public partial class App : Application
|
||||
services.AddView<HotKeyPage, HotKeyPageViewModel>();
|
||||
services.AddView<NotificationSettingsPage, NotificationSettingsPageViewModel>();
|
||||
services.AddView<KeyMouseRecordPage, KeyMouseRecordPageViewModel>();
|
||||
// services.AddView<DispatcherPage, DispatcherPageViewModel>();
|
||||
services.AddView<JsListPage, JsListViewModel>();
|
||||
services.AddView<MapPathingPage, MapPathingViewModel>();
|
||||
|
||||
// My Services
|
||||
services.AddSingleton<TaskTriggerDispatcher>();
|
||||
services.AddSingleton<NotificationService>();
|
||||
services.AddHostedService(sp => sp.GetRequiredService<NotificationService>());
|
||||
services.AddSingleton<NotifierManager>();
|
||||
services.AddSingleton<IScriptService, ScriptService>();
|
||||
|
||||
// Configuration
|
||||
//services.Configure<AppConfig>(context.Configuration.GetSection(nameof(AppConfig)));
|
||||
@@ -238,7 +240,7 @@ public partial class App : Application
|
||||
e = e.InnerException;
|
||||
}
|
||||
|
||||
MessageBox.Show("程序异常:" + e.Source + "\r\n--" + Environment.NewLine + e.StackTrace + "\r\n---" + Environment.NewLine + e.Message);
|
||||
MessageBox.Error("程序异常:" + e.Source + "\r\n--" + Environment.NewLine + e.StackTrace + "\r\n---" + Environment.NewLine + e.Message);
|
||||
|
||||
// log
|
||||
GetLogger<App>().LogDebug(e, "UnHandle Exception");
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.7 MiB |
Binary file not shown.
@@ -1182,6 +1182,7 @@
|
||||
"其老爷",
|
||||
"关宏",
|
||||
"关垂",
|
||||
"杏仁长老",
|
||||
"仲夏庭园",
|
||||
"无妄引咎密宫",
|
||||
"华池岩岫",
|
||||
@@ -1341,6 +1342,21 @@
|
||||
"残毁的剑柄",
|
||||
"裂断的剑柄",
|
||||
"未熄的剑柄",
|
||||
"意志破碎的残片",
|
||||
"意志明晰的寄偶",
|
||||
"意志巡游的符像",
|
||||
"聚燃的石块",
|
||||
"聚燃的命种",
|
||||
"聚燃的游像眼",
|
||||
"秘源轴",
|
||||
"秘源机鞘",
|
||||
"秘源真芯",
|
||||
"稚嫩的尖齿",
|
||||
"老练的尖齿",
|
||||
"横行霸者的利齿",
|
||||
"卫从的木哨",
|
||||
"战士的铁哨",
|
||||
"龙冠武士的金哨",
|
||||
"小灯草",
|
||||
"慕风蘑菇",
|
||||
"蒲公英籽",
|
||||
@@ -1384,6 +1400,15 @@
|
||||
"子探测单元",
|
||||
"湖光铃兰",
|
||||
"初露之源",
|
||||
"颗粒果",
|
||||
"烛伞蘑菇",
|
||||
"烬芯花",
|
||||
"澄晶实",
|
||||
"苦种",
|
||||
"肉龙掌",
|
||||
"灼灼彩菊",
|
||||
"浪沫羽鳃",
|
||||
"青蜜莓",
|
||||
"红莲蛾",
|
||||
"蝴蝶",
|
||||
"黑背鲈鱼",
|
||||
@@ -1471,6 +1496,15 @@
|
||||
"「公平」的教导",
|
||||
"「正义」的教导",
|
||||
"「秩序」的教导",
|
||||
"「角逐」的哲学",
|
||||
"「焚燔」的哲学",
|
||||
"「纷争」的哲学",
|
||||
"「角逐」的指引",
|
||||
"「焚燔」的指引",
|
||||
"「纷争」的指引",
|
||||
"「角逐」的教导",
|
||||
"「焚燔」的教导",
|
||||
"「纷争」的教导",
|
||||
"「金鱼草」的种子",
|
||||
"「鸣草」的种子",
|
||||
"「清心」的种子",
|
||||
@@ -1551,6 +1585,9 @@
|
||||
"魔晶块",
|
||||
"奇异的「牙齿」",
|
||||
"汲取了生命力的龙牙",
|
||||
"牛奶",
|
||||
"糖",
|
||||
"固晶甲虫",
|
||||
"新鲜的鸟蛋",
|
||||
"新鲜的绯樱绣球",
|
||||
"新鲜的海草",
|
||||
@@ -1561,6 +1598,9 @@
|
||||
"新鲜的绝云椒椒",
|
||||
"新鲜的树莓",
|
||||
"新鲜的香辛果",
|
||||
"「永远高挂的落日」",
|
||||
"「岸上游泳的鱼儿」",
|
||||
"「夜晚显现的明月」",
|
||||
"纯洁松果",
|
||||
"碎星铁矿",
|
||||
"烹饪",
|
||||
@@ -1849,6 +1889,69 @@
|
||||
"更改旋律",
|
||||
"准备演出",
|
||||
"继续演出",
|
||||
"感谢信",
|
||||
"开始演奏",
|
||||
"募刻巧像",
|
||||
"摆放巧像",
|
||||
"绘想游迹",
|
||||
"召唤激流",
|
||||
"放入",
|
||||
"旋转管道",
|
||||
"让魔水流动吧!",
|
||||
"就是现在",
|
||||
"敲一敲…",
|
||||
"我带你飞一次?",
|
||||
"我来帮忙!",
|
||||
"戳一戳",
|
||||
"出发吧!",
|
||||
"有点奇怪…",
|
||||
"拉你一把",
|
||||
"发生什么了?",
|
||||
"交给我吧",
|
||||
"已经安全了!",
|
||||
"我需要那颗星星",
|
||||
"用力拉",
|
||||
"一起用力拉",
|
||||
"你已经做得很好了",
|
||||
"搭乘「空中列车」",
|
||||
"这是什么比赛?",
|
||||
"与纠结的小人结队",
|
||||
"与贪吃的小人结队",
|
||||
"与莽撞的小人结队",
|
||||
"开始挑战",
|
||||
"放置蘑菇",
|
||||
"放置苹果",
|
||||
"放置风车菊",
|
||||
"放置鸟蛋",
|
||||
"放置树莓",
|
||||
"放置禽肉",
|
||||
"放置蘑菇",
|
||||
"放置甜甜花",
|
||||
"放置绝云椒椒",
|
||||
"走左边",
|
||||
"走右边",
|
||||
"走前面",
|
||||
"算我一个!",
|
||||
"找到你啦!",
|
||||
"等待海上列车…",
|
||||
"推一下",
|
||||
"我来猜猜",
|
||||
"是元能构装体?",
|
||||
"是水深渊法师?",
|
||||
"是穿蓝衣服的小兔子?",
|
||||
"是超大松鼠?",
|
||||
"是短鬓虎?",
|
||||
"是穿绿衣服的狐狸?",
|
||||
"我来试试",
|
||||
"关于巨龙…",
|
||||
"你还好吗?",
|
||||
"魔线飞行",
|
||||
"老旧的日记",
|
||||
"发黄的信件",
|
||||
"准备留影",
|
||||
"用力拔",
|
||||
"更加用力拔",
|
||||
"污损的快件",
|
||||
"无锋剑",
|
||||
"银剑",
|
||||
"训练大剑",
|
||||
@@ -4545,6 +4648,127 @@
|
||||
"布蕾斯特",
|
||||
"苏定",
|
||||
"玄理",
|
||||
"奥比奇",
|
||||
"波波拉诺",
|
||||
"温柔的守卫",
|
||||
"藏宝爱好者",
|
||||
"卡佩",
|
||||
"艾德加",
|
||||
"席尔万",
|
||||
"卢西恩",
|
||||
"进入席尔万房间",
|
||||
"进入卢西恩房间",
|
||||
"进入艾德加房间",
|
||||
"议论纷纷的群众",
|
||||
"议论纷纷的群众",
|
||||
"议论纷纷的群众",
|
||||
"议论纷纷的群众",
|
||||
"议论纷纷的群众",
|
||||
"议论纷纷的群众",
|
||||
"进入席尔万房间",
|
||||
"艾德加",
|
||||
"卡佩",
|
||||
"奥比奇",
|
||||
"波波拉诺",
|
||||
"探长",
|
||||
"埃斯诺尔",
|
||||
"帕纽尔",
|
||||
"罗泽尔",
|
||||
"优雅的雕像",
|
||||
"用力推!!!",
|
||||
"用力拽!!!",
|
||||
"用力抬!!!",
|
||||
"温和的雕像",
|
||||
"平静的雕像",
|
||||
"福罗贝尔",
|
||||
"奥雷卢",
|
||||
"埃斯唐普",
|
||||
"西梅",
|
||||
"萨博兰",
|
||||
"苏法什",
|
||||
"陈旧的手稿",
|
||||
"疲惫的手稿",
|
||||
"兴奋的纸蛙",
|
||||
"沉稳的纸蛙",
|
||||
"好心的纸蛙",
|
||||
"忧郁的纸蛙",
|
||||
"123木头人",
|
||||
"123木头人2",
|
||||
"门后的声音",
|
||||
"注脚",
|
||||
"巨人卫兵",
|
||||
"路人",
|
||||
"星轨王城守卫",
|
||||
"店长",
|
||||
"粮油店长",
|
||||
"巨人卫兵",
|
||||
"巨人卫兵",
|
||||
"巨人卫兵",
|
||||
"巨人卫兵",
|
||||
"星轨王城守卫",
|
||||
"肖维涅",
|
||||
"我来试试",
|
||||
"我来试试",
|
||||
"我来试试",
|
||||
"我来试试",
|
||||
"我来试试",
|
||||
"我来试试",
|
||||
"巨人卫兵",
|
||||
"巨人卫兵",
|
||||
"埃斯诺尔",
|
||||
"失望的纸蛙",
|
||||
"不满的纸蛙",
|
||||
"发生什么了?",
|
||||
"字迹歪歪扭扭的信",
|
||||
"杏仁",
|
||||
"溪泉",
|
||||
"柑橘",
|
||||
"翻看书页",
|
||||
"布勒凡",
|
||||
"布勒施",
|
||||
"欧立威",
|
||||
"毕塞尔特",
|
||||
"搭乘「空中列车」",
|
||||
"杜林",
|
||||
"小杜林",
|
||||
"拜希麦·五世",
|
||||
"爆竹",
|
||||
"板栗",
|
||||
"白果",
|
||||
"瑟杜尔",
|
||||
"威尔",
|
||||
"积木卫兵",
|
||||
"蒙塔纳",
|
||||
"魔女M",
|
||||
"魔女B",
|
||||
"冲在前面的士兵",
|
||||
"冲在前面的士兵",
|
||||
"门内的人",
|
||||
"门内的人",
|
||||
"门内的人",
|
||||
"飞鼠",
|
||||
"士兵",
|
||||
"士兵",
|
||||
"小飞鼠",
|
||||
"飞鼠妈妈",
|
||||
"老旧的日记",
|
||||
"发黄的信件",
|
||||
"进入「邪龙」的巢穴",
|
||||
"德维特",
|
||||
"许迪",
|
||||
"克朗谢",
|
||||
"埃洛夫",
|
||||
"杏仁",
|
||||
"溪泉",
|
||||
"柑橘",
|
||||
"等待海上列车…",
|
||||
"前往提瓦特",
|
||||
"前往星轨王城",
|
||||
"前往破碎之海",
|
||||
"前往提瓦特",
|
||||
"「一篇未完成的手稿」",
|
||||
"杏仁",
|
||||
"溪泉",
|
||||
"亡国的美奈姬·卷五",
|
||||
"少女薇拉的忧郁·卷一",
|
||||
"少女薇拉的忧郁·卷二",
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWPF>true</UseWPF>
|
||||
<UseWindowsForms>True</UseWindowsForms>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ApplicationIcon>Assets\logo.ico</ApplicationIcon>
|
||||
@@ -41,13 +41,14 @@
|
||||
<PackageReference Include="Microsoft.ML.OnnxRuntime.Managed" Version="1.18.1" />
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2592.51" />
|
||||
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
|
||||
<PackageReference Include="OpenCvSharp4.WpfExtensions" Version="4.8.0.20230708" />
|
||||
<PackageReference Include="OpenCvSharp4.Extensions" Version="4.8.0.20230708" />
|
||||
<PackageReference Include="OpenCvSharp4.Windows" Version="4.8.0.20230708" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
|
||||
<PackageReference Include="Microsoft.ClearScript.V8" Version="7.4.5" />
|
||||
<PackageReference Include="Microsoft.ClearScript.V8.Native.win-x64" Version="7.4.5" />
|
||||
<PackageReference Include="MouseKeyHook" Version="5.7.1" />
|
||||
<PackageReference Include="PresentMonFps" Version="2.0.1" />
|
||||
<PackageReference Include="PresentMonFps" Version="2.0.5" />
|
||||
<PackageReference Include="Sdcb.PaddleInference" Version="2.5.0.1" />
|
||||
<PackageReference Include="Sdcb.PaddleInference.runtime.win64.openblas" Version="2.5.1" />
|
||||
<PackageReference Include="Sdcb.PaddleOCR" Version="2.7.0" />
|
||||
@@ -60,12 +61,12 @@
|
||||
<PackageReference Include="Vanara.PInvoke.User32" Version="4.0.2" />
|
||||
<PackageReference Include="WPF-UI" Version="3.0.5" />
|
||||
<PackageReference Include="WPF-UI.Tray" Version="3.0.5" />
|
||||
<PackageReference Include="WPF-UI.Violeta" Version="3.0.5.3" />
|
||||
<PackageReference Include="YoloV8" Version="4.1.7" />
|
||||
<PackageReference Include="gong-wpf-dragdrop" Version="3.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug'">
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -74,27 +75,6 @@
|
||||
<ProjectReference Include="..\Fischless.WindowsInput\Fischless.WindowsInput.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="GameTask\TaskContext.cs">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
<Compile Update="View\MaskWindow.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\Pages\HotkeyPage.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\Pages\TriggerSettingsPage.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\PickerWindow.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\Windows\MapViewer.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Assets\Map\**">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
@@ -153,9 +133,13 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="GameTask\Common\Element\Assets\MapPoint\" />
|
||||
<Folder Include="Script\AutoCrystalfly\" />
|
||||
<Folder Include="View\Controls\WpfUi\" />
|
||||
<Folder Include="Script\JustTp\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="View\Pages\MapPathingPage.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,14 +1,26 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Config;
|
||||
|
||||
public class Global
|
||||
{
|
||||
public static string Version { get; } = "0.32.5";
|
||||
public static string Version { get; } = "0.34.1";
|
||||
|
||||
public static string StartUpPath { get; set; } = AppContext.BaseDirectory;
|
||||
|
||||
public static readonly JsonSerializerOptions ManifestJsonOptions = new()
|
||||
{
|
||||
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals,
|
||||
Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
|
||||
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower,
|
||||
WriteIndented = true,
|
||||
AllowTrailingCommas = true,
|
||||
ReadCommentHandling = JsonCommentHandling.Skip,
|
||||
};
|
||||
|
||||
public static string Absolute(string relativePath)
|
||||
{
|
||||
return Path.Combine(StartUpPath, relativePath);
|
||||
|
||||
@@ -170,6 +170,34 @@ public partial class HotKeyConfig : ObservableObject
|
||||
[ObservableProperty]
|
||||
private string _test2HotkeyType = HotKeyTypeEnum.KeyboardMonitor.ToString();
|
||||
|
||||
// 路径记录开始
|
||||
[ObservableProperty]
|
||||
private string _getBigMapPosHotkey = "";
|
||||
|
||||
[ObservableProperty]
|
||||
private string _getBigMapPosHotkeyType = HotKeyTypeEnum.KeyboardMonitor.ToString();
|
||||
|
||||
// 路径记录开始
|
||||
[ObservableProperty]
|
||||
private string _pathRecorderHotkey = "";
|
||||
|
||||
[ObservableProperty]
|
||||
private string _pathRecorderHotkeyType = HotKeyTypeEnum.KeyboardMonitor.ToString();
|
||||
|
||||
// 添加路径记录点
|
||||
[ObservableProperty]
|
||||
private string _addWaypointHotkey = "";
|
||||
|
||||
[ObservableProperty]
|
||||
private string _addWaypointHotkeyType = HotKeyTypeEnum.KeyboardMonitor.ToString();
|
||||
|
||||
// 路径执行
|
||||
[ObservableProperty]
|
||||
private string _executePathHotkey = "";
|
||||
|
||||
[ObservableProperty]
|
||||
private string _executePathHotkeyType = HotKeyTypeEnum.KeyboardMonitor.ToString();
|
||||
|
||||
// 日志与状态窗口展示
|
||||
[ObservableProperty]
|
||||
private string _logBoxDisplayHotkey = "";
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
namespace BetterGenshinImpact.Core.Recognition.OpenCv.FeatureMatch;
|
||||
|
||||
/// <summary>
|
||||
/// FlannMatch
|
||||
/// 优点:
|
||||
/// 1. 速度快:FlannMatch 使用的是近似最近邻搜索算法,适合处理大规模数据集,速度比暴力匹配器快得多。
|
||||
/// 2. 可扩展性好:适用于高维特征空间,能够处理大量特征点。
|
||||
/// 缺点:
|
||||
/// 1. 精度较低:由于是近似搜索,匹配的精度可能不如暴力匹配器高。
|
||||
/// 2. 复杂性高:需要对参数进行调优,以获得最佳性能。
|
||||
/// BfMatch
|
||||
/// 优点:
|
||||
/// 1. 精度高:BfMatch 进行的是精确匹配,能够找到最优的匹配对。
|
||||
/// 2. 简单易用:不需要复杂的参数调优,适合初学者和简单应用。
|
||||
/// 缺点:
|
||||
/// 1. 速度慢:对于大规模数据集,暴力匹配器的速度较慢,因为它需要计算所有特征点之间的距离。
|
||||
/// 2. 不适合高维数据:在高维特征空间中,计算量会显著增加,性能下降明显。
|
||||
/// 选择建议
|
||||
/// • 大规模数据集:如果你需要处理大量特征点,且对速度要求较高,FlannMatch 是一个更好的选择。
|
||||
/// • 高精度要求:如果你的应用对匹配精度要求很高,且数据规模较小,BfMatch 会更合适。
|
||||
/// </summary>
|
||||
public enum DescriptorMatcherType
|
||||
{
|
||||
// 快速近似最近邻搜索库
|
||||
BruteForce,
|
||||
|
||||
// 暴力匹配器
|
||||
FlannBased
|
||||
|
||||
// 更多类型命名见 DescriptorMatcher.Create
|
||||
}
|
||||
@@ -7,15 +7,21 @@ using OpenCvSharp.XFeatures2D;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Recognition.OpenCv.FeatureMatch;
|
||||
|
||||
public class FeatureMatcher
|
||||
{
|
||||
private readonly double _threshold; // SURF 100
|
||||
private readonly double _threshold = 100; // SURF 100
|
||||
private readonly Feature2D _feature2D;
|
||||
private readonly FlannBasedMatcher flnMatcher = new();
|
||||
|
||||
private readonly Dictionary<DescriptorMatcherType, DescriptorMatcher> _matcherFactory = new()
|
||||
{
|
||||
{ DescriptorMatcherType.BruteForce, DescriptorMatcher.Create(DescriptorMatcherType.BruteForce.ToString()) },
|
||||
{ DescriptorMatcherType.FlannBased, DescriptorMatcher.Create(DescriptorMatcherType.FlannBased.ToString()) }
|
||||
};
|
||||
|
||||
private readonly Size _trainMatSize; // 大图大小
|
||||
|
||||
@@ -34,11 +40,9 @@ public class FeatureMatcher
|
||||
/// <param name="trainMat"></param>
|
||||
/// <param name="featureStorage"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="threshold"></param>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public FeatureMatcher(Mat trainMat, FeatureStorage? featureStorage = null, Feature2DType type = Feature2DType.SIFT, double threshold = 100)
|
||||
public FeatureMatcher(Mat trainMat, FeatureStorage? featureStorage = null, Feature2DType type = Feature2DType.SIFT)
|
||||
{
|
||||
_threshold = threshold;
|
||||
_trainMatSize = trainMat.Size();
|
||||
if (Feature2DType.SURF == type)
|
||||
{
|
||||
@@ -86,11 +90,9 @@ public class FeatureMatcher
|
||||
/// <param name="trainMatSize"></param>
|
||||
/// <param name="featureStorage"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="threshold"></param>
|
||||
/// <exception cref="Exception"></exception>
|
||||
public FeatureMatcher(Size trainMatSize, FeatureStorage featureStorage, Feature2DType type = Feature2DType.SIFT, double threshold = 100)
|
||||
public FeatureMatcher(Size trainMatSize, FeatureStorage featureStorage, Feature2DType type = Feature2DType.SIFT)
|
||||
{
|
||||
_threshold = threshold;
|
||||
_trainMatSize = trainMatSize;
|
||||
if (Feature2DType.SURF == type)
|
||||
{
|
||||
@@ -114,6 +116,13 @@ public class FeatureMatcher
|
||||
Debug.WriteLine($"切割特征点耗时: {sw.ElapsedMilliseconds}ms");
|
||||
}
|
||||
|
||||
public DescriptorMatcher GetMatcher(DescriptorMatcherType type)
|
||||
{
|
||||
return _matcherFactory[type];
|
||||
}
|
||||
|
||||
#region 普通匹配
|
||||
|
||||
/// <summary>
|
||||
/// 普通匹配(全图特征)
|
||||
/// </summary>
|
||||
@@ -150,11 +159,13 @@ public class FeatureMatcher
|
||||
/// 普通匹配
|
||||
/// </summary>
|
||||
/// <param name="trainKeyPoints"></param>
|
||||
/// <param name="trainRet"></param>
|
||||
/// <param name="trainDescriptors"></param>
|
||||
/// <param name="queryMat"></param>
|
||||
/// <param name="queryMatMask"></param>
|
||||
/// <param name="matcherType"></param>
|
||||
/// <returns></returns>
|
||||
public Point2f Match(KeyPoint[] trainKeyPoints, Mat trainRet, Mat queryMat, Mat? queryMatMask = null)
|
||||
public Point2f Match(KeyPoint[] trainKeyPoints, Mat trainDescriptors, Mat queryMat, Mat? queryMatMask = null,
|
||||
DescriptorMatcherType matcherType = DescriptorMatcherType.FlannBased)
|
||||
{
|
||||
SpeedTimer speedTimer = new();
|
||||
|
||||
@@ -164,7 +175,7 @@ public class FeatureMatcher
|
||||
#pragma warning restore CS8604 // 引用类型参数可能为 null。
|
||||
speedTimer.Record("模板生成KeyPoint");
|
||||
|
||||
var matches = flnMatcher.Match(queryDescriptors, trainRet);
|
||||
var matches = GetMatcher(matcherType).Match(queryDescriptors, trainDescriptors);
|
||||
//Finding the Minimum and Maximum Distance
|
||||
double minDistance = 1000; //Backward approximation
|
||||
double maxDistance = 0;
|
||||
@@ -237,11 +248,13 @@ public class FeatureMatcher
|
||||
/// 普通匹配
|
||||
/// </summary>
|
||||
/// <param name="trainKeyPoints"></param>
|
||||
/// <param name="trainRet"></param>
|
||||
/// <param name="trainDescriptors"></param>
|
||||
/// <param name="queryMat"></param>
|
||||
/// <param name="queryMatMask"></param>
|
||||
/// <param name="matcherType"></param>
|
||||
/// <returns></returns>
|
||||
public Point2f[] MatchCorners(KeyPoint[] trainKeyPoints, Mat trainRet, Mat queryMat, Mat? queryMatMask = null)
|
||||
public Point2f[] MatchCorners(KeyPoint[] trainKeyPoints, Mat trainDescriptors, Mat queryMat, Mat? queryMatMask = null,
|
||||
DescriptorMatcherType matcherType = DescriptorMatcherType.FlannBased)
|
||||
{
|
||||
SpeedTimer speedTimer = new();
|
||||
|
||||
@@ -251,7 +264,7 @@ public class FeatureMatcher
|
||||
#pragma warning restore CS8604 // 引用类型参数可能为 null。
|
||||
speedTimer.Record("模板生成KeyPoint");
|
||||
|
||||
var matches = flnMatcher.Match(queryDescriptors, trainRet);
|
||||
var matches = GetMatcher(matcherType).Match(queryDescriptors, trainDescriptors);
|
||||
//Finding the Minimum and Maximum Distance
|
||||
double minDistance = 1000; //Backward approximation
|
||||
double maxDistance = 0;
|
||||
@@ -328,91 +341,46 @@ public class FeatureMatcher
|
||||
return Cv2.BoundingRect(corners);
|
||||
}
|
||||
|
||||
// /// <summary>
|
||||
// /// knn的方式匹配
|
||||
// /// </summary>
|
||||
// /// <param name="matSrc"></param>
|
||||
// /// <returns></returns>
|
||||
// [Obsolete]
|
||||
// public Point2f[]? KnnMatch(Mat matSrc)
|
||||
// {
|
||||
// SpeedTimer speedTimer = new();
|
||||
//
|
||||
// using var matSrcRet = new Mat();
|
||||
// KeyPoint[] keyPointsSrc;
|
||||
// using (var surf = SURF.Create(_threshold, 4, 3, false, true))
|
||||
// {
|
||||
// surf.DetectAndCompute(matSrc, null, out keyPointsSrc, matSrcRet);
|
||||
// speedTimer.Record("模板生成KeyPoint");
|
||||
// }
|
||||
//
|
||||
// var knnMatches = flnMatcher.KnnMatch(matSrcRet, _trainDescriptors, 2);
|
||||
// const float minRatio = 0.75f;
|
||||
//
|
||||
// var pointsSrc = new List<Point2f>();
|
||||
// var pointsDst = new List<Point2f>();
|
||||
// //Screening better matching points
|
||||
// // var goodMatches = new List<DMatch>();
|
||||
// for (int i = 0; i < knnMatches.Length; i++)
|
||||
// {
|
||||
// var best = knnMatches[i][0];
|
||||
// var better = knnMatches[i][1];
|
||||
// var r = best.Distance / better.Distance;
|
||||
// if (r > minRatio)
|
||||
// {
|
||||
// pointsSrc.Add(keyPointsSrc[best.QueryIdx].Pt);
|
||||
// pointsDst.Add(_trainKeyPoints[best.TrainIdx].Pt);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (pointsSrc.Count < 7)
|
||||
// {
|
||||
// Debug.WriteLine("匹配点过少");
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// speedTimer.Record("FlannMatch.KnnMatch");
|
||||
//
|
||||
// // var outMat = new Mat();
|
||||
//
|
||||
// // algorithm RANSAC Filter the matched results
|
||||
// var pSrc = pointsSrc.ToPoint2d();
|
||||
// var pDst = pointsDst.ToPoint2d();
|
||||
// var outMask = new Mat();
|
||||
// // If the original matching result is null, Skip the filtering step
|
||||
// if (pSrc.Count > 0 && pDst.Count > 0)
|
||||
// {
|
||||
// var hMat = Cv2.FindHomography(pSrc, pDst, HomographyMethods.Ransac, mask: outMask);
|
||||
// speedTimer.Record("FindHomography");
|
||||
//
|
||||
// var objCorners = new Point2f[4];
|
||||
// objCorners[0] = new Point2f(0, 0);
|
||||
// objCorners[1] = new Point2f(0, matSrc.Rows);
|
||||
// objCorners[2] = new Point2f(matSrc.Cols, matSrc.Rows);
|
||||
// objCorners[3] = new Point2f(matSrc.Cols, 0);
|
||||
//
|
||||
// var sceneCorners = Cv2.PerspectiveTransform(objCorners, hMat);
|
||||
// speedTimer.Record("PerspectiveTransform");
|
||||
// speedTimer.DebugPrint();
|
||||
// return sceneCorners;
|
||||
// }
|
||||
//
|
||||
// speedTimer.DebugPrint();
|
||||
// return null;
|
||||
// }
|
||||
#endregion 普通匹配
|
||||
|
||||
#region Knn匹配
|
||||
|
||||
public Point2f KnnMatch(Mat queryMat, Mat? queryMatMask = null,
|
||||
DescriptorMatcherType matcherType = DescriptorMatcherType.FlannBased)
|
||||
{
|
||||
return KnnMatch(_trainKeyPoints, _trainDescriptors, queryMat, queryMatMask, matcherType);
|
||||
}
|
||||
|
||||
public Point2f KnnMatch(Mat queryMat, float prevX, float prevY, Mat? queryMatMask = null,
|
||||
DescriptorMatcherType matcherType = DescriptorMatcherType.FlannBased)
|
||||
{
|
||||
var (cellRow, cellCol) = KeyPointFeatureBlockHelper.GetCellIndex(_trainMatSize, _splitRow, _splitCol, prevX, prevY);
|
||||
Debug.WriteLine($"当前坐标({prevX},{prevY})在特征块({cellRow},{cellCol})中");
|
||||
if (_lastMergedBlock == null || _lastMergedBlock.MergedCenterCellRow != cellRow || _lastMergedBlock.MergedCenterCellCol != cellCol)
|
||||
{
|
||||
Debug.WriteLine($"---------切换到新的特征块({cellRow},{cellCol}),合并特征点--------");
|
||||
_lastMergedBlock = KeyPointFeatureBlockHelper.MergeNeighboringFeatures(_blocks, _trainDescriptors, cellRow, cellCol);
|
||||
}
|
||||
|
||||
return KnnMatch(_lastMergedBlock.KeyPointArray, _lastMergedBlock.Descriptor!, queryMat, queryMatMask, matcherType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// https://github.com/tignioj/minimap/blob/main/matchmap/sifttest/sifttest5.py
|
||||
/// Copilot 生成
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private Point2f? KnnMatch(KeyPoint[] trainKeyPoints, Mat trainRet, Mat queryMat, Mat? queryMatMask = null)
|
||||
private Point2f KnnMatch(KeyPoint[] trainKeyPoints, Mat trainDescriptors, Mat queryMat, Mat? queryMatMask = null,
|
||||
DescriptorMatcherType matcherType = DescriptorMatcherType.FlannBased)
|
||||
{
|
||||
SpeedTimer speedTimer = new();
|
||||
using var queryDescriptors = new Mat();
|
||||
#pragma warning disable CS8604 // 引用类型参数可能为 null。
|
||||
_feature2D.DetectAndCompute(queryMat, queryMatMask, out var queryKeyPoints, queryDescriptors);
|
||||
#pragma warning restore CS8604 // 引用类型参数可能为 null。
|
||||
var matches = flnMatcher.KnnMatch(queryDescriptors, _trainDescriptors, k: 2);
|
||||
speedTimer.Record("模板生成KeyPoint");
|
||||
var matches = GetMatcher(matcherType).KnnMatch(queryDescriptors, trainDescriptors, k: 2);
|
||||
speedTimer.Record("FlannMatch");
|
||||
|
||||
// 应用比例测试来过滤匹配点
|
||||
List<DMatch> goodMatches = [];
|
||||
@@ -426,29 +394,101 @@ public class FeatureMatcher
|
||||
|
||||
if (goodMatches.Count < 7)
|
||||
{
|
||||
return null;
|
||||
return new Point2f();
|
||||
}
|
||||
|
||||
// 获取匹配点的坐标
|
||||
var srcPts = goodMatches.Select(m => queryKeyPoints[m.QueryIdx].Pt).ToArray();
|
||||
var dstPts = goodMatches.Select(m => _trainKeyPoints[m.TrainIdx].Pt).ToArray();
|
||||
var dstPts = goodMatches.Select(m => trainKeyPoints[m.TrainIdx].Pt).ToArray();
|
||||
|
||||
speedTimer.Record("GetGoodMatchPoints");
|
||||
|
||||
// 使用RANSAC找到变换矩阵
|
||||
var mask = new Mat();
|
||||
var M = Cv2.FindHomography(srcPts.ToList().ToPoint2d(), dstPts.ToList().ToPoint2d(), HomographyMethods.Ransac, 3.0, mask);
|
||||
if (M.Empty())
|
||||
var hMat = Cv2.FindHomography(srcPts.ToList().ToPoint2d(), dstPts.ToList().ToPoint2d(), HomographyMethods.Ransac, 3.0, mask);
|
||||
if (hMat.Empty())
|
||||
{
|
||||
return null;
|
||||
return new Point2f();
|
||||
}
|
||||
speedTimer.Record("FindHomography");
|
||||
|
||||
// 计算小地图的中心点
|
||||
var h = queryMat.Rows;
|
||||
var w = queryMat.Cols;
|
||||
var centerPoint = new Point2f(w / 2f, h / 2f);
|
||||
Point2f[] centerPoints = [centerPoint];
|
||||
Point2f[] transformedCenter = Cv2.PerspectiveTransform(centerPoints, M);
|
||||
Point2f[] transformedCenter = Cv2.PerspectiveTransform(centerPoints, hMat);
|
||||
|
||||
speedTimer.Record("PerspectiveTransform");
|
||||
speedTimer.DebugPrint();
|
||||
// 返回小地图在大地图中的中心坐标
|
||||
return transformedCenter[0];
|
||||
}
|
||||
|
||||
public Point2f[] KnnMatchCorners(KeyPoint[] trainKeyPoints, Mat trainDescriptors, Mat queryMat, Mat? queryMatMask = null,
|
||||
DescriptorMatcherType matcherType = DescriptorMatcherType.FlannBased)
|
||||
{
|
||||
SpeedTimer speedTimer = new();
|
||||
using var queryDescriptors = new Mat();
|
||||
#pragma warning disable CS8604 // 引用类型参数可能为 null。
|
||||
_feature2D.DetectAndCompute(queryMat, queryMatMask, out var queryKeyPoints, queryDescriptors);
|
||||
#pragma warning restore CS8604 // 引用类型参数可能为 null。
|
||||
speedTimer.Record("模板生成KeyPoint");
|
||||
var matches = GetMatcher(matcherType).KnnMatch(queryDescriptors, trainDescriptors, k: 2);
|
||||
speedTimer.Record("FlannMatch");
|
||||
|
||||
// 应用比例测试来过滤匹配点
|
||||
List<DMatch> goodMatches = [];
|
||||
foreach (var match in matches)
|
||||
{
|
||||
if (match.Length == 2 && match[0].Distance < 0.75 * match[1].Distance)
|
||||
{
|
||||
goodMatches.Add(match[0]);
|
||||
}
|
||||
}
|
||||
|
||||
if (goodMatches.Count < 7)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
// 获取匹配点的坐标
|
||||
var srcPts = goodMatches.Select(m => queryKeyPoints[m.QueryIdx].Pt).ToArray();
|
||||
var dstPts = goodMatches.Select(m => trainKeyPoints[m.TrainIdx].Pt).ToArray();
|
||||
|
||||
speedTimer.Record("GetGoodMatchPoints");
|
||||
|
||||
// 使用RANSAC找到变换矩阵
|
||||
var mask = new Mat();
|
||||
var hMat = Cv2.FindHomography(srcPts.ToList().ToPoint2d(), dstPts.ToList().ToPoint2d(), HomographyMethods.Ransac, 3.0, mask);
|
||||
if (hMat.Empty())
|
||||
{
|
||||
return [];
|
||||
}
|
||||
speedTimer.Record("FindHomography");
|
||||
|
||||
// 返回四个角点
|
||||
var objCorners = new Point2f[4];
|
||||
objCorners[0] = new Point2f(0, 0);
|
||||
objCorners[1] = new Point2f(0, queryMat.Rows);
|
||||
objCorners[2] = new Point2f(queryMat.Cols, queryMat.Rows);
|
||||
objCorners[3] = new Point2f(queryMat.Cols, 0);
|
||||
|
||||
var sceneCorners = Cv2.PerspectiveTransform(objCorners, hMat);
|
||||
speedTimer.Record("PerspectiveTransform");
|
||||
speedTimer.DebugPrint();
|
||||
return sceneCorners;
|
||||
}
|
||||
|
||||
public Rect KnnMatchRect(Mat queryMat, Mat? queryMatMask = null)
|
||||
{
|
||||
var corners = KnnMatchCorners(_trainKeyPoints, _trainDescriptors, queryMat, queryMatMask);
|
||||
if (corners.Length == 0)
|
||||
{
|
||||
return Rect.Empty;
|
||||
}
|
||||
return Cv2.BoundingRect(corners);
|
||||
}
|
||||
|
||||
#endregion Knn匹配
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace BetterGenshinImpact.Core.Recognition.OpenCv.FeatureMatch;
|
||||
|
||||
public class FeatureStorage(string name)
|
||||
{
|
||||
private readonly string rootPath = Global.Absolute(@"User\Map\");
|
||||
private readonly string rootPath = Global.Absolute(@"Assets\Map\");
|
||||
|
||||
public void SetType(Feature2DType type)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Recorder;
|
||||
|
||||
@@ -39,13 +40,13 @@ public class GlobalKeyMouseRecord : Singleton<GlobalKeyMouseRecord>
|
||||
{
|
||||
if (!TaskContext.Instance().IsInitialized)
|
||||
{
|
||||
MessageBox.Show("请先在启动页,启动截图器再使用本功能");
|
||||
Toast.Warning("请先在启动页,启动截图器再使用本功能");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Status != KeyMouseRecorderStatus.Stop)
|
||||
{
|
||||
MessageBox.Show("已经在录制状态,请不要重复启动录制功能");
|
||||
Toast.Warning("已经在录制状态,请不要重复启动录制功能");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Vanara.PInvoke;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Recorder;
|
||||
|
||||
@@ -22,12 +23,12 @@ public class KeyMouseMacroPlayer
|
||||
{
|
||||
if (!TaskContext.Instance().IsInitialized)
|
||||
{
|
||||
MessageBox.Show("请先在启动页,启动截图器再使用本功能");
|
||||
Toast.Warning("请先在启动页,启动截图器再使用本功能");
|
||||
return;
|
||||
}
|
||||
|
||||
var script = JsonSerializer.Deserialize<KeyMouseScript>(macro, KeyMouseRecorder.JsonOptions) ?? throw new Exception("Failed to deserialize macro");
|
||||
script.Adapt(TaskContext.Instance().SystemInfo.CaptureAreaRect);
|
||||
script.Adapt(TaskContext.Instance().SystemInfo.CaptureAreaRect, TaskContext.Instance().DpiScale);
|
||||
SystemControl.ActivateWindow();
|
||||
|
||||
if (withDelay)
|
||||
|
||||
@@ -97,7 +97,8 @@ public class KeyMouseRecorder
|
||||
X = rect.X,
|
||||
Y = rect.Y,
|
||||
Width = rect.Width,
|
||||
Height = rect.Height
|
||||
Height = rect.Height,
|
||||
RecordDpi = TaskContext.Instance().DpiScale
|
||||
}
|
||||
};
|
||||
return JsonSerializer.Serialize(keyMouseScript, JsonOptions);
|
||||
|
||||
@@ -14,24 +14,28 @@ public class KeyMouseScript
|
||||
/// <summary>
|
||||
/// 转换原始脚本为适应当前分辨率的脚本
|
||||
/// </summary>
|
||||
/// <param name="captureRect"></param>
|
||||
public void Adapt(RECT captureRect)
|
||||
public void Adapt(RECT captureRect, double dpiScale)
|
||||
{
|
||||
foreach (var macroEvent in MacroEvents)
|
||||
{
|
||||
if (Info == null || Info.Width == 0 || Info.Height == 0)
|
||||
{
|
||||
Debug.WriteLine("错误的脚本数据 Info.Width == 0 || Info.Height == 0");
|
||||
break;
|
||||
}
|
||||
|
||||
if (macroEvent.Type == MacroEventType.MouseMoveTo
|
||||
|| macroEvent.Type == MacroEventType.MouseDown
|
||||
|| macroEvent.Type == MacroEventType.MouseUp)
|
||||
{
|
||||
if (Info == null || Info.Width == 0 || Info.Height == 0)
|
||||
{
|
||||
Debug.WriteLine("错误的脚本数据 Info.Width == 0 || Info.Height == 0");
|
||||
break;
|
||||
}
|
||||
|
||||
macroEvent.MouseX = (int)(captureRect.X + (macroEvent.MouseX - Info.X) * captureRect.Width * 1d / Info.Width);
|
||||
macroEvent.MouseY = (int)(captureRect.Y + (macroEvent.MouseY - Info.Y) * captureRect.Height * 1d / Info.Height);
|
||||
}
|
||||
else if (macroEvent.Type == MacroEventType.MouseMoveBy)
|
||||
{
|
||||
macroEvent.MouseX = (int)Math.Round(macroEvent.MouseX / Info.RecordDpi * dpiScale, 0);
|
||||
macroEvent.MouseY = (int)Math.Round(macroEvent.MouseY / Info.RecordDpi * dpiScale, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,4 +13,6 @@ public class KeyMouseScriptInfo
|
||||
public int Y { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
|
||||
public double RecordDpi { get; set; } = 1.0;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.Json;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Script.Dependence;
|
||||
|
||||
internal class AutoPathing(string rootPath)
|
||||
{
|
||||
public async Task Run(string json)
|
||||
{
|
||||
var task = JsonSerializer.Deserialize<PathingTask>(json);
|
||||
if (task == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
await new PathExecutor(CancellationContext.Instance.Cts).Pathing(task);
|
||||
}
|
||||
|
||||
public async Task RunFile(string path)
|
||||
{
|
||||
var json = await new LimitedFile(rootPath).ReadText(path);
|
||||
await Run(json);
|
||||
}
|
||||
}
|
||||
@@ -9,4 +9,11 @@ public class Genshin
|
||||
{
|
||||
await new TpTask(CancellationContext.Instance.Cts).Tp(x, y);
|
||||
}
|
||||
|
||||
public async Task Tp(string x, string y)
|
||||
{
|
||||
double.TryParse(x, out var dx);
|
||||
double.TryParse(y, out var dy);
|
||||
await Tp(dx, dy);
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public class EngineExtend
|
||||
|
||||
// 添加我的自定义实例化对象
|
||||
engine.AddHostObject("keyMouseScript", new KeyMouseScript(workDir));
|
||||
engine.AddHostObject("autoPathing", new AutoPathing(workDir));
|
||||
engine.AddHostObject("genshin", new Dependence.Genshin());
|
||||
engine.AddHostObject("log", new Log());
|
||||
engine.AddHostObject("file", new LimitedFile(workDir)); // 限制文件访问
|
||||
|
||||
@@ -34,6 +34,6 @@ public partial class ScriptGroup : ObservableObject
|
||||
|
||||
public static ScriptGroup FromJson(string json)
|
||||
{
|
||||
return JsonSerializer.Deserialize<ScriptGroup>(json, ConfigService.JsonOptions) ?? throw new Exception("解析脚本组JSON配置失败");
|
||||
return JsonSerializer.Deserialize<ScriptGroup>(json, ConfigService.JsonOptions) ?? throw new Exception("解析配置组JSON配置失败");
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,17 @@
|
||||
using BetterGenshinImpact.Core.Script.Project;
|
||||
using BetterGenshinImpact.Core.Config;
|
||||
using BetterGenshinImpact.Core.Recorder;
|
||||
using BetterGenshinImpact.Core.Script.Project;
|
||||
using BetterGenshinImpact.GameTask;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
using BetterGenshinImpact.ViewModel.Pages;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.IO;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Script.Group;
|
||||
|
||||
@@ -11,12 +20,16 @@ public partial class ScriptGroupProject : ObservableObject
|
||||
[ObservableProperty]
|
||||
private int _index;
|
||||
|
||||
public string Id { get; set; } = string.Empty;
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string FolderName { get; set; } = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _type = string.Empty;
|
||||
|
||||
[JsonIgnore]
|
||||
public string TypeDesc => ScriptGroupProjectExtensions.TypeDescriptions[Type];
|
||||
|
||||
[ObservableProperty]
|
||||
private string _status = string.Empty;
|
||||
|
||||
@@ -27,26 +40,58 @@ public partial class ScriptGroupProject : ObservableObject
|
||||
/// 执行周期
|
||||
/// 不在 ScheduleDescriptions 中则会被视为自定义Cron表达式
|
||||
/// </summary>
|
||||
public string Schedule { get; set; } = string.Empty;
|
||||
[ObservableProperty]
|
||||
private string _schedule = string.Empty;
|
||||
|
||||
[JsonIgnore]
|
||||
public string ScheduleDesc => ScriptGroupProjectExtensions.ScheduleDescriptions.GetValueOrDefault(Schedule, "自定义周期");
|
||||
|
||||
[ObservableProperty]
|
||||
private int _runNum = 1;
|
||||
|
||||
[JsonIgnore]
|
||||
public ScriptProject? Project { get; set; }
|
||||
|
||||
public ExpandoObject? JsScriptSettingsObject { get; set; }
|
||||
|
||||
public ScriptGroupProject()
|
||||
{
|
||||
}
|
||||
|
||||
public ScriptGroupProject(ScriptProject project)
|
||||
{
|
||||
Id = project.Manifest.Id;
|
||||
Name = project.Manifest.Name;
|
||||
FolderName = project.FolderName;
|
||||
Status = "Enabled";
|
||||
Schedule = "Daily";
|
||||
Project = project;
|
||||
Type = "Javascript";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="folder"></param>
|
||||
/// <param name="type">KeyMouse|Pathing</param>
|
||||
public ScriptGroupProject(string name, string folder, string type)
|
||||
{
|
||||
Name = name;
|
||||
FolderName = folder;
|
||||
Status = "Enabled";
|
||||
Schedule = "Daily";
|
||||
Project = null; // 不是JS脚本
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public static ScriptGroupProject BuildKeyMouseProject(string name)
|
||||
{
|
||||
return new ScriptGroupProject(name, name, "KeyMouse");
|
||||
}
|
||||
|
||||
public static ScriptGroupProject BuildPathingProject(string name, string folder)
|
||||
{
|
||||
return new ScriptGroupProject(name, folder, "Pathing");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -60,16 +105,72 @@ public partial class ScriptGroupProject : ObservableObject
|
||||
}
|
||||
Project = new ScriptProject(FolderName);
|
||||
}
|
||||
|
||||
public async Task Run()
|
||||
{
|
||||
if (Type == "Javascript")
|
||||
{
|
||||
if (Project == null)
|
||||
{
|
||||
throw new Exception("JS脚本未初始化");
|
||||
}
|
||||
await Project.ExecuteAsync(JsScriptSettingsObject);
|
||||
}
|
||||
if (Type == "KeyMouse")
|
||||
{
|
||||
// 加载并执行
|
||||
var json = await File.ReadAllTextAsync(Global.Absolute(@$"User\KeyMouseScript\{Name}"));
|
||||
await KeyMouseMacroPlayer.PlayMacro(json, CancellationContext.Instance.Cts.Token, false);
|
||||
}
|
||||
if (Type == "Pathing")
|
||||
{
|
||||
// 加载并执行
|
||||
var task = PathingTask.BuildFromFilePath(Path.Combine(MapPathingViewModel.PathJsonPath, FolderName, Name));
|
||||
TaskTriggerDispatcher.Instance().AddTrigger("AutoPick", null);
|
||||
await new PathExecutor(CancellationContext.Instance.Cts).Pathing(task);
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw new Exception("不支持的脚本类型");
|
||||
}
|
||||
}
|
||||
|
||||
partial void OnTypeChanged(string value)
|
||||
{
|
||||
OnPropertyChanged(nameof(TypeDesc));
|
||||
}
|
||||
|
||||
partial void OnStatusChanged(string value)
|
||||
{
|
||||
OnPropertyChanged(nameof(StatusDesc));
|
||||
}
|
||||
|
||||
partial void OnScheduleChanged(string value)
|
||||
{
|
||||
OnPropertyChanged(nameof(ScheduleDesc));
|
||||
}
|
||||
}
|
||||
|
||||
public static class ScriptGroupProjectExtensions
|
||||
public class ScriptGroupProjectExtensions
|
||||
{
|
||||
public static readonly Dictionary<string, string> TypeDescriptions = new()
|
||||
{
|
||||
{ "Javascript", "JS脚本" },
|
||||
{ "KeyMouse", "键鼠脚本" },
|
||||
{ "Pathing", "路径追踪" }
|
||||
};
|
||||
|
||||
public static readonly Dictionary<string, string> StatusDescriptions = new()
|
||||
{
|
||||
{ "Enabled", "启用" },
|
||||
{ "Disabled", "禁用" }
|
||||
};
|
||||
|
||||
public Dictionary<string, string> GetStatusDescriptions()
|
||||
{
|
||||
return StatusDescriptions;
|
||||
}
|
||||
|
||||
public static readonly Dictionary<string, string> ScheduleDescriptions = new()
|
||||
{
|
||||
{ "Daily", "每日" },
|
||||
@@ -82,4 +183,9 @@ public static class ScriptGroupProjectExtensions
|
||||
{ "Saturday", "每周六" },
|
||||
{ "Sunday", "每周日" }
|
||||
};
|
||||
|
||||
public Dictionary<string, string> GetScheduleDescriptions()
|
||||
{
|
||||
return ScheduleDescriptions;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,8 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using BetterGenshinImpact.Core.Config;
|
||||
using BetterGenshinImpact.Model;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Script.Project;
|
||||
|
||||
@@ -10,29 +12,23 @@ namespace BetterGenshinImpact.Core.Script.Project;
|
||||
public class Manifest
|
||||
{
|
||||
public int ManifestVersion { get; set; } = 1;
|
||||
|
||||
public string Id { get; set; } = string.Empty;
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Version { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public List<Author> Authors { get; set; } = [];
|
||||
public string Main { get; set; } = string.Empty;
|
||||
public string SettingsUi { get; set; } = string.Empty;
|
||||
public string[] Scripts { get; set; } = [];
|
||||
public string[] Library { get; set; } = [];
|
||||
|
||||
public static Manifest FromJson(string json)
|
||||
{
|
||||
var manifest = JsonSerializer.Deserialize<Manifest>(json, ConfigService.JsonOptions) ?? throw new Exception("Failed to deserialize JSON.");
|
||||
var manifest = JsonSerializer.Deserialize<Manifest>(json, Global.ManifestJsonOptions) ?? throw new Exception("Failed to deserialize JSON.");
|
||||
return manifest;
|
||||
}
|
||||
|
||||
public void Validate(string path)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Id))
|
||||
{
|
||||
throw new Exception("manifest.json: id is not supported.");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Name))
|
||||
{
|
||||
throw new Exception("manifest.json: name is required.");
|
||||
@@ -53,4 +49,21 @@ public class Manifest
|
||||
throw new FileNotFoundException("main js file not found.");
|
||||
}
|
||||
}
|
||||
|
||||
public List<SettingItem> LoadSettingItems(string path)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(SettingsUi))
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
var settingItems = new List<SettingItem>();
|
||||
var settingFile = Path.Combine(path, SettingsUi);
|
||||
if (File.Exists(settingFile))
|
||||
{
|
||||
var json = File.ReadAllText(settingFile);
|
||||
settingItems = JsonSerializer.Deserialize<List<SettingItem>>(json, ConfigService.JsonOptions) ?? [];
|
||||
}
|
||||
return settingItems;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.Core.Script.Project;
|
||||
|
||||
@@ -31,6 +32,26 @@ public class ScriptProject
|
||||
Manifest.Validate(ProjectPath);
|
||||
}
|
||||
|
||||
public StackPanel? LoadSettingUi(dynamic context)
|
||||
{
|
||||
var settingItems = Manifest.LoadSettingItems(ProjectPath);
|
||||
if (settingItems.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var stackPanel = new StackPanel();
|
||||
foreach (var item in settingItems)
|
||||
{
|
||||
var controls = item.ToControl(context);
|
||||
foreach (var control in controls)
|
||||
{
|
||||
stackPanel.Children.Add(control);
|
||||
}
|
||||
}
|
||||
|
||||
return stackPanel;
|
||||
}
|
||||
|
||||
public IScriptEngine BuildScriptEngine()
|
||||
{
|
||||
IScriptEngine engine = new V8ScriptEngine(V8ScriptEngineFlags.UseCaseInsensitiveMemberBinding | V8ScriptEngineFlags.EnableTaskPromiseConversion);
|
||||
@@ -38,10 +59,15 @@ public class ScriptProject
|
||||
return engine;
|
||||
}
|
||||
|
||||
public async Task ExecuteAsync()
|
||||
public async Task ExecuteAsync(dynamic? context = null)
|
||||
{
|
||||
var code = await LoadCode();
|
||||
var engine = BuildScriptEngine();
|
||||
if (context != null)
|
||||
{
|
||||
// 写入配置的内容
|
||||
engine.AddHostObject("settings", context);
|
||||
}
|
||||
try
|
||||
{
|
||||
await (Task)engine.Evaluate(code);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[
|
||||
{
|
||||
"alias": [ "主角", "旅行者", "卑鄙的外乡人", "荣誉骑士", "爷", "风主", "岩主", "雷主", "草主", "水主", "履刑者", "抽卡不歪真君" ],
|
||||
"alias": [ "旅行者", "主角", "卑鄙的外乡人", "荣誉骑士", "爷", "主", "履刑者", "抽卡不歪真君" ],
|
||||
"id": "20000000",
|
||||
"name": "旅行者",
|
||||
"nameEn": "Traveler",
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "荧", "女主", "女主角", "莹", "萤", "黄毛阿姨", "荧妹", "女爷" ],
|
||||
"alias": [ "荧", "女主", "女主角", "莹", "萤", "黄毛阿姨", "荧妹", "女爷", "包包", "宴宁" ],
|
||||
"id": "10000007",
|
||||
"name": "荧",
|
||||
"nameEn": "PlayerGirl",
|
||||
@@ -21,7 +21,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "神里绫华", "Kamisato Ayaka", "Ayaka", "ayaka", "神里", "绫华", "神里凌华", "凌华", "白鹭公主", "神里大小姐", "小乌龟", "龟龟", "山里灵活" ],
|
||||
"alias": [ "神里绫华", "Kamisato Ayaka", "Ayaka", "神里", "绫华", "神里凌华", "凌华", "白鹭公主", "神里大小姐", "龟", "龟龟", "乌龟" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000002",
|
||||
"name": "神里绫华",
|
||||
@@ -30,7 +30,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "琴", "Jean", "jean", "团长", "代理团长", "琴团长", "蒲公英骑士", "琴·古恩希尔德", "古恩希尔德" ],
|
||||
"alias": [ "琴", "Jean", "团长", "代理团长", "琴团长", "蒲公英骑士" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000003",
|
||||
"name": "琴",
|
||||
@@ -39,7 +39,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "丽莎", "Lisa", "lisa", "图书管理员", "图书馆管理员", "蔷薇魔女", "丽莎阿姨", "丽莎·敏兹", "敏兹" ],
|
||||
"alias": [ "丽莎", "Lisa", "图书管理员", "图书馆管理员", "蔷薇魔女", "阿姨" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000006",
|
||||
"name": "丽莎",
|
||||
@@ -49,7 +49,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "芭芭拉", "Barbara", "barbara", "巴巴拉", "拉粑粑", "拉巴巴", "内鬼", "加湿器", "肉身解咒", "肉身解咒真君", "闪耀偶像", "偶像", "芭芭拉·佩奇", "佩奇" ],
|
||||
"alias": [ "芭芭拉", "Barbara", "巴巴拉", "内鬼", "加湿器", "肉身解咒", "肉身解咒真君", "闪耀偶像", "偶像" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000014",
|
||||
"name": "芭芭拉",
|
||||
@@ -58,7 +58,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "凯亚", "Kaeya", "kaeya", "盖亚", "凯子哥", "凯鸭", "矿工", "矿工头子", "骑兵队长", "凯子", "凝冰渡海真君", "凯亚·亚尔伯里奇", "亚尔伯里奇" ],
|
||||
"alias": [ "凯亚", "Kaeya", "盖亚", "凯子哥", "凯鸭", "矿工", "矿工头子", "骑兵队长", "凯子", "凝冰渡海真君" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000015",
|
||||
"name": "凯亚",
|
||||
@@ -67,7 +67,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "迪卢克", "diluc", "Diluc", "卢姥爷", "姥爷", "卢老爷", "卢锅巴", "正义人", "正e人", "正E人", "卢本伟", "暗夜英雄", "卢卢伯爵", "落魄了", "落魄了家人们", "迪卢克·莱艮芬德", "莱艮芬德" ],
|
||||
"alias": [ "迪卢克", "Diluc", "卢姥爷", "姥爷", "卢老爷", "卢锅巴", "正义人", "正e人", "正E人", "卢本伟", "暗夜英雄", "卢卢伯爵", "落魄了", "落魄了家人们" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000016",
|
||||
"name": "迪卢克",
|
||||
@@ -76,7 +76,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "雷泽", "razor", "Razor", "狼少年", "狼崽子", "狼崽", "卢皮卡", "小狼", "小狼狗", "狼孩" ],
|
||||
"alias": [ "雷泽", "Razor", "狼少年", "狼崽子", "狼崽", "卢皮卡", "小狼", "小狼狗", "狼孩" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000020",
|
||||
"name": "雷泽",
|
||||
@@ -86,7 +86,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "安柏", "Amber", "amber", "安伯", "兔兔伯爵", "飞行冠军", "侦查骑士", "点火姬", "点火机", "打火机", "打火姬" ],
|
||||
"alias": [ "安柏", "Amber", "安伯", "兔兔伯爵", "飞行冠军", "侦查骑士", "点火姬", "点火机", "打火机", "打火姬" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000021",
|
||||
"name": "安柏",
|
||||
@@ -95,7 +95,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "温迪", "Venti", "venti", "温蒂", "风神", "卖唱的", "巴巴托斯", "巴巴脱丝", "芭芭托斯", "芭芭脱丝", "干点正事", "不干正事", "吟游诗人", "诶嘿", "唉嘿", "摸鱼" ],
|
||||
"alias": [ "温迪", "Venti", "温蒂", "风神", "卖唱的", "巴巴托斯", "巴巴脱丝", "芭芭托斯", "芭芭脱丝", "干点正事", "不干正事", "吟游诗人", "诶嘿", "唉嘿", "摸鱼" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000022",
|
||||
"name": "温迪",
|
||||
@@ -105,7 +105,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "香菱", "Xiangling", "xiangling", "香玲", "锅巴", "厨师", "万民堂厨师", "香师傅", "卯香菱" ],
|
||||
"alias": [ "香菱", "Xiangling", "香玲", "锅巴", "厨师", "万民堂厨师", "香师傅" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000023",
|
||||
"name": "香菱",
|
||||
@@ -114,7 +114,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "北斗", "Beidou", "beidou", "大姐头", "大姐", "无冕的龙王" ],
|
||||
"alias": [ "北斗", "Beidou", "大姐头", "大姐", "无冕的龙王" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000024",
|
||||
"name": "北斗",
|
||||
@@ -123,7 +123,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "行秋", "Xingqiu", "xingqiu", "秋秋人", "秋妹妹", "书呆子", "枕玉", "飞云商会二少爷" ],
|
||||
"alias": [ "行秋", "Xingqiu", "秋秋人", "秋妹妹", "书呆子", "枕玉", "飞云商会二少爷" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000025",
|
||||
"name": "行秋",
|
||||
@@ -132,7 +132,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "魈", "Xiao", "xiao", "打桩机", "插秧", "三眼五显仙人", "三眼五显真人", "降魔大圣", "护法夜叉", "快乐风男", "无聊", "靖妖傩舞", "矮子仙人", "三点五尺仙人", "跳跳虎" ],
|
||||
"alias": [ "魈", "Xiao", "打桩机", "插秧", "三眼五显仙人", "三眼五显真人", "降魔大圣", "护法夜叉", "快乐风男", "无聊", "靖妖傩舞", "矮子仙人", "三点五尺仙人", "跳跳虎", "风夜叉" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000026",
|
||||
"name": "魈",
|
||||
@@ -141,7 +141,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "凝光", "Ningguang", "ningguang", "富婆", "天权星", "天权" ],
|
||||
"alias": [ "凝光", "Ningguang", "富婆", "天权星", "天权" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000027",
|
||||
"name": "凝光",
|
||||
@@ -150,7 +150,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "可莉", "Klee", "klee", "嘟嘟可", "火花骑士", "蹦蹦炸弹", "炸鱼", "放火烧山", "放火烧山真君", "蒙德最强战力", "逃跑的太阳", "啦啦啦", "哒哒哒", "炸弹人", "禁闭室", "太阳", "小太阳" ],
|
||||
"alias": [ "可莉", "逃跑的太阳", "Klee", "嘟嘟可", "火花骑士", "蹦蹦炸弹", "炸鱼", "放火烧山", "放火烧山真君", "蒙德最强战力", "逃跑的太阳", "啦啦啦", "哒哒哒", "炸弹人", "禁闭室", "太阳", "小太阳" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000029",
|
||||
"name": "可莉",
|
||||
@@ -159,7 +159,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "钟离", "Zhongli", "zhongli", "摩拉克斯", "岩王爷", "岩神", "钟师傅", "天动万象", "岩王帝君", "未来可期", "帝君", "拒收病婿" ],
|
||||
"alias": [ "钟离", "Zhongli", "摩拉克斯", "岩王爷", "岩神", "钟师傅", "天动万象", "岩王帝君", "未来可期", "帝君", "拒收病婿" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000030",
|
||||
"name": "钟离",
|
||||
@@ -169,7 +169,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "菲谢尔", "Fischl", "fischl", "皇女", "小艾米", "小艾咪", "奥兹", "断罪皇女", "中二病", "中二少女", "中二皇女", "奥兹发射器", "菲谢尔·冯·露弗施洛斯·那菲多特", "露弗施洛斯", "那菲多特" ],
|
||||
"alias": [ "菲谢尔", "Fischl", "皇女", "小艾米", "小艾咪", "奥兹", "断罪皇女", "中二病", "中二少女", "中二皇女", "奥兹发射器" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000031",
|
||||
"name": "菲谢尔",
|
||||
@@ -178,7 +178,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "班尼特", "Bennett", "bennett", "点赞哥", "点赞", "倒霉少年", "倒霉蛋", "霹雳闪雷真君", "班神", "班爷", "倒霉", "火神", "六星真神" ],
|
||||
"alias": [ "班尼特", "Bennett", "点赞哥", "点赞", "倒霉少年", "倒霉蛋", "霹雳闪雷真君", "班神", "班爷", "倒霉", "蒙德火神", "六星真神" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000032",
|
||||
"name": "班尼特",
|
||||
@@ -187,7 +187,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "达达利亚", "Tartaglia", "tartaglia", "Childe", "childe", "Ajax", "ajax", "达达鸭", "达达利鸭", "公子", "玩具销售员", "玩具推销员", "钱包", "鸭鸭", "愚人众末席", "阿贾克斯" ],
|
||||
"alias": [ "达达利亚", "Tartaglia", "Childe", "Ajax", "达达鸭", "达达利鸭", "公子", "玩具销售员", "玩具推销员", "钱包", "鸭鸭", "愚人众末席" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000033",
|
||||
"name": "达达利亚",
|
||||
@@ -197,7 +197,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "诺艾尔", "Noelle", "noelle", "女仆", "高达", "岩王帝姬" ],
|
||||
"alias": [ "诺艾尔", "Noelle", "女仆", "高达", "岩王帝姬" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000034",
|
||||
"name": "诺艾尔",
|
||||
@@ -206,7 +206,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "七七", "Qiqi", "qiqi", "僵尸", "肚饿真君", "度厄真君", "77" ],
|
||||
"alias": [ "七七", "Qiqi", "僵尸", "肚饿真君", "度厄真君", "77" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000035",
|
||||
"name": "七七",
|
||||
@@ -215,7 +215,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "重云", "Chongyun", "chongyun", "纯阳之体", "冰棍" ],
|
||||
"alias": [ "重云", "Chongyun", "纯阳之体", "冰棍" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000036",
|
||||
"name": "重云",
|
||||
@@ -224,7 +224,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "甘雨", "Ganyu", "ganyu", "椰羊", "椰奶", "王小美" ],
|
||||
"alias": [ "甘雨", "Ganyu", "椰羊", "椰奶", "王小美" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000037",
|
||||
"name": "甘雨",
|
||||
@@ -233,7 +233,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "阿贝多", "Albedo", "albedo", "可莉哥哥", "升降机", "升降台", "电梯", "白垩之子", "贝爷", "白垩", "阿贝少", "花呗多", "阿贝夕", "abd", "阿师傅" ],
|
||||
"alias": [ "阿贝多", "Albedo", "可莉哥哥", "升降机", "升降台", "电梯", "白垩之子", "贝爷", "白垩", "阿贝少", "花呗多", "阿贝夕", "阿师傅" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000038",
|
||||
"name": "阿贝多",
|
||||
@@ -242,7 +242,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "迪奥娜", "Diona", "diona", "迪欧娜", "dio", "dio娜", "冰猫", "猫猫", "猫娘", "喵喵", "调酒师", "迪奥娜·凯茨莱茵", "凯茨莱茵" ],
|
||||
"alias": [ "迪奥娜", "Diona", "迪欧娜", "dio娜", "冰猫", "猫猫", "猫娘", "喵喵", "调酒师" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000039",
|
||||
"name": "迪奥娜",
|
||||
@@ -252,7 +252,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "莫娜", "Mona", "mona", "穷鬼", "穷光蛋", "穷", "莫纳", "占星术士", "占星师", "讨龙真君", "半部讨龙真君", "阿斯托洛吉斯·莫娜·梅姬斯图斯", "阿斯托洛吉斯", "梅姬斯图斯", "梅姬斯图斯姬", "梅姬斯图斯卿" ],
|
||||
"alias": [ "莫娜", "Mona", "穷鬼", "穷光蛋", "穷", "莫纳", "占星术士", "占星师", "讨龙真君", "半部讨龙真君", "阿斯托洛吉斯·莫娜·梅姬斯图斯", "梅姬斯图斯", "梅姬斯图斯姬" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000041",
|
||||
"name": "莫娜",
|
||||
@@ -261,7 +261,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "刻晴", "Keqing", "keqing", "刻情", "氪晴", "刻师傅", "刻师父", "牛杂", "牛杂师傅", "斩尽牛杂", "免疫", "免疫免疫", "屁斜剑法", "玉衡星", "玉衡", "阿晴", "啊晴", "璃月雷神" ],
|
||||
"alias": [ "刻晴", "Keqing", "刻情", "氪晴", "刻师傅", "刻师父", "牛杂", "牛杂师傅", "斩尽牛杂", "免疫", "免疫免疫", "屁斜剑法", "玉衡星", "阿晴", "啊晴", "璃月雷神" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000042",
|
||||
"name": "刻晴",
|
||||
@@ -270,7 +270,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "砂糖", "Sucrose", "sucrose", "雷莹术士", "雷萤术士", "雷荧术士" ],
|
||||
"alias": [ "砂糖", "Sucrose", "sucrose" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000043",
|
||||
"name": "砂糖",
|
||||
@@ -279,7 +279,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "辛焱", "Xinyan", "xinyan", "辛炎", "黑妹", "摇滚" ],
|
||||
"alias": [ "辛焱", "Xinyan", "辛炎", "黑妹", "摇滚" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000044",
|
||||
"name": "辛焱",
|
||||
@@ -288,7 +288,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "罗莎莉亚", "Rosaria", "rosaria", "罗莎莉娅", "白色史莱姆", "白史莱姆", "修女", "罗莎利亚", "罗莎利娅", "罗沙莉亚", "罗沙莉娅", "罗沙利亚", "罗沙利娅", "萝莎莉亚", "萝莎莉娅", "萝莎利亚", "萝莎利娅", "萝沙莉亚", "萝沙莉娅", "萝沙利亚", "萝沙利娅" ],
|
||||
"alias": [ "罗莎莉亚", "Rosaria", "罗莎莉娅", "白色史莱姆", "白史莱姆", "修女", "罗莎利亚", "罗莎利娅", "罗沙莉亚", "罗沙莉娅", "罗沙利亚", "罗沙利娅", "萝莎莉亚", "萝莎莉娅", "萝莎利亚", "萝莎利娅", "萝沙莉亚", "萝沙莉娅", "萝沙利亚", "萝沙利娅" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000045",
|
||||
"name": "罗莎莉亚",
|
||||
@@ -297,7 +297,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "胡桃", "Hu Tao", "hu tao", "HuTao", "hutao", "Hutao", "胡淘", "往生堂堂主", "火化", "抬棺的", "蝴蝶", "核桃", "堂主", "胡堂主", "雪霁梅香", "桃子" ],
|
||||
"alias": [ "胡桃", "Hu Tao", "HuTao", "Hutao", "胡淘", "往生堂堂主", "火化", "抬棺的", "蝴蝶", "核桃", "堂主", "胡堂主", "雪霁梅香", "桃子", "桃" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000046",
|
||||
"name": "胡桃",
|
||||
@@ -306,7 +306,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "枫原万叶", "Kaedehara Kazuha", "Kazuha", "kazuha", "万叶", "叶天帝", "天帝", "叶师傅" ],
|
||||
"alias": [ "枫原万叶", "Kaedehara Kazuha", "Kazuha", "万叶", "叶天帝", "天帝", "叶师傅" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000047",
|
||||
"name": "枫原万叶",
|
||||
@@ -316,7 +316,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "烟绯", "Yanfei", "yanfei", "烟老师", "律师", "罗翔" ],
|
||||
"alias": [ "烟绯", "Yanfei", "烟老师", "律师", "罗翔" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000048",
|
||||
"name": "烟绯",
|
||||
@@ -325,7 +325,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "宵宫", "Yoimiya", "yoimiya", "霄宫", "烟花", "肖宫", "肖工", "绷带女孩", "长野原宵宫" ],
|
||||
"alias": [ "宵宫", "Yoimiya", "霄宫", "烟花", "肖宫", "肖工", "绷带女孩" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000049",
|
||||
"name": "宵宫",
|
||||
@@ -334,7 +334,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "托马", "Thoma", "thoma", "家政官", "太郎丸", "地头蛇", "男仆", "拖马" ],
|
||||
"alias": [ "托马", "Thoma", "家政官", "太郎丸", "地头蛇", "男仆", "拖马" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000050",
|
||||
"name": "托马",
|
||||
@@ -343,7 +343,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "优菈", "Eula", "eula", "优拉", "尤拉", "尤菈", "浪花骑士", "记仇", "优菈·劳伦斯", "劳伦斯" ],
|
||||
"alias": [ "优菈", "Eula", "优拉", "尤拉", "尤菈", "浪花骑士", "记仇", "劳伦斯" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000051",
|
||||
"name": "优菈",
|
||||
@@ -353,7 +353,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "雷电将军", "Raiden Shogun", "Raiden", "raiden", "雷神", "将军", "雷军", "巴尔", "阿影", "影", "巴尔泽布", "煮饭婆", "奶香一刀", "无想一刀", "宅女" ],
|
||||
"alias": [ "雷电将军", "Raiden Shogun", "Raiden", "雷神", "将军", "雷军", "巴尔", "阿影", "影", "巴尔泽布", "煮饭婆", "奶香一刀", "无想一刀", "宅女" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000052",
|
||||
"name": "雷电将军",
|
||||
@@ -362,7 +362,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "早柚", "Sayu", "sayu", "小狸猫", "狸猫", "忍者", "貉" ],
|
||||
"alias": [ "早柚", "Sayu", "小狸猫", "狸猫", "忍者", "貉" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000053",
|
||||
"name": "早柚",
|
||||
@@ -371,7 +371,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "珊瑚宫心海", "Sangonomiya Kokomi", "Kokomi", "kokomi", "心海", "军师", "珊瑚宫", "书记", "观赏鱼", "水母", "鱼", "美人鱼" ],
|
||||
"alias": [ "珊瑚宫心海", "Sangonomiya Kokomi", "Kokomi", "心海", "军师", "珊瑚宫", "书记", "观赏鱼", "水母", "鱼", "美人鱼" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000054",
|
||||
"name": "珊瑚宫心海",
|
||||
@@ -380,7 +380,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "五郎", "Gorou", "gorou", "柴犬", "土狗", "希娜", "希娜小姐" ],
|
||||
"alias": [ "五郎", "Gorou", "柴犬", "土狗", "希娜", "希娜小姐" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000055",
|
||||
"name": "五郎",
|
||||
@@ -389,7 +389,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "九条裟罗", "Kujou Sara", "Sara", "sara", "九条", "九条沙罗", "裟罗", "沙罗", "天狗" ],
|
||||
"alias": [ "九条裟罗", "Kujou Sara", "Sara", "九条", "九条沙罗", "裟罗", "沙罗", "天狗" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000056",
|
||||
"name": "九条裟罗",
|
||||
@@ -398,7 +398,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "荒泷一斗", "Arataki Itto", "Itto", "itto", "荒龙一斗", "荒泷天下第一斗", "一斗", "一抖", "荒泷", "1斗", "牛牛", "斗子哥", "牛子哥", "牛子", "孩子王", "斗虫", "巧乐兹", "放牛的" ],
|
||||
"alias": [ "荒泷一斗", "Arataki Itto", "Itto", "荒龙一斗", "荒泷天下第一斗", "一斗", "一抖", "荒泷", "1斗", "牛牛", "斗子哥", "牛子哥", "牛子", "孩子王", "斗虫", "巧乐兹", "放牛的" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000057",
|
||||
"name": "荒泷一斗",
|
||||
@@ -407,7 +407,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "八重神子", "Yae Miko", "Miko", "miko", "八重", "神子", "狐狸", "想得美哦", "巫女", "屑狐狸", "骚狐狸", "八重宫司", "婶子", "小八", "八重寄子", "寄子" ],
|
||||
"alias": [ "八重神子", "Yae Miko", "Miko", "八重", "神子", "狐狸", "想得美哦", "巫女", "屑狐狸", "骚狐狸", "八重宫司", "婶子", "小八", "八重寄子", "寄子", "八神虫子", "八神重子" ],
|
||||
"burstCD": 22.0,
|
||||
"id": "10000058",
|
||||
"name": "八重神子",
|
||||
@@ -416,7 +416,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "鹿野院平藏", "shikanoin heizou", "Heizou", "heizou", "heizo", "鹿野苑", "鹿野院", "平藏", "鹿野苑平藏", "小鹿", "风拳" ],
|
||||
"alias": [ "鹿野院平藏", "shikanoin heizou", "Heizou", "鹿野苑", "鹿野院", "平藏", "鹿野苑平藏", "小鹿" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000059",
|
||||
"name": "鹿野院平藏",
|
||||
@@ -425,7 +425,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "夜兰", "Yelan", "yelan", "夜阑", "叶澜", "腋兰", "夜天后" ],
|
||||
"alias": [ "夜兰", "Yelan", "夜阑", "叶澜", "腋兰", "夜天后" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000060",
|
||||
"name": "夜兰",
|
||||
@@ -434,7 +434,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "绮良良", "Kirara", "kirara", "琦良良", "崎良良", "草猫", "猫又", "宅急便", "草猫宅急便", "送货员", "快递员", "草猫快递" ],
|
||||
"alias": [ "绮良良", "Kirara", "大猫猫", "大喵喵", "稻妻猫猫", "绮娘娘", "琦良良", "良良", "快递员", "草猫", "草猫猫", "草喵", "草喵喵", "猫又" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000061",
|
||||
"name": "绮良良",
|
||||
@@ -443,7 +443,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "埃洛伊", "Aloy", "aloy" ],
|
||||
"alias": [ "埃洛伊", "Aloy" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000062",
|
||||
"name": "埃洛伊",
|
||||
@@ -452,7 +452,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "申鹤", "Shenhe", "shenhe", "神鹤", "小姨", "小姨子", "审鹤" ],
|
||||
"alias": [ "申鹤", "Shenhe", "神鹤", "小姨", "小姨子", "审鹤" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000063",
|
||||
"name": "申鹤",
|
||||
@@ -462,7 +462,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "云堇", "Yun Jin", "yunjin", "yun jin", "云瑾", "云先生", "云锦", "神女劈观", "土女" ],
|
||||
"alias": [ "云堇", "Yun Jin", "yun jin", "云瑾", "云先生", "云锦", "神女劈观" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000064",
|
||||
"name": "云堇",
|
||||
@@ -471,7 +471,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "久岐忍", "Kuki Shinobu", "Kuki", "kuki", "Shinobu", "shinobu", "97忍", "小忍", "久歧忍", "97", "茄忍", "茄子", "紫茄子", "阿忍", "忍姐" ],
|
||||
"alias": [ "久岐忍", "Kuki Shinobu", "Kuki", "Shinobu", "97忍", "小忍", "久歧忍", "97", "茄忍", "茄子", "紫茄子", "阿忍", "忍姐" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000065",
|
||||
"name": "久岐忍",
|
||||
@@ -480,7 +480,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "神里绫人", "Kamisato Ayato", "Ayato", "ayato", "绫人", "神里凌人", "凌人", "0人", "神人", "零人", "大舅哥" ],
|
||||
"alias": [ "神里绫人", "Kamisato Ayato", "Ayato", "绫人", "神里凌人", "凌人", "0人", "神人", "零人", "大舅哥" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000066",
|
||||
"name": "神里绫人",
|
||||
@@ -489,7 +489,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "柯莱", "Collei", "collei", "柯来", "科莱", "科来", "小天使", "须弥安柏", "草安柏", "须弥飞行冠军", "见习巡林员", "巡林员" ],
|
||||
"alias": [ "柯莱", "Collei", "柯来", "科莱", "科来", "小天使", "须弥安柏", "草安柏", "须弥飞行冠军" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000067",
|
||||
"name": "柯莱",
|
||||
@@ -498,7 +498,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "多莉", "Dori", "dori", "多利", "多力", "多丽", "奸商", "多莉·桑歌玛哈巴依", "桑歌玛哈巴依" ],
|
||||
"alias": [ "多莉", "Dori", "多利", "多力", "奸商" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000068",
|
||||
"name": "多莉",
|
||||
@@ -507,7 +507,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "提纳里", "Tighnari", "tighnari", "小提", "提那里", "缇娜里", "提哪里", "驴", "柯莱老师", "柯莱师傅", "柯莱师父", "巡林官", "大巡林官" ],
|
||||
"alias": [ "提纳里", "Tighnari", "提那里", "小提", "驴" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000069",
|
||||
"name": "提纳里",
|
||||
@@ -516,7 +516,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "妮露", "Nilou", "nilou", "尼露", "尼禄", "妮璐", "舞娘", "红牛" ],
|
||||
"alias": [ "妮露", "Nilou", "尼露", "妮璐", "舞娘", "红牛" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000070",
|
||||
"name": "妮露",
|
||||
@@ -525,7 +525,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "赛诺", "Cyno", "cyno", "塞诺", "胡狼", "牌佬", "打牌佬", "打牌王", "大风纪官", "大风机关" ],
|
||||
"alias": [ "赛诺", "Cyno", "塞诺", "胡狼", "大风纪官", "大风机关" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000071",
|
||||
"name": "赛诺",
|
||||
@@ -535,7 +535,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "坎蒂丝", "Candace", "candace", "坎迪斯", "阿如村守护者", "水北斗" ],
|
||||
"alias": [ "坎蒂丝", "Candace", "坎迪斯" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000072",
|
||||
"name": "坎蒂丝",
|
||||
@@ -545,7 +545,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "纳西妲", "Nahida", "nahida", "草王", "草神", "花神", "小吉祥", "小吉祥草王", "大慈树王", "草萝莉", "纳西坦", "羽毛球" ],
|
||||
"alias": [ "纳西妲", "Nahida", "草神", "小吉祥", "大吉祥", "小草神", "大慈树王", "小吉祥草王", "草萝莉", "羽毛球", "摩诃善法大吉祥智慧主", "智慧主", "智慧之神", "布耶尔" ],
|
||||
"burstCD": 13.5,
|
||||
"id": "10000073",
|
||||
"name": "纳西妲",
|
||||
@@ -555,7 +555,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "莱依拉", "Layla", "layla", "拉一拉", "莱依菈", "来依菈", "来依拉", "莱伊拉", "莱伊菈", "来伊拉", "来伊菈", "不眠不醒不可思议" ],
|
||||
"alias": [ "莱依拉", "Layla", "莱依菈", "来依菈", "来依拉" ],
|
||||
"burstCD": 12.0,
|
||||
"id": "10000074",
|
||||
"name": "莱依拉",
|
||||
@@ -564,7 +564,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "流浪者", "The Wanderer", "Wanderer", "wanderer", "散兵", "伞兵", "斯卡拉姆齐", "国崩", "倾奇者", "崩崩小圆帽", "阿帽" ],
|
||||
"alias": [ "流浪者", "Wanderer", "散兵", "国崩", "雷电国崩", "大炮", "雷电大炮", "雷大炮", "伞兵", "斯卡拉姆齐" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000075",
|
||||
"name": "流浪者",
|
||||
@@ -573,7 +573,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "珐露珊", "Faruzan", "faruzan", "法露珊", "发露珊", "法露姗", "发露姗", "发姐", "法姐", "百岁珊", "前辈", "甜妹", "初音未来" ],
|
||||
"alias": [ "珐露珊", "Faruzan", "法露珊", "法璐珊", "法露姗", "法璐姗", "珐露姗", "珐璐姗", "百岁珊", "百岁山", "前辈", "仙贝" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000076",
|
||||
"name": "珐露珊",
|
||||
@@ -582,7 +582,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "瑶瑶", "Yaoyao", "yaoyao", "遥遥" ],
|
||||
"alias": [ "瑶瑶", "Yaoyao", "遥遥", "萝卜", "月桂" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000077",
|
||||
"name": "瑶瑶",
|
||||
@@ -591,7 +591,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "艾尔海森", "Alhaitham", "alhaitham", "爱尔海森", "艾尔海参", "艾尔", "海森", "海参", "海神", "大书记官" ],
|
||||
"alias": [ "艾尔海森", "Alhaitham", "海哥", "埃尔海森", "海森", "海参", "书记官" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000078",
|
||||
"name": "艾尔海森",
|
||||
@@ -600,7 +600,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "迪希雅", "Dehya", "dehya", "蒂西亚", "迪希亚", "西亚", "西雅", "希雅", "鬃狮", "希望工程", "炎拳" ],
|
||||
"alias": [ "迪希雅", "Dehya", "迪希亚", "迪希娅", "迪西雅", "迪西亚" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000079",
|
||||
"name": "迪希雅",
|
||||
@@ -609,7 +609,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "米卡", "Mika", "mika", "米咖", "鹦鹉", "鹦鹉头", "玄凤鹦鹉" ],
|
||||
"alias": [ "米卡", "Mika", "鹦鹉", "凤头", "凤头鹦鹉" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000080",
|
||||
"name": "米卡",
|
||||
@@ -618,7 +618,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "卡维", "Kaveh", "kaveh", "艾尔海森室友", "室友", "建筑设计师", "设计师", "优秀校友" ],
|
||||
"alias": [ "卡维", "Kaveh", "艾尔海森室友" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000081",
|
||||
"name": "卡维",
|
||||
@@ -627,7 +627,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "白术", "Baizhu", "baizhu", "长生", "白术哥哥", "白先生", "白大夫", "白医生", "白求恩", "蛇架子", "白绳子" ],
|
||||
"alias": [ "白术", "Baizhu", "长生", "白医生" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000082",
|
||||
"name": "白术",
|
||||
@@ -636,7 +636,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "琳妮特", "Lynette", "lynette", "林妮特", "林尼特", "琳尼特", "魔术助手", "魔术助理", "助手", "助理", "二姐", "二妹", "登登", "噔噔", "锵锵", "枫丹猫猫" ],
|
||||
"alias": [ "琳妮特", "Lynette", "林妮特", "林尼特", "琳尼特", "女魔术师", "魔术猫", "魔术喵", "登登" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000083",
|
||||
"name": "琳妮特",
|
||||
@@ -645,7 +645,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "林尼", "Lyney", "lyney", "大魔术师", "魔术师", "大哥" ],
|
||||
"alias": [ "林尼", "Lyney", "林妮", "琳尼", "琳妮", "男魔术师", "魔术师" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000084",
|
||||
"name": "林尼",
|
||||
@@ -654,7 +654,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "菲米尼", "Freminet", "freminet", "非米尼", "潜水员", "三弟", "企鹅" ],
|
||||
"alias": [ "菲米尼", "Freminet", "非米尼", "潜水员" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000085",
|
||||
"name": "菲米尼",
|
||||
@@ -663,7 +663,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "莱欧斯利", "Wriothesley", "wriothesley", "莱欧斯里", "来欧斯利", "来欧斯里", "梅洛彼得堡的管理者", "监狱管理者", "公爵", "典狱长", "监狱长", "狱长", "欧拉欧拉", "空条承太郎", "承太郎", "白金之星", "冰拳", "厂长" ],
|
||||
"alias": [ "莱欧斯利", "Wriothesley", "莱欧", "枫丹桑博", "公爵" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000086",
|
||||
"name": "莱欧斯利",
|
||||
@@ -672,7 +672,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "那维莱特", "Neuvillette", "neuvillette", "那维来特", "那维莱獭", "那维来獭", "那维", "审判官", "最高审判官", "美露莘爸爸", "男美露莘", "水龙", "水龙王", "海獭", "水獭", "龙王", "那位来客" ],
|
||||
"alias": [ "那维莱特", "Neuvillette", "那维", "水龙王", "水龙", "审判官", "海獭", "龙王", "最高审判官", "水之龙王" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000087",
|
||||
"name": "那维莱特",
|
||||
@@ -681,7 +681,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "夏洛蒂", "Charlotte", "charlotte", "夏洛特", "夏洛", "记者", "小记者", "蒸汽鸟报记者", "鸟记者", "狗仔队", "跑得快", "战地记者" ],
|
||||
"alias": [ "夏洛蒂", "Charlotte", "夏洛", "夏洛帝", "记者", "小记者", "佳能400D", "400D" ],
|
||||
"burstCD": 20.0,
|
||||
"id": "10000088",
|
||||
"name": "夏洛蒂",
|
||||
@@ -691,7 +691,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "芙宁娜", "Furina", "furina", "芙卡洛斯", "水神", "芙宁娜女士", "大明星", "演员", "芙芙", "傻芙芙", "罪人", "假水神", "水的女儿", "白芙", "黑芙" ],
|
||||
"alias": [ "芙宁娜", "Furina", "Focalors", "水神", "芙芙", "芙卡洛斯", "傻芙芙" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000089",
|
||||
"name": "芙宁娜",
|
||||
@@ -700,7 +700,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "夏沃蕾", "Chevreuse", "chevreuse", "夏沃雷", "特巡队队长", "特巡队长", "枫丹帕姆", "枫丹西琳", "火枪", "火铳" ],
|
||||
"alias": [ "夏沃蕾", "chevreuse", "夏沃雷" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000090",
|
||||
"name": "夏沃蕾",
|
||||
@@ -709,7 +709,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "娜维娅", "Navia", "navia", "娜维雅", "娜维亚", "刺玫会会长", "会长", "老板", "领导", "总指挥", "大小姐", "流汗黄豆", "黄豆姐", "炮姐", "黄玫瑰", "迈勒斯", "西尔弗" ],
|
||||
"alias": [ "娜维娅", "navia", "大小姐", "刺玫会", "黄豆", "流汗黄豆", "黄豆姐", "娜薇娅", "娜薇雅", "娜维雅" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000091",
|
||||
"name": "娜维娅",
|
||||
@@ -718,7 +718,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "嘉明", "Gaming", "gaming", "佳明", "嘉铭", "镖师", "威水舞兽", "威水舞兽话事人", "舞狮少年", "雄狮少年", "嘉乐" ],
|
||||
"alias": [ "嘉明", "Gaming", "jiaming", "佳明", "嘉铭", "家明", "镖师", "舞狮少年", "舞狮" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000092",
|
||||
"name": "嘉明",
|
||||
@@ -727,7 +727,7 @@
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "闲云", "Xianyun", "xianyun", "留云", "流云", "留云借风", "留云借风真君", "仙鹤", "仙鸟", "那个女人", "哪个女人", "那只鸟", "那只鸡", "闲云阿姨", "机关仙人", "很会聊天真君", "很会说话真君", "两块禽肉真君", "鸟人" ],
|
||||
"alias": [ "闲云", "Xianyun", "流云", "刘云", "留云", "野鹤", "那个女人", "留云借风", "留云借风真君", "很会聊天", "很会聊天真君" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000093",
|
||||
"name": "闲云",
|
||||
@@ -736,7 +736,7 @@
|
||||
"weapon": "10"
|
||||
},
|
||||
{
|
||||
"alias": [ "千织", "Chiori", "chiori", "老板娘", "裁锦师", "裁缝" ],
|
||||
"alias": [ "千织", "Chiori", "千只", "设计师", "裁缝", "千织屋老板" ],
|
||||
"burstCD": 13.5,
|
||||
"id": "10000094",
|
||||
"name": "千织",
|
||||
@@ -763,7 +763,7 @@
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "赛索斯", "Sethos", "丁真" ],
|
||||
"alias": [ "赛索斯", "Sethos", "塞索斯", "塞索思", "赛索思" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000097",
|
||||
"name": "赛索斯",
|
||||
@@ -772,7 +772,7 @@
|
||||
"weapon": "12"
|
||||
},
|
||||
{
|
||||
"alias": [ "克洛琳德", "Clorinde", "科洛琳德", "克洛林德", "美玉", "美玉学姐", "学姐" ],
|
||||
"alias": [ "克洛琳德", "Clorinde", "琳德", "科洛琳德", "克洛林德", "克罗林德", "苹果姐" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000098",
|
||||
"name": "克洛琳德",
|
||||
@@ -781,7 +781,7 @@
|
||||
"weapon": "1"
|
||||
},
|
||||
{
|
||||
"alias": [ "艾梅莉埃", "Emilie", "调香师", "艾梅" ],
|
||||
"alias": [ "艾梅莉埃", "Emilie", "调香师", "艾梅", "香水设计师", "现场清理人" ],
|
||||
"burstCD": 13.5,
|
||||
"id": "10000099",
|
||||
"name": "艾梅莉埃",
|
||||
@@ -789,5 +789,33 @@
|
||||
"skillCD": 10.0,
|
||||
"skillHoldCD": 14.0,
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "卡齐娜", "Kachina", "卡奇娜", "卡齐纳", "卡齐那", "卡其那", "冲天钻钻" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000100",
|
||||
"name": "卡齐娜",
|
||||
"nameEn": "Kachina",
|
||||
"skillCD": 20.0,
|
||||
"weapon": "13"
|
||||
},
|
||||
{
|
||||
"alias": [ "基尼奇", "Kinich", "基哥" ],
|
||||
"burstCD": 18.0,
|
||||
"id": "10000101",
|
||||
"name": "基尼奇",
|
||||
"nameEn": "Kinich",
|
||||
"skillCD": 18.0,
|
||||
"weapon": "11"
|
||||
},
|
||||
{
|
||||
"alias": [ "玛拉妮", "Mualani", "马拉尼", "鲨鱼妹", "海豹妹", "海豹", "纳塔鲨" ],
|
||||
"burstCD": 15.0,
|
||||
"id": "10000102",
|
||||
"name": "玛拉妮",
|
||||
"nameEn": "Mualani",
|
||||
"skillCD": 1.8,
|
||||
"skillHoldCD": 6.0,
|
||||
"weapon": "10"
|
||||
}
|
||||
]
|
||||
@@ -382,7 +382,7 @@ namespace BetterGenshinImpact.GameTask.AutoFishing
|
||||
}.InitTemplate();
|
||||
|
||||
// 截图
|
||||
using var captureRegion = TaskControl.CaptureToRectArea();
|
||||
using var captureRegion = TaskControl.CaptureToRectArea(forceNew: true);
|
||||
using var resRa = captureRegion.Find(ro);
|
||||
if (resRa.IsEmpty())
|
||||
{
|
||||
@@ -425,7 +425,7 @@ namespace BetterGenshinImpact.GameTask.AutoFishing
|
||||
while (IsEnabled)
|
||||
{
|
||||
// 截图
|
||||
var ra = TaskControl.CaptureToRectArea();
|
||||
var ra = TaskControl.CaptureToRectArea(forceNew: true);
|
||||
|
||||
// 找 鱼饵落点
|
||||
using var memoryStream = new MemoryStream();
|
||||
|
||||
@@ -781,6 +781,75 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1112,
|
||||
"nameEn": "freminet",
|
||||
"type": "character",
|
||||
"name": "菲米尼",
|
||||
"hp": 10,
|
||||
"energy": 2,
|
||||
"element": "冰元素",
|
||||
"weapon": "双手剑",
|
||||
"skills": [
|
||||
{
|
||||
"nameEn": "flowing_eddies",
|
||||
"name": "洑流剑",
|
||||
"skillTag": [
|
||||
"普通攻击"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1101,
|
||||
"nameEn": "cryo",
|
||||
"type": "冰元素",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"id": 1109,
|
||||
"nameEn": "unaligned_element",
|
||||
"type": "无色元素",
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nameEn": "pressurized_floe",
|
||||
"name": "浮冰增压",
|
||||
"skillTag": [
|
||||
"元素战技"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1101,
|
||||
"nameEn": "cryo",
|
||||
"type": "冰元素",
|
||||
"count": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nameEn": "shadowhunters_ambush",
|
||||
"name": "猎影潜袭",
|
||||
"skillTag": [
|
||||
"元素爆发"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1101,
|
||||
"nameEn": "cryo",
|
||||
"type": "冰元素",
|
||||
"count": 3
|
||||
},
|
||||
{
|
||||
"id": 1110,
|
||||
"nameEn": "energy",
|
||||
"type": "充能",
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1201,
|
||||
"nameEn": "barbara",
|
||||
@@ -3888,6 +3957,75 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1510,
|
||||
"nameEn": "xianyun",
|
||||
"type": "character",
|
||||
"name": "闲云",
|
||||
"hp": 10,
|
||||
"energy": 2,
|
||||
"element": "风元素",
|
||||
"weapon": "法器",
|
||||
"skills": [
|
||||
{
|
||||
"nameEn": "word_of_wind_and_flower",
|
||||
"name": "清风散花词",
|
||||
"skillTag": [
|
||||
"普通攻击"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1105,
|
||||
"nameEn": "anemo",
|
||||
"type": "风元素",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"id": 1109,
|
||||
"nameEn": "unaligned_element",
|
||||
"type": "无色元素",
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nameEn": "white_clouds_at_dawn",
|
||||
"name": "朝起鹤云",
|
||||
"skillTag": [
|
||||
"元素战技"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1105,
|
||||
"nameEn": "anemo",
|
||||
"type": "风元素",
|
||||
"count": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nameEn": "stars_gather_at_dusk",
|
||||
"name": "暮集竹星",
|
||||
"skillTag": [
|
||||
"元素爆发"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1105,
|
||||
"nameEn": "anemo",
|
||||
"type": "风元素",
|
||||
"count": 3
|
||||
},
|
||||
{
|
||||
"id": 1110,
|
||||
"nameEn": "energy",
|
||||
"type": "充能",
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1601,
|
||||
"nameEn": "ningguang",
|
||||
@@ -5637,6 +5775,75 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2205,
|
||||
"nameEn": "hydro_hilichurl_rogue",
|
||||
"type": "character",
|
||||
"name": "丘丘水行游侠",
|
||||
"hp": 10,
|
||||
"energy": 2,
|
||||
"element": "水元素",
|
||||
"weapon": "其他武器",
|
||||
"skills": [
|
||||
{
|
||||
"nameEn": "whirling_scythe",
|
||||
"name": "镰刀旋斩",
|
||||
"skillTag": [
|
||||
"普通攻击"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1102,
|
||||
"nameEn": "hydro",
|
||||
"type": "水元素",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"id": 1109,
|
||||
"nameEn": "unaligned_element",
|
||||
"type": "无色元素",
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nameEn": "slash_of_surging_tides",
|
||||
"name": "狂澜镰击",
|
||||
"skillTag": [
|
||||
"元素战技"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1102,
|
||||
"nameEn": "hydro",
|
||||
"type": "水元素",
|
||||
"count": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"nameEn": "bubblefloat_blitz",
|
||||
"name": "浮泡攻势",
|
||||
"skillTag": [
|
||||
"元素爆发"
|
||||
],
|
||||
"cost": [
|
||||
{
|
||||
"id": 1102,
|
||||
"nameEn": "hydro",
|
||||
"type": "水元素",
|
||||
"count": 3
|
||||
},
|
||||
{
|
||||
"id": 1110,
|
||||
"nameEn": "energy",
|
||||
"type": "充能",
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2301,
|
||||
"nameEn": "fatui_pyro_agent",
|
||||
|
||||
@@ -95,7 +95,7 @@ public class ScriptParser
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
MyLogger.LogError($"解析脚本错误,行号:{i + 1},错误信息:{ex}");
|
||||
MessageBox.Show($"解析脚本错误,行号:{i + 1},错误信息:{ex}", "策略解析失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Error($"解析脚本错误,行号:{i + 1},错误信息:{ex}", "策略解析失败");
|
||||
return default!;
|
||||
}
|
||||
|
||||
@@ -195,4 +195,4 @@ public class ScriptParser
|
||||
throw new System.Exception(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Handler;
|
||||
|
||||
/// <summary>
|
||||
/// 采集任务到达点位后执行拾取操作
|
||||
/// 暂时不需要
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
public class PickHandler
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
|
||||
public class ActionEnum(string code, string msg)
|
||||
{
|
||||
public static readonly ActionEnum StopFlying = new("stop_flying", "下落攻击");
|
||||
// 还有要加入的其他动作
|
||||
// 滚轮F
|
||||
// 触发自动战斗任务
|
||||
// 执行 js 脚本(推荐)
|
||||
// 执行键鼠脚本
|
||||
// 纳西达采集
|
||||
|
||||
public static IEnumerable<ActionEnum> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return StopFlying;
|
||||
}
|
||||
}
|
||||
|
||||
public string Code { get; private set; } = code;
|
||||
public string Msg { get; private set; } = msg;
|
||||
|
||||
public static string GetMsgByCode(string code)
|
||||
{
|
||||
foreach (var item in Values)
|
||||
{
|
||||
if (item.Code == code)
|
||||
{
|
||||
return item.Msg;
|
||||
}
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
|
||||
public class MoveModeEnum(string code, string msg)
|
||||
{
|
||||
public static readonly MoveModeEnum Walk = new("walk", "步行");
|
||||
public static readonly MoveModeEnum Fly = new("fly", "飞行");
|
||||
public static readonly MoveModeEnum Jump = new("jump", "跳跃");
|
||||
public static readonly MoveModeEnum Swim = new("swim", "游泳");
|
||||
|
||||
public static IEnumerable<MoveModeEnum> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return Walk;
|
||||
yield return Fly;
|
||||
yield return Jump;
|
||||
yield return Swim;
|
||||
}
|
||||
}
|
||||
|
||||
public string Code { get; private set; } = code;
|
||||
public string Msg { get; private set; } = msg;
|
||||
|
||||
public static string GetMsgByCode(string code)
|
||||
{
|
||||
foreach (var item in Values)
|
||||
{
|
||||
if (item.Code == code)
|
||||
{
|
||||
return item.Msg;
|
||||
}
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
|
||||
public class PathingTaskType(string code, string msg)
|
||||
{
|
||||
public static readonly PathingTaskType Collect = new("collect", "采集");
|
||||
public static readonly PathingTaskType Mining = new("mining", "挖矿");
|
||||
public static readonly PathingTaskType Farming = new("farming", "锄地");
|
||||
|
||||
public static IEnumerable<PathingTaskType> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return Collect;
|
||||
yield return Mining;
|
||||
yield return Farming;
|
||||
}
|
||||
}
|
||||
|
||||
public string Code { get; private set; } = code;
|
||||
public string Msg { get; private set; } = msg;
|
||||
|
||||
public static string GetMsgByCode(string code)
|
||||
{
|
||||
foreach (var item in Values)
|
||||
{
|
||||
if (item.Code == code)
|
||||
{
|
||||
return item.Msg;
|
||||
}
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
|
||||
public class WaypointType(string code, string msg)
|
||||
{
|
||||
public static readonly WaypointType Path = new("path", "途径点");
|
||||
public static readonly WaypointType Target = new("target", "目标点");
|
||||
public static readonly WaypointType Teleport = new("teleport", "传送点");
|
||||
|
||||
public static IEnumerable<WaypointType> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return Path;
|
||||
yield return Target;
|
||||
yield return Teleport;
|
||||
}
|
||||
}
|
||||
|
||||
public string Code { get; private set; } = code;
|
||||
public string Msg { get; private set; } = msg;
|
||||
|
||||
public static string GetMsgByCode(string code)
|
||||
{
|
||||
foreach (var item in Values)
|
||||
{
|
||||
if (item.Code == code)
|
||||
{
|
||||
return item.Msg;
|
||||
}
|
||||
}
|
||||
return code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
|
||||
[Serializable]
|
||||
public class PathingTask
|
||||
{
|
||||
/// <summary>
|
||||
/// 实际存储的文件名
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 实际存储的文件路径
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string FullPath { get; set; } = string.Empty;
|
||||
|
||||
public PathingTaskInfo Info { get; set; } = new();
|
||||
public List<Waypoint> Positions { get; set; } = [];
|
||||
|
||||
public static PathingTask BuildFromFilePath(string filePath)
|
||||
{
|
||||
var json = File.ReadAllText(filePath);
|
||||
var task = JsonSerializer.Deserialize<PathingTask>(json, PathRecorder.JsonOptions) ?? throw new Exception("Failed to deserialize PathingTask");
|
||||
task.FileName = Path.GetFileName(filePath);
|
||||
task.FullPath = filePath;
|
||||
return task;
|
||||
}
|
||||
|
||||
public void SaveToFile(string filePath)
|
||||
{
|
||||
var json = JsonSerializer.Serialize(this, PathRecorder.JsonOptions);
|
||||
File.WriteAllText(filePath, json, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
|
||||
[Serializable]
|
||||
public class PathingTaskConfig
|
||||
{
|
||||
// 持续操作 切换某个角色 长E or 短E
|
||||
// 持续疾跑
|
||||
// 边跳边走
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
|
||||
[Serializable]
|
||||
public class PathingTaskInfo
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// <see cref="PathingTaskType"/>
|
||||
/// </summary>
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
[JsonIgnore]
|
||||
public string TypeDesc => PathingTaskType.GetMsgByCode(Type);
|
||||
|
||||
// 任务参数/配置
|
||||
// 持续操作 切换某个角色 长E or 短E
|
||||
// 持续疾跑
|
||||
// 边跳边走
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
|
||||
[Serializable]
|
||||
public class Waypoint
|
||||
{
|
||||
public double X { get; set; }
|
||||
public double Y { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="WaypointType"/>
|
||||
/// </summary>
|
||||
public string Type { get; set; } = WaypointType.Path.Code;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="MoveModeEnum"/>
|
||||
/// </summary>
|
||||
public string MoveMode { get; set; } = MoveModeEnum.Walk.Code;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="ActionEnum"/>
|
||||
/// </summary>
|
||||
public string? Action { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
using BetterGenshinImpact.GameTask.Common.Map;
|
||||
using BetterGenshinImpact.GameTask.Model.Area;
|
||||
using OpenCvSharp;
|
||||
using System;
|
||||
using BetterGenshinImpact.GameTask.Common;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using CommunityToolkit.Mvvm.Messaging.Messages;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing;
|
||||
|
||||
public class Navigation
|
||||
{
|
||||
private static bool _isWarmUp = false;
|
||||
|
||||
public static void WarmUp()
|
||||
{
|
||||
if (!_isWarmUp)
|
||||
{
|
||||
TaskControl.Logger.LogInformation("地图特征点加载中,由于体积较大,首次加载速度较慢,请耐心等待...");
|
||||
EntireMap.Instance.GetFeatureMatcher();
|
||||
TaskControl.Logger.LogInformation("地图特征点加载完成!");
|
||||
}
|
||||
_isWarmUp = true;
|
||||
}
|
||||
|
||||
public static Point2f GetPosition(ImageRegion imageRegion)
|
||||
{
|
||||
var greyMat = new Mat(imageRegion.SrcGreyMat, new Rect(62, 19, 212, 212));
|
||||
var p = EntireMap.Instance.GetMiniMapPositionByFeatureMatch(greyMat);
|
||||
|
||||
WeakReferenceMessenger.Default.Send(new PropertyChangedMessage<object>(typeof(Navigation),
|
||||
"SendCurrentPosition", new object(), p));
|
||||
return p;
|
||||
}
|
||||
|
||||
public static int GetTargetOrientation(Waypoint waypoint, Point2f position)
|
||||
{
|
||||
double deltaX = waypoint.X - position.X;
|
||||
double deltaY = waypoint.Y - position.Y;
|
||||
double vectorLength = Math.Sqrt(deltaX * deltaX + deltaY * deltaY);
|
||||
if (vectorLength == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
// 计算向量与x轴之间的夹角(逆时针方向)
|
||||
double angle = Math.Acos(deltaX / vectorLength);
|
||||
// 如果向量在x轴下方,角度需要调整
|
||||
if (deltaY < 0)
|
||||
{
|
||||
angle = 2 * Math.PI - angle;
|
||||
}
|
||||
return (int)(angle * (180.0 / Math.PI));
|
||||
}
|
||||
|
||||
public static double GetDistance(Waypoint waypoint, Point2f position)
|
||||
{
|
||||
var x1 = waypoint.X;
|
||||
var y1 = waypoint.Y;
|
||||
var x2 = position.X;
|
||||
var y2 = position.Y;
|
||||
return Math.Sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
using BetterGenshinImpact.Core.Simulator;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
using BetterGenshinImpact.GameTask.AutoTrackPath;
|
||||
using BetterGenshinImpact.GameTask.Common.BgiVision;
|
||||
using BetterGenshinImpact.GameTask.Common.Map;
|
||||
using BetterGenshinImpact.GameTask.Model.Area;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using CommunityToolkit.Mvvm.Messaging.Messages;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OpenCvSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Vanara.PInvoke;
|
||||
using static BetterGenshinImpact.GameTask.Common.TaskControl;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing;
|
||||
|
||||
public class PathExecutor(CancellationTokenSource cts)
|
||||
{
|
||||
private double _dpi = 1;
|
||||
|
||||
public async Task Pathing(PathingTask task)
|
||||
{
|
||||
_dpi = TaskContext.Instance().DpiScale;
|
||||
if (!task.Positions.Any())
|
||||
{
|
||||
Logger.LogWarning("没有路径点,寻路结束");
|
||||
return;
|
||||
}
|
||||
|
||||
InitializePathing(task);
|
||||
|
||||
var waypoints = ConvertWaypoints(task.Positions);
|
||||
|
||||
await Delay(100, cts);
|
||||
Navigation.WarmUp(); // 提前加载地图特征点
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var waypoint in waypoints)
|
||||
{
|
||||
if (waypoint.Type == WaypointType.Teleport.Code)
|
||||
{
|
||||
await HandleTeleportWaypoint(waypoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Path不用走得很近,Target需要接近,但都需要先移动到对应位置
|
||||
await MoveTo(waypoint);
|
||||
|
||||
if (waypoint.Type == WaypointType.Target.Code || !string.IsNullOrEmpty(waypoint.Action))
|
||||
{
|
||||
await MoveCloseTo(waypoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
// 不管咋样,松开所有按键
|
||||
Simulation.SendInput.Keyboard.KeyUp(User32.VK.VK_W);
|
||||
Simulation.SendInput.Mouse.RightButtonUp();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializePathing(PathingTask task)
|
||||
{
|
||||
task.Positions.First().Type = WaypointType.Teleport.Code;
|
||||
WeakReferenceMessenger.Default.Send(new PropertyChangedMessage<object>(this,
|
||||
"UpdateCurrentPathing", new object(), task));
|
||||
}
|
||||
|
||||
private List<Waypoint> ConvertWaypoints(List<Waypoint> positions)
|
||||
{
|
||||
var waypoints = new List<Waypoint>();
|
||||
foreach (var waypoint in positions)
|
||||
{
|
||||
if (waypoint.Type == WaypointType.Teleport.Code)
|
||||
{
|
||||
waypoints.Add(waypoint);
|
||||
continue;
|
||||
}
|
||||
var waypointCopy = new Waypoint
|
||||
{
|
||||
Action = waypoint.Action,
|
||||
Type = waypoint.Type,
|
||||
MoveMode = waypoint.MoveMode
|
||||
};
|
||||
(waypointCopy.X, waypointCopy.Y) = MapCoordinate.GameToMain2048(waypoint.X, waypoint.Y);
|
||||
waypoints.Add(waypointCopy);
|
||||
}
|
||||
return waypoints;
|
||||
}
|
||||
|
||||
private async Task HandleTeleportWaypoint(Waypoint waypoint)
|
||||
{
|
||||
var (tpX, tpY) = await new TpTask(cts).Tp(waypoint.X, waypoint.Y);
|
||||
var (tprX, tprY) = MapCoordinate.GameToMain2048(tpX, tpY);
|
||||
EntireMap.Instance.SetPrevPosition((float)tprX, (float)tprY); // 通过上一个位置直接进行局部特征匹配
|
||||
}
|
||||
|
||||
private async Task MoveTo(Waypoint waypoint)
|
||||
{
|
||||
var screen = CaptureToRectArea();
|
||||
var position = Navigation.GetPosition(screen);
|
||||
var targetOrientation = Navigation.GetTargetOrientation(waypoint, position);
|
||||
Logger.LogInformation("粗略接近途经点,位置({x2},{y2})", $"{waypoint.X:F1}", $"{waypoint.Y:F1}");
|
||||
await WaitUntilRotatedTo(targetOrientation, 5);
|
||||
var startTime = DateTime.UtcNow;
|
||||
var lastPositionRecord = DateTime.UtcNow;
|
||||
var fastMode = false;
|
||||
var prevPositions = new List<Point2f>();
|
||||
// 按下w,一直走
|
||||
Simulation.SendInput.Keyboard.KeyDown(User32.VK.VK_W);
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
var now = DateTime.UtcNow;
|
||||
if ((now - startTime).TotalSeconds > 60)
|
||||
{
|
||||
Logger.LogWarning("执行超时,跳过路径点");
|
||||
break;
|
||||
}
|
||||
screen = CaptureToRectArea();
|
||||
position = Navigation.GetPosition(screen);
|
||||
var distance = Navigation.GetDistance(waypoint, position);
|
||||
Debug.WriteLine($"接近目标点中,距离为{distance}");
|
||||
if (distance < 4)
|
||||
{
|
||||
Logger.LogInformation("到达路径点附近");
|
||||
break;
|
||||
}
|
||||
if (distance > 500)
|
||||
{
|
||||
Logger.LogWarning("距离过远,跳过路径点");
|
||||
break;
|
||||
}
|
||||
if ((now - lastPositionRecord).TotalMilliseconds > 1000)
|
||||
{
|
||||
lastPositionRecord = now;
|
||||
prevPositions.Add(position);
|
||||
if (prevPositions.Count > 8)
|
||||
{
|
||||
var delta = prevPositions[^1] - prevPositions[^8];
|
||||
if (Math.Abs(delta.X) + Math.Abs(delta.Y) < 3)
|
||||
{
|
||||
Logger.LogWarning("疑似卡死,尝试脱离并跳过路径点");
|
||||
Simulation.SendInput.Keyboard.KeyUp(User32.VK.VK_W);
|
||||
await Delay(500, cts);
|
||||
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_X);
|
||||
await Delay(500, cts);
|
||||
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_S);
|
||||
await Delay(500, cts);
|
||||
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_A);
|
||||
await Delay(500, cts);
|
||||
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_D);
|
||||
await Delay(500, cts);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 旋转视角
|
||||
targetOrientation = Navigation.GetTargetOrientation(waypoint, position);
|
||||
RotateTo(targetOrientation, screen);
|
||||
// 根据指定方式进行移动
|
||||
if (waypoint.MoveMode == MoveModeEnum.Fly.Code)
|
||||
{
|
||||
var isFlying = Bv.GetMotionStatus(screen) == MotionStatus.Fly;
|
||||
if (!isFlying)
|
||||
{
|
||||
Debug.WriteLine("未进入飞行状态,按下空格");
|
||||
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_SPACE);
|
||||
await Delay(200, cts);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// if (isFlying)
|
||||
// {
|
||||
// Simulation.SendInput.Mouse.LeftButtonClick();
|
||||
// await Delay(1000, cts);
|
||||
// continue;
|
||||
// }
|
||||
if (waypoint.MoveMode == MoveModeEnum.Jump.Code)
|
||||
{
|
||||
Simulation.SendInput.Keyboard.KeyPress(User32.VK.VK_SPACE);
|
||||
await Delay(200, cts);
|
||||
continue;
|
||||
}
|
||||
// 跑步或者游泳
|
||||
if (distance > 20 != fastMode)// 距离大于20时可以使用疾跑/自由泳
|
||||
{
|
||||
if (fastMode)
|
||||
{
|
||||
Simulation.SendInput.Mouse.RightButtonUp();
|
||||
}
|
||||
else
|
||||
{
|
||||
Simulation.SendInput.Mouse.RightButtonDown();
|
||||
}
|
||||
fastMode = !fastMode;
|
||||
}
|
||||
await Delay(100, cts);
|
||||
}
|
||||
// 抬起w键
|
||||
Simulation.SendInput.Keyboard.KeyUp(User32.VK.VK_W);
|
||||
}
|
||||
|
||||
private async Task MoveCloseTo(Waypoint waypoint)
|
||||
{
|
||||
var screen = CaptureToRectArea();
|
||||
var position = Navigation.GetPosition(screen);
|
||||
var targetOrientation = Navigation.GetTargetOrientation(waypoint, position);
|
||||
Logger.LogInformation("精确接近目标点,位置({x2},{y2})", $"{waypoint.X:F1}", $"{waypoint.Y:F1}");
|
||||
if (waypoint.MoveMode == MoveModeEnum.Fly.Code && waypoint.Action == ActionEnum.StopFlying.Code)
|
||||
{
|
||||
//下落攻击接近目的地
|
||||
Logger.LogInformation("动作:下落攻击");
|
||||
Simulation.SendInput.Mouse.LeftButtonClick();
|
||||
await Delay(1000, cts);
|
||||
}
|
||||
await WaitUntilRotatedTo(targetOrientation, 2);
|
||||
var wPressed = false;
|
||||
var stepsTaken = 0;
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
stepsTaken++;
|
||||
if (stepsTaken > 8)
|
||||
{
|
||||
Logger.LogWarning("精确接近超时");
|
||||
break;
|
||||
}
|
||||
screen = CaptureToRectArea();
|
||||
position = Navigation.GetPosition(screen);
|
||||
if (Navigation.GetDistance(waypoint, position) < 2)
|
||||
{
|
||||
Logger.LogInformation("已到达路径点");
|
||||
break;
|
||||
}
|
||||
RotateTo(targetOrientation, screen); //不再改变视角
|
||||
if (waypoint.MoveMode == MoveModeEnum.Walk.Code)
|
||||
{
|
||||
// 小碎步接近
|
||||
Simulation.SendInput.Keyboard.KeyDown(User32.VK.VK_W).Sleep(60).KeyUp(User32.VK.VK_W);
|
||||
await Delay(200, cts);
|
||||
continue;
|
||||
}
|
||||
if (!wPressed)
|
||||
{
|
||||
Simulation.SendInput.Keyboard.KeyDown(User32.VK.VK_W);
|
||||
}
|
||||
await Delay(100, cts);
|
||||
}
|
||||
if (wPressed)
|
||||
{
|
||||
Simulation.SendInput.Keyboard.KeyUp(User32.VK.VK_W);
|
||||
}
|
||||
}
|
||||
|
||||
private int RotateTo(int targetOrientation, ImageRegion imageRegion, double controlRatio = 1)
|
||||
{
|
||||
var cao = CameraOrientation.Compute(imageRegion.SrcGreyMat);
|
||||
var diff = (cao - targetOrientation + 180) % 360 - 180;
|
||||
diff += diff < -180 ? 360 : 0;
|
||||
if (diff == 0)
|
||||
{
|
||||
return diff;
|
||||
}
|
||||
// 平滑的旋转视角
|
||||
if (Math.Abs(diff) > 90)
|
||||
{
|
||||
controlRatio = 5;
|
||||
}
|
||||
else if (Math.Abs(diff) > 30)
|
||||
{
|
||||
controlRatio = 3;
|
||||
}
|
||||
else if (Math.Abs(diff) > 5)
|
||||
{
|
||||
controlRatio = 2;
|
||||
}
|
||||
Simulation.SendInput.Mouse.MoveMouseBy((int)Math.Round(-controlRatio * diff * _dpi), 0);
|
||||
return diff;
|
||||
}
|
||||
|
||||
private async Task WaitUntilRotatedTo(int targetOrientation, int maxDiff)
|
||||
{
|
||||
int count = 0;
|
||||
while (!cts.IsCancellationRequested)
|
||||
{
|
||||
var screen = CaptureToRectArea();
|
||||
if (Math.Abs(RotateTo(targetOrientation, screen)) < maxDiff)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (count > 50)
|
||||
{
|
||||
break;
|
||||
}
|
||||
await Delay(50, cts);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using BetterGenshinImpact.Core.Config;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model;
|
||||
using BetterGenshinImpact.GameTask.AutoPathing.Model.Enum;
|
||||
using BetterGenshinImpact.GameTask.Common;
|
||||
using BetterGenshinImpact.GameTask.Common.Map;
|
||||
using BetterGenshinImpact.ViewModel.Pages;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPathing;
|
||||
|
||||
public class PathRecorder
|
||||
{
|
||||
public static readonly JsonSerializerOptions JsonOptions = new()
|
||||
{
|
||||
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals,
|
||||
Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
|
||||
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower, // 下划线
|
||||
AllowTrailingCommas = true,
|
||||
ReadCommentHandling = JsonCommentHandling.Skip,
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
|
||||
};
|
||||
|
||||
private PathingTask _pathingTask = new();
|
||||
|
||||
public void Start()
|
||||
{
|
||||
_pathingTask = new PathingTask();
|
||||
TaskControl.Logger.LogInformation("开始路径点记录");
|
||||
var waypoint = new Waypoint();
|
||||
var screen = TaskControl.CaptureToRectArea();
|
||||
var position = Navigation.GetPosition(screen);
|
||||
position = MapCoordinate.Main2048ToGame(position);
|
||||
waypoint.X = position.X;
|
||||
waypoint.Y = position.Y;
|
||||
waypoint.Type = WaypointType.Teleport.Code;
|
||||
waypoint.MoveMode = MoveModeEnum.Walk.Code;
|
||||
_pathingTask.Positions.Add(waypoint);
|
||||
TaskControl.Logger.LogInformation("已创建初始路径点({x},{y})", waypoint.X, waypoint.Y);
|
||||
}
|
||||
|
||||
public void AddWaypoint(string waypointType = "")
|
||||
{
|
||||
Waypoint waypoint = new();
|
||||
var screen = TaskControl.CaptureToRectArea();
|
||||
var position = Navigation.GetPosition(screen);
|
||||
position = MapCoordinate.Main2048ToGame(position);
|
||||
waypoint.X = position.X;
|
||||
waypoint.Y = position.Y;
|
||||
waypoint.Type = string.IsNullOrEmpty(waypointType) ? WaypointType.Path.Code : waypointType;
|
||||
// var motionStatus = Bv.GetMotionStatus(screen);
|
||||
// switch (motionStatus)
|
||||
// {
|
||||
// case MotionStatus.Fly:
|
||||
// waypoint.MoveStatus = MoveStatusType.Fly.Code;
|
||||
// break;
|
||||
//
|
||||
// case MotionStatus.Climb:
|
||||
// waypoint.MoveStatus = MoveStatusType.Jump.Code;
|
||||
// break;
|
||||
//
|
||||
// default:
|
||||
// waypoint.MoveStatus = MoveStatusType.Walk.Code;
|
||||
// break;
|
||||
// }
|
||||
_pathingTask.Positions.Add(waypoint);
|
||||
TaskControl.Logger.LogInformation("已添加途径点({x},{y})", waypoint.X, waypoint.Y);
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
_pathingTask.SaveToFile(Path.Combine(MapPathingViewModel.PathJsonPath, $@"{DateTime.Now:yyyy-MM-dd HH:mm:ss:ffff}.json"));
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,6 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using Vanara.PInvoke;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoPick;
|
||||
@@ -98,7 +97,7 @@ public partial class AutoPickTrigger : ITaskTrigger
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "读取拾取黑名单失败");
|
||||
MessageBox.Show("读取拾取黑名单失败,请确认修改后的拾取黑名单内容格式是否正确!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Error("读取拾取黑名单失败,请确认修改后的拾取黑名单内容格式是否正确!");
|
||||
}
|
||||
|
||||
try
|
||||
@@ -112,7 +111,7 @@ public partial class AutoPickTrigger : ITaskTrigger
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "读取拾取白名单失败");
|
||||
MessageBox.Show("读取拾取白名单失败,请确认修改后的拾取白名单内容格式是否正确!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Error("读取拾取白名单失败,请确认修改后的拾取白名单内容格式是否正确!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,6 +204,11 @@ public partial class AutoPickTrigger : ITaskTrigger
|
||||
{
|
||||
return;
|
||||
}
|
||||
// 纳塔部落中文名特殊处理,不拾取
|
||||
if (text.Contains("声望") && text.Contains("我在"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 单个字符不拾取
|
||||
if (text.Length <= 1)
|
||||
|
||||
@@ -351,15 +351,15 @@
|
||||
"调酒辅料特别一点"
|
||||
],
|
||||
"诺艾尔第二幕结局1:岩间休憩": [
|
||||
"换个地方,缓解一下紧张感吧",
|
||||
"去港口吧,说不定能向千岩军请教"
|
||||
"缓解一下紧张感吧",
|
||||
"去港口吧"
|
||||
],
|
||||
"诺艾尔第二幕结局2:女仆骑士": [
|
||||
"换个地方,缓解一下紧张感吧",
|
||||
"去[三碗不过港]吧,然后再往前走走"
|
||||
"缓解一下紧张感吧",
|
||||
"三碗不过港"
|
||||
],
|
||||
"诺艾尔第二幕结局3:满分答卷": [
|
||||
"不要逃避,直面考试压力吧",
|
||||
"直面考试压力吧",
|
||||
"可以多参加一些考试来熟悉氛围",
|
||||
"风车菊",
|
||||
"罗尔德",
|
||||
@@ -367,21 +367,21 @@
|
||||
"烤肉排"
|
||||
],
|
||||
"诺艾尔第二幕结局4:错题漏分": [
|
||||
"不要逃避,直面考试压力吧",
|
||||
"直面考试压力吧",
|
||||
"可以多参加一些考试来熟悉氛围",
|
||||
"小灯草",
|
||||
"王尔德",
|
||||
"寂灭海"
|
||||
],
|
||||
"诺艾尔第二幕结局5:独1无2的诺艾尔": [
|
||||
"不要逃避,直面考试压力吧",
|
||||
"直面考试压力吧",
|
||||
"可以多想象一下考试成功的样子",
|
||||
"可以成为琴那样的[代理团长]"
|
||||
"琴那样"
|
||||
],
|
||||
"诺艾尔第二幕结局6:女仆的本职工作": [
|
||||
"不要逃避,直面考试压力吧",
|
||||
"直面考试压力吧",
|
||||
"可以多想象一下考试成功的样子",
|
||||
"可以成为凯亚那样的[骑兵队长]"
|
||||
"凯亚那样"
|
||||
],
|
||||
"诺艾尔第一幕结局1:遇冷的盛情": [
|
||||
"并不一定非要成为骑士啊",
|
||||
@@ -469,7 +469,7 @@
|
||||
"班尼特结局6:辛运的可能性": [
|
||||
"和我一起冒险吧",
|
||||
"我一般选择直接上",
|
||||
"怎么能让你承担危险呢"
|
||||
"承担危险"
|
||||
],
|
||||
"重云结局1:焉知非福": [
|
||||
"直接说清楚吧",
|
||||
@@ -485,7 +485,7 @@
|
||||
"只能全部给他了",
|
||||
"绝云椒椒和史莱姆凝液"
|
||||
],
|
||||
"重云结局4:试菜员罗伊斯": [
|
||||
"重云结局4:一无所获": [
|
||||
"还是别拆穿吧",
|
||||
"我陪你一起喝",
|
||||
"我一个人一起去调查下"
|
||||
|
||||
@@ -84,7 +84,7 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "读取自动剧情默认暂停点击关键词列表失败");
|
||||
MessageBox.Show("读取自动剧情默认暂停点击关键词列表失败,请确认修改后的自动剧情默认暂停点击关键词内容格式是否正确!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Error("读取自动剧情默认暂停点击关键词列表失败,请确认修改后的自动剧情默认暂停点击关键词内容格式是否正确!");
|
||||
}
|
||||
|
||||
try
|
||||
@@ -98,7 +98,7 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "读取自动剧情暂停点击关键词列表失败");
|
||||
MessageBox.Show("读取自动剧情暂停点击关键词列表失败,请确认修改后的自动剧情暂停点击关键词内容格式是否正确!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Error("读取自动剧情暂停点击关键词列表失败,请确认修改后的自动剧情暂停点击关键词内容格式是否正确!");
|
||||
}
|
||||
|
||||
try
|
||||
@@ -112,7 +112,7 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "读取自动剧情优先点击选项列表失败");
|
||||
MessageBox.Show("读取自动剧情优先点击选项列表失败,请确认修改后的自动剧情优先点击选项内容格式是否正确!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Error("读取自动剧情优先点击选项列表失败,请确认修改后的自动剧情优先点击选项内容格式是否正确!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,11 +147,19 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
if (!isPlaying && (DateTime.Now - _prevPlayingTime).TotalSeconds <= 5)
|
||||
{
|
||||
// 关闭弹出页
|
||||
ClosePopupPage(content);
|
||||
if (_config.ClosePopupPagedEnabled)
|
||||
{
|
||||
ClosePopupPage(content);
|
||||
}
|
||||
|
||||
// 自动剧情点击3s内判断
|
||||
if ((DateTime.Now - _prevPlayingTime).TotalMilliseconds < 3000)
|
||||
{
|
||||
if (!TaskContext.Instance().Config.AutoSkipConfig.SubmitGoodsEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 提交物品
|
||||
if (SubmitGoods(content))
|
||||
{
|
||||
@@ -323,38 +331,11 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取橙色选项的文字
|
||||
/// </summary>
|
||||
/// <param name="captureMat"></param>
|
||||
/// <param name="foundIconRectArea"></param>
|
||||
/// <param name="chatOptionTextWidth"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete]
|
||||
private string GetOrangeOptionText(Mat captureMat, ImageRegion foundIconRectArea, int chatOptionTextWidth)
|
||||
{
|
||||
var textRect = new Rect(foundIconRectArea.X + foundIconRectArea.Width, foundIconRectArea.Y, chatOptionTextWidth, foundIconRectArea.Height);
|
||||
using var mat = new Mat(captureMat, textRect);
|
||||
// 只提取橙色
|
||||
using var bMat = OpenCvCommonHelper.Threshold(mat, new Scalar(247, 198, 50), new Scalar(255, 204, 54));
|
||||
// Cv2.ImWrite("log/每日委托.png", bMat);
|
||||
var whiteCount = OpenCvCommonHelper.CountGrayMatColor(bMat, 255);
|
||||
var rate = whiteCount * 1.0 / (bMat.Width * bMat.Height);
|
||||
if (rate < 0.06)
|
||||
{
|
||||
Debug.WriteLine($"识别到橙色文字区域占比:{rate}");
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var text = OcrFactory.Paddle.Ocr(bMat);
|
||||
return text;
|
||||
}
|
||||
|
||||
private bool IsOrangeOption(Mat textMat)
|
||||
{
|
||||
// 只提取橙色
|
||||
// Cv2.ImWrite($"log/text{DateTime.Now:yyyyMMddHHmmssffff}.png", textMat);
|
||||
using var bMat = OpenCvCommonHelper.Threshold(textMat, new Scalar(247, 198, 50), new Scalar(255, 204, 54));
|
||||
using var bMat = OpenCvCommonHelper.Threshold(textMat, new Scalar(243, 195, 48), new Scalar(255, 205, 55));
|
||||
var whiteCount = OpenCvCommonHelper.CountGrayMatColor(bMat, 255);
|
||||
var rate = whiteCount * 1.0 / (bMat.Width * bMat.Height);
|
||||
Debug.WriteLine($"识别到橙色文字区域占比:{rate}");
|
||||
@@ -613,6 +594,11 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
/// <param name="content"></param>
|
||||
private void ClosePopupPage(CaptureContent content)
|
||||
{
|
||||
if (!_config.ClosePopupPagedEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
content.CaptureRectArea.Find(_autoSkipAssets.PageCloseRo, pageCloseRoRa =>
|
||||
{
|
||||
TaskContext.Instance().PostMessageSimulator.KeyPress(User32.VK.VK_ESCAPE);
|
||||
@@ -648,7 +634,7 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
_logger.LogInformation("提交物品:{Text}", "1. 选择物品" + i);
|
||||
TaskControl.Sleep(800);
|
||||
|
||||
var btnBlackConfirmRa = TaskControl.CaptureToRectArea().Find(ElementAssets.Instance.BtnBlackConfirm);
|
||||
var btnBlackConfirmRa = TaskControl.CaptureToRectArea(forceNew: true).Find(ElementAssets.Instance.BtnBlackConfirm);
|
||||
if (!btnBlackConfirmRa.IsEmpty())
|
||||
{
|
||||
btnBlackConfirmRa.Click();
|
||||
@@ -659,7 +645,7 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
|
||||
TaskControl.Sleep(500);
|
||||
|
||||
using var ra = TaskControl.CaptureToRectArea();
|
||||
using var ra = TaskControl.CaptureToRectArea(forceNew: true);
|
||||
using var btnWhiteConfirmRa = ra.Find(ElementAssets.Instance.BtnWhiteConfirm);
|
||||
if (!btnWhiteConfirmRa.IsEmpty())
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -34,6 +34,7 @@ namespace BetterGenshinImpact.GameTask.AutoTrackPath;
|
||||
/// 2. 所有涉及矩形运算的,优先转换为全地图坐标系
|
||||
/// 3. 所有涉及小地图视角角度运算的,优先转换为warpPolar所使用的度数标准
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
public class AutoTrackPathTask
|
||||
{
|
||||
private readonly AutoTrackPathParam _taskParam;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using BetterGenshinImpact.Core.Simulator;
|
||||
using BetterGenshinImpact.Model;
|
||||
using System;
|
||||
using Vanara.PInvoke;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoTrackPath;
|
||||
|
||||
[Obsolete]
|
||||
public class MovementControl : Singleton<MovementControl>
|
||||
{
|
||||
private bool _wDown = false;
|
||||
|
||||
@@ -20,6 +20,7 @@ using static BetterGenshinImpact.GameTask.Common.TaskControl;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.AutoTrackPath;
|
||||
|
||||
[Obsolete]
|
||||
public class PathPointRecorder : Singleton<PathPointRecorder>
|
||||
{
|
||||
private readonly EntireMap _bigMap = EntireMap.Instance;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using BetterGenshinImpact.Core.Recognition;
|
||||
using BetterGenshinImpact.Core.Recognition.OpenCv;
|
||||
using BetterGenshinImpact.Core.Simulator;
|
||||
using BetterGenshinImpact.GameTask.AutoGeniusInvokation.Exception;
|
||||
using BetterGenshinImpact.GameTask.Common;
|
||||
using BetterGenshinImpact.GameTask.Common.BgiVision;
|
||||
using BetterGenshinImpact.GameTask.Common.Element.Assets;
|
||||
using BetterGenshinImpact.GameTask.Common.Map;
|
||||
@@ -31,11 +33,11 @@ public class TpTask(CancellationTokenSource cts)
|
||||
/// </summary>
|
||||
/// <param name="tpX"></param>
|
||||
/// <param name="tpY"></param>
|
||||
public async Task Tp(double tpX, double tpY)
|
||||
public async Task<(double, double)> Tp(double tpX, double tpY)
|
||||
{
|
||||
// 获取最近的传送点位置
|
||||
var (x, y) = GetRecentlyTpPoint(tpX, tpY);
|
||||
Logger.LogInformation("({TpX},{TpY}) 最近的传送点位置 ({X},{Y})", tpX, tpY, x, y);
|
||||
Logger.LogInformation("({TpX},{TpY}) 最近的传送点位置 ({X},{Y})", $"{tpX:F1}", $"{tpY:F1}", $"{x:F1}", $"{y:F1}");
|
||||
|
||||
// M 打开地图识别当前位置,中心点为当前位置
|
||||
using var ra1 = CaptureToRectArea();
|
||||
@@ -86,6 +88,7 @@ public class TpTask(CancellationTokenSource cts)
|
||||
}
|
||||
|
||||
Logger.LogInformation("传送完成");
|
||||
return (x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -100,13 +103,13 @@ public class TpTask(CancellationTokenSource cts)
|
||||
// 移动部分内容测试移动偏移
|
||||
var (xOffset, yOffset) = (x - bigMapCenterPoint.X, y - bigMapCenterPoint.Y);
|
||||
|
||||
var diffMouseX = 100; // 每次移动的距离
|
||||
var diffMouseX = 200; // 每次移动的距离
|
||||
if (xOffset < 0)
|
||||
{
|
||||
diffMouseX = -diffMouseX;
|
||||
}
|
||||
|
||||
var diffMouseY = 100; // 每次移动的距离
|
||||
var diffMouseY = 200; // 每次移动的距离
|
||||
if (yOffset < 0)
|
||||
{
|
||||
diffMouseY = -diffMouseY;
|
||||
@@ -118,7 +121,7 @@ public class TpTask(CancellationTokenSource cts)
|
||||
var newBigMapCenterPoint = GetPositionFromBigMap();
|
||||
var diffMapX = Math.Abs(newBigMapCenterPoint.X - bigMapCenterPoint.X);
|
||||
var diffMapY = Math.Abs(newBigMapCenterPoint.Y - bigMapCenterPoint.Y);
|
||||
Debug.WriteLine($"每100移动的地图距离:({diffMapX},{diffMapY})");
|
||||
Debug.WriteLine($"每单位移动的地图距离:({diffMapX},{diffMapY})");
|
||||
|
||||
// 快速移动到目标传送点所在的区域
|
||||
if (diffMapX > 10 && diffMapY > 10)
|
||||
@@ -178,25 +181,37 @@ public class TpTask(CancellationTokenSource cts)
|
||||
|
||||
public Rect GetBigMapRect()
|
||||
{
|
||||
// 判断是否在地图界面
|
||||
using var ra = CaptureToRectArea();
|
||||
using var mapScaleButtonRa = ra.Find(QuickTeleportAssets.Instance.MapScaleButtonRo);
|
||||
if (mapScaleButtonRa.IsExist())
|
||||
var rect = new Rect();
|
||||
NewRetry.Do(() =>
|
||||
{
|
||||
var rect = BigMap.Instance.GetBigMapRectByFeatureMatch(ra.SrcGreyMat);
|
||||
if (rect == Rect.Empty)
|
||||
// 判断是否在地图界面
|
||||
using var ra = CaptureToRectArea();
|
||||
using var mapScaleButtonRa = ra.Find(QuickTeleportAssets.Instance.MapScaleButtonRo);
|
||||
if (mapScaleButtonRa.IsExist())
|
||||
{
|
||||
throw new InvalidOperationException("识别大地图位置失败");
|
||||
rect = BigMap.Instance.GetBigMapRectByFeatureMatch(ra.SrcGreyMat);
|
||||
if (rect == Rect.Empty)
|
||||
{
|
||||
// 滚轮调整后再次识别
|
||||
Simulation.SendInput.Mouse.VerticalScroll(2);
|
||||
Sleep(500);
|
||||
throw new RetryException("识别大地图位置失败");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RetryException("当前不在地图界面");
|
||||
}
|
||||
}, TimeSpan.FromMilliseconds(500), 10);
|
||||
|
||||
Debug.WriteLine("识别大地图在全地图位置矩形:" + rect);
|
||||
const int s = BigMap.ScaleTo2048; // 相对1024做4倍缩放
|
||||
return MapCoordinate.Main2048ToGame(new Rect(rect.X * s, rect.Y * s, rect.Width * s, rect.Height * s));
|
||||
}
|
||||
else
|
||||
if (rect == Rect.Empty)
|
||||
{
|
||||
throw new InvalidOperationException("当前不在地图界面");
|
||||
throw new InvalidOperationException("多次重试后,识别大地图位置失败");
|
||||
}
|
||||
|
||||
Debug.WriteLine("识别大地图在全地图位置矩形:" + rect);
|
||||
const int s = BigMap.ScaleTo2048; // 相对1024做4倍缩放
|
||||
return MapCoordinate.Main2048ToGame(new Rect(rect.X * s, rect.Y * s, rect.Width * s, rect.Height * s));
|
||||
}
|
||||
|
||||
public Point2f GetBigMapCenterPoint()
|
||||
@@ -330,7 +345,9 @@ public class TpTask(CancellationTokenSource cts)
|
||||
var hasMapChooseIcon = CheckMapChooseIcon(imageRegion);
|
||||
if (hasMapChooseIcon)
|
||||
{
|
||||
await Delay(TaskContext.Instance().Config.QuickTeleportConfig.WaitTeleportPanelDelay, cts);
|
||||
var time = TaskContext.Instance().Config.QuickTeleportConfig.WaitTeleportPanelDelay;
|
||||
time = time < 100 ? 100 : time;
|
||||
await Delay(time, cts);
|
||||
CheckTeleportButton(CaptureToRectArea());
|
||||
}
|
||||
}
|
||||
@@ -381,7 +398,9 @@ public class TpTask(CancellationTokenSource cts)
|
||||
}
|
||||
|
||||
Logger.LogInformation("传送:点击 {Option}", textRegion.Text);
|
||||
Thread.Sleep(TaskContext.Instance().Config.QuickTeleportConfig.TeleportListClickDelay);
|
||||
var time = TaskContext.Instance().Config.QuickTeleportConfig.TeleportListClickDelay;
|
||||
time = time < 200 ? 200 : time;
|
||||
Thread.Sleep(time);
|
||||
ra.Click();
|
||||
hasMapChooseIcon = true;
|
||||
break;
|
||||
|
||||
@@ -122,7 +122,7 @@ public partial class AutoWoodTask
|
||||
{
|
||||
Logger.LogError(e.Message);
|
||||
Logger.LogDebug(e.StackTrace);
|
||||
System.Windows.MessageBox.Show("自动伐木时异常:" + e.Source + "\r\n--" + Environment.NewLine + e.StackTrace + "\r\n---" + Environment.NewLine + e.Message);
|
||||
MessageBox.Error("自动伐木时异常:" + e.Source + "\r\n--" + Environment.NewLine + e.StackTrace + "\r\n---" + Environment.NewLine + e.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -176,6 +176,11 @@ public partial class AutoWoodTask
|
||||
{
|
||||
NothingCount++;
|
||||
Logger.LogWarning("未能识别到伐木的统计数据");
|
||||
if (_woodMetricsDict.Count == 0)
|
||||
{
|
||||
TaskContext.Instance().Config.AutoWoodConfig.WoodCountOcrEnabled = false;
|
||||
throw new NormalEndException("首次伐木就未识别到木材数据,已经自动关闭【OCR识别并累计木材数】的功能,请重新启动【自动伐木】功能!");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,8 @@ public class ElementAssets : BaseAssets<ElementAssets>
|
||||
Name = "SpaceKey",
|
||||
RecognitionType = RecognitionTypes.TemplateMatch,
|
||||
TemplateImageMat = GameTaskManager.LoadAssetImage(@"Common\Element", "key_space.png"),
|
||||
RegionOfInterest = new Rect(CaptureRect.Width - (int)(130 * AssetScale), CaptureRect.Height - (int)(70 * AssetScale), (int)(130 * AssetScale), (int)(70 * AssetScale)),
|
||||
RegionOfInterest = new Rect(CaptureRect.Width - (int)(350 * AssetScale), CaptureRect.Height - (int)(70 * AssetScale), (int)(200 * AssetScale), (int)(70 * AssetScale)),
|
||||
|
||||
DrawOnWindow = false
|
||||
}.InitTemplate();
|
||||
XKey = new RecognitionObject
|
||||
@@ -115,7 +116,7 @@ public class ElementAssets : BaseAssets<ElementAssets>
|
||||
Name = "XKey",
|
||||
RecognitionType = RecognitionTypes.TemplateMatch,
|
||||
TemplateImageMat = GameTaskManager.LoadAssetImage(@"Common\Element", "key_x.png"),
|
||||
RegionOfInterest = new Rect(CaptureRect.Width - (int)(210 * AssetScale), CaptureRect.Height - (int)(70 * AssetScale), (int)(60 * AssetScale), (int)(70 * AssetScale)),
|
||||
RegionOfInterest = new Rect(CaptureRect.Width - (int)(350 * AssetScale), CaptureRect.Height - (int)(70 * AssetScale), (int)(200 * AssetScale), (int)(70 * AssetScale)),
|
||||
DrawOnWindow = false
|
||||
}.InitTemplate();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace BetterGenshinImpact.GameTask.Common.Element.Assets;
|
||||
|
||||
public class MapAssets : BaseAssets<MapAssets>
|
||||
{
|
||||
public Lazy<Mat> MainMap2048BlockMat { get; } = new(() => new Mat(@"E:\HuiTask\更好的原神\地图匹配\有用的素材\mainMap2048Block.png", ImreadModes.Grayscale));
|
||||
public Lazy<Mat> MainMap2048BlockMat { get; } = new(() => new Mat(@"E:\HuiTask\更好的原神\地图匹配\有用的素材\5.0\mainMap2048Block.png", ImreadModes.Grayscale));
|
||||
|
||||
public Lazy<Mat> MainMap256BlockMat { get; } = new(() => new Mat(Global.Absolute(@"Assets\Map\mainMap256Block.png"), ImreadModes.Grayscale));
|
||||
|
||||
@@ -30,6 +30,7 @@ public class MapAssets : BaseAssets<MapAssets>
|
||||
{ "稻妻", [-4400, -3050] },
|
||||
{ "须弥", [2877, -374] },
|
||||
{ "枫丹", [4515, 3631] },
|
||||
{ "纳塔", [8973.5, -1879.1] },
|
||||
};
|
||||
|
||||
public MapAssets()
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace BetterGenshinImpact.GameTask.Common.Map;
|
||||
public class BigMap : Singleton<BigMap>
|
||||
{
|
||||
// 直接从图像加载特征点
|
||||
private readonly FeatureMatcher _featureMatcher = new(MapAssets.Instance.MainMap256BlockMat.Value, new FeatureStorage("mainMap256Block"));
|
||||
private readonly FeatureMatcher _featureMatcher = new(new Size(4096, 3328), new FeatureStorage("mainMap256Block"));
|
||||
|
||||
// 相对标准1024区块的缩放比例
|
||||
public const int ScaleTo1024 = 4;
|
||||
@@ -48,7 +48,7 @@ public class BigMap : Singleton<BigMap>
|
||||
{
|
||||
greyMat = ResizeHelper.Resize(greyMat, 1d / 4);
|
||||
|
||||
return _featureMatcher.MatchRect(greyMat);
|
||||
return _featureMatcher.KnnMatchRect(greyMat);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -16,21 +16,6 @@ public class EntireMap : Singleton<EntireMap>
|
||||
// 对无用部分进行裁剪(左160,上80,下96)
|
||||
public static readonly Rect TemplateSizeRoi = new(20, 10, TemplateSize.Width - 20, TemplateSize.Height - 22);
|
||||
|
||||
/// <summary>
|
||||
/// 主要地图缩小1024的模板
|
||||
/// </summary>
|
||||
// private readonly Mat _mainMap100BlockMat;
|
||||
|
||||
// /// <summary>
|
||||
// /// 1024区块拼接的主要地图
|
||||
// /// </summary>
|
||||
// private readonly Mat _mainMap1024BlockMat;
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 2048城市区块拼接的主要地图
|
||||
// /// </summary>
|
||||
// private readonly Mat _cityMap2048BlockMat;
|
||||
|
||||
private readonly FeatureMatcher _featureMatcher;
|
||||
|
||||
private float _prevX = -1;
|
||||
@@ -38,41 +23,21 @@ public class EntireMap : Singleton<EntireMap>
|
||||
|
||||
public EntireMap()
|
||||
{
|
||||
// 大地图模板匹配使用的模板
|
||||
// _mainMap100BlockMat = MapAssets.Instance.MainMap100BlockMat.Value;
|
||||
// _mainMap1024BlockMat = MapAssets.Instance.MainMap1024BlockMat.Value;
|
||||
// _cityMap2048BlockMat = new Mat(@"E:\HuiTask\更好的原神\地图匹配\有用的素材\cityMap2048Block.png", ImreadModes.Grayscale);
|
||||
// Mat grey = new();
|
||||
// Cv2.CvtColor(_mainMap100BlockMat, grey, ColorConversionCodes.BGR2GRAY);
|
||||
// _featureMatcher = new FeatureMatcher(MapAssets.Instance.MainMap1024BlockMat.Value, new FeatureStorage("mainMap1024Block"));
|
||||
// 只从特征点加载
|
||||
_featureMatcher = new FeatureMatcher(new Size(28672, 26624), new FeatureStorage("mainMap2048Block"));
|
||||
}
|
||||
|
||||
// /// <summary>
|
||||
// /// 基于模板匹配获取地图位置(100区块,缩小了10.24倍)
|
||||
// /// 当前只支持大地图
|
||||
// /// </summary>
|
||||
// /// <param name="captureMat">彩色图像</param>
|
||||
// /// <returns></returns>
|
||||
// public Point GetMapPositionByMatchTemplate(Mat captureMat)
|
||||
// {
|
||||
// Cv2.CvtColor(captureMat, captureMat, ColorConversionCodes.BGRA2BGR);
|
||||
// using var tar = new Mat(captureMat.Resize(TemplateSize, 0, 0, InterpolationFlags.Cubic), TemplateSizeRoi);
|
||||
// var p = MatchTemplateHelper.MatchTemplate(_mainMap100BlockMat, tar, TemplateMatchModes.CCoeffNormed, null, 0.2);
|
||||
// Debug.WriteLine($"BigMap Match Template: {p}");
|
||||
// return p;
|
||||
// }
|
||||
//
|
||||
// public void GetMapPositionAndDrawByMatchTemplate(Mat captureMat)
|
||||
// {
|
||||
// var p = GetMapPositionByMatchTemplate(captureMat);
|
||||
// WeakReferenceMessenger.Default.Send(new PropertyChangedMessage<object>(this, "UpdateBigMapRect", new object(),
|
||||
// new System.Windows.Rect(p.X, p.Y, TemplateSizeRoi.Width, TemplateSizeRoi.Height)));
|
||||
// }
|
||||
public FeatureMatcher GetFeatureMatcher()
|
||||
{
|
||||
return _featureMatcher;
|
||||
}
|
||||
|
||||
private int _failCnt = 0;
|
||||
|
||||
public void SetPrevPosition(float x, float y)
|
||||
{
|
||||
(_prevX, _prevY) = (x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 基于特征匹配获取地图位置
|
||||
/// 移动匹配
|
||||
@@ -87,11 +52,11 @@ public class EntireMap : Singleton<EntireMap>
|
||||
Point2f p;
|
||||
if (_prevX <= 0 && _prevY <= 0)
|
||||
{
|
||||
p = _featureMatcher.Match(greyMat, _prevX, _prevY, mask);
|
||||
p = _featureMatcher.KnnMatch(greyMat, mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
p = _featureMatcher.Match(greyMat, mask);
|
||||
p = _featureMatcher.KnnMatch(greyMat, _prevX, _prevY, mask, DescriptorMatcherType.BruteForce);
|
||||
}
|
||||
|
||||
if (p.IsEmpty())
|
||||
@@ -139,35 +104,4 @@ public class EntireMap : Singleton<EntireMap>
|
||||
return new Point2f();
|
||||
}
|
||||
}
|
||||
|
||||
// public static Point GetIntersection(Point2f[] points)
|
||||
// {
|
||||
// double a1 = (points[0].Y - points[2].Y) / (double)(points[0].X - points[2].X);
|
||||
// double b1 = points[0].Y - a1 * points[0].X;
|
||||
//
|
||||
// double a2 = (points[1].Y - points[3].Y) / (double)(points[1].X - points[3].X);
|
||||
// double b2 = points[1].Y - a2 * points[1].X;
|
||||
//
|
||||
// if (Math.Abs(a1 - a2) < double.Epsilon)
|
||||
// {
|
||||
// // 不相交
|
||||
// throw new InvalidOperationException();
|
||||
// }
|
||||
//
|
||||
// double x = (b2 - b1) / (a1 - a2);
|
||||
// double y = a1 * x + b1;
|
||||
// return new Point((int)x, (int)y);
|
||||
// }
|
||||
|
||||
// public void GetMapPositionAndDrawByFeatureMatch(Mat captureGreyMat)
|
||||
// {
|
||||
// var rect = GetMiniMapPositionByFeatureMatch(captureGreyMat);
|
||||
// if (rect != Rect.Empty)
|
||||
// {
|
||||
// WeakReferenceMessenger.Default.Send(new PropertyChangedMessage<object>(this, "UpdateBigMapRect", new object(),
|
||||
// new System.Windows.Rect(rect.X / 20.48, rect.Y / 20.48, rect.Width / 20.48, rect.Height / 20.48)));
|
||||
// // WeakReferenceMessenger.Default.Send(new PropertyChangedMessage<object>(this, "UpdateBigMapRect", new object(),
|
||||
// // new System.Windows.Rect(rect.X / 10.24, rect.Y / 10.24, rect.Width / 10.24, rect.Height / 10.24)));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -11,10 +11,15 @@ namespace BetterGenshinImpact.GameTask.Common.Map;
|
||||
/// </summary>
|
||||
public class MapCoordinate
|
||||
{
|
||||
#region 每次地图扩大都要更新的参数
|
||||
|
||||
public static readonly int GameMapRows = 13; // 游戏坐标下地图块的行数
|
||||
public static readonly int GameMapCols = 14; // 游戏坐标下地图块的列数
|
||||
public static readonly int GameMapCols = 16; // 游戏坐标下地图块的列数
|
||||
public static readonly int GameMapUpRows = 5; // 游戏坐标下 左上角离地图原点的行数
|
||||
public static readonly int GameMapLeftCols = 7; // 游戏坐标下 左上角离地图原点的列数
|
||||
public static readonly int GameMapLeftCols = 9; // 游戏坐标下 左上角离地图原点的列数
|
||||
|
||||
#endregion 每次地图扩大都要更新的参数
|
||||
|
||||
public static readonly int GameMapBlockWidth = 1024; // 游戏地图块的长宽
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -120,7 +120,7 @@ public class TaskControl
|
||||
{
|
||||
Logger.LogWarning("截图失败!");
|
||||
// 重试5次
|
||||
for (var i = 0; i < 15; i++)
|
||||
for (var i = 0; i < 5; i++)
|
||||
{
|
||||
bitmap = gameCapture?.Capture();
|
||||
if (bitmap != null)
|
||||
@@ -179,8 +179,8 @@ public class TaskControl
|
||||
/// 自动判断当前运行上下文中截图方式,并选择合适的截图方式返回
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ImageRegion CaptureToRectArea()
|
||||
public static ImageRegion CaptureToRectArea(bool forceNew = false)
|
||||
{
|
||||
return TaskTriggerDispatcher.Instance().CaptureToRectArea();
|
||||
return TaskTriggerDispatcher.Instance().CaptureToRectArea(forceNew);
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ internal class GameTaskManager
|
||||
public static void AddTrigger(string name, object? externalConfig)
|
||||
{
|
||||
TriggerDictionary ??= new ConcurrentDictionary<string, ITaskTrigger>();
|
||||
TriggerDictionary.Clear();
|
||||
TriggerDictionary.Clear(); //TODO 有问题,不应该清理
|
||||
|
||||
if (name == "AutoPick")
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using BetterGenshinImpact.GameTask.Model.Area;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.Macro;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class QuickEnhanceArtifactMacro
|
||||
{
|
||||
if (!TaskContext.Instance().IsInitialized)
|
||||
{
|
||||
MessageBox.Show("请先启动");
|
||||
Toast.Warning("请先启动");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,4 +9,5 @@ public enum IndependentTaskEnum
|
||||
AutoTrack,
|
||||
AutoTrackPath,
|
||||
AutoMusicGame,
|
||||
AutoPathing,
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using BetterGenshinImpact.GameTask.Common;
|
||||
using BetterGenshinImpact.GameTask.Model.Area;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.QucikBuy;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class QuickBuyTask
|
||||
{
|
||||
if (!TaskContext.Instance().IsInitialized)
|
||||
{
|
||||
MessageBox.Show("请先启动");
|
||||
Toast.Warning("请先启动");
|
||||
return;
|
||||
}
|
||||
if (!SystemControl.IsGenshinImpactActiveByProcess())
|
||||
|
||||
@@ -6,6 +6,7 @@ using BetterGenshinImpact.GameTask.QuickSereniteaPot.Assets;
|
||||
using BetterGenshinImpact.View.Drawable;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
using static Vanara.PInvoke.User32;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask.QuickSereniteaPot;
|
||||
@@ -17,12 +18,12 @@ public class QuickSereniteaPotTask
|
||||
NewRetry.Do(() =>
|
||||
{
|
||||
TaskControl.Sleep(1);
|
||||
using var ra2 = TaskControl.CaptureToRectArea().Find(QuickSereniteaPotAssets.Instance.BagCloseButtonRo);
|
||||
using var ra2 = TaskControl.CaptureToRectArea(forceNew: true).Find(QuickSereniteaPotAssets.Instance.BagCloseButtonRo);
|
||||
if (ra2.IsEmpty())
|
||||
{
|
||||
throw new RetryException("背包未打开");
|
||||
}
|
||||
}, TimeSpan.FromMilliseconds(500), 3);
|
||||
}, TimeSpan.FromMilliseconds(500), 5);
|
||||
}
|
||||
|
||||
private static void FindPotIcon()
|
||||
@@ -30,7 +31,7 @@ public class QuickSereniteaPotTask
|
||||
NewRetry.Do(() =>
|
||||
{
|
||||
TaskControl.Sleep(1);
|
||||
using var ra2 = TaskControl.CaptureToRectArea().Find(QuickSereniteaPotAssets.Instance.SereniteaPotIconRo);
|
||||
using var ra2 = TaskControl.CaptureToRectArea(forceNew: true).Find(QuickSereniteaPotAssets.Instance.SereniteaPotIconRo);
|
||||
if (ra2.IsEmpty())
|
||||
{
|
||||
throw new RetryException("未检测到壶");
|
||||
@@ -46,7 +47,7 @@ public class QuickSereniteaPotTask
|
||||
{
|
||||
if (!TaskContext.Instance().IsInitialized)
|
||||
{
|
||||
System.Windows.MessageBox.Show("请先启动");
|
||||
Toast.Warning("请先启动");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ internal class QuickTeleportTrigger : ITaskTrigger
|
||||
if (hasMapChooseIcon)
|
||||
{
|
||||
TaskControl.Sleep(_config.WaitTeleportPanelDelay);
|
||||
CheckTeleportButton(TaskControl.CaptureToRectArea());
|
||||
CheckTeleportButton(TaskControl.CaptureToRectArea(forceNew: true));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -7,6 +7,8 @@ using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BetterGenshinImpact.Helpers;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
using static BetterGenshinImpact.GameTask.Common.TaskControl;
|
||||
|
||||
namespace BetterGenshinImpact.GameTask;
|
||||
@@ -92,8 +94,19 @@ public class TaskRunner
|
||||
Task.Run(() => RunAsync(action));
|
||||
}
|
||||
|
||||
public async Task RunThreadAsync(Func<Task> action)
|
||||
{
|
||||
await Task.Run(() => RunAsync(action));
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
if (!TaskContext.Instance().IsInitialized)
|
||||
{
|
||||
UIDispatcherHelper.Invoke(() => { Toast.Warning("请先在启动页,启动截图器再使用本功能"); });
|
||||
throw new NormalEndException("请先在启动页,启动截图器再使用本功能");
|
||||
}
|
||||
|
||||
// 激活原神窗口
|
||||
var maskWindow = MaskWindow.Instance();
|
||||
SystemControl.ActivateWindow();
|
||||
@@ -123,6 +136,11 @@ public class TaskRunner
|
||||
|
||||
public void End()
|
||||
{
|
||||
if (!TaskContext.Instance().IsInitialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VisionContext.Instance().DrawContent.ClearAll();
|
||||
if (_timerOperation == DispatcherTimerOperationEnum.UseSelfCaptureImage)
|
||||
{
|
||||
|
||||
@@ -186,6 +186,11 @@ namespace BetterGenshinImpact.GameTask
|
||||
}
|
||||
}
|
||||
|
||||
public System.Timers.Timer GetTimer()
|
||||
{
|
||||
return _timer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启动独立任务
|
||||
/// </summary>
|
||||
@@ -504,10 +509,10 @@ namespace BetterGenshinImpact.GameTask
|
||||
return new CaptureContent(bitmap, _frameIndex, _timer.Interval);
|
||||
}
|
||||
|
||||
public ImageRegion CaptureToRectArea()
|
||||
public ImageRegion CaptureToRectArea(bool forceNew = false)
|
||||
{
|
||||
// 触发器启动的情况下优先使用触发器的截图
|
||||
if (_timer.Enabled && _dispatcherCacheCaptureMode is DispatcherCaptureModeEnum.OnlyCacheCapture or DispatcherCaptureModeEnum.CacheCaptureWithTrigger)
|
||||
if (!forceNew && _timer.Enabled && _dispatcherCacheCaptureMode is DispatcherCaptureModeEnum.OnlyCacheCapture or DispatcherCaptureModeEnum.CacheCaptureWithTrigger)
|
||||
{
|
||||
return GetLastCaptureContent().CaptureRectArea;
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
global using MessageBox = Wpf.Ui.Violeta.Controls.MessageBox;
|
||||
@@ -8,6 +8,9 @@ namespace BetterGenshinImpact.Helpers;
|
||||
|
||||
public class DpiHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 只能主线程调用
|
||||
/// </summary>
|
||||
public static float ScaleY => GetScaleY();
|
||||
|
||||
private static float GetScaleY()
|
||||
|
||||
@@ -9,7 +9,6 @@ using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace BetterGenshinImpact.Helpers;
|
||||
|
||||
@@ -85,8 +84,7 @@ internal static class RuntimeHelper
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex);
|
||||
MessageBox.Show("以管理员权限启动 BetterGI 失败,非管理员权限下所有模拟操作功能均不可用!\r\n请尝试 右键 —— 以管理员身份运行 的方式启动 BetterGI",
|
||||
"警告", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
MessageBox.Error("以管理员权限启动 BetterGI 失败,非管理员权限下所有模拟操作功能均不可用!\r\n请尝试 右键 —— 以管理员身份运行 的方式启动 BetterGI");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -135,15 +133,14 @@ internal static class RuntimeHelper
|
||||
|
||||
public static void CheckIntegration()
|
||||
{
|
||||
if (!Directory.Exists(Global.Absolute("Assets")) || !Directory.Exists(Global.Absolute("GameTask")) || !Directory.Exists(Global.Absolute("User")))
|
||||
if (!Directory.Exists(Global.Absolute("Assets")) || !Directory.Exists(Global.Absolute("GameTask")))
|
||||
{
|
||||
StringBuilder stringBuilder = new("发现有关键文件缺失,");
|
||||
stringBuilder.Append(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) == Global.StartUpPath
|
||||
? "请不要把主程序exe文件剪切到桌面"
|
||||
? "请不要把主程序exe文件剪切到桌面。正确的做法:请右键点击主程序,在弹出的菜单中选择“发送到”选项,然后选择“桌面创建快捷方式”。"
|
||||
: "请重新安装软件");
|
||||
|
||||
MessageBox.Show(stringBuilder.ToString(),
|
||||
"警告", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
MessageBox.Warning(stringBuilder.ToString());
|
||||
Environment.Exit(0xFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.Helpers;
|
||||
|
||||
public class WpfUiMessageBoxHelper
|
||||
{
|
||||
public static void Show(string title, string content)
|
||||
{
|
||||
var uiMessageBox = new MessageBox
|
||||
{
|
||||
Title = title,
|
||||
Content = content,
|
||||
CloseButtonText = "确定",
|
||||
};
|
||||
|
||||
uiMessageBox.ShowDialogAsync();
|
||||
}
|
||||
|
||||
public static void Show(string content)
|
||||
{
|
||||
Show("提示", content);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace BetterGenshinImpact.Model;
|
||||
|
||||
[Serializable]
|
||||
public class SettingItem
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string Label { get; set; } = string.Empty;
|
||||
|
||||
public List<string>? Options { get; set; }
|
||||
|
||||
public object? Default { get; set; }
|
||||
|
||||
public List<UIElement> ToControl(dynamic context)
|
||||
{
|
||||
var list = new List<UIElement>();
|
||||
|
||||
var label = new Label
|
||||
{
|
||||
Content = Label,
|
||||
Margin = new Thickness(0, 0, 0, 5)
|
||||
};
|
||||
list.Add(label);
|
||||
|
||||
var binding = new Binding
|
||||
{
|
||||
Source = context,
|
||||
Path = new PropertyPath(Name)
|
||||
};
|
||||
switch (Type)
|
||||
{
|
||||
case "input-text":
|
||||
var textBox = new TextBox
|
||||
{
|
||||
Name = Name,
|
||||
Margin = new Thickness(0, 0, 0, 10)
|
||||
};
|
||||
if (Default != null)
|
||||
{
|
||||
textBox.Text = Default.ToString()!;
|
||||
}
|
||||
BindingOperations.SetBinding(textBox, TextBox.TextProperty, binding);
|
||||
list.Add(textBox);
|
||||
break;
|
||||
|
||||
case "select":
|
||||
var comboBox = new ComboBox
|
||||
{
|
||||
Name = Name,
|
||||
Margin = new Thickness(0, 0, 0, 10)
|
||||
};
|
||||
if (Options != null)
|
||||
{
|
||||
foreach (var option in Options)
|
||||
{
|
||||
comboBox.Items.Add(option);
|
||||
}
|
||||
}
|
||||
if (Default != null)
|
||||
{
|
||||
comboBox.SelectedItem = Default;
|
||||
}
|
||||
BindingOperations.SetBinding(comboBox, ItemsControl.ItemsSourceProperty, binding);
|
||||
list.Add(comboBox);
|
||||
break;
|
||||
|
||||
case "checkBox":
|
||||
var checkBox = new CheckBox
|
||||
{
|
||||
Name = Name,
|
||||
Margin = new Thickness(0, 0, 0, 10)
|
||||
};
|
||||
if (Default != null)
|
||||
{
|
||||
checkBox.IsChecked = (bool)Default;
|
||||
}
|
||||
BindingOperations.SetBinding(checkBox, ToggleButton.IsCheckedProperty, binding);
|
||||
list.Add(checkBox);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Exception($"Unknown setting type: {Type}");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Submodule
+1
Submodule BetterGenshinImpact/Script added at b3201c9aed.
@@ -1 +0,0 @@
|
||||
{"macroEvents":[{"type":3,"mouseX":4,"mouseY":10,"time":739.4686},{"type":3,"mouseX":10,"mouseY":18,"time":766.937},{"type":3,"mouseX":8,"mouseY":13,"time":789.7091},{"type":3,"mouseX":8,"mouseY":9,"time":812.023},{"type":3,"mouseX":6,"mouseY":9,"time":839.5562},{"type":3,"mouseX":13,"mouseY":14,"time":862.4614},{"type":3,"mouseX":23,"mouseY":25,"time":884.2109},{"type":3,"mouseX":22,"mouseY":22,"time":911.1273},{"type":3,"mouseX":19,"mouseY":17,"time":934.1708},{"type":3,"mouseX":18,"mouseY":18,"time":955.5311},{"type":3,"mouseX":25,"mouseY":23,"time":978.6658},{"type":3,"mouseX":46,"mouseY":35,"time":1005.8254},{"type":3,"mouseX":48,"mouseY":38,"time":1028.0621},{"type":3,"mouseX":25,"mouseY":21,"time":1050.7643},{"type":3,"mouseX":24,"mouseY":22,"time":1079.0348},{"type":3,"mouseX":34,"mouseY":29,"time":1100.5795},{"type":3,"mouseX":65,"mouseY":47,"time":1121.9039},{"type":3,"mouseX":74,"mouseY":49,"time":1148.861},{"type":3,"mouseX":37,"mouseY":28,"time":1171.6033},{"type":3,"mouseX":25,"mouseY":21,"time":1198.9152},{"type":3,"mouseX":25,"mouseY":24,"time":1221.3715},{"type":3,"mouseX":33,"mouseY":28,"time":1243.4949},{"type":3,"mouseX":34,"mouseY":28,"time":1266.0559},{"type":3,"mouseX":23,"mouseY":19,"time":1293.4232},{"type":3,"mouseX":24,"mouseY":20,"time":1315.7476},{"type":3,"mouseX":29,"mouseY":24,"time":1338.3242},{"type":3,"mouseX":24,"mouseY":23,"time":1366.0944},{"type":3,"mouseX":24,"mouseY":26,"time":1387.9231},{"type":3,"mouseX":23,"mouseY":29,"time":1414.5572},{"type":3,"mouseX":21,"mouseY":26,"time":1437.0643},{"type":3,"mouseX":19,"mouseY":25,"time":1459.688},{"type":3,"mouseX":25,"mouseY":31,"time":1486.8224},{"type":3,"mouseX":30,"mouseY":38,"time":1509.228},{"type":3,"mouseX":20,"mouseY":31,"time":1531.7953},{"type":3,"mouseX":10,"mouseY":20,"time":1553.9196},{"type":3,"mouseX":8,"mouseY":18,"time":1581.24},{"type":3,"mouseX":11,"mouseY":21,"time":1604.6667},{"type":3,"mouseX":9,"mouseY":18,"time":1628.1487},{"type":3,"mouseX":5,"mouseY":14,"time":1650.6667},{"type":3,"mouseX":12,"mouseY":23,"time":1674.2626},{"type":3,"mouseX":20,"mouseY":35,"time":1697.965},{"type":3,"mouseX":21,"mouseY":37,"time":1726.5104},{"type":3,"mouseX":13,"mouseY":30,"time":1748.835},{"type":3,"mouseX":19,"mouseY":41,"time":1771.518},{"type":3,"mouseX":22,"mouseY":44,"time":1798.5647},{"type":3,"mouseX":12,"mouseY":36,"time":1820.9506},{"type":3,"mouseX":6,"mouseY":32,"time":1844.1937},{"type":3,"mouseX":3,"mouseY":31,"time":1866.3543},{"type":3,"mouseX":8,"mouseY":38,"time":1893.4291},{"type":3,"mouseX":9,"mouseY":40,"time":1916.15},{"type":3,"mouseX":5,"mouseY":32,"time":1938.2039},{"type":3,"mouseX":8,"mouseY":35,"time":1965.2488},{"type":3,"mouseX":9,"mouseY":43,"time":1988.1289},{"type":3,"mouseX":10,"mouseY":46,"time":2010.2776},{"type":3,"mouseX":3,"mouseY":42,"time":2038.5109},{"type":3,"mouseX":-8,"mouseY":42,"time":2060.7538},{"type":3,"mouseX":-10,"mouseY":39,"time":2082.9156},{"type":3,"mouseX":-7,"mouseY":36,"time":2110.0569},{"type":3,"mouseX":-4,"mouseY":34,"time":2132.8586},{"type":3,"mouseX":-6,"mouseY":27,"time":2155.1694},{"type":3,"mouseX":-5,"mouseY":19,"time":2182.4554},{"type":3,"mouseX":-2,"mouseY":13,"time":2205.6243},{"type":3,"mouseX":-2,"mouseY":9,"time":2226.9257},{"type":3,"mouseX":-1,"mouseY":2,"time":2249.7866},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":2256.9082},{"type":3,"mouseX":-2,"mouseY":10,"time":2261.1126},{"type":3,"mouseX":0,"mouseY":9,"time":2283.3542},{"type":3,"mouseX":0,"mouseY":10,"time":2311.9151},{"type":3,"mouseX":0,"mouseY":11,"time":2334.0155},{"type":3,"mouseX":1,"mouseY":13,"time":2355.5505},{"type":3,"mouseX":0,"mouseY":11,"time":2383.3967},{"type":3,"mouseX":1,"mouseY":11,"time":2405.9736},{"type":3,"mouseX":1,"mouseY":9,"time":2427.3969},{"type":3,"mouseX":1,"mouseY":8,"time":2455.7075},{"type":3,"mouseX":3,"mouseY":9,"time":2478.0864},{"type":3,"mouseX":4,"mouseY":11,"time":2500.4892},{"type":3,"mouseX":4,"mouseY":15,"time":2522.6383},{"type":3,"mouseX":4,"mouseY":23,"time":2550.4262},{"type":3,"mouseX":2,"mouseY":43,"time":2572.3139},{"type":3,"mouseX":0,"mouseY":26,"time":2596.1019},{"type":3,"mouseX":-5,"mouseY":34,"time":2617.2982},{"type":3,"mouseX":-3,"mouseY":18,"time":2645.2183},{"type":3,"mouseX":-5,"mouseY":22,"time":2667.2373},{"type":3,"mouseX":-2,"mouseY":6,"time":2690.0786},{"type":4,"mouseX":1280,"mouseY":719,"mouseButton":"Right","time":2698.9323},{"type":3,"mouseX":-5,"mouseY":14,"time":2701.7659},{"type":3,"mouseX":-7,"mouseY":13,"time":2733.6015},{"type":3,"mouseX":-6,"mouseY":13,"time":2755.7339},{"type":3,"mouseX":-6,"mouseY":10,"time":2784.233},{"type":3,"mouseX":-5,"mouseY":11,"time":2807.1534},{"type":3,"mouseX":-2,"mouseY":7,"time":2829.2867},{"type":3,"mouseX":-1,"mouseY":3,"time":2855.7806},{"type":3,"mouseX":0,"mouseY":1,"time":2900.3284},{"type":5,"mouseX":1280,"mouseY":719,"mouseButton":"Right","time":2987.7887},{"type":3,"mouseX":-1,"mouseY":0,"time":2989.2399},{"type":3,"mouseX":-1,"mouseY":0,"time":3011.284Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
{"macroEvents":[{"type":3,"mouseX":-7,"mouseY":1,"time":576.0821},{"type":3,"mouseX":-9,"mouseY":1,"time":603.2379},{"type":3,"mouseX":-13,"mouseY":2,"time":625.2123},{"type":3,"mouseX":-21,"mouseY":4,"time":647.0952},{"type":3,"mouseX":-16,"mouseY":4,"time":669.8491},{"type":3,"mouseX":-10,"mouseY":2,"time":697.1075},{"type":3,"mouseX":-11,"mouseY":2,"time":725.0925},{"type":3,"mouseX":-20,"mouseY":3,"time":747.324},{"type":3,"mouseX":-15,"mouseY":3,"time":770.6291},{"type":3,"mouseX":-9,"mouseY":1,"time":798.0281},{"type":3,"mouseX":-1,"mouseY":0,"time":832.5139},{"type":0,"keyCode":83,"mouseX":0,"mouseY":0,"time":1205.3665},{"type":3,"mouseX":-1,"mouseY":0,"time":1266.6846},{"type":3,"mouseX":-4,"mouseY":0,"time":1305.4125},{"type":3,"mouseX":-2,"mouseY":0,"time":1326.8556},{"type":4,"mouseX":1280,"mouseY":719,"mouseButton":"Right","time":1337.8531},{"type":3,"mouseX":-1,"mouseY":0,"time":1338.0364},{"type":3,"mouseX":-2,"mouseY":0,"time":1479.7232},{"type":3,"mouseX":-4,"mouseY":1,"time":1501.6012},{"type":3,"mouseX":-6,"mouseY":2,"time":1569.6545},{"type":3,"mouseX":-1,"mouseY":0,"time":1609.0565},{"type":3,"mouseX":-3,"mouseY":-1,"time":1648.3312},{"type":5,"mouseX":1280,"mouseY":718,"mouseButton":"Right","time":1659.0017},{"type":3,"mouseX":-2,"mouseY":-1,"time":1665.3868},{"type":3,"mouseX":-6,"mouseY":-3,"time":1693.0753},{"type":3,"mouseX":-3,"mouseY":-2,"time":1716.7381},{"type":3,"mouseX":-1,"mouseY":-1,"time":1788.6268},{"type":1,"keyCode":83,"mouseX":0,"mouseY":0,"time":2286.2359},{"type":4,"mouseX":1280,"mouseY":718,"mouseButton":"Right","time":2479.4654},{"type":0,"keyCode":83,"mouseX":0,"mouseY":0,"time":2507.603},{"type":5,"mouseX":1280,"mouseY":718,"mouseButton":"Right","time":2599.3498},{"type":3,"mouseX":0,"mouseY":1,"time":2614.2672},{"type":3,"mouseX":1,"mouseY":0,"time":2653.0149},{"type":1,"keyCode":83,"mouseX":0,"mouseY":0,"time":2858.2602}],"info":{"name":"","description":"","x":319,"y":192,"width":1920,"height":1080}}
|
||||
@@ -1 +0,0 @@
|
||||
{"macroEvents":[{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":552.7436},{"type":3,"mouseX":19,"mouseY":-5,"time":783.4703},{"type":3,"mouseX":66,"mouseY":-12,"time":807.0298},{"type":3,"mouseX":91,"mouseY":-11,"time":835.1817},{"type":3,"mouseX":97,"mouseY":-8,"time":858.5447},{"type":3,"mouseX":75,"mouseY":3,"time":882.0175},{"type":3,"mouseX":59,"mouseY":3,"time":904.7017},{"type":3,"mouseX":52,"mouseY":2,"time":927.1815},{"type":3,"mouseX":45,"mouseY":3,"time":950.8038},{"type":3,"mouseX":41,"mouseY":1,"time":976.9828},{"type":3,"mouseX":42,"mouseY":0,"time":1000.5446},{"type":3,"mouseX":39,"mouseY":0,"time":1023.0191},{"type":3,"mouseX":40,"mouseY":-1,"time":1051.3861},{"type":3,"mouseX":39,"mouseY":-1,"time":1073.794},{"type":3,"mouseX":34,"mouseY":-1,"time":1095.517},{"type":3,"mouseX":37,"mouseY":0,"time":1118.6795},{"type":3,"mouseX":41,"mouseY":-1,"time":1146.0881},{"type":3,"mouseX":26,"mouseY":-1,"time":1169.1218},{"type":3,"mouseX":5,"mouseY":0,"time":1192.0739},{"type":3,"mouseX":12,"mouseY":0,"time":1214.3896},{"type":3,"mouseX":6,"mouseY":0,"time":1241.9143},{"type":3,"mouseX":21,"mouseY":0,"time":1269.7331},{"type":3,"mouseX":24,"mouseY":0,"time":1291.5201},{"type":3,"mouseX":18,"mouseY":-1,"time":1313.8415},{"type":3,"mouseX":22,"mouseY":-1,"time":1342.1253},{"type":3,"mouseX":20,"mouseY":-1,"time":1364.4372},{"type":3,"mouseX":22,"mouseY":-1,"time":1386.0627},{"type":3,"mouseX":33,"mouseY":0,"time":1408.9445},{"type":4,"mouseX":1280,"mouseY":719,"mouseButton":"Right","time":1426.6516},{"type":3,"mouseX":21,"mouseY":2,"time":1430.6116},{"type":3,"mouseX":27,"mouseY":3,"time":1453.0298},{"type":3,"mouseX":50,"mouseY":4,"time":1476.5704},{"type":3,"mouseX":53,"mouseY":5,"time":1503.858},{"type":3,"mouseX":35,"mouseY":4,"time":1526.1417},{"type":3,"mouseX":35,"mouseY":6,"time":1548.932},{"type":3,"mouseX":60,"mouseY":11,"time":1571.077},{"type":3,"mouseX":80,"mouseY":7,"time":1599.1437},{"type":3,"mouseX":70,"mouseY":2,"time":1621.9229},{"type":3,"mouseX":61,"mouseY":1,"time":1645.3972},{"type":3,"mouseX":45,"mouseY":0,"time":1672.8999},{"type":3,"mouseX":5,"mouseY":0,"time":1695.7303},{"type":3,"mouseX":5,"mouseY":3,"time":1751.3623},{"type":3,"mouseX":17,"mouseY":10,"time":1775.5362},{"type":3,"mouseX":21,"mouseY":10,"time":1798.1524},{"type":3,"mouseX":17,"mouseY":7,"time":1820.7608},{"type":3,"mouseX":9,"mouseY":2,"time":1842.6734},{"type":3,"mouseX":14,"mouseY":4,"time":1865.2854},{"type":3,"mouseX":23,"mouseY":5,"time":1887.7708},{"type":3,"mouseX":29,"mouseY":3,"time":1911.6948},{"type":3,"mouseX":37,"mouseY":2,"time":1934.7689},{"type":3,"mouseX":43,"mouseY":2,"time":1957.6262},{"type":3,"mouseX":35,"mouseY":6,"time":1980.2272},{"type":3,"mouseX":80,"mouseY":13,"time":2007.0076},{"type":3,"mouseX":52,"mouseY":3,"time":2029.5156},{"type":3,"mouseX":25,"mouseY":1,"time":2057.5053},{"type":3,"mouseX":24,"mouseY":0,"time":2080.6728},{"type":3,"mouseX":5,"mouseY":0,"time":2102.7182},{"type":3,"mouseX":2,"mouseY":0,"time":2170.2913},{"type":3,"mouseX":6,"mouseY":2,"time":2193.0316},{"type":3,"mouseX":2,"mouseY":1,"time":2215.2854},{"type":3,"mouseX":1,"mouseY":0,"time":2299.9003},{"type":3,"mouseX":0,"mouseY":1,"time":2368.5421},{"type":3,"mouseX":1,"mouseY":0,"time":2421.6469},{"type":3,"mouseX":1,"mouseY":0,"time":2467.0997},{"type":3,"mouseX":1,"mouseY":1,"time":2533.1054},{"type":3,"mouseX":4,"mouseY":4,"time":2567.0577},{"type":3,"mouseX":17,"mouseY":10,"time":2590.1685},{"type":3,"mouseX":34,"mouseY":12,"time":2613.2441},{"type":3,"mouseX":53,"mouseY":10,"time":2642.0761},{"type":3,"mouseX":69,"mouseY":3,"time":2664.4168},{"type":3,"mouseX":80,"mouseY":0,"time":2686.5828},{"type":3,"mouseX":98,"mouseY":1,"time":2708.9358},{"type":3,"mouseX":102,"mouseY":-3,"time":2737.295},{"type":3,"mouseX":96,"mouseY":-5,"time":2760.9215},{"type":3,"mouseX":96,"mouseY":0,"time":2783.7234},{"type":3,"mouseX":79,"mouseY":0,"time":2805.9473},{"type":3,"mouseX":69,"mouseY":1,"time":2828.7607},{"type":3,"mouseX":66,"mouseY":0,"time":2857.6945},{"type":3,"mouseX":86,"mouseY":3,"time":2880.0153},{"type":3,"mouseX":91,"mouseY":4,"time":2901.8898},{"type":3,"mouseX":67,"mouseY":0,"time":2929.7758},{"type":3,"mouseX":17,"mouseY":-2,"time":2950.9055},{"type":3,"mouseX":2,"mouseY":0,"time":3023.6342},{"type":3,"mouseX":50,"mouseY":8,"time":3046.9476},{"type":3,"mouseX":133,"mouseY":9,"time":3069.8072},{"type":3,"mouseX":162,"mouseY":-20,"time":3093.0125},{"type":3,"mouseX":125,"mouseY":-21,"time":3120.8783},{"type":3,"mouseX":135,"mouseY":-3,"time":3144.535},{"type":3,"mouseX":82,"mouseY":6,"time":3167.2296},{"type":3,"mouseX":9,"mouseY":1,"time":3189.5815},{"type":3,"mouseX":1,"mouseY":0,"time":3251.1045},{"type":3,"mouseX":1,"mouseY":1,"time":3364.1772},{"type":3,"mouseX":7,"mouseY":6,"time":3386.5469},{"type":3,"mouseX":20,"mouseY":19,"time":3409.0667},{"type":3,"mouseX":21,"mouseY":16,"time":3437.5052},{"type":3,"mouseX":6,"mouseY":3,"time":3466.2435},{"type":3,"mouseX":7,"mouseY":2,"time":3488.1702},Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
{"macroEvents":[{"type":3,"mouseX":3,"mouseY":1,"time":1421.0958},{"type":3,"mouseX":5,"mouseY":0,"time":1443.9352},{"type":3,"mouseX":13,"mouseY":1,"time":1466.6229},{"type":3,"mouseX":26,"mouseY":-3,"time":1490.0079},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":1504.6397},{"type":3,"mouseX":22,"mouseY":-4,"time":1511.9668},{"type":3,"mouseX":18,"mouseY":-3,"time":1534.6937},{"type":3,"mouseX":21,"mouseY":-1,"time":1561.3198},{"type":3,"mouseX":32,"mouseY":-1,"time":1584.4359},{"type":3,"mouseX":26,"mouseY":2,"time":1606.3658},{"type":3,"mouseX":34,"mouseY":4,"time":1629.0205},{"type":3,"mouseX":19,"mouseY":2,"time":1656.9458},{"type":3,"mouseX":22,"mouseY":5,"time":1680.5213},{"type":3,"mouseX":23,"mouseY":5,"time":1702.8503},{"type":3,"mouseX":34,"mouseY":6,"time":1725.5975},{"type":3,"mouseX":33,"mouseY":4,"time":1753.4622},{"type":3,"mouseX":28,"mouseY":3,"time":1776.1994},{"type":3,"mouseX":21,"mouseY":3,"time":1798.7822},{"type":3,"mouseX":25,"mouseY":3,"time":1821.0148},{"type":3,"mouseX":27,"mouseY":3,"time":1848.8726},{"type":3,"mouseX":34,"mouseY":3,"time":1871.9005},{"type":3,"mouseX":31,"mouseY":2,"time":1894.9154},{"type":3,"mouseX":30,"mouseY":4,"time":1922.8236},{"type":3,"mouseX":35,"mouseY":5,"time":1945.3775},{"type":3,"mouseX":40,"mouseY":5,"time":1968.2997},{"type":3,"mouseX":42,"mouseY":4,"time":1991.725},{"type":3,"mouseX":43,"mouseY":5,"time":2014.5422},{"type":3,"mouseX":63,"mouseY":9,"time":2037.3526},{"type":3,"mouseX":68,"mouseY":8,"time":2065.0827},{"type":3,"mouseX":68,"mouseY":8,"time":2088.6154},{"type":3,"mouseX":48,"mouseY":5,"time":2112.2058},{"type":3,"mouseX":46,"mouseY":6,"time":2136.363},{"type":3,"mouseX":40,"mouseY":7,"time":2158.8514},{"type":3,"mouseX":29,"mouseY":4,"time":2187.0039},{"type":3,"mouseX":28,"mouseY":4,"time":2209.4479},{"type":3,"mouseX":23,"mouseY":4,"time":2233.1082},{"type":3,"mouseX":18,"mouseY":4,"time":2257.3163},{"type":3,"mouseX":24,"mouseY":5,"time":2279.1083},{"type":3,"mouseX":20,"mouseY":2,"time":2301.7491},{"type":3,"mouseX":15,"mouseY":2,"time":2329.4706},{"type":3,"mouseX":11,"mouseY":2,"time":2351.846},{"type":3,"mouseX":16,"mouseY":4,"time":2379.3702},{"type":3,"mouseX":18,"mouseY":4,"time":2401.9279},{"type":3,"mouseX":40,"mouseY":7,"time":2425.4059},{"type":3,"mouseX":31,"mouseY":2,"time":2447.3603},{"type":3,"mouseX":59,"mouseY":9,"time":2471.0853},{"type":3,"mouseX":57,"mouseY":6,"time":2498.437},{"type":3,"mouseX":55,"mouseY":3,"time":2520.838},{"type":3,"mouseX":17,"mouseY":0,"time":2544.0637},{"type":3,"mouseX":15,"mouseY":2,"time":2566.3104},{"type":3,"mouseX":24,"mouseY":5,"time":2594.1411},{"type":3,"mouseX":27,"mouseY":4,"time":2616.6343},{"type":3,"mouseX":13,"mouseY":2,"time":2640.0805},{"type":3,"mouseX":16,"mouseY":2,"time":2662.8098},{"type":3,"mouseX":8,"mouseY":2,"time":2690.3809},{"type":3,"mouseX":6,"mouseY":2,"time":2712.9887},{"type":3,"mouseX":17,"mouseY":3,"time":2735.185},{"type":3,"mouseX":25,"mouseY":2,"time":2769.04},{"type":3,"mouseX":23,"mouseY":3,"time":2792.986},{"type":3,"mouseX":21,"mouseY":3,"time":2816.3568},{"type":3,"mouseX":66,"mouseY":8,"time":2838.5657},{"type":3,"mouseX":45,"mouseY":11,"time":2867.3428},{"type":3,"mouseX":21,"mouseY":10,"time":2895.7916},{"type":3,"mouseX":45,"mouseY":22,"time":2918.171},{"type":3,"mouseX":71,"mouseY":23,"time":2940.2312},{"type":3,"mouseX":51,"mouseY":11,"time":2963.0335},{"type":3,"mouseX":17,"mouseY":3,"time":2991.3917},{"type":3,"mouseX":3,"mouseY":1,"time":3066.2524},{"type":3,"mouseX":-8,"mouseY":4,"time":3111.7298},{"type":3,"mouseX":-14,"mouseY":6,"time":3133.6521},{"type":3,"mouseX":-14,"mouseY":6,"time":3157.3638},{"type":3,"mouseX":-16,"mouseY":13,"time":3179.4674},{"type":3,"mouseX":-8,"mouseY":13,"time":3207.0986},{"type":3,"mouseX":-2,"mouseY":3,"time":3235.8785},{"type":3,"mouseX":0,"mouseY":2,"time":3264.2571},{"type":0,"keyCode":32,"mouseX":0,"mouseY":0,"time":3279.856},{"type":3,"mouseX":1,"mouseY":3,"time":3280.5546},{"type":3,"mouseX":6,"mouseY":9,"time":3307.5749},{"type":3,"mouseX":10,"mouseY":16,"time":3329.3775},{"type":3,"mouseX":14,"mouseY":17,"time":3353.2007},{"type":3,"mouseX":11,"mouseY":14,"time":3374.9806},{"type":3,"mouseX":10,"mouseY":17,"time":3402.8405},{"type":3,"mouseX":9,"mouseY":15,"time":3426.0493},{"type":3,"mouseX":10,"mouseY":10,"time":3448.7478},{"type":3,"mouseX":12,"mouseY":10,"time":3471.5988},{"type":3,"mouseX":4,"mouseY":4,"time":3499.4246},{"type":3,"mouseX":1,"mouseY":1,"time":3571.6011},{"type":1,"keyCode":32,"mouseX":0,"mouseY":0,"time":3576.1956},{"type":3,"mouseX":0,"mouseY":1,"time":3582.4667},{"type":3,"mouseX":6,"mouseY":7,"time":3626.8481},{"type":3,"mouseX":20,"mouseY":15,"time":3655.4021},{"type":3,"mouseX":25,"mouseY":9,"time":3684.2742},{"type":3,"mouseX":41,"mouseY":8,"time":3707.1353},{"type":3,"mouseX":58,"mouseY":4,"time":3734.065},{"type":3,"mouseX":81,"mouseY":4,"time":3756.3257},{"type":3,"mouseX":89,"mouseY":2,"time":3778.3074},{"type":3,"mouseX":54,"mouseY":-2,"time":3805.1383},{Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
{"macroEvents":[{"type":3,"mouseX":-6,"mouseY":2,"time":1195.0968},{"type":3,"mouseX":-26,"mouseY":3,"time":1217.2596},{"type":3,"mouseX":-60,"mouseY":3,"time":1240.1011},{"type":3,"mouseX":-81,"mouseY":0,"time":1263.9769},{"type":3,"mouseX":-72,"mouseY":-2,"time":1286.2133},{"type":3,"mouseX":-58,"mouseY":-2,"time":1314.4205},{"type":3,"mouseX":-58,"mouseY":-4,"time":1337.4462},{"type":3,"mouseX":-70,"mouseY":-1,"time":1359.6639},{"type":3,"mouseX":-65,"mouseY":-1,"time":1381.9883},{"type":3,"mouseX":-51,"mouseY":-2,"time":1409.7675},{"type":3,"mouseX":-55,"mouseY":-3,"time":1433.0407},{"type":3,"mouseX":-64,"mouseY":-4,"time":1455.636},{"type":3,"mouseX":-77,"mouseY":-3,"time":1477.7445},{"type":3,"mouseX":-88,"mouseY":-2,"time":1504.5594},{"type":3,"mouseX":-70,"mouseY":-1,"time":1527.1848},{"type":3,"mouseX":-56,"mouseY":-1,"time":1548.8243},{"type":3,"mouseX":-64,"mouseY":0,"time":1576.974},{"type":3,"mouseX":-50,"mouseY":0,"time":1599.1094},{"type":3,"mouseX":-26,"mouseY":0,"time":1622.7203},{"type":3,"mouseX":-23,"mouseY":-2,"time":1649.1755},{"type":3,"mouseX":-22,"mouseY":0,"time":1671.8938},{"type":3,"mouseX":-19,"mouseY":-1,"time":1693.3202},{"type":3,"mouseX":-19,"mouseY":-1,"time":1721.004},{"type":3,"mouseX":-24,"mouseY":-2,"time":1741.7403},{"type":3,"mouseX":-15,"mouseY":-3,"time":1768.5004},{"type":3,"mouseX":16,"mouseY":2,"time":1939.8262},{"type":3,"mouseX":37,"mouseY":4,"time":1962.698},{"type":3,"mouseX":35,"mouseY":2,"time":1985.7569},{"type":3,"mouseX":18,"mouseY":2,"time":2012.7959},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":2018.8509},{"type":3,"mouseX":37,"mouseY":3,"time":2024.1485},{"type":3,"mouseX":14,"mouseY":1,"time":2051.9759},{"type":3,"mouseX":3,"mouseY":0,"time":2107.3918},{"type":3,"mouseX":27,"mouseY":-4,"time":2129.8156},{"type":3,"mouseX":7,"mouseY":-2,"time":2151.6604},{"type":3,"mouseX":-3,"mouseY":-1,"time":2298.1665},{"type":3,"mouseX":-1,"mouseY":0,"time":2375.8263},{"type":3,"mouseX":0,"mouseY":1,"time":2481.0541},{"type":3,"mouseX":0,"mouseY":1,"time":2508.9174},{"type":3,"mouseX":0,"mouseY":1,"time":2597.6013},{"type":3,"mouseX":-2,"mouseY":1,"time":2635.7856},{"type":3,"mouseX":-1,"mouseY":2,"time":2763.9109},{"type":3,"mouseX":0,"mouseY":3,"time":2797.1696},{"type":3,"mouseX":-1,"mouseY":2,"time":2818.8425},{"type":3,"mouseX":-2,"mouseY":1,"time":2841.4413},{"type":3,"mouseX":0,"mouseY":2,"time":2870.2478},{"type":1,"keyCode":87,"mouseX":0,"mouseY":0,"time":2918.7259},{"type":3,"mouseX":0,"mouseY":1,"time":2981.7594},{"type":3,"mouseX":-1,"mouseY":1,"time":3047.5891},{"type":3,"mouseX":0,"mouseY":2,"time":3327.7434},{"type":3,"mouseX":-1,"mouseY":0,"time":3951.9777}],"info":{"name":"","description":"","x":319,"y":192,"width":1920,"height":1080}}
|
||||
@@ -1 +0,0 @@
|
||||
{"macroEvents":[{"type":3,"mouseX":7,"mouseY":-10,"time":507.5978},{"type":3,"mouseX":10,"mouseY":-9,"time":530.3774},{"type":3,"mouseX":11,"mouseY":-11,"time":553.5057},{"type":3,"mouseX":20,"mouseY":-14,"time":580.3496},{"type":3,"mouseX":16,"mouseY":-10,"time":602.692},{"type":3,"mouseX":13,"mouseY":-6,"time":625.0354},{"type":3,"mouseX":15,"mouseY":-7,"time":652.6616},{"type":3,"mouseX":19,"mouseY":-6,"time":675.7784},{"type":3,"mouseX":16,"mouseY":-7,"time":699.4606},{"type":3,"mouseX":14,"mouseY":-4,"time":721.9512},{"type":3,"mouseX":10,"mouseY":-4,"time":749.8809},{"type":3,"mouseX":11,"mouseY":-3,"time":771.7238},{"type":3,"mouseX":3,"mouseY":0,"time":798.9946},{"type":3,"mouseX":5,"mouseY":-1,"time":838.0122},{"type":3,"mouseX":10,"mouseY":-4,"time":860.9122},{"type":3,"mouseX":9,"mouseY":-3,"time":887.8467},{"type":3,"mouseX":10,"mouseY":-4,"time":910.604},{"type":3,"mouseX":8,"mouseY":-3,"time":933.7889},{"type":3,"mouseX":15,"mouseY":-5,"time":966.7797},{"type":3,"mouseX":17,"mouseY":-6,"time":994.9369},{"type":3,"mouseX":4,"mouseY":-3,"time":1016.2168},{"type":3,"mouseX":1,"mouseY":0,"time":1087.1571},{"type":3,"mouseX":1,"mouseY":-1,"time":1165.9255},{"type":3,"mouseX":7,"mouseY":-20,"time":1189.5971},{"type":3,"mouseX":9,"mouseY":-20,"time":1212.1569},{"type":3,"mouseX":12,"mouseY":-29,"time":1239.2237},{"type":3,"mouseX":8,"mouseY":-35,"time":1261.541},{"type":3,"mouseX":9,"mouseY":-31,"time":1282.9399},{"type":3,"mouseX":6,"mouseY":-27,"time":1310.8353},{"type":0,"keyCode":32,"mouseX":0,"mouseY":0,"time":1326.1869},{"type":3,"mouseX":5,"mouseY":-24,"time":1333.4788},{"type":3,"mouseX":3,"mouseY":-18,"time":1355.189},{"type":3,"mouseX":1,"mouseY":-15,"time":1382.325},{"type":3,"mouseX":1,"mouseY":-11,"time":1404.9371},{"type":3,"mouseX":1,"mouseY":-4,"time":1428.1381},{"type":3,"mouseX":0,"mouseY":-8,"time":1450.6075},{"type":3,"mouseX":0,"mouseY":-6,"time":1474.3844},{"type":3,"mouseX":1,"mouseY":-12,"time":1496.0174},{"type":3,"mouseX":1,"mouseY":-10,"time":1525.1301},{"type":3,"mouseX":1,"mouseY":-9,"time":1547.37},{"type":3,"mouseX":1,"mouseY":-12,"time":1574.451},{"type":3,"mouseX":1,"mouseY":-12,"time":1597.8639},{"type":3,"mouseX":2,"mouseY":-17,"time":1619.8618},{"type":3,"mouseX":3,"mouseY":-22,"time":1641.7182},{"type":3,"mouseX":4,"mouseY":-25,"time":1669.2743},{"type":3,"mouseX":2,"mouseY":-32,"time":1691.053},{"type":3,"mouseX":-2,"mouseY":-44,"time":1713.796},{"type":3,"mouseX":-1,"mouseY":-50,"time":1741.0761},{"type":3,"mouseX":2,"mouseY":-59,"time":1762.626},{"type":3,"mouseX":6,"mouseY":-64,"time":1785.3462},{"type":3,"mouseX":12,"mouseY":-69,"time":1813.6425},{"type":3,"mouseX":11,"mouseY":-60,"time":1836.3858},{"type":3,"mouseX":4,"mouseY":-42,"time":1858.8535},{"type":3,"mouseX":2,"mouseY":-23,"time":1881.591},{"type":3,"mouseX":0,"mouseY":-13,"time":1908.3465},{"type":3,"mouseX":0,"mouseY":-1,"time":1980.1002},{"type":3,"mouseX":0,"mouseY":2,"time":2111.6914},{"type":3,"mouseX":-4,"mouseY":11,"time":2136.3181},{"type":3,"mouseX":-10,"mouseY":22,"time":2165.6564},{"type":3,"mouseX":-14,"mouseY":31,"time":2194.7638},{"type":3,"mouseX":-24,"mouseY":46,"time":2216.4018},{"type":3,"mouseX":-51,"mouseY":69,"time":2239.0885},{"type":3,"mouseX":-55,"mouseY":62,"time":2265.9616},{"type":1,"keyCode":32,"mouseX":0,"mouseY":0,"time":2274.8891}],"info":{"name":"","description":"","x":319,"y":192,"width":1920,"height":1080}}
|
||||
@@ -1 +0,0 @@
|
||||
{"macroEvents":[{"type":3,"mouseX":-2,"mouseY":0,"time":687.5453},{"type":3,"mouseX":-1,"mouseY":-1,"time":708.8961},{"type":3,"mouseX":6,"mouseY":4,"time":1057.8757},{"type":3,"mouseX":36,"mouseY":12,"time":1080.2844},{"type":3,"mouseX":76,"mouseY":17,"time":1108.9372},{"type":3,"mouseX":102,"mouseY":17,"time":1130.8706},{"type":3,"mouseX":102,"mouseY":18,"time":1153.0981},{"type":3,"mouseX":83,"mouseY":20,"time":1181.4117},{"type":3,"mouseX":74,"mouseY":18,"time":1204.6735},{"type":3,"mouseX":55,"mouseY":8,"time":1227.059},{"type":3,"mouseX":67,"mouseY":5,"time":1248.005},{"type":3,"mouseX":105,"mouseY":3,"time":1276.7776},{"type":3,"mouseX":111,"mouseY":0,"time":1297.6811},{"type":3,"mouseX":86,"mouseY":0,"time":1325.276},{"type":3,"mouseX":37,"mouseY":3,"time":1346.8244},{"type":3,"mouseX":20,"mouseY":7,"time":1369.1434},{"type":3,"mouseX":45,"mouseY":12,"time":1396.9876},{"type":3,"mouseX":58,"mouseY":7,"time":1419.0095},{"type":3,"mouseX":71,"mouseY":9,"time":1441.8468},{"type":3,"mouseX":105,"mouseY":17,"time":1465.2558},{"type":3,"mouseX":128,"mouseY":20,"time":1493.2504},{"type":3,"mouseX":149,"mouseY":23,"time":1515.0352},{"type":3,"mouseX":167,"mouseY":20,"time":1536.9393},{"type":3,"mouseX":154,"mouseY":12,"time":1565.7239},{"type":3,"mouseX":135,"mouseY":8,"time":1587.7476},{"type":3,"mouseX":115,"mouseY":9,"time":1610.2054},{"type":3,"mouseX":85,"mouseY":9,"time":1632.2704},{"type":3,"mouseX":53,"mouseY":4,"time":1659.0492},{"type":3,"mouseX":16,"mouseY":2,"time":1685.0573},{"type":3,"mouseX":5,"mouseY":5,"time":1868.8898},{"type":3,"mouseX":21,"mouseY":15,"time":1891.1166},{"type":3,"mouseX":14,"mouseY":11,"time":1912.773},{"type":3,"mouseX":25,"mouseY":18,"time":1939.9442},{"type":3,"mouseX":50,"mouseY":33,"time":1961.2789},{"type":3,"mouseX":43,"mouseY":32,"time":1983.6054},{"type":3,"mouseX":21,"mouseY":18,"time":2011.2218},{"type":3,"mouseX":2,"mouseY":4,"time":2033.235},{"type":3,"mouseX":-2,"mouseY":2,"time":2061.2036},{"type":3,"mouseX":-11,"mouseY":8,"time":2083.2112},{"type":3,"mouseX":-6,"mouseY":6,"time":2105.9995},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":2130.4714},{"type":3,"mouseX":-4,"mouseY":6,"time":2134.1233},{"type":3,"mouseX":-1,"mouseY":4,"time":2155.804},{"type":3,"mouseX":0,"mouseY":2,"time":2177.9446},{"type":3,"mouseX":-1,"mouseY":4,"time":2200.1535},{"type":3,"mouseX":-1,"mouseY":4,"time":2222.1965},{"type":3,"mouseX":-2,"mouseY":9,"time":2243.8648},{"type":3,"mouseX":-1,"mouseY":3,"time":2265.3509},{"type":0,"keyCode":68,"mouseX":0,"mouseY":0,"time":2267.9697},{"type":3,"mouseX":-2,"mouseY":13,"time":2271.2382},{"type":3,"mouseX":1,"mouseY":8,"time":2299.1973},{"type":3,"mouseX":-2,"mouseY":5,"time":2343.1059},{"type":3,"mouseX":-4,"mouseY":3,"time":2364.4293},{"type":3,"mouseX":-6,"mouseY":5,"time":2386.2664},{"type":3,"mouseX":-6,"mouseY":6,"time":2414.0015},{"type":3,"mouseX":-3,"mouseY":3,"time":2435.6767},{"type":3,"mouseX":-6,"mouseY":3,"time":2470.127},{"type":4,"mouseX":1280,"mouseY":719,"mouseButton":"Right","time":2479.5748},{"type":3,"mouseX":-7,"mouseY":6,"time":2481.2949},{"type":3,"mouseX":-12,"mouseY":10,"time":2502.9683},{"type":1,"keyCode":68,"mouseX":0,"mouseY":0,"time":2515.2538},{"type":3,"mouseX":-13,"mouseY":7,"time":2524.5908},{"type":3,"mouseX":-19,"mouseY":4,"time":2552.7375},{"type":3,"mouseX":-12,"mouseY":1,"time":2574.6618},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":2589.9293},{"type":3,"mouseX":-6,"mouseY":0,"time":2591.049},{"type":3,"mouseX":-3,"mouseY":0,"time":2614.0419},{"type":5,"mouseX":1280,"mouseY":719,"mouseButton":"Right","time":2672.385},{"type":3,"mouseX":-1,"mouseY":0,"time":2717.1452},{"type":3,"mouseX":-1,"mouseY":0,"time":2794.1202},{"type":3,"mouseX":-1,"mouseY":1,"time":2822.1122},{"type":3,"mouseX":-1,"mouseY":3,"time":2845.6185},{"type":3,"mouseX":-4,"mouseY":8,"time":2868.2457},{"type":3,"mouseX":-6,"mouseY":5,"time":2890.607},{"type":3,"mouseX":-1,"mouseY":1,"time":2936.2125},{"type":3,"mouseX":0,"mouseY":3,"time":2996.6099},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":3027.9862},{"type":3,"mouseX":-1,"mouseY":13,"time":3029.4262},{"type":3,"mouseX":0,"mouseY":15,"time":3056.4358},{"type":3,"mouseX":2,"mouseY":13,"time":3079.1616},{"type":3,"mouseX":5,"mouseY":11,"time":3100.9365},{"type":3,"mouseX":5,"mouseY":8,"time":3123.9849},{"type":3,"mouseX":11,"mouseY":12,"time":3145.1007},{"type":3,"mouseX":10,"mouseY":11,"time":3168.9943},{"type":3,"mouseX":22,"mouseY":13,"time":3190.9916},{"type":3,"mouseX":26,"mouseY":12,"time":3213.3903},{"type":3,"mouseX":8,"mouseY":4,"time":3236.0183},{"type":3,"mouseX":8,"mouseY":5,"time":3257.8379},{"type":3,"mouseX":7,"mouseY":6,"time":3279.9342},{"type":3,"mouseX":1,"mouseY":0,"time":3307.5171},{"type":3,"mouseX":1,"mouseY":2,"time":3351.0525},{"type":3,"mouseX":4,"mouseY":13,"time":3372.9091},{"type":3,"mouseX":15,"mouseY":24,"time":3394.4373},{"type":3,"mouseX":22,"mouseY":24,"time":3422.2186},{"type":3,"mouseX":45,"mouseY":33,"time":3443.9087},{"typLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
{"macroEvents":[{"type":3,"mouseX":-1,"mouseY":-1,"time":1049.8966},{"type":3,"mouseX":-10,"mouseY":0,"time":1072.5239},{"type":3,"mouseX":-1,"mouseY":0,"time":1100.5964},{"type":3,"mouseX":-1,"mouseY":0,"time":1163.8635},{"type":3,"mouseX":-2,"mouseY":0,"time":1220.0425},{"type":3,"mouseX":-9,"mouseY":0,"time":1241.868},{"type":3,"mouseX":-9,"mouseY":1,"time":1265.2575},{"type":3,"mouseX":-9,"mouseY":-1,"time":1288.9061},{"type":3,"mouseX":-17,"mouseY":-3,"time":1311.0512},{"type":3,"mouseX":-10,"mouseY":-2,"time":1338.8898},{"type":0,"keyCode":87,"mouseX":0,"mouseY":0,"time":1348.0212},{"type":3,"mouseX":-11,"mouseY":-4,"time":1355.4911},{"type":3,"mouseX":-16,"mouseY":-6,"time":1378.3701},{"type":3,"mouseX":-16,"mouseY":-5,"time":1400.7735},{"type":3,"mouseX":-8,"mouseY":-2,"time":1422.9328},{"type":3,"mouseX":-2,"mouseY":-1,"time":1490.3775},{"type":3,"mouseX":-5,"mouseY":-6,"time":1581.9813},{"type":3,"mouseX":-3,"mouseY":-1,"time":1603.9621},{"type":4,"mouseX":1279,"mouseY":719,"mouseButton":"Right","time":1604.9552},{"type":3,"mouseX":-2,"mouseY":-1,"time":1620.7734},{"type":5,"mouseX":1280,"mouseY":719,"mouseButton":"Right","time":1752.1228},{"type":3,"mouseX":-8,"mouseY":-3,"time":1800.3508},{"type":3,"mouseX":-22,"mouseY":-4,"time":1828.3883},{"type":3,"mouseX":-24,"mouseY":-3,"time":1850.0667},{"type":3,"mouseX":-13,"mouseY":-3,"time":1877.1931},{"type":3,"mouseX":-3,"mouseY":-2,"time":1899.8181},{"type":3,"mouseX":-3,"mouseY":0,"time":1921.265},{"type":3,"mouseX":-2,"mouseY":0,"time":1965.293},{"type":3,"mouseX":-2,"mouseY":-1,"time":1994.1277},{"type":3,"mouseX":-4,"mouseY":0,"time":2016.323},{"type":3,"mouseX":-8,"mouseY":-1,"time":2037.4907},{"type":3,"mouseX":-8,"mouseY":0,"time":2066.7837},{"type":3,"mouseX":-7,"mouseY":1,"time":2149.2052},{"type":3,"mouseX":-29,"mouseY":6,"time":2171.2855},{"type":3,"mouseX":-37,"mouseY":10,"time":2192.8447},{"type":3,"mouseX":-24,"mouseY":5,"time":2221.8585},{"type":3,"mouseX":-2,"mouseY":2,"time":2254.9446},{"type":3,"mouseX":-4,"mouseY":3,"time":2311.2989},{"type":3,"mouseX":-6,"mouseY":5,"time":2332.6773},{"type":3,"mouseX":-7,"mouseY":4,"time":2354.876},{"type":3,"mouseX":-2,"mouseY":2,"time":2377.3759},{"type":3,"mouseX":-2,"mouseY":2,"time":2399.4293},{"type":3,"mouseX":-2,"mouseY":1,"time":2421.7607},{"type":3,"mouseX":-4,"mouseY":2,"time":2450.042},{"type":3,"mouseX":-7,"mouseY":4,"time":2478.8672},{"type":3,"mouseX":-5,"mouseY":3,"time":2502.4798},{"type":3,"mouseX":-3,"mouseY":3,"time":2524.1271},{"type":3,"mouseX":-11,"mouseY":3,"time":2546.1028},{"type":3,"mouseX":-19,"mouseY":6,"time":2570.0074},{"type":3,"mouseX":-11,"mouseY":4,"time":2592.8869},{"type":3,"mouseX":-6,"mouseY":5,"time":2682.0186},{"type":3,"mouseX":-11,"mouseY":11,"time":2704.0795},{"type":3,"mouseX":-17,"mouseY":14,"time":2731.5316},{"type":3,"mouseX":-8,"mouseY":6,"time":2754.1239},{"type":4,"mouseX":1280,"mouseY":718,"mouseButton":"Right","time":2757.9671},{"type":3,"mouseX":-24,"mouseY":17,"time":2759.3341},{"type":3,"mouseX":-42,"mouseY":18,"time":2782.5096},{"type":3,"mouseX":-49,"mouseY":10,"time":2805.9084},{"type":3,"mouseX":-55,"mouseY":8,"time":2828.1666},{"type":3,"mouseX":-53,"mouseY":10,"time":2855.129},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":2873.905},{"type":3,"mouseX":-36,"mouseY":5,"time":2877.2588},{"type":3,"mouseX":-11,"mouseY":2,"time":2903.9298},{"type":3,"mouseX":-1,"mouseY":0,"time":2937.4288},{"type":5,"mouseX":1280,"mouseY":718,"mouseButton":"Right","time":2952.1062},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":3018.9199},{"type":3,"mouseX":-3,"mouseY":1,"time":3108.3152},{"type":3,"mouseX":-8,"mouseY":3,"time":3141.7763},{"type":3,"mouseX":-21,"mouseY":6,"time":3170.3024},{"type":3,"mouseX":-33,"mouseY":7,"time":3194.1491},{"type":3,"mouseX":-13,"mouseY":2,"time":3217.1092},{"type":0,"keyCode":65,"mouseX":0,"mouseY":0,"time":3221.8787},{"type":3,"mouseX":-36,"mouseY":6,"time":3223.0223},{"type":3,"mouseX":-25,"mouseY":6,"time":3250.3535},{"type":3,"mouseX":-4,"mouseY":1,"time":3318.0975},{"type":3,"mouseX":-53,"mouseY":-1,"time":3339.2496},{"type":3,"mouseX":-49,"mouseY":-8,"time":3361.2015},{"type":3,"mouseX":-33,"mouseY":-9,"time":3390.0335},{"type":3,"mouseX":-8,"mouseY":-5,"time":3412.9929},{"type":3,"mouseX":-10,"mouseY":-1,"time":3451.5248},{"type":3,"mouseX":-28,"mouseY":1,"time":3473.9071},{"type":3,"mouseX":-10,"mouseY":2,"time":3501.7473},{"type":1,"keyCode":65,"mouseX":0,"mouseY":0,"time":3502.8727},{"type":3,"mouseX":-27,"mouseY":6,"time":3507.7365},{"type":3,"mouseX":-20,"mouseY":5,"time":3529.2121},{"type":3,"mouseX":-15,"mouseY":3,"time":3557.3786},{"type":3,"mouseX":-10,"mouseY":1,"time":3580.1648},{"type":3,"mouseX":-7,"mouseY":1,"time":3602.5607},{"type":3,"mouseX":-8,"mouseY":2,"time":3625.066},{"type":3,"mouseX":-18,"mouseY":5,"time":3647.16},{"type":3,"mouseX":-2,"mouseY":1,"time":3669.0408},{"type":3,"mouseX":-1,"mouseY":1,"time":3701.5678},{"type":4,"mouseX":1280,"mouseY":718,"mouseButton":"Right","time":3Line truncated
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* 注意本脚本的方案是首次传送到晶蝶位置后的方案。
|
||||
* 如果你在传送点待了很久的话,晶蝶会自己飞走,即便是有早柚的情况下。
|
||||
* 这种情况下没法完全捕捉到晶蝶。
|
||||
*/
|
||||
(async function () {
|
||||
|
||||
// 启用自动拾取的实时任务
|
||||
dispatcher.addTimer(new RealtimeTimer("AutoPick"));
|
||||
|
||||
log.info('开始捕捉晶蝶,请在队伍中务必携带{zy},使用成男/成女角色', '早柚');
|
||||
|
||||
async function captureCrystalfly(locationName, x, y, num) {
|
||||
log.info('前往 {name}', locationName);
|
||||
await genshin.tp(x, y);
|
||||
await sleep(1000);
|
||||
log.info('尝试捕捉晶蝶, {num}只', num);
|
||||
let filePath = `assets/${locationName}.json`;
|
||||
await keyMouseScript.runFile(filePath);
|
||||
}
|
||||
|
||||
await captureCrystalfly('枫丹-塔拉塔海谷', 4328, 3960, 4);
|
||||
await captureCrystalfly('枫丹-枫丹廷区', 4822, 3628, 3);
|
||||
await captureCrystalfly('枫丹-苍白的遗荣', 4188, 2992, 2);
|
||||
await captureCrystalfly('枫丹-幽林雾道', 3376, 3290, 2);
|
||||
await captureCrystalfly('枫丹-莫尔泰区', 3810, 2334, 2);
|
||||
await captureCrystalfly('枫丹-特别温暖的地方', 4790, 2520, 3);
|
||||
await captureCrystalfly('须弥-下风蚀地', 4452, -2456, 3);
|
||||
})();
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"id": "bgi_crystalfly",
|
||||
"name": "自动采集晶蝶",
|
||||
"version": "1.0",
|
||||
"description": "BetterGI自带脚本,自动采集离传送点较近的晶蝶。",
|
||||
"authors": [
|
||||
{
|
||||
"name": "huiyadanli",
|
||||
"link": "https://github.com/huiyadanli"
|
||||
}
|
||||
],
|
||||
"main": "main.js"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using BetterGenshinImpact.Core.Script.Group;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BetterGenshinImpact.Service.Interface;
|
||||
|
||||
public interface IScriptService
|
||||
{
|
||||
Task RunMultiJs(List<string> folderNameList, string? groupName = null);
|
||||
|
||||
Task RunMulti(IEnumerable<ScriptGroupProject> projectList, string? groupName = null);
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
using BetterGenshinImpact.Core.Script;
|
||||
using BetterGenshinImpact.Core.Script.Group;
|
||||
using BetterGenshinImpact.Core.Script.Project;
|
||||
using BetterGenshinImpact.GameTask;
|
||||
using BetterGenshinImpact.GameTask.Model.Enum;
|
||||
using BetterGenshinImpact.Service.Interface;
|
||||
using BetterGenshinImpact.ViewModel.Pages;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BetterGenshinImpact.Service;
|
||||
|
||||
public partial class ScriptService(HomePageViewModel homePageViewModel) : IScriptService
|
||||
{
|
||||
private readonly ILogger<ScriptService> _logger = App.GetLogger<ScriptService>();
|
||||
|
||||
/// <summary>
|
||||
/// TODO 合并到 RunMulti
|
||||
/// </summary>
|
||||
/// <param name="folderNameList"></param>
|
||||
/// <param name="groupName"></param>
|
||||
/// <returns></returns>
|
||||
public async Task RunMultiJs(List<string> folderNameList, string? groupName = null)
|
||||
{
|
||||
// 重新加载脚本项目
|
||||
var projects = folderNameList.Select(name => new ScriptProject(name)).ToList();
|
||||
|
||||
var codeList = await ReadCodeList(projects);
|
||||
var hasTimer = HasTimerOperation(codeList);
|
||||
|
||||
// 没启动时候,启动截图器
|
||||
await homePageViewModel.OnStartTriggerAsync();
|
||||
|
||||
if (!string.IsNullOrEmpty(groupName))
|
||||
{
|
||||
if (hasTimer)
|
||||
{
|
||||
_logger.LogInformation("配置组 {Name} 包含实时任务操作调用", groupName);
|
||||
}
|
||||
|
||||
_logger.LogInformation("配置组 {Name} 加载完成,共{Cnt}个脚本,开始执行", groupName, projects.Count);
|
||||
}
|
||||
|
||||
// 循环执行所有脚本
|
||||
var timerOperation = hasTimer ? DispatcherTimerOperationEnum.UseCacheImageWithTriggerEmpty : DispatcherTimerOperationEnum.UseSelfCaptureImage;
|
||||
await new TaskRunner(timerOperation)
|
||||
.RunThreadAsync(async () =>
|
||||
{
|
||||
foreach (var project in projects)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (hasTimer)
|
||||
{
|
||||
TaskTriggerDispatcher.Instance().ClearTriggers();
|
||||
}
|
||||
|
||||
_logger.LogInformation("------------------------------");
|
||||
_logger.LogInformation("→ 开始执行脚本: {Name}", project.Manifest.Name);
|
||||
await project.ExecuteAsync();
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogDebug(e, "执行脚本时发生异常");
|
||||
_logger.LogError("执行脚本时发生异常: {Msg}", e.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_logger.LogInformation("→ 脚本执行结束: {Name}", project.Manifest.Name);
|
||||
_logger.LogInformation("------------------------------");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!string.IsNullOrEmpty(groupName))
|
||||
{
|
||||
_logger.LogInformation("配置组 {Name} 执行结束", groupName);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task RunMulti(IEnumerable<ScriptGroupProject> projectList, string? groupName = null)
|
||||
{
|
||||
groupName ??= "默认";
|
||||
|
||||
var hasTimer = false;
|
||||
var list = ReloadScriptProjects(projectList, ref hasTimer);
|
||||
|
||||
// 针对JS 脚本,检查是否包含定时器操作
|
||||
var jsProjects = ExtractJsProjects(list);
|
||||
if (!hasTimer && jsProjects.Count > 0)
|
||||
{
|
||||
var codeList = await ReadCodeList(jsProjects);
|
||||
hasTimer = HasTimerOperation(codeList);
|
||||
}
|
||||
|
||||
// 没启动时候,启动截图器
|
||||
await homePageViewModel.OnStartTriggerAsync();
|
||||
|
||||
if (!string.IsNullOrEmpty(groupName))
|
||||
{
|
||||
if (hasTimer)
|
||||
{
|
||||
_logger.LogInformation("配置组 {Name} 包含实时任务操作调用", groupName);
|
||||
}
|
||||
_logger.LogInformation("配置组 {Name} 加载完成,共{Cnt}个脚本,开始执行", groupName, list.Count);
|
||||
}
|
||||
|
||||
var timerOperation = hasTimer ? DispatcherTimerOperationEnum.UseCacheImageWithTriggerEmpty : DispatcherTimerOperationEnum.UseSelfCaptureImage;
|
||||
|
||||
await new TaskRunner(timerOperation)
|
||||
.RunThreadAsync(async () =>
|
||||
{
|
||||
foreach (var project in list)
|
||||
{
|
||||
if (project.Status != "Enabled")
|
||||
{
|
||||
_logger.LogInformation("脚本 {Name} 状态为禁用,跳过执行", project.Name);
|
||||
continue;
|
||||
}
|
||||
if (CancellationContext.Instance.Cts.IsCancellationRequested)
|
||||
{
|
||||
_logger.LogInformation("执行被取消");
|
||||
break;
|
||||
}
|
||||
|
||||
for (var i = 0; i < project.RunNum; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (hasTimer)
|
||||
{
|
||||
TaskTriggerDispatcher.Instance().ClearTriggers();
|
||||
}
|
||||
|
||||
_logger.LogInformation("------------------------------");
|
||||
|
||||
await ExecuteProject(project);
|
||||
|
||||
await Task.Delay(2000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogDebug(e, "执行脚本时发生异常");
|
||||
_logger.LogError("执行脚本时发生异常: {Msg}", e.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_logger.LogInformation("→ 脚本执行结束: {Name}", project.Name);
|
||||
_logger.LogInformation("------------------------------");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!string.IsNullOrEmpty(groupName))
|
||||
{
|
||||
_logger.LogInformation("配置组 {Name} 执行结束", groupName);
|
||||
}
|
||||
}
|
||||
|
||||
private List<ScriptGroupProject> ReloadScriptProjects(IEnumerable<ScriptGroupProject> projectList, ref bool hasTimer)
|
||||
{
|
||||
var list = new List<ScriptGroupProject>();
|
||||
foreach (var project in projectList)
|
||||
{
|
||||
if (project.Type == "Javascript")
|
||||
{
|
||||
var newProject = new ScriptGroupProject(new ScriptProject(project.FolderName));
|
||||
CopyProjectProperties(project, newProject);
|
||||
list.Add(newProject);
|
||||
}
|
||||
else if (project.Type == "KeyMouse")
|
||||
{
|
||||
var newProject = ScriptGroupProject.BuildKeyMouseProject(project.Name);
|
||||
CopyProjectProperties(project, newProject);
|
||||
list.Add(newProject);
|
||||
}
|
||||
else if (project.Type == "Pathing")
|
||||
{
|
||||
var newProject = ScriptGroupProject.BuildPathingProject(project.Name, project.FolderName);
|
||||
CopyProjectProperties(project, newProject);
|
||||
list.Add(newProject);
|
||||
hasTimer = true;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void CopyProjectProperties(ScriptGroupProject source, ScriptGroupProject target)
|
||||
{
|
||||
target.Status = source.Status;
|
||||
target.Schedule = source.Schedule;
|
||||
target.RunNum = source.RunNum;
|
||||
target.JsScriptSettingsObject = source.JsScriptSettingsObject;
|
||||
}
|
||||
|
||||
private List<ScriptProject> ExtractJsProjects(List<ScriptGroupProject> list)
|
||||
{
|
||||
var jsProjects = new List<ScriptProject>();
|
||||
foreach (var project in list)
|
||||
{
|
||||
if (project is { Type: "Javascript", Project: not null })
|
||||
{
|
||||
jsProjects.Add(project.Project);
|
||||
}
|
||||
}
|
||||
return jsProjects;
|
||||
}
|
||||
|
||||
private async Task ExecuteProject(ScriptGroupProject project)
|
||||
{
|
||||
if (project.Type == "Javascript")
|
||||
{
|
||||
if (project.Project == null)
|
||||
{
|
||||
throw new Exception("Project 为空");
|
||||
}
|
||||
|
||||
_logger.LogInformation("→ 开始执行JS脚本: {Name}", project.Name);
|
||||
await project.Run();
|
||||
}
|
||||
else if (project.Type == "KeyMouse")
|
||||
{
|
||||
_logger.LogInformation("→ 开始执行键鼠脚本: {Name}", project.Name);
|
||||
await project.Run();
|
||||
}
|
||||
else if (project.Type == "Pathing")
|
||||
{
|
||||
_logger.LogInformation("→ 开始执行路径追踪任务: {Name}", project.Name);
|
||||
await project.Run();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<List<string>> ReadCodeList(List<ScriptProject> list)
|
||||
{
|
||||
var codeList = new List<string>();
|
||||
foreach (var project in list)
|
||||
{
|
||||
var code = await project.LoadCode();
|
||||
codeList.Add(code);
|
||||
}
|
||||
|
||||
return codeList;
|
||||
}
|
||||
|
||||
private bool HasTimerOperation(IEnumerable<string> codeList)
|
||||
{
|
||||
return codeList.Any(code => DispatcherAddTimerRegex().IsMatch(code));
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"^(?!\s*\/\/)\s*dispatcher\.\s*addTimer", RegexOptions.Multiline)]
|
||||
private static partial Regex DispatcherAddTimerRegex();
|
||||
}
|
||||
@@ -64,5 +64,6 @@
|
||||
"你这里除了璞石还卖什么吗",
|
||||
"买点东西",
|
||||
"买新鲜的鱼",
|
||||
"我想装饰一下场地"
|
||||
"我想装饰一下场地",
|
||||
"能交换什么呢"
|
||||
]
|
||||
@@ -1,6 +1,8 @@
|
||||
[
|
||||
"石之轮",
|
||||
"幻想真境剧诗",
|
||||
"开始演奏",
|
||||
"摆放巧像",
|
||||
"摹刻巧像",
|
||||
"摹刻码像",
|
||||
"募刻巧像",
|
||||
@@ -4033,5 +4035,150 @@
|
||||
"抽取本期签文",
|
||||
"更改旋律",
|
||||
"准备演出",
|
||||
"继续演出"
|
||||
]
|
||||
"继续演出",
|
||||
"感谢信",
|
||||
"奥比奇",
|
||||
"波波拉诺",
|
||||
"温柔的守卫",
|
||||
"藏宝爱好者",
|
||||
"卡佩",
|
||||
"艾德加",
|
||||
"席尔万",
|
||||
"卢西恩",
|
||||
"进入席尔万房间",
|
||||
"进入卢西恩房间",
|
||||
"进入艾德加房间",
|
||||
"议论纷纷的群众",
|
||||
"探长",
|
||||
"埃斯诺尔",
|
||||
"帕纽尔",
|
||||
"罗泽尔",
|
||||
"优雅的雕像",
|
||||
"用力推!!!",
|
||||
"用力拽!!!",
|
||||
"用力抬!!!",
|
||||
"温和的雕像",
|
||||
"平静的雕像",
|
||||
"福罗贝尔",
|
||||
"奥雷卢",
|
||||
"埃斯唐普",
|
||||
"西梅",
|
||||
"萨博兰",
|
||||
"苏法什",
|
||||
"陈旧的手稿",
|
||||
"疲惫的手稿",
|
||||
"兴奋的纸蛙",
|
||||
"沉稳的纸蛙",
|
||||
"好心的纸蛙",
|
||||
"忧郁的纸蛙",
|
||||
"123木头人",
|
||||
"123木头人2",
|
||||
"门后的声音",
|
||||
"注脚",
|
||||
"巨人卫兵",
|
||||
"路人",
|
||||
"星轨王城守卫",
|
||||
"店长",
|
||||
"粮油店长",
|
||||
"肖维涅",
|
||||
"我来试试",
|
||||
"失望的纸蛙",
|
||||
"不满的纸蛙",
|
||||
"发生什么了?",
|
||||
"字迹歪歪扭扭的信",
|
||||
"杏仁",
|
||||
"溪泉",
|
||||
"柑橘",
|
||||
"翻看书页",
|
||||
"布勒凡",
|
||||
"布勒施",
|
||||
"欧立威",
|
||||
"毕塞尔特",
|
||||
"搭乘「空中列车」",
|
||||
"杜林",
|
||||
"小杜林",
|
||||
"拜希麦·五世",
|
||||
"爆竹",
|
||||
"板栗",
|
||||
"白果",
|
||||
"瑟杜尔",
|
||||
"威尔",
|
||||
"积木卫兵",
|
||||
"蒙塔纳",
|
||||
"魔女M",
|
||||
"魔女B",
|
||||
"冲在前面的士兵",
|
||||
"门内的人",
|
||||
"飞鼠",
|
||||
"士兵",
|
||||
"小飞鼠",
|
||||
"飞鼠妈妈",
|
||||
"老旧的日记",
|
||||
"发黄的信件",
|
||||
"进入「邪龙」的巢穴",
|
||||
"德维特",
|
||||
"许迪",
|
||||
"克朗谢",
|
||||
"埃洛夫",
|
||||
"等待海上列车…",
|
||||
"前往提瓦特",
|
||||
"前往星轨王城",
|
||||
"前往破碎之海",
|
||||
"「一篇未完成的手稿」",
|
||||
"杏仁长老",
|
||||
"开始演奏",
|
||||
"募刻巧像",
|
||||
"绘想游迹",
|
||||
"召唤激流",
|
||||
"放入",
|
||||
"旋转管道",
|
||||
"让魔水流动吧!",
|
||||
"就是现在",
|
||||
"敲一敲…",
|
||||
"我带你飞一次?",
|
||||
"我来帮忙!",
|
||||
"戳一戳",
|
||||
"出发吧!",
|
||||
"有点奇怪…",
|
||||
"拉你一把",
|
||||
"交给我吧",
|
||||
"已经安全了!",
|
||||
"我需要那颗星星",
|
||||
"用力拉",
|
||||
"一起用力拉",
|
||||
"你已经做得很好了",
|
||||
"这是什么比赛?",
|
||||
"与纠结的小人结队",
|
||||
"与贪吃的小人结队",
|
||||
"与莽撞的小人结队",
|
||||
"开始挑战",
|
||||
"放置蘑菇",
|
||||
"放置苹果",
|
||||
"放置风车菊",
|
||||
"放置鸟蛋",
|
||||
"放置树莓",
|
||||
"放置禽肉",
|
||||
"放置甜甜花",
|
||||
"放置绝云椒椒",
|
||||
"走左边",
|
||||
"走右边",
|
||||
"走前面",
|
||||
"算我一个!",
|
||||
"找到你啦!",
|
||||
"推一下",
|
||||
"我来猜猜",
|
||||
"是元能构装体?",
|
||||
"是水深渊法师?",
|
||||
"是穿蓝衣服的小兔子?",
|
||||
"是超大松鼠?",
|
||||
"是短鬓虎?",
|
||||
"是穿绿衣服的狐狸?",
|
||||
"关于巨龙…",
|
||||
"你还好吗?",
|
||||
"魔线飞行",
|
||||
"摆放巧像",
|
||||
"准备留影",
|
||||
"用力拔",
|
||||
"更加用力拔",
|
||||
"污损的快件"
|
||||
]
|
||||
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.View
|
||||
{
|
||||
@@ -42,7 +43,7 @@ namespace BetterGenshinImpact.View
|
||||
{
|
||||
if (hWnd == IntPtr.Zero)
|
||||
{
|
||||
MessageBox.Show("请选择窗口");
|
||||
Toast.Warning("请选择窗口");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace BetterGenshinImpact.View.Converters;
|
||||
|
||||
/// <summary>
|
||||
/// ScriptGroupProjectExtensions
|
||||
/// </summary>
|
||||
[ValueConversion(typeof(bool), typeof(Visibility))]
|
||||
public sealed class BooleanToEnableTextConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return value is "Enabled";
|
||||
}
|
||||
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return value is false ? "Disabled" : "Enabled";
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@
|
||||
Grid.Row="1"
|
||||
IsBackButtonVisible="Collapsed"
|
||||
IsPaneToggleVisible="True"
|
||||
OpenPaneLength="150">
|
||||
OpenPaneLength="160">
|
||||
<ui:NavigationView.MenuItems>
|
||||
<ui:NavigationViewItem Content="启动"
|
||||
NavigationCacheMode="Enabled"
|
||||
@@ -77,28 +77,47 @@
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
<!--<ui:NavigationViewItemSeparator />-->
|
||||
<!--<ui:NavigationViewItem Content="调度器"
|
||||
NavigationCacheMode="Enabled"
|
||||
TargetPageType="{x:Type pages:DispatcherPage}">
|
||||
|
||||
<ui:NavigationViewItem Content="全自动">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:SymbolIcon Symbol="Bot24" />
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>-->
|
||||
<!-- WebAsset24 | DocumentJs16 -->
|
||||
<ui:NavigationViewItem Content="脚本管理"
|
||||
NavigationCacheMode="Enabled"
|
||||
TargetPageType="{x:Type pages:ScriptControlPage}">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:SymbolIcon Symbol="Script16" />
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
<!-- Script16 -->
|
||||
<ui:NavigationViewItem Content="录制回放"
|
||||
NavigationCacheMode="Enabled"
|
||||
TargetPageType="{x:Type pages:KeyMouseRecordPage}">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:SymbolIcon Symbol="Record24" />
|
||||
</ui:NavigationViewItem.Icon>
|
||||
<ui:NavigationViewItem.MenuItems>
|
||||
|
||||
<!--<ui:NavigationViewItemSeparator />-->
|
||||
<!-- ConvertRange20 -->
|
||||
<ui:NavigationViewItem Content="调度器"
|
||||
NavigationCacheMode="Enabled"
|
||||
TargetPageType="{x:Type pages:ScriptControlPage}">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:SymbolIcon Symbol="DeveloperBoard24" />
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
<!-- WebAsset24 | DocumentJs16 | Script16 -->
|
||||
<ui:NavigationViewItem Content="脚本"
|
||||
NavigationCacheMode="Enabled"
|
||||
TargetPageType="{x:Type pages:JsListPage}">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:SymbolIcon Symbol="DocumentJs16" />
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
<!-- Map24 -->
|
||||
<ui:NavigationViewItem Content="地图追踪"
|
||||
NavigationCacheMode="Enabled"
|
||||
TargetPageType="{x:Type pages:MapPathingPage}">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:SymbolIcon Symbol="Map24" />
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
<!-- Script16 -->
|
||||
<ui:NavigationViewItem Content="录制回放"
|
||||
NavigationCacheMode="Enabled"
|
||||
TargetPageType="{x:Type pages:KeyMouseRecordPage}">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<ui:SymbolIcon Symbol="Record24" />
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
</ui:NavigationViewItem.MenuItems>
|
||||
</ui:NavigationViewItem>
|
||||
|
||||
<ui:NavigationViewItem Content="快捷键"
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
</ui:CardControl>
|
||||
|
||||
<!-- 地图 -->
|
||||
<ui:CardControl Margin="0,0,0,12"
|
||||
<!--<ui:CardControl Margin="0,0,0,12"
|
||||
Icon="{ui:SymbolIcon Cursor24}"
|
||||
Visibility="{markup:Converter Value={x:Static helpers:RuntimeHelper.IsDebuggerAttached},
|
||||
Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
@@ -447,7 +447,7 @@
|
||||
<ui:Button Margin="0,0,36,0"
|
||||
Command="{Binding OpenMapViewerCommand}"
|
||||
Content="查看地图" />
|
||||
</ui:CardControl>
|
||||
</ui:CardControl>-->
|
||||
|
||||
<!--<ui:CardControl Margin="0,0,0,12" Icon="{ui:SymbolIcon Keyboard24}">
|
||||
<ui:CardControl.Header>
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
<Page x:Class="BetterGenshinImpact.View.Pages.JsListPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:BetterGenshinImpact.View.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:pages="clr-namespace:BetterGenshinImpact.ViewModel.Pages"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
Title="JsListPage"
|
||||
d:DataContext="{d:DesignInstance Type=pages:JsListViewModel}"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="800"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
FontFamily="{StaticResource TextThemeFontFamily}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/View/Controls/Style/ListViewEx.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Page.Resources>
|
||||
<Grid Margin="42,16,42,12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="400" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ui:TextBlock Grid.Row="0"
|
||||
Margin="0,0,0,8"
|
||||
FontTypography="BodyStrong"
|
||||
Text="自定义 Javascript 脚本(开发中功能)" />
|
||||
<ui:TextBlock Grid.Row="1"
|
||||
Margin="0,0,0,8"
|
||||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||||
Text="可以通过 Javascript 调用 BetterGI 在原神中的各项能力,右键可以直接执行脚本。建议在调度器中使用!"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||
<ui:Button Command="{Binding OpenScriptsFolderCommand}"
|
||||
Content="打开脚本目录"
|
||||
Icon="{ui:SymbolIcon FolderOpen24}" />
|
||||
</StackPanel>
|
||||
|
||||
<Separator Grid.Row="3"
|
||||
Height="10"
|
||||
Opacity="0" />
|
||||
|
||||
<Grid Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="80" />
|
||||
<!-- <ColumnDefinition Width="120" /> -->
|
||||
<ColumnDefinition Width="20" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid x:Name="Col1" Grid.Column="0" />
|
||||
<Grid x:Name="Col2" Grid.Column="1" />
|
||||
<Grid x:Name="Col3" Grid.Column="2" />
|
||||
<Grid x:Name="Col4" Grid.Column="3" />
|
||||
<!-- <Grid x:Name="Col5" Grid.Column="4" /> -->
|
||||
</Grid>
|
||||
<ui:ListView Grid.Row="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
ItemsSource="{Binding ScriptItems}"
|
||||
SelectionMode="Single">
|
||||
<ListView.View>
|
||||
<GridView ColumnHeaderContainerStyle="{StaticResource GridViewColumnHeaderDarkStyle}">
|
||||
<GridViewColumn Width="{Binding ElementName=Col1, Path=ActualWidth}"
|
||||
DisplayMemberBinding="{Binding FolderName}"
|
||||
Header="目录" />
|
||||
<GridViewColumn Width="{Binding ElementName=Col2, Path=ActualWidth}"
|
||||
DisplayMemberBinding="{Binding Manifest.Name}"
|
||||
Header="名称" />
|
||||
<GridViewColumn Width="{Binding ElementName=Col3, Path=ActualWidth}"
|
||||
DisplayMemberBinding="{Binding Manifest.Version}"
|
||||
Header="版本" />
|
||||
<!--<GridViewColumn Width="{Binding ElementName=Col4, Path=ActualWidth}" Header="操作">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:Button Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:JsListPage}}, Path=DataContext.StartRunCommand}"
|
||||
CommandParameter="{Binding ProjectPath}"
|
||||
Content="执行脚本"
|
||||
Icon="{ui:SymbolIcon Play24}" />
|
||||
</StackPanel>
|
||||
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>-->
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="{Binding OpenScriptProjectFolderCommand}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.SelectedItem}"
|
||||
Header="打开目录" />
|
||||
<MenuItem Command="{Binding StartRunCommand}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.SelectedItem}"
|
||||
Header="执行脚本" />
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
<ListView.Style>
|
||||
<Style TargetType="{x:Type ListView}">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
</ListView.Style>
|
||||
</ui:ListView>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,19 @@
|
||||
using BetterGenshinImpact.ViewModel;
|
||||
using BetterGenshinImpact.ViewModel.Pages;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace BetterGenshinImpact.View.Pages;
|
||||
|
||||
/// <summary>
|
||||
/// JsListPage.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class JsListPage : Page
|
||||
{
|
||||
private JsListViewModel ViewModel { get; }
|
||||
|
||||
public JsListPage(JsListViewModel viewModel)
|
||||
{
|
||||
DataContext = ViewModel = viewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
<ui:TextBlock Grid.Row="0"
|
||||
Margin="0,0,0,8"
|
||||
FontTypography="BodyStrong"
|
||||
Text="键鼠录制回放功能(实验性功能)" />
|
||||
Text="键鼠录制回放功能(实验功能)" />
|
||||
<ui:TextBlock Grid.Row="1"
|
||||
Margin="0,0,0,8"
|
||||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||||
@@ -104,6 +104,9 @@
|
||||
</ListView.View>
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="{Binding EditScriptCommand}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.SelectedItem}"
|
||||
Header="修改名称" />
|
||||
<MenuItem Command="{Binding DeleteScriptCommand}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.SelectedItem}"
|
||||
Header="删除" />
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
<Page x:Class="BetterGenshinImpact.View.Pages.MapPathingPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:BetterGenshinImpact.View.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:pages="clr-namespace:BetterGenshinImpact.ViewModel.Pages"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
Title="JsListPage"
|
||||
d:DataContext="{d:DesignInstance Type=pages:MapPathingViewModel}"
|
||||
d:DesignHeight="600"
|
||||
d:DesignWidth="800"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
FontFamily="{StaticResource TextThemeFontFamily}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/View/Controls/Style/ListViewEx.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Page.Resources>
|
||||
<Grid Margin="42,16,42,12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="400" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ui:TextBlock Grid.Row="0"
|
||||
Margin="0,0,0,8"
|
||||
FontTypography="BodyStrong"
|
||||
Text="地图追踪(开发中功能)" />
|
||||
<ui:TextBlock Grid.Row="1"
|
||||
Margin="0,0,0,8"
|
||||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||||
TextWrapping="Wrap">
|
||||
可以实现自动采集(尝鲜)、自动挖矿(开发中)、自动锄地(开发中)等功能。建议在调度器中使用!<Hyperlink Command="{Binding GoToPathingUrlCommand}" Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}">
|
||||
点击查看地图追踪使用教程
|
||||
</Hyperlink>
|
||||
</ui:TextBlock>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||
<ui:Button Command="{Binding OpenScriptsFolderCommand}"
|
||||
Content="打开任务目录"
|
||||
Icon="{ui:SymbolIcon FolderOpen24}" />
|
||||
<ui:Button Margin="10,0,0,0"
|
||||
Command="{Binding OpenMapViewerCommand}"
|
||||
Content="查看实时追踪地图" />
|
||||
</StackPanel>
|
||||
|
||||
<Separator Grid.Row="3"
|
||||
Height="10"
|
||||
Opacity="0" />
|
||||
|
||||
<Grid Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="80" />
|
||||
<!-- <ColumnDefinition Width="100" /> -->
|
||||
<ColumnDefinition Width="20" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid x:Name="Col1" Grid.Column="0" />
|
||||
<Grid x:Name="Col2" Grid.Column="1" />
|
||||
<Grid x:Name="Col3" Grid.Column="2" />
|
||||
<!-- <Grid x:Name="Col4" Grid.Column="3" /> -->
|
||||
</Grid>
|
||||
<ui:ListView Grid.Row="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
ItemsSource="{Binding PathItems}"
|
||||
SelectionMode="Single">
|
||||
<ListView.View>
|
||||
<GridView ColumnHeaderContainerStyle="{StaticResource GridViewColumnHeaderDarkStyle}">
|
||||
<GridViewColumn Width="{Binding ElementName=Col1, Path=ActualWidth}"
|
||||
DisplayMemberBinding="{Binding FileName}"
|
||||
Header="名称" />
|
||||
<GridViewColumn Width="{Binding ElementName=Col2, Path=ActualWidth}"
|
||||
DisplayMemberBinding="{Binding Info.TypeDesc}"
|
||||
Header="类型" />
|
||||
<!--<GridViewColumn Width="{Binding ElementName=Col3, Path=ActualWidth}" Header="操作">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:Button Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:JsListPage}}, Path=DataContext.StartRunCommand}"
|
||||
CommandParameter="{Binding ProjectPath}"
|
||||
Content="查看" />
|
||||
</StackPanel>
|
||||
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>-->
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Command="{Binding StartCommand}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.SelectedItem}"
|
||||
Header="执行任务" />
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
<ListView.Style>
|
||||
<Style TargetType="{x:Type ListView}">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
</ListView.Style>
|
||||
</ui:ListView>
|
||||
</Grid>
|
||||
</Page>
|
||||
Loaded 100 of 121 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user