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. Mr. Bubbles submitted a new resource:

    Money For Gather - Gives players money through Economics plugin for gathering ores and wood

    Read more about this resource...
     
  2. Mr. Bubbles updated Money For Gather with a new update entry:

    Added console commands & help text

     
  3. Can you make it so you can earn money from gathering dead animals and dead players only?
     
  4. Mr. Bubbles updated Money For Gather with a new update entry:

    Added new command, fixed error on no args to command


    [DOUBLEPOST=1421170819,1421143603][/DOUBLEPOST]
    Next update.
     
  5. Mr. Bubbles updated Money For Gather with a new update entry:

    Added ability to gain money from gathering corpses

     
  6. Is it possible to add getting money from animal kills and have the amount of money set in a config for each animal type?

    On a side note, thanks for all your work on this stuff. This whole project is awesome work.
     
  7. I'll look into it now. Should be possible since Reneb's DeathMessages plugin can determine the animal type that was killed. And you're very welcome. Its been a fun project and has helped me get more familiar with Lua/Oxide programming. Hopefully it'll help me with my trivia plugin that I've been working/stalling on for about two weeks now. LOL

    EDIT: Definitely doable. Working on it now. Update for it should be out within the next day or so.
     
    Last edited by a moderator: Jan 14, 2015
  8. You are awesome! Thanks for the update Mr Bubbles.
     
  9. No problem. Let me know if you see any bugs. It all looked okay and worked when I tested it, but its very possible I missed something.
     
  10. One more thing and I believe it will be perfect.

    I've been trying to modify the code to only display money gained every 5 dollars in chat to limit the amount of chat spam to the user. It would seem I'm not very good at understanding how to count key value pairs in lua. Ideally, it would be nice to set the dollar amount in the config. Is this something you might have experience with doing or have any suggestions?
     
  11. With key-value pairs, all you need to know is the key. The player's name for example. Then you can get the value attached to the key. I haven't had much experience with k, v pairs in Lua, but its similar to HashMaps in Java. I noticed that the chat messages were a bit "spammy" at times which is why I put the option in there to disable them for now. Not much of a solution, but better than nothing. I'll see what I can do in the near future about implementing a way to limit them. If you just wanted to count the number of key-value pairs in a table you could do something like:
    Code:
    counter = 0
    for k, v in data do
    counter = counter + 1
    end
    print(counter)
    
    Also, I'm not opposed to any updates you may come up with to further the plugin.
    You can find the little bit of work I've done with Oxide plugins here. Feel free to fork, modify, submit a pull request, and I'll put it in the release version on here (with credit where credit is due of course ;)).
    [DOUBLEPOST=1421480240][/DOUBLEPOST]In lieu of creating a key-pair value table, I think it may be easier to post a chat message once per corpse/tree/ore rock gathered. If I remember correctly, there is a way to determine the percentage or 'health' that the ResourceDispenser has left. I could have it display a chat message with the total amount gained once the ResourceDispenser 'health' reaches zero or zero percent.
     
    Last edited by a moderator: Jan 17, 2015
  12. only trouble I have is when using the gather mod. when I set gather to x3 it triples the money every strike.
    would like it only to give once every hit not 3 notices everyhit
     
  13. I modified the plugin and sent it to Mr. Bubbles for review. If he approves, the following is a list of changes that will be included.
    Changes:
    - Money is given only when dispenser is empty (dispenser.fractionRemaining)
    - Notices only fire 1 time instead of 1 time for each item transferred from the resource dispenser
    - Added $ to some of the gathering messages
    [DOUBLEPOST=1421606617][/DOUBLEPOST]@Upperking

    Check the code in your Evo Exp mod and verify the gather mod code didn't have to be modified to work with Evo. I don't believe the default m-GatherRate plugin ever had that issue when I started working on the above changes. It could be a unique multiplier.
     
    Last edited by a moderator: Jan 18, 2015
  14. Might not directly be an issue with the 3x gather, might more be the issue for gathering from dispenser that give multiple items, example, if you hit a metal node (or another one) you will receive stone, sulfur and metal, which actually triggers the hook 3 times, once per item which is most likely the reason why they're gaining triple the money.
     
  15. ^^ yeah I think thats what its doing so 1 hit Gathers 3X
     
  16. CriticalmAss' modifications will be the next update. Saved me a lot of time on figuring out the percentages myself. Should resolve the chat spam issue. I'll be posting the update a little later tonight.
    [DOUBLEPOST=1421654290,1421632732][/DOUBLEPOST]CriticalmAss' modifications seem to do the trick. I just need to do the same thing for corpse gathering so it only gives money once per corpse and it should be good to go. Update should be out in a day or two. It'll resolve the chat spam and triple money issue since money will only be given when the dispensers (trees, corspes, ore rocks) are destroyed instead of on every item gathered from them.
     
  17. can you make a spoiler for the animal types and item names please? :)