Vote Checker & Rewarder

Give rewards to users for voting on game-servers.top & reign-of-kings.net

Total Downloads: 823 - First Release: Jun 29, 2015 - Last Update: Feb 15, 2016

5/5, 6 likes
  1. Its working now but when i add the rewards it doesnt say its added and when i do /rewards it just say "get rewards for daily votes"

    I tried "addreward stone 1000 1" and i also tried "addreward stone 1 1oo0"
    But doesnt work.
     
    Last edited by a moderator: Feb 5, 2016
  2. I configured TGS for VoteChecker, but it still goes to reign-of-kings.net to check. Another questions. TGS uses your IP and Port for the server ID, so I am guessing that is what you would configure as the Serverid with /rewardconf? reign-of-kings.net still never registers that I or anybody has voted. Thanks!
     
  3. my log. votechecker doesnt work. the VoteCheckerUserData.json is empty.

    Code:
    9:40 PM [Error] Failed to call hook 'ShowRewards' on plugin 'VoteChecker v1.2.3' (NullReferenceException: Object reference not set to an instance of an object)
    9:40 PM [Debug]  at Oxide.Plugins.VoteChecker.ShowRewards (CodeHatch.Engine.Networking.Player player, System.String cmd) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.VoteChecker.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0 
     
  4. Be sure you remove everything for VoteChecker in plugins, data and config directorys. Then move VoteChecker.cs back into the plugins directory and it should create the json in config. Make sure you oxide is also up to date.
     
  5. Pho3niX90 updated Vote Checker & Rewarder with a new update entry:

    2.1.1

     
  6. I have removed all files regarding vote checker and restarted my server. After the restart it will let me set my server id and intervals but it will not accept the api command. I used /rewardconf api myapikey. On the overview of this plugin it says to use /rewardconf api <tgs/listforge> myapikey. What is this <tgs/listforge> for?
     
  7. It's working! Just an FYI... the variables are reversed for adding rewards. /addreward Wood 200 -1 will set the json to give -1 wood ever 200 votes. You now have to do /addreward Wood -1 200 for it to work properly.

    Donated for your work! Thanks!
     
  8. if you track via listforge use
    /rewardconf api listforge key
    if game-servers.too then

    /rewardconf api tgs key
    [DOUBLEPOST=1454836121][/DOUBLEPOST]
    Thank you. Will have a look at the variable being swapped.
     
  9. I just downloaded the new version.

    What is tgsaddress and tgsApi?
     
  10. Game-servers.top
    You set your api and it will automatically fetch the address
     
  11. Isnt it the serverapi?
    [DOUBLEPOST=1454879562][/DOUBLEPOST]Another question

    I have set my rewards for people to vote 10 times.
    Does their votes reset after 10 times and go back to vote 1 and get that reward?
     
  12. I reinstalled the plugin after deleting files and restarting. in game I did both listforge and tgs keys and set server id.
    "autoGive": "true",
    "serverApi": "key",
    "serverId": "5270",
    "tgsAddress": "Masters of the Realm-RP|KITS|GRANDEXCHANGE|KOSnight - Top Game Servers",
    "tgsApi": "key",
    "trackingInterval": "1",
    "trackingType": "month"

    when I do /rewardconf I get
    API:
    ServerID: 5270
    Reward Type: 1month

    Nothing happens when I do /getreward there is no message at all. Also unable to change the reward interval, stuck on 1 month.
     
    Last edited by a moderator: Feb 8, 2016
  13. Did you manually set that information in the json file? Because for Top Game Servers line will look like the following:

    "tgsAddress": "Home - Top Game Servers",

    That is automatically created when you run the following command on the server:

    /rewardconf api tgs TGSAPIFORYOURSERVER

    Of course you need to replace the TGSAPIFORYOURSERVER with the api you get from game-servers.top.
     
  14. No i set everything in game. yes of course I put in my actual api key, thats a no brainer. I removed them for the post.
    "autoGive": "true",
    "serverApi": "apikey",
    "serverId": "5270",
    "tgsAddress": "Masters of the Realm-RP|KITS|GRANDEXCHANGE|KOSnight - Top Game Servers",
    "tgsApi": "apikey",
    "trackingInterval": "1",
    "trackingType": "month"
    }

    for some reason it changes the tgs address to a link when i post it. the code actually shows this:
    http:// game-servers.top/server/motr.clanservers.com:7370 (the space is so it shows up here without changing to a link.
     
    Last edited by a moderator: Feb 8, 2016
  15. Make sure your VoteCheckerRewards.json, in the data directory, has the correct format. The latest release has the variables mixed up. You get a really large vote requirement if you add rewards the way it's listed.

     

  16. I havent added any rewards, it is still default.
     
  17. Mine defaults to no reward when I did it. try doing /clearrewards and add the 200 wood like I showed above to test. Then try /getreward
     
  18. I cleared the rewards and added new and it seems to be working for the moment.
    [DOUBLEPOST=1454906638][/DOUBLEPOST]
    its working but it gives the rewards everytime the player logs in. I also added gold as a reward and it gives u the gold every time u use /getreward.
    {
    "itemName": "flax",
    "votesRequired": -1,
    "itemAmount": 1000
    },
    {
    "itemName": "stone",
    "votesRequired": -1,
    "itemAmount": 1000
    },
    {
    "itemName": "wood",
    "votesRequired": -1,
    "itemAmount": 1000
    },

    {
    "itemName": "cooked meat",
    "votesRequired": -1,
    "itemAmount": 25
    },
    {
    "itemName": "water",
    "votesRequired": -1,
    "itemAmount": 25
    },
    {
    "itemName": "feather",
    "votesRequired": -1,
    "itemAmount": 500
    },
    {
    "itemName": "gold",
    "votesRequired": -1,
    "itemAmount": 5000
    }
    all rewards added using in-game command
     
    Last edited by a moderator: Feb 8, 2016
  19. Thank you for assisting in the trouble shooting. I will fix the messup with the commands today.
    [DOUBLEPOST=1454913904][/DOUBLEPOST]
    I have no idea why some servers get the reward multiple times and others don't. Could you please send me all file relating to votechecker so that I can investigate
    [DOUBLEPOST=1454913936][/DOUBLEPOST]
    If you made your interval 10 day then yes