NON-PRODUCTION
Mummy — tài liệu ghép client
Payline 5×3 + 3 minigame mua: Treasure Hunt (board 5×5), Boost Chest, Coin Collect.
Ô MG là object {symbol, jackpot, amount}. Trang này chỉ serve khi ENVIRONMENT != production.
1. Tổng quan
| Mục | Giá trị |
|---|---|
| Grid base | 5×3 · reels[col][row] — mỗi ô {symbol,jackpot,amount} |
| Treasure Hunt | Board 5×5, box lớn dần (size, is_grow_up) |
| game_type | 0 Normal · 1 TreasureHunt · 2 BoostChest · 3 CoinCollect |
| Jackpot | minor / major / mega / grand |
| Buy | POST /buy-bonus {bet, game_type} — giá từ gameplay |
| Base path | /api/v1 |
Bắt buộc
GET /gameplay trước. Restore MG dở từ snapshot treasure_hunt / boost_chest / coin_collect.
Loop MG tới is_finish rồi mới spin base.
2. Luồng ghép
GET /gameplay— board, jackpot meters, giá buy, snapshot MG.- Spin
POST /spinshoặc muaPOST /buy-bonus. - Nếu vào Treasure Hunt (spin random hoặc buy type 1) → loop
POST /treasure-hunt. - Boost Chest → loop
POST /boost-chest. Coin Collect → loopPOST /coin-collect. is_finish→ credit chip, về base, mở lại spin.
3. Auth & envelope
Authorization: Bearer <access_token> Content-Type: application/json
{
"code": 0,
"msg": { ... }
}
| code | Ý nghĩa |
|---|---|
0 | OK |
-1 | Unknown / JWT invalid |
-2 | Invalid input |
69 | Wrong state — chưa /gameplay, đang MG |
1000 | Popup i18n (buy không hợp lệ) |
4. Grid & symbol
Base 5×3
4
4
8
1
2
0
12
5
6
7
3
9
10
11
8
Treasure Hunt 5×5
·
·
·
·
·
·
9
12
10
·
·
12
JP
11
·
·
12
9
12
·
·
·
·
·
·
8 Mummy. 9–11 gem. 12 Coin. Ô xanh = box Hunt đang expand. JP = jackpot cell.
| id | Symbol |
|---|---|
| 0–3 | Small |
| 4–7 | Big |
| 8 | Mummy |
| 9–11 | Green / Pink / Blue gem |
| 12 | Coin (có amount) |
| 13 | None — ô MG chưa mở |
5. GET /api/v1/gameplay
GET /api/v1/gameplay
| Field | Type | Client dùng để |
|---|---|---|
jackpot_minor/major/mega/grand | int64 | 4 meter JP |
pay_table / bets / show_bets / bet | — | Bet + pay |
user_money | int64 | Chip |
game_type | int | 0–3 — restore đúng MG |
treasure_chest_price | int64 | Hệ số giá Hunt |
boost_chest_price | int64 | Hệ số giá Boost |
coin_collect_price | int64 | Hệ số giá Coin |
init_reels | int[5][3] | Preview base (symbol id) |
treasure_hunt | object? | Snapshot: bet, size, row, col, gems, max_gems, spins, win_amount, jackpot, reels[][] |
boost_chest / coin_collect | object? | Snapshot: bet, spins, reels, jackpot, win_amount |
{
"code": 0,
"msg": {
"jackpot_minor": 20000, "jackpot_major": 80000, "jackpot_mega": 250000, "jackpot_grand": 2000000,
"pay_table": [[1,2,5],[1.5,3,8],[2,4,10],[2.5,5,12],[3,8,15],[4,10,20],[5,12,25],[8,15,40]],
"bets": [200, 1000, 2000], "show_bets": [200, 1000, 2000], "bet": 1000, "user_money": 500000,
"game_type": 0, "treasure_chest_price": 50, "boost_chest_price": 30, "coin_collect_price": 20,
"init_reels": [[4,0,3],[4,12,9],[8,5,10],[1,6,11],[2,7,8]]
}
}
6. POST /api/v1/spins
POST /api/v1/spins
{ "bet": 1000 }
| Field | Type | Ý nghĩa |
|---|---|---|
user_money / win_amount / bet | — | Chip / win / bet |
game_type | int | 0 hoặc MG vừa trigger |
win_lines | WinLine[] | win_amount, line, line_number, symbol, number_of_symbols |
reels | Symbol[5][3] | Ô {symbol, jackpot, amount} |
treasure_hunt_spin_result | object? | Có khi vừa vào Hunt — bước đầu |
{
"code": 0,
"msg": {
"user_money": 499000, "win_amount": 3000, "bet": 1000, "game_type": 1,
"win_lines": [{ "win_amount": 3000, "line": [4,4,8,1,2], "line_number": 0, "symbol": 4, "number_of_symbols": 2 }],
"reels": [
[{ "symbol": 4, "jackpot": 0, "amount": 0 }, { "symbol": 0, "jackpot": 0, "amount": 0 }, { "symbol": 3, "jackpot": 0, "amount": 0 }],
[{ "symbol": 4, "jackpot": 0, "amount": 0 }, { "symbol": 12, "jackpot": 0, "amount": 500 }, { "symbol": 9, "jackpot": 0, "amount": 0 }],
[{ "symbol": 8, "jackpot": 0, "amount": 0 }, { "symbol": 5, "jackpot": 0, "amount": 0 }, { "symbol": 10, "jackpot": 0, "amount": 0 }],
[{ "symbol": 1, "jackpot": 0, "amount": 0 }, { "symbol": 6, "jackpot": 0, "amount": 0 }, { "symbol": 11, "jackpot": 0, "amount": 0 }],
[{ "symbol": 2, "jackpot": 0, "amount": 0 }, { "symbol": 7, "jackpot": 0, "amount": 0 }, { "symbol": 8, "jackpot": 0, "amount": 0 }]
],
"treasure_hunt_spin_result": {
"reels": [], "positions": [], "spins": 3, "extra_spins": 0, "gems": 0, "size": 1,
"max_gems": 3, "win_amount": 0, "total_win_amount": 0, "is_finish": false,
"user_money": 499000, "is_grow_up": false, "col": 2, "row": 2
}
}
}
7. POST /api/v1/buy-bonus
POST /api/v1/buy-bonus
{ "bet": 1000, "game_type": 1 }
Giá = price field tương ứng × bet. Cấm khi đang MG → code 1000.
| Field | Ý nghĩa |
|---|---|
user_money / bet / game_type / price | Chip sau trừ, bet, MG đã mua, số đã trừ |
treasure_hunt_spin_result | Có nếu mua Hunt — bước mở đầu |
{
"code": 0,
"msg": { "user_money": 450000, "bet": 1000, "game_type": 1, "price": 50000 }
}
8. POST /api/v1/treasure-hunt
POST /api/v1/treasure-hunt
{ }
| Field | Ý nghĩa |
|---|---|
reels | Board 5×5 Symbol |
positions | Ô vừa collect |
spins / extra_spins | Lượt còn / lượt cộng |
gems / max_gems / size | Gem trong box, mốc, cạnh box |
win_amount / total_win_amount | Win bước / cộng dồn |
is_finish | Hết Hunt — credit user_money |
is_grow_up | Box nở (size++) |
col / row | Neo box |
{
"code": 0,
"msg": {
"reels": [[{ "symbol": 13, "jackpot": 0, "amount": 0 }, { "symbol": 9, "jackpot": 0, "amount": 0 }]],
"positions": [[1],[1,2],[2]], "spins": 2, "extra_spins": 1, "gems": 2, "size": 2, "max_gems": 3,
"win_amount": 800, "total_win_amount": 800, "is_finish": false, "user_money": 450000,
"is_grow_up": true, "col": 1, "row": 2
}
}
9. POST /boost-chest & /coin-collect
POST /api/v1/boost-chest
{ }
POST /api/v1/coin-collect
{ }
Cùng shape. Cheat non-prod: {"symbols": [[...]]}.
| Field | Ý nghĩa |
|---|---|
bet / spins | Bet / lượt còn |
reels | Board MG |
jackpot | Loại JP nếu trúng |
rewards | [{col,row,symbol}] ô vừa nổ |
win_amount / is_finish / user_money | Win, hết MG, chip |
{
"code": 0,
"msg": {
"bet": 1000, "spins": 2,
"reels": [[{ "symbol": 12, "jackpot": 0, "amount": 200 }]],
"jackpot": 0,
"rewards": [{ "col": 0, "row": 0, "symbol": { "symbol": 12, "jackpot": 0, "amount": 200 } }],
"win_amount": 200, "is_finish": false, "user_money": 470000
}
}
Loop đúng endpoint theo
game_type tới is_finish. Đừng mix Hunt với Boost.10. Animation
- Base: highlight
win_lines. Coin trên base hiệnamount. - Hunt: vẽ 5×5, box từ
col/row/size.is_grow_up→ expand. Collectpositions. - Boost/Coin: overlay
rewardstừng ô, cộng win, JP fanfare nếujackpot > 0. - Hết MG: lấy chip từ
user_money, vềgame_type = 0.
11. Cheat (chỉ non-prod)
{ "bet": 1000, "reels": [[4,0,3],[4,12,9],[8,5,10],[1,6,11],[2,7,8]] }
MG: body {"symbols": ...} cùng shape board MG. Production bỏ qua.
12. Error & tiền
| Tình huống | Hành vi |
|---|---|
| HTTP 401 | Relogin |
| code 69 | GET /gameplay — restore đúng MG |
| code 1000 | Popup buy không hợp lệ |
HTTP 400 blocked | User đang room PvP |
| Event | Chip |
|---|---|
| Base spin | −bet; +win_amount |
| Buy bonus | −price |
| MG giữa chừng | Chưa credit tổng |
MG is_finish | +win vào user_money |
13. Checklist client
GET /gameplaytrước. Restore snapshot MG nếugame_type != 0.- Ô MG luôn object
{symbol,jackpot,amount}— đừng parse int. - Hunt 5×5; loop đúng endpoint tới
is_finish. - Giá buy = price × bet. Khóa buy khi đang MG.
- Không spam 2 request song song.