Works with
About EasyVotePro
Description
EasyVotePro brings you 3 new voting websites, Discord Embeds, Custom Status Frames, and UINotifications! With frequent updates, a dedicated support section, and more, growing your server has never been easier!
Players receive a reward every time they vote successfully. You can edit the available rewards in the configuration file.
Add custom reward based how many time player has voted. You can add many as you like custom rewards, there is no limits.
Supports Rust-Servers.net, RustServers.gg, BestServers.com, TrackyServer.com, Top-Games.net, and ServerTilt.com
And much more!
THIS PLUGIN IS IN BETA STAGES RIGHT NOW! BE SURE TO TEST THIS PLUGIN ON A TEST SERVER FIRST!
General Features
- Ability to control when a player gets notified that they have unclaimed votes/need to vote
- Rewards are now strictly command based. No more commands section in the config. Just put in your command in the reward section and you're off!
- You can now change the description for each reward whenever a player runs the /rewardlist command
- Added useful command line command to check players vote count, reset their vote count and more
- Added an option to reset a players vote count whenever a map wipes
- Added useful debug options for easier debugging
- Ability to add as many reward tiers as you want! All you have to do is change the number under rewards to the amount of votes a player needs for those rewards to be given. I.e. vote3 in the previous config is now just 3, vote6 in the previous config is now just 6 No more permissions system. Why on earth would you not want a player to vote for your server?!?!?
EasyVoteLite vs. EasyVotePro
EasyVotePro features that are not in EasyVoteLite:
- Discord embeds instead of just straight text messages
- Dedicated Support section
- More voting sites! You can add a support ticket and i'll be happy to add the site of your choice! Currently there are 2 new voting sites being added (top-serveurs.net & servertilt.com)
- Custom Status Frames integration
- Notify Integrations
- Ability to add other voting sites with ease!
Variables
Use the below replacement variables when creating your rewards.
{playername} -- player's display name
{playerid} -- player's Steam ID
Chat Commands
/vote -- Show vote link(s)
/claim -- Claim vote reward(s)
/rewardlist -- Display what reward(s) can get
Console Commands
clearvote <steamID> - Clears a players vote count to 0
checkvote <steamID> - Check the players current vote count
setvote <steamID> <number> - Set the players vote count to a specific number
resetvotedata - Resets all voting data for every player
easyvotepro - Displays a console help menu
Plugin API Hooks
// Returns an int value of the number of votes a player has (int) getPlayerVotes(string steamID)
Configuration
The settings and options for this plugin can be configured in the EasyVoteLite.json file in the config directory. The use of a JSON editor or validation site such as jsonlint.com is recommended to avoid formatting issues and syntax errors.
{ "Debug Settings": { "Debug Enabled?": "false", "Enable Verbose Debugging? (READ DOCUMENTATION FIRST!)": "false", "Set Check API Response Code (0 = Not found, 1 = Has voted and not claimed, 2 = Has voted and claimed)": "0", "Set Claim API Response Code (0 = Not found, 1 = Has voted and not claimed. The vote will now be set as claimed., 2 = Has voted and claimed": "0" }, "Plugin Settings": { "Enable logging => logs/EasyVote (true / false)": "true", "Wipe Rewards Count on Map Wipe?": "true", "Vote rewards cumulative (true / false)": "false", "Chat Prefix": "<color=#e67e22>[EasyVote]</color> " }, "Notification Settings": { "Globally announcment in chat when player voted (true / false)": "true", "Enable the 'Please Wait' message when checking voting status?": "true", "Notify player of rewards when they stop sleeping?": "false", "Notify player of rewards when they connect to the server?": "true" }, "Custom Status Frame Settings": { "Custom Status Frame Enabled?": "false", "Enable Rewards Need To Be Claimed Status?": "true", "Claim Rewards Banner Color": "0.18 0.8 0.44 1", "Claim Rewards Icon Color": "0.93 0.94 0.95 1", "Claim Rewards Icon": "https://i.imgur.com/bkoPUv4.png", "Claim Rewards Main Text Color": "0.93 0.94 0.95 1", "Main Text of Claim Rewards Banner": "Claim Your Rewards!", "Claim Rewards Sub-Text Color": "0.93 0.94 0.95 1", "Sub-Text of Claim Rewards Banner": "/claim", "Claim Rewards CSF ID (DO NOT CHANGE!)": "hasrewards", "Enable Needs To Vote Status?": "true", "Needs To Vote Banner Color": "0.91 0.3 0.24 1", "Needs to Vote Icon Color": "0.93 0.94 0.95 1", "Needs to Vote Icon": "https://i.imgur.com/XVdKgGf.png", "Needs to Vote Main Text Color": "0.93 0.94 0.95 1", "Main Text of Needs To Vote Banner": "Vote For Us!", "Needs to Vote Sub-Text Color": "0.93 0.94 0.95 1", "Sub-Text of Needs To Vote Banner": "/vote", "Needs to Vote CSF ID (DO NOT CHANGE!)": "norewards" }, "Notify UI Settings": { "Notify UI Enabled?": "false", "Message to show when a player has unclaimed rewards": "You have unclaimed rewards! Type /claim now!", "Type of message to show when a player has unclaimed rewards": "0", "Message to show when a player needs to vote": "Support our server by voting! Type /vote now!", "Type of message to show when a player needs to vote": "0" }, "Discord": { "Discord webhook (URL)": "https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks", "DiscordMessage Enabled (true / false)": "false", "Discord Title": "A player has just voted for us!", "Discord Embed Color (Integer String)": "3329330", "Notify @here when webhook is executed?": "false", "Notify @everyone when webhook is executed?": "false", "Some additional message to put inside of Discord embed": "Don't forget to vote! Type /vote in chat to get started!" }, "Rewards": { "@": [ "giveto {playerid} supply.signal 1" ], "first": [ "giveto {playerid} stones 10000", "sr add {playerid} 10000" ], "3": [ "addgroup {playerid} vip 7d" ], "6": [ "grantperm {playerid} plugin.test 1d" ], "10": [ "zl.lvl {playerid} * 2" ] }, "Reward Descriptions": { "@": "Every Vote: 1 Supply Signal", "first": "First Vote: 10000 Stones, 10000 RP", "3": "3rd Vote: 7 days of VIP rank", "6": "6th Vote: 1 day of plugin.test permission", "10": "10th Vote: 2 zLevels in Every Category" }, "Server Voting IDs and Keys": { "ServerName1": { "Rust-Servers.net": "ID:KEY", "Rustservers.gg": "ID:KEY", "BestServers.com": "ID:KEY", "Top-Games.net": "ID:TOKEN", "TrackyServer.com": "ID:TOKEN", "ServerTilt.com": "ID:TOKEN" }, "ServerName2": { "Rust-Servers.net": "ID:KEY", "Rustservers.gg": "ID:KEY", "BestServers.com": "ID:KEY", "Top-Games.net": "ID:TOKEN", "TrackyServer.com": "ID:TOKEN", "ServerTilt.com": "ID:TOKEN" } }, "Voting Sites API Information": { "Rust-Servers.net": { "API Claim Reward (GET URL)": "http://rust-servers.net/api/?action=custom&object=plugin&element=reward&key={0}&steamid={1}", "API Vote status (GET URL)": "http://rust-servers.net/api/?object=votes&element=claim&key={0}&steamid={1}", "Vote link (URL)": "http://rust-servers.net/server/{0}", "Site Uses Username Instead of Player Steam ID?": "false" }, "Rustservers.gg": { "API Claim Reward (GET URL)": "https://rustservers.gg/vote-api.php?action=claim&key={0}&server={2}&steamid={1}", "API Vote status (GET URL)": "https://rustservers.gg/vote-api.php?action=status&key={0}&server={2}&steamid={1}", "Vote link (URL)": "https://rustservers.gg/server/{0}", "Site Uses Username Instead of Player Steam ID?": "false" }, "BestServers.com": { "API Claim Reward (GET URL)": "https://bestservers.com/api/vote.php?action=claim&key={0}&steamid={1}", "API Vote status (GET URL)": "https://bestservers.com/api/vote.php?action=status&key={0}&steamid={1}", "Vote link (URL)": "https://bestservers.com/server/{0}", "Site Uses Username Instead of Player Steam ID?": "false" }, "Top-Games.net": { "API Claim Reward (GET URL)": "https://api.top-games.net/v1/votes/claim-username?server_token={0}&playername={1}", "API Vote status (GET URL)": "https://api.top-games.net/v1/votes/check?server_token={0}&playername={1}", "Vote link (URL)": "https://top-games.net/rust/{0}", "Site Uses Username Instead of Player Steam ID?": "true" }, "TrackyServer.com": { "API Claim Reward (GET URL)": "https://api.trackyserver.com/vote/?action=claim&key={0}&steamid={1}", "API Vote status (GET URL)": "https://api.trackyserver.com/vote/?action=status&key={0}&steamid={1}", "Vote link (URL)": "https://trackyserver.com/server/{0}", "Site Uses Username Instead of Player Steam ID?": "false" }, "ServerTilt.com": { "API Claim Reward (GET URL)": "https://www.servertilt.com/api-vote.php?action=claim&key={0}&username={1}", "API Vote status (GET URL)": "https://www.servertilt.com/api-vote.php?action=status&key={0}&username={1}", "Vote link (URL)": "https://www.servertilt.com/{0}", "Site Uses Username Instead of Player Steam ID?": "true" } } }
Server ID's and Keys
Each voting website has a different way of getting your ID's and Keys. Some ID's are not used, but rather the slug in the URL is used instead.
For RustServers.gg, Rust-Servers.net, and BestServers.com you can find the id from the last part of the voting site's URL for your server.
in RustServers.gg id is right here https://rustservers.gg/server/123 <- in this case, is 123
In Rust-Servers.net, id is right here http://rust-servers.net/server/123 <- in this case, is 123
In BestServers.com, id is right here http://BestServers.com/server/123 <- in this case, is 123
For TrackyServer.com, Top-Games.net, and ServerTilt.com, you can find the ID of your server in your URL as well, though it will not be a simple integer. It will have letters, numbers, and possibly dashes. You can view the screenshots attached in the download for more information. The highlighted portion of the URL will be your ID.
Key is secret key what you should not share any one. Key is hidden in the voting site dashboard. Login your account and navigate to modify your server, somewhere there should be your apikey, key, secret token, etc.
Note that you can add all your servers in this config and let player vote all your server. It also let players claim reward in any server.
You must reload the plugin after making changes to the config. If you found out that you do not get any reward after voting server or /vote chat command not showing any server what you just added. Then open logs (logs/EasyVotePro) and there you can see what cause the error. You can also enable debug mode and you can then reach out in the Support tab with your issue. If everything works just fine then start modifying rewards settings.
Custom Status Frame Settings
In order to use the Custom Status Frames, you must download the plugin here: https://codefling.com/plugins/custom-status-framework
Just put that plugin into your Plugins folder, and enable the "Custom Status Frame Enabled?" to "true".
The colors are in Normalized RGBA values.
You can use any icon that you want, however if you want the icon color to work correctly use an image/icon that is 100% white.
Do not change either of the following fields!
"Claim Rewards CSF ID (DO NOT CHANGE!)": "hasrewards",
"Needs to Vote CSF ID (DO NOT CHANGE!)": "norewards"
UINotify Settings
In order to use the UINotify settings, you must download the plugin here: https://umod.org/plugins/ui-notify
Do not forget to set the uinotify.see permission on your default user group!
Discord Embeds
A thing to note about the Discord Embeds... You must use a integer value for the embed color. To do the conversion, you can use an external tool like this one here: https://www.mathsisfun.com/hexadecimal-decimal-colors.html
Also this plugin does require the DiscordMessages plugin as a dependency due to the fact that we're using embeds and not straight text.
What is Closest reward feature?
Here is an example configuration:
"Rewards": { "@": [ "giveto {playerid} supply.signal 1" ], "first": [ "addgroup {playerid} vip 7d" ], "3": [ "sr add {playerid} 1000" ], "6": [ "sr add {playerid} 5000" ] },
Plugin will always give the last/closest reward based on their votes.
"@" means all the time reward, "first" means once time reward.
[First Vote] -> first & @ reward
[2nd Vote] -> @ reward
[3rd Vote] -> 3 & @ reward
[4th Vote] -> @ reward
[5th Vote] -> @ reward
[6th Vote] -> 6 & @ reward
Etc. etc.
If "Vote rewards cumulative" is enabled from config. Player will got all past reward(s), like so..
[First Vote] -> first & @ reward
[2nd Vote] -> first & @ reward
[3rd Vote] -> first & 3 & @ reward
[4th Vote] -> first & 3 & @ reward
[5th Vote] -> first & 3 & @ reward
[6th Vote] -> first & 3 & 6 & @ reward
Etc. etc.