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

FREE IQSphereEvent : 1.1.9 1.1.9

Нет прав для скачивания
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;
namespace Oxide.Plugins {
    [Info("IQSphereEvent", "Mercury", "1.1.9")]
    [Description("Supported Discord - Mercury#5212")]
    class IQSphereEvent : RustPlugin {
        ///123 <summary>
        // - Исправил плагин после обновления игры от FP
        /// Обновление 1.1.x
        /// - Упростил мультиязычность в конфигурации
        /// - Исправил дублирование модов для NPC в кфг
        /// - Теперь при входе нового игрока - для него отобразится маркер (если мероприятие началось)
        /// </summary>
#region Reference
        private const Boolean LanguageEn = false;
        [PluginReference]
        Plugin IQChat, ImageLibrary, NpcSpawn, PreventLooting, BetterNpc;
#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 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(LanguageEn ? "Event Settings" : "Настройки мероприятия")]
            public EventSetting EventSettings = new EventSetting();
            [JsonProperty(LanguageEn ? "Configuring supported plugins" : "Настройка поддерживаемых плагинов")]
            public ReferencePlugin referencePlugin = new ReferencePlugin();
            [JsonProperty(LanguageEn ? "Setting up bots at the event (After updating the game 02.12 temporarily disabled!)" : "Настройка ботов на мероприятии (После обновления игры 02.12 временно отключены!)")]
            public SpawnBots BotsSetting = new SpawnBots();
            [JsonProperty(LanguageEn ? "Setting up the sphere" : "Настройка сферы")]
            public SphereSetting SphereSettings = new SphereSetting();
            [JsonProperty(LanguageEn ? "Setting up the plot" : "Настройка сюжета")]
            public StorySettings StorySetting = new StorySettings();
            internal class StorySettings {
                [JsonProperty(LanguageEn ? "Effects for the player at each notification on the walkie-talkie(one is selected randomly)" : "Эффекты для игрока при каждом уведомлении по рации(выбирается случайно один)")]
                public List<String> RadioSounds;
                [JsonProperty(LanguageEn ? "Setting up persons to accompany in the plot" : "Настройка персон для сопровождения в сюжете")]
                public PersonSettings Persons;
                internal class PersonSettings {
                    [JsonProperty(LanguageEn ? "Picture for scientists (PNG 32x32)" : "Картинка для ученых")]
                    public String ScientistPNG;
                    [JsonProperty(LanguageEn ? "Picture for a helicopter (PNG 32x32)" : "Картинка для вертолета")]
                    public String HelicopterPNG;
                    [JsonProperty(LanguageEn ? "Picture for chinook (PNG 32x32)" : "Картинка для чинука")]
                    public String ChinookPNG;
                    [JsonProperty(LanguageEn ? "An image for an information notification (PNG 32x32)" : "Картинка для информационного уведомления")]
                    public String InformationPNG;
                }
            }
            internal class ReferencePlugin {
                [JsonProperty(LanguageEn ? "IQChat: Setting up a chat" : "IQChat : Настройка чата")]
                public ChatSettings chatSettings = new ChatSettings();
                [JsonProperty(LanguageEn ? "BetterNpc : Setting betternpc" : "BetterNpc : Настройка BetterNpc")]
                public BetterNpcSettings BetterNpcSetting = new BetterNpcSettings();
                internal class BetterNpcSettings {
                    [JsonProperty(LanguageEn ? "When launching an event, should I remove NPCs from the Better Npc plugin on the sphere? (true - yes/false - no) (after the event is completed, they will be returned)" : "При запуске мероприятия удалять ли NPC из плагина BetterNpc на сфере? (true - да/false - нет) (после завершения мероприятия они будут возвращены)")]
                    public Boolean DestroyedNpc = false;
                }
                internal class ChatSettings {
                    [JsonProperty(LanguageEn ? "IQChat :Custom prefix in the chat" : "IQChat : Кастомный префикс в чате")]
                    public String CustomPrefix;
                    [JsonProperty(LanguageEn ? "IQChat : Custom avatar in the chat(If required)" : "IQChat : Кастомный аватар в чате(Если требуется)")]
                    public String CustomAvatar;
                }
            }
            internal class LootSetting {
                [JsonProperty(LanguageEn ? "Item name" : "Название предмета")]
                public String DisplayName;
                [JsonProperty(LanguageEn ? "" : "Shortname")]
                public String Shortname;
                [JsonProperty(LanguageEn ? "" : "SkinID")]
                public UInt64 SkinID;
                [JsonProperty(LanguageEn ? "Setting up the quantity" : "Настройка количества")]
                public CountSettings CountSetting = new CountSettings();
            }
            internal class CountSettings {
                [JsonProperty(LanguageEn ? "Minimum value" : "Минимальное значение")]
                public Int32 AmountMin;
                [JsonProperty(LanguageEn ? "Maximum value" : "Максимальное значение")]
                public Int32 AmountMax;
            }
            internal class SphereSetting {
                [JsonProperty(LanguageEn ? "Air defense settings on the sphere" : "Настрой ПВО на сфере")]
                public SamTurret SamSetting = new SamTurret();
                [JsonProperty(LanguageEn ? "Sound effects settings on the sphere" : "Настройки звуковых эффектов на сфере")]
                public BoomBoxSettings BoomBoxSetting = new BoomBoxSettings();
                [JsonProperty(LanguageEn ? "Radiation settings on the sphere" : "Настройки радиации на сфере")]
                public Radiation RadiationSettings = new Radiation();
                [JsonProperty(LanguageEn ? "Helicopter settings on the sphere" : "Настройки вертолета на сфере")]
                public Helicopter HelicopterSettings = new Helicopter();
                [JsonProperty(LanguageEn ? "Chinook settings on the sphere" : "Настройки чинука на сфере")]
                public Chinook ChinoockSettings = new Chinook();
                [JsonProperty(LanguageEn ? "Enable light signals on the sphere (true-yes/false-no)" : "Включить световые сигналы на сфере (true - да/false - нет)")]
                public Boolean UseAlarm;
                [JsonProperty(LanguageEn ? "Enable lasers inside the sphere(true-yes/false-no) (Sound signals must be enabled!)" : "Включить лазеры внутри сферы(true - да/false - нет) (Должны быть включены звуковые сигналы!)")]
                public Boolean UseLaser;
                [JsonProperty(LanguageEn ? "Turn on the lamps inside the sphere(true-yes/false-no)" : "Включить лампы внутри сферы(true - да/false - нет)")]
                public Boolean UseLamps;
                [JsonProperty(LanguageEn ? "Enable effects support(true-yes/false-no)" : "Включить поддержку эффектов(true - да/false - нет)")]
                public Boolean UseEffects;
                internal class Helicopter {
                    [JsonProperty(LanguageEn ? "Use a helicopter on a sphere (true-yes/false-no)" : "Использовать вертолет на сфере (true - да/false - нет)")]
                    public Boolean UseHelicopter;
                    [JsonProperty(LanguageEn ? "How many circles will the helicopter make around the sphere" : "Сколько кругов сделает вертолет вокруг сферы")]
                    public Int32 CountCircle;
                    [JsonProperty(LanguageEn ? "The maximum speed of the helicopter (Also affects the flight speed, if you are not sure about this setting, leave it as default)" : "Максимальная скорость вертолета (Так-же влияет на скорость полета, если не уверены в этой настройке, оставьте по умолчанию)")]
                    public Single MaxSpeed;
                    [JsonProperty(LanguageEn ? "Helicopter speed (Also affects the maximum flight speed, if you are not sure about this setting, leave it as default)" : "Скорость вертолета (Так-же влияет на максимальную скорость  полета, если не уверены в этой настройке, оставьте по умолчанию)")]
                    public Single MoveSpeed;
                    [JsonProperty(LanguageEn ? "Setting up loot in the helicopter boxes" : "Настройка лута в ящиках вертолета")]
                    public CrateLootSetting LootHelicopter = new CrateLootSetting();
                    internal class CrateLootSetting {
                        [JsonProperty(LanguageEn ? "Use your own list of items in the helicopter boxes(true-yes/false-no)" : "Использовать собственный список предметов в ящиках вертолета(true - да/false - нет)")]
                        public Boolean UseCustomLoot;
                        [JsonProperty(LanguageEn ? "The number of boxes that will be spawned" : "Количество ящиков, которое заспавнится")]
                        public CountSettings AmountRandomCrate = new CountSettings();
                        [JsonProperty(LanguageEn ? "List of items in the boxes(will be selected randomly)" : "Список предметов в ящиках(будут выбираться случайно)")]
                        public List<LootSetting> LootSettings = new List<LootSetting>();
                    }
                }
                internal class Chinook {
                    [JsonProperty(LanguageEn ? "Use chinook on a sphere (true-yes/false-no)" : "Использовать чинук на сфере (true - да/false - нет)")]
                    public Boolean UseChinoock;
                    [JsonProperty(LanguageEn ? "Configuring Chinook Behaviors" : "Настройка поведениий чинука")]
                    public BehaviourChinoock BehaviorSettingsChinoock = new BehaviourChinoock();
                    internal class BehaviourChinoock {
                        [JsonProperty(LanguageEn ? "Setting up the Chinook's fall on the sphere [It will fly and break right on the sphere]" : "Настройка падения чинука на сфере [Он пролетит и разобьется прям на сфере]")]
                        public DropCrateChinoock ChinoockDies = new DropCrateChinoock();
                        [JsonProperty(LanguageEn ? "Setting up the Chinook's flight at the sphere [It will fly over the sphere and fulfill some conditions that are configured below]" : "Настройка пролета чинука у сфере [Он пролетит над сферой и выполнит некоторые условия, которые настраиваются ниже]")]
                        public DropCrateChinoock ChinoockLeaves = new DropCrateChinoock();
                        internal class DropCrateChinoock {
                            [JsonProperty(LanguageEn ? "Whether to reset the mailbox randomly(true-yes/false-no)" : "Сбрасывать ли случайным образом ящик(true - да/false - нет)")]
                            public Boolean UseDropCrateChinoock;
                            [JsonProperty(LanguageEn ? "Static chance of dropping a box from a Chinook" : "Статический шанс сброса ящика с чинука")]
                            public Int32 RareDropCrateChinoock;
                            [JsonProperty(LanguageEn ? "Setting up a random reset chance" : "Настройка случайного шанса сброса")]
                            public RandomSetting RandomSettings = new RandomSetting();
                            [JsonProperty(LanguageEn ? "Setting up loot in crate" : "Настройка лута в ящике")]
                            public CrateLootSetting CrateLootSettings = new CrateLootSetting();
                            internal class RandomSetting {
                                [JsonProperty(LanguageEn ? "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)" : "Использовать случайное значение для сброса ящика(true - да/false - нет) (P.s статическое значение будет игнорироваться, если включен данный пункт)")]
                                public Boolean UseRandom;
                                [JsonProperty(LanguageEn ? "Setting values for randomness" : "Настройка значений для рандома")]
                                public CountSettings RandomRangeCount = new CountSettings();
                            }
                            internal class CrateLootSetting {
                                [JsonProperty(LanguageEn ? "Use your own list of items in the Chinook box(true-yes/false-no)" : "Использовать собственный список предметов в ящике от чинука(true - да/false - нет)")]
                                public Boolean UseCustomLoot;
                                [JsonProperty(LanguageEn ? "List of items in the Chinook box(will be selected randomly)" : "Список предметов в ящике с чинука(будут выбираться случайно)")]
                                public List<LootSetting> LootSettings = new List<LootSetting>();
                            }
                        }
                    }
                }
                internal class Radiation {
                    [JsonProperty(LanguageEn ? "Enable radiation support on the sphere(true-yes/false-no)" : "Включить поддержку радиации на сфере(true - да/false - нет)")]
                    public Boolean UseRadiation;
                    [JsonProperty(LanguageEn ? "Starting radiation indicator" : "Стартовый показатель радиации")]
                    public Single StartingAmountRadiation;
                    [JsonProperty(LanguageEn ? "Radiation multiplier (radiation will increase by this indicator during the specified limit and time)" : "Множитель радиации (радиация будет увеличиваться на данный показатель в течение заданного лимита и времени)")]
                    public Single MultiplierRadiation;
                    [JsonProperty(LanguageEn ? "Radiation update time" : "Время обновления радиации")]
                    public Single SecondUpdate;
                    [JsonProperty(LanguageEn ? "To what level of radiation should it be increased" : "До какого показателя радиации увеличивать ее")]
                    public Single MaximumAmountRadiation;
                }
                internal class SamTurret {
                    [JsonProperty(LanguageEn ? "Enable air defense spawn(true-yes/false-no)" : "Включить спавн ПВО(true - да/false - нет)")]
                    public Boolean UseSam;
                    [JsonProperty(LanguageEn ? "Radius of detection of flying air defense objects" : "Радиус обнаружении летающих объектов ПВО")]
                    public Single Radius;
                    [JsonProperty(LanguageEn ? "The number of cartridges in one air defense system" : "Количество патрон в одной ПВО")]
                    public Single AmmoCount;
                }
                internal class BoomBoxSettings {
                    [JsonProperty(LanguageEn ? "Enable sound effects spawn(true-yes/false-no)" : "Включить спавн звуковых эффектов(true - да/false - нет)")]
                    public Boolean UseSoundAlarm;
                    [JsonProperty(LanguageEn ? "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)" : "Ссылка на видео YouTube с данным звуком (Учтите, берется лишь 30 первых секунд и зацикливается в эффекте)")]
                    public String YouTubeLink;
                    [JsonProperty(LanguageEn ? "Sound volume 0.1 - 1.5" : "Громкость звука 0.1 - 1.5")]
                    public Single Volume;
                }
            }
            internal class SpawnBots {
                [JsonProperty(LanguageEn ? "Setting up bots under the sphere" : "Настройка ботов под сферой")]
                public GeneralBotSphere UnderBots = new GeneralBotSphere();
                [JsonProperty(LanguageEn ? "Setting up bots around the sphere" : "Настройка ботов вокруг сферы")]
                public GeneralBotSphere AroundBots = new GeneralBotSphere();
                [JsonProperty(LanguageEn ? "Setting up bots inside the sphere" : "Настройка ботов внутри сферы")]
                public LevelBotSphere LevelBots = new LevelBotSphere();
                internal class LevelBotSphere {
                    [JsonProperty(LanguageEn ? "Setting up Tier 1 bots" : "Настройка ботов ТИР 1")]
                    public GeneralBotSphere Tier1 = new GeneralBotSphere();
                    [JsonProperty(LanguageEn ? "Setting up Tier 2 bots" : "Настройка ботов ТИР 2")]
                    public GeneralBotSphere Tier2 = new GeneralBotSphere();
                    [JsonProperty(LanguageEn ? "Setting up Tier 3 bots" : "Настройка ботов ТИР 3")]
                    public GeneralBotSphere Tier3 = new GeneralBotSphere();
                }
                internal class GeneralBotSphere {
                    [JsonProperty(LanguageEn ? "Enable spawn bots(true-yes/false-no)" : "Включить спавн ботов(true - да/false - нет)")]
                    public Boolean UseBots;
                    [JsonProperty(LanguageEn ? "Setting up the spawn of the number of NPCs" : "Настройка спавна количества NPC")]
                    public CountSettings CounSetting = new CountSettings();
                    [JsonProperty(LanguageEn ? "Health bots" : "ХП ботов")]
                    public Single HealthBot;
                    [JsonProperty(LanguageEn ? "The radius of visibility of bots" : "Радиус видимости ботов")]
                    public Single RadiusVisBots = 150f;
                    [JsonProperty(LanguageEn ? "The display name of the bots" : "Отображаемое имя ботов")]
                    public String DisplayNameBot;
                    [JsonProperty(LanguageEn ? "Roam Range" : "Дальность патрулирования местности")]
                    public float RoamRange = 30f;
                    [JsonProperty(LanguageEn ? "Chase Range" : "Дальность погони за целью")]
                    public float ChaseRange = 90f;
                    [JsonProperty(LanguageEn ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
                    public float AttackRangeMultiplier = 2f;
                    [JsonProperty(LanguageEn ? "Sense Range" : "Радиус обнаружения цели")]
                    public float SenseRange = 50f;
                    [JsonProperty(LanguageEn ? "Scale damage" : "Множитель урона")]
                    public float DamageScale = 1f;
                    [JsonProperty(LanguageEn ? "Aim Cone Scale" : "Множитель разброса")]
                    public float AimConeScale = 0.1f;
                    [JsonProperty(LanguageEn ? "Detect the target only in the NPC's viewing vision cone?" : "Обнаруживать цель только в углу обзора NPC?")]
                    public bool CheckVisionCone = false;
                    [JsonProperty(LanguageEn ? "Vision Cone" : "Угол обзора")]
                    public float VisionCone = 135f;
                    [JsonProperty(LanguageEn ? "Speed" : "Скорость")]
                    public float Speed = 7f;
                    [JsonProperty(LanguageEn ? "Wear NPC" : "Одежда NPC")]
                    public List<ItemBot> WearNPC = new List<ItemBot>(6);
                    [JsonProperty(LanguageEn ? "NPC Weapon Variation" : "Вариация оружия NPC")]
                    public List<ItemBot> BeltNPC = new List<ItemBot>();
                    [JsonProperty(LanguageEn ? "Setting up a drop-out loot with an NPC" : "Настройка выпадаемого лута с NPC")]
                    public List<ItemDropBot> ItemDropLoot = new List<ItemDropBot>();
                    internal class ItemDropBot {
                        [JsonProperty(LanguageEn ? "Setting loot" : "Настройка лута")]
                        public LootSetting LootSetting = new LootSetting();
                        [JsonProperty(LanguageEn ? "Chance of loot loss" : "Шанс выпадения лута")]
                        public Int32 RareDrop;
                    }
                    internal class ItemBot {
                        [JsonProperty(LanguageEn ? "Shortname" : "Shortname")]
                        public String Shortname;
                        [JsonProperty(LanguageEn ? "SkinID" : "SkinID")]
                        public UInt64 SkinID;
                        [JsonProperty(LanguageEn ? "Mods weapon" : "Mods weapon")]
                        public List<String> Mods;
                    }
                }
            }
            internal class EventSetting {
                [JsonProperty(LanguageEn ? "Once in how many seconds to launch an event" : "Раз в сколько секунд запускать мероприятие")]
                public Int32 StartTime;
                [JsonProperty(LanguageEn ? "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)" : "Использовать таймер для остановки мероприятия (true - да/false - нет) (Если 'Нет', то мероприятие закончится после того, как игрок откроет один из ящиков на вверхнем уровне)")]
                public Boolean UseTimerStop = true;
                [JsonProperty(LanguageEn ? "How long will the event last(Recommended value : 2400 seconds)" : "Сколько будет длиться мероприятие(Рекомендуемое значение : 2400 секунд)")]
                public Int32 StopEventTime;
                [JsonProperty(LanguageEn ? "Remove players' backpacks after the end of the event (true - yes/false - no)" : "Удалять рюкзаки игроков после завершения мероприятия (true - да/false - нет)")]
                public Boolean DeleteBackpacksEventStop = false;
                [JsonProperty(LanguageEn ? "Setting up your mailboxes on the sphere" : "Настройка своих ящиков на сфере")]
                public CustomLootSphere LootSphereSetting;
                [JsonProperty(LanguageEn ? "Setting up the event coverage area" : "Настройка зоны действия мероприятия")]
                public SettingsZoneEvent SettingZoneEvent;
                [JsonProperty(LanguageEn ? "Setting up a marker on the G map" : "Настройка маркера на G карте")]
                public MapMarkerSetting MapMarkerSettings;
                [JsonProperty(LanguageEn ? "Additional configuration" : "Дополнительная настройка")]
                public OtherSetting OtherSettings;
                internal class OtherSetting {
                    [JsonProperty(LanguageEn ? "Notify the player if he entered the event area (true-yes/false-no)" : "Уведомлять игрока если он вошел в зону действия мероприятия(true - да/false - нет)")]
                    public Boolean UseAlertTriggerEnter;
                    [JsonProperty(LanguageEn ? "Configuring the pager" : "Настройка пейджера")]
                    public Pager PagerSettings;
                    internal class Pager {
                        [JsonProperty(LanguageEn ? "Use a pager (it will be activated at the beginning of the event and before its completion(if the specified frequency is set))" : "Использовать пейджер (при начале мероприятия и до его завершения будет активирован(если задана указанная частота))")]
                        public Boolean UsePagerAlert;
                        [JsonProperty(LanguageEn ? "Pager frequency" : "Частота пейджера")]
                        public Int32 Frequency;
                    }
                }
                internal class MapMarkerSetting {
                    [JsonProperty(LanguageEn ? "Use a marker(true-yes/false-no)" : "Использовать маркер(true - да/false - нет)")]
                    public Boolean UseMarker;
                    [JsonProperty(LanguageEn ? "Marker color" : "Цвет маркера")]
                    public String ColorMarker;
                    [JsonProperty(LanguageEn ? "Marker transparency" : "Прозрачность маркера")]
                    public Single AlphaMarker;
                }
                internal class SettingsZoneEvent {
                    [JsonProperty(LanguageEn ? "Setting up team blocking in the event area" : "Настройка блокировки команд в зоне действия мероприятия")]
                    public BlockCommand BlockCommands;
                    internal class BlockCommand {
                        [JsonProperty(LanguageEn ? "Use command blocking in the event area (true-yes/false-no)" : "Использовать блокировку команд в зоне действия мероприятия(true - да/false - нет)")]
                        public Boolean UseBlockCommand;
                        [JsonProperty(LanguageEn ? "List of chat teams that will be blocked in the event area" : "Список чат команд, которые будут заблокированы в зоне действия мероприятия")]
                        public List<String> Commands = new List<String>();
                    }
                }
                internal class CustomLootSphere {
                    [JsonProperty(LanguageEn ? "Use your own boxes on the sphere(true-yes/false-no)" : "Использовать собственные ящики на сфере(true - да/false - нет)")]
                    public Boolean UseCustomLoot;
                    [JsonProperty(LanguageEn ? "How many boxes to compare on the sphere" : "Сколько спавнить ящиков на сфере")]
                    public Int32 SpawnCrateCount;
                    [JsonProperty(LanguageEn ? "List of spawn boxes with settings(they will be selected randomly from the list)" : "Список ящиков для спавна с настройкой(будут выбираться рандомно из списка)")]
                    public List<CrateSettings> CrateList = new List<CrateSettings>();
                    internal class CrateSettings {
                        [JsonProperty(LanguageEn ? "Use standard loot in the boxes (true - yes/false - no (configurable at this point, the list of items)" : "Использовать в ящиках стандартный лут (true - да/false - нет(настраивается в этом пункте, список предметов)")]
                        public Boolean UseDefaultLoot = false;
                        [JsonProperty(LanguageEn ? "Prefab crate" : "Префаб ящика")]
                        public String CratePrefab;
                        [JsonProperty(LanguageEn ? "Minimum and maximum amount of loot in one box(if you use custom loot)" : "Минимальное и максимальное количество лута в одном ящике(если вы используете свой лут)")]
                        public CountSettings CountSpawnItems = new CountSettings();
                        [JsonProperty(LanguageEn ? "List of items in the drawer" : "Список предметов в ящике")]
                        public List<LootSettings> ItemSettings = new List<LootSettings>();
                        internal class LootSettings {
                            [JsonProperty(LanguageEn ? "Loot Settings" : "Настройка лута")]
                            public LootSetting LootSetting = new LootSetting();
                            [JsonProperty(LanguageEn ? "Chance of loot loss" : "Шанс выпадения лута")]
                            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>] "
                        }
                        , BetterNpcSetting = new ReferencePlugin.BetterNpcSettings {
                            DestroyedNpc = false,
                        }
                        ,
                    }
                    ,
#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, DeleteBackpacksEventStop = false, UseTimerStop = true, 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 {
                                                    AmountMin = 1, AmountMax = 1,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 55, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "techparts", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 10, AmountMax = 33,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 80, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "gears", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 10, AmountMax = 33,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
                                            RareDrop = 30, LootSetting = new LootSetting {
                                                DisplayName = "", Shortname = "riflebody", SkinID = 0, CountSetting = new CountSettings {
                                                    AmountMin = 1, AmountMax = 3,
                                                }
                                            }
                                        }
                                        , new EventSetting.CustomLootSphere.CrateSettings.LootSettings {
          
// ... [Code preview truncated due to length. Full source in attached file] ...

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