GatherManager

Moved

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

4.93893/5, 131 likes
  1. Yes that is
     
  2. so i did that and it still only give me 1 hqm, i want to make that be 50
     
  3. Can you post the full function code please
     
  4. all of this??:
    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 = 10;
            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;
            }
     
  5. int HQ = 10;
    To
    int HQ = 0;
     
  6. i put it to 10 becuase at 0 it only give me a single piece of HQM where as i want to get 50 HQM on the last hit of the node
    [DOUBLEPOST=1499197045][/DOUBLEPOST]
    so anyway to do this?
     
  7. try this
    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 = 0;
                if(HQ <= 0)
                {
                    var gatherRate = 1;
                    if (GatherResourceModifiers.ContainsKey("High Quality Metal Ore"))
                        gatherRate = (int)GatherResourceModifiers["High Quality Metal Ore"];
                    else if (GatherResourceModifiers.ContainsKey("*"))
                        gatherRate = (int)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;
            }
    
    tested and it work
     
  8. this will give only 50 HQM yes?
     
  9. maybe try before asking?
     
  10. you just said it worked? and ive been asking for a way for it too only give 50 HQM at the end
     
  11. The workaround is great, don't get me wrong but will be nice to have plugin fixed. Thanks sami Tip: use a rock to get most HQ if you use this code.
     
  12. As said multiple time the problem isn't from the plugin but from rust, they changed the loot and a new hook must be created for it.
     
  13. Sorry I didn't read that. Thanks!! This works fine then :)
     
  14. Any guess on how long until the hook?
     
  15. buuump
     
  16. unless you post your config, who the fuck knows
    working fine here
     
  17. Any Solid Solution for high quality metal to be collected from rocks in larger amounts like 100x gather for high quality metal per rock. I cant see all these high gather rate, modded servers have no way of getting tons of highqualitymetal for people to build op bases
    [DOUBLEPOST=1499379565][/DOUBLEPOST]
    Where do you find this section of code so i can do this method
     
  18. @sami37 Is is there any way to make for example only 40 HQM from node and not getting by hits? Because if you hit with bone knife you will get a lot of HQ.

    Or any solution to this?
     
  19. i have set everything to 5x but wish to make it so players only get one skull when destroying a body how would i manage this?
     
  20. I cant seem to get the nodes to give me more than 2HQ on the last strike. My servers running at 100x so i was hoping to get it within that scope but even with the code below it does not budge from 2HQ. I understand the code below dont give me the 100x im looking for but would shoot me in the right direction in regards to getting it to work. Any help would be greatly appreciated!




    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 = 0;
    if(HQ <= 0)
    {
    var gatherRate = 1;
    if (GatherResourceModifiers.ContainsKey("High Quality Metal Ore"))
    gatherRate = (int)GatherResourceModifiers["High Quality Metal Ore"];
    else if (GatherResourceModifiers.ContainsKey("*"))
    gatherRate = (int)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;
    }
    [DOUBLEPOST=1499411055][/DOUBLEPOST]Actually, disregard that. It shows its gathering 2 but in the inventory it its working. Either way thanks