MCPcopy Index your code
hub / github.com/SuperMonster003/Ant-Forest

github.com/SuperMonster003/Ant-Forest @v2.3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.3.1 ↗ · + Follow
2,104 symbols 3,036 edges 46 files 337 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img alt="AF_Banner" src="https://raw.githubusercontent.com/SuperMonster002/Hello-Sockpuppet/master/ant-forest-banner_374%C3%97106.png"/>

基于 Auto.js 的蚂蚁森林能量自动收取脚本

Auto.js-based ant forest energy auto-collect script

<a href="https://github.com/SuperMonster003/Ant-Forest/releases/latest"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/SuperMonster003/Ant-Forest"/></a>
<a href="https://github.com/SuperMonster003/Ant-Forest/issues"><img alt="GitHub closed issues" src="https://img.shields.io/github/issues/SuperMonster003/Ant-Forest?color=009688"/></a>
<a href="https://github.com/SuperMonster003/AutoJs6"><img alt="GitHub AutoJs6 repository" src="https://img.shields.io/badge/auto.js->= 6.2.0-67a91b"/></a>
<a href="https://github.com/topics/javascript"><img alt="GitHub top language" src="https://img.shields.io/github/languages/top/SuperMonster003/Ant-Forest?color=eb8031"/></a>
<a href="https://www.codefactor.io/repository/github/SuperMonster003/Ant-Forest"><img alt="CodeFactor Grade" src="https://www.codefactor.io/repository/github/SuperMonster003/Ant-Forest/badge"/></a>



<a href="https://github.com/SuperMonster003/Ant-Forest/commit/d43a0119b214a17062501ea8a938b13bd97d2028"><img alt="Created" src="https://img.shields.io/date/1552924800?color=2e7d32&label=created"/></a>
<a href="https://github.com/SuperMonster003/Ant-Forest/find/master"><img alt="GitHub Code Size" src="https://img.shields.io/github/languages/code-size/SuperMonster003/Ant-Forest?color=795548"/></a>
<a href="https://github.com/SuperMonster003/Ant-Forest/find/master"><img alt="GitHub Code Lines" src="https://img.shields.io/tokei/lines/github/SuperMonster003/Ant-Forest?color=37474F"/></a>
<a href="https://github.com/SuperMonster003/Ant-Forest/blob/master/LICENSE"><img alt="GitHub License" src="https://img.shields.io/github/license/SuperMonster003/Ant-Forest?color=534BAE"/></a>
<a href="https://www.jetbrains.com/?from=Ant-Forest"><img alt="JetBrains supporter" src="https://img.shields.io/badge/supporter-JetBrains-ee4677"/></a>
<a href="https://github.com/SuperMonster003/Ant-Forest/blob/master/assets/docs/TODO.md"><img alt="Todo list" src="https://img.shields.io/badge/todo-56-C63F17"/></a>

待办事项


Status Task Date Cost Progress
✔️ 推迟任务加入下次关屏选项 2021-11-01 18:16:56 5 1
✔️ 能量雨加入近似区域点击检测 2021-10-27 14:48:18 3 1
✔️ v2.2.0 发布后检查 documents 相关的链接 2021-10-26 23:07:16 1 1
✒️ 扩展模块及插件重构 2021-10-26 14:37:07 ! 8 0.39
✒️ 排行榜策略加入黑名单检测方案配置 (#529) 2021-10-31 18:57:17 ! 5 0.00
✒️ 事件监测配置 (#533) 2021-10-26 10:50:40 ! 6 0.00
✒️ 自动关闭屏幕配置 (#476) 2021-10-26 11:15:11 ! 6 0.00
✒️ 提取 JSDoc@typedef 到 TS 声明文件 2021-10-25 22:25:18 10 0.94
✒️ 保护地巡护工具 2021-10-26 10:34:25 9 0.20
✒️ 将 tool functions 转换为 OOP 2021-10-25 22:24:13 10 0.18
✒️ 分离 appx 模块 (autojs / alipay ...) 2021-10-25 22:24:13 6 0.17
✒️ 启动器模块化 2021-10-26 08:25:42 10 0.00
✒️ 配置工具模块化 2021-10-26 08:24:34 10 0.00

全部待办事项可参阅 TODO.md (共计 56 项)


使用说明


  1. 检查设备环境

  2. 操作系统: Android 7.0 (API 24) 及以上

  3. 下载并安装 Auto.js

  4. AutoJs6 (开源免费)

自 v2.3.0 起将仅支持使用 AutoJs6 运行当前项目
因项目运行依赖于 Rhino 引擎 的部分 新特性 及 AutoJs6 的部分新 API 及内置模块

  1. 下载并部署项目 (任意一种方式)

  2. 下载项目部署工具 (*.js)

    1. 将部署工具 (脚本文件) 保存另存为 至本地存储
    2. AutoJs6 直接运行 (或导入后运行) 脚本文件完成部署
    3. 部署后可能需要关闭并重启 AutoJs6 才能看到项目目录
  3. 下载最新项目数据包 (*.zip)
    1. 将项目数据包解压到本地存储
    2. 定位到设备的内部存储目录 如:
      /内部存储/ /Internal Storage/ /sdcard/ /storage/emulated/0/
    3. 在此目录下找到 AutoJs6 默认工作目录
      · 中文系统默认目录 ./脚本/
      · 英文系统默认目录 ./Scripts/
    4. 若不存在则需手动建立工作目录
      或在 AutoJs6 软件中设置工作目录
    5. 将解压后的项目文件夹放置在工作目录中

项目支持更新版本的自动检查/提示/下载/版本忽略等相关功能

  1. 使用 Auto.js 运行项目

  2. 运行 ant-forest-launcher.js 启动项目

  3. 运行 ant-forest-settings.js 配置项目

项目 tools 文件夹包含 小工具


使用指南



功能简介


  • 自动收取好友能量
  • 自动收取/监测自己能量
  • 收取结果统计/展示

查看更多功能

  • 控制台消息提示
    · 开发者测试日志 (默认关闭)
  • 自动解锁屏幕
    · 提供解锁密码录入等配置
  • 定时任务与循环监测
    · 好友排行榜样本复查
    · 主页能量球循环监测
    · 定时任务自动管理
  • 多任务自动排队
  • 脚本运行安全
    · 运行失败自动重试
    · 单次运行最大时间限制
    · 排他性任务最大排队时间限制
    · 脚本炸弹预防
  • 事件监测与处理
    · 账户登出
    · 屏幕意外关闭
    · 来电响铃或通话
  • 多语言支持 (简体中文/英语)
    · 自动切换简体中文语言
  • 黑名单机制
    · 能量保护罩黑名单自动管理
    · 用户自定义黑名单管理 (列表选择/检索选择)
  • 项目管理
    · 在线更新项目
    · 本地备份项目
    · 本地或服务器还原项目
    · 项目更新提示/版本忽略
  • 信息加密存储
    · 使用密文存储账户信息/解锁密码等敏感信息
  • 账户功能
    · 防止其他账户意外收取 (需录入主账户信息)
    · 主账户操作完毕可自动回切之前登录的账户
  • 统计功能
  • 适应恶劣条件
    · 脚本在网络条件较差时仍可正常运行或识别异常
  • 图形化配置工具
    · 基于UI的配置工具 可详细配置项目参数

版本历史


v2.3.1

2023/01/21
  • 修复 蚂蚁森林页面更新后无法收取自己及好友能量的问题

v2.3.0

2022/03/20 - 代码重构 谨慎升级
  • 优化 重构部分模块以适配 AutoJs6

v2.2.2

2021/11/01
  • 新增 运行前提示对话框的推迟任务列表增加"息屏时"选项
  • 修复 解锁密码为空时无法解锁设备的问题
  • 修复 逛一逛方案无法识别能量雨页面判断条件的问题
  • 修复 配置工具输入忽略版本内容时可能导致脚本崩溃的问题
  • 修复 设备屏幕水平方向启动项目后刷新屏显参数失败的问题 issue #534
  • 修复 配置工具定时任务控制面板定时任务及任务类型识别异常的问题
  • 管理 项目图片资源文件夹移除打赏二维码并迁移至README.md中
  • 管理 项目图片资源文件夹内增加.nomedia防止媒体库中出现无关资源
更多版本历史可参阅

相关项目



打赏 (Tip)


查看详情 (Click to show details)

To tip online, scan the QR code below

扫描对应二维码可打赏

I believe I could make it better with your support :)

感谢每一份支持和鼓励

Alipay sponsor WeChat sponsor

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 2,103
Interface 1

Languages

TypeScript100%

Modules by API surface

tools/ant-forest-deployment-tool.min.js535 symbols
ant-forest-launcher.js461 symbols
modules/ext-device.js194 symbols
ant-forest-settings.js188 symbols
modules/ext-dialogs.js72 symbols
modules/ext-a11y.js71 symbols
modules/ext-app.js70 symbols
modules/mod-ant-forest.js51 symbols
modules/ext-images.js48 symbols
modules/mod-global.js46 symbols
modules/mod-project.js39 symbols
modules/ext-console.js38 symbols

For agents

$ claude mcp add Ant-Forest \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page