diff --git a/resource/tasks.json b/resource/tasks.json index 1170f49ca3..2e782cc032 100644 --- a/resource/tasks.json +++ b/resource/tasks.json @@ -12004,5 +12004,171 @@ "next": [ "ChooseOriginiumShardTab" ] + }, + "GachaOnce": { + "algorithm": "JustReturn", + "action": "DoNothing", + "next": [ + "GachaOncePrefix@GachaBegin" + ] + }, + "GachaTenTimes": { + "algorithm": "JustReturn", + "action": "DoNothing", + "next": [ + "GachaTenTimesPrefix@GachaBegin" + ] + }, + "GachaBegin": { + "algorithm": "JustReturn", + "action": "DoNothing", + "next": [ + "DoGacha", + "GachaEnter", + "GachaEnter@ReturnTo", + "GachaLastOnceResult", + "GachaLastTenTimesResult" + ] + }, + "GachaEnter": { + "action": "ClickSelf", + "cache": false, + "roi": [ + 1052, + 443, + 228, + 156 + ], + "next": [ + "GachaEnter@LoadingText", + "DoGacha", + "GachaLastOnceResult", + "GachaLastTenTimesResult" + ] + }, + "GachaLastOnceResult": { + "algorithm": "OcrDetect", + "action": "ClickSelf", + "cache": false, + "text": [ + "凭证", + "信物", + "获得" + ], + "roi": [ + 1002, + 241, + 278, + 371 + ], + "next": [ + "DoGacha", + "GachaLastOnceResult", + "GachaLastTenTimesResult" + ] + }, + "GachaLastTenTimesResult": { + "algorithm": "OcrDetect", + "action": "ClickSelf", + "cache": false, + "text": [ + "获得物资" + ], + "roi": [ + 508, + 66, + 267, + 172 + ], + "next": [ + "GachaLastOnceResult#next" + ] + }, + "DoGacha": { + "action": "DoNothing", + "template": "empty.png" + }, + "GachaOncePrefix@DoGacha": { + "action": "ClickSelf", + "algorithm": "OcrDetect", + "text": [ + "寻访一次" + ], + "roi": [ + 779, + 576, + 248, + 141 + ], + "next": [ + "GachaOncePrefix@DoGacha@LoadingText", + "GachaConfirm" + ] + }, + "GachaTenTimesPrefix@DoGacha": { + "action": "ClickSelf", + "algorithm": "OcrDetect", + "text": [ + "寻访十次" + ], + "roi": [ + 975, + 571, + 257, + 149 + ], + "next": [ + "GachaTenTimesPrefix@DoGacha@LoadingText", + "GachaConfirm" + ] + }, + "GachaConfirm": { + "action": "ClickSelf", + "roi": [ + 830, + 431, + 228, + 151 + ], + "next": [ + "GachaConfirm@LoadingText", + "GachaWaitingForBag" + ] + }, + "GachaWaitingForBag": { + "action": "DoNothing", + "template": "GachaSkip.png", + "roi": [ + 1144, + 0, + 136, + 148 + ], + "postDelay": 2000, + "next": [ + "GachaSwipeToOpenBag" + ] + }, + "GachaSwipeToOpenBag": { + "baseTask": "SwipeToTheRight", + "next": [ + "GachaSkip" + ], + "postDelay": 2000 + }, + "GachaSkip": { + "template": "GachaSkip.png", + "action": "ClickSelf", + "roi": [ + 1144, + 0, + 136, + 148 + ], + "next": [ + "GachaSkip", + "Stop" + ], + "postDelay": 2000 } } diff --git a/resource/template/GachaConfirm.png b/resource/template/GachaConfirm.png new file mode 100644 index 0000000000..43fca42b82 Binary files /dev/null and b/resource/template/GachaConfirm.png differ diff --git a/resource/template/GachaEnter.png b/resource/template/GachaEnter.png new file mode 100644 index 0000000000..c34a7eea3a Binary files /dev/null and b/resource/template/GachaEnter.png differ diff --git a/resource/template/GachaSkip.png b/resource/template/GachaSkip.png new file mode 100644 index 0000000000..33fb295552 Binary files /dev/null and b/resource/template/GachaSkip.png differ diff --git a/src/Cpp/main.cpp b/src/Cpp/main.cpp index c3cc5ae573..04ee59ba71 100644 --- a/src/Cpp/main.cpp +++ b/src/Cpp/main.cpp @@ -33,7 +33,7 @@ int main([[maybe_unused]] int argc, char** argv) #ifndef ASST_DEBUG AsstAsyncConnect(ptr, "adb", "127.0.0.1:5555", nullptr, true); #else - AsstAsyncConnect(ptr, "adb", "127.0.0.1:5555", "DEBUG", true); + AsstAsyncConnect(ptr, "adb", "127.0.0.1:3439", "General", true); #endif if (!AsstConnected(ptr)) { std::cerr << "connect failed" << std::endl; @@ -94,7 +94,7 @@ int main([[maybe_unused]] int argc, char** argv) #else - AsstAppendTask(ptr, "Debug", nullptr); + AsstAppendTask(ptr, "Custom", R"({"task_names": [ "GachaOnce" ] })"); #endif