EasyVote for Rust

Making voting super easy and smooth!

Total Downloads: 1,957 - First Release: Aug 27, 2016 - Last Update: Nov 27, 2017

5/5, 10 likes
  1. Exel80
    EasyVote is most advanced vote plugin what you can found from oxide. Everything can be customized without knowing anything about coding.

    github-socialcoding-logo.png

    Features
    • Closest reward feature, please see FAQ where i try explain this feature to you all!
    • Player receive reward every time he vote successfully. You can edit rewards from configs.
    • You can make more reward variables by adding new line in Commands json. Commands are just console commands, so this way EasyVote support every oxidemod plugins which have console commands.
    • Added custom reward based how many time player has voted. You can add many as you like custom rewards, there is no limits.
    • Supporting Rust-Server.net, Beancan.io. But in EasyVote 2, you can add more voteAPI site support, by just editing config file. Click here to read more (You can always ask help from Ask question if needed)
    • Global Announcement Alert to every player in server. Who and how many time player has voted.
    • And much more...
    You can check is your JSON file valid or not >> Here <<

    RustClient_2017-10-28_21-26-15.png

    Rewards 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 oxide/lang/EasyVote.json lang file. You can see other commands out there too.

    • 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: [GroupName] - Add player to group
    • oxidegrantperm: [PermissionName] - Grant permission to player
    • oxiderevokegroup: [PermissionName] - Remove player from group
    • oxiderevokeperm: [GroupName] - 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 these when you make own commands!
    • {playername} Player Display name.
    • {playerid} Player SteamID64.
    • {value} for Reward list.
    • {value2} for Reward list. Its split with - char. Example: addgroup: GroupName-30d
    Chat Commands
    Player has to have EasyVote.Use permission!
    • /vote — Show vote link(s)
    • /claim — Claim vote reward(s)
    • /reward list — Display what reward(s) can get.
    Admin Commands
    Player has to be admin or have EasyVote.Admin permission!
    • Up coming feature...
    Configuration file
    Code (C#):
    {
      "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": {
          "Beancan": "ID:KEY",
          "RustServers": "ID:KEY"
        },
        "ServerName2": {
          "Beancan": "ID:KEY"
        }
      },
      "Settings": {
        "Enable logging => oxide/logs/EasyVote (true / false)": "true",
        "Globally announcment in chat when player voted (true / false)": "true",
        "Prefix": "<color=cyan>[EasyVote]</color>",
        "Send thank you message to player who voted (true / false)": "true",
        "Vote rewards cumulative (true / false)": "false"
      },
      "VoteSitesAPI": {
        "Beancan": {
          "API Claim Reward (GET URL)": "http://beancan.io/vote/put/{0}/{1}",
          "API Vote status (GET URL)": "http://beancan.io/vote/get/{0}/{1}",
          "Vote link (URL)": "http://beancan.io/server/{0}"
        },
        "RustServers": {
          "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}"
        }
      }
    }
     
    Language file
    Code (C#):

    {
      "ClaimError": "Something went wrong! Player <color=red>{0} got an error</color> from <color=yellow>{1}</color>. Please try again later!",
      "ClaimReward": "You just received your vote reward(s). Enjoy!",
      "ClaimPleaseWait": "Checking the voting websites. Please wait...",
      "VoteList": "You have voted <color=yellow>{1}</color> time(s)!\n Leave another vote on these websites:\n{0}",
      "EarnReward": "When you have voted, type <color=yellow>/claim</color> to claim your reward(s)!",
      "RewardListFirstTime": "<color=cyan>Reward for voting for the first time.</color>",
      "RewardListEverytime": "<color=cyan>Reward, which player will receive everytime they vote.</color>",
      "RewardList": "<color=cyan>Reward for voting</color> <color=orange>{0}</color> <color=cyan>time(s).</color>",
      "Received": "You have received {0}x {1}",
      "ThankYou": "Thank you for voting! You have voted <color=yellow>{0}</color> time(s) Here is your reward for..\n{1}",
      "NoRewards": "You do not have any new rewards available\n Please type <color=yellow>/vote</color> and go to one of the websites to vote and receive your reward",
      "RemeberClaim": "You haven't claimed your reward from voting for the server yet! Use <color=yellow>/claim</color> to claim your reward!\n You have to claim your reward within <color=yellow>24h</color>! Otherwise it will be gone!",
      "GlobalChatAnnouncments": "<color=yellow>{0}</color><color=cyan> has voted </color><color=yellow>{1}</color><color=cyan> time(s) and just received their rewards. Find out where you can vote by typing</color><color=yellow> /vote</color>\n<color=cyan>To see a list of avaliable rewards type</color><color=yellow> /reward list</color>",
      "money": "<color=yellow>{0}$</color> has been desposited into your account",
      "rp": "You have gained <color=yellow>{0}</color> reward points",
      "tempaddgroup": "You have been temporality added to <color=yellow>{0}</color> group (Expire in {1})",
      "tempgrantperm": "You have temporality granted <color=yellow>{0}</color> permission (Expire in {1})",
      "zlvl-wc": "You have gained <color=yellow>{0}</color> woodcrafting level(s)",
      "zlvl-m": "You have gained <color=yellow>{0}</color> mining level(s)",
      "zlvl-s": "You have gained <color=yellow>{0}</color> skinning level(s)",
      "zlvl-c": "You have gained <color=yellow>{0}</color> crafting level(s)",
      "zlvl-*": "You have gained <color=yellow>{0}</color> in all level(s)",
      "oxidegrantperm": "You have been granted <color=yellow>{0}</color> permission",
      "oxiderevokeperm": "Your permission <color=yellow>{0}</color> has been revoked",
      "oxidegrantgroup": "You have been added to <color=yellow>{0}</color> group",
      "oxiderevokegroup": "You have been removed from <color=yellow>{0}</color> group"
    }
     

    For developers:
    Hooks:

    Code (Text):
    void onUserReceiveReward(BasePlayer player, int voted)

    Calls:

    Code (Text):
    string getHighestvoter()
    string getLastvoter()
    void resetData(bool backup = true)

    Thank you..

    • @MJSU, for your custom EasyVote plugin and all hes efforts what he have done so far!
    • @Calytic, Added BeancanIO support & helped to made config reading correct.
    • @Wulf, Help hotfix plugin and he is awesome!

    Coming soon..
    • Your suggestions