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

FREE HarborEvent : 2.0.7 2.0.7

Нет прав для скачивания
C#:
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Oxide.Core;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using System.Collections.Generic;
using UnityEngine;
using System.Collections;
using System.IO;
using Oxide.Plugins.HarborEventExtensionMethods;
namespace Oxide.Plugins {
    [Info("HarborEvent", "Sempai#3239", "2.0.7")]
    internal class HarborEvent : RustPlugin {
#region Config
        private const bool En = false;
        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(2, 0, 6)) {
                _config.Gui = new GuiConfig {
                    IsGui = true, OffsetMinY = "-56"
                }
                ;
                foreach (PresetConfig preset in _config.NpcSmall) foreach (NpcBelt belt in preset.Config.BeltItems) belt.Ammo = string.Empty;
                foreach (PresetConfig preset in _config.NpcLarge) foreach (NpcBelt belt in preset.Config.BeltItems) belt.Ammo = string.Empty;
            }
            _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 ? "Is this a 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 numbers of items" : "Минимальное кол-во элементов")]
            public int Min {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum numbers of items" : "Максимальное кол-во элементов")]
            public int Max {
                get;
                set;
            }
            [JsonProperty(En ? "Use 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" : "Путь к prefab-у")]
            public string PrefabDefinition {
                get;
                set;
            }
        }
        public class PrefabLootTableConfig {
            [JsonProperty(En ? "Minimum numbers of prefabs" : "Минимальное кол-во prefab-ов")]
            public int Min {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum numbers of prefabs" : "Максимальное кол-во prefab-ов")]
            public int Max {
                get;
                set;
            }
            [JsonProperty(En ? "Use 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 ? "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 HackCrateConfig {
            [JsonProperty(En ? "Time to unlock the Crates [sec.]" : "Время разблокировки ящиков [sec.]")]
            public float UnlockTime {
                get;
                set;
            }
            [JsonProperty(En ? "Increase the event time if it's not enough to unlock the locked crate? [true/false]" : "Увеличивать время ивента, если недостаточно чтобы разблокировать заблокированный ящик? [true/false]")]
            public bool IncreaseEventTime {
                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 ? "Name" : "Название")]
            public string Name {
                get;
                set;
            }
            [JsonProperty(En ? "Radius" : "Радиус")]
            public float Radius {
                get;
                set;
            }
            [JsonProperty(En ? "Alpha" : "Прозрачность")]
            public float Alpha {
                get;
                set;
            }
            [JsonProperty(En ? "Marker color" : "Цвет маркера")]
            public ColorConfig Color {
                get;
                set;
            }
        }
        public class GuiConfig {
            [JsonProperty(En ? "Do you use the countdown GUI? [true/false]" : "Использовать ли GUI обратного отсчета? [true/false]")]
            public bool IsGui {
                get;
                set;
            }
            [JsonProperty("OffsetMin Y")]
            public string OffsetMinY {
                get;
                set;
            }
        }
        public class GuiAnnouncementsConfig {
            [JsonProperty(En ? "Do you use the GUI Announcements? [true/false]" : "Использовать ли GUI Announcements? [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 Notify? [true/false]" : "Использовать ли Notify? [true/false]")]
            public bool IsNotify {
                get;
                set;
            }
            [JsonProperty(En ? "Type" : "Тип")]
            public string Type {
                get;
                set;
            }
        }
        public class DiscordConfig {
            [JsonProperty(En ? "Do you use the Discord? [true/false]" : "Использовать ли Discord? [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 BradleyConfig {
            [JsonProperty(En ? "Health" : "Кол-во ХП")]
            public float Hp {
                get;
                set;
            }
            [JsonProperty(En ? "The viewing distance" : "Дальность обзора")]
            public float ViewDistance {
                get;
                set;
            }
            [JsonProperty(En ? "Radius of search" : "Радиус поиска")]
            public float SearchRange {
                get;
                set;
            }
            [JsonProperty(En ? "Scale damage" : "Множитель урона")]
            public float ScaleDamage {
                get;
                set;
            }
            [JsonProperty(En ? "The multiplier of Machine-gun aim cone" : "Множитель разброса пулемёта")]
            public float CoaxAimCone {
                get;
                set;
            }
            [JsonProperty(En ? "The multiplier of Machine-gun fire rate" : "Множитель скорострельности пулемёта")]
            public float CoaxFireRate {
                get;
                set;
            }
            [JsonProperty(En ? "Amount of Machine-gun burst shots" : "Кол-во выстрелов очереди пулемёта")]
            public int CoaxBurstLength {
                get;
                set;
            }
            [JsonProperty(En ? "Time that Bradley holds in memory the position of its last target [sec.]" : "Время, которое Bradley помнит позицию своей последней цели [sec.]")]
            public float MemoryDuration {
                get;
                set;
            }
            [JsonProperty(En ? "The time between shots of the main gun [sec.]" : "Время между залпами основного орудия [sec.]")]
            public float NextFireTime {
                get;
                set;
            }
            [JsonProperty(En ? "The time between shots of the main gun in a fire rate [sec.]" : "Время между выстрелами основного орудия в залпе [sec.]")]
            public float TopTurretFireRate {
                get;
                set;
            }
            [JsonProperty(En ? "Numbers of Crates" : "Кол-во ящиков после уничтожения")]
            public int CountCrates {
                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 HelicopterConfig {
            [JsonProperty(En ? "Health" : "Кол-во ХП")]
            public float Hp {
                get;
                set;
            }
            [JsonProperty(En ? "Health Main Rotor" : "Кол-во ХП основного винта")]
            public float HpMainRotor {
                get;
                set;
            }
            [JsonProperty(En ? "Health Tail Rotor" : "Кол-во ХП хвостового винта")]
            public float HpTailRotor {
                get;
                set;
            }
            [JsonProperty(En ? "Numbers of Crates" : "Кол-во ящиков после уничтожения")]
            public int CountCrates {
                get;
                set;
            }
            [JsonProperty(En ? "Time between firing rockets" : "Время между выстрелом ракет")]
            public float TimeBetweenRockets {
                get;
                set;
            }
            [JsonProperty(En ? "Time between turret shots" : "Время между выстрелами пулемета")]
            public float FireRate {
                get;
                set;
            }
            [JsonProperty(En ? "Time between turret bursts" : "Время между очередями пулемета")]
            public float TimeBetweenBursts {
                get;
                set;
            }
            [JsonProperty(En ? "Duration of the burst turret" : "Продолжительность очереди пулемета")]
            public float BurstLength {
                get;
                set;
            }
            [JsonProperty(En ? "Turret firing radius" : "Дистанция стрельбы пулемета")]
            public float MaxTargetRange {
                get;
                set;
            }
        }
        public class ScaleDamageConfig {
            [JsonProperty(En ? "Type of target" : "Тип цели")]
            public string Type {
                get;
                set;
            }
            [JsonProperty(En ? "Damage Multiplier" : "Множитель урона")]
            public float Scale {
                get;
                set;
            }
        }
        public class PveModeConfig {
            [JsonProperty(En ? "Use the PVE mode of 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 coefficients for calculate to become the Event Owner" : "Коэффициенты урона для подсчета, чтобы стать владельцем события")]
            public HashSet<ScaleDamageConfig> 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 hack locked crates? [true/false]" : "Может ли не владелец ивента взламывать заблокированные ящики? [true/false]")]
            public bool HackCrate {
                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 the non-owner of the event do damage to Bradley? [true/false]" : "Может ли не владелец ивента наносить урон по Bradley? [true/false]")]
            public bool DamageTank {
                get;
                set;
            }
            [JsonProperty(En ? "Can an Npc attack a non-owner of the event? [true/false]" : "Может ли Npc атаковать не владельца ивента? [true/false]")]
            public bool TargetNpc {
                get;
                set;
            }
            [JsonProperty(En ? "Can Bradley attack a non-owner of the event? [true/false]" : "Может ли Bradley атаковать не владельца ивента? [true/false]")]
            public bool TargetTank {
                get;
                set;
            }
            [JsonProperty(En ? "Allow the 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 PresetConfig {
            [JsonProperty(En ? "Minimum" : "Минимальное кол-во")]
            public int Min {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum" : "Максимальное кол-во")]
            public int Max {
                get;
                set;
            }
            [JsonProperty(En ? "List of locations" : "Список расположений")]
            public List<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 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 EconomyConfig {
            [JsonProperty(En ? "Which economy plugins do you want to use? (Economics, Server Rewards, IQEconomic)" : "Какие плагины экономики вы хотите использовать? (Economics, Server Rewards, IQEconomic)")]
            public HashSet<string> Plugins {
                get;
                set;
            }
            [JsonProperty(En ? "The minimum value that a player must collect to get points for the economy" : "Минимальное значение, которое игрок должен заработать, чтобы получить баллы за экономику")]
            public double Min {
                get;
                set;
            }
            [JsonProperty(En ? "Looting of crates" : "Ограбление ящиков")]
            public Dictionary<string, double> Crates {
                get;
                set;
            }
            [JsonProperty(En ? "Destruction of Bradley" : "Уничтожение Bradley")]
            public double Bradley {
                get;
                set;
            }
            [JsonProperty(En ? "Killing an NPC" : "Убийство NPC")]
            public double Npc {
                get;
                set;
            }
            [JsonProperty(En ? "Hacking a locked crate" : "Взлом заблокированного ящика")]
            public double LockedCrate {
                get;
                set;
            }
            [JsonProperty(En ? "Pressing the button" : "Нажатие кнопки")]
            public double Button {
                get;
                set;
            }
            [JsonProperty(En ? "List of commands that are executed in the 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 ReinforcementConfig {
            [JsonProperty(En ? "Do you take actions during the loot of a locked crate? [true/false]" : "Выполнять действия при ограблении заблокированного ящика? [true/false]")]
            public bool IsReinforcement {
                get;
                set;
            }
            [JsonProperty(En ? "A list of commands that are executed in the console ({steamid} - the player who looted the crate)" : "Список команд, которые выполняются в консоли ({steamid} - игрок, который ограбил ящик)")]
            public HashSet<string> Commands {
                get;
                set;
            }
            [JsonProperty(En ? "Calling a patrol helicopter to a locked crate?" : "Вызывать вертолет к заблокированному ящику? [true/false]")]
            public bool CallHeli {
                get;
                set;
            }
        }
        public class TurretConfig {
            [JsonProperty(En ? "Can Auto Turret appear? [true/false]" : "Использовать турели? [true/false]")]
            public bool IsTurret {
                get;
                set;
            }
            [JsonProperty(En ? "Health" : "Кол-во ХП")]
            public float Hp {
                get;
                set;
            }
            [JsonProperty(En ? "Weapon ShortName" : "ShortName оружия")]
            public string ShortNameWeapon {
                get;
                set;
            }
            [JsonProperty(En ? "Ammo ShortName" : "ShortName патронов")]
            public string ShortNameAmmo {
                get;
                set;
            }
            [JsonProperty(En ? "Number of ammo" : "Кол-во патронов")]
            public int CountAmmo {
                get;
                set;
            }
        }
        private class PluginConfig {
            [JsonProperty(En ? "Minimum time between events [sec.]" : "Минимальное время между ивентами [sec.]")]
            public float MinStartTime {
                get;
                set;
            }
            [JsonProperty(En ? "Maximum time between events [sec.]" : "Максимальное время между ивентами [sec.]")]
            public float MaxStartTime {
                get;
                set;
            }
            [JsonProperty(En ? "Is active the timer on to start the event? [true/false]" : "Активен ли таймер для запуска ивента? [true/false]")]
            public bool EnabledTimer {
                get;
                set;
            }
            [JsonProperty(En ? "Duration of the event [sec.]" : "Время проведения ивента [sec.]")]
            public int FinishTime {
                get;
                set;
            }
            [JsonProperty(En ? "Time before the starting of the event after receiving a chat message [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 ? "Which loot table should the plugin use in the crates? (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 TypeLootTableCrates {
                get;
                set;
            }
            [JsonProperty(En ? "Crates setting in Small Harbor" : "Настройка ящиков в Малом Порту")]
            public HashSet<CrateConfig> DefaultCratesSmall {
                get;
                set;
            }
            [JsonProperty(En ? "Crates setting in Large Harbor" : "Настройка ящиков в Большом Порту")]
            public HashSet<CrateConfig> DefaultCratesLarge {
                get;
                set;
            }
            [JsonProperty(En ? "Locked crate setting" : "Настройка заблокированного ящика")]
            public HackCrateConfig HackCrate {
                get;
                set;
            }
            [JsonProperty(En ? "Marker configuration on the map" : "Настройка маркера на карте")]
            public MarkerConfig Marker {
                get;
                set;
            }
            [JsonProperty(En ? "Prefix of chat messages" : "Префикс сообщений в чате")]
            public string Prefix {
                get;
                set;
            }
            [JsonProperty(En ? "Do you use the chat? [true/false]" : "Использовать ли чат? [true/false]")]
            public bool IsChat {
                get;
                set;
            }
            [JsonProperty(En ? "GUI setting" : "Настройки GUI")]
            public GuiConfig Gui {
                get;
                set;
            }
            [JsonProperty(En ? "GUI Announcements setting" : "Настройка GUI Announcements")]
            public GuiAnnouncementsConfig GuiAnnouncements {
                get;
                set;
            }
            [JsonProperty(En ? "Notify setting" : "Настройка Notify")]
            public NotifyConfig Notify {
                get;
                set;
            }
            [JsonProperty(En ? "Discord setting (only for users DiscordMessages plugin)" : "Настройка оповещений в Discord (только для тех, кто использует плагин DiscordMessages)")]
            public DiscordConfig Discord {
                get;
                set;
            }
            [JsonProperty(En ? "Can Bradley appear in the event zone? [true/false]" : "Должен ли появляться Bradley в зоне ивента? [true/false]")]
            public bool IsBradley {
                get;
                set;
            }
            [JsonProperty(En ? "Bradley setting" : "Настройка танка")]
            public BradleyConfig Bradley {
                get;
                set;
            }
            [JsonProperty(En ? "Helicopter setting" : "Настройка вертолета")]
            public HelicopterConfig Helicopter {
                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 the teleport in harbor? (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 ? "NPCs setting in Small Harbor" : "Настройка NPC в Малом Порту")]
            public HashSet<PresetConfig> NpcSmall {
                get;
                set;
            }
            [JsonProperty(En ? "NPCs setting in Large Harbor" : "Настройка NPC в Большом Порту")]
            public HashSet<PresetConfig> NpcLarge {
                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 ? "The CCTV camera" : "Название камеры")]
            public string Cctv {
                get;
                set;
            }
            [JsonProperty(En ? "Can SAM Site turrets appear in the event zone? [true/false]" : "Должны ли появляться Sam Site турели в зоне ивента? [true/false]")]
            public bool IsSamSites {
                get;
                set;
            }
            [JsonProperty(En ? "Should Cargo Ship sail away after timer ends? (сan bug out if Harbor is covered or between Islands) [true/false]" : "Корабль уплывает с карты? (возможен баг с прохождением сквозь землю, если порт находится в заливе или между островами) [true/false]")]
            public bool LeavingShip {
                get;
                set;
            }
            [JsonProperty(En ? "The time between the appearance of the ship and its turn to normal (if the ship does not turn to the required position, then it is necessary to increase this parameter) [sec.]" : "Время между появлением корабля и его разворотом в нормальное состояние (если корабль не поворачивается в необходимое положение, то необходимо повысить данный параметр) [sec.]")]
            public float DelayRotateCargo {
                get;
                set;
            }
            [JsonProperty(En ? "Actions during the loot of a locked crate in a container" : "Действия при ограблении заблокированного ящика в контейнере")]
            public ReinforcementConfig ReinforcementHackCrateContainer {
                get;
                set;
            }
            [JsonProperty(En ? "Actions during the loot of locked Crates on a ship" : "Действия при ограблении заблокированных ящиков на корабле")]
            public ReinforcementConfig ReinforcementHackCrateShip {
                get;
                set;
            }
            [JsonProperty(En ? "Setting AutoTurrets" : "Настройка турелей")]
            public TurretConfig Turret {
                get;
                set;
            }
            [JsonProperty(En ? "Configuration version" : "Версия конфигурации")]
            public VersionNumber PluginVersion {
                get;
                set;
            }
            public static PluginConfig DefaultConfig() {
                return new PluginConfig() {
                    MinStartTime = 10800f, MaxStartTime = 10800f, EnabledTimer = true, FinishTime = 3600, PreStartTime = 300f, PreFinishTime = 300, TypeLootTableCrates = 0, DefaultCratesSmall = new HashSet<CrateConfig> {
                        new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_elite.prefab", Position = "(34.027, 14.465, 104.138)", Rotation = "(0, 270, 0)", PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 50.0f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_elite.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 100, MaxAmount = 200, Chance = 50.0f, IsBluePrint = false, SkinID = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_elite.prefab", Position = "(33.977, 14.465, 107.138)", Rotation = "(0, 270, 0)", PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 50.0f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_elite.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 100, MaxAmount = 200, Chance = 50.0f, IsBluePrint = false, SkinID = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_normal.prefab", Position = "(33.989, 15.096, 104.130)", Rotation = "(0, 270, 0)", PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 50.0f, 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 = 100, MaxAmount = 200, Chance = 50.0f, IsBluePrint = false, SkinID = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/crate_normal.prefab", Position = "(33.989, 15.096, 107.130)", Rotation = "(0, 270, 0)", PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 50.0f, 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 = 100, MaxAmount = 200, Chance = 50.0f, IsBluePrint = false, SkinID = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/dmloot/dm c4.prefab", Position = "(35.884, 14.443, 104.104)", Rotation = "(0, 180, 0)", PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 50.0f, PrefabDefinition = "assets/bundled/prefabs/radtown/dmloot/dm c4.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 100, MaxAmount = 200, Chance = 50.0f, IsBluePrint = false, SkinID = 0, Name = ""
                                    }
                                }
                            }
                        }
                        , new CrateConfig {
                            Prefab = "assets/bundled/prefabs/radtown/dmloot/dm ammo.prefab", Position = "(35.884, 14.443, 107.105)", Rotation = "(0, 180, 0)", PrefabLootTable = new PrefabLootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Prefabs = new List<PrefabConfig> {
                                    new PrefabConfig {
                                        Chance = 50.0f, PrefabDefinition = "assets/bundled/prefabs/radtown/dmloot/dm ammo.prefab"
                                    }
                                }
                            }
                            , OwnLootTable = new LootTableConfig {
                                Min = 1, Max = 1, UseCount = true, Items = new List<ItemConfig> {
                                    new ItemConfig {
                                        ShortName = "scrap", MinAmount = 100, MaxAmount = 200, Chance = 50.0f, IsBluePrint = false, SkinID = 0, Name = ""
                                    }
                                }
                            }
                     
// ... [Code preview truncated due to length. Full source in attached file] ...

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

Другие ресурсы пользователя 15FPS

Сверху