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. Found a pretty big bug.
    Because we are not in america Server is hosted in australia we are not in the same time zone as the voting site so people can go and vote and it will think they voted yesterday. And not give out a reward
     
    Last edited by a moderator: Jul 19, 2015
  2. Hi Pulsar.

    That should not make a difference. The api I wrote fetches the votes for the entire month, so if their previous vote was 1 and a week later they vote again and only login another week later they will receive the vote 2 reward.

    My server is in south africa, so also not the same time zone. There might be another issue.
     
  3. oh okay yea i was just getting a lot of reports of players not getting rewards so i thought that might have been it when i noticed the time diff and it was saying no vote today. Guess it could have been full backback or he was dead on login etc. i think it justs says no rewards for you when you have gotten it not you have already claim dont be greedy lol
     
  4. Yes it will say no votes when they have already received their reward. They get rewarded once for a vote. It could also be that you do not have a reward for a specific vote count. Check it by typing /rewards
    Make sure you are giving rewards for every votelevel. You can also add an item that will be given for each vote by typing in /addreward itemname amount -1
     
  5. Thanks thats probably the issue as I did skip a few vote levels I assumed incorrectly that if they had ie. 3 votess and the highest reward tier available was say 2 it would just give them that one. easy fix thx
     
  6. The plugin votechecker don't show /rewards
    this is the log:
    Code:
    1:57 PM [Error] Failed to call hook 'ShowRewards' on plugin 'VoteChecker' (NullReferenceException: Object reference not set to an instance of an object)
    1:57 PM [Debug]  at Oxide.Plugins.VoteChecker.ShowRewards (CodeHatch.Engine.Networking.Player player, System.String cmd) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    can someone fix it?
     
    Last edited by a moderator: Aug 7, 2015
  7. Maybe there is a possibility to make quick vote in server write /dailyvote and got reward for vote!!
     
  8. Code:
    :15 PM [Info] Loaded plugin VoteChecker v1.2.3 by Pho3niX90
    1:15 PM [Error] Failed to initialize plugin 'VoteChecker v1.2.3' (Exception: Unexpected token)
    1:15 PM [Debug]  at Oxide.Core.Configuration.KeyValuesConverter.ReadJson (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue, Newtonsoft.Json.JsonSerializer serializer) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable (Newtonsoft.Json.JsonConverter converter, Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, Boolean checkAdditionalContent) [0x00000] in <filename unknown>:0
    1:15 PM [Info] Unloaded plugin VoteChecker v1.2.3 by Pho3niX90
    1:15 PM [Info] No previous version to rollback plugin: VoteChecker
     
    Last edited by a moderator: Aug 17, 2015
  9. update plz
     
  10. can someone provide a config which throws the error?
     
  11. is there a way to broadcast when they vote and are online so like when player connects and claims the reward can it say (player) voted at (enter web site) or when they do the /getrewards
     
  12. Hi ZwinkaDink.

    This is possible to code in, but the current version doesn't support this.

    I will have a look at it tonight (in roughly 6 hours)
     
  13. Cool just starting to look into modding and trying to learn my self but this idea is amazing
    [DOUBLEPOST=1446785280,1446553656][/DOUBLEPOST]
    so i got realy bored on my day off i have added a broadcast for when some one used the /getrewards or logs in it says PrintToChat(player.Name +" Has voted for the server"); i first put it in the loop but noticed that for every item you put in the reward it posted the broadcast so i added it under line 493 not sure if it will work there iv voted to many time to test
     
  14. Getting the following error with the plugin:

    9:09 AM [Error] Failed to call hook 'ShowRewards' on plugin 'VoteChecker v1.2.3' (NullReferenceException: Object reference not set to an instance of an object)
    9:09 AM [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

    Seems to not register you have rewards to get, so doesn't give them.

    Thank you for your work!
     
  15. Apologies for only responding now.

    Are you still getting this error?
     
  16. It's seems to have gone away. The only thing I do see is not getting rewards. This may happen for days and then all of a sudden it starts working again. It may be an issue with connecting with reign-of-kings.net. I can't seem to find any errors, though.
     
  17. I see. I am going to rewrite the plugin in the next day or so (just waiting on listforge to make a change to their API), there are some issues with usernames with special characters in. Check the log file to see if there are any users that should have gotten rewards, if you do not know how to check just upload it somewhere and send me the link
     
  18. Im not sure i know how the plugin works.
    Plying with it right now.
    The confg looks like this:

    {
    "cyberscene_RewardType": "0",
    "rokDotNet_api": "",
    "rokDotNet_serverID": ""
    }

    Is this all or do i have to add other things other than the api key and serverid?
     
  19. Hi Missy.

    Best is to read the overview of the plugin. You will have to add in those details for the plugin to fetch the votes. You will also have to add rewards you would like to give out unless the defaults are enough
     
  20. Its working and i figured everything out :)