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

FREE IQSphereEvent : 1.0.54 1.0.54

Нет прав для скачивания
C#:
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using UnityEngine;
using Oxide.Game.Rust.Cui;
using System.Linq;
using System.Text;
using Oxide.Core.Plugins;
using ConVar;
using System.Collections;
using Oxide.Core.Libraries.Covalence;
using Oxide.Core.Libraries;
using Newtonsoft.Json.Linq;
using Rust;
namespace Oxide.Plugins {
    [Info("IQSphereEvent", "TopPlugin.ru", "1.0.54")]
    [Description("Supported Discord - PsiX#2920")]
    class IQSphereEvent : RustPlugin {
        ///123 <summary>
        // - Исправил плагин после обновления игры от FP
        /// Обновление 1.0.x
        /// - Исправлены NPC , они вновь добавлены и работают
        /// - Добавлены новые параметры для настройки NPC
        /// - Добавлен триггер на отслеживание залутанных ящиков, теперь можно установить завершение мероприятия после лутания ящиков на вверхнем уровне сфера
        /// - Добавлена поддержка плагина - PreventLooting
        /// - Добавлена поддержка плагина - TruePVE, NextGenPVE, Imperium (Удален конфликт между плагинами)
        /// </summary>
#region Reference
        [PluginReference]
        Plugin IQChat, ImageLibrary, NpcSpawn, PreventLooting;
#region IQChat
        public void SendChat(BasePlayer player, String Message, Chat.ChatChannel channel = Chat.ChatChannel.Global) {
            var Chat = config.referencePlugin.chatSettings;
            if (IQChat) IQChat?.Call("API_ALERT_PLAYER", player, Message, Chat.CustomPrefix, Chat.CustomAvatar);
            else player.SendConsoleCommand("chat.add", channel, 0, Message);
        }
#endregion
#region ImageLibrary
        private String GetImage(String fileName, UInt64 skin = 0) {
            var imageId = (String)plugins.Find("ImageLibrary").CallHook("GetImage", fileName, skin);
            if (!string.IsNullOrEmpty(imageId)) return imageId;
            return String.Empty;
        }
        public Boolean AddImage(String url, String shortname, UInt64 skin = 0) => (Boolean)ImageLibrary?.Call("AddImage", url, shortname, skin);
        public void SendImage(BasePlayer player, String imageName, UInt64 imageId = 0) => ImageLibrary?.Call("SendImage", player, imageName, imageId);
        public Boolean HasImage(String imageName) => (Boolean)ImageLibrary?.Call("HasImage", imageName);
#endregion
#endregion
#region Vars
        private Boolean IsLootingEventTier3 = false;
        private Timer TimerPreStarted = null;
        private Timer TimerStopped = null;
        private Timer TimerPreStopped = null;
        private Timer TimerSpawnSoundAlarms = null;
        public System.Random Random = new System.Random();
        public static IQSphereEvent _;
        private static MonumentInfo monument;
        private TriggerZone TriggerZoneTier1 = null;
        private TriggerZone TriggerZoneAround = null;
        private Item CassetteAlarm;
        private Vector3 PositionDespawn;
        private Dictionary<BasePlayer, Coroutine> RoutinePlayer = new Dictionary<BasePlayer, Coroutine>();
        private Coroutine SpawnEffects = null;
        private Coroutine SpawnEvents = null;
        private List<BaseEntity> OtherEntity = new List<BaseEntity>();
        private List<BaseEntity> ElecticalEntity = new List<BaseEntity>();
        private Dictionary<ScientistNPC, Tier> nPCMonitors = new Dictionary<ScientistNPC, Tier>();
        private List<IOEntity> IOList = new List<IOEntity>();
        private List<PagerEntity> Pagers = new List<PagerEntity>();
        private List<BasePlayer> PlayerWarnings = new List<BasePlayer>();
        private MapMarkerGenericRadius MarkerZoneEvent;
        private Boolean EventStarted = false;
        enum StoryPerson {
            Information, Scientist, Helicopter, Chinook,
        }
        public enum FlyType {
            Helicopter, Chinoock
        }
        public enum Tier {
            Under, Around, Tier1, Tier2, Tier3,
        }
        public enum BehaviorChinook {
            Die, Leave
        }
#endregion
#region Serializer
        public Serializer SerializerMain = new Serializer();
        public class Serializer {
            public String JsonUI;
            public String JsonUIWarning;
            public String JsonUILabel;
            public Information BoomBox = new Information();
            public Information Triggers = new Information();
            public List<Information> ListSoundsAlarm = new List<Information>();
            public List<Information> LaserAlarm = new List<Information>();
            public List<Information> ListAlarm = new List<Information>();
            public List<Information> Lamps = new List<Information>();
            public List<Information> Sams = new List<Information>();
            public List<Information> Effects = new List<Information>();
            public List<Information> HelicopterPoints = new List<Information>();
            public List<BotInformation> Bots = new List<BotInformation>();
            internal class BotInformation {
                public Information Information = new Information();
                public Tier TierSpawn;
            }
            internal class Information {
                public String Name;
                public Vector3 Position;
                public Vector3 Rotation;
                public QuaternionFormul Formul = new QuaternionFormul();
                internal class QuaternionFormul {
                    public Single X;
                    public Single Y;
                    public Single Z;
                    public Single W;
                }
            }
        }
#endregion
#region Configuration
        private static Configuration config = new Configuration();
        public class Configuration {
            // [JsonProperty("Event Settings")]
            [JsonProperty("Настройки мероприятия")]
            public EventSetting EventSettings = new EventSetting();
            // [JsonProperty("Configuring supported plugins")]
            [JsonProperty("Настройка поддерживаемых плагинов")]
            public ReferencePlugin referencePlugin = new ReferencePlugin();
            ///  [JsonProperty("Setting up bots at the event (After updating the game 02.12 temporarily disabled!)")]
            [JsonProperty("Настройка ботов на мероприятии (После обновления игры 02.12 временно отключены!)")]
            public SpawnBots BotsSetting = new SpawnBots();
            //   [JsonProperty("Setting up the sphere")]
            [JsonProperty("Настройка сферы")]
            public SphereSetting SphereSettings = new SphereSetting();
            //   [JsonProperty("Setting up the plot")]
            [JsonProperty("Настройка сюжета")]
            public StorySettings StorySetting = new StorySettings();
            internal class StorySettings {
                // [JsonProperty("Effects for the player at each notification on the walkie-talkie(one is selected randomly)")]
                [JsonProperty("Эффекты для игрока при каждом уведомлении по рации(выбирается случайно один)")]
                public List<String> RadioSounds;
                //  [JsonProperty("Setting up persons to accompany in the plot")]
                [JsonProperty("Настройка персон для сопровождения в сюжете")]
                public PersonSettings Persons;
                internal class PersonSettings {
                    //  [JsonProperty("Picture for scientists (PNG 32x32)")]
                    [JsonProperty("Картинка для ученых")]
                    public String ScientistPNG;
                    //  [JsonProperty("Picture for a helicopter (PNG 32x32)")]
                    [JsonProperty("Картинка для вертолета")]
                    public String HelicopterPNG;
                    //   [JsonProperty("Picture for chinook (PNG 32x32)")]
                    [JsonProperty("Картинка для чинука")]
                    public String ChinookPNG;
                    //   [JsonProperty("An image for an information notification (PNG 32x32)")]
                    [JsonProperty("Картинка для информационного уведомления")]
                    public String InformationPNG;
                }
            }
            internal class ReferencePlugin {
                //  [JsonProperty("IQChat: Setting up a chat")]
                [JsonProperty("IQChat : Настройка чата")]
                public ChatSettings chatSettings = new ChatSettings();
                internal class ChatSettings {
                    //  [JsonProperty("IQChat :Custom prefix in the chat")]
                    [JsonProperty("IQChat : Кастомный префикс в чате")]
                    public String CustomPrefix;
                    //  [JsonProperty("IQChat : Custom avatar in the chat(If required)")]
                    [JsonProperty("IQChat : Кастомный аватар в чате(Если требуется)")]
                    public String CustomAvatar;
                }
            }
            internal class LootSetting {
                //  [JsonProperty("Item name")]
                [JsonProperty("Название предмета")]
                public String DisplayName;
                [JsonProperty("Shortname")]
                public String Shortname;
                [JsonProperty("SkinID")]
                public UInt64 SkinID;
                //  [JsonProperty("Setting up the quantity")]
                [JsonProperty("Настройка количества")]
                public CountSettings CountSetting = new CountSettings();
            }
            internal class CountSettings {
                //   [JsonProperty("Minimum value")]
                [JsonProperty("Минимальное значение")]
                public Int32 AmountMin;
                //   [JsonProperty("Maximum value")]
                [JsonProperty("Максимальное значение")]
                public Int32 AmountMax;
            }
            internal class SphereSetting {
                //   [JsonProperty("Air defense settings on the sphere")]
                [JsonProperty("Настрой ПВО на сфере")]
                public SamTurret SamSetting = new SamTurret();
                //  [JsonProperty("Sound effects settings on the sphere")]
                [JsonProperty("Настройки звуковых эффектов на сфере")]
                public BoomBoxSettings BoomBoxSetting = new BoomBoxSettings();
                //  [JsonProperty("Radiation settings on the sphere")]
                [JsonProperty("Настройки радиации на сфере")]
                public Radiation RadiationSettings = new Radiation();
                //  [JsonProperty("Helicopter settings on the sphere")]
                [JsonProperty("Настройки вертолета на сфере")]
                public Helicopter HelicopterSettings = new Helicopter();
                //  [JsonProperty("Chinook settings on the sphere")]
                [JsonProperty("Настройки чинука на сфере")]
                public Chinook ChinoockSettings = new Chinook();
                //   [JsonProperty("Enable light signals on the sphere (true-yes/false-no)")]
                [JsonProperty("Включить световые сигналы на сфере (true - да/false - нет)")]
                public Boolean UseAlarm;
                //  [JsonProperty("Enable lasers inside the sphere(true-yes/false-no) (Sound signals must be enabled!)")]
                [JsonProperty("Включить лазеры внутри сферы(true - да/false - нет) (Должны быть включены звуковые сигналы!)")]
                public Boolean UseLaser;
                //  [JsonProperty("Turn on the lamps inside the sphere(true-yes/false-no)")]
                [JsonProperty("Включить лампы внутри сферы(true - да/false - нет)")]
                public Boolean UseLamps;
                //  [JsonProperty("Enable effects support(true-yes/false-no)")]
                [JsonProperty("Включить поддержку эффектов(true - да/false - нет)")]
                public Boolean UseEffects;
                internal class Helicopter {
                    //  [JsonProperty("Use a helicopter on a sphere (true-yes/false-no)")]
                    [JsonProperty("Использовать вертолет на сфере (true - да/false - нет)")]
                    public Boolean UseHelicopter;
                    //   [JsonProperty("How many circles will the helicopter make around the sphere")]
                    [JsonProperty("Сколько кругов сделает вертолет вокруг сферы")]
                    public Int32 CountCircle;
                    //   [JsonProperty("The maximum speed of the helicopter (Also affects the flight speed, if you are not sure about this setting, leave it as default)")]
                    [JsonProperty("Максимальная скорость вертолета (Так-же влияет на скорость полета, если не уверены в этой настройке, оставьте по умолчанию)")]
                    public Single MaxSpeed;
                    //   [JsonProperty("Helicopter speed (Also affects the maximum flight speed, if you are not sure about this setting, leave it as default)")]
                    [JsonProperty("Скорость вертолета (Так-же влияет на максимальную скорость  полета, если не уверены в этой настройке, оставьте по умолчанию)")]
                    public Single MoveSpeed;
                    //   [JsonProperty("Setting up loot in the helicopter boxes")]
                    [JsonProperty("Настройка лута в ящиках вертолета")]
                    public CrateLootSetting LootHelicopter = new CrateLootSetting();
                    internal class CrateLootSetting {
                        //   [JsonProperty("Use your own list of items in the helicopter boxes(true-yes/false-no)")]
                        [JsonProperty("Использовать собственный список предметов в ящиках вертолета(true - да/false - нет)")]
                        public Boolean UseCustomLoot;
                        //  [JsonProperty("The number of boxes that will be spawned")]
                        [JsonProperty("Количество ящиков, которое заспавнится")]
                        public CountSettings AmountRandomCrate = new CountSettings();
                        //  [JsonProperty("List of items in the boxes(will be selected randomly)")]
                        [JsonProperty("Список предметов в ящиках(будут выбираться случайно)")]
                        public List<LootSetting> LootSettings = new List<LootSetting>();
                    }
                }
                internal class Chinook {
                    // [JsonProperty("Use chinook on a sphere (true-yes/false-no)")]
                    [JsonProperty("Использовать чинук на сфере (true - да/false - нет)")]
                    public Boolean UseChinoock;
                    //   [JsonProperty("Configuring Chinook Behaviors")]
                    [JsonProperty("Настройка поведениий чинука")]
                    public BehaviourChinoock BehaviorSettingsChinoock = new BehaviourChinoock();
                    internal class BehaviourChinoock {
                        //  [JsonProperty("Setting up the Chinook's fall on the sphere [It will fly and break right on the sphere]")]
                        [JsonProperty("Настройка падения чинука на сфере [Он пролетит и разобьется прям на сфере]")]
                        public DropCrateChinoock ChinoockDies = new DropCrateChinoock();
                        //   [JsonProperty("Setting up the Chinook's flight at the sphere [It will fly over the sphere and fulfill some conditions that are configured below]")]
                        [JsonProperty("Настройка пролета чинука у сфере [Он пролетит над сферой и выполнит некоторые условия, которые настраиваются ниже]")]
                        public DropCrateChinoock ChinoockLeaves = new DropCrateChinoock();
                        internal class DropCrateChinoock {
                            // [JsonProperty("Whether to reset the mailbox randomly(true-yes/false-no)")]
                            [JsonProperty("Сбрасывать ли случайным образом ящик(true - да/false - нет)")]
                            public Boolean UseDropCrateChinoock;
                            //  [JsonProperty("Static chance of dropping a box from a Chinook")]
                            [JsonProperty("Статический шанс сброса ящика с чинука")]
                            public Int32 RareDropCrateChinoock;
                            //   [JsonProperty("Setting up a random reset chance")]
                            [JsonProperty("Настройка случайного шанса сброса")]
                            public RandomSetting RandomSettings = new RandomSetting();
                            //   [JsonProperty("Setting up loot in crate")]
                            [JsonProperty("Настройка лута в ящике")]
                            public CrateLootSetting CrateLootSettings = new CrateLootSetting();
                            internal class RandomSetting {
                                //   [JsonProperty("Use a random value to reset the mailbox (true-yes / false-no) (p.s.the static value will be ignored if this option is enabled)")]
                                [JsonProperty("Использовать случайное значение для сброса ящика(true - да/false - нет) (P.s статическое значение будет игнорироваться, если включен данный пункт)")]
                                public Boolean UseRandom;
                                //  [JsonProperty("Setting values for randomness")]
                                [JsonProperty("Настройка значений для рандома")]
                                public CountSettings RandomRangeCount = new CountSettings();
                            }
                            internal class CrateLootSetting {
                                //  [JsonProperty("Use your own list of items in the Chinook box(true-yes/false-no)")]
                                [JsonProperty("Использовать собственный список предметов в ящике от чинука(true - да/false - нет)")]
                                public Boolean UseCustomLoot;
                                //  [JsonProperty("List of items in the Chinook box(will be selected randomly)")]
                                [JsonProperty("Список предметов в ящике с чинука(будут выбираться случайно)")]
                                public List<LootSetting> LootSettings = new List<LootSetting>();
                            }
                        }
                    }
                }
                internal class Radiation {
                    //  [JsonProperty("Enable radiation support on the sphere(true-yes/false-no)")]
                    [JsonProperty("Включить поддержку радиации на сфере(true - да/false - нет)")]
                    public Boolean UseRadiation;
                    //  [JsonProperty("Starting radiation indicator")]
                    [JsonProperty("Стартовый показатель радиации")]
                    public Single StartingAmountRadiation;
                    //  [JsonProperty("Radiation multiplier (radiation will increase by this indicator during the specified limit and time)")]
                    [JsonProperty("Множитель радиации (радиация будет увеличиваться на данный показатель в течение заданного лимита и времени)")]
                    public Single MultiplierRadiation;
                    //  [JsonProperty("Radiation update time")]
                    [JsonProperty("Время обновления радиации")]
                    public Single SecondUpdate;
                    //   [JsonProperty("To what level of radiation should it be increased")]
                    [JsonProperty("До какого показателя радиации увеличивать ее")]
                    public Single MaximumAmountRadiation;
                }
                internal class SamTurret {
                    //   [JsonProperty("Enable air defense spawn(true-yes/false-no)")]
                    [JsonProperty("Включить спавн ПВО(true - да/false - нет)")]
                    public Boolean UseSam;
                    //   [JsonProperty("Radius of detection of flying air defense objects")]
                    [JsonProperty("Радиус обнаружении летающих объектов ПВО")]
                    public Single Radius;
                    //  [JsonProperty("The number of cartridges in one air defense system")]
                    [JsonProperty("Количество патрон в одной ПВО")]
                    public Single AmmoCount;
                }
                internal class BoomBoxSettings {
                    //   [JsonProperty("Enable sound effects spawn(true-yes/false-no)")]
                    [JsonProperty("Включить спавн звуковых эффектов(true - да/false - нет)")]
                    public Boolean UseSoundAlarm;
                    //   [JsonProperty("A link to a YouTube video with this sound (Note that it is taken only for the first 30 seconds and is looped in the effect)")]
                    [JsonProperty("Ссылка на видео YouTube с данным звуком (Учтите, берется лишь 30 первых секунд и зацикливается в эффекте)")]
                    public String YouTubeLink;
                    //   [JsonProperty("Sound volume 0.1 - 1.5")]
                    [JsonProperty("Громкость звука 0.1 - 1.5")]
                    public Single Volume;
                }
            }
            internal class SpawnBots {
                //  [JsonProperty("Setting up bots under the sphere")]
                [JsonProperty("Настройка ботов под сферой")]
                public GeneralBotSphere UnderBots = new GeneralBotSphere();
                //  [JsonProperty("Setting up bots around the sphere")]
                [JsonProperty("Настройка ботов вокруг сферы")]
                public GeneralBotSphere AroundBots = new GeneralBotSphere();
                //   [JsonProperty("Setting up bots inside the sphere")]
                [JsonProperty("Настройка ботов внутри сферы")]
                public LevelBotSphere LevelBots = new LevelBotSphere();
                internal class LevelBotSphere {
                    //  [JsonProperty("Setting up Tier 1 bots")]
                    [JsonProperty("Настройка ботов ТИР 1")]
                    public GeneralBotSphere Tier1 = new GeneralBotSphere();
                    //  [JsonProperty("Setting up Tier 2 bots")]
                    [JsonProperty("Настройка ботов ТИР 2")]
                    public GeneralBotSphere Tier2 = new GeneralBotSphere();
                    //   [JsonProperty("Setting up Tier 3 bots")]
                    [JsonProperty("Настройка ботов ТИР 3")]
                    public GeneralBotSphere Tier3 = new GeneralBotSphere();
                }
                internal class GeneralBotSphere {
                    //   [JsonProperty("Enable spawn bots(true-yes/false-no)")]
                    [JsonProperty("Включить спавн ботов(true - да/false - нет)")]
                    public Boolean UseBots;
                    //   [JsonProperty("Setting up the spawn of the number of NPCs")]
                    [JsonProperty("Настройка спавна количества NPC")]
                    public CountSettings CounSetting = new CountSettings();
                    //   [JsonProperty("Health bots")]
                    [JsonProperty("ХП ботов")]
                    public Single HealthBot;
                    //  [JsonProperty("The radius of visibility of bots")]
                    [JsonProperty("Радиус видимости ботов")]
                    public Single RadiusVisBots = 150f;
                    ////  [JsonProperty("Percentage of bot accuracy (from 0.0 to 100.0)")]
                    [JsonProperty("Процент точности ботов (от 0.0 до 100.0)")]
                    public Single Accuracy = 30.5f;
                    /// [JsonProperty("The display name of the bots")]
                    [JsonProperty("Отображаемое имя ботов")]
                    public String DisplayNameBot;
                    [JsonProperty("Дальность патрулирования местности")]
                    //  [JsonProperty("Roam Range")]
                    public float RoamRange = 30f;
                    [JsonProperty("Дальность погони за целью")]
                    ////  [JsonProperty("Chase Range")]
                    public float ChaseRange = 90f;
                    [JsonProperty("Множитель радиуса атаки")]
                    ////  [JsonProperty("Attack Range Multiplier")]
                    public float AttackRangeMultiplier = 2f;
                    [JsonProperty("Радиус обнаружения цели")]
                    //// [JsonProperty("Sense Range")]
                    public float SenseRange = 50f;
                    [JsonProperty("Множитель урона")]
                    ///  [JsonProperty("Scale damage")]
                    public float DamageScale = 1f;
                    [JsonProperty("Множитель разброса")]
                    ///  [JsonProperty("Aim Cone Scale")]
                    public float AimConeScale = 1f;
                    [JsonProperty("Обнаруживать цель только в углу обзора NPC?")]
                    //  [JsonProperty("Detect the target only in the NPC's viewing vision cone?")]
                    public bool CheckVisionCone = false;
                    [JsonProperty("Угол обзора")]
                    //// [JsonProperty("Vision Cone")]
                    public float VisionCone = 135f;
                    [JsonProperty("Скорость")]
                    //  [JsonProperty("Speed")]
                    public float Speed = 7f;
                    //  [JsonProperty("Wear NPC")]
                    [JsonProperty("Одежда NPC")]
                    public List<ItemBot> WearNPC = new List<ItemBot>(6);
                    //  [JsonProperty("NPC Weapon Variation")]
                    [JsonProperty("Вариация оружия NPC")]
                    public List<ItemBot> BeltNPC = new List<ItemBot>();
                    //  [JsonProperty("Setting up a drop-out loot with an NPC")]
                    [JsonProperty("Настройка выпадаемого лута с NPC")]
                    public List<ItemDropBot> ItemDropLoot = new List<ItemDropBot>();
                    internal class ItemDropBot {
                        //  [JsonProperty("Setting loot")]
                        [JsonProperty("Настройка лута")]
                        public LootSetting LootSetting = new LootSetting();
                        //  [JsonProperty("Chance of loot loss")]
                        [JsonProperty("Шанс выпадения лута")]
                        public Int32 RareDrop;
                    }
                    internal class ItemBot {
                        [JsonProperty("Shortname")]
                        public String Shortname;
                        [JsonProperty("SkinID")]
                        public UInt64 SkinID;
                    }
                }
            }
            internal class EventSetting {
                //  [JsonProperty("Once in how many seconds to launch an event")]
                [JsonProperty("Раз в сколько секунд запускать мероприятие")]
                public Int32 StartTime;
                // [JsonProperty("Use a timer to stop the event (true - yes/false - no) (If 'No', the event will end after the player opens one of the boxes at the top level)")]
                [JsonProperty("Использовать таймер для остановки мероприятия (true - да/false - нет) (Если 'Нет', то мероприятие закончится после того, как игрок откроет один из ящиков на вверхнем уровне)")]
                public Boolean UseTimerStop = true;
                //  [JsonProperty("How long will the event last(Recommended value : 2400 seconds)")]
                [JsonProperty("Сколько будет длиться мероприятие(Рекомендуемое значение : 2400 секунд)")]
                public Int32 StopEventTime;
                //  [JsonProperty("Setting up your mailboxes on the sphere")]
                [JsonProperty("Настройка своих ящиков на сфере")]
                public CustomLootSphere LootSphereSetting;
                //  [JsonProperty("Setting up the event coverage area")]
                [JsonProperty("Настройка зоны действия мероприятия")]
                public SettingsZoneEvent SettingZoneEvent;
                // [JsonProperty("Setting up a marker on the G map")]
                [JsonProperty("Настройка маркера на G карте")]
                public MapMarkerSetting MapMarkerSettings;
                // [JsonProperty("Additional configuration")]
                [JsonProperty("Дополнительная настройка")]
                public OtherSetting OtherSettings;
                internal class OtherSetting {
                    //   [JsonProperty("Notify the player if he entered the event area (true-yes/false-no)")]
                    [JsonProperty("Уведомлять игрока если он вошел в зону действия мероприятия(true - да/false - нет)")]
                    public Boolean UseAlertTriggerEnter;
                    //  [JsonProperty("Configuring the pager")]
                    [JsonProperty("Настройка пейджера")]
                    public Pager PagerSettings;
                    internal class Pager {
                        //  [JsonProperty("Use a pager (it will be activated at the beginning of the event and before its completion(if the specified frequency is set))")]
                        [JsonProperty("Использовать пейджер (при начале мероприятия и до его завершения будет активирован(если задана указанная частота))")]
                        public Boolean UsePagerAlert;
                        //  [JsonProperty("Pager frequency")]
                        [JsonProperty("Частота пейджера")]
                        public Int32 Frequency;
                    }
                }
                internal class MapMarkerSetting {
                    //  [JsonProperty("Use a marker(true-yes/false-no)")]
                    [JsonProperty("Использовать маркер(true - да/false - нет)")]
                    public Boolean UseMarker;
                    //  [JsonProperty("Marker color")]
                    [JsonProperty("Цвет маркера")]
                    public String ColorMarker;
                    //   [JsonProperty("Marker transparency")]
                    [JsonProperty("Прозрачность маркера")]
                    public Single AlphaMarker;
                }
                internal class SettingsZoneEvent {
                    //    [JsonProperty("Setting up team blocking in the event area")]
                    [JsonProperty("Настройка блокировки команд в зоне действия мероприятия")]
                    public BlockCommand BlockCommands;
                    internal class BlockCommand {
                        //  [JsonProperty("Use command blocking in the event area (true-yes/false-no)")]
                        [JsonProperty("Использовать блокировку команд в зоне действия мероприятия(true - да/false - нет)")]
                        public Boolean UseBlockCommand;
                        //  [JsonProperty("List of chat teams that will be blocked in the event area")]
                        [JsonProperty("Список чат команд, которые будут заблокированы в зоне действия мероприятия")]
                        public List<String> Commands = new List<String>();
                    }
                }
                internal class CustomLootSphere {
                    //  [JsonProperty("Use your own boxes on the sphere(true-yes/false-no)")]
                    [JsonProperty("Использовать собственные ящики на сфере(true - да/false - нет)")]
                    public Boolean UseCustomLoot;
                    // [JsonProperty("How many boxes to compare on the sphere")]
                    [JsonProperty("Сколько спавнить ящиков на сфере")]
                    public Int32 SpawnCrateCount;
                    //  [JsonProperty("List of spawn boxes with settings(they will be selected randomly from the list)")]
                    [JsonProperty("Список ящиков для спавна с настройкой(будут выбираться рандомно из списка)")]
                    public List<CrateSettings> CrateList = new List<CrateSettings>();
                    internal class CrateSettings {
                        //  [JsonProperty("Use standard loot in the boxes (true - yes/false - no (configurable at this point, the list of items)")]
                        [JsonProperty("Использовать в ящиках стандартный лут (true - да/false - нет(настраивается в этом пункте, список предметов)")]
                        public Boolean UseDefaultLoot = false;
                        //  [JsonProperty("Prefab crate")]
                        [JsonProperty("Префаб ящика")]
                        public String CratePrefab;
                        //  [JsonProperty("Minimum and maximum amount of loot in one box(if you use custom loot)")]
                        [JsonProperty("Минимальное и максимальное количество лута в одном ящике(если вы используете свой лут)")]
                        public CountSettings CountSpawnItems = new CountSettings();
                        //  [JsonProperty("List of items in the drawer")]
                        [JsonProperty("Список предметов в ящике")]
                        public List<LootSettings> ItemSettings = new List<LootSettings>();
                        internal class LootSettings {
                            //   [JsonProperty("Loot Settings")]
                            [JsonProperty("Настройка лута")]
                            public LootSetting LootSetting = new LootSetting();
                            //  [JsonProperty("Chance of loot loss")]
                            [JsonProperty("Шанс выпадения лута")]
                            public Int32 RareDrop;
                        }
                    }
                }
            }
            public static Configuration GetNewConfiguration() {
                return new Configuration {
#region Reference
                    referencePlugin = new ReferencePlugin {
                        chatSettings = new ReferencePlugin.ChatSettings {
                            CustomAvatar = "76561199206561118", CustomPrefix = "[<color=#ff4948>Scientists</color>] "
                        }
                    }
                    ,
#endregion
#region EventSetting
                    StorySetting = new StorySettings {
                        Persons = new StorySettings.PersonSettings {
                            ChinookPNG = "https://i.imgur.com/kv9JmP6.png", ScientistPNG = "https://i.imgur.com/HgB63CL.png", HelicopterPNG = "https://i.imgur.com/zWmpEX0.png", InformationPNG = "https://i.imgur.com/Rf4C1yi.png",
                        }
                        , RadioSounds = new List<String> {
                            "assets/prefabs/npc/scientist/sound/aggro.prefab", "assets/prefabs/npc/scientist/sound/chatter.prefab", "assets/prefabs/npc/scientist/sound/death.prefab", "assets/prefabs/npc/scientist/sound/responddeath.prefab", "assets/prefabs/npc/scientist/sound/respondok.prefab", "assets/prefabs/npc/scientist/sound/takecover.prefab",
                        }
                    }
                    , EventSettings = new EventSetting {
                        StartTime = 1200, StopEventTime = 2400, OtherSettings = new EventSetting.OtherSetting {
                            UseAlertTriggerEnter = true, PagerSettings = new EventSetting.OtherSetting.Pager {
                                UsePagerAlert = true, Frequency = 5997,
                            }
                        }
                        , MapMarkerSettings = new EventSetting.MapMarkerSetting {
                            UseMarker = true, ColorMarker = "#c15338", AlphaMarker = 0.6f,
                        }
                        , SettingZoneEvent = new EventSetting.SettingsZoneEvent {
                            BlockCommands = new EventSetting.SettingsZoneEvent.BlockCommand {
                                UseBlockCommand = true, Commands = new List<String> {
                                    "kit", "tp", "tpa", "home", "store",
                                }
                            }
                        }
                        , LootSphereSetting = new EventSetting.CustomLootSphere {
                            SpawnCrateCount = 4, UseCustomLoot = true, CrateList = new List<EventSetting.CustomLootSphere.CrateSettings> {
                                new EventSetting.CustomLootSphere.CrateSettings {
                                    UseDefaultLoot = false, CountSpawnItems = new CountSettings {
                                        AmountMin = 1, AmountMax = 6,
                                    }
                                    , CratePrefab = "assets/bundled/prefabs/radtown/crate_elite.prefab", ItemSettings = new List<EventSetting.CustomLootSphere.CrateSettings.LootSettings> {
                                        new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 100, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "wood", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 3000,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 50, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "rifle.ak", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 5, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "explosive.timed", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 3,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 30, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "supply.signal", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 2,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 10, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "explosive.satchel", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 2, AmountMax = 5,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 7, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "rocket.launcher", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 15, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "rifle.lr300", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 8, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "multiplegrenadelauncher", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 12, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "lmg.m249", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 70, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "clatter.helmet", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 30, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "metal.plate.torso", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 20, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "metal.facemask", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 40, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "roadsign.kilt", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 90, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "ammo.rifle.explosive", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 5, AmountMax = 30,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 18, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "ammo.rocket.basic", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 3,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 24, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "ammo.grenadelauncher.he", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 3, AmountMax = 6,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 88, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "largemedkit", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 3,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 60, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "autoturret", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 60, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "coffin.storage", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 3,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 55, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "keycard_red", SkinID = 0, CountSetting = new CountSettings {
                
// ... [Code preview truncated due to length. Full source in attached file] ...

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