C#:
using System;
using System.Collections.Generic;
using ConVar;
using Newtonsoft.Json;
using Oxide.Core;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using UnityEngine;
namespace Oxide.Plugins {
[Info("IQPlagueSkill", "Mercury", "0.0.91")]
[Description("Скилл система новых веков")]
class IQPlagueSkill : RustPlugin {
/// <summary>
/// Обновление 0.0.7
/// - Изменил значение возможное устанавливать в навыке Шахетр (ранее х1, теперь можете устанавливать х1.1 и т.д)
/// - Добавлен интерфейс для нейтральных навыков
/// - Добавлена новая ветка "Нейтральные" навыки, которые работают с другими плагинами
/// - Добавлен новый дизайн для нейтральных навыков
/// - Добавлены отметки "А" и "N" обозначающие "Активный" и "Нейтральный" навык
/// - Добавлена информация о метках "N" и "A" в левом нижнем углу на главной панели
/// - Добавлено два нейтральных навыка с обвязкой плагина IQCraftSystem
/// - Навык на дополнительные возможности в IQCraftSystem
/// - Исправил API - API_HEAD_REWARD_SKILL
/// - Исправил ошибку в хуке - OnHealingItemUse
/// - Добавил поддержку IQKits
/// - Добавлен нейтральный навык для IQKits на ускорение перезарядки набора
/// - Добавлен нейтральный навык для IQKits на увеличение шанса выпадения предмета из набора
/// - Добавлено API для проверки на нейтральный скилл из IQKits на уменьшение КД => bool API_IS_COOLDOWN_SKILL_KITS(BasePlayer player)
/// - Добавлено API для проверки на нейтральный скилл из IQKits на увеличение шанса выпадения предмета => bool API_IS_RARE_SKILL_KITS(BasePlayer player)
/// - Изменена структура конфигурационного файла(пересоздайте файл)
/// Обновление 0.0.8
/// - Поправил проверку в навыке "Единство с землей"
/// Обновление 0.0.9
/// - Поправил API для IQHeadReward
/// </summary>
#region Vars
public static string PermissionsPatogenArmor = "iqplagueskill.patogenarmory";
public enum TypeSkill {
Active, Neutral
}
#endregion
#region Reference
[PluginReference]
Plugin ImageLibrary, IQChat, Friends, Clans, Battles, Duel, IQEconomic, IQHeadReward, XDNotifications, IQCraftSystem, IQKits;
private void AddNotify(BasePlayer player, string title, string description, string command = "", string cmdyes = "", string cmdno = "") {
if (!XDNotifications) return;
var Setting = config.ReferenceSettings.XDNotificationsSettings;
Interface.Oxide.CallHook("AddNotify", player, title, description, Setting.Color, Setting.AlertDelete, Setting.SoundEffect, command, cmdyes, cmdno);
}
#region Image Library
public string GetImage(string shortname, ulong skin = 0) => (string)ImageLibrary?.Call("GetImage", shortname, skin);
public bool AddImage(string url, string shortname, ulong skin = 0) => (bool)ImageLibrary?.Call("AddImage", url, shortname, skin);
public void SendImage(BasePlayer player, string imageName, ulong imageId = 0) => ImageLibrary?.Call("SendImage", player, imageName, imageId);
public bool HasImage(string imageName) => (bool)ImageLibrary?.Call("HasImage", imageName);
void LoadedImage() {
var Interface = config.InterfaceSettings.IconsPNG;
#region Interface Panel
if (!HasImage($"BACKGROUND_PLAGUES_{Interface.BackgroundPNG}")) AddImage(Interface.BackgroundPNG, $"BACKGROUND_PLAGUES_{Interface.BackgroundPNG}");
if (!HasImage($"BACKGROUND_PLAGUE_TAKE_PANEL_{Interface.BackgroundTakePanel}")) AddImage(Interface.BackgroundTakePanel, $"BACKGROUND_PLAGUE_TAKE_PANEL_{Interface.BackgroundTakePanel}");
if (!HasImage($"BACKGROUND_PLAGUE_TAKE_BUTTON_{Interface.ButtonTakeSkill}")) AddImage(Interface.ButtonTakeSkill, $"BACKGROUND_PLAGUE_TAKE_BUTTON_{Interface.ButtonTakeSkill}");
if (!HasImage($"BACKGROUND_PLAGUE_SKILL_BLOCK_{Interface.BlockSkill}")) AddImage(Interface.BlockSkill, $"BACKGROUND_PLAGUE_SKILL_BLOCK_{Interface.BlockSkill}");
if (!HasImage($"BACKGROUND_PLAGUE_SKILL_AVAILABLE_{Interface.AvailableSkill}")) AddImage(Interface.AvailableSkill, $"BACKGROUND_PLAGUE_SKILL_AVAILABLE_{Interface.AvailableSkill}");
if (!HasImage($"BACKGROUND_PLAGUE_SKILL_RECEIVED_{Interface.ReceivedSkill}")) AddImage(Interface.ReceivedSkill, $"BACKGROUND_PLAGUE_SKILL_RECEIVED_{Interface.ReceivedSkill}");
if (!HasImage($"BACKGROUND_PLAGUE_NEUTRAL_SKILL_BLOCK_{Interface.NeutralBlockSkill}")) AddImage(Interface.NeutralBlockSkill, $"BACKGROUND_PLAGUE_NEUTRAL_SKILL_BLOCK_{Interface.NeutralBlockSkill}");
if (!HasImage($"BACKGROUND_PLAGUE_NEUTRAL_SKILL_AVAILABLE_{Interface.NeutralAvailableSkill}")) AddImage(Interface.NeutralAvailableSkill, $"BACKGROUND_PLAGUE_NEUTRAL_SKILL_AVAILABLE_{Interface.NeutralAvailableSkill}");
if (!HasImage($"BACKGROUND_PLAGUE_NEUTRAL_SKILL_RECEIVED_{Interface.NeutralReceivedSkill}")) AddImage(Interface.NeutralReceivedSkill, $"BACKGROUND_PLAGUE_NEUTRAL_SKILL_RECEIVED_{Interface.NeutralReceivedSkill}");
try {
webrequest.Enqueue($"http://rust.skyplugins.ru/getimage/BACKGROUND_PLAGUE/12/IMAGELIBRARY_{Name}_{Author}_skykey1", null, (i, s) => {
if (i != 200) {
}
if (s.Contains("success")) {
AddImage(i.ToString(), $"{i.ToString()}_BACKGROUND_PLAGUE", ulong.Parse($"skykey1"));
}
if (s.Contains("fail")) {
return;
}
}
, this);
}
catch (Exception ex) {
}
#endregion
#region Skills
var Skill = config.SkillSettings;
if (String.IsNullOrWhiteSpace(Skill.AnabioticsSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_ANABIOTICS_{Skill.AnabioticsSettings.GeneralSettings.PNG}")) AddImage(Skill.AnabioticsSettings.GeneralSettings.PNG, $"SKILL_ANABIOTICS_{Skill.AnabioticsSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.AnimalFriendsSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_ANIMALFRIENDS_{Skill.AnimalFriendsSettings.GeneralSettings.PNG}")) AddImage(Skill.AnimalFriendsSettings.GeneralSettings.PNG, $"SKILL_ANIMALFRIENDS_{Skill.AnimalFriendsSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.CrafterSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_CRAFTER_{Skill.CrafterSettings.GeneralSettings.PNG}")) AddImage(Skill.CrafterSettings.GeneralSettings.PNG, $"SKILL_CRAFTER_{Skill.CrafterSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.GatherFriendsSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_GATHERFRIENDS_{Skill.GatherFriendsSettings.GeneralSettings.PNG}")) AddImage(Skill.GatherFriendsSettings.GeneralSettings.PNG, $"SKILL_GATHERFRIENDS_{Skill.GatherFriendsSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.GenesisGensSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_GENESISGENS_{Skill.GenesisGensSettings.GeneralSettings.PNG}")) AddImage(Skill.GenesisGensSettings.GeneralSettings.PNG, $"SKILL_GENESISGENS_{Skill.GenesisGensSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.MetabolismSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_METABOLISM_{Skill.MetabolismSettings.GeneralSettings.PNG}")) AddImage(Skill.MetabolismSettings.GeneralSettings.PNG, $"SKILL_METABOLISM_{Skill.MetabolismSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.MilitarySettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_MILITARY_{Skill.MilitarySettings.GeneralSettings.PNG}")) AddImage(Skill.MilitarySettings.GeneralSettings.PNG, $"SKILL_MILITARY_{Skill.MilitarySettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.MinerSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_MINER_{Skill.MinerSettings.GeneralSettings.PNG}")) AddImage(Skill.MinerSettings.GeneralSettings.PNG, $"SKILL_MINER_{Skill.MinerSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.PatogenAmrorySettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_PATOGENARMORY_{Skill.PatogenAmrorySettings.GeneralSettings.PNG}")) AddImage(Skill.PatogenAmrorySettings.GeneralSettings.PNG, $"SKILL_PATOGENARMORY_{Skill.PatogenAmrorySettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.PatogenKillSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_PATOGENKILL_{Skill.PatogenKillSettings.GeneralSettings.PNG}")) AddImage(Skill.PatogenKillSettings.GeneralSettings.PNG, $"SKILL_PATOGENKILL_{Skill.PatogenKillSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.RegenerationSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_REGENERATION_{Skill.RegenerationSettings.GeneralSettings.PNG}")) AddImage(Skill.RegenerationSettings.GeneralSettings.PNG, $"SKILL_REGENERATION_{Skill.RegenerationSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.ThickSkinSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_THICKSSKIN_{Skill.ThickSkinSettings.GeneralSettings.PNG}")) AddImage(Skill.ThickSkinSettings.GeneralSettings.PNG, $"SKILL_THICKSSKIN_{Skill.ThickSkinSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.WoundedShakeSettings.GeneralSettings.Sprite)) if (!HasImage($"SKILL_WOUNDED_{Skill.WoundedShakeSettings.GeneralSettings.PNG}")) AddImage(Skill.WoundedShakeSettings.GeneralSettings.PNG, $"SKILL_WOUNDED_{Skill.WoundedShakeSettings.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.NeutralSkills.SkillIQHeadRewards.GeneralSettings.Sprite)) if (!HasImage($"SKILL_IQHEAD_REWARD_{Skill.NeutralSkills.SkillIQHeadRewards.GeneralSettings.PNG}")) AddImage(Skill.NeutralSkills.SkillIQHeadRewards.GeneralSettings.PNG, $"SKILL_IQHEAD_REWARD_{Skill.NeutralSkills.SkillIQHeadRewards.GeneralSettings.PNG}");
if (String.IsNullOrWhiteSpace(Skill.NeutralSkills.IQCraftSystemAdvancedCrafts.GeneralSettings.Sprite)) if (!HasImage($"SKILL_IQCRAFTSYSTEM_{Skill.NeutralSkills.IQCraftSystemAdvancedCrafts.GeneralSettings.PNG}")) AddImage(Skill.NeutralSkills.IQCraftSystemAdvancedCrafts.GeneralSettings.PNG, $"SKILL_IQCRAFTSYSTEM_{Skill.NeutralSkills.IQCraftSystemAdvancedCrafts.GeneralSettings.PNG}");
#endregion
}
void CahedImages(BasePlayer player) {
var Interface = config.InterfaceSettings.IconsPNG;
var Skill = config.SkillSettings;
#region Interface Panel
SendImage(player, $"BACKGROUND_PLAGUES_{Interface.BackgroundPNG}");
SendImage(player, $"BACKGROUND_PLAGUE_TAKE_PANEL_{Interface.BackgroundTakePanel}");
SendImage(player, $"BACKGROUND_PLAGUE_TAKE_BUTTON_{Interface.ButtonTakeSkill}");
SendImage(player, $"BACKGROUND_PLAGUE_SKILL_BLOCK_{Interface.BlockSkill}");
SendImage(player, $"BACKGROUND_PLAGUE_SKILL_AVAILABLE_{Interface.AvailableSkill}");
SendImage(player, $"BACKGROUND_PLAGUE_SKILL_RECEIVED_{Interface.ReceivedSkill}");
SendImage(player, $"BACKGROUND_PLAGUE_NEUTRAL_SKILL_BLOCK_{Interface.NeutralBlockSkill}");
SendImage(player, $"BACKGROUND_PLAGUE_NEUTRAL_SKILL_AVAILABLE_{Interface.NeutralAvailableSkill}");
SendImage(player, $"BACKGROUND_PLAGUE_NEUTRAL_SKILL_RECEIVED_{Interface.NeutralReceivedSkill}");
#endregion
#region Skills
SendImage(player, $"SKILL_ANABIOTICS_{Skill.AnabioticsSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_ANIMALFRIENDS_{Skill.AnimalFriendsSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_CRAFTER_{Skill.CrafterSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_GATHERFRIENDS_{Skill.GatherFriendsSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_GENESISGENS_{Skill.GenesisGensSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_METABOLISM_{Skill.MetabolismSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_MILITARY_{Skill.MilitarySettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_MINER_{Skill.MinerSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_PATOGENARMORY_{Skill.PatogenAmrorySettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_PATOGENKILL_{Skill.PatogenKillSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_REGENERATION_{Skill.RegenerationSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_THICKSSKIN_{Skill.ThickSkinSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_WOUNDED_{Skill.WoundedShakeSettings.GeneralSettings.PNG}");
SendImage(player, $"SKILL_IQHEAD_REWARD_{Skill.NeutralSkills.SkillIQHeadRewards.GeneralSettings.PNG}");
SendImage(player, $"SKILL_IQCRAFTSYSTEM_{Skill.NeutralSkills.IQCraftSystemAdvancedCrafts.GeneralSettings.PNG}");
#endregion
}
#endregion
#region IQChat
public void SendChat(BasePlayer player, string Message, Chat.ChatChannel channel = Chat.ChatChannel.Global) {
var Chat = config.ReferenceSettings.IQChatSettings;
if (IQChat) IQChat?.Call("API_ALERT_PLAYER", player, Message, Chat.CustomPrefix, Chat.CustomAvatar);
else player.SendConsoleCommand("chat.add", channel, 0, Message);
}
#endregion
#region Block Farm
public bool IsFriends(ulong userID, ulong targetID) {
if (Friends) return (bool)Friends?.Call("HasFriend", userID, targetID);
else return false;
}
public bool IsClans(ulong userID, ulong targetID) {
if (Clans) return (bool)Clans?.Call("HasFriend", userID, targetID);
else return false;
}
public bool IsDuel(ulong userID) {
if (Battles) return (bool)Battles?.Call("IsPlayerOnBattle", userID);
else if (Duel) return (bool)Duel?.Call("IsPlayerOnActiveDuel", BasePlayer.FindByID(userID));
else return false;
}
#endregion
#region IQEconomic
int GetBalanceUser(ulong UserID) => (int)(IQEconomic?.Call("API_GET_BALANCE", UserID));
void RemoveBalanceUser(ulong UserID, int Balance) => IQEconomic?.Call("API_REMOVE_BALANCE", UserID, Balance);
#endregion
#endregion
#region Data
[JsonProperty("Информация пользователях и их ДНК")]
public Dictionary<ulong, int> DataInformation = new Dictionary<ulong, int>();
[JsonProperty("Информация о скиллах пользователей")]
public Dictionary<ulong, InformationSkills> DataSkills = new Dictionary<ulong, InformationSkills>();
public class InformationSkills {
[JsonProperty("Шахтер")]
public bool Miner;
[JsonProperty("Регенерация")]
public bool Regeneration;
[JsonProperty("Военный")]
public bool Military;
[JsonProperty("Кожа")]
public bool ThickSkin;
[JsonProperty("Дух")]
public bool WoundedShake;
[JsonProperty("Метаболизм")]
public bool Metabolism;
[JsonProperty("Защита от патогена")]
public bool PatogenAmrory;
[JsonProperty("Генезиз ген")]
public bool GenesisGens;
[JsonProperty("Единство с животными")]
public bool AnimalFriends;
[JsonProperty("Единство с природой")]
public bool GatherFriends;
[JsonProperty("Анабиотики")]
public bool Anabiotics;
[JsonProperty("Крафтер")]
public bool Crafter;
[JsonProperty("IQHeadReward")]
public bool IQHeadReward;
[JsonProperty("IQCraftSystem : Продвинутый крафтер")]
public bool IQCraftSystemAdvanced;
[JsonProperty("IQKits : Уменьшенная перезарядка")]
public bool IQKitsCooldownPercent;
[JsonProperty("IQKits : Увеличенный шанс выпадения")]
public bool IQKitsRareup;
[JsonProperty("Имеется ли патоген")]
public bool PatogenAttack;
}
void ReadData() {
DataInformation = Oxide.Core.Interface.Oxide.DataFileSystem.ReadObject<Dictionary<ulong, int>>("IQPlagueSkill/InformationUser");
DataSkills = Oxide.Core.Interface.Oxide.DataFileSystem.ReadObject<Dictionary<ulong, InformationSkills>>("IQPlagueSkill/InformationSkills");
}
void WriteData() {
timer.Every(60f, () => {
Oxide.Core.Interface.Oxide.DataFileSystem.WriteObject("IQPlagueSkill/InformationUser", DataInformation);
Oxide.Core.Interface.Oxide.DataFileSystem.WriteObject("IQPlagueSkill/InformationSkills", DataSkills);
}
);
}
void RegisteredDataUser(BasePlayer player) {
if (!DataInformation.ContainsKey(player.userID)) DataInformation.Add(player.userID, 0);
if (!DataSkills.ContainsKey(player.userID)) DataSkills.Add(player.userID, new InformationSkills {
Anabiotics = false, AnimalFriends = false, Crafter = false, GatherFriends = false, GenesisGens = false, Metabolism = false, Military = false, Miner = false, PatogenAmrory = false, PatogenAttack = false, Regeneration = false, ThickSkin = false, WoundedShake = false, IQHeadReward = false, IQCraftSystemAdvanced = false, IQKitsCooldownPercent = false, IQKitsRareup = false,
}
);
}
#endregion
#region Configuration
private static Configuration config = new Configuration();
private class Configuration {
[JsonProperty("Настройка плагина")]
public GeneralSetting GeneralSettings = new GeneralSetting();
[JsonProperty("Настройка всех скиллов")]
public Skills SkillSettings = new Skills();
[JsonProperty("Настройка интерфейса")]
public InterfaceSetting InterfaceSettings = new InterfaceSetting();
[JsonProperty("Настройка совместимостей с другими плагинами")]
public ReferenceSetting ReferenceSettings = new ReferenceSetting();
[JsonProperty("Настройка получения ДНК")]
public FarmingDNK FarmingDNKS = new FarmingDNK();
#region Skills
internal class Skills {
[JsonProperty("Разрешить просмотр навыка без нужного кол-во ДНК")]
public bool ShowSkillNotDNK;
[JsonProperty("Настройка скилла шахтер(Увеличивает рейт добычи)")]
public Miner MinerSettings = new Miner();
[JsonProperty("Настройка скилла регенерации(Регенирация ХП после боя)")]
public Regeneration RegenerationSettings = new Regeneration();
[JsonProperty("Настройка скилла военный(Уменьшает изнашивания оружия)")]
public Military MilitarySettings = new Military();
[JsonProperty("Настройка скилла Твердая кожа(Защищает от холода в зимних биомах)")]
public ThickSkin ThickSkinSettings = new ThickSkin();
[JsonProperty("Настройка скилла Не поколебим(Дает шанс встать после падения)")]
public WoundedShake WoundedShakeSettings = new WoundedShake();
[JsonProperty("Настройка скилла Метаболизм(При возраждении дает N значения сытности,хп,жажды)")]
public Metabolism MetabolismSettings = new Metabolism();
[JsonProperty("Настройка скилла Защита от патогена(Одноразовая защита от грибка Патоген(При заражаении патогеном , вирус - со временем разрушает скиллы игрока))")]
public PatogenAmrory PatogenAmrorySettings = new PatogenAmrory();
[JsonProperty("Настройка скилла Убийство патогена(Одноразовое убийство грибка,если игрок заразился Патогеном)")]
public PatogenKill PatogenKillSettings = new PatogenKill();
[JsonProperty("Настройка скилла Генезиз ген(Сохраняет % ДНК в конце вайпа)")]
public GenesisGens GenesisGensSettings = new GenesisGens();
[JsonProperty("Настройка скилла Единство с природой(Добавляет возможность получать больше ДНК за добычу животных)")]
public AnimalFriends AnimalFriendsSettings = new AnimalFriends();
[JsonProperty("Настройка скилла Единство с землей(Добавляет возможность получать больше ДНК за полную добычу ресурса)")]
public GatherFriends GatherFriendsSettings = new GatherFriends();
[JsonProperty("Настройка скилла Анабиотики(Игроки будут получать больше лечения от препаратов)")]
public Anabiotics AnabioticsSettings = new Anabiotics();
[JsonProperty("Настройка скилла Крафтер(Скорость крафта увеличивается)")]
public Crafter CrafterSettings = new Crafter();
[JsonProperty("Настройка НЕЙТРАЛЬНЫХ навыков")]
public NeutralSkill NeutralSkills = new NeutralSkill();
#region Classes
#region NeutralClasses
internal class NeutralSkill {
[JsonProperty("Увеличивает уровень крафта до продвинутого открывая возможность крафтить предметы с условием продвинутого крафта")]
public IQCraftSystemAdvancedCraft IQCraftSystemAdvancedCrafts = new IQCraftSystemAdvancedCraft();
[JsonProperty("Увеличивает шанс выпадения предметов в наборе")]
public IQKitsRareSkill IQKitsRare = new IQKitsRareSkill();
[JsonProperty("Уменьшает перезарядку навыков")]
public IQKitsCooldownPercenct IQKitsCooldown = new IQKitsCooldownPercenct();
[JsonProperty("Настройка IQHeadReward (Описание и настройка в плагине IQHeadReward)")]
public IQHeadReward SkillIQHeadRewards = new IQHeadReward();
internal class IQHeadReward {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
}
internal class IQCraftSystemAdvancedCraft {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
}
internal class IQKitsRareSkill {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("На сколько % увеличивать шанс выпадения предметов?")]
public int RareUP;
}
internal class IQKitsCooldownPercenct {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("На сколько % уменьшать перезарядку набора?")]
public int PercentDrop;
}
}
#endregion
internal class Miner {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("На сколько умножать рейты(все сразу)")]
public float Rate;
[JsonProperty("Использовать кастомные множители(true - да/false - нет)")]
public bool UseLists;
[JsonProperty("Использовать кастомные множители([Shortname] = множитель)")]
public Dictionary<string, float> CustomRate = new Dictionary<string, float>();
}
internal class Regeneration {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("Сколько жизней регенерировать в промежуток времени")]
public int HealtRegeneration;
[JsonProperty("Раз в сколько секунд регенерировать игрока")]
public int RegenerationTimer;
}
internal class Military {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("На сколько процентов снижать изнашивания оружий(0-100%)")]
public int PercentNoBroken;
}
internal class ThickSkin {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
}
internal class WoundedShake {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("Шанс встать в момент когда игрока положат")]
public int Rare;
[JsonProperty("Через сколько секунд поднимать игрока при падаение,если шанс успешен")]
public int RareStartTime;
[JsonProperty("После успешного срабатывания - забирать скилл(true - да/false - нет)")]
public bool DropSkill;
}
internal class Metabolism {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("Сколько ХП будет при возрождениие")]
public int Health;
[JsonProperty("Сколько Сытности будет при возрождении")]
public int Calories;
[JsonProperty("Сколько Жажды будет при возрождении")]
public int Hydration;
[JsonProperty("Шанс проснуться с данными показателями")]
public int RareMetabolisme;
[JsonProperty("После успешного срабатывания - забирать скилл(true - да/false - нет)")]
public bool DropSkill;
}
internal class PatogenAmrory {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
}
internal class PatogenKill {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
}
internal class GenesisGens {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("Сколько % ДНК оставлять в конце вайпа(будет отсчитываться от затраченного количества на скиллы)0 - 100")]
public int PercentSave;
}
internal class AnimalFriends {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("Min : Сколько выдавать ДНК")]
public int MinDNKAnimal;
[JsonProperty("Max : Сколько выдавать ДНК")]
public int MaxDNKAnimal;
[JsonProperty("Использовать кастомный лист(true - да/false - нет)")]
public bool UseLists;
[JsonProperty("Кастомный лист ,на сколько увеличивать количество ДНК за убийство животного [Animal] = Настройка")]
public Dictionary<string, CustomSettings> AnimalsList = new Dictionary<string, CustomSettings>();
[JsonProperty("Шанс получения дополнительного ДНК")]
public int RareAll;
[JsonProperty("Животные с которых будет падать ДНК")]
public List<string> AnimalDetected = new List<string>();
internal class CustomSettings {
[JsonProperty("Шанс получения дополнительного ДНК")]
public int Rare;
[JsonProperty("Min : Сколько выдавать ДНК")]
public int MinDNKCustom;
[JsonProperty("Max : Сколько выдавать ДНК")]
public int MaxDNKCustom;
}
}
internal class GatherFriends {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("Кастомный лист ,на сколько увеличивать количество ДНК за полную добычу ресурса [Shortname] = Настройка")]
public Dictionary<string, CustomSettings> GatherList = new Dictionary<string, CustomSettings>();
internal class CustomSettings {
[JsonProperty("Шанс получения дополнительного ДНК")]
public int Rare;
[JsonProperty("Min : Сколько выдавать ДНК")]
public int MinDNKCustom;
[JsonProperty("Max : Сколько выдавать ДНК")]
public int MaxDNKCustom;
}
}
internal class Anabiotics {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("На сколько увеличивать количество ХП за использование медицины[Shortname] = Amount")]
public Dictionary<string, int> AnabioticsList = new Dictionary<string, int>();
}
internal class Crafter {
[JsonProperty("Включить умение?(true - включено/false - выключено)")]
public bool SkillTurn;
[JsonProperty("Общая настройка")]
public GeneralSettingsSkill GeneralSettings = new GeneralSettingsSkill();
[JsonProperty("В сколько раз увеличивать скорость крафта? (Пример : изначально 60 секунд, увеличение в 3 раза = 60/3 = 20)")]
public int CraftBoost;
}
internal class GeneralSettingsSkill {
[JsonProperty("Отображаемое имя")]
public string DisplayName;
[JsonProperty("Описание скилла")]
public string Description;
[JsonProperty("Sprite для иконки")]
public string Sprite;
[JsonProperty("PNG-ссылка для иконки(64х64).Если используете это,спрайт будет игнорироваться")]
public string PNG;
[JsonProperty("Цена за изучение")]
public int PriceDNK;
}
#endregion
}
#endregion
#region Interface
internal class InterfaceSetting {
[JsonProperty("Настройка элементов дизайна")]
public Icons IconsPNG = new Icons();
[JsonProperty("Настройка основных элементов")]
public General GeneralSettings = new General();
internal class Icons {
[JsonProperty("Ссылка PNG на задний фон")]
public string BackgroundPNG;
[JsonProperty("Ссылка ссылка на иконку заблокированного навыка PNG")]
public string BlockSkill;
[JsonProperty("Ссылка ссылка на иконку доступного навыка PNG")]
public string AvailableSkill;
[JsonProperty("Ссылка ссылка на иконку изученного навыка PNG")]
public string ReceivedSkill;
[JsonProperty("Ссылка на кнопку для получения данного скилла(развить)")]
public string ButtonTakeSkill;
[JsonProperty("Ссылка панель для изучения скилла")]
public string BackgroundTakePanel;
[JsonProperty("Ссылка ссылка на иконку НЕЙТРАЛЬНОГО заблокированного навыка PNG")]
public string NeutralBlockSkill;
[JsonProperty("Ссылка ссылка на иконку НЕЙТРАЛЬНОГО доступного навыка PNG")]
public string NeutralAvailableSkill;
[JsonProperty("Ссылка ссылка на иконку НЕЙТРАЛЬНОГО изученного навыка PNG")]
public string NeutralReceivedSkill;
}
internal class General {
[JsonProperty("Цвет текста")]
public string HexLabels;
[JsonProperty("Цвет текста навыков")]
public string HexLabelsSkill;
[JsonProperty("Цвет текста описания навыков")]
public string HexLabelTakePanel;
}
}
#endregion
#region Generals
internal class GeneralSetting {
[JsonProperty("Настройки автоматической очисти даты после вайпа")]
public WipeContoller WipeContollers = new WipeContoller();
[JsonProperty("Управление вирусом ПАТОГЕН")]
public VirusPatogen VirusPatogens = new VirusPatogen();
internal class WipeContoller {
[JsonProperty("Включить автоматическую очистку даты после вайпа сервера")]
public bool WipeDataUse;
[JsonProperty("Очищать скиллы игроков после вайпа")]
public bool WipeDataSkill;
}
internal class VirusPatogen {
[JsonProperty("Включить вирус-патоген(Данный вирус будет удалять у игрока 1 случайный навык через N количество времени,у них так же будут навыки на излечение и защиты от заражаения)")]
public bool UsePatogen;
[JsonProperty("Шанс заражения вирусом")]
public int RareInfected;
[JsonProperty("Раз в сколько времени начинать инфекцию игроков(Секунды)")]
public int TimerInfectedVirus;
[JsonProperty("Через сколько удалять 1 случайный навык игроку(секунды)")]
public int TimerRemoveSkill;
}
}
#endregion
#region Reference
internal class ReferenceSetting {
[JsonProperty("Настройка IQChat")]
public IQChat IQChatSettings = new IQChat();
[JsonProperty("Включить поддержку IQEconomic(ДНК заменится на валюту экономики)")]
public bool IQEconomicUse;
[JsonProperty("Включить поддержку IQHeadReward")]
public bool IQHeadRewardUse;
[JsonProperty("Включить поддержку IQCraftSystem")]
public bool IQCraftSystem;
[JsonProperty("Включить поддержку IQKits")]
public bool IQKits;
[JsonProperty("Настройка XDNotifications")]
public XDNotifications XDNotificationsSettings = new XDNotifications();
internal class XDNotifications {
[JsonProperty("Включить поддержку XDNotifications(Некоторые уведомления будут приходить в XDNotifications)")]
public bool UseXDNotifications;
[JsonProperty("Цвет заднего фона уведомления(HEX)")]
public string Color;
[JsonProperty("Через сколько удалиться уведомление")]
public int AlertDelete;
[JsonProperty("Звуковой эффект")]
public string SoundEffect;
[JsonProperty("Оглавление")]
public string Title;
}
internal class IQChat {
[JsonProperty("IQChat : Кастомный префикс в чате")]
public string CustomPrefix;
[JsonProperty("IQChat : Кастомный аватар в чате(Если требуется)")]
public string CustomAvatar;
}
}
#endregion
#region DNKFarming
internal class FarmingDNK {
[JsonProperty("Настройка получения ДНК за убийство игроков")]
public PlayerKill PlayerKills = new PlayerKill();
[JsonProperty("Настройка получения ДНК за убийство NPC")]
public NPCKill NPCKills = new NPCKill();
[JsonProperty("Настройка получения ДНК за убийство животных")]
public AnimalKill AnimalKills = new AnimalKill();
internal class PlayerKill {
[JsonProperty("Получение ДНК за убийство игроков")]
public bool DNKKillUser;
[JsonProperty("Параметры")]
public GeneralSettingsFarming GeneralSettingsFarmings = new GeneralSettingsFarming();
}
internal class NPCKill {
[JsonProperty("Получение валюты за убийство NPC")]
public bool DNKKillNPC;
[JsonProperty("Параметры")]
public GeneralSettingsFarming GeneralSettingsFarmings = new GeneralSettingsFarming();
}
internal class AnimalKill {
[JsonProperty("Получение валюты за убийство животных")]
public bool DNKKillAnimal;
[JsonProperty("Параметры")]
public GeneralSettingsFarming GeneralSettingsFarmings = new GeneralSettingsFarming();
}
internal class GeneralSettingsFarming {
[JsonProperty("Шанс получения ДНК")]
public int RareGiveDNK;
[JsonProperty("Минимальное количество ДНК")]
public int MinimumDNK;
[JsonProperty("Максимальное количество ДНК")]
public int MaximumDNK;
}
}
#endregion
public static Configuration GetNewConfiguration() {
return new Configuration {
#region Skills
SkillSettings = new Skills {
ShowSkillNotDNK = true, NeutralSkills = new Skills.NeutralSkill {
IQCraftSystemAdvancedCrafts = new Skills.NeutralSkill.IQCraftSystemAdvancedCraft {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Мастер на все руки", Description = "У вас открывается больше возможностей для крафта", PNG = "", PriceDNK = 50, Sprite = "assets/icons/lightbulb.png",
}
,
}
, SkillIQHeadRewards = new Skills.NeutralSkill.IQHeadReward {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Меня не найти", Description = "Вы получаете иммунитет к розыску,если на вас подадут в розыск, ваш навык защитит вас и сбросится", PNG = "", PriceDNK = 50, Sprite = "assets/content/ui/hypnotized.png",
}
,
}
, IQKitsRare = new Skills.NeutralSkill.IQKitsRareSkill {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Самый везучий", Description = "Увеличивает шанс выпадения предметов из некоторых наборов! Команда : /kit", PNG = "", PriceDNK = 50, Sprite = "assets/icons/resource.png",
}
, RareUP = 30,
}
, IQKitsCooldown = new Skills.NeutralSkill.IQKitsCooldownPercenct {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Ускоренная перезарядка", Description = "Уменьшает время перезарядки ваших наборово! Команда : /kit", PNG = "", PriceDNK = 50, Sprite = "assets/icons/loading.png",
}
, PercentDrop = 30,
}
}
, AnabioticsSettings = new Skills.Anabiotics {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Восприятие анабиотиков", Description = "Во время принятия медицины вы получаете еще больше лечения,чем обычно", PNG = "", PriceDNK = 10, Sprite = "assets/icons/pills.png",
}
, AnabioticsList = new Dictionary<string, int> {
["syringe.medical"]
= 10, ["largemedkit"] = 30,
}
,
}
, MinerSettings = new Skills.Miner {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Мастерство шахтера", Description = "Данный навык позволяет добывать еще больше ресурсов чем обычно", PNG = "", PriceDNK = 15, Sprite = "assets/icons/level_wood.png",
}
, UseLists = false, Rate = 3, CustomRate = new Dictionary<string, float> {
["wood"]
= 15, ["stones"] = 10,
}
,
}
, GatherFriendsSettings = new Skills.GatherFriends {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Единство с землей", Description = "Вы едины с землей и изучили ее генетический уровень, при полной добычи ресурса вы получите дополнительные очки ДНК", PNG = "", PriceDNK = 50, Sprite = "assets/icons/study.png",
}
, GatherList = new Dictionary<string, Skills.GatherFriends.CustomSettings> {
["wood"]
= new Skills.GatherFriends.CustomSettings {
Rare = 100, MinDNKCustom = 10, MaxDNKCustom = 30
}
}
}
, AnimalFriendsSettings = new Skills.AnimalFriends {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Единство с природой", Description = "Вы едины с природой и изучили ее генетическое строение животных, при убийстве животных вы будете получать дополнительные очки ДНК", PNG = "", PriceDNK = 50, Sprite = "assets/icons/bite.png",
}
, MinDNKAnimal = 1, MaxDNKAnimal = 5, RareAll = 30, UseLists = true, AnimalsList = new Dictionary<string, Skills.AnimalFriends.CustomSettings> {
["assets/rust.ai/agents/horse/horse.corpse.prefab"]
= new Skills.AnimalFriends.CustomSettings {
MinDNKCustom = 10, MaxDNKCustom = 20, Rare = 80,
}
}
, AnimalDetected = new List<string> {
"assets/rust.ai/agents/horse/horse.corpse.prefab", "assets/rust.ai/agents/boar/boar.corpse.prefab", "assets/rust.ai/agents/chicken/chicken.corpse.prefab", "assets/rust.ai/agents/stag/stag.corpse.prefab", "assets/rust.ai/agents/wolf/wolf.corpse.prefab", "assets/rust.ai/agents/bear/bear.corpse.prefab",
}
}
, CrafterSettings = new Skills.Crafter {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Мастерство рукоделия", Description = "Вы получаете большой навык создания предметов, вы нашли отличные генетические связки для ускоренного крафта", PNG = "", PriceDNK = 30, Sprite = "assets/icons/tools.png",
}
, CraftBoost = 3,
}
, MetabolismSettings = new Skills.Metabolism {
SkillTurn = true, GeneralSettings = new Skills.GeneralSettingsSkill {
DisplayName = "Бод
// ... [Code preview truncated due to length. Full source in attached file] ...