Skip to content

A Discord bot for Tibia players that calculates and predicts a character's stamina regeneration, helping you determine your future hunting and optimize XP gain.

Notifications You must be signed in to change notification settings

C-Valen/staminabot

Repository files navigation

Tibia Stamina Bot

This Discord bot is a handy tool for Tibia players, designed to help you keep track of your character's stamina regeneration and plan your hunting sessions more effectively. No more guessing when you'll hit that sweet spot for bonus experience!

What it Does

The bot calculates your character's predicted stamina at a future point in time, taking into account Tibia's unique two-phase stamina regeneration system:

  • Normal Regeneration: 1 stamina minute recovers every 3 real-life minutes (up to 39:00 stamina).
  • Bonus Regeneration: 1 stamina minute recovers every 6 real-life minutes (from 39:00 to 42:00 stamina).

This helps you see exactly how much stamina you'll have, whether you're aiming for full bonus XP or just a quick top-up.

How to Use It

Simply use the /staminaat slash command in any Discord channel where the bot is present.

Command: /staminaat

Calculates your character's stamina at a specified future time.

Parameters:

  • current_stamina: Your character's current stamina.
    • Format: HH:mm (e.g., 30:00, 39:45) or just HH (e.g., 39, 41).
    • Example: 39:00
  • future_time: The specific time you want to know your stamina for.
    • Format: HH:mm (e.g., 05:01 for 5:01 AM) or YYYY-MM-DD HH:mm (e.g., 2025-07-20 14:00).
    • Note: If you only provide HH:mm, the bot will look for the next upcoming instance of that time.

Example Usage:

/staminaat current_stamina: 39:00 future_time: 05:01

The bot will respond with the predicted stamina for the date time provided.

Why This Bot?

As any Tibia player knows, managing stamina is key to efficient hunting. This bot takes the guesswork out of it, providing quick, accurate predictions right where you chat with your guild or friends. It's built to be reliable and user-friendly, letting you focus more on the game and less on manual calculations.

Setup & Deployment

This bot is built to run on Cloudflare Workers.

  1. Clone this repository.
  2. Configure Environment Variables: Set your Discord application's DISCORD_PUBLIC_KEY, DISCORD_TOKEN, and DISCORD_APPLICATION_ID as environment variables within your Cloudflare Worker project.
  3. Register Slash Commands: Use the provided registration script to register the /staminaat command with Discord's API.
  4. Deploy the Worker: Deploy your Worker code to Cloudflare Workers.
  5. Update Discord Interactions Endpoint: In your Discord Developer Portal, configure your application's Interactions Endpoint URL to point to your deployed Cloudflare Worker's URL.

About

A Discord bot for Tibia players that calculates and predicts a character's stamina regeneration, helping you determine your future hunting and optimize XP gain.

Topics

Resources

Stars

Watchers

Forks