using System.Collections.Generic; using UnityEngine; using System.Linq; using UnityEngine.AI; using System; namespace Oxide.Plugins { [Info("RobSpawn", "Steenamaroo For RobJ", "2.1.2", ResourceId = 0)] [Description("Use only with RobJ maps")] // Coverted to use 1 cell and 1 switch as location identifiers, // then additional switches and cells as 1 + 10, for kit number. class RobSpawn : RustPlugin { // object OnEntityKill(BaseNetworkable entity) => entity?.PrefabName == "assets/content/vehicles/crane_magnet/shreddable_pickuptruck.prefab" && entity?.net?.ID == null ? true : (object)null; // public static RobSpawn t; const string prefabname = "assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_roam.prefab"; Dictionary npcs = new Dictionary(); public class Info { public int kit; public Vector3 loc; public string name; public int respawn; public int corpse; public List LootItems = new List(); } public class Kit { public string name; public int health; public int aggrorange = 100; public bool peacekeeper = false; public int roamrange = 50; public int corpse_minutes = 1; public int respawn_minutes = 1; public bool CanHeal = true; public Dictionary belt = new Dictionary(); public Dictionary wear = new Dictionary(); public List LootItems = new List(); } public class LootItem { public string ItemShortname = "wood"; public ulong SkinID = 0; public int Spawn_Percent_Chance = 100; public int Amount = 1; } public List KitList = new List() { // 1x Rand_Switch and 1x Cell, plus the following.. new Kit() //1x Rand_Switch { name = "Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "smg.mp5", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist", 0 } }, CanHeal = true }, new Kit() //2x Rand_Switch { name = "Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.lr300", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist", 0 } }, CanHeal = true }, new Kit() //3x Rand_Switch { name = "Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.m39", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist", 0 } }, CanHeal = true }, new Kit() //4x Rand_Switch { name = "Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "shotgun.spas12", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist", 0 } }, CanHeal = true }, new Kit() //5x Rand_Switch { name = "Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "pistol.m92", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist", 0 } }, CanHeal = true }, new Kit() //6x Rand_Switch { name = "Scientist Team Leader", health = 190, aggrorange = 50, peacekeeper = false, roamrange = 3, corpse_minutes = 3, respawn_minutes = 20, belt = new Dictionary() { { "pistol.m92", 0 }, { "weapon.mod.flashlight", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist", 0 } }, CanHeal = true }, new Kit() //7x Rand_Switch { name = "Arctic Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "smg.mp5", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist_arctic", 0 } }, CanHeal = true }, new Kit() //8x Rand_Switch { name = "Arctic Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.lr300", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist_arctic", 0 } }, CanHeal = true }, new Kit() //9x Rand_Switch { name = "Arctic Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.m39", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist_arctic", 0 } }, CanHeal = true }, new Kit() //1x Cell { name = "Arctic Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "shotgun.spas12", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist_arctic", 0 } }, CanHeal = true }, new Kit() //1x Cell and 1x Rand_Switch { name = "Arctic Scientist", health = 150, aggrorange = 45, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "pistol.m92", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist_arctic", 0 } }, CanHeal = true }, new Kit() //1x Cell and 2x Rand_Switch { name = "Arctic Scientist Team Leader", health = 190, aggrorange = 50, peacekeeper = false, roamrange = 3, corpse_minutes = 3, respawn_minutes = 20, belt = new Dictionary() { { "pistol.m92", 0 }, { "weapon.mod.flashlight", 0 } }, wear = new Dictionary() { { "hazmatsuit_scientist_arctic", 0 } }, CanHeal = true }, new Kit() //1x Cell and 3x Rand_Switch { name = "Tunnel Dweller", health = 125, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "pistol.m92", 0 } }, wear = new Dictionary() { { "jumpsuit.suit", 0 }, { "shoes.boots", 0 }, { "hat.gas.mask", 0 } }, CanHeal = true }, new Kit() //1x Cell and 4x Rand_Switch { name = "Tunnel Dweller", health = 125, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.m39", 0 } }, wear = new Dictionary() { { "jumpsuit.suit", 0 }, { "shoes.boots", 0 }, { "hat.gas.mask", 0 } }, CanHeal = true }, new Kit() //1x Cell and 5x Rand_Switch { name = "Tunnel Dweller Team Leader", health = 170, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 20, belt = new Dictionary() { { "rifle.m39", 0 }, { "weapon.mod.flashlight", 0 }, { "weapon.mod.8x.scope", 0 } }, wear = new Dictionary() { { "jumpsuit.suit", 0 }, { "shoes.boots", 0 }, { "hat.gas.mask", 0 } }, CanHeal = true }, new Kit() //1x Cell and 6x Rand_Switch { name = "Underwater Dweller", health = 175, aggrorange = 30, peacekeeper = false, roamrange = 1, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "pistol.m92", 0 } }, wear = new Dictionary() { { "jumpsuit.suit.blue", 0 }, { "hat.gas.mask", 0 }, { "shoes.boots", 0 }, { "diving.tank", 0 } }, CanHeal = false }, new Kit() //1x Cell and 7x Rand_Switch { name = "Underwater Dweller", health = 215, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "smg.mp5", 2887642987 } }, wear = new Dictionary() { { "jumpsuit.suit.blue", 0 }, { "hat.gas.mask", 0 }, { "shoes.boots", 0 }, { "diving.tank", 0 } }, CanHeal = true }, new Kit() //1x Cell and 8x Rand_Switch { name = "Underwater Dweller Team Leader", health = 390, aggrorange = 32, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 20, belt = new Dictionary() { { "rifle.lr300", 2151920583 }, { "weapon.mod.flashlight", 0 }, { "weapon.mod.holosight", 0 } }, wear = new Dictionary() { { "jumpsuit.suit.blue", 0 }, { "hat.gas.mask", 0 }, { "shoes.boots", 0 }, { "diving.tank", 0 }, {"metal.plate.torso", 797410767 } }, CanHeal = true }, new Kit() //1x Cell and 9x Rand_Switch { name = "Heavy Scientist", health = 350, aggrorange = 30, peacekeeper = false, roamrange = 3, corpse_minutes = 3, respawn_minutes = 20, belt = new Dictionary() { { "shotgun.spas12", 0 }, { "weapon.mod.flashlight", 0 }, { "weapon.mod.holosight", 0 } }, wear = new Dictionary() { { "scientistsuit_heavy", 0 } }, CanHeal = true }, new Kit() //1x blocker { name = "Heavy Scientist", health = 300, aggrorange = 30, peacekeeper = false, roamrange = 3, corpse_minutes = 3, respawn_minutes = 20, belt = new Dictionary() { { "lmg.m249", 0 }, { "weapon.mod.flashlight", 0 }, { "weapon.mod.holosight", 0 } }, wear = new Dictionary() { { "scientistsuit_heavy", 0 } }, CanHeal = true }, new Kit() //1x blocker and 1x Rand_Switch { name = "Bandit", health = 200, aggrorange = 30, peacekeeper = true, roamrange = 3, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "rifle.semiauto", 0 } }, wear = new Dictionary() { { "attire.banditguard", 0 } }, CanHeal = true }, new Kit() //1x blocker and 2x Rand_Switch { name = "Desert Rat", health = 135, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "rifle.lr300", 1256863749 } }, wear = new Dictionary() { { "hat.gas.mask", 0 }, { "roadsign.gloves", 2510097681 }, { "hoodie", 2503910428 }, { "pants", 2503903214 }, { "shoes.boots", 2510093391 }, { "metal.plate.torso", 2475407123 } }, CanHeal = true }, new Kit() //1x blocker and 3x Rand_Switch { name = "Desert Rat", health = 135, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "smg.2", 2530798091 } }, wear = new Dictionary() { { "hat.gas.mask", 0 }, { "roadsign.gloves", 2510097681 }, { "hoodie", 2503910428 }, { "pants", 2503903214 }, { "shoes.boots", 2510093391 }, { "metal.plate.torso", 2475407123 } }, CanHeal = true }, new Kit() //1x blocker and 4x Rand_Switch { name = "Desert Rat", health = 135, aggrorange = 30, peacekeeper = false, roamrange = 1, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "rifle.l96", 2814893650 }, { "weapon.mod.8x.scope", 0 } }, wear = new Dictionary() { { "hat.gas.mask", 0 }, { "roadsign.gloves", 2510097681 }, { "hoodie", 2503910428 }, { "pants", 2503903214 }, { "shoes.boots", 2510093391 }, { "metal.plate.torso", 2475407123 } }, CanHeal = true }, new Kit() //1x blocker and 5x Rand_Switch { name = "Desert Rat", health = 135, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "shotgun.pump", 1266271867 } }, wear = new Dictionary() { { "hat.gas.mask", 0 }, { "roadsign.gloves", 2510097681 }, { "hoodie", 2503910428 }, { "pants", 2503903214 }, { "shoes.boots", 2510093391 }, { "metal.plate.torso", 2475407123 } }, CanHeal = true }, new Kit() //1x blocker and 6x Rand_Switch { name = "Desert Rat Team Leader", health = 170, aggrorange = 35, peacekeeper = false, roamrange = 1, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "hmlmg", 0 } }, wear = new Dictionary() { { "hat.gas.mask", 0 }, { "roadsign.gloves", 2510097681 }, { "hoodie", 2503910428 }, { "pants", 2503903214 }, { "shoes.boots", 2510093391 }, { "metal.plate.torso", 2475407123 } }, CanHeal = true }, new Kit() //1x blocker and 7x Rand_Switch { name = "Doctor", health = 140, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "pistol.m92", 0 } }, wear = new Dictionary() { { "halloween.surgeonsuit", 0 } }, CanHeal = true }, new Kit() //1x blocker and 8x Rand_Switch { name = "Lumber Jack", health = 140, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "shotgun.pump", 1932318189 } }, wear = new Dictionary() { { "lumberjack hoodie", 0 }, { "pants", 0 }, { "shoes.boots", 0 }, { "santabeard", 0 }, { "burlap.gloves", 0 }, { "hat.cap", 0 } }, CanHeal = false }, new Kit() //1x blocker and 9x Rand_Switch { name = "Bad Santa", health = 140, aggrorange = 30, peacekeeper = false, roamrange = 5, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "smg.mp5", 2899340592 } }, wear = new Dictionary() { { "hoodie", 2899736521 }, { "pants", 2899737872 }, { "shoes.boots", 1229544227 }, { "santabeard", 0 }, { "burlap.gloves", 2900409207 }, { "santahat", 0 } }, CanHeal = true }, new Kit() //1x blocker and 1x Cell { name = "Mr Spice Factory Worker", health = 130, aggrorange = 30, peacekeeper = false, roamrange = 5, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "shotgun.pump", 1092734120 } }, wear = new Dictionary() { { "hoodie", 2919913723 }, { "pants", 2919917254 }, { "shoes.boots", 2090776132 }, { "hat.cap", 2920518318 } }, CanHeal = false }, new Kit() //1x blocker and 1x Cell and 1x Rand_Switch { name = "Mr Spice Factory Worker", health = 140, aggrorange = 30, peacekeeper = false, roamrange = 3, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "smg.mp5", 953282188 } }, wear = new Dictionary() { { "hoodie", 2919913723 }, { "pants", 2919917254 }, { "shoes.boots", 2090776132 }, { "hat.cap", 2920518318 } }, CanHeal = false }, new Kit() //1x blocker and 1x Cell and 2x Rand_Switch { name = "Mr Spice Leader", health = 230, aggrorange = 30, peacekeeper = false, roamrange = 6, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.ak", 809212871 } }, wear = new Dictionary() { { "hoodie", 2919913723 }, { "pants", 2919917254 }, { "shoes.boots", 2090776132 }, { "hat.cap", 2920518318 }, { "metal.plate.torso", 797410767 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "rug.bear", SkinID = 2236519739, Spawn_Percent_Chance = 10 } } }, new Kit() //1x blocker and 1x Cell and 3x Rand_Switch { name = "Tuna Factory Worker", health = 130, aggrorange = 30, peacekeeper = false, roamrange = 9, corpse_minutes = 3, respawn_minutes = 10, belt = new Dictionary() { { "pistol.prototype17", 0 } }, wear = new Dictionary() { { "hoodie", 2304560839 }, { "pants", 2304559261 }, { "shoes.boots", 2090776132 } }, CanHeal = false, LootItems = new List() { new LootItem { ItemShortname = "fish.salmon", SkinID = 0, Spawn_Percent_Chance = 15 }, new LootItem { ItemShortname = "can.tuna", SkinID = 0, Spawn_Percent_Chance = 35 }, new LootItem { ItemShortname = "box.wooden.large", SkinID = 2228823369, Spawn_Percent_Chance = 5, } } }, new Kit() //1x blocker and 1x Cell and 49x Rand_Switch { name = "Tuna Factory Worker", health = 150, aggrorange = 30, peacekeeper = false, roamrange = 4, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "smg.thompson", 2115687030 } }, wear = new Dictionary() { { "hoodie", 2304560839 }, { "pants", 2304559261 }, { "shoes.boots", 2090776132 } }, CanHeal = false, LootItems = new List() { new LootItem { ItemShortname = "fish.salmon", SkinID = 0, Spawn_Percent_Chance = 5 }, new LootItem { ItemShortname = "can.tuna", SkinID = 0, Spawn_Percent_Chance = 25 } } }, new Kit() //1x blocker and 1x Cell nd 5x Rand_Switch { name = "Tuna Factory Manager", health = 250, aggrorange = 30, peacekeeper = false, roamrange = 4, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.lr300", 2530899430 } }, wear = new Dictionary() { { "hoodie", 2304560839 }, { "pants", 2304559261 }, { "shoes.boots", 2090776132 }, { "metal.plate.torso", 2215911873 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "wall.frame.garagedoor", SkinID = 1615450482, Spawn_Percent_Chance = 5 } } }, new Kit() //1x blocker and 1x Cell 6x Rand_Switch { name = "NVGM Scientist", health = 320, aggrorange = 30, peacekeeper = false, roamrange = 4, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "shotgun.spas12", 0 }, { "weapon.mod.lasersight", 0 }}, wear = new Dictionary() { { "hazmatsuit_scientist_nvgm", 0 } }, CanHeal = false, LootItems = new List() { new LootItem { ItemShortname = "supply.signal", SkinID = 0, Spawn_Percent_Chance = 5 }, new LootItem { ItemShortname = "techparts", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 2 } } }, new Kit() //1x blocker and 1x Cell and 7x Rand_Switch { name = "NVGM Scientist", health = 390, aggrorange = 30, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.lr300", 2151920583 }, { "weapon.mod.lasersight", 0 }}, wear = new Dictionary() { { "hazmatsuit_scientist_nvgm", 0 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "supply.signal", SkinID = 0, Spawn_Percent_Chance = 5 }, new LootItem { ItemShortname = "techparts", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 4 } } }, new Kit() //1x blocker and 1x Cell and 8x Rand_Switch { name = "NVGM Scientist Team Leader", health = 420, aggrorange = 30, peacekeeper = false, roamrange = 4, corpse_minutes = 3, respawn_minutes = 15, belt = new Dictionary() { { "rifle.lr300", 02151920583 }, { "weapon.mod.holosight", 0 }, { "weapon.mod.lasersight", 0 }}, wear = new Dictionary() { { "hazmatsuit_scientist_nvgm", 0 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "smg.thompson", SkinID = 0, Spawn_Percent_Chance = 1 }, new LootItem { ItemShortname = "supply.signal", SkinID = 0, Spawn_Percent_Chance = 2 }, new LootItem { ItemShortname = "techparts", SkinID = 0, Spawn_Percent_Chance = 12, Amount = 4 }, new LootItem { ItemShortname = "metal.refined", SkinID = 0, Spawn_Percent_Chance = 12, Amount = 15 }, new LootItem { ItemShortname = "syringe.medical", SkinID = 0, Spawn_Percent_Chance = 33, Amount = 1 } } }, new Kit() //1x blocker and 1x Cell and 9x Rand_Switch { name = "Junk Yard Owner", health = 155, aggrorange = 30, peacekeeper = false, roamrange = 20, corpse_minutes = 3, respawn_minutes = 25, belt = new Dictionary() { { "shotgun.waterpipe", 0 } }, wear = new Dictionary() { { "roadsign.jacket", 1852238534 }, { "roadsign.kilt", 1852235315 }, { "coffeecan.helmet", 1852240690 }, { "boots.frog", 0 }, { "burlap.shirt", 719989461 }, { "burlap.trousers", 920139767 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "ammo.handmade.shell", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 11 }, new LootItem { ItemShortname = "door.hinged.metal", SkinID = 1570978071, Spawn_Percent_Chance = 8 }, new LootItem { ItemShortname = "can.beans.empty", SkinID = 0, Spawn_Percent_Chance = 35, Amount = 4 }, new LootItem { ItemShortname = "can.tuna.empty", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 2 }, new LootItem { ItemShortname = "scrap", SkinID = 0, Spawn_Percent_Chance = 15, Amount = 7 }, new LootItem { ItemShortname = "rug", SkinID = 945282460, Spawn_Percent_Chance = 7 }, new LootItem { ItemShortname = "chair", SkinID = 2075743802, Spawn_Percent_Chance = 3 } } }, new Kit() //1x blocker and 1x Cell and 10x Rand_Switch { name = "Railway Maintenance Worker", health = 145, aggrorange = 30, peacekeeper = false, roamrange = 20, corpse_minutes = 3, respawn_minutes = 25, belt = new Dictionary() { { "rifle.semiauto", 2402030924 } }, wear = new Dictionary() { { "hat.miner", 3041020140 }, { "hoodie", 3041021678 }, { "pants", 3041022154 }, { "metal.plate.torso", 2405107952 }, { "shoes.boots", 0 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "door.hinged.toptier", SkinID = 2830678307, Spawn_Percent_Chance = 10, Amount = 1 } } }, new Kit() { name = "Railway Maintenance Worker Boss", health = 240, aggrorange = 32, peacekeeper = false, roamrange = 20, corpse_minutes = 3, respawn_minutes = 25, belt = new Dictionary() { { "rifle.lr300", 2404832446 } }, wear = new Dictionary() { { "hat.miner", 3041020140 }, { "hoodie", 3041021678 }, { "pants", 3041022154 }, { "metal.plate.torso", 2405107952 }, { "shoes.boots", 0 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "door.hinged.toptier", SkinID = 2830678307, Spawn_Percent_Chance = 13, Amount = 1 } } }, new Kit() { name = "Pumpkin Servant", health = 300, aggrorange = 32, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 25, belt = new Dictionary() { { "shotgun.double", 3049787423 } }, wear = new Dictionary() { { "pumpkin", 3041020140 }, { "burlap.shirt", 858256803 }, { "burlap.trousers", 858256643 }, { "burlap.shoes", 858257266 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "box.wooden.large", SkinID = 1885863219, Spawn_Percent_Chance = 15 }, new LootItem { ItemShortname = "rock", SkinID = 1571052840, Spawn_Percent_Chance = 25 }, } }, new Kit() { name = "Pumpkin Head Servant", health = 400, aggrorange = 32, peacekeeper = false, roamrange = 10, corpse_minutes = 3, respawn_minutes = 25, belt = new Dictionary() { { "rifle.ak", 3048704361 } }, wear = new Dictionary() { { "pumpkin", 3041020140 }, { "burlap.shirt", 858256803 }, { "metal.plate.torso", 1886179838 }, { "burlap.trousers", 858256643 }, { "burlap.shoes", 858257266 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "box.wooden.large", SkinID = 1885863219, Spawn_Percent_Chance = 37 }, new LootItem { ItemShortname = "wall.frame.garagedoor", SkinID = 2627987995, Spawn_Percent_Chance = 27 }, new LootItem { ItemShortname = "furnace", SkinID = 3048941724, Spawn_Percent_Chance = 35 }, new LootItem { ItemShortname = "furnace", SkinID = 3049167331, Spawn_Percent_Chance = 35 }, new LootItem { ItemShortname = "rifle.bolt", SkinID = 2630099186, Spawn_Percent_Chance = 2 }, new LootItem { ItemShortname = "door.hinged.metal", SkinID = 2875905399, Spawn_Percent_Chance = 15 }, new LootItem { ItemShortname = "door.double.hinged.metal", SkinID = 1886090836, Spawn_Percent_Chance = 37 }, new LootItem { ItemShortname = "rug", SkinID = 3048288522, Spawn_Percent_Chance = 24 }, new LootItem { ItemShortname = "rifle.semiauto", SkinID = 1886298134, Spawn_Percent_Chance = 3 }, } }, new Kit() { name = "Electrical Engineer", health = 240, aggrorange = 32, peacekeeper = false, roamrange = 2, corpse_minutes = 3, respawn_minutes = 25, belt = new Dictionary() { { "smg.2", 3045025929 } }, wear = new Dictionary() { { "hoodie", 1819497052 }, { "pants", 1819498178 }, { "shoes.boots", 919261524 }, { "burlap.gloves", 971733833 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "box.wooden", SkinID = 1820400113, Spawn_Percent_Chance = 15 }, new LootItem { ItemShortname = "wall.frame.garagedoor", SkinID = 1819106723, Spawn_Percent_Chance = 11 }, new LootItem { ItemShortname = "rug", SkinID = 1839108631, Spawn_Percent_Chance = 22 }, } }, new Kit() { name = "Hydroelectric Plant Technician", health = 280, aggrorange = 32, peacekeeper = false, roamrange = 3, corpse_minutes = 3, respawn_minutes = 25, belt = new Dictionary() { { "rifle.semiauto", 1637683572 } }, wear = new Dictionary() { { "hoodie", 1819497052 }, { "pants", 1819498178 }, { "shoes.boots", 919261524 }, { "burlap.gloves", 971733833 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "box.wooden", SkinID = 1820400113, Spawn_Percent_Chance = 19 }, new LootItem { ItemShortname = "wall.frame.garagedoor", SkinID = 1819106723, Spawn_Percent_Chance = 11 }, new LootItem { ItemShortname = "rug", SkinID = 1839108631, Spawn_Percent_Chance = 35 }, new LootItem { ItemShortname = "door.hinged.metal", SkinID = 1576241040, Spawn_Percent_Chance = 24 }, new LootItem { ItemShortname = "door.hinged.metal", SkinID = 2082467002, Spawn_Percent_Chance = 17 }, new LootItem { ItemShortname = "door.hinged.metal", SkinID = 3025309177, Spawn_Percent_Chance = 12 }, } }, new Kit() { name = "Hydroelectric Plant Boss", health = 460, aggrorange = 32, peacekeeper = false, roamrange = 3, corpse_minutes = 3, respawn_minutes = 25, belt = new Dictionary() { { "rifle.ak", 1127194813 } }, wear = new Dictionary() { { "metal.plate.torso", 1825471202 }, { "hoodie", 1819497052 }, { "pants", 1819498178 }, { "shoes.boots", 919261524 }, { "burlap.gloves", 971733833 } }, CanHeal = true, LootItems = new List() { new LootItem { ItemShortname = "box.wooden", SkinID = 1820400113, Spawn_Percent_Chance = 28 }, new LootItem { ItemShortname = "wall.frame.garagedoor", SkinID = 1819106723, Spawn_Percent_Chance = 27 }, new LootItem { ItemShortname = "rug", SkinID = 1839108631, Spawn_Percent_Chance = 25 }, new LootItem { ItemShortname = "door.hinged.metal", SkinID = 1576241040, Spawn_Percent_Chance = 15 }, new LootItem { ItemShortname = "jackhammer", SkinID = 2374409703, Spawn_Percent_Chance = 5 }, new LootItem { ItemShortname = "explosive.satchel", SkinID = 2943033789, Spawn_Percent_Chance = 12 }, new LootItem { ItemShortname = "door.hinged.metal", SkinID = 2082467002, Spawn_Percent_Chance = 14 }, new LootItem { ItemShortname = "door.hinged.metal", SkinID = 3025309177, Spawn_Percent_Chance = 11 }, } }, }; public static System.Random random = new System.Random(); void OnServerInitialized() { foreach (var door in BaseNetworkable.serverEntities.OfType().ToList()) { if (door.PrefabName.Contains("hinged.security")) { var rd = (Door)GameManager.server.CreateEntity(door.PrefabName, door.transform.position, door.transform.rotation); rd.Spawn(); door.Kill(); } } foreach (var sg in SpawnHandler.Instance.SpawnGroups.Select(x => x as SpawnGroup)) { if (sg?.name != null && sg.name.Contains("DwellingSpawner_300")) { sg.maxPopulation = 0; sg.Clear(); } } if (!CheckPlugs()) return; t = this; var list = BaseNetworkable.serverEntities.OfType().Where(x => x.PrefabName.Contains("electrical.random.switch.deployed")); PrintWarning($"Welcome, All Map NPC's Have Spawned. Enjoy!"); List found = new List(); List entities = new List(); List switches = new List(); List cells = new List(); List blockers = new List(); foreach (var marker in list) { if (found.Contains(marker.net.ID.Value)) continue; entities.Clear(); Vis.Entities(marker.transform.position, 0.2f, entities); entities = entities.Distinct().ToList(); cells = entities.Where(x => x.PrefabName.Contains("electrical.memorycell.deployed.prefab")).ToList(); if (cells.Count == 0) continue; switches = entities.Where(x => x.PrefabName.Contains("electrical.random.switch.deployed")).ToList(); blockers = entities.Where(x => x.PrefabName.Contains("electrical.blocker.deployed.prefab")).ToList(); if (switches.Count > 1 || cells.Count > 1 || blockers.Count > 0) { foreach (var ent in switches) found.Add(ent.net.ID.Value); //Puts($"Setting up an npc with kit {(switches.Count() - 1 + ((cells.Count() - 1) * 10) + (blockers.Count() * 20))}"); SetupNpc(marker.transform.position, switches.Count - 2 + ((cells.Count - 1) * 10) + (blockers.Count * 20)); } } //boxes FindAllIdEntities(); timer.Once(5f, () => ProcessBoxes()); } void OnServerSave() => CheckPlugs(); List Ignore = new List() { "surfacerailway", "olddoorlocker", "autochdropzones", "towerpower", "blueprintrewards", "skinboxui","wpraids", "wpschedulepanel" }; bool CheckPlugs() { List found = new List(); foreach (var entry in plugins.GetAll()) { if (entry.IsCorePlugin) continue; var str = entry.ToString(); var charsToRemove = new string[] { "Oxide.Plugins." }; foreach (var c in charsToRemove) str = str.Replace(c, string.Empty).ToLower(); if (Ignore.Contains(str)) continue; if (entry.Author.Contains("RobJ")) found.Add(str); } if (found.Count > 1) { PrintError("Please ensure only one RobJ NPC related plugin is loaded at a time."); PrintWarning($"All Loaded RobJ plugins - {string.Join(", ", found)}"); return false; } return true; } void SetupNpc(Vector3 location, int info) { var npc = (ScientistNPC)GameManager.server.CreateEntity(prefabname, location + new Vector3(0, 0.1f, 0), new Quaternion(), false); npc.gameObject.AwakeFromInstantiate(); npc.Spawn(); if (npc == null) return; //Puts($"NPC {info} has spawned."); var bData = npc.gameObject.AddComponent(); bData.npc = npc; bData.Kit = info; bData.roamrange = KitList[info].roamrange; var brain = npc.GetComponent(); var nav = npc.GetComponent(); if (nav == null) return; nav.CanUseNavMesh = false; nav.Agent.agentTypeID = -1372625422; nav.DefaultArea = "Walkable"; nav.SetCurrentNavigationType(BaseNavigator.NavigationType.NavMesh); nav.Init(npc, nav.Agent); if (npc != null) { npc.inventory.Strip(); SetInfo(npc, KitList[info], info, location); } else { timer.Once(KitList[info].respawn_minutes * 60, () => { if (!unloading) { SetupNpc(location, info); return; } }); } timer.Once(4f, () => { if (npc?.transform?.position == null || brain?.Senses == null) return; bData.loc = npc.transform.position; brain.UseAIDesign = true; brain.HostileTargetsOnly = KitList[info].peacekeeper; brain.Senses.Init(npc, npc.Brain, 5f, KitList[info].aggrorange, KitList[info].aggrorange + 10, -1f, false, false, true, 50f, KitList[info].peacekeeper, false, false, EntityType.Player, false); brain.Navigator.PlaceOnNavMesh(); brain.Events.Memory.Position.Set(bData.loc, 4); var weapon = npc.GetHeldEntity() as AttackEntity; if (weapon != null) weapon.effectiveRange = 100; foreach (var item in npc.inventory.containerBelt.itemList) item?.contents?.Clear(); foreach (var item in npc.inventory.containerBelt.itemList.Where(item => item.GetHeldEntity() is BaseProjectile)) { foreach (var i in npc.inventory.containerBelt.itemList.Where(i => i.GetHeldEntity() is ProjectileWeaponMod).ToList()) i.MoveToContainer(item.contents); break; } if (npc != null && brain?.states != null) { nav.CanUseNavMesh = true; brain.Events.Memory.Position.Set(bData.loc, 4); brain.states[AIState.FollowPath] = new FollowPath(); } }); brain.MemoryDuration = 20f; } public class FollowPath : BaseAIBrain.BaseFollowPathState { public override StateStatus StateThink(float delta, BaseAIBrain brain, BaseEntity entity) { return StateStatus.Finished; } } List BackPacks = new List(); void OnEntitySpawned(NPCPlayerCorpse corpse) { if (corpse != null && corpse.WaterFactor() < 0.1) corpse.GetComponent().mass = 100f; Info info; if (npcs.TryGetValue(corpse.playerSteamID, out info)) { corpse._playerName = npcs[corpse.playerSteamID].name; corpse.lootPanelName = npcs[corpse.playerSteamID].name; corpse.containers[1].SetLocked(true); corpse.containers[2].SetLocked(true); npcs.Remove(corpse.playerSteamID); BackPacks.Add(corpse.playerSteamID); timer.Once(0.1f, () => { if (corpse?.containers != null) { foreach (var item in info.LootItems) { if (item.Spawn_Percent_Chance >= random.Next(1, 101)) { var i = ItemManager.CreateByName(item.ItemShortname, item.Amount, item.SkinID); if (i != null) i.MoveToContainer(corpse.containers[0]); } } } }); timer.Once(info.corpse * 60, () => { if (corpse != null && !corpse.IsDestroyed) corpse?.Kill(); }); var loc = info.loc; var kit = info.kit; timer.Once(info.respawn * 60, () => { if (!unloading) SetupNpc(loc, kit); }); } } void OnEntitySpawned(DroppedItemContainer container) { if (container != null && container.ShortPrefabName.Contains("backpack")) { if (container.WaterFactor() < 0.1) container.GetComponent().mass = 100f; } NextTick(() => { if (container == null || container.IsDestroyed) return; if (container.playerSteamID == 0) return; if (BackPacks.Contains(container.playerSteamID)) { container.Kill(); BackPacks.Remove(container.playerSteamID); } }); } public void SetInfo(ScientistNPC npc, Kit kit, int info, Vector3 loc) { npc.displayName = kit.name; npc.inventory.containerWear.Clear(); npc.inventory.containerBelt.Clear(); foreach (var item in kit.belt) { Item newItem = ItemManager.CreateByName(item.Key, 1, item.Value); if (!newItem.MoveToContainer(npc.inventory.containerBelt)) newItem.Remove(); } foreach (var item in kit.wear) { Item newItem = ItemManager.CreateByName(item.Key, 1, item.Value); if (!newItem.MoveToContainer(npc.inventory.containerWear)) newItem.Remove(); } npc._maxHealth = kit.health; npc.startHealth = npc._maxHealth; npc.InitializeHealth(npc._maxHealth, npc._maxHealth); npc.radioChatterType = ScientistNPC.RadioChatterType.NONE; npc.DeathEffects = new GameObjectRef[0]; npc.RadioChatterEffects = new GameObjectRef[0]; npcs.Add(npc.userID, new Info() { kit = info, loc = loc, name = npc.displayName, corpse = kit.corpse_minutes, respawn = kit.respawn_minutes, LootItems = kit.LootItems }); } public class mono : MonoBehaviour { public ScientistNPC npc; public BaseAIBrain brain; public Vector3 loc; public bool goingHome = false; public int Kit; public int roamrange; Item syringe; public void Start() { npc.CancelInvoke(npc.EquipTest); npc.EquipTest(); npc.inventory.containerBelt.onlyAllowedItems = null; npc.inventory.containerBelt.onItemAddedRemoved = null; t.timer.Once(2f, () => { syringe = ItemManager.CreateByName("syringe.medical", 1, 0); syringe.MoveToContainer(npc.inventory.containerBelt, -1, false, true); }); brain = npc.GetComponent(); brain.Events.Memory.Position.Set(loc, 4); InvokeRepeating("Roam", 0, 5f); if (t.KitList[Kit].CanHeal) InvokeRepeating("DoHeal", 5, 30); } void DoHeal() => npc.StartCoroutine(Heal()); public class AttackAIEvent : BaseAIEvent { public AttackAIEvent() : base(AIEventType.AttackTick) { } } System.Collections.IEnumerator Heal() { if (npc.health < npc.MaxHealth() / 5 * 4) { for (int i = 0; i < brain.Events.events.Count(); i++) if (brain.Events.events[i].EventType == AIEventType.AttackTick) brain.Events.events[i] = new AttackAIEvent(); brain.sleeping = true; UpdateActiveItem(npc, syringe.GetHeldEntity() as HeldEntity); MedicalTool med = npc.GetActiveItem().GetHeldEntity() as MedicalTool; if (med == null) { brain.SwitchToState(AIState.FollowPath, 0); yield break; } yield return new WaitForSeconds(1f); npc?.SignalBroadcast(BasePlayer.Signal.Attack, "", null); npc?.Heal(40); yield return new WaitForSeconds(2f); UpdateActiveItem(npc, npc.inventory.containerBelt.GetSlot(0).GetHeldEntity() as HeldEntity); syringe.Remove(); ItemManager.DoRemoves(); syringe = ItemManager.CreateByName("syringe.medical", 1, 0); syringe.MoveToContainer(npc.inventory.containerBelt); brain.SwitchToState(AIState.FollowPath, 0); brain.sleeping = false; } } void UpdateActiveItem(ScientistNPC npc, HeldEntity held) { if (npc == null || held == null) return; var activeItem1 = npc.GetHeldEntity(); npc.svActiveItemID = new ItemId(0); if (activeItem1 != null) activeItem1.SetHeld(false); npc.svActiveItemID = held.GetItem().uid; if (held != null) held.SetHeld(true); npc.SendNetworkUpdate(BasePlayer.NetworkQueue.Update); npc.inventory.UpdatedVisibleHolsteredItems(); } void Roam() { if (Vector3.Distance(npc.transform.position, loc) > roamrange) brain.Navigator.SetDestination(loc, BaseNavigator.NavigationSpeed.Normal, 0f, 0f); else { var newloc = GetPoint(loc, roamrange); brain.Navigator.SetDestination(newloc == Vector3.zero ? loc : newloc, BaseNavigator.NavigationSpeed.Slow, 0f, 0f); } } public void OnDestroy() { CancelInvoke("DoHeal"); CancelInvoke("Roam"); } #region PosHelpers NavMeshHit navMeshHit; public bool HasNav(Vector3 pos) => NavMesh.SamplePosition(pos, out navMeshHit, 2, 1); public static Vector3 CalculateGroundPos(Vector3 pos) { //pos.y = TerrainMeta.HeightMap.GetHeight(pos); NavMeshHit navMeshHit; if (!NavMesh.SamplePosition(pos, out navMeshHit, 2, 1)) pos = Vector3.zero; else if (WaterLevel.GetWaterDepth(pos, true, false) > 0) pos = Vector3.zero; //else if (Physics.RaycastAll(navMeshHit.position + new Vector3(0, 100, 0), Vector3.down, 99f, 1235288065).Any()) // pos = Vector3.zero; else pos = navMeshHit.position; return pos; } Vector3 GetPoint(Vector3 pos, int radius) { int attempts = 0; var spawnPoint = Vector3.zero; Vector2 rand; while (attempts < 50 && spawnPoint == Vector3.zero) { attempts++; rand = UnityEngine.Random.insideUnitCircle * radius; spawnPoint = CalculateGroundPos(pos + new Vector3(rand.x, 0, rand.y)); if (spawnPoint != Vector3.zero) return spawnPoint; } return spawnPoint; } #endregion } public bool unloading = false; void Unload() { unloading = true; foreach (var npc in UnityEngine.Object.FindObjectsOfType().ToList()) if (npc?.npc != null && !npc.npc.IsDestroyed) npc.npc.Kill(); } //boxes const string BoxPrefab = "assets/bundled/prefabs/modding/lootables/invisible/invisible_lootable_prefabs/invisible_crate_tools.prefab"; const string BoxIDPrefab = "assets/prefabs/deployable/playerioents/fluidcombiner/fluid.combiner.deployed.prefab"; List BoxIdList = new List(); void FindAllIdEntities() { foreach (var entity in BaseNetworkable.serverEntities.OfType()) if (entity?.PrefabName != null && entity.PrefabName == BoxIDPrefab) BoxIdList.Add(entity); } void OnEntitySpawned(StorageContainer box) { timer.Once(7.0f, () => { if (box != null) ProcessBoxes(box); }); } List Boxes = new List(); void ProcessBoxes(StorageContainer single = null) { int found = 0; Boxes.Clear(); if (single != null && !single.IsDestroyed) Boxes.Add(single); else Boxes = BaseNetworkable.serverEntities.OfType().Where(x => x?.PrefabName != null && !x.IsDestroyed && x.PrefabName == BoxPrefab).ToList(); foreach (var box in Boxes) { found = 0; foreach (var boxid in BoxIdList) { if (!boxid || boxid.IsDestroyed) continue; if (Vector2.Distance(new Vector2(boxid.transform.position.x, boxid.transform.position.z), new Vector2(box.transform.position.x, box.transform.position.z)) < 0.5f) found++; } if (found == 0 || !BoxProfiles.ContainsKey(found)) return; SetupBox(box, BoxProfiles[found]); PrintWarning($"CustomLootBox {(found)} Spawned"); } } void SetupBox(StorageContainer box, List info) { if (box == null) return; box.inventory.Clear(); ItemManager.DoRemoves(); info = info.OrderBy(a => Guid.NewGuid()).ToList(); foreach (var i in info) { if (box.inventory.itemList.Count >= 4) break; if (i.Spawn_Percent_Chance >= random.Next(1, 101)) { var item = ItemManager.CreateByName(i.ItemShortname, i.Amount, i.SkinID); if (item != null) item.MoveToContainer(box.inventory); } } } public Dictionary> BoxProfiles = new Dictionary>() { { //Diving Crate 1, new List() { new LootItem() { ItemShortname = "diving.fins", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "diving.mask", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "diving.tank", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "diving.wetsuit", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "speargun", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "speargun.spear", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 8 }, new LootItem() { ItemShortname = "diverpickaxe", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 1 }, new LootItem() { ItemShortname = "diverhatchet", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "divertorch", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, } }, { //LumberJack Crate 2, new List() { new LootItem() { ItemShortname = "hazmatsuit.lumberjack", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "hatchet", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "woodtea", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 1 }, new LootItem() { ItemShortname = "wood", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 600 }, new LootItem() { ItemShortname = "lumberjack.hatchet", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "lumberjack.pickaxe", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "chainsaw", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 1 }, } }, { //RobJ Parts Crate 3, new List() { new LootItem() { ItemShortname = "electric.blocker", SkinID = 0, Spawn_Percent_Chance = 64, Amount = 2 }, new LootItem() { ItemShortname = "weapon.mod.burstmodule", SkinID = 0, Spawn_Percent_Chance = 65, Amount = 1 }, new LootItem() { ItemShortname = "cctv.camera", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 3 }, new LootItem() { ItemShortname = "drone", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "electric.furnace", SkinID = 0, Spawn_Percent_Chance = 81, Amount = 1 }, new LootItem() { ItemShortname = "electric.heater", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "electrical.branch", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "floor.grill", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 3 }, new LootItem() { ItemShortname = "gears", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 5 }, new LootItem() { ItemShortname = "industrial.wall.light.green", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "electric.hbhfsensor", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "industrial.conveyor", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "industrial.crafter", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "door.hinged.industrial.a", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "industrial.splitter", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "floor.ladder.hatch", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "electric.battery.rechargable.large", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "ptz.cctv.camera", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 1 }, } }, { //Tuna Can Box 4, new List() { new LootItem() { ItemShortname = "can.tuna", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "can.tuna.empty", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 1 }, new LootItem() { ItemShortname = "fish.raw", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 12 }, new LootItem() { ItemShortname = "box.wooden.large", SkinID = 2985283191, Spawn_Percent_Chance = 22, Amount = 1 }, new LootItem() { ItemShortname = "door.hinged.metal", SkinID = 2995196839, Spawn_Percent_Chance = 18, Amount = 1 }, new LootItem() { ItemShortname = "rifle.ak.diver", SkinID = 0, Spawn_Percent_Chance = 1, Amount = 1 }, new LootItem() { ItemShortname = "fish.cooked", SkinID = 0, Spawn_Percent_Chance = 90, Amount = 8 }, } }, { //Tuna Fish Tray 863024115 5, new List() { new LootItem() { ItemShortname = "autoturret", SkinID = 0, Spawn_Percent_Chance = 10, Amount = 1 }, new LootItem() { ItemShortname = "axe.salvaged", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "barricade.concrete", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "cctv.camera", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "chainsaw", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "computerstation", SkinID = 0, Spawn_Percent_Chance = 10, Amount = 1 }, new LootItem() { ItemShortname = "drone", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "electric.andswitch", SkinID = 0, Spawn_Percent_Chance = 75, Amount = 1 }, new LootItem() { ItemShortname = "electric.battery.rechargable.large", SkinID = 0, Spawn_Percent_Chance = 65, Amount = 1 }, new LootItem() { ItemShortname = "electric.fuelgenerator.small", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "electric.random.switch", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "elevator", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 2 }, new LootItem() { ItemShortname = "flamethrower", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 1 }, new LootItem() { ItemShortname = "floor.ladder.hatch", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "furnace.large", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "grenade.f1", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 3 }, new LootItem() { ItemShortname = "grenade.molotov", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 5 }, new LootItem() { ItemShortname = "hazmatsuit", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "icepick.salvaged", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "largemedkit", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "metal.refined", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 200 }, new LootItem() { ItemShortname = "metalpipe", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 3 }, new LootItem() { ItemShortname = "pistol.semiauto", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "riflebody", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "roadsign.kilt", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "shoes.boots", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "shotgun.pump", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "storage.monitor", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "targeting.computer", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "explosives", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 5 }, new LootItem() { ItemShortname = "scrap", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 18 }, new LootItem() { ItemShortname = "can.tuna", SkinID = 0, Spawn_Percent_Chance = 95, Amount = 3 }, } }, { //Mr Spice Box 6, new List() { new LootItem() { ItemShortname = "autoturret", SkinID = 0, Spawn_Percent_Chance = 10, Amount = 1 }, new LootItem() { ItemShortname = "axe.salvaged", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "barricade.concrete", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "cctv.camera", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "chainsaw", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "computerstation", SkinID = 0, Spawn_Percent_Chance = 10, Amount = 1 }, new LootItem() { ItemShortname = "drone", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "electric.andswitch", SkinID = 0, Spawn_Percent_Chance = 75, Amount = 1 }, new LootItem() { ItemShortname = "jackhammer", SkinID = 2865565721, Spawn_Percent_Chance = 65, Amount = 1 }, new LootItem() { ItemShortname = "electric.fuelgenerator.small", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "electric.random.switch", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "elevator", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 2 }, new LootItem() { ItemShortname = "flamethrower", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 1 }, new LootItem() { ItemShortname = "floor.ladder.hatch", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "furnace.large", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "grenade.f1", SkinID = 841650807, Spawn_Percent_Chance = 30, Amount = 3 }, new LootItem() { ItemShortname = "grenade.molotov", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 5 }, new LootItem() { ItemShortname = "hazmatsuit", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "icepick.salvaged", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "largemedkit", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "metal.refined", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 245 }, new LootItem() { ItemShortname = "metalpipe", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 3 }, new LootItem() { ItemShortname = "pistol.semiauto", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "riflebody", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "roadsign.kilt", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 1 }, new LootItem() { ItemShortname = "shoes.boots", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 1 }, new LootItem() { ItemShortname = "shotgun.pump", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "storage.monitor", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "targeting.computer", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "explosives", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 5 }, new LootItem() { ItemShortname = "scrap", SkinID = 0, Spawn_Percent_Chance = 70, Amount = 18 }, new LootItem() { ItemShortname = "vending.machine", SkinID = 863024115, Spawn_Percent_Chance = 90, Amount = 1 }, new LootItem() { ItemShortname = "scrap", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 27 }, new LootItem() { ItemShortname = "scrap", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 38 }, new LootItem() { ItemShortname = "techparts", SkinID = 0, Spawn_Percent_Chance = 45, Amount = 5 }, new LootItem() { ItemShortname = "hazmatsuit.nomadsuit", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, } }, { //Ammo Pistol 7, new List() { new LootItem() { ItemShortname = "ammo.pistol.hv", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 15 }, new LootItem() { ItemShortname = "ammo.pistol.fire", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 15 }, new LootItem() { ItemShortname = "ammo.pistol.fire", SkinID = 0, Spawn_Percent_Chance = 13, Amount = 42 }, new LootItem() { ItemShortname = "ammo.pistol", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 32 }, new LootItem() { ItemShortname = "pistol.prototype17", SkinID = 0, Spawn_Percent_Chance = 5, Amount = 1 }, new LootItem() { ItemShortname = "pistol.python", SkinID = 2894360042, Spawn_Percent_Chance = 16, Amount = 1 }, new LootItem() { ItemShortname = "pistol.semiauto", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "pistol.m92", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 1 }, new LootItem() { ItemShortname = "ammo.pistol", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 15 }, new LootItem() { ItemShortname = "ammo.pistol", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 56 }, new LootItem() { ItemShortname = "ammo.pistol", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 85 }, } }, { //Ammo Rifle 8, new List() { new LootItem() { ItemShortname = "ammo.rifle.hv", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 15 }, new LootItem() { ItemShortname = "ammo.rifle.explosive", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 15 }, new LootItem() { ItemShortname = "ammo.rifle.explosive", SkinID = 0, Spawn_Percent_Chance = 13, Amount = 42 }, new LootItem() { ItemShortname = "ammo.rifle", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 32 }, new LootItem() { ItemShortname = "rifle.lr300", SkinID = 2151920583, Spawn_Percent_Chance = 2, Amount = 1 }, new LootItem() { ItemShortname = "rifle.ak", SkinID = 2024188061, Spawn_Percent_Chance = 12, Amount = 1 }, new LootItem() { ItemShortname = "rifle.semiauto", SkinID = 2267956984, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "rifle.m39", SkinID = 1726562277, Spawn_Percent_Chance = 23, Amount = 1 }, new LootItem() { ItemShortname = "ammo.rifle", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 15 }, new LootItem() { ItemShortname = "ammo.rifle", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 56 }, new LootItem() { ItemShortname = "ammo.rifle", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 85 }, } }, { //Ammo Shotgun 9, new List() { new LootItem() { ItemShortname = "ammo.shotgun.slug", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 15 }, new LootItem() { ItemShortname = "ammo.shotgun.fire", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 15 }, new LootItem() { ItemShortname = "ammo.shotgun.fire", SkinID = 0, Spawn_Percent_Chance = 13, Amount = 42 }, new LootItem() { ItemShortname = "ammo.shotgun", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 32 }, new LootItem() { ItemShortname = "shotgun.pump", SkinID = 914623387, Spawn_Percent_Chance = 35, Amount = 1 }, new LootItem() { ItemShortname = "shotgun.spas12", SkinID = 0, Spawn_Percent_Chance = 23, Amount = 1 }, new LootItem() { ItemShortname = "ammo.shotgun", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 15 }, new LootItem() { ItemShortname = "ammo.shotgun", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 56 }, new LootItem() { ItemShortname = "ammo.shotgun", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 85 }, } }, { //Ammo Shotgun M4 10, new List() { new LootItem() { ItemShortname = "ammo.shotgun.slug", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 15 }, new LootItem() { ItemShortname = "ammo.shotgun.fire", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 15 }, new LootItem() { ItemShortname = "ammo.shotgun.fire", SkinID = 0, Spawn_Percent_Chance = 13, Amount = 42 }, new LootItem() { ItemShortname = "ammo.shotgun", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 32 }, new LootItem() { ItemShortname = "shotgun.m4", SkinID = 0, Spawn_Percent_Chance = 13, Amount = 1 }, new LootItem() { ItemShortname = "shotgun.spas12", SkinID = 0, Spawn_Percent_Chance = 23, Amount = 1 }, new LootItem() { ItemShortname = "ammo.shotgun", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 15 }, new LootItem() { ItemShortname = "ammo.shotgun", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 56 }, new LootItem() { ItemShortname = "ammo.shotgun", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 85 }, } }, { //Xmas 11, new List() { new LootItem() { ItemShortname = "xmasdoorwreath", SkinID = 0, Spawn_Percent_Chance = 40, Amount = 1 }, new LootItem() { ItemShortname = "xmas.lightstring", SkinID = 0, Spawn_Percent_Chance = 25, Amount = 8 }, new LootItem() { ItemShortname = "xmas.decoration.pinecone", SkinID = 0, Spawn_Percent_Chance = 13, Amount = 2 }, new LootItem() { ItemShortname = "xmas.decoration.gingerbreadmen", SkinID = 0, Spawn_Percent_Chance = 80, Amount = 2 }, new LootItem() { ItemShortname = "xmas.decoration.tinsel", SkinID = 0, Spawn_Percent_Chance = 35, Amount = 1 }, new LootItem() { ItemShortname = "xmas.lightstring.advanced", SkinID = 0, Spawn_Percent_Chance = 23, Amount = 11 }, new LootItem() { ItemShortname = "xmas.present.medium", SkinID = 0, Spawn_Percent_Chance = 50, Amount = 1 }, new LootItem() { ItemShortname = "xmas.present.small", SkinID = 0, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "xmas.decoration.lights", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 1 }, new LootItem() { ItemShortname = "snowballgun", SkinID = 0, Spawn_Percent_Chance = 20, Amount = 1 }, new LootItem() { ItemShortname = "snowman", SkinID = 0, Spawn_Percent_Chance = 60, Amount = 1 }, new LootItem() { ItemShortname = "wall.frame.garagedoor", SkinID = 3116883111, Spawn_Percent_Chance = 20, Amount = 1 }, new LootItem() { ItemShortname = "rifle.l96", SkinID = 3108347503, Spawn_Percent_Chance = 3, Amount = 1 }, new LootItem() { ItemShortname = "door.hinged.wood", SkinID = 3108299053, Spawn_Percent_Chance = 45, Amount = 1 }, new LootItem() { ItemShortname = "wall.frame.garagedoor", SkinID = 3108326727, Spawn_Percent_Chance = 30, Amount = 1 }, new LootItem() { ItemShortname = "door.hinged.metal", SkinID = 3108229881, Spawn_Percent_Chance = 19, Amount = 1 }, new LootItem() { ItemShortname = "rug", SkinID = 3108196516, Spawn_Percent_Chance = 49, Amount = 1 }, new LootItem() { ItemShortname = "door.hinged.metal", SkinID = 3107540296, Spawn_Percent_Chance = 32, Amount = 1 }, new LootItem() { ItemShortname = "metal.facemask", SkinID = 3107247365, Spawn_Percent_Chance = 27, Amount = 1 }, new LootItem() { ItemShortname = "rifle.semiauto", SkinID = 3106126222, Spawn_Percent_Chance = 42, Amount = 1 }, } }, }; } }