Skip to content

XiaoYiWeio/brown-dust-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Brown Dust 2 Automation

ClawHub Python 3.9+ Zero Dependencies License: MIT

Brown Dust 2 ๅ…จ่‡ชๅŠจ็ญพๅˆฐ + ๅ…‘ๆข็ ไธ€้”ฎๅ…‘ๆข for OpenClaw.

Features

Web Shop Sign-in (API-based)

  • Daily attendance reward (free item every day)
  • Weekly attendance reward
  • Event attendance (7-day login event)
  • All via direct API calls โ€” no browser automation needed

Gift Code Redemption (API-based)

  • Auto-scrape latest codes from BD2Pulse
  • One-click redeem all codes via official API
  • Reports: new success / already redeemed / expired

Install

clawhub install brown-dust-2

Or clone:

git clone https://github.com/XiaoYiWeio/brown-dust-2.git ~/.openclaw/workspace/skills/brown-dust-2

Setup

Sign-in (one-time token setup)

  1. Log in to BD2 Web Shop with Google
  2. Press F12 โ†’ Console โ†’ paste:
    JSON.parse(localStorage.getItem("session-storage")).state.session.accessToken
  3. Save the token:
    python3 scripts/signin.py --save-token "YOUR_TOKEN"

Gift Code (one-time nickname setup)

python3 scripts/redeem.py --save-nickname "YourNickname"

Usage

In OpenClaw

  • "BD2็ญพๅˆฐ" โ€” daily/weekly/event sign-in
  • "BD2ๅ…‘ๆข็ " โ€” auto-redeem all latest codes
  • "BD2ๅ…จ็ญพ" โ€” sign-in + redeem codes

CLI

# Sign-in (daily + weekly + event)
python3 scripts/signin.py

# Check event info
python3 scripts/signin.py --event-info

# Daily only
python3 scripts/signin.py --daily-only

# Redeem all codes
python3 scripts/redeem.py

# List codes without redeeming
python3 scripts/redeem.py --list

# JSON output (both scripts support --json)
python3 scripts/signin.py --json

Architecture

brown-dust-2/
โ”œโ”€โ”€ SKILL.md          # OpenClaw skill definition
โ”œโ”€โ”€ persona.md        # Agent interaction guide
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ scripts/
    โ”œโ”€โ”€ signin.py     # Web shop sign-in (daily/weekly/event)
    โ””โ”€โ”€ redeem.py     # Gift code scraper + redeemer

How It Works

This skill reverse-engineered the official BD2 Web Shop API:

Function API Auth
Daily attend POST /api/user/attend {type:0} Bearer token
Weekly attend POST /api/user/attend {type:1} Bearer token
Event attend POST /api/event/attend-reward Bearer token
Event info GET /api/event/event-info None
Gift code redeem POST coupon API None (nickname only)

License

MIT

About

๐ŸŽฎ Brown Dust 2 auto gift code redemption + daily sign-in. Zero dependencies. OpenClaw Skill.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages