From c8c261bc53d0bf661c5c98117833ec93c7c65838 Mon Sep 17 00:00:00 2001 From: linbooker <134063072+linbooker@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:38:58 +0800 Subject: [PATCH 1/3] Add files via upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 切换队伍 --- repo/js/Switch roles/main.js | 8 ++++++++ repo/js/Switch roles/manifest.json | 13 +++++++++++++ repo/js/Switch roles/settings.json | 14 ++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 repo/js/Switch roles/main.js create mode 100644 repo/js/Switch roles/manifest.json create mode 100644 repo/js/Switch roles/settings.json diff --git a/repo/js/Switch roles/main.js b/repo/js/Switch roles/main.js new file mode 100644 index 00000000..ef88e97a --- /dev/null +++ b/repo/js/Switch roles/main.js @@ -0,0 +1,8 @@ +(async function () { + setGameMetrics(3840, 2160, 2); + + keyPress(settings.n); + await sleep(1000); + + log.info("已切换至角色"+ settings.n); +})(); \ No newline at end of file diff --git a/repo/js/Switch roles/manifest.json b/repo/js/Switch roles/manifest.json new file mode 100644 index 00000000..17382db4 --- /dev/null +++ b/repo/js/Switch roles/manifest.json @@ -0,0 +1,13 @@ +{ + "manifest_version": 1, + "name": "切换角色", + "version": "1.0", + "description": "用于切换角色", + "authors": [ + { + "name": "LL" + } + ], + "settings_ui": "settings.json", + "main": "main.js" +} \ No newline at end of file diff --git a/repo/js/Switch roles/settings.json b/repo/js/Switch roles/settings.json new file mode 100644 index 00000000..d90dc8c7 --- /dev/null +++ b/repo/js/Switch roles/settings.json @@ -0,0 +1,14 @@ +[ + { + "name": "n", + "type": "select", + "label": "角色序号", + "options": [ + "1", + "2", + "3", + "4", + "5" + ] + } +] \ No newline at end of file From 10961682d1dcfc85341da99a9e9ac39e59cbfd76 Mon Sep 17 00:00:00 2001 From: linbooker <134063072+linbooker@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:40:57 +0800 Subject: [PATCH 2/3] Add files via upload --- repo/js/Switch teams/assets/Team.json | 10 +++++++++ repo/js/Switch teams/main.js | 29 +++++++++++++++++++++++++++ repo/js/Switch teams/manifest.json | 13 ++++++++++++ repo/js/Switch teams/settings.json | 7 +++++++ 4 files changed, 59 insertions(+) create mode 100644 repo/js/Switch teams/assets/Team.json create mode 100644 repo/js/Switch teams/main.js create mode 100644 repo/js/Switch teams/manifest.json create mode 100644 repo/js/Switch teams/settings.json diff --git a/repo/js/Switch teams/assets/Team.json b/repo/js/Switch teams/assets/Team.json new file mode 100644 index 00000000..0261c9c0 --- /dev/null +++ b/repo/js/Switch teams/assets/Team.json @@ -0,0 +1,10 @@ +{"macroEvents":[{"type":4,"mouseX":1000,"mouseY":800,"mouseButton":"Left","time":100}, +{"type":2,"mouseX":1000,"mouseY":900,"time":150}, +{"type":2,"mouseX":1000,"mouseY":1000,"time":200}, +{"type":2,"mouseX":1000,"mouseY":1100,"time":250}, +{"type":2,"mouseX":1000,"mouseY":1200,"time":300}, +{"type":2,"mouseX":1000,"mouseY":1300,"time":350}, +{"type":2,"mouseX":1000,"mouseY":1400,"time":400}, +{"type":2,"mouseX":1000,"mouseY":1500,"time":450}, +{"type":5,"mouseX":1000,"mouseY":1500,"mouseButton":"Left","time":500}], +"info":{"name":"","description":"","x":746,"y":620,"width":1920,"height":1080,"recordDpi":1.75}} \ No newline at end of file diff --git a/repo/js/Switch teams/main.js b/repo/js/Switch teams/main.js new file mode 100644 index 00000000..4196dd16 --- /dev/null +++ b/repo/js/Switch teams/main.js @@ -0,0 +1,29 @@ +(async function () { + setGameMetrics(3840, 2160, 2); + keyPress("L"); + await sleep(4500); + click(100, 2050); + await sleep(800); + + for(let i = 0; i < 3; i++){ + await keyMouseScript.runFile(`assets/Team.json`); + await sleep(800); + } + + click(100, 300); + await sleep(800); + click(100, 2050); + await sleep(800); + + for(let i = 1; i < settings.n; i++){ + click(3684, 1078); + await sleep(800); + } + + click(3200, 2050); + await sleep(1000); + keyPress("Escape"); + await sleep(1000); + + log.info("已切换至第"+ settings.n +"队"); +})(); \ No newline at end of file diff --git a/repo/js/Switch teams/manifest.json b/repo/js/Switch teams/manifest.json new file mode 100644 index 00000000..e8c51f42 --- /dev/null +++ b/repo/js/Switch teams/manifest.json @@ -0,0 +1,13 @@ +{ + "manifest_version": 1, + "name": "切换队伍", + "version": "1.0", + "description": "按顺序切换至队伍", + "authors": [ + { + "name": "LL" + } + ], + "settings_ui": "settings.json", + "main": "main.js" +} \ No newline at end of file diff --git a/repo/js/Switch teams/settings.json b/repo/js/Switch teams/settings.json new file mode 100644 index 00000000..291c82e7 --- /dev/null +++ b/repo/js/Switch teams/settings.json @@ -0,0 +1,7 @@ +[ + { + "name": "n", + "type": "input-text", + "label": "队伍序号" + } +] \ No newline at end of file From 862528ee7f1cf1dc2d158efb6985c985463d0c6d Mon Sep 17 00:00:00 2001 From: huiyadanli Date: Mon, 21 Oct 2024 17:25:20 +0000 Subject: [PATCH 3/3] update repo.json --- repo.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/repo.json b/repo.json index 58145437..6237d5b9 100644 --- a/repo.json +++ b/repo.json @@ -1,5 +1,5 @@ { - "time": "20241020221653", + "time": "20241022012520", "url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip", "file": "repo.json", "indexes": [ @@ -4584,6 +4584,24 @@ "description": "关闭计算机~|~用于关闭计算机", "tags": [] }, + { + "name": "Switch roles", + "type": "directory", + "hash": "5e7a09e72e055956c2e2ffa370e9efba747c65e9", + "version": "1.0", + "author": "LL", + "description": "切换角色~|~用于切换角色", + "tags": [] + }, + { + "name": "Switch teams", + "type": "directory", + "hash": "3542e15dc96914ac9ef6f7ef9b304fc1795d9138", + "version": "1.0", + "author": "LL", + "description": "切换队伍~|~按顺序切换至队伍", + "tags": [] + }, { "name": "Wait 10s", "type": "directory",