diff --git a/repo/js/每周一自动购买四方八方之网/assets/四方八方之网.json b/repo/js/BuyOmni-UbiquityNet/assets/四方八方之网.json similarity index 100% rename from repo/js/每周一自动购买四方八方之网/assets/四方八方之网.json rename to repo/js/BuyOmni-UbiquityNet/assets/四方八方之网.json diff --git a/repo/js/购买四方八方之网/manifest.json b/repo/js/BuyOmni-UbiquityNet/manifest.json similarity index 55% rename from repo/js/购买四方八方之网/manifest.json rename to repo/js/BuyOmni-UbiquityNet/manifest.json index 741c0c02..ccbc6a4d 100644 --- a/repo/js/购买四方八方之网/manifest.json +++ b/repo/js/BuyOmni-UbiquityNet/manifest.json @@ -7,7 +7,16 @@ { "name": "越空", "links": "https://github.com/SophieZ22" + }, + { + "name": "迷路の龙王", + "links": "https://github.com/miludelongwang" + }, + { + "name": "秋云", + "links": "https://github.com/physligl" } ], - "main": "main.js" + "main": "main.js", + "settings_ui": "settings.json" } \ No newline at end of file diff --git a/repo/js/BuyOmni-UbiquityNet/settings.json b/repo/js/BuyOmni-UbiquityNet/settings.json new file mode 100644 index 00000000..757a3ef3 --- /dev/null +++ b/repo/js/BuyOmni-UbiquityNet/settings.json @@ -0,0 +1,22 @@ +[ + { + "name": "weekdays", + "type": "select", + "label": "执行的星期", + "options": [ + "周一", + "周二", + "周三", + "周四", + "周五", + "周六", + "周日" + ] + }, + { + "name": "purchases", + "type": "input-text", + "label": "购买数量", + "default": 5 + } +] diff --git a/repo/js/每周一自动购买四方八方之网/main.js b/repo/js/每周一自动购买四方八方之网/main.js deleted file mode 100644 index 4c903eec..00000000 --- a/repo/js/每周一自动购买四方八方之网/main.js +++ /dev/null @@ -1,39 +0,0 @@ -(async function () { - // 新增:检查是否为周一 - const today = new Date().getDay(); // 0=周日, 1=周一, ... 6=周六 - if (today !== 1) { - log.info(`今天不是周一(当前星期代码:${today}),脚本终止`); - return; - } - - setGameMetrics(1920, 1080, 2); - // 传送到稻妻若紫处 - async function AutoPath(locationName) { - log.info(`前往稻妻-白狐之野-若紫处`); - try { - let filePath = `assets/${locationName}.json`; - await pathingScript.runFile(filePath); - } catch (error) { - log.error(`执行 ${locationName} 路径时发生错误`); - } - await sleep(500); - } - async function Shopping() { - await sleep(500); - for (let j = 0; j < 4; j++) { - keyPress("F"); await sleep(1000);//对话 - } - await sleep(1000); - for (let i = 0; i < 5; i++) { - click(1690, 1020); await sleep(500); // 购买 - click(1170, 780); await sleep(400); // 确定 - click(1690, 1020); await sleep(200); // 点击空白处 - } - keyPress("ESCAPE"); await sleep(2000); - } - log.info("开始执行脚本"); - await AutoPath("四方八方之网"); - log.info("到达若紫处"); - await Shopping(); - log.info("已购买5个四方八方之网"); -})(); \ No newline at end of file diff --git a/repo/js/每周一自动购买四方八方之网/manifest.json b/repo/js/每周一自动购买四方八方之网/manifest.json deleted file mode 100644 index 40346af0..00000000 --- a/repo/js/每周一自动购买四方八方之网/manifest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "manifest_version": 1, - "name": "购买四方八方之网", - "version": "1.0", - "description": "每周一传送到稻妻白狐之野,找若紫买四方八方之网(基于路径追踪)", - "authors": [ - { - "name": "miludelongwang", - "links": "https://github.com/miludelongwang" - } - ], - "main": "main.js" -} \ No newline at end of file diff --git a/repo/js/购买四方八方之网/assets/四方八方之网.json b/repo/js/购买四方八方之网/assets/四方八方之网.json deleted file mode 100644 index c3477180..00000000 --- a/repo/js/购买四方八方之网/assets/四方八方之网.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "info": { - "name": "四方八方之网", - "type": "collect", - "author": "越空", - "version": "1.0", - "description": "走到稻妻若紫位置,准备购买四方八方之网", - "bgi_version": "0.42.3" - }, - "positions": [ - { - "id": 1, - "action": "", - "move_mode": "walk", - "type": "teleport", - "x": -4232.1875, - "y": -3001.9599609375, - "action_params": "" - }, - { - "id": 2, - "x": -4236.78515625, - "y": -2995.244140625, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 3, - "x": -4242.451171875, - "y": -2998.5556640625, - "type": "target", - "move_mode": "walk", - "action": "", - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/购买四方八方之网/main.js b/repo/js/购买四方八方之网/main.js deleted file mode 100644 index e12380f4..00000000 --- a/repo/js/购买四方八方之网/main.js +++ /dev/null @@ -1,32 +0,0 @@ -(async function () { - setGameMetrics(1920, 1080, 2); - // 传送到稻妻若紫处 - async function AutoPath(locationName) { - log.info(`前往稻妻-白狐之野-若紫处`); - try { - let filePath = `assets/${locationName}.json`; - await pathingScript.runFile(filePath); - } catch (error) { - log.error(`执行 ${locationName} 路径时发生错误`); - } - await sleep(500); - } - async function Shopping() { - await sleep(500); - for (let j = 0; j < 4; j++) { - keyPress("F"); await sleep(1000);//对话 - } - await sleep(1000); - for (let i = 0; i < 5; i++) { - click(1690, 1020); await sleep(500); // 购买 - click(1170, 780); await sleep(400); // 确定 - click(1690, 1020); await sleep(200); // 点击空白处 - } - keyPress("ESCAPE"); await sleep(2000); - } - log.info("开始执行脚本"); - await AutoPath("四方八方之网"); - log.info("到达若紫处"); - await Shopping(); - log.info("已购买5个四方八方之网"); -})(); \ No newline at end of file