hoppel submitted a new resource:
ToolsGatherManager - Modifies the gather rate from certain tools
Read more about this resource...
ToolsGatherManager
Moved
Total Downloads: 1,628 - First Release: Jul 6, 2017 - Last Update: Aug 22, 2017
- 5/5, 12 likes
-
Works Great! I Love the Plugin
-
so uhh... im a bit daft but im interested in this... how would i add other tools and other resources?
-
Code:
"Tools": [ "icepick.salvaged", "rock", "example", "example"
-
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
-
and with the hqm mhh no idea right now i will take a look at it -
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?
-
hoppel updated ToolsGatherManager with a new update entry:
1.0.2
[DOUBLEPOST=1499449546][/DOUBLEPOST]Last edited by a moderator: Jul 7, 2017 -
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... -
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? -
-
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); } }
-
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
-
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? -
-
Does this work with finishing bonuses? I'm going to feel really stupid asking this lol.
[DOUBLEPOST=1500073416][/DOUBLEPOST] -
-
-
Can you add Permissions to use it?
-