LastWarBot 是一款面向 Windows 11 的 Last War: Survival 自动化辅助工具.
- 自动等待并检测
LastWar.exe - 自动激活游戏窗口并将客户区调整为
1920x1080 - 自动识别并点击 同盟帮助
- 自动识别 挖掘机, 可通过
OpenClaw通知QQBot - 识别 资源: 等级, 体力, 粮食, 铁矿, 金币, 战力, 钻石
- 支持进入 货车界面, 检查
UR碎片
- Windows 11
Last War: SurvivalPC 版- Python
3.11 - OCR
PaddleOCR + PaddlePaddle
lastwar_bot/: 主程序源码images/templates/: 运行必需模板图images/samples/: 本地调试样本图sounds/: 提示音文件logs/events/: 事件日志config.yaml: 配置文件release/LastWarBot/: EXE 发布目录
pip install -e .
python -m lastwar_bot --config config.yaml也可直接运行 start.bat .
无需安装Python, 直接运行:
release/LastWarBot/LastWarBot.exerelease/LastWarBot/start.bat
注意: 发布时请保留整个 release/LastWarBot/ 目录.
当前配置按4个业务分栏组织:
- 资源
ocr.enabled: OCR 总开关ocr.stats_enabled: 资源识别开关ocr.interval_seconds: 资源刷新周期
- 同盟帮助
cooldowns.handshake_seconds: 同盟帮助冷却时间sounds.handshake_enabled: 同盟帮助提示音开关
- 挖掘机
matching.thresholds.excavator: 挖掘机匹配阈值matching.regions.excavator: 挖掘机检测区域cooldowns.excavator_alert_seconds: 挖掘机提醒冷却时间openclaw.enabled: OpenClaw 总开关openclaw.cli_executable: OpenClaw CLI 路径openclaw.cli_target: QQBot 目标地址
- 货车
cargo.min_target_power_m: 货车战力上限cargo.ur_fragment_alert_count:UR碎片数量阈值cargo.max_refresh_attempts: 货车刷新上限
F12: 暂停 / 恢复 BotF5: 从基地重新定位车站并进入货车搜索F6: 货车搜索中用于暂停 / 继续, 或跳过当前目标货车Ctrl-C: 退出 Bot
- 在基地界面按
F5 - 程序自动缩小地图并点击车站
- 进入货车界面后识别金色和紫色货车
- 逐一检查战力和
UR碎片 - 未找到目标时自动刷新货车列表
logs/events/YYYY-MM-DD.log 中默认记录 同盟帮助 和 挖掘机.
建议上传:
lastwar_bot/images/templates/sounds/README.mdLICENSEconfig.yamlpyproject.tomlLastWarBot.spec
建议不要上传:
.venv/build/dist/release/logs/images/samples/