地图追踪:新增香辛果32个;归档不可用的JS脚本 (#608)

* 地图追踪:新增香辛果32个

* JS脚本归档
This commit is contained in:
起个名字好难的喵
2025-04-20 18:23:40 +08:00
committed by GitHub
parent 8faeadf071
commit c86529c62e
7 changed files with 517 additions and 160 deletions

View File

@@ -1,109 +1,109 @@
(async function () { (async function () {
//特殊字符键盘映射集 //特殊字符键盘映射集
const map = { const map = {
'(': '9', '(': '9',
')': '0', ')': '0',
'`': 'VK_OEM_3', '`': 'VK_OEM_3',
'!': '1', '!': '1',
'@': '2', '@': '2',
'#': '3', '#': '3',
'$': '4', '$': '4',
'%': '5', '%': '5',
'^': '6', '^': '6',
'&': '7', '&': '7',
'*': '8', '*': '8',
'_': 'VK_SUBTRACT', '_': 'VK_SUBTRACT',
'-': 'VK_SUBTRACT', '-': 'VK_SUBTRACT',
'+': 'VK_ADD', '+': 'VK_ADD',
'=': 'VK_ADD', '=': 'VK_ADD',
'|': 'VK_SEPARATOR', '|': 'VK_SEPARATOR',
'{': 'VK_OEM_4', '{': 'VK_OEM_4',
'}': 'VK_OEM_6', '}': 'VK_OEM_6',
'[': 'VK_OEM_4', '[': 'VK_OEM_4',
']': 'VK_OEM_6', ']': 'VK_OEM_6',
':': 'VK_OEM_1', ':': 'VK_OEM_1',
';': 'VK_OEM_1', ';': 'VK_OEM_1',
'\'': 'VK_OEM_7', '\'': 'VK_OEM_7',
'"': 'VK_OEM_7', '"': 'VK_OEM_7',
'<': 'VK_OEM_COMMA', '<': 'VK_OEM_COMMA',
'>': 'VK_OEM_PERIOD', '>': 'VK_OEM_PERIOD',
',': 'VK_OEM_COMMA', ',': 'VK_OEM_COMMA',
'.': 'VK_OEM_PERIOD', '.': 'VK_OEM_PERIOD',
'?': 'VK_OEM_2', '?': 'VK_OEM_2',
}; };
function replaceUsingMap(input) { function replaceUsingMap(input) {
return map[input] || input; // 如果找到映射,返回对应的值;否则返回原值 return map[input] || input; // 如果找到映射,返回对应的值;否则返回原值
} }
setGameMetrics(1920, 1080, 2); setGameMetrics(1920, 1080, 2);
await sleep(3000); await sleep(3000);
//同意用户协议 //同意用户协议
click(698, 610); click(698, 610);
await sleep(1000); await sleep(1000);
//点击用户名输入框 //点击用户名输入框
click(800, 400); click(800, 400);
await sleep(1000); await sleep(1000);
//输入用户名 //输入用户名
log.info("输入用户名"); log.info("输入用户名");
let username = settings.username; let username = settings.username;
let usernameList = username.split(''); let usernameList = username.split('');
usernameList.forEach(element => { usernameList.forEach(element => {
charCode = element.charCodeAt(0); charCode = element.charCodeAt(0);
let arr = [40,41,33,64,35,36,37,94,38,42,95,43,124,123,125,58,34,60,62,63]; let arr = [40,41,33,64,35,36,37,94,38,42,95,43,124,123,125,58,34,60,62,63];
if(charCode > 64 && charCode < 91 || arr.includes(charCode)==1){ if(charCode > 64 && charCode < 91 || arr.includes(charCode)==1){
element=replaceUsingMap(element); element=replaceUsingMap(element);
keyDown("SHIFT"); keyDown("SHIFT");
keyPress(element); keyPress(element);
keyUp("SHIFT"); keyUp("SHIFT");
}else{ }else{
element=replaceUsingMap(element); element=replaceUsingMap(element);
keyPress(element); keyPress(element);
} }
}); });
log.info("用户名={xx}",username) log.info("用户名={xx}",username)
await sleep(3000); await sleep(3000);
//点击用户名输入框 //点击用户名输入框
click(800, 500); click(800, 500);
await sleep(1000); await sleep(1000);
//输入密码 //输入密码
log.info("输入密码") log.info("输入密码")
let password = settings.password; let password = settings.password;
let passwordList = password.split(''); let passwordList = password.split('');
passwordList.forEach(element => { passwordList.forEach(element => {
charCode = element.charCodeAt(0); charCode = element.charCodeAt(0);
let arr = [40,41,33,64,35,36,37,94,38,42,95,43,124,123,125,58,34,60,62,63]; let arr = [40,41,33,64,35,36,37,94,38,42,95,43,124,123,125,58,34,60,62,63];
if(charCode > 64 && charCode < 91 || arr.includes(charCode)==1){ if(charCode > 64 && charCode < 91 || arr.includes(charCode)==1){
element=replaceUsingMap(element); element=replaceUsingMap(element);
keyDown("SHIFT"); keyDown("SHIFT");
keyPress(element); keyPress(element);
keyUp("SHIFT"); keyUp("SHIFT");
}else{ }else{
element=replaceUsingMap(element); element=replaceUsingMap(element);
keyPress(element); keyPress(element);
} }
}); });
log.info("密码={xx}",password); log.info("密码={xx}",password);
await sleep(1000); await sleep(1000);
//登录 //登录
keyPress("RETURN"); keyPress("RETURN");
await sleep(10000); await sleep(10000);
//进入世界 //进入世界
click(950, 1000); click(950, 1000);
log.info("进入世界"); log.info("进入世界");
await sleep(10000); await sleep(10000);
//进入世界2 //进入世界2
click(950, 1000); click(950, 1000);
log.info("进入世界2"); log.info("进入世界2");
await sleep(10000); await sleep(10000);
//点击领月卡 //点击领月卡
click(950, 1000); click(950, 1000);
log.info("点击领月卡"); log.info("点击领月卡");
await sleep(1000); await sleep(1000);
//点击领月卡2 //点击领月卡2
click(950, 1000); click(950, 1000);
log.info("点击领月卡2"); log.info("点击领月卡2");
await sleep(1000); await sleep(1000);
//点击领月卡2 //点击领月卡2
click(950, 1000); click(950, 1000);
log.info("点击领月卡3"); log.info("点击领月卡3");
await sleep(1000); await sleep(1000);
})(); })();

View File

@@ -1,13 +1,13 @@
{ {
"manifest_version": 1, "manifest_version": 1,
"name": "登录游戏", "name": "登录游戏",
"version": "1.0", "version": "1.0",
"description": "输入账号和密码并进入游戏", "description": "输入账号和密码并进入游戏",
"authors": [ "authors": [
{ {
"name": "愚溪", "name": "愚溪",
} }
], ],
"settings_ui": "settings.json", "settings_ui": "settings.json",
"main": "main.js" "main": "main.js"
} }

View File

@@ -1,12 +1,12 @@
[ [
{ {
"name": "username", "name": "username",
"type": "input-text", "type": "input-text",
"label": "账号" "label": "账号"
}, },
{ {
"name": "password", "name": "password",
"type": "input-text", "type": "input-text",
"label": "密码" "label": "密码"
} }
] ]

View File

@@ -1,18 +1,18 @@
(async function () { (async function () {
setGameMetrics(1920, 1080, 2); setGameMetrics(1920, 1080, 2);
await sleep(1000); await sleep(1000);
keyPress("ESCAPE") keyPress("ESCAPE")
await sleep(1000); await sleep(1000);
click(50, 1030); click(50, 1030);
log.info("退出"); log.info("退出");
await sleep(1000); await sleep(1000);
click(1000, 750); click(1000, 750);
log.info("确认"); log.info("确认");
await sleep(20000); await sleep(20000);
click(1800, 1000); click(1800, 1000);
log.info("切换账号"); log.info("切换账号");
await sleep(1000); await sleep(1000);
click(1000, 550); click(1000, 550);
log.info("确认"); log.info("确认");
await sleep(4000); await sleep(4000);
})(); })();

View File

@@ -1,12 +1,12 @@
{ {
"manifest_version": 1, "manifest_version": 1,
"name": "退出并重登", "name": "退出并重登",
"version": "1.0", "version": "1.0",
"description": "退出游戏并退出账号", "description": "退出游戏并退出账号",
"authors": [ "authors": [
{ {
"name": "愚溪", "name": "愚溪",
} }
], ],
"main": "main.js" "main": "main.js"
} }

View File

@@ -0,0 +1,165 @@
{
"info": {
"name": "香辛果-善见地-水天丛林-14个",
"type": "collect",
"author": "起个名字好难的喵",
"version": "1.0",
"description": "",
"bgiVersion": "0.42.3"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 2806.47,
"y": -1790.44,
"action_params": ""
},
{
"id": 2,
"x": 2837.1,
"y": -1801.61,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 3,
"x": 2841.76,
"y": -1821.84,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 4,
"x": 2852.29,
"y": -1832.36,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 5,
"x": 2877.13,
"y": -1845.19,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 6,
"x": 2895.71,
"y": -1785.65,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 7,
"x": 2904.73,
"y": -1776.9,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 8,
"x": 2883.06,
"y": -1735.11,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 9,
"x": 2882.9,
"y": -1731.1,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 10,
"x": 3028.63,
"y": -1680.12,
"type": "path",
"move_mode": "fly",
"action": "stop_flying",
"action_params": ""
},
{
"id": 11,
"x": 3034.78,
"y": -1681.57,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 12,
"x": 3038.53,
"y": -1685.24,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 13,
"x": 3024.81,
"y": -1705.95,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 14,
"x": 3012.48,
"y": -1751.94,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 15,
"x": 3034.94,
"y": -1787.81,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 16,
"x": 3058.74,
"y": -1768.0,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 17,
"x": 3056.89,
"y": -1765.55,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
}
]
}

View File

@@ -0,0 +1,192 @@
{
"info": {
"name": "香辛果-善见地-河谷的黯道-18个",
"type": "collect",
"author": "起个名字好难的喵",
"version": "1.0",
"description": "",
"bgiVersion": "0.42.3"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 2965.45,
"y": -1452.86,
"action_params": ""
},
{
"id": 2,
"x": 2968.79,
"y": -1445.59,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 3,
"x": 2979.68,
"y": -1422.12,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 4,
"x": 3017.02,
"y": -1425.87,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 5,
"x": 3019.15,
"y": -1422.56,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 6,
"x": 3047.79,
"y": -1407.5,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 7,
"x": 3049.98,
"y": -1384.72,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 8,
"x": 3005.12,
"y": -1332.27,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 9,
"x": 2999.88,
"y": -1329.58,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 10,
"x": 2977.28,
"y": -1298.53,
"type": "path",
"move_mode": "fly",
"action": "stop_flying",
"action_params": ""
},
{
"id": 11,
"x": 2958.25,
"y": -1298.65,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 12,
"x": 2978.82,
"y": -1302.27,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 13,
"x": 2992.88,
"y": -1303.71,
"type": "target",
"move_mode": "fly",
"action": "stop_flying",
"action_params": ""
},
{
"id": 14,
"x": 2997.89,
"y": -1303.7,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 15,
"x": 3012.0,
"y": -1292.85,
"type": "target",
"move_mode": "fly",
"action": "stop_flying",
"action_params": "1000"
},
{
"id": 16,
"x": 3072.47,
"y": -1308.35,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 17,
"x": 3090.11,
"y": -1326.69,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 18,
"x": 3106.44,
"y": -1317.29,
"type": "target",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 19,
"x": 3128.91,
"y": -1336.55,
"type": "path",
"move_mode": "walk",
"action": "",
"action_params": ""
},
{
"id": 20,
"x": 3126.97,
"y": -1350.64,
"type": "target",
"move_mode": "fly",
"action": "",
"action_params": ""
}
]
}