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.
Supports Discord Logging with a simple discord webhook
Supports last wipe data saving.
Note; UI features are only supported on rust platform.
Aditional Config options are only generated based on the game platform now.
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 useptr
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
Todo
- Add Custom Item support ( like scrap )
- Add PopupMessage support
- Add Chat Prefix Color option
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
{
{
"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,
"5. Ignore Specified Oxide Groups from getting rewards": [
"admin"
]
},
"4. Reward Settings": {
"1. Enable Rewards": true,
"2. Enable Economics": true,
"3. Use Cash System": true,
"Cash System Currency": "scrap",
"4. Enable Referrals": true,
"5. Enable Earning By Referrals": true,
"6. Send Deposit Response": true,
"7. PlayTime Deposit Timer": 3600,
"8. PlayTime Deposit Amount": 5,
"9. Referred Player Joined Deposit Amount": 3
"10. Referral Invite Sent Deposit Amount": 5,
},
"5. Permission Multipliers": {
"Multiplyer": 1.0,
"SetPermission": ""
}
}
Localization
{
"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}"
}
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.