TIMINGS

TIMINGS Setup and Explanation

TIMINGS in ToastedAFK allow you to set up custom actions and rewards based on the amount of time a player has been AFK (Away From Keyboard). You can configure specific time intervals and associate them with commands or rewards to enhance player engagement and gameplay experience.

Table of Contents

  1. Configuration

  2. Understanding TIMINGS


1. Configuration

In the plugin's configuration file, you can define TIMINGS as follows:

yamlCopy codecommands:
  first_reward:
    time: 400
    rewards:
    - msg {player} you were afk for 400 seconds!
    - eco give {player} 100
    - silentgive {player} {test3}
    - silentgive {player} dark_oak_planks 1 true
  second_reward:
    time: 800
    rewards:
    - msg {player} you were afk for 800 seconds!
    - eco give {player} 100
  third_reward:
    time: 1200
    rewards:
    - msg {player} you were afk for 1200 seconds!
    - eco give {player} 100
  • "commands" section: This is where you define different time intervals and their associated rewards.

  • "first_reward," "second_reward," "third_reward": These represent different time intervals.

  • "time": Specifies the time threshold in seconds. When a player's AFK time matches this threshold, the associated rewards will trigger.

  • "rewards": Lists the actions or rewards that occur when the player reaches the specified time threshold.


2. Understanding TIMINGS

TIMINGS in ToastedAFK operate based on a simple concept: rewarding players for staying AFK (Away From Keyboard) for specific time intervals. Let's break down how it works:

  • When a player goes AFK, their AFK timer starts counting.

  • As the player remains AFK, the timer continues to increase, tracking the time they spend away.

  • TIMINGS are defined in the configuration file, specifying various time intervals and associated rewards.

  • When the player's AFK time matches a configured time threshold, the associated rewards trigger.

  • Rewards can include messages, in-game currency, items, or any other custom actions you define.

Accelerated Rewards: ToastedAFK features a unique mechanism that accelerates rewards for players who have not been AFK for the full duration. This means that if the default player has to wait 1200 seconds to receive all rewards, a player who has been AFK for only 10 seconds will receive all those rewards within the 1200 seconds.

Here's how this works:

  • The plugin calculates a ratio based on the player's current AFK time and the maximum AFK time configured in the TIMINGS.

  • This ratio is then applied to the rewards, allowing players to receive rewards at a faster rate if they haven't been AFK for the full duration.

  • This ensures that players are incentivized to stay AFK, and even shorter periods of inactivity can yield valuable rewards over time.

This system encourages players to stay engaged, knowing that rewards are available no matter how long they've been AFK, and the longer they stay AFK, the faster they accumulate rewards.

Last updated