GatherManager

Moved

Total Downloads: 59,074 - First Release: Oct 23, 2014 - Last Update: Aug 27, 2017

4.93893/5, 131 likes
  1. I'm FR and it's difficult for me to read a lot of post sorry x)

    Thanks for other plugin :)

    BetterLoot can modify multiplier of crates on vehicles too ? And Components like gears ?
     
    Last edited by a moderator: Jul 18, 2017
  2. Tried modifying HQM ore drop from rocks using gather.rate dispenser "High Quality Metal Ore" 1000, still only dropping 4 HQM per metal ore rock
     
  3. Try this code instead of the default code
    Only the part i give you, be careful.

    But i don't test if this code works with command IG gather.rate dispenser "High Quality Metal Ore" <number>
     
  4. Now dropping smelted HQM per hit on metal ores. Tyvm!
     
  5. Thanks to sami37, not me ^^
     
  6. Hello , i change all gathers to x3 , but only HQM didnt change , cant change it gather by command , its always x1 , how to cahnge that , thanks for help.
     
  7. Look 3 post before your post...
     
  8. That didnt help , but broke hall plugin , reinstalled
     
  9. Error while compiling: GatherManager.cs(384,21): error CS0103: The name `rand' does not exist in the current context

    What am I doing wrong?
     
  10. You copied the wrong one use this one
    Code:
    private void OnDispenserGather(ResourceDispenser dispenser, BaseEntity entity, Item item)
            {
                System.Random rand = new System.Random();
                if (!entity.ToPlayer()) return;
     
                var player = entity.ToPlayer();
                var amount = item.amount;
                var gatherType = dispenser.gatherType.ToString("G");
     
                if (GatherResourceModifiers.ContainsKey(item.info.displayName.english))
                    item.amount = (int)(item.amount * GatherResourceModifiers[item.info.displayName.english]);
                else if (GatherResourceModifiers.ContainsKey("*"))
                    item.amount = (int)(item.amount * GatherResourceModifiers["*"]);
                if(item.info.displayName.english.Contains("Metal"))
            {
            var rands = rand.Next(1, 10);
            int HQ = item.amount;
            HQ *= rands;
            HQ /= 100;
            if(HQ < 0)
            {
                var gatherRate = 1;
                if (GatherResourceModifiers.ContainsKey("High Quality Metal Ore"))
                    gatherRate = item.amount = (int)(item.amount * GatherResourceModifiers["High Quality Metal Ore"]);
                else if (GatherResourceModifiers.ContainsKey("*"))
                    gatherRate = item.amount = (int)(item.amount * GatherResourceModifiers["*"]);
                HQ = 1 * gatherRate;
            }
            player.inventory.GiveItem(ItemManager.CreateByItemID(2133577942, HQ), player.inventory.containerMain);
            }
                if (!GatherDispenserModifiers.ContainsKey(gatherType)) return;            var dispenserModifier = GatherDispenserModifiers[gatherType];            dispenser.containedItems.Single(x => x.itemid == item.info.itemid).amount += amount - item.amount / dispenserModifier;            if (dispenser.containedItems.Single(x => x.itemid == item.info.itemid).amount < 0)
                    item.amount += (int)dispenser.containedItems.Single(x => x.itemid == item.info.itemid).amount;
            }
     
  11. Ok it compiles now, but I'm still only getting 2 HQM per node - I tried changing that var gatherrate = 1 to 5, but that didn't affect anything.
     
  12. Change this part of the script HQ = 1 * gatherRate;
     
  13. I see 3 things similar to that - which one?

    int HQ = item.amount;
    HQ *= rands;
    HQ /= 100;
    [DOUBLEPOST=1500563937][/DOUBLEPOST]Also I just realized it's giving me like 20 HQM per swing, just not listing it on the GUI
    [DOUBLEPOST=1500563972][/DOUBLEPOST]All I want one node to do is give me 10 HQM, instead of the vanilla 2.
    [DOUBLEPOST=1500564722][/DOUBLEPOST]Ok I'm happy now - changing this part of the code to this gave me 1 HQM per hit, with a 2 finishing bonus which is perfect for my needs. Maybe there is a better way, but I get the results I want.

    var rands = rand.Next(1, 1);
    int HQ = item.amount;
    HQ *= rands;
    HQ /= 200;
    if(HQ < 0)
    {
    var gatherRate = 1;
    if (GatherResourceModifiers.ContainsKey("High Quality Metal Ore"))
    gatherRate = item.amount = (int)(item.amount * GatherResourceModifiers["High Quality Metal Ore"]);
    else if (GatherResourceModifiers.ContainsKey("*"))
    gatherRate = item.amount = (int)(item.amount * GatherResourceModifiers["*"]);
    HQ = 1;
     
  14. Read all posts from page 91
     
  15. I'm good now - see mine above.
     
  16. how can i multiple all resources with 1 command
     
  17. Hello.

    Can someone send me cfg file, i want make my server 3x modded.. so all (stone,metal,hq,sulf,wood) is 3x..
     
  18. My post on page 84 download that config edit it with notepad++ and change it to 3.0 from 2.0
     
  19. got it.. ty
     
  20. how do I get it to truly gather double resources? When mining a stone node you get a total of 1750 stone and 500 sulfur. A true 2x would give 2k stone and 600 sulfur. It also does not give double HQM even when specifying to give 2x High Quality Metal Ore. thanks