Playtime Rewards

Playtime Rewards 1.1.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.




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.0.0",
  "Rewards": [
    {
      "Playtime Minutes": 30.0,
      "Currencies": [
        {
          "Enabled": true,
          "Name": "economy",
          "Amount": 25,
          "Valid": false
        }
      ],
      "Run Random Command": false,
      "Commands": [
        {
          "Type": "Chat",
          "Command": "/kit starter"
        }
      ],
      "Experience XP": 150.0,
      "Global Message (Sent to Everyone)": "{PlayerName} just played for {PlaytimeMinutes} minutes and picked up their first reward!",
      "Personal Message (Sent to Recipient)": "You've reached {PlaytimeFormatted}. 25 Economy and 150 XP have been rewarded. Use /kit starter to claim your gear."
    },
    {
      "Playtime Minutes": 120.0,
      "Currencies": [
        {
          "Enabled": true,
          "Name": "point",
          "Amount": 100,
          "Valid": false
        },
        {
          "Enabled": true,
          "Name": "scrap",
          "Amount": 300,
          "Valid": false
        }
      ],
      "Run Random Command": true,
      "Commands": [
        {
          "Type": "Server",
          "Command": "spawnmini {PlayerId}"
        },
        {
          "Type": "Client",
          "Command": "note.inv"
        }
      ],
      "Experience XP": 400.0,
      "Global Message (Sent to Everyone)": "{PlayerName} just hit {PlaytimeHours} hours of active play and unlocked a new milestone!",
      "Personal Message (Sent to Recipient)": "You've earned {ExperienceXp} XP and some extra goodies for {PlaytimeFormatted} of time in-game."
    }
  ]
}
  • Rewards - A list of reward entries. Each reward defines a required playtime, currencies, commands, messages, and optional experience XP. Players receive these in order as they reach the required time milestones.
Inside each reward entry:
  • Playtime Minutes - The number of minutes of active playtime required to unlock this reward. AFK time is excluded.
  • Currencies- A list of currencies that should be awarded when this reward is triggered. Each entry supports different types:
    • economy - Refers to the Economics plugin currency.
    • point - Refers to Server Rewards plugin points.
    • stock - Refers to Shoppy Stock plugin currency.
    • Any valid item shortname (like scrap, wood, etc.) - Gives actual in-game items to the player.
      Each currency entry includes:
  • Run Random Command - If true, only one randomly chosen command from the list will be executed. If false, all commands will be run.
  • Commands- A list of custom commands to execute when the reward is triggered. Commands can be server, client, or chat type.
    • Type- The type of command to run:
      • Chat - Runs as if the player typed it in chat (e.g., /kit vip).
      • Client - Sent directly to the player's client.
      • Server - Runs from the server console (e.g., spawning vehicles or entities).
    • Command - The actual command string. You can include placeholders like {PlayerId} or {PlayerName}.
  • Experience XP - How much XP to give the player using the X Perience plugin, if available.
  • Global Message - Message sent to all online players when someone receives the reward. Placeholders are supported.
  • Personal Message - Message shown only to the player who unlocked the reward. Placeholders are supported.
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.
Author
VisEntities
License duration
Unlimited
Price
4.99 USD
First release
Last update

Ratings

0.00 star(s) 0 reviews

Also by VisEntities

Latest updates

  1. 1.1.0

    Added stock currency support as a new payment gateway using the Shoppy Stock plugin.
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