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

FREE IQCases : 2.4.72 2.4.72

Нет прав для скачивания
C#:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using UnityEngine;
using System.Text;
using ConVar;
using UnityEngine.Networking;
using Oxide.Core;
using Oxide.Core.Libraries.Covalence;
using Object = System.Object;
namespace Oxide.Plugins {
    [Info("IQCases", "Mercury", "2.4.72")]
    [Description("Кейсы на ваш сервер")]
    public class IQCases : RustPlugin {
        /// <summary>
        /// Обновление 2.0.х
        /// Нововведения :
        /// - Добавлена возможность указать название кейса в UI
        /// - Добавлена комнсольная команда, с помощью которой можно выдать кейсы всем игрокам на сервере : case.give.all KEY_CASE AMOUNT
        /// Изменения :
        /// - Корректировка отображения сообщения в консоль
        /// </summary>
        ///
#region Reference
        [PluginReference]
        Plugin ImageLibrary, IQEconomic, Economics, ServerRewards, IQChat, Battles, Duel, Duelist, ArenaTournament, AimTraining, XFarmRoom, IQRankSystem;
#region ImageLibrary
        private String GetImage(String fileName, UInt64 skin = 0) {
            String imageId = (String)plugins.Find("ImageLibrary").CallHook("ImageUi.GetImage", fileName, skin);
            return !String.IsNullOrEmpty(imageId) ? imageId : String.Empty;
        }
#endregion
#region IQEconomic / Economics / ServerRewards
        private void SetBalance(UInt64 userID, Int32 Balance) {
            if (IQEconomic != null) IQEconomic?.Call("API_SET_BALANCE", userID, Balance);
            else if (Economics != null) Economics?.Call("Deposit", userID, (Double)Balance);
            else if (ServerRewards != null) ServerRewards?.Call("AddPoints", userID, Balance);
        }
        private Int32 GetBalance(UInt64 userID) {
            if (IQEconomic != null) return (Int32)IQEconomic?.Call("API_GET_BALANCE", userID);
            else if (Economics != null) return Convert.ToInt32((Double)Economics?.Call("Balance", userID));
            else if (ServerRewards != null) {
                Object Coins = ServerRewards.Call("CheckPoints", userID);
                return Coins == null ? 0 : Convert.ToInt32(Coins);
            }
            return 0;
        }
        private Boolean IsRemovedBalance(UInt64 userID, Int32 Amount) {
            if (IQEconomic != null) return (Boolean)IQEconomic?.Call("API_IS_REMOVED_BALANCE", userID, Amount);
            else if (Economics != null || ServerRewards) return GetBalance(userID) >= Amount;
            return false;
        }
        private void RemoveBalance(UInt64 userID, Int32 Balance) {
            if (IQEconomic != null) IQEconomic?.Call("API_REMOVE_BALANCE", userID, Balance);
            else if (Economics != null) Economics?.Call("Withdraw", userID, Convert.ToDouble(Balance));
            else if (ServerRewards != null) ServerRewards?.Call("TakePoints", userID, Balance);
        }
#endregion
#region IQChat
        private void SendChat(String Message, BasePlayer player, Chat.ChatChannel channel = Chat.ChatChannel.Global) {
            Configuration.ReferencePlugins.IQChatPreset ChatPrest = config.ReferencePluginsPreset.IQChatSettings;
            if (IQChat) if (ChatPrest.UIAlertUse) IQChat?.Call("API_ALERT_PLAYER_UI", player, Message);
            else IQChat?.Call("API_ALERT_PLAYER", player, Message, ChatPrest.CustomPrefix, ChatPrest.CustomAvatar);
            else player.SendConsoleCommand("chat.add", channel, 0, Message);
        }
#endregion
#region Duels
        public Boolean IsDuel(UInt64 userID) {
            Object obj = Interface.Oxide.RootPluginManager.GetPlugin("AimTraining")?.CallHook("IsArenaPlayer", userID);
            if (obj is Boolean) return (Boolean)obj;
            else if (Battles) return (Boolean)Battles?.Call("IsPlayerOnBattle", userID);
            else if (Duel) return (Boolean)Duel?.Call("IsPlayerOnActiveDuel", BasePlayer.FindByID(userID));
            else if (Duelist) return (Boolean)Duelist?.Call("inEvent", BasePlayer.FindByID(userID));
            else if (ArenaTournament) return ArenaTournament.Call<Boolean>("IsOnTournament", userID);
            else if (XFarmRoom) return XFarmRoom.Call<Boolean>("API_PlayerInRoom", userID);
            else return false;
        }
#endregion
#region IQRankSystem
        private Boolean IsRank(UInt64 userID, String Key) {
            if (!IQRankSystem) return false;
            return (Boolean)IQRankSystem?.Call("API_GET_AVAILABILITY_RANK_USER", userID, Key);
        }
        private String GetRankName(String Key) {
            String Rank = String.Empty;
            if (!IQRankSystem) return Rank;
            return (String)IQRankSystem?.Call("API_GET_RANK_NAME", Key);
        }
#endregion
#endregion
#region Vars
        private Boolean FullInit = false;
        private const Boolean LanguageEn = true;
        private static IQCases _;
        private static InterfaceBuilder _interface;
        private List<String> CaseKeys = new List<String>();
        private Dictionary<BasePlayer, LocalRepository> LocalRepositoryPlayer = new Dictionary<BasePlayer, LocalRepository>();
        private List<UInt64> LootersListCrateID = new List<UInt64>();
        private class LocalRepository {
            private Double CooldownTakeItem;
            private Double CooldownEffects;
            public Boolean IsOpenedCase;
            public Boolean IsCooldownTake => CooldownTakeItem >= CurrentTime;
            public void SetCooldown() => CooldownTakeItem = CurrentTime + 1f;
            public Boolean IsCooldownEffect => CooldownEffects >= CurrentTime;
            public void SetCooldownEffect() => CooldownEffects = CurrentTime + 1f;
        }
        static Double CurrentTime => Facepunch.Math.Epoch.Current;
        public enum TypeReward {
            Item, Command
        }
#endregion
#region Configuration
        private static Configuration config = new Configuration();
        private class Configuration {
            [JsonProperty(LanguageEn ? "Using logging for player case openings." : "Использовать логирование открытия кейсов игроком")]
            public Boolean UseLogs;
            [JsonProperty(LanguageEn ? "Plugin interface customization" : "Настройка интерфейса плагина")]
            public Interface InterfaceSettings = new Interface();
            [JsonProperty(LanguageEn ? "Settings cases" : "Настройка кейсов")]
            public Dictionary<String, CasesPreset> CasesPresets = new Dictionary<String, CasesPreset>();
            [JsonProperty(LanguageEn ? "Setting up compatible plugins" : "Настройка совместимых плагинов")]
            public ReferencePlugins ReferencePluginsPreset = new ReferencePlugins();
            [JsonProperty(LanguageEn ? "Setting the starting number of cases for the player" : "Настройка стартового количества кейсов для игрока")]
            public List<DefaultCasePlayer> DefaultCasePlayers = new List<DefaultCasePlayer>();
            [JsonProperty(LanguageEn ? "Case drop setting (supports looting and destroying objects) : [ShortPrefabName] = Setting" : "Настройка выпадения кейсов (поддерживает лутание и уничтожение объектов) : [ShortPrefabName] = Настройка")]
            public Dictionary<String, List<DropCases>> DropCasesList = new Dictionary<String, List<DropCases>>();
            internal class DropCases {
                [JsonProperty(LanguageEn ? "Case drop chance" : "Шанс выпадения кейса")]
                public Int32 Rare;
                [JsonProperty(LanguageEn ? "Number of cases to issue" : "Количество кейсов для выдачи")]
                public Int32 Count;
                [JsonProperty(LanguageEn ? "Permission to receive a case (environment empty - will be available to everyone)" : "Права для получения кейса (оставьте пустым - будет доступно всем)")]
                public String Permissions;
                [JsonProperty(LanguageEn ? "Case key to issue (from the list of your cases)" : "Ключ кейса для выдачи (из списка ваших кейсов)")]
                public String CaseKey;
            }
            internal class DefaultCasePlayer {
                [JsonProperty(LanguageEn ? "Case key to issue (from the list of your cases)" : "Ключ кейса для выдачи (из списка ваших кейсов)")]
                public String CaseKey;
                [JsonProperty(LanguageEn ? "Permissions for obtaining cases (it will work if the player receives these rights or enters the server with them) (leave blank - will be available to everyone)" : "Права для получения кейсов (сработает если игрок получит эти права или зайдет с ними на сервер) (остаьвте пустым - будет доступно всем)")]
                public String Permissions;
                [JsonProperty(LanguageEn ? "Number of cases to issue" : "Количество кейсов для выдачи")]
                public Int32 Count;
            }
            internal class ReferencePlugins {
                [JsonProperty(LanguageEn ? "Setting up IQChat" : "Настройка IQChat'a")]
                public IQChatPreset IQChatSettings = new IQChatPreset();
                internal class IQChatPreset {
                    [JsonProperty(LanguageEn ? "IQChat : Custom chat prefix" : "IQChat : Кастомный префикс в чате")]
                    public String CustomPrefix;
                    [JsonProperty(LanguageEn ? "IQChat : Custom chat avatar (If required)" : "IQChat : Кастомный аватар в чате(Если требуется)")]
                    public String CustomAvatar;
                    [JsonProperty(LanguageEn ? "IQChat : Use UI Notifications" : "IQChat : Использовать UI уведомления")]
                    public Boolean UIAlertUse;
                }
            }
            internal class CasesPreset {
                [JsonProperty(LanguageEn ? "Link to case picture (350x350)" : "Ссылка на картинку кейса (350x350)")]
                public String PNGCase;
                [JsonProperty(LanguageEn ? "Setting up case names (if you don't need them, leave the fields blank)" : "Настройка названий кейсов (если они вам не нужны - оставьте поля пустыми)")]
                public NameCases caseName = new NameCases();
                internal class NameCases {
                    [JsonProperty(LanguageEn ? "Case name in Russia" : "Название кейса на русском")]
                    public String NameRussia;
                    [JsonProperty(LanguageEn ? "Case name in English" : "Название кейса на английской")]
                    public String NameEnglish;
                    public String GetCaseName(BasePlayer player) {
                        String NameResult = String.Empty;
                        if (_.lang.GetLanguage(player.UserIDString).Equals("ru") && !String.IsNullOrWhiteSpace(NameRussia)) NameResult = NameRussia;
                        else if (!String.IsNullOrWhiteSpace(NameEnglish)) NameResult = NameEnglish;
                        return NameResult;
                    }
                }
                [JsonProperty(LanguageEn ? "Setting up the sale and purchase of cases (IQEconomic/Economics)" : "Настройка продажи и покупки кейсов (IQEconomic/Economics)")]
                public EconomicSetting EconomicSettings = new EconomicSetting();
                [JsonProperty(LanguageEn ? "Setting Restrictions" : "Настройка ограничений")]
                public RestrictionsPreset RestrictionsSettings = new RestrictionsPreset();
                [JsonProperty(LanguageEn ? "Setting rewards from a case" : "Настройка наград из кейса")]
                public List<RewardPreset> RewardPresets = new List<RewardPreset>();
                public RewardPreset GetRandomReward() {
                    Int32 RandomPlayerRare = Oxide.Core.Random.Range(0, 100);
                    RewardPreset RandomReward = null;
                    foreach (RewardPreset rewardPreset in RewardPresets) {
                        RewardPreset RewardTry = RewardPresets.GetRandom();
                        if (RandomPlayerRare >= RewardTry.Rare) continue;
                        RandomReward = RewardTry;
                        break;
                    }
                    return RandomReward ?? (RandomReward = GetRandomReward());
                }
                internal class RestrictionsPreset {
                    [JsonProperty(LanguageEn ? "Permission that give the opportunity to open a case (leave the field empty - it will be available to everyone)" : "Права дающие возможность открыть кейс (оставьте поле пустым - будет доступен для всех)")]
                    public String Permissions;
                    [JsonProperty(LanguageEn ? "IQRankSystem : Rank giving the opportunity to open a case (leave the field blank - it will be available to everyone)" : "IQRankSystem : Ранг дающий возможность открыть кейс (оставьте поле пустым - будет доступен для всех)")]
                    public String IQRankKey;
                }
                internal class RewardPreset {
                    [JsonProperty(LanguageEn ? "Select reward type: 0 - Item, 1 - Command" : "Выберите тип награды : 0 - Предмет, 1 - Команда")]
                    public TypeReward Type;
                    [JsonProperty(LanguageEn ? "Chance of dropping this reward" : "Шанс выпадения данной награды")]
                    public Int32 Rare;
                    [JsonProperty(LanguageEn ? "The displayed chance of getting this reward" : "Отображаемый шанс выпадения данной награды")]
                    public Int32 VisualRare;
                    [JsonProperty(LanguageEn ? "PNG for reward (85x85) (if not required - leave blank) (not required for regular items)" : "PNG для награды (85x85) (если не требуется - оставляйте пустым) (не требуется для обычных предметов)")]
                    public String PNGReward;
                    [JsonProperty(LanguageEn ? "Item setting (if item type is selected)" : "Настройка предмета (если выбран тип Предмет)")]
                    public ItemPreset ItemSetting = new ItemPreset();
                    [JsonProperty(LanguageEn ? "Command setting (if Command type is selected)" : "Настройка команды (если выбран тип Команда)")]
                    public CommandPreset CommandSetting = new CommandPreset();
#region CommandPreset
                    internal class CommandPreset {
                        [JsonProperty(LanguageEn ? "Item name in UI (if left blank, values from lang will be used)" : "Название предмета в UI (если оставить пустым будут браться значения из lang)")]
                        public String DisplayName;
                        [JsonProperty(LanguageEn ? "Console command (%STEAMID% - will be replaced by the player's Steam64ID)" : "Консольная команда (%STEAMID% - заменится на Steam64ID игрока)")]
                        public String Command;
                        [JsonProperty(LanguageEn ? "Seconds. Time for which the reward will be issued - leave 0 if this award is not issued for a while and fill in the field below (only affects the visual display)" : "Секунды. Время на какое будет выдана награда - оставьте 0 если данная награда не выдается на время и заполните поле ниже(влияет только на визуальное отображение)")]
                        public Int32 SecondCommand;
                        [JsonProperty(LanguageEn ? "Amount. If it is a custom item or a reward that is issued in N quantity (affects visual display only)" : "Количество. Если это кастомный предмет или награда, которая выдается в N количестве (влияет только на визуальное отображение)")]
                        public Int32 ItemAmount;
                        public String GetAmountLabel(BasePlayer player) => SecondCommand == 0 ? $"x{ItemAmount}" : _.FormatTime(TimeSpan.FromSeconds(SecondCommand), player.UserIDString);
                    }
#endregion
#region ItemPreset
                    internal class ItemPreset {
                        [JsonProperty(LanguageEn ? "Item name in UI (if left blank, values from lang will be used)" : "Название предмета в UI (если оставить пустым будут браться значения из lang)")]
                        public String DisplayName;
                        [JsonProperty(LanguageEn ? "Is this a blueprint? true - yes/false - no" : "Это чертеж? true - да/false - нет")]
                        public Boolean IsBlueprint;
                        [JsonProperty(LanguageEn ? "Shortname item" : "Shortname предмета")]
                        public String Shortname;
                        [JsonProperty(LanguageEn ? "SkinID item" : "SkinID предмета")]
                        public UInt64 SkinID;
                        [JsonProperty(LanguageEn ? "Quantity setting (if you need a static value - set both fields to the same value)" : "Настройка количества (если вам нужно статичное значение - установите в обоих полях одинаковое значение)")]
                        public AmountPreset Amounts = new AmountPreset();
                        internal class AmountPreset {
                            [JsonProperty(LanguageEn ? "Min amount" : "Минимальное количество")]
                            public Int32 MinAmount;
                            [JsonProperty(LanguageEn ? "Max amount" : "Максимальное количество")]
                            public Int32 MaxAmount;
                            [JsonIgnore]
                            public String GetAmountLabel => MinAmount == MaxAmount ? $"x{MinAmount}" : $"x{MinAmount}-{MaxAmount}";
                            [JsonIgnore]
                            public Int32 GetAmount => MinAmount == MaxAmount ? MinAmount : Oxide.Core.Random.Range(MinAmount, MaxAmount);
                        }
                    }
#endregion
                }
                internal class EconomicSetting {
                    [JsonProperty(LanguageEn ? "Case purchase price (If set to 0 - the case cannot be bought)" : "Цена покупки кейса (Если установить 0 - кейс нельзя будет купить)")]
                    public Int32 PriceBuyCase;
                    [JsonProperty(LanguageEn ? "Case sale price (If set to 0 - the case cannot be sold)" : "Цена продажи кейса (Если установить 0 - кейс нельзя будет продать)")]
                    public Int32 PriceSellCase;
                    [JsonIgnore]
                    public Boolean IsSell => PriceSellCase > 0;
                    [JsonIgnore]
                    public Boolean IsBuy => PriceBuyCase > 0;
                }
            }
            internal class Interface {
                [JsonProperty(LanguageEn ? "Use sound effects in conjunction with the interface" : "Использовать совместно с интерфейсом звуковые эффекты")]
                public Boolean UseEffects;
                [JsonProperty(LanguageEn ? "PNG: Toggle switch turned left (35х20)" : "PNG: Тумблер включенный влево (35х20)")]
                public String TumblerLeft;
                [JsonProperty(LanguageEn ? "PNG: Toggle switch turned right (35х20)" : "PNG: Тумблер включенный вправо (35х20)")]
                public String TumblerRight;
                [JsonProperty(LanguageEn ? "PNG: Back panel of information about the number of cases (277x46)" : "PNG: Задняя панель информации о количестве кейсов (277x46)")]
                public String PanelCasesInfoAmount;
                [JsonProperty(LanguageEn ? "PNG: Back panel of inventory button (178x46)" : "PNG: Задняя панель кнопки инвентаря (178x46)")]
                public String PanelCasesInventoryPanel;
                [JsonProperty(LanguageEn ? "PNG: Back panel of balance information (122x46)" : "PNG: Задняя панель информации о балансе (122x46)")]
                public String PanelCasesBalancePanel;
                [JsonProperty(LanguageEn ? "PNG: Glow effect for cases (909x377)" : "PNG: Эффект свечения для кейсов (909x377)")]
                public String EffectCases;
                [JsonProperty(LanguageEn ? "PNG: End cap (if there is no item in the case) (143x155)" : "PNG: Заглушка (если нет предмета в кейсе) (143x155)")]
                public String NoRareBackground;
                [JsonProperty(LanguageEn ? "PNG: Back page (60x60)" : "PNG: Страница назад (60x60)")]
                public String BackPage;
                [JsonProperty(LanguageEn ? "PNG: Next page (60x60)" : "PNG: Страница вперед (60x60)")]
                public String NextPage;
                [JsonProperty(LanguageEn ? "PNG: Button 'Open Case ' (350x46)" : "PNG: Кнопка 'Открыть Кейс' (350x46)")]
                public String OpenCaseButton;
                [JsonProperty(LanguageEn ? "PNG: 'Buy' button (172x46)" : "PNG: Кнопка 'Купить' (172x46)")]
                public String BuyCaseButton;
                [JsonProperty(LanguageEn ? "PNG: 'Sell' button (172x46)" : "PNG: Кнопка 'Продать (172x46)")]
                public String SellCaseButton;
                [JsonProperty(LanguageEn ? "PNG: Button Lock Picture (172x46)" : "PNG: Картинка для блокировки кнопок (172x46)")]
                public String BlockPanelButton;
                [JsonProperty(LanguageEn ? "PNG: The picture next to the displayed chance (13x13)" : "PNG: Картинка возле отображаемого шанса (13x13)")]
                public String RareMiniIcon;
                [JsonProperty(LanguageEn ? "PNG: Images that will be displayed at the reward depending on the DISPLAYED CHANCE of falling out [Chance(0-100)] - PNG (143x155) (The order of filling: From greater to lesser chance)" : "PNG: Картинки которые будут отображаться у награды зависимо от ОТОБРАЖАЕМОГО ШАНСА выпадения [Шанс(0-100)] - PNG (143x155) (Порядок заполнения : От большего к меньшему шансу)")]
                public Dictionary<Int32, String> RareBackground = new Dictionary<Int32, String>();
            }
            public static Configuration GetNewConfiguration() {
                return new Configuration {
                    UseLogs = false, InterfaceSettings = new Interface() {
                        UseEffects = true, TumblerLeft = "https://i.postimg.cc/TPV6nzWw/6moqO9u.png", TumblerRight = "https://i.postimg.cc/j5xGPLbg/hB3jlO3.png", PanelCasesInfoAmount = "https://i.postimg.cc/sgP6msKt/CVwUO8y.png", PanelCasesInventoryPanel = "https://i.postimg.cc/MZCJrZbT/MmB7paC.png", PanelCasesBalancePanel = "https://i.postimg.cc/BvS0ch5B/61im43h.png", EffectCases = "https://i.postimg.cc/tJWWbdS7/ZURvF4x.png", NoRareBackground = "https://i.postimg.cc/J0VHpDr8/uHTdwjY.png", BackPage = "https://i.postimg.cc/9FBwBQv3/5iHnDXC.png", NextPage = "https://i.postimg.cc/sx4xKTHP/LR2j88f.png", OpenCaseButton = "https://i.postimg.cc/jdqStQk9/zvtUYCS.png", BuyCaseButton = "https://i.postimg.cc/dVkvVWRW/hV4Xksf.png", SellCaseButton = "https://i.postimg.cc/k4cPpL95/OFjBLhn.png", BlockPanelButton = "https://i.postimg.cc/QMZLxjdt/8KOy2pU.png", RareMiniIcon = "https://i.postimg.cc/BZYdPTnR/wBWiYSE.png", RareBackground = new Dictionary<Int32, String>() {
                            [50]
                            = "https://i.postimg.cc/ZYMM5JfS/CR545Ie.png", [25] = "https://i.postimg.cc/SNYtXH5z/VIM8jSa.png", [10] = "https://i.postimg.cc/J0fxc4gH/fz3Foqr.png", [0] = "https://i.postimg.cc/J0fxc4gH/fz3Foqr.png"
                        }
                    }
                    , ReferencePluginsPreset = new ReferencePlugins {
                        IQChatSettings = new ReferencePlugins.IQChatPreset {
                            CustomPrefix = "<color=#F6C0DC>[IQCases]</color>\n", CustomAvatar = "0", UIAlertUse = false
                        }
                    }
                    , DefaultCasePlayers = new List<DefaultCasePlayer>() {
                        new DefaultCasePlayer() {
                            CaseKey = "free_case", Permissions = "", Count = 3,
                        }
                        , new DefaultCasePlayer() {
                            CaseKey = "raiders_case", Permissions = "iqcases.raider", Count = 1,
                        }
                        ,
                    }
                    , DropCasesList = new Dictionary<String, List<DropCases>>() {
                        ["crate_elite"]
                        = new List<DropCases>() {
                            new DropCases {
                                Rare = 10, Count = 1, Permissions = "", CaseKey = "components_case"
                            }
                            , new DropCases {
                                Rare = 5, Count = 1, Permissions = "", CaseKey = "blueprints_case"
                            }
                            , new DropCases {
                                Rare = 5, Count = 1, Permissions = "iqcases.vip", CaseKey = "raiders_case"
                            }
                            ,
                        }
                        , ["loot-barrel-1"] = new List<DropCases>() {
                            new DropCases {
                                Rare = 10, Count = 1, Permissions = "", CaseKey = "components_case"
                            }
                            ,
                        }
                    }
                    , CasesPresets = new Dictionary<String, CasesPreset>() {
#region FreeCase
                        ["free_case"]
                        = new CasesPreset {
                            caseName = new CasesPreset.NameCases() {
                                NameRussia = "", NameEnglish = ""
                            }
                            , PNGCase = "https://i.postimg.cc/Dzv9bB1k/fz3-Foffffffqr.png", EconomicSettings = new CasesPreset.EconomicSetting {
                                PriceBuyCase = 0, PriceSellCase = 0
                            }
                            , RestrictionsSettings = new CasesPreset.RestrictionsPreset {
                                Permissions = "", IQRankKey = ""
                            }
                            , RewardPresets = new List<CasesPreset.RewardPreset> {
                                new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 79, VisualRare = 70, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "wood", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 3000, MaxAmount = 5000,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 60, VisualRare = 60, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "stones", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1000, MaxAmount = 3000,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 30, VisualRare = 30, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "metal.fragments", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 500, MaxAmount = 2000,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 15, VisualRare = 30, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "icepick.salvaged", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 50, VisualRare = 30, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "grenade.f1", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 3,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 30, VisualRare = 35, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "flamethrower", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 60, VisualRare = 45, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "pistol.revolver", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 40, VisualRare = 45, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "pistol.python", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 4, VisualRare = 8, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "rifle.ak", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 3, VisualRare = 6, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "rifle.lr300", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 1, VisualRare = 3, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "supply.signal", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 10, VisualRare = 20, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "scrap", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 50, MaxAmount = 200,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 5, VisualRare = 20, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "door.hinged.toptier", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Command, Rare = 10, VisualRare = 15, PNGReward = "https://i.postimg.cc/xjJWHkNC/hGXoUms.png", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "command your plugin %STEAMID%", SecondCommand = 0, ItemAmount = 1
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Command, Rare = 10, VisualRare = 15, PNGReward = "https://i.postimg.cc/kg9Zkf16/zzsL6qZ.png", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "command your plugin %STEAMID%", SecondCommand = 0, ItemAmount = 1
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Command, Rare = 5, VisualRare = 10, PNGReward = "https://i.postimg.cc/nztQk9cJ/X0VAteL.png", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 1,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "addgroup %STEAMID% vip 3d", SecondCommand = 259200, ItemAmount = 0
                                    }
                                }
                                ,
                            }
                            ,
                        }
                        ,
#endregion
#region Components Case
                        ["components_case"]
                        = new CasesPreset {
                            caseName = new CasesPreset.NameCases() {
                                NameRussia = "", NameEnglish = ""
                            }
                            , PNGCase = "https://i.postimg.cc/s25MvfP0/j7pA2qD.png", EconomicSettings = new CasesPreset.EconomicSetting {
                                PriceBuyCase = 20, PriceSellCase = 10
                            }
                            , RestrictionsSettings = new CasesPreset.RestrictionsPreset {
                                Permissions = "", IQRankKey = ""
                            }
                            , RewardPresets = new List<CasesPreset.RewardPreset> {
                                new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 10, VisualRare = 15, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "riflebody", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 3,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 15, VisualRare = 20, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "smgbody", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 5,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 15, VisualRare = 20, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "semibody", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 3,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 20, VisualRare = 30, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "metalpipe", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 3, MaxAmount = 10,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 15, VisualRare = 25, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "techparts", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 1, MaxAmount = 3,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 40, VisualRare = 50, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "roadsigns", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 5, MaxAmount = 30,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 25, VisualRare = 40, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "metalspring", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 3, MaxAmount = 15,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 40, VisualRare = 45, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "sewingkit", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPreset.AmountPreset {
                                            MinAmount = 10, MaxAmount = 25,
                                        }
                                    }
                                    , CommandSetting = new CasesPreset.RewardPreset.CommandPreset {
                                        DisplayName = "", Command = "", SecondCommand = 0, ItemAmount = 0
                                    }
                                }
                                , new CasesPreset.RewardPreset {
                                    Type = TypeReward.Item, Rare = 50, VisualRare = 75, PNGReward = "", ItemSetting = new CasesPreset.RewardPreset.ItemPreset {
                                        DisplayName = "", IsBlueprint = false, Shortname = "sheetmetal", SkinID = 0, Amounts = new CasesPreset.RewardPreset.ItemPr
// ... [Code preview truncated due to length. Full source in attached file] ...

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