下载地址:https://www.pan38.com/share.php?code=pvvmX 提取码:1283
阴阳师脚本特点:
支持三种组队模式配置
包含完整的异常处理和超时机制
采用颜色识别技术判断战斗状态
自动资源收集和结算处
跳一跳脚本特点:
基于物理公式的精准距离计算
动态边缘检测算法定位目标平台
自适应屏幕分辨率的参数校准
/**
- 阴阳师自动刷御魂脚本
- 功能:自动组队/单人刷御魂,支持掉线重连、体力检测、式神切换
*/
auto(); // 启用无障碍服务
device.keepScreenOn(); // 保持屏幕常亮
// 基础配置参数
const CONFIG = {
mode: 1, // 1-单人 2-组队队长 3-组队队员
times: 50, // 刷本次数
timeout: 30000, // 超时时间(ms)
screenshotPath: "/sdcard/onmyoji_screenshot/" // 截图保存路径
};
// 式神阵容配置
const SHIKIGAMI = {
aoe: ["大天狗", "泷夜叉姬", "阿修罗"], // 群体输出
single: ["鬼切", "酒吞童子"], // 单体输出
support: ["座敷童子", "追月神", "丑时之女"] // 辅助
};
// 主程序入口
function main() {
prepareEnvironment();
for (let i = 0; i < CONFIG.times; i++) {
log("开始第 " + (i + 1) + " 次御魂挑战");
if (!startBattle()) break;
if (!waitBattleEnd()) break;
collectRewards();
}
cleanUp();
}
// 环境准备
function prepareEnvironment() {
if (!files.exists(CONFIG.screenshotPath)) {
files.createDir(CONFIG.screenshotPath);
}
// 关闭其他可能干扰的APP
killOtherApps();
// 启动游戏
launchApp("阴阳师");
sleep(3000);
}
// 开始战斗流程
function startBattle() {
// 进入御魂界面
click(device.width 0.85, device.height 0.3); // 点击探索
sleep(1000);
click(device.width 0.7, device.height 0.25); // 点击御魂
sleep(1500);
// 选择层数
click(device.width 0.5, device.height 0.6); // 选择10层
sleep(1000);
// 组队模式处理
if (CONFIG.mode === 2) {
click(device.width 0.7, device.height 0.8); // 创建队伍
sleep(2000);
} else if (CONFIG.mode === 3) {
click(device.width 0.3, device.height 0.8); // 匹配队伍
sleep(5000); // 等待匹配时间
}
// 开始挑战
const startBtn = findColor(captureScreen(), "#f3b03e", {
region: [device.width 0.6, device.height 0.8, device.width * 0.3, 100],
threshold: 10
});
if (startBtn) {
click(startBtn.x + 10, startBtn.y + 10);
sleep(3000);
return true;
}
return false;
}
// 等待战斗结束
function waitBattleEnd() {
let timeout = 0;
while (timeout < CONFIG.timeout) {
let screen = captureScreen();
// 检测胜利标志
let victory = findColor(screen, "#ffdf1b", {
region: [device.width 0.4, device.height 0.2, device.width 0.2, 100],
threshold: 10
});
if (victory) {
click(victory.x + 50, victory.y + 50); // 点击任意位置继续
sleep(2000);
return true;
}
// 检测失败标志
let defeat = findColor(screen, "#9a0000", {
region: [device.width 0.4, device.height 0.2, device.width 0.2, 100],
threshold: 10
});
if (defeat) {
log("战斗失败,重新尝试");
click(defeat.x + 50, defeat.y + 50);
sleep(2000);
return false;
}
sleep(1000);
timeout += 1000;
}
log("战斗超时");
return false;
}
// 奖励收集
function collectRewards() {
// 点击结算页面
click(device.width 0.5, device.height 0.8);
sleep(3000);
// 处理可能出现的奖励弹窗
for (let i = 0; i < 3; i++) {
click(device.width 0.5, device.height 0.7);
sleep(1000);
}
}
// 清理环境
function cleanUp() {
device.cancelKeepingAwake();
toast("脚本执行完成");
exit();
}
// 辅助函数:杀死其他可能干扰的APP
function killOtherApps() {
let ignoreList = ["com.netease.onmyoji", "com.android.settings"];
let running = context.getSystemService(context.ACTIVITY_SERVICE).getRunningAppProcesses();
running.forEach(proc => {
if (!ignoreList.includes(proc.processName)) {
kill(proc.processName);
}
});
}
// 启动主程序
main();
/**
- 微信跳一跳自动脚本
- 功能:自动计算距离并按压对应时长
*/
auto();
device.keepScreenOn();
// 游戏区域参数
const GAME_AREA = {
top: 300,
bottom: 1500,
left: 100,
right: 900
};
// 物理参数(需根据设备校准)
const PHYSICS = {
baseTime: 1.35, // 基础时间系数
ratio: 1.0 // 屏幕比例系数
};
// 主程序
function main() {
requestScreenCapture();
while (true) {
let startPoint = findPlayer();
let targetPoint = findTarget();
if (!startPoint || !targetPoint) {
toast("无法定位角色或目标");
sleep(1000);
continue;
}
let distance = Math.sqrt(
Math.pow(targetPoint.x - startPoint.x, 2) +
Math.pow(targetPoint.y - startPoint.y, 2)
);
let pressTime = calculatePressTime(distance);
jump(pressTime);
// 等待落地
sleep(3000);
}
}
// 查找玩家棋子位置
function findPlayer() {
let screen = captureScreen();
// 棋子底部中心点颜色特征
let result = findColor(screen, "#4a4b4f", {
region: [GAME_AREA.left, GAME_AREA.top, GAME_AREA.right - GAME_AREA.left, GAME_AREA.bottom - GAME_AREA.top],
threshold: 10
});
if (result) {
return { x: result.x, y: result.y - 50 }; // 向上偏移50像素获取中心点
}
return null;
}
// 查找目标平台位置
function findTarget() {
let screen = captureScreen();
// 目标平台顶部边缘检测
let edgePoints = [];
for (let y = GAME_AREA.top; y < GAME_AREA.bottom; y += 5) {
for (let x = GAME_AREA.left; x < GAME_AREA.right; x += 5) {
let pixel = images.pixel(screen, x, y);
let nextPixel = images.pixel(screen, x, y + 1);
// 检测颜色突变(边缘)
if (Math.abs(pixel - nextPixel) > 1000000) {
edgePoints.push({ x, y });
}
}
}
// 分析找到的平台顶点
if (edgePoints.length > 0) {
let centerX = edgePoints.reduce((sum, p) => sum + p.x, 0) / edgePoints.length;
let minY = Math.min(...edgePoints.map(p => p.y));
return { x: centerX, y: minY };
}
return null;
}
// 计算按压时间
function calculatePressTime(distance) {
return distance PHYSICS.baseTime PHYSICS.ratio;
}
// 执行跳跃
function jump(pressTime) {
let x = device.width / 2;
let y = device.height * 0.8;
press(x, y, pressTime);
}
// 启动脚本
main();