js脚本: 购买5个四方八方之网(v1.0) (#634)
This commit is contained in:
39
repo/js/购买四方八方之网/assets/四方八方之网.json
Normal file
39
repo/js/购买四方八方之网/assets/四方八方之网.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "四方八方之网",
|
||||
"type": "collect",
|
||||
"author": "越空",
|
||||
"version": "1.0",
|
||||
"description": "走到稻妻若紫位置,准备购买四方八方之网",
|
||||
"bgiVersion": "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": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
32
repo/js/购买四方八方之网/main.js
Normal file
32
repo/js/购买四方八方之网/main.js
Normal file
@@ -0,0 +1,32 @@
|
||||
(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个四方八方之网");
|
||||
})();
|
||||
13
repo/js/购买四方八方之网/manifest.json
Normal file
13
repo/js/购买四方八方之网/manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "购买四方八方之网",
|
||||
"version": "1.0",
|
||||
"description": "传送到稻妻白狐之野,找若紫买四方八方之网(基于路径追踪)",
|
||||
"authors": [
|
||||
{
|
||||
"name": "越空",
|
||||
"link": "https://github.com/SophieZ22"
|
||||
}
|
||||
],
|
||||
"main": "main.js"
|
||||
}
|
||||
Reference in New Issue
Block a user