This is the best nuVotifier listener you’ll ever use. Players not online? No problem, it will rack up their votes until next time they join, and don’t worry it won’t spam the public chat 50 times.
4

Configuration

The config was originally designed with a vision of large complex loot tables that would make it easy to swap and re-use rewards. I now realize that for the majority of users, this functionality is not used. I will be soon remaking the config to make it even easier to use. For now this is an explanation of how to set up some basic elements.

Variables

There are 3 main variables you can use in your broadcasts / commands

  • {player} - This is the player who cast the vote
  • {rewards} - This is the list of random reward names that were collected for the player.
    • It is printed out as a list i.e item A, item B and Item C
  • {vote-service} - This is the voting site the vote came from. This is the name sent by the service, I don’t have control over what it says.

Simple “Set Reward” - One or few prizes with no random reward

This is the easiest setup of them all.

  1. Set random-reward-number to 0. random-reward-number: 0.
  2. Clear the random under vote-reward to only show brackets []
  3. Add in the commands you want to run in set:[]. Like shown below.
vote-reward:{
  random:[]
  set:
  [
    "command 1", 
    "command 2", 
    "command 3"
  ]

Simple “Random Rewards” - One set of rewards for one table

  1. Configure the random settings to the amount of random rewards you want.
  2. Make a table under Tables: {} with a name with no spaces it should look like TableName: []
  3. Go Down to the Rewards{} section and add in some new rewards using the following layout.
    a. Make sure all quotes are closed
    b. Make sure all commands are in quotes and separated by commas.
    c. The display name can have spaces it is what is used for the broadcast system.
    d. The reward name, rewardName, cannot have spaces!
rewardName: 
{
  name: "This is a display name"
  rewards: 
  [
    "command 1",
    "command2"
  ]
}
  1. Next take your rewards and add the to the table, TableName: [], that you made earlier like so…
    a. There is a column of chances, and a column for rewardNames. Make sure both items are in quotes and that there is a comma after each entry.
    b. The column of chances is used to calculate the chance for something to happen. Think of all the numbers being a quantity of marbles and each reward is a color. For the example below you have 50 marbles of color rewardName, and you have 37 marbles of color rewardName2. Your total number of marbles is 87. you have 50 out of 87 chances to get rewardName, and 37 out of 87 chances to get rewardName2.
TableName: 
[
  "50", "rewardName",
  "37", "rewardName2"
]
  1. Now you can finally go to the top to the vote-reward: {}_ section and add the TableName table to your config like so. Since you only have one table simply put a one before the TableName and you are set to go.
    a. You can also add commands into set: [] if you’d like specific commands run for every vote.
vote-reward:{
  random:
  [
    "1", "TableName"
  ]
  set:
  [
    "command 1", 
    "command 2", 
    "command 3"
  ]
}
  1. Done!

Complex Multi-Table - Many tables Many Headaches

  1. If you’ve gotten this far and need a more in depth reward system congrats. If you know how to do the previous 2 sections you can do the following pretty simply.
  2. Setup many more rewards, they are reusable in multiple tables. Remember they all need unique names with no spaces.
  3. Make more tables. Add in the rewards as you’d like them and calculate out your chances. Remember they are chances not percentages.
  4. Add the tables to the vote-reward: [] section. The chances here work just the same as for the rewards in the tables.
vote-reward:{
  random:
  [
    "13", "TableName",
    "20", "TableName2",
    "40", "TableName3"
  ]
  set:
  [
    "command 1", 
    "command 2", 
    "command 3"
  ]
}
  1. Add in set rewards if you’d like. And Done!

  2. Want no message to be displayed?
    broadcast-message: ""

  3. Want only 1 random reward?

  random-rewards-number: 1
  rewards-min:1
  rewards-max:1

Default Config


config:{
  config-version: "4.0"
  debug-mode: false
  #//Variables - {player} : the person who voted
  #//            {rewards} : The list of random rewards the player received

  #//Leaving this empty will disable messages from being shown publicly: Supports color and formatting codes
  broadcast-message: "&4{player} &eJust Voted! He got {rewards}! If you like it here show your support! &6run &5/vote"
  #//Set to true if you would like a message to be shown When the player votes even if they're offline.
  broadcast-offline: false
  #// Message to be shown
  broadcast-message-offline: "&4{player} &eJust Voted while offline! If you like it here show your support! &6run &5/vote"
  #//Set to true if you want commands to run even if the player is not online. No offline vote information will be stored
  bypass-offline: false

  #//The number of random rewards that will be given out.
  #// -1 will have the system select a number of rewards between rewards-min and rewards-max;
  #// 0 will have the system give out no random rewards
  #// 1 or more will have the system choose random rewards exactly that number of times
  random-rewards-number: -1
  #//Having min and max set between 1 and 4 respectively ,for instance, will have the system choose to give out a random reward
  #//which is between those two numbers. Possibly a 1, a 2, a 3, or a 4.
  rewards-min:1
  rewards-max:4
  #// Under random You can set The tables you would like to use with weights in front for there to be a random chance of choosing from a table.
  #//In the case that there is only one table it will be chosen.
  vote-reward:{
    #//Here you will put the name of the tables and their chances that rewards will be chosen from.
    #// In the example you have 3 tables and their chances add up to 25. Chances must be integers.
    #//     CHANCES     TABLE-ID
    #//     =======================
    #//       "8",    "TableCommon",
    #//       "7",    "TableClaims",
    #//       "10",    "TableYearly"
    #//     ========================
    #//     TOTAL = 25
    #// Using this you can calculate how likely it is that anyone of these tables will be chosen when a random reward is rolled for.
    #// I.E. if I were to vote and get 1 random reward, I have 10 chances out of 25 to get a "TableYearly" Reward or 40% chance.
    random:[
      "8", "TableCommon",
      "7", "TableClaims",
      "10", "TableYearly"
    ]
    #// The commands in set will be run everytime a person casts a vote.
    set:["command 1", "command 2", "command 3"]
  }
  #//Tables are groups of rewards which work as a weighted system. Below are a few examples, but they are very simple and not too elaborate.
  #//   Much like the rewards, the Tables are re-usable. As a matter of fact the Tables are needed by all "Random" rewards areas.
  #//   They are pretty basic to use, Give it an id (no two id's should be the same) and then make a list with alternating weights and reward ids
  #//   The weights are pretty simple to use, the higher number a reward has the likelier it is to be chosen. in the "TableCommon" below 'money1' has
  #//   25/95 chances to be chosen.
  #//            CHANCES     REWARD-ID
  #//           =======================
  #//            "70",    "tomahawk",
  #//            "25",    "money1",
  #//           ========================
  #//           TOTAL = 95
  #//   You can use this to make common, rare , and super rare (etc...) tables which can be used together when you
  #//   want more control over what is being given out.
  #//
  #//TLDR: Once a reward has been rolled for and one of these tables chosen, The system will roll again for an item in that table with
  #//   the chances provided here.
  Tables {

    TableCommon: [
      "70", "tomahawk",
      "25", "money1"
    ]

    TableYearly: [

      "1", "gold2"
    ]

    TableClaims: [
      "1", "claimblocks"
    ]

    TableMonthly: [
      "1", "claimblocks"
    ]
    TableWeekly:[
      "1", "money1"
    ]

  }

  //# These are the Rewards. In essence each reward is a set of commands with a name that can be re-used in different tables.
  //#   Each Reward Requires an id "which is the descriptor / identifier such as tomahawk: in the tomahawk reward. Make sure to avoid spaces.
  //#   In addition each reward requires a name key, and a reward key
  //#   The value for name is just a text String (This can be used to Call it out in the broadcast built in)
  //#   The value for the rewards string is a list of strings. Each String should be a full command and can include the standard variables
  //#   Each new command string needs a comma before it. If your command requires quotations make sure to add escape characters
  //#     i.e ----"hello how "are" you"---- is not valid the string should be escaped as follows
  //#         ----"hello how \"are\" you---- The backslash allows the " to be escaped to be ignored by the parser
  //#
  //# Every single Reward should have it's id be unique, i.e there should not be more than one tomahawk ect... The name of the items can
  //# be duplicated though, so a tomahawk1, and a tomahawk2, can have "Steel Tomahawk" as the name"

  Rewards {

    tomahawk: {
      name: "Steel Tomahawk"
      rewards: [
        "give {player} modernweapons:steel_tomahawk 1",
        "message {player} MeHrRrr, Stabby Stabb"
      ]
    }

    yearly: {
      name: "Yearly Reward"
      rewards: [
        "give {player} minecraft:diamond 5",
        "say {player} is really frk'n dedicated"
      ]
    }

    gold2: {
      name: "Gold Ingots"
      rewards: [
        "give {player} minecraft:gold_ingot 2"
      ]

    }

    money1: {
      name: "A little cash"
      rewards:[
        "adminpay {player} 100"
      ]
    }

    claimblocks: {
      name: "50 Claim Blocks"
      rewards: [
        "acb {player} 50"
      ]
    }

    banana: {
      name: "Banana"
      rewards: [
        "say {player} is a banana"
      ]

    }



  }

  #//This Message will Show above the Links.
  vote-sites-message: "&6Thank You! Below are the places you can vote"

  #// Your website voting links, displayed by /vote, these support color formatting. Creates clickable links.
  #//seriousvotes.commands.vote
  vote-sites:[
    "&4http://&evoteSiteOne.com/v&4ote",
    "http://voteSiteTwo.com/vote",
    "&4http://&5voteSiteThree.com/vote"
  ]


  #// The Milestones Module Requires a Mysql System Setup
  database:{
    hostname: "127.0.0.0"
    port: "3306"
    name: "COT_SeriousVote"
    prefix: "SV_"
    username: "root"
    password: "You need a password"
    minimum-idle-connections: 5
    maximum-active-connections: 10
  }

  #// Currently we have monthly weekly and yearly, put what you need in the set rewards. these commands will be run
  #// When a player votes X amount of days in a row, 365,30, 7
  dailies: {
    enabled: false

    weekly: {
      message: "This person has earned a 7 day in a row Reward!"
      random:[
        "27", "TableWeekly"
      ]
      set:[
        "say This is a set weekly {player} Reward",
      ]
    }
    monthly: {
      message: "This person has earned a monthly vote Reward!"
      random:[
        "27", "TableMonthly"
      ]
      set:[
        "say This is a set Monthly {player} Reward",
        "acb {player} bananaphone"
      ]
    }
    yearly: {
      message: "This person has earned a one year of straight voting reward"
      random:[
        "27", "TableYearly"
      ]
      set:[
        "say This is a set Yearly {player} Reward",
        "say Crap, you must play alot"
      ]
    }
  }

  #// This will set your players' total votes to zero once a month
  monthly-reset-enabled: true
  monthly-reset-day: 1

  milestones: {
    enabled: false
    #//place the number of votes you'd like to enable milestones for inside the brackets separated by commas.
    records-enabled:["100","1","37"]
    #// The setup for these is just the same as the normal voting. The tables must be defined in the table section in order for them to be used.
    records:{
      100:{
        message: "&4{player} has voted for a 100th time in a row!"
        random:[
          "27", "claimblocks"
        ]
        set: []
      }
      1:{
        random:[]
        set: ["one command","two command", "three command", "floor"]
      }

    }

  }
}

Category: Admin Tools

Published on Nov 23, 2019

views

stars

watchers

total downloads

Promoted Versions

Members