Playtime Rewards

Playtime Rewards 1.3.0

Gives players rewards for reaching set playtime milestones
Dependencies
Playtime Tracker (Required)
Works With
This Rust plugin automatically rewards players as they rack up active playtime, helping you boost server retention and give players a reason to stay logged in. You can also reward players who come back after being offline for a while, giving them a reason to return regularly.


Rewards

Players unlock rewards as they reach specific playtime milestones. Each milestone is fully customizable. You can set as many as you want and choose exactly what each one gives.
  • Gives Economics money, ServerRewards points, or in-game items like scrap.
  • Supports XP rewards using the XPerience plugin.
  • Can run any chat, server, or client command as a reward.
  • Lets you run all commands or just one random command per milestone.
  • Sends custom global and personal messages when a reward is given.

Configuration

JSON:
{
  "Version": "1.3.0",
  "Sleep Bonus": {
    "Enabled": true,
    "Hours Player Must Be Offline": 6,
    "Minutes Player Must Play Before Logging Out": 60,
    "Currencies": [
      {
        "Enabled": true,
        "Name": "scrap",
        "Amount": 150,
        "Shop Name (Shoppy Stock only)": null
      }
    ],
    "Run Random Command": false,
    "Commands": [],
    "Experience XP": 0.0,
    "Global Message": "{PlayerName} returned after a good break and earned a Sleep Bonus!",
    "Personal Message": "Welcome back! Because you played {LastSessionMinutes} min and rested {HoursPlayerMustBeOffline} h, you have been awarded 150 Scrap."
  },
  "Playtime Rewards": [
    {
      "Enabled": true,
      "Minimum Minutes Played": 30.0,
      "Count AFK Time As Playtime": false,
      "Currencies": [
        {
          "Enabled": true,
          "Name": "economy",
          "Amount": 25,
          "Shop Name (Shoppy Stock only)": null
        }
      ],
      "Run Random Command": false,
      "Commands": [
        {
          "Type": "Chat",
          "Command": "/kit starter"
        }
      ],
      "Experience XP": 150.0,
      "Global Message": "{PlayerName} just played for {MinimumMinutesPlayed} minutes and picked up their first reward!",
      "Personal Message": "You've reached {PlaytimeFormatted}. 25 Economy and 150 XP have been rewarded. Use /kit starter to claim your gear."
    },
    {
      "Enabled": true,
      "Minimum Minutes Played": 120.0,
      "Count AFK Time As Playtime": false,
      "Currencies": [
        {
          "Enabled": true,
          "Name": "point",
          "Amount": 100,
          "Shop Name (Shoppy Stock only)": null
        },
        {
          "Enabled": true,
          "Name": "scrap",
          "Amount": 300,
          "Shop Name (Shoppy Stock only)": null
        }
      ],
      "Run Random Command": true,
      "Commands": [
        {
          "Type": "Server",
          "Command": "spawnmini {PlayerId}"
        },
        {
          "Type": "Client",
          "Command": "note.inv"
        }
      ],
      "Experience XP": 400.0,
      "Global Message": "{PlayerName} just hit {PlaytimeHours} hours of active play and unlocked a new milestone!",
      "Personal Message": "You've earned {ExperienceXp} XP and some extra goodies for {PlaytimeFormatted} of time in-game."
    }
  ]
}
  • Sleep Bonus- Controls the bonus players get for returning after a break.
    • Enabled - Whether the sleep bonus system is active.
    • Hours Player Must Be Offline - How many hours the player must be logged off before the bonus is triggered.
    • Minutes Player Must Play Before Logging Out - How long the player must have actively played before their last logout to qualify.
  • Playtime Rewards- A list of milestone entries based on playtime.
    • Enabled - Whether this specific reward is active.
    • Minimum Minutes Played - The number of active minutes required to trigger the reward.
    • Count AFK Time As Playtime - Whether AFK time should count toward the milestone.
Inside each reward entry:
  • Playtime Minutes - The number of minutes of active playtime required to unlock this reward. AFK time is excluded.
  • Include AFK Time - Set to true to count AFK time toward this reward's playtime requirement. This lets you reward more casual or idle-friendly players, while still keeping other rewards strict if needed.
  • Currencies- A list of rewards to give, including plugin currencies and in-game items.
    • Enabled - Whether this currency/item is active.
    • Name - Can be economy, point, stock, or any item shortname (like scrap, wood, etc.).
    • Amount - Amount to give.
    • Shop Name - Used only with stock currency. If blank, defaults to the economics shop.
  • Run Random Command - If true, one random command is executed from the list. If false, all commands run.
  • Commands- Commands to execute when the reward is given.
    • Type - The type of command: Chat, Server, or Client.
    • Command - The raw command string. Placeholders are supported.
  • Experience XP - How much XP to give (requires the X Perience plugin).
  • Global Message - Message broadcast to all players when the reward is triggered.
  • Personal Message - Message sent privately to the rewarded player.
Available Placeholders (usable in Command, Global Message, and Personal Message):
  • {PlayerId} - Player's SteamID.
  • {PlayerName} - Player's display name.
  • {PositionX} - Player's X coordinate (2 decimals).
  • {PositionY} - Player's Y coordinate (2 decimals).
  • {PositionZ} - Player's Z coordinate (2 decimals).
  • {Grid} - Grid location (e.g., D14).
  • {PlaytimeSeconds} - Total playtime in seconds.
  • {PlaytimeMinutes} - Total playtime in whole minutes.
  • {PlaytimeHours} - Total playtime in whole hours.
  • {PlaytimeFormatted} - Time formatted as 00h:00m:00s.
  • {AfkSeconds} - Total AFK time in seconds.
  • {HoursPlayerMustBeOffline} - Number of hours the player was offline before returning (used in Sleep Bonus messages).
  • {LastSessionMinutes} - Number of active (non-AFK) minutes the player played before logging out last session.
Author
VisEntities
License duration
Unlimited
Price
9.99 USD
First release
Last update

Ratings

0.00 star(s) 0 reviews

Also by VisEntities

Latest updates

  1. 1.3.0

    Config layout has changed. Back up your old config and regenerate a fresh one after updating...
  2. 1.2.4

    Fixed Shoppy Stock rewards once and for all. For real this time 🤡
  3. 1.2.3

    Improved reward tracking by ensuring all previously unclaimed milestones are granted immediately...
Back
Top
Chat commands start with a /, while console commands can be entered directly in the F1 console or server console. Use find <keyword> in console to search for available commands related to the plugin. Parameters in < > are required, while [ ] are optional.
This plugin uses Oxide's permission system. Grant or revoke permissions using oxide.grant and oxide.revoke. You can assign them to individual players or groups using their Steam id or group name.
Settings are stored in the config file found under the config/ directory. You can edit this file manually, then reload the plugin to apply your changes.
Persistent data is saved in the data/ directory. This includes things like saved settings, usage stats, or player progress depending on the plugin. Deleting a data file will reset stored progress or customizations.
Language files are located in the lang/ folder. To translate messages, copy the en.json file into your target language folder (e.g. fr, de) and edit the values. Reload the plugin after changes to apply new messages.
This section lists public methods exposed by the plugin for use in other plugins. You can call these via the CallHook method. Ensure the plugin is loaded before calling its API to avoid null reference errors.
These are custom hooks that other plugins can listen for. Simply define a method with the same name and expected parameters in your plugin to handle the event. Hooks are triggered at key moments and are useful for extending or reacting to plugin behavior.
These hooks are injected into the game's code using Harmony. They let the plugin run code at key points in the game's internal logic. You can return values to block or modify behavior. Use with caution — these are powerful and can affect core mechanics.
Cart