Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1 Screenshot

  • 1,363
  • 176
  • 48.48 kB

About EasyVote

Easy Vote is a player reward system for server votes on Rust-servers.net and rust-servers.info.

This is a fork of EasyVote by Exel80 EasyVote by Exel80 on Github and thus licensed under his MIT licence.
Changes are listed below.

Required DiscordMessages on Umod to send webhook

Features

Closest reward feature.

Players receive a reward every time they vote successfully. You can edit the available rewards in the configuration file.

You can make more reward variables by adding new line in Commands json. Commands are just console commands, so this way EasyVote support every plugin which have console commands.

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, Rust-Servers.info, but you can add other voting API sites by editing config file.

Global Announcement - Alert to every player in server. Who and how many time player has voted.

Discord Announcement - Alert to every player in server. Who and how many time player has voted.

And much more!

Reward Variables

These are called "Commands" in config file!!!
Also note that these are just CONSOLE COMMANDS, so you can make more by just add new line! Rename variable name and use it in Rewards.

Note: If you make new "Commands", you have to add same named line in lang/EasyVote.json lang file. You can see existing commands there as well.

  • item.name: <amount> -- You get item list from Oxide itemlist
  • addgroup: <group>-<time> -- Add a player to a group for a specific time (Request: Timed Permissions)
  • grantperm: <permission>-<time> -- Give a player a permission for a specific time (Request: Timed Permissions)
  • money: <amount> -- How much gave money per vote (Request: Economics)
  • oxidegrantgroup: <group name> -- Add player to group
  • oxidegrantperm: <permission name> -- Grant permission to player
  • oxiderevokegroup: <permission name> -- Remove player from group
  • oxiderevokeperm: <group name> -- Revoke permission to player
  • rp: <amount> -- Add points to players profile (Request: ServerRewards)
  • zlvl-wc: <amount> -- How much add Woodcutting level per vote (Request: ZLevels)
  • zlvl-m: <amount> -- How much add Mining level per vote (Request: ZLevels)
  • zlvl-s: <amount> -- How much add Skinning level per vote (Request: ZLevels)
  • zlvl-c: <amount> -- How much add Crafting level per vote (Request: ZLevels)
  • zlvl-*: <amount> -- How much add ALL level per vote (Request: ZLevels)

Variables

Use the below replacement variables when you make own commands.

  • {playername} -- player's display name
  • {playerid} -- player's Steam ID
  • {value} -- the reward list
  • {value2}** the reward list split with - character; example:addgroup: GroupName-30d`

Permissions

This plugin uses Oxide's permission system. To assign a permission, use oxide.grant <user or group> <name or steam id> <permission>. To remove a permission, use oxide.revoke <user or group> <name or steam id> <permission>.

easyvote.use -- Allows player to use the available chat commands

Chat Commands

  • /vote -- Show vote link(s)
  • /claim -- Claim vote reward(s)
  • /rewardlist -- Display what reward(s) can get

Configuration

The settings and options for this plugin can be configured in the EasyVote.json file under the oxide/config directory. The use of a JSON editor or validation site such as jsonlint.com is recommended to avoid formatting issues and syntax errors.

{
  "Commands": {
    "money": "deposit {playerid} {value}",
    "oxidegrantgroup": "oxide.usergroup add {playerid} {value}",
    "oxidegrantperm": "oxide.grant user {playerid} {value}",
    "oxiderevokegroup": "oxide.usergroup remove {playerid} {value}",
    "oxiderevokeperm": "oxide.revoke user {playerid} {value}",
    "rp": "sr add {playerid} {value}",
    "tempaddgroup": "addgroup {playerid} {value} {value2}",
    "tempgrantperm": "grantperm {playerid} {value} {value2}",
    "zlvl-*": "zl.lvl {playerid} *  {value}",
    "zlvl-c": "zl.lvl {playerid} C  {value}",
    "zlvl-m": "zl.lvl {playerid} M  {value}",
    "zlvl-s": "zl.lvl {playerid} S  {value}",
    "zlvl-wc": "zl.lvl {playerid} WC  {value}"
  },
  "Discord": {
    "Discord webhook (URL)": "",
    "DiscordMessage Enabled (true / false)": "false",
    "Enable @here alert (true / false)": "false",
    "Title": "Vote"
  },
  "Rewards": {
    "@": [
      "supply.signal: 1",
      "zlvl-*: 1"
    ],
    "first": [
      "oxidegrantperm: kits.starterkit"
    ],
    "vote10": [
      "money: 1000",
      "rp: 50",
      "tempgrantperm: fauxadmin.allowed-5m"
    ],
    "vote3": [
      "oxidegrantgroup: member"
    ],
    "vote6": [
      "money: 500",
      "tempaddgroup: vip-1d1h1m"
    ]
  },
  "Servers": {
    "ServerName1": {
      "Rust-Servers.net": "ID:KEY"
    },
    "ServerName2": {
      "Rust-Servers.info": "ID:KEY"
    }
  },
  "Settings": {
    "Enable logging => oxide/logs/EasyVote (true / false)": "true",
    "Globally announcment in chat when player voted (true / false)": "true",
    "Prefix": "<color=#00ffff>[EasyVote]</color>",
    "Send thank you message to player who voted (true / false)": "true",
    "Vote rewards cumulative (true / false)": "false"
  },
  "VoteSitesAPI": {
    "Rust-Servers.info": {
      "API Claim Reward (GET URL)": "https://api.rust-servers.info/votesclime/?key={0}&steamid={1}",
      "API Vote status (GET URL)": "https://api.rust-servers.info/votescheckclime/?key={0}&steamid={1}",
      "Vote link (URL)": "http://rust-servers.info/server/id-{0}.html"
    },
    "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}"
    }
  }
}

 

 

Changes

Color tags updated to Hex Code.
Removal of Beancan API as servers are no longer approved.
Inclusion of Pavel Neelers API for rust-servers.info
Updated to api requirements for DiscordMessages

ORIGINAL CREDITS

Calytic, for adding beancan.io support helping with the config reading
MJSU, for their custom Easy Vote plugin and all the effort done so far
Luke Spragg, for helping hotfix plugin

FURTHER CREDIT

TheExel80 for bringing this plugin together and supporting it until recently 
 

FAQ

Get Your API Keys:

Add your server to Rust-Server.net, Rust-Server.info, or both.

You can find the id from the last part of the voting site's URL for your server.

in Rust-Server.info id is right here https://rust-servers.info/server/id-123.html <- in this case, is 123

In RustServers, id is right here http://rust-servers.net/server/123 <- in this case, is 123

Key is secret key what you should not share any one. Key is hided in vote site dashboard. Login your account and navigate to modify your server, somewhere there should be your apikey, key, secret token, etc.
Rust-servers.info displays your API at the top of the My Server section

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. Here is example how it could look after you finished to found your ID and KEY.

"Servers": {
  "My Server x10": {
    "Rust-Servers.info": "12345:gsvdwsdsdsfddfgsfdg21342uJTRA9oOPIASCNDJK12343b",
    "Rust-Servers.net": "12345:gsvdwsdsdsfddfgsfdg21342uJTRA9oOPIASCNDJK12343b"
  },
  "My Second server x10000": {
    "Rust-Servers.info": "12345:gsvdwsdsdsfddfgsfdg21342uJTRA9oOPIASCNDJK12343b",
    "Rust-Servers.net": "12345:gsvdwsdsdsfddfgsfdg21342uJTRA9oOPIASCNDJK12343b"
  }
},

After that trouble, feel free test that everything is working. Run reload command in server console: oxide.reload EasyVote.
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 (oxide/logs/EasyVote) and there you can see what cause the error.
If everything works just fine then start modifying rewards settings.

 

What is Closest reward feature?

Here is an example configuration:

"Rewards": {
        "first": [
            "oxidegrantperm: kits.starterkit"
        ],
        "@": [
            "supply.signal: 1"
        ],
        "vote1": [
            "money: 10"
        ],
        "vote5": [
            "money: 50"
        ]
    },

Plugin will always give the last/closest reward based on their votes.

"@" means all the time reward, "first" means once time reward.

[Voted 1th] -> Vote1 reward   first & @ reward
[Voted 2th] -> Vote1 reward   @ reward
[Voted 3th] -> Vote1 reward   @ reward
[Voted 4th] -> Vote1 reward   @ reward
[Voted 5th] -> Vote5 reward   @ reward
[Voted 6th] -> Vote5 reward   @ reward

If "Vote rewards cumulative" is enabled from config. Player will got all past reward(s), like so..

[Voted 1th] -> Vote1 reward   first & @ reward
[Voted 2th] -> Vote1 reward   @ reward
[Voted 3th] -> Vote1 reward   @ reward
[Voted 4th] -> Vote1 reward   @ reward
[Voted 5th] -> Vote1 & Vote5 reward   @ reward
[Voted 6th] -> Vote1 & Vote5 reward   @ reward

 

How can I make a new command for my rewards?

All "Commands" are just console commands. Make new line under last line in "Commands". Also remember add a comma character in above line example

"zlvl-wc": "zl.lvl {playername} WC  {value}", << Dont forget that comma
"hello": "say {value}" << new command

Now you can add "hello" in rewards, like this:

"Rewards": {
    "@": [
      "supply.signal: 1",
      "hello: Potato", << New command will say Potato in chat
      "zlvl-*: 1"
    ]
}

Save all and oxide.reload EasyVote


MikeHawke's Other Downloads


User Feedback

×
×
  • 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.