ToolsGatherManager

Moved

Total Downloads: 1,628 - First Release: Jul 6, 2017 - Last Update: Aug 22, 2017

5/5, 12 likes
  1. hoppel submitted a new resource:

    ToolsGatherManager - Modifies the gather rate from certain tools

    Read more about this resource...
     
  2. Works Great! I Love the Plugin :D
     
  3. so uhh... im a bit daft but im interested in this... how would i add other tools and other resources?
     
  4. Code:
      "Tools": [
        "icepick.salvaged",
        "rock",
        "example",
        "example"
    What do you mean by other resources?
     
  5. i mean other resource like stone, hq metal ore... and other tools like steel pickaxe... like the salvaged axe to harvest a tiny bit more cloth from cactus amd icepick to harvest more hq metal from metal ore... 4 instead of 2
     
  6. it gives you more cloth just tested http://i.imgur.com/XXY1FWM.jpg
    and with the hqm mhh no idea right now i will take a look at it
     
  7. did you replace "example" with "Cloth" ??? also... i assume i can add as much "resources" as i please right? "Leather" ; "Animal Fat" ; etc etc ? reason im asking is that i don't simply want to double or triple or octuple every resource at the same time but... in the name of balance... fine tune them so i get an increase in hg metal without sitting with heaps of animal fat? does it make sense what im saying?
     
  8. hoppel updated ToolsGatherManager with a new update entry:

    1.0.2


    [DOUBLEPOST=1499449546][/DOUBLEPOST]
    delete your old config, download the update and check out the config. should be easy to understand now :p
     
    Last edited by a moderator: Jul 7, 2017
  9. ahh super my guy this is what i meant indeed this is good thanks. swell plugin indeed
    [DOUBLEPOST=1499450410][/DOUBLEPOST]mr hoppel sir... is it possible to re-add the different resources for each tool separately? that would be super cool indeed...
     
  10. When I start my server I get: "Error while compiling: ToolsGatherManager.cs(41,33): error CS0664: Literal of type double cannot be implicitly converted to type `float'. Add suffix `f' to create a literal of this type"

    What did I do wrong?
     
  11. can you show me your config?
     
  12. Code:
    using System.Collections.Generic;
    using Newtonsoft.Json;namespace Oxide.Plugins
    {
        [Info("ToolsGatherManager", "hoppel", "1.0.1")]    class ToolsGatherManager : RustPlugin
        {        void OnDispenserGather(ResourceDispenser dispenser, BaseEntity entity, Item item)
            {
                if (entity.ToPlayer()?.GetActiveItem() != null)
                {
                    var toolName = entity.ToPlayer().GetActiveItem().info.shortname;
                    if (config.tools.ContainsKey(toolName))
                    {
                        item.amount = (int)(item.amount * config.tools[toolName]);
                    }
                }        }        Dictionary<string, float> tools = new Dictionary<string, float>()
            {
                ["bone.club"] = 2.0,
                ["knife.bone"] = 2.5,
                ["longsword"] = 2.5,
                ["mace"] = 4.0,
                ["machete"] = 2.5,
                ["salvaged.cleaver"] = 2.5,
                ["salvaged.sword"] = 2.5,
                ["hatchet"] = 2.5,
                ["pickaxe"] = 5.0,
                ["rock"] = 2.0,
                ["axe.salvaged"] = 2.5,
                ["hammer.salvaged"] = 4.0,
                ["icepick.salvaged"] = 2.5,
                ["stonehatchet"] = 2.5,
                ["stone.pickaxe"] = 2.5
            };        static Configuration config;        public class Configuration
            {
                [JsonProperty(PropertyName = "Tools")]
                public Dictionary<string, float> tools;            public static Configuration DefaultConfig()
                {
                    return new Configuration
                    {
                        tools = new Dictionary<string, float>() {             ["bone.club"] = 2.0,
                ["knife.bone"] = 2.5,
                ["longsword"] = 2.5,
                ["mace"] = 4.0,
                ["machete"] = 2.5,
                ["salvaged.cleaver"] = 2.5,
                ["salvaged.sword"] = 2.5,
                ["hatchet"] = 2.5,
                ["pickaxe"] = 5.0,
                ["rock"] = 2.0,
                ["axe.salvaged"] = 2.5,
                ["hammer.salvaged"] = 4.0,
                ["icepick.salvaged"] = 2.5,
                ["stonehatchet"] = 2.5,
                ["stone.pickaxe"] = 2.5}
                    };
                }
            }
            protected override void LoadConfig()
            {
                base.LoadConfig();
                try
                {
                    config = Config.ReadObject<Configuration>();
                    if (config == null)
                    {
                        LoadDefaultConfig();
                        SaveConfig();
                    }
                }
                catch
                {
                    PrintWarning($"Creating new config file.");
                    LoadDefaultConfig();
                }
            }
            protected override void LoadDefaultConfig() => config = Configuration.DefaultConfig();
            protected override void SaveConfig() => Config.WriteObject(config);
        }
    }
    
     
  13. thats the plugin :p you dont have to edit the plugin, delete the plugin install it new and edit the config under \YOURPATH\oxide\config and reload the plugin using "reload ToolsGatherManager" in the console/rcon or "oxide.reload ToolsGatherManager" with your ingame console
     
  14. lol Thank you. :) I am new to this.
    [DOUBLEPOST=1499592080][/DOUBLEPOST]Am I allowed to do other than .0 and .5? Like, can I use something like 2.3, 1.2, 2.4, etc? Or, does it have to be .0 and .5?
     
  15. works with .0-9 :p
     
  16. Does this work with finishing bonuses? I'm going to feel really stupid asking this lol.
    [DOUBLEPOST=1500073416][/DOUBLEPOST]
    I just tried, and it does not sadly.
     
  17. it sadly does not :| i will see what i can do!
     
  18. Thank you!
     
  19. Can you add Permissions to use it?
     
  20. I think it's a all around plugin from when I had used it.