NoLoot

Moved

Total Downloads: 422 - First Release: Dec 1, 2015 - Last Update: May 19, 2017

5/5, 5 likes
  1. Wulf

    Wulf Community Admin

    virobeast submitted a new resource:

    No Loot - Remove all possible loot from your server, boxes / barrels / oil barrels

    Read more about this resource...
     
  2. virobeast updated No Loot with a new update entry:

    0.0.2

     
  3. "chicken.prefab",
    "horse.prefab",
    "boar.prefab",
    "stag.prefab",
    "wolf.prefab",
    "bear.prefab",
    "resource-ores_stone-ore.prefab",
    "resource-ores_metal-ore.prefab",
    "resource-ores_sulfur-ore.prefab"

    Different
    animal
    tree
    grass
    collection
    How to remove
    Is there ?
     
  4. guys, plugin is not working. has work plugin? need delete all barels and loot box on map!
     
  5. Console commands:

    Code:
    del Assets/bundled/Prefabs/autospawn/resource/loot
    del Assets/bundled/Prefabs/radtown
     
  6. THX VERY MUCH :* . U save world! ;)
     
  7. You're welcome.
     
  8. Samis code works to get rid of the error, and the script compiles. However, it does not seem to work.
     
    Last edited by a moderator: Oct 25, 2016
  9. Wulf

    Wulf Community Admin

    Wulf updated No Loot with a new update entry:

    1.0.0

     
  10. I want to remove the barrels
    Oil barrels and boxes are left in warehouses, spheres, radtown
     
  11. Wulf

    Wulf Community Admin

    You're saying there are some that are not removed?
     
  12. Remove this loot or reduce it on the map
    Leave boxes and oil barrels in warehouses, spheres, radtown
     

    Attached Files:

  13. Wulf

    Wulf Community Admin

    But the plugin is No Loot, not Some Loot. :p
     
  14. How to leave on the sphere of oil barrels?

    Say loot from an airplane does not drop out now
    How to remove new loot in rust?

    Code:
    namespace Oxide.Plugins
    {
        [Info("No Loot", "Wulf/lukespragg", "1.0.0", ResourceId = 1488)]
        [Description("Removes all loot containers and prevents them from spawning")]
        public class NoLoot : CovalencePlugin
        {
            private bool serverReady = false;        #region Loot Handling        private bool ProcessContainers(BaseEntity entity)
            {
                if (!entity.isActiveAndEnabled || entity.IsDestroyed) return false;
                if (!(entity is LootContainer || entity is JunkPile)) return false;            var junkPile = entity as JunkPile;
                if (junkPile != null)
                {
                    junkPile.CancelInvoke("TimeOut");
                    junkPile.CancelInvoke("CheckEmpty");
                    junkPile.CancelInvoke("Effect");
                    junkPile.CancelInvoke("SinkAndDestroy");
                    junkPile.Kill();
                }
                else
                    entity.Kill();            return true;
            }        private void OnServerInitialized()
            {
                var loot = UnityEngine.Resources.FindObjectsOfTypeAll<LootContainer>();
                var count = 0;
                foreach (var entity in loot)
                {
                if (entity.name.Contains("barrel")){
                if (ProcessContainers(entity)) count++;
               
                }
               
                }            Puts($"Removed {count} loot containers");
                serverReady = true;
            }        private void OnEntitySpawned(BaseEntity entity)
            {
                if (!serverReady) return;
                if (entity.OwnerID == 0) ProcessContainers(entity);
            }        #endregion
        }
    }
    
     

    Attached Files:

    Last edited by a moderator: May 29, 2017