Иконка ресурса

FREE SupermarketEvent : 1.0.4 1.0.4

Нет прав для скачивания
C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using System;
using System.Collections.Generic;
using Facepunch;
using UnityEngine;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Oxide.Core.Plugins;
using Oxide.Core;
using System.Collections;
using Oxide.Game.Rust.Cui;
using System.IO;
using UnityEngine.Networking;
using Oxide.Plugins.SupermarketEventExtensionMethods;
namespace Oxide.Plugins {
    [Info("SupermarketEvent", "KpucTaJl", "1.0.4")]
    internal class SupermarketEvent : RustPlugin {
#region Config
        private const bool En = true;
        private PluginConfig _config;
        protected override void LoadDefaultConfig() {
            Puts("Creating a default config...");
            _config = PluginConfig.DefaultConfig();
            _config.PluginVersion = Version;
            SaveConfig();
            Puts("Creation of the default config completed!");
        }
        protected override void LoadConfig() {
            base.LoadConfig();
            _config = Config.ReadObject<PluginConfig>();
            if (_config.PluginVersion < Version) UpdateConfigValues();
        }
        private void UpdateConfigValues() {
            Puts("Config update detected! Updating config values...");
            if (_config.PluginVersion < new VersionNumber(1, 0, 1)) {
                _config.Cashier.Name = "Cashier";
                _config.Cashier.WearItems = new HashSet<NpcWear> {
                    new NpcWear {
                        ShortName = "burlap.trousers", SkinId = 2042089723
                    }
                    , new NpcWear {
                        ShortName = "burlap.shirt", SkinId = 2042087814
                    }
                    , new NpcWear {
                        ShortName = "shoes.boots", SkinId = 826908114
                    }
                    , new NpcWear {
                        ShortName = "hat.boonie", SkinId = 2040709757
                    }
                }
                ;
                _config.Collector.Name = "Collector";
                _config.Collector.WearItems = new HashSet<NpcWear> {
                    new NpcWear {
                        ShortName = "riot.helmet", SkinId = 1988565302
                    }
                    , new NpcWear {
                        ShortName = "shoes.boots", SkinId = 2186835886
                    }
                    , new NpcWear {
                        ShortName = "burlap.gloves", SkinId = 2186834533
                    }
                    , new NpcWear {
                        ShortName = "hoodie", SkinId = 2076428294
                    }
                    , new NpcWear {
                        ShortName = "pants", SkinId = 2076980911
                    }
                    , new NpcWear {
                        ShortName = "metal.plate.torso", SkinId = 1988550463
                    }
                }
                ;
            }
            if (_config.PluginVersion < new VersionNumber(1, 0, 4)) {
                _config.PveMode.ScaleDamage = new Dictionary<string, float> {
                    ["Npc"]
                    = 1f, ["Animal"] = 1f
                }
                ;
            }
            _config.PluginVersion = Version;
            Puts("Config update completed!");
            SaveConfig();
        }
        protected override void SaveConfig() => Config.WriteObject(_config);
        public class ItemConfig {
            [JsonProperty("ShortName")]
            public string ShortName {
                get;
                set;
            }
            [JsonProperty(En ? "Minimum" : "Минимальное кол-во")]
            public int MinAmount {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum" : "Максимальное кол-во")]
            public int MaxAmount {
                get;
                set;
            }
            [JsonProperty(En ? "Chance [0.0-100.0]" : "Шанс выпадения предмета [0.0-100.0]")]
            public float Chance {
                get;
                set;
            }
            [JsonProperty(En ? "Give blueprint? [true/false]" : "Это чертеж? [true/false]")]
            public bool IsBluePrint {
                get;
                set;
            }
            [JsonProperty("SkinID (0 = default)")]
            public ulong SkinId {
                get;
                set;
            }
            [JsonProperty(En ? "Name (empty = default)" : "Название (empty - default)")]
            public string Name {
                get;
                set;
            }
        }
        public class LootTableConfig {
            [JsonProperty(En ? "Minimum items" : "Минимальное кол-во элементов")]
            public int Min {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum items" : "Максимальное кол-во элементов")]
            public int Max {
                get;
                set;
            }
            [JsonProperty(En ? "Enforce minimum and maximum values? [true/false]" : "Использовать минимальное и максимальное значение? [true/false]")]
            public bool UseCount {
                get;
                set;
            }
            [JsonProperty(En ? "List of items" : "Список предметов")]
            public List<ItemConfig> Items {
                get;
                set;
            }
        }
        public class PrefabConfig {
            [JsonProperty(En ? "Chance [0.0-100.0]" : "Шанс выпадения [0.0-100.0]")]
            public float Chance {
                get;
                set;
            }
            [JsonProperty(En ? "The path to the prefab (Entity full name)" : "Путь к prefab-у")]
            public string PrefabDefinition {
                get;
                set;
            }
        }
        public class PrefabLootTableConfig {
            [JsonProperty(En ? "Minimum number of prefabs" : "Минимальное кол-во prefab-ов")]
            public int Min {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum number of prefabs" : "Максимальное кол-во prefab-ов")]
            public int Max {
                get;
                set;
            }
            [JsonProperty(En ? "Enforce minimum and maximum values? [true/false]" : "Использовать минимальное и максимальное значение? [true/false]")]
            public bool UseCount {
                get;
                set;
            }
            [JsonProperty(En ? "List of prefabs" : "Список prefab-ов")]
            public List<PrefabConfig> Prefabs {
                get;
                set;
            }
        }
        public class CrateConfig {
            [JsonProperty("Prefab")]
            public string Prefab {
                get;
                set;
            }
            [JsonProperty(En ? "Position" : "Позиция")]
            public string Position {
                get;
                set;
            }
            [JsonProperty(En ? "Rotation" : "Вращение")]
            public string Rotation {
                get;
                set;
            }
            [JsonProperty(En ? "Which loot table should the plugin use? (0 - default; 1 - own; 2 - AlphaLoot; 3 - CustomLoot; 4 - loot table of the Rust objects; 5 - combine the 1 and 4 methods)" : "Какую таблицу предметов необходимо использовать? (0 - стандартную; 1 - собственную; 2 - AlphaLoot; 3 - CustomLoot; 4 - таблица предметов объектов Rust; 5 - совместить 1 и 4 методы)")]
            public int TypeLootTable {
                get;
                set;
            }
            [JsonProperty(En ? "Loot table from prefabs (if the loot table type is 4 or 5)" : "Таблица предметов из prefab-ов (если тип таблицы предметов - 4 или 5)")]
            public PrefabLootTableConfig PrefabLootTable {
                get;
                set;
            }
            [JsonProperty(En ? "Own loot table (if the loot table type is 1 or 5)" : "Собственная таблица предметов (если тип таблицы предметов - 1 или 5)")]
            public LootTableConfig OwnLootTable {
                get;
                set;
            }
        }
        public class ColorConfig {
            [JsonProperty("r")]
            public float R {
                get;
                set;
            }
            [JsonProperty("g")]
            public float G {
                get;
                set;
            }
            [JsonProperty("b")]
            public float B {
                get;
                set;
            }
        }
        public class MarkerConfig {
            [JsonProperty(En ? "Use map marker? [true/false]" : "Использовать маркер на карте? [true/false]")]
            public bool Enabled {
                get;
                set;
            }
            [JsonProperty(En ? "Type (0 - simple, 1 - advanced)" : "Тип (0 - упрощенный, 1 - расширенный)")]
            public int Type {
                get;
                set;
            }
            [JsonProperty(En ? "Background radius (if the marker type is 0)" : "Радиус фона (если тип маркера - 0)")]
            public float Radius {
                get;
                set;
            }
            [JsonProperty(En ? "Background transparency" : "Прозрачность фона")]
            public float Alpha {
                get;
                set;
            }
            [JsonProperty(En ? "Color" : "Цвет")]
            public ColorConfig Color {
                get;
                set;
            }
            [JsonProperty(En ? "Text" : "Текст")]
            public string Text {
                get;
                set;
            }
        }
        public class PointConfig {
            [JsonProperty(En ? "Enabled? [true/false]" : "Включен? [true/false]")]
            public bool Enabled {
                get;
                set;
            }
            [JsonProperty(En ? "Text" : "Текст")]
            public string Text {
                get;
                set;
            }
            [JsonProperty(En ? "Size" : "Размер")]
            public int Size {
                get;
                set;
            }
            [JsonProperty(En ? "Color" : "Цвет")]
            public string Color {
                get;
                set;
            }
        }
        public class GuiConfig {
            [JsonProperty(En ? "Use the GUI? [true/false]" : "Использовать ли GUI? [true/false]")]
            public bool IsGui {
                get;
                set;
            }
            [JsonProperty("OffsetMin Y")]
            public string OffsetMinY {
                get;
                set;
            }
        }
        public class ChatConfig {
            [JsonProperty(En ? "Use chat messages? [true/false]" : "Использовать ли чат? [true/false]")]
            public bool IsChat {
                get;
                set;
            }
            [JsonProperty(En ? "Prefix for chat messages" : "Префикс сообщений в чате")]
            public string Prefix {
                get;
                set;
            }
        }
        public class GameTipConfig {
            [JsonProperty(En ? "Use Facepunch Game Tips (notification bar above hotbar)? [true/false]" : "Использовать ли Facepunch Game Tip (оповещения над слотами быстрого доступа игрока)? [true/false]")]
            public bool IsGameTip {
                get;
                set;
            }
            [JsonProperty(En ? "Style (0 - Blue Normal, 1 - Red Normal, 2 - Blue Long, 3 - Blue Short, 4 - Server Event)" : "Стиль (0 - Blue Normal, 1 - Red Normal, 2 - Blue Long, 3 - Blue Short, 4 - Server Event)")]
            public int Style {
                get;
                set;
            }
        }
        public class GuiAnnouncementsConfig {
            [JsonProperty(En ? "Do you use the plugin GUIAnnouncements? [true/false]" : "Использовать ли GUIAnnouncements? [true/false]")]
            public bool IsGuiAnnouncements {
                get;
                set;
            }
            [JsonProperty(En ? "Banner color" : "Цвет баннера")]
            public string BannerColor {
                get;
                set;
            }
            [JsonProperty(En ? "Text color" : "Цвет текста")]
            public string TextColor {
                get;
                set;
            }
            [JsonProperty(En ? "Adjust Vertical Position" : "Отступ от верхнего края")]
            public float ApiAdjustVPosition {
                get;
                set;
            }
        }
        public class NotifyConfig {
            [JsonProperty(En ? "Do you use the plugin Notify? [true/false]" : "Использовать ли Notify? [true/false]")]
            public bool IsNotify {
                get;
                set;
            }
            [JsonProperty(En ? "Type" : "Тип")]
            public int Type {
                get;
                set;
            }
        }
        public class DiscordConfig {
            [JsonProperty(En ? "Do you use the plugin DiscordMessages? [true/false]" : "Использовать ли DiscordMessages? [true/false]")]
            public bool IsDiscord {
                get;
                set;
            }
            [JsonProperty("Webhook URL")]
            public string WebhookUrl {
                get;
                set;
            }
            [JsonProperty(En ? "Embed Color (DECIMAL)" : "Цвет полосы (DECIMAL)")]
            public int EmbedColor {
                get;
                set;
            }
            [JsonProperty(En ? "Keys of required messages" : "Ключи необходимых сообщений")]
            public HashSet<string> Keys {
                get;
                set;
            }
        }
        public class EconomyConfig {
            [JsonProperty(En ? "Which economy plugins do you want to use? (Economics, ServerRewards, IQEconomic, XPerience)" : "Какие плагины экономики вы хотите использовать? (Economics, ServerRewards, IQEconomic, XPerience)")]
            public HashSet<string> Plugins {
                get;
                set;
            }
            [JsonProperty(En ? "The minimum value that a player must collect to get economy reward" : "Минимальное значение, которое игрок должен заработать, чтобы получить баллы за экономику")]
            public double Min {
                get;
                set;
            }
            [JsonProperty(En ? "Looting of crates" : "Ограбление ящиков")]
            public Dictionary<string, double> Crates {
                get;
                set;
            }
            [JsonProperty(En ? "Killing an NPC" : "Убийство NPC")]
            public double Npc {
                get;
                set;
            }
            [JsonProperty(En ? "Killing the merchant" : "Убийство торговца")]
            public double Cashier {
                get;
                set;
            }
            [JsonProperty(En ? "Killing the debt collector" : "Убийство инкассатора")]
            public double Collector {
                get;
                set;
            }
            [JsonProperty(En ? "Opening doors" : "Открытие дверей")]
            public double OpenDoors {
                get;
                set;
            }
            [JsonProperty(En ? "List of commands that are executed in server console at the end of the event ({steamid} - the player who collected the highest number of points)" : "Список команд, которые выполняются в консоли по окончанию ивента ({steamid} - игрок, который набрал наибольшее кол-во баллов)")]
            public HashSet<string> Commands {
                get;
                set;
            }
        }
        public class PveModeConfig {
            [JsonProperty(En ? "Use PVE mode the plugin? [true/false]" : "Использовать PVE режим работы плагина? [true/false]")]
            public bool Pve {
                get;
                set;
            }
            [JsonProperty(En ? "The amount of damage that the player has to do to become the Event Owner" : "Кол-во урона, которое должен нанести игрок, чтобы стать владельцем ивента")]
            public float Damage {
                get;
                set;
            }
            [JsonProperty(En ? "Damage Multipliers for calculate to become the Event Owner" : "Коэффициенты урона для подсчета, чтобы стать владельцем ивента")]
            public Dictionary<string, float> ScaleDamage {
                get;
                set;
            }
            [JsonProperty(En ? "Can the non-owner of the event loot the crates? [true/false]" : "Может ли не владелец ивента грабить ящики? [true/false]")]
            public bool LootCrate {
                get;
                set;
            }
            [JsonProperty(En ? "Can the non-owner of the event loot NPC corpses? [true/false]" : "Может ли не владелец ивента грабить трупы NPC? [true/false]")]
            public bool LootNpc {
                get;
                set;
            }
            [JsonProperty(En ? "Can the non-owner of the event deal damage to the NPC? [true/false]" : "Может ли не владелец ивента наносить урон по NPC? [true/false]")]
            public bool DamageNpc {
                get;
                set;
            }
            [JsonProperty(En ? "Can Npc attack a non-owner of the event? [true/false]" : "Может ли Npc атаковать не владельца ивента? [true/false]")]
            public bool TargetNpc {
                get;
                set;
            }
            [JsonProperty(En ? "Allow a non-owner of the event to enter the event zone? [true/false]" : "Разрешать входить внутрь зоны ивента не владельцу ивента? [true/false]")]
            public bool CanEnter {
                get;
                set;
            }
            [JsonProperty(En ? "Allow a player who has an active cooldown of the Event Owner to enter the event zone? [true/false]" : "Разрешать входить внутрь зоны ивента игроку, у которого активен кулдаун на получение статуса владельца ивента? [true/false]")]
            public bool CanEnterCooldownPlayer {
                get;
                set;
            }
            [JsonProperty(En ? "The time that the Event Owner may not be inside the event zone [sec.]" : "Время, которое владелец ивента может не находиться внутри зоны ивента [сек.]")]
            public int TimeExitOwner {
                get;
                set;
            }
            [JsonProperty(En ? "The time until the end of Event Owner status when it is necessary to warn the player [sec.]" : "Время таймера до окончания действия статуса владельца ивента, когда необходимо предупредить игрока [сек.]")]
            public int AlertTime {
                get;
                set;
            }
            [JsonProperty(En ? "Prevent the actions of the RestoreUponDeath plugin in the event zone? [true/false]" : "Запрещать работу плагина RestoreUponDeath в зоне действия ивента? [true/false]")]
            public bool RestoreUponDeath {
                get;
                set;
            }
            [JsonProperty(En ? "The time that the player can`t become the Event Owner, after the end of the event and the player was its owner [sec.]" : "Время, которое игрок не сможет стать владельцем ивента, после того как ивент окончен и игрок был его владельцем [sec.]")]
            public double CooldownOwner {
                get;
                set;
            }
            [JsonProperty(En ? "Darkening the dome (0 - disables the dome)" : "Затемнение купола (0 - отключает купол)")]
            public int Darkening {
                get;
                set;
            }
        }
        public class NpcBelt {
            [JsonProperty("ShortName")]
            public string ShortName {
                get;
                set;
            }
            [JsonProperty(En ? "Amount" : "Кол-во")]
            public int Amount {
                get;
                set;
            }
            [JsonProperty("SkinID (0 - default)")]
            public ulong SkinId {
                get;
                set;
            }
            [JsonProperty(En ? "Mods" : "Модификации на оружие")]
            public HashSet<string> Mods {
                get;
                set;
            }
            [JsonProperty(En ? "Ammo" : "Боеприпасы")]
            public string Ammo {
                get;
                set;
            }
        }
        public class NpcWear {
            [JsonProperty("ShortName")]
            public string ShortName {
                get;
                set;
            }
            [JsonProperty("SkinID (0 - default)")]
            public ulong SkinId {
                get;
                set;
            }
        }
        public class NpcConfig {
            [JsonProperty(En ? "Name" : "Название")]
            public string Name {
                get;
                set;
            }
            [JsonProperty(En ? "Health" : "Кол-во ХП")]
            public float Health {
                get;
                set;
            }
            [JsonProperty(En ? "Roam Range" : "Дальность патрулирования местности")]
            public float RoamRange {
                get;
                set;
            }
            [JsonProperty(En ? "Chase Range" : "Дальность погони за целью")]
            public float ChaseRange {
                get;
                set;
            }
            [JsonProperty(En ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
            public float AttackRangeMultiplier {
                get;
                set;
            }
            [JsonProperty(En ? "Sense Range" : "Радиус обнаружения цели")]
            public float SenseRange {
                get;
                set;
            }
            [JsonProperty(En ? "Target Memory Duration [sec.]" : "Длительность памяти цели [sec.]")]
            public float MemoryDuration {
                get;
                set;
            }
            [JsonProperty(En ? "Scale damage" : "Множитель урона")]
            public float DamageScale {
                get;
                set;
            }
            [JsonProperty(En ? "Aim Cone Scale" : "Множитель разброса")]
            public float AimConeScale {
                get;
                set;
            }
            [JsonProperty(En ? "Detect the target only in the NPC's viewing vision cone? [true/false]" : "Обнаруживать цель только в углу обзора NPC? [true/false]")]
            public bool CheckVisionCone {
                get;
                set;
            }
            [JsonProperty(En ? "Vision Cone" : "Угол обзора")]
            public float VisionCone {
                get;
                set;
            }
            [JsonProperty(En ? "Speed" : "Скорость")]
            public float Speed {
                get;
                set;
            }
            [JsonProperty(En ? "Disable radio effects? [true/false]" : "Отключать эффекты рации? [true/false]")]
            public bool DisableRadio {
                get;
                set;
            }
            [JsonProperty(En ? "Is this a stationary NPC? [true/false]" : "Это стационарный NPC? [true/false]")]
            public bool Stationary {
                get;
                set;
            }
            [JsonProperty(En ? "Remove a corpse after death? (it is recommended to use the true value to improve performance) [true/false]" : "Удалять труп после смерти? (рекомендуется использовать значение true для повышения производительности) [true/false]")]
            public bool IsRemoveCorpse {
                get;
                set;
            }
            [JsonProperty(En ? "Wear items" : "Одежда")]
            public HashSet<NpcWear> WearItems {
                get;
                set;
            }
            [JsonProperty(En ? "Belt items" : "Быстрые слоты")]
            public HashSet<NpcBelt> BeltItems {
                get;
                set;
            }
            [JsonProperty(En ? "Kit (it is recommended to use the previous 2 settings to improve performance)" : "Kit (рекомендуется использовать предыдущие 2 пункта настройки для повышения производительности)")]
            public string Kit {
                get;
                set;
            }
        }
        public class PresetConfig {
            [JsonProperty(En ? "Minimum" : "Минимальное кол-во")]
            public int Min {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum" : "Максимальное кол-во")]
            public int Max {
                get;
                set;
            }
            [JsonProperty(En ? "List of locations" : "Список расположений")]
            public HashSet<string> Positions {
                get;
                set;
            }
            [JsonProperty(En ? "NPCs setting" : "Настройки NPC")]
            public NpcConfig Config {
                get;
                set;
            }
            [JsonProperty(En ? "Which loot table should the plugin use? (0 - default; 1 - own; 2 - AlphaLoot; 3 - CustomLoot; 4 - loot table of the Rust objects; 5 - combine the 1 and 4 methods)" : "Какую таблицу предметов необходимо использовать? (0 - стандартную; 1 - собственную; 2 - AlphaLoot; 3 - CustomLoot; 4 - таблица предметов объектов Rust; 5 - совместить 1 и 4 методы)")]
            public int TypeLootTable {
                get;
                set;
            }
            [JsonProperty(En ? "Loot table from prefabs (if the loot table type is 4 or 5)" : "Таблица предметов из prefab-ов (если тип таблицы предметов - 4 или 5)")]
            public PrefabLootTableConfig PrefabLootTable {
                get;
                set;
            }
            [JsonProperty(En ? "Own loot table (if the loot table type is 1 or 5)" : "Собственная таблица предметов (если тип таблицы предметов - 1 или 5)")]
            public LootTableConfig OwnLootTable {
                get;
                set;
            }
        }
        public class AnimalConfig {
            [JsonProperty(En ? "Type (1 - Polar Bear, 2 - Bear, 3 - Wolf, 4 - Boar, 5 - Stag, 6 - Chicken)" : "Тип (1 - Полярный медведь, 2 - Медведь, 3 - Волк, 4 - Кабан, 5 - Олень, 6 - Курица)")]
            public int Type {
                get;
                set;
            }
            [JsonProperty(En ? "Health" : "Кол-во ХП")]
            public float Health {
                get;
                set;
            }
            [JsonProperty(En ? "Chase Range" : "Дальность погони за целью")]
            public float ChaseRange {
                get;
                set;
            }
            [JsonProperty(En ? "Sense Range" : "Радиус обнаружения цели")]
            public float SenseRange {
                get;
                set;
            }
            [JsonProperty(En ? "Target Memory Duration [sec.]" : "Длительность памяти цели [sec.]")]
            public float MemoryDuration {
                get;
                set;
            }
            [JsonProperty(En ? "Attack Range" : "Радиус атаки")]
            public float AttackRange {
                get;
                set;
            }
            [JsonProperty(En ? "Attack Damage" : "Урон от атаки")]
            public float AttackDamage {
                get;
                set;
            }
            [JsonProperty(En ? "Attack Rate [sec.]" : "Минимальное время между атаками [sec.]")]
            public float AttackRate {
                get;
                set;
            }
            [JsonProperty(En ? "Detect the target only in the Animal's viewing vision cone? [true/false]" : "Обнаруживать цель только в углу обзора животного? [true/false]")]
            public bool CheckVisionCone {
                get;
                set;
            }
            [JsonProperty(En ? "Vision Cone" : "Угол обзора")]
            public float VisionCone {
                get;
                set;
            }
            [JsonProperty(En ? "Speed" : "Скорость")]
            public float Speed {
                get;
                set;
            }
        }
        public class BasePlayerConfig {
            [JsonProperty(En ? "Name" : "Название")]
            public string Name {
                get;
                set;
            }
            [JsonProperty(En ? "Health" : "Кол-во ХП")]
            public float Health {
                get;
                set;
            }
            [JsonProperty(En ? "Speed" : "Скорость")]
            public float Speed {
                get;
                set;
            }
            [JsonProperty(En ? "Wear items" : "Одежда")]
            public HashSet<NpcWear> WearItems {
                get;
                set;
            }
            [JsonProperty(En ? "Which loot table should the plugin use? (0 - own; 1 - loot table of the Rust objects; 2 - combine the 0 and 1 methods)" : "Какую таблицу предметов необходимо использовать? (0 - собственную; 1 - таблица предметов объектов Rust; 2 - совместить 0 и 1 методы)")]
            public int TypeLootTable {
                get;
                set;
            }
            [JsonProperty(En ? "Loot table from prefabs (if the loot table type is 1 or 2)" : "Таблица предметов из prefab-ов (если тип таблицы предметов - 1 или 2)")]
            public PrefabLootTableConfig PrefabLootTable {
                get;
                set;
            }
            [JsonProperty(En ? "Own loot table (if the loot table type is 0 or 2)" : "Собственная таблица предметов (если тип таблицы предметов - 0 или 2)")]
            public LootTableConfig OwnLootTable {
                get;
                set;
            }
        }
        private class PluginConfig {
            [JsonProperty(En ? "Minimum time between event [sec.]" : "Минимальное время между ивентами [sec.]")]
            public float MinStartTime {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum time between event [sec.]" : "Максимальное время между ивентами [sec.]")]
            public float MaxStartTime {
                get;
                set;
            }
            [JsonProperty(En ? "Use minimum and maximum event start values? [true/false]" : "Активен ли таймер для запуска ивента? [true/false]")]
            public bool EnabledTimer {
                get;
                set;
            }
            [JsonProperty(En ? "Waiting time for players in the event area [sec.]" : "Время ожидания игроков в зоне ивента [sec.]")]
            public int FinishTime {
                get;
                set;
            }
            [JsonProperty(En ? "Delay of event start from the command or timer running (starts when chat message appears) [sec.]" : "Время до начала ивента после сообщения в чате [sec.]")]
            public float PreStartTime {
                get;
                set;
            }
            [JsonProperty(En ? "Notification time until the end of the event [sec.]" : "Время оповещения до окончания ивента [sec.]")]
            public int PreFinishTime {
                get;
                set;
            }
            [JsonProperty(En ? "List of crates inside the supermarket" : "Список ящиков внутри супермаркета")]
            public HashSet<CrateConfig> Crates {
                get;
                set;
            }
            [JsonProperty(En ? "Supermarket security guards settings inside" : "Настройки охранников супермаркета внутри")]
            public PresetConfig SecurityInside {
                get;
                set;
            }
            [JsonProperty(En ? "Supermarket security guards settings outside" : "Настройки охранников супермаркета снаружи")]
            public PresetConfig SecurityOutside {
                get;
                set;
            }
            [JsonProperty(En ? "Settings of the animal that walks with the supermarket guard outside" : "Настройки животного, которое ходит вместе с охранником супермаркета снаружи")]
            public AnimalConfig SecurityAnimal {
                get;
                set;
            }
            [JsonProperty(En ? "Settings of the debt collectors guards" : "Настройки охранников инкассатора")]
            public PresetConfig SecurityCollector {
                get;
                set;
            }
            [JsonProperty(En ? "Merchant Settings" : "Настройки торговца")]
            public BasePlayerConfig Cashier {
                get;
                set;
            }
            [JsonProperty(En ? "Debt Collector Settings" : "Настройки инкассатора")]
            public BasePlayerConfig Collector {
                get;
                set;
            }
            [JsonProperty(En ? "Marker configuration on the map" : "Настройка маркера на карте")]
            public MarkerConfig Marker {
                get;
                set;
            }
            [JsonProperty(En ? "Main marker settings for key event points shown on players screen" : "Настройки основного маркера на экране игрока")]
            public PointConfig MainPoint {
                get;
                set;
            }
            [JsonProperty(En ? "Additional marker settings for key event points shown on players screen" : "Настройки дополнительного маркера на экране игрока")]
            public PointConfig AdditionalPoint {
                get;
                set;
            }
            [JsonProperty(En ? "GUI setting" : "Настройки GUI")]
            public GuiConfig Gui {
                get;
                set;
            }
            [JsonProperty(En ? "Chat Message setting" : "Настройки сообщений в чате")]
            public ChatConfig Chat {
                get;
                set;
            }
            [JsonProperty(En ? "Facepunch Game Tips setting" : "Настройка сообщений Facepunch Game Tip")]
            public GameTipConfig GameTip {
                get;
                set;
            }
            [JsonProperty(En ? "GUI Announcements setting (only for GUIAnnouncements plugin)" : "Настройка GUI Announcements (только для тех, кто использует плагин GUI Announcements)")]
            public GuiAnnouncementsConfig GuiAnnouncements {
                get;
                set;
            }
            [JsonProperty(En ? "Notify setting (only for Notify plugin)" : "Настройка Notify (только для тех, кто использует плагин Notify)")]
            public NotifyConfig Notify {
                get;
                set;
            }
            [JsonProperty(En ? "Discord setting (only for DiscordMessages plugin)" : "Настройка оповещений в Discord (только для тех, кто использует плагин Discord Messages)")]
            public DiscordConfig Discord {
                get;
                set;
            }
            [JsonProperty(En ? "Radius of the event zone" : "Радиус зоны ивента")]
            public float Radius {
                get;
                set;
            }
            [JsonProperty(En ? "Do you create a PVP zone in the event area? (only for users TruePVE plugin) [true/false]" : "Создавать зону PVP в зоне проведения ивента? (только для тех, кто использует плагин TruePVE) [true/false]")]
            public bool IsCreateZonePvp {
                get;
                set;
            }
            [JsonProperty(En ? "PVE Mode Setting (only for users PveMode plugin)" : "Настройка PVE режима работы плагина (только для тех, кто использует плагин PveMode)")]
            public PveModeConfig PveMode {
                get;
                set;
            }
            [JsonProperty(En ? "Interrupt teleporting into and out of the event area? (only for users NTeleportation plugin) [true/false]" : "Запрещать телепорт в зоне проведения ивента? (только для тех, кто использует плагин NTeleportation) [true/false]")]
            public bool NTeleportationInterrupt {
                get;
                set;
            }
            [JsonProperty(En ? "Disable NPCs from the BetterNpc plugin on the monument while the event is on? [true/false]" : "Отключать NPC из плагина BetterNpc на монументе пока проходит ивент? [true/false]")]
            public bool RemoveBetterNpc {
                get;
                set;
            }
            [JsonProperty(En ? "Economy setting (total values will be added up and rewarded at the end of the event)" : "Настройка экономики (конечное значение суммируется и будет выдано игрокам по окончанию ивента)")]
            public EconomyConfig Economy {
                get;
                set;
            }
            [JsonProperty(En ? "List of commands banned in the event zone" : "Список команд запрещенных в зоне ивента")]
            public HashSet<string> Commands {
                get;
                set;
            }
            [JsonProperty(En ? "Should all doors open automatically when all NPCs outside are killed? [true/false]" : "Должны ли открываться все двери автоматически, когда будут убиты все Npc снаружи? [true/false]")]
            public bool CanOpenDoors {
                get;
                set;
            }
            [JsonProperty(En ? "The time the debt collector stays inside the supermarket [sec.]" : "Время нахождения инкассатора внутри супермаркета [sec.]")]
            public int TimeTransaction {
                get;
                set;
            }
            [JsonProperty(En ? "Configuration version" : "Версия конфигурации")]
            public VersionNumber PluginVersion {
                get;
                set;
            }
            public static PluginConfig DefaultConfig() {
                return new PluginConfig {
                    MinStartTime = 5400f, MaxStartTime = 7200f, EnabledTimer = true, FinishTime = 1800, PreStartTime = 300f, PreFinishTime = 300, Crates = new HashSet<CrateConfig> {
                        new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_normal.prefab", Position = "(0, 0, 0)", Rotation = "(0, 0, 0)", TypeLootTable = 0, PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 8, MaxAmount = 8, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/underwater_labs/crate_normal.prefab", Position = "(-6.649, 2.277, -5.504)", Rotation = "(0, 90, 0)", TypeLootTable = 0, PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/underwater_labs/crate_normal.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 8, MaxAmount = 8, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_normal.prefab", Position = "(4.306, 2.01, 4.71)", Rotation = "(0, 0, 0)", TypeLootTable = 0, PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 8, MaxAmount = 8, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_normal.prefab", Position = "(-6.409, 1.998, 2.067)", Rotation = "(0, 90, 0)", TypeLootTable = 0, PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 8, MaxAmount = 8, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_normal_2.prefab", Position = "(-5.488, 0.521, 0.309)", Rotation = "(0, 26.039, 0)", TypeLootTable = 0, PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal_2.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 5, MaxAmount = 5, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_normal_2.prefab", Position = "(11.382, 0, 0.897)", Rotation = "(0, 0, 0)", TypeLootTable = 0, PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal_2.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 5, MaxAmount = 5, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_normal_2.prefab", Position = "(11.642, 0, -5.731)", Rotation = "(0, 26.039, 0)", TypeLootTable = 0, PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal_2.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 5, MaxAmount = 5, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = ""
                                    }
                                }
                            }
                        }
                    }
                    , SecurityInside = new PresetConfig {
                        Min = 2, Max = 2, Positions = new HashSet<string> {
                            "(-3, 0.025, 2)", "(8, 0.025, -2.5)"
                        }
                        , Config = new NpcConfig {
                            Name = "Security Inside", Health = 125f, RoamRange = 5f, ChaseRange = 30f, AttackRangeMultiplier = 3f, SenseRange = 30f, MemoryDuration = 15f, DamageScale = 0.25f, AimConeScale = 1.5f, CheckVisionCone = false, VisionCone = 135f, Speed = 7.5f, DisableRadio = false, Stationary = false, IsRemoveCorpse = true, WearItems = new HashSet<NpcWear> {
                                new NpcWear {
                                    ShortName = "hoodie", SkinId = 2380062321
                                }
                                , new NpcWear {
                                    ShortName = "pants", SkinId = 1907958977
                                }
                                , new NpcWear {
                                    ShortName = "hat.cap", SkinId = 915520890
                                }
                                , new NpcWear {
                                    ShortName = "shoes.boots", SkinId = 869007492
// ... [Code preview truncated due to length. Full source in attached file] ...

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху