Jump to content

1 Screenshot

About Play Time Rewards

Records playtime, with option to separately record AFK time. Includes a reward system to give players points/money/cash for time played or by referring other players to your server. You can also create custom permissions to give VIP players point multipliers either by using the commands or by simply adding in more config options manually.

 

Features:

Discord Logging with a simple discord webhook.
Last wipe data saving.
Currencies.
Afk & active tracking.
Permissions.
Multipliers.
UI Leader Board.
Cmds.

 

Recommended Rust Settings

Due to ImageLibary's cache avatar feature being broke I have coded in my own method to manually have ImageLibrary cache them..
For rust you will need ImageLibrary installed for the avatar images to work.
Enable the Avatar Image Patch": true ,
And throw in your steam API Key " ",

 

Permissions

playtimerewards.admin -- Allows players to use ptr command


Chat Commands

/playtime -- Displays your name and your playtime
/playtime Khan -- Display the playtime for the specified player
/playtime top -- Display the top 10 play times in chat
/playtime lastwipe -- Displays the last time the data was wiped
/pt -- Brings up the Rust only UI Leader Board System

 

Admin Commands

playtimerewards.admin -- Requires the admin permissions to use
/ptr add vip 10 -- Adds a new custom permission with multiplier value
/ptr remove vip -- Removes a custom permission
/ptr list -- Shows all available permissions

Note: Permissions will automatically be prefixed with playtimerewards.

 

Reward System

The reward system can be used to issue currency to players based on their playtime.

It has 2 reward style plugins to handle them.

 

Permission System

The permission system is there to give VIP players a multiplier for the rewards they are issued. The amount of points will be the default amount set in the config, multiplied by the number you set in the permission.

For example, if you create a permission called "playtimerewards.vip" with a value of 1.5, and the amount of points is 5 (default amount), the user will get 7.5 points when issued a reward for playtime

 

Referral System

The referral system is simple.

PlayerA invites PlayerB to the server.

For the reward to be Deposited PlayerB simply has to type '/refer PlayerA'.

Once he/she has done this PlayerA will be given points for inviting a player and PlayerB will be given points for joining from a referral

Referred Player B Joined Server, Deposit Amount": 3,

Referral Invite Sent Deposit Amount, After player B has joined is": 5,

Once PlayerB has registered his/her referral they can never use the system again, however they can invite as many players as they want to claim referral rewards

 

Developer API

double? FetchPlayTime(string playerid) // Returns double playtime in seconds, or null if no data found
double? FetchAfkTime(string playerid) // Returns double AFK time in seconds, or null if no data found
int? FetchReferral(string playerid) // Returns int number of referrals, or null if no data found


Configuration

The settings and options can be configured in the PlayTimeRewards file under the config directory. The use of an editor and validator is recommended to avoid formatting issues and syntax errors.

{
{
  "1. Don't Edit This": {
    "LastWipe": "2021-05-29 19:05:14Z",
    "WasWiped": false,
    "WipeTime": "2021-05-29 19:05:14Z"
  },
  "2. Discord Settings": {
    "1. Enable Discord Logging": false,
    "2. Discord Web Hook Url": "",
    "3. Embed Message Color": "#483D8B",
    "4. Include Plugin Image   Name in discord messages": true,
    "5. Discord Plugin Image": "https://assets.umod.org/images/icons/plugin/60b0e6d6c8900.png",
    "6. Discord Plugin Name": "PlayTimeRewards"
  },
  "3. Track Settings": {
    "1. Sets the Save Interval Timer": 15,
    "2. Enable Afk Time Tracking": true,
    "3. Enable Avatar Image Patch": true,
    "4. Avatar Image Patch Requires Steam API Key": "",
    "5. Ignore Specified Oxide Groups from getting rewards": [
      "admin"
    ]
  },
  "4. Reward Settings": {
    "1. Enable Rewards": true,
    "2. Use ServerRewards": false,
    "3. Use Economics": true,
    "4. Use Cash System": false,
    "Cash System Currency": "$",
    "5. Enable Referrals": true,
    "6. Enable Earning By Referrals": true,
    "7. Send Deposit Response": true,
    "8. PlayTime Deposit Timer": 3600,
    "9. PlayTime Deposit Amount": 5,
    "10. Referred Player Joined Deposit Amount": 3,
    "11. Referral Invite Sent Deposit Amount": 5
  },
  "5. Permission Multipliers": {
    "Multiplyer": 1.0,
    "SetPermission": ""
  }
}


Localization

The default messages are in the PlayTimeRewards file under the lang/en directory.
To add support for another language, create a new language folder (e.g. de for German) if not already created, copy the default language file to the new folder and then customize the messages.
 

{
  "mia": "Unable to find player number or name {0} \n Try there display-name instead.",
  "playeraccepted": "Your referral has been accepted",
  "playerread": "{0} has acknowledged a referral from you",
  "playeraccepteddeposit": "Your referral has been accepted and you have received {0} points",
  "playeracceptedplayersreferaldeposit": "{0} has acknowledged a referral from you and you have received {1} points",
  "self": "You can not refer yourself!",
  "alreadydid": "You have already acknowledged a referral",
  "refsyntax": "/refer <playername> - Acknowledge a referral from <playername>",
  "permmultiplier": "permission | multiplier",
  "notaperm": "The permission {0} does not exist",
  "permremoved": "You have successfully removed the permission {0}",
  "missingvalue": "You must enter a multiplier",
  "alreadyperm": "The permission '{0}' already exists",
  "permadded": "You have successfully created a new reward multiplier. Permission: {0}, Multiplier {1}",
  "ptr": "Create custom permissions with reward multipliers for VIP players",
  "add": "/ptr add <permissionname> <multiplier> - Adds a new reward multiplier",
  "remove": "/ptr remove <permissionname> - Removes reward multiplier",
  "list": "/ptr list - List available permissions and their multipliers",
  "list1": "Permission {0}, multiplier {1} \n",
  "typo": "Unable to get your playtime",
  "natime": "Unable to get that players playtime",
  "sr": "RP",
  "economics": "Coins",
  "cash": "Cash",
  "cashsystem": "custom",
  "deposit": "{0} {1} have been deposited to your account!",
  "toptime": "Top Playtimes: ",
  "topscore": "You can see the top scoring playtimes by typing  \n \"/playtime top   (optional:number 1, 22, etc)\"",
  "lastwipe": "{0} Last wipe was {1}"
}

 

  • Haha 1

User Feedback

1.4m

Downloads

Total number of downloads.

6.8k

Customers

Total customers served.

101.7k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.