blackForestBot

command module
v0.0.0-...-6e4ec00 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

README

Black Forest bot (aka Dark Forest bot)

A telegram bot like werewolfbot with a game like PUBG

Rules

  1. Every player will get a position (x, y) (x and y are double of players). Every player can shoot at a position every night. Player will be killed when someone shoot at his position.
  2. Every shoot would expose one axis of his position.
  3. Player would convert to a BEAST when all axes of his position is exposed. When two players kill each other, BEAST will live.
  4. Player who abort action at night will convert to BEAST.
  5. Two players can unite each other, only of they know.
  6. Players who join a union would not expose his position.
  7. Player can betray his union at night and kill another one, no position is needed.
  8. Player can set a trap at night, player who betrayed you will be killed
  9. Only one player live, or all DEAD

Requirements

  1. Go >= 1.10.3
  2. redis >= 3.0.0
  3. MySQL >= 5.8 or MariaDB

Build

go get -v git.wetofu.top/tonychee7000/blackForestBot # check the directory name, it must be `blackForestBot`
cd blackForestBot
./build.sh

Configuraion File

config.json

{
    "tgApiToken": "OMITTED",  // You may need a bot for this.
    "debug": true,
    "updateTimeout": 60,
    "database": "bl:bl@tcp(127.0.0.1:3306)/blackforest?charset=utf8mb4&parseTime=True",
    "redis": "redis://localhost:6379/1",
    "adminPassword": "OMITTED",  // Change it.
    "threadLimit": 1024
}

Running

You may need to upload some gif for running this game. Just run the bot, and input /admin YOUR_PASSWORD to make admin mode ON. Then just upload gif to the bot with filename in win, lose, start, killed, trapped, beast and finally use /admin without password to make admin mode OFF.

Or you may use official bot

Donation

Patreon PayPal

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package utils used for monitoring
Package utils used for monitoring

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL