A Veloren bot that buys, sells and trades with players.
Go to file
2024-07-11 04:32:37 -04:00
assets/common Initial commit 2024-07-03 19:04:49 -04:00
config Add admin feature; Make 'take' command admin-only 2024-07-11 00:36:37 -04:00
src Fix bug by removing /say commands 2024-07-11 02:58:52 -04:00
.gitignore Separate secrets and config files 2024-07-08 14:09:15 -04:00
Cargo.lock Add new log; Change veloren version to weekly tag 2024-07-10 00:20:50 -04:00
Cargo.toml Add new log; Change veloren version to weekly tag 2024-07-10 00:20:50 -04:00
Dockerfile Add even more polish 2024-07-08 22:01:07 -04:00
LICENSE Expand README; Add LICENSE 2024-07-11 04:32:37 -04:00
README.md Expand README; Add LICENSE 2024-07-11 04:32:37 -04:00
rust-toolchain Initial commit 2024-07-03 19:04:49 -04:00

Veloren Trading Bot

A bot that buys, sells and trades with players.

The bot is containerized and can be run without compiling or building anything. Alternatively, you can clone this repository and build the image yourself or build the binary directly with Cargo if you are familiar with Rust.

Prerequisites

You must have either Docker or Podman installed.

Usage

All of these steps can be done with Docker but Podman is shown for the examples. If you use Docker, just replace "podman" with "docker" in your commands.

Setup

Create a "secrets.toml" file:

# secrets.toml
username = "bot_username"
password = "bot_password"
character = "bot_character"
admins = ["my_username"]

Then create a secret to pass the file securely to the container.

podman secret create secrets.toml secrets.toml

You will also need a "config.toml" and it needs it be in a "config" directory that can be mounted to the container:

# config/config.toml
position = [0, 0, 0] # Change these to the desired X, Y, Z coordinates
orientation = 0 # 0 = North, 90 = West, 180 = South, 270 = East

[buy_prices]
"food.cheese" = 50

[sell_prices]
"consumable.potion_minor" = 150

Running

Run the container:

podman run \
    --detach \
    --name trade_bot \
    --secret secrets.toml \
    -v ./config/:/root/config/ \
    --env CONFIG=/root/config/config.toml \
    --env SECRETS=/run/secrets/secrets.toml \
    --env RUST_LOG=trade_bot \
    git.jeffa.io/jeff/trade_bot

View the log output with podman logs -f trade_bot.

Building

Clone this repository. From the project root:

podman build . -t trade_bot

Then follow the above steps with the tag "trade_bot" instead of "git.jeffa.io/jeff/trade_bot".