GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Yuurisan-N1/Emberwing-Miniapp: Lightweight Rust helper for Emberwing Mini App covering automated hatchery cycles, arena combat optimization, gear crafting, village management, and custom proxy routing.

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
assets
assets
 
 
cuda
cuda
 
 
downloader
downloader
 
 
engine
engine
 
 
scripts
scripts
 
 
src
src
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
build.rs
build.rs
 
 
config.json
config.json
 
 
data.txt
data.txt
 
 
proxy.txt
proxy.txt
 
 
run.sh
run.sh
 
 

Repository files navigation

header typing

rust platform author

Emberwing Bot is a full automation bot for the Emberwing dragon game Telegram Miniapp.
It handles a comprehensive cycle of 21 feature modules: daily gift, referrals, quests, achievements, festival events, season pass, island management, villagers, hatchery, dragon management, gear forge, arena combat with simulation-based team selection, arena gold farming, expeditions, raids, hunts, camps, monster battles, area clears, tavern rolls, and the Forge festival tile puzzle solver with GPU-accelerated Monte Carlo planning, all running in a single account loop with presence heartbeat, proxy support, and a live countdown between cycles.
Built and distributed by Yuurisandesu.


Table of Contents

  • Requirements
  • Installation
  • Configuration
  • Running the Bot
  • Download Prebuilt Binary
  • Features
  • File Structure
  • Disclaimer

Requirements

  • Rust 1.70+ (includes cargo) -- only needed if building from source
  • Ruby 3.0+ -- only needed to run the downloader script
  • Git
  • CUDA Toolkit 12.x optional, only needed to build the GPU backend for Forge

Installation

Install Rust

Linux / macOS:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

Windows:

Download and run the installer from https://rustup.rs, then restart your terminal.

Termux (Android):

pkg update && pkg install proot-distro
proot-distro install ubuntu
proot-distro login ubuntu

Then inside Ubuntu:

apt update && apt install -y curl git build-essential pkg-config libssl-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

Clone the Repository

git clone https://github.com/Yuurisan-N1/Emberwing-Miniapp.git
cd Emberwing-Miniapp

Configuration

1. Account (data.txt)

Fill data.txt with your Telegram WebApp initData. This bot runs a single account only the first line is used:

user=%7B%22id%22...&hash=abc123

initData can be obtained from the browser DevTools when opening Emberwing on Telegram Web.

2. Proxy (proxy.txt)

Fill proxy.txt with one proxy (optional, leave empty to run without proxy):

host:port
host:port:user:pass
http://user:pass@host:port
socks5://user:pass@host:port

3. Bot Settings (config.json)

config.json is auto-generated on first run with all defaults filled in. Every feature module has its own section with an enabled toggle and per-action flags. Set loop_cycle.enabled to true to keep the bot running indefinitely between cycles. Key settings per module:

Module Notable Config
loop_cycle enabled, sleep_seconds
presence enabled -- heartbeat ping to keep session alive
arena max_fights_per_cycle, max_rerolls, min_power_ratio, stop_after_losses, gold_floor, sim_runs, farm_unranked
expeditions resource (meat/logs/etc), hours, attack, min_power_ratio
raids search, chest, defense, min_power_ratio
tavern kind (d/s/etc), max_rolls_per_cycle
dragons level_up, abilities, rarity_up
eggs merge, incubate, open_free
island build, upgrade, collect, assign_auto, complete_jobs, den_collect
gear craft, equip, level_up, fuse
forge enabled, max_stages, samples, threads, deadline_ms, nodes, worlds, buy_boosters

Running the Bot

There are three ways to get the binary: build from source, download manually, or use the downloader script. Each has a different run path.


Option A - Build from Source

Using run.sh (Linux / macOS / Termux)

run.sh builds and runs in one command. Make it executable first:

chmod +x run.sh

Then choose a mode:

./run.sh direct    # build and run in foreground (default)
./run.sh nohup     # build and run in background, logs saved to emberwing-bot.log
./run.sh screen    # build and run in a detached screen session
./run.sh tmux      # build and run in a detached tmux session
./run.sh logs      # tail the log file
./run.sh stop      # stop the running bot process

Attach to a background session anytime:

# screen
screen -r emberwing-bot

# tmux
tmux attach -t emberwing-bot

Using make (Linux / macOS)

make release   # optimized release build
make start     # build release and run immediately
make run       # build debug and run
make check     # check for errors without building
make fmt       # format the code
make clean     # remove all build artifacts
make size      # show release binary size

Manual cargo build

Build the binary first:

cargo build --release

Then run depending on your platform:

# Linux / macOS / Termux
./target/release/emberwing-bot

# Windows
.\target\release\emberwing-bot.exe

Option B - Download Manually from Releases

Download the binary for your platform from: https://github.com/Yuurisan-N1/Emberwing-Miniapp/releases/latest

File Platform
emberwing-bot-linux-x86_64 Linux x86_64
emberwing-bot-linux-aarch64 Linux ARM64
emberwing-bot-linux-armv7 Linux ARMv7
emberwing-bot-windows-x86_64.exe Windows x86_64
emberwing-bot-macos-aarch64 macOS Apple Silicon
emberwing-bot-android-aarch64 Android ARM64 (Termux)
emberwing-bot-android-armv7 Android ARMv7 (Termux)

Place the downloaded binary in the same folder as your data.txt, proxy.txt, and config.json, then make it executable and run it from that folder.

Linux / macOS / Android (Termux):

chmod +x emberwing-bot-linux-x86_64
./emberwing-bot-linux-x86_64

Windows:

.\emberwing-bot-windows-x86_64.exe

Option C - Downloader Script

The downloader script fetches the correct binary directly from the Releases page for your platform. The binary is saved inside the downloader/ folder. Ruby is required to run the script see how to install Ruby below.

Install Ruby:

Linux:

sudo apt install ruby

macOS:

brew install ruby

Windows: Download from https://rubyinstaller.org and follow the installer.

Termux:

pkg install ruby

Then run:

ruby downloader/bot.rb

The script shows a numbered menu:

1. Linux x86_64
2. Linux aarch64
3. Linux armv7
4. Android aarch64
5. Android armv7
6. macOS aarch64
7. Windows x86_64

Enter the number for your platform. The binary downloads with a live progress bar and is set to executable automatically on Linux and Android. After the download finishes, move the binary and your config files together in the same folder, then run it:

Linux / macOS / Android (Termux) -- from inside downloader/:

cd downloader
./emberwing-bot-linux-x86_64

Or move the binary to where your config files are first:

mv downloader/emberwing-bot-linux-x86_64 .
./emberwing-bot-linux-x86_64

Windows:

move downloader\emberwing-bot-windows-x86_64.exe .
.\emberwing-bot-windows-x86_64.exe

Features

Daily Gift

The bot checks whether the daily gift can be claimed. If available, it claims the reward and logs the day number and reward. If already claimed, the time until next reset is logged.

Referrals

The bot claims all pending referral bonuses and logs the amount received.

Quests

The bot collects all completable main quests, side quests, and quest chain steps and claims them in sequence.

Achievements

The bot claims all newly unlocked achievement rewards.

Festival and Events

The bot claims all available free festival and top-up event rewards for the current event season.

Season Pass

The bot claims all unlocked free season pass rewards.

Island Management

The bot collects all ready building outputs, completes all finished jobs, auto-assigns idle villagers, builds available buildings, upgrades existing ones, collects dragon den output, and applies any available speedups.

Villagers

The bot upgrades villager fragments when enough are available.

Hatchery

The bot merges egg pairs of the same tier and element up to the maximum tier cap, incubates unmounted eggs, and opens any free-ready eggs.

Dragons

The bot levels up all dragons that have enough XP, activates available abilities, and upgrades rarity when fragment requirements are met.

Gear Forge

The bot crafts all available gear recipes, equips the strongest available gear to each dragon, levels up equipped gear, fuses duplicate gear pieces, salvages and dismantles excess items.

Arena Farm

If the gold balance drops below the configured gold_floor or the team is outmatched by the unranked pool, the bot fights unranked opponents to recover gold before the main ranked session begins.

Arena Combat

The bot selects the optimal 3-dragon team using a built-in combat simulator that runs configurable sim_runs Monte Carlo simulations per opponent. It rerolls opponents up to max_rerolls times to find a winnable matchup above min_power_ratio. The session stops after stop_after_losses consecutive losses or after max_fights_per_cycle fights. Expected trophy value is tracked and the bot avoids fights with negative trophy expectation when configured.

Expeditions

The bot collects all completed expedition returns, starts new expeditions in available slots for the configured resource type and duration, and optionally attacks enemy expeditions above the min_power_ratio threshold.

Raids

The bot opens the daily raid chest if the win requirement is met, collects all completed defense rewards, and searches for new raid targets above the min_power_ratio threshold.

Hunts, Camps, Monsters, and Areas

The bot runs all available hunt boss fights, clears active camps, fights available monsters, and progresses through unlocked map areas.

Tavern

The bot spends tickets on tavern rolls up to max_rolls_per_cycle per cycle. The kind setting controls which ticket type is spent. Remaining pity progress is logged when no tickets are available.

Forge Festival Tile Puzzle

The bot plays the Forge festival tile-matching puzzle automatically. For each available ticket, it starts a stage, reads the live board state and layout geometry, and plans moves using a Monte Carlo tree search. The planner samples configurable numbers of random rollouts per candidate move across a configurable thread pool, scoring each move by estimated win probability. On systems with a compatible NVIDIA GPU, the Monte Carlo sampling runs on the GPU for significantly higher throughput the bot detects the GPU at startup and reports whether the CUDA backend is active or whether it falls back to the CPU pool. If the bot gets stuck with no valid move and buy_boosters is enabled, it purchases a booster pack to unblock the board and continues. The bot resumes any interrupted live stage on startup before starting new ones. Up to max_stages stages are cleared per cycle. Available tickets including free and paid are counted and accrued passively between cycle checks.

GPU Backend (optional)

To enable the GPU backend for the Forge puzzle solver, build the CUDA shared library first using the provided script. CUDA Toolkit 12.x and nvcc are required. The script auto-detects the installed GPU compute capability and compiles for all supported architectures:

bash scripts/build_cuda.sh

The compiled library is placed in cuda/. When the bot starts, it detects and loads the library automatically if present. If the library is absent or fails to load, the bot falls back to the CPU thread pool without any configuration change required.

Presence

A background heartbeat task pings the server at a regular interval to keep the session alive while the bot is running between steps.

Single Account

This bot runs one account per instance. Only the first line of data.txt is used. If the file contains extra lines they are noted in the log. To run multiple accounts, run multiple instances in separate folders each with their own data.txt.

Proxy Support

A single proxy is loaded from proxy.txt. If network errors accumulate during a cycle, the bot rotates to the next proxy in the pool automatically. Running without proxy is fully supported.

Loop Cycle

Set loop_cycle.enabled to true in config.json to keep the bot running indefinitely. After each cycle completes, a live HH:MM:SS countdown shows the wait before the next one. Set it to false for a single-run mode that exits after one cycle.


File Structure

Emberwing-Miniapp/
├── .github/
│   └── workflows/
│       └── build.yml                    # CI: 7-target matrix build, artifacts retained 90 days
├── src/
│   ├── main.rs                          # Entry point, cycle loop, step dispatch
│   ├── core/
│   │   ├── config/                      # Config loading and structs
│   │   ├── network/                     # HTTP client, proxy pool
│   │   ├── state/                       # Snapshot, state model
│   │   └── ui/                          # Banner, logger
│   └── features/
│       ├── auth/                        # Session, account loading, presence, referrals
│       ├── combat/
│       │   ├── arena/                   # Arena logic, sim, policy, farm, econ, memory
│       │   ├── expeditions/             # Expedition collect and start
│       │   ├── hunts/                   # Hunt, camps, monsters, areas
│       │   └── raids/                   # Raid chest, defense, search
│       ├── entities/
│       │   ├── dragons/                 # Dragon level, ability, rarity
│       │   ├── eggs/                    # Egg merge, incubate, open
│       │   ├── gear/                    # Gear craft, equip, level, fuse
│       │   ├── island/                  # Build, upgrade, collect, jobs, den
│       │   ├── tavern/                  # Tavern rolls
│       │   └── villagers/              # Villager fragment upgrade
│       ├── progression/
│       │   ├── achievements/            # Achievement claim
│       │   ├── daily_gift/              # Daily gift claim
│       │   ├── pass/                    # Season pass rewards
│       │   └── quests/                  # Quest and chain claim
│       └── system/
│           ├── event/                   # Festival and top-up event
│           ├── forge/                   # Forge tile puzzle solver, Monte Carlo planner, GPU/CPU dispatch
│           └── notices/                 # Server notices
├── cuda/
│   ├── forge_mc.cu                      # CUDA Monte Carlo kernel
│   ├── forge_ev.cu                      # CUDA evaluation kernel
│   ├── forge_mc.cuh                     # Monte Carlo kernel header
│   ├── forge_ev.cuh                     # Evaluation kernel header
│   └── forge_core.cuh                   # Shared CUDA core definitions
├── engine/
│   ├── boards.h                         # Board representation header
│   └── forge.h                          # Forge engine interface header
├── assets/
│   ├── icon.ico                         # Windows binary icon
│   └── sim_model.json                   # Arena combat simulation model weights
├── lab/
│   ├── collect.py                       # Data collection script for sim model
│   ├── fit.py                           # Model fitting script
│   └── sim.py                           # Simulation development script
├── scripts/
│   ├── build_cuda.sh                    # Build script for CUDA shared library
│   └── package.sh                       # Package script for release distribution
├── Cargo.toml                           # Project manifest and dependencies
├── Cargo.lock
├── build.rs                             # Build script (embeds icon into Windows binary)
├── Makefile                             # make targets: build, run, release, start, clean, size
├── run.sh                               # Run helper: direct, nohup, screen, tmux, logs, stop
├── downloader/
│   ├── bot.rb                           # Interactive downloader script (7 platforms, Ruby)
│   └── utils/
│       └── banner.rb                    # Banner display on startup
├── config.json                          # Auto-generated on first run
├── data.txt                             # Single account initData
└── proxy.txt                            # Proxy (optional)

Disclaimer

This tool is built for educational and technical exploration purposes. Use it wisely and at your own responsibility.


footer

About

Lightweight Rust helper for Emberwing Mini App covering automated hatchery cycles, arena combat optimization, gear crafting, village management, and custom proxy routing.

t.me/emberwing_emb_bot

Topics

async-rustbinarycudarubyrust

Resources

Readme
License
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.