GatherRewards

Gives players money through Economics/ServerRewards for various actions (gathering, animal kills)

Total Downloads: 4,549 - First Release: Jan 12, 2015 - Last Update: Jun 10, 2018

5/5, 13 likes
  1. Wrong should be
    Code:
    {
      "Settings": {
        "ChatEditCommand": "gatherrewards",
        "ConsoleEditCommand": "gatherrewards",
        "EditPermission": "gatherrewards.canedit",
        "ShowMessagesOnKill": true,
        "ShowMessagesOnGather": true,
        "UseEconomics": true,
        "UseServerRewards": false,
        "PluginPrefix": "<color=cyan>[GatherRewards]</color>",
        "Rewards": {
          "Bear": 25.0,
          "Boar": 25.0,
          "Chicken": 25.0,
          "Clan Member": -25.0,
          "Horse": 25.0,
          "Ore": 25.0,
          "Player": 0.0,
          "Player's Friend": -25.0,
          "Stag": 25.0,
          "Stone": 25.0,
          "Wolf": 25.0,
          "Wood": 25.0
        }
      }
    }
    All files you need in the zip just unload plugin upload the files then reload plugin
     

    Attached Files:

    Last edited by a moderator: Jun 11, 2017
  2. Hi,

    I have pasted this and an re-loaded /re-start to no avail, and have also changed "Player's Friend" to "Friend" as suggested, which made no difference.
     
  3. use the zip file above not the pasted one also make sure you are running the latest version of the plugin
     
  4. how would i add in so if you kill a npc it rewards you as atm it states its a clan member
     
  5. Setting the value "player" should be what you're looking for (if you're wondering about player NPCs)
     
  6. can you add an option for loosing money for dying ?
     
  7. I can, next update.
     
  8. Code:
    Failed to call hook 'OnDispenserGather' on plugin 'GatherRewards v1.4.3' (NullReferenceException: Object reference not set to an instance of an object)
    (00:33:11) | at Oxide.Plugins.GatherRewards.OnDispenserGather (.ResourceDispenser dispenser, .BaseEntity entity, .Item item) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.GatherRewards.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod 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 hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  9. Any idea what causes this?
     
  10. having an issue gaining the rp when hitting ores etc . i have it set to server rewards , copied the file above and reloaded plugin , still will not give rp points for gathering ??? help please
     
  11. add the ability to disable the NPC that is in town. Please!
     
  12. Add please CollectiblePickup and CropGather and it would be great that there would be more OnQuarryEnabled :)
     
  13. The reward has not been counted after update.
    Fix please
     
  14. same problem
     
  15. GatherRewards stopped adding money to all players accounts, the chat spam still says were getting $xx per swing/kill but nothing shows in accounts.
    Running Economics, EconimicsBalanceGUI and Gatherrewards.
    Yes all are updated, Oxide and RustIO also updated.
    No errors show in console.
     
  16. Wulf

    Wulf Community Admin

    Please test the latest Oxide snapshot here: AppVeyor

    Should fix plugins using the wrong hook arguments in the plugin they are relying on (ie. Economics) by sending new object[ "blah", blah ] instead of the actual hook's args in the plugin they are calling or sending an int when the target plugin expects a double.
     
  17. No idea what to do with that oxide snapshot.
    If it is not a .cs or .json file i can do nothing with it.
    Anything in the oxide install cannot be changed by me, only the server tec guys.
     
  18. i just removed the mod till an update is out to fix it.....
     
  19. Its an easy fix, for ServerRewards change your file GatherRewards.cs as bellow

    Code:
    // Change this:
    ServerRewards?.Call("AddPoints", new object[] { player.userID, amount });// to this
    ServerRewards?.Call("AddPoints", new object[] { player.userID, (int)amount });//--
    // Change this:
    ServerRewards?.Call("TakePoints", new object[] { player.userID, amount });// to this
    ServerRewards?.Call("TakePoints", new object[] { player.userID, (int)amount });
    
    For economics, change as bellow
    Code:
    // change this
    Economy.CallHook("Deposit", player.userID, amount);// into this
    Economy.CallHook("Deposit", player.userID, (double)amount);//---
    // and this
    Economy.CallHook("Withdraw", player.userID, amount);// into this
    Economy.CallHook("Withdraw", player.userID, (double)amount);
     
    Last edited by a moderator: Oct 7, 2017
  20. thanks for the help but i'm no developer/coder, i can barely figure out permissions or config files.
    i am not about to mess with a .cs plugin file.
    when the mod makers update i will get it, until then i just won't run it.