:shipit: SeriousVote 4.8.4 ―Your one stop Votifier Listener API 5/6/7


#201

"seriousvote-3.2-Bleeding.jar" Yup


#202

Alright, can you please give me your config, I'm gonna run it on my test server.


#203

Muh unique vote tables :cry:

config:
{
    #//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: ""

    #//-1 will have the system select a number of rewards between rewards-min and rewards-max;
    random-rewards-number: 1
    rewards-min:1
    rewards-max:2


    #//There are two kinds of rewards set and random. Set rewards will run a command and nothing else
    #//these commands are run every time a vote is had. Random Rewards are chosen well..Randomly.
    #//
    #//        "12", "reward2", "say Reward2",  --All Random reward Lines should look like this
    #//
    #//  First Entry is a "percentage" the numbers should be an integer between 1 and 100, but if it's
    #//       Going to be a 100 might as well just set it as a set command. Note that the percentage
    #//       Dictates what "Loot Table" the reward goes to internally, multiple of the same percentage is fine,
    #//       They will simply share a loot table. It is recommended to keep the total value of all the
    #//       percentage values added up to 100 (Duplicate values are ignored in the sum since, items share
    #//       loot Tables).
    #//  Second Entry is the name of the reward, this name gets added to the {rewards} variable. Items in the same
    #//       loot table cannot have the same name!!.
    #//  Third Entry is the command you want to be run. You are free to use the {player} variable in there.
    #//
    #//This should be pretty straight forward. Number,Name,Reward. If you have any questions ask me on the forum.
    #//I am happy to help!


     Rewards{
                random:[
                    "4000", "Thunder stone shards", "give {player} pixelmon:thunder_stone_shard 2",
                    "4000", "Leaf stone shards", "give {player} pixelmon:leaf_stone_shard 2",
                    "4000", "Water stone shards", "give {player} pixelmon:water_stone_shard 2",
                    "4000", "Fire stone shards", "give {player} pixelmon:fire_stone_shard 2",
                    "4000", "Sun stone shards", "give {player} pixelmon:sun_stone_shard 2",
                    "4000", "Moon stone shards", "give {player} pixelmon:moon_stone_shard 2",
                    "4000", "Dawn stone shards", "give {player} pixelmon:dawn_stone_shard 2",
                    "4000", "Dusk stone shards", "give {player} pixelmon:dusk_stone_shard 2",
                    "4000", "Shiny stone shards", "give {player} pixelmon:shiny_stone_shard 2",
                    "4000", "Super Potions", "give {player} pixelmon:super_potion 2",
                    "4000", "a Hyper potion", "give {player} pixelmon:hyper_potion 1",
                    "4000", "Premier Balls", "give {player} pixelmon:premier_ball 6",
                    "2700", "Fossil 0", "give {player} pixelmon:covered_fossil_0 1",
                    "2700", "Fossil 1", "give {player} pixelmon:covered_fossil_1 1",
                    "2700", "Fossil 2", "give {player} pixelmon:covered_fossil_2 1",
                    "2700", "Fossil 3", "give {player} pixelmon:covered_fossil_3 1",
                    "2700", "Fossil 4", "give {player} pixelmon:covered_fossil_4 1",
                    "2700", "Fossil 5", "give {player} pixelmon:covered_fossil_5 1",
                    "2700", "Fossil 6", "give {player} pixelmon:covered_fossil_6 1",
                    "2700", "Fossil 7", "give {player} pixelmon:covered_fossil_7 1",
                    "2700", "Fossil 8", "give {player} pixelmon:covered_fossil_8 1",
                    "2700", "Great balls", "give {player} pixelmon:great_ball 4",
                    "2700", "Ultra balls", "give {player} pixelmon:ultra_ball 2",
                    "2700", "Timer balls", "give {player} pixelmon:timer_ball 2",
                    "2700", "Heavy balls", "give {player} pixelmon:heavy_ball 2",
                    "2700", "Books", "give {player} minecraft:book 3",
                    "2700", "Slime ball", "give {player} minecraft:slime_ball 2",
                    "2700", "Blaze rod", "give {player} minecraft:blaze_rod 2",
                    "2700", "Iron ingot", "give {player} minecraft:iron_ingot 4",
                    "2700", "Amulet Coin", "give {player} pixelmon:amulet_coin 1",  
                    "800", "a Max Revive", "give {player} pixelmon:max_revive 1",
                    "800", "Rare candy", "give {player} pixelmon:rare_candy 1",
                    "800", "Exp. share", "give {player} pixelmon:exp_share 1",                
                    "800", "a Skeleton skull", "give {player} minecraft:skull 1 0",
                    "800", "a Zombie skull", "give {player} minecraft:skull 1 2",
                    "800", "a Creeper skull", "give {player} minecraft:skull 1 4",
                    "800", "Obsidian", "give {player} minecraft:obsidian 1",
                    "800", "Diamond", "give {player} minecraft:diamond 1",
                    "240", "a Player skull", "give {player} skull 1 3 {SkullOwner:\"{player}\"}",
                    "240", "Diamond pickaxe", "give {player} minecraft:diamond_pickaxe 1 0 {ench:[{id:32,lvl:2}]}",
                    "240", "Diamond axe", "give {player} minecraft:diamond_axe 1 0 {ench:[{id:32,lvl:2}]}",
                    "240", "Thunder stone", "give {player} pixelmon:thunder_stone 1",
                    "240", "Leaf stone", "give {player} pixelmon:leaf_stone 1",
                    "240", "Water stone", "give {player} pixelmon:water_stone 1",
                    "240", "Fire stone", "give {player} pixelmon:fire_stone 1",
                    "240", "Sun stone", "give {player} pixelmon:sun_stone 1",
                    "240", "Moon stone", "give {player} pixelmon:moon_stone 1",
                    "240", "Dawn stone", "give {player} pixelmon:dawn_stone 1",
                    "240", "Dusk stone", "give {player} pixelmon:dusk_stone 1",
                    "240", "Shiny stone", "give {player} pixelmon:shiny_stone 1",
                    "45", "Thunder stone pickaxe", "give {player} pixelmon:thunder_stone_pickaxe 1 0 {ench:[{id:34,lvl:2}]}",
                    "45", "Thunder stone axe", "give {player} pixelmon:thunder_stone_axe 1 0 {ench:[{id:34,lvl:2}]}",
                    "45", "Any Pokemon ticket", "give {player} pixelmon:red_card 1 0 {ench:[{id:48,lvl:2000}],display:{Name:\"Any Pokemon* Ticket\",Lore:[\"Give this to an admin to\", \"exchange for any Pokemon!\", \"*Shinies/Legendaries excluded.\"]}}",
                    "10", "HM02:Fly", "give {player} pixelmon:hm2 1",
                    "10", "HM03:Surf", "give {player} pixelmon:hm3 1",
                    "3", "Uxie", "pokegive {player} uxie",
                    "3", "Mesprit", "pokegive {player} mesprite",
                    "3", "Azelf", "pokegive {player} azelf",
                    "3", "Raikou", "pokegive {player} raikou",
                    "3", "Entei", "pokegive {player} entei",
                    "3", "Suicune", "pokegive {player} suicune",
                    "3", "Regirock", "pokegive {player} regirock",
                    "3", "Regice", "pokegive {player} regice",
                    "3", "Registeel", "pokegive {player} registeel",
                    "3", "Latias", "pokegive {player} latias",
                    "3", "Latios", "pokegive {player} latios",
                    "3", "Jirachi", "pokegive {player} jirachi",
                    "3", "Kyogre", "pokegive {player} kyogre",
                    "3", "Mew", "pokegive {player} mew",
                    "3", "Groudon", "pokegive {player} groudon",
                    "3", "Lugia", "pokegive {player} lugia",
                    "3", "Ho-Oh", "pokegive {player} ho-oh",
                    "3", "Celebi", "pokegive {player} celebi",
                    "1", "Orb", "give {player} pixelmon:orb 1",
                    "1", "Master ball", "give {player} pixelmon:master_ball 1",
                    "1", "Burnt Magikarp ticket", "give {player} pixelmon:red_card 1 0 {ench:[{id:48,lvl:2000}],display:{Name:\"Burnt Magikarp Ticket\",Lore:[\"Give this to an admin to\", \"exchange for a burnt magikarp!\"]}}",
                    "2201", "Nothing", "tellraw {player} {\"text\":\":( You didn't get an item this time.\", \"color\":\"gray\"}"
                 ]
                set:[
                    "econ add {player} 200",
                    "tellraw {player} {\"text\":\"Thank you for voting, you got 200 PokeDollars and possibly an item!\", \"color\":\"green\"}"
                ]

            }


    #// Your website voting links, displayed by /vote, these support color formatting. Creates clickable links.
    #//seriousvotes.commands.vote
    vote-sites:[
                    "&n&fhttp://pixelmonservers.com/server/EVk9GG38/vote",
                    "&n&fhttp://minecraft-server-list.com/server/379940/vote/",
                    "&n&fhttp://minecraft-mp.com/server/144470/vote/",
                    "&n&fhttp://minecraftservers.org/vote/409078",
                    "&n&fhttp://www.minepick.com/servers/14145/vote/",
                    "&n&fhttps://topminecraftservers.org/vote/1505"
               ]
 #// If you want to disable the Milestones module set hostname to ""
    database:{
      hostname: "localhost"
      port: "3306"
      name: "mc-mods"
      prefix: "SV_"
      username: "root"
      password: "Don't steel"
    }

  #// 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
    milestones: {
      weekly: {
        set:[
          "say This is a set weekly {player} Reward",
        ]
      }
      monthly: {
        set:[
          "say This is a set Monthly {player} Reward"
        ]
      }
      yearly: {
        set:[
           "say This is a set Yearly {player} Reward",
          "say Crap, you must play alot"
        ]
      }
    }
}

#204

I really appreciate your help. I want to get this tackled for everyone having this problem (and so I don't have to deal with it anymore XD)


#205

Does it only send two messages when you log in with offline votes?

I've now found why the error was still happening, and got rid of getting (potentially) double rewards.


#206

Sends two messages of the same item whether online or not.
If you're online, you only get 1 item.
If you're offline, you get that item, plus one other random one.


#207

https://raw.githubusercontent.com/curscascis/SeriousVote/bleeding/build/libs/seriousvote-3.2-Bleeding-C.jar
Okay I added a few fixes, this build is executing commands properly. Could you please test it and make sure you don't get any error messages. Also fixed the Saying rewards multiple times in console, it was just a message i added for debugging, got left in there.


#208

Sorry for late reply, just got around to testing it out, and seems all the bugs I previously mentioned, where it spams the console when someone votes, double rewards, and saying someone got a reward twice have all been fixed.


#209

Awesome and no entity tracking error?


#210

Not that I could replicate, if something happens later when more people get on and vote, I'll let you know. But for now it seems good.


#211

Thank you so much for testing I'm happy we could get this resolved. :slight_smile:


#212

I don't quite understand how the randomizer is calculated. I know it's supposed to be random, but what are the "33" "53" etc for? Would the 53 loot table more likely to get picked by the randomizer since it's closer to 100?

The 33 + 53 etc etc= toal on your image confused me.


#213

Look at the graphic, they are chances and define what table that reward goes into.
It's chances so if they add up to 100(minus duplicates) let's say their chances will be equal to the number you put over /100 for that table. Everything with the same number goes to the same table, everything in the same table gets selected randomly if the table is chosen.


#214

Any table has it's value /total chances to get chosen
And anything with the same number gets put in the same table .


#215

When you mean add up to 100, you mean I have to have

"20", "30" and "50" for example? = 100

In your example it added up to 187 so the "53" loot table is 53/187?

If yes, then ah I understand now. Thanks!


#216

Yep it doesn't have to add up to a hundred it just makes it easier to understand because saying percent is accurate if it adds up to 100. And yes the 53 table has 53 chances to be selected in the pool of 187.


#217

Hmmm everything seems to be working fantastically except offline voting. We have 6 vote sites and I had a few players tested voting offline. When they log back in they get the rewards 7 times.

Also when people vote too fast, they get more rewards than they are supposed to. Live voting online resulted in a player getting like 10 rewards instead of the 6 we have. Just readied all the vote sites and click vote in a short amount of time.

3.2 bleeding version


#218

What type of rewards exactly that shouldn't happen. At all.
Please upload your config.


#219

This is my config, and yeah I didn't use the built in broadcaster so I could see how many times they get rewarded.


#220

can I please have your fml latest log with the votes in there.
Also what "votifier" are you using?