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

FREE SkillTree : 1.2.5 1.2.5

Нет прав для скачивания
C#:
using Facepunch;
using Newtonsoft.Json;
using Oxide.Core;
using Oxide.Core.Configuration;
using Oxide.Core.Libraries.Covalence;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using WebSocketSharp;
/* Ideas
 * - Create a buff for comfort that uses the same method as HealthRegen.* Vehiclular combatant - more damage to vehicles (maybe including bradley and heli?)
 * Raiding skill tree.* Add swipe card as an xp source.* Perk Idea - vehicle salvaging.Remove modules from vehicles.* Add heli as XP source.* 
 */
/* Changed 1.2.5
 * Added failsafe from extra pockets item quantity being <= 0.* Added swipe cards as an XP source.* Fixed crafting xp scaling issues with workbenches.* Added support for halloween event scarecrows.*/
namespace Oxide.Plugins {
    [Info("SkillTree", "imthenewguy", "1.2.5")]
    [Description("Skills on a tree!")]
    class SkillTree : RustPlugin {
#region Config
        private Configuration config;
        public class Configuration {
            [JsonProperty("General settings")]
            public GeneralSettings general_settings = new GeneralSettings();
            public class GeneralSettings {
                [JsonProperty("Points required to unlock Tier 2 nodes in the tech trees")]
                public int t2_points_required = 5;
                [JsonProperty("Points required to unlock Tier 3 nodes in the tech trees")]
                public int t3_points_required = 10;
                [JsonProperty("Points required to unlock the Ultimate node in tech trees")]
                public int ultimate_points_required = 25;
                [JsonProperty("Skill points per level")]
                public int points_per_level = 2;
                [JsonProperty("Maximum points a player can spend [default]")]
                public int max_skill_points = 200;
                [JsonProperty("Modified max skill points based on permissions [must be higher than default]")]
                public Dictionary<string, int> max_skill_points_override = new Dictionary<string, int>();
                [JsonProperty("Maximum level a player can get to")]
                public int max_player_level = 100;
                [JsonProperty("Allow players to respec their skill points")]
                public bool allow_respecs = true;
                [JsonProperty("Cost per point to respec [default]")]
                public double respec_cost = 30;
                [JsonProperty("Cost per point to respec based on permissions [must be lower than default]")]
                public Dictionary<string, double> respec_cost_override = new Dictionary<string, double>();
                [JsonProperty("Currency type to respec [scrap, economics, srp, custom]")]
                public string respec_currency = "scrap";
                [JsonProperty("If currency is set to custom, what are the details of the item")]
                public CustomCurrency respec_currency_custom = new CustomCurrency();
                [JsonProperty("List of rewards the player receives based on level")]
                public Dictionary<int, LevelReward> level_rewards = new Dictionary<int, LevelReward>();
                [JsonProperty("Require players to have specific tree permissions to open them")]
                public bool require_tree_perms = false;
                [JsonProperty("Drop bag on death")]
                public bool drop_bag_on_death = true;
                [JsonProperty("XP pump bar settings")]
                public PumpBar pump_bar_settings = new PumpBar();
                [JsonProperty("Cache images using skinid or url? [skinid, url]")]
                public string image_cache_source = "url";
                [JsonProperty("Redownload all images when the plugin reloads if using URL?")]
                public bool replace_on_reload = false;
            }
            [JsonProperty("Buff settings")]
            public BuffSettings buff_settings = new BuffSettings();
            public class BuffSettings {
                [JsonProperty("Minimum components for the component perk")]
                public int min_components = 1;
                [JsonProperty("Maximum components for the component perk")]
                public int max_components = 1;
                [JsonProperty("Minimum electrical components for the electrical component perk")]
                public int min_electrical_components = 1;
                [JsonProperty("Maximum electrical components for the electrical component perk")]
                public int max_electrical_components = 1;
                [JsonProperty("Minimum additional scrap to be added to crates and barrels")]
                public int min_extra_scrap = 1;
                [JsonProperty("Maximum additional scrap to be added to crates and barrels")]
                public int max_extra_scrap = 2;
                [JsonProperty("PVP Buff Critical damage modifier.Picks a random value between 0 and the declared value, and += the damage% onto the hit")]
                public float pvp_critical_modifier = 0.3f;
                [JsonProperty("Should the LootPickup buff only work with melee weapons?")]
                public bool lootPickupBuffMeleeOnly = false;
                [JsonProperty("Allow the LootPickup buff to work with crates?")]
                public bool loot_pickup_buff_crates = false;
                [JsonProperty("Should we have a maximum distance for the loot pickup buff [0 = unlimited]?")]
                public float loot_pickup_buff_max_distance = 0;
                [JsonProperty("List of animals for animal resist ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> animals = new List<string>();
                [JsonProperty("Details of a horse to change when a player mounts a horse with the relevant perk unlocked")]
                public HorseStats horse_buff_info = new HorseStats();
                [JsonProperty("Delay for HealthRegen perk after taking damage")]
                public float health_regen_combat_delay = 5f;
                [JsonProperty("Delay between attempts at tracking animals")]
                public float track_delay = 10f;
                [JsonProperty("List of skins that the rationer perk will not refund")]
                public List<ulong> no_refund_item_skins = new List<ulong>();
                [JsonProperty("Bag cooldown time")]
                public float bag_cooldown_time = 10f;
                [JsonProperty("Bag prefab")]
                public string bag_prefab = "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab";
                [JsonProperty("Primitive weapons for the primitive weapons ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> primitive_weapons = new List<string>();
            }
            [JsonProperty("Chat command settings")]
            public ChatCommands chat_commands = new ChatCommands();
            public class ChatCommands {
                [JsonProperty("Use mouse 3 to toggle the boat turbo (performance heavy on high pop servers).Set false to use a chat command instead")]
                public bool use_input_key_boat = false;
                [JsonProperty("Chat command for turbo")]
                public string turbo_cmd = "turbo";
                [JsonProperty("Chat commands to open the skill tree", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> chat_cmd = new List<string>() {
                    "st", "skilltree", "skills"
                }
                ;
                [JsonProperty("Chat/console commands to open the score board", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> score_chat_cmd = new List<string>() {
                    "score", "scoreboard"
                }
                ;
            }
            [JsonProperty("XP settings")]
            public XPSettings xp_settings = new XPSettings();
            public class XPSettings {
                [JsonProperty("Players lose xp when they are killed in pvp")]
                public bool pvp_death_penalty = false;
                [JsonProperty("Players lose xp when they are killed in pve")]
                public bool pve_death_penalty = true;
                [JsonProperty("Amount of xp that a player loses when they die [%]")]
                public double xpLoss = 20;
                [JsonProperty("Maximum amount of xp a player can lose when they die based on permissions [must be less than default]")]
                public Dictionary<string, double> xp_loss_override = new Dictionary<string, double>();
                [JsonProperty("Permissions to adjust xp gain modifiers (skilltree.<perm>) [1.0 is default modifier]")]
                public Dictionary<string, double> xp_perm_modifier = new Dictionary<string, double>();
                [JsonProperty("How long should the xp be displayed for")]
                public float xp_display_time = 1f;
                [JsonProperty("Colour of the xp text when unmodified")]
                public string xp_display_col_unmodified = "FFFFFF";
                [JsonProperty("Colour of the xp text when modified")]
                public string xp_display_col_modified = "00b6ff";
                [JsonProperty("Prevent XP loss when dying at an event hosted by EventManager")]
                public bool prevent_xp_loss = true;
                [JsonProperty("Enable xp drop hud for players by default")]
                public bool enable_xp_drop_by_default = true;
                [JsonProperty("Restrict XP gain to the tools listed in their respective tools list?")]
                public bool white_listed_tools_only = false;
                [JsonProperty("Require grown plants to be ripe to provide xp")]
                public bool ripe_required = true;
                [JsonProperty("Give xp for crafting ingredients? [Requires Cooking.cs]")]
                public bool cooking_award_xp_ingredients = false;
                [JsonProperty("List of meals that will not provide xp [Requires Cooking.cs]")]
                public List<string> cooking_black_list = new List<string>();
                [JsonProperty("Experience sources - Set xp value to 0 to disable for that type", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public XPSources xp_sources = new XPSources();
                [JsonProperty("Night time settings")]
                public NightTimeGains night_settings = new NightTimeGains();
                public class NightTimeGains {
                    [JsonProperty("Modifier for xp gained at night [1.0 = standard]")]
                    public float night_xp_gain_modifier = 1f;
                    [JsonProperty("Modifier for woodcutting yield at night [1.0 = standard]")]
                    public float night_woodcutting_yield_modifier = 1f;
                    [JsonProperty("Modifier for mining yield at night [1.0 = standard]")]
                    public float night_mining_yield_modifier = 1f;
                    [JsonProperty("Modifier for skinning yield at night [1.0 = standard]")]
                    public float night_skinning_yield_modifier = 1f;
                    [JsonProperty("Modifier for harvesting yield at night [1.0 = standard]")]
                    public float night_harvesting_yield_modifier = 1f;
                    [JsonProperty("Should the harvesting yield increase include player-grown plants?")]
                    public bool include_grown_harvesting = false;
                }
            }
            [JsonProperty("Wipe and plugin update settings")]
            public WipeUpdate wipe_update_settings = new WipeUpdate();
            public class WipeUpdate {
                [JsonProperty("Erase all data on wipe - wipes everything")]
                public bool erase_data_on_wipe = false;
                [JsonProperty("Erase ExtraPockets storage on wipe")]
                public bool erase_ExtraPockets_on_wipe = true;
                [JsonProperty("Refund skill points on server wipe")]
                public bool refund_sp_on_wipe = true;
                [JsonProperty("Give the player with the highest xp bonus skill points next wipe")]
                public bool bonus_skill_points = false;
                [JsonProperty("How many skill points should they receive for winning?")]
                public int bonus_skill_points_amount = 5;
                [JsonProperty("Automatically add new trees from the default config?")]
                public bool auto_update_trees = true;
                [JsonProperty("Automatically add new nodes from the default config?")]
                public bool auto_update_nodes = true;
                [JsonProperty("Starting skill points")]
                public int starting_skill_points = 0;
            }
            [JsonProperty("Rested XP Settings")]
            public RestXPSettings rested_xp_settings = new RestXPSettings();
            public class RestXPSettings {
                [JsonProperty("Give players who have been offline a bonus to xp gain when they log in next?")]
                public bool rested_xp_enabled = true;
                [JsonProperty("Rested xp pool to accumulate per hour offline")]
                public double rested_xp_per_hour = 1000;
                [JsonProperty("Bonus xp rate while rested (until the rested xp pool is depleted) [0.25 = 25% bonus]")]
                public double rested_xp_rate = 0.25;
                [JsonProperty("Maximum xp a player can have in their rested pool [0 = no limit]")]
                public double rested_xp_pool_max = 25000;
                [JsonProperty("Reset rested xp pools on wipe?")]
                public bool rested_xp_reset_on_wipe = false;
            }
            [JsonProperty("Tools and Black list/White list settings")]
            public ToolAndListSettings tools_black_white_list_settings = new ToolAndListSettings();
            public class ToolAndListSettings {
                [JsonProperty("Global black list - these items will not gain xp and benefits at all")]
                public List<string> black_listed_gather_items = new List<string>();
                [JsonProperty("Black listed parts for component and electrical luck abilities", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> comp_blacklist = new List<string>();
                [JsonProperty("Power tool modifiers (chainsaw and jackhammer).1 = full xp/buffs.0 = off.0.5 = half xp/buffs.")]
                public PowerTools power_tool_modifier = new PowerTools() {
                    skinning_perk_modifier = 0.0f, mining_perk_modifier = 0.0f, woodcutting_perk_modifier = 0.0f
                }
                ;
                [JsonProperty("Extra Pockets black list - disallows items that match")]
                public List<string> black_list = new List<string>();
                [JsonProperty("Extra Pockets white list - will only allow items that match")]
                public List<string> white_list = new List<string>();
                [JsonProperty("Extra pockets button anchors")]
                public ExtraPocketsButtonAnchors extra_pockets_button_anchor = new ExtraPocketsButtonAnchors();
                [JsonProperty("A black list of items that will not be refunded when using the thrifty tinkerer buff", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> craft_refund_blacklist = new List<string>() {
                    "gunpowder", "explosives", "sulfur"
                }
                ;
                [JsonProperty("A black list of items that will not be duplicated while using the thirfty duplicator buff", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> craft_duplicate_blacklist = new List<string>() {
                    "gunpowder", "explosives", "sulfur"
                }
                ;
                [JsonProperty("Woodcutting tools - Tools that meet whitelist requirements and work with the reduced durability ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> wc_tools = new List<string>();
                [JsonProperty("Mining tools - Tools that meet whitelist requirements and work with the reduced durability ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> mining_tools = new List<string>();
                [JsonProperty("Skinning tools - Tools that meet whitelist requirements and work with the reduced durability ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> skinning_tools = new List<string>();
            }
            [JsonProperty("Effect settings")]
            public EffectSettings effect_settings = new EffectSettings();
            public class EffectSettings {
                [JsonProperty("Instant repair effect")]
                public string repair_effect = "assets/bundled/prefabs/fx/build/repair_full_metal.prefab";
                [JsonProperty("Level up effect")]
                public string level_effect = "assets/prefabs/misc/halloween/lootbag/effects/gold_open.prefab";
                [JsonProperty("Node unlock effect")]
                public string skill_point_unlock_effect = "assets/prefabs/misc/halloween/lootbag/effects/loot_bag_upgrade.prefab";
                [JsonProperty("Node level effect")]
                public string skill_point_level_effect = "assets/prefabs/misc/easter/painted eggs/effects/eggpickup.prefab";
            }
            [JsonProperty("Better Chat settings")]
            public BetterChatSettings betterchat_settings = new BetterChatSettings();
            public class BetterChatSettings {
                [JsonProperty("Format for BetterChat title showing the playeres level.Set to null to disable.{0} is the colour value and {1} is the player level value")]
                public string better_title_format = "<color=#{0}>[Lv.{1}]</color>";
                [JsonProperty("Default colour for BetterChat xp titles")]
                public string better_title_default_col = "0cb072";
                [JsonProperty("Colour for BetterChat xp titles for players who are max level")]
                public string better_title_max_col = "32ff00";
            }
            [JsonProperty("Loot settings")]
            public LootTables loot_settings = new LootTables();
            public class LootTables {
                [JsonProperty("Mining luck loot table", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<LootItems> mining_loot_table = new List<LootItems>();
                [JsonProperty("Woodcutting luck loot table", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<LootItems> wc_loot_table = new List<LootItems>();
                [JsonProperty("Whitelist of loot crates to trigger the spawn chance for components, electronics and scrap.Set to null to not use the whitelist.", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public List<string> loot_crate_whitelist = new List<string>();
            }
            [JsonProperty("Ultimate settings")]
            public UltimateSettings ultimate_settings = new UltimateSettings();
            public class UltimateSettings {
                [JsonProperty("Background colour for the ultimate node")]
                public string ultimate_node_background_col = "1 0.8741453 0 1";
                [JsonProperty("Ultimate settings for woodcutting")]
                public WoodcuttingUltimate ultimate_woodcutting = new WoodcuttingUltimate();
                [JsonProperty("Ultimate settings for mining")]
                public MiningUltimate ultimate_mining = new MiningUltimate();
                [JsonProperty("Ultimate settings for vehicle")]
                public VehicleUltimate ultimate_vehicle = new VehicleUltimate();
                [JsonProperty("Ultimate settings for medical")]
                public MedicalUltimate ultimate_medical = new MedicalUltimate();
                [JsonProperty("Ultimate settings for harvesting")]
                public HarvesterUltimate ultimate_harvesting = new HarvesterUltimate();
                [JsonProperty("Ultimate settings for scavenger")]
                public Scav_Ultimate ultimate_scavenger = new Scav_Ultimate();
                [JsonProperty("Ultimate settings for combat")]
                public CombatUltimate ultimate_combat = new CombatUltimate();
                [JsonProperty("Ultimate settings for skinning")]
                public SkinningUltimate ultimate_skinning = new SkinningUltimate();
                [JsonProperty("Ultimate settings for build craft")]
                public BuildCraftUltimate ultimate_buildCraft = new BuildCraftUltimate();
            }
            [JsonProperty("Misc settings")]
            public MiscSettings misc_settings = new MiscSettings();
            public class MiscSettings {
                [JsonProperty("BotReSpawn profile and xp list", ObjectCreationHandling = ObjectCreationHandling.Replace)]
                public Dictionary<string, double> botrespawn_profiles = new Dictionary<string, double>();
                [JsonProperty("Human NPC's name that can be used to open the skill tree")]
                public string npc_name = "";
                [JsonProperty("Should we add a button to the pump bar to open SkillTree?")]
                public bool button_to_pump_bar = true;
            }
            [JsonProperty("Skill tree", ObjectCreationHandling = ObjectCreationHandling.Replace)]
            public Dictionary<string, Configuration.TreeInfo> trees = new Dictionary<string, Configuration.TreeInfo>();
            [JsonProperty("Leveling information.Y value must be set to 2 or 3")]
            public ExperienceInfo level = new ExperienceInfo();
            public class ExtraPocketsButtonAnchors {
                public string x_min = "185.4";
                public string y_min = "25.4";
                public string x_max = "227.4";
                public string y_max = "67.4";
            }
            public class HorseStats {
                public bool Increase_Horse_RunSpeed = true;
                public bool Increase_Horse_MaxSpeed = true;
                public bool Increase_Horse_TrotSpeed = false;
                public bool Increase_Horse_TurnSpeed = false;
                public bool Increase_Horse_WalkSpeed = false;
            }
            public class CustomCurrency {
                public string displayName = "";
                public string shortname = "";
                public ulong skin = 0;
            }
            public class TreeInfo {
                public Dictionary<string, NodeInfo> nodes = new Dictionary<string, NodeInfo>();
                public TreeInfo(Dictionary<string, NodeInfo> nodes) {
                    this.nodes = nodes;
                }
                public class NodeInfo {
                    public bool enabled;
                    public int max_level;
                    public int tier;
                    public float value_per_buff;
                    public KeyValuePair<Buff, BuffType> buff_info;
                    public string icon_url;
                    public ulong skin;
                    public Permissions permissions;
                    public NodeInfo(bool enabled, int max_level, int tier, float value_per_buff, KeyValuePair<Buff, BuffType> buff_info, string icon_url, ulong skin, Permissions permissions = null) {
                        this.enabled = enabled;
                        this.max_level = max_level;
                        this.tier = tier;
                        this.value_per_buff = value_per_buff;
                        this.buff_info = buff_info;
                        this.icon_url = icon_url;
                        this.permissions = permissions;
                        this.skin = skin;
                    }
                }
            }
            public class PowerTools {
                public float mining_perk_modifier;
                public float woodcutting_perk_modifier;
                public float skinning_perk_modifier;
            }
            public class ExperienceInfo {
                public double x = 0.07;
                public int y = 2;
                public Dictionary<int, double> xp_table = new Dictionary<int, double>();
                public void CalculateTable(int max_level) {
                    for (int i = 0; i <= max_level; i++) {
                        if (xp_table.ContainsKey(i)) {
                            var newValue = Math.Floor(Math.Pow(i / x, y));
                            if (xp_table[i] != newValue) {
                                xp_table[i] = newValue;
                                UpdatedTable = true;
                            }
                        }
                        else xp_table.Add(i, Math.Floor(Math.Pow(i / x, y)));
                    }
                }
                public int GetLevel(double xp) {
                    return Convert.ToInt32(Math.Floor(x * Math.Sqrt(xp)));
                }
                public double GetLevelStartXP(int level) {
                    return Math.Pow(level / x, y);
                }
                public static bool UpdatedTable = false;
            }
            public class XPSources {
                public double NodeHit = 12;
                public double NodeHitFinal = 50;
                public double TreeHit = 8;
                public double TreeHitFinal = 40;
                public double SkinHit = 10;
                public double SkinHitFinal = 50;
                public double CollectWildPlant = 30;
                public double CollectGrownPlant = 5;
                public double BuildingBlockDeployed = 0;
                public double FishCaught = 100;
                public double Crafting = 0.25;
                public double ScientistNormal = 150;
                public double TunnelDweller = 125;
                public double ScientistHeavy = 300;
                public double SmallAnimal = 20;
                public double MediumAnimal = 50;
                public double LargeAnimal = 100;
                public double RoadSign = 10;
                public double Barrel = 20;
                public double Scarecrow = 100;
                public double Mission = 1000;
                public double BradleyAPC = 1000;
                public double LootHackedCrate = 200;
                public double LootHeliCrate = 250;
                public double LootBradleyCrate = 50;
                public double CookingMealXP = 10;
                public double RaidableBaseCompletion_Easy = 100;
                public double RaidableBaseCompletion_Medium = 200;
                public double RaidableBaseCompletion_Hard = 300;
                public double RaidableBaseCompletion_Expert = 400;
                public double RaidableBaseCompletion_Nightmare = 500;
                public double Win_HungerGames = 2000;
                public double Win_ScubaArena = 2000;
                public double Win_Skirmish = 2000;
                public double Gut_Fish = 10;
                public double default_botrespawn = 100;
                public double crate_basic = 0;
                public double crate_elite = 50;
                public double crate_mine = 0;
                public double crate_normal = 0;
                public double crate_normal_2 = 0;
                public double crate_normal_2_food = 0;
                public double crate_normal_2_medical = 0;
                public double crate_tools = 0;
                public double crate_underwater_advanced = 100;
                public double crate_underwater_basic = 25;
                public double crate_ammunition = 0;
                public double crate_food_1 = 0;
                public double crate_food_2 = 0;
                public double crate_fuel = 0;
                public double crate_medical = 0;
                public double supply_drop = 500;
                public double Harbor_Event_Winner = 2000f;
                public double Junkyard_Event_Winner = 2000f;
                public double PowerPlant_Event_Winner = 2000f;
                public double Satellite_Event_Winner = 2000f;
                public double Water_Event_Winner = 2000f;
                public double Air_Event_Winner = 2000f;
                public double Armored_Train_Winner = 2000f;
                public double Convoy_Winner = 2000f;
                public double SurvivalArena_Winner = 2000f;
                public double swipe_card_level_1 = 50;
                public double swipe_card_level_2 = 100;
                public double swipe_card_level_3 = 250;
            }
            public string ToJson() => JsonConvert.SerializeObject(this);
            public Dictionary<string, object> ToDictionary() => JsonConvert.DeserializeObject<Dictionary<string, object>>(ToJson());
        }
        public class Permissions {
            public string description;
            public Dictionary<int, PermissionInfo> perms = new Dictionary<int, PermissionInfo>();
            public Permissions(string description, Dictionary<int, PermissionInfo> perms) {
                this.description = description;
                this.perms = perms;
            }
        }
        public class PermissionInfo {
            public Dictionary<string, string> perms_list = new Dictionary<string, string>();
            // Key = perm.Value = displayName.public PermissionInfo(Dictionary<string, string> perms_to_add)
            {
                this.perms_list = perms_to_add;
            }
        }
        public class LootItems {
            public string shortname;
            public int min;
            public int max;
            public int dropWeight;
            public string displayName;
            public ulong skin;
            public LootItems(string shortname, int min, int max, ulong skin = 0, string displayName = null, int dropWeight = 100) {
                this.shortname = shortname;
                this.min = min;
                this.max = max;
                this.skin = skin;
                this.displayName = displayName;
                this.dropWeight = dropWeight;
            }
        }
        public class PumpBar {
            [JsonProperty("Default xp bar offset - this is for any new player connecting to the server")]
            public xp_bar_offset offset_default = new xp_bar_offset() {
                min_x = -365.713f, min_y = 20f, max_x = -233.287f, max_y = 42f
            }
            ;
            [JsonProperty("Colour of the pump bar")]
            public string pump_bar_colour = "0.5471698 0.3533202 0 0.6078432";
            [JsonProperty("Font set for the pump bar")]
            public string pump_bar_font = "robotocondensed-regular.ttf";
            [JsonProperty("Font size for the pump bar")]
            public int pump_bar_font_size = 10;
        }
        public class BuildCraftUltimate {
            [JsonProperty("Chance that a card with lower access will successfully unlock the door (the card is damaged regardless) [%]")]
            public int success_chance = 100;
            [JsonProperty("Notify the player when their ultimate failed")]
            public bool notify_fail = true;
        }
        public class SkinningUltimate {
            [JsonProperty("How long should each buff last for [0 = off]?")]
            public Dictionary<AnimalBuff, float> enabled_buffs = new Dictionary<AnimalBuff, float>();
            [JsonProperty("Wolf perk: what health scale bonus should the player receive per team member near by [1.0 is 100%]?")]
            public float wolf_health_scale = 0.25f;
            [JsonProperty("Wolf perk: How close do teammates need to be in order to contribute to the perk [radius]?")]
            public float wolf_team_dist = 30f;
            [JsonProperty("Bear perk: Maximum health of the overshield")]
            public float bear_overshield_max = 50f;
            [JsonProperty("Stag perk: Maximum distance that the perk can detect dangerous entities from [radius]")]
            public float stag_danger_dist = 30f;
            [JsonProperty("Stag perk: Time between procs [seconds]")]
            public float stag_timer = 10f;
            [JsonProperty("Stag perk: Draw the enemy location?")]
            public bool stag_draw_enemy = true;
            [JsonProperty("Boar perk: Blacklist of components for the boar buff")]
            public List<string> boar_blackList = new List<string>();
            [JsonProperty("Boar perk: Chance when collecting mushrooms and berries that a player [%]")]
            public float boar_chance = 2f;
            [JsonProperty("Boar perk: Minimum quantity to give")]
            public int boar_min_quantity = 1;
            [JsonProperty("Boar perk: Maximum quantity to give")]
            public int boar_max_quantity = 4;
        }
        public class CombatUltimate {
            [JsonProperty("What scale of damage should the player receive as health [1.0 = 100%]")]
            public float health_scale = 0.01f;
            [JsonProperty("Should the healing effect of the ultimate work against players")]
            public bool players_enabled = true;
            [JsonProperty("Should the healing effect of the ultimate work against animals")]
            public bool animals_enabled = true;
            [JsonProperty("Should the healing effect of the ultimate work against scientists")]
            public bool scientists_enabled = true;
        }
        public class Scav_Ultimate {
            [JsonProperty("List of items that you dont want the perk to recycle")]
            public List<string> item_blacklist = new List<string>();
            [JsonProperty("Scrap items that have a unique name?")]
            public bool scrap_named_items = false;
            [JsonProperty("Scrap items that have a non-default skin?")]
            public bool scrap_skinned_items = false;
        }
        public class HarvesterUltimate {
            [JsonProperty("Chat command that players can use to set their plant genes")]
            public string gene_chat_command = "setgenes";
            [JsonProperty("Cooldown between ultimate triggers.Set to 0 if you want all plants to have their genes adjusted [seconds]")]
            public float cooldown = 0f;
            [JsonProperty("Notify a player in chat when they go on cooldown (recommended for longer cooldowns)")]
            public bool notify_on_cooldown = false;
        }
        public class MedicalUltimate {
            [JsonProperty("Chance for the player to resurrect [out of 100]")]
            public float resurrection_chance = 50f;
            [JsonProperty("Delay between resurrections after a successful resurrection [seconds]")]
            public float resurrection_delay = 1200f;
        }
        public class VehicleUltimate {
            [JsonProperty("Reduction percentage [1.0 == full reduction]")]
            public float reduce_by = 1f;
        }
        public class WoodcuttingUltimate {
            [JsonProperty("Award xp for each tree that the perk cuts down?")]
            public bool award_xp = false;
            [JsonProperty("Distance from the player (radius) that trees will be cut down?")]
            public float distance_from_player = 10f;
        }
        public class MiningUltimate {
            [JsonProperty("Distance from the player (radius) that nodes will appear (radius)")]
            public float distance_from_player = 200f;
            [JsonProperty("Cooldown time on the ability (seconds)")]
            public float cooldown = 60f;
            [JsonProperty("How many seconds should the marked ores appear on the players hud?")]
            public float hud_time = 60f;
            [JsonProperty("Text size")]
            public int text_size = 12;
            [JsonProperty("Chat command to find the nodes.")]
            public string find_node_cmd = "locatenodes";
        }
        protected override void LoadDefaultConfig() {
            config = new Configuration();
            config.level.CalculateTable(config.general_settings.max_player_level > 0 ? config.general_settings.max_player_level : 100);
            config.trees = DefaultTrees;
            config.general_settings.level_rewards.Add(100, new LevelReward(new Dictionary<string, string>() {
                ["say <color=#ffae00>{name}</color> reached level <color=#4cff03>100</color>!"]
                = "You have reached a milestone level!"
            }
            , new List<string>() {
                "say Test data reset."
            }
            ));
            config.tools_black_white_list_settings.wc_tools = new List<string>() {
                "hatchet", "axe.salvaged", "stonehatchet", "chainsaw"
            }
            ;
            config.tools_black_white_list_settings.mining_tools = new List<string>() {
                "pickaxe", "stone.pickaxe", "icepick.salvaged", "jackhammer"
            }
            ;
            config.tools_black_white_list_settings.skinning_tools = new List<string>() {
                "knife.bone", "knife.butcher", "knife.combat", "hatchet"
            }
            ;
            config.loot_settings.mining_loot_table = new List<LootItems>() {
                new LootItems("keycard_blue", 1, 1), new LootItems("keycard_green", 1, 1), new LootItems("keycard_red", 1, 1), new LootItems("lowgradefuel", 1, 10)
            }
            ;
            config.loot_settings.wc_loot_table = new List<LootItems>() {
                new LootItems("apple", 1, 3), new LootItems("black.raspberries", 1, 5), new LootItems("blue.berry", 1, 5), new LootItems("seed.hemp", 1, 5), new LootItems("keycard_blue", 1, 1), new LootItems("keycard_green", 1, 1)
            }
            ;
            config.tools_black_white_list_settings.comp_blacklist = new List<string>() {
                "generic", "chassis", "glue", "bleach", "ducttape", "sticks", "vehicle.chassis", "vehicle.module", "vehicle.chassis.4mod", "vehicle.chassis.3mod", "vehicle.chassis.2mod", "electric.generator.small"
            }
            ;
            config.buff_settings.primitive_weapons = new List<string>() {
                "spear.stone", "spear.wooden", "bone.club", "bow.hunting"
            }
            ;
            config.buff_settings.animals = new List<string>() {
                "boar", "horse", "stag", "chicken", "wolf", "bear", "scarecrow", "polarbear"
            }
            ;
            config.loot_settings.loot_crate_whitelist = new List<string>() {
                "assets/bundled/prefabs/radtown/crate_elite.prefab", "assets/bundled/prefabs/radtown/crate_normal.prefab", "assets/bundled/prefabs/radtown/crate_normal_2.prefab", "assets/bundled/prefabs/radtown/crate_tools.prefab", "assets/bundled/prefabs/radtown/crate_underwater_advanced.prefab", "assets/bundled/prefabs/radtown/underwater_labs/crate_elite.prefab", "assets/bundled/prefabs/radtown/underwater_labs/crate_normal.prefab", "assets/bundled/prefabs/radtown/underwater_labs/crate_normal_2.prefab", "assets/bundled/prefabs/radtown/underwater_labs/crate_tools.prefab"
            }
            ;
            config.tools_black_white_list_settings.black_listed_gather_items = new List<string>() {
                "bone.club"
            }
            ;
            config.general_settings.respec_cost_override.Add("vip", Math.Round(config.general_settings.respec_cost / 2, 0));
            config.general_settings.max_skill_points_override.Add("vip", config.general_settings.max_skill_points + (Convert.ToInt32(config.general_settings.max_skill_points * 0.2)));
            config.general_settings.max_skill_points_override.Add("nolimit", 0);
            config.xp_settings.xp_loss_override.Add("vip", Math.Round(config.xp_settings.xpLoss / 2, 0));
            config.xp_settings.xp_perm_modifier.Add("vip", 1.0);
            config.buff_settings.no_refund_item_skins = new List<ulong>() {
                2529344523, 2546992444, 2546992685
            }
            ;
            config.ultimate_settings.ultimate_scavenger.item_blacklist = DefaultScavengerUltimateBlacklist;
            config.ultimate_settings.ultimate_skinning.enabled_buffs = DefaultAnimalBuffs;
            config.xp_settings.cooking_black_list = new List<string>() {
                "ingredient bag"
            }
            ;
        }
        public class LevelReward {
            [JsonProperty("List of commands and chat messages that the player receives when reaching the specified level [Left = command.Right = Private message to player].{id} = steam ID.{name} == name.")]
            public Dictionary<string, string> reward_commands = new Dictionary<string, string>();
            [JsonProperty("List of commands that are fired off when the player data is reset")]
            public List<string> reset_commands = new List<string>();
            public LevelReward(Dictionary<string, string> reward_commands, List<string> reset_commands = null) {
                this.reward_commands = reward_commands;
                this.reset_commands = reset_commands;
            }
        }
        Dictionary<string, float> DefaultUnderwaterChance {
            get {
                return new Dictionary<string, float>() {
                    ["assets/bundled/prefabs/radtown/underwater_labs/crate_elite.prefab"]
                    = 5f, ["assets/bundled/prefabs/radtown/underwater_labs/crate_normal.prefab"] = 5f, ["assets/bundled/prefabs/radtown/underwater_labs/crate_normal_2.prefab"] = 5f, ["assets/bundled/prefabs/radtown/crate_underwater_advanced.prefab"] = 5f, ["assets/bundled/prefabs/radtown/crate_underwater_basic.prefab"] = 5f
                }
                ;
            }
        }
        List<LootItems> GetSharkLoot() {
            List<LootItems> loot = new List<LootItems>();
            foreach (var item in ItemManager.GetItemDefinitions()) loot.Add(new LootItems(item.shortname, 1, item.isWearable ? 1 : item.isHoldable ? 1 : UnityEngine.Random.Range(2, 5)));
            return loot;
        }
        public Dictionary<string, List<LootItems>> DeepSeaLooterLootTable;
        public List<LootItems> SharkLootTable;
        Dictionary<string, List<LootItems>> GetUnderwaterLoot() {
            Dictionary<string, List<LootItems>> result = new Dictionary<string, List<LootItems>>();
            List<LootItems> items = new List<LootItems>();
            foreach (var item in ItemManager.GetItemDefinitions().Where(x => x.category == ItemCategory.Component)) items.Add(new LootItems(item.shortname, 1, 3));
            result.Add("assets/bundled/prefabs/radtown/crate_underwater_basic.prefab", items);
            result.Add("assets/bundled/prefabs/radtown/underwater_labs/crate_normal_2.prefab", items);
            result.Add("assets/bundled/prefabs/radtown/underwater_labs/crate_normal.prefab", items);
            foreach (var item in ItemManager.GetItemDefinitions().Where(x => x.category == ItemCategory.Electrical || x.category == ItemCategory.Weapon || x.category == ItemCategory.Attire)) {
                if (item.category == ItemCategory.Attire || item.category == ItemCategory.Weapon) items.Add(new LootItems(item.shortname, 1, 1));
                else items.Add(new LootItems(item.shortname, 1, 3));
            }
            result.Add("assets/bundled/prefabs/radtown/crate_underwater_advanced.prefab", items);
            result.Add("assets/bundled/prefabs/radtown/underwater_labs/crate_elite.prefab", items);
            return result;
        }
        List<string> OldLinks = new List<string>() {
            "https://www.dropbox.com/s/vc5ing7pbtxv6er/Paladinskill_07_nobg.png?dl=1", "https://imgur.com/zAkmSub.png", "https://www.dropbox.com/s/jkhionm6r7gfj95/Paladinskill_12_nobg.png?dl=1", "https://www.dropbox.com/s/k0v94pupgo0qmwy/Paladinskill_20_nobg.png?dl=1", "https://www.dropbox.com/s/6qp1kfvtw4ixsk7/Assassinskill_16_nobg.png?dl=1", "https://www.dropbox.com/s/muim3nqo63nkwqk/Paladinskill_02_nobg.png?dl=1", "https://www.dropbox.com/s/qsivpq886epcypo/Mageskill_18_nobg.png?dl=1", "https://www.dropbox.com/s/fin32eer1d88f0f/Engineerskill_32_nobg.png?dl=1", "https://imgur.com/hO7fA3z.png", "https://www.dropbox.com/s/hjq9kird3uxohlo/Archerskill_17_nobg.png?dl=1", "https://www.dropbox.com/s/o3zb8kfu53r4m3k/Warriorskill_50_nobg.png?dl=1", "https://www.dropbox.com/s/gkp6k8zwfh3rc41/Archerskill_29_nobg.png?dl=1", "https://www.dropbox.com/s/qybq86hkdoab14r/Assassinskill_26_nobg.png?dl=1", "https://www.dropbox.com/s/dnebyrhp7bugl61/Mageskill_35_nobg.png?dl=1", "https://www.dropbox.com/s/095ij4c20yomy8x/Mageskill_49_nobg.png?dl=1", "https://www.dropbox.com/s/st1blgav08kgnrb/Regrowth.png?dl=1", "https://www.dropbox.com/s/71bryupwygpuv9z/Druideskill_11_nobg.png?dl=1", "https://imgur.com/2AnzivI.png", "https://www.dropbox.com/s/v85ya0x8roo1q67/33_Critical_strike_nobg.png?dl=1", "https://imgur.com/sA5KtYp.png", "https://www.dropbox.com/s/k7e89kpwroskp1f/34_Critical_strike2_nobg.png?dl=1", "https://www.dropbox.com/s/s9lr3wl5ej5u9k7/36_Critical_strike4_nobg.png?dl=1", "https://www.dropbox.com/s/igcf7tqn1ezolnh/35_Critical_strike3_nobg.png?dl=1", "https://www.dropbox.com/s/t0ahbcc13b24yr0/Assassinskill_21_nobg.png?dl=1", "https://www.dropbox.com/s/1hzsha39lqkulrp/Archerskill_10_nobg.png?dl=1", "https://www.dropbox.com/s/lio5lk1sqn32k1a/Warriorskill_13_nobg.png?dl=1", "https://imgur.com/GNdYVEI.png", "https://imgur.com/C4mseOn.png", "https://imgur.com/jsO5eGQ.png", "https://www.dropbox.com/s/prwf810f4cqun9l/Engineerskill_33_nobg.png?dl=1", "https://www.dropbox.com/s/hvd4su438s54erh/Druideskill_02_nobg.png?dl=1", "https://imgur.com/YNkQ2mb.png", "https://www.dropbox.com/s/v0a5rw82gjmxi1t/Warlock_15_nobg.png?dl=1", "https://www.dropbox.com/s/oh6tnjojkgjehvd/Druideskill_03_nobg.png?dl=1", "https://www.dropbox.com/s/apydr8pj51z030x/Archerskill_09_nobg.png?dl=1", "https://imgur.com/fH2sIUp.png", "https://imgur.com/Ys5zO7o.png", "https://www.dropbox.com/s/h9ixd1ug2en4pn4/Paladinskill_17_nobg.png?dl=1", "https://imgur.com/7Ko8KLg.png", "https://www.dropbox.com/s/dqaxiz73p8uwf7q/Mageskill_03_nobg.png?dl=1", "https://www.dropbox.com/s/8e1wtvbnroayreq/Archerskill_20_nobg.png?dl=1", "https://imgur.com/N5ixdsD.png", "https://www.dropbox.com/s/xgqae0jhp1exp8w/Mageskill_38_nobg.png?dl=1", "https://www.dropbox.com/s/g25krvk8c5n99d9/Warriorskill_29_nobg.png?dl=1", "https://www.dropbox.com/s/18sptrssfukaf7s/Priestskill_48_nobg.png?dl=1", "https://imgur.com/yCpYOFB.png", "https://www.dropbox.com/s/y948cf4lfhx2aoy/Druideskill_23_nobg.png?dl=1", "https://imgur.com/UjF7tZp.png", "https://www.dropbox.com/s/596bfn1pzm1hzhn/Engineerskill_24_nobg.png?dl=1", "https://imgur.com/TKrf3oQ.png", "https://imgur.com/Kmbv9gS.png", "https://imgur.com/wG7cG8X.png", "https://imgur.com/xMp1fhd.png", "https://imgur.com/cVhnv41.png", "https://imgur.com/Utjvw8E.png", "https://imgur.com/LvwIvql.png", "https://www.dropbox.com/s/amyh43h1p1x62fr/Engineerskill_01_nobg.png?dl=1", "https://www.dropbox.com/s/p88fvhnvu3e7x6q/Assassinskill_35_nobg.png?dl=1", "https://www.dro
// ... [Code preview truncated due to length. Full source in attached file] ...

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