/***********************************************************************************************************************/ /*** DO NOT edit this file! Edit the files under `oxide/config` and/or `oxide/lang`, created once plugin has loaded. ***/ /*** Please note, support cannot be provided if the plugin has been modified. Please use a fresh copy if modified. ***/ /***********************************************************************************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text.RegularExpressions; using MySql.Data.MySqlClient; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Oxide.Core; using Oxide.Core.Configuration; using Oxide.Core.Plugins; using Oxide.Core.Database; using Oxide.Core.Libraries.Covalence; using Oxide.Plugins.XPerienceEx; using Oxide.Game.Rust.Cui; using Rust; using UnityEngine; using Random = UnityEngine.Random; using WebSocketSharp; using Facepunch; using Facepunch.Math; using ConVar; using System.IO; using System.Net; namespace Oxide.Plugins { [Info("XPerience", "MACHIN3", "1.8.800")] [Description("Player level system with xp, stats, and skills")] public class XPerience : RustPlugin { public const string version = "1.8.800"; #region Update Log /***************************************************** 【 𝓜𝓐𝓒𝓗𝓘𝓝𝓔 】 Website: https://www.rustlevels.com/XPerience/ Discord: http://discord.rustlevels.com/ ---------------------- ✯ version 1.8.8 ---------------------- ✯ Fix for Rust update 12/5/24 Notes: * Please post bugs or issues in our discord. *****************************************************/ #endregion #region Refrences [PluginReference] private readonly Plugin XPerienceAddon, WeaponMechanics, KillRecords, Economics, ServerRewards, ImageLibrary, TeaModifiers, BetterChat, ColouredChat, IQChat, Backpacks, RaidableBases, ZoneManager, PersonalAnimal, SkinBox, BuildingGrades, ItemRetriever, BotReSpawn, NeverWear, Cooking, EventHelper, SurvivalArena, MonumentOwner, Triangulation; #endregion #region Fields private XPData _xpData; private DailyData _dailyData; private LootData _lootData; private CorpseData _corpseData; private HorseData _horseData; private WeaponData _weaponData; private BoatData _boatData; private VehicleData _vehicleData; private MinicopterData _minicopterData; private SnowmobData _snowmobData; private SmithyData _smithyData; private ElectricianData _electricianData; private HeliHits _heliHits; private DynamicConfigFile _XPerienceData; private DynamicConfigFile _DailyXPerienceData; private DynamicConfigFile _LootContainData; private DynamicConfigFile _CorpseContainData; private DynamicConfigFile _HorseData; private DynamicConfigFile _WeaponData; private DynamicConfigFile _BoatData; private DynamicConfigFile _VehicleData; private DynamicConfigFile _MinicopterData; private DynamicConfigFile _SnowmobData; private DynamicConfigFile _SmithyData; private DynamicConfigFile _ElectricianData; private Dictionary _xperienceCache; private Dictionary _dailyxperienceCache; private Dictionary _lootCache; private Dictionary _corpseCache; private Dictionary _horseCache; private Dictionary _weaponCache; private Dictionary _boatCache; private Dictionary _vehicleCache; private Dictionary _minicopterCache; private Dictionary _snowmobCache; private Dictionary _smithyCache; private Dictionary _electricianCache; private Dictionary _heliCache; public Configuration config; private static Configuration configData; private static readonly RNGCryptoServiceProvider _generator = new RNGCryptoServiceProvider(); private const string Admin = "xperience.admin"; private const string VIP = "xperience.vip"; private const string PermMentality = "xperience.mentality"; private const string PermDexterity = "xperience.dexterity"; private const string PermMight = "xperience.might"; private const string PermCaptaincy = "xperience.captaincy"; private const string PermWeaponry = "xperience.weaponry"; private const string PermNinjary = "xperience.Ninjary"; private const string PermWoodCutter = "xperience.woodcutter"; private const string PermSmithy = "xperience.smithy"; private const string PermMiner = "xperience.miner"; private const string PermForager = "xperience.forager"; private const string PermHunter = "xperience.hunter"; private const string PermFisher = "xperience.fisher"; private const string PermCrafter = "xperience.crafter"; private const string PermFramer = "xperience.framer"; private const string PermMedic = "xperience.medic"; private const string PermScavenger = "xperience.scavenger"; private const string PermElectrician = "xperience.electrician"; private const string PermDemolitionist = "xperience.demolitionist"; private const string PermTamer = "xperience.tamer"; private const string PermXPBoost = "xperience.xpboost"; private readonly Hash _notifyCooldowns = new Hash(); private readonly Hash _buildCooldowns = new Hash(); private readonly Hash _craftCooldowns = new Hash(); private readonly Hash _TopUIPage = new Hash(); private Timer DashPanelTimer; private Timer _helitracker; private double CurrentTime => DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds; private bool _isXPReady; private bool _isRestart = true; private int _imageLibraryCheck = 0; private Dictionary _xperienceImageList; private Dictionary _CheckImageList; private Dictionary _CheckImageListReload; public static class RandomNumber { private static readonly RNGCryptoServiceProvider _generator = new RNGCryptoServiceProvider(); public static int Between(int minimumValue, int maximumValue) { byte[] randomNumber = new byte[1]; _generator.GetBytes(randomNumber); double asciiValueOfRandomCharacter = Convert.ToDouble(randomNumber[0]); double multiplier = Math.Max(0, (asciiValueOfRandomCharacter / 255d) - 0.00000000001d); int range = maximumValue - minimumValue + 1; double randomValueInRange = Math.Floor(multiplier * range); return (int)(minimumValue + randomValueInRange); } } #endregion #region Config public class Configuration : SerializableConfiguration { [JsonProperty("Player Chat Commands")] public PlayerChatCommands playerchatCommands = new PlayerChatCommands(); [JsonProperty("Admin Chat Commands")] public AdminChatCommands adminchatCommands = new AdminChatCommands(); [JsonProperty("Player Info Box")] public PlayerProfileSettings playerprofilesettings = new PlayerProfileSettings(); [JsonProperty("Default Options")] public DefaultOptions defaultOptions = new DefaultOptions(); [JsonProperty("Sound Effects")] public SoundEffects soundEffects = new SoundEffects(); [JsonProperty("UI Text Colors")] public UITextColor uitextColor = new UITextColor(); [JsonProperty("Image Icons")] public ImageIcons imageicons = new ImageIcons(); [JsonProperty("XP - Level Config")] public XpLevel xpLevel = new XpLevel(); [JsonProperty("Daily Timer Config")] public DailyTimer dailytimer = new DailyTimer(); [JsonProperty("Daily XP Limit Config")] public DailyXpLimit dailyxpLimit = new DailyXpLimit(); [JsonProperty("Daily Reset Limit Config")] public DailyResetLimit dailyresetLimit = new DailyResetLimit(); [JsonProperty("XP - Level Ranks")] public XpLevelRanks xpLevelRanks = new XpLevelRanks(); [JsonProperty("Rank Boosts")] public RankBoostsSettings Rankboostssettings = new RankBoostsSettings(); [JsonProperty("Special Groups")] public SpecialGroups specialGroups = new SpecialGroups(); [JsonProperty("XP - Night Bonus")] public NightBonus nightBonus = new NightBonus(); [JsonProperty("XP - Gain Amounts")] public XpGain xpGain = new XpGain(); [JsonProperty("XP - Gather Amounts")] public XpGather xpGather = new XpGather(); [JsonProperty("XP - Building Amounts")] public XpBuilding xpBuilding = new XpBuilding(); [JsonProperty("XP - Teams")] public XpTeams xpTeams = new XpTeams(); [JsonProperty("XP - Mission Amounts")] public XpMissions xpMissions = new XpMissions(); [JsonProperty("XP - Reducer Amounts")] public XpReducer xpReducer = new XpReducer(); [JsonProperty("BonusXP - Bonus Amounts (requires KillRecords plugin)")] public XpBonus xpBonus = new XpBonus(); [JsonProperty("Economics Rewards (requires Economics plugin)")] public XpEcon xpEcon = new XpEcon(); [JsonProperty("Server Rewards (requires ServerRewards plugin)")] public SRewards sRewards = new SRewards(); [JsonProperty("Mentality Stat")] public Mentality mentality = new Mentality(); [JsonProperty("Dexterity Stat")] public Dexterity dexterity = new Dexterity(); [JsonProperty("Might Stat")] public Might might = new Might(); [JsonProperty("Captaincy Stat")] public Captaincy captaincy = new Captaincy(); [JsonProperty("Weaponry Stat")] public Weaponry weaponry = new Weaponry(); [JsonProperty("Ninjary Stat")] public Ninjary ninjary = new Ninjary(); [JsonProperty("WoodCutter Skill")] public Woodcutter woodcutter = new Woodcutter(); [JsonProperty("Smithy Skill")] public Smithy smithy = new Smithy(); [JsonProperty("Miner Skill")] public Miner miner = new Miner(); [JsonProperty("Forager Skill")] public Forager forager = new Forager(); [JsonProperty("Hunter Skill")] public Hunter hunter = new Hunter(); [JsonProperty("Fisher Skill")] public Fisher fisher = new Fisher(); [JsonProperty("Crafter Skill")] public Crafter crafter = new Crafter(); [JsonProperty("Framer Skill")] public Framer framer = new Framer(); [JsonProperty("Medic Skill")] public Medic medic = new Medic(); [JsonProperty("Scavenger Skill")] public Scavenger scavenger = new Scavenger(); [JsonProperty("Electrician Skill")] public Electrician electrician = new Electrician(); [JsonProperty("Demolitionist Skill")] public Demolitionist demolitionist = new Demolitionist(); [JsonProperty("Tamer Skill")] public Tamer tamer = new Tamer(); [JsonProperty("SQL Info")] public SQL sql = new SQL(); [JsonProperty("Backpacks Mod")] public BackpacksMod backpacksmod = new BackpacksMod(); [JsonProperty("ZoneManager Mod")] public ZoneManagerMod zonemanagermod = new ZoneManagerMod(); [JsonProperty("EventHelper Mod")] public EventHelperMod eventhelpermod = new EventHelperMod(); [JsonProperty("SurvivalArena Mod")] public SurvivalArenaMod survivalarenamod = new SurvivalArenaMod(); [JsonProperty("Raidable Bases")] public RaidableBasesMod raidablebasesmod = new RaidableBasesMod(); } public class PlayerChatCommands { public string openplayerstats = "xpstats"; public string openplayerstats2 = "xpprofile"; public string openplayerstats3 = "xpinfo"; public string showplayerstatschat = "xpstatschat"; public string opentopplayers = "xptop"; public string playeraddstat = "xpaddstat"; public string playeraddskill = "xpaddskill"; public string playerresetstats = "xpresetstats"; public string playerresetskills = "xpresetskills"; public string playerresetall = "xprestart"; public string playerliveuichange = "xpliveui"; public string openhelp = "xphelp"; } public class AdminChatCommands { public string showadminhelp = "xpadminhelp"; public string openadminpanel = "xpconfig"; public string adminresetxperience = "xpresetall"; public string adminxpgive = "xpgive"; public string adminxpgiveall = "xpgiveall"; public string adminpointsgive = "xpgivepoints"; public string adminxptake = "xptake"; public string adminresetplayer = "xpresetplayer"; public string adminfixdata = "xpfix"; public string adminitemchange = "itemchange"; public string adminresetharvest = "resetharvest"; public string adminresetlevelonly = "resetlevel"; public string adminresetrankonly = "resetrank"; public string adminresetstat = "resetstat"; public string adminresetskill = "resetskill"; public string adminresetlevelonlyall = "resetalllevels"; public string adminresetrankonlyall = "resetallranks"; public string adminexcludeplayer = "xpexcludeplayer"; public string admingiveitem = "xpitem"; } public class PlayerProfileSettings { public bool showunusedeffects = true; public bool useplayeravatar = true; public bool profilemenusettings = true; public bool profilemenutopplayers = true; public bool profilemenuraids = true; public bool profilemenuhelp = true; public bool profilemenucalculations = true; public bool skillshelp = true; public bool profilemenuwelcome = true; public bool playtime = true; public bool alivetime = true; public bool sleepingtime = true; public bool swimingtime = true; public bool drivingtime = true; public bool flyingtime = true; public bool boatingtime = true; public bool basetime = true; public bool monumenttime = true; public bool wildernesstime = true; public bool metersran = true; public bool meterswalked = true; public bool lastdmgrec = true; public bool lastdmgrecby = true; public bool lastdmgdelt = true; public bool lastdmgdeltto = true; public string AnchorMin = ".5 .5"; public string AnchorMax = ".5 .5"; public string OffsetMin = "-300 -200"; public string OffsetMax = "300 200"; public string InsideAnchorMin = ".03 .01"; public string InsideAnchorMax = ".99 .97"; public int menutype = 1; public bool usebgimage = true; public int profilebg = 0; public bool allowprofilebgchange = true; public bool usemenubgimage = false; public double bgfadein = 0.5; public double menuwidth = 0.2; public double menuheight = 0.75; public double menubuttonheight = 0.07; public int menubuttonfont = 11; } public class DefaultOptions { public bool userpermissions = false; public int liveuistatslocation = 1; public bool liveuistatslocationmoveable = true; public bool showchatprofileonconnect = true; public int NotifcationCooldown = 2; public bool restristresets = true; public bool allowrespec = true; public int resetminsstats = 60; public int resetminsskills = 60; public bool bypassadminreset = true; public int vipresetminstats = 30; public int vipresetminsskills = 30; public int playerfixdatatimer = 60; public bool disableplayerfixdata = false; public bool disablearmorchat = false; public bool hardcorenoreset = false; public bool allowplayersearch = true; public bool allowplayerreset = false; public int topplayersperpage = 20; public bool showonlinestatus = true; public bool useprogressivelevelicons = true; public bool showfuelguage = true; public bool showspeedometer = true; public int speedometertype = 1; public bool dropsgotoplayerinventory = true; public bool wipedataonnewsave = false; public bool enabledashpanel = true; public bool enableconfirmationprompt = true; public bool showchatnotifications = true; public bool showlevelinchat = true; public bool hidechatnotifications = false; public bool debugmode = false; } public class SoundEffects { public bool levelup = true; public bool leveldown = true; public bool rankup = true; public bool statup = true; public bool skillup = true; public bool statreset = true; public bool skillreset = true; public bool scavengerloot = true; public bool foragerloot = true; public string levelupeffect = "assets/prefabs/misc/halloween/lootbag/effects/silver_open.prefab"; public string leveldowneffect = "assets/bundled/prefabs/fx/player/howl.prefab"; public string rankupeffect = "assets/prefabs/misc/halloween/lootbag/effects/gold_open.prefab"; public string statupeffect = "assets/prefabs/misc/halloween/lootbag/effects/bronze_open.prefab"; public string skillupeffect = "assets/prefabs/misc/halloween/lootbag/effects/bronze_open.prefab"; public string statreseteffect = "assets/bundled/prefabs/fx/player/fall-damage.prefab"; public string skillreseteffect = "assets/bundled/prefabs/fx/player/fall-damage.prefab"; public string scavengerlooteffect = "assets/prefabs/misc/halloween/lootbag/effects/loot_bag_upgrade.prefab"; public string foragerlooteffect = "assets/prefabs/misc/halloween/lootbag/effects/loot_bag_upgrade.prefab"; } public class UITextColor { public string defaultcolor = "white"; public string level = "green"; public string ranklevel = "blue"; public string rankxp = "blue"; public string rankname = "magenta"; public string experience = "green"; public string nextlevel = "yellow"; public string remainingxp = "cyan"; public string statskilllevels = "yellow"; public string perks = "green"; public string unspentpoints = "green"; public string spentpoints = "red"; public string pets = "cyan"; public string mentality = "white"; public string dexterity = "white"; public string might = "white"; public string captaincy = "white"; public string weaponry = "white"; public string Ninjary = "white"; public string woodcutter = "white"; public string smithy = "white"; public string miner = "white"; public string forager = "white"; public string hunter = "white"; public string fisher = "white"; public string crafter = "white"; public string framer = "white"; public string medic = "white"; public string scavenger = "white"; public string electrician = "white"; public string demolitionist = "white"; public string tamer = "white"; public string xpbar = "green"; public string armorbar = "red"; } public class ImageIcons { public bool uselocalpath = false; public string rootpath = Directory.GetCurrentDirectory().ToString() + "/oxide"; public string xperiencelogo = "https://i.imgur.com/d16zkJk.png"; public string mainicon = "https://i.imgur.com/JUwd2a8.png"; public string mentality = "https://i.imgur.com/LQWZH34.png"; public string dexterity = "https://i.imgur.com/iBizHFq.png"; public string might = "https://i.imgur.com/k9p16oj.png"; public string captaincy = "https://i.imgur.com/DNYOr3Q.png"; public string weaponry = "https://i.imgur.com/P7Tr0rE.png"; public string ninjary = "https://i.imgur.com/jyo4foK.png"; public string woodcutter = "https://i.imgur.com/4tQpa6e.png"; public string smithy = "https://i.imgur.com/wW9oaUx.png"; public string miner = "https://i.imgur.com/B5JS3es.png"; public string forager = "https://i.imgur.com/ohoU0Jl.png"; public string hunter = "https://i.imgur.com/w4dlc8a.png"; public string fisher = "https://i.imgur.com/ete67me.png"; public string crafter = "https://i.imgur.com/vut4FVq.png"; public string framer = "https://i.imgur.com/Rm2pezt.png"; public string medic = "https://i.imgur.com/DoIP2aL.png"; public string scavenger = "https://i.imgur.com/yn5F9Cx.png"; public string electrician = "https://i.imgur.com/0l8dux1.png"; public string demolitionist = "https://i.imgur.com/VEX9WfH.png"; public string tamer = "https://i.imgur.com/ZnKAIAR.png"; public string chicken = "https://i.imgur.com/qJYzAZ6.png"; public string boar = "https://i.imgur.com/ou1DgxE.png"; public string stag = "https://i.imgur.com/CwACyuG.png"; public string wolf = "https://i.imgur.com/J18C2Je.png"; public string bear = "https://i.imgur.com/kTbD3B1.png"; public string polarbear = "https://i.imgur.com/Shk1sza.png"; public string archery = "https://i.imgur.com/qdm8AWg.png"; public string wizardry = "https://i.imgur.com/aNuEdni.png"; public string online = "https://i.imgur.com/WafMLkk.png"; public string offline = "https://i.imgur.com/QtbFqQz.png"; public string backpack = "https://i.imgur.com/zJbJpwx.png"; public string xp = "https://i.imgur.com/u46vNfo.png"; public string level = "https://i.imgur.com/2ouaBoh.png"; public string armor = "https://i.imgur.com/mEr59mA.png"; public string level0 = "https://i.imgur.com/7KTHgTa.png"; public string level2 = "https://i.imgur.com/GocRCM1.png"; public string level4 = "https://i.imgur.com/KxxRouB.png"; public string level6 = "https://i.imgur.com/Dgy9X9P.png"; public string level8 = "https://i.imgur.com/IYloCuJ.png"; public string level10 = "https://i.imgur.com/Xz9ZgZ4.png"; public string dash = "https://i.imgur.com/LLKCN1n.png"; public string raideasy = "https://i.imgur.com/cAUlHlA.png"; public string raidmedium = "https://i.imgur.com/Tzhbic3.png"; public string raidhard = "https://i.imgur.com/MGNUPg0.png"; public string raidexpert = "https://i.imgur.com/bPql6Tz.png"; public string raidnightmare = "https://i.imgur.com/RpiC5dy.png"; public string profilebg = "https://i.imgur.com/DdVLKsE.png"; public string menubg = "https://i.imgur.com/DrWCba0.jpg"; public Dictionary bgimages = new Dictionary { [0] = new BackgroundImgs { name = "ProfileBG0", url = "https://i.imgur.com/DdVLKsE.png" }, [1] = new BackgroundImgs { name = "ProfileBG1", url = "https://i.imgur.com/7HH5q6x.png" }, [2] = new BackgroundImgs { name = "ProfileBG2", url = "https://i.imgur.com/GWSSyba.png" }, [3] = new BackgroundImgs { name = "ProfileBG3", url = "https://i.imgur.com/g6KLi7y.png" }, [4] = new BackgroundImgs { name = "ProfileBG4", url = "https://i.imgur.com/LSwahsy.png" }, [5] = new BackgroundImgs { name = "ProfileBG5", url = "https://i.imgur.com/c3y6F25.png" }, [6] = new BackgroundImgs { name = "ProfileBG6", url = "https://i.imgur.com/uVRGq4n.png" }, [7] = new BackgroundImgs { name = "ProfileBG7", url = "https://i.imgur.com/ax68Blw.png" }, [8] = new BackgroundImgs { name = "ProfileBG8", url = "https://i.imgur.com/UXPKSxv.png" }, [9] = new BackgroundImgs { name = "ProfileBG9", url = "https://i.imgur.com/GyEYetr.png" }, [10] = new BackgroundImgs { name = "ProfileBG10", url = "https://i.imgur.com/V8yLdZi.png" }, [11] = new BackgroundImgs { name = "ProfileBG11", url = "https://i.imgur.com/9SK3fSy.png" }, [12] = new BackgroundImgs { name = "ProfileBG12", url = "https://i.imgur.com/pSaYR95.png" }, [13] = new BackgroundImgs { name = "ProfileBG13", url = "https://i.imgur.com/b6mfm5v.png" }, [14] = new BackgroundImgs { name = "ProfileBG14", url = "https://i.imgur.com/KTCl6iw.png" } }; } public class BackgroundImgs { public string name; public string url; } public class XpLevel { public double levelstart = 25; public double levelmultiplier = 50; public int maxlevel = 500; public double levelxpboost = 0.05; public int statpointsperlvl = 1; public int skillpointsperlvl = 2; public bool alwaysearnxp = false; public bool fullhealth = false; public bool fullmetabolism = false; } public class XpLevelRanks { public bool enableresetranks = false; public bool resetallstatsskills = true; public bool allowplayerdisable = false; public bool increaselevelmultiplier = false; public double levelmultiplierincrease = 10; public int maxresetrank = 13; public bool enablerankxpboost = false; public double rankxpboost = 0.01; public bool rankstatboost = false; public double rankstatboostamount = 0.01; public int rankstatpointstart = 1; public int rankstatpointincrease = 1; public bool rankskillboost = false; public double rankskillboostamount = 0.01; public int rankskillpointstart = 2; public int rankskillpointincrease = 1; public bool keepremainingxp = true; public bool showtruelevelprofile = true; public bool showrankinchat = true; public bool showtruexpprofile = true; public bool showrankinliveui = true; public bool keepgrouponrank = true; public Dictionary ranks = new Dictionary { [0] = new Ranks { name = "Newbie", sig = "", image = "https://i.imgur.com/i6M4ZmV.png", group = "Newbies", description = "" }, [1] = new Ranks { name = "Airman", sig = "〘AMN〙", image = "https://i.imgur.com/E0NeO2R.png", group = "Airmans", description = "" }, [2] = new Ranks { name = "Airman First Class", sig = "〘A1C〙", image = "https://i.imgur.com/wYL15FW.png", group = "AirmanFirstClass", description = "" }, [3] = new Ranks { name = "Senior Airman", sig = "〘SRA〙", image = "https://i.imgur.com/egqFVW5.png", group = "SeniorAirman", description = "" }, [4] = new Ranks { name = "Staff Sergeant", sig = "〘SSGT〙", image = "https://i.imgur.com/pL6jbXM.png", group = "StaffSergeant", description = "" }, [5] = new Ranks { name = "Technical Sergeant", sig = "〘TSGT〙", image = "https://i.imgur.com/XrtmWAn.png", group = "TechnicalSergeant", description = "" }, [6] = new Ranks { name = "Master Sergeant", sig = "〘MSGT〙", image = "https://i.imgur.com/muYU6lf.png", group = "MasterSergeant", description = "" }, [7] = new Ranks { name = "First Sergeant", sig = "〘1stSGT〙", image = "https://i.imgur.com/1OJ2zso.png", group = "FirstSergeant", description = "" }, [8] = new Ranks { name = "Senior Master Sergeant", sig = "〘SMSGT〙", image = "https://i.imgur.com/zmNiE20.png", group = "SeniorMasterSergeant", description = "" }, [9] = new Ranks { name = "Senior First Sergeant", sig = "〘S1stSGT〙", image = "https://i.imgur.com/1S7Z0cO.png", group = "SeniorFirstSergeant", description = "" }, [10] = new Ranks { name = "Chief Master Sergeant", sig = "〘CMSGT〙", image = "https://i.imgur.com/V6dQMJL.png", group = "ChiefMasterSergeant", description = "" }, [11] = new Ranks { name = "Chief First Sergeant", sig = "〘C1stSGT〙", image = "https://i.imgur.com/Dm6B08J.png", group = "ChiefFirstSergeant", description = "" }, [12] = new Ranks { name = "Command Chief Master Sergeant", sig = "〘CCMSGT〙", image = "https://i.imgur.com/wE5C1w8.png", group = "CommandChiefMasterSergeant", description = "" }, [13] = new Ranks { name = "Chief Master Sergeant of the Server", sig = "〘CMSGTS〙", image = "https://i.imgur.com/UdqLO7a.png", group = "ChiefMasterSergeantoftheServer", description = "" } }; } public class RankBoostsSettings { // Stats #region Stats // Mentality public bool researchcost = true; public bool researchspeed = true; // Dexterity public bool block = true; public bool armor = true; // Captaincy public bool distance = true; //Might public bool meleedmg = true; public bool metabolism = true; #endregion // Skills #region Skills // WoodCutter public bool woodcuttergr = true; public bool woodcutterbonus = true; // Smithy public bool smithypr = true; public bool smithyps = true; public bool smithyfc = true; public bool smithyhqmc = true; public bool smithyhqma = true; // Miner public bool minergr = true; public bool minerbonus = true; public bool minermfc = true; public bool minerfuel = true; public bool minermfa = true; // Fisher public bool fisherfa = true; public bool fisheria = true; public bool fisherotr = true; // Forager public bool foragergr = true; public bool foragergwa = true; public bool foragerric = true; // Hunter public bool huntergr = true; public bool hunterbonus = true; public bool hunterdmg = true; public bool hunterndmg = true; // Crafter public bool crafterspeed = true; public bool craftercost = true; public bool crafterri = true; public bool crafterrc = true; public bool craftercc = true; public bool crafterca = true; // Framer public bool framerucost = true; public bool framerrcost = true; // Medic public bool medicrevivala = true; public bool medicrecovera = true; public bool medictools = true; // Scavenger public bool scavelc = true; public bool scavelm = true; public bool scavcic = true; public bool scavcim = true; #endregion } public class Ranks { public string name; public string sig; public string image; public string group; public string description; } public class SpecialGroups { public Dictionary specialgroups = new Dictionary { [0] = new Specialgroups { groupname = "Player XP Boost", permissionname = "PlayerXPBoost", grouppriority = 1, xpboost = 0.10, dailyxplimit = 0, dailystatlimitboost = 0, dailyskilllimitboost = 0 }, [1] = new Specialgroups { groupname = "Player Daily Limits 01", permissionname = "PlayerDailyLimits01", grouppriority = 2, xpboost = 0, dailyxplimit = 1000, dailystatlimitboost = 2, dailyskilllimitboost = 2 }, [2] = new Specialgroups { groupname = "Player Daily Limits 02", permissionname = "PlayerDailyLimits02", grouppriority = 3, xpboost = 0, dailyxplimit = 2000, dailystatlimitboost = 4, dailyskilllimitboost = 4 }, }; } public class Specialgroups { public string groupname; public string permissionname; public int grouppriority; public double xpboost; public int dailyxplimit; public int dailystatlimitboost; public int dailyskilllimitboost; } public class DailyTimer { public int dailyresettimerhours = 24; public DateTime lastdailyreset = DateTime.Now; } public class DailyXpLimit { public bool enabledailyxplimit = false; public int dailyxplimit = 5000; public int dailyxplimitvip = 7500; public int limitmultipliertype = 1; public int limitmultiplier = 2; public double limitpercentage = 0.10; } public class DailyResetLimit { public bool enabledailyresetlimit = false; public int dailystatlimit = 5; public int dailystatlimitvip = 10; public int dailyskilllimit = 5; public int dailyskilllimitvip = 10; } public class NightBonus { public bool Enable = true; public int StartTime = 19; public int EndTime = 5; public double Bonus = 0.10; public bool enableskillboosts = true; } public class XpGain { public double chickenxp = 5; public double fishxp = 5; public double boarxp = 10; public double stagxp = 15; public double wolfxp = 20; public double bearxp = 25; public double polarbearxp = 25; public double sharkxp = 30; public double horsexp = 20; public double scientistxp = 25; public double sc_full = 25; public double sc_heavy = 25; public double sc_cargo = 25; public double sc_junkpile = 25; public double sc_oilrig = 25; public double sc_patrol = 25; public double sc_peacekeeper = 25; public double sc_roam = 25; public double dwellerxp = 25; public double tunneldwellerxp = 25; public double underwaterdwellerxp = 25; public double scarecrownpc = 25; public double customnpc = 25; public double zombienpc = 25; public double playerxp = 25; public double lootcontainerxp = 5; public double lootbarrel = 5; public double oilbarrel = 5; public double vehicleparts = 5; public double toolcrate = 5; public double normalcrate = 5; public double elitecrate = 5; public double foodcrate = 5; public double medicalcrate = 5; public double animalharvestxp = 5; public double corpseharvestxp = 5; public double underwaterlootcontainerxp = 10; public double lockedcratexp = 25; public double hackablecratexp = 50; public double craftingxp = 5; public bool craftingxpdelay = true; public double craftingxpdelayseconds = 10; public double bradley = 25; public double patrolhelicopter = 30; public double turretxp = 5; public bool allowturretxp = false; public double playerrevive = 5; public bool enablexpboost = false; public double xpboostamount = 0.05; public int xpboostorder = 1; public double gifts = 5; public double opengifts = 5; public double opengiftsmed = 10; public double opengiftslarge = 15; public double upgradegiftsmed = 10; public double upgradegiftslarge = 15; public double craftmeal = 10; } public class XpGather { public double treexp = 5; public double orexp = 5; public double metalorexp = 7; public double stoneorexp = 5; public double sulfurorexp = 6; public double harvestxp = 5; public double plantxp = 5; public bool noxptools = true; public bool onetimexp = false; public double toolxpchance = 0.20; public double toolxppercent = 0.10; } public class XpBuilding { public double twigstructure = 2; public double woodstructure = 5; public double stonestructure = 10; public double metalstructure = 15; public double armoredstructure = 20; public bool preventBGxp = false; public bool buildxpdelay = false; public bool requirebuildingprivlidge = true; public int buildxpdelayseconds = 2; public bool reducexp = false; public double buildxpreduction = 0.25; } public class XpTeams { public bool enableteamxpgain = true; public bool enableteamxploss = true; public double teamxpgainamount = 0.10; public double teamxplossamount = 0.05; public float teamdistance = 50f; } public class XpMissions { public double missionsucceededxp = 50; public bool missionfailed = false; public double missionfailedxp = 10; } public class XpReducer { public bool suicidereduce = true; public double suicidereduceamount = 5; public bool deathreduce = true; public double deathreduceamount = 5; public bool rankdeathreduce = false; } public class XpBonus { public bool showkrbutton = false; public bool enablebonus = false; public int requiredkills = 10; public double bonusxp = 5; public int endbonus = 500; public bool multibonus = true; public string multibonustype = "fixed"; } public class XpEcon { public bool showbalanceprofile = true; public bool econlevelup = false; public bool econleveldown = false; public bool econresetstats = false; public bool econresetskills = false; public bool econresetstat = false; public bool econresetskill = false; public double econlevelreward = 50; public double econlevelreduction = 25; public double econresetstatscost = 100; public double econresetskillscost = 100; public double econresetstatcost = 50; public double econresetskillcost = 50; public bool econstatlevelcost = false; public bool econskilllevelcost = false; public double econstatlevelcostmultiplier = 0; public double econskilllevelcostmultiplier = 0; public double econmentality = 100; public double econdexterity = 100; public double econmight = 100; public double econcaptaincy = 100; public double econweaponry = 100; public double econninjary = 100; public double econwoodcutter = 100; public double econsmithy = 100; public double econminer = 100; public double econforager = 100; public double econhunter = 100; public double econfisher = 100; public double econcrafter = 100; public double econframer = 100; public double econmedic = 100; public double econscavenger = 100; public double econelectrician = 100; public double econdemolitionist = 100; public double econtamer = 100; } public class SRewards { public bool srewardlevelup = false; public bool srewardleveldown = false; public bool srewardresetstats = false; public bool srewardresetskills = false; public bool srewardresetstat = false; public bool srewardresetskill = false; public int srewardlevelupamt = 5; public int srewardleveldownamt = 5; public int srewardresetstatscost = 50; public int srewardresetskillscost = 50; public int srewardresetstatcost = 25; public int srewardresetskillcost = 25; public bool srewardstatlevelcost = false; public bool srewardskilllevelcost = false; public int srewardstatlevelcostmultiplier = 0; public int srewardskilllevelcostmultiplier = 0; public int srewardmentality = 50; public int srewarddexterity = 50; public int srewardmight = 50; public int srewardcaptaincy = 50; public int srewardweaponry = 50; public int srewardninjary = 50; public int srewardwoodcutter = 50; public int srewardsmithy = 50; public int srewardminer = 50; public int srewardforager = 50; public int srewardhunter = 50; public int srewardfisher = 50; public int srewardcrafter = 50; public int srewardframer = 50; public int srewardmedic = 50; public int srewardscavenger = 50; public int srewardelectrician = 50; public int srewardemolitionist = 50; public int srewardtamer = 50; } #region Stats public class Mentality { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double researchcost = 0.10; public double researchcosttechtree = 0.10; public double researchspeed = 0.10; public double criticalchance = 0.05; public double criticaldgm = 0.1; public double damageincrease = 0.01; public bool useotherresearchmod = false; public bool locktechtree = false; public int unlocktechtreelevel = 5; } public class Dexterity { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double blockchance = 0.05; public double blockamount = 0.10; public double dodgechance = 0.05; public double reducearmordmg = 0.05; public double horsespeed = 0.05; public double boatspeed = 0.05; public double vehiclespeed = 0.05; public double fuelreduce = 0.05; } public class Might { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double armor = 0.10; public double meleedmg = 0.05; public double metabolism = 0.02; public double bleedreduction = 0.05; public double radreduction = 0.05; public double heattolerance = 0.05; public double coldtolerance = 0.05; //public bool enablestacking = false; //public int stackmultiplier = 2; } public class Captaincy { public int maxlvl = 10; public int pointcoststart = 4; public int costmultiplier = 4; public bool allownoteam = false; public double skillboost = 0.05; public bool enablexpboost = false; public double xpboost = 0.05; public float captaincydistance = 10f; } public class Weaponry { public int maxlvl = 10; public int pointcoststart = 4; public int costmultiplier = 4; public double reductionchance = 0.10; public double tool = 0.05; public double powertools = 0.03; public double meleeweapons = 0.05; public double projectileweapons = 0.02; public double mindamage = 0.10; public double maxammo = 0.10; public double maxammolimit = 2; public bool skinboxdisable = true; public bool neverweartools = false; public bool neverwearweapons = false; public string reloadhook = "OnMagazineReload"; public string excludedweapons = ""; public bool useweaponmechanics = false; } public class Ninjary { public int maxlvl = 10; public int pointcoststart = 4; public int costmultiplier = 4; public double patrolstealth = 0.10; public double ch47stealth = 0.10; public double bradleystealth = 0.10; public double npcstealth = 0.10; public double turretstealth = 0.10; public double knifeincrease = 0.10; public double swordincrease = 0.10; } #endregion #region Skills public class Woodcutter { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double gatherrate = 0.5; public double bonusincrease = 0.10; public double applechance = 0.10; } public class Smithy { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double productionrate = 0.10; public double productionspeed = 0.10; public double fuelconsumption = 0.10; public double metalchance = 0.05; public int metalamount = 1; } public class Miner { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double gatherrate = 0.5; public double bonusincrease = 0.10; public double fuelconsumption = 0.10; public double metalchance = 0.10; public int metalamount = 1; } public class Forager { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double gatherrate = 0.3; public double chanceincrease = 0.10; public double grubwormincrease = 0.10; public double randomchance = 0.05; public Dictionary randomChanceList = new Dictionary { [0] = new RandomChanceList { shortname = "apple", displayname = "", SkinID = 0, amount = 1 }, [1] = new RandomChanceList { shortname = "bandage", displayname = "", SkinID = 0, amount = 1 }, [2] = new RandomChanceList { shortname = "scrap", displayname = "", SkinID = 0, amount = 1 }, [3] = new RandomChanceList { shortname = "bucket.water", displayname = "", SkinID = 0, amount = 1 }, [4] = new RandomChanceList { shortname = "metal.fragments", displayname = "", SkinID = 0, amount = 1 } }; } public class RandomChanceList { public string shortname = ""; public string displayname = ""; public ulong SkinID = 0; public int amount = 1; } public class Hunter { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double gatherrate = 0.3; public double bonusincrease = 0.10; public double damageincrease = 0.05; public double nightdmgincrease = 0.01; public double bowdmgincrease = 0.01; public bool excludelongrangeweapons = false; public bool excludemedrangeweapons = false; } public class Fisher { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double fishamountincrease = 0.75; public double itemamountincrease = 0.25; public double oxygenreduction = 0.04; public double oxygentankreduction = 0.05; } public class Crafter { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double craftspeed = 0.10; public double craftcost = 0.05; public double repairincrease = 0.07; public double repaircost = 0.05; public double conditionchance = 0.07; public double conditionamount = 0.10; } public class Framer { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double upgradecost = 0.05; public double repaircost = 0.05; public double repairtime = 0.10; public int woodcost = 200; public int stonecost = 300; public int metalcost = 200; public int armorcost = 50; } public class Electrician { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public int solarpaneldefault = 20; public int smallbatterydefault = 10; public int mediumbatterydefault = 50; public int largebatterydefault = 100; public int smallgeneratordefault = 40; public int testgeneratordefault = 100; public int electricwindmilldefault = 150; public double solarpanelinputincrease = 0.10; public double solarpanelmaxincrease = 0.10; public double smallbatterymaxincrease = 0.10; public double mediumbatterymaxincrease = 0.10; public double largebatterymaxincrease = 0.10; public double smallgeneratormaxincrease = 0.10; public double testgeneratormaxincrease = 0.10; public double electricwindmillincrease = 0.10; public double electricwindmillmaxincrease = 0.10; public bool allowminsolarinput = false; public int minsolarinput = 1; } public class Demolitionist { public int maxlvl = 10; public int pointcoststart = 4; public int costmultiplier = 3; public double explosivedudreduction = 0.10; public double explosivedamage = 0.10; public double explosiveradius = 0.10; } public class Medic { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double revivehp = 5; public double recoverhp = 5; public double crafttime = 0.10; public double tools = 2; public double teas = 0.02; public bool preventbandageboost = false; } public class Scavenger { public int maxlvl = 10; public int pointcoststart = 2; public int costmultiplier = 2; public double scavlootchance = 0.10; public double scavchance = 0.05; public double scavmultiplier = 1.0; public double customscavmultiplier = 0.5; public bool customscavrandom = true; public bool usecustomscavlist = false; public bool drops = true; public bool crates = true; public bool uncrates = true; public bool lockedcrates = true; public bool hackcrates = true; public bool scientists = true; public bool componentsonly = true; public Dictionary scavChanceList = new Dictionary { [0] = new ScavChanceList { shortname = "scrap", displayname = "", SkinID = 0, amount = 1, maxamount = 10, requiredlevel = 1 }, [1] = new ScavChanceList { shortname = "metal.fragments", displayname = "", SkinID = 0, amount = 1, maxamount = 10, requiredlevel = 5 } }; } public class ScavChanceList { public string shortname = ""; public string displayname = ""; public ulong SkinID = 0; public int amount = 1; public int maxamount = 10; public int requiredlevel = 1; } public class Tamer { public bool enabletame = false; public int maxlvl = 6; public int pointcoststart = 2; public int costmultiplier = 2; public bool tamechicken = true; public bool tameboar = true; public bool tamestag = true; public bool tamewolf = true; public bool tamebear = true; public bool tamepolarbear = true; public int chickenlevel = 1; public int boarlevel = 2; public int staglevel = 3; public int wolflevel = 4; public int bearlevel = 5; public int polarbearlevel = 6; } #endregion public class SQL { public bool enablesql = false; public string SQLhost = "localhost"; public int SQLport = 3306; public string SQLdatabase = "databasename"; public string SQLusername = "username"; public string SQLpassword = "password"; } public class BackpacksMod { public bool enablebackpacks = false; public string statorskill = "might"; public bool removeonunload = false; public SortedDictionary BackPackSlots = new SortedDictionary { [0] = new BackPackSlots { level = 1, slots = 6 } }; } public class BackPackSlots { public int level; public int slots; } public class ZoneManagerMod { public string noxpgain = ""; public string noxploss = ""; public string disablestatsandskills = ""; } public class EventHelperMod { public string noxpgain = ""; public string noxploss = ""; public string disablestatsandskills = ""; } public class SurvivalArenaMod { public bool noxpgain = false; public bool noxploss = false; public bool disablestatsandskills = false; } public class RaidableBasesMod { public bool disableabilities = false; public bool noxploss = false; public bool noxpgain = false; } protected override void LoadDefaultConfig() => config = new Configuration(); protected override void LoadConfig() { base.LoadConfig(); try { config = Config.ReadObject(); if (config == null) { throw new JsonException(); } if (MaybeUpdateConfig(config)) { PrintWarning("Configuration appears to be outdated; updating and saving"); SaveConfig(); } } catch { PrintWarning($"Configuration file {Name}.json is invalid; using defaults"); LoadDefaultConfig(); } } protected override void SaveConfig() { PrintWarning($"Configuration changes saved to {Name}.json"); Config.WriteObject(config, true); } #region UpdateChecker public class SerializableConfiguration { public string ToJson() => JsonConvert.SerializeObject(this); public Dictionary ToDictionary() => JsonHelper.Deserialize(ToJson()) as Dictionary; } private static class JsonHelper { public static object Deserialize(string json) => ToObject(JToken.Parse(json)); private static object ToObject(JToken token) { switch (token.Type) { case JTokenType.Object: return token.Children().ToDictionary(prop => prop.Name, prop => ToObject(prop.Value)); case JTokenType.Array: return token.Select(ToObject).ToList(); default: return ((JValue)token).Value; } } } private bool MaybeUpdateConfig(SerializableConfiguration config) { var currentWithDefaults = config.ToDictionary(); var currentRaw = Config.ToDictionary(x => x.Key, x => x.Value); return MaybeUpdateConfigDict(currentWithDefaults, currentRaw); } private bool MaybeUpdateConfigDict(Dictionary currentWithDefaults, Dictionary currentRaw) { bool changed = false; foreach (var key in currentWithDefaults.Keys) { object currentRawValue; if (currentRaw.TryGetValue(key, out currentRawValue)) { var defaultDictValue = currentWithDefaults[key] as Dictionary; var currentDictValue = currentRawValue as Dictionary; if (defaultDictValue != null) { if (currentDictValue == null) { currentRaw[key] = currentWithDefaults[key]; changed = true; } else if (MaybeUpdateConfigDict(defaultDictValue, currentDictValue)) changed = true; } } else { currentRaw[key] = currentWithDefaults[key]; changed = true; } } return changed; } #endregion #endregion #region Storage private void SaveData() { if (_xpData != null) { _xpData.XPerience = _xperienceCache; _XPerienceData.WriteObject(_xpData); } if (_dailyData != null) { _dailyData.DailyXPerience = _dailyxperienceCache; _DailyXPerienceData.WriteObject(_dailyData); } if (_lootData != null) { _lootData.LootRecords = _lootCache; _LootContainData.WriteObject(_lootData); } if (_corpseData != null) { _corpseData.CorpseRecords = _corpseCache; _CorpseContainData.WriteObject(_corpseData); } if (_horseData != null) { _horseData.HorseRecords = _horseCache; _HorseData.WriteObject(_horseData); } if (_weaponData != null) { _weaponData.WeaponRecords = _weaponCache; _WeaponData.WriteObject(_weaponData); } if (_boatData != null) { _boatData.BoatRecords = _boatCache; _BoatData.WriteObject(_boatData); } if (_vehicleData != null) { _vehicleData.VehicleRecords = _vehicleCache; _VehicleData.WriteObject(_vehicleData); } if (_minicopterData != null) { _minicopterData.MinicopterRecords = _minicopterCache; _MinicopterData.WriteObject(_minicopterData); } if (_snowmobData != null) { _snowmobData.SnowmobRecords = _snowmobCache; _SnowmobData.WriteObject(_snowmobData); } if (_smithyData != null) { _smithyData.SmithyRecords = _smithyCache; _SmithyData.WriteObject(_smithyData); } if (_electricianData != null) { _electricianData.ElectricianRecords = _electricianCache; _ElectricianData.WriteObject(_electricianData); } } private void LoadData() { try { _xpData = _XPerienceData.ReadObject(); _xperienceCache = _xpData.XPerience; } catch { _xpData = new XPData(); } try { _dailyData = _DailyXPerienceData.ReadObject(); _dailyxperienceCache = _dailyData.DailyXPerience; } catch { _dailyData = new DailyData(); } try { _lootData = _LootContainData.ReadObject(); _lootCache = _lootData.LootRecords; } catch { _lootData = new LootData(); } try { _corpseData = _CorpseContainData.ReadObject(); _corpseCache = _corpseData.CorpseRecords; } catch { _corpseData = new CorpseData(); } try { _horseData = _HorseData.ReadObject(); _horseCache = _horseData.HorseRecords; } catch { _horseData = new HorseData(); } try { _weaponData = _WeaponData.ReadObject(); _weaponCache = _weaponData.WeaponRecords; } catch { _weaponData = new WeaponData(); } try { _boatData = _BoatData.ReadObject(); _boatCache = _boatData.BoatRecords; } catch { _boatData = new BoatData(); } try { _vehicleData = _VehicleData.ReadObject(); _vehicleCache = _vehicleData.VehicleRecords; } catch { _vehicleData = new VehicleData(); } try { _minicopterData = _MinicopterData.ReadObject(); _minicopterCache = _minicopterData.MinicopterRecords; } catch { _minicopterData = new MinicopterData(); } try { _snowmobData = _SnowmobData.ReadObject(); _snowmobCache = _snowmobData.SnowmobRecords; } catch { _snowmobData = new SnowmobData(); } try { _smithyData = _SmithyData.ReadObject(); _smithyCache = _smithyData.SmithyRecords; } catch { _smithyData = new SmithyData(); } try { _electricianData = _ElectricianData.ReadObject(); _electricianCache = _electricianData.ElectricianRecords; } catch { _electricianData = new ElectricianData(); } } public class XPData { public Dictionary XPerience = new Dictionary(); } public class XPRecord { public int rank; public int truelevel; public int trueexperience; public double level; public double experience; public double requiredxp; public int statpoint; public int skillpoint; public int Mentality; public int MentalityP; public int Dexterity; public int DexterityP; public int Might; public int MightP; public int Captaincy; public int CaptaincyP; public int Weaponry; public int WeaponryP; public int Ninjary; public int NinjaryP; public int WoodCutter; public int WoodCutterP; public int Smithy; public int SmithyP; public int Miner; public int MinerP; public int Forager; public int ForagerP; public int Hunter; public int HunterP; public int Fisher; public int FisherP; public int Crafter; public int CrafterP; public int Framer; public int FramerP; public int Electrician; public int ElectricianP; public int Medic; public int MedicP; public int Scavenger; public int ScavengerP; public int Demolitionist; public int DemolitionistP; public int Tamer; public int TamerP; public int Wood; public int Stone; public int Metal; public int Sulfur; public int Cactus; public int Berries; public int Pumpkin; public int Potato; public int Corn; public int Mushroom; public int Hemp; public int Seed; public bool Status; public bool DisableRank; public int UILocation; public string teatype; public double teacooldown; public DateTime resettimerstats; public DateTime resettimerskills; public DateTime playerfixdata; public int dash; public int dmgbar; public int profilebg; public bool fuelgauge; public bool speedometer; public int speedometertype; public bool enableconfirmationprompt; public bool showchatnotifications; public bool showchatprofileonconnect; public bool showwelcomepanel; public bool showchatxp; public bool exclude; public bool raidablebase; public string displayname; public string id; } public class DailyData { public Dictionary DailyXPerience = new Dictionary(); } public class DailyRecord { public double dailyexperience; public int dailystatresets; public int dailyskillresets; public DateTime lastexperiencereset; public DateTime laststatreset; public DateTime lastskillreset; } private class LootData { public Dictionary LootRecords = new Dictionary(); } private class Loot { public List id; } private class CorpseData { public Dictionary CorpseRecords = new Dictionary(); } private class Corpse { public ulong corpsecontainer; public List id; } private class HorseData { public Dictionary HorseRecords = new Dictionary(); } private class Horse { public ulong horse; public float maxSpeed; public float runSpeed; public float walkSpeed; public float trotSpeed; public ulong player; } private class WeaponData { public Dictionary WeaponRecords = new Dictionary(); } private class Weapon { public int defaultammo; public int maxammo; public double defaultreload; public double newreload; public double defaultdistance; public double maxdistance; public double defaultrange; public double maxrange; public ulong player; public NetworkableId weapondata; } private class BoatData { public Dictionary BoatRecords = new Dictionary(); } private class Boat { public ulong boat; public float defaultSpeed; public ulong player; } private class VehicleData { public Dictionary VehicleRecords = new Dictionary(); } private class Vehicle { public ulong vehicle; public float maxDriveSlip; public float reversePercentSpeed; public float driveForceToMaxSlip; public ulong player; } private class MinicopterData { public Dictionary MinicopterRecords = new Dictionary(); } private class MiniCopterP { public ulong minicopter; public float maxRotorSpeed; public ulong player; } private class SnowmobData { public Dictionary SnowmobRecords = new Dictionary(); } private class Snowmob { public ulong snowmob; public float terrain; public double engineKW; public ulong player; } private class SmithyData { public Dictionary SmithyRecords = new Dictionary(); } private class SmithyD { public string resource; public float time; } private class ElectricianData { public Dictionary ElectricianRecords = new Dictionary(); } private class ElectricianD { public ulong id; public string type; public int defaultmaxoutput; public int newmaxoutput; public ulong owner; } private class HeliHits { public Dictionary HeliRecords = new Dictionary(); } private class Heli { public ulong heli; public ulong player; } #endregion #region SQL private readonly Core.MySql.Libraries.MySql sqlLibrary = Interface.Oxide.GetLibrary(); Connection sqlConnection; private string RemoveSpecialCharacters(string name) { string newname = Regex.Replace(name, @"[^0-9a-zA-Z]+", ""); return newname; } private void CreatSQLTable() { sqlLibrary.Insert(Sql.Builder.Append($"CREATE TABLE IF NOT EXISTS XPerience (" + $" `id` BIGINT(255) NOT NULL AUTO_INCREMENT," + $" `steamid` BIGINT(255) NOT NULL," + $" `displayname` VARCHAR(255) NOT NULL," + $" `PlayerRank` BIGINT(255) NOT NULL," + $" `RankName` VARCHAR(255) NOT NULL," + $" `RankSig` VARCHAR(255) NOT NULL," + $" `RankImg` VARCHAR(255) NOT NULL," + $" `RankLevel` BIGINT(255) NOT NULL," + $" `RankXP` BIGINT(255) NOT NULL," + $" `level` BIGINT(255) NOT NULL," + $" `experience` BIGINT(255) NOT NULL," + $" `requiredxp` BIGINT(255) NOT NULL," + $" `statpoint` BIGINT(255) NOT NULL," + $" `skillpoint` BIGINT(255) NOT NULL," + $" `Mentality` BIGINT(255) NOT NULL," + $" `MentalityP` BIGINT(255) NOT NULL," + $" `Dexterity` BIGINT(255) NOT NULL," + $" `DexterityP` BIGINT(255) NOT NULL," + $" `Might` BIGINT(255) NOT NULL," + $" `MightP` BIGINT(255) NOT NULL," + $" `Captaincy` BIGINT(255) NOT NULL," + $" `CaptaincyP` BIGINT(255) NOT NULL," + $" `Weaponry` BIGINT(255) NOT NULL," + $" `WeaponryP` BIGINT(255) NOT NULL," + $" `Ninjary` BIGINT(255) NOT NULL," + $" `NinjaryP` BIGINT(255) NOT NULL," + $" `WoodCutter` BIGINT(255) NOT NULL," + $" `WoodCutterP` BIGINT(255) NOT NULL," + $" `Smithy` BIGINT(255) NOT NULL," + $" `SmithyP` BIGINT(255) NOT NULL," + $" `Miner` BIGINT(255) NOT NULL," + $" `MinerP` BIGINT(255) NOT NULL," + $" `Forager` BIGINT(255) NOT NULL," + $" `ForagerP` BIGINT(255) NOT NULL," + $" `Hunter` BIGINT(255) NOT NULL," + $" `HunterP` BIGINT(255) NOT NULL," + $" `Fisher` BIGINT(255) NOT NULL," + $" `FisherP` BIGINT(255) NOT NULL," + $" `Crafter` BIGINT(255) NOT NULL," + $" `CrafterP` BIGINT(255) NOT NULL," + $" `Framer` BIGINT(255) NOT NULL," + $" `FramerP` BIGINT(255) NOT NULL," + $" `Medic` BIGINT(255) NOT NULL," + $" `MedicP` BIGINT(255) NOT NULL," + $" `Scavenger` BIGINT(255) NOT NULL," + $" `ScavengerP` BIGINT(255) NOT NULL," + $" `Electrician` BIGINT(255) NOT NULL," + $" `ElectricianP` BIGINT(255) NOT NULL," + $" `Demolitionist` BIGINT(255) NOT NULL," + $" `DemolitionistP` BIGINT(255) NOT NULL," + $" `Tamer` BIGINT(255) NOT NULL," + $" `TamerP` BIGINT(255) NOT NULL," + $" `Wood` BIGINT(255) NOT NULL," + $" `Stone` BIGINT(255) NOT NULL," + $" `Metal` BIGINT(255) NOT NULL," + $" `Sulfur` BIGINT(255) NOT NULL," + $" `Cactus` BIGINT(255) NOT NULL," + $" `Berries` BIGINT(255) NOT NULL," + $" `Pumpkin` BIGINT(255) NOT NULL," + $" `Potato` BIGINT(255) NOT NULL," + $" `Corn` BIGINT(255) NOT NULL," + $" `Mushroom` BIGINT(255) NOT NULL," + $" `Hemp` BIGINT(255) NOT NULL," + $" `Seed` BIGINT(255) NOT NULL," + $" `Status` VARCHAR(255) NOT NULL," + $"PRIMARY KEY (id)" + $" )ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;"), sqlConnection); } private void UpdateSQLTable() { try { bool rank = false; bool rankname = false; bool ranksig = false; bool rankimg = false; bool ranklevel = false; bool rankxp = false; bool wood = false; bool stone = false; bool metal = false; bool sulfur = false; bool cactus = false; bool berries = false; bool pumpkin = false; bool potato = false; bool corn = false; bool mushroom = false; bool hemp = false; bool seed = false; bool status = false; bool scavenger = false; bool scavengerp = false; bool electrician = false; bool electricianp = false; bool demolistionist = false; bool demolistionistp = false; bool captaincy = false; bool captaincyp = false; bool weaponry = false; bool weaponryp = false; bool Ninjary = false; bool Ninjaryp = false; bool medic = false; bool medicp = false; sqlLibrary.Query(Sql.Builder.Append($"SELECT * FROM XPerience"), sqlConnection, list => { foreach (var entry in list) { if (entry.ContainsKey("Rank")) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience CHANGE `Rank` `PlayerRank` BIGINT(255) NOT NULL"), sqlConnection); } if (!entry.ContainsKey("PlayerRank")) { rank = true; } if (!entry.ContainsKey("RankName")) { rankname = true; } if (!entry.ContainsKey("RankSig")) { ranksig = true; } if (!entry.ContainsKey("RankImg")) { rankimg = true; } if (!entry.ContainsKey("RankLevel")) { ranklevel = true; } if (!entry.ContainsKey("RankXP")) { rankxp = true; } if (!entry.ContainsKey("Wood")) { wood = true; } if (!entry.ContainsKey("Stone")) { stone = true; } if (!entry.ContainsKey("Metal")) { metal = true; } if (!entry.ContainsKey("Sulfur")) { sulfur = true; } if (!entry.ContainsKey("Cactus")) { cactus = true; } if (!entry.ContainsKey("Berries")) { berries = true; } if (!entry.ContainsKey("Pumpkin")) { pumpkin = true; } if (!entry.ContainsKey("Potato")) { potato = true; } if (!entry.ContainsKey("Corn")) { corn = true; } if (!entry.ContainsKey("Mushroom")) { mushroom = true; } if (!entry.ContainsKey("Hemp")) { hemp = true; } if (!entry.ContainsKey("Seed")) { seed = true; } if (!entry.ContainsKey("Status")) { status = true; } if (!entry.ContainsKey("Scavenger")) { scavenger = true; } if (!entry.ContainsKey("ScavengerP")) { scavengerp = true; } if (!entry.ContainsKey("Electrician")) { electrician = true; } if (!entry.ContainsKey("ElectricianP")) { electricianp = true; } if (!entry.ContainsKey("Demolitionist")) { demolistionist = true; } if (!entry.ContainsKey("DemolitionistP")) { demolistionistp = true; } if (!entry.ContainsKey("Captaincy")) { captaincy = true; } if (!entry.ContainsKey("CaptaincyP")) { captaincyp = true; } if (!entry.ContainsKey("Weaponry")) { weaponry = true; } if (!entry.ContainsKey("WeaponryP")) { weaponryp = true; } if (!entry.ContainsKey("Ninjary")) { Ninjary = true; } if (!entry.ContainsKey("NinjaryP")) { Ninjaryp = true; } if (!entry.ContainsKey("Medic")) { medic = true; } if (!entry.ContainsKey("MedicP")) { medicp = true; } } if (rank) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `PlayerRank` BIGINT(255) NOT NULL AFTER displayname"), sqlConnection); } if (rankname) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `RankName` VARCHAR(255) NOT NULL AFTER PlayerRank"), sqlConnection); } if (ranksig) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `RankSig` VARCHAR(255) NOT NULL AFTER RankName"), sqlConnection); } if (rankimg) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `RankImg` VARCHAR(255) NOT NULL AFTER RankSig"), sqlConnection); } if (ranklevel) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `RankLevel` BIGINT(255) NOT NULL AFTER RankImg"), sqlConnection); } if (rankxp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `RankXP` BIGINT(255) NOT NULL AFTER RankLevel"), sqlConnection); } if (wood) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Wood` BIGINT(255) NOT NULL AFTER TamerP"), sqlConnection); } if (stone) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Stone` BIGINT(255) NOT NULL AFTER Wood"), sqlConnection); } if (metal) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Metal` BIGINT(255) NOT NULL AFTER Stone"), sqlConnection); } if (sulfur) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Sulfur` BIGINT(255) NOT NULL AFTER Metal"), sqlConnection); } if (cactus) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Cactus` BIGINT(255) NOT NULL AFTER Sulfur"), sqlConnection); } if (berries) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Berries` BIGINT(255) NOT NULL AFTER Cactus"), sqlConnection); } if (pumpkin) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Pumpkin` BIGINT(255) NOT NULL AFTER Berries"), sqlConnection); } if (potato) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Potato` BIGINT(255) NOT NULL AFTER Pumpkin"), sqlConnection); } if (corn) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Corn` BIGINT(255) NOT NULL AFTER Potato"), sqlConnection); } if (mushroom) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Mushroom` BIGINT(255) NOT NULL AFTER Corn"), sqlConnection); } if (hemp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Hemp` BIGINT(255) NOT NULL AFTER Mushroom"), sqlConnection); } if (seed) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Seed` BIGINT(255) NOT NULL AFTER Hemp"), sqlConnection); } if (status) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Status` VARCHAR(255) NOT NULL AFTER Seed"), sqlConnection); } if (scavenger) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Scavenger` BIGINT(255) NOT NULL DEFAULT '0' AFTER MedicP"), sqlConnection); } if (scavengerp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `ScavengerP` BIGINT(255) NOT NULL DEFAULT '0' AFTER Scavenger"), sqlConnection); } if (electrician) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Electrician` BIGINT(255) NOT NULL DEFAULT '0' AFTER ScavengerP"), sqlConnection); } if (electricianp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `ElectricianP` BIGINT(255) NOT NULL DEFAULT '0' AFTER Electrician"), sqlConnection); } if (demolistionist) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Demolitionist` BIGINT(255) NOT NULL DEFAULT '0' AFTER ElectricianP"), sqlConnection); } if (demolistionistp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `DemolitionistP` BIGINT(255) NOT NULL DEFAULT '0' AFTER Demolitionist"), sqlConnection); } if (captaincy) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Captaincy` BIGINT(255) NOT NULL DEFAULT '0' AFTER MightP"), sqlConnection); } if (captaincyp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `CaptaincyP` BIGINT(255) NOT NULL DEFAULT '0' AFTER Captaincy"), sqlConnection); } if (weaponry) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Weaponry` BIGINT(255) NOT NULL DEFAULT '0' AFTER CaptaincyP"), sqlConnection); } if (weaponryp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `WeaponryP` BIGINT(255) NOT NULL DEFAULT '0' AFTER Weaponry"), sqlConnection); } if (Ninjary) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Ninjary` BIGINT(255) NOT NULL DEFAULT '0' AFTER WeaponryP"), sqlConnection); } if (Ninjaryp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `NinjaryP` BIGINT(255) NOT NULL DEFAULT '0' AFTER Ninjary"), sqlConnection); } if (medic) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `Medic` BIGINT(255) NOT NULL DEFAULT '0' AFTER FramerP"), sqlConnection); } if (medicp) { sqlLibrary.Insert(Sql.Builder.Append($"ALTER TABLE XPerience ADD COLUMN `MedicP` BIGINT(255) NOT NULL DEFAULT '0' AFTER Medic"), sqlConnection); } }); } catch (MySqlException e) { PrintError("Failed to Update Table (" + e.Message + ")"); } } private void CreatePlayerDataSQL(BasePlayer player) { XPRecord xprecord = GetXPRecord(player); Ranks rank = GetXPRank(xprecord.rank); sqlLibrary.Insert(Sql.Builder.Append("INSERT XPerience (steamid, displayname, PlayerRank, RankName, RankSig, RankImg, RankLevel, RankXP, level, experience, requiredxp, statpoint, skillpoint, Mentality, MentalityP, Dexterity, DexterityP, Might, MightP, Captaincy, CaptaincyP, Weaponry, WeaponryP, Ninjary, NinjaryP, WoodCutter, WoodCutterP, Smithy, SmithyP, Miner, MinerP, Forager, ForagerP, Hunter, HunterP, Fisher, FisherP, Crafter, CrafterP, Framer, FramerP, Medic, MedicP, Scavenger, ScavengerP, Electrician, ElectricianP, Demolitionist, DemolitionistP, Tamer, TamerP, Wood, Stone, Metal, Sulfur, Cactus, Berries, Pumpkin, Potato, Corn, Mushroom, Hemp, Seed, Status) " + "VALUES (" + $"'{xprecord.id}', " + $"'{RemoveSpecialCharacters(xprecord.displayname)}', " + $"'{xprecord.rank}', " + $"'{RemoveSpecialCharacters(rank.name)}', " + $"'{RemoveSpecialCharacters(rank.sig)}', " + $"'{rank.image}', " + $"'{xprecord.truelevel}', " + $"'{xprecord.trueexperience}', " + $"'{xprecord.level}', " + $"'{xprecord.experience}', " + $"'{xprecord.requiredxp}', " + $"'{xprecord.statpoint}', " + $"'{xprecord.skillpoint}', " + $"'{xprecord.Mentality}', " + $"'{xprecord.MentalityP}', " + $"'{xprecord.Dexterity}', " + $"'{xprecord.DexterityP}', " + $"'{xprecord.Might}', " + $"'{xprecord.MightP}', " + $"'{xprecord.Captaincy}', " + $"'{xprecord.CaptaincyP}', " + $"'{xprecord.Weaponry}', " + $"'{xprecord.WeaponryP}', " + $"'{xprecord.Ninjary}', " + $"'{xprecord.NinjaryP}', " + $"'{xprecord.WoodCutter}', " + $"'{xprecord.WoodCutterP}', " + $"'{xprecord.Smithy}', " + $"'{xprecord.SmithyP}', " + $"'{xprecord.Miner}', " + $"'{xprecord.MinerP}', " + $"'{xprecord.Forager}', " + $"'{xprecord.ForagerP}', " + $"'{xprecord.Hunter}', " + $"'{xprecord.HunterP}', " + $"'{xprecord.Fisher}', " + $"'{xprecord.FisherP}', " + $"'{xprecord.Crafter}', " + $"'{xprecord.CrafterP}', " + $"'{xprecord.Framer}', " + $"'{xprecord.FramerP}', " + $"'{xprecord.Medic}', " + $"'{xprecord.MedicP}', " + $"'{xprecord.Scavenger}', " + $"'{xprecord.ScavengerP}', " + $"'{xprecord.Electrician}', " + $"'{xprecord.ElectricianP}', " + $"'{xprecord.Demolitionist}', " + $"'{xprecord.DemolitionistP}', " + $"'{xprecord.Tamer}', " + $"'{xprecord.TamerP}', " + $"'{xprecord.Wood}', " + $"'{xprecord.Stone}', " + $"'{xprecord.Metal}', " + $"'{xprecord.Sulfur}', " + $"'{xprecord.Cactus}', " + $"'{xprecord.Berries}', " + $"'{xprecord.Pumpkin}', " + $"'{xprecord.Potato}', " + $"'{xprecord.Corn}', " + $"'{xprecord.Mushroom}', " + $"'{xprecord.Hemp}', " + $"'{xprecord.Seed}', " + $"'{xprecord.Status}');"), sqlConnection); } private void UpdatePlayersDataSQL() { foreach (var r in _xperienceCache) { Ranks rank = GetXPRank(r.Value.rank); sqlLibrary.Update(Sql.Builder.Append($"UPDATE XPerience SET " + $"steamid='{r.Value.id}', " + $"displayname='{RemoveSpecialCharacters(r.Value.displayname)}', " + $"PlayerRank='{r.Value.rank}', " + $"RankName='{RemoveSpecialCharacters(rank.name)}', " + $"RankSig='{RemoveSpecialCharacters(rank.sig)}', " + $"RankImg='{rank.image}', " + $"RankLevel='{r.Value.truelevel}', " + $"RankXP='{r.Value.trueexperience}', " + $"level='{r.Value.level}', " + $"experience='{r.Value.experience}', " + $"requiredxp='{r.Value.requiredxp}', " + $"statpoint='{r.Value.statpoint}', " + $"skillpoint='{r.Value.skillpoint}', " + $"Mentality='{r.Value.Mentality}', " + $"MentalityP='{r.Value.MentalityP}', " + $"Dexterity='{r.Value.Dexterity}', " + $"DexterityP='{r.Value.DexterityP}', " + $"Might='{r.Value.Might}', " + $"MightP='{r.Value.MightP}', " + $"Captaincy='{r.Value.Captaincy}', " + $"CaptaincyP='{r.Value.CaptaincyP}', " + $"Weaponry='{r.Value.Weaponry}', " + $"WeaponryP='{r.Value.WeaponryP}', " + $"Ninjary='{r.Value.Ninjary}', " + $"NinjaryP='{r.Value.NinjaryP}', " + $"WoodCutter='{r.Value.WoodCutter}', " + $"WoodCutterP='{r.Value.WoodCutterP}', " + $"Smithy='{r.Value.Smithy}', " + $"SmithyP='{r.Value.SmithyP}', " + $"Miner='{r.Value.Miner}', " + $"MinerP='{r.Value.MinerP}', " + $"Forager='{r.Value.Forager}', " + $"ForagerP='{r.Value.ForagerP}', " + $"Hunter='{r.Value.Hunter}', " + $"HunterP='{r.Value.HunterP}', " + $"Fisher='{r.Value.Fisher}', " + $"FisherP='{r.Value.FisherP}', " + $"Crafter='{r.Value.Crafter}', " + $"CrafterP='{r.Value.CrafterP}', " + $"Framer='{r.Value.Framer}', " + $"FramerP='{r.Value.FramerP}', " + $"Medic='{r.Value.Medic}', " + $"MedicP='{r.Value.MedicP}', " + $"Scavenger='{r.Value.Scavenger}', " + $"ScavengerP='{r.Value.ScavengerP}', " + $"Electrician='{r.Value.Electrician}', " + $"ElectricianP='{r.Value.ElectricianP}', " + $"Demolitionist='{r.Value.Demolitionist}', " + $"DemolitionistP='{r.Value.DemolitionistP}', " + $"Tamer='{r.Value.Tamer}', " + $"TamerP='{r.Value.TamerP}', " + $"Wood='{r.Value.Wood}', " + $"Stone='{r.Value.Stone}', " + $"Metal='{r.Value.Metal}', " + $"Sulfur='{r.Value.Sulfur}', " + $"Cactus='{r.Value.Cactus}', " + $"Berries='{r.Value.Berries}', " + $"Pumpkin='{r.Value.Pumpkin}', " + $"Potato='{r.Value.Potato}', " + $"Corn='{r.Value.Corn}', " + $"Mushroom='{r.Value.Mushroom}', " + $"Hemp='{r.Value.Hemp}', " + $"Seed='{r.Value.Seed}', " + $"Status='{r.Value.Status}' " + $"WHERE steamid = '{r.Key}';"), sqlConnection); } } private void UpdatePlayerDataSQL(BasePlayer player) { XPRecord xprecord = GetXPRecord(player); Ranks rank = GetXPRank(xprecord.rank); sqlLibrary.Update(Sql.Builder.Append($"UPDATE XPerience SET " + $"steamid='{xprecord.id}', " + $"displayname='{RemoveSpecialCharacters(xprecord.displayname)}', " + $"PlayerRank='{xprecord.rank}', " + $"RankName='{RemoveSpecialCharacters(rank.name)}', " + $"RankSig='{RemoveSpecialCharacters(rank.sig)}', " + $"RankImg='{rank.image}', " + $"RankLevel='{xprecord.truelevel}', " + $"RankXP='{xprecord.trueexperience}', " + $"level='{xprecord.level}', " + $"experience='{xprecord.experience}', " + $"requiredxp='{xprecord.requiredxp}', " + $"statpoint='{xprecord.statpoint}', " + $"skillpoint='{xprecord.skillpoint}', " + $"Mentality='{xprecord.Mentality}', " + $"MentalityP='{xprecord.MentalityP}', " + $"Dexterity='{xprecord.Dexterity}', " + $"DexterityP='{xprecord.DexterityP}', " + $"Might='{xprecord.Might}', " + $"MightP='{xprecord.MightP}', " + $"Captaincy='{xprecord.Captaincy}', " + $"CaptaincyP='{xprecord.CaptaincyP}', " + $"Weaponry='{xprecord.Weaponry}', " + $"WeaponryP='{xprecord.WeaponryP}', " + $"Ninjary='{xprecord.Ninjary}', " + $"NinjaryP='{xprecord.NinjaryP}', " + $"WoodCutter='{xprecord.WoodCutter}', " + $"WoodCutterP='{xprecord.WoodCutterP}', " + $"Smithy='{xprecord.Smithy}', " + $"SmithyP='{xprecord.SmithyP}', " + $"Miner='{xprecord.Miner}', " + $"MinerP='{xprecord.MinerP}', " + $"Forager='{xprecord.Forager}', " + $"ForagerP='{xprecord.ForagerP}', " + $"Hunter='{xprecord.Hunter}', " + $"HunterP='{xprecord.HunterP}', " + $"Fisher='{xprecord.Fisher}', " + $"FisherP='{xprecord.FisherP}', " + $"Crafter='{xprecord.Crafter}', " + $"CrafterP='{xprecord.CrafterP}', " + $"Framer='{xprecord.Framer}', " + $"FramerP='{xprecord.FramerP}', " + $"Medic='{xprecord.Medic}', " + $"MedicP='{xprecord.MedicP}', " + $"Scavenger='{xprecord.Scavenger}', " + $"ScavengerP='{xprecord.ScavengerP}', " + $"Electrician='{xprecord.Electrician}', " + $"ElectricianP='{xprecord.ElectricianP}', " + $"Demolitionist='{xprecord.Demolitionist}', " + $"DemolitionistP='{xprecord.DemolitionistP}', " + $"Tamer='{xprecord.Tamer}', " + $"TamerP='{xprecord.TamerP}', " + $"Wood='{xprecord.Wood}', " + $"Stone='{xprecord.Stone}', " + $"Metal='{xprecord.Metal}', " + $"Sulfur='{xprecord.Sulfur}', " + $"Cactus='{xprecord.Cactus}', " + $"Berries='{xprecord.Berries}', " + $"Pumpkin='{xprecord.Pumpkin}', " + $"Potato='{xprecord.Potato}', " + $"Corn='{xprecord.Corn}', " + $"Mushroom='{xprecord.Mushroom}', " + $"Hemp='{xprecord.Hemp}', " + $"Seed='{xprecord.Seed}', " + $"Status='{xprecord.Status}' " + $"WHERE steamid = '{player.UserIDString}';"), sqlConnection); } private void CheckPlayerDataSQL(BasePlayer player) { bool newplayer = true; sqlLibrary.Query(Sql.Builder.Append($"SELECT steamid FROM XPerience"), sqlConnection, list => { foreach (var entry in list) { if (entry["steamid"].ToString() == player.UserIDString) { UpdatePlayerDataSQL(player); newplayer = false; } } if (newplayer) { CreatePlayerDataSQL(player); } }); } private void DeleteSQL() { sqlLibrary.Delete(Sql.Builder.Append($"DELETE FROM XPerience;"), sqlConnection); } #endregion #region Load/Save private void Init() { Unsubscribe(nameof(OnRunPlayerMetabolism)); Unsubscribe(nameof(OnPlayerDeath)); Unsubscribe(nameof(OnResearchCostDetermine)); Unsubscribe(nameof(CanUnlockTechTreeNode)); Unsubscribe(nameof(OnTechTreeNodeUnlock)); Unsubscribe(nameof(OnItemResearch)); Unsubscribe(nameof(OnEntitySpawned)); Unsubscribe(nameof(OnOutputUpdate)); Unsubscribe(nameof(OnInputUpdate)); Unsubscribe(nameof(OnSolarPanelSunUpdate)); _xperienceCache = new Dictionary(); _dailyxperienceCache = new Dictionary(); _lootCache = new Dictionary(); _corpseCache = new Dictionary(); _horseCache = new Dictionary(); _weaponCache = new Dictionary(); _boatCache = new Dictionary(); _vehicleCache = new Dictionary(); _minicopterCache = new Dictionary(); _snowmobCache = new Dictionary(); _smithyCache = new Dictionary(); _electricianCache = new Dictionary(); _heliCache = new Dictionary(); } private void OnServerInitialized() { cmd.AddChatCommand(config.playerchatCommands.openplayerstats, this, Openplayerstats); cmd.AddChatCommand(config.playerchatCommands.openplayerstats2, this, Openplayerstats); cmd.AddChatCommand(config.playerchatCommands.openplayerstats3, this, Openplayerstats); cmd.AddChatCommand(config.playerchatCommands.opentopplayers, this, Opentopplayers); cmd.AddChatCommand(config.playerchatCommands.openhelp, this, Openhelp); cmd.AddChatCommand(config.playerchatCommands.showplayerstatschat, this, Showplayerstatschat); cmd.AddChatCommand(config.playerchatCommands.playeraddstat, this, Playeraddstat); cmd.AddChatCommand(config.playerchatCommands.playeraddskill, this, Playeraddskill); cmd.AddChatCommand(config.playerchatCommands.playerresetstats, this, Playerresetstats); cmd.AddChatCommand(config.playerchatCommands.playerresetskills, this, Playerresetskills); cmd.AddChatCommand(config.playerchatCommands.playerresetall, this, Playerresetall); cmd.AddChatCommand(config.playerchatCommands.playerliveuichange, this, Playerliveuichange); cmd.AddChatCommand(config.adminchatCommands.showadminhelp, this, Showadminhelp); cmd.AddChatCommand(config.adminchatCommands.openadminpanel, this, Openadminpanel); cmd.AddChatCommand(config.adminchatCommands.adminresetxperience, this, Adminresetxperience); cmd.AddChatCommand(config.adminchatCommands.adminxpgive, this, Adminxpgive); cmd.AddChatCommand(config.adminchatCommands.adminxpgiveall, this, Adminxpgiveall); cmd.AddChatCommand(config.adminchatCommands.adminpointsgive, this, Adminpointsgive); cmd.AddChatCommand(config.adminchatCommands.adminxptake, this, Adminxptake); cmd.AddChatCommand(config.adminchatCommands.adminresetplayer, this, Adminxpresetplayer); cmd.AddChatCommand(config.adminchatCommands.adminfixdata, this, Adminfixdata); cmd.AddChatCommand(config.adminchatCommands.adminitemchange, this, Adminitemchange); cmd.AddChatCommand(config.adminchatCommands.adminresetharvest, this, AdminHarvestReset); cmd.AddChatCommand(config.adminchatCommands.adminresetlevelonly, this, AdminLevelReset); cmd.AddChatCommand(config.adminchatCommands.adminresetrankonly, this, AdminRankReset); cmd.AddChatCommand(config.adminchatCommands.adminresetstat, this, AdminStatReset); cmd.AddChatCommand(config.adminchatCommands.adminresetskill, this, AdminSkillReset); cmd.AddChatCommand(config.adminchatCommands.adminresetlevelonlyall, this, AdminLevelResetAll); cmd.AddChatCommand(config.adminchatCommands.adminresetrankonlyall, this, AdminRankResetAll); cmd.AddChatCommand(config.adminchatCommands.adminexcludeplayer, this, AdminExcludePlayer); cmd.AddChatCommand(config.adminchatCommands.admingiveitem, this, AdminGiveItem); _XPerienceData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPerience"); _DailyXPerienceData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/DailyXPerience"); _LootContainData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPLootData"); _CorpseContainData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPCorpseData"); _HorseData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPHorseData"); _WeaponData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPWeaponData"); _BoatData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPBoatData"); _VehicleData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPVehicleData"); _MinicopterData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPMinicopterData"); _SnowmobData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPSnowmobileData"); _SmithyData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPSmithyData"); _ElectricianData = Interface.Oxide.DataFileSystem.GetFile(nameof(XPerience) + "/XPElectricianData"); LoadData(); SaveData(); if (config.xpReducer.deathreduce) { Subscribe(nameof(OnPlayerDeath)); } permission.RegisterPermission(Admin, this); permission.RegisterPermission(VIP, this); permission.RegisterPermission(PermMentality, this); permission.RegisterPermission(PermDexterity, this); permission.RegisterPermission(PermMight, this); permission.RegisterPermission(PermCaptaincy, this); permission.RegisterPermission(PermWeaponry, this); permission.RegisterPermission(PermNinjary, this); permission.RegisterPermission(PermWoodCutter, this); permission.RegisterPermission(PermSmithy, this); permission.RegisterPermission(PermMiner, this); permission.RegisterPermission(PermForager, this); permission.RegisterPermission(PermHunter, this); permission.RegisterPermission(PermFisher, this); permission.RegisterPermission(PermCrafter, this); permission.RegisterPermission(PermFramer, this); permission.RegisterPermission(PermMedic, this); permission.RegisterPermission(PermScavenger, this); permission.RegisterPermission(PermElectrician, this); permission.RegisterPermission(PermDemolitionist, this); permission.RegisterPermission(PermTamer, this); permission.RegisterPermission(PermXPBoost, this); if (config.xpLevelRanks.enableresetranks) { foreach (var rank in config.xpLevelRanks.ranks) { permission.CreateGroup(rank.Value.group, rank.Value.sig, rank.Key); } } foreach (var specialgroup in config.specialGroups.specialgroups) { permission.CreateGroup(specialgroup.Value.permissionname, specialgroup.Value.groupname, specialgroup.Key); } config.backpacksmod.statorskill = config.backpacksmod.statorskill.ToLower(); Subscribe(nameof(OnRunPlayerMetabolism)); CheckOnlineStatus(); Timer checkonlinestatus = timer.Every(600f, () => { CheckOnlineStatus(); }); if (config.imageicons.rootpath == "../../oxide") { //config.imageicons.rootpath = Directory.GetCurrentDirectory().ToString(); config.imageicons.rootpath = $"{Directory.GetCurrentDirectory().ToString()}/oxide"; } if (config.imageicons.uselocalpath) { DownloadImages(); } LibraryCheck(); BasePlayer.activePlayerList.ToList().ForEach(OnPlayerConnected); if (config.sql.enablesql) { sqlConnection = sqlLibrary.OpenDb(config.sql.SQLhost, config.sql.SQLport, config.sql.SQLdatabase, config.sql.SQLusername, config.sql.SQLpassword, this); CreatSQLTable(); UpdateSQLTable(); } if (!config.mentality.useotherresearchmod) { Subscribe(nameof(OnResearchCostDetermine)); Subscribe(nameof(CanUnlockTechTreeNode)); Subscribe(nameof(OnTechTreeNodeUnlock)); Subscribe(nameof(OnItemResearch)); } if (config.electrician.maxlvl > 0) { Subscribe(nameof(OnEntitySpawned)); Subscribe(nameof(OnOutputUpdate)); Subscribe(nameof(OnInputUpdate)); Subscribe(nameof(OnSolarPanelSunUpdate)); LoadElectricianEntities(); } CheckConfigValues(); // SkinBox if (SkinBox != null) { Puts("SkinBox mod detected. Known conflict/exploit with SkinBox Skinned weapons and Weaponry stat. You can disable increase ammo due to exloits in weapnry settings."); } // BuildGrades if (BuildingGrades != null) { config.xpBuilding.buildxpdelay = true; } else { config.xpBuilding.buildxpdelay = false; config.xpBuilding.buildxpdelayseconds = 0; } // Website Help Puts("For Help Installing and Setting up XPerience check out https://www.rustlevels.com/XPerience/"); // Prevent Burnt Cookables foreach (var shortname in CookedItems) { var cookable = GetCookables(shortname); if (cookable == null) continue; lowTemps.Add(shortname, cookable.lowTemp); highTemps.Add(shortname, cookable.highTemp); cookable.lowTemp = -1; cookable.highTemp = -1; } } private void OnNewSave() { if (config.defaultOptions.wipedataonnewsave) { _xperienceCache.Clear(); _lootCache.Clear(); _XPerienceData.Clear(); _LootContainData.Clear(); _corpseCache.Clear(); _CorpseContainData.Clear(); SaveData(); if (config.sql.enablesql) { DeleteSQL(); } } } private void OnPluginLoaded(Plugin name) { if (ImageLibrary != null && name.Name == ImageLibrary.Name && !_isRestart) { _imageLibraryCheck = 0; LibraryCheck(); } } private void Unload() { foreach (var player in BasePlayer.activePlayerList) { ClearPlayerUIs(player, true, true); ClearUIs(player); if (config.backpacksmod.removeonunload) { var backpacklist = config.backpacksmod.BackPackSlots; if (backpacklist != null) { foreach (var removeoptions in backpacklist) { if (permission.UserHasPermission(player.UserIDString, $"backpacks.size.{removeoptions.Value.slots}")) permission.RevokeUserPermission(player.UserIDString, $"backpacks.size.{removeoptions.Value.slots}"); } } } } SaveData(); if (config.sql.enablesql) { UpdatePlayersDataSQL(); sqlLibrary.CloseDb(sqlConnection); } _xperienceImageList?.Clear(); // Remove Burnable Cookables foreach (KeyValuePair item in lowTemps) { var cookable = GetCookables(item.Key); if (cookable == null) continue; cookable.lowTemp = item.Value; cookable.highTemp = highTemps[item.Key]; } } private void OnServerShutdown() { _lootCache.Clear(); _LootContainData.Clear(); _corpseCache.Clear(); _CorpseContainData.Clear(); _horseCache.Clear(); _HorseData.Clear(); _boatCache.Clear(); _BoatData.Clear(); _vehicleCache.Clear(); _VehicleData.Clear(); _minicopterCache.Clear(); _MinicopterData.Clear(); SaveData(); if (config.sql.enablesql) { UpdatePlayersDataSQL(); sqlLibrary.CloseDb(sqlConnection); } } private void OnServerSave() { CheckOnlineStatus(); SaveData(); if (config.sql.enablesql) { foreach (var player in BasePlayer.allPlayerList) { CheckPlayerDataSQL(player); } UpdatePlayersDataSQL(); } } private void OnPlayerConnected(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId()) return; UpdateDisplayName(player); GetXPRecord(player); XPRecord xprecord = GetXPRecord(player); if (xprecord.level >= config.xpLevel.maxlevel && xprecord.DisableRank) { Ranks rank = GetXPRank(xprecord.rank); player.ChatMessage(XPLang("autorankoffmaxlevel", player.UserIDString, xprecord.level, rank.name)); } if (config.defaultOptions.userpermissions) { CheckStatsAndSkills(player); } DailyLimitPlayer(player); PlayerArmor(player); MightAttributes(player); if (!config.defaultOptions.liveuistatslocationmoveable) { _xperienceCache[player.UserIDString].UILocation = config.defaultOptions.liveuistatslocation; } LiveStats(player); if (config.defaultOptions.showchatprofileonconnect && xprecord.showchatprofileonconnect) { PlayerStatsChat(player); } _xperienceCache[player.UserIDString].Status = true; if (_xperienceCache[player.UserIDString].dash == 0 || _xperienceCache[player.UserIDString].dash == 2) { _xperienceCache[player.UserIDString].dash = 1; } if (_xperienceCache[player.UserIDString].speedometertype == 0) { _xperienceCache[player.UserIDString].speedometertype = 1; } if (config.xpLevelRanks.enableresetranks) { if (!config.xpLevelRanks.allowplayerdisable) { _xperienceCache[player.UserIDString].DisableRank = false; } RankCheck(player); } // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { BackPackChecks(player, config.backpacksmod.statorskill, false); } // Tamer if (PersonalAnimal != null) { PetChecks(player); } } private void OnPlayerDisconnected(BasePlayer player) { ClearPlayerUIs(player, true, true); if (config.sql.enablesql) { CheckPlayerDataSQL(player); } _xperienceCache[player.UserIDString].Status = false; } private void OnPlayerRespawn(BasePlayer player) { if (player == null) return; LiveStats(player); } private void OnPlayerRespawned(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId()) return; PlayerArmor(player); MightAttributes(player); LiveStats(player); } private void OnPlayerKicked(BasePlayer player) { _xperienceCache[player.UserIDString].Status = false; } private void CheckConfigValues() { Puts("Checking Config for invalid settings.."); bool configchanged = false; int maxranks = config.xpLevelRanks.ranks.Count - 1; if (config.xpLevelRanks.maxresetrank > maxranks) { config.xpLevelRanks.maxresetrank = maxranks; configchanged = true; } if (config.defaultOptions.topplayersperpage > 20) { config.defaultOptions.topplayersperpage = 20; configchanged = true; } if (config.xpReducer.deathreduceamount < 0) { config.xpReducer.deathreduceamount = 0; configchanged = true; } if (config.xpReducer.suicidereduceamount < 0) { config.xpReducer.suicidereduceamount = 0; configchanged = true; } Puts("Config Check Complete"); if (configchanged) { Puts("Some settings in your config were invalid and put back to default. Please check your settings and make sure they are within valid range!"); SaveConfig(); Interface.Oxide.ReloadPlugin("XPerience"); } if (!config.playerprofilesettings.profilemenuwelcome) { foreach (var player in _xperienceCache) { player.Value.showwelcomepanel = false; } } if (!config.xpLevelRanks.allowplayerdisable) { Puts("Allow Rank disable is false - Checking players for disabled ranks"); foreach (var player in _xperienceCache) { if (player.Value.DisableRank) { Puts($"Player: {player.Value.displayname} has their rank disabled, enabling now"); player.Value.DisableRank = false; } } Puts("Rank Checking Complete"); } } #endregion #region ImageLibrary private void LibraryCheck() { // Image Library Missing if (ImageLibrary == null) { PrintWarning($"ImageLibrary appears to be missing. XPerience Icons will not appear until you install ImageLibrary!"); return; } // Image Library Not Loaded if (!ImageLibrary.IsLoaded) { _imageLibraryCheck++; timer.In(300, LibraryCheck); PrintWarning("if ImageLibrary is installed, then it appears to be occupied or not loaded, will check again in 5 minutes"); return; } // Image Library Not Ready if (!ImageLibrary.Call("IsReady")) { _imageLibraryCheck++; timer.In(300, LibraryCheck); PrintWarning("ImageLibrary appears to be occupied, will check again in 5 minutes. Some icons may not appear until loaded."); return; } LoadImages(); } private void LoadImages(bool forcereload = false) { _isRestart = false; _xperienceImageList = new Dictionary(); _xperienceImageList.Add(XPerienceicon, config.imageicons.mainicon); _xperienceImageList.Add(XPeriencementality, config.imageicons.mentality); _xperienceImageList.Add(XPeriencedexterity, config.imageicons.dexterity); _xperienceImageList.Add(XPeriencemight, config.imageicons.might); _xperienceImageList.Add(XPeriencecaptaincy, config.imageicons.captaincy); _xperienceImageList.Add(XPerienceweaponry, config.imageicons.weaponry); _xperienceImageList.Add(XPerienceninjary, config.imageicons.ninjary); _xperienceImageList.Add(XPeriencewoodcutter, config.imageicons.woodcutter); _xperienceImageList.Add(XPeriencesmithy, config.imageicons.smithy); _xperienceImageList.Add(XPerienceminer, config.imageicons.miner); _xperienceImageList.Add(XPerienceforager, config.imageicons.forager); _xperienceImageList.Add(XPeriencehunter, config.imageicons.hunter); _xperienceImageList.Add(XPeriencefisher, config.imageicons.fisher); _xperienceImageList.Add(XPeriencecrafter, config.imageicons.crafter); _xperienceImageList.Add(XPerienceframer, config.imageicons.framer); _xperienceImageList.Add(XPeriencemedic, config.imageicons.medic); _xperienceImageList.Add(XPeriencescavenger, config.imageicons.scavenger); _xperienceImageList.Add(XPerienceelectrician, config.imageicons.electrician); _xperienceImageList.Add(XPeriencedemolitionist, config.imageicons.demolitionist); _xperienceImageList.Add(XPeriencetamer, config.imageicons.tamer); _xperienceImageList.Add(XPeriencechicken, config.imageicons.chicken); _xperienceImageList.Add(XPerienceboar, config.imageicons.boar); _xperienceImageList.Add(XPeriencestag, config.imageicons.stag); _xperienceImageList.Add(XPeriencewolf, config.imageicons.wolf); _xperienceImageList.Add(XPeriencebear, config.imageicons.bear); _xperienceImageList.Add(XPeriencepolarbear, config.imageicons.polarbear); _xperienceImageList.Add(XPeriencearchery, config.imageicons.archery); _xperienceImageList.Add(XPeriencewizardry, config.imageicons.wizardry); _xperienceImageList.Add(XPerienceonline, config.imageicons.online); _xperienceImageList.Add(XPerienceoffline, config.imageicons.offline); _xperienceImageList.Add(XPeriencebackpack, config.imageicons.backpack); _xperienceImageList.Add(XPeriencelevel, config.imageicons.level); _xperienceImageList.Add(XPeriencelevel0, config.imageicons.level0); _xperienceImageList.Add(XPeriencelevel2, config.imageicons.level2); _xperienceImageList.Add(XPeriencelevel4, config.imageicons.level4); _xperienceImageList.Add(XPeriencelevel6, config.imageicons.level6); _xperienceImageList.Add(XPeriencelevel8, config.imageicons.level8); _xperienceImageList.Add(XPeriencelevel10, config.imageicons.level10); _xperienceImageList.Add(XPeriencedash, config.imageicons.dash); _xperienceImageList.Add(XPeriencexp, config.imageicons.xp); _xperienceImageList.Add(XPeriencearmor, config.imageicons.armor); _xperienceImageList.Add(XPeriencelogo, config.imageicons.xperiencelogo); foreach (var rank in config.xpLevelRanks.ranks) { if (!rank.Value.image.IsNullOrEmpty() && !_xperienceImageList.ContainsKey(rank.Value.image)) { _xperienceImageList.Add(rank.Value.name, rank.Value.image); } } foreach (var bgimg in config.imageicons.bgimages) { if (!bgimg.Value.url.IsNullOrEmpty() && !_xperienceImageList.ContainsKey(bgimg.Value.url)) { _xperienceImageList.Add(bgimg.Value.name, bgimg.Value.url); } } _xperienceImageList.Add(XPerienceraideasy, config.imageicons.raideasy); _xperienceImageList.Add(XPerienceraidmedium, config.imageicons.raidmedium); _xperienceImageList.Add(XPerienceraidhard, config.imageicons.raidhard); _xperienceImageList.Add(XPerienceraidexpert, config.imageicons.raidexpert); _xperienceImageList.Add(XPerienceraidnightmare, config.imageicons.raidnightmare); _xperienceImageList.Add(XPerienceprofilebg, config.imageicons.profilebg); _xperienceImageList.Add(XPeriencemenubg, config.imageicons.menubg); if (forcereload) { ImageLibrary?.Call("ImportImageList", Name, _xperienceImageList, 0UL, true, new Action(Ready)); } else { ImageLibrary?.Call("ImportImageList", Name, _xperienceImageList, 0UL, false, new Action(Ready)); } } private void Ready() { _isXPReady = true; _xperienceImageList.Clear(); } private void DownloadImages() { if (!Directory.Exists($"{config.imageicons.rootpath}")) { Puts("Oxide Folder not found, check path"); return; } // Check & Created Folder try { // Check if image folder exists. bool folder = false; if (Directory.Exists($"{config.imageicons.rootpath}/data/XPerience/images")) { folder = true; } // Try to create the directory. if (!folder) { DirectoryInfo di = Directory.CreateDirectory($"{config.imageicons.rootpath}/data/XPerience/images"); Puts("Image folder was created successfully at {0}.", Directory.GetCreationTime($"{config.imageicons.rootpath}/data/XPerience/images")); } } catch (Exception e) { Puts("Failed to create image directory: {0}", e.ToString()); return; } // Check & Download Images #region Check & Download Images Puts("Downloading Images.."); int totalimages = 0; Dictionary _ImageList = new Dictionary(); _ImageList.Add("https://www.rustlevels.com/gameimages/XPerience.png", $"{config.imageicons.rootpath}/data/XPerience/images/XPerience.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/mentality.png", $"{config.imageicons.rootpath}/data/XPerience/images/mentality.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/dexterity.png", $"{config.imageicons.rootpath}/data/XPerience/images/dexterity.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/might.png", $"{config.imageicons.rootpath}/data/XPerience/images/might.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/weaponry.png", $"{config.imageicons.rootpath}/data/XPerience/images/weaponry.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/ninjary.png", $"{config.imageicons.rootpath}/data/XPerience/images/ninjary.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/captaincy.png", $"{config.imageicons.rootpath}/data/XPerience/images/captaincy.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/woodcutter.png", $"{config.imageicons.rootpath}/data/XPerience/images/woodcutter.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/smithy.png", $"{config.imageicons.rootpath}/data/XPerience/images/smithy.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/miner.png", $"{config.imageicons.rootpath}/data/XPerience/images/miner.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/fisher.png", $"{config.imageicons.rootpath}/data/XPerience/images/fisher.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/forager.png", $"{config.imageicons.rootpath}/data/XPerience/images/forager.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/hunter.png", $"{config.imageicons.rootpath}/data/XPerience/images/hunter.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/crafter.png", $"{config.imageicons.rootpath}/data/XPerience/images/crafter.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/framer.png", $"{config.imageicons.rootpath}/data/XPerience/images/framer.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/medic.png", $"{config.imageicons.rootpath}/data/XPerience/images/medic.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/scavenger.png", $"{config.imageicons.rootpath}/data/XPerience/images/scavenger.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/electrician.png", $"{config.imageicons.rootpath}/data/XPerience/images/electrician.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/demolitionist.png", $"{config.imageicons.rootpath}/data/XPerience/images/demolitionist.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/tamer.png", $"{config.imageicons.rootpath}/data/XPerience/images/tamer.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/chicken.png", $"{config.imageicons.rootpath}/data/XPerience/images/chicken.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/boar.png", $"{config.imageicons.rootpath}/data/XPerience/images/boar.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/stag.png", $"{config.imageicons.rootpath}/data/XPerience/images/stag.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/wolf.png", $"{config.imageicons.rootpath}/data/XPerience/images/wolf.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/bear.png", $"{config.imageicons.rootpath}/data/XPerience/images/bear.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/polarbear.png", $"{config.imageicons.rootpath}/data/XPerience/images/polarbear.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/archery.png", $"{config.imageicons.rootpath}/data/XPerience/images/archery.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/wizardry.png", $"{config.imageicons.rootpath}/data/XPerience/images/wizardry.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/online.png", $"{config.imageicons.rootpath}/data/XPerience/images/online.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/offline.png", $"{config.imageicons.rootpath}/data/XPerience/images/offline.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/backpack.png", $"{config.imageicons.rootpath}/data/XPerience/images/backpack.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/xp.png", $"{config.imageicons.rootpath}/data/XPerience/images/xp.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/level.png", $"{config.imageicons.rootpath}/data/XPerience/images/level.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/level0.png", $"{config.imageicons.rootpath}/data/XPerience/images/level0.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/level2.png", $"{config.imageicons.rootpath}/data/XPerience/images/level2.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/level4.png", $"{config.imageicons.rootpath}/data/XPerience/images/level4.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/level6.png", $"{config.imageicons.rootpath}/data/XPerience/images/level6.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/level8.png", $"{config.imageicons.rootpath}/data/XPerience/images/level8.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/level10.png", $"{config.imageicons.rootpath}/data/XPerience/images/level10.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/armor.png", $"{config.imageicons.rootpath}/data/XPerience/images/armor.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/dash.png", $"{config.imageicons.rootpath}/data/XPerience/images/dash.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/menubg.jpg", $"{config.imageicons.rootpath}/data/XPerience/images/menubg.jpg"); _ImageList.Add("https://www.rustlevels.com/gameimages/raideasy.png", $"{config.imageicons.rootpath}/data/XPerience/images/raideasy.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/raidmedium.png", $"{config.imageicons.rootpath}/data/XPerience/images/raidmedium.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/raidhard.png", $"{config.imageicons.rootpath}/data/XPerience/images/raidhard.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/raidexpert.png", $"{config.imageicons.rootpath}/data/XPerience/images/raidexpert.png"); _ImageList.Add("https://www.rustlevels.com/gameimages/raidnightmare.png", $"{config.imageicons.rootpath}/data/XPerience/images/raidnightmare.png"); foreach (var bg in config.imageicons.bgimages) { _ImageList.Add($"https://www.rustlevels.com/gameimages/{bg.Value.name}.png", $"{config.imageicons.rootpath}/data/XPerience/images/{bg.Value.name}.png"); } foreach (var rank in config.xpLevelRanks.ranks) { _ImageList.Add($"https://www.rustlevels.com/gameimages/{rank.Key}.png", $"{config.imageicons.rootpath}/data/XPerience/images/{rank.Key}.png"); } foreach (var image in _ImageList) { WebClient client = new WebClient(); if (!File.Exists(image.Value)) { client.DownloadFileAsync(new Uri(image.Key), image.Value); totalimages++; client.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(DownloadImagesCompleted); } } Puts($"{totalimages} Downloaded.."); #endregion // Update Config #region Update Config Puts("Updating URL paths to local directory..."); config.imageicons.xperiencelogo = $"file://{config.imageicons.rootpath}/data/XPerience/images/XPerience.png"; config.imageicons.mainicon = $"file://{config.imageicons.rootpath}/data/XPerience/images/XPerience.png"; config.imageicons.mentality = $"file://{config.imageicons.rootpath}/data/XPerience/images/mentality.png"; config.imageicons.dexterity = $"file://{config.imageicons.rootpath}/data/XPerience/images/dexterity.png"; config.imageicons.might = $"file://{config.imageicons.rootpath}/data/XPerience/images/might.png"; config.imageicons.weaponry = $"file://{config.imageicons.rootpath}/data/XPerience/images/weaponry.png"; config.imageicons.ninjary = $"file://{config.imageicons.rootpath}/data/XPerience/images/ninjary.png"; config.imageicons.captaincy = $"file://{config.imageicons.rootpath}/data/XPerience/images/captaincy.png"; config.imageicons.woodcutter = $"file://{config.imageicons.rootpath}/data/XPerience/images/woodcutter.png"; config.imageicons.smithy = $"file://{config.imageicons.rootpath}/data/XPerience/images/smithy.png"; config.imageicons.miner = $"file://{config.imageicons.rootpath}/data/XPerience/images/miner.png"; config.imageicons.fisher = $"file://{config.imageicons.rootpath}/data/XPerience/images/fisher.png"; config.imageicons.forager = $"file://{config.imageicons.rootpath}/data/XPerience/images/forager.png"; config.imageicons.hunter = $"file://{config.imageicons.rootpath}/data/XPerience/images/hunter.png"; config.imageicons.crafter = $"file://{config.imageicons.rootpath}/data/XPerience/images/crafter.png"; config.imageicons.framer = $"file://{config.imageicons.rootpath}/data/XPerience/images/framer.png"; config.imageicons.medic = $"file://{config.imageicons.rootpath}/data/XPerience/images/medic.png"; config.imageicons.scavenger = $"file://{config.imageicons.rootpath}/data/XPerience/images/scavenger.png"; config.imageicons.electrician = $"file://{config.imageicons.rootpath}/data/XPerience/images/electrician.png"; config.imageicons.demolitionist = $"file://{config.imageicons.rootpath}/data/XPerience/images/demolitionist.png"; config.imageicons.tamer = $"file://{config.imageicons.rootpath}/data/XPerience/images/tamer.png"; config.imageicons.chicken = $"file://{config.imageicons.rootpath}/data/XPerience/images/chicken.png"; config.imageicons.boar = $"file://{config.imageicons.rootpath}/data/XPerience/images/boar.png"; config.imageicons.stag = $"file://{config.imageicons.rootpath}/data/XPerience/images/stag.png"; config.imageicons.wolf = $"file://{config.imageicons.rootpath}/data/XPerience/images/wolf.png"; config.imageicons.bear = $"file://{config.imageicons.rootpath}/data/XPerience/images/bear.png"; config.imageicons.polarbear = $"file://{config.imageicons.rootpath}/data/XPerience/images/polarbear.png"; config.imageicons.archery = $"file://{config.imageicons.rootpath}/data/XPerience/images/archery.png"; config.imageicons.wizardry = $"file://{config.imageicons.rootpath}/data/XPerience/images/wizardry.png"; config.imageicons.online = $"file://{config.imageicons.rootpath}/data/XPerience/images/online.png"; config.imageicons.offline = $"file://{config.imageicons.rootpath}/data/XPerience/images/offline.png"; config.imageicons.backpack = $"file://{config.imageicons.rootpath}/data/XPerience/images/backpack.png"; config.imageicons.xp = $"file://{config.imageicons.rootpath}/data/XPerience/images/xp.png"; config.imageicons.level = $"file://{config.imageicons.rootpath}/data/XPerience/images/level.png"; config.imageicons.level0 = $"file://{config.imageicons.rootpath}/data/XPerience/images/level0.png"; config.imageicons.level2 = $"file://{config.imageicons.rootpath}/data/XPerience/images/level2.png"; config.imageicons.level4 = $"file://{config.imageicons.rootpath}/data/XPerience/images/level4.png"; config.imageicons.level6 = $"file://{config.imageicons.rootpath}/data/XPerience/images/level6.png"; config.imageicons.level8 = $"file://{config.imageicons.rootpath}/data/XPerience/images/level8.png"; config.imageicons.level10 = $"file://{config.imageicons.rootpath}/data/XPerience/images/level10.png"; config.imageicons.armor = $"file://{config.imageicons.rootpath}/data/XPerience/images/armor.png"; config.imageicons.dash = $"file://{config.imageicons.rootpath}/data/XPerience/images/dash.png"; config.imageicons.profilebg = $"file://{config.imageicons.rootpath}/data/XPerience/images/ProfileBG0.png"; config.imageicons.menubg = $"file://{config.imageicons.rootpath}/data/XPerience/images/menubg.jpg"; config.imageicons.raideasy = $"file://{config.imageicons.rootpath}/data/XPerience/images/raideasy.png"; config.imageicons.raidmedium = $"file://{config.imageicons.rootpath}/data/XPerience/images/raidmedium.png"; config.imageicons.raidhard = $"file://{config.imageicons.rootpath}/data/XPerience/images/raidhard.png"; config.imageicons.raidexpert = $"file://{config.imageicons.rootpath}/data/XPerience/images/raidexpert.png"; config.imageicons.raidnightmare = $"file://{config.imageicons.rootpath}/data/XPerience/images/raidnightmare.png"; foreach (var bgconfig in config.imageicons.bgimages) { bgconfig.Value.url = $"file://{config.imageicons.rootpath}/data/XPerience/images/{bgconfig.Value.name}.png"; } foreach (var rankconfig in config.xpLevelRanks.ranks) { rankconfig.Value.image = $"file://{config.imageicons.rootpath}/data/XPerience/images/{rankconfig.Key}.png"; } Puts("Image URLs updated. Saving config."); #endregion // Save & Reload Images SaveConfig(); Puts("loading Images"); if (totalimages > 0) { LoadImages(true); } else { LoadImages(); } } private void DownloadImagesCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { if (e.Cancelled) { Puts("File download cancelled."); } } #endregion #region Player / Entity Data public XPRecord GetXPRecord(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId()) return null; XPRecord xprecord; if (_xperienceCache.TryGetValue(player.UserIDString, out xprecord)) { return xprecord; } if (!_xperienceCache.TryGetValue(player.UserIDString, out xprecord)) { int dmgskin = 0; bool welcome = false; if (XPerienceAddon != null) { dmgskin = XPerienceAddon.Call("GetExtraFeatures", player, "config", "defaultdmgbarskin"); welcome = XPerienceAddon.Call("ShowWelcomePanel"); } _xperienceCache[player.UserIDString] = xprecord = new XPRecord { rank = 0, truelevel = 0, trueexperience = 0, level = 0, experience = 0, requiredxp = config.xpLevel.levelstart, statpoint = 0, skillpoint = 0, Mentality = 0, MentalityP = 0, Dexterity = 0, DexterityP = 0, Might = 0, MightP = 0, Captaincy = 0, CaptaincyP = 0, Weaponry = 0, WeaponryP = 0, Ninjary = 0, NinjaryP = 0, WoodCutter = 0, WoodCutterP = 0, Smithy = 0, SmithyP = 0, Miner = 0, MinerP = 0, Forager = 0, ForagerP = 0, Hunter = 0, HunterP = 0, Fisher = 0, FisherP = 0, Crafter = 0, CrafterP = 0, Framer = 0, FramerP = 0, Electrician = 0, ElectricianP = 0, Demolitionist = 0, DemolitionistP = 0, Medic = 0, MedicP = 0, Tamer = 0, TamerP = 0, Wood = 0, Stone = 0, Metal = 0, Sulfur = 0, Cactus = 0, Berries = 0, Pumpkin = 0, Potato = 0, Corn = 0, Mushroom = 0, Hemp = 0, Seed = 0, Status = true, DisableRank = false, UILocation = config.defaultOptions.liveuistatslocation, teatype = "none", teacooldown = 0, resettimerstats = DateTime.Now, resettimerskills = DateTime.Now, playerfixdata = DateTime.Now, dash = 1, dmgbar = dmgskin, profilebg = config.playerprofilesettings.profilebg, fuelgauge = true, speedometer = true, speedometertype = config.defaultOptions.speedometertype, enableconfirmationprompt = config.defaultOptions.enableconfirmationprompt, showchatnotifications = config.defaultOptions.showchatnotifications, showchatprofileonconnect = config.defaultOptions.showchatprofileonconnect, showwelcomepanel = false, showchatxp = false, exclude = false, raidablebase = false, }; xprecord.id = player.UserIDString; xprecord.displayname = player.displayName; } return xprecord; } public DailyRecord GetDailyRecord(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId()) return null; DailyRecord dailyrecord; if (_dailyxperienceCache.TryGetValue(player.UserIDString, out dailyrecord)) { return dailyrecord; } if (!_dailyxperienceCache.TryGetValue(player.UserIDString, out dailyrecord)) { _dailyxperienceCache[player.UserIDString] = dailyrecord = new DailyRecord { dailyexperience = 0, dailystatresets = 0, dailyskillresets = 0, lastexperiencereset = DateTime.Now, laststatreset = DateTime.Now, lastskillreset = DateTime.Now }; } return dailyrecord; } public XPRecord GetPlayerRecord(string player) { if (player == null) return null; XPRecord xprecord; if (_xperienceCache.TryGetValue(player, out xprecord)) { return xprecord; } return xprecord; } public DailyRecord GetPlayerDailyRecord(string player) { if (player == null) return null; DailyRecord dailyrecord; if (_dailyxperienceCache.TryGetValue(player, out dailyrecord)) { return dailyrecord; } return dailyrecord; } public Ranks GetXPRank(int rank) { Ranks ranks; if (config.xpLevelRanks.ranks.TryGetValue(rank, out ranks)) { return ranks; } return ranks; } public BackgroundImgs GetBGImg(int bgid) { BackgroundImgs bgimgs; if (config.imageicons.bgimages.TryGetValue(bgid, out bgimgs)) { return bgimgs; } return bgimgs; } private static BasePlayer FindPlayer(string playerid) { foreach (var activePlayer in BasePlayer.activePlayerList) { if (activePlayer.UserIDString == playerid) return activePlayer; } foreach (var sleepingPlayer in BasePlayer.sleepingPlayerList) { if (sleepingPlayer.UserIDString == playerid) return sleepingPlayer; } return null; } private BasePlayer GetOwnerPlayer(Item item) { if (item.parentItem == null) { return item.GetOwnerPlayer(); } return item.parentItem.GetOwnerPlayer(); } private void CheckOnlineStatus() { foreach (var player in _xperienceCache) { player.Value.Status = false; foreach (var online in BasePlayer.activePlayerList) { if (player.Key == online.UserIDString) { player.Value.Status = true; } } foreach (var offline in BasePlayer.sleepingPlayerList) { if (player.Key == offline.UserIDString) { player.Value.Status = false; } } } } private void CheckStatsAndSkills(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); // Stats if (xprecord.Mentality > 0 && !permission.UserHasPermission(player.UserIDString, PermMentality)) { StatReset(player, "Mentality", true); } if (xprecord.Dexterity > 0 && !permission.UserHasPermission(player.UserIDString, PermDexterity)) { StatReset(player, "Dexterity", true); } if (xprecord.Might > 0 && !permission.UserHasPermission(player.UserIDString, PermMight)) { StatReset(player, "Might", true); } if (xprecord.Weaponry > 0 && !permission.UserHasPermission(player.UserIDString, PermWeaponry)) { StatReset(player, "Weaponry", true); } if (xprecord.Ninjary > 0 && !permission.UserHasPermission(player.UserIDString, PermNinjary)) { StatReset(player, "Ninjary", true); } if (xprecord.Captaincy > 0 && !permission.UserHasPermission(player.UserIDString, PermCaptaincy)) { StatReset(player, "Captaincy", true); } // Skills if (xprecord.WoodCutter > 0 && !permission.UserHasPermission(player.UserIDString, PermWoodCutter)) { SkillReset(player, "WoodCutter", true); } if (xprecord.Smithy > 0 && !permission.UserHasPermission(player.UserIDString, PermSmithy)) { SkillReset(player, "Smithy", true); } if (xprecord.Miner > 0 && !permission.UserHasPermission(player.UserIDString, PermMiner)) { SkillReset(player, "Miner", true); } if (xprecord.Forager > 0 && !permission.UserHasPermission(player.UserIDString, PermForager)) { SkillReset(player, "Forager", true); } if (xprecord.Hunter > 0 && !permission.UserHasPermission(player.UserIDString, PermHunter)) { SkillReset(player, "Hunter", true); } if (xprecord.Crafter > 0 && !permission.UserHasPermission(player.UserIDString, PermCrafter)) { SkillReset(player, "Crafter", true); } if (xprecord.Framer > 0 && !permission.UserHasPermission(player.UserIDString, PermFramer)) { SkillReset(player, "Framer", true); } if (xprecord.Fisher > 0 && !permission.UserHasPermission(player.UserIDString, PermFisher)) { SkillReset(player, "Fisher", true); } if (xprecord.Medic > 0 && !permission.UserHasPermission(player.UserIDString, PermMedic)) { SkillReset(player, "Medic", true); } if (xprecord.Scavenger > 0 && !permission.UserHasPermission(player.UserIDString, PermScavenger)) { SkillReset(player, "Scavenger", true); } if (xprecord.Electrician > 0 && !permission.UserHasPermission(player.UserIDString, PermElectrician)) { SkillReset(player, "Electrician", true); } if (xprecord.Tamer > 0 && !permission.UserHasPermission(player.UserIDString, PermTamer)) { SkillReset(player, "Tamer", true); } } private void UpdateDisplayName(BasePlayer player) { XPRecord xprecord = GetXPRecord(player); if (xprecord.displayname != player.displayName) xprecord.displayname = player.displayName; } private void AddLootData(BasePlayer player, LootContainer lootcontainer) { Loot loot; if (!_lootCache.TryGetValue(lootcontainer.net.ID.Value, out loot)) { _lootCache.Add(lootcontainer.net.ID.Value, loot = new Loot { id = new List(), }); } if (!loot.id.Contains(player.UserIDString)) { loot.id.Add(player.UserIDString); } } private void AddHorseData(BasePlayer player, RidableHorse horse) { Horse defaulthorse; if (!_horseCache.TryGetValue(horse.net.ID.Value, out defaulthorse)) { _horseCache.Add(horse.net.ID.Value, new Horse { horse = horse.net.ID.Value, maxSpeed = horse.maxSpeed, runSpeed = horse.runSpeed, trotSpeed = horse.trotSpeed, walkSpeed = horse.walkSpeed, player = player.userID }); } } private void AddBoatData(BasePlayer player, BaseBoat boat) { Boat defaultboat; if (!_boatCache.TryGetValue(boat.net.ID.Value, out defaultboat)) { _boatCache.Add(boat.net.ID.Value, new Boat { boat = boat.net.ID.Value, defaultSpeed = boat.engineThrust, player = player.userID }); } } private void AddVehicleData(BasePlayer player, ModularCar car) { Vehicle vehicle; if (!_vehicleCache.TryGetValue(car.net.ID.Value, out vehicle)) { _vehicleCache.Add(car.net.ID.Value, new Vehicle { vehicle = car.net.ID.Value, maxDriveSlip = car.carSettings.maxDriveSlip, reversePercentSpeed = car.carSettings.reversePercentSpeed, driveForceToMaxSlip = car.carSettings.driveForceToMaxSlip, player = player.userID }); } } private void AddMiniCopterData(BasePlayer player, Minicopter mini) { MiniCopterP minicopter; if (!_minicopterCache.TryGetValue(mini.net.ID.Value, out minicopter)) { _minicopterCache.Add(mini.net.ID.Value, new MiniCopterP { minicopter = mini.net.ID.Value, //maxRotorSpeed = mini.maxRotorSpeed, player = player.userID }); } } private void AddSnowMobData(BasePlayer player, Snowmobile snowmob) { Snowmob getsnowmob; if (!_snowmobCache.TryGetValue(snowmob.net.ID.Value, out getsnowmob)) { _snowmobCache.Add(snowmob.net.ID.Value, new Snowmob { snowmob = snowmob.net.ID.Value, terrain = snowmob.badTerrainDrag, engineKW = snowmob.engineKW, player = player.userID }); } } private void AddWeaponData(BasePlayer player, BaseProjectile projectile, int defaultammo, int maxammo, double defaultreload, double newreload, double defaultdistance, double maxdistance, double defaultrange, double maxrange, NetworkableId weapondata) { Weapon weapon; if (!_weaponCache.TryGetValue(projectile.net.ID.Value, out weapon)) { _weaponCache.Add(projectile.net.ID.Value, new Weapon { defaultammo = defaultammo, maxammo = maxammo, defaultreload = defaultreload, newreload = newreload, defaultdistance = defaultdistance, maxdistance = maxdistance, defaultrange = defaultrange, maxrange = maxrange, player = player.userID, weapondata = weapondata }); } } private void AddCorpseData(BasePlayer player, LootableCorpse corpse) { Corpse corpseid; if (!_corpseCache.TryGetValue(corpse.net.ID.Value, out corpseid)) { _corpseCache.Add(corpse.net.ID.Value, corpseid = new Corpse { corpsecontainer = corpse.net.ID.Value, id = new List(), }); } if (!corpseid.id.Contains(player.UserIDString)) { corpseid.id.Add(player.UserIDString); } } private void AddSmithyData(string resource, float time) { SmithyD getsmithyd; if (!_smithyCache.TryGetValue(resource, out getsmithyd)) { _smithyCache.Add(resource, new SmithyD { resource = resource, time = time }); } } private void AddElectricianData(ulong id, string type, int defaultmaxoutput, int newmaxoutput, ulong owner) { ElectricianD getid; if (!_electricianCache.TryGetValue(id, out getid)) { _electricianCache.Add(id, new ElectricianD { id = id, type = type, defaultmaxoutput = defaultmaxoutput, newmaxoutput = newmaxoutput, owner = owner }); } } private double GetPlayerCooldown(ulong userID, string type) { double playerCooldown; double currentTime = CurrentTime; double gettime = 0; switch (type) { case "build": if (_buildCooldowns.TryGetValue(userID, out playerCooldown)) gettime = currentTime > playerCooldown ? 0 : playerCooldown - CurrentTime; break; case "craft": if (_craftCooldowns.TryGetValue(userID, out playerCooldown)) gettime = currentTime > playerCooldown ? 0 : playerCooldown - CurrentTime; break; case "notify": if (_notifyCooldowns.TryGetValue(userID, out playerCooldown)) gettime = currentTime > playerCooldown ? 0 : playerCooldown - CurrentTime; break; } return gettime; } private double GetTeaCooldown(BasePlayer player) { XPRecord xprecord = GetXPRecord(player); if (xprecord.teacooldown == 0) return 0; double currentTime = CurrentTime; return currentTime > xprecord.teacooldown ? 0 : xprecord.teacooldown - CurrentTime; } private string GetTeaTypes(BasePlayer player) { XPRecord xprecord = GetXPRecord(player); if (xprecord.teatype == "none") return "none"; return xprecord.teatype; } #endregion #region Chat private bool BetterChatActv() => (BetterChat != null && BetterChat.IsLoaded); private bool ColouredChatAct() => (ColouredChat != null && ColouredChat.IsLoaded); private bool IQChatAct() => (IQChat != null && IQChat.IsLoaded); private object OnPlayerChat(BasePlayer player, string message, Chat.ChatChannel channel) { if (BetterChatActv() || ColouredChatAct() || IQChatAct()) return null; if (player == null || message == null) return null; if (!config.xpLevelRanks.showrankinchat && !config.defaultOptions.showlevelinchat) return null; XPRecord xprecord = GetXPRecord(player); string showrank = ""; string showlevel = ""; bool displayrank = false; bool displaylevel = false; if (config.xpLevelRanks.showrankinchat) { string rcolor = ColorConverter(config.uitextColor.rankname).ToString(); Ranks rank = GetXPRank(xprecord.rank); showrank = $"{rank.sig}"; displayrank = true; } if (config.defaultOptions.showlevelinchat) { string lcolor = ColorConverter(config.uitextColor.level).ToString(); showlevel = $"[{xprecord.level}]"; displaylevel = true; } if (displayrank || displaylevel) { OverrideChatMessage(player, showrank, player.displayName, showlevel, message, channel); } return true; } private void OverrideChatMessage(BasePlayer player, string ranksig, string displayname, string level, string message, Chat.ChatChannel channel) { RCon.Broadcast(RCon.LogType.Chat, new Chat.ChatEntry { Channel = channel, Message = new Regex("<[^>]*>").Replace(string.Join(" ", message), ""), UserId = player.UserIDString, Username = player.displayName, Time = Epoch.Current }); switch ((int)channel) { // Global case 0: var newglobalchat = ArrayPool.Get(3); newglobalchat[0] = (int)channel; newglobalchat[1] = player.UserIDString; foreach (BasePlayer p in BasePlayer.activePlayerList.Where(p => p.IsValid() == true)) { newglobalchat[2] = $"{ranksig}{level}{displayname}: {message}"; p.SendConsoleCommand("chat.add", newglobalchat); } ArrayPool.Free(newglobalchat); break; // Teams case 1: var newteamchat = ArrayPool.Get(3); newteamchat[0] = (int)channel; newteamchat[1] = player.UserIDString; foreach (BasePlayer p in BasePlayer.activePlayerList.Where(p => p.Team != null && player.Team != null && p.Team.teamID == player.Team.teamID && p.IsValid() == true)) { newteamchat[2] = $"{ranksig}{level} {displayname}: {message}"; p.SendConsoleCommand("chat.add", newteamchat); } ArrayPool.Free(newteamchat); break; } } private object OnBetterChat(Dictionary chat) { var player = (chat["Player"] as IPlayer).Object as BasePlayer; if (player == null) return null; XPRecord xprecord = GetXPRecord(player); string showrank = ""; string showlevel = ""; bool showchat = false; if (config.xpLevelRanks.showrankinchat && BetterChatActv()) { string rcolor = ColorConverter(config.uitextColor.rankname).ToString(); Ranks rank = GetXPRank(xprecord.rank); showrank = $"{rank.sig}"; showchat = true; } if (config.defaultOptions.showlevelinchat && BetterChatActv()) { string lcolor = ColorConverter(config.uitextColor.level).ToString(); showlevel = $"[{xprecord.level}]"; showchat = true; } if (showchat) { chat["Username"] = $"{showrank}{showlevel} {player.displayName}"; return chat; } return null; } #endregion #region Level/XP/Stat/Skill Control private void DailyLimit(bool reset = false) { if (reset) { _dailyxperienceCache.Clear(); SaveData(); foreach (var player in BasePlayer.activePlayerList) { DailyLimitPlayer(player); player.ChatMessage(XPLang("dailylimitreset", player.UserIDString, config.dailytimer.dailyresettimerhours)); } } } private void DailyLimitPlayer(BasePlayer player, bool reset = false) { DailyRecord dailyrecord = GetDailyRecord(player); // Reset Timers if (reset) { dailyrecord.dailyexperience = 0; dailyrecord.dailystatresets = 0; dailyrecord.dailyskillresets = 0; dailyrecord.lastexperiencereset = DateTime.Now; dailyrecord.laststatreset = DateTime.Now; dailyrecord.lastskillreset = DateTime.Now; player.ChatMessage(XPLang("dailylimitreset", player.UserIDString, config.dailytimer.dailyresettimerhours)); return; } // Check XP Timers var getlastxpreset = dailyrecord.lastexperiencereset - DateTime.Now; double lastxpresethours = double.Parse(getlastxpreset.Hours.ToString()); double lastxpresetmins = double.Parse(getlastxpreset.Minutes.ToString()); if ((lastxpresethours < 0 && lastxpresetmins < 0) || (lastxpresethours == 0 && lastxpresetmins < 0)) { dailyrecord.dailyexperience = 0; dailyrecord.lastexperiencereset = DateTime.Now.AddHours(config.dailytimer.dailyresettimerhours); } // Check Stat timer var getlaststatreset = dailyrecord.laststatreset - DateTime.Now; double laststatresethours = double.Parse(getlaststatreset.Hours.ToString()); double laststatresetmins = double.Parse(getlaststatreset.Minutes.ToString()); if ((laststatresethours < 0 && laststatresetmins < 0) || (laststatresethours == 0 && laststatresetmins < 0)) { dailyrecord.dailystatresets = 0; dailyrecord.laststatreset = DateTime.Now.AddHours(config.dailytimer.dailyresettimerhours); } // Check Skill Timer var getlastskillreset = dailyrecord.lastskillreset - DateTime.Now; double lastskillresethours = double.Parse(getlastskillreset.Hours.ToString()); double lastskillresetmins = double.Parse(getlastskillreset.Minutes.ToString()); if ((lastskillresethours < 0 && lastskillresetmins < 0) || (lastskillresethours == 0 && lastskillresetmins < 0)) { dailyrecord.dailyskillresets = 0; dailyrecord.lastskillreset = DateTime.Now.AddHours(config.dailytimer.dailyresettimerhours); } } public void GainExp(BasePlayer player, double e) { if (player == null || !player.userID.Get().IsSteamId()) return; if (CheckPlayerLocation(player, "noxpgain")) return; bool debug = config.defaultOptions.debugmode; if (debug) { Puts($"## GainExp ## \n Base start amount: [{e}]"); } XPRecord xprecord = GetXPRecord(player); double xplimit = 0; switch (config.dailyxpLimit.limitmultipliertype) { case 1: xplimit += config.dailyxpLimit.dailyxplimit + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitpercentage) * xprecord.level); break; case 2: xplimit += config.dailyxpLimit.dailyxplimit + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitmultiplier) * xprecord.level); break; } bool UserHasSpecialGroup = false; // Check Special Groups var highestpriority = config.specialGroups.specialgroups.Values.Max(i => i.grouppriority); var getgrouplist = config.specialGroups.specialgroups.Values.OrderByDescending(i => i.grouppriority); restart: foreach (var specialgroup in getgrouplist) { UserHasSpecialGroup = permission.UserHasGroup(player.UserIDString, specialgroup.permissionname); if (UserHasSpecialGroup && specialgroup.grouppriority == highestpriority) { double groupboost = e * specialgroup.xpboost; e += groupboost; if (specialgroup.dailyxplimit != 0) { switch (config.dailyxpLimit.limitmultipliertype) { case 1: xplimit = specialgroup.dailyxplimit + ((specialgroup.dailyxplimit * config.dailyxpLimit.limitpercentage) * xprecord.level); break; case 2: xplimit = specialgroup.dailyxplimit + ((specialgroup.dailyxplimit * config.dailyxpLimit.limitmultiplier) * xprecord.level); break; } } break; } else if (UserHasSpecialGroup && specialgroup.grouppriority != highestpriority) { highestpriority--; goto restart; } } // Check Daily XP Limits DailyLimitPlayer(player); DailyRecord dailyrecord = GetDailyRecord(player); if (config.dailyxpLimit.enabledailyxplimit) { // Check Limit and Record if (dailyrecord.dailyexperience >= xplimit && xplimit != 0) { return; } } // Check True Level if (xprecord.truelevel <= 0 || xprecord.truelevel < xprecord.level) { xprecord.truelevel = (int)xprecord.level; } // Make sure XP and True XP are not 0 and are correct if (xprecord.experience <= 0) { xprecord.experience = 0; } if (xprecord.trueexperience <= 0 || xprecord.trueexperience < xprecord.experience) { xprecord.trueexperience = (int)xprecord.experience; } // XP Boost (First) if (config.xpGain.enablexpboost && config.xpGain.xpboostorder == 1 && permission.UserHasPermission(player.UserIDString, PermXPBoost) && !UserHasSpecialGroup) { double xpboost = e * config.xpGain.xpboostamount; e += xpboost; if (debug) { Puts($"\n XP Boost (First): +{xpboost} -> [{e}]"); } } // Night Bonus if (IsNight() && config.nightBonus.Enable) { double timebonus = e * config.nightBonus.Bonus; e += timebonus; if (debug) { Puts($"\n Night Bonus: +{timebonus} -> [{e}]"); } } // Level Bonus if (xprecord.level > 0) { double leveladd = (config.xpLevel.levelxpboost * xprecord.level) * e; e += leveladd; if (debug) { Puts($"\n Level Bonus: +{leveladd} -> [{e}]"); } } // Teams if (config.xpTeams.enableteamxpgain && e != 0) { XPTeams(player, e, "addxp"); if (debug) { Puts($"\n Teams Share enabled: Sending {Math.Ceiling(e)} to Team Share for nearby team members"); } } // Captaincy if (config.captaincy.enablexpboost && e != 0) { double captaincyboost = Math.Ceiling(e * (double)CaptaincyTeamXPBoost(player)); e += captaincyboost; if (debug) { Puts($"\n Captaincy Bonus: +{captaincyboost} -> [{e}]"); } } // Ranks if (config.xpLevelRanks.enableresetranks && !xprecord.DisableRank && config.xpLevelRanks.enablerankxpboost && xprecord.rank > 0) { double rankadd = (e * config.xpLevelRanks.rankxpboost) * xprecord.rank; e += rankadd; if (debug) { Puts($"\n Rank Bonus: +{rankadd} -> [{e}]"); } } // XP Boost (Last) if (config.xpGain.enablexpboost && config.xpGain.xpboostorder == 2 && permission.UserHasPermission(player.UserIDString, PermXPBoost) && !UserHasSpecialGroup) { double xpboost = e * config.xpGain.xpboostamount; e += xpboost; if (debug) { Puts($"\n XP Boost (Last): +{xpboost} -> [{e}]"); } } // Addon Booster if (XPerienceAddon != null) { double addonbooster = e * XPerienceAddon.Call("GetBoostersAmount", player); e += addonbooster; if (debug) { Puts($"\n Addon Booster: +{addonbooster} -> [{e}]"); } } if (debug) { Puts($"\n\n All XP gains have been added, final XP amount is: [{(int)Math.Ceiling(e)}] \n"); } // Check for max rank or level and prevent level up but still award XP if allowed if ((xprecord.level >= config.xpLevel.maxlevel && !config.xpLevelRanks.enableresetranks) || (xprecord.level >= config.xpLevel.maxlevel && xprecord.rank >= config.xpLevelRanks.maxresetrank) || (xprecord.DisableRank && xprecord.level >= config.xpLevel.maxlevel)) { xprecord.level = config.xpLevel.maxlevel; if (xprecord.DisableRank && xprecord.rank < config.xpLevelRanks.maxresetrank) { return; } if (!config.xpLevelRanks.enableresetranks) { xprecord.truelevel = (int)xprecord.level; } if (config.xpLevel.alwaysearnxp) { xprecord.experience += Math.Ceiling(e); xprecord.trueexperience += (int)Math.Ceiling(e); xprecord.requiredxp = xprecord.experience; dailyrecord.dailyexperience += (int)Math.Ceiling(e); LiveStats(player); // Addon if (XPerienceAddon != null) { XPerienceAddon.Call("PlayerNotes", player, "xp", (int)Math.Ceiling(e), "XP"); } return; } else { xprecord.experience = xprecord.requiredxp; LiveStats(player); return; } } // Give the calculated XP and Update Player xprecord.experience += Math.Ceiling(e); xprecord.trueexperience += (int)Math.Ceiling(e); dailyrecord.dailyexperience += (int)Math.Ceiling(e); LiveStats(player); if (xprecord.showchatxp && e < 0) { player.ChatMessage(XPLang("plusxp", player.UserIDString, Math.Ceiling(e))); } // Addon if (XPerienceAddon != null) { XPerienceAddon.Call("PlayerNotes", player, "xp", (int)Math.Ceiling(e), "XP"); } // Level Up if (xprecord.experience >= xprecord.requiredxp) { LvlUp(player, 0, 0); } } public void GainExpBasic(BasePlayer player, double e) { if (player == null || !player.userID.Get().IsSteamId()) return; if (CheckPlayerLocation(player, "noxpgain")) return; XPRecord xprecord = GetXPRecord(player); double xplimit = 0; switch (config.dailyxpLimit.limitmultipliertype) { case 1: xplimit += config.dailyxpLimit.dailyxplimit + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitpercentage) * xprecord.level); break; case 2: xplimit += config.dailyxpLimit.dailyxplimit + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitmultiplier) * xprecord.level); break; } bool UserHasSpecialGroup = false; // Check Special Groups var highestpriority = config.specialGroups.specialgroups.Values.Max(i => i.grouppriority); var getgrouplist = config.specialGroups.specialgroups.Values.OrderByDescending(i => i.grouppriority); restart: foreach (var specialgroup in getgrouplist) { UserHasSpecialGroup = permission.UserHasGroup(player.UserIDString, specialgroup.permissionname); if (UserHasSpecialGroup && specialgroup.grouppriority == highestpriority) { double groupboost = e * specialgroup.xpboost; e += groupboost; if (specialgroup.dailyxplimit != 0) { switch (config.dailyxpLimit.limitmultipliertype) { case 1: xplimit = specialgroup.dailyxplimit + ((specialgroup.dailyxplimit * config.dailyxpLimit.limitpercentage) * xprecord.level); break; case 2: xplimit = specialgroup.dailyxplimit + ((specialgroup.dailyxplimit * config.dailyxpLimit.limitmultiplier) * xprecord.level); break; } } break; } else if (UserHasSpecialGroup && specialgroup.grouppriority != highestpriority) { highestpriority--; goto restart; } } // Check Daily XP Limits DailyLimitPlayer(player); DailyRecord dailyrecord = GetDailyRecord(player); if (config.dailyxpLimit.enabledailyxplimit) { // Check Limit and Record if (dailyrecord.dailyexperience >= xplimit && xplimit != 0) { return; } } // Check True Level if (xprecord.truelevel <= 0 || xprecord.truelevel < xprecord.level) { xprecord.truelevel = (int)xprecord.level; } // Make sure XP and True XP are not 0 and are correct if (xprecord.experience <= 0) { xprecord.experience = 0; } if (xprecord.trueexperience <= 0 || xprecord.trueexperience < xprecord.experience) { xprecord.trueexperience = (int)xprecord.experience; } // Check for max rank or level and prevent level up but still award XP if allowed if ((xprecord.level >= config.xpLevel.maxlevel && !config.xpLevelRanks.enableresetranks) || (xprecord.level >= config.xpLevel.maxlevel && xprecord.rank >= config.xpLevelRanks.maxresetrank) || (xprecord.DisableRank && xprecord.level >= config.xpLevel.maxlevel)) { xprecord.level = config.xpLevel.maxlevel; if (xprecord.DisableRank && xprecord.rank < config.xpLevelRanks.maxresetrank) { return; } if (!config.xpLevelRanks.enableresetranks) { xprecord.truelevel = (int)xprecord.level; } if (config.xpLevel.alwaysearnxp) { xprecord.experience += Math.Ceiling(e); xprecord.trueexperience += (int)Math.Ceiling(e); xprecord.requiredxp = xprecord.experience; dailyrecord.dailyexperience += (int)Math.Ceiling(e); LiveStats(player); // Addon if (XPerienceAddon != null) { XPerienceAddon.Call("PlayerNotes", player, "xp", (int)Math.Ceiling(e), "XP"); } return; } else { xprecord.experience = xprecord.requiredxp; LiveStats(player); return; } } // Give the calculated XP and Update Player xprecord.experience += Math.Ceiling(e); xprecord.trueexperience += (int)Math.Ceiling(e); dailyrecord.dailyexperience += (int)Math.Ceiling(e); LiveStats(player); // Addon if (XPerienceAddon != null) { XPerienceAddon.Call("PlayerNotes", player, "xp", (int)Math.Ceiling(e), "XP"); } // Level Up if (xprecord.experience >= xprecord.requiredxp) { LvlUp(player, 0, 0); } } private void GainExpID(string player, double e, int truexp = 0, bool reset = false) { if (player == null) return; XPRecord xprecord = GetPlayerRecord(player); if (reset) { xprecord.trueexperience = truexp; } // Check True Level if (xprecord.truelevel <= 0 || xprecord.truelevel < xprecord.level) { xprecord.truelevel = (int)xprecord.level; } // Check for max rank or level and prevent level up but still award XP if allowed if ((xprecord.level >= config.xpLevel.maxlevel && !config.xpLevelRanks.enableresetranks) || (xprecord.level >= config.xpLevel.maxlevel && xprecord.rank >= config.xpLevelRanks.maxresetrank)) { xprecord.level = config.xpLevel.maxlevel; if (config.xpLevel.alwaysearnxp) { xprecord.experience += Math.Ceiling(e); xprecord.trueexperience += (int)Math.Ceiling(e); xprecord.requiredxp = xprecord.experience; } else { xprecord.experience = xprecord.requiredxp; } return; } // Make sure XP and True XP are not 0 and are correct if (xprecord.experience <= 0) { xprecord.experience = 0; } if (xprecord.trueexperience <= 0 || xprecord.trueexperience < xprecord.experience) { xprecord.trueexperience = (int)xprecord.experience; } // Give XP and Update Player xprecord.experience += e; if (!reset) { xprecord.trueexperience += (int)e; } if (xprecord.experience >= xprecord.requiredxp) { LvlUpFix(player); } } private void GainExpAdmin(BasePlayer player, double e, int truexp = 0, bool reset = false) { if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); if (reset) { xprecord.trueexperience = truexp; } // Check True Level if (xprecord.truelevel <= 0 || xprecord.truelevel < xprecord.level) { xprecord.truelevel = (int)xprecord.level; } // Check for max rank or level and prevent level up but still award XP if allowed if ((xprecord.level >= config.xpLevel.maxlevel && !config.xpLevelRanks.enableresetranks) || (xprecord.level >= config.xpLevel.maxlevel && xprecord.rank >= config.xpLevelRanks.maxresetrank)) { xprecord.level = config.xpLevel.maxlevel; if (config.xpLevel.alwaysearnxp) { xprecord.experience += Math.Ceiling(e); xprecord.trueexperience += (int)Math.Ceiling(e); xprecord.requiredxp = xprecord.experience; LiveStats(player); } else { xprecord.experience = xprecord.requiredxp; } return; } // Make sure XP and True XP are not 0 and are correct if (xprecord.experience <= 0) { xprecord.experience = 0; } if (xprecord.trueexperience <= 0 || xprecord.trueexperience < xprecord.experience) { xprecord.trueexperience = (int)xprecord.experience; } // Give XP and Update Player xprecord.experience += e; if (!reset) { xprecord.trueexperience += (int)e; } LiveStats(player); if (xprecord.experience >= xprecord.requiredxp) { LvlUp(player, 0, 0); } } private void GainExpAdminFix(string player, double e, int truexp = 0, bool reset = false) { if (player == null) return; XPRecord xprecord = GetPlayerRecord(player); if (reset) { xprecord.trueexperience = truexp; } // Check True Level if (xprecord.truelevel <= 0 || xprecord.truelevel < xprecord.level) { xprecord.truelevel = (int)xprecord.level; } // Check for max rank or level and prevent level up but still award XP if allowed if ((xprecord.level >= config.xpLevel.maxlevel && !config.xpLevelRanks.enableresetranks) || (xprecord.level >= config.xpLevel.maxlevel && xprecord.rank >= config.xpLevelRanks.maxresetrank)) { xprecord.level = config.xpLevel.maxlevel; if (config.xpLevel.alwaysearnxp) { xprecord.experience += Math.Ceiling(e); xprecord.trueexperience += (int)Math.Ceiling(e); xprecord.requiredxp = xprecord.experience; } else { xprecord.experience = xprecord.requiredxp; } return; } // Make sure XP and True XP are not 0 and are correct if (xprecord.experience <= 0) { xprecord.experience = 0; } if (xprecord.trueexperience <= 0 || xprecord.trueexperience < xprecord.experience) { xprecord.trueexperience = (int)xprecord.experience; } // Give XP and Update Player xprecord.experience += e; if (!reset) { xprecord.trueexperience += (int)e; } if (xprecord.experience >= xprecord.requiredxp) { LvlUpFix(player); } } public void GivePoints(BasePlayer player, string type, int amount) { if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); if (amount <= 0) return; switch (type) { case "stat": xprecord.statpoint += amount; break; case "skill": xprecord.skillpoint += amount; break; } } public void GivePointsOther(string player, string type, int amount) { if (player == null) return; XPRecord xprecord = GetPlayerRecord(player); if (amount <= 0) return; switch (type) { case "stat": xprecord.statpoint += amount; break; case "skill": xprecord.skillpoint += amount; break; } } private void LvlUp(BasePlayer player, int chatstatpoint, int chatskillpoint, bool reset = false) { XPRecord xprecord = GetXPRecord(player); if ((xprecord.level >= config.xpLevel.maxlevel && !config.xpLevelRanks.enableresetranks) || (xprecord.level >= config.xpLevel.maxlevel && xprecord.rank >= config.xpLevelRanks.maxresetrank)) { xprecord.level = config.xpLevel.maxlevel; if (!config.xpLevelRanks.enableresetranks || xprecord.DisableRank) { xprecord.truelevel = (int)xprecord.level; } xprecord.experience = xprecord.requiredxp; LiveStats(player); return; } xprecord.level++; xprecord.truelevel++; if (config.xpLevelRanks.enableresetranks && !xprecord.DisableRank) { if (xprecord.rank <= 0) { xprecord.statpoint += config.xpLevel.statpointsperlvl; xprecord.skillpoint += config.xpLevel.skillpointsperlvl; chatstatpoint += config.xpLevel.statpointsperlvl; chatskillpoint += config.xpLevel.skillpointsperlvl; } else { xprecord.statpoint += config.xpLevel.statpointsperlvl + (config.xpLevelRanks.rankstatpointincrease * xprecord.rank); xprecord.skillpoint += config.xpLevel.skillpointsperlvl + (config.xpLevelRanks.rankskillpointincrease * xprecord.rank); chatstatpoint += config.xpLevel.statpointsperlvl + (config.xpLevelRanks.rankstatpointincrease * xprecord.rank); chatskillpoint += config.xpLevel.skillpointsperlvl + (config.xpLevelRanks.rankskillpointincrease * xprecord.rank); } if (xprecord.level >= config.xpLevel.maxlevel && config.xpLevelRanks.enableresetranks) { double remainingxp = xprecord.experience - xprecord.requiredxp; RankUp(player, remainingxp); return; } } else { xprecord.statpoint += config.xpLevel.statpointsperlvl; xprecord.skillpoint += config.xpLevel.skillpointsperlvl; chatstatpoint += config.xpLevel.statpointsperlvl; chatskillpoint += config.xpLevel.skillpointsperlvl; } if (xprecord.level >= config.xpLevel.maxlevel) { if (xprecord.level >= config.xpLevel.maxlevel && xprecord.DisableRank) { xprecord.requiredxp = xprecord.experience; } else { xprecord.requiredxp = config.xpLevel.levelstart; } } else { if (config.xpLevelRanks.increaselevelmultiplier) { double rankreqincrease = config.xpLevel.levelmultiplier + (config.xpLevelRanks.levelmultiplierincrease * xprecord.rank); xprecord.requiredxp = Math.Round(xprecord.requiredxp + (xprecord.level * rankreqincrease)); } else { xprecord.requiredxp = Math.Round(xprecord.requiredxp + (xprecord.level * config.xpLevel.levelmultiplier)); } } MightAttributes(player); if (xprecord.experience > xprecord.requiredxp) { LvlUp(player, chatstatpoint, chatskillpoint); return; } // Normal Chat Notify if (!config.defaultOptions.hidechatnotifications) { player.ChatMessage(XPLang("levelup", player.UserIDString, xprecord.level, chatstatpoint, chatskillpoint)); } // Econ if (Economics != null && config.xpEcon.econlevelup && !reset) { Economics.Call("Deposit", player.UserIDString, config.xpEcon.econlevelreward); player.ChatMessage(XPLang("econdeposit", player.UserIDString, config.xpEcon.econlevelreward)); } // Server Rewards if (ServerRewards != null && config.sRewards.srewardlevelup && !reset) { ServerRewards?.Call("AddPoints", player.userID, config.sRewards.srewardlevelupamt); player.ChatMessage(XPLang("srewardsup", player.UserIDString, config.sRewards.srewardlevelupamt)); } // Max health & Metabolism if (config.xpLevel.fullhealth) { player._health = player._maxHealth; } if (config.xpLevel.fullmetabolism) { player.metabolism.calories.value = player.metabolism.calories.max; player.metabolism.hydration.value = player.metabolism.hydration.max; } LiveStats(player); // Addon if (XPerienceAddon != null) { XPerienceAddon.Call("PlayerNotes", player, "level", (int)xprecord.level, "Level Reached"); XPerienceAddon?.Call("AddonDiscordLevel", player, xprecord.level); XPerienceAddon?.Call("NotifyUIBar", player, "level", "level", (int)xprecord.level); XPerienceAddon?.Call("NotifyUIBarGlobal", player, "level", "level", (int)xprecord.level); } if (config.soundEffects.levelup) { player.RunEffect($"{config.soundEffects.levelupeffect}"); } } private void LvlUpFix(string player) { XPRecord xprecord = GetPlayerRecord(player); if ((xprecord.level >= config.xpLevel.maxlevel && !config.xpLevelRanks.enableresetranks) || (xprecord.level >= config.xpLevel.maxlevel && xprecord.rank >= config.xpLevelRanks.maxresetrank)) { xprecord.level = config.xpLevel.maxlevel; if (!config.xpLevelRanks.enableresetranks || xprecord.DisableRank) { xprecord.truelevel = (int)xprecord.level; } xprecord.experience = xprecord.requiredxp; return; } xprecord.level++; xprecord.truelevel++; if (config.xpLevelRanks.enableresetranks && !xprecord.DisableRank) { if (xprecord.rank <= 0) { xprecord.statpoint += config.xpLevel.statpointsperlvl; xprecord.skillpoint += config.xpLevel.skillpointsperlvl; } else { xprecord.statpoint += config.xpLevel.statpointsperlvl + (config.xpLevelRanks.rankstatpointincrease * xprecord.rank); xprecord.skillpoint += config.xpLevel.skillpointsperlvl + (config.xpLevelRanks.rankskillpointincrease * xprecord.rank); } if (xprecord.level >= config.xpLevel.maxlevel && config.xpLevelRanks.enableresetranks) { double remainingxp = xprecord.experience - xprecord.requiredxp; RankUpFix(player, remainingxp); return; } } else { xprecord.statpoint += config.xpLevel.statpointsperlvl; xprecord.skillpoint += config.xpLevel.skillpointsperlvl; } if (xprecord.level >= config.xpLevel.maxlevel) { if (xprecord.level >= config.xpLevel.maxlevel && xprecord.DisableRank) { xprecord.requiredxp = xprecord.experience; } else { xprecord.requiredxp = config.xpLevel.levelstart; } } else { if (config.xpLevelRanks.increaselevelmultiplier) { double rankreqincrease = config.xpLevel.levelmultiplier + (config.xpLevelRanks.levelmultiplierincrease * xprecord.rank); xprecord.requiredxp = Math.Round(xprecord.requiredxp + (xprecord.level * rankreqincrease)); } else { xprecord.requiredxp = Math.Round(xprecord.requiredxp + (xprecord.level * config.xpLevel.levelmultiplier)); } } if (xprecord.experience > xprecord.requiredxp) { LvlUpFix(player); return; } } private void RankUp(BasePlayer player, double remainingxp, bool manualrank = false) { XPRecord xprecord = GetXPRecord(player); if (xprecord.rank >= config.xpLevelRanks.maxresetrank) return; xprecord.rank++; Ranks rank = GetXPRank(xprecord.rank); // Reset Level, Required XP xprecord.level = 0; if (remainingxp == 0) { remainingxp = 0; } if (config.xpLevelRanks.keepremainingxp) { xprecord.experience = remainingxp; } else { xprecord.experience = 0; } xprecord.requiredxp = config.xpLevel.levelstart; if (!config.xpLevelRanks.resetallstatsskills) { xprecord.statpoint += config.xpLevelRanks.rankstatpointstart * xprecord.rank; xprecord.skillpoint += config.xpLevelRanks.rankskillpointstart * xprecord.rank; } else { xprecord.statpoint = config.xpLevelRanks.rankstatpointstart * xprecord.rank; xprecord.skillpoint = config.xpLevelRanks.rankskillpointstart * xprecord.rank; } if (config.xpLevelRanks.resetallstatsskills) { // Reset health if needed before removing points if (xprecord.Might >= 1) { // Max Health double armor = (xprecord.Might * config.might.armor) * 100; double newmaxhealth = player._maxHealth - armor; // Change Max Health if (newmaxhealth < 100) { player._maxHealth = 100; } else { player._maxHealth = (float)newmaxhealth; } // Player Current Health double defaulthealth = 100; double teahealth = 100; bool teamodified = false; double healthdifference = 0; if (GetTeaCooldown(player) != 0) { // Check for Tea Modifier if (TeaModifiers != null && xprecord.teatype != "none") { teahealth = defaulthealth + TeaModifiers.Call("GetTeaValue", player, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } switch (GetTeaTypes(player)) { case "maxhealthtea": if (!teamodified) { teahealth = defaulthealth + 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teahealth = defaulthealth + 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teahealth = defaulthealth + 20; } break; } } if (player._health > teahealth) { healthdifference = player._health - teahealth; } player._health -= (float)healthdifference; } // Reset Stat Levels xprecord.Mentality = 0; xprecord.Dexterity = 0; xprecord.Might = 0; xprecord.Captaincy = 0; xprecord.Weaponry = 0; xprecord.Ninjary = 0; // Reset Stat Spent Points xprecord.MentalityP = 0; xprecord.DexterityP = 0; xprecord.MightP = 0; xprecord.CaptaincyP = 0; xprecord.WeaponryP = 0; xprecord.NinjaryP = 0; // Reset Skill Levels xprecord.WoodCutter = 0; xprecord.Smithy = 0; xprecord.Miner = 0; xprecord.Forager = 0; xprecord.Hunter = 0; xprecord.Fisher = 0; xprecord.Crafter = 0; xprecord.Framer = 0; xprecord.Medic = 0; xprecord.Scavenger = 0; xprecord.Electrician = 0; xprecord.Demolitionist = 0; xprecord.Tamer = 0; // Reset Skill Spents Points xprecord.WoodCutterP = 0; xprecord.SmithyP = 0; xprecord.MinerP = 0; xprecord.ForagerP = 0; xprecord.HunterP = 0; xprecord.FisherP = 0; xprecord.CrafterP = 0; xprecord.FramerP = 0; xprecord.MedicP = 0; xprecord.ScavengerP = 0; xprecord.ElectricianP = 0; xprecord.DemolitionistP = 0; xprecord.TamerP = 0; // Reset calories/hydration if needed if (player.metabolism.calories.max > 500) { player.metabolism.calories.max = 500; } if (player.metabolism.hydration.max > 250) { player.metabolism.hydration.max = 250; } } // Check/Reset RankGroup permission RankCheck(player); // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { BackPackChecks(player, config.backpacksmod.statorskill, true); } // Check/Reset Tamer permissions PetChecks(player, true); // Update Live UI LiveStats(player); if (XPerienceAddon != null) { XPerienceAddon.Call("PlayerNotes", player, "rank", xprecord.rank, rank.name); } // Notify Players player.ChatMessage(XPLang("playerrankup", player.UserIDString, rank.name, xprecord.statpoint, xprecord.skillpoint)); // AddonDiscord if (XPerienceAddon != null) { XPerienceAddon?.Call("AddonDiscordRank", player, rank.name); XPerienceAddon?.Call("NotifyUIBar", player, "rank", rank.name, xprecord.rank); XPerienceAddon?.Call("NotifyUIBarGlobal", player, "rank", rank.name, xprecord.rank); } // Check remaining XP for level Up if (xprecord.experience > xprecord.requiredxp) { LvlUp(player, 0, 0); return; } if (config.soundEffects.rankup) { player.RunEffect($"{config.soundEffects.rankupeffect}"); } if (manualrank) { ClearPlayerUIs(player, true); PlayerProfile(player); PlayerProfileMain(player); } } private void RankUpFix(string player, double remainingxp) { XPRecord xprecord = GetPlayerRecord(player); if (xprecord.rank >= config.xpLevelRanks.maxresetrank) return; xprecord.rank++; // Reset Level, Required XP xprecord.level = 0; if (config.xpLevelRanks.keepremainingxp) { xprecord.experience = remainingxp; } else { xprecord.experience = 0; } xprecord.requiredxp = config.xpLevel.levelstart; if (!config.xpLevelRanks.resetallstatsskills) { xprecord.statpoint += config.xpLevelRanks.rankstatpointstart * xprecord.rank; xprecord.skillpoint += config.xpLevelRanks.rankskillpointstart * xprecord.rank; } else { xprecord.statpoint = config.xpLevelRanks.rankstatpointstart * xprecord.rank; xprecord.skillpoint = config.xpLevelRanks.rankskillpointstart * xprecord.rank; } if (config.xpLevelRanks.resetallstatsskills) { // Reset Stat Levels xprecord.Mentality = 0; xprecord.Dexterity = 0; xprecord.Might = 0; xprecord.Captaincy = 0; xprecord.Weaponry = 0; xprecord.Ninjary = 0; // Reset Stat Spent Points xprecord.MentalityP = 0; xprecord.DexterityP = 0; xprecord.MightP = 0; xprecord.CaptaincyP = 0; xprecord.WeaponryP = 0; xprecord.NinjaryP = 0; // Reset Skill Levels xprecord.WoodCutter = 0; xprecord.Smithy = 0; xprecord.Miner = 0; xprecord.Forager = 0; xprecord.Hunter = 0; xprecord.Fisher = 0; xprecord.Crafter = 0; xprecord.Framer = 0; xprecord.Medic = 0; xprecord.Scavenger = 0; xprecord.Electrician = 0; xprecord.Demolitionist = 0; xprecord.Tamer = 0; // Reset Skill Spents Points xprecord.WoodCutterP = 0; xprecord.SmithyP = 0; xprecord.MinerP = 0; xprecord.ForagerP = 0; xprecord.HunterP = 0; xprecord.FisherP = 0; xprecord.CrafterP = 0; xprecord.FramerP = 0; xprecord.MedicP = 0; xprecord.ScavengerP = 0; xprecord.ElectricianP = 0; xprecord.DemolitionistP = 0; xprecord.TamerP = 0; } // Check for Rank Group and Assign or Revoke foreach (var rankgroup in config.xpLevelRanks.ranks) { if (xprecord.rank >= rankgroup.Key && !permission.UserHasGroup(xprecord.id, rankgroup.Value.group)) { permission.AddUserGroup(xprecord.id, rankgroup.Value.group); } if (xprecord.rank < rankgroup.Key && !permission.UserHasGroup(xprecord.id, rankgroup.Value.group)) { permission.RemoveUserGroup(xprecord.id, rankgroup.Value.group); } } // Take Backpack Permissions foreach (var removeoptions in config.backpacksmod.BackPackSlots) { if (permission.UserHasPermission(xprecord.id, $"backpacks.size.{removeoptions.Value.slots}")) permission.RevokeUserPermission(xprecord.id, $"backpacks.size.{removeoptions.Value.slots}"); } // Take Pet Permission permission.RevokeUserPermission(xprecord.id, PTameChicken); permission.RevokeUserPermission(xprecord.id, PTameBoar); permission.RevokeUserPermission(xprecord.id, PTameStag); permission.RevokeUserPermission(xprecord.id, PTameWolf); permission.RevokeUserPermission(xprecord.id, PTameBear); // Check remaining XP for level Up if (xprecord.experience > xprecord.requiredxp) { LvlUpFix(player); return; } } private void RankCheck(BasePlayer player, bool reset = false) { if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); if (!config.xpLevelRanks.enableresetranks) return; // Reset Rank Permission if (reset) { foreach (var rankgroup in config.xpLevelRanks.ranks) { if (permission.UserHasGroup(player.UserIDString, rankgroup.Value.group)) { permission.RemoveUserGroup(player.UserIDString, rankgroup.Value.group); } } return; } // Check for Rank Group and Assign or Revoke foreach (var rankgroup in config.xpLevelRanks.ranks) { if (config.xpLevelRanks.keepgrouponrank && xprecord.rank > rankgroup.Key && !permission.UserHasGroup(player.UserIDString, rankgroup.Value.group)) { permission.AddUserGroup(player.UserIDString, rankgroup.Value.group); } if (xprecord.rank == rankgroup.Key && !permission.UserHasGroup(player.UserIDString, rankgroup.Value.group)) { permission.AddUserGroup(player.UserIDString, rankgroup.Value.group); } if (xprecord.rank < rankgroup.Key && permission.UserHasGroup(player.UserIDString, rankgroup.Value.group)) { permission.RemoveUserGroup(player.UserIDString, rankgroup.Value.group); } if (!config.xpLevelRanks.keepgrouponrank && xprecord.rank > rankgroup.Key && permission.UserHasGroup(player.UserIDString, rankgroup.Value.group)) { permission.RemoveUserGroup(player.UserIDString, rankgroup.Value.group); } } } private void LoseExp(BasePlayer player, double e) { if (player == null || !player.userID.Get().IsSteamId()) return; if (CheckPlayerLocation(player, "noxploss")) return; XPRecord xprecord = GetXPRecord(player); if (e < 1) { e = 1; } // Teams if (config.xpTeams.enableteamxploss && e != 0) { XPTeams(player, e, "takexp"); } // Level Bonus Reduction if (xprecord.level > 0) { e += (config.xpLevel.levelxpboost * xprecord.level) * e; } // Rank Bonus Reduction if (xprecord.rank > 0 && config.xpReducer.rankdeathreduce) { e += (e * config.xpLevelRanks.rankxpboost) * xprecord.rank; } double newxp = xprecord.experience - Math.Ceiling(e); double newtxp = xprecord.trueexperience - Math.Ceiling(e); double nextlevel = xprecord.requiredxp; // Make sure XP does not go negative if (newxp <= 0) { newxp = 0; } if (newtxp <= 0) { newtxp = 0; } xprecord.experience = (int)newxp; xprecord.trueexperience = (int)newtxp; if (nextlevel == config.xpLevel.levelstart) return; double prevlevel = 0; if (config.xpLevelRanks.increaselevelmultiplier) { prevlevel = xprecord.requiredxp - (xprecord.level * (config.xpLevel.levelmultiplier + (config.xpLevelRanks.levelmultiplierincrease * xprecord.rank))); } else { prevlevel = xprecord.requiredxp - (xprecord.level * config.xpLevel.levelmultiplier); } if (xprecord.experience < prevlevel) { LvlDown(player); } LiveStats(player); } private void LoseExpAdmin(BasePlayer player, double e) { XPRecord xprecord = GetXPRecord(player); if (e < 1) { e = 1; } double newxp = xprecord.experience - Math.Ceiling(e); double newtxp = xprecord.trueexperience - Math.Ceiling(e); double nextlevel = xprecord.requiredxp; // Make sure XP does not go negative if (newxp <= 0) { newxp = 0; } if (newtxp <= 0) { newtxp = 0; } xprecord.experience = (int)newxp; xprecord.trueexperience = (int)newtxp; if (nextlevel == config.xpLevel.levelstart) return; double prevlevel = xprecord.requiredxp - (xprecord.level * config.xpLevel.levelmultiplier); if (xprecord.experience < prevlevel) { LvlDown(player); } LiveStats(player); //PlayerFixData(player); } private void LvlDown(BasePlayer player) { XPRecord xprecord = GetXPRecord(player); double newlevel = xprecord.level - 1; int newtruelevel = xprecord.truelevel - 1; if (newlevel == 0) return; xprecord.level = newlevel; xprecord.truelevel = newtruelevel; if (config.xpLevelRanks.increaselevelmultiplier) { double rankreqincrease = config.xpLevel.levelmultiplier + (config.xpLevelRanks.levelmultiplierincrease * xprecord.rank); xprecord.requiredxp = Math.Round(xprecord.requiredxp - (newlevel * rankreqincrease)); } else { xprecord.requiredxp = Math.Round(xprecord.requiredxp - (newlevel * config.xpLevel.levelmultiplier)); } bool removestatlvl = false; bool removeskilllvl = false; // Normal Chat Notify if (!config.defaultOptions.hidechatnotifications) { player.ChatMessage(XPLang("leveldown", player.UserIDString, xprecord.level)); } // Check if player has enough unspent stat points to take if (xprecord.statpoint >= config.xpLevel.statpointsperlvl) { //xprecord.statpoint -= config.xpLevel.statpointsperlvl; xprecord.statpoint -= config.xpLevel.statpointsperlvl + (config.xpLevelRanks.rankstatpointincrease * xprecord.rank); player.ChatMessage(XPLang("statdown", player.UserIDString, config.xpLevel.statpointsperlvl)); } else { removestatlvl = true; } // Check if player has enough unspent skill points to take if (xprecord.skillpoint >= config.xpLevel.skillpointsperlvl) { //xprecord.skillpoint -= config.xpLevel.skillpointsperlvl; xprecord.skillpoint -= config.xpLevel.skillpointsperlvl + (config.xpLevelRanks.rankskillpointincrease * xprecord.rank); player.ChatMessage(XPLang("skilldown", player.UserIDString, config.xpLevel.skillpointsperlvl)); } else { removeskilllvl = true; } // If player does not have enough unspent stat points then get first available stat to level down and remove points if (removestatlvl == true) { int allstats = xprecord.Mentality + xprecord.Dexterity + xprecord.Might + xprecord.Captaincy + xprecord.Weaponry + xprecord.Ninjary; if (allstats == 0) { xprecord.statpoint = 0; player.ChatMessage(XPLang("nostatpoints", player.UserIDString)); return; } var stat = ""; int statpoints; int pointadj = 0; bool dropmentality = false; bool dropdexterity = false; bool dropmight = false; bool dropcaptaincy = false; bool dropweaponry = false; bool dropninjary = false; // Check each stat for levels if (xprecord.Mentality > 0) { dropmentality = true; } else if (xprecord.Dexterity > 0) { dropdexterity = true; } else if (xprecord.Might > 0) { dropmight = true; } else if (xprecord.Captaincy > 0) { dropcaptaincy = true; } else if (xprecord.Weaponry > 0) { dropweaponry = true; } else if (xprecord.Ninjary > 0) { dropninjary = true; } // Random stat chosen if (dropmentality == true) { stat = "Mentality"; if (xprecord.Mentality == 1) { statpoints = config.mentality.pointcoststart; } else { statpoints = xprecord.Mentality * config.mentality.costmultiplier; } pointadj = statpoints - config.xpLevel.statpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankstatpointincrease * xprecord.rank; } xprecord.Mentality--; xprecord.MentalityP -= statpoints; xprecord.statpoint = pointadj; } else if (dropdexterity == true) { stat = "Dexterity"; if (xprecord.Dexterity == 1) { statpoints = config.dexterity.pointcoststart; } else { statpoints = (xprecord.Dexterity) * config.dexterity.costmultiplier; } pointadj = statpoints - config.xpLevel.statpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankstatpointincrease * xprecord.rank; } xprecord.Dexterity--; xprecord.DexterityP -= statpoints; xprecord.statpoint = pointadj; } else if (dropmight == true) { stat = "Might"; if (xprecord.Might == 1) { statpoints = config.might.pointcoststart; } else { statpoints = (xprecord.Might) * config.might.costmultiplier; } pointadj = statpoints - config.xpLevel.statpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankstatpointincrease * xprecord.rank; } xprecord.Might--; xprecord.MightP -= statpoints; xprecord.statpoint = pointadj; MightAttributes(player); } else if (dropcaptaincy == true) { stat = "Captaincy"; if (xprecord.Captaincy == 1) { statpoints = config.captaincy.pointcoststart; } else { statpoints = (xprecord.Captaincy) * config.captaincy.costmultiplier; } pointadj = statpoints - config.xpLevel.statpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankstatpointincrease * xprecord.rank; } xprecord.Captaincy--; xprecord.CaptaincyP -= statpoints; xprecord.statpoint = pointadj; } else if (dropweaponry == true) { stat = "Weaponry"; if (xprecord.Weaponry == 1) { statpoints = config.weaponry.pointcoststart; } else { statpoints = (xprecord.Weaponry) * config.weaponry.costmultiplier; } pointadj = statpoints - config.xpLevel.statpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankstatpointincrease * xprecord.rank; } xprecord.Weaponry--; xprecord.WeaponryP -= statpoints; xprecord.statpoint = pointadj; } else if (dropninjary == true) { stat = "Ninjary"; if (xprecord.Ninjary == 1) { statpoints = config.ninjary.pointcoststart; } else { statpoints = (xprecord.Ninjary - 1) * config.ninjary.costmultiplier; } pointadj = statpoints - config.xpLevel.statpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankstatpointincrease * xprecord.rank; } xprecord.Ninjary--; xprecord.NinjaryP -= statpoints; xprecord.statpoint = pointadj; } // Make sure points do not go negative if (xprecord.statpoint < 0) { xprecord.statpoint = 0; } player.ChatMessage(XPLang("statdownextra", player.UserIDString, stat, config.xpLevel.statpointsperlvl, pointadj)); } // If player does not have enough unspent skill points then get first available skill to level down and remove points if (removeskilllvl == true) { int allskills = xprecord.WoodCutter + xprecord.Smithy + xprecord.Miner + xprecord.Forager + xprecord.Hunter + xprecord.Fisher + xprecord.Crafter + xprecord.Framer + xprecord.Medic + xprecord.Scavenger + xprecord.Electrician + xprecord.Demolitionist + xprecord.Tamer; if (allskills == 0) { xprecord.skillpoint = 0; player.ChatMessage(XPLang("noskillpoints", player.UserIDString)); return; } var skill = ""; int skillpoints; int pointadj = 0; bool dropwoodcutter = false; bool dropsmithy = false; bool dropminer = false; bool dropforager = false; bool drophunter = false; bool dropfisher = false; bool dropcrafter = false; bool dropframer = false; bool dropmedic = false; bool dropscavenger = false; bool dropelectrician = false; bool dropdemolitionist = false; bool droptamer = false; // Check each skill for levels if (xprecord.WoodCutter > 0) { dropwoodcutter = true; } else if (xprecord.Smithy > 0) { dropsmithy = true; } else if (xprecord.Miner > 0) { dropminer = true; } else if (xprecord.Forager > 0) { dropforager = true; } else if (xprecord.Hunter > 0) { drophunter = true; } else if (xprecord.Fisher > 0) { dropfisher = true; } else if (xprecord.Crafter > 0) { dropcrafter = true; } else if (xprecord.Framer > 0) { dropframer = true; } else if (xprecord.Medic > 0) { dropmedic = true; } else if (xprecord.Scavenger > 0) { dropscavenger = true; } else if (xprecord.Electrician > 0) { dropelectrician = true; } else if (xprecord.Demolitionist > 0) { dropdemolitionist = true; } else if (xprecord.Tamer > 0) { droptamer = true; } // Random Skill Chosen if (dropwoodcutter == true) { skill = "WoodCutter"; if (xprecord.WoodCutter == 1) { skillpoints = config.woodcutter.pointcoststart; } else { skillpoints = xprecord.WoodCutter * config.woodcutter.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.WoodCutter--; xprecord.WoodCutterP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropsmithy == true) { skill = "Smithy"; if (xprecord.Smithy == 1) { skillpoints = config.smithy.pointcoststart; } else { skillpoints = xprecord.Smithy * config.smithy.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Smithy--; xprecord.SmithyP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropminer == true) { skill = "Miner"; if (xprecord.Miner == 1) { skillpoints = config.miner.pointcoststart; } else { skillpoints = xprecord.Miner * config.miner.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Miner--; xprecord.MinerP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropforager == true) { skill = "Forager"; if (xprecord.Forager == 1) { skillpoints = config.forager.pointcoststart; } else { skillpoints = xprecord.Forager * config.forager.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Forager--; xprecord.ForagerP -= skillpoints; xprecord.skillpoint = pointadj; } else if (drophunter == true) { skill = "Hunter"; if (xprecord.Hunter == 1) { skillpoints = config.hunter.pointcoststart; } else { skillpoints = xprecord.Hunter * config.hunter.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Hunter--; xprecord.HunterP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropfisher == true) { skill = "Fisher"; if (xprecord.Fisher == 1) { skillpoints = config.fisher.pointcoststart; } else { skillpoints = xprecord.Fisher * config.fisher.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Fisher--; xprecord.FisherP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropcrafter == true) { skill = "Crafter"; if (xprecord.Crafter == 1) { skillpoints = config.crafter.pointcoststart; } else { skillpoints = xprecord.Crafter * config.crafter.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Crafter--; xprecord.CrafterP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropframer == true) { skill = "Framer"; if (xprecord.Framer == 1) { skillpoints = config.framer.pointcoststart; } else { skillpoints = xprecord.Framer * config.framer.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Framer--; xprecord.FramerP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropmedic == true) { skill = "Medic"; if (xprecord.Medic == 1) { skillpoints = config.medic.pointcoststart; } else { skillpoints = xprecord.Medic * config.medic.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Medic--; xprecord.MedicP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropscavenger == true) { skill = "Scavenger"; if (xprecord.Scavenger == 1) { skillpoints = config.scavenger.pointcoststart; } else { skillpoints = xprecord.Scavenger * config.scavenger.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Scavenger--; xprecord.ScavengerP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropelectrician == true) { skill = "Electrician"; if (xprecord.Electrician == 1) { skillpoints = config.electrician.pointcoststart; } else { skillpoints = xprecord.Electrician * config.electrician.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Electrician--; xprecord.ElectricianP -= skillpoints; xprecord.skillpoint = pointadj; } else if (dropdemolitionist == true) { skill = "Demolitionist"; if (xprecord.Demolitionist == 1) { skillpoints = config.demolitionist.pointcoststart; } else { skillpoints = xprecord.Demolitionist * config.demolitionist.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Demolitionist--; xprecord.DemolitionistP -= skillpoints; xprecord.skillpoint = pointadj; } else if (droptamer == true) { skill = "Tamer"; if (xprecord.Tamer == 1) { skillpoints = config.tamer.pointcoststart; } else { skillpoints = xprecord.Tamer * config.tamer.costmultiplier; } pointadj = skillpoints - config.xpLevel.skillpointsperlvl; if (config.xpLevelRanks.enableresetranks) { pointadj -= config.xpLevelRanks.rankskillpointincrease * xprecord.rank; } xprecord.Tamer--; xprecord.TamerP -= skillpoints; xprecord.skillpoint = pointadj; NextTick(() => PetChecks(player, false)); //PetChecks(player, false, xprecord.Tamer); } // Make sure points do not go negative if (xprecord.skillpoint < 0) { xprecord.skillpoint = 0; } player.ChatMessage(XPLang("skilldownextra", player.UserIDString, skill, config.xpLevel.skillpointsperlvl, pointadj)); } // Econ if (Economics != null && config.xpEcon.econleveldown) { Economics.Call("Withdraw", player.UserIDString, config.xpEcon.econlevelreduction); player.ChatMessage(XPLang("econwidthdrawlevel", player.UserIDString, config.xpEcon.econlevelreduction)); } // Server Rewards if (ServerRewards != null && config.sRewards.srewardleveldown) { ServerRewards?.Call("TakePoints", player.userID, config.sRewards.srewardleveldownamt); player.ChatMessage(XPLang("srewardsdown", player.UserIDString, config.sRewards.srewardleveldownamt)); } //double prevlevel = Math.Round(xprecord.requiredxp / config.xpLevel.levelmultiplier); double prevlevel = xprecord.requiredxp - (xprecord.level * config.xpLevel.levelmultiplier); if (prevlevel > xprecord.experience) { LvlDown(player); } LiveStats(player); if (config.soundEffects.leveldown) { player.RunEffect($"{config.soundEffects.leveldowneffect}"); } } private void StatUp(BasePlayer player, string stat) { if (CheckPlayerLocation(player, "disablestatsandskills")) return; XPRecord xprecord = GetXPRecord(player); int nextlevel = 0; int statcost = 0; int pointsremaining; int pointsinstat; switch (stat) { case "mentality": // Check if Stat is disabled if (config.mentality.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermMentality)) return; // Check if Stat is max level if (xprecord.Mentality >= config.mentality.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, stat)); return; } // Check current level and points if (xprecord.Mentality == 0) { nextlevel = 1; statcost = config.mentality.pointcoststart; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.MentalityP + statcost; } else { nextlevel = xprecord.Mentality + 1; statcost = nextlevel * config.mentality.costmultiplier; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.MentalityP + statcost; } // Check if enough points are available to level up if (xprecord.statpoint < statcost) { player.ChatMessage(XPLang("notenoughstatpoints", player.UserIDString, nextlevel, stat, statcost)); return; } // Econ if (Economics != null && config.xpEcon.econstatlevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econmentality; if (config.xpEcon.econstatlevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econmentality * (config.xpEcon.econstatlevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, stat, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, stat, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardstatlevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardmentality; if (config.sRewards.srewardstatlevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardmentality * (config.sRewards.srewardstatlevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, stat, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, stat, points)); return; } } // Apply New Level & Update Points xprecord.Mentality = nextlevel; xprecord.statpoint = pointsremaining; xprecord.MentalityP = pointsinstat; break; case "dexterity": // Check if Stat is disabled if (config.dexterity.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermDexterity)) return; // Check if Stat is max level if (xprecord.Dexterity >= config.dexterity.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, stat)); return; } // Check current level and points if (xprecord.Dexterity == 0) { nextlevel = 1; statcost = config.dexterity.pointcoststart; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.DexterityP + statcost; } else { nextlevel = xprecord.Dexterity + 1; statcost = nextlevel * config.dexterity.costmultiplier; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.DexterityP + statcost; } // Check if enough points are available to level up if (xprecord.statpoint < statcost) { player.ChatMessage(XPLang("notenoughstatpoints", player.UserIDString, nextlevel, stat, statcost)); return; } // Econ if (Economics != null && config.xpEcon.econstatlevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econdexterity; if (config.xpEcon.econstatlevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econdexterity * (config.xpEcon.econstatlevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, stat, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, stat, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardstatlevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewarddexterity; if (config.sRewards.srewardstatlevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewarddexterity * (config.sRewards.srewardstatlevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, stat, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, stat, points)); return; } } // Apply New Level & Update Points xprecord.Dexterity = nextlevel; xprecord.statpoint = pointsremaining; xprecord.DexterityP = pointsinstat; break; case "might": // Check if Stat is disabled if (config.might.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermMight)) return; // Check if Stat is max level if (xprecord.Might >= config.might.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, stat)); return; } // Check current level and points if (xprecord.Might == 0) { nextlevel = 1; statcost = config.might.pointcoststart; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.MightP + statcost; } else { nextlevel = xprecord.Might + 1; statcost = nextlevel * config.might.costmultiplier; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.MightP + statcost; } // Check if enough points are available to level up if (xprecord.statpoint < statcost) { player.ChatMessage(XPLang("notenoughstatpoints", player.UserIDString, nextlevel, stat, statcost)); return; } // Econ if (Economics != null && config.xpEcon.econstatlevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econmight; if (config.xpEcon.econstatlevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econmight * (config.xpEcon.econstatlevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, stat, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, stat, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardstatlevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardmight; if (config.sRewards.srewardstatlevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardmight * (config.sRewards.srewardstatlevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, stat, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, stat, points)); return; } } // Apply New Level & Update Points xprecord.Might = nextlevel; xprecord.statpoint = pointsremaining; xprecord.MightP = pointsinstat; PlayerArmor(player); MightAttributes(player); break; case "captaincy": // Check if Stat is disabled if (config.captaincy.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermCaptaincy)) return; // Check if Stat is max level if (xprecord.Captaincy >= config.captaincy.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, stat)); return; } // Check current level and points if (xprecord.Captaincy == 0) { nextlevel = 1; statcost = config.captaincy.pointcoststart; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.CaptaincyP + statcost; } else { nextlevel = xprecord.Captaincy + 1; statcost = nextlevel * config.captaincy.costmultiplier; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.CaptaincyP + statcost; } // Check if enough points are available to level up if (xprecord.statpoint < statcost) { player.ChatMessage(XPLang("notenoughstatpoints", player.UserIDString, nextlevel, stat, statcost)); return; } // Econ if (Economics != null && config.xpEcon.econstatlevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econcaptaincy; if (config.xpEcon.econstatlevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econcaptaincy * (config.xpEcon.econstatlevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, stat, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, stat, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardstatlevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardcaptaincy; if (config.sRewards.srewardstatlevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardcaptaincy * (config.sRewards.srewardstatlevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, stat, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, stat, points)); return; } } // Apply New Level & Update Points xprecord.Captaincy = nextlevel; xprecord.statpoint = pointsremaining; xprecord.CaptaincyP = pointsinstat; break; case "weaponry": // Check if Stat is disabled if (config.weaponry.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermWeaponry)) return; // Check if Stat is max level if (xprecord.Weaponry >= config.weaponry.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, stat)); return; } // Check current level and points if (xprecord.Weaponry == 0) { nextlevel = 1; statcost = config.weaponry.pointcoststart; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.WeaponryP + statcost; } else { nextlevel = xprecord.Weaponry + 1; statcost = nextlevel * config.weaponry.costmultiplier; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.WeaponryP + statcost; } // Check if enough points are available to level up if (xprecord.statpoint < statcost) { player.ChatMessage(XPLang("notenoughstatpoints", player.UserIDString, nextlevel, stat, statcost)); return; } // Econ if (Economics != null && config.xpEcon.econstatlevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econweaponry; if (config.xpEcon.econstatlevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econweaponry * (config.xpEcon.econstatlevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, stat, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, stat, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardstatlevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardweaponry; if (config.sRewards.srewardstatlevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardweaponry * (config.sRewards.srewardstatlevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, stat, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, stat, points)); return; } } // Apply New Level & Update Points xprecord.Weaponry = nextlevel; xprecord.statpoint = pointsremaining; xprecord.WeaponryP = pointsinstat; break; case "ninjary": // Check if Stat is disabled if (config.ninjary.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermNinjary)) return; // Check if Stat is max level if (xprecord.Ninjary >= config.ninjary.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, stat)); return; } // Check current level and points if (xprecord.Ninjary == 0) { nextlevel = 1; statcost = config.ninjary.pointcoststart; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.NinjaryP + statcost; } else { nextlevel = xprecord.Ninjary + 1; statcost = nextlevel * config.ninjary.costmultiplier; pointsremaining = xprecord.statpoint - statcost; pointsinstat = xprecord.NinjaryP + statcost; } // Check if enough points are available to level up if (xprecord.statpoint < statcost) { player.ChatMessage(XPLang("notenoughstatpoints", player.UserIDString, nextlevel, stat, statcost)); return; } // Econ if (Economics != null && config.xpEcon.econstatlevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econninjary; if (config.xpEcon.econstatlevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econninjary * (config.xpEcon.econstatlevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, stat, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, stat, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardstatlevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardninjary; if (config.sRewards.srewardstatlevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardninjary * (config.sRewards.srewardstatlevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, stat, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, stat, points)); return; } } // Apply New Level & Update Points xprecord.Ninjary = nextlevel; xprecord.statpoint = pointsremaining; xprecord.NinjaryP = pointsinstat; break; } // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { BackPackChecks(player, stat, false); } // Chat Notification if (config.defaultOptions.showchatnotifications && xprecord.showchatnotifications) { player.ChatMessage(XPLang("statup", player.UserIDString, statcost, nextlevel, stat)); } // Update Live UI LiveStats(player); // Sound Effects if (config.soundEffects.statup) { player.RunEffect($"{config.soundEffects.statupeffect}"); } // Addon if (XPerienceAddon != null) { XPerienceAddon?.Call("PlayerNotes", player, "stat", nextlevel, stat); XPerienceAddon?.Call("AddonDiscordStat", player, XPLang(stat, player.UserIDString), nextlevel); XPerienceAddon?.Call("NotifyUIBar", player, "stat", XPLang(stat, player.UserIDString), nextlevel); XPerienceAddon?.Call("NotifyUIBarGlobal", player, "stat", XPLang(stat, player.UserIDString), nextlevel); } } private void SkillUp(BasePlayer player, string skill) { if (CheckPlayerLocation(player, "disablestatsandskills")) return; XPRecord xprecord = GetXPRecord(player); int nextlevel = 0; int skillcost = 0; int pointsremaining; int pointsinskill; switch (skill) { case "woodcutter": // Check if Skill is disabled if (config.woodcutter.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermWoodCutter)) return; // Check if Skill is max level if (xprecord.WoodCutter >= config.woodcutter.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.WoodCutter == 0) { nextlevel = 1; skillcost = config.woodcutter.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.WoodCutterP + skillcost; } else { nextlevel = xprecord.WoodCutter + 1; skillcost = nextlevel * config.woodcutter.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.WoodCutterP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econwoodcutter; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econwoodcutter * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardwoodcutter; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardwoodcutter * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.WoodCutter = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.WoodCutterP = pointsinskill; break; case "smithy": // Check if Skill is disabled if (config.smithy.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermSmithy)) return; // Check if Skill is max level if (xprecord.Smithy >= config.smithy.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Smithy == 0) { nextlevel = 1; skillcost = config.smithy.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.SmithyP + skillcost; } else { nextlevel = xprecord.Smithy + 1; skillcost = nextlevel * config.smithy.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.SmithyP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econsmithy; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econsmithy * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardsmithy; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardsmithy * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Smithy = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.SmithyP = pointsinskill; break; case "miner": // Check if Skill is disabled if (config.miner.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermMiner)) return; // Check if Skill is max level if (xprecord.Miner >= config.miner.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Miner == 0) { nextlevel = 1; skillcost = config.miner.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.MinerP + skillcost; } else { nextlevel = xprecord.Miner + 1; skillcost = nextlevel * config.miner.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.MinerP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econminer; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econminer * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardminer; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardminer * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Miner = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.MinerP = pointsinskill; break; case "forager": // Check if Skill is disabled if (config.forager.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermForager)) return; // Check if Skill is max level if (xprecord.Forager >= config.forager.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Forager == 0) { nextlevel = 1; skillcost = config.forager.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.ForagerP + skillcost; } else { nextlevel = xprecord.Forager + 1; skillcost = nextlevel * config.forager.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.ForagerP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econforager; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econforager * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardforager; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardforager * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Forager = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.ForagerP = pointsinskill; break; case "hunter": // Check if Skill is disabled if (config.hunter.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermHunter)) return; // Check if Skill is max level if (xprecord.Hunter >= config.hunter.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Hunter == 0) { nextlevel = 1; skillcost = config.hunter.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.HunterP + skillcost; } else { nextlevel = xprecord.Hunter + 1; skillcost = nextlevel * config.hunter.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.HunterP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econhunter; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econhunter * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardhunter; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardhunter * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Hunter = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.HunterP = pointsinskill; break; case "fisher": // Check if Skill is disabled if (config.fisher.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermFisher)) return; // Check if Skill is max level if (xprecord.Fisher >= config.fisher.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Fisher == 0) { nextlevel = 1; skillcost = config.fisher.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.FisherP + skillcost; } else { nextlevel = xprecord.Fisher + 1; skillcost = nextlevel * config.fisher.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.FisherP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econfisher; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econfisher * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardfisher; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardfisher * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Fisher = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.FisherP = pointsinskill; break; case "crafter": // Check if Skill is disabled if (config.crafter.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermCrafter)) return; // Check if Skill is max level if (xprecord.Crafter >= config.crafter.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Crafter == 0) { nextlevel = 1; skillcost = config.crafter.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.CrafterP + skillcost; } else { nextlevel = xprecord.Crafter + 1; skillcost = nextlevel * config.crafter.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.CrafterP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econcrafter; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econcrafter * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardcrafter; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardcrafter * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Crafter = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.CrafterP = pointsinskill; break; case "framer": // Check if Skill is disabled if (config.framer.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermFramer)) return; // Check if Skill is max level if (xprecord.Framer >= config.framer.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Framer == 0) { nextlevel = 1; skillcost = config.framer.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.FramerP + skillcost; } else { nextlevel = xprecord.Framer + 1; skillcost = nextlevel * config.framer.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.FramerP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econframer; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econframer * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardframer; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardframer * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Framer = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.FramerP = pointsinskill; break; case "medic": // Check if Skill is disabled if (config.medic.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermMedic)) return; // Check if Skill is max level if (xprecord.Medic >= config.medic.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Medic == 0) { nextlevel = 1; skillcost = config.medic.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.MedicP + skillcost; } else { nextlevel = xprecord.Medic + 1; skillcost = nextlevel * config.medic.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.MedicP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econmedic; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econmedic * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardmedic; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardmedic * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Medic = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.MedicP = pointsinskill; break; case "scavenger": // Check if Skill is disabled if (config.scavenger.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermScavenger)) return; // Check if Skill is max level if (xprecord.Scavenger >= config.scavenger.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Scavenger == 0) { nextlevel = 1; skillcost = config.scavenger.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.ScavengerP + skillcost; } else { nextlevel = xprecord.Scavenger + 1; skillcost = nextlevel * config.scavenger.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.ScavengerP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econscavenger; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econscavenger * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardscavenger; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardscavenger * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Scavenger = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.ScavengerP = pointsinskill; break; case "electrician": // Check if Skill is disabled if (config.electrician.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermElectrician)) return; // Check if Skill is max level if (xprecord.Electrician >= config.electrician.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Electrician == 0) { nextlevel = 1; skillcost = config.electrician.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.ElectricianP + skillcost; } else { nextlevel = xprecord.Electrician + 1; skillcost = nextlevel * config.electrician.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.ElectricianP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econelectrician; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econelectrician * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardelectrician; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardelectrician * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Electrician = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.ElectricianP = pointsinskill; CheckElectricianEntities(player); break; case "demolitionist": // Check if Skill is disabled if (config.demolitionist.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermDemolitionist)) return; // Check if Skill is max level if (xprecord.Demolitionist >= config.demolitionist.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Demolitionist == 0) { nextlevel = 1; skillcost = config.demolitionist.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.DemolitionistP + skillcost; } else { nextlevel = xprecord.Demolitionist + 1; skillcost = nextlevel * config.demolitionist.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.DemolitionistP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econdemolitionist; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econdemolitionist * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardemolitionist; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardemolitionist * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Demolitionist = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.DemolitionistP = pointsinskill; break; case "tamer": // Check if Skill is disabled if (config.tamer.maxlvl == 0) return; // Check for permissions if (config.defaultOptions.userpermissions && !permission.UserHasPermission(player.UserIDString, PermTamer)) return; // Check if Skill is max level if (xprecord.Tamer >= config.tamer.maxlvl) { player.ChatMessage(XPLang("maxleveled", player.UserIDString, skill)); return; } // Check current level and points if (xprecord.Tamer == 0) { nextlevel = 1; skillcost = config.tamer.pointcoststart; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.TamerP + skillcost; } else { nextlevel = xprecord.Tamer + 1; skillcost = nextlevel * config.tamer.costmultiplier; pointsremaining = xprecord.skillpoint - skillcost; pointsinskill = xprecord.TamerP + skillcost; } // Check if enough points are available to level up if (xprecord.skillpoint < skillcost) { player.ChatMessage(XPLang("notenoughskillpoints", player.UserIDString, nextlevel, skill, skillcost)); return; } // Econ if (Economics != null && config.xpEcon.econskilllevelcost) { double balance = Economics.Call("Balance", player.UserIDString); double econcostmultiplier = config.xpEcon.econtamer; if (config.xpEcon.econskilllevelcostmultiplier > 0) { econcostmultiplier = config.xpEcon.econtamer * (config.xpEcon.econskilllevelcostmultiplier * nextlevel); } if (balance >= econcostmultiplier) { Economics.Call("Withdraw", player.UserIDString, econcostmultiplier); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawlevelup", player.UserIDString, econcostmultiplier, skill, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawlevelupfailed", player.UserIDString, econcostmultiplier, skill, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardskilllevelcost) { int points = ServerRewards.Call("CheckPoints", player.userID); int srewardscostmultiplier = config.sRewards.srewardtamer; if (config.sRewards.srewardskilllevelcostmultiplier > 0) { srewardscostmultiplier = config.sRewards.srewardtamer * (config.sRewards.srewardskilllevelcostmultiplier * nextlevel); } if (points >= srewardscostmultiplier) { ServerRewards?.Call("TakePoints", player.userID, srewardscostmultiplier); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawlevelup", player.UserIDString, srewardscostmultiplier, skill, newpoints)); } else { player.ChatMessage(XPLang("srewardswidthdrawlevelupfailed", player.UserIDString, srewardscostmultiplier, skill, points)); return; } } // Apply New Level & Update Points xprecord.Tamer = nextlevel; xprecord.skillpoint = pointsremaining; xprecord.TamerP = pointsinskill; NextTick(() => PetChecks(player, false)); break; } // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { BackPackChecks(player, skill, false); } // Chat Notification if (config.defaultOptions.showchatnotifications && xprecord.showchatnotifications) { player.ChatMessage(XPLang("skillup", player.UserIDString, skillcost, nextlevel, skill)); } // Update Live UI LiveStats(player); // Sound Effects if (config.soundEffects.skillup) { player.RunEffect($"{config.soundEffects.skillupeffect}"); } // AddonDiscord if (XPerienceAddon != null) { XPerienceAddon?.Call("PlayerNotes", player, "skill", nextlevel, skill); XPerienceAddon?.Call("AddonDiscordSkill", player, XPLang(skill, player.UserIDString), nextlevel); XPerienceAddon?.Call("NotifyUIBar", player, "skill", XPLang(skill, player.UserIDString), nextlevel); XPerienceAddon?.Call("NotifyUIBarGlobal", player, "skill", XPLang(skill, player.UserIDString), nextlevel); } } private void StatReset(BasePlayer player, string stat, bool bypass = false) { XPRecord xprecord = GetXPRecord(player); if (!bypass) { if (CheckPlayerLocation(player, "disablestatsandskills")) return; if (!config.defaultOptions.allowrespec || config.defaultOptions.hardcorenoreset) { return; } int resetlimit = 0; bool UserHasSpecialGroup = false; // Check Special Groups var highestpriority = config.specialGroups.specialgroups.Values.Max(i => i.grouppriority); var getgrouplist = config.specialGroups.specialgroups.Values.OrderByDescending(i => i.grouppriority); restart: foreach (var specialgroup in getgrouplist) { UserHasSpecialGroup = permission.UserHasGroup(player.UserIDString, specialgroup.permissionname); if (UserHasSpecialGroup && specialgroup.grouppriority == highestpriority) { if (specialgroup.dailystatlimitboost > 0) { resetlimit = specialgroup.dailystatlimitboost; } break; } else if (UserHasSpecialGroup && specialgroup.grouppriority != highestpriority) { highestpriority--; goto restart; } } // Check Daily Limits DailyLimitPlayer(player); DailyRecord dailyrecord = GetDailyRecord(player); if (config.dailyresetLimit.enabledailyresetlimit) { // Calculate time var getlaststatreset = dailyrecord.laststatreset - DateTime.Now; double laststatreset = Math.Round(double.Parse(getlaststatreset.Minutes.ToString()) / 60, 1); string dailyresetlabel = "hours"; if (laststatreset <= 1) { laststatreset = int.Parse(getlaststatreset.Minutes.ToString()); dailyresetlabel = "mins"; } // Get limit Settings resetlimit += config.dailyresetLimit.dailystatlimit; if (permission.UserHasPermission(player.UserIDString, VIP) && !UserHasSpecialGroup) { resetlimit = config.dailyresetLimit.dailystatlimitvip; } // Check Players Limit if (dailyrecord.dailystatresets >= resetlimit && resetlimit != 0) { player.ChatMessage(XPLang("dailyresetlimitreached", player.UserIDString, resetlimit, laststatreset, dailyresetlabel)); return; } // Add Reset to Daily Record dailyrecord.dailystatresets += 1; } // Timers DateTime resettimestats = xprecord.resettimerstats.AddMinutes(config.defaultOptions.resetminsstats); if (permission.UserHasPermission(player.UserIDString, VIP)) { resettimestats = xprecord.resettimerstats.AddMinutes(config.defaultOptions.vipresetminstats); } TimeSpan interval = resettimestats - DateTime.Now; int timer = (int)interval.TotalMinutes; if (config.defaultOptions.bypassadminreset && (player.IsAdmin || permission.UserHasPermission(player.UserIDString, Admin))) { timer = 0; } if (timer > 0 && config.defaultOptions.restristresets) { player.ChatMessage(XPLang("resettimerstats", player.UserIDString, timer)); return; } // New Reset Timer xprecord.resettimerstats = DateTime.Now; // Econ if (Economics != null && config.xpEcon.econresetstat) { double balance = Economics.Call("Balance", player.UserIDString); if (balance >= config.xpEcon.econresetstatcost) { Economics.Call("Withdraw", player.UserIDString, config.xpEcon.econresetstatcost); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawresetstat", player.UserIDString, config.xpEcon.econresetstatcost, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawresetstatfailed", player.UserIDString, config.xpEcon.econresetstatcost, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardresetstat) { int points = ServerRewards.Call("CheckPoints", player.userID); if (points >= config.sRewards.srewardresetstatcost) { ServerRewards?.Call("TakePoints", player.userID, config.sRewards.srewardresetstatcost); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawresetstat", player.UserIDString, config.sRewards.srewardresetstatcost, newpoints)); } else { player.ChatMessage(XPLang("srewardwidthdrawresetstatfailed", player.UserIDString, config.sRewards.srewardresetstatcost, points)); return; } } } // Find Stat and Reset int statpoints = 0; switch (stat.ToLower()) { case "mentality": statpoints = xprecord.MentalityP; xprecord.statpoint += xprecord.MentalityP; xprecord.Mentality = 0; xprecord.MentalityP = 0; break; case "dexterity": statpoints = xprecord.DexterityP; xprecord.statpoint += xprecord.DexterityP; xprecord.Dexterity = 0; xprecord.DexterityP = 0; break; case "might": statpoints = xprecord.MightP; xprecord.statpoint += xprecord.MightP; if (xprecord.Might >= 1) { // Max Health double armor = (xprecord.Might * config.might.armor) * 100; double newmaxhealth = player._maxHealth - armor; // Change Max Health if (newmaxhealth < 100) { player._maxHealth = 100; } else { player._maxHealth = (float)newmaxhealth; } // Player Current Health double defaulthealth = 100; double teahealth = 100; bool teamodified = false; double healthdifference = 0; if (GetTeaCooldown(player) != 0) { // Check for Tea Modifier if (TeaModifiers != null && xprecord.teatype != "none") { teahealth = defaulthealth + TeaModifiers.Call("GetTeaValue", player, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } switch (GetTeaTypes(player)) { case "maxhealthtea": if (!teamodified) { teahealth = defaulthealth + 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teahealth = defaulthealth + 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teahealth = defaulthealth + 20; } break; } } if (player._health > teahealth) { healthdifference = player._health - teahealth; } player._health -= (float)healthdifference; } xprecord.Might = 0; xprecord.MightP = 0; if (player.metabolism.calories.max > 500) { player.metabolism.calories.max = 500; } if (player.metabolism.hydration.max > 250) { player.metabolism.hydration.max = 250; } MightAttributes(player); break; case "captaincy": statpoints = xprecord.CaptaincyP; xprecord.statpoint += xprecord.CaptaincyP; xprecord.Captaincy = 0; xprecord.CaptaincyP = 0; break; case "weaponry": statpoints = xprecord.WeaponryP; xprecord.statpoint += xprecord.WeaponryP; xprecord.Weaponry = 0; xprecord.WeaponryP = 0; break; case "ninjary": statpoints = xprecord.NinjaryP; xprecord.statpoint += xprecord.NinjaryP; xprecord.Ninjary = 0; xprecord.NinjaryP = 0; break; } // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { string backpackstatorskill = config.backpacksmod.statorskill; if (backpackstatorskill == stat.ToLower()) { BackPackChecks(player, null, true); } } if (!bypass) { // Message Player with number of stat points returned player.ChatMessage(XPLang("resetstat", player.UserIDString, stat, statpoints)); // Update Live UI LiveStats(player); if (config.soundEffects.statreset) { player.RunEffect($"{config.soundEffects.statreseteffect}"); } } } private void StatsResetAll(BasePlayer player) { if (CheckPlayerLocation(player, "disablestatsandskills")) return; XPRecord xprecord = GetXPRecord(player); if (config.defaultOptions.hardcorenoreset) { return; } int resetlimit = 0; bool UserHasSpecialGroup = false; // Check Special Groups var highestpriority = config.specialGroups.specialgroups.Values.Max(i => i.grouppriority); var getgrouplist = config.specialGroups.specialgroups.Values.OrderByDescending(i => i.grouppriority); restart: foreach (var specialgroup in getgrouplist) { UserHasSpecialGroup = permission.UserHasGroup(player.UserIDString, specialgroup.permissionname); if (UserHasSpecialGroup && specialgroup.grouppriority == highestpriority) { if (specialgroup.dailystatlimitboost > 0) { resetlimit = specialgroup.dailystatlimitboost; } break; } else if (UserHasSpecialGroup && specialgroup.grouppriority != highestpriority) { highestpriority--; goto restart; } } // Check Daily Limits DailyLimitPlayer(player); DailyRecord dailyrecord = GetDailyRecord(player); if (config.dailyresetLimit.enabledailyresetlimit) { // Calculate time var getlaststatreset = dailyrecord.laststatreset - DateTime.Now; double laststatreset = Math.Round(double.Parse(getlaststatreset.Minutes.ToString()) / 60, 1); string dailyresetlabel = "hours"; if (laststatreset <= 1) { laststatreset = int.Parse(getlaststatreset.Minutes.ToString()); dailyresetlabel = "mins"; } // Get limit Settings resetlimit += config.dailyresetLimit.dailystatlimit; if (permission.UserHasPermission(player.UserIDString, VIP) && !UserHasSpecialGroup) { resetlimit = config.dailyresetLimit.dailystatlimitvip; } // Check Players Limit if (dailyrecord.dailystatresets >= resetlimit && resetlimit != 0) { player.ChatMessage(XPLang("dailyresetlimitreached", player.UserIDString, resetlimit, laststatreset, dailyresetlabel)); return; } } // Timers DateTime resettimestats = xprecord.resettimerstats.AddMinutes(config.defaultOptions.resetminsstats); if (permission.UserHasPermission(player.UserIDString, VIP)) { resettimestats = xprecord.resettimerstats.AddMinutes(config.defaultOptions.vipresetminstats); } TimeSpan interval = resettimestats - DateTime.Now; int timer = (int)interval.TotalMinutes; if (config.defaultOptions.bypassadminreset && (player.IsAdmin || permission.UserHasPermission(player.UserIDString, Admin))) { timer = 0; } if (timer > 0 && config.defaultOptions.restristresets) { player.ChatMessage(XPLang("resettimerstats", player.UserIDString, timer)); return; } // Econ if (Economics != null && config.xpEcon.econresetstats) { double balance = Economics.Call("Balance", player.UserIDString); if (balance >= config.xpEcon.econresetstatscost) { Economics.Call("Withdraw", player.UserIDString, config.xpEcon.econresetstatscost); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawresetstat", player.UserIDString, config.xpEcon.econresetstatscost, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawresetstatfailed", player.UserIDString, config.xpEcon.econresetstatscost, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardresetstats) { int points = ServerRewards.Call("CheckPoints", player.userID); if (points >= config.sRewards.srewardresetstatscost) { ServerRewards?.Call("TakePoints", player.userID, config.sRewards.srewardresetstatscost); int newpoints = ServerRewards.Call("CheckPoints", player.userID); player.ChatMessage(XPLang("srewardwidthdrawresetstat", player.UserIDString, config.sRewards.srewardresetstatscost, newpoints)); } else { player.ChatMessage(XPLang("srewardwidthdrawresetstatfailed", player.UserIDString, config.sRewards.srewardresetstatscost, points)); return; } } // Reset health if needed before removing points if (xprecord.Might >= 1) { // Max Health double armor = (xprecord.Might * config.might.armor) * 100; double newmaxhealth = player._maxHealth - armor; // Change Max Health if (newmaxhealth < 100) { player._maxHealth = 100; } else { player._maxHealth = (float)newmaxhealth; } // Player Current Health double defaulthealth = 100; double teahealth = 100; bool teamodified = false; double healthdifference = 0; if (GetTeaCooldown(player) != 0) { // Check for Tea Modifier if (TeaModifiers != null && xprecord.teatype != "none") { teahealth = defaulthealth + TeaModifiers.Call("GetTeaValue", player, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } switch (GetTeaTypes(player)) { case "maxhealthtea": if (!teamodified) { teahealth = defaulthealth + 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teahealth = defaulthealth + 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teahealth = defaulthealth + 20; } break; } } if (player._health > teahealth) { healthdifference = player._health - teahealth; } player._health -= (float)healthdifference; MightAttributes(player); } // Add all spent points int statpoints = xprecord.statpoint + xprecord.MentalityP + xprecord.DexterityP + xprecord.MightP + xprecord.CaptaincyP + xprecord.WeaponryP + xprecord.NinjaryP; // Refund Points xprecord.statpoint = statpoints; // Reset Stat Levels xprecord.Mentality = 0; xprecord.Dexterity = 0; xprecord.Might = 0; xprecord.Captaincy = 0; xprecord.Weaponry = 0; xprecord.Ninjary = 0; // Reset Stat Spent Points xprecord.MentalityP = 0; xprecord.DexterityP = 0; xprecord.MightP = 0; xprecord.CaptaincyP = 0; xprecord.WeaponryP = 0; xprecord.NinjaryP = 0; if (player.metabolism.calories.max > 500) { player.metabolism.calories.max = 500; } if (player.metabolism.hydration.max > 250) { player.metabolism.hydration.max = 250; } // New Reset Timer xprecord.resettimerstats = DateTime.Now; // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { string backpackstatorskill = config.backpacksmod.statorskill; if (backpackstatorskill == "Mentality" || backpackstatorskill == "Dexterity" || backpackstatorskill == "Might" || backpackstatorskill == "Captaincy") { BackPackChecks(player, null, true); } } // Add Reset to Daily Record dailyrecord.dailystatresets += 1; // Message Player with number of stat points returned player.ChatMessage(XPLang("resetstats", player.UserIDString, statpoints)); // Update Live UI LiveStats(player); if (config.soundEffects.statreset) { player.RunEffect($"{config.soundEffects.statreseteffect}"); } } private void SkillReset(BasePlayer player, string skill, bool bypass = false) { XPRecord xprecord = GetXPRecord(player); if (!bypass) { if (CheckPlayerLocation(player, "disablestatsandskills")) return; if (!config.defaultOptions.allowrespec || config.defaultOptions.hardcorenoreset) { return; } int resetlimit = 0; bool UserHasSpecialGroup = false; // Check Special Groups var highestpriority = config.specialGroups.specialgroups.Values.Max(i => i.grouppriority); var getgrouplist = config.specialGroups.specialgroups.Values.OrderByDescending(i => i.grouppriority); restart: foreach (var specialgroup in getgrouplist) { UserHasSpecialGroup = permission.UserHasGroup(player.UserIDString, specialgroup.permissionname); if (UserHasSpecialGroup && specialgroup.grouppriority == highestpriority) { if (specialgroup.dailyskilllimitboost > 0) { resetlimit = specialgroup.dailyskilllimitboost; } break; } else if (UserHasSpecialGroup && specialgroup.grouppriority != highestpriority) { highestpriority--; goto restart; } } // Check Daily Limits DailyLimitPlayer(player); DailyRecord dailyrecord = GetDailyRecord(player); if (config.dailyresetLimit.enabledailyresetlimit) { // Calculate time var getlastskillreset = dailyrecord.lastskillreset - DateTime.Now; double lastskillreset = Math.Round(double.Parse(getlastskillreset.Minutes.ToString()) / 60, 1); string dailyresetlabel = "hours"; if (lastskillreset <= 1) { lastskillreset = int.Parse(getlastskillreset.Minutes.ToString()); dailyresetlabel = "mins"; } // Get limit Settings resetlimit += config.dailyresetLimit.dailyskilllimit; if (permission.UserHasPermission(player.UserIDString, VIP) && !UserHasSpecialGroup) { resetlimit = config.dailyresetLimit.dailyskilllimitvip; } // Check Players Limit if (dailyrecord.dailyskillresets >= resetlimit && resetlimit != 0) { player.ChatMessage(XPLang("dailyresetlimitreached", player.UserIDString, resetlimit, lastskillreset, dailyresetlabel)); return; } // Add Reset to Daily Record dailyrecord.dailyskillresets += 1; } // Timer DateTime resettimeskills = xprecord.resettimerskills.AddMinutes(config.defaultOptions.resetminsskills); if (permission.UserHasPermission(player.UserIDString, VIP)) { resettimeskills = xprecord.resettimerskills.AddMinutes(config.defaultOptions.vipresetminsskills); } TimeSpan interval = resettimeskills - DateTime.Now; int timer = (int)interval.TotalMinutes; if (config.defaultOptions.bypassadminreset && (player.IsAdmin || permission.UserHasPermission(player.UserIDString, Admin))) { timer = 0; } if (timer > 0 && config.defaultOptions.restristresets) { player.ChatMessage(XPLang("resettimerskills", player.UserIDString, timer)); return; } // New Reset Timer xprecord.resettimerskills = DateTime.Now; // Econ if (Economics != null && config.xpEcon.econresetskill) { double balance = Economics.Call("Balance", player.UserIDString); if (balance >= config.xpEcon.econresetskillcost) { Economics.Call("Withdraw", player.UserIDString, config.xpEcon.econresetskillcost); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawresetstat", player.UserIDString, config.xpEcon.econresetskillcost, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawresetstatfailed", player.UserIDString, config.xpEcon.econresetskillcost, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardresetskill) { int points = ServerRewards.Call("CheckPoints", player.UserIDString); if (points >= config.sRewards.srewardresetskillcost) { ServerRewards?.Call("TakePoints", player.UserIDString, config.sRewards.srewardresetskillcost); int newpoints = ServerRewards.Call("CheckPoints", player.UserIDString); player.ChatMessage(XPLang("srewardwidthdrawresetstat", player.UserIDString, config.sRewards.srewardresetskillcost, newpoints)); } else { player.ChatMessage(XPLang("srewardwidthdrawresetstatfailed", player.UserIDString, config.sRewards.srewardresetskillcost, points)); return; } } } // Find Skill and Reset int skillpoints = 0; switch (skill.ToLower()) { case "woodcutter": skillpoints = xprecord.WoodCutterP; xprecord.skillpoint += xprecord.WoodCutterP; xprecord.WoodCutter = 0; xprecord.WoodCutterP = 0; break; case "smithy": skillpoints = xprecord.SmithyP; xprecord.skillpoint += xprecord.SmithyP; xprecord.Smithy = 0; xprecord.SmithyP = 0; break; case "miner": skillpoints = xprecord.MinerP; xprecord.skillpoint += xprecord.MinerP; xprecord.Miner = 0; xprecord.MinerP = 0; break; case "forager": skillpoints = xprecord.ForagerP; xprecord.skillpoint += xprecord.ForagerP; xprecord.Forager = 0; xprecord.ForagerP = 0; break; case "hunter": skillpoints = xprecord.HunterP; xprecord.skillpoint += xprecord.HunterP; xprecord.Hunter = 0; xprecord.HunterP = 0; break; case "crafter": skillpoints = xprecord.CrafterP; xprecord.skillpoint += xprecord.CrafterP; xprecord.Crafter = 0; xprecord.CrafterP = 0; break; case "framer": skillpoints = xprecord.FramerP; xprecord.skillpoint += xprecord.FramerP; xprecord.Framer = 0; xprecord.FramerP = 0; break; case "fisher": skillpoints = xprecord.FisherP; xprecord.skillpoint += xprecord.FisherP; xprecord.Fisher = 0; xprecord.FisherP = 0; break; case "medic": skillpoints = xprecord.MedicP; xprecord.skillpoint += xprecord.MedicP; xprecord.Medic = 0; xprecord.MedicP = 0; break; case "scavenger": skillpoints = xprecord.ScavengerP; xprecord.skillpoint += xprecord.ScavengerP; xprecord.Scavenger = 0; xprecord.ScavengerP = 0; break; case "electrician": skillpoints = xprecord.ElectricianP; xprecord.skillpoint += xprecord.ElectricianP; xprecord.Electrician = 0; xprecord.ElectricianP = 0; CheckElectricianEntities(player, true); break; case "demolitionist": skillpoints = xprecord.DemolitionistP; xprecord.skillpoint += xprecord.DemolitionistP; xprecord.Demolitionist = 0; xprecord.DemolitionistP = 0; break; case "tamer": skillpoints = xprecord.TamerP; xprecord.skillpoint += xprecord.TamerP; xprecord.Tamer = 0; xprecord.TamerP = 0; // Reset Tamer permissions PetChecks(player, true); break; } // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { string backpackskill = config.backpacksmod.statorskill; if (backpackskill == skill.ToLower()) { BackPackChecks(player, null, true); } } if (!bypass) { // Message Player with number of skill points returned player.ChatMessage(XPLang("resetskill", player.UserIDString, skill, skillpoints)); // Update Live UI LiveStats(player); if (config.soundEffects.skillreset) { player.RunEffect($"{config.soundEffects.skillreseteffect}"); } } } private void SkillsResetAll(BasePlayer player) { if (CheckPlayerLocation(player, "disablestatsandskills")) return; XPRecord xprecord = GetXPRecord(player); if (config.defaultOptions.hardcorenoreset) { return; } int resetlimit = 0; bool UserHasSpecialGroup = false; // Check Special Groups var highestpriority = config.specialGroups.specialgroups.Values.Max(i => i.grouppriority); var getgrouplist = config.specialGroups.specialgroups.Values.OrderByDescending(i => i.grouppriority); restart: foreach (var specialgroup in getgrouplist) { UserHasSpecialGroup = permission.UserHasGroup(player.UserIDString, specialgroup.permissionname); if (UserHasSpecialGroup && specialgroup.grouppriority == highestpriority) { if (specialgroup.dailyskilllimitboost > 0) { resetlimit = specialgroup.dailyskilllimitboost; } break; } else if (UserHasSpecialGroup && specialgroup.grouppriority != highestpriority) { highestpriority--; goto restart; } } // Check Daily Limits DailyLimitPlayer(player); DailyRecord dailyrecord = GetDailyRecord(player); if (config.dailyresetLimit.enabledailyresetlimit) { // Calculate time var getlastskillreset = dailyrecord.lastskillreset - DateTime.Now; double lastskillreset = Math.Round(double.Parse(getlastskillreset.Minutes.ToString()) / 60, 1); string dailyresetlabel = "hours"; if (lastskillreset <= 1) { lastskillreset = int.Parse(getlastskillreset.Minutes.ToString()); dailyresetlabel = "mins"; } // Get limit Settings resetlimit += config.dailyresetLimit.dailyskilllimit; if (permission.UserHasPermission(player.UserIDString, VIP) && !UserHasSpecialGroup) { resetlimit = config.dailyresetLimit.dailyskilllimitvip; } // Check Players Limit if (dailyrecord.dailyskillresets >= resetlimit && resetlimit != 0) { player.ChatMessage(XPLang("dailyresetlimitreached", player.UserIDString, resetlimit, lastskillreset, dailyresetlabel)); return; } } // Timer DateTime resettimeskills = xprecord.resettimerskills.AddMinutes(config.defaultOptions.resetminsskills); if (permission.UserHasPermission(player.UserIDString, VIP)) { resettimeskills = xprecord.resettimerskills.AddMinutes(config.defaultOptions.vipresetminsskills); } TimeSpan interval = resettimeskills - DateTime.Now; int timer = (int)interval.TotalMinutes; if (config.defaultOptions.bypassadminreset && (player.IsAdmin || permission.UserHasPermission(player.UserIDString, Admin))) { timer = 0; } if (timer > 0 && config.defaultOptions.restristresets) { player.ChatMessage(XPLang("resettimerskills", player.UserIDString, timer)); return; } // Econ if (Economics != null && config.xpEcon.econresetskills) { double balance = Economics.Call("Balance", player.UserIDString); if (balance >= config.xpEcon.econresetskillscost) { Economics.Call("Withdraw", player.UserIDString, config.xpEcon.econresetskillscost); double newbalance = Economics.Call("Balance", player.UserIDString); player.ChatMessage(XPLang("econwidthdrawresetstat", player.UserIDString, config.xpEcon.econresetskillscost, newbalance)); } else { player.ChatMessage(XPLang("econwidthdrawresetstatfailed", player.UserIDString, config.xpEcon.econresetskillscost, balance)); return; } } // Server Rewards if (ServerRewards != null && config.sRewards.srewardresetskills) { int points = ServerRewards.Call("CheckPoints", player.UserIDString); if (points >= config.sRewards.srewardresetskillscost) { ServerRewards?.Call("TakePoints", player.UserIDString, config.sRewards.srewardresetskillscost); int newpoints = ServerRewards.Call("CheckPoints", player.UserIDString); player.ChatMessage(XPLang("srewardwidthdrawresetstat", player.UserIDString, config.sRewards.srewardresetskillscost, newpoints)); } else { player.ChatMessage(XPLang("srewardwidthdrawresetstatfailed", player.UserIDString, config.sRewards.srewardresetskillscost, points)); return; } } // Add all spent points int skillpoints = xprecord.skillpoint + xprecord.WoodCutterP + xprecord.SmithyP + xprecord.MinerP + xprecord.ForagerP + xprecord.HunterP + xprecord.FisherP + xprecord.CrafterP + xprecord.FramerP + xprecord.MedicP + xprecord.ScavengerP + xprecord.ElectricianP + xprecord.DemolitionistP + xprecord.TamerP; // Reset Skill Levels xprecord.skillpoint = skillpoints; xprecord.WoodCutter = 0; xprecord.Smithy = 0; xprecord.Miner = 0; xprecord.Forager = 0; xprecord.Hunter = 0; xprecord.Fisher = 0; xprecord.Crafter = 0; xprecord.Framer = 0; xprecord.Medic = 0; xprecord.Scavenger = 0; xprecord.Electrician = 0; xprecord.Demolitionist = 0; xprecord.Tamer = 0; // Reset Skill Spents Points xprecord.WoodCutterP = 0; xprecord.SmithyP = 0; xprecord.MinerP = 0; xprecord.ForagerP = 0; xprecord.HunterP = 0; xprecord.FisherP = 0; xprecord.CrafterP = 0; xprecord.FramerP = 0; xprecord.MedicP = 0; xprecord.ScavengerP = 0; xprecord.ElectricianP = 0; xprecord.DemolitionistP = 0; xprecord.TamerP = 0; // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { string backpackskill = config.backpacksmod.statorskill; if (backpackskill == "WoodCutter" || backpackskill == "Smithy" || backpackskill == "Miner" || backpackskill == "Forager" || backpackskill == "Hunter" || backpackskill == "Fisher" || backpackskill == "Crafter" || backpackskill == "Framer" || backpackskill == "Medic" || backpackskill == "Scavenger") { BackPackChecks(player, null, true); } } // Check/Reset Tamer permissions PetChecks(player, true); // New Reset Timer xprecord.resettimerskills = DateTime.Now; // Add Reset to Daily Record dailyrecord.dailyskillresets += 1; // Message Player with number of skill points returned player.ChatMessage(XPLang("resetskills", player.UserIDString, skillpoints)); // Update Live UI LiveStats(player); if (config.soundEffects.skillreset) { player.RunEffect($"{config.soundEffects.skillreseteffect}"); } CheckElectricianEntities(player, true); } private void PlayerFixDataAll(BasePlayer player, bool reset = false) { if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; foreach (var p in _xperienceCache) { if (!p.Key.IsSteamId()) continue; XPRecord xprecord = GetPlayerRecord(p.Key); // Check True experience before fixing data if (xprecord.trueexperience <= 0 || xprecord.trueexperience < xprecord.experience) { xprecord.trueexperience = (int)xprecord.experience; } // Reset Level, Required XP & Stat/Skill Points if (!reset) { xprecord.rank = 0; xprecord.truelevel = 0; } xprecord.level = 0; xprecord.experience = 0; xprecord.requiredxp = config.xpLevel.levelstart; xprecord.statpoint = 0; xprecord.skillpoint = 0; // Reset Stat Levels xprecord.Mentality = 0; xprecord.Dexterity = 0; xprecord.Might = 0; xprecord.Captaincy = 0; xprecord.Weaponry = 0; xprecord.Ninjary = 0; // Reset Stat Spent Points xprecord.MentalityP = 0; xprecord.DexterityP = 0; xprecord.MightP = 0; xprecord.CaptaincyP = 0; xprecord.WeaponryP = 0; xprecord.NinjaryP = 0; // Reset Skill Levels xprecord.WoodCutter = 0; xprecord.Smithy = 0; xprecord.Miner = 0; xprecord.Forager = 0; xprecord.Hunter = 0; xprecord.Fisher = 0; xprecord.Crafter = 0; xprecord.Framer = 0; xprecord.Medic = 0; xprecord.Scavenger = 0; xprecord.Electrician = 0; xprecord.Demolitionist = 0; xprecord.Tamer = 0; // Reset Skill Spents Points xprecord.WoodCutterP = 0; xprecord.SmithyP = 0; xprecord.MinerP = 0; xprecord.ForagerP = 0; xprecord.HunterP = 0; xprecord.FisherP = 0; xprecord.CrafterP = 0; xprecord.FramerP = 0; xprecord.MedicP = 0; xprecord.ScavengerP = 0; xprecord.ElectricianP = 0; xprecord.DemolitionistP = 0; xprecord.TamerP = 0; // Set LiveUI Location to Default xprecord.UILocation = config.defaultOptions.liveuistatslocation; // Check for Rank Group and Assign or Revoke foreach (var rankgroup in config.xpLevelRanks.ranks) { if (config.xpLevelRanks.keepgrouponrank && xprecord.rank > rankgroup.Key && !permission.UserHasGroup(p.Key, rankgroup.Value.group)) { permission.AddUserGroup(p.Key, rankgroup.Value.group); } if (xprecord.rank == rankgroup.Key && !permission.UserHasGroup(p.Key, rankgroup.Value.group)) { permission.AddUserGroup(p.Key, rankgroup.Value.group); } if (xprecord.rank < rankgroup.Key && permission.UserHasGroup(p.Key, rankgroup.Value.group)) { permission.RemoveUserGroup(p.Key, rankgroup.Value.group); } if (!config.xpLevelRanks.keepgrouponrank && xprecord.rank > rankgroup.Key && permission.UserHasGroup(p.Key, rankgroup.Value.group)) { permission.RemoveUserGroup(p.Key, rankgroup.Value.group); } } // Take Backpack Permissions foreach (var removeoptions in config.backpacksmod.BackPackSlots) { if (permission.UserHasPermission(p.Key, $"backpacks.size.{removeoptions.Value.slots}")) permission.RevokeUserPermission(p.Key, $"backpacks.size.{removeoptions.Value.slots}"); } // Take Personal Animals Permissions permission.RevokeUserPermission(p.Key, PTameChicken); permission.RevokeUserPermission(p.Key, PTameBoar); permission.RevokeUserPermission(p.Key, PTameStag); permission.RevokeUserPermission(p.Key, PTameWolf); permission.RevokeUserPermission(p.Key, PTameBear); // Run Level Up to Recalculate Players Data if (!reset) { GainExpAdminFix(p.Key, xprecord.trueexperience, xprecord.trueexperience, true); } var selectplayer = BasePlayer.FindByID(Convert.ToUInt64(p.Key)); if (selectplayer != null) { LiveStats(selectplayer, true); CheckElectricianEntities(selectplayer, true); } } player.ChatMessage(XPLang("adminfixplayers", player.UserIDString)); } private void PlayerFixData(BasePlayer player, bool reset = false) { if (player == null) return; if (CheckPlayerLocation(player, "disablestatsandskills")) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; // Check True experience before fixing data if (config.xpLevelRanks.enableresetranks && !xprecord.DisableRank) { if (xprecord.trueexperience <= 0 || xprecord.trueexperience < xprecord.experience) { xprecord.trueexperience = (int)xprecord.experience; } } if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin) && config.defaultOptions.disableplayerfixdata) { player.ChatMessage(XPLang("fixdatadisabled", player.UserIDString)); return; } int timer; DateTime resettimedata = xprecord.playerfixdata.AddMinutes(config.defaultOptions.playerfixdatatimer); TimeSpan interval = resettimedata - DateTime.Now; timer = (int)interval.TotalMinutes; if (config.defaultOptions.bypassadminreset && player.IsAdmin && permission.UserHasPermission(player.UserIDString, Admin)) { timer = 0; } if (timer > 0) { player.ChatMessage(XPLang("resettimerdata", player.UserIDString, timer)); return; } // Reset Level, Required XP & Stat/Skill Points if (!reset) { xprecord.rank = 0; xprecord.truelevel = 0; } xprecord.level = 0; xprecord.experience = 0; xprecord.requiredxp = config.xpLevel.levelstart; xprecord.statpoint = 0; xprecord.skillpoint = 0; // Reset health if needed before removing points if (xprecord.Might >= 1) { // Max Health double armor = (xprecord.Might * config.might.armor) * 100; double newmaxhealth = player._maxHealth - armor; // Change Max Health if (newmaxhealth < 100) { player._maxHealth = 100; } else { player._maxHealth = (float)newmaxhealth; } // Player Current Health double defaulthealth = 100; double teahealth = 100; bool teamodified = false; double healthdifference = 0; if (GetTeaCooldown(player) != 0) { // Check for Tea Modifier if (TeaModifiers != null && xprecord.teatype != "none") { teahealth = defaulthealth + TeaModifiers.Call("GetTeaValue", player, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } switch (GetTeaTypes(player)) { case "maxhealthtea": if (!teamodified) { teahealth = defaulthealth + 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teahealth = defaulthealth + 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teahealth = defaulthealth + 20; } break; } } if (player._health > teahealth) { healthdifference = player._health - teahealth; } player._health -= (float)healthdifference; } // Reset Stat Levels xprecord.Mentality = 0; xprecord.Dexterity = 0; xprecord.Might = 0; xprecord.Captaincy = 0; xprecord.Weaponry = 0; xprecord.Ninjary = 0; // Reset Stat Spent Points xprecord.MentalityP = 0; xprecord.DexterityP = 0; xprecord.MightP = 0; xprecord.CaptaincyP = 0; xprecord.WeaponryP = 0; xprecord.NinjaryP = 0; // Reset Skill Levels xprecord.WoodCutter = 0; xprecord.Smithy = 0; xprecord.Miner = 0; xprecord.Forager = 0; xprecord.Hunter = 0; xprecord.Fisher = 0; xprecord.Crafter = 0; xprecord.Framer = 0; xprecord.Medic = 0; xprecord.Scavenger = 0; xprecord.Electrician = 0; xprecord.Demolitionist = 0; xprecord.Tamer = 0; // Reset Skill Spents Points xprecord.WoodCutterP = 0; xprecord.SmithyP = 0; xprecord.MinerP = 0; xprecord.ForagerP = 0; xprecord.HunterP = 0; xprecord.FisherP = 0; xprecord.CrafterP = 0; xprecord.FramerP = 0; xprecord.MedicP = 0; xprecord.ScavengerP = 0; xprecord.ElectricianP = 0; xprecord.DemolitionistP = 0; xprecord.TamerP = 0; // Reset calories/hydration if needed if (player.metabolism.calories.max > 500) { player.metabolism.calories.max = 500; } if (player.metabolism.hydration.max > 250) { player.metabolism.hydration.max = 250; } // Check/Reset RankGroup permissions RankCheck(player); // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { BackPackChecks(player, config.backpacksmod.statorskill, true); } // Check/Reset Tamer permissions PetChecks(player, true); // Set LiveUI Location to Default xprecord.UILocation = config.defaultOptions.liveuistatslocation; // Timer xprecord.playerfixdata = DateTime.Now; // Run Level Up to Recalculate Players Data if (!reset) { GainExpAdmin(player, xprecord.trueexperience, xprecord.trueexperience, true); } // Update Live UI LiveStats(player); // Notify Players player.ChatMessage(XPLang("playerfixdata", player.UserIDString)); CheckElectricianEntities(player, true); } private void PlayerReset(BasePlayer player) { if (player == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; // Reset Level, Required XP & Stat/Skill Points xprecord.rank = 0; xprecord.truelevel = 0; xprecord.trueexperience = 0; xprecord.level = 0; xprecord.experience = 0; xprecord.requiredxp = config.xpLevel.levelstart; xprecord.statpoint = 0; xprecord.skillpoint = 0; // Reset health if needed before removing points if (xprecord.Might >= 1) { // Max Health double armor = (xprecord.Might * config.might.armor) * 100; double newmaxhealth = player._maxHealth - armor; // Change Max Health if (newmaxhealth < 100) { player._maxHealth = 100; } else { player._maxHealth = (float)newmaxhealth; } // Player Current Health double defaulthealth = 100; double teahealth = 100; bool teamodified = false; double healthdifference = 0; if (GetTeaCooldown(player) != 0) { // Check for Tea Modifier if (TeaModifiers != null && xprecord.teatype != "none") { teahealth = defaulthealth + TeaModifiers.Call("GetTeaValue", player, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } switch (GetTeaTypes(player)) { case "maxhealthtea": if (!teamodified) { teahealth = defaulthealth + 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teahealth = defaulthealth + 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teahealth = defaulthealth + 20; } break; } } if (player._health > teahealth) { healthdifference = player._health - teahealth; } player._health -= (float)healthdifference; } // Reset Stat Levels xprecord.Mentality = 0; xprecord.Dexterity = 0; xprecord.Might = 0; xprecord.Captaincy = 0; xprecord.Weaponry = 0; xprecord.Ninjary = 0; // Reset Stat Spent Points xprecord.MentalityP = 0; xprecord.DexterityP = 0; xprecord.MightP = 0; xprecord.CaptaincyP = 0; xprecord.WeaponryP = 0; xprecord.NinjaryP = 0; // Reset Skill Levels xprecord.WoodCutter = 0; xprecord.Smithy = 0; xprecord.Miner = 0; xprecord.Forager = 0; xprecord.Hunter = 0; xprecord.Fisher = 0; xprecord.Crafter = 0; xprecord.Framer = 0; xprecord.Medic = 0; xprecord.Scavenger = 0; xprecord.Electrician = 0; xprecord.Demolitionist = 0; xprecord.Tamer = 0; // Reset Skill Spents Points xprecord.WoodCutterP = 0; xprecord.SmithyP = 0; xprecord.MinerP = 0; xprecord.ForagerP = 0; xprecord.HunterP = 0; xprecord.FisherP = 0; xprecord.CrafterP = 0; xprecord.FramerP = 0; xprecord.MedicP = 0; xprecord.ScavengerP = 0; xprecord.ElectricianP = 0; xprecord.DemolitionistP = 0; xprecord.TamerP = 0; // Harvest Reset xprecord.Wood = 0; xprecord.Stone = 0; xprecord.Metal = 0; xprecord.Sulfur = 0; xprecord.Cactus = 0; xprecord.Berries = 0; xprecord.Pumpkin = 0; xprecord.Potato = 0; xprecord.Mushroom = 0; xprecord.Hemp = 0; xprecord.Seed = 0; // Reset calories/hydration if needed if (player.metabolism.calories.max > 500) { player.metabolism.calories.max = 500; } if (player.metabolism.hydration.max > 250) { player.metabolism.hydration.max = 250; } // Check/Reset Tamer permissions RankCheck(player, true); // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { BackPackChecks(player, config.backpacksmod.statorskill, true); } // Check/Reset Tamer permissions PetChecks(player, true); // Set LiveUI Location to Default xprecord.UILocation = config.defaultOptions.liveuistatslocation; // Update Live UI LiveStats(player); // Notify Players player.ChatMessage(XPLang("xpresetplayer", player.UserIDString)); CheckElectricianEntities(player, true); } private void HarvestReset(BasePlayer player) { if (player == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; xprecord.Wood = 0; xprecord.Stone = 0; xprecord.Metal = 0; xprecord.Sulfur = 0; xprecord.Cactus = 0; xprecord.Berries = 0; xprecord.Pumpkin = 0; xprecord.Potato = 0; xprecord.Mushroom = 0; xprecord.Hemp = 0; xprecord.Seed = 0; player.ChatMessage(XPLang("playerharvestreset", player.UserIDString)); } private void SelectedPlayerReset(BasePlayer player, BasePlayer selectplayer) { if (player == null || selectplayer == null) return; XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord == null) return; // Reset Level, Required XP & Stat/Skill Points xprecord.rank = 0; xprecord.truelevel = 0; xprecord.trueexperience = 0; xprecord.level = 0; xprecord.experience = 0; xprecord.requiredxp = config.xpLevel.levelstart; xprecord.statpoint = 0; xprecord.skillpoint = 0; // Reset health if needed before removing points if (xprecord.Might >= 1) { // Max Health double armor = (xprecord.Might * config.might.armor) * 100; double newmaxhealth = selectplayer._maxHealth - armor; // Change Max Health if (newmaxhealth < 100) { selectplayer._maxHealth = 100; } else { selectplayer._maxHealth = (float)newmaxhealth; } // Player Current Health double defaulthealth = 100; double teahealth = 100; bool teamodified = false; double healthdifference = 0; if (GetTeaCooldown(selectplayer) != 0) { // Check for Tea Modifier if (TeaModifiers != null && xprecord.teatype != "none") { teahealth = defaulthealth + TeaModifiers.Call("GetTeaValue", selectplayer, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } switch (GetTeaTypes(selectplayer)) { case "maxhealthtea": if (!teamodified) { teahealth = defaulthealth + 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teahealth = defaulthealth + 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teahealth = defaulthealth + 20; } break; } } if (selectplayer._health > teahealth) { healthdifference = selectplayer._health - teahealth; } selectplayer._health -= (float)healthdifference; } // Reset Stat Levels xprecord.Mentality = 0; xprecord.Dexterity = 0; xprecord.Might = 0; xprecord.Captaincy = 0; xprecord.Weaponry = 0; xprecord.Ninjary = 0; // Reset Stat Spent Points xprecord.MentalityP = 0; xprecord.DexterityP = 0; xprecord.MightP = 0; xprecord.CaptaincyP = 0; xprecord.WeaponryP = 0; xprecord.NinjaryP = 0; // Reset Skill Levels xprecord.WoodCutter = 0; xprecord.Smithy = 0; xprecord.Miner = 0; xprecord.Forager = 0; xprecord.Hunter = 0; xprecord.Fisher = 0; xprecord.Crafter = 0; xprecord.Framer = 0; xprecord.Medic = 0; xprecord.Scavenger = 0; xprecord.Electrician = 0; xprecord.Demolitionist = 0; xprecord.Tamer = 0; // Reset Skill Spents Points xprecord.WoodCutterP = 0; xprecord.SmithyP = 0; xprecord.MinerP = 0; xprecord.ForagerP = 0; xprecord.HunterP = 0; xprecord.FisherP = 0; xprecord.CrafterP = 0; xprecord.FramerP = 0; xprecord.MedicP = 0; xprecord.ScavengerP = 0; xprecord.ElectricianP = 0; xprecord.DemolitionistP = 0; xprecord.TamerP = 0; // Harvest Reset xprecord.Wood = 0; xprecord.Stone = 0; xprecord.Metal = 0; xprecord.Sulfur = 0; xprecord.Cactus = 0; xprecord.Berries = 0; xprecord.Pumpkin = 0; xprecord.Potato = 0; xprecord.Mushroom = 0; xprecord.Corn = 0; xprecord.Hemp = 0; xprecord.Seed = 0; // Reset calories/hydration if needed if (selectplayer.metabolism.calories.max > 500) { selectplayer.metabolism.calories.max = 500; } if (selectplayer.metabolism.hydration.max > 250) { selectplayer.metabolism.hydration.max = 250; } // Check/Reset Tamer permissions RankCheck(selectplayer, true); // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { BackPackChecks(selectplayer, config.backpacksmod.statorskill, true); } // Check/Reset Tamer permissions PetChecks(selectplayer, true); // Set LiveUI Location to Default xprecord.UILocation = config.defaultOptions.liveuistatslocation; // Update Live UI LiveStats(selectplayer, true); // Notify Players selectplayer.ChatMessage(XPLang("xpresetplayer", selectplayer.UserIDString)); player.ChatMessage(XPLang("xpresetselectedplayer", player.UserIDString, xprecord.displayname)); CheckElectricianEntities(selectplayer, true); } private void SelectedPlayerResetConsole(BasePlayer selectplayer) { if (selectplayer == null) return; XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord == null) return; // Reset Level, Required XP & Stat/Skill Points xprecord.rank = 0; xprecord.truelevel = 0; xprecord.trueexperience = 0; xprecord.level = 0; xprecord.experience = 0; xprecord.requiredxp = config.xpLevel.levelstart; xprecord.statpoint = 0; xprecord.skillpoint = 0; // Reset health if needed before removing points if (xprecord.Might >= 1) { // Max Health double armor = (xprecord.Might * config.might.armor) * 100; double newmaxhealth = selectplayer._maxHealth - armor; // Change Max Health if (newmaxhealth < 100) { selectplayer._maxHealth = 100; } else { selectplayer._maxHealth = (float)newmaxhealth; } // Player Current Health double defaulthealth = 100; double teahealth = 100; bool teamodified = false; double healthdifference = 0; if (GetTeaCooldown(selectplayer) != 0) { // Check for Tea Modifier if (TeaModifiers != null && xprecord.teatype != "none") { teahealth = defaulthealth + TeaModifiers.Call("GetTeaValue", selectplayer, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } switch (GetTeaTypes(selectplayer)) { case "maxhealthtea": if (!teamodified) { teahealth = defaulthealth + 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teahealth = defaulthealth + 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teahealth = defaulthealth + 20; } break; } } if (selectplayer._health > teahealth) { healthdifference = selectplayer._health - teahealth; } selectplayer._health -= (float)healthdifference; } // Reset Stat Levels xprecord.Mentality = 0; xprecord.Dexterity = 0; xprecord.Might = 0; xprecord.Captaincy = 0; xprecord.Weaponry = 0; xprecord.Ninjary = 0; // Reset Stat Spent Points xprecord.MentalityP = 0; xprecord.DexterityP = 0; xprecord.MightP = 0; xprecord.CaptaincyP = 0; xprecord.WeaponryP = 0; xprecord.NinjaryP = 0; // Reset Skill Levels xprecord.WoodCutter = 0; xprecord.Smithy = 0; xprecord.Miner = 0; xprecord.Forager = 0; xprecord.Hunter = 0; xprecord.Fisher = 0; xprecord.Crafter = 0; xprecord.Framer = 0; xprecord.Medic = 0; xprecord.Scavenger = 0; xprecord.Electrician = 0; xprecord.Demolitionist = 0; xprecord.Tamer = 0; // Reset Skill Spents Points xprecord.WoodCutterP = 0; xprecord.SmithyP = 0; xprecord.MinerP = 0; xprecord.ForagerP = 0; xprecord.HunterP = 0; xprecord.FisherP = 0; xprecord.CrafterP = 0; xprecord.FramerP = 0; xprecord.MedicP = 0; xprecord.ScavengerP = 0; xprecord.ElectricianP = 0; xprecord.DemolitionistP = 0; xprecord.TamerP = 0; // Harvest Reset xprecord.Wood = 0; xprecord.Stone = 0; xprecord.Metal = 0; xprecord.Sulfur = 0; xprecord.Cactus = 0; xprecord.Berries = 0; xprecord.Pumpkin = 0; xprecord.Potato = 0; xprecord.Mushroom = 0; xprecord.Corn = 0; xprecord.Hemp = 0; xprecord.Seed = 0; // Reset calories/hydration if needed if (selectplayer.metabolism.calories.max > 500) { selectplayer.metabolism.calories.max = 500; } if (selectplayer.metabolism.hydration.max > 250) { selectplayer.metabolism.hydration.max = 250; } // Check/Reset Tamer permissions RankCheck(selectplayer, true); // Backpack Check if (Backpacks != null && config.backpacksmod.enablebackpacks) { BackPackChecks(selectplayer, config.backpacksmod.statorskill, true); } // Check/Reset Tamer permissions PetChecks(selectplayer, true); // Set LiveUI Location to Default xprecord.UILocation = config.defaultOptions.liveuistatslocation; // Update Live UI LiveStats(selectplayer, true); // Notify Players selectplayer.ChatMessage(XPLang("xpresetplayer", selectplayer.UserIDString)); CheckElectricianEntities(selectplayer, true); } private void SelectedHarvestReset(BasePlayer player, BasePlayer selectplayer) { if (player == null || selectplayer == null) return; XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord == null) return; xprecord.Wood = 0; xprecord.Stone = 0; xprecord.Metal = 0; xprecord.Sulfur = 0; xprecord.Cactus = 0; xprecord.Berries = 0; xprecord.Pumpkin = 0; xprecord.Potato = 0; xprecord.Mushroom = 0; xprecord.Corn = 0; xprecord.Hemp = 0; xprecord.Seed = 0; selectplayer.ChatMessage(XPLang("playerharvestreset", selectplayer.UserIDString)); player.ChatMessage(XPLang("selectedplayerharvestreset", player.UserIDString, xprecord.displayname)); } private void SelectedLevelReset(BasePlayer player, BasePlayer selectplayer) { if (player == null || selectplayer == null) return; XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord == null) return; xprecord.trueexperience -= (int)xprecord.experience; xprecord.truelevel -= (int)xprecord.level; xprecord.level = 0; xprecord.experience = 0; xprecord.requiredxp = config.xpLevel.levelstart; selectplayer.ChatMessage(XPLang("playerlevelreset", selectplayer.UserIDString)); player.ChatMessage(XPLang("selectedplayerlevelreset", player.UserIDString, xprecord.displayname)); PlayerFixData(selectplayer, true); } private void SelectedRankReset(BasePlayer player, BasePlayer selectplayer) { if (player == null || selectplayer == null) return; XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord == null) return; xprecord.rank = 0; xprecord.truelevel = (int)xprecord.level; xprecord.trueexperience = (int)xprecord.experience; selectplayer.ChatMessage(XPLang("playerrankreset", selectplayer.UserIDString)); player.ChatMessage(XPLang("selectedplayerrankreset", player.UserIDString, xprecord.displayname)); PlayerFixData(selectplayer); } private void PlayerAllRankReset(BasePlayer player) { if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; foreach (var p in _xperienceCache) { if (!p.Key.IsSteamId()) continue; var selectplayer = BasePlayer.FindByID(Convert.ToUInt64(p.Key)); if (selectplayer != null) { SelectedRankReset(player, selectplayer); continue; } XPRecord xprecord = GetPlayerRecord(p.Key); xprecord.rank = 0; xprecord.truelevel = (int)xprecord.level; xprecord.trueexperience = (int)xprecord.experience; } PlayerFixDataAll(player); player.ChatMessage(XPLang("allplayerrankreset", player.UserIDString)); } private void PlayerAllLevelReset(BasePlayer player) { if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; foreach (var p in _xperienceCache) { if (!p.Key.IsSteamId()) continue; XPRecord xprecord = GetPlayerRecord(p.Key); xprecord.trueexperience -= (int)xprecord.experience; xprecord.truelevel -= (int)xprecord.level; xprecord.level = 0; xprecord.experience = 0; xprecord.requiredxp = config.xpLevel.levelstart; } PlayerFixDataAll(player, true); player.ChatMessage(XPLang("allplayerlevelreset", player.UserIDString)); } private bool IsNight() { var dateTime = TOD_Sky.Instance.Cycle.DateTime; return dateTime.Hour >= config.nightBonus.StartTime || dateTime.Hour <= config.nightBonus.EndTime; } private void KRBonus(BasePlayer player, string KillType, int reqkills, double bonus, int bonusend, bool enablemultibonus, string multibonustype) { var playerid = player.userID.ToString(); //XPRecord xprecord = GetXPRecord(player); int KillAmount = reqkills; int BonusEnd = bonusend; int GetKillRecord = KillRecords.Call("GetKillRecord", playerid, KillType.ToLower()); if (GetKillRecord == KillAmount) { GainExp(player, bonus); player.ChatMessage(XPLang("bonus", player.UserIDString, bonus, KillAmount, KillType)); } else { if (enablemultibonus) { int MultipleKA = KillAmount; double Multibonus = bonus; for (int k = 0; k < BonusEnd; ++k) { MultipleKA += reqkills + k / BonusEnd; if (multibonustype == "increase") { Multibonus += bonus + k / BonusEnd; } if (MultipleKA >= BonusEnd) return; if (GetKillRecord == MultipleKA) { GainExp(player, Multibonus); player.ChatMessage(XPLang("bonus", player.UserIDString, Multibonus, MultipleKA, KillType)); } } } } } private void XPTeams(BasePlayer player, double e, string type) { if (player == null || !player.userID.Get().IsSteamId() || player.Team == null || player.Team.members.Count <= 1) return; if (config.defaultOptions.debugmode) { Puts($"## XPTeams ##" + $"\n Incoming XP: {(int)Math.Ceiling(e)}" + $"\n Team % Setting: {config.xpTeams.teamxpgainamount * 100}%" + $"\n Amount to give: {(int)Math.Ceiling(e * config.xpTeams.teamxpgainamount)}"); } foreach (var team in player.Team.members) { if (team == player.userID) continue; BasePlayer teammember = RelationshipManager.FindByID(team); if (teammember == null || !teammember.IsConnected || Vector3.Distance(player.ServerPosition, teammember.ServerPosition) >= config.xpTeams.teamdistance) continue; XPRecord xprecord = GetXPRecord(teammember); if (type == "addxp") { double addxp = e * config.xpTeams.teamxpgainamount; if (addxp < 1) { addxp = 1; } if (config.defaultOptions.debugmode) { Puts($"\n {player.displayName} has recieved {(int)Math.Ceiling(addxp)} XP"); } GainExpBasic(teammember, addxp); //xprecord.experience = (int)xprecord.experience + addxp; //if (xprecord.experience >= xprecord.requiredxp) //{ // LvlUp(teammember, 0, 0); //} //LiveStats(teammember, true); } if (type == "takexp") { if (e < 1) { e = 1; } double takexp = e * config.xpTeams.teamxplossamount; if (takexp < 1) { takexp = 1; } double newxp = xprecord.experience - takexp; double nextlevel = xprecord.requiredxp; // Make sure XP does not go negative if (newxp <= 0) { newxp = 0; } xprecord.experience = (int)newxp; if (nextlevel == config.xpLevel.levelstart) return; double prevlevel = xprecord.requiredxp - (xprecord.level * config.xpLevel.levelmultiplier); if (xprecord.experience < prevlevel) { LvlDown(teammember); } LiveStats(teammember, true); } } } private void HarvestRecord(BasePlayer player, string item, int amount) { if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); switch (item) { case "wood": xprecord.Wood += amount; break; case "stone": xprecord.Stone += amount; break; case "metal": xprecord.Metal += amount; break; case "sulfur": xprecord.Sulfur += amount; break; case "cactus": xprecord.Cactus += amount; break; case "berries": xprecord.Berries += amount; break; case "pumpkin": xprecord.Pumpkin += amount; break; case "potato": xprecord.Potato += amount; break; case "corn": xprecord.Corn += amount; break; case "mushroom": xprecord.Mushroom += amount; break; case "hemp": xprecord.Hemp += amount; break; case "seed": xprecord.Seed += amount; break; } } #endregion #region Personal Animal public const string Tame = "cannpc"; public const string PTameChicken = "personalanimal.chicken"; public const string PTameBoar = "personalanimal.boar"; public const string PTameStag = "personalanimal.stag"; public const string PTameWolf = "personalanimal.wolf"; public const string PTameBear = "personalanimal.bear"; public const string PTamePolarBear = "personalanimal.polarbear"; private void PetChecks(BasePlayer player, bool reset = false) { if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); var skilllevel = xprecord.Tamer; if (!config.tamer.enabletame) return; if (reset) { if (PersonalAnimal != null) { permission.RevokeUserPermission(player.UserIDString, PTameChicken); permission.RevokeUserPermission(player.UserIDString, PTameBoar); permission.RevokeUserPermission(player.UserIDString, PTameStag); permission.RevokeUserPermission(player.UserIDString, PTameWolf); permission.RevokeUserPermission(player.UserIDString, PTameBear); permission.RevokeUserPermission(player.UserIDString, PTamePolarBear); } return; } if (PersonalAnimal != null) { if (skilllevel >= config.tamer.chickenlevel && config.tamer.tamechicken && !permission.UserHasPermission(player.UserIDString, PTameChicken)) { permission.GrantUserPermission(player.UserIDString, PTameChicken, PersonalAnimal); } if (skilllevel < config.tamer.chickenlevel) { permission.RevokeUserPermission(player.UserIDString, PTameChicken); } if (skilllevel >= config.tamer.boarlevel && config.tamer.tameboar && !permission.UserHasPermission(player.UserIDString, PTameBoar)) { permission.GrantUserPermission(player.UserIDString, PTameBoar, PersonalAnimal); } if (skilllevel < config.tamer.boarlevel) { permission.RevokeUserPermission(player.UserIDString, PTameBoar); } if (skilllevel >= config.tamer.staglevel && config.tamer.tamestag && !permission.UserHasPermission(player.UserIDString, PTameStag)) { permission.GrantUserPermission(player.UserIDString, PTameStag, PersonalAnimal); } if (skilllevel < config.tamer.staglevel) { permission.RevokeUserPermission(player.UserIDString, PTameStag); } if (skilllevel >= config.tamer.wolflevel && config.tamer.tamewolf && !permission.UserHasPermission(player.UserIDString, PTameWolf)) { permission.GrantUserPermission(player.UserIDString, PTameWolf, PersonalAnimal); } if (skilllevel < config.tamer.wolflevel) { permission.RevokeUserPermission(player.UserIDString, PTameWolf); } if (skilllevel >= config.tamer.bearlevel && config.tamer.tamebear && !permission.UserHasPermission(player.UserIDString, PTameBear)) { permission.GrantUserPermission(player.UserIDString, PTameBear, PersonalAnimal); } if (skilllevel < config.tamer.bearlevel) { permission.RevokeUserPermission(player.UserIDString, PTameBear); } if (skilllevel >= config.tamer.polarbearlevel && config.tamer.tamebear && !permission.UserHasPermission(player.UserIDString, PTamePolarBear)) { permission.GrantUserPermission(player.UserIDString, PTamePolarBear, PersonalAnimal); } if (skilllevel < config.tamer.polarbearlevel) { permission.RevokeUserPermission(player.UserIDString, PTamePolarBear); } } } #endregion #region Backpacks private void BackPackChecks(BasePlayer player, string type = null, bool reset = false) { if (player == null || !player.userID.Get().IsSteamId() || !config.backpacksmod.enablebackpacks) return; XPRecord xprecord = GetXPRecord(player); // Reset and remove backpack permissions if (reset) { if (permission.UserHasPermission(player.UserIDString, "backpacks.use")) permission.RevokeUserPermission(player.UserIDString, "backpacks.use"); if (permission.UserHasPermission(player.UserIDString, "backpacks.gui")) permission.RevokeUserPermission(player.UserIDString, "backpacks.gui"); foreach (var removeoptions in config.backpacksmod.BackPackSlots) { if (permission.UserHasPermission(player.UserIDString, $"backpacks.size.{removeoptions.Value.slots}")) permission.RevokeUserPermission(player.UserIDString, $"backpacks.size.{removeoptions.Value.slots}"); } player.ChatMessage(XPLang("backpackrevoke", player.UserIDString)); return; } // Assign / Revoke Permissions based on skill and level if (type == null) return; string statorskill = config.backpacksmod.statorskill; int skilllevel = 0; switch (statorskill) { case "mentality": skilllevel = xprecord.Mentality; break; case "dexterity": skilllevel = xprecord.Dexterity; break; case "might": skilllevel = xprecord.Might; break; case "captaincy": skilllevel = xprecord.Captaincy; break; case "weaponry": skilllevel = xprecord.Weaponry; break; case "ninjary": skilllevel = xprecord.Ninjary; break; case "woodCutter": skilllevel = xprecord.WoodCutter; break; case "smithy": skilllevel = xprecord.Smithy; break; case "miner": skilllevel = xprecord.Miner; break; case "forager": skilllevel = xprecord.Forager; break; case "hunter": skilllevel = xprecord.Hunter; break; case "fisher": skilllevel = xprecord.Fisher; break; case "crafter": skilllevel = xprecord.Crafter; break; case "framer": skilllevel = xprecord.Framer; break; case "medic": skilllevel = xprecord.Medic; break; case "scavenger": skilllevel = xprecord.Scavenger; break; case "electrician": skilllevel = xprecord.Electrician; break; case "demolitionist": skilllevel = xprecord.Demolitionist; break; } if (statorskill.ToLower() == type.ToLower()) { var backpacklist = config.backpacksmod.BackPackSlots; if (backpacklist == null) return; foreach (var options in backpacklist) { // Given permission equal to level if (skilllevel == options.Value.level && !permission.UserHasPermission(player.UserIDString, $"backpacks.size.{options.Value.slots}")) { if (!permission.UserHasPermission(player.UserIDString, "backpacks.use")) permission.GrantUserPermission(player.UserIDString, "backpacks.use", Backpacks); if (!permission.UserHasPermission(player.UserIDString, "backpacks.gui")) permission.GrantUserPermission(player.UserIDString, "backpacks.gui", Backpacks); permission.GrantUserPermission(player.UserIDString, $"backpacks.size.{options.Value.slots}", Backpacks); player.ChatMessage(XPLang("backpackgrant", player.UserIDString, options.Value.slots)); } // Remove permission higher than level if (skilllevel < options.Value.level && permission.UserHasPermission(player.UserIDString, $"backpacks.size.{options.Value.slots}")) { permission.RevokeUserPermission(player.UserIDString, $"backpacks.size.{options.Value.slots}"); player.ChatMessage(XPLang("backpackgrant", player.UserIDString, options.Value.slots)); } } } } #endregion #region Kills/Deaths/Loot private string GetScientistType(string scientist) { string type = "scientist"; switch (scientist) { case "scientistnpc_cargo": type = "sc_cargo"; break; case "scientistnpc_heavy": type = "sc_heavy"; break; case "scientistnpc_junkpile_pistol": type = "sc_junkpile"; break; case "scientistnpc_oilrig": type = "sc_oilrig"; break; case "scientistnpc_patrol": type = "sc_patrol"; break; case "scientistnpc_peacekeeper": type = "sc_peacekeeper"; break; case "scientistnpc_roam": type = "sc_roam"; break; case "scientistnpc_full_any": type = "sc_full"; break; } return type; } private string GetLootType(string loot) { if (loot == null) loot = "lootcontainer"; string type = "lootcontainer"; switch (loot) { case "loot_barrel_1": case "lootbarrel-1": case "loot_barrel_2": case "loot-barrel-2": type = "lootbarrel"; break; case "oil_barrel": type = "oilbarrel"; break; case "vehicle_parts": type = "vehicleparts"; break; case "crate_tools": type = "toolcrate"; break; case "crate_food_1": case "crate_food_2": case "crate_normal_2_food": case "wagon_crate_normal_2_food": type = "foodcrate"; break; case "wagon_crate_normal_2_medical": case "crate_normal_2_medical": case "crate_medical": type = "medicalcrate"; break; case "crate_basic": case "crate_ammunition": case "crate_normal": case "crate_mine": case "crate_fuel": case "crate_normal_2": case "wagon_crate_normal": case "wagon_crate_normal_2": type = "normalcrate"; break; case "codelockedhackablecrate": case "codelockedhackablecrate_oilrig": type = "hackablelockedcrate"; break; case "crate_elite": type = "elitecrate"; break; case "bradley_crate": case "heli_crate": type = "lockedbyentcrate"; break; case "crate_underwater_basic": case "crate_underwater_advanced": type = "freeablelootcontainer"; break; case "giftbox_loot": type = "gift"; break; } return type; } private string GetDwellerType(string dweller) { string type = "dweller"; switch (dweller) { case "npc_tunneldweller": type = "tunneldweller"; break; case "npc_underwaterdweller": type = "underwaterdweller"; break; } return type; } private void OnLootSpawn(LootContainer container) { if (container != null && _lootCache.ContainsKey(container.net.ID.Value)) { _lootCache[container.net.ID.Value].id.Clear(); } } private void OnEntityDeath(BaseCombatEntity entity, HitInfo hitInfo) { // Check for null if (entity == null || hitInfo == null || hitInfo.Initiator == null) return; double addxp = 0; // Turret Kills if (hitInfo.Initiator is AutoTurret && config.xpGain.allowturretxp) { var turret = hitInfo.Initiator as AutoTurret; if (turret == null || !turret.OwnerID.IsSteamId()) return; var turretowner = FindPlayer(turret.OwnerID.ToString()); if (turretowner == null) return; GainExp(turretowner, config.xpGain.turretxp); return; } // Count Player Suicide Separately If Enabled if (entity == hitInfo.Initiator) { if (entity is BasePlayer && config.xpReducer.suicidereduce) { var suicider = entity as BasePlayer; if (suicider == null || !suicider.userID.Get().IsSteamId()) return; if (CheckPlayerLocation(suicider, "noxploss")) return; var r = GetXPRecord(suicider); var reducexp = Math.Round(r.level * config.xpReducer.suicidereduceamount); LoseExp(suicider, reducexp); suicider.ChatMessage(XPLang("suicide", suicider.UserIDString, reducexp)); LiveStats(suicider, true); } return; } // Get Killer Info var attacker = hitInfo.Initiator as BasePlayer; if (attacker == null || !attacker.userID.Get().IsSteamId()) return; // Detect Team Member Kill if (attacker.Team != null && attacker.Team.members.Count > 1 && entity is BasePlayer) { var victim = entity as BasePlayer; if (victim != null) { foreach (var teammember in attacker.Team.members) { if (teammember == attacker.userID) continue; BasePlayer findteammember = RelationshipManager.FindByID(teammember); if (findteammember == null) continue; if (victim == findteammember) return; } } } // Detect Kill Type string KillType = entity.ShortPrefabName.ToLower(); string droptype = "kill"; if (KillType.Contains("scientistnpc")) { KillType = GetScientistType(KillType); } if (KillType.Contains("dweller")) { KillType = GetDwellerType(KillType); } if (KillType.Contains("loot") || KillType.Contains("barrel")) { KillType = GetLootType(KillType); droptype = "loot"; } XPRecord xprecord = GetXPRecord(attacker); if (xprecord == null) return; // Update DataCache On Kill switch (KillType) { case "chicken": addxp = config.xpGain.chickenxp; break; case "boar": addxp = config.xpGain.boarxp; break; case "stag": addxp = config.xpGain.stagxp; break; case "wolf": case "wolf2": addxp = config.xpGain.wolfxp; break; case "bear": addxp = config.xpGain.bearxp; break; case "polarbear": addxp = config.xpGain.polarbearxp; break; case "simpleshark": addxp = config.xpGain.sharkxp; break; case "horse": case "ridablehorse": addxp = config.xpGain.horsexp; break; case "scientistnpc": case "scientist": addxp = config.xpGain.scientistxp; break; case "sc_cargo": addxp = config.xpGain.sc_cargo; break; case "sc_heavy": addxp = config.xpGain.sc_heavy; break; case "sc_patrol": addxp = config.xpGain.sc_patrol; break; case "sc_junkpile": addxp = config.xpGain.sc_junkpile; break; case "sc_oilrig": addxp = config.xpGain.sc_oilrig; break; case "sc_peacekeeper": addxp = config.xpGain.sc_peacekeeper; break; case "sc_roam": addxp = config.xpGain.sc_roam; break; case "sc_full": addxp = config.xpGain.sc_full; break; case "dweller": addxp = config.xpGain.dwellerxp; break; case "tunneldweller": addxp = config.xpGain.tunneldwellerxp; break; case "underwaterdweller": addxp = config.xpGain.underwaterdwellerxp; break; case "baseplayer": case "player": addxp = config.xpGain.playerxp; break; case "lootcontainer": addxp = config.xpGain.lootcontainerxp; break; case "lootbarrel": addxp = config.xpGain.lootbarrel; break; case "oilbarrel": addxp = config.xpGain.oilbarrel; break; case "basecorpse": addxp = config.xpGain.animalharvestxp; break; case "npcplayercorpse": addxp = config.xpGain.corpseharvestxp; break; case "bradleyapc": addxp = config.xpGain.bradley; break; case "patrolhelicopter": case "servergibs_patrolhelicopter": addxp = config.xpGain.patrolhelicopter; break; case "scarecrownpc": case "scarecrow": addxp = config.xpGain.scarecrownpc; break; case "customscientistnpc": addxp = config.xpGain.customnpc; break; case "zombienpc": case "zombie": addxp = config.xpGain.zombienpc; break; case "gift": addxp = config.xpGain.gifts; break; } if (KillRecords != null && config.xpBonus.enablebonus) { KRBonus(attacker, KillType, config.xpBonus.requiredkills, config.xpBonus.bonusxp, config.xpBonus.endbonus, config.xpBonus.multibonus, config.xpBonus.multibonustype); } GainExp(attacker, addxp); if (XPerienceAddon != null) { if (entity is BuildingBlock || entity is SimpleBuildingBlock) return; XPerienceAddon.Call("SpecialItemChance", attacker, droptype); } } private void OnPlayerDeath(BasePlayer victim, HitInfo hitInfo) { // Check for null or NPC if (victim == null || !victim.userID.Get().IsSteamId()) return; BaseEntity attacker = hitInfo?.Initiator; if (attacker == null) return; // If Suicide Ingnore Death if (attacker == victim) return; // Update Player Data On deaths if enabled if (config.xpReducer.deathreduce) { if (CheckPlayerLocation(victim, "noxploss")) return; XPRecord xprecord = GetXPRecord(victim); //double currentlevelamount = xprecord.experience - (xprecord.requiredxp - (xprecord.level * config.xpLevel.levelmultiplier)); var reducexp = Math.Round(xprecord.level * config.xpReducer.deathreduceamount); LoseExp(victim, reducexp); victim.ChatMessage(XPLang("death", victim.UserIDString, reducexp)); LiveStats(victim, true); } } private void OnLootEntity(BasePlayer player, LootContainer lootcontainer) { if (player == null || !player.userID.Get().IsSteamId() || !lootcontainer.IsValid()) return; if (MonumentOwner != null) { bool getmonumentowner = CheckMonumentOwner(player); if (getmonumentowner) return; } //var loot = lootcontainer.GetType().Name.ToLower(); var loot = lootcontainer.ShortPrefabName.ToLower(); loot = GetLootType(loot); var lootid = lootcontainer.net.ID.Value; if (loot == null) return; double addxp = 0; bool increaseloot = false; if (_lootCache.ContainsKey(lootid) && _lootCache[lootid].id.Contains(player.UserIDString)) { return; } switch (loot) { case "lootcontainer": addxp = config.xpGain.lootcontainerxp; if (config.scavenger.crates) { increaseloot = true; } break; case "vehicleparts": addxp = config.xpGain.vehicleparts; if (config.scavenger.crates) { increaseloot = true; } break; case "freeablelootcontainer": addxp = config.xpGain.underwaterlootcontainerxp; if (config.scavenger.uncrates) { increaseloot = true; } break; case "lockedbyentcrate": addxp = config.xpGain.lockedcratexp; if (config.scavenger.lockedcrates) { increaseloot = true; } break; case "hackablelockedcrate": addxp = config.xpGain.hackablecratexp; if (config.scavenger.hackcrates) { increaseloot = true; } break; case "toolcrate": addxp = config.xpGain.toolcrate; if (config.scavenger.crates) { increaseloot = true; } break; case "normalcrate": addxp = config.xpGain.normalcrate; if (config.scavenger.crates) { increaseloot = true; } break; case "elitecrate": addxp = config.xpGain.elitecrate; if (config.scavenger.crates) { increaseloot = true; } break; case "foodcrate": addxp = config.xpGain.foodcrate; if (config.scavenger.crates) { increaseloot = true; } break; } GainExp(player, addxp); //Custom Items if (config.scavenger.usecustomscavlist) { RandomScavengerItem(player); } // Increase Loot if (increaseloot && config.scavenger.scavmultiplier != 0) { if (!_lootCache.ContainsKey(lootid)) { IncreaseLootContainers(player, lootcontainer); } } // Add player and container ID to LootData AddLootData(player, lootcontainer); if (XPerienceAddon != null) { XPerienceAddon.Call("SpecialItemChance", player, "loot"); } } private void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo hitInfo) { if (entity == null || hitInfo == null || hitInfo.Initiator == null) return; if (entity.GetType().Name.ToLower().Contains("corpse")) return; // Ignore if self damage if (entity == hitInfo.Initiator) return; double blockamount = 0.0; bool didblock = false; bool diddodge = false; var player = entity as BasePlayer; if (player != null && player.userID.Get().IsSteamId()) { if (CheckPlayerLocation(player, "disablestatsandskills")) return; XPRecord vxprecord = GetXPRecord(player); if (vxprecord != null) { // Raidable Bases Check if (RaidableBases != null && config.raidablebasesmod.disableabilities && vxprecord.raidablebase) { return; } // If UI open then close ClearPlayerUIs(player, true); // Dexterity Armor Reduction if (vxprecord.Dexterity > 0 && player._health > 100) { double defaultdmg = hitInfo.damageTypes.Total(); double armordmgreduction = vxprecord.Dexterity * config.dexterity.reducearmordmg; // Ranks if (config.xpLevelRanks.rankskillboost && !vxprecord.DisableRank && config.Rankboostssettings.armor) { armordmgreduction += vxprecord.rank * config.xpLevelRanks.rankstatboostamount; } hitInfo.damageTypes?.ScaleAll(1 - (float)armordmgreduction); double damgdiff = defaultdmg - hitInfo.damageTypes.Total(); if (config.defaultOptions.disablearmorchat) { player.ChatMessage(XPLang("victimarmordmg", player.UserIDString, Math.Round(damgdiff, 2))); } } // Random chance to Block or Dodge double dodgechance = (vxprecord.Dexterity * config.dexterity.dodgechance) * 100; double blockchance = (vxprecord.Dexterity * config.dexterity.blockchance) * 100; int fifty = RandomNumber.Between(0, 101); int roll = RandomNumber.Between(0, 110); // Block if (fifty < 50) { if (vxprecord.Dexterity > 0 && config.dexterity.blockchance != 0 && roll <= blockchance) { didblock = true; double blockdmg = (vxprecord.Dexterity * config.dexterity.blockamount); blockamount = hitInfo.damageTypes.Total() * blockdmg; // Ranks if (config.xpLevelRanks.rankstatboost && !vxprecord.DisableRank && config.Rankboostssettings.block) { blockamount += vxprecord.rank * config.xpLevelRanks.rankstatboostamount; } hitInfo.damageTypes?.ScaleAll(1 - (float)blockdmg); // Disable Chats if (!config.defaultOptions.hidechatnotifications) { player.ChatMessage(XPLang("victimblock", player.UserIDString, Math.Round(blockamount))); } } } // Dodge if (fifty > 50) { if (vxprecord.Dexterity > 0 && config.dexterity.dodgechance != 0 && roll <= dodgechance) { diddodge = true; hitInfo.damageTypes?.ScaleAll(0); // Disable Chats if (!config.defaultOptions.hidechatnotifications) { player.ChatMessage(XPLang("victimdodge", player.UserIDString)); } } } } } var attacker = hitInfo.Initiator as BasePlayer; if (attacker == null || !attacker.userID.Get().IsSteamId()) return; if (CheckPlayerLocation(attacker, "disablestatsandskills")) return; var patrolheli = entity as PatrolHelicopter; if (patrolheli is PatrolHelicopter) { Heli patrol; if (_heliCache.TryGetValue(patrolheli.net.ID.Value, out patrol)) { patrol.heli = patrolheli.net.ID.Value; patrol.player = attacker.userID.Get(); } else { _heliCache.Add(patrolheli.net.ID.Value, new Heli { heli = patrolheli.net.ID.Value, player = attacker.userID.Get() }); _helitracker?.Destroy(); _helitracker = timer.Once(90f, () => { _heliCache.Remove(patrolheli.net.ID.Value); }); } } var KillType = entity?.GetType().Name.ToLower(); XPRecord xprecord = GetXPRecord(attacker); if (xprecord == null) return; if (diddodge && attacker) { if (GetPlayerCooldown(attacker.userID, "notify") != 0) { // Disable Chats if (!config.defaultOptions.hidechatnotifications) { attacker.ChatMessage(XPLang("attackerdodge", attacker.UserIDString)); } _notifyCooldowns[attacker.userID] = CurrentTime + config.defaultOptions.NotifcationCooldown; return; } } if (didblock && attacker) { if (GetPlayerCooldown(attacker.userID, "notify") != 0) { // Disable Chats if (!config.defaultOptions.hidechatnotifications) { attacker.ChatMessage(XPLang("attackerblock", attacker.UserIDString, Math.Round(blockamount))); } _notifyCooldowns[attacker.userID] = CurrentTime + config.defaultOptions.NotifcationCooldown; return; } } // Hunter Wildlife Increase if (KillType == "chicken" || KillType == "boar" || KillType == "stag" || KillType == "wolf" || KillType == "bear" || KillType == "polarbear" || KillType == "horse" || KillType == "ridablehorse" || KillType == "simpleshark") { bool exluded = false; if (config.hunter.excludelongrangeweapons || hitInfo.Weapon.CanUseAtLongRange) { exluded = true; } if (config.hunter.excludemedrangeweapons || hitInfo.Weapon.CanUseAtMediumRange) { exluded = true; } if (!exluded) { double hunterdmg = xprecord.Hunter * config.hunter.damageincrease; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.hunterdmg) { hunterdmg += xprecord.rank * config.xpLevelRanks.rankstatboostamount; } hitInfo.damageTypes?.ScaleAll(1 + (float)hunterdmg); } } // Hunter Night Wildlife Increase if (IsNight() && config.nightBonus.enableskillboosts) { double nightdmg = xprecord.Hunter * config.hunter.nightdmgincrease; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.hunterndmg) { nightdmg += xprecord.rank * config.xpLevelRanks.rankstatboostamount; } hitInfo.damageTypes?.ScaleAll(1 + (float)nightdmg); } // Mentality PVP/NPC and Critical Chance if (xprecord.Mentality >= 1) { if (entity.IsNpc) { if (entity.GetType().Name.ToLower().Contains("scientist") || entity.GetType().Name.ToLower().Contains("customscientist") || entity.GetType().Name.ToLower().Contains("dweller") || entity.GetType().Name.ToLower().Contains("scarecrow") || entity.GetType().Name.ToLower().Contains("bradleyapc")) { double pvpnpcbonus = xprecord.Mentality * config.mentality.damageincrease; hitInfo.damageTypes?.ScaleAll(1 + (float)pvpnpcbonus); } } double critchance = (xprecord.Mentality * config.mentality.criticalchance) * 100; if (RandomNumber.Between(0, 101) <= critchance) { float critdmgamount = (float)config.mentality.criticaldgm; hitInfo.damageTypes?.ScaleAll(1 + critdmgamount); double crithit = Math.Ceiling((int)hitInfo.damageTypes.Total() * critdmgamount); // UINotify if (GetPlayerCooldown(attacker.userID, "notify") != 0) { // Disable Chats if (!config.defaultOptions.hidechatnotifications) { attacker.ChatMessage(XPLang("crithit", attacker.UserIDString, crithit)); } _notifyCooldowns[attacker.userID] = CurrentTime + config.defaultOptions.NotifcationCooldown; } } } // Might Melee Increase if (xprecord.Might > 0 && hitInfo?.Weapon != null) { if (hitInfo.Weapon.ShortPrefabName.Contains("knife") || hitInfo.Weapon.ShortPrefabName.Contains("hatchet") || hitInfo.Weapon.ShortPrefabName.Contains("pitchfork") || hitInfo.Weapon.ShortPrefabName.Contains("sword") || hitInfo.Weapon.ShortPrefabName.Contains("spear") || hitInfo.Weapon.ShortPrefabName.Contains("cleaver") || hitInfo.Weapon.ShortPrefabName.Contains("club") || hitInfo.Weapon.ShortPrefabName.Contains("mace") || hitInfo.Weapon.ShortPrefabName.Contains("pickaxe") || hitInfo.Weapon.ShortPrefabName.Contains("machete")) { double meleeincrease = xprecord.Might * config.might.meleedmg; // Ranks if (config.xpLevelRanks.rankstatboost && !xprecord.DisableRank && config.Rankboostssettings.meleedmg) { meleeincrease += xprecord.rank * config.xpLevelRanks.rankstatboostamount; } hitInfo.damageTypes?.ScaleAll(1 + (float)meleeincrease); } } // Ninjary Increase if (xprecord.Ninjary > 0 && hitInfo?.Weapon != null) { if (hitInfo.Weapon.ShortPrefabName.Contains("knife")) { double Ninjaryincrease = xprecord.Ninjary * config.ninjary.knifeincrease; hitInfo.damageTypes?.ScaleAll(1 + (float)Ninjaryincrease); } else if (hitInfo.Weapon.ShortPrefabName.Contains("sword")) { double Ninjaryincrease = xprecord.Ninjary * config.ninjary.swordincrease; hitInfo.damageTypes?.ScaleAll(1 + (float)Ninjaryincrease); } } // Hunter Bow Increase if (xprecord.Hunter > 0 && hitInfo?.Weapon != null) { if (hitInfo.Weapon.ShortPrefabName.Contains("bow")) { double bowincrease = xprecord.Hunter * config.hunter.bowdmgincrease; hitInfo.damageTypes?.ScaleAll(1 + (float)bowincrease); } } } private void OnContainerDropItems(ItemContainer lootcontainer) { if (lootcontainer == null) return; var lootentity = lootcontainer.entityOwner as LootContainer; if (lootentity == null || lootentity.IsDestroyed) return; var player = lootentity.lastAttacker as BasePlayer; if (player == null) return; // Custom Item Drops if (config.scavenger.usecustomscavlist) { RandomScavengerItem(player); } // Increase Container Loot if (!config.scavenger.drops && config.scavenger.scavmultiplier == 0) return; IncreaseLootContainerDrops(lootcontainer); } private void CanLootEntity(BasePlayer player, LootableCorpse corpse) { if (player == null || corpse == null) return; if (config.scavenger.scientists && corpse.ShortPrefabName.Contains("scientist")) { if (!_corpseCache.ContainsKey(corpse.net.ID.Value)) { IncreaseLootCorpse(player, corpse); } AddCorpseData(player, corpse); } } private void OnEntityKill(BaseNetworkable entity) { if (entity == null) return; var patrol = entity as PatrolHelicopter; if (patrol is PatrolHelicopter) { Heli patrolheli; if (_heliCache.TryGetValue(patrol.net.ID.Value, out patrolheli)) { var player = FindPlayer(patrolheli.player.ToString()); if (player.userID.Get().IsSteamId()) { XPRecord xprecord = GetXPRecord(player); double addxp = config.xpGain.patrolhelicopter; if (KillRecords != null && config.xpBonus.enablebonus) { KRBonus(player, "patrolhelicopter", config.xpBonus.requiredkills, config.xpBonus.bonusxp, config.xpBonus.endbonus, config.xpBonus.multibonus, config.xpBonus.multibonustype); } GainExp(player, addxp); if (XPerienceAddon != null) { XPerienceAddon.Call("SpecialItemChance", player, "kill"); } } _helitracker?.Destroy(); _heliCache.Remove(patrol.net.ID.Value); } } // Destroy Dash Panel UI when Vehicle Destroyed while mounted DashPanelTimer?.Destroy(); // Boat Boat defaultboat; var boat = entity as BaseBoat; if (boat.IsValid()) { if (_boatCache.TryGetValue(boat.net.ID.Value, out defaultboat)) { boat?.DismountAllPlayers(); var captain = FindPlayer(defaultboat.player.ToString()); if (captain != null) { DashPanelTimer?.Destroy(); DestroyUi(captain, XPerienceLiveDashPanel); } _boatCache.Remove(entity.net.ID.Value); } } // Vehicle Vehicle vehicle; var car = entity as ModularCar; if (car.IsValid()) { if (_vehicleCache.TryGetValue(car.net.ID.Value, out vehicle)) { car?.DismountAllPlayers(); var driver = FindPlayer(vehicle.player.ToString()); if (driver != null) { DashPanelTimer?.Destroy(); DestroyUi(driver, XPerienceLiveDashPanel); } _vehicleCache.Remove(car.net.ID.Value); } } // Mini Copter MiniCopterP minicopter; var mini = entity as Minicopter; if (mini.IsValid()) { if (_minicopterCache.TryGetValue(mini.net.ID.Value, out minicopter)) { mini?.DismountAllPlayers(); var pilot = FindPlayer(minicopter.player.ToString()); if (pilot != null) { DashPanelTimer?.Destroy(); DestroyUi(pilot, XPerienceLiveDashPanel); } _minicopterCache.Remove(entity.net.ID.Value); } } } private void OnHelicopterKilled(CH47HelicopterAIController heli) { if (heli == null || heli.lastAttacker == null) return; var player = heli.lastAttacker as BasePlayer; if (player == null || !player.userID.Get().IsSteamId()) return; GainExp(player, config.xpGain.patrolhelicopter); } #endregion #region Ninjary private object CanHelicopterTarget(PatrolHelicopterAI heli, BasePlayer player) { if (player == null || heli == null) return null; if (config.ninjary.maxlvl == 0 || config.ninjary.patrolstealth == 0) return null; if (player.userID.Get().IsSteamId()) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord.Ninjary > 0 && config.ninjary.maxlvl > 0) { double evadechance = config.ninjary.patrolstealth * 100; if ((Random.Range(0, 101) <= evadechance) == true) { return false; } } } return null; } private object CanBradleyApcTarget(BradleyAPC apc, BaseEntity entity) { if (entity == null || apc == null) return null; if (config.ninjary.maxlvl == 0 || config.ninjary.bradleystealth == 0) return null; var player = entity as BasePlayer; if (player == null || !player.userID.Get().IsSteamId()) return null; if (player.userID.Get().IsSteamId()) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord.Ninjary > 0 && config.ninjary.maxlvl > 0) { double evadechance = config.ninjary.bradleystealth * 100; if ((Random.Range(0, 101) <= evadechance) == true) { return false; } } } return null; } private object CanNpcAttack(BaseNpc npc, BaseEntity entity) { if (entity == null || npc == null) return null; if (config.ninjary.maxlvl == 0 || config.ninjary.npcstealth == 0) return null; var player = entity as BasePlayer; if (player == null || !player.userID.Get().IsSteamId()) return null; if (player.userID.Get().IsSteamId()) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord.Ninjary > 0 && config.ninjary.maxlvl > 0) { double evadechance = config.ninjary.npcstealth * 100; if ((Random.Range(0, 101) <= evadechance) == true) { return false; } } } return null; } private object OnHelicopterTarget(HelicopterTurret turret, BaseCombatEntity entity) { if (entity == null) return null; if (config.ninjary.maxlvl == 0 || config.ninjary.ch47stealth == 0) return null; var player = entity as BasePlayer; if (player == null || !player.userID.Get().IsSteamId()) return null; if (player.userID.Get().IsSteamId()) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord.Ninjary > 0 && config.ninjary.maxlvl > 0) { double evadechance = config.ninjary.ch47stealth * 100; if ((Random.Range(0, 101) <= evadechance) == true) { return true; } } } return null; } private object OnNpcTarget(BaseEntity npc, BaseEntity entity) { if (entity == null || npc == null) return null; if (config.ninjary.maxlvl == 0 || config.ninjary.npcstealth == 0) return null; var player = entity as BasePlayer; if (player == null || !player.userID.Get().IsSteamId()) return null; if (player.userID.Get().IsSteamId()) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord.Ninjary > 0 && config.ninjary.maxlvl > 0) { double evadechance = config.ninjary.npcstealth * 100; if ((Random.Range(0, 101) <= evadechance) == true) { return true; } } } return null; } private object OnNpcTargetSense(BaseEntity owner, BaseEntity entity, AIBrainSenses brainSenses) { if (entity == null || owner == null) return null; if (config.ninjary.maxlvl == 0 || config.ninjary.npcstealth == 0) return null; var player = entity as BasePlayer; //var player = brainSenses.playerOwner; if (player == null || !player.userID.Get().IsSteamId()) return null; if (player.userID.Get().IsSteamId()) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord.Ninjary > 0 && config.ninjary.maxlvl > 0) { double evadechance = config.ninjary.npcstealth * 100; if ((Random.Range(0, 100) <= evadechance) == true) { return true; } } } return null; } private object OnTurretTarget(AutoTurret turret, BaseCombatEntity entity) { if (entity == null) return null; if (config.ninjary.maxlvl == 0 || config.ninjary.turretstealth == 0) return null; var player = entity as BasePlayer; if (player == null || !player.userID.Get().IsSteamId()) return null; if (player.userID.Get().IsSteamId()) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord.Ninjary > 0 && config.ninjary.maxlvl > 0) { double evadechance = config.ninjary.turretstealth * 100; if ((Random.Range(0, 101) <= evadechance) == true) { turret.targetVisible = false; return true; } } } return null; } #endregion #region Demolitionist private void OnExplosiveThrown(BasePlayer player, BaseEntity entity, ThrownWeapon item) { if (player == null || entity == null || item == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Demolitionist < 1) return; TimedExplosive timedExplosive = entity as TimedExplosive; if (timedExplosive == null) return; float defaultradius = 0; double radius = 0; float defaultdamage = 0; double amount = 0; float newdamage = 0; // Explosive Radius if (config.demolitionist.explosiveradius != 0) { defaultradius = timedExplosive.explosionRadius; radius = (xprecord.Demolitionist * config.demolitionist.explosiveradius) * timedExplosive.explosionRadius; timedExplosive.explosionRadius += (float)radius; } // Explosive Damage if (config.demolitionist.explosivedamage != 0) { foreach (DamageTypeEntry damageType in timedExplosive.damageTypes) { defaultdamage = damageType.amount; amount = (xprecord.Demolitionist * config.demolitionist.explosivedamage) * damageType.amount; damageType.amount += (float)amount; newdamage = damageType.amount; } } if (config.defaultOptions.debugmode) { double dudchance = config.demolitionist.explosivedudreduction * 100; Puts($"## Demolitionist Debug ## \n" + $"Player: {player.displayName} \n" + $"Demolitionist Level: {xprecord.Demolitionist} \n" + $"Explosive Type: {timedExplosive.ShortPrefabName} \n" + $"Default Damage: {defaultdamage} \n" + $"Damage Increase: {amount} \n" + $"New Total Damage: {newdamage} \n" + $"Default Radius: {defaultradius} \n" + $"Radius Increase: {radius} \n" + $"New Radius: {timedExplosive.explosionRadius} \n" + $"Dud Chance Reduction: {dudchance * xprecord.Demolitionist}% \n" + ""); } } private object OnExplosiveDud(DudTimedExplosive explosive) { if (explosive == null || explosive.GetParentEntity() == null || !explosive.GetParentEntity().OwnerID.IsSteamId()) return null; if (config.defaultOptions.debugmode) { Puts($"## Demolitionist Debug ## \n" + $"Explosive / Owner null check pass..\n"); } var player = FindPlayer(explosive.GetParentEntity().OwnerID.ToString()); if (player == null) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Demolitionist < 1) return null; if (config.defaultOptions.debugmode) { Puts($"Player and Level Found... \n"); } double dudchance = (config.demolitionist.explosivedudreduction * xprecord.Demolitionist) * 100; if (dudchance > 100) { if (config.defaultOptions.debugmode) { Puts($"Dud Chance excedes 100%, forcing 100% \n"); } dudchance = 100; } if (config.defaultOptions.debugmode) { Puts($"Explosive Trying to Dud... \n" + $"Dud Chance Reduction: {dudchance}% \n" + "Applying Dud Reduction Chance..."); } if ((Random.Range(0, 101) <= dudchance) == true) { if (config.defaultOptions.debugmode) { Puts("Dud Reduction Chance Success... \n" + "Charge will Explode..."); } return false; } if (config.defaultOptions.debugmode) { Puts("Dud Reduction Chance Failed... \n" + "Charge will not explode..."); } return null; } #endregion #region Missions private void OnMissionSucceeded(BaseMission mission, BasePlayer assignee) { // Check for null or NPC if (assignee == null || !assignee.userID.Get().IsSteamId()) return; if (mission == null) return; // Give XP double addxp = config.xpMissions.missionsucceededxp; GainExp(assignee, addxp); if (XPerienceAddon != null) { XPerienceAddon.Call("SpecialItemChance", assignee, "mission"); } } private void OnMissionFailed(BaseMission mission, BasePlayer assignee) { if (!config.xpMissions.missionfailed) return; // Check for null or NPC if (assignee == null || !assignee.userID.Get().IsSteamId()) return; if (mission == null) return; // Take XP double reducexp = config.xpMissions.missionfailedxp; LoseExp(assignee, reducexp); } #endregion #region Crafting/Building private int DetermineIngredientAmount(int item, int amount, BasePlayer player) { XPRecord xprecord = GetXPRecord(player); int skilllevel = xprecord.Crafter; double craftcost = (config.crafter.craftcost * skilllevel) * amount; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.craftercost) { craftcost += xprecord.rank * config.xpLevelRanks.rankstatboostamount; } double newamount = Math.Round(amount - craftcost); // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * newamount; newamount = Math.Round(newamount - captaincyboost); } if (((config.crafter.craftcost * skilllevel) * 100) > 45 && (item == -1938052175 || item == -1581843485)) { craftcost = 0.45 * amount; newamount = Math.Round(amount - craftcost); } if (newamount < 1) { newamount = 1; } return (int)newamount; } public void CollectIngredient(int item, int amount, List collect, ItemCrafter itemCrafter, BasePlayer player) { var newamount = DetermineIngredientAmount(item, amount, player); foreach (ItemContainer container in itemCrafter.containers) { amount -= container.Take(collect, item, (int)newamount); if (amount < 1) { amount = 1; } } } bool? OnIngredientsCollect(ItemCrafter itemCrafter, ItemBlueprint blueprint, ItemCraftTask task, int amount, BasePlayer player) { if (ItemRetriever != null) return null; //if (amount == 0 || amount == null) return; List collect = new List(); foreach (ItemAmount ingredient in blueprint.ingredients) CollectIngredient(ingredient.itemid, (int)ingredient.amount * amount, collect, itemCrafter, player); //task.potentialOwners = new List(); foreach (Item obj in collect) { obj.CollectedForCrafting(player); //if (!task.potentialOwners.Contains(player.userID)) // task.potentialOwners.Add(player.userID); } task.takenItems = collect; return true; } private void OnIngredientsDetermine(Dictionary overridenIngredients, ItemBlueprint blueprint, int amount, BasePlayer player) { if (overridenIngredients.Count > 0) { Puts("Another plugin is using the OnIngredientsDetermine hook to alter crafting ingredients for Item Retriever. XPerience will override it."); } foreach (ItemAmount ingredient in blueprint.ingredients) { overridenIngredients[ingredient.itemid] = DetermineIngredientAmount(ingredient.itemid, (int)ingredient.amount * amount, player); } } private void OnItemCraft(ItemCraftTask task, BasePlayer player) { if (task.cancelled) return; // Ignore keys if (task.blueprint.targetItem.shortname.Contains("key") || task.blueprint.name.Contains("(Clone)")) return; XPRecord xprecord = GetXPRecord(player); int skilllevel = xprecord.Crafter; if (skilllevel <= 0) return; var craftTime = task.blueprint.time; var itemlevel = task.blueprint.workbenchLevelRequired; float workbenchinuse = player.currentCraftLevel; // Items with no workbench requirement or same as workbench level if (itemlevel == workbenchinuse || workbenchinuse == 0) { double craftspeed = (config.crafter.craftspeed * skilllevel) * task.blueprint.time; craftTime = task.blueprint.time - (float)craftspeed; } // Items with no workbench requirement using level 1,2,3 workbench if (workbenchinuse == 1 && itemlevel == 0) { double craftspeed = (config.crafter.craftspeed * skilllevel) * (task.blueprint.time * 0.5); craftTime = task.blueprint.time - (float)craftspeed; } else if ((workbenchinuse == 2 || workbenchinuse == 3) && itemlevel == 0) { double craftspeed = (config.crafter.craftspeed * skilllevel) * (task.blueprint.time * 0.75); craftTime = task.blueprint.time - (float)craftspeed; } // Items with workbench requirement level 1 if (workbenchinuse == 2 && itemlevel == 1) { double craftspeed = (config.crafter.craftspeed * skilllevel) * (task.blueprint.time * 0.5); craftTime = task.blueprint.time - (float)craftspeed; } else if (workbenchinuse == 3 && itemlevel == 1) { double craftspeed = (config.crafter.craftspeed * skilllevel) * (task.blueprint.time * 0.75); craftTime = task.blueprint.time - (float)craftspeed; } // Items with workbench requirement level 2 if (workbenchinuse == 3 && itemlevel == 2) { double craftspeed = (config.crafter.craftspeed * skilllevel) * (task.blueprint.time * 0.5); craftTime = task.blueprint.time - (float)craftspeed; } // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * craftTime; craftTime = (float)craftTime - (float)captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.crafterspeed) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * craftTime; craftTime = (float)craftTime - (float)rankboost; } // Change Crafting Tme task.blueprint = UnityEngine.Object.Instantiate(task.blueprint); if (craftTime <= 0) { craftTime = 0; } task.blueprint.time = craftTime; return; } private void OnItemCraftFinished(ItemCraftTask task, Item item, ItemCrafter itemCrafter) { if (task == null || item == null || itemCrafter == null) return; var player = itemCrafter.owner; if (player == null) return; XPRecord xprecord = GetXPRecord(player); bool allowxp = true; if (config.xpGain.craftingxpdelay && GetPlayerCooldown(player.userID, "craft") != 0) { allowxp = false; } if (GetPlayerCooldown(player.userID, "craft") == 0) { _craftCooldowns[player.userID] = CurrentTime + config.xpGain.craftingxpdelayseconds; } if (allowxp) { GainExp(player, config.xpGain.craftingxp); } int skilllevel = xprecord.Crafter; if (skilllevel <= 0 || config.crafter.conditionchance == 0) return; double conditionchance = (config.crafter.conditionchance * skilllevel) * 100; float tenpercent = (float)(item._maxCondition / (config.crafter.conditionamount * 100)); // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * conditionchance; conditionchance += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.craftercc) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * conditionchance; conditionchance += rankboost; } if (Random.Range(0, 101) <= conditionchance) { if (item.GetHeldEntity() is BaseProjectile) { BaseProjectile projectile = item?.GetHeldEntity() as BaseProjectile; if (projectile == null) return; item._maxCondition += tenpercent; item.condition += tenpercent; projectile.SendNetworkUpdateImmediate(); player.ChatMessage(XPLang("weaponcon", player.UserIDString, item.condition)); } else { item._maxCondition += tenpercent; item.condition += tenpercent; item.GetHeldEntity()?.SendNetworkUpdateImmediate(); } } } private object OnItemUse(Item item) { if (item?.info.shortname != "lowgradefuel") return null; var shortName = item.parent?.parent?.info.shortname; if (shortName != "hat.candle" && shortName != "hat.miner") return null; var player = item.GetRootContainer()?.GetOwnerPlayer(); XPRecord xprecord = GetXPRecord(player); var skilllevel = xprecord.Miner; double lessfueltotal = (config.miner.fuelconsumption * skilllevel) * 100; // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * lessfueltotal; lessfueltotal += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.minerfuel) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * lessfueltotal; lessfueltotal += rankboost; } if (Random.Range(0, 110) <= lessfueltotal) { return 0; } return null; } private List RepairItems(BasePlayer player, Item item) { ItemDefinition info = item.info; ItemBlueprint component = info.GetComponent(); List list = Facepunch.Pool.Get>(); RepairBench.GetRepairCostList(component, list); return ApplyItemCostReduction(player, list, item); } private List ApplyItemCostReduction(BasePlayer player, List list, Item item) { List reducedlist = new List(); var repairCostreduction = RepairBench.RepairCostFraction(item); double defaultamount; double newamount; XPRecord xprecord = GetXPRecord(player); int skilllevel = xprecord.Crafter; if (skilllevel <= 0) return null; foreach (ItemAmount itemAmount in list) { if (itemAmount.itemDef.category != ItemCategory.Component) { defaultamount = Math.Ceiling(itemAmount.amount * repairCostreduction); newamount = Math.Ceiling(defaultamount - (config.crafter.repaircost * xprecord.Crafter) * defaultamount); // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.crafterrc) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * newamount; newamount -= Math.Ceiling(rankboost); } if (newamount < 1) { newamount = 1; } itemAmount.amount = (float)newamount; reducedlist.Add(itemAmount); } } return reducedlist; } private bool PlayerCanRepair(BasePlayer player, List list) { foreach (ItemAmount itemAmount in list) { int amount = player.inventory.GetAmount(itemAmount.itemDef.itemid); if (itemAmount.amount > amount) { return false; } } return true; } private void TakeItems(BasePlayer player, List list) { foreach (ItemAmount itemAmount in list) { player.inventory.Take((List)null, itemAmount.itemid, (int)itemAmount.amount); } } private void OnItemRepair(BasePlayer player, Item item) { if (player == null || item == null) return; XPRecord xprecord = GetXPRecord(player); int skilllevel = xprecord.Crafter; if (skilllevel <= 0) return; double repairincrease = (config.crafter.repairincrease * skilllevel) * 100; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.crafterri) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * repairincrease; repairincrease += rankboost; } var list = RepairItems(player, item); if (!PlayerCanRepair(player, list)) { player.ChatMessage(XPLang("crafternotenough", player.UserIDString)); return; } if (Random.Range(0, 101) <= repairincrease) { if (item.GetHeldEntity() is BaseProjectile) { BaseProjectile projectile = item?.GetHeldEntity() as BaseProjectile; if (projectile == null) return; item.condition = item._maxCondition; projectile.SendNetworkUpdateImmediate(); TakeItems(player, list); return; } else { item.condition = item._maxCondition; item.GetHeldEntity()?.SendNetworkUpdateImmediate(); TakeItems(player, list); return; } } //TakeItems(player, list); } private void OnEntityBuilt(Planner plan) { var player = plan.GetOwnerPlayer(); if (player == null) return; BuildingPrivlidge isauth = player.GetBuildingPrivilege(); if (config.xpBuilding.requirebuildingprivlidge && (isauth == null || !isauth.IsAuthed(player))) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; bool allowxp = true; double addxp = config.xpBuilding.twigstructure; if (config.xpBuilding.buildxpdelay && (GetPlayerCooldown(player.userID, "build") != 0)) { _buildCooldowns[player.userID] = CurrentTime + config.xpBuilding.buildxpdelayseconds; allowxp = false; } _buildCooldowns[player.userID] = CurrentTime + config.xpBuilding.buildxpdelayseconds; if (allowxp) GainExp(player, addxp); } private void OnStructureUpgrade(BuildingBlock buildingBlock, BasePlayer player, BuildingGrade.Enum newgrade) { if (buildingBlock == null || player == null) return; BuildingPrivlidge isauth = player.GetBuildingPrivilege(); if (config.xpBuilding.requirebuildingprivlidge && (isauth == null || !isauth.IsAuthed(player))) return; // Check for BuildingGrades mod and np BG xp if (BuildingGrades != null) { var processing = BuildingGrades.Call("IsProcessingBuildingBlock", buildingBlock); if (processing is bool && (bool)processing) { return; } } // If Building Grades not installed continue if (config.defaultOptions.debugmode) { Puts("## Structure Upgrade Debug ## \n" + "OnStructureUpgrade hook ran, pushing data to CheckStructureUpgrade... \n"); } NextTick(() => CheckStructureUpgrade(buildingBlock, player, newgrade)); } private void CheckStructureUpgrade(BuildingBlock buildingBlock, BasePlayer player, BuildingGrade.Enum newGrade) { if (buildingBlock == null || player == null) return; BuildingPrivlidge isauth = player.GetBuildingPrivilege(); if (config.xpBuilding.requirebuildingprivlidge && (isauth == null || !isauth.IsAuthed(player))) return; if (config.defaultOptions.debugmode) { Puts("CheckStructureUpgrade hook recieved data successful... \n" + "Checking for new grade.. \n"); } // If Not Upgrade return if (buildingBlock.grade != newGrade) return; // If Upgraded continue double addxp = 0; bool allowxp = true; switch (buildingBlock.grade) { case BuildingGrade.Enum.Wood: addxp = config.xpBuilding.woodstructure; break; case BuildingGrade.Enum.Stone: addxp = config.xpBuilding.stonestructure; break; case BuildingGrade.Enum.Metal: addxp = config.xpBuilding.metalstructure; break; case BuildingGrade.Enum.TopTier: addxp = config.xpBuilding.armoredstructure; break; } if (config.defaultOptions.debugmode) { Puts($"New Grade: {buildingBlock.grade} \n" + $"Building Type: {buildingBlock.ShortPrefabName} \n" + $"Sending data to CanAffordUpgrade hook for material reduction... \n" + $"Grade check complete... \n"); } if (CanAffordUpgrade(buildingBlock, player, buildingBlock.grade)) { if (config.xpBuilding.buildxpdelay && (GetPlayerCooldown(player.userID, "build") != 0)) { allowxp = false; if (config.defaultOptions.debugmode) { Puts("Delay check... active \n" + $"No XP awarded due to delay active... \n"); } } if (GetPlayerCooldown(player.userID, "build") == 0) { _buildCooldowns[player.userID] = CurrentTime + config.xpBuilding.buildxpdelayseconds; } if (allowxp) { GainExp(player, addxp); if (config.defaultOptions.debugmode) { Puts("Delay check... inactive \n" + $"{addxp} XP sent to GainExp hook... \n"); } } if (config.defaultOptions.debugmode) { Puts("Sending remaining data to RefundMaterials hook.... \n"); } RefundMaterials(buildingBlock, player, buildingBlock.grade); } } public bool CanAffordUpgrade(BuildingBlock buildingBlock, BasePlayer player, BuildingGrade.Enum grade) { object building = Interface.CallHook("CanAffordUpgrade", player, buildingBlock, grade); if (building is bool) { return (bool)building; } if (config.defaultOptions.debugmode) { Puts($"CanAffordUpgrade recieved data, Checking player inventory for materials to upgrade to {grade}... \n"); } bool canupgrade = true; foreach (var item in buildingBlock.BuildCost()) { if (config.defaultOptions.debugmode) { Puts($"Item: {item.itemDef.displayName.english} \n Amount: {item.amount} \n"); } var missingAmount = item.amount - player.inventory.GetAmount(item.itemid); if (missingAmount > 0f) { canupgrade = false; if (config.defaultOptions.debugmode) { Puts($"failed, player missing materials: {item.itemDef.displayName.english}: \n Amount:{missingAmount} \n stopping upgrade.. \n"); } return canupgrade; } } if (config.defaultOptions.debugmode) { Puts($"passed, player has materials... \n Sending data back to CheckStructureUpgrade \n"); } return canupgrade; } private void RefundMaterials(BuildingBlock buildingBlock, BasePlayer player, BuildingGrade.Enum grade) { if (buildingBlock == null || player == null) return; if (buildingBlock.OwnerID != player.userID) return; XPRecord xprecord = GetXPRecord(player); if (xprecord.Framer == 0) return; if (config.defaultOptions.debugmode) { Puts("RefundMaterials received data...\n" + $"PlayerID: {player.userID}\n" + $"Building Grade: {grade}\n" + $"Building Block: {buildingBlock.blockDefinition.fullName}\n" + "Player and Building data verified...\n" + "Calculating materials to return to player...\n"); } //foreach (var item in _costs[grade]) foreach (var item in buildingBlock.BuildCost()) { //switch(grade) //{ // case BuildingGrade.Enum.Wood: // item.amount = config.framer.woodcost; // break; // case BuildingGrade.Enum.Stone: // item.amount = config.framer.stonecost; // break; // case BuildingGrade.Enum.Metal: // item.amount = config.framer.metalcost; // break; // case BuildingGrade.Enum.TopTier: // item.amount = config.framer.armorcost; // break; //} double reducedcost = item.amount * (config.framer.upgradecost * xprecord.Framer); if (config.defaultOptions.debugmode) { Puts($"Item: {item.itemDef.displayName.english}\n Default Cost: {item.amount}\n" + $"Reduction Amount: {reducedcost} ({(config.framer.upgradecost * xprecord.Framer) * 100}%)\n"); } // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * reducedcost; reducedcost += captaincyboost; if (config.defaultOptions.debugmode) { Puts($"Captaincy Effects Active...\n" + $"Captaincy Boost: {captaincyboost} ({captaincyboost * 100}%)\n" + $"New Reduction Amount: {reducedcost}\n"); } } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.framerucost) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * reducedcost; reducedcost += rankboost; if (config.defaultOptions.debugmode) { Puts($"Rank Effects Active...\n" + $"Rank Boost: {rankboost}%\n" + $"New Reduction Amount: {reducedcost}\n"); } } if (reducedcost < 1) { reducedcost = 1; } if (config.defaultOptions.debugmode) { Puts($"\nFinal Reduction Amount: {(int)reducedcost}\n" + $"Final Cost: {(int)(item.amount - reducedcost)}\n" + "Reducing cost or refunding materials...\n" + $"Item: {item.itemDef.displayName.english}, Amount: {(int)reducedcost}\n\n" + "XPerience completed all checks successfully, no issues detected!"); } player.GiveItem(ItemManager.CreateByItemID(item.itemid, (int)reducedcost)); } } private void OnStructureRepair(BaseCombatEntity entity, BasePlayer player) { if (entity == null || player == null || !player.userID.Get().IsSteamId()) return; BuildingPrivlidge isauth = player.GetBuildingPrivilege(); if (isauth == null || !isauth.IsAuthed(player)) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Framer < 1) return; int skilllevel = xprecord.Framer; double repairtime = config.framer.repairtime; double repaircost = config.framer.repaircost; // Reduce Repair Time entity.lastAttackedTime = (float)(entity.lastAttackedTime - (repairtime * skilllevel)); if (entity.SecondsSinceAttacked < 30) return; // Reduce Repair Cost float missingHealth = entity.MaxHealth() - entity.health; float healthPercentage = missingHealth / entity.MaxHealth(); if (missingHealth <= 0f || healthPercentage <= 0f) { entity.OnRepairFailed(null, string.Empty); return; } List itemAmounts = entity.RepairCost(healthPercentage); if (itemAmounts.Sum(x => x.amount) <= 0f) { entity.health += missingHealth; entity.SendNetworkUpdate(); entity.OnRepairFinished(); return; } foreach (ItemAmount amount in itemAmounts) { if (amount.amount > 40f) { amount.amount = 40f; } amount.amount = (float)(amount.amount * (repaircost * skilllevel)); // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * amount.amount; amount.amount += (float)captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.framerrcost) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * amount.amount; amount.amount += (float)rankboost; } } if (itemAmounts.Any(ia => player.inventory.GetAmount(ia.itemid) < (int)ia.amount)) { entity.OnRepairFailed(null, string.Empty); return; } foreach (ItemAmount amount in itemAmounts) { if (amount.amount < 1) return; Item item = ItemManager.CreateByItemID(amount.itemid, (int)amount.amount); player.GiveItem(item); } } // Prevent Burnt Cookables public static readonly string[] CookedItems = new string[] { "bearmeat.cooked", "chicken.cooked", "deermeat.cooked", "horsemeat.cooked", "humanmeat.cooked", "meat.pork.cooked", "wolfmeat.cooked", "fish.cooked" }; private Dictionary lowTemps = new Dictionary(); private Dictionary highTemps = new Dictionary(); ItemModCookable GetCookables(string shortname) { var definition = ItemManager.FindItemDefinition(shortname); if (definition == null) { Puts($"Unknown definition for {shortname}"); return null; } var cookable = definition.GetComponent(); if (cookable == null) { Puts($"Unknown cookable for {shortname}"); return null; } return cookable; } private void OnFuelConsume(BaseOven oven, Item fuel, ItemModBurnable burnable, BaseOven.IndustrialSlotMode IndustrialMode) { if (oven == null || fuel == null) return; var player = FindPlayer(oven.OwnerID.ToString()); if (player == null) return; XPRecord xprecord = GetXPRecord(player); // Fuel Consumption if (player.UserIDString == oven.OwnerID.ToString() && xprecord.Smithy > 0) { double lessfueltotal = (config.smithy.fuelconsumption * xprecord.Smithy) * 100; // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * lessfueltotal; lessfueltotal += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * lessfueltotal; lessfueltotal += rankboost; } if (Random.Range(0, 101) <= lessfueltotal) { fuel.amount += 1; } } // Production Rate/Speed double increasechance = (config.smithy.productionrate * xprecord.Smithy) * 100; double increasespeed = config.smithy.productionspeed * xprecord.Smithy; // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboostincreasechance = CaptaincyTeamSkillBoost(player) * increasechance; increasechance += captaincyboostincreasechance; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.smithyfc) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increasechance; double rankspeedboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increasespeed; increasechance += rankboost; increasespeed += rankspeedboost; } // End Results var items = oven.inventory.itemList.ToArray(); string oventype = ""; switch (IndustrialMode) { case BaseOven.IndustrialSlotMode.Furnace: oventype = "Furnace"; break; case BaseOven.IndustrialSlotMode.LargeFurnace: oventype = "LargeFurnace"; break; case BaseOven.IndustrialSlotMode.ElectricFurnace: oventype = "ElectricFurnace"; break; } foreach (var item in items) { var itemModCookable = item.info.GetComponent(); var itemCookableName = item.info.shortname; if (itemModCookable?.becomeOnCooked == null) continue; if (!_smithyCache.ContainsKey(itemCookableName + "." + oventype)) { AddSmithyData(itemCookableName + "." + oventype, itemModCookable.cookTime); } // Production Speed SmithyD resource; if (_smithyCache.TryGetValue(itemCookableName + "." + oventype, out resource)) { itemModCookable.cookTime = resource.time; if (xprecord.Smithy > 0) { float speedreduction = resource.time * (float)increasespeed; if (speedreduction >= resource.time) { speedreduction = resource.time - 1; } itemModCookable.cookTime -= speedreduction; } } // Production Rate if (Random.Range(0, 101) < increasechance && xprecord.Smithy > 0) { double increaseamount = Math.Round((config.smithy.productionrate * xprecord.Smithy) * 5); if (increaseamount < 1) { increaseamount = 1; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank) { double rankboostin = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increaseamount; increaseamount += Math.Ceiling(rankboostin); } if (itemModCookable?.becomeOnCooked == null || item.temperature < itemModCookable.lowTemp || item.temperature > itemModCookable.highTemp || itemModCookable.cookTime < 0) continue; if (oven.inventory.Take(null, item.info.itemid, 1) != 1) continue; var itemToGive = ItemManager.Create(itemModCookable.becomeOnCooked, (1 + (int)increaseamount)); if (!itemToGive.MoveToContainer(oven.inventory)) itemToGive.Drop(oven.inventory.dropPosition, oven.inventory.dropVelocity); } } } //private void OnOvenCook(BaseOven oven, Item item) //{ // if (oven == null || item == null) return; // if (!oven.OwnerID.IsSteamId()) return; // var player = FindPlayer(oven.OwnerID.ToString()); // if (player == null) return; // XPRecord xprecord = GetXPRecord(player); // // Production Rate/Speed // double increasechance = (config.smithy.productionrate * xprecord.Smithy) * 100; // double increasespeed = config.smithy.productionspeed * xprecord.Smithy; // // Captaincy // if (player.Team != null && player.Team.members.Count > 1) // { // double captaincyboostincreasechance = CaptaincyTeamSkillBoost(player) * increasechance; // increasechance += captaincyboostincreasechance; // } // // Ranks // if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.smithyfc) // { // double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increasechance; // double rankspeedboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increasespeed; // increasechance += rankboost; // increasespeed += rankspeedboost; // } // // End Results // var items = oven.inventory.itemList.ToArray(); // var itemModCookable = item.info.GetComponent(); // var itemCookableName = item.info.shortname; // if (itemModCookable?.becomeOnCooked == null) return; // if (!_smithyCache.ContainsKey(itemCookableName)) // { // AddSmithyData(itemCookableName, itemModCookable.cookTime); // } // // Production Speed // SmithyD resource; // if (_smithyCache.TryGetValue(itemCookableName, out resource)) // { // itemModCookable.cookTime = resource.time; // if (xprecord.Smithy > 0) // { // float speedreduction = resource.time * (float)increasespeed; // if (speedreduction >= resource.time) { speedreduction = resource.time - 1; } // itemModCookable.cookTime -= speedreduction; // } // } // // Production Rate // if (Random.Range(0, 101) < increasechance && xprecord.Smithy > 0) // { // double increaseamount = Math.Round((config.smithy.productionrate * xprecord.Smithy) * 5); // if (increaseamount < 1) { increaseamount = 1; } // // Ranks // if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank) // { // double rankboostin = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increaseamount; // increaseamount += Math.Ceiling(rankboostin); // } // if (itemModCookable?.becomeOnCooked == null || item.temperature < itemModCookable.lowTemp || item.temperature > itemModCookable.highTemp || itemModCookable.cookTime < 0) return; // if (oven.inventory.Take(null, item.info.itemid, 1) != 1) return; // var itemToGive = ItemManager.Create(itemModCookable.becomeOnCooked, (1 + (int)increaseamount)); // if (!itemToGive.MoveToContainer(oven.inventory)) // itemToGive.Drop(oven.inventory.dropPosition, oven.inventory.dropVelocity); // } //} private void OnOvenToggle(BaseOven oven, BasePlayer player, BaseOven.IndustrialSlotMode IndustrialMode) { if (oven == null || player == null) return; if (!oven.OwnerID.IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); // Production Rate/Speed double increasechance = (config.smithy.productionrate * xprecord.Smithy) * 100; double increasespeed = config.smithy.productionspeed * xprecord.Smithy; // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboostincreasechance = CaptaincyTeamSkillBoost(player) * increasechance; increasechance += captaincyboostincreasechance; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.smithyfc) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increasechance; double rankspeedboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increasespeed; increasechance += rankboost; increasespeed += rankspeedboost; } // End Results var items = oven.inventory.itemList.ToArray(); string oventype = ""; switch (IndustrialMode) { case BaseOven.IndustrialSlotMode.Furnace: oventype = "Furnace"; break; case BaseOven.IndustrialSlotMode.LargeFurnace: oventype = "LargeFurnace"; break; case BaseOven.IndustrialSlotMode.ElectricFurnace: oventype = "ElectricFurnace"; break; } foreach (var item in items) { var itemModCookable = item.info.GetComponent(); var itemCookableName = item.info.shortname; if (itemModCookable?.becomeOnCooked == null) continue; if (!_smithyCache.ContainsKey(itemCookableName)) { AddSmithyData(itemCookableName + "." + oventype, itemModCookable.cookTime); } // Production Speed SmithyD resource; if (_smithyCache.TryGetValue(itemCookableName + "." + oventype, out resource)) { itemModCookable.cookTime = resource.time; if (xprecord.Smithy > 0) { float speedreduction = resource.time * (float)increasespeed; if (speedreduction >= resource.time) { speedreduction = resource.time - 1; } itemModCookable.cookTime -= speedreduction; } } // Production Rate if (Random.Range(0, 101) < increasechance && xprecord.Smithy > 0) { double increaseamount = Math.Round((config.smithy.productionrate * xprecord.Smithy) * 5); if (increaseamount < 1) { increaseamount = 1; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank) { double rankboostin = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increaseamount; increaseamount += Math.Ceiling(rankboostin); } if (itemModCookable?.becomeOnCooked == null || item.temperature < itemModCookable.lowTemp || item.temperature > itemModCookable.highTemp || itemModCookable.cookTime < 0) continue; if (oven.inventory.Take(null, item.info.itemid, 1) != 1) continue; var itemToGive = ItemManager.Create(itemModCookable.becomeOnCooked, (1 + (int)increaseamount)); if (!itemToGive.MoveToContainer(oven.inventory)) itemToGive.Drop(oven.inventory.dropPosition, oven.inventory.dropVelocity); } } } #endregion #region Plants/Trees/Ores/Food private void OnDispenserGather(ResourceDispenser dispenser, BaseEntity entity, Item item) { if (dispenser == null || entity == null || item == null) return; var player = entity.ToPlayer(); if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; bool rankboostenabled = false; var gatherType = dispenser.gatherType; double addxp = 0; int skilllevel = 0; double gatherincrease = 0; double apples = config.woodcutter.applechance * 100; double metal = 100; var tool = player.GetActiveItem().ToString().ToLower(); if (gatherType == ResourceDispenser.GatherType.Tree) { addxp = config.xpGather.treexp; double toolxpchance = config.xpGather.toolxpchance * 100; if (tool.Contains("chainsaw")) { if (!config.xpGather.noxptools) { if ((Random.Range(0, 101) <= toolxpchance) == true) { addxp = config.xpGather.toolxppercent * addxp; } else { addxp = 0; } } else { addxp = 0; } apples = 0; } if (config.xpGather.onetimexp) { addxp = 0; } gatherincrease = config.woodcutter.gatherrate; if (config.Rankboostssettings.woodcuttergr) { rankboostenabled = true; } skilllevel = xprecord.WoodCutter; double chance = skilllevel * apples; if ((Random.Range(1, 101) <= chance) == true) { var roll = Random.Range(0, 11); if (roll < 5) { if (config.defaultOptions.dropsgotoplayerinventory) { player.GiveItem(ItemManager.CreateByItemID(352130972, 1)); } else { // Bad player.Command("note.inv", 352130972, 1.ToString()); ItemManager.CreateByName("apple.spoiled", 1)?.DropAndTossUpwards(entity.GetDropPosition()); player.RunEffect("assets/bundled/prefabs/fx/notice/loot.drag.itemdrop.fx.prefab"); } } if (roll > 5) { if (config.defaultOptions.dropsgotoplayerinventory) { player.GiveItem(ItemManager.CreateByItemID(1548091822, 1)); } else { // good player.Command("note.inv", 1548091822, 1.ToString()); ItemManager.CreateByName("apple", 1)?.DropAndTossUpwards(entity.GetDropPosition()); player.RunEffect("assets/bundled/prefabs/fx/notice/loot.drag.itemdrop.fx.prefab"); } } } } else if (gatherType == ResourceDispenser.GatherType.Ore) { addxp = config.xpGather.orexp; if (item.info.shortname.Contains("metal")) { addxp = config.xpGather.metalorexp; } if (item.info.shortname.Contains("sulfur")) { addxp = config.xpGather.sulfurorexp; } if (item.info.shortname.Contains("stone")) { addxp = config.xpGather.stoneorexp; } double toolxpchance = config.xpGather.toolxpchance * 100; if (tool.Contains("jackhammer")) { if (!config.xpGather.noxptools) { if ((Random.Range(0, 101) <= toolxpchance) == true) { addxp = config.xpGather.toolxppercent * addxp; } else { addxp = 0; } } else { addxp = 0; } metal = 0.1; } if (config.xpGather.onetimexp) { addxp = 0; } gatherincrease = config.miner.gatherrate; if (config.Rankboostssettings.minergr) { rankboostenabled = true; } if (item.info.shortname.Contains("metal") && xprecord.Miner > 0) { double metalchance = (xprecord.Miner * config.miner.metalchance) * metal; int metalamount = xprecord.Miner * config.miner.metalamount; if (metalamount < 1) { metalamount = 1; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.minermfc) { double rankboostfragchance = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * metalchance; int rankboostfragamt = (int)Math.Ceiling((xprecord.rank * config.xpLevelRanks.rankstatboostamount) * metalamount); metalchance += rankboostfragchance; if (config.Rankboostssettings.minermfa) { metalamount += rankboostfragamt; } } if ((Random.Range(0, 101) <= metalchance) == true) { if (config.defaultOptions.dropsgotoplayerinventory) { player.GiveItem(ItemManager.CreateByItemID(69511070, metalamount)); } else { player.Command("note.inv", 69511070, metalamount.ToString()); ItemManager.CreateByName("metal.fragments", metalamount)?.DropAndTossUpwards(entity.GetDropPosition()); player.RunEffect("assets/bundled/prefabs/fx/notice/loot.drag.itemdrop.fx.prefab"); } } } if (item.info.shortname.Contains("metal") && xprecord.Smithy > 0) { double hmetalchance = (xprecord.Smithy * config.smithy.metalchance) * metal; int hmetalamount = xprecord.Smithy * config.smithy.metalamount; if (hmetalamount < 1) { hmetalamount = 1; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.smithyhqmc) { double rankboostmetalchance = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * hmetalchance; int rankboostmetalamt = (int)Math.Ceiling((xprecord.rank * config.xpLevelRanks.rankstatboostamount) * hmetalamount); hmetalchance += rankboostmetalchance; if (config.Rankboostssettings.smithyhqma) { hmetalamount += rankboostmetalamt; } } if ((Random.Range(0, 101) <= hmetalchance) == true) { if (config.defaultOptions.dropsgotoplayerinventory) { player.GiveItem(ItemManager.CreateByItemID(317398316, hmetalamount)); } else { player.Command("note.inv", 317398316, hmetalamount.ToString()); ItemManager.CreateByName("metal.refined", hmetalamount)?.DropAndTossUpwards(entity.GetDropPosition()); player.RunEffect("assets/bundled/prefabs/fx/notice/loot.drag.itemdrop.fx.prefab"); } } } skilllevel = xprecord.Miner; } else if (gatherType == ResourceDispenser.GatherType.Flesh || item.info.shortname == "cactusflesh") { addxp = config.xpGather.harvestxp; double toolxpchance = config.xpGather.toolxpchance * 100; if (tool.Contains("jackhammer") || tool.Contains("chainsaw")) { if (!config.xpGather.noxptools) { if ((Random.Range(0, 101) <= toolxpchance) == true) { addxp = config.xpGather.toolxppercent * addxp; } else { addxp = 0; } } else { addxp = 0; } } gatherincrease = config.hunter.gatherrate; if (config.Rankboostssettings.huntergr) { rankboostenabled = true; } skilllevel = xprecord.Hunter; } double results = item.amount + (item.amount * (gatherincrease * skilllevel)); // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * results; results += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && rankboostenabled) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * results; results += rankboost; } if (skilllevel >= 1) { item.amount = (int)results; } GainExp(player, addxp); // Harvest Tracking if (item.info.shortname.Contains("wood")) { HarvestRecord(player, "wood", (int)results); } if (item.info.shortname.Contains("stone")) { HarvestRecord(player, "stone", (int)results); } if (item.info.shortname.Contains("metal")) { HarvestRecord(player, "metal", (int)results); } if (item.info.shortname.Contains("sulfur")) { HarvestRecord(player, "sulfur", (int)results); } if (item.info.shortname.Contains("cactus")) { HarvestRecord(player, "cactus", (int)results); } } private void OnDispenserBonus(ResourceDispenser dispenser, BasePlayer player, Item item) { if (player == null || !player.userID.Get().IsSteamId() || dispenser == null || item == null) return; XPRecord xprecord = GetXPRecord(player); var gatherType = dispenser.gatherType; double addxp = 0; int skilllevel = 0; double bonus = 0; double increaseamount; bool rankboostenabled = false; if (gatherType == ResourceDispenser.GatherType.Tree) { addxp = config.xpGather.treexp; bonus = config.woodcutter.bonusincrease; skilllevel = xprecord.WoodCutter; if (config.Rankboostssettings.woodcutterbonus) { rankboostenabled = true; } } else if (gatherType == ResourceDispenser.GatherType.Ore) { addxp = config.xpGather.orexp; if (item.info.shortname.Contains("metal")) { addxp = config.xpGather.metalorexp; } if (item.info.shortname.Contains("sulfur")) { addxp = config.xpGather.sulfurorexp; } if (item.info.shortname.Contains("stone")) { addxp = config.xpGather.stoneorexp; } bonus = config.miner.bonusincrease; skilllevel = xprecord.Miner; if (config.Rankboostssettings.minerbonus) { rankboostenabled = true; } } else if (gatherType == ResourceDispenser.GatherType.Flesh || item.info.shortname == "cactusflesh") { addxp = config.xpGather.harvestxp; bonus = config.hunter.bonusincrease; skilllevel = xprecord.Hunter; if (config.Rankboostssettings.hunterbonus) { rankboostenabled = true; } } increaseamount = item.amount + (item.amount * (bonus * skilllevel)); // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * increaseamount; increaseamount += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && rankboostenabled) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * increaseamount; increaseamount += rankboost; } if (skilllevel >= 1) { item.amount = (int)increaseamount; } GainExp(player, addxp); // Harvest Tracking if (item.info.shortname.Contains("wood")) { HarvestRecord(player, "wood", (int)increaseamount); } if (item.info.shortname.Contains("stone")) { HarvestRecord(player, "stone", (int)increaseamount); } if (item.info.shortname.Contains("metal")) { HarvestRecord(player, "metal", (int)increaseamount); } if (item.info.shortname.Contains("sulfur")) { HarvestRecord(player, "sulfur", (int)increaseamount); } if (item.info.shortname.Contains("cactus")) { HarvestRecord(player, "cactus", (int)increaseamount); } } private void OnCollectiblePickup(CollectibleEntity collectible, BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId() || collectible == null) return; if (MonumentOwner != null) { bool getmonumentowner = CheckMonumentOwner(player); if (getmonumentowner) return; } XPRecord xprecord = GetXPRecord(player); double addxp = 0; double gatherincrease = config.forager.gatherrate; int skilllevel = xprecord.Forager; //Custom Items Forager if (config.forager.randomchance != 0) { RandomForagerItem(player); } foreach (var item in collectible.itemList) { var name = item.itemDef.shortname; // Seeds if (name.StartsWith("seed")) { double chance = (config.forager.chanceincrease * skilllevel) * 100; if ((Random.Range(0, 101) <= chance) == true) { double addseeds = (config.forager.chanceincrease * skilllevel) * 10; if (addseeds <= 1) { addseeds = 1; } item.amount += (int)addseeds; } } // XP / Gather Rate if (name.Contains("wood")) { addxp = config.xpGather.treexp; } else if (name.Contains("ore") || name.Contains("stone")) { addxp = config.xpGather.orexp; if (name.Contains("metal")) { addxp = config.xpGather.metalorexp; } if (name.Contains("sulfur")) { addxp = config.xpGather.sulfurorexp; } if (name.Contains("stone")) { addxp = config.xpGather.stoneorexp; } } else if (name.Contains("berry") || name == "mushroom" || name == "cloth" || name == "pumpkin" || name == "corn" || name == "potato") { addxp = config.xpGather.plantxp; } double results = item.amount + (item.amount * (gatherincrease * skilllevel)); // Grub / Worm Chance double grubchance = (config.forager.grubwormincrease * skilllevel) * 100; if ((Random.Range(0, 101) <= grubchance) == true) { var roll = Random.Range(0, 11); if (roll < 5) { if (config.defaultOptions.dropsgotoplayerinventory) { player.GiveItem(ItemManager.CreateByItemID(1770475779, 1)); } else { // Worm player.Command("note.inv", 1770475779, 1.ToString()); ItemManager.CreateByName("worm", 1)?.DropAndTossUpwards(collectible.GetDropPosition()); player.RunEffect("assets/bundled/prefabs/fx/notice/loot.drag.itemdrop.fx.prefab"); } } if (roll > 5) { if (config.defaultOptions.dropsgotoplayerinventory) { player.GiveItem(ItemManager.CreateByItemID(-568419968, 1)); } else { // Grub player.Command("note.inv", -568419968, 1.ToString()); ItemManager.CreateByName("grub", 1)?.DropAndTossUpwards(collectible.GetDropPosition()); player.RunEffect("assets/bundled/prefabs/fx/notice/loot.drag.itemdrop.fx.prefab"); } } } // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * results; results += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.foragergr) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * results; results += rankboost; } if (skilllevel >= 1) { if (results <= 1.5 && gatherincrease != 0) { item.amount = 2; } else { item.amount = (int)results; } } NextTick(() => { if (collectible.IsDestroyed) { GainExp(player, addxp); } }); // Harvest Tracking if (name.Contains("wood")) { HarvestRecord(player, "wood", (int)results); } if (name.Contains("stone")) { HarvestRecord(player, "stone", (int)results); } if (name.Contains("metal")) { HarvestRecord(player, "metal", (int)results); } if (name.Contains("sulfur")) { HarvestRecord(player, "sulfur", (int)results); } if (name.Contains("cactus")) { HarvestRecord(player, "cactus", (int)results); } if (name.Contains("berry") && !name.Contains("seed")) { HarvestRecord(player, "berries", (int)results); } if (name.Contains("seed") && !name.Contains("berry")) { HarvestRecord(player, "seed", (int)results); } if (name.Contains("mushroom")) { HarvestRecord(player, "mushroom", (int)results); } if (name.Contains("cloth")) { HarvestRecord(player, "hemp", (int)results); } if (name.Contains("pumpkin")) { HarvestRecord(player, "pumpkin", (int)results); } if (name.Contains("corn")) { HarvestRecord(player, "corn", (int)results); } if (name.Contains("potato")) { HarvestRecord(player, "potato", (int)results); } } } private void OnGrowableGathered(GrowableEntity growable, Item item, BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId() || growable == null || item == null) return; XPRecord xprecord = GetXPRecord(player); double addxp = 0; double gatherincrease = config.forager.gatherrate; int skilllevel = xprecord.Forager; var name = item.info.shortname; if (name.StartsWith("seed")) { double chance = (config.forager.chanceincrease * skilllevel) * 100; if ((Random.Range(0, 101) <= chance) == true) { double addseeds = (config.forager.chanceincrease * skilllevel) * 2; if (addseeds <= 1) { addseeds = 1; } item.amount += (int)addseeds; } return; } if (name.Contains("wood")) { addxp = config.xpGather.treexp; } if (name.Contains("berry") || name.Contains("clone") || name == "mushroom" || name == "cloth" || name == "pumpkin" || name == "corn" || name == "potato") { addxp = config.xpGather.plantxp; } //double results = item.amount * (gatherincrease * skilllevel); double results = item.amount + (item.amount * (gatherincrease * skilllevel)); // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * results; results += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.foragergr) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * results; results += rankboost; } if (skilllevel >= 1) { if (results <= 1.5 && gatherincrease != 0) { item.amount = 2; } else { item.amount = (int)results; } } GainExp(player, addxp); // Harvest Tracking if (name.Contains("wood")) { HarvestRecord(player, "wood", (int)results); } if (name.Contains("cactus")) { HarvestRecord(player, "cactus", (int)results); } if (name.Contains("berry") && !name.Contains("seed")) { HarvestRecord(player, "berries", (int)results); } if (name.Contains("seed") && !name.Contains("berry")) { HarvestRecord(player, "seed", (int)results); } if (name.Contains("mushroom")) { HarvestRecord(player, "mushroom", (int)results); } if (name.Contains("cloth")) { HarvestRecord(player, "hemp", (int)results); } if (name.Contains("pumpkin")) { HarvestRecord(player, "pumpkin", (int)results); } if (name.Contains("corn")) { HarvestRecord(player, "corn", (int)results); } if (name.Contains("potato")) { HarvestRecord(player, "potato", (int)results); } } // Cooking Plugin void OnMealCrafted(BasePlayer player, string meal, Dictionary ingredients, bool isIngredient) { if (player == null || !player.userID.Get().IsSteamId() || config.xpGain.craftmeal == 0 || Cooking == null) return; GainExp(player, config.xpGain.craftmeal); } #endregion #region Zones / Events / Raidable Bases / MonumentOwner bool CheckPlayerLocation(BasePlayer player, string type) { if (player == null || !player.userID.Get().IsSteamId() || type.IsNullOrEmpty()) return false; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return false; if (Triangulation != null) { bool blockplayer = (bool)Triangulation?.Call("IsPlayerBlockingLocation", player); if (blockplayer) return true; } switch (type) { case "noxpgain": // Zone Manager Check if (ZoneManager != null) { string[] excludedzones = config.zonemanagermod.noxpgain.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string zone in excludedzones) { bool playerinzone = (bool)ZoneManager?.Call("IsPlayerInZone", zone, player); if (playerinzone) return true; } } // Event Helper Check if (EventHelper != null) { string[] excludedevents = config.eventhelpermod.noxpgain.Split(new char[] { ',' }, StringSplitOptions.None); foreach (string eventname in excludedevents) { bool playerinevent = (bool)EventHelper?.Call("EMIsParticipating", player, eventname); if (playerinevent) return true; } } // SurvivalArena if (SurvivalArena != null) { if (config.survivalarenamod.noxpgain) { if ((bool)SurvivalArena?.Call("IsEventPlayer", player) as bool? ?? false) { return true; } } } // Raidable Bases Check if (RaidableBases != null && config.raidablebasesmod.noxpgain && xprecord.raidablebase) { return true; } break; case "noxploss": // Zone Manager Check if (ZoneManager != null) { string[] excludedzones = config.zonemanagermod.noxploss.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string zone in excludedzones) { bool playerinzone = (bool)ZoneManager?.Call("IsPlayerInZone", zone, player); if (playerinzone) return true; } } // Event Helper Check if (EventHelper != null) { string[] excludedevents = config.eventhelpermod.noxploss.Split(new char[] { ',' }, StringSplitOptions.None); foreach (string eventname in excludedevents) { bool playerinevent = (bool)EventHelper?.Call("EMPlayerDiedAtSpecificEvent", player, eventname); if (playerinevent) return true; } } // SurvivalArena if (SurvivalArena != null) { if (config.survivalarenamod.noxploss) { if ((bool)SurvivalArena?.Call("IsEventPlayer", player) as bool? ?? false) { return true; } } } // Raidable Bases Check if (RaidableBases != null && config.raidablebasesmod.noxploss && xprecord.raidablebase) { return true; } break; case "disableabilities": // Zone Manager Check if (ZoneManager != null) { string[] excludedzones = config.zonemanagermod.disablestatsandskills.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string zone in excludedzones) { bool playerinzone = (bool)ZoneManager?.Call("IsPlayerInZone", zone, player); if (playerinzone) return true; } } // Event Helper Check if (EventHelper != null) { string[] excludedevents = config.eventhelpermod.disablestatsandskills.Split(new char[] { ',' }, StringSplitOptions.None); foreach (string eventname in excludedevents) { bool playerinevent = (bool)EventHelper?.Call("EMIsParticipating", player, eventname); if (playerinevent) { PlayerArmor(player, true); MightAttributes(player, true); return true; } } } // SurvivalArena if (SurvivalArena != null) { if (config.survivalarenamod.disablestatsandskills) { if ((bool)SurvivalArena?.Call("IsEventPlayer", player) as bool? ?? false) { PlayerArmor(player, true); MightAttributes(player, true); return true; } } } // Raidable Bases Check if (RaidableBases != null && config.raidablebasesmod.disableabilities && xprecord.raidablebase) { return true; } break; } return false; } void OnEnterZone(string ZoneID, BasePlayer player) { string[] excludedzones = config.zonemanagermod.disablestatsandskills.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string zone in excludedzones) { if (zone == ZoneID) { PlayerArmor(player, true); MightAttributes(player, true); player.ChatMessage(XPLang("zonedisabled", player.UserIDString)); } } } void OnExitZone(string ZoneID, BasePlayer player) { string[] excludedzones = config.zonemanagermod.disablestatsandskills.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string zone in excludedzones) { if (zone == ZoneID) { PlayerArmor(player); MightAttributes(player); player.ChatMessage(XPLang("zoneenabled", player.UserIDString)); } } } private void OnPlayerEnteredRaidableBase(BasePlayer player) { if (config.raidablebasesmod.disableabilities) { if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); xprecord.raidablebase = true; PlayerArmor(player, true); MightAttributes(player, true); player.ChatMessage(XPLang("enterraidbase", player.UserIDString)); } } private void OnPlayerExitedRaidableBase(BasePlayer player) { if (config.raidablebasesmod.disableabilities) { if (player == null || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); xprecord.raidablebase = false; PlayerArmor(player); MightAttributes(player); player.ChatMessage(XPLang("exitraidbase", player.UserIDString)); } } private bool CheckMonumentOwner(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId() || MonumentOwner == null) return false; bool hasmonumentowner = (bool)MonumentOwner?.Call("HasOwner", player.ServerPosition); if (hasmonumentowner) { BasePlayer getmonumentowner = (BasePlayer)MonumentOwner?.Call("GetOwnerID", player.ServerPosition); if (getmonumentowner == null) return false; if (!getmonumentowner.userID.Get().IsSteamId()) return false; if (player.userID.Get() == getmonumentowner.userID.Get()) return true; } return false; } #endregion #region Event Manager void EMOnEventJoined(BasePlayer player, string eventname) { if (EventHelper == null || player == null || !player.userID.Get().IsSteamId()) return; // No XP Gain string[] noxpgainevents = config.eventhelpermod.noxpgain.Split(new char[] { ',' }, StringSplitOptions.None); foreach (string xpgainevent in noxpgainevents) { if (xpgainevent == eventname) { player.ChatMessage($"{XPLang("eventnoxpgain", player.UserIDString, eventname)}"); } } // No XP Loss string[] noxplossevents = config.eventhelpermod.noxpgain.Split(new char[] { ',' }, StringSplitOptions.None); foreach (string xplossevent in noxplossevents) { if (xplossevent == eventname) { player.ChatMessage($"{XPLang("eventnoxploss", player.UserIDString, eventname)}"); } } // No Stats or Skills string[] noskillsevents = config.eventhelpermod.noxpgain.Split(new char[] { ',' }, StringSplitOptions.None); foreach (string noskillsevent in noskillsevents) { if (noskillsevent == eventname) { player.ChatMessage($"{XPLang("eventnoskills", player.UserIDString, eventname)}"); } } } #endregion #region Player Health/Recovery private object PlayerMetabolismControl(PlayerMetabolism metabolism, BasePlayer player, float delta, int might) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return null; // Reduce Bleeding if (metabolism.bleeding.value > 0) { if (config.might.bleedreduction == 0) return null; metabolism.bleeding.value -= ((float)config.might.bleedreduction * might) * metabolism.bleeding.value; } // Reduce Radiation if (metabolism.radiation_level.value > 0) { if (config.might.radreduction == 0) return null; metabolism.radiation_level.value -= ((float)config.might.radreduction * might) * metabolism.radiation_level.value; } if (metabolism.radiation_poison.value > 0) { if (config.might.radreduction == 0) return null; metabolism.radiation_poison.value -= ((float)config.might.radreduction * might) * metabolism.radiation_poison.value; } // Heat Reduction if (metabolism.temperature.lastValue >= 35) { if (config.might.heattolerance == 0) return null; metabolism.temperature.value -= ((float)config.might.heattolerance * might) * 20; } // Cold Reduction if (metabolism.temperature.lastValue <= 10) { if (config.might.coldtolerance == 0) return null; metabolism.temperature.value += (int)Math.Round(((float)config.might.coldtolerance * might) * 20, 0); } return null; } private object OnRunPlayerMetabolism(PlayerMetabolism metabolism, BasePlayer player, float delta) { if (player == null || metabolism == null || !player.userID.Get().IsSteamId()) return null; if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord.Might > 0) { PlayerMetabolismControl(metabolism, player, delta, xprecord.Might); } // Fisher if (xprecord.Fisher > 0 && metabolism.oxygen.value < 1) { metabolism.oxygen.value += (((float)config.fisher.oxygenreduction * xprecord.Fisher) * 0.1f); } return null; } private void OnPlayerHealthChange(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId() || player.IsNpc) return; if (!player.IsConnected) return; if (!player.isSpawned) return; LiveStats(player); } private object OnHealingItemUse(MedicalTool tool, BasePlayer player) { var toolowner = tool.GetOwnerPlayer(); if (toolowner == null || player == null || !toolowner.userID.Get().IsSteamId() || !player.userID.Get().IsSteamId() || tool == null) return null; // Check for Addon and Special Item string item = toolowner?.GetActiveItem().name; if (XPerienceAddon != null && item != null) { string itemname = String.Concat(item.ToLower().Where(c => !Char.IsWhiteSpace(c))); if (XPerienceAddon.Call("GetBoosters", toolowner, itemname, "item")) { return true; } } if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); //If Addon not present or not special item continue if (player._health == player._maxHealth) return null; var toolused = tool.name; if (tool.name.Contains("bandage")) { toolused = "Bandage"; } if (tool.name.Contains("syringe")) { toolused = "Medical Syringe"; } if (xprecord.Medic <= 0) return null; if ((!config.medic.preventbandageboost && toolused == "Bandage") || toolused == "Medical Syringe") { double addhealth = xprecord.Medic * config.medic.tools; // Captaincy if (toolowner.Team != null && toolowner.Team.members.Count > 1 && config.captaincy.maxlvl != 0) { double captaincyboost = CaptaincyTeamSkillBoost(toolowner) * addhealth; addhealth += captaincyboost; } // Ranks if (xprecord.rank > 0 && config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.medictools) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * addhealth; addhealth += rankboost; } player._health = (float)(player._health + addhealth); if (toolowner == player) { player.ChatMessage(XPLang("medictooluse", player.UserIDString, addhealth, toolused)); } else { toolowner.ChatMessage(XPLang("medictooluseowner", toolowner.UserIDString, addhealth, toolused, player.displayName)); player.ChatMessage(XPLang("medictooluse", player.UserIDString, addhealth, toolused)); } return null; } return null; } private void OnPlayerRevive(BasePlayer reviver, BasePlayer player) { if (reviver == null || !reviver.userID.Get().IsSteamId() || player == null || !player.userID.Get().IsSteamId()) return; if (!player.IsWounded()) return; if (CheckPlayerLocation(player, "disableabilities")) return; XPRecord xprecord = GetXPRecord(player); double addxp = config.xpGain.playerrevive; GainExp(reviver, addxp); if (xprecord.Medic <= 0) return; double addhealth = xprecord.Medic * config.medic.revivehp; // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * addhealth; addhealth += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.medicrevivala) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * addhealth; addhealth += rankboost; } player._health = (float)(player._health + addhealth); player.ChatMessage(XPLang("medicreviveplayer", player.UserIDString, addhealth)); reviver.ChatMessage(XPLang("medicrevivereviver", reviver.UserIDString, addhealth)); } private void OnPlayerRecovered(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId()) return; if (CheckPlayerLocation(player, "disableabilities")) return; XPRecord xprecord = GetXPRecord(player); if (xprecord.Medic <= 0) return; double addhealth = xprecord.Medic * config.medic.revivehp; // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * addhealth; addhealth += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.medicrecovera) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * addhealth; addhealth += rankboost; } player._health = (float)(player._health + addhealth); player.ChatMessage(XPLang("medicrecoverplayer", player.UserIDString, addhealth)); } private void MightAttributes(BasePlayer player, bool reset = false) { if (player == null || !player.userID.Get().IsSteamId() || !player.isSpawned) return; if (reset) { if (player.metabolism.calories.max > 500) { player.metabolism.calories.max = 500; } if (player.metabolism.hydration.max > 250) { player.metabolism.hydration.max = 250; } return; } XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.Might > 0) { // Increase Hunger Max - Reset to default then calculate new max player.metabolism.calories.max = 500; double maxcalories = (config.might.metabolism * xprecord.Might) * player.metabolism.calories.max; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.metabolism) { maxcalories += xprecord.rank * config.xpLevelRanks.rankstatboostamount; } player.metabolism.calories.max += (float)maxcalories; // Increase Thirst Max - Reset to default then calculate new max player.metabolism.hydration.max = 250; double maxhydration = (config.might.metabolism * xprecord.Might) * player.metabolism.hydration.max; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.metabolism) { maxhydration += xprecord.rank * config.xpLevelRanks.rankstatboostamount; } player.metabolism.hydration.max += (float)maxhydration; } } private object OnPlayerAddModifiers(BasePlayer player, Item item, ItemModConsumable consumable) { if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return null; string tea = item.info.shortname; double addhealth = 0; // Update Player Armor (Max Health Teas) if (item.info.shortname.Contains("maxhealthtea")) { LiveStats(player, false, tea.ToString()); return null; } // Medic Skill Increase (Regular Health Teas) if (item.info.shortname.Contains("healthtea")) { if (xprecord.Medic > 0) { for (int i = 0; i < consumable.effects.Count; i++) { if (consumable.effects[i].type == MetabolismAttribute.Type.Health) addhealth = consumable.effects[i].amount; } double medicincrease = addhealth * (xprecord.Medic * config.medic.teas); addhealth += Math.Ceiling(medicincrease); player._health += (float)addhealth; } // Update LiveUI for Armor LiveStats(player, false, tea.ToString()); return null; } return null; } private void PlayerArmor(BasePlayer player, bool reset = false) { if (player == null || !player.userID.Get().IsSteamId() || !player.isSpawned) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Might <= 0) return; if (reset) { // Max Health double armor = (xprecord.Might * config.might.armor) * 100; double newmaxhealth = player._maxHealth - armor; // Change Max Health if (newmaxhealth < 100) { player._maxHealth = 100; } else { player._maxHealth = (float)newmaxhealth; } // Player Current Health double defaulthealth = 100; double teahealth = 100; bool teamodified = false; double healthdifference = 0; if (GetTeaCooldown(player) != 0) { // Check for Tea Modifier if (TeaModifiers != null && xprecord.teatype != "none") { teahealth = defaulthealth + TeaModifiers.Call("GetTeaValue", player, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } switch (GetTeaTypes(player)) { case "maxhealthtea": if (!teamodified) { teahealth = defaulthealth + 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teahealth = defaulthealth + 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teahealth = defaulthealth + 20; } break; } } if (player._health > teahealth) { healthdifference = player._health - teahealth; } player._health -= (float)healthdifference; LiveStats(player, true); return; } var maxarmor = 100 + ((xprecord.Might * config.might.armor) * 100); player._maxHealth = (float)maxarmor; LiveStats(player); } #endregion #region Player Actions private void OnPlayerInput(BasePlayer player, InputState input) { if (player == null || input == null) return; if (CheckPlayerLocation(player, "disableabilities")) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.Dexterity <= 0) return; if (input.WasJustPressed(BUTTON.USE) && player.isMounted) { ChangeHorseSpeed(player); } if (input.WasJustPressed(BUTTON.RELOAD) && player.isMounted) { ChangeBoatSpeed(player); if (config.dexterity.vehiclespeed > 0) { ChangeVehicleSpeed(player); ChangeMiniCopterSpeed(player); ChangeSnowMobSpeed(player); } } } private void OnItemAction(Item item, string action, BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId() || item == null || action == null || item.info.shortname == null) return; if (XPerienceAddon != null && item.name != null) { string itemname = String.Concat(item.name.ToLower().Where(c => !Char.IsWhiteSpace(c))); if (XPerienceAddon.Call("IsSpecialItem", player, itemname)) return; } var itemshortname = item.info.shortname; double addxp = 0; switch (action) { case "upgrade_item": switch (itemshortname) { case "xmas.present.small": addxp = config.xpGain.upgradegiftsmed; break; case "xmas.present.medium": addxp = config.xpGain.upgradegiftslarge; break; } break; case "unwrap": switch (itemshortname) { case "xmas.present.small": addxp = config.xpGain.opengifts; break; case "xmas.present.medium": addxp = config.xpGain.opengiftsmed; break; case "xmas.present.large": addxp = config.xpGain.opengiftslarge; break; } break; } GainExp(player, addxp); } #endregion #region Stat & Skill Hooks/Helpers private readonly Dictionary rarityValues = new Dictionary { { Rarity.None, 500 }, { Rarity.Common, 20 }, { Rarity.Uncommon, 75 }, { Rarity.Rare, 125 }, { Rarity.VeryRare, 500 } }; private object OnResearchCostDetermine(Item item, ResearchTable researchTable) { int rarityvalue = item.info != null ? rarityValues[item.info.rarity] : 500; ItemBlueprint itemBlueprint = ItemManager.FindBlueprint(item.info); if (itemBlueprint != null && itemBlueprint.defaultBlueprint) { rarityvalue = ConVar.Server.defaultBlueprintResearchCost; } if (config.mentality.researchcost == 0) return rarityvalue; ResearchTable researchtable = item.GetEntityOwner() as ResearchTable; if (researchtable == null || researchtable.user == null) return rarityvalue; XPRecord xprecord = GetXPRecord(researchtable.user); if (xprecord.Mentality == 0 || xprecord == null) return rarityvalue; double reducecost = (config.mentality.researchcost * xprecord.Mentality) * rarityvalue; // Captaincy if (researchtable.user.Team != null && researchtable.user.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(researchtable.user) * reducecost; reducecost += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.researchcost) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * reducecost; reducecost += rankboost; } double researchcost = rarityvalue - reducecost; return (int)researchcost; } [HookMethod("OnResearchCost")] private int OnResearchCost(int rarityvalue, BasePlayer player) { if (player == null) { return rarityvalue; } XPRecord xprecord = GetXPRecord(player); if (xprecord.Mentality == 0) return rarityvalue; double reducecost = (config.mentality.researchcost * xprecord.Mentality) * rarityvalue; double researchcost = rarityvalue - reducecost; return (int)researchcost; } [HookMethod("OnItemResearchReduction")] private float OnItemResearchReduction(float value, BasePlayer player) { XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Mentality == 0) return value; double researchspeed = (config.mentality.researchspeed * xprecord.Mentality) * value; return value - (float)researchspeed; } private void OnItemResearch(ResearchTable researchTable, Item item, BasePlayer player) { researchTable.researchDuration = 10f; if (player == null || item == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord.Mentality == 0) return; // Reduce Speed double researchspeed = (config.mentality.researchspeed * xprecord.Mentality) * researchTable.researchDuration; // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * researchspeed; researchspeed += captaincyboost; } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.researchspeed) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * researchspeed; researchspeed += rankboost; } researchTable.researchDuration -= (float)researchspeed; } private bool CheckUnlockPath(BasePlayer player, TechTreeData.NodeInstance node, TechTreeData techTree) { if (node.inputs.Count == 0) return true; var unlockPath = false; foreach (int nodeId in node.inputs) { var selectNode = techTree.GetByID(nodeId); if (selectNode.itemDef == null) return true; if (!techTree.HasPlayerUnlocked(player, selectNode)) continue; if (CheckUnlockPath(player, selectNode, techTree)) unlockPath = true; } return unlockPath; } private object CanUnlockTechTreeNode(BasePlayer player, TechTreeData.NodeInstance node, TechTreeData techTree) { if (player == null) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return null; // Check Tech Tree Settings if (config.mentality.locktechtree) { if (config.mentality.unlocktechtreelevel == 0) { player.ChatMessage(XPLang("techtreelocked", player.UserIDString)); return false; } if (xprecord.Mentality < config.mentality.unlocktechtreelevel) { player.ChatMessage(XPLang("techtreereq", player.UserIDString, config.mentality.unlocktechtreelevel)); return false; } } // Continue if Tech Tree Unlocked if (xprecord.Mentality == 0) return null; int rarityvalue = rarityValues[node.itemDef.rarity]; double reducecost = (config.mentality.researchcost * xprecord.Mentality) * rarityvalue; double researchcost = rarityvalue - reducecost; var cost = (int)researchcost; var itemdefinition = ItemManager.FindItemDefinition("scrap"); techTree.GetEntryNode().costOverride = cost; if (player.inventory.GetAmount(itemdefinition.itemid) < cost) { player.ChatMessage(XPLang("techtreenode", player.UserIDString, cost, node.itemDef.displayName.english)); return false; } return CheckUnlockPath(player, node, techTree); } private object OnTechTreeNodeUnlock(Workbench workbench, TechTreeData.NodeInstance node, BasePlayer player) { if (workbench == null || player == null) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Mentality == 0 || config.mentality.researchcosttechtree == 0) return null; int rarityvalue = rarityValues[node.itemDef.rarity]; double reducecost = (config.mentality.researchcosttechtree * xprecord.Mentality) * rarityvalue; double researchcost = rarityvalue - reducecost; var cost = (int)researchcost; int itemid = ItemManager.FindItemDefinition("scrap").itemid; player.inventory.Take((List)null, itemid, cost); player.blueprints.Unlock(node.itemDef); Interface.CallHook("OnTechTreeNodeUnlocked", workbench, node, player); return false; } private void OnMixingTableToggle(MixingTable table, BasePlayer player) { if (table.IsOn()) return; if (player == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.Medic > 0) { NextTick(() => { double reducetotal = (xprecord.Medic * config.medic.crafttime) * table.TotalMixTime; double reduceremaining = (xprecord.Medic * config.medic.crafttime) * table.TotalMixTime; table.TotalMixTime -= (float)reducetotal; table.RemainingMixTime -= (float)reduceremaining; table.SendNetworkUpdateImmediate(); }); } } private double CaptaincyTeamSkillBoost(BasePlayer player) { if (!CaptaincyTeamDistance(player) || player == null || !player.userID.Get().IsSteamId() || player.Team == null || player.Team.members.Count <= 1) return 0; if (CheckPlayerLocation(player, "disableabilities")) return 0; foreach (var team in player.Team.members) { if (team == player.userID) continue; BasePlayer teammember = RelationshipManager.FindByID(team); if (teammember == null || !teammember.IsConnected) continue; XPRecord teamxprecord = GetXPRecord(teammember); if (teamxprecord.Captaincy <= 0) continue; double skillboost = teamxprecord.Captaincy * config.captaincy.skillboost; if (config.defaultOptions.debugmode) { Puts($"## CaptaincyTeamSkillBoost ## \n " + $"Skill boost of {skillboost * 100}% from {teammember.displayName} added to {player.displayName}"); } return skillboost; } return 0; } private double CaptaincyTeamXPBoost(BasePlayer player) { if (!CaptaincyTeamDistance(player) || player == null || !player.userID.Get().IsSteamId() || player.Team == null || player.Team.members.Count <= 1) return 0; if (CheckPlayerLocation(player, "disableabilities")) return 0; foreach (var team in player.Team.members) { if (!team.IsSteamId()) continue; if (team == player.userID) continue; BasePlayer teammember = RelationshipManager.FindByID(team); XPRecord teamxprecord = GetXPRecord(teammember); if (teammember == null || teamxprecord == null) continue; if (teamxprecord.Captaincy <= 0) continue; double addxp = (teamxprecord.Captaincy * config.captaincy.xpboost); if (config.defaultOptions.debugmode) { Puts($"## CaptaincyTeamXPBoost ## \n " + $"XP boost of {addxp * 100}% from {teammember.displayName} added to {player.displayName}"); } return addxp; } return 0; } private bool CaptaincyTeamDistance(BasePlayer player) { if (player == null || !player.userID.Get().IsSteamId() || player.Team == null || player.Team.members.Count <= 1) return false; if (config.defaultOptions.debugmode) { Puts("## CaptaincyTeamDistance ##"); } foreach (var team in player.Team.members) { if (team == player.userID) continue; BasePlayer teammember = RelationshipManager.FindByID(team); if (teammember == null || !teammember.IsConnected || !teammember.userID.Get().IsSteamId()) continue; XPRecord teamxprecord = GetXPRecord(teammember); if (teamxprecord.Captaincy <= 0) continue; float teamdistance = teamxprecord.Captaincy * config.captaincy.captaincydistance; // Ranks if (config.xpLevelRanks.rankskillboost && !teamxprecord.DisableRank && config.Rankboostssettings.distance) { double rankboost = (teamxprecord.rank * config.xpLevelRanks.rankstatboostamount) * teamdistance; teamdistance += (float)rankboost; } if (Vector3.Distance(player.ServerPosition, teammember.ServerPosition) >= teamdistance) continue; if (config.defaultOptions.debugmode) { Puts($"\n Player in Range: {teammember.displayName} @ {Vector3.Distance(player.ServerPosition, teammember.ServerPosition)}m"); } return true; } return false; } private void RandomForagerItem(BasePlayer player) { if (player == null) return; if (CheckPlayerLocation(player, "disableabilities")) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Forager <= 0) return; double itemchance = (config.forager.randomchance * xprecord.Forager) * 100; // Rank Boost if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.foragerric) { double rankboostitem = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * itemchance; itemchance += rankboostitem; } // Item Chance if ((Random.Range(0, 101) <= itemchance) == true) { int randomroll = Random.Range(0, config.forager.randomChanceList.Count); var selected = config.forager.randomChanceList[randomroll]; ItemDefinition definition = ItemManager.FindItemDefinition(selected.shortname); if (definition == null) { Puts($"[Forager] Invalid shortname in config for item number {selected}"); return; } // Check if Special Item if (XPerienceAddon != null && selected.displayname != null) { string itemname = String.Concat(selected.displayname.ToLower().Where(c => !Char.IsWhiteSpace(c))); if (XPerienceAddon.Call("IsSpecialItem", player, itemname)) { XPerienceAddon?.Call("SpecialDrops", player, itemname, selected.amount); // Sound Effect if (config.soundEffects.foragerloot) { player.RunEffect($"{config.soundEffects.foragerlooteffect}"); } return; } } if (config.defaultOptions.dropsgotoplayerinventory) { Item createitem = ItemManager.CreateByItemID(definition.itemid, selected.amount, selected.SkinID); if (!string.IsNullOrEmpty(selected.displayname)) { createitem.name = selected.displayname; createitem.MarkDirty(); } // Return if Item is Null if (createitem == null) { Puts($"[Forager List] Error creating item with skinid {selected.SkinID} for item {selected.shortname}"); return; } // Give Item to Player player.GiveItem(createitem); } else { Item createitem = ItemManager.CreateByItemID(definition.itemid, selected.amount, selected.SkinID); if (!string.IsNullOrEmpty(selected.displayname)) { createitem.name = selected.displayname; createitem.MarkDirty(); } // Return if Item is Null if (createitem == null) { Puts($"[Forager List] Error creating item with skinid {selected.SkinID} for item {selected.shortname}"); return; } player.Command("note.inv", definition.itemid, selected.amount, selected.SkinID); // Give Item to Player player.GiveItem(createitem); } // Sound Effect if (config.soundEffects.foragerloot) { player.RunEffect($"{config.soundEffects.foragerlooteffect}"); } } } private void RandomScavengerItem(BasePlayer player) { if (player == null) return; if (CheckPlayerLocation(player, "disableabilities")) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Scavenger <= 0) return; var scavChanceLists = new Dictionary(); int number = 0; foreach (var item in config.scavenger.scavChanceList) { if (item.Value.requiredlevel <= xprecord.Scavenger) { scavChanceLists.Add(number, item.Value); number++; } } double scavchance = (config.scavenger.scavchance * xprecord.Scavenger) * 100; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavcic) { double rankboostchance = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * scavchance; scavchance += rankboostchance; } if ((Random.Range(0, 101) <= scavchance) == true) { int scavroll = Random.Range(0, scavChanceLists.Count); var scavitem = scavChanceLists[scavroll]; ItemDefinition definition = ItemManager.FindItemDefinition(scavitem.shortname); if (definition == null) { Puts($"[Scavenger] Invalid shortname in config for item number {scavroll}"); return; } var scavmultiplier = Math.Ceiling(xprecord.Scavenger * (scavitem.amount * config.scavenger.customscavmultiplier)); if (config.scavenger.customscavrandom) { scavmultiplier = Random.Range(scavitem.amount, (float)scavmultiplier); } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavcim) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * scavmultiplier; scavmultiplier += rankboost; } if (scavmultiplier > scavitem.maxamount) { scavmultiplier = scavitem.maxamount; } // Check if Special Item if (XPerienceAddon != null && scavitem.displayname != null) { string itemname = String.Concat(scavitem.displayname.ToLower().Where(c => !Char.IsWhiteSpace(c))); if (XPerienceAddon.Call("IsSpecialItem", player, itemname)) { XPerienceAddon?.Call("SpecialDrops", player, itemname, (int)scavmultiplier); // Sound Effect if (config.soundEffects.scavengerloot) { player.RunEffect($"{config.soundEffects.scavengerlooteffect}"); } return; } } // Continue if not special item if (config.defaultOptions.dropsgotoplayerinventory) { Item createitem = ItemManager.CreateByItemID(definition.itemid, (int)scavmultiplier, scavitem.SkinID); if (!string.IsNullOrEmpty(scavitem.displayname)) { createitem.name = scavitem.displayname; createitem.MarkDirty(); } // Return if Item is Null if (createitem == null) { Puts($"[Scavenger List] Error creating item with skinid {scavitem.SkinID} for item {scavitem.shortname}"); return; } // Give Item to Player player.GiveItem(createitem); } else { Item createitem = ItemManager.CreateByItemID(definition.itemid, (int)scavmultiplier, scavitem.SkinID); if (!string.IsNullOrEmpty(scavitem.displayname)) { createitem.name = scavitem.displayname; createitem.MarkDirty(); } // Return if Item is Null if (createitem == null) { Puts($"[Scavenger List] Error creating item with skinid {scavitem.SkinID} for item {scavitem.shortname}"); return; } player.Command("note.inv", definition.itemid, scavitem.amount, scavitem.SkinID); // Give Item to Player player.GiveItem(createitem); } // Sound Effect if (config.soundEffects.scavengerloot) { player.RunEffect($"{config.soundEffects.scavengerlooteffect}"); } } } private void IncreaseLootContainers(BasePlayer player, LootContainer lootcontainer) { if (player == null) return; if (CheckPlayerLocation(player, "disableabilities")) return; XPRecord xprecord = GetXPRecord(player); if (xprecord.Scavenger <= 0) return; double scavlootchance = (config.scavenger.scavlootchance * xprecord.Scavenger) * 100; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavelc) { double rankboostchance = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * scavlootchance; scavlootchance += rankboostchance; } if ((Random.Range(0, 101) <= scavlootchance) == true) { if (lootcontainer.inventory == null) return; lootcontainer.inventory.itemList.ForEach(item => { if (config.scavenger.componentsonly) { if (item != null && item.info.category == ItemCategory.Component) { int newamount = (int)Math.Ceiling((xprecord.Scavenger * config.scavenger.scavmultiplier) * item.amount); // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavelm) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * newamount; newamount += (int)Math.Ceiling(rankboost); } item.amount = newamount; } } else { if (item != null) { int newamount = (int)Math.Ceiling((xprecord.Scavenger * config.scavenger.scavmultiplier) * item.amount); // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * newamount; newamount += (int)Math.Ceiling(rankboost); } item.amount = newamount; } } }); // Sound Effect if (config.soundEffects.scavengerloot) { player.RunEffect($"{config.soundEffects.scavengerlooteffect}"); } } } private void IncreaseLootContainerDrops(ItemContainer lootcontainer) { if (lootcontainer == null) return; var lootentity = lootcontainer.entityOwner as LootContainer; if (lootentity == null || lootentity.IsDestroyed) return; var player = lootentity.lastAttacker as BasePlayer; if (player == null) return; if (CheckPlayerLocation(player, "disableabilities")) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.Scavenger <= 0) return; double scavlootchance = (config.scavenger.scavlootchance * xprecord.Scavenger) * 100; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavelc) { double rankboostchance = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * scavlootchance; scavlootchance += rankboostchance; } if ((Random.Range(0, 101) <= scavlootchance) == true) { lootcontainer.itemList.ForEach(item => { if (config.scavenger.componentsonly) { if (item != null && item.info.category == ItemCategory.Component) { int newamount = (int)Math.Ceiling((xprecord.Scavenger * config.scavenger.scavmultiplier) * item.amount); // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * newamount; newamount += (int)Math.Ceiling(rankboost); } item.amount = newamount; } } else { if (item != null) { int newamount = (int)Math.Ceiling((xprecord.Scavenger * config.scavenger.scavmultiplier) * item.amount); // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavelm) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * newamount; newamount += (int)Math.Ceiling(rankboost); } item.amount = newamount; } } }); // Sound Effect if (config.soundEffects.scavengerloot) { player.RunEffect($"{config.soundEffects.scavengerlooteffect}"); } } } private void IncreaseLootCorpse(BasePlayer player, LootableCorpse corpse) { if (player == null || !player.userID.Get().IsSteamId() || corpse == null) return; if (CheckPlayerLocation(player, "disableabilities")) return; XPRecord xprecord = GetXPRecord(player); if (xprecord.Scavenger <= 0) return; double scavlootchance = (config.scavenger.scavlootchance * xprecord.Scavenger) * 100; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavelc) { double rankboostchance = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * scavlootchance; scavlootchance += rankboostchance; } if ((Random.Range(0, 101) <= scavlootchance) == true) { foreach (var corpseContainer in corpse.containers) { if (corpseContainer.itemList.Count == 0) continue; foreach (var item in corpseContainer.itemList) { if (config.scavenger.componentsonly) { if (item != null && item.info.category == ItemCategory.Component) { int newamount = (int)Math.Ceiling((xprecord.Scavenger * config.scavenger.scavmultiplier) * item.amount); // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavelm) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * newamount; newamount += (int)Math.Ceiling(rankboost); } item.amount = newamount; } } else { if (item != null) { int newamount = (int)Math.Ceiling((xprecord.Scavenger * config.scavenger.scavmultiplier) * item.amount); // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.scavelm) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * newamount; newamount += (int)Math.Ceiling(rankboost); } item.amount = newamount; } } } } // Sound Effect if (config.soundEffects.scavengerloot) { player.RunEffect($"{config.soundEffects.scavengerlooteffect}"); } } } private void OnFishCatch(Item fish, BaseFishingRod fishingRod, BasePlayer player) { if (player == null || fish == null) return; XPRecord xprecord = GetXPRecord(player); if (!CheckPlayerLocation(player, "noxpgain")) { double addxp = config.xpGain.fishxp; GainExp(player, addxp); } if (CheckPlayerLocation(player, "disableabilities")) return; if (xprecord.Fisher > 0) { var fishname = fish.info.shortname; if (fishname.Contains("anchovy") || fishname.Contains("catfish") || fishname.Contains("herring") || fishname.Contains("minnow") || fishname.Contains("roughy") || fishname.Contains("salmon") || fishname.Contains("sardine") || fishname.Contains("shark") || fishname.Contains("trout") || fishname.Contains("Perch")) { double results = Math.Round(fish.amount + (xprecord.Fisher * config.fisher.fishamountincrease)); // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * results; results += (int)Math.Ceiling(captaincyboost); } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.fisherfa) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * results; results += (int)Math.Ceiling(rankboost); } fish.amount = (int)results; } else { double results = Math.Round(fish.amount + (xprecord.Fisher * config.fisher.itemamountincrease)); // Captaincy if (player.Team != null && player.Team.members.Count > 1) { double captaincyboost = CaptaincyTeamSkillBoost(player) * results; results += (int)Math.Ceiling(captaincyboost); } // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.fisheria) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * results; results += (int)Math.Ceiling(rankboost); } fish.amount = (int)results; } } } private void OnMagazineReload(BaseProjectile projectile, int desiredAmount, BasePlayer player) { if (config.weaponry.reloadhook != "OnMagazineReload") return; if (WeaponMechanics != null) return; if (player == null || !player.userID.Get().IsSteamId() || player.IsNpc) return; if (config.weaponry.maxammo == 0) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; // Excluded Weapons Check if (config.defaultOptions.debugmode) { Puts($"OnMagazineReload: {projectile.ShortPrefabName}"); } bool excluded = false; string[] excludeweapons = config.weaponry.excludedweapons.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string ex in excludeweapons) { if (projectile.ShortPrefabName.Contains(ex)) { excluded = true; if (config.defaultOptions.debugmode) { Puts($"Excluded Weapons Detected"); } } } // Check for SkinBox mod as conflict occur bool skinboxdetected = false; if (SkinBox != null && config.weaponry.skinboxdisable) { skinboxdetected = true; } if (skinboxdetected && projectile.skinID != 0) return; // Get Default Weapon Data int defaultammo = projectile.primaryMagazine.capacity; int maxammo = projectile.primaryMagazine.capacity; double defaultreload = projectile.reloadTime; double newreload = projectile.reloadTime; double defaultdistance = projectile.distanceScale; double maxdistance = projectile.distanceScale; double defaultrange = projectile.effectiveRange; double maxrange = projectile.effectiveRange; // Weapon Mechanics if (WeaponMechanics != null) { if (!config.weaponry.useweaponmechanics) return; if (config.defaultOptions.debugmode) { Puts($"WeaponMechanics Detected: Checking for listed weapons..."); } Item item = projectile?.GetItem(); if (item != null) { bool isaltered = (bool)WeaponMechanics?.CallHook("IsWeaponListed", item.info.shortname); if (isaltered) { if (config.defaultOptions.debugmode) { Puts($"Weapon listed, getting new default values from Weapon Mechanics..."); } defaultammo = (int)WeaponMechanics?.CallHook("WMGetMaxAmmo", item.info.shortname); defaultdistance = (float)WeaponMechanics?.CallHook("WMGetWeaponData", item.info.shortname, "distancescale"); defaultrange = (float)WeaponMechanics?.CallHook("WMGetWeaponData", item.info.shortname, "effectiverange"); if (config.defaultOptions.debugmode) { Puts($"New default values recieved, appling before XPerience skill adjustment..."); } } } } // Add New Weapon Data if (!_weaponCache.ContainsKey(projectile.net.ID.Value)) { if (config.defaultOptions.debugmode) { Puts($"Adding New Weapon to Cache"); } if (CheckPlayerLocation(player, "disableabilities") || excluded) { AddWeaponData(player, projectile, defaultammo, maxammo, defaultreload, newreload, defaultdistance, maxdistance, defaultrange, maxrange, projectile.net.ID); return; } if (xprecord.Weaponry >= 1 && !excluded) { maxammo = (int)Math.Ceiling(projectile.primaryMagazine.capacity + ((config.weaponry.maxammo * xprecord.Weaponry) * projectile.primaryMagazine.capacity)); if (maxammo >= defaultammo * config.weaponry.maxammolimit) { maxammo = (int)Math.Ceiling(defaultammo * config.weaponry.maxammolimit); } if (XPerienceAddon) { //newreload = defaultreload - ((defaultreload * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "reload"))); maxdistance = defaultdistance + ((defaultdistance * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "distance"))); maxrange = defaultrange + ((defaultrange * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "range"))); } } AddWeaponData(player, projectile, defaultammo, maxammo, defaultreload, newreload, defaultdistance, maxdistance, defaultrange, maxrange, projectile.net.ID); projectile.primaryMagazine.capacity = maxammo; //projectile.reloadTime = (float)newreload; projectile.distanceScale = (float)maxdistance; projectile.effectiveRange = (float)maxrange; return; } // Get Weapon Data Weapon weapon; if (_weaponCache.TryGetValue(projectile.net.ID.Value, out weapon)) { // Weapon Found / Reset Weapon / Boost Max Ammo if Player Has Ability maxammo = weapon.defaultammo; //reload = weapon.defaultreload; maxdistance = weapon.defaultdistance; maxrange = weapon.defaultrange; if (config.defaultOptions.debugmode) { Puts($"Weapon found in Cache"); } if (CheckPlayerLocation(player, "disableabilities") || excluded) { if (config.defaultOptions.debugmode) { Puts($"Player is in restricted location or Weapon is excluded.. loading default values"); } projectile.primaryMagazine.capacity = maxammo; //projectile.reloadTime = (float)reload; projectile.distanceScale = (float)maxdistance; projectile.effectiveRange = (float)maxrange; return; } if (xprecord.Weaponry >= 1 && !excluded) { maxammo = (int)Math.Ceiling(weapon.defaultammo + ((config.weaponry.maxammo * xprecord.Weaponry) * weapon.defaultammo)); if (maxammo >= weapon.defaultammo * config.weaponry.maxammolimit) { maxammo = (int)Math.Ceiling(weapon.defaultammo * config.weaponry.maxammolimit); } if (XPerienceAddon) { //reload = reload - ((reload * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "reload"))); maxdistance = maxdistance + ((maxdistance * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "distance"))); maxrange = maxrange + ((maxrange * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "range"))); } projectile.primaryMagazine.capacity = maxammo; //projectile.reloadTime = (float)reload; projectile.distanceScale = (float)maxdistance; projectile.effectiveRange = (float)maxrange; return; } if (xprecord.Weaponry < 1 || excluded) { projectile.primaryMagazine.capacity = maxammo; //projectile.reloadTime = (float)reload; projectile.distanceScale = (float)maxdistance; projectile.effectiveRange = (float)maxrange; return; } } } private void OnWeaponReload(BaseProjectile projectile, BasePlayer player) { if (config.weaponry.reloadhook != "OnWeaponReload") return; if (player == null || !player.userID.Get().IsSteamId() || player.IsNpc) return; if (config.weaponry.maxammo == 0) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; // Excluded Weapons Check if (config.defaultOptions.debugmode) { Puts($"OnWeaponReload: {projectile.ShortPrefabName}"); } bool excluded = false; string[] excludeweapons = config.weaponry.excludedweapons.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string ex in excludeweapons) { if (projectile.ShortPrefabName.Contains(ex)) { excluded = true; if (config.defaultOptions.debugmode) { Puts($"Excluded Weapons Detected"); } } } // Check for SkinBox mod as conflict occur bool skinboxdetected = false; if (SkinBox != null && config.weaponry.skinboxdisable) { skinboxdetected = true; } if (skinboxdetected && projectile.skinID != 0) return; // Get Default Weapon Data int defaultammo = projectile.primaryMagazine.capacity; int maxammo = projectile.primaryMagazine.capacity; double defaultreload = projectile.reloadTime; double newreload = projectile.reloadTime; double defaultdistance = projectile.distanceScale; double maxdistance = projectile.distanceScale; double defaultrange = projectile.effectiveRange; double maxrange = projectile.effectiveRange; // Weapon Mechanics if (WeaponMechanics != null) { if (!config.weaponry.useweaponmechanics) return; if (config.defaultOptions.debugmode) { Puts($"WeaponMechanics Detected: Checking for listed weapons..."); } Item item = projectile?.GetItem(); if (item != null) { bool isaltered = (bool)WeaponMechanics?.CallHook("IsWeaponListed", item.info.shortname); if (isaltered) { if (config.defaultOptions.debugmode) { Puts($"Weapon listed, getting new default values from Weapon Mechanics..."); } defaultammo = (int)WeaponMechanics?.CallHook("WMGetMaxAmmo", item.info.shortname); defaultdistance = (float)WeaponMechanics?.CallHook("WMGetWeaponData", item.info.shortname, "distancescale"); defaultrange = (float)WeaponMechanics?.CallHook("WMGetWeaponData", item.info.shortname, "effectiverange"); if (config.defaultOptions.debugmode) { Puts($"New default values recieved, appling before XPerience skill adjustment..."); } } } } // Add New Weapon Data if (!_weaponCache.ContainsKey(projectile.net.ID.Value)) { if (config.defaultOptions.debugmode) { Puts($"Adding New Weapon to Cache"); } if (CheckPlayerLocation(player, "disableabilities") || excluded) { AddWeaponData(player, projectile, defaultammo, maxammo, defaultreload, newreload, defaultdistance, maxdistance, defaultrange, maxrange, projectile.net.ID); return; } if (xprecord.Weaponry >= 1 && !excluded) { maxammo = (int)Math.Ceiling(projectile.primaryMagazine.capacity + ((config.weaponry.maxammo * xprecord.Weaponry) * projectile.primaryMagazine.capacity)); if (maxammo >= defaultammo * config.weaponry.maxammolimit) { maxammo = (int)Math.Ceiling(defaultammo * config.weaponry.maxammolimit); } if (XPerienceAddon) { //newreload = defaultreload - ((defaultreload * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "reload"))); maxdistance = defaultdistance + ((defaultdistance * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "distance"))); maxrange = defaultrange + ((defaultrange * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "range"))); } } AddWeaponData(player, projectile, defaultammo, maxammo, defaultreload, newreload, defaultdistance, maxdistance, defaultrange, maxrange, projectile.net.ID); projectile.primaryMagazine.capacity = maxammo; //projectile.reloadTime = (float)newreload; projectile.distanceScale = (float)maxdistance; projectile.effectiveRange = (float)maxrange; return; } // Get Weapon Data Weapon weapon; if (_weaponCache.TryGetValue(projectile.net.ID.Value, out weapon)) { // Weapon Found / Reset Weapon / Boost Max Ammo if Player Has Ability maxammo = weapon.defaultammo; //reload = weapon.defaultreload; maxdistance = weapon.defaultdistance; maxrange = weapon.defaultrange; if (config.defaultOptions.debugmode) { Puts($"Weapon found in Cache"); } if (CheckPlayerLocation(player, "disableabilities") || excluded) { if (config.defaultOptions.debugmode) { Puts($"Player is in restricted location or Weapon is excluded.. loading default values"); } projectile.primaryMagazine.capacity = maxammo; //projectile.reloadTime = (float)reload; projectile.distanceScale = (float)maxdistance; projectile.effectiveRange = (float)maxrange; return; } if (xprecord.Weaponry >= 1 && !excluded) { maxammo = (int)Math.Ceiling(weapon.defaultammo + ((config.weaponry.maxammo * xprecord.Weaponry) * weapon.defaultammo)); if (maxammo >= weapon.defaultammo * config.weaponry.maxammolimit) { maxammo = (int)Math.Ceiling(weapon.defaultammo * config.weaponry.maxammolimit); } if (XPerienceAddon) { //reload = reload - ((reload * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "reload"))); maxdistance = maxdistance + ((maxdistance * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "distance"))); maxrange = maxrange + ((maxrange * xprecord.Weaponry) * Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "range"))); } projectile.primaryMagazine.capacity = maxammo; //projectile.reloadTime = (float)reload; projectile.distanceScale = (float)maxdistance; projectile.effectiveRange = (float)maxrange; return; } if (xprecord.Weaponry < 1 || excluded) { projectile.primaryMagazine.capacity = maxammo; //projectile.reloadTime = (float)reload; projectile.distanceScale = (float)maxdistance; projectile.effectiveRange = (float)maxrange; return; } } } private object OnLoseCondition(Item item, ref float amount) { if (item == null) return null; //if (NeverWear != null) return null; // NeverWear Plugin bool tooldurability = true; bool weapondurability = true; if (NeverWear != null && !config.weaponry.neverweartools && !config.weaponry.neverwearweapons) return null; if (NeverWear != null) { if (!config.weaponry.neverweartools) { tooldurability = false; } if (!config.weaponry.neverwearweapons) { weapondurability = false; } } // Weapon Mechanics if (WeaponMechanics != null) { bool isbreakable = (bool)WeaponMechanics?.CallHook("IsWeaponunbreakable", item.info.shortname); if(!isbreakable) return null; } var player = GetOwnerPlayer(item); if (player == null || !player.userID.Get().IsSteamId() || player.IsNpc) return null; if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return null; // Weaponry Stat if (xprecord.Weaponry >= 1) { // Chance to reduce condition damage double reductionchance = (config.weaponry.reductionchance * xprecord.Weaponry) * 100; if ((Random.Range(0, 101) <= reductionchance) == true) { //Tools if (tooldurability && (item.info.shortname.Contains("hatchet") || item.info.shortname.Contains("axe") || item.info.shortname.Contains("pickaxe") || item.info.shortname.Contains("icepick"))) { double reducecondition = amount * (xprecord.Weaponry * config.weaponry.tool); amount -= (float)reducecondition; // Make sure reduction does not go 0 or add condition if (amount < config.weaponry.mindamage) { amount = (float)config.weaponry.mindamage; } } // Power Tools if (tooldurability && (item.info.shortname.Contains("chainsaw") || item.info.shortname.Contains("jackhammer"))) { double reducecondition = amount * (xprecord.Weaponry * config.weaponry.powertools); amount -= (float)reducecondition; // Make sure reduction does not go 0 or add condition if (amount < config.weaponry.mindamage) { amount = (float)config.weaponry.mindamage; } } // Melee Weapons if (weapondurability && (item.info.shortname.Contains("spear") || item.info.shortname.Contains("knife") || item.info.shortname.Contains("mace") || item.info.shortname.Contains("machete") || item.info.shortname.Contains("club") || item.info.shortname.Contains("sword") || item.info.shortname.Contains("longsword") || item.info.shortname.Contains("cleaver"))) { double reducecondition = amount * (xprecord.Weaponry * config.weaponry.meleeweapons); amount -= (float)reducecondition; // Make sure reduction does not go 0 or add condition if (amount < config.weaponry.mindamage) { amount = (float)config.weaponry.mindamage; } } // Projectile Weapons if (weapondurability && (item.info.shortname.Contains("rifle") || item.info.shortname.Contains("smg") || item.info.shortname.Contains("shotgun") || item.info.shortname.Contains("bow") || item.info.shortname.Contains("pistol") || item.info.shortname.Contains("lmg"))) { double reducecondition = amount * (xprecord.Weaponry * config.weaponry.projectileweapons); amount -= (float)reducecondition; // Make sure reduction does not go 0 or add condition if (amount < config.weaponry.mindamage) { amount = (float)config.weaponry.mindamage; } } } return amount; } // Fisher Diving Tank Reduction if (xprecord.Fisher >= 1 && item.info.shortname.Equals("diving.tank")) { double reducedair = amount * (xprecord.Fisher * config.fisher.oxygentankreduction); amount -= (float)reducedair; // Ranks if (config.xpLevelRanks.rankskillboost && !xprecord.DisableRank && config.Rankboostssettings.fisherotr) { double rankboost = (xprecord.rank * config.xpLevelRanks.rankstatboostamount) * amount; amount -= (float)rankboost; } if (amount <= 0) { amount = 0.25f; } return amount; } return null; } private void OnSolarPanelSunUpdate(SolarPanel panel, int currentEnergy) { if (config.electrician.maxlvl <= 0) return; panel.maximalPowerOutput = config.electrician.solarpaneldefault; string panelowner = panel.OwnerID.ToString(); if (!panelowner.IsSteamId()) return; var player = FindPlayer(panelowner); if (player == null) return; XPRecord xprecord = GetXPRecord(player); // Max Output // Add new solar panel if missing if (!_electricianCache.ContainsKey(panel.net.ID.Value)) { if (xprecord.Electrician < 1) { AddElectricianData(panel.net.ID.Value, "solarpanel", config.electrician.solarpaneldefault, config.electrician.solarpaneldefault, panel.OwnerID); return; } if (xprecord.Electrician >= 1) { double newmaxenergy = ((config.electrician.solarpanelmaxincrease * xprecord.Electrician) * panel.maximalPowerOutput) + panel.maximalPowerOutput; AddElectricianData(panel.net.ID.Value, "solarpanel", config.electrician.solarpaneldefault, (int)Math.Round(newmaxenergy), panel.OwnerID); panel.maximalPowerOutput = (int)Math.Round(newmaxenergy); } } // Load solar panel data if found ElectricianD loadpanel; if (_electricianCache.TryGetValue(panel.net.ID.Value, out loadpanel)) { if (xprecord.Electrician < 1) { loadpanel.newmaxoutput = config.electrician.solarpaneldefault; return; } double maxoutput = ((config.electrician.solarpanelmaxincrease * xprecord.Electrician) * panel.maximalPowerOutput) + panel.maximalPowerOutput; if ((int)maxoutput != loadpanel.newmaxoutput) { loadpanel.newmaxoutput = (int)Math.Round(maxoutput); panel.maximalPowerOutput = (int)Math.Round(maxoutput); } else { panel.maximalPowerOutput = loadpanel.newmaxoutput; } } // Current Input & Output if (xprecord.Electrician < 1) return; if (xprecord.Electrician >= 1) { double increaseinput = ((config.electrician.solarpanelinputincrease * xprecord.Electrician) * currentEnergy) + currentEnergy; if (increaseinput > panel.maximalPowerOutput) { increaseinput = panel.maximalPowerOutput; } panel.currentEnergy = (int)Math.Round(increaseinput); if (currentEnergy <= 0 && config.electrician.allowminsolarinput) { panel.currentEnergy = config.electrician.minsolarinput * xprecord.Electrician; } } } private void OnInputUpdate(IOEntity entity, int inputAmount, int slot) { if (config.electrician.maxlvl <= 0) return; // ElectricBattery if (entity.GetType().Name == "ElectricBattery") { ElectricBattery electricBattery = (ElectricBattery)entity; string batteryowner = electricBattery.OwnerID.ToString(); if (!batteryowner.IsSteamId()) return; var player = FindPlayer(batteryowner); if (player == null) return; XPRecord xprecord = GetXPRecord(player); int defaultmaxoutput = 0; double newmaxoutput = 0; string name = ""; switch (electricBattery.ShortPrefabName) { case "smallrechargablebattery.deployed": defaultmaxoutput = config.electrician.smallbatterydefault; newmaxoutput = config.electrician.smallbatterymaxincrease; name = "SmallBattery"; break; case "medium.rechargable.battery.deployed": defaultmaxoutput = config.electrician.mediumbatterydefault; newmaxoutput = config.electrician.mediumbatterymaxincrease; name = "MediumBattery"; break; case "large.rechargable.battery.deployed": defaultmaxoutput = config.electrician.largebatterydefault; newmaxoutput = config.electrician.largebatterymaxincrease; name = "LargeBattery"; break; } // Add new battery if missing if (!_electricianCache.ContainsKey(electricBattery.net.ID.Value)) { if (xprecord.Electrician < 1) { electricBattery.maxOutput = defaultmaxoutput; AddElectricianData(electricBattery.net.ID.Value, name, defaultmaxoutput, defaultmaxoutput, electricBattery.OwnerID); return; } if (xprecord.Electrician >= 1) { electricBattery.maxOutput = defaultmaxoutput; double newmaxenergy = ((newmaxoutput * xprecord.Electrician) * electricBattery.maxOutput) + electricBattery.maxOutput; AddElectricianData(electricBattery.net.ID.Value, name, defaultmaxoutput, (int)Math.Round(newmaxenergy), electricBattery.OwnerID); electricBattery.maxOutput = (int)Math.Round(newmaxenergy); } } // Load solar panel data if found ElectricianD loadbattery; if (_electricianCache.TryGetValue(electricBattery.net.ID.Value, out loadbattery)) { if (xprecord.Electrician < 1) { electricBattery.maxOutput = defaultmaxoutput; loadbattery.newmaxoutput = defaultmaxoutput; return; } double maxoutput = ((config.electrician.solarpanelmaxincrease * xprecord.Electrician) * electricBattery.maxOutput) + electricBattery.maxOutput; if ((int)maxoutput != loadbattery.newmaxoutput) { loadbattery.newmaxoutput = (int)Math.Round(maxoutput); electricBattery.maxOutput = (int)Math.Round(maxoutput); } else { electricBattery.maxOutput = loadbattery.newmaxoutput; } } } } private void OnOutputUpdate(IOEntity entity) { if (config.electrician.maxlvl <= 0) return; // Fuel Generator if (entity.GetType().Name == "FuelGenerator") { FuelGenerator generator = (FuelGenerator)entity; string generatorowner = generator.OwnerID.ToString(); if (!generatorowner.IsSteamId()) return; var player = FindPlayer(generatorowner); if (player == null) return; XPRecord xprecord = GetXPRecord(player); // Add new generator if missing if (!_electricianCache.ContainsKey(generator.net.ID.Value)) { if (xprecord.Electrician < 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; AddElectricianData(generator.net.ID.Value, "SmallGenerator", config.electrician.smallgeneratordefault, config.electrician.smallgeneratordefault, generator.OwnerID); return; } if (xprecord.Electrician >= 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; double newmaxenergy = ((config.electrician.smallgeneratormaxincrease * xprecord.Electrician) * config.electrician.smallgeneratordefault) + config.electrician.smallgeneratordefault; AddElectricianData(generator.net.ID.Value, "SmallGenerator", config.electrician.smallgeneratordefault, (int)Math.Round(newmaxenergy), generator.OwnerID); generator.outputEnergy = (int)Math.Round(newmaxenergy); } } // Load generator data if found ElectricianD loadgenerator; if (_electricianCache.TryGetValue(generator.net.ID.Value, out loadgenerator)) { if (xprecord.Electrician < 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; loadgenerator.newmaxoutput = config.electrician.smallgeneratordefault; return; } double maxoutput = ((config.electrician.smallgeneratormaxincrease * xprecord.Electrician) * config.electrician.smallgeneratordefault) + config.electrician.smallgeneratordefault; if ((int)maxoutput != loadgenerator.newmaxoutput) { loadgenerator.newmaxoutput = (int)Math.Round(maxoutput); generator.outputEnergy = (int)Math.Round(maxoutput); } else { generator.outputEnergy = loadgenerator.newmaxoutput; } } } // Electric Battery if (entity.GetType().Name == "ElectricBattery") { ElectricBattery electricBattery = (ElectricBattery)entity; string batteryowner = electricBattery.OwnerID.ToString(); if (!batteryowner.IsSteamId()) return; var player = FindPlayer(batteryowner); if (player == null) return; XPRecord xprecord = GetXPRecord(player); int defaultbattmaxoutput = 0; double newbattmaxoutput = 0; string battname = ""; switch (electricBattery.ShortPrefabName) { case "smallrechargablebattery.deployed": defaultbattmaxoutput = config.electrician.smallbatterydefault; newbattmaxoutput = config.electrician.smallbatterymaxincrease; battname = "SmallBattery"; break; case "medium.rechargable.battery.deployed": defaultbattmaxoutput = config.electrician.mediumbatterydefault; newbattmaxoutput = config.electrician.mediumbatterymaxincrease; battname = "MediumBattery"; break; case "large.rechargable.battery.deployed": defaultbattmaxoutput = config.electrician.largebatterydefault; newbattmaxoutput = config.electrician.largebatterymaxincrease; battname = "LargeBattery"; break; } // Add new battery if missing if (!_electricianCache.ContainsKey(electricBattery.net.ID.Value)) { if (xprecord.Electrician < 1) { electricBattery.maxOutput = defaultbattmaxoutput; AddElectricianData(electricBattery.net.ID.Value, battname, defaultbattmaxoutput, defaultbattmaxoutput, electricBattery.OwnerID); return; } if (xprecord.Electrician >= 1) { electricBattery.maxOutput = defaultbattmaxoutput; double newmaxenergy = ((newbattmaxoutput * xprecord.Electrician) * electricBattery.maxOutput) + electricBattery.maxOutput; AddElectricianData(electricBattery.net.ID.Value, battname, defaultbattmaxoutput, (int)Math.Round(newmaxenergy), electricBattery.OwnerID); electricBattery.maxOutput = (int)Math.Round(newmaxenergy); } } // Load battery data if found ElectricianD loadbattery; if (_electricianCache.TryGetValue(electricBattery.net.ID.Value, out loadbattery)) { if (xprecord.Electrician < 1) { electricBattery.maxOutput = defaultbattmaxoutput; loadbattery.newmaxoutput = defaultbattmaxoutput; return; } double maxoutput = ((config.electrician.solarpanelmaxincrease * xprecord.Electrician) * defaultbattmaxoutput) + defaultbattmaxoutput; if ((int)maxoutput != loadbattery.newmaxoutput) { loadbattery.newmaxoutput = (int)Math.Round(maxoutput); electricBattery.maxOutput = (int)Math.Round(maxoutput); } else { electricBattery.maxOutput = loadbattery.newmaxoutput; } } } // Electric Windmill if (entity.GetType().Name == "ElectricWindmill") { ElectricWindmill windmill = (ElectricWindmill)entity; string windmillowner = windmill.OwnerID.ToString(); if (!windmillowner.IsSteamId()) return; var player = FindPlayer(windmillowner); if (player == null) return; XPRecord xprecord = GetXPRecord(player); // Max Output // Add new windmill if missing if (!_electricianCache.ContainsKey(windmill.net.ID.Value)) { if (xprecord.Electrician < 1) { AddElectricianData(windmill.net.ID.Value, "ElectricWindmill", config.electrician.electricwindmilldefault, config.electrician.electricwindmilldefault, windmill.OwnerID); return; } if (xprecord.Electrician >= 1) { double newmaxenergy = ((config.electrician.electricwindmillmaxincrease * xprecord.Electrician) * config.electrician.electricwindmilldefault) + config.electrician.electricwindmilldefault; AddElectricianData(windmill.net.ID.Value, "ElectricWindmill", config.electrician.electricwindmilldefault, (int)Math.Round(newmaxenergy), windmill.OwnerID); windmill.maxPowerGeneration = (int)Math.Round(newmaxenergy); } } // Load windmill data if found ElectricianD loadwindmill; if (_electricianCache.TryGetValue(windmill.net.ID.Value, out loadwindmill)) { if (xprecord.Electrician < 1) { loadwindmill.newmaxoutput = config.electrician.electricwindmilldefault; return; } double maxoutput = ((config.electrician.electricwindmillmaxincrease * xprecord.Electrician) * config.electrician.electricwindmilldefault) + config.electrician.electricwindmilldefault; if ((int)maxoutput != loadwindmill.newmaxoutput) { loadwindmill.newmaxoutput = (int)Math.Round(maxoutput); windmill.maxPowerGeneration = (int)Math.Round(maxoutput); } else { windmill.maxPowerGeneration = loadwindmill.newmaxoutput; } } // Current Input & Output if (xprecord.Electrician >= 1) { double increaseinput = ((config.electrician.electricwindmillincrease * xprecord.Electrician) * windmill.currentEnergy) + windmill.currentEnergy; if (increaseinput > windmill.maxPowerGeneration) { increaseinput = windmill.maxPowerGeneration; } windmill.currentEnergy = (int)Math.Round(increaseinput); } } } private void OnEntitySpawned(BaseNetworkable entity) { if (config.electrician.maxlvl <= 0) return; ElectricGenerator generator = entity.GetComponent(); if (generator != null) { string generatorowner = generator.OwnerID.ToString(); if (!generatorowner.IsSteamId()) return; var player = FindPlayer(generatorowner); if (player == null) return; XPRecord xprecord = GetXPRecord(player); // Add new generator if missing if (!_electricianCache.ContainsKey(generator.net.ID.Value)) { if (xprecord.Electrician < 1) { generator.electricAmount = config.electrician.testgeneratordefault; AddElectricianData(generator.net.ID.Value, "TestGenerator", config.electrician.testgeneratordefault, config.electrician.testgeneratordefault, generator.OwnerID); return; } if (xprecord.Electrician >= 1) { generator.electricAmount = config.electrician.testgeneratordefault; double newmaxenergy = ((config.electrician.testgeneratormaxincrease * xprecord.Electrician) * config.electrician.testgeneratordefault) + config.electrician.testgeneratordefault; AddElectricianData(generator.net.ID.Value, "TestGenerator", config.electrician.smallgeneratordefault, (int)Math.Round(newmaxenergy), generator.OwnerID); generator.electricAmount = (int)Math.Round(newmaxenergy); } } // Load generator data if found ElectricianD loadgenerator; if (_electricianCache.TryGetValue(generator.net.ID.Value, out loadgenerator)) { if (xprecord.Electrician < 1) { generator.electricAmount = config.electrician.smallgeneratordefault; loadgenerator.newmaxoutput = config.electrician.smallgeneratordefault; return; } double maxoutput = ((config.electrician.smallgeneratormaxincrease * xprecord.Electrician) * config.electrician.testgeneratordefault) + config.electrician.testgeneratordefault; if ((int)maxoutput != loadgenerator.newmaxoutput) { loadgenerator.newmaxoutput = (int)Math.Round(maxoutput); generator.electricAmount = (int)Math.Round(maxoutput); } else { generator.electricAmount = loadgenerator.newmaxoutput; } } } } private void LoadElectricianEntities() { if (config.electrician.maxlvl <= 0) return; // Test Generators foreach (var tgenerator in UnityEngine.Object.FindObjectsOfType()) { if (tgenerator != null && tgenerator.OwnerID != 0) { string tgeneratorowner = tgenerator.OwnerID.ToString(); if (!tgeneratorowner.IsSteamId()) return; var player = FindPlayer(tgeneratorowner); if (player == null) return; XPRecord xprecord = GetXPRecord(player); // Add new generator if missing if (!_electricianCache.ContainsKey(tgenerator.net.ID.Value)) { if (xprecord.Electrician < 1) { tgenerator.electricAmount = config.electrician.testgeneratordefault; AddElectricianData(tgenerator.net.ID.Value, "TestGenerator", config.electrician.testgeneratordefault, config.electrician.testgeneratordefault, tgenerator.OwnerID); } else if (xprecord.Electrician >= 1) { tgenerator.electricAmount = config.electrician.testgeneratordefault; double newmaxenergy = ((config.electrician.testgeneratormaxincrease * xprecord.Electrician) * config.electrician.testgeneratordefault) + config.electrician.testgeneratordefault; AddElectricianData(tgenerator.net.ID.Value, "TestGenerator", config.electrician.testgeneratordefault, (int)Math.Round(newmaxenergy), tgenerator.OwnerID); tgenerator.electricAmount = (int)Math.Round(newmaxenergy); } } // Load generator data if found ElectricianD loadgenerator; if (_electricianCache.TryGetValue(tgenerator.net.ID.Value, out loadgenerator)) { if (xprecord.Electrician < 1) { tgenerator.electricAmount = config.electrician.testgeneratordefault; loadgenerator.newmaxoutput = config.electrician.testgeneratordefault; } else if (xprecord.Electrician >= 1) { double maxoutput = ((config.electrician.testgeneratormaxincrease * xprecord.Electrician) * config.electrician.testgeneratordefault) + config.electrician.testgeneratordefault; if ((int)maxoutput != loadgenerator.newmaxoutput) { loadgenerator.newmaxoutput = (int)Math.Round(maxoutput); tgenerator.electricAmount = (int)Math.Round(maxoutput); } else { tgenerator.electricAmount = loadgenerator.newmaxoutput; } } } } } // Fuel Generators foreach (var generator in UnityEngine.Object.FindObjectsOfType()) { if (generator != null && generator.OwnerID != 0) { string generatorowner = generator.OwnerID.ToString(); if (!generatorowner.IsSteamId()) return; var player = FindPlayer(generatorowner); if (player == null) return; XPRecord xprecord = GetXPRecord(player); // Add new generator if missing if (!_electricianCache.ContainsKey(generator.net.ID.Value)) { if (xprecord.Electrician < 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; AddElectricianData(generator.net.ID.Value, "SmallGenerator", config.electrician.smallgeneratordefault, config.electrician.smallgeneratordefault, generator.OwnerID); } else if (xprecord.Electrician >= 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; double newmaxenergy = ((config.electrician.smallgeneratormaxincrease * xprecord.Electrician) * config.electrician.smallgeneratordefault) + config.electrician.smallgeneratordefault; AddElectricianData(generator.net.ID.Value, "SmallGenerator", config.electrician.smallgeneratordefault, (int)Math.Round(newmaxenergy), generator.OwnerID); generator.outputEnergy = (int)Math.Round(newmaxenergy); } } // Load generator data if found ElectricianD loadgenerator; if (_electricianCache.TryGetValue(generator.net.ID.Value, out loadgenerator)) { if (xprecord.Electrician < 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; loadgenerator.newmaxoutput = config.electrician.smallgeneratordefault; } else if (xprecord.Electrician >= 1) { double maxoutput = ((config.electrician.smallgeneratormaxincrease * xprecord.Electrician) * config.electrician.smallgeneratordefault) + config.electrician.smallgeneratordefault; if ((int)maxoutput != loadgenerator.newmaxoutput) { loadgenerator.newmaxoutput = (int)Math.Round(maxoutput); generator.outputEnergy = (int)Math.Round(maxoutput); } else { generator.outputEnergy = loadgenerator.newmaxoutput; } } } } } } private void CheckElectricianEntities(BasePlayer player, bool reset = false) { if (player == null || !player.userID.Get().IsSteamId() || config.electrician.maxlvl <= 0) return; // Test Generators foreach (var tgenerator in UnityEngine.Object.FindObjectsOfType()) { if (tgenerator != null && tgenerator.OwnerID == player.userID) { string tgeneratorowner = tgenerator.OwnerID.ToString(); if (!tgeneratorowner.IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); // Add new generator if missing if (!_electricianCache.ContainsKey(tgenerator.net.ID.Value)) { if (reset) { tgenerator.electricAmount = config.electrician.testgeneratordefault; AddElectricianData(tgenerator.net.ID.Value, "TestGenerator", config.electrician.testgeneratordefault, config.electrician.testgeneratordefault, tgenerator.OwnerID); } else if (xprecord.Electrician < 1) { tgenerator.electricAmount = config.electrician.testgeneratordefault; AddElectricianData(tgenerator.net.ID.Value, "TestGenerator", config.electrician.testgeneratordefault, config.electrician.testgeneratordefault, tgenerator.OwnerID); } else if (xprecord.Electrician >= 1) { tgenerator.electricAmount = config.electrician.testgeneratordefault; double newmaxenergy = ((config.electrician.testgeneratormaxincrease * xprecord.Electrician) * config.electrician.testgeneratordefault) + config.electrician.testgeneratordefault; AddElectricianData(tgenerator.net.ID.Value, "TestGenerator", config.electrician.testgeneratordefault, (int)Math.Round(newmaxenergy), tgenerator.OwnerID); tgenerator.electricAmount = (int)Math.Round(newmaxenergy); } } // Load generator data if found ElectricianD loadgenerator; if (_electricianCache.TryGetValue(tgenerator.net.ID.Value, out loadgenerator)) { if (reset) { tgenerator.electricAmount = config.electrician.testgeneratordefault; loadgenerator.newmaxoutput = config.electrician.testgeneratordefault; } else if (xprecord.Electrician < 1) { tgenerator.electricAmount = config.electrician.testgeneratordefault; loadgenerator.newmaxoutput = config.electrician.testgeneratordefault; } else if (xprecord.Electrician >= 1) { double maxoutput = ((config.electrician.testgeneratormaxincrease * xprecord.Electrician) * config.electrician.testgeneratordefault) + config.electrician.testgeneratordefault; if ((int)maxoutput != loadgenerator.newmaxoutput) { loadgenerator.newmaxoutput = (int)Math.Round(maxoutput); tgenerator.electricAmount = (int)Math.Round(maxoutput); } else { tgenerator.electricAmount = loadgenerator.newmaxoutput; } } } } } // Fuel Generators foreach (var generator in UnityEngine.Object.FindObjectsOfType()) { if (generator != null && generator.OwnerID == player.userID) { string generatorowner = generator.OwnerID.ToString(); if (!generatorowner.IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); // Add new generator if missing if (!_electricianCache.ContainsKey(generator.net.ID.Value)) { if (reset) { generator.outputEnergy = config.electrician.smallgeneratordefault; AddElectricianData(generator.net.ID.Value, "SmallGenerator", config.electrician.smallgeneratordefault, config.electrician.smallgeneratordefault, generator.OwnerID); } else if (xprecord.Electrician < 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; AddElectricianData(generator.net.ID.Value, "SmallGenerator", config.electrician.smallgeneratordefault, config.electrician.smallgeneratordefault, generator.OwnerID); } else if (xprecord.Electrician >= 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; double newmaxenergy = ((config.electrician.smallgeneratormaxincrease * xprecord.Electrician) * config.electrician.smallgeneratordefault) + config.electrician.smallgeneratordefault; AddElectricianData(generator.net.ID.Value, "SmallGenerator", config.electrician.smallgeneratordefault, (int)Math.Round(newmaxenergy), generator.OwnerID); generator.outputEnergy = (int)Math.Round(newmaxenergy); } } // Load generator data if found ElectricianD loadgenerator; if (_electricianCache.TryGetValue(generator.net.ID.Value, out loadgenerator)) { if (reset) { generator.outputEnergy = config.electrician.smallgeneratordefault; loadgenerator.newmaxoutput = config.electrician.smallgeneratordefault; } else if (xprecord.Electrician < 1) { generator.outputEnergy = config.electrician.smallgeneratordefault; loadgenerator.newmaxoutput = config.electrician.smallgeneratordefault; } else if (xprecord.Electrician >= 1) { double maxoutput = ((config.electrician.smallgeneratormaxincrease * xprecord.Electrician) * config.electrician.smallgeneratordefault) + config.electrician.smallgeneratordefault; if ((int)maxoutput != loadgenerator.newmaxoutput) { loadgenerator.newmaxoutput = (int)Math.Round(maxoutput); generator.outputEnergy = (int)Math.Round(maxoutput); } else { generator.outputEnergy = loadgenerator.newmaxoutput; } } } } } } #endregion #region Vehicle / Mount Hooks and Helpers private void OnEntityMounted(BaseMountable entity, BasePlayer player) { if (player == null || entity == null || player.IsNpc || !player.userID.Get().IsSteamId() || entity.GetParentEntity() == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; // Horse var horse = entity.GetParentEntity() as RidableHorse; if (horse != null) { if (_horseCache.ContainsKey(horse.net.ID.Value)) { DefaultHorseData(horse); } if (xprecord.Dexterity >= 1) { player.ChatMessage(XPLang("horsespeedmessage", player.UserIDString)); } } // Boat var boat = entity.GetParentEntity() as BaseBoat; if (boat != null) { AddBoatData(player, boat); if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DashPanel(player, true, entity); } if (xprecord.Dexterity >= 1) { player.ChatMessage(XPLang("boatspeedmessage", player.UserIDString)); } } // Car var car = entity.VehicleParent() as ModularCar; if (car != null) { AddVehicleData(player, car); if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DashPanel(player, true, entity); } if (xprecord.Dexterity >= 1 && config.dexterity.vehiclespeed > 0) { player.ChatMessage(XPLang("vehiclespeedmessage", player.UserIDString)); } } // Mini Copter var mini = entity.VehicleParent() as Minicopter; if (mini != null) { AddMiniCopterData(player, mini); if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DashPanel(player, true, entity); } if (xprecord.Dexterity >= 1 && config.dexterity.vehiclespeed > 0) { player.ChatMessage(XPLang("minispeedmessage", player.UserIDString)); } } // Snow Mobile var snowmob = entity.VehicleParent() as Snowmobile; if (snowmob != null) { AddSnowMobData(player, snowmob); if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DashPanel(player, true, entity); } } } private void OnEntityDismounted(BaseMountable entity, BasePlayer player) { if (entity == null || player == null || player.IsNpc || !player.userID.Get().IsSteamId()) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DestroyUi(player, XPerienceLiveDashPanel); DashPanelTimer?.Destroy(); } // Horses var horse = entity.GetParentEntity() as RidableHorse; if (horse != null && _horseCache.ContainsKey(horse.net.ID.Value)) { Horse defaulthorse; if (_horseCache.TryGetValue(horse.net.ID.Value, out defaulthorse)) { if (horse.IsAlive()) DefaultHorseData(horse); } return; } // Boats var boat = entity.GetParentEntity() as BaseBoat; if (boat != null && _boatCache.ContainsKey(boat.net.ID.Value)) { Boat defaultboat; if (_boatCache.TryGetValue(boat.net.ID.Value, out defaultboat)) { DefaultBoatData(boat); if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DashPanel(player, false, entity); } } return; } // Vehicles var car = entity.VehicleParent() as ModularCar; if (car != null && _vehicleCache.ContainsKey(car.net.ID.Value)) { Vehicle vehicle; if (_vehicleCache.TryGetValue(car.net.ID.Value, out vehicle)) { DefaultVehicleData(car); if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DashPanel(player, false, entity); } } return; } // Mini Copter var mini = entity.VehicleParent() as Minicopter; if (mini != null && _minicopterCache.ContainsKey(mini.net.ID.Value)) { MiniCopterP minicopter; if (_minicopterCache.TryGetValue(mini.net.ID.Value, out minicopter)) { DefaultMiniCopterData(mini); if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DashPanel(player, false, entity); } } } // SnowMobile var snowmob = entity.VehicleParent() as Snowmobile; if (snowmob != null && _snowmobCache.ContainsKey(snowmob.net.ID.Value)) { Snowmob snowmobile; if (_snowmobCache.TryGetValue(snowmob.net.ID.Value, out snowmobile)) { DefaultSnowMobData(snowmob); if (xprecord.dash == 1 && config.defaultOptions.enabledashpanel) { DashPanel(player, false, entity); } } } } private void DefaultHorseData(RidableHorse horse) { Horse defaulthorse; if (_horseCache.TryGetValue(horse.net.ID.Value, out defaulthorse)) { horse.maxSpeed = defaulthorse.maxSpeed; horse.runSpeed = defaulthorse.runSpeed; horse.trotSpeed = defaulthorse.trotSpeed; horse.walkSpeed = defaulthorse.walkSpeed; } _horseCache.Remove(horse.net.ID.Value); } private void DefaultBoatData(BaseBoat boat) { Boat defaultboat; if (_boatCache.TryGetValue(boat.net.ID.Value, out defaultboat)) { boat.engineThrust = defaultboat.defaultSpeed; } _boatCache.Remove(boat.net.ID.Value); } private void DefaultVehicleData(ModularCar car) { Vehicle vehicle; if (_vehicleCache.TryGetValue(car.net.ID.Value, out vehicle)) { car.carSettings.maxDriveSlip = vehicle.maxDriveSlip; car.carSettings.reversePercentSpeed = vehicle.reversePercentSpeed; car.carSettings.driveForceToMaxSlip = vehicle.driveForceToMaxSlip; } _vehicleCache.Remove(car.net.ID.Value); } private void DefaultMiniCopterData(Minicopter mini) { MiniCopterP minicopter; if (_minicopterCache.TryGetValue(mini.net.ID.Value, out minicopter)) { //mini.maxRotorSpeed = minicopter.maxRotorSpeed; } _minicopterCache.Remove(mini.net.ID.Value); } private void DefaultSnowMobData(Snowmobile snowmob) { Snowmob snowmobile; if (_snowmobCache.TryGetValue(snowmob.net.ID.Value, out snowmobile)) { snowmob.engineKW = (int)snowmobile.engineKW; snowmob.badTerrainDrag = snowmobile.terrain; } _snowmobCache.Remove(snowmob.net.ID.Value); } private void ChangeHorseSpeed(BasePlayer player) { if (player == null) return; var horse = player.GetMountedVehicle() as RidableHorse; if (horse == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.Dexterity >= 1) { if (_horseCache.ContainsKey(horse.net.ID.Value)) { DefaultHorseData(horse); player.ChatMessage(XPLang("horsespeedoff", player.UserIDString)); } else { AddHorseData(player, horse); var increase = (float)(xprecord.Dexterity * config.dexterity.horsespeed); horse.maxSpeed += increase * horse.maxSpeed; horse.runSpeed += increase * horse.runSpeed; horse.trotSpeed += increase * horse.trotSpeed; horse.walkSpeed += increase * horse.walkSpeed; player.ChatMessage(XPLang("horsespeedon", player.UserIDString)); } } } private void ChangeBoatSpeed(BasePlayer player) { if (player == null) return; var boat = player.GetMountedVehicle() as BaseBoat; if (boat == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.Dexterity >= 1) { Boat boatdata; if (_boatCache.TryGetValue(boat.net.ID.Value, out boatdata)) { if (boatdata.player == player.userID) { DefaultBoatData(boat); player.ChatMessage(XPLang("boatspeedoff", player.UserIDString)); } } else { AddBoatData(player, boat); var increase = (float)(xprecord.Dexterity * config.dexterity.boatspeed); boat.engineThrust += increase * boat.engineThrust; player.ChatMessage(XPLang("boatspeedon", player.UserIDString)); } } } private void ChangeVehicleSpeed(BasePlayer player) { if (player == null) return; var car = player.GetMountedVehicle() as ModularCar; if (car == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.Dexterity >= 1 && config.dexterity.vehiclespeed > 0) { Vehicle vehicle; if (_vehicleCache.TryGetValue(car.net.ID.Value, out vehicle)) { if (vehicle.player == player.userID) { DefaultVehicleData(car); player.ChatMessage(XPLang("vehiclespeedoff", player.UserIDString)); } } else { AddVehicleData(player, car); double increase = config.dexterity.vehiclespeed * xprecord.Dexterity; car.GetMaxForwardSpeed(); car.carSettings.maxDriveSlip -= (float)(increase * car.carSettings.maxDriveSlip); car.carSettings.reversePercentSpeed += (float)(increase * car.carSettings.reversePercentSpeed); car.carSettings.driveForceToMaxSlip += (float)(increase * car.carSettings.driveForceToMaxSlip); player.ChatMessage(XPLang("vehiclespeedon", player.UserIDString)); } } } private void ChangeMiniCopterSpeed(BasePlayer player) { if (player == null) return; var mini = player.GetMountedVehicle() as Minicopter; if (mini == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.Dexterity >= 1) { MiniCopterP minicopter; if (_minicopterCache.TryGetValue(mini.net.ID.Value, out minicopter)) { if (minicopter.player == player.userID) { DefaultMiniCopterData(mini); player.ChatMessage(XPLang("minispeedoff", player.UserIDString)); } } else { AddMiniCopterData(player, mini); double increase = config.dexterity.vehiclespeed * xprecord.Dexterity; //mini.maxRotorSpeed += (float)(increase * mini.maxRotorSpeed); player.ChatMessage(XPLang("minispeedon", player.UserIDString)); } } } private void ChangeSnowMobSpeed(BasePlayer player) { if (player == null) return; var snowmob = player.GetMountedVehicle() as Snowmobile; if (snowmob == null) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; if (xprecord.Dexterity >= 1 && config.dexterity.vehiclespeed > 0) { Snowmob snowmobile; if (_snowmobCache.TryGetValue(snowmob.net.ID.Value, out snowmobile)) { if (snowmobile.player == player.userID) { DefaultSnowMobData(snowmob); player.ChatMessage(XPLang("vehiclespeedoff", player.UserIDString)); } } else { AddSnowMobData(player, snowmob); double speedincrease = (config.dexterity.vehiclespeed * snowmob.engineKW) * xprecord.Dexterity; double terrainincrease = (config.dexterity.vehiclespeed * snowmob.badTerrainDrag) * xprecord.Dexterity; snowmob.engineKW += (int)speedincrease; snowmob.badTerrainDrag += (float)terrainincrease; player.ChatMessage(XPLang("vehiclespeedon", player.UserIDString)); } } } private int GetFuel(BaseMountable entity) { int fuel = -1; if (entity == null) return fuel; // Boat var boat = entity?.GetParentEntity() as BaseBoat; if (boat != null) { fuel = boat?.GetFuelSystem()?.GetFuelAmount() ?? 0; } // Car var car = entity?.VehicleParent() as ModularCar; if (car != null) { fuel = car?.GetFuelSystem()?.GetFuelAmount() ?? 0; } // Mini var mini = entity?.VehicleParent() as Minicopter; if (mini != null) { fuel = mini?.GetFuelSystem()?.GetFuelAmount() ?? 0; } // Snowmobile var snowmob = entity.VehicleParent() as Snowmobile; if (snowmob != null) { fuel = snowmob?.GetFuelSystem()?.GetFuelAmount() ?? 0; } // Return Fuel if (fuel > 500) { fuel = 500; } return fuel; } private string GetSpeed(BasePlayer player, BaseMountable entity) { string speedometer = ""; if (player == null || entity == null) return speedometer; // Boat var boat = entity?.GetParentEntity() as BaseBoat; if (boat != null) { speedometer = $"{(int)boat.engineThrust} ≜"; } // Modular Car var car = entity?.VehicleParent() as ModularCar; if (car != null) { int speed = (int)car.GetSpeed() * 2; XPRecord xprecord = GetXPRecord(player); switch (xprecord.speedometertype) { case 1: speedometer = $"{speed} MPH"; break; case 2: speedometer = $"{(int)Math.Ceiling(speed * 1.609344)} KMH"; break; } } // Minicopter var mini = entity?.VehicleParent() as Minicopter; if (mini != null) { //speedometer = $"{(int)mini.maxRotorSpeed}"; } // Snowmobile var snowmob = entity.VehicleParent() as Snowmobile; if (snowmob != null) { speedometer = $"{(int)snowmob.engineKW} KW"; } // Return Results return speedometer; } private object CanUseFuel(EntityFuelSystem fuelSystem) { // Boat var boat = fuelSystem.GetFuelContainer().GetParentEntity() as BaseBoat; if (boat != null) { Boat boatdata; if (_boatCache.TryGetValue(boat.net.ID.Value, out boatdata)) { var player = FindPlayer(boatdata.player.ToString()); if (player == null) return null; if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return null; if (xprecord.Dexterity >= 1) { var chance = (config.dexterity.fuelreduce * xprecord.Dexterity) * 100; if ((Random.Range(0, 101) <= chance) == true) { return 0; } } } } // Car var car = fuelSystem.GetFuelContainer().GetParentEntity() as ModularCar; if (car != null) { Vehicle vehicle; if (_vehicleCache.TryGetValue(car.net.ID.Value, out vehicle)) { var player = FindPlayer(vehicle.player.ToString()); if (player == null) return null; if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return null; if (xprecord.Dexterity >= 1) { var chance = (config.dexterity.fuelreduce * xprecord.Dexterity) * 100; if ((Random.Range(0, 101) <= chance) == true) { return 0; } } } } // MiniCopterP var mini = fuelSystem.GetFuelContainer().GetParentEntity() as Minicopter; if (mini != null) { MiniCopterP minicopter; if (_minicopterCache.TryGetValue(mini.net.ID.Value, out minicopter)) { var player = FindPlayer(minicopter.player.ToString()); if (player == null) return null; if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return null; if (xprecord.Dexterity >= 1) { var chance = (config.dexterity.fuelreduce * xprecord.Dexterity) * 100; if ((Random.Range(0, 101) <= chance) == true) { return 0; } } } } // SnowMobile var snowmob = fuelSystem.GetFuelContainer().GetParentEntity() as Snowmobile; if (snowmob != null) { Snowmob snowmobile; if (_snowmobCache.TryGetValue(snowmob.net.ID.Value, out snowmobile)) { var player = FindPlayer(snowmobile.player.ToString()); if (player == null) return null; if (CheckPlayerLocation(player, "disableabilities")) return null; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return null; if (xprecord.Dexterity >= 1) { var chance = (config.dexterity.fuelreduce * xprecord.Dexterity) * 100; if ((Random.Range(0, 101) <= chance) == true) { return 0; } } } } // Return Default return null; } #endregion #region Chat Commands // Chat Commands #region Chat Commands private void Openhelp(BasePlayer player, string command, string[] args) { if (player == null) return; ClearPlayerUIs(player, true); PlayerProfile(player); PlayerHelp(player); } private void Openplayerstats(BasePlayer player, string command, string[] args) { if (args.Length == 0) { ClearPlayerUIs(player, true); PlayerProfile(player); PlayerProfileMain(player); if (XPerienceAddon != null) { XPerienceAddon?.Call("ClearNotify", player); } } else { if (config.defaultOptions.allowplayersearch || (!config.defaultOptions.allowplayersearch && player.IsAdmin && permission.UserHasPermission(player.UserIDString, XPerience.Admin))) { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[0].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("playernotfound", player.UserIDString, args[0])); return; } var otherplayer = FindPlayer(user.Value.id); ClearPlayerUIs(player, true); if (XPerienceAddon != null) { XPerienceAddon?.Call("ClearNotify", player); } if (otherplayer == null) { player.ChatMessage(XPLang("playernotfound", player.UserIDString, args[0])); return; } PlayerProfile(player, otherplayer); PlayerProfileMain(player, otherplayer); } else { player.ChatMessage(XPLang("playersearchdisabled", player.UserIDString)); } } } private void Showplayerstatschat(BasePlayer player, string command, string[] args) { if (player == null) return; PlayerStatsChat(player); } private void Opentopplayers(BasePlayer player, string command, string[] args) { if (player == null) return; if (config.defaultOptions.allowplayersearch || (!config.defaultOptions.allowplayersearch && player.IsAdmin && permission.UserHasPermission(player.UserIDString, XPerience.Admin))) { ClearPlayerUIs(player, true); PlayerProfile(player); PlayerTopList(player, 1, "basicexperience", 0); return; } else { player.ChatMessage(XPLang("playersearchdisabled", player.UserIDString)); } } private void Playeraddstat(BasePlayer player, string command, string[] args) { if (args.Length == 0) { return; } StatUp(player, args[0].ToLower()); } private void Playeraddskill(BasePlayer player, string command, string[] args) { if (args.Length == 0) { return; } SkillUp(player, args[0].ToLower()); } private void Playerresetstats(BasePlayer player, string command, string[] args) { if (config.defaultOptions.hardcorenoreset) { player.ChatMessage(XPLang("hardcorenoreset", player.UserIDString)); return; } StatsResetAll(player); } private void Playerresetskills(BasePlayer player, string command, string[] args) { if (config.defaultOptions.hardcorenoreset) { player.ChatMessage(XPLang("hardcorenoreset", player.UserIDString)); return; } SkillsResetAll(player); } private void Playerresetall(BasePlayer player, string command, string[] args) { if (!config.defaultOptions.allowplayerreset) { player.ChatMessage(XPLang("playerresetdisabled", player.UserIDString)); return; } PlayerReset(player); } private void Playerliveuichange(BasePlayer player, string command, string[] args) { if (!config.defaultOptions.liveuistatslocationmoveable) return; if (args.Length == 0) { player.ChatMessage(XPLang("liveuilocation", player.UserIDString, _xperienceCache[player.UserIDString].UILocation)); return; } var cmdArg = args[0].ToLower(); switch (cmdArg) { case "0": _xperienceCache[player.UserIDString].UILocation = 0; player.ChatMessage(XPLang("liveuilocationoff", player.UserIDString, cmdArg)); LiveStats(player); break; case "1": _xperienceCache[player.UserIDString].UILocation = 1; player.ChatMessage(XPLang("liveuilocation", player.UserIDString, cmdArg)); LiveStats(player); break; case "2": _xperienceCache[player.UserIDString].UILocation = 2; player.ChatMessage(XPLang("liveuilocation", player.UserIDString, cmdArg)); LiveStats(player); break; case "3": _xperienceCache[player.UserIDString].UILocation = 3; player.ChatMessage(XPLang("liveuilocation", player.UserIDString, cmdArg)); LiveStats(player); break; case "4": _xperienceCache[player.UserIDString].UILocation = 4; player.ChatMessage(XPLang("liveuilocation", player.UserIDString, cmdArg)); LiveStats(player); break; case "5": _xperienceCache[player.UserIDString].UILocation = 5; player.ChatMessage(XPLang("liveuilocation", player.UserIDString, cmdArg)); LiveStats(player); break; default: player.ChatMessage(XPLang("liveuilocationhelp", player.UserIDString, _xperienceCache[player.UserIDString].UILocation)); break; } } #endregion // Admin Commands #region Admin Commands private void Adminitemchange(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; var item = player.GetActiveItem(); if (args.Length == 0 || args.Length == 1) { player.ChatMessage(XPLang("adminitemchangerequirement", player.UserIDString, item.info.displayName.english, item.condition, item._maxCondition, config.adminchatCommands.adminitemchange)); return; } float condition = float.Parse(args[0]); float maxcondition = float.Parse(args[1]); item.condition = condition; item._maxCondition = maxcondition; player.ChatMessage(XPLang("adminitemchange", player.UserIDString, item.info.displayName.english, condition, maxcondition)); } private void Showadminhelp(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; player.ChatMessage(XPLang("xphelpadmin", player.UserIDString, config.adminchatCommands.openadminpanel, config.adminchatCommands.adminresetxperience, config.adminchatCommands.adminresetplayer, config.adminchatCommands.adminxpgive, config.adminchatCommands.adminxptake, config.adminchatCommands.adminitemchange)); } public void Openadminpanel(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; DestroyUi(player, XPeriencePlayerProfile); DestroyUi(player, XPerienceAdminPanelMain); if (XPerienceAddon != null) { XPerienceAddon?.Call("ClearNotify", player); } AdminControlPanel(player); AdminInfoPage(player); } private void Adminresetxperience(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; _xperienceCache.Clear(); _lootCache.Clear(); _XPerienceData.Clear(); _LootContainData.Clear(); _corpseCache.Clear(); _CorpseContainData.Clear(); if (config.sql.enablesql) { DeleteSQL(); } player.ChatMessage(XPLang("resetxperience", player.UserIDString)); Interface.Oxide.ReloadPlugin("XPerience"); } private void Adminxpgive(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xpgiveneedtype", player.UserIDString)); return; } if (args.Length == 1) { player.ChatMessage(XPLang("xpgiveneedname", player.UserIDString)); return; } if (args.Length == 2) { player.ChatMessage(XPLang("xpgiveneedamount", player.UserIDString)); return; } var type = args[0].ToLower(); if (type == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpgivenotfound", player.UserIDString)); return; } double amount = Convert.ToDouble(args[2]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord != null) { GainExpAdmin(selectplayer, amount); player.ChatMessage(XPLang("xpgiveplayer", player.UserIDString, user.Value.displayname, amount, xprecord.experience)); } else { XPRecord vxprecord = GetPlayerRecord(user.Value.id); GainExpAdminFix(user.Value.id, amount); player.ChatMessage(XPLang("xpgiveplayer", player.UserIDString, user.Value.displayname, amount, vxprecord.experience)); } } if (type == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpgivenotfound", player.UserIDString)); return; } double amount = Convert.ToDouble(args[2]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord != null) { GainExpAdmin(selectplayer, amount); player.ChatMessage(XPLang("xpgiveplayer", player.UserIDString, user.Value.displayname, amount, xprecord.experience)); } else { XPRecord vxprecord = GetPlayerRecord(user.Value.id); GainExpAdminFix(user.Value.id, amount); player.ChatMessage(XPLang("xpgiveplayer", player.UserIDString, user.Value.displayname, amount, vxprecord.experience)); } } } private void Adminpointsgive(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("pointsgiveneedtype", player.UserIDString)); return; } if (args.Length == 1) { player.ChatMessage(XPLang("pointsgiveneedtype", player.UserIDString)); return; } if (args.Length == 2) { player.ChatMessage(XPLang("pointsgiveneedname", player.UserIDString)); return; } if (args.Length == 3) { player.ChatMessage(XPLang("pointsgiveneedamount", player.UserIDString)); return; } var type1 = args[0].ToLower(); var type2 = args[1].ToLower(); int totalpoints = 0; if (type2 == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[2].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpgivenotfound", player.UserIDString)); return; } int amount = Convert.ToInt32(args[3]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord != null) { switch (type1) { case "stat": totalpoints = xprecord.statpoint + amount; break; case "skill": totalpoints = xprecord.skillpoint + amount; break; } GivePoints(selectplayer, type1, amount); player.ChatMessage(XPLang("pointsgiveplayer", player.UserIDString, user.Value.displayname, amount, type1, totalpoints)); } else { XPRecord vxprecord = GetPlayerRecord(user.Value.id); switch (type1) { case "stat": totalpoints = vxprecord.statpoint + amount; break; case "skill": totalpoints = vxprecord.skillpoint + amount; break; } GivePointsOther(user.Value.id, type1, amount); player.ChatMessage(XPLang("pointsgiveplayer", player.UserIDString, user.Value.displayname, amount, type1, totalpoints)); } } if (type2 == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(args[2].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpgivenotfound", player.UserIDString)); return; } int amount = Convert.ToInt32(args[3]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord != null) { switch (type1) { case "stat": totalpoints = xprecord.statpoint + amount; break; case "skill": totalpoints = xprecord.skillpoint + amount; break; } GivePoints(selectplayer, type1, amount); player.ChatMessage(XPLang("pointsgiveplayer", player.UserIDString, user.Value.displayname, amount, type1, totalpoints)); } else { XPRecord vxprecord = GetPlayerRecord(user.Value.id); switch (type1) { case "stat": totalpoints = vxprecord.statpoint + amount; break; case "skill": totalpoints = vxprecord.skillpoint + amount; break; } GivePointsOther(user.Value.id, type1, amount); player.ChatMessage(XPLang("pointsgiveplayer", player.UserIDString, user.Value.displayname, amount, type1, totalpoints)); } } } private void Adminxpgiveall(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xpgiveneedamount", player.UserIDString)); return; } double amount = Convert.ToDouble(args[0]); foreach (var allplayer in BasePlayer.allPlayerList) { GainExpAdmin(allplayer, amount); } player.ChatMessage(XPLang("xpgiveall", player.UserIDString, amount)); } private void Adminxptake(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xptakeneedtype", player.UserIDString)); return; } if (args.Length == 1) { player.ChatMessage(XPLang("xptakeneedname", player.UserIDString)); return; } if (args.Length == 2) { player.ChatMessage(XPLang("xptakeneedamount", player.UserIDString)); return; } var type = args[0].ToLower(); if (type == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xptakenotfound", player.UserIDString)); return; } double amount = Convert.ToDouble(args[2]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); LoseExpAdmin(selectplayer, amount); player.ChatMessage(XPLang("xptakeplayer", player.UserIDString, amount, user.Value.displayname, xprecord.experience)); } if (type == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xptakenotfound", player.UserIDString)); return; } double amount = Convert.ToDouble(args[2]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); LoseExpAdmin(selectplayer, amount); player.ChatMessage(XPLang("xptakeplayer", player.UserIDString, amount, user.Value.displayname, xprecord.experience)); } } private void Adminfixdata(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; PlayerFixDataAll(player); } private void Adminxpresetplayer(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xpresetneedtype", player.UserIDString)); return; } if (args.Length == 1) { player.ChatMessage(XPLang("xpresetneedname", player.UserIDString)); return; } var type = args[0].ToLower(); if (type == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpresetnotfound", player.UserIDString)); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SelectedPlayerReset(player, selectplayer); } if (type == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpresetnotfound", player.UserIDString)); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SelectedPlayerReset(player, selectplayer); } } private void AdminHarvestReset(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xpresetneedname", player.UserIDString)); return; } var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[0].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpresetnotfound", player.UserIDString)); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SelectedHarvestReset(player, selectplayer); } private void AdminLevelReset(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xpresetneedname", player.UserIDString)); return; } var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[0].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpresetnotfound", player.UserIDString)); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SelectedLevelReset(player, selectplayer); } private void AdminRankReset(BasePlayer player, string command, string[] args) { if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xpresetneedname", player.UserIDString)); return; } var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[0].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpresetnotfound", player.UserIDString)); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SelectedRankReset(player, selectplayer); } private void AdminStatReset(BasePlayer player, string command, string[] args) { if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xpresetneedname", player.UserIDString)); return; } var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[0].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpresetnotfound", player.UserIDString)); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); StatReset(selectplayer, args[0], true); } private void AdminSkillReset(BasePlayer player, string command, string[] args) { if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args.Length == 0) { player.ChatMessage(XPLang("xpresetneedname", player.UserIDString)); return; } var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[0].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpresetnotfound", player.UserIDString)); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SkillReset(selectplayer, args[0], true); } private void AdminLevelResetAll(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; PlayerAllLevelReset(player); } private void AdminRankResetAll(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; PlayerAllRankReset(player); } private void AdminExcludePlayer(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (args == null || args.Length < 3) { player.ChatMessage("Incorrect Command, Use: xpexcludeplayer "); return; } if (args[0].ToLower() == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage("Player name not found"); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (args[2].ToLower() == "true") { xprecord.exclude = true; player.ChatMessage($"Player [{selectplayer.displayName}|{selectplayer.UserIDString}] has been excluded from RustLevels"); } if (args[2].ToLower() == "false") { xprecord.exclude = false; player.ChatMessage($"Player [{selectplayer.displayName}|{selectplayer.UserIDString}] has been included at RustLevels"); } } if (args[0].ToLower() == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage("Player id not found"); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (args[2].ToLower() == "true") { xprecord.exclude = true; player.ChatMessage($"Player [{selectplayer.displayName}|{selectplayer.UserIDString}] has been excluded from RustLevels"); } if (args[2].ToLower() == "false") { xprecord.exclude = false; player.ChatMessage($"Player [{selectplayer.displayName}|{selectplayer.UserIDString}] has been included at RustLevels"); } } } private void AdminGiveItem(BasePlayer player, string command, string[] args) { if (!player.IsAdmin || !permission.UserHasPermission(player.UserIDString, Admin)) return; if (XPerienceAddon != null) { if (args == null || args.Length < 4) { player.ChatMessage($"Invalid command. Use /{config.adminchatCommands.admingiveitem} \"\" "); return; } var type = args[0].ToLower(); string item = String.Concat(args[2].ToLower().Where(c => !Char.IsWhiteSpace(c))); //string item = args[2].ToLower(); int amount = Convert.ToInt32(args[3]); if (type == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpgivenotfound", player.UserIDString)); return; } var itemplayer = FindPlayer(user.Value.id); XPerienceAddon?.Call("SpecialDrops", itemplayer, item, amount); } if (type == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(args[1].ToLower())); if (user.Value == null) { player.ChatMessage(XPLang("xpgivenotfound", player.UserIDString)); return; } var itemplayer = FindPlayer(user.Value.id); XPerienceAddon?.Call("SpecialDrops", itemplayer, item, amount); } } } #endregion #endregion #region Console Commands // Check Permission private bool CanUseConsole(ConsoleSystem.Arg arg) { if (arg.Connection != null) { if (arg.Connection.authLevel < 1) { SendReply(arg, "You do not have permission to use this command."); return false; } } return true; } // Reset XPerience [ConsoleCommand("xpresetall")] private void Consolereset(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; _xperienceCache.Clear(); _lootCache.Clear(); _XPerienceData.Clear(); _LootContainData.Clear(); _corpseCache.Clear(); _CorpseContainData.Clear(); if (config.sql.enablesql) { DeleteSQL(); } SendReply(arg, "All player data has been wiped for XPerience... Reloading..."); Interface.Oxide.ReloadPlugin("XPerience"); } // Reset Daily XP All [ConsoleCommand("xpdailyreset")] private void Consoleresetdailyxptimer(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; DailyLimit(true); SendReply(arg, "Daily limits have been reset for all players."); } // Reset Daily XP Player [ConsoleCommand("xpdailyresetplayer")] private void Consoleresetdailyxpplayer(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; if (arg.Args == null || arg.Args.Length < 1) { SendReply(arg, "Incorrect Command, Use: xpdailyresetplayer "); return; } var player = FindPlayer(arg.Args[0].ToLower()); if (player == null) { SendReply(arg, $"Player not found with ID: {arg.Args[0].ToLower()}"); return; } DailyLimitPlayer(player, true); SendReply(arg, $"Daily limit has been reset for {player.displayName}."); } // Reset Player [ConsoleCommand("xpexcludeplayer")] private void Consoleexcludeplayer(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; if (arg.Args == null || arg.Args.Length < 3) { SendReply(arg, "Incorrect Command, Use: xpexcludeplayer "); return; } if (arg.Args[0].ToLower() == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player name not found"); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (arg.Args[2].ToLower() == "true") { xprecord.exclude = true; SendReply(arg, $"Player [{selectplayer.displayName}|{selectplayer.UserIDString}] has been excluded from RustLevels"); } if (arg.Args[2].ToLower() == "false") { xprecord.exclude = false; SendReply(arg, $"Player [{selectplayer.displayName}|{selectplayer.UserIDString}] has been included at RustLevels"); } } if (arg.Args[0].ToLower() == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player id not found"); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (arg.Args[2].ToLower() == "true") { xprecord.exclude = true; SendReply(arg, $"Player [{selectplayer.displayName}|{selectplayer.UserIDString}] has been excluded from RustLevels"); } if (arg.Args[2].ToLower() == "false") { xprecord.exclude = false; SendReply(arg, $"Player [{selectplayer.displayName}|{selectplayer.UserIDString}] has been included at RustLevels"); } } } // Reset Player [ConsoleCommand("xpresetplayer")] private void Consoleresetplayer(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; if (arg.Args == null || arg.Args.Length < 2) { SendReply(arg, $"Incorrect Command, Use: {config.adminchatCommands.adminresetplayer} "); return; } if (arg.Args[0].ToLower() == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player name not found"); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SelectedPlayerResetConsole(selectplayer); } if (arg.Args[0].ToLower() == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player id not found"); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SelectedPlayerResetConsole(selectplayer); } } // Reset Player Stat [ConsoleCommand("xpresetstat")] private void Consoleresetstat(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; if (arg.Args == null || arg.Args.Length < 2) { SendReply(arg, $"Incorrect Command, Use: {config.adminchatCommands.adminresetstat} "); return; } var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(arg.Args[0].ToLower())); if (user.Value == null) { SendReply(arg, "Player name not found"); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); StatReset(selectplayer, arg.Args[1], true); } // Reset Player Skill [ConsoleCommand("xpresetskill")] private void Consoleresetskill(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; if (arg.Args == null || arg.Args.Length < 2) { SendReply(arg, $"Incorrect Command, Use: {config.adminchatCommands.adminresetskill} "); return; } var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(arg.Args[0].ToLower())); if (user.Value == null) { SendReply(arg, "Player name not found"); return; } var selectplayer = FindPlayer(user.Value.id.ToString()); SkillReset(selectplayer, arg.Args[1], true); } // Give XP [ConsoleCommand("xpgive")] private void Consolegivexp(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; if (arg.Args == null || arg.Args.Length < 3) { SendReply(arg, "Incorrect Command, Use: xpgive "); return; } if (arg.Args[0].ToLower() == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player name not found"); return; } double amount = Convert.ToDouble(arg.Args[2]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord != null) { GainExpAdmin(selectplayer, amount); SendReply(arg, $"{amount} XP has been given to {user.Value.displayname}. They now have a total of {xprecord.experience} XP"); } else { XPRecord vxprecord = GetPlayerRecord(user.Value.id); GainExpAdminFix(user.Value.id, amount); SendReply(arg, $"{amount} XP has been given to {user.Value.displayname}. They now have a total of {vxprecord.experience} XP"); } } if (arg.Args[0].ToLower() == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player id not found"); return; } double amount = Convert.ToDouble(arg.Args[2]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord != null) { GainExpAdmin(selectplayer, amount); SendReply(arg, $"{amount} XP has been given to {user.Value.displayname}. They now have a total of {xprecord.experience} XP"); } else { XPRecord vxprecord = GetPlayerRecord(user.Value.id); GainExpAdminFix(user.Value.id, amount); SendReply(arg, $"{amount} XP has been given to {user.Value.displayname}. They now have a total of {vxprecord.experience} XP"); } } } // Take XP [ConsoleCommand("xptake")] private void Consoletakexp(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; if (arg.Args == null || arg.Args.Length < 3) { SendReply(arg, "Incorrect Command, Use: xptake "); return; } if (arg.Args[0].ToLower() == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player name not found"); return; } double amount = Convert.ToDouble(arg.Args[2]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord != null) { LoseExpAdmin(selectplayer, amount); SendReply(arg, $"{amount} XP has been taken from {user.Value.displayname}. They now have a total of {xprecord.experience} XP"); } } if (arg.Args[0].ToLower() == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player id not found"); return; } double amount = Convert.ToDouble(arg.Args[2]); var selectplayer = FindPlayer(user.Value.id.ToString()); XPRecord xprecord = GetXPRecord(selectplayer); if (xprecord != null) { LoseExpAdmin(selectplayer, amount); SendReply(arg, $"{amount} XP has been taken from {user.Value.displayname}. They now have a total of {xprecord.experience} XP"); } } } // XP Item [ConsoleCommand("xpitem")] private void Consolexpitem(ConsoleSystem.Arg arg) { if (!CanUseConsole(arg)) return; if (XPerienceAddon != null) { if (arg.Args == null || arg.Args.Length < 4) { SendReply(arg, $"Incorrect Command, Use: {config.adminchatCommands.admingiveitem} \"\" "); return; } var type = arg.Args[0].ToLower(); string item = String.Concat(arg.Args[2].ToLower().Where(c => !Char.IsWhiteSpace(c))); //string item = arg.Args[2].ToLower(); int amount = Convert.ToInt32(arg.Args[3]); if (type == "name") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.displayname.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player name not found"); return; } var itemplayer = FindPlayer(user.Value.id); XPerienceAddon?.Call("SpecialDrops", itemplayer, item, amount); SendReply(arg, $"{amount} - {item} have been given to {itemplayer.displayName}"); } if (type == "id") { var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(arg.Args[1].ToLower())); if (user.Value == null) { SendReply(arg, "Player id not found"); return; } var itemplayer = FindPlayer(user.Value.id); XPerienceAddon?.Call("SpecialDrops", itemplayer, item, amount); SendReply(arg, $"{amount} - {item} have been given to {itemplayer.displayName}"); } } } #endregion #region UI Constants // Live Stats private const string XPerienceLivePrimary = "XPerienceLivePrimary"; private const string XPerienceLiveIcon = "XPerienceLiveIcon"; private const string XPerienceLiveData = "XPerienceLiveData"; private const string XPerienceLiveFuel = "XPerienceLiveFuel"; private const string XPerienceLiveFuelBar = "XPerienceLiveFuelBar"; private const string XPerienceLiveSpeed = "XPerienceLiveSpeed"; private const string XPerienceLiveSpeedIcon = "XPerienceLiveSpeedIcon"; private const string XPerienceLiveSpeedBar = "XPerienceLiveSpeedBar"; private const string XPerienceLiveDashPanel = "XPerienceLiveDashPanel"; private const string XPerienceLiveDashPanelSet = "XPerienceLiveDashPanelSet"; // Player UI private const string XPeriencePlayerProfileOutside = "XPeriencePlayerProfileOutside"; private const string XPeriencePlayerProfile = "XPeriencePlayerProfile"; private const string XPeriencePlayerProfileMenu = "XPeriencePlayerProfileMenu"; private const string XPeriencePlayerProfileMain = "XPeriencePlayerProfileMain"; private const string XPeriencePlayerProfileStatsAndSkills = "XPeriencePlayerProfileStatsAndSkills"; private const string XPeriencePlayerProfileStatsAndSkillsMenu = "XPeriencePlayerProfileStatsAndSkillsMenu"; private const string XPeriencePlayerProfileSettings = "XPeriencePlayerProfileSettings"; private const string XPeriencePlayerProfileKills = "XPeriencePlayerProfileKills"; private const string XPeriencePlayerProfileKillsPages = "XPeriencePlayerProfileKillsPages"; private const string XPeriencePlayerProfileRaids = "XPeriencePlayerProfileRaids"; private const string XPeriencePlayerProfileRaidsPages = "XPeriencePlayerProfileRaidsPages"; private const string XPeriencePlayerProfileHelp = "XPeriencePlayerProfileHelp"; private const string XPeriencePlayerProfileHelpPages = "XPeriencePlayerProfileHelpPages"; private const string XPeriencePlayerControlPromptBox = "XPeriencePlayerControlPromptBox"; private const string XPeriencePlayerControlPrompt = "XPeriencePlayerControlPrompt"; private const string XPeriencePlayerDMGSkins = "XPeriencePlayerDMGSkins"; private const string XPeriencePlayerBGImgs = "XPeriencePlayerBGImgs"; private const string XPeriencePlayerCalculations = "XPeriencePlayerCalculations"; private const string XPeriencePlayerCalculationsLevelSelection = "XPeriencePlayerCalculationsLevelSelection"; private const string XPeriencePlayerCalculationsRanksSelection = "XPeriencePlayerCalculationsRanksSelection"; // Top List UI private const string XPerienceTopSelection = "XPerienceTopSelection"; private const string XPerienceTopInner = "XPerienceTopInner"; private const string XPerienceTopPageSelection = "XPerienceTopPageSelection"; // Admin Panels private const string XPerienceAdminPanelMain = "XPerienceAdminPanelMain"; private const string XPerienceAdminPanelMenu = "XPerienceAdminPanelMenu"; private const string XPerienceAdminPanelInfo = "XPerienceAdminPanelInfo"; private const string XPerienceAdminPanelLevelXP = "XPerienceAdminPanelLevelXP"; private const string XPerienceAdminPanelRanks = "XPerienceAdminPanelRanks"; private const string XPerienceAdminPanelStats = "XPerienceAdminPanelStats"; private const string XPerienceAdminPanelSkills = "XPerienceAdminPanelSkills"; private const string XPerienceAdminPanelSkillItems = "XPerienceAdminPanelSkillItems"; private const string XPerienceAdminPanelTimerColor = "XPerienceAdminPanelTimerColor"; private const string XPerienceAdminPanelOtherMods = "XPerienceAdminPanelOtherMods"; private const string XPerienceAdminPanelSQL = "XPerienceAdminPanelSQL"; private const string XPerienceAdminPanelReset = "XPerienceAdminPanelReset"; private const string XPerienceAdminPanelInfoBox = "XPerienceAdminPanelInfoBox"; private const string XPerienceAdminPanelAddon = "XPerienceAdminPanelAddon"; private const string XPerienceAdminPanelDailyLimits = "XPerienceAdminPanelDailyLimits"; private const string XPerienceAdminPanelSoundEffects = "XPerienceAdminPanelSoundEffects"; private const string XPerienceAdminPanelElectricianSettings = "XPerienceAdminPanelElectricianSettings"; private const string XPerienceAdminPanelProfileBackgrounds = "XPerienceAdminPanelProfileBackgrounds"; private const string XPerienceAdminPanelImages = "XPerienceAdminPanelImages"; private const string XPerienceAdminPanelSpecialGroups = "XPerienceAdminPanelSpecialGroups"; private const string XPerienceAdminPanelBackpackSelection = "XPerienceAdminPanelBackpackSelection"; // Images private const string XPerienceicon = "XPerienceicon"; private const string XPeriencelogo = "XPeriencelogo"; private const string XPeriencementality = "XPeriencementality"; private const string XPeriencedexterity = "XPeriencedexterity"; private const string XPeriencemight = "XPeriencemight"; private const string XPeriencecaptaincy = "XPeriencecaptaincy"; private const string XPerienceweaponry = "XPerienceweaponry"; private const string XPerienceninjary = "XPerienceninjary"; private const string XPeriencewoodcutter = "XPeriencewoodcutter"; private const string XPeriencesmithy = "XPeriencesmithy"; private const string XPerienceminer = "XPerienceminer"; private const string XPerienceforager = "XPerienceforager"; private const string XPeriencehunter = "XPeriencehunter"; private const string XPeriencefisher = "XPeriencefisher"; private const string XPeriencecrafter = "XPeriencecrafter"; private const string XPerienceframer = "XPerienceframer"; private const string XPeriencemedic = "XPeriencemedic"; private const string XPeriencescavenger = "XPeriencescavenger"; private const string XPerienceelectrician = "XPerienceelectrician"; private const string XPeriencedemolitionist = "XPeriencedemolitionist"; private const string XPeriencetamer = "XPeriencetamer"; private const string XPeriencechicken = "XPeriencechicken"; private const string XPerienceboar = "XPerienceboar"; private const string XPeriencestag = "XPeriencestag"; private const string XPeriencewolf = "XPeriencewolf"; private const string XPeriencebear = "XPeriencebear"; private const string XPeriencepolarbear = "XPeriencepolarbear"; private const string XPeriencearchery = "XPeriencearchery"; private const string XPeriencewizardry = "XPeriencewizardry"; private const string XPerienceonline = "XPerienceonline"; private const string XPerienceoffline = "XPerienceoffline"; private const string XPeriencebackpack = "XPeriencebackpack"; private const string XPeriencelevel = "XPeriencelevel"; private const string XPeriencexp = "XPeriencexp"; private const string XPeriencearmor = "XPeriencearmor"; private const string XPeriencelevel0 = "XPeriencelevel0"; private const string XPeriencelevel2 = "XPeriencelevel2"; private const string XPeriencelevel4 = "XPeriencelevel4"; private const string XPeriencelevel6 = "XPeriencelevel6"; private const string XPeriencelevel8 = "XPeriencelevel8"; private const string XPeriencelevel10 = "XPeriencelevel10"; private const string XPeriencefuelguage = "XPeriencefuelguage"; private const string XPeriencespeedometer = "XPeriencespeedometer"; private const string XPeriencedash = "XPeriencedash"; private const string XPerienceraideasy = "XPerienceraideasy"; private const string XPerienceraidmedium = "XPerienceraidmedium"; private const string XPerienceraidhard = "XPerienceraidhard"; private const string XPerienceraidexpert = "XPerienceraidexpert"; private const string XPerienceraidnightmare = "XPerienceraidnightmare"; private const string XPerienceprofilebg = "XPerienceprofilebg"; private const string XPeriencemenubg = "XPeriencemenubg"; // XPerience Addon private const string XPerienceaddondmgbarhealth1 = "XPerienceaddondmgbarhealth1"; private const string XPerienceaddondmgbarhealth2 = "XPerienceaddondmgbarhealth2"; private const string XPerienceaddondmgbarhealth3 = "XPerienceaddondmgbarhealth3"; private const string XPerienceaddondmgbarhealth4 = "XPerienceaddondmgbarhealth4"; private const string XPerienceaddondmgbarhealth5 = "XPerienceaddondmgbarhealth5"; private const string XPerienceaddondmgbarhealth6 = "XPerienceaddondmgbarhealth6"; private const string XPerienceaddondmgbarhealth7 = "XPerienceaddondmgbarhealth7"; private const string XPerienceaddondmgbarhealth8 = "XPerienceaddondmgbarhealth8"; private const string XPerienceaddondmgbarhealth9 = "XPerienceaddondmgbarhealth9"; private const string XPerienceaddondmgbarhealth10 = "XPerienceaddondmgbarhealth10"; #endregion #region Colors/Symbols private object TextColor(BasePlayer player, string type, double value, bool enabled = false) { string color = config.uitextColor.defaultcolor; if (player == null || type == null) return color; if (value > 0) switch (type) { case "default": color = config.uitextColor.defaultcolor; break; case "mainlevel": color = config.uitextColor.level; break; case "experience": color = config.uitextColor.experience; break; case "nextlevel": color = config.uitextColor.nextlevel; break; case "remainingxp": color = config.uitextColor.remainingxp; break; case "level": color = config.uitextColor.statskilllevels; break; case "perk": color = config.uitextColor.perks; break; case "unspent": color = config.uitextColor.unspentpoints; break; case "spent": color = config.uitextColor.spentpoints; break; case "pets": color = config.uitextColor.pets; break; case "rankname": color = config.uitextColor.rankname; break; case "ranklevel": color = config.uitextColor.ranklevel; break; case "rankxp": color = config.uitextColor.rankxp; break; } if (value < 0) color = "red"; return color; } private object ValueSymbol(string type, double value, string symbol) { if (type == "perk" && value > 0 && symbol == "neg") { symbol = "-"; } if (type == "perk" && value > 0 && symbol == "pos") { symbol = "+"; } if (type == "perk" && value < 0 && (symbol == "neg" || symbol == "pos")) { symbol = ""; } // Return Symbol return symbol; } private object LiveUISelection(string selection, int value) { string color = "1 1 1 1"; switch (selection) { case "UI0": if (value == 0) color = "0 1 0 1"; break; case "UI1": if (value == 1) color = "0 1 0 1"; break; case "UI2": if (value == 2) color = "0 1 0 1"; break; case "UI3": if (value == 3) color = "0 1 0 1"; break; case "UI4": if (value == 4) color = "0 1 0 1"; break; case "UI5": if (value == 5) color = "0 1 0 1"; break; case "UI6": if (value == 6) color = "0 1 0 1"; break; case "UI7": if (value == 7) color = "0 1 0 1"; break; case "UI8": if (value == 8) color = "0 1 0 1"; break; case "UI9": if (value == 9) color = "0 1 0 1"; break; case "UI10": if (value == 10) color = "0 1 0 1"; break; } // Return Color return color; } private object DashSelection(int selection, int value) { string color = "1 1 1 1"; switch (selection) { case 0: if (value == 0) color = "1 0 0 1"; break; case 1: if (value == 1) color = "0 1 0 1"; break; case 2: if (value == 2) color = "0 1 0 1"; break; } // Return Color return color; } private object DisableRankSelection(string selection, bool value, string color = "1 1 1 1") { switch (selection) { case "Yes": if (value) color = "1 0 0 1"; break; case "No": if (!value) color = "0 1 0 1"; break; } // Return Color return color; } private object DisableSelection(string selection, bool value, string color = "1 1 1 1") { switch (selection) { case "Yes": if (value) color = "0 1 0 1"; break; case "No": if (!value) color = "1 0 0 1"; break; } // Return Color return color; } private object ColorConverter(string color) { string hexcolor = color; switch (color) { case "white": hexcolor = "#FFFFFF"; break; case "red": hexcolor = "#FF0000"; break; case "green": hexcolor = "#00FF00"; break; case "blue": hexcolor = "#0000FF"; break; case "cyan": hexcolor = "#00FFFF"; break; case "grey": hexcolor = "#808080"; break; case "magenta": hexcolor = "#FF00FF"; break; case "yellow": hexcolor = "#FFFF00"; break; } return hexcolor; } private object LiveColorConverter(string color) { string newcolor = color; switch (color) { case "red": newcolor = "99 00 00"; break; case "green": newcolor = "00 99 00"; break; case "blue": newcolor = "00 00 99"; break; case "cyan": newcolor = "00 99 99"; break; case "grey": newcolor = "80 80 80"; break; case "magenta": newcolor = "99 00 99"; break; case "yellow": newcolor = "99 99 00"; break; } return newcolor; } #endregion #region Default UI Panels // UI Defaults private CuiPanel XPUIPanel(string anchorMin, string anchorMax, string color = "0 0 0 0") { return new CuiPanel { RectTransform = { AnchorMin = anchorMin, AnchorMax = anchorMax }, Image = { Color = color } }; } private CuiPanel XPUIPanel2(string anchorMin, string anchorMax, string offsetMin, string offsetMax, string color = "0 0 0 0") { return new CuiPanel { RectTransform = { AnchorMin = anchorMin, AnchorMax = anchorMax, OffsetMin = offsetMin, OffsetMax = offsetMax }, Image = { Color = color } }; } private CuiLabel XPUILabel(string text, int i, float height, TextAnchor align = TextAnchor.MiddleLeft, int fontSize = 13, string xMin = "0", string xMax = "1", string color = "1 1 1 1") { return new CuiLabel { RectTransform = { AnchorMin = $"{xMin} {1 - height*i + i * .002f}", AnchorMax = $"{xMax} {1 - height*(i-1) + i * .002f}" }, Text = { Text = text, FontSize = fontSize, Align = align, Color = color } }; } private CuiButton XPUIButton(string command, double i, float rowHeight, int fontSize = 11, string color = "1.0 0.0 0.0 0.7", string content = "+", string xMin = "0", string xMax = "1", TextAnchor align = TextAnchor.MiddleLeft, string fcolor = "1 1 1 1") { return new CuiButton { Button = { Command = command, Color = $"{color}" }, RectTransform = { AnchorMin = $"{xMin} {1 - rowHeight*i + i * .002f}", AnchorMax = $"{xMax} {1 - rowHeight*(i-1) + i * .002f}" }, Text = { Text = content, FontSize = fontSize, Align = align, Color = fcolor, } }; } private CuiButton XPUIMenuButton(string command, double i, float rowHeight, int fontSize = 11, string color = "1.0 0.0 0.0 0.7", string content = "+", string xMin = "0", string xMax = "1", TextAnchor align = TextAnchor.MiddleLeft, string fcolor = "1 1 1 1", double space = .025) { return new CuiButton { Button = { Command = command, Color = $"{color}" }, RectTransform = { AnchorMin = $"{xMin} {1 - rowHeight * i + i * .002f}", AnchorMax = $"{xMax} {1 - rowHeight * (i-1) + i * .002f - space}" }, Text = { Text = content, FontSize = fontSize, Align = align, Color = fcolor, } }; } private CuiElement XPUIImage(string parent, string image, int i, float imgheight, string xMin = "0", string xMax = "1") { return new CuiElement { Parent = parent, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", image) }, new CuiRectTransformComponent { AnchorMin = $"{xMin} {1 - imgheight*i + i * .002f}", AnchorMax = $"{xMax} {1 - imgheight*(i-1) + i * .002f}" } } }; } private CuiElement XPUIInput(string parent, string command, int i, float height, int fontSize = 11, string content = "", string xMin = "0", string xMax = "1", TextAnchor align = TextAnchor.MiddleLeft, string color = "1 1 1 1", int limit = 0) { return new CuiElement { Parent = parent, Components = { new CuiInputFieldComponent { FontSize = fontSize, Align = align, Command = command, Color = color, CharsLimit = limit, NeedsKeyboard = true, Text = content, LineType = 0, }, new CuiRectTransformComponent { AnchorMin = $"{xMin} {1 - height*i + i * .002f}", AnchorMax = $"{xMax} {1 - height*(i-1) + i * .002f}", } } }; } private CuiPanel XPUIInputbackground(int i, float height, string color = "0 0 0 0.7", string xMin = "0", string xMax = "1") { return new CuiPanel { RectTransform = { AnchorMin = $"{Convert.ToDouble(xMin) - .005} {1 - height*i + i * .002f + .003}", AnchorMax = $"{Convert.ToDouble(xMax) + .005} {1 - height*(i-1) + i * .002f - .003}", }, Image = { Color = color } }; } private CuiButton XPToggle(string command, int i, float height, bool value, string xMin = "0", double width = .006) { return new CuiButton { RectTransform = { AnchorMin = $"{xMin} {1 - height*i + i * .002f + .006}", AnchorMax = $"{Convert.ToDouble(xMin) + width} {1 - height*(i-1) + i * .002f - .006}", }, Button = { Color = value ? "0 1 0 1" : "1 0 0 1", Command = value ? $"{command} false" : $"{command} true" } }; } private void DestroyUi(BasePlayer player, string name) { if (player == null || name == null) return; CuiHelper.DestroyUi(player, name); } #endregion #region Player Panels // Handlers #region Handlers [ConsoleCommand("xp.playercontrol")] private void Cmdplayercontrolnew(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null) return; XPRecord xprecord = GetXPRecord(player); string page = arg.GetString(0); if (page == null) page = "main"; string type = arg.GetString(1); switch (page) { case "main": ClearPlayerUIs(player, true); string otherplayer = arg.GetString(2); PlayerProfile(player, FindPlayer(otherplayer)); PlayerProfileMain(player, FindPlayer(otherplayer)); break; case "data": ClearPlayerUIs(player); PlayerProfileStatsAndSkills(player, type, arg.GetString(2)); break; case "history": string otherplayerhistory = arg.GetString(2); int pagenum = arg.GetInt(3); var orderby = arg.GetString(4); var order = arg.GetString(5); ClearPlayerUIs(player, true); PlayerProfile(player, FindPlayer(otherplayerhistory)); PlayerProfileRecords(player, type, FindPlayer(otherplayerhistory), pagenum, orderby, order); break; case "raids": int raidpage = arg.GetInt(1); string otherplayerraids = arg.GetString(2); if (XPerienceAddon != null && RaidableBases != null) { ClearPlayerUIs(player, true); PlayerProfile(player, FindPlayer(otherplayerraids)); PlayerProfileRaids(player, raidpage, FindPlayer(otherplayerraids)); } break; case "settings": ClearPlayerUIs(player, true); PlayerProfile(player); PlayerSettings(player); break; case "topplayers": ClearPlayerUIs(player, true); PlayerProfile(player); PlayerTopList(player, 1, "basicexperience", 0); break; case "getprompt": string value = arg.GetString(2); if (type == null || value == null) return; PlayerPromptBox(player, "reset", type, value); break; case "reset": switch (type) { case "stats": if (config.defaultOptions.hardcorenoreset) { player.ChatMessage(XPLang("hardcorenoreset", player.UserIDString)); return; } StatsResetAll(player); ClearPlayerUIs(player); PlayerProfileMain(player); break; case "skills": if (config.defaultOptions.hardcorenoreset) { player.ChatMessage(XPLang("hardcorenoreset", player.UserIDString)); return; } SkillsResetAll(player); ClearPlayerUIs(player); PlayerProfileMain(player); break; case "stat": string stat = arg.GetString(2); if (config.defaultOptions.hardcorenoreset) { player.ChatMessage(XPLang("hardcorenoreset", player.UserIDString)); return; } StatReset(player, stat); ClearPlayerUIs(player); PlayerProfileStatsAndSkills(player, stat.ToLower(), "stats"); break; case "skill": string skill = arg.GetString(2); if (config.defaultOptions.hardcorenoreset) { player.ChatMessage(XPLang("hardcorenoreset", player.UserIDString)); return; } SkillReset(player, skill); ClearPlayerUIs(player); PlayerProfileStatsAndSkills(player, skill.ToLower(), "skills"); break; } break; case "welcome": if (XPerienceAddon != null) { ClearPlayerUIs(player, true); XPerienceAddon.Call("WelcomePanel", player); XPerienceAddon.Call("WelcomePanelHome", player); } break; case "close": ClearPlayerUIs(player, true); break; case "closedmgskins": DestroyUi(player, XPeriencePlayerDMGSkins); break; case "opendmgskins": int dmgbarpage = arg.GetInt(1); DestroyUi(player, XPeriencePlayerDMGSkins); PlayerDamageBarSkins(player, dmgbarpage); break; case "closebgoptions": DestroyUi(player, XPeriencePlayerBGImgs); break; case "openbgoptions": int bgpage = arg.GetInt(1); DestroyUi(player, XPeriencePlayerBGImgs); PlayerProfileBGImgs(player, bgpage); break; case "closeprompt": DestroyUi(player, XPeriencePlayerControlPrompt); break; case "help": ClearPlayerUIs(player, true); PlayerProfile(player); PlayerHelp(player, type, arg.GetString(2)); break; case "calculationsranks": ClearPlayerUIs(player, true); PlayerProfile(player); PlayerCalculationPageRanks(player, arg.GetInt(1)); break; case "calculationslevels": ClearPlayerUIs(player, true); PlayerProfile(player); PlayerCalculationPageLevels(player, arg.GetInt(1), arg.GetInt(2)); break; case "calculationslevelpage": DestroyUi(player, XPeriencePlayerCalculations); DestroyUi(player, XPeriencePlayerCalculationsLevelSelection); DestroyUi(player, XPeriencePlayerCalculationsRanksSelection); PlayerCalculationPageLevels(player, arg.GetInt(1), arg.GetInt(2)); break; case "calculationsstats": ClearPlayerUIs(player, true); PlayerProfile(player); PlayerCalculationPageStats(player); break; case "calculationsskills": ClearPlayerUIs(player, true); PlayerProfile(player); PlayerCalculationPageSkills(player); break; case "fix": PlayerFixData(player); ClearPlayerUIs(player, true); PlayerProfile(player); PlayerSettings(player); break; case "admin": if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; ClearPlayerUIs(player, true); DestroyUi(player, XPerienceAdminPanelMain); AdminControlPanel(player); AdminInfoPage(player); break; } } [ConsoleCommand("xp.playeredits")] private void Cmdplayeredits(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null) return; string type = arg.GetString(0); switch (type) { case "settings": string setting = arg.GetString(1); switch (setting) { case "liveui": int location = arg.GetInt(2); _xperienceCache[player.UserIDString].UILocation = location; LiveStats(player); break; case "enabledash": int enabledash = arg.GetInt(2); _xperienceCache[player.UserIDString].dash = (int)enabledash; break; case "speedometertype": int speedometertype = arg.GetInt(2); _xperienceCache[player.UserIDString].speedometertype = (int)speedometertype; break; case "disableranks": bool option = arg.GetBool(2); _xperienceCache[player.UserIDString].DisableRank = option; LiveStats(player); break; case "prompt": bool prompt = arg.GetBool(2); _xperienceCache[player.UserIDString].enableconfirmationprompt = prompt; break; case "chatnotify": bool chatnotify = arg.GetBool(2); _xperienceCache[player.UserIDString].showchatnotifications = chatnotify; break; case "chatprofile": bool chatprofile = arg.GetBool(2); _xperienceCache[player.UserIDString].showchatprofileonconnect = chatprofile; break; case "xpchat": bool xpchat = arg.GetBool(2); _xperienceCache[player.UserIDString].showchatxp = xpchat; break; case "welcomepanel": bool welcomepanel = arg.GetBool(2); _xperienceCache[player.UserIDString].showwelcomepanel = welcomepanel; break; } ClearPlayerUIs(player); PlayerSettings(player); break; case "getprompt": PlayerPromptBox(player, "levelup", arg.GetString(1), arg.GetString(2)); break; case "stat": StatUp(player, arg.GetString(1)); ClearPlayerUIs(player); PlayerProfileStatsAndSkills(player, arg.GetString(1), "stats"); break; case "skill": SkillUp(player, arg.GetString(1)); ClearPlayerUIs(player); PlayerProfileStatsAndSkills(player, arg.GetString(1), "skills"); break; case "help": ClearPlayerUIs(player); PlayerHelp(player, arg.GetString(2)); break; case "dmgskins": int dmgbar = arg.GetInt(1); int dmgbarpage = arg.GetInt(2); _xperienceCache[player.UserIDString].dmgbar = (int)dmgbar; DestroyUi(player, XPeriencePlayerDMGSkins); PlayerDamageBarSkins(player, dmgbarpage); break; case "profilebg": int bgid = arg.GetInt(1); int bgpage = arg.GetInt(2); _xperienceCache[player.UserIDString].profilebg = (int)bgid; DestroyUi(player, XPeriencePlayerBGImgs); PlayerProfileBGImgs(player, bgpage); break; case "rankup": RankUp(player, 0, true); break; } } [ConsoleCommand("xp.topplayers")] private void Cmdtopplayernew(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null) return; int page = arg.GetInt(0); string type = arg.GetString(1); string selection = arg.GetString(2); int number = arg.GetInt(3); switch (type) { case "levels": ClearPlayerUIs(player); PlayerTopList(player, page, selection, number); break; case "stats": ClearPlayerUIs(player); PlayerTopList(player, page, selection, number); break; case "close": ClearPlayerUIs(player, true); break; } } private string LevelIcon(BasePlayer player, int percent) { object levelicon = XPeriencelevel; if (percent < 20) { levelicon = XPeriencelevel0; } else if (percent >= 20 && percent < 40) { levelicon = XPeriencelevel2; } else if (percent >= 40 && percent < 60) { levelicon = XPeriencelevel4; } else if (percent >= 60 && percent < 80) { levelicon = XPeriencelevel6; } else if (percent >= 80 && percent < 95) { levelicon = XPeriencelevel8; } else if (percent >= 95) { levelicon = XPeriencelevel10; } return levelicon.ToString(); } private object PlayerTimeValues(BasePlayer player, string type, double value) { if (type == "lifespan") { value = CurrentTime - value; } double minutes = (int)(value % 3600) / 60; double hours = (int)(value % 86400) / 3600; double days = (int)(value % (86400 * 30)) / 86400; string showdays = ""; string showhours = ""; string showmins = ""; if (days > 0) { showdays = $"Days: {days} "; } if (hours > 0) { showhours = $"Hours: {hours} "; } if (minutes > 0) { showmins = $"Mins: {minutes} "; } if (days == 0 && hours == 0 && minutes == 0) { return 0; } string playertime = $"{showdays}{showhours}{showmins}"; return playertime; } private object PlayerInfoValues(BasePlayer player, BaseEntity entity, string type) { string DMGType = entity?.GetType().Name; switch (type) { case "dmgrecieved": if (DMGType == "BasePlayer") { var playername = entity as BasePlayer; DMGType = playername.displayName; } return DMGType; case "dmgdelt": if (DMGType == "BasePlayer") { var playername = entity as BasePlayer; DMGType = playername.displayName; } return DMGType; } return DMGType; } private string SelectedIcon(string type, string data) { string icon = ""; switch (type) { case "next": switch (data) { // Stats case "mentality": icon = XPeriencedexterity; break; case "dexterity": icon = XPeriencemight; break; case "might": icon = XPerienceweaponry; break; case "weaponry": icon = XPerienceninjary; break; case "ninjary": icon = XPeriencecaptaincy; break; case "captaincy": icon = XPeriencementality; break; // Skills case "woodcutter": icon = XPeriencesmithy; break; case "smithy": icon = XPerienceminer; break; case "miner": icon = XPerienceforager; break; case "forager": icon = XPeriencehunter; break; case "hunter": icon = XPeriencecrafter; break; case "crafter": icon = XPerienceframer; break; case "framer": icon = XPeriencefisher; break; case "fisher": icon = XPeriencemedic; break; case "medic": icon = XPeriencescavenger; break; case "scavenger": icon = XPerienceelectrician; break; case "electrician": icon = XPeriencedemolitionist; break; case "demolitionist": if (config.tamer.enabletame) { icon = XPeriencetamer; break; } else { icon = XPeriencewoodcutter; break; } case "tamer": icon = XPeriencewoodcutter; break; } break; case "prev": switch (data) { // Stats case "mentality": icon = XPeriencecaptaincy; break; case "dexterity": icon = XPeriencementality; break; case "might": icon = XPeriencedexterity; break; case "weaponry": icon = XPeriencemight; break; case "ninjary": icon = XPerienceweaponry; break; case "captaincy": icon = XPerienceninjary; break; // Skills case "woodcutter": if (config.tamer.enabletame) { icon = XPeriencetamer; break; } else { icon = XPeriencedemolitionist; break; } case "smithy": icon = XPeriencewoodcutter; break; case "miner": icon = XPeriencesmithy; break; case "forager": icon = XPerienceminer; break; case "hunter": icon = XPerienceforager; break; case "crafter": icon = XPeriencehunter; break; case "framer": icon = XPeriencecrafter; break; case "fisher": icon = XPerienceframer; break; case "medic": icon = XPeriencefisher; break; case "scavenger": icon = XPeriencemedic; break; case "electrician": icon = XPeriencescavenger; break; case "demolitionist": icon = XPerienceelectrician; break; case "tamer": icon = XPeriencedemolitionist; break; } break; } return icon; } private object SelectedData(string type, string data, string page = "") { string newdata = ""; switch (type) { case "next": switch (data) { // Level - XP - Rank case "basiclevel": newdata = "basicexperience"; break; case "basicexperience": if (config.xpLevelRanks.enableresetranks) { newdata = "rank"; } else { newdata = "mentality"; } break; case "rank": newdata = "mentality"; break; // Stats case "mentality": newdata = "dexterity"; break; case "dexterity": newdata = "might"; break; case "might": newdata = "weaponry"; break; case "weaponry": newdata = "ninjary"; break; case "ninjary": newdata = "captaincy"; break; case "captaincy": if (page == "top") { newdata = "woodcutter"; } else { newdata = "mentality"; } break; // Skills case "woodcutter": newdata = "smithy"; break; case "smithy": newdata = "miner"; break; case "miner": newdata = "forager"; break; case "forager": newdata = "hunter"; break; case "hunter": newdata = "crafter"; break; case "crafter": newdata = "framer"; break; case "framer": newdata = "fisher"; break; case "fisher": newdata = "medic"; break; case "medic": newdata = "scavenger"; break; case "scavenger": newdata = "electrician"; break; case "electrician": newdata = "demolitionist"; break; case "demolitionist": if (config.tamer.enabletame) { newdata = "tamer"; break; } else { if (page == "top") { newdata = "basiclevel"; } else { newdata = "woodcutter"; } break; } case "tamer": if (page == "top") { newdata = "basiclevel"; } else { newdata = "woodcutter"; } break; } break; case "prev": switch (data) { // Level - XP - Rank case "basiclevel": if (config.tamer.enabletame) { newdata = "tamer"; } else { newdata = "electrician"; } break; case "basicexperience": newdata = "basiclevel"; break; case "rank": newdata = "basicexperience"; break; // Stats case "mentality": if (page == "top") { if (config.xpLevelRanks.enableresetranks) { newdata = "rank"; } else { newdata = "basicexperience"; } } else { newdata = "captaincy"; } break; case "dexterity": newdata = "mentality"; break; case "might": newdata = "dexterity"; break; case "weaponry": newdata = "might"; break; case "ninjary": newdata = "weaponry"; break; case "captaincy": newdata = "ninjary"; break; // Skills case "woodcutter": if (page == "top") { newdata = "captaincy"; break; } else { if (config.tamer.enabletame) { newdata = "tamer"; break; } else { newdata = "demolitionist"; break; } } case "smithy": newdata = "woodcutter"; break; case "miner": newdata = "smithy"; break; case "forager": newdata = "miner"; break; case "hunter": newdata = "forager"; break; case "crafter": newdata = "hunter"; break; case "framer": newdata = "crafter"; break; case "fisher": newdata = "framer"; break; case "medic": newdata = "fisher"; break; case "scavenger": newdata = "medic"; break; case "electrician": newdata = "scavenger"; break; case "demolitionist": newdata = "electrician"; break; case "tamer": newdata = "demolitionist"; break; } break; } return newdata; } private double IconAdjustment(double adjustment, string type) { switch (type) { case "stats": if (config.mentality.maxlvl <= 0) { adjustment += .025; } if (config.dexterity.maxlvl <= 0) { adjustment += .025; } if (config.might.maxlvl <= 0) { adjustment += .025; } if (config.might.maxlvl <= 0) { adjustment += .025; } if (config.weaponry.maxlvl <= 0) { adjustment += .025; } if (config.ninjary.maxlvl <= 0) { adjustment += .025; } if (config.captaincy.maxlvl <= 0) { adjustment += .025; } break; case "skills": if (config.woodcutter.maxlvl <= 0) { adjustment += .025; } if (config.smithy.maxlvl <= 0) { adjustment += .025; } if (config.miner.maxlvl <= 0) { adjustment += .025; } if (config.forager.maxlvl <= 0) { adjustment += .025; } if (config.hunter.maxlvl <= 0) { adjustment += .025; } if (config.crafter.maxlvl <= 0) { adjustment += .025; } if (config.framer.maxlvl <= 0) { adjustment += .025; } if (config.fisher.maxlvl <= 0) { adjustment += .025; } if (config.medic.maxlvl <= 0) { adjustment += .025; } if (config.scavenger.maxlvl <= 0) { adjustment += .025; } if (config.electrician.maxlvl <= 0) { adjustment += .025; } if (config.demolitionist.maxlvl <= 0) { adjustment += .025; } if (!config.tamer.enabletame || config.tamer.maxlvl <= 0) { adjustment += .025; } break; } return adjustment; } private double RankBoosts(BasePlayer player, string type, double amount, bool enabled) { XPRecord record = GetXPRecord(player); if (record.rank <= 0 || record.DisableRank || !enabled) return amount; switch (type) { case "stat": if (config.xpLevelRanks.rankstatboost && !record.DisableRank) { amount += config.xpLevelRanks.rankstatboostamount * record.rank; } break; case "skill": if (config.xpLevelRanks.rankskillboost && !record.DisableRank) { amount += config.xpLevelRanks.rankskillboostamount * record.rank; } break; } return amount; } private string ConvertUnixTimeStampToDateTime(int unixtime) { //DateTime sTime = new DateTime(1970, 1, 1, 0, 0, 0).ToLocalTime(); var time = DateTimeOffset.Now.ToUnixTimeSeconds() - unixtime; var y = time / 31556926 % 12; var w = time / 604800 % 52; var d = time / 86400 % 7; var h = time / 3600 % 24; var m = time / 60 % 60; string years = ""; string weeks = ""; string days = ""; string hours = ""; string mins = ""; if (y != 0) { years = $"{y}y, "; } if (w != 0) { weeks = $"{w}w, "; } if (d != 0) { days = $"{d}d, "; } if (h != 0) { hours = $"{h}h, "; } if (m != 0) { mins = $"{m}m"; } string timeago = $"{years}{weeks}{days}{hours}{mins}"; return timeago; } public class Deaths { public string victim; public string victimname; public string attacker; public string attackername; public string weapon; public string lastdamage; public float distance; public long timestamp; } private class Raids { public Vector3 Location; public string BaseName; public int mode; public bool allowPVP; public string id; public float spawnTime; public float despawnTime; public float loadTime; public ulong ownerid; public List raiders; public DateTime spawnDateTime; public DateTime despawnDateTime; } public class DmgBarImgs { public string name; public string url; } private static string PositionToGrid(Vector3 position) => MapHelper.PositionToString(position); private object GetKillRecords(string player, string entity) { if (KillRecords == null) return 0; object value = KillRecords.Call("GetKillRecord", player, entity); if (value == null) return 0; return Convert.ToInt32(value); } private IEnumerable GetTopXP(int page, int takeCount, string selection) { IEnumerable data = null; switch (selection) { case "rank": data = _xperienceCache.Values.OrderByDescending(i => i.trueexperience); break; case "basiclevel": data = _xperienceCache.Values.OrderByDescending(i => i.level); break; case "basicexperience": data = _xperienceCache.Values.OrderByDescending(i => i.experience); break; case "level": data = _xperienceCache.Values.OrderByDescending(i => i.truelevel); break; case "experience": data = _xperienceCache.Values.OrderByDescending(i => i.trueexperience); break; case "mentality": data = _xperienceCache.Values.OrderByDescending(i => i.Mentality); break; case "dexterity": data = _xperienceCache.Values.OrderByDescending(i => i.Dexterity); break; case "might": data = _xperienceCache.Values.OrderByDescending(i => i.Might); break; case "captaincy": data = _xperienceCache.Values.OrderByDescending(i => i.Captaincy); break; case "weaponry": data = _xperienceCache.Values.OrderByDescending(i => i.Weaponry); break; case "ninjary": data = _xperienceCache.Values.OrderByDescending(i => i.Ninjary); break; case "woodcutter": data = _xperienceCache.Values.OrderByDescending(i => i.WoodCutter); break; case "smithy": data = _xperienceCache.Values.OrderByDescending(i => i.Smithy); break; case "miner": data = _xperienceCache.Values.OrderByDescending(i => i.Miner); break; case "forager": data = _xperienceCache.Values.OrderByDescending(i => i.Forager); break; case "hunter": data = _xperienceCache.Values.OrderByDescending(i => i.Hunter); break; case "fisher": data = _xperienceCache.Values.OrderByDescending(i => i.Fisher); break; case "crafter": data = _xperienceCache.Values.OrderByDescending(i => i.Crafter); break; case "framer": data = _xperienceCache.Values.OrderByDescending(i => i.Framer); break; case "medic": data = _xperienceCache.Values.OrderByDescending(i => i.Medic); break; case "scavenger": data = _xperienceCache.Values.OrderByDescending(i => i.Scavenger); break; case "electrician": data = _xperienceCache.Values.OrderByDescending(i => i.Electrician); break; case "tamer": data = _xperienceCache.Values.OrderByDescending(i => i.Tamer); break; } return data? .Skip((page - 1) * takeCount) .Take(takeCount); } private void ClearPlayerUIs(BasePlayer player, bool all = false, bool live = false) { DestroyUi(player, XPeriencePlayerProfileMain); DestroyUi(player, XPeriencePlayerProfileStatsAndSkills); DestroyUi(player, XPeriencePlayerProfileStatsAndSkillsMenu); DestroyUi(player, XPeriencePlayerProfileSettings); DestroyUi(player, XPeriencePlayerProfileKills); DestroyUi(player, XPeriencePlayerProfileKillsPages); DestroyUi(player, XPeriencePlayerProfileRaids); DestroyUi(player, XPeriencePlayerProfileRaidsPages); DestroyUi(player, XPerienceTopInner); DestroyUi(player, XPerienceTopPageSelection); DestroyUi(player, XPeriencePlayerControlPrompt); DestroyUi(player, XPeriencePlayerProfileHelp); DestroyUi(player, XPeriencePlayerProfileHelpPages); DestroyUi(player, XPeriencePlayerCalculations); DestroyUi(player, XPeriencePlayerCalculationsLevelSelection); DestroyUi(player, XPeriencePlayerCalculationsRanksSelection); DestroyUi(player, XPeriencePlayerDMGSkins); DestroyUi(player, XPeriencePlayerBGImgs); if (all) { DestroyUi(player, XPeriencePlayerProfileOutside); DestroyUi(player, XPeriencePlayerProfile); DestroyUi(player, XPerienceAdminPanelMain); } if (live) { DestroyUi(player, XPerienceLivePrimary); DestroyUi(player, XPerienceLiveDashPanel); DestroyUi(player, XPerienceLiveFuel); DestroyUi(player, XPerienceLiveSpeed); } } #endregion // Live Panels public void LiveStats(BasePlayer player, bool zone = false, string consumable = "none") { if (player == null || !player.userID.Get().IsSteamId() || player.IsNpc || !player.isSpawned) return; XPRecord xprecord = GetXPRecord(player); if (xprecord == null) return; Ranks rank = GetXPRank(xprecord.rank); DestroyUi(player, XPerienceLivePrimary); // XP Bar Calculations double lastlevel; double nextlevel; double currentxp; double reqxpperc; double remainingxp; double levelpercent; if (xprecord.experience == 0 || xprecord.level == 0) { lastlevel = 0; nextlevel = config.xpLevel.levelstart; currentxp = xprecord.experience - lastlevel; reqxpperc = currentxp / nextlevel; remainingxp = nextlevel - currentxp; levelpercent = reqxpperc * 100; } else { if (config.xpLevelRanks.increaselevelmultiplier) { lastlevel = xprecord.requiredxp - (xprecord.level * (config.xpLevel.levelmultiplier + (config.xpLevelRanks.levelmultiplierincrease * xprecord.rank))); } else { lastlevel = xprecord.requiredxp - (xprecord.level * config.xpLevel.levelmultiplier); } nextlevel = xprecord.requiredxp - lastlevel; currentxp = xprecord.experience - lastlevel; reqxpperc = currentxp / nextlevel; remainingxp = nextlevel - currentxp; levelpercent = reqxpperc * 100; } // Armor Bar Calculations double armor = 0; double armorperc = 0; double currentarmor = 0; if (!zone) { if (GetTeaCooldown(player) == 0) { xprecord.teacooldown = 0; xprecord.teatype = consumable; } armor = (xprecord.Might * config.might.armor) * 100; double maxhealth = player._maxHealth - armor; double playerhealth = player._health; // Default Armor - No Tea Effects if (player._health > maxhealth) { currentarmor = Math.Ceiling((player._health - maxhealth)); } // Extra Armor - Add Tea Effects double teatime = 1200; double teaboost = 0; bool teamodified = false; // Check for TeaModifier Plugin and Values if (TeaModifiers != null) { teatime = TeaModifiers.Call("GetTeaDuration", player, consumable, Modifier.ModifierType.Max_Health); teaboost = TeaModifiers.Call("GetTeaValue", player, consumable, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } // Update PlayerData if (consumable.Contains("maxhealthtea")) { xprecord.teacooldown = (double)CurrentTime + teatime; xprecord.teatype = consumable; } // Get Updated Data if (GetTeaCooldown(player) != 0) { if (teamodified) { teaboost = TeaModifiers.Call("GetTeaValue", player, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; } switch (GetTeaTypes(player)) { case "none": teaboost = 0; break; case "maxhealthtea": if (!teamodified) { teaboost = 5; } break; case "maxhealthtea.advanced": if (!teamodified) { teaboost = 12.5; } break; case "maxhealthtea.pure": if (!teamodified) { teaboost = 20; } break; } } // Apply Results to Armor if (GetTeaCooldown(player) != 0) { playerhealth += teaboost; if (playerhealth > maxhealth) { if (teamodified) { currentarmor = Math.Ceiling((player._health - maxhealth) - teaboost); } if (!teamodified) { currentarmor = Math.Ceiling((player._health - maxhealth) - teaboost); } if (currentarmor < 0) currentarmor = 0; armor += Math.Ceiling((teaboost * config.might.armor) * xprecord.Might); } } // Calculate Armor Bar Display armorperc = currentarmor / armor; } // Live Stats Display var LIVEelements = new CuiElementContainer(); string levelicon = XPeriencelevel; if (config.defaultOptions.useprogressivelevelicons) { levelicon = LevelIcon(player, (int)levelpercent); } switch (xprecord.UILocation) { case 1: #region LIVEloc1 // Live UI Box LIVEelements.Add(XPUIPanel2("1 0", "1 0", "-392 16", "-210 126", "0.5 0.5 0.5 0"), "Hud", XPerienceLivePrimary); // Rank if (config.xpLevelRanks.enableresetranks && config.xpLevelRanks.showrankinliveui) { if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.76", "0.125 0.95"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.13 0.76", "0.99 0.99", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } else { LIVEelements.Add(XPUIPanel("0 0.51", "0.125 0.70"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.13 0.51", "0.99 0.735", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } } // Armor if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.51", "0.125 0.70"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencearmor, 1, .9f, "0.15", "0.85")); LIVEelements.Add(XPUIPanel("0.13 0.51", "0.99 0.735", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); //LIVEelements.Add(XPUIPanel("0.01 0.145", $"{armorperc - 0.01} 0.845", "1.50 0.05 0.05 0.70"), XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.01 0.145", $"{armorperc - 0.01} 0.845", $"{LiveColorConverter(config.uitextColor.armorbar)} 0.70"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{currentarmor} / {armor}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); } // Level LIVEelements.Add(XPUIPanel("0 0.255", "0.125 0.44"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, levelicon, 1, .9f, "0.15", "0.95")); LIVEelements.Add(XPUIPanel("0.13 0.255", "0.99 0.480", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{XPLang("level", player.UserIDString)}: {xprecord.level} ({(int)levelpercent}%)", 1, 1.06f, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); // XP LIVEelements.Add(XPUIPanel("0 0", "0.125 0.185"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencexp, 1, .9f, "0.15", "0.80")); LIVEelements.Add(XPUIPanel("0.13 0", "0.99 0.23", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.01 0.135", $"{reqxpperc - 0.01} 0.845", $"{LiveColorConverter(config.uitextColor.xpbar)} 0.80"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{(int)remainingxp}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); #endregion break; case 2: #region LIVEloc2 // Live UI Box LIVEelements.Add(XPUIPanel2("0 0", "0 0", "10 16", "210 126", "0.5 0.5 0.5 0"), "Hud", XPerienceLivePrimary); // Rank if (config.xpLevelRanks.enableresetranks && config.xpLevelRanks.showrankinliveui) { if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.76", "0.125 0.95"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.13 0.76", "0.99 0.99", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } else { LIVEelements.Add(XPUIPanel("0 0.51", "0.125 0.70"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.13 0.51", "0.99 0.735", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } } // Armor if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.51", "0.125 0.70"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencearmor, 1, .9f, "0.15", "0.85")); LIVEelements.Add(XPUIPanel("0.13 0.51", "0.99 0.735", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.01 0.145", $"{armorperc - 0.01} 0.845", $"{LiveColorConverter(config.uitextColor.armorbar)} 0.70"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{currentarmor} / {armor}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); } // Level LIVEelements.Add(XPUIPanel("0 0.255", "0.125 0.44"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, levelicon, 1, .9f, "0.15", "0.95")); LIVEelements.Add(XPUIPanel("0.13 0.255", "0.99 0.480", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{XPLang("level", player.UserIDString)}: {xprecord.level} ({(int)levelpercent}%)", 1, 1.06f, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); // XP LIVEelements.Add(XPUIPanel("0 0", "0.125 0.185"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencexp, 1, .9f, "0.15", "0.80")); LIVEelements.Add(XPUIPanel("0.13 0", "0.99 0.23", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.01 0.135", $"{reqxpperc - 0.01} 0.845", $"{LiveColorConverter(config.uitextColor.xpbar)} 0.80"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{(int)remainingxp}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); #endregion break; case 3: #region LIVEloc3 // Live UI Box LIVEelements.Add(XPUIPanel2("0 1", "0 1", "10 -126", "210 -16", "0.5 0.5 0.5 0"), "Hud", XPerienceLivePrimary); // Rank if (config.xpLevelRanks.enableresetranks && config.xpLevelRanks.showrankinliveui) { if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.76", "0.125 0.95"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.13 0.76", "0.99 0.99", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } else { LIVEelements.Add(XPUIPanel("0 0.51", "0.125 0.70"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.13 0.51", "0.99 0.735", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } } // Armor if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.51", "0.125 0.70"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencearmor, 1, .9f, "0.15", "0.85")); LIVEelements.Add(XPUIPanel("0.13 0.51", "0.99 0.735", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.01 0.145", $"{armorperc - 0.01} 0.845", $"{LiveColorConverter(config.uitextColor.armorbar)} 0.70"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{currentarmor} / {armor}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); } // Level LIVEelements.Add(XPUIPanel("0 0.255", "0.125 0.44"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, levelicon, 1, .9f, "0.15", "0.95")); LIVEelements.Add(XPUIPanel("0.13 0.255", "0.99 0.480", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{XPLang("level", player.UserIDString)}: {xprecord.level} ({(int)levelpercent}%)", 1, 1.06f, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); // XP LIVEelements.Add(XPUIPanel("0 0", "0.125 0.185"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencexp, 1, .9f, "0.15", "0.80")); LIVEelements.Add(XPUIPanel("0.13 0", "0.99 0.23", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.01 0.135", $"{reqxpperc - 0.01} 0.845", $"{LiveColorConverter(config.uitextColor.xpbar)} 0.80"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{(int)remainingxp}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); #endregion break; case 4: #region LIVEloc4 // Live UI Box LIVEelements.Add(XPUIPanel2("1 1", "1 1", "-210 -126", "-10 -16", "0.5 0.5 0.5 0"), "Hud", XPerienceLivePrimary); // Rank if (config.xpLevelRanks.enableresetranks && config.xpLevelRanks.showrankinliveui) { if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.76", "0.125 0.95"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.13 0.76", "0.99 0.99", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } else { LIVEelements.Add(XPUIPanel("0 0.51", "0.125 0.70"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.13 0.51", "0.99 0.735", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } } // Armor if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.51", "0.125 0.70"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencearmor, 1, .9f, "0.15", "0.85")); LIVEelements.Add(XPUIPanel("0.13 0.51", "0.99 0.735", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.01 0.145", $"{armorperc - 0.01} 0.845", $"{LiveColorConverter(config.uitextColor.armorbar)} 0.70"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{currentarmor} / {armor}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); } // Level LIVEelements.Add(XPUIPanel("0 0.255", "0.125 0.44"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, levelicon, 1, .9f, "0.15", "0.95")); LIVEelements.Add(XPUIPanel("0.13 0.255", "0.99 0.480", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{XPLang("level", player.UserIDString)}: {xprecord.level} ({(int)levelpercent}%)", 1, 1.06f, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); // XP LIVEelements.Add(XPUIPanel("0 0", "0.125 0.185"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencexp, 1, .9f, "0.15", "0.80")); LIVEelements.Add(XPUIPanel("0.13 0", "0.99 0.23", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.01 0.135", $"{reqxpperc - 0.01} 0.845", $"{LiveColorConverter(config.uitextColor.xpbar)} 0.80"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{(int)remainingxp}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); #endregion break; case 5: #region LIVEloc5 // Live UI Box LIVEelements.Add(XPUIPanel2("0.5 0", "0.5 0", "-200 0", "181.5 115", "0 0 0 0"), "Hud", XPerienceLivePrimary); // Rank if (config.xpLevelRanks.enableresetranks && config.xpLevelRanks.showrankinliveui) { if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.845", "0.06 1"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.062 0.845", "0.995 0.99", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } else { LIVEelements.Add(XPUIPanel("0 0.69", "0.06 0.80"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, rank.name, 1, .9f, "0.05", "0.90")); LIVEelements.Add(XPUIPanel("0.062 0.69", "0.995 0.825", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{rank.name}", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.50 0.05 0.05 0.70"), XPerienceLiveData); } } // Armor if (xprecord.Might > 0 && config.might.armor > 0) { LIVEelements.Add(XPUIPanel("0 0.69", "0.06 0.80"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencearmor, 1, .9f, "0.17", "0.82")); LIVEelements.Add(XPUIPanel("0.062 0.69", "0.995 0.825", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0 0.015", $"{armorperc - 0.002} 0.90", $"{LiveColorConverter(config.uitextColor.armorbar)} 0.70"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{currentarmor} / {armor}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); } // Level LIVEelements.Add(XPUIPanel("0 0", "0.06 0.12"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, levelicon, 1, .9f, "0.17", "0.82")); LIVEelements.Add(XPUIPanel("0.062 0", "0.492 0.14", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUILabel($"{XPLang("level", player.UserIDString)}: {xprecord.level} ({(int)levelpercent}%)", 1, 1.06f, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); // XP LIVEelements.Add(XPUIPanel("0.505 0", "0.56 0.12"), XPerienceLivePrimary, XPerienceLiveIcon); LIVEelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencexp, 1, .9f, "0.15", "0.80")); LIVEelements.Add(XPUIPanel("0.562 0", "0.995 0.14", "0.6 0.6 0.6 0.25"), XPerienceLivePrimary, XPerienceLiveData); LIVEelements.Add(XPUIPanel("0.015 0.1", $"{reqxpperc - 0.001} 0.9", $"{LiveColorConverter(config.uitextColor.xpbar)} 0.80"), XPerienceLiveData); LIVEelements.Add(XPUILabel($"{(int)remainingxp}", 1, 1, TextAnchor.MiddleLeft, 15, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveData); #endregion break; case 6: break; } CuiHelper.AddUi(player, LIVEelements); } private void DashPanel(BasePlayer player, bool active, BaseMountable entity) { if (player == null || !player.userID.Get().IsSteamId() || player.IsNpc || entity == null) return; DestroyUi(player, XPerienceLiveDashPanel); XPRecord xprecord = GetXPRecord(player); if (xprecord == null || xprecord.UILocation == 0) { DestroyUi(player, XPerienceLiveDashPanel); return; } if (!active) { DestroyUi(player, XPerienceLiveDashPanel); DashPanelTimer?.Destroy(); return; } DashPanelTimer = timer.Every(2f, () => { DestroyUi(player, XPerienceLiveDashPanel); var Dashelements = new CuiElementContainer(); // Get Fuel int fuel = GetFuel(entity); double fuelpercent = (fuel / 500.0) - 0.01; double fuelpercentd = Math.Ceiling((fuel / 500.0) * 100); // Get Speed string speedometer = GetSpeed(player, entity); // DashPanel Locations switch (xprecord.UILocation) { case 1: if (xprecord.Might > 0 && !xprecord.DisableRank && config.xpLevelRanks.enableresetranks && config.xpLevelRanks.showrankinliveui) { Dashelements.Add(XPUIPanel2("1 0", "1 0", "-392 125", "-210 150", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } else if ((xprecord.Might <= 0 || config.might.armor <= 0) && (xprecord.DisableRank || !config.xpLevelRanks.enableresetranks || !config.xpLevelRanks.showrankinliveui)) { Dashelements.Add(XPUIPanel2("1 0", "1 0", "-392 67", "-210 92", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } else if ((xprecord.Might > 0 && (!config.xpLevelRanks.enableresetranks || !config.xpLevelRanks.showrankinliveui || xprecord.DisableRank)) || (xprecord.Might <= 0 && (!xprecord.DisableRank || config.xpLevelRanks.enableresetranks || config.xpLevelRanks.showrankinliveui))) { Dashelements.Add(XPUIPanel2("1 0", "1 0", "-392 95", "-210 120", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } break; case 2: if (xprecord.Might > 0 && !xprecord.DisableRank && config.xpLevelRanks.enableresetranks && config.xpLevelRanks.showrankinliveui) { Dashelements.Add(XPUIPanel2("0 0", "0 0", "10 125", "210 150", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } else if ((xprecord.Might <= 0 || config.might.armor <= 0) && (xprecord.DisableRank || !config.xpLevelRanks.enableresetranks || !config.xpLevelRanks.showrankinliveui)) { Dashelements.Add(XPUIPanel2("0 0", "0 0", "10 67", "210 92", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } else if ((xprecord.Might > 0 && (xprecord.DisableRank || !config.xpLevelRanks.enableresetranks || !config.xpLevelRanks.showrankinliveui)) || (xprecord.Might <= 0 && (!xprecord.DisableRank || config.xpLevelRanks.enableresetranks || config.xpLevelRanks.showrankinliveui))) { Dashelements.Add(XPUIPanel2("0 0", "0 0", "10 95", "210 120", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } break; case 3: Dashelements.Add(XPUIPanel2("0 1", "0 1", "10 -155", "210 -130", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); break; case 4: Dashelements.Add(XPUIPanel2("1 1", "1 1", "-210 -155", "-10 -130", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); break; case 5: if (xprecord.Might > 0 && !xprecord.DisableRank && config.xpLevelRanks.enableresetranks && config.xpLevelRanks.showrankinliveui) { Dashelements.Add(XPUIPanel2("0.5 0", "0.5 0", "-100 110", "83.5 135", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } else if ((xprecord.Might <= 0 || config.might.armor <= 0) && (xprecord.DisableRank || !config.xpLevelRanks.enableresetranks || !config.xpLevelRanks.showrankinliveui)) { Dashelements.Add(XPUIPanel2("0.5 0", "0.5 0", "-100 76", "83.5 101", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } else if ((xprecord.Might > 0 && (xprecord.DisableRank || !config.xpLevelRanks.enableresetranks || !config.xpLevelRanks.showrankinliveui)) || (xprecord.Might <= 0 && (!xprecord.DisableRank || config.xpLevelRanks.enableresetranks || config.xpLevelRanks.showrankinliveui))) { Dashelements.Add(XPUIPanel2("0.5 0", "0.5 0", "-100 92", "83.5 122", "0.5 0.5 0.5 0"), "Hud", XPerienceLiveDashPanel); Dashelements.Add(XPUIPanel("0 0", "1 1"), XPerienceLiveDashPanel, XPerienceLiveIcon); Dashelements.Add(XPUIImage(XPerienceLiveIcon, XPeriencedash, 1, .9f, "0", "1")); // Speedometer Dashelements.Add(XPUIPanel("0 0.2", "0.45 1", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveSpeedBar); Dashelements.Add(XPUILabel($"{speedometer}", 1, 1, TextAnchor.MiddleRight, 12, "0", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveSpeedBar); // Fuel Guage Dashelements.Add(XPUIPanel("0.61 0.35", "0.95 0.95", "0 0 0 0"), XPerienceLiveDashPanel, XPerienceLiveFuelBar); Dashelements.Add(XPUIPanel("0.01 0.04", $"{fuelpercent} 0.82", "1 0.5 0 0.80"), XPerienceLiveFuelBar); Dashelements.Add(XPUILabel($"{fuel} ({fuelpercentd}%)", 1, 1, TextAnchor.MiddleLeft, 11, "0.05", "1", "1.0 1.0 1.0 0.70"), XPerienceLiveFuelBar); } break; } CuiHelper.AddUi(player, Dashelements); }); } // Player Profile UIs public void PlayerProfile(BasePlayer player, BasePlayer otherplayer = null) { #region Player Data if (player == null) return; XPRecord xprecord = GetXPRecord(player); if (otherplayer != null) { xprecord = GetXPRecord(otherplayer); } if (otherplayer == null) otherplayer = player; if (xprecord == null) return; float buttonheight = (float)config.playerprofilesettings.menubuttonheight; int buttonfont = config.playerprofilesettings.menubuttonfont; var PlayerProfile = new CuiElementContainer(); string Color = ".1 .1 .1 .99"; #endregion // Main UI Outside if (config.playerprofilesettings.usebgimage || config.playerprofilesettings.usemenubgimage) { Color = "0 0 0 0"; } PlayerProfile.Add(new CuiPanel { Image = { Color = Color }, RectTransform = { AnchorMin = $"{config.playerprofilesettings.AnchorMin}", AnchorMax = $"{config.playerprofilesettings.AnchorMax}", OffsetMin = $"{config.playerprofilesettings.OffsetMin}", OffsetMax = $"{config.playerprofilesettings.OffsetMax}" }, CursorEnabled = true }, "Overlay", XPeriencePlayerProfileOutside); // Background Img if (config.playerprofilesettings.usebgimage) { BackgroundImgs bgimg = GetBGImg(xprecord.profilebg); PlayerProfile.Add(new CuiElement { Parent = XPeriencePlayerProfileOutside, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", bgimg.name), FadeIn = (float)config.playerprofilesettings.bgfadein, }, new CuiRectTransformComponent { AnchorMin = "0 0", AnchorMax = "1 1" } } }); } // Profiles PlayerProfile.Add(XPUIPanel(config.playerprofilesettings.InsideAnchorMin, config.playerprofilesettings.InsideAnchorMax, "0 0 0 0"), XPeriencePlayerProfileOutside, XPeriencePlayerProfile); string image = XPerienceicon; // Player Name, Rank, & Status if (otherplayer != null) { PlayerProfile.Add(XPUILabel($"{otherplayer.displayName}", 1, 0.040f, TextAnchor.LowerLeft, 10, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfile); if (config.playerprofilesettings.useplayeravatar) { image = otherplayer.UserIDString; } } else { PlayerProfile.Add(XPUILabel($"{player.displayName}", 1, 0.040f, TextAnchor.LowerLeft, 10, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfile); if (config.playerprofilesettings.useplayeravatar) { image = player.UserIDString; } } PlayerProfile.Add(new CuiElement { Parent = XPeriencePlayerProfile, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", image) }, new CuiRectTransformComponent { AnchorMin = $".001 {config.playerprofilesettings.menuheight}", AnchorMax = $"{config.playerprofilesettings.menuwidth - .003} .95" } } }); int row = 1; // Profile Menu UI PlayerProfile.Add(XPUIPanel("0 0", $"{config.playerprofilesettings.menuwidth} {config.playerprofilesettings.menuheight - .005}", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerProfileMenu); // Menu Background Img if (config.playerprofilesettings.usemenubgimage) { PlayerProfile.Add(new CuiElement { Parent = XPeriencePlayerProfileMenu, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", XPeriencemenubg), }, new CuiRectTransformComponent { AnchorMin = ".01 .01", AnchorMax = ".99 .99" } } }); } // Menu if (otherplayer == player) { PlayerProfile.Add(XPUIMenuButton($"xp.playercontrol main stats {otherplayer.userID}", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("profile", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); PlayerProfile.Add(XPUIMenuButton("xp.playercontrol data mentality stats", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("stats", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); PlayerProfile.Add(XPUIMenuButton("xp.playercontrol data woodcutter skills", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("skills", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } else { PlayerProfile.Add(XPUIMenuButton($"xp.playercontrol main stats {player.userID}", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("myprofile", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); PlayerProfile.Add(XPUIMenuButton($"xp.playercontrol main stats {otherplayer.userID}", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("profile", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } // Statistics Button PlayerProfile.Add(XPUIMenuButton($"xp.playercontrol history main {otherplayer.userID}", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("statistics", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); // Raids Button if (XPerienceAddon != null && RaidableBases != null && config.playerprofilesettings.profilemenuraids) { PlayerProfile.Add(XPUIMenuButton($"xp.playercontrol raids 0 {otherplayer.userID}", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("raids", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } // Settings Button if (otherplayer == player && config.playerprofilesettings.profilemenusettings) { PlayerProfile.Add(XPUIMenuButton("xp.playercontrol settings", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("settings", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } // Top Players Button if (config.defaultOptions.allowplayersearch) { PlayerProfile.Add(XPUIMenuButton("xp.playercontrol topplayers", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("topplayers", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } // Welcome Button if (XPerienceAddon != null && config.playerprofilesettings.profilemenuwelcome) { PlayerProfile.Add(XPUIMenuButton($"xp.playercontrol welcome", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("addonwelcome", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } // Help Button if (config.playerprofilesettings.profilemenuhelp) { PlayerProfile.Add(XPUIMenuButton("xp.playercontrol help main", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("help", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } // Calulations Button if (config.playerprofilesettings.profilemenucalculations) { PlayerProfile.Add(XPUIMenuButton("xp.playercontrol calculationslevels 0 0", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("calculations", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } // Admin Button if (player.IsAdmin && permission.UserHasPermission(player.UserIDString, Admin)) { PlayerProfile.Add(XPUIMenuButton("xp.playercontrol admin", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("adminpanel", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); } // Close Button PlayerProfile.Add(XPUIMenuButton("xp.playercontrol close", row++, buttonheight, buttonfont, "0 0 0 .7", $" ◉ {XPLang("close", player.UserIDString)}", ".03", ".97", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMenu); // UI End CuiHelper.AddUi(player, PlayerProfile); } public void PlayerProfileMain(BasePlayer player, BasePlayer otherplayer = null) { #region DataHandlers if (player == null) return; XPRecord xprecord = GetXPRecord(player); if (otherplayer != null) { xprecord = GetXPRecord(otherplayer); } if (otherplayer == null) otherplayer = player; if (xprecord == null) return; float height = 0.04f; int row = 1; int row2 = 1; var PlayerProfile = new CuiElementContainer(); // Stat & Skill Points int statpoints = xprecord.MentalityP + xprecord.DexterityP + xprecord.MightP + xprecord.CaptaincyP + xprecord.WeaponryP + xprecord.NinjaryP; int skillpoints = xprecord.WoodCutterP + xprecord.SmithyP + xprecord.MinerP + xprecord.ForagerP + xprecord.HunterP + xprecord.FisherP + xprecord.CrafterP + xprecord.FramerP + xprecord.TamerP + xprecord.MedicP + xprecord.ScavengerP + xprecord.ElectricianP + xprecord.DemolitionistP; // XP Calulations double lastlevel; double nextlevel; double currentxp; double reqxpperc; double remainingxp; double levelpercent; if (xprecord.experience == 0 || xprecord.level == 0) { lastlevel = 0; nextlevel = config.xpLevel.levelstart; currentxp = xprecord.experience - lastlevel; reqxpperc = currentxp / nextlevel; remainingxp = nextlevel - currentxp; levelpercent = reqxpperc * 100; } else { if (config.xpLevelRanks.increaselevelmultiplier) { lastlevel = xprecord.requiredxp - (xprecord.level * (config.xpLevel.levelmultiplier + (config.xpLevelRanks.levelmultiplierincrease * xprecord.rank))); } else { lastlevel = xprecord.requiredxp - (xprecord.level * config.xpLevel.levelmultiplier); } nextlevel = xprecord.requiredxp - lastlevel; currentxp = xprecord.experience - lastlevel; reqxpperc = currentxp / nextlevel; remainingxp = nextlevel - currentxp; levelpercent = reqxpperc * 100; } #endregion PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} 0.01", ".99 .99", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerProfileMain); // Display #region XPerienceData PlayerProfile.Add(XPUILabel($"◂════ ⋆ {XPLang("level", player.UserIDString)} / {XPLang("xp", player.UserIDString)} / {XPLang("points", player.UserIDString)} ⋆ ════▸", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); row++; // Level PlayerProfile.Add(XPUILabel($"▫ {XPLang("level", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", xprecord.level)} ({(int)levelpercent}%)", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); row++; // XP PlayerProfile.Add(XPUILabel($"▫ {XPLang("experience", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", (int)xprecord.experience)}", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); row++; // Next Level PlayerProfile.Add(XPUILabel($"▫ {XPLang("nextlevel", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", (int)xprecord.requiredxp)} ({String.Format("{0:N0}", (int)(xprecord.requiredxp - xprecord.experience))})", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); row++; // Points PlayerProfile.Add(XPUILabel($"▫ {XPLang("unusedstatpoints", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", xprecord.statpoint)}", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); row++; PlayerProfile.Add(XPUILabel($"▫ {XPLang("unusedskillpoints", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", xprecord.skillpoint)}", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); row++; PlayerProfile.Add(XPUILabel($"▫ {XPLang("totalspent", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", statpoints + skillpoints)}", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); if (XPerienceAddon != null) { double addonbooster = XPerienceAddon.Call("GetBoostersAmount", player) * 100; if (addonbooster > 0) { row++; PlayerProfile.Add(XPUILabel($"▫ {XPLang("xpboosteractive", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"+{String.Format("{0:N0}", addonbooster)}%", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); } } // Economics if (Economics != null && config.xpEcon.showbalanceprofile) { double balance = Economics.Call("Balance", player.UserIDString); if (otherplayer != null) { balance = Economics.Call("Balance", otherplayer.UserIDString); } row++; PlayerProfile.Add(XPUILabel($"▫ {XPLang("econbalance", player.UserIDString)}", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", balance)}", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); } // Daily Limit #region Daily Limits DailyLimitPlayer(otherplayer); DailyRecord dailyrecord = GetDailyRecord(otherplayer); double xplimit = 0; switch (config.dailyxpLimit.limitmultipliertype) { case 1: xplimit += config.dailyxpLimit.dailyxplimit + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitpercentage) * xprecord.level); break; case 2: xplimit += config.dailyxpLimit.dailyxplimit + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitmultiplier) * xprecord.level); break; } int statresetlimit = 0; int skillresetlimit = 0; bool UserHasSpecialGroup = false; // Check Special Groups var highestpriority = config.specialGroups.specialgroups.Values.Max(i => i.grouppriority); var getgrouplist = config.specialGroups.specialgroups.Values.OrderByDescending(i => i.grouppriority); restart: foreach (var specialgroup in getgrouplist) { UserHasSpecialGroup = permission.UserHasGroup(otherplayer.UserIDString, specialgroup.permissionname); if (UserHasSpecialGroup && specialgroup.grouppriority == highestpriority) { switch (config.dailyxpLimit.limitmultipliertype) { case 1: xplimit += specialgroup.dailyxplimit + ((specialgroup.dailyxplimit * config.dailyxpLimit.limitpercentage) * xprecord.level); break; case 2: xplimit += specialgroup.dailyxplimit + ((specialgroup.dailyxplimit * config.dailyxpLimit.limitmultiplier) * xprecord.level); break; } statresetlimit = specialgroup.dailystatlimitboost; skillresetlimit = specialgroup.dailyskilllimitboost; break; } else if (UserHasSpecialGroup && specialgroup.grouppriority != highestpriority) { highestpriority--; goto restart; } } var getlastxpreset = dailyrecord.lastexperiencereset - DateTime.Now; double lastxpresethours = double.Parse(getlastxpreset.Hours.ToString()); double lastxpresetmins = double.Parse(getlastxpreset.Minutes.ToString()); string dailyxpresetlabelhours = "hours"; string dailyxpresetlabelmins = "mins"; switch (config.dailyxpLimit.limitmultipliertype) { case 1: if (!UserHasSpecialGroup) { xplimit = config.dailyxpLimit.dailyxplimit + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitpercentage) * xprecord.level); } if (permission.UserHasPermission(otherplayer.UserIDString, VIP) && !UserHasSpecialGroup) { xplimit = config.dailyxpLimit.dailyxplimitvip + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitpercentage) * xprecord.level); } break; case 2: if (!UserHasSpecialGroup) { xplimit = config.dailyxpLimit.dailyxplimit + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitmultiplier) * xprecord.level); } if (permission.UserHasPermission(otherplayer.UserIDString, VIP) && !UserHasSpecialGroup) { xplimit = config.dailyxpLimit.dailyxplimitvip + ((config.dailyxpLimit.dailyxplimit * config.dailyxpLimit.limitmultiplier) * xprecord.level); } break; } if (config.dailyxpLimit.enabledailyxplimit || config.dailyresetLimit.enabledailyresetlimit) { row++; row++; PlayerProfile.Add(XPUILabel($"◂════ ⋆ Daily Limits ⋆ ════▸", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); row++; PlayerProfile.Add(XPUILabel($"▫ Resets In:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{(int)lastxpresethours} {dailyxpresetlabelhours} {(int)lastxpresetmins} {dailyxpresetlabelmins}", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); } if (config.dailyxpLimit.enabledailyxplimit) { if (xplimit > 0) { row++; PlayerProfile.Add(XPUILabel($"▫ XP Limit:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{(int)xplimit}", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.25", "1 1 1 1"), XPeriencePlayerProfileMain); row++; PlayerProfile.Add(XPUILabel($"▫ XP Remaining:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{(int)xplimit - (int)dailyrecord.dailyexperience}", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); } else { row++; PlayerProfile.Add(XPUILabel($"▫ XP Limit:", row, height, TextAnchor.MiddleLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"∞ ({(int)dailyrecord.dailyexperience})", row, height, TextAnchor.MiddleLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); } } if (config.dailyresetLimit.enabledailyresetlimit) { statresetlimit += config.dailyresetLimit.dailystatlimit; if (permission.UserHasPermission(otherplayer.UserIDString, VIP) && !UserHasSpecialGroup) { statresetlimit = config.dailyresetLimit.dailystatlimitvip; } if (statresetlimit > 0) { row++; PlayerProfile.Add(XPUILabel($"▫ Stat Resets:", row, height, TextAnchor.UpperLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{statresetlimit - dailyrecord.dailystatresets}", row, height, TextAnchor.UpperLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); } else { row++; PlayerProfile.Add(XPUILabel($"▫ Stat Resets:", row, height, TextAnchor.UpperCenter, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"∞ ({dailyrecord.dailystatresets})", row, height, TextAnchor.UpperCenter, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); } skillresetlimit += config.dailyresetLimit.dailyskilllimit; if (permission.UserHasPermission(otherplayer.UserIDString, VIP) && !UserHasSpecialGroup) { skillresetlimit = config.dailyresetLimit.dailyskilllimitvip; } if (skillresetlimit > 0) { row++; PlayerProfile.Add(XPUILabel($"▫ Skill Resets:", row, height, TextAnchor.UpperLeft, 11, "0.01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{skillresetlimit - dailyrecord.dailyskillresets}", row, height, TextAnchor.UpperLeft, 11, "0.16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); } else { row++; PlayerProfile.Add(XPUILabel($"▫ Skill Resets:", row, height, TextAnchor.UpperCenter, 11, "0", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"∞ ({dailyrecord.dailyskillresets})", row, height, TextAnchor.UpperCenter, 11, ".16", "0.50", "1 1 1 1"), XPeriencePlayerProfileMain); } } #endregion // Rank if (config.xpLevelRanks.enableresetranks) { Ranks rank = GetXPRank(xprecord.rank); row++; row++; PlayerProfile.Add(XPUILabel($"◂════ ⋆ {XPLang("rank", player.UserIDString)} ⋆ ════▸", row, height, TextAnchor.MiddleLeft, 12, ".01", ".5", "1 1 1 1"), XPeriencePlayerProfileMain); row++; PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, rank.name, row, height, "0.11", "0.16")); row++; PlayerProfile.Add(XPUILabel($"▫ {XPLang("rank", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, ".01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{rank.name}", row, height, TextAnchor.MiddleLeft, 11, ".16", ".5", "1 1 1 1"), XPeriencePlayerProfileMain); row++; PlayerProfile.Add(XPUILabel($"▫ {XPLang("ranksig", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, ".01", "0.16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{rank.sig}", row, height, TextAnchor.MiddleLeft, 11, ".16", ".5", "1 1 1 1"), XPeriencePlayerProfileMain); if (config.xpLevelRanks.showtruelevelprofile) { row++; PlayerProfile.Add(XPUILabel($"▫ {XPLang("ranklevel", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, ".01", ".16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", xprecord.truelevel)}", row, height, TextAnchor.MiddleLeft, 11, ".16", ".5", "1 1 1 1"), XPeriencePlayerProfileMain); } if (config.xpLevelRanks.showtruexpprofile) { row++; PlayerProfile.Add(XPUILabel($"▫ {XPLang("rankxp", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, ".01", ".16", "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", xprecord.trueexperience)}", row, height, TextAnchor.MiddleLeft, 11, ".16", ".5", "1 1 1 1"), XPeriencePlayerProfileMain); } if (xprecord.level >= config.xpLevel.maxlevel && xprecord.DisableRank) { row++; row++; PlayerProfile.Add(XPUIButton($"xp.playeredits rankup", row, height, 10, "0 1 0 .25", "Rank Up", ".05", ".25", TextAnchor.MiddleCenter, $"1 1 1 1"), XPeriencePlayerProfileMain); } } #endregion // Stat / Skills #region Stat/Skills PlayerProfile.Add(XPUILabel($"◂════ ⋆ {XPLang("stats", player.UserIDString)} ⋆ ════▸", row2, height, TextAnchor.MiddleLeft, 12, ".52", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; if (config.mentality.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencementality, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data mentality stats", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"mentality", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Mentality}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.dexterity.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencedexterity, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data dexterity stats", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"dexterity", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Dexterity}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.might.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencemight, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data might stats", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"might", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Might}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.weaponry.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPerienceweaponry, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data weaponry stats", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"weaponry", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Weaponry}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.ninjary.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPerienceninjary, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data ninjary stats", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"ninjary", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Ninjary}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.captaincy.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencecaptaincy, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data captaincy stats", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"captaincy", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Captaincy}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } row2++; PlayerProfile.Add(XPUILabel($"◂════ ⋆ {XPLang("skills", player.UserIDString)} ⋆ ════▸", row2, height, TextAnchor.MiddleLeft, 12, ".52", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; if (config.woodcutter.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencewoodcutter, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data woodcutter skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"woodcutter", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.WoodCutter}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.smithy.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencesmithy, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data smithy skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"smithy", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Smithy}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.miner.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPerienceminer, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data miner skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"miner", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Miner}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.forager.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPerienceforager, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data forager skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"forager", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Forager}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.hunter.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencehunter, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data hunter skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"hunter", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Hunter}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.crafter.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencecrafter, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data crafter skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"crafter", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Crafter}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.framer.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPerienceframer, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data framer skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"framer", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Framer}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.fisher.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencefisher, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data fisher skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"fisher", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Fisher}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.medic.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencemedic, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data medic skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"medic", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Medic}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.scavenger.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencescavenger, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data scavenger skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"scavenger", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Scavenger}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.electrician.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPerienceelectrician, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data electrician skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"electrician", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Electrician}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.demolitionist.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencedemolitionist, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data demolitionist skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"demolitionist", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Demolitionist}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } if (config.tamer.maxlvl > 0 && config.tamer.enabletame) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileMain, XPeriencetamer, row2, height, "0.52", "0.54")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data tamer skills", row2, height, 11, "0 0 0 0", $"▫ {XPLang($"tamer", player.UserIDString)}:", ".55", ".80", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileMain); PlayerProfile.Add(XPUILabel($"{xprecord.Tamer}", row2, height, TextAnchor.MiddleLeft, 11, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileMain); row2++; } #endregion // UI End CuiHelper.AddUi(player, PlayerProfile); } private void PlayerProfileStatsAndSkills(BasePlayer player, string data, string type = "stats") { if (player == null || data == null) return; #region Data XPRecord xprecord = GetXPRecord(player); float iconheight = 0.20f; float iconimgheight = 0.10f; double iconstats = IconAdjustment(.30, "stats"); double iconskills = IconAdjustment(.05, "skills"); float labelheight = 0.11f; float height = 0.05f; float buttonheight = 0.035f; string textcolor = "perk"; string level = "Max"; string cost = "N/A"; double levelcolor = 0; if (xprecord.rank > 0 && !xprecord.DisableRank && (config.xpLevelRanks.rankskillboost || config.xpLevelRanks.rankstatboost)) { textcolor = "ranklevel"; } int row = 6; int rowtwo = 6; int buttonrow = 25; bool showdata = false; bool levelup = false; bool reset = false; int totalpoints = 0; int pointsleft = 0; int pointsspent = 0; int pointsavailable = 0; int maxlevel = 0; int stat = 0; int skill = 0; switch (type) { case "stats": pointsavailable = xprecord.statpoint; break; case "skills": pointsavailable = xprecord.skillpoint; break; } #endregion #region Timers // Stat & Skill Timers TimeSpan interval; int timer = 0; switch (type) { case "stats": DateTime resettimestats = xprecord.resettimerstats.AddMinutes(config.defaultOptions.resetminsstats); if (permission.UserHasPermission(player.UserIDString, VIP)) { resettimestats = xprecord.resettimerstats.AddMinutes(config.defaultOptions.vipresetminstats); } interval = resettimestats - DateTime.Now; timer = (int)interval.TotalMinutes; if (config.defaultOptions.bypassadminreset && (player.IsAdmin || permission.UserHasPermission(player.UserIDString, Admin))) { timer = 0; } break; case "skills": DateTime resettimeskills = xprecord.resettimerskills.AddMinutes(config.defaultOptions.resetminsskills); if (permission.UserHasPermission(player.UserIDString, VIP)) { resettimeskills = xprecord.resettimerskills.AddMinutes(config.defaultOptions.vipresetminsskills); } interval = resettimeskills - DateTime.Now; timer = (int)interval.TotalMinutes; if (config.defaultOptions.bypassadminreset && (player.IsAdmin || permission.UserHasPermission(player.UserIDString, Admin))) { timer = 0; } break; } #endregion #region Daily Limits DailyLimitPlayer(player); DailyRecord dailyrecord = GetDailyRecord(player); int statresetlimit = 0; int skillresetlimit = 0; string resetlabel = ""; bool UserHasSpecialGroup = false; // Check Special Groups var highestpriority = config.specialGroups.specialgroups.Values.Max(i => i.grouppriority); var getgrouplist = config.specialGroups.specialgroups.Values.OrderByDescending(i => i.grouppriority); restart: foreach (var specialgroup in getgrouplist) { UserHasSpecialGroup = permission.UserHasGroup(player.UserIDString, specialgroup.permissionname); if (UserHasSpecialGroup && specialgroup.grouppriority == highestpriority) { statresetlimit = specialgroup.dailystatlimitboost; skillresetlimit = specialgroup.dailyskilllimitboost; break; } else if (UserHasSpecialGroup && specialgroup.grouppriority != highestpriority) { highestpriority--; goto restart; } } var getlastxpreset = dailyrecord.lastexperiencereset - DateTime.Now; double lastxpresethours = double.Parse(getlastxpreset.Hours.ToString()); double lastxpresetmins = double.Parse(getlastxpreset.Minutes.ToString()); if (config.dailyresetLimit.enabledailyresetlimit) { statresetlimit += config.dailyresetLimit.dailystatlimit; if (permission.UserHasPermission(player.UserIDString, VIP) && !UserHasSpecialGroup) { statresetlimit = config.dailyresetLimit.dailystatlimitvip; } skillresetlimit += config.dailyresetLimit.dailyskilllimit; if (permission.UserHasPermission(player.UserIDString, VIP) && !UserHasSpecialGroup) { skillresetlimit = config.dailyresetLimit.dailyskilllimitvip; } switch (type) { case "stats": if (statresetlimit > 0) { resetlabel = $"({statresetlimit - dailyrecord.dailystatresets})"; } break; case "skills": if (skillresetlimit > 0) { resetlabel = $"({skillresetlimit - dailyrecord.dailyskillresets})"; } break; } } #endregion // Main UI var StatsAndSkills = new CuiElementContainer(); if (config.playerprofilesettings.menutype == 1) { StatsAndSkills.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .904", ".99 1", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerProfileStatsAndSkillsMenu); switch (type) { case "stats": if (config.mentality.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencementality, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data mentality stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.dexterity.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencedexterity, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data dexterity stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.might.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencemight, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data might stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.weaponry.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceweaponry, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data weaponry stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.ninjary.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceninjary, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data ninjary stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.captaincy.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencecaptaincy, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data captaincy stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); } break; case "skills": if (config.woodcutter.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencewoodcutter, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data woodcutter skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.smithy.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencesmithy, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data smithy skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.miner.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceminer, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data miner skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.forager.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceforager, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data forager skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.hunter.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencehunter, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data hunter skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.crafter.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencecrafter, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data crafter skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.framer.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceframer, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data framer skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.fisher.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencefisher, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data fisher skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.medic.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencemedic, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data medic skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.scavenger.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencescavenger, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data scavenger skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.electrician.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceelectrician, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data electrician skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.demolitionist.maxlvl > 0) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencedemolitionist, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data demolitionist skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.tamer.enabletame && (PersonalAnimal != null)) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencetamer, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data tamer skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); } break; } StatsAndSkills.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .01", ".99 .92", "0 0 0 0.50"), XPeriencePlayerProfile, XPeriencePlayerProfileStatsAndSkills); } if (config.playerprofilesettings.menutype == 2) { StatsAndSkills.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .01", ".99 .99", "0 0 0 .50"), XPeriencePlayerProfile, XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, SelectedIcon("prev", data), 1, iconimgheight, ".05", ".1")); StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, SelectedIcon("next", data), 1, iconimgheight, ".9", ".95")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data {SelectedData("prev", data)} {type}", 1, iconimgheight, 22, "0 0 0 0", "⇦", ".01", ".1", TextAnchor.MiddleLeft, "0 1 0 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data {SelectedData("next", data)} {type}", 1, iconimgheight, 22, "0 0 0 0", "⇨", ".9", ".99", TextAnchor.MiddleRight, "0 1 0 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUIButton($"xp.playercontrol data {SelectedData("prev", data)} {type}", 3, height, 8, "0 0 0 0", $"({XPLang($"{SelectedData("prev", data.ToLower())}", player.UserIDString)})", ".01", ".12", TextAnchor.UpperCenter, "1 1 1 .25"), XPeriencePlayerProfileStatsAndSkills); ; StatsAndSkills.Add(XPUIButton($"xp.playercontrol data {SelectedData("next", data)} {type}", 3, height, 8, "0 0 0 0", $"({XPLang($"{SelectedData("next", data.ToLower())}", player.UserIDString)})", ".88", ".99", TextAnchor.UpperCenter, "1 1 1 .25"), XPeriencePlayerProfileStatsAndSkills); } // Show Stat or Skill Data StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, $"XPerience{data.ToLower()}", 1, iconheight, "0.45", "0.55")); StatsAndSkills.Add(XPUIButton($"xp.playercontrol help {data} {type}", 2, labelheight, 18, "0 0 0 0", $"{XPLang($"{data.ToLower()}", player.UserIDString)}", ".01", ".99", TextAnchor.LowerCenter, "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); switch (data) { // Stats case "mentality": // Disabled if (config.mentality.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Has Permission else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermMentality)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics stat = xprecord.Mentality; int MentalityCost = (xprecord.Mentality + 1) * config.mentality.costmultiplier; if (xprecord.Mentality < 1) { MentalityCost = config.mentality.pointcoststart; } if (xprecord.Mentality < config.mentality.maxlvl) { level = $"{xprecord.Mentality}"; cost = $"{MentalityCost}"; levelcolor = xprecord.Mentality; } for (int i = 1; i <= config.mentality.maxlvl; i++) { int costmultiplier = config.mentality.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.mentality.pointcoststart - config.mentality.costmultiplier; pointsleft = totalpoints - xprecord.MentalityP; pointsspent = xprecord.MentalityP; maxlevel = config.mentality.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Mentality < config.mentality.maxlvl && (MentalityCost <= xprecord.statpoint)) { levelup = true; } // Reset if (xprecord.Mentality > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Mentality > 0 || config.playerprofilesettings.showunusedeffects) && config.mentality.maxlvl != 0) { if (config.mentality.locktechtree && config.mentality.unlocktechtreelevel > 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("techtreestatus", player.UserIDString)}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); string techtreestatus = "Locked"; string techstatuscolor = "red"; if (xprecord.Mentality >= config.mentality.unlocktechtreelevel) { techtreestatus = "Unlocked"; techstatuscolor = "green"; } StatsAndSkills.Add(XPUILabel($"{techtreestatus}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.mentality.researchcost != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("researchcost", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{RankBoosts(player, "stat", (xprecord.Mentality * config.mentality.researchcost), config.Rankboostssettings.researchcost) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.mentality.researchspeed != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("researchspeed", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{RankBoosts(player, "stat", (xprecord.Mentality * config.mentality.researchspeed), config.Rankboostssettings.researchspeed) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.mentality.criticalchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("critchance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Mentality * config.mentality.criticalchance) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.mentality.criticaldgm != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("critdmgamount", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Mentality * config.mentality.criticaldgm) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.mentality.damageincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("damagenpc", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Mentality * config.mentality.damageincrease) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == stat) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "dexterity": // Disabled if (config.dexterity.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermDexterity)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics stat = xprecord.Dexterity; int DexterityCost = (xprecord.Dexterity + 1) * config.dexterity.costmultiplier; if (xprecord.Dexterity < 1) { DexterityCost = config.dexterity.pointcoststart; } if (xprecord.Dexterity < config.dexterity.maxlvl) { level = $"{xprecord.Dexterity}"; cost = $"{DexterityCost}"; levelcolor = xprecord.Dexterity; } for (int i = 1; i <= config.dexterity.maxlvl; i++) { int costmultiplier = config.dexterity.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.dexterity.pointcoststart - config.dexterity.costmultiplier; pointsleft = totalpoints - xprecord.DexterityP; pointsspent = xprecord.DexterityP; maxlevel = config.dexterity.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Dexterity < config.dexterity.maxlvl && (DexterityCost <= xprecord.statpoint)) { levelup = true; } // Reset if (xprecord.Dexterity > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Dexterity > 0 || config.playerprofilesettings.showunusedeffects) && config.dexterity.maxlvl != 0) { if (config.dexterity.blockchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("blockchance", player.UserIDString)}: (Damage)", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Dexterity * config.dexterity.blockchance) * 100}% (-{RankBoosts(player, "stat", (xprecord.Dexterity * config.dexterity.blockamount), config.Rankboostssettings.block) * 100}%)", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.dexterity.dodgechance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("dodgechance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Dexterity * config.dexterity.dodgechance) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.dexterity.reducearmordmg != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("armordmgabsorb", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{RankBoosts(player, "stat", (xprecord.Dexterity * config.dexterity.reducearmordmg), config.Rankboostssettings.armor) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.dexterity.horsespeed != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("horsespeed", player.UserIDString)}: (USE key)", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Dexterity * config.dexterity.horsespeed) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.dexterity.boatspeed != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("boatspeed", player.UserIDString)}: (RELOAD key)", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Dexterity * config.dexterity.boatspeed) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.dexterity.vehiclespeed != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("vehiclespeed", player.UserIDString)}: (RELOAD key)", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Dexterity * config.dexterity.vehiclespeed) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.dexterity.fuelreduce != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("vehiclefuelreduce", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Dexterity * config.dexterity.fuelreduce) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == stat) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "might": // Disabled if (config.might.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermMight)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics stat = xprecord.Might; int MightCost = (stat + 1) * config.might.costmultiplier; if (stat < 1) { MightCost = config.might.pointcoststart; } if (stat < config.might.maxlvl) { level = $"{stat}"; cost = $"{MightCost}"; levelcolor = stat; } for (int i = 1; i <= config.might.maxlvl; i++) { int costmultiplier = config.might.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.might.pointcoststart - config.might.costmultiplier; pointsleft = totalpoints - xprecord.MightP; pointsspent = xprecord.MightP; maxlevel = config.might.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Might < config.might.maxlvl && (MightCost <= xprecord.statpoint)) { levelup = true; } // Reset if (xprecord.Might > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Might > 0 || config.playerprofilesettings.showunusedeffects) && config.might.maxlvl != 0) { if (config.might.armor != 0) { double teatime = 0; double teaboost = 0; bool teamodified = false; // Check for TeaModifier Plugin and Values if (TeaModifiers != null) { teatime = TeaModifiers.Call("GetTeaDuration", player, xprecord.teatype, Modifier.ModifierType.Max_Health); teaboost = TeaModifiers.Call("GetTeaValue", player, xprecord.teatype, Modifier.ModifierType.Max_Health) * 100; teamodified = true; } if (GetTeaCooldown(player) != 0) { switch (GetTeaTypes(player)) { case "none": teaboost = 0; break; case "maxhealthtea": if (teamodified) { teaboost = (teaboost * config.might.armor) * xprecord.Might; } if (!teamodified) { teaboost = (5 * config.might.armor) * xprecord.Might; } break; case "maxhealthtea.advanced": if (teamodified) { teaboost = (teaboost * config.might.armor) * xprecord.Might; } if (!teamodified) { teaboost = (12.5 * config.might.armor) * xprecord.Might; } break; case "maxhealthtea.pure": if (teamodified) { teaboost = (teaboost * config.might.armor) * xprecord.Might; } if (!teamodified) { teaboost = (20 * config.might.armor) * xprecord.Might; } break; } teatime = Math.Ceiling(GetTeaCooldown(player) / 60); } StatsAndSkills.Add(XPUILabel($"{XPLang("armor", player.UserIDString)}: ({XPLang("tea", player.UserIDString)}: {XPLang($"teatype{xprecord.teatype}", player.UserIDString)} ({teatime} mins))", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Might * config.might.armor) * 100} (+{Math.Ceiling(teaboost)})", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.might.meleedmg != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("melee", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, "0.50", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{RankBoosts(player, "stat", (xprecord.Might * config.might.meleedmg), config.Rankboostssettings.meleedmg) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.might.metabolism != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("calories", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, "0.50", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(int)(RankBoosts(player, "stat", (config.might.metabolism * xprecord.Might) * player.metabolism.calories.max, config.Rankboostssettings.metabolism))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.might.metabolism != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("hydration", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, "0.50", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(int)(RankBoosts(player, "stat", (config.might.metabolism * xprecord.Might) * player.metabolism.hydration.max, config.Rankboostssettings.metabolism))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.might.bleedreduction != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("bleed", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, "0.50", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{(config.might.bleedreduction * xprecord.Might) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.might.radreduction != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("radiation", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, "0.50", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{(config.might.radreduction * xprecord.Might) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; StatsAndSkills.Add(XPUILabel($"{XPLang("radiationpoison", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, "0.50", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{(config.might.radreduction * xprecord.Might) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.might.heattolerance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("heat", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, "0.50", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(config.might.heattolerance * xprecord.Might) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.might.coldtolerance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("cold", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(config.might.coldtolerance * xprecord.Might) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == stat) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "weaponry": // Disabled if (config.weaponry.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermWeaponry)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics stat = xprecord.Weaponry; int WeaponryCost = (xprecord.Weaponry + 1) * config.weaponry.costmultiplier; if (xprecord.Weaponry < 1) { WeaponryCost = config.weaponry.pointcoststart; } if (xprecord.Weaponry < config.weaponry.maxlvl) { level = $"{xprecord.Weaponry}"; cost = $"{WeaponryCost}"; levelcolor = xprecord.Weaponry; } for (int i = 1; i <= config.weaponry.maxlvl; i++) { int costmultiplier = config.weaponry.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.weaponry.pointcoststart - config.weaponry.costmultiplier; pointsleft = totalpoints - xprecord.WeaponryP; pointsspent = xprecord.WeaponryP; maxlevel = config.weaponry.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Weaponry < config.weaponry.maxlvl && (WeaponryCost <= xprecord.statpoint)) { levelup = true; } // Reset if (xprecord.Weaponry > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Weaponry > 0 || config.playerprofilesettings.showunusedeffects) && config.weaponry.maxlvl != 0) { bool tooldurability = true; bool weapondurability = true; if (NeverWear != null && !config.weaponry.neverweartools) { tooldurability = false; } if (NeverWear != null && !config.weaponry.neverwearweapons) { weapondurability = false; } if (config.weaponry.reductionchance != 0 && (tooldurability || weapondurability)) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponrychance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".80", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Weaponry * config.weaponry.reductionchance) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if (config.weaponry.tool != 0 && tooldurability) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponrytools", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".80", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{(xprecord.Weaponry * config.weaponry.tool) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.weaponry.powertools != 0 && tooldurability) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponrypowertools", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".80", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{(xprecord.Weaponry * config.weaponry.powertools) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.weaponry.meleeweapons != 0 && weapondurability) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponryweaponsmelee", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".80", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{(xprecord.Weaponry * config.weaponry.meleeweapons) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.weaponry.projectileweapons != 0 && weapondurability) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponryweaponsprojectile", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".80", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"-{(xprecord.Weaponry * config.weaponry.projectileweapons) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } if (config.weaponry.maxammo != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponryweaponsammo", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Weaponry * config.weaponry.maxammo) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (XPerienceAddon != null) { double getaddonweaponryammochance = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "ammochance")); double getaddonreload = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "reload")); double getaddondistance = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "distance")); double getaddonrange = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "weaponry", "range")); if (getaddonweaponryammochance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponryaddonammochance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".80", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Weaponry * getaddonweaponryammochance) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (getaddondistance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponryaddondistance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".80", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Weaponry * getaddondistance) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (getaddonrange != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("weaponryaddonrange", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".80", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Weaponry * getaddonrange) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == stat) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "ninjary": // Disabled if (config.ninjary.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermNinjary)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics stat = xprecord.Ninjary; int NinjaryCost = (xprecord.Ninjary + 1) * config.ninjary.costmultiplier; if (xprecord.Ninjary < 1) { NinjaryCost = config.ninjary.pointcoststart; } if (xprecord.Ninjary < config.ninjary.maxlvl) { level = $"{xprecord.Ninjary}"; cost = $"{NinjaryCost}"; levelcolor = xprecord.Ninjary; } for (int i = 1; i <= config.ninjary.maxlvl; i++) { int costmultiplier = config.ninjary.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.ninjary.pointcoststart - config.ninjary.costmultiplier; pointsleft = totalpoints - xprecord.NinjaryP; pointsspent = xprecord.NinjaryP; maxlevel = config.ninjary.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Ninjary < config.ninjary.maxlvl && (NinjaryCost <= xprecord.statpoint)) { levelup = true; } // Reset if (xprecord.Ninjary > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Ninjary > 0 || config.playerprofilesettings.showunusedeffects) && config.ninjary.maxlvl != 0) { if (config.ninjary.patrolstealth != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("Ninjarypatrolstealth", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Ninjary * config.ninjary.patrolstealth) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.ninjary.ch47stealth != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("Ninjarych47stealth", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Ninjary * config.ninjary.ch47stealth) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.ninjary.bradleystealth != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("Ninjarybradleystealth", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Ninjary * config.ninjary.bradleystealth) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.ninjary.npcstealth != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("Ninjarynpcstealth", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Ninjary * config.ninjary.npcstealth) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.ninjary.turretstealth != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("Ninjaryturretstealth", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Ninjary * config.ninjary.turretstealth) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.ninjary.knifeincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("Ninjaryknifeincrease", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Ninjary * config.ninjary.knifeincrease) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.ninjary.swordincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("Ninjaryswordincrease", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Ninjary * config.ninjary.swordincrease) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == stat) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "captaincy": // Disabled if (config.captaincy.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermCaptaincy)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics stat = xprecord.Captaincy; int CaptaincyCost = (xprecord.Captaincy + 1) * config.captaincy.costmultiplier; if (xprecord.Captaincy < 1) { CaptaincyCost = config.captaincy.pointcoststart; } if (xprecord.Captaincy < config.captaincy.maxlvl) { level = $"{xprecord.Captaincy}"; cost = $"{CaptaincyCost}"; levelcolor = xprecord.Captaincy; } for (int i = 1; i <= config.captaincy.maxlvl; i++) { int costmultiplier = config.captaincy.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.captaincy.pointcoststart - config.captaincy.costmultiplier; pointsleft = totalpoints - xprecord.CaptaincyP; pointsspent = xprecord.CaptaincyP; maxlevel = config.captaincy.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Captaincy < config.captaincy.maxlvl && (CaptaincyCost <= xprecord.statpoint)) { levelup = true; } // Reset if (xprecord.Captaincy > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Captaincy > 0 || config.playerprofilesettings.showunusedeffects) && config.captaincy.maxlvl != 0) { if (config.captaincy.skillboost != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("captaincyskillboost", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Captaincy * config.captaincy.skillboost) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.captaincy.xpboost != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("captaincyxpboost", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{(xprecord.Captaincy * config.captaincy.xpboost) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.captaincy.captaincydistance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("captaincydistance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".5", ".75", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"+{RankBoosts(player, "stat", xprecord.Captaincy * config.captaincy.captaincydistance, config.Rankboostssettings.distance)} FT", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == stat) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; // Skills case "woodcutter": // Disabled if (config.woodcutter.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermWoodCutter)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.WoodCutter; int WoodCutterCost = (xprecord.WoodCutter + 1) * config.woodcutter.costmultiplier; if (xprecord.WoodCutter < 1) { WoodCutterCost = config.woodcutter.pointcoststart; } if (xprecord.WoodCutter < config.woodcutter.maxlvl) { level = $"{xprecord.WoodCutter}"; cost = $"{WoodCutterCost}"; levelcolor = xprecord.WoodCutter; } for (int i = 1; i <= config.woodcutter.maxlvl; i++) { int costmultiplier = config.woodcutter.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.woodcutter.pointcoststart - config.woodcutter.costmultiplier; pointsleft = totalpoints - xprecord.WoodCutterP; pointsspent = xprecord.WoodCutterP; maxlevel = config.woodcutter.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.WoodCutter < config.woodcutter.maxlvl && (WoodCutterCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.WoodCutter > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.WoodCutter > 0 || config.playerprofilesettings.showunusedeffects) && config.woodcutter.maxlvl != 0) { if (config.woodcutter.gatherrate != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("woodgather", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.woodcutter.gatherrate, "pos")}{RankBoosts(player, "skill", (xprecord.WoodCutter * config.woodcutter.gatherrate), config.Rankboostssettings.woodcuttergr)}x", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; StatsAndSkills.Add(XPUILabel($"{XPLang("clothgather", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.woodcutter.gatherrate, "pos")}{RankBoosts(player, "skill", (xprecord.WoodCutter * config.woodcutter.gatherrate), config.Rankboostssettings.woodcuttergr)}x", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.woodcutter.bonusincrease != 0) { StatsAndSkills.Add(XPUILabel($"Wood Bonus:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.woodcutter.bonusincrease, "pos")}{RankBoosts(player, "skill", (xprecord.WoodCutter * config.woodcutter.bonusincrease), config.Rankboostssettings.woodcutterbonus)}x", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.woodcutter.applechance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("woodapple", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.woodcutter.applechance, "pos")}{(xprecord.WoodCutter * config.woodcutter.applechance) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "smithy": // Disabled if (config.smithy.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermSmithy)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.WoodCutter; int SmithyCost = (xprecord.Smithy + 1) * config.smithy.costmultiplier; if (xprecord.Smithy < 1) { SmithyCost = config.smithy.pointcoststart; } if (xprecord.Smithy < config.smithy.maxlvl) { level = $"{xprecord.Smithy}"; cost = $"{SmithyCost}"; levelcolor = xprecord.Smithy; } for (int i = 1; i <= config.smithy.maxlvl; i++) { int costmultiplier = config.smithy.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.smithy.pointcoststart - config.smithy.costmultiplier; pointsleft = totalpoints - xprecord.SmithyP; pointsspent = xprecord.SmithyP; maxlevel = config.smithy.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Smithy < config.smithy.maxlvl && (SmithyCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Smithy > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Smithy > 0 || config.playerprofilesettings.showunusedeffects) && config.smithy.maxlvl != 0) { if (config.smithy.productionrate != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("productionrate", player.UserIDString)}: ({XPLang("productionamount", player.UserIDString)})", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.smithy.productionrate, "pos")}{RankBoosts(player, "skill", (xprecord.Smithy * config.smithy.productionrate), config.Rankboostssettings.smithypr) * 100}% (+{Math.Ceiling(RankBoosts(player, "skill", (xprecord.Smithy * config.smithy.productionrate) * 5, config.Rankboostssettings.smithypr))})", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.smithy.productionspeed != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("productionspeed", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.smithy.productionspeed, "pos")}{RankBoosts(player, "skill", (xprecord.Smithy * config.smithy.productionspeed), config.Rankboostssettings.smithyps) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.smithy.fuelconsumption != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("fuelconsumption", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.smithy.fuelconsumption, "neg")}{RankBoosts(player, "skill", (xprecord.Smithy * config.smithy.fuelconsumption), config.Rankboostssettings.smithyfc) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.smithy.metalchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("hmetalchance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.smithy.metalchance, "pos")}{RankBoosts(player, "skill", (xprecord.Smithy * config.smithy.metalchance), config.Rankboostssettings.smithyhqmc) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.smithy.metalamount != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("hmetalamount", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.smithy.metalamount, "pos")}{RankBoosts(player, "skill", xprecord.Smithy * config.smithy.metalamount, config.Rankboostssettings.smithyhqma)}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "miner": // Disabled if (config.miner.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermMiner)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.WoodCutter; int MinerCost = (xprecord.Miner + 1) * config.miner.costmultiplier; if (xprecord.Miner < 1) { MinerCost = config.miner.pointcoststart; } if (xprecord.Miner < config.miner.maxlvl) { level = $"{xprecord.Miner}"; cost = $"{MinerCost}"; levelcolor = xprecord.Miner; } for (int i = 1; i <= config.miner.maxlvl; i++) { int costmultiplier = config.miner.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.miner.pointcoststart - config.miner.costmultiplier; pointsleft = totalpoints - xprecord.MinerP; pointsspent = xprecord.MinerP; maxlevel = config.miner.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Miner < config.miner.maxlvl && (MinerCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Miner > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Miner > 0 || config.playerprofilesettings.showunusedeffects) && config.miner.maxlvl != 0) { if (config.miner.gatherrate != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("oregather", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.miner.gatherrate, "pos")}{RankBoosts(player, "skill", (xprecord.Miner * config.miner.gatherrate), config.Rankboostssettings.minergr)}x", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.miner.bonusincrease != 0) { StatsAndSkills.Add(XPUILabel($"Ore Bonus:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.miner.bonusincrease, "pos")}{RankBoosts(player, "skill", (xprecord.Miner * config.miner.bonusincrease), config.Rankboostssettings.minerbonus)}x", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.miner.fuelconsumption != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("fuelconsumptionhats", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.miner.fuelconsumption, "neg")}{RankBoosts(player, "skill", (xprecord.Miner * config.miner.fuelconsumption), config.Rankboostssettings.minerfuel) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.miner.metalchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("metalchance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.miner.metalchance, "pos")}{RankBoosts(player, "skill", (xprecord.Miner * config.miner.metalchance), config.Rankboostssettings.minermfc) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.miner.metalamount != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("metalamount", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.miner.metalamount, "pos")}{RankBoosts(player, "skill", xprecord.Miner * config.miner.metalamount, config.Rankboostssettings.minermfa)}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (XPerienceAddon != null) { double quarryboost = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "miner", "amount")); if (quarryboost != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("quarryboost", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", quarryboost, "pos")}{quarryboost * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; int quarryduration = Convert.ToInt32(XPerienceAddon.Call("GetExtraFeatures", player, "miner", "duration")); StatsAndSkills.Add(XPUILabel($"{XPLang("quarryduration", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{(xprecord.Miner * quarryduration) / 60} mins", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; int quarrycooldown = Convert.ToInt32(XPerienceAddon.Call("GetExtraFeatures", player, "miner", "cooldown")); StatsAndSkills.Add(XPUILabel($"{XPLang("quarrycooldown", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{((xprecord.Miner * 60) - quarrycooldown) / 60} mins", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } rowtwo++; StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "forager": // Disabled if (config.forager.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermForager)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.WoodCutter; int ForagerCost = (xprecord.Forager + 1) * config.forager.costmultiplier; if (xprecord.Forager < 1) { ForagerCost = config.forager.pointcoststart; } if (xprecord.Forager < config.forager.maxlvl) { level = $"{xprecord.Forager}"; cost = $"{ForagerCost}"; levelcolor = xprecord.Forager; } for (int i = 1; i <= config.forager.maxlvl; i++) { int costmultiplier = config.forager.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.forager.pointcoststart - config.forager.costmultiplier; pointsleft = totalpoints - xprecord.ForagerP; pointsspent = xprecord.ForagerP; maxlevel = config.forager.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Forager < config.forager.maxlvl && (ForagerCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Forager > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Forager > 0 || config.playerprofilesettings.showunusedeffects) && config.forager.maxlvl != 0) { if (config.forager.gatherrate != 0) { StatsAndSkills.Add(XPUILabel($"Ground {XPLang("gather", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.forager.gatherrate, "pos")}{RankBoosts(player, "skill", (xprecord.Forager * config.forager.gatherrate), config.Rankboostssettings.foragergr)}x", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.forager.chanceincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("seedbonus", player.UserIDString)}: (Amount)", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.forager.chanceincrease, "pos")}{(config.forager.chanceincrease * xprecord.Forager) * 100}% ({(config.forager.chanceincrease * xprecord.Forager) * 10})", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.forager.randomchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("randomitem", player.UserIDString)} Chance:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.forager.randomchance, "pos")}{RankBoosts(player, "skill", (xprecord.Forager * config.forager.randomchance), config.Rankboostssettings.foragerric) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.forager.grubwormincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("grubworm", player.UserIDString)} Chance:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.forager.grubwormincrease, "pos")}{(xprecord.Forager * config.forager.grubwormincrease) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (XPerienceAddon != null) { double recyclerchance = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "forager", "foragerrecyclerchance")); if (recyclerchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("addonrecyclerchance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", recyclerchance, "pos")}{(recyclerchance * xprecord.Forager) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } double recyclerspeed = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "forager", "foragerrecyclerspeed")); if (recyclerspeed != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("addonrecyclerspeed", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", recyclerspeed, "pos")}{(recyclerspeed * xprecord.Forager) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } rowtwo++; StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "hunter": // Disabled if (config.hunter.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermHunter)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Hunter; int HunterCost = (xprecord.Hunter + 1) * config.hunter.costmultiplier; if (xprecord.Hunter < 1) { HunterCost = config.hunter.pointcoststart; } if (xprecord.Hunter < config.hunter.maxlvl) { level = $"{xprecord.Hunter}"; cost = $"{HunterCost}"; levelcolor = xprecord.Hunter; } totalpoints = 0; for (int i = 1; i <= config.hunter.maxlvl; i++) { int costmultiplier = config.hunter.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.hunter.pointcoststart - config.hunter.costmultiplier; pointsleft = totalpoints - xprecord.HunterP; pointsspent = xprecord.HunterP; maxlevel = config.hunter.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Hunter < config.hunter.maxlvl && (HunterCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Hunter > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Hunter > 0 || config.playerprofilesettings.showunusedeffects) && config.hunter.maxlvl != 0) { if (config.hunter.gatherrate != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("foodgather", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.hunter.gatherrate, "pos")}{RankBoosts(player, "skill", (xprecord.Hunter * config.hunter.gatherrate), config.Rankboostssettings.huntergr)}x", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.hunter.bonusincrease != 0) { StatsAndSkills.Add(XPUILabel($"Food Bonus:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.hunter.bonusincrease, "pos")}{RankBoosts(player, "skill", (xprecord.Hunter * config.hunter.bonusincrease), config.Rankboostssettings.hunterbonus)}x", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.hunter.damageincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("damagewildlife", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.hunter.damageincrease, "pos")}{RankBoosts(player, "skill", (xprecord.Hunter * config.hunter.damageincrease), config.Rankboostssettings.hunterdmg) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.hunter.nightdmgincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("nightdamage", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.hunter.nightdmgincrease, "pos")}{RankBoosts(player, "skill", (xprecord.Hunter * config.hunter.nightdmgincrease), config.Rankboostssettings.hunterndmg) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.hunter.bowdmgincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("bowdamage", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.hunter.bowdmgincrease, "pos")}{(xprecord.Hunter * config.hunter.bowdmgincrease) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "crafter": // Disabled if (config.crafter.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermCrafter)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Crafter; int CrafterCost = (xprecord.Crafter + 1) * config.crafter.costmultiplier; if (xprecord.Crafter < 1) { CrafterCost = config.crafter.pointcoststart; } if (xprecord.Crafter < config.crafter.maxlvl) { level = $"{xprecord.Crafter}"; cost = $"{CrafterCost}"; levelcolor = xprecord.Crafter; } for (int i = 1; i <= config.crafter.maxlvl; i++) { int costmultiplier = config.crafter.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.crafter.pointcoststart - config.crafter.costmultiplier; pointsleft = totalpoints - xprecord.CrafterP; pointsspent = xprecord.CrafterP; maxlevel = config.crafter.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Crafter < config.crafter.maxlvl && (CrafterCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Crafter > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Crafter > 0 || config.playerprofilesettings.showunusedeffects) && config.crafter.maxlvl != 0) { if (config.crafter.craftspeed != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("craftspeed", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.crafter.craftspeed, "neg")}{RankBoosts(player, "skill", (config.crafter.craftspeed * xprecord.Crafter), config.Rankboostssettings.crafterspeed) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.crafter.craftcost != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("costreduction", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.crafter.craftcost, "neg")}{RankBoosts(player, "skill", (xprecord.Crafter * config.crafter.craftcost), config.Rankboostssettings.craftercost) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.crafter.repairincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("fullrepair", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{RankBoosts(player, "skill", (xprecord.Crafter * config.crafter.repairincrease), config.Rankboostssettings.crafterri) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.crafter.repaircost != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("repaircost", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.crafter.repaircost, "neg")}{RankBoosts(player, "skill", (xprecord.Crafter * config.crafter.repaircost), config.Rankboostssettings.crafterrc) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.crafter.conditionchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("highcond", player.UserIDString)}: (Amount)", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.crafter.conditionchance, "pos")}{RankBoosts(player, "skill", (config.crafter.conditionchance * xprecord.Crafter), config.Rankboostssettings.craftercc) * 100}% (+{config.crafter.conditionamount * 100}%)", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "framer": // Disabled if (config.framer.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermFramer)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Framer; int FramerCost = (xprecord.Framer + 1) * config.framer.costmultiplier; if (xprecord.Framer < 1) { FramerCost = config.framer.pointcoststart; } if (xprecord.Framer < config.framer.maxlvl) { level = $"{xprecord.Framer}"; cost = $"{FramerCost}"; levelcolor = xprecord.Framer; } for (int i = 1; i <= config.framer.maxlvl; i++) { int costmultiplier = config.framer.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.framer.pointcoststart - config.framer.costmultiplier; pointsleft = totalpoints - xprecord.FramerP; pointsspent = xprecord.FramerP; maxlevel = config.framer.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Framer < config.framer.maxlvl && (FramerCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Framer > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Framer > 0 || config.playerprofilesettings.showunusedeffects) && config.framer.maxlvl != 0) { if (config.framer.upgradecost != 0) { StatsAndSkills.Add(XPUILabel($"Building {XPLang("upgradecost", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.framer.upgradecost, "neg")}{RankBoosts(player, "skill", (config.framer.upgradecost * xprecord.Framer), config.Rankboostssettings.framerucost) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.framer.repairtime != 0) { StatsAndSkills.Add(XPUILabel($"Building {XPLang("repairtime", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.framer.repairtime, "neg")}{(xprecord.Framer * config.framer.repairtime) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.framer.repaircost != 0) { StatsAndSkills.Add(XPUILabel($"Building {XPLang("repaircost", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.framer.repaircost, "neg")}{RankBoosts(player, "skill", (xprecord.Framer * config.framer.repaircost), config.Rankboostssettings.framerrcost) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "fisher": // Disabled if (config.fisher.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermFisher)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Fisher; int FisherCost = (xprecord.Fisher + 1) * config.fisher.costmultiplier; if (xprecord.Fisher < 1) { FisherCost = config.fisher.pointcoststart; } if (xprecord.Fisher < config.fisher.maxlvl) { level = $"{xprecord.Fisher}"; cost = $"{FisherCost}"; levelcolor = xprecord.Fisher; } for (int i = 1; i <= config.fisher.maxlvl; i++) { int costmultiplier = config.fisher.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.fisher.pointcoststart - config.fisher.costmultiplier; pointsleft = totalpoints - xprecord.FisherP; pointsspent = xprecord.FisherP; maxlevel = config.fisher.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Fisher < config.fisher.maxlvl && (FisherCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Fisher > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Fisher > 0 || config.playerprofilesettings.showunusedeffects) && config.fisher.maxlvl != 0) { if (config.fisher.fishamountincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("fishamount", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.fisher.fishamountincrease, "pos")}{Math.Round(RankBoosts(player, "skill", xprecord.Fisher * config.fisher.fishamountincrease, config.Rankboostssettings.fisherfa))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.fisher.itemamountincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("fishitems", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.fisher.itemamountincrease, "pos")}{Math.Round(RankBoosts(player, "skill", xprecord.Fisher * config.fisher.itemamountincrease, config.Rankboostssettings.fisheria))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.fisher.oxygenreduction != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("fishoxygen", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.fisher.oxygenreduction, "neg")}{Math.Round((xprecord.Fisher * config.fisher.oxygenreduction) * 100)}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.fisher.oxygentankreduction != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("fishoxygentank", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.fisher.oxygentankreduction, "neg")}{Math.Round(RankBoosts(player, "skill", (xprecord.Fisher * config.fisher.oxygentankreduction), config.Rankboostssettings.fisherotr) * 100)}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "medic": // Disabled if (config.medic.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermMedic)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Medic; int MedicCost = (xprecord.Medic + 1) * config.medic.costmultiplier; if (xprecord.Medic < 1) { MedicCost = config.medic.pointcoststart; } if (xprecord.Medic < config.medic.maxlvl) { level = $"{xprecord.Medic}"; cost = $"{MedicCost}"; levelcolor = xprecord.Medic; } for (int i = 1; i <= config.medic.maxlvl; i++) { int costmultiplier = config.medic.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.medic.pointcoststart - config.medic.costmultiplier; pointsleft = totalpoints - xprecord.MedicP; pointsspent = xprecord.MedicP; maxlevel = config.medic.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Medic < config.medic.maxlvl && (MedicCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Medic > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, ".50", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Medic > 0 || config.playerprofilesettings.showunusedeffects) && config.medic.maxlvl != 0) { if (config.medic.recoverhp != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("medicrecover", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.medic.recoverhp, "pos")}{Math.Round(RankBoosts(player, "skill", xprecord.Medic * config.medic.recoverhp, config.Rankboostssettings.medicrecovera))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.medic.revivehp != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("medicrevive", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.medic.revivehp, "pos")}{Math.Round(RankBoosts(player, "skill", xprecord.Medic * config.medic.revivehp, config.Rankboostssettings.medicrevivala))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.medic.tools != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("medictools", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.medic.tools, "pos")}{Math.Round(RankBoosts(player, "skill", xprecord.Medic * config.medic.tools, config.Rankboostssettings.medictools))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.medic.crafttime != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("mediccrafting", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.medic.crafttime, "pos")}{Math.Round((xprecord.Medic * config.medic.crafttime) * 100)}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.medic.teas != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("medicteas", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.medic.teas, "pos")}{Math.Round((xprecord.Medic * config.medic.teas) * 100)}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (XPerienceAddon != null) { if (XPerienceAddon.Call("PassiveHealing", player)) { double healingtimer = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "medic", "medicpassivehealingtimer")); double healingamount = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "medic", "medicpassivehealingamount")); StatsAndSkills.Add(XPUILabel($"{XPLang("medichealingtimer", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{healingtimer - (xprecord.Medic / 2)} s", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; StatsAndSkills.Add(XPUILabel($"{XPLang("medichealingamount", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.medic.maxlvl, "pos")}{(xprecord.Medic * healingamount) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "scavenger": // Disabled if (config.scavenger.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermScavenger)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Scavenger; int ScavengerCost = (xprecord.Scavenger + 1) * config.scavenger.costmultiplier; if (xprecord.Scavenger < 1) { ScavengerCost = config.scavenger.pointcoststart; } if (xprecord.Scavenger < config.scavenger.maxlvl) { level = $"{xprecord.Scavenger}"; cost = $"{ScavengerCost}"; levelcolor = xprecord.Scavenger; } for (int i = 1; i <= config.scavenger.maxlvl; i++) { int costmultiplier = config.scavenger.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.scavenger.pointcoststart - config.scavenger.costmultiplier; pointsleft = totalpoints - xprecord.ScavengerP; pointsspent = xprecord.ScavengerP; maxlevel = config.scavenger.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Scavenger < config.scavenger.maxlvl && (ScavengerCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Scavenger > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Scavenger > 0 || config.playerprofilesettings.showunusedeffects) && config.scavenger.maxlvl != 0) { if (config.scavenger.scavlootchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("scavchance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.scavenger.scavlootchance, "pos")}{Math.Round(RankBoosts(player, "skill", (xprecord.Scavenger * config.scavenger.scavlootchance), config.Rankboostssettings.scavelc) * 100)}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.scavenger.scavmultiplier != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("scavmultiplier", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"x{Math.Ceiling(RankBoosts(player, "skill", xprecord.Scavenger * config.scavenger.scavmultiplier, config.Rankboostssettings.scavelm))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.scavenger.scavchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("customscavchance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.scavenger.scavchance, "pos")}{Math.Round(RankBoosts(player, "skill", (xprecord.Scavenger * config.scavenger.scavchance), config.Rankboostssettings.scavcic) * 100)}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.scavenger.customscavmultiplier != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("customscavmultiplier", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"x{Math.Ceiling(RankBoosts(player, "skill", xprecord.Scavenger * config.scavenger.customscavmultiplier, config.Rankboostssettings.scavelm))}", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (XPerienceAddon != null) { double getaddonscavengerchance = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "scavenger", "scavengervendingchance")); if (getaddonscavengerchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("addonscavengervendorchance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{(getaddonscavengerchance * xprecord.Scavenger) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; double getaddonscavengeramount = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "scavenger", "scavengervendingamount")); StatsAndSkills.Add(XPUILabel($"{XPLang("addonscavengervendoramount", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{(getaddonscavengeramount * xprecord.Scavenger) * 100}%", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "electrician": // Disabled if (config.electrician.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermElectrician)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Electrician; int ElectricianCost = (xprecord.Electrician + 1) * config.electrician.costmultiplier; if (xprecord.Electrician < 1) { ElectricianCost = config.electrician.pointcoststart; } if (xprecord.Electrician < config.electrician.maxlvl) { level = $"{xprecord.Electrician}"; cost = $"{ElectricianCost}"; levelcolor = xprecord.Electrician; } for (int i = 1; i <= config.electrician.maxlvl; i++) { int costmultiplier = config.electrician.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.electrician.pointcoststart - config.electrician.costmultiplier; pointsleft = totalpoints - xprecord.ElectricianP; pointsspent = xprecord.ElectricianP; maxlevel = config.electrician.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Electrician < config.electrician.maxlvl && (ElectricianCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Electrician > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Electrician > 0 || config.playerprofilesettings.showunusedeffects) && config.electrician.maxlvl != 0) { if (config.electrician.minsolarinput != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("minsolarpanelinput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{xprecord.Electrician * config.electrician.minsolarinput}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.solarpanelinputincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("solarpanelinput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.solarpanelinputincrease, "pos")}{(xprecord.Electrician * config.electrician.solarpanelinputincrease) * 100}%", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.solarpanelmaxincrease != 0) { int solarpanel = (int)((xprecord.Electrician * config.electrician.solarpanelinputincrease) * config.electrician.solarpaneldefault) + config.electrician.solarpaneldefault; StatsAndSkills.Add(XPUILabel($"{XPLang("solarpaneloutput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.solarpanelmaxincrease, "pos")}{(xprecord.Electrician * config.electrician.solarpanelmaxincrease) * 100}% ({solarpanel})", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.smallbatterymaxincrease != 0) { int smallbattery = (int)((xprecord.Electrician * config.electrician.smallbatterymaxincrease) * config.electrician.smallbatterydefault) + config.electrician.smallbatterydefault; StatsAndSkills.Add(XPUILabel($"{XPLang("smallbatteryoutput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.smallbatterymaxincrease, "pos")}{(xprecord.Electrician * config.electrician.smallbatterymaxincrease) * 100}% ({smallbattery})", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.mediumbatterymaxincrease != 0) { int mediumbattery = (int)((xprecord.Electrician * config.electrician.mediumbatterymaxincrease) * config.electrician.mediumbatterydefault) + config.electrician.mediumbatterydefault; StatsAndSkills.Add(XPUILabel($"{XPLang("mediumbatteryoutput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.mediumbatterymaxincrease, "pos")}{(xprecord.Electrician * config.electrician.mediumbatterymaxincrease) * 100}% ({mediumbattery})", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.largebatterymaxincrease != 0) { int largebattery = (int)((xprecord.Electrician * config.electrician.largebatterymaxincrease) * config.electrician.largebatterydefault) + config.electrician.largebatterydefault; StatsAndSkills.Add(XPUILabel($"{XPLang("largebatteryoutput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.largebatterymaxincrease, "pos")}{(xprecord.Electrician * config.electrician.largebatterymaxincrease) * 100}% ({largebattery})", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.smallgeneratormaxincrease != 0) { int smallgenerator = (int)((xprecord.Electrician * config.electrician.smallgeneratormaxincrease) * config.electrician.smallgeneratordefault) + config.electrician.smallgeneratordefault; StatsAndSkills.Add(XPUILabel($"{XPLang("smallgeneratoroutput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.smallgeneratormaxincrease, "pos")}{(xprecord.Electrician * config.electrician.smallgeneratormaxincrease) * 100}% ({smallgenerator})", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.electricwindmillincrease != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("windmilloutput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.electricwindmillincrease, "pos")}{(xprecord.Electrician * config.electrician.electricwindmillincrease) * 100}%", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.electricwindmillmaxincrease != 0) { int windmill = (int)((xprecord.Electrician * config.electrician.electricwindmillmaxincrease) * config.electrician.electricwindmilldefault) + config.electrician.electricwindmilldefault; StatsAndSkills.Add(XPUILabel($"{XPLang("windmillmaxoutput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.electricwindmillmaxincrease, "pos")}{(xprecord.Electrician * config.electrician.electricwindmillmaxincrease) * 100}% ({windmill})", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.electrician.testgeneratormaxincrease != 0) { int testgenerator = (int)((xprecord.Electrician * config.electrician.testgeneratormaxincrease) * config.electrician.testgeneratordefault) + config.electrician.testgeneratordefault; StatsAndSkills.Add(XPUILabel($"{XPLang("testgeneratoroutput", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.electrician.testgeneratormaxincrease, "pos")}{(xprecord.Electrician * config.electrician.testgeneratormaxincrease) * 100}% ({testgenerator})", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "demolitionist": // Disabled if (config.demolitionist.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermDemolitionist)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Demolitionist; int DemolitionistCost = (xprecord.Demolitionist + 1) * config.demolitionist.costmultiplier; if (xprecord.Demolitionist < 1) { DemolitionistCost = config.demolitionist.pointcoststart; } if (xprecord.Demolitionist < config.demolitionist.maxlvl) { level = $"{xprecord.Demolitionist}"; cost = $"{DemolitionistCost}"; levelcolor = xprecord.Demolitionist; } for (int i = 1; i <= config.demolitionist.maxlvl; i++) { int costmultiplier = config.demolitionist.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.demolitionist.pointcoststart - config.demolitionist.costmultiplier; pointsleft = totalpoints - xprecord.DemolitionistP; pointsspent = xprecord.DemolitionistP; maxlevel = config.demolitionist.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Demolitionist < config.demolitionist.maxlvl && (DemolitionistCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Demolitionist > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if ((xprecord.Demolitionist > 0 || config.playerprofilesettings.showunusedeffects) && config.demolitionist.maxlvl != 0) { if (config.demolitionist.explosivedudreduction != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("explosivedudreduction", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.demolitionist.explosivedudreduction, "neg")}{(xprecord.Demolitionist * config.demolitionist.explosivedudreduction) * 100}%", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.demolitionist.explosivedamage != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("explosivedamage", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.demolitionist.explosivedamage, "pos")}{(xprecord.Demolitionist * config.demolitionist.explosivedamage) * 100}%", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (config.demolitionist.explosiveradius != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("explosiveradius", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", config.demolitionist.explosiveradius, "pos")}{(xprecord.Demolitionist * config.demolitionist.explosiveradius) * 100}%", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (XPerienceAddon != null) { bool rocketlock = Convert.ToBoolean(XPerienceAddon.Call("GetExtraFeatures", player, "demolitionist", "rocketlock")); if (rocketlock) { double rocketlockchance = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "demolitionist", "rocketlockchance")); double rocketlocktime = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "demolitionist", "rocketlocktime")); int rocketlockmindistance = Convert.ToInt32(XPerienceAddon.Call("GetExtraFeatures", player, "demolitionist", "rocketlockmindistance")); double rocketlockdistanceincrease = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "demolitionist", "rocketlockdistanceincrease")); double rocketexplode = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "demolitionist", "rocketexplode")); double rocketspeed = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "demolitionist", "rocketspeed")); double rocketdmg = Convert.ToDouble(XPerienceAddon.Call("GetExtraFeatures", player, "demolitionist", "rocketdmg")); if (rocketlockdistanceincrease != 0) { rocketlockmindistance += ((int)(rocketlockdistanceincrease * rocketlockmindistance) * xprecord.Demolitionist); } if (rocketlockchance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("rocketlockchance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", rocketlockchance, "pos")}{(xprecord.Demolitionist * rocketlockchance) * 100}%", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (rocketlocktime != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("rocketlocktime", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{rocketlocktime - xprecord.Demolitionist}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (rocketlockmindistance != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("rocketlockmindistance", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{rocketlockmindistance}m", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (rocketexplode != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("rocketexplode", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{rocketexplode + xprecord.Demolitionist}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (rocketspeed != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("rocketspeed", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", rocketspeed, "pos")}{(rocketspeed * xprecord.Demolitionist) * 100}%", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (rocketdmg != 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("rocketdmg", player.UserIDString)}:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{ValueSymbol("perk", rocketdmg, "pos")}{(rocketdmg * xprecord.Demolitionist) * 100}%", rowtwo, height, TextAnchor.MiddleLeft, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; case "tamer": // Disabled if (config.tamer.maxlvl == 0) { StatsAndSkills.Add(XPUILabel($"{XPLang("disabledbyadmin", player.UserIDString, data)}", row, height, TextAnchor.LowerCenter, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } // Enabled / Permissions else if ((config.defaultOptions.userpermissions && permission.UserHasPermission(player.UserIDString, PermTamer)) || !config.defaultOptions.userpermissions) { // Statistics #region Statistics skill = xprecord.Tamer; int TamerCost = (xprecord.Tamer + 1) * config.tamer.costmultiplier; if (xprecord.Tamer < 1) { TamerCost = config.tamer.pointcoststart; } if (xprecord.Tamer < config.tamer.maxlvl) { level = $"{xprecord.Tamer}"; cost = $"{TamerCost}"; levelcolor = xprecord.Tamer; } for (int i = 1; i <= config.tamer.maxlvl; i++) { int costmultiplier = config.tamer.costmultiplier * i; totalpoints += costmultiplier; } totalpoints += config.tamer.pointcoststart - config.tamer.costmultiplier; pointsleft = totalpoints - xprecord.TamerP; pointsspent = xprecord.TamerP; maxlevel = config.tamer.maxlvl; showdata = true; #endregion // Options #region Options // Level Up if (xprecord.Tamer < config.tamer.maxlvl && (TamerCost <= xprecord.skillpoint)) { levelup = true; } // Reset if (xprecord.Tamer > 0 && !config.defaultOptions.hardcorenoreset) { reset = true; } #endregion // Abilities #region Abilities StatsAndSkills.Add(XPUILabel($"◂════ ⋆ Taming {XPLang("abilities", player.UserIDString)} ⋆ ════▸", rowtwo, height, TextAnchor.MiddleCenter, 10, "0.50", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; if (xprecord.Tamer >= config.tamer.chickenlevel && config.tamer.tamechicken) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, XPeriencechicken, rowtwo, height, ".60", ".62")); StatsAndSkills.Add(XPUILabel($"{XPLang("chicken", player.UserIDString)}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".63", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (xprecord.Tamer >= config.tamer.boarlevel && config.tamer.tameboar) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, XPerienceboar, rowtwo, height, ".60", ".62")); StatsAndSkills.Add(XPUILabel($"{XPLang("boar", player.UserIDString)}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".63", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (xprecord.Tamer >= config.tamer.staglevel && config.tamer.tamestag) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, XPeriencestag, rowtwo, height, ".60", ".62")); StatsAndSkills.Add(XPUILabel($"{XPLang("stag", player.UserIDString)}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".63", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (xprecord.Tamer >= config.tamer.wolflevel && config.tamer.tamewolf) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, XPeriencewolf, rowtwo, height, ".60", ".62")); StatsAndSkills.Add(XPUILabel($"{XPLang("wolf", player.UserIDString)}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".63", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (xprecord.Tamer >= config.tamer.bearlevel && config.tamer.tamebear) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, XPeriencebear, rowtwo, height, ".60", ".62")); StatsAndSkills.Add(XPUILabel($"{XPLang("bear", player.UserIDString)}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".63", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } if (xprecord.Tamer >= config.tamer.polarbearlevel && config.tamer.tamepolarbear) { StatsAndSkills.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkills, XPeriencepolarbear, rowtwo, height, ".60", ".62")); StatsAndSkills.Add(XPUILabel($"{XPLang("polarbear", player.UserIDString)}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".63", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } if (Backpacks != null && config.backpacksmod.enablebackpacks && config.backpacksmod.statorskill == data) { var sizes = config.backpacksmod.BackPackSlots; int sizeearned = 0; int maxsize = 0; foreach (var size in sizes) { if (size.Value.level == skill) { sizeearned = size.Value.slots; } if (size.Value.level == maxlevel) { maxsize = size.Value.slots; } } StatsAndSkills.Add(XPUILabel($"Backpack Size:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".50", ".85", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($" {sizeearned} / {maxsize} ", rowtwo, height, TextAnchor.MiddleCenter, 10, ".85", ".99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); rowtwo++; } #endregion } // Enabled / No Permission else { StatsAndSkills.Add(XPUILabel($"{XPLang("donothavepermission", player.UserIDString, data)}", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } break; } #region Show Data/Options if (showdata) { // Statistics #region Statistics StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("level", player.UserIDString)} ⋆ ════▸", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); row++; // Current Level StatsAndSkills.Add(XPUILabel($"▫ {XPLang("currentlevel", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.20", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{level}", row, height, TextAnchor.MiddleRight, 11, "0.20", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); row++; StatsAndSkills.Add(XPUILabel($"▫ {XPLang("maxlevel", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.20", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{maxlevel}", row, height, TextAnchor.MiddleRight, 11, "0.20", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); row++; row++; // Points StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("points", player.UserIDString)} ⋆ ════▸", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); row++; StatsAndSkills.Add(XPUILabel($"▫ {XPLang("nextlevel", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.20", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{String.Format("{0:N0}", cost)}", row, height, TextAnchor.MiddleRight, 10, "0.20", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); row++; StatsAndSkills.Add(XPUILabel($"▫ {XPLang("maxlevel", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.20", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{String.Format("{0:N0}", pointsleft)}", row, height, TextAnchor.MiddleRight, 10, "0.20", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); row++; StatsAndSkills.Add(XPUILabel($"▫ {XPLang("available", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.20", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{String.Format("{0:N0}", pointsavailable)}", row, height, TextAnchor.MiddleRight, 11, "0.20", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); row++; StatsAndSkills.Add(XPUILabel($"▫ {XPLang("used", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.20", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); StatsAndSkills.Add(XPUILabel($"{String.Format("{0:N0}", pointsspent)}", row, height, TextAnchor.MiddleRight, 10, "0.20", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); row++; row++; #endregion // Options #region Options StatsAndSkills.Add(XPUILabel($"◂════ ⋆ {XPLang("options", player.UserIDString)} ⋆ ════▸", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.30", "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); // Level Up if (levelup) { if (config.defaultOptions.enableconfirmationprompt && xprecord.enableconfirmationprompt) { StatsAndSkills.Add(XPUIButton($"xp.playeredits getprompt {type} {data.ToLower()} {player.UserIDString}", buttonrow, buttonheight, 10, "0 0 0 1", $"⇧ {XPLang("levelupbutton", player.UserIDString)} ⇧", ".05", ".25", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } else { switch (type) { case "stats": type = "stat"; break; case "skills": type = "skill"; break; } StatsAndSkills.Add(XPUIButton($"xp.playeredits {type} {data.ToLower()} {player.UserIDString}", buttonrow, buttonheight, 10, "0 0 0 1", $"⇧ {XPLang("levelupbutton", player.UserIDString)} ⇧", ".05", ".25", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } } buttonrow++; buttonrow++; // Reset if (reset) { if (timer > 0 && config.defaultOptions.restristresets) { StatsAndSkills.Add(XPUILabel($"Can Reset in {XPLang("canresetstats", player.UserIDString, timer)}", buttonrow, buttonheight, TextAnchor.MiddleCenter, 10, ".05", ".25", "1 0 0 1"), XPeriencePlayerProfileStatsAndSkills); } else { if (config.defaultOptions.enableconfirmationprompt && xprecord.enableconfirmationprompt) { StatsAndSkills.Add(XPUIButton($"xp.playercontrol getprompt {type} {data.ToLower()} {player.UserIDString}", buttonrow, buttonheight, 10, "0 0 0 1", $"⇩ {XPLang("reset", player.UserIDString)} ⇩ {resetlabel}", ".05", ".25", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } else { switch (type) { case "stats": type = "stat"; break; case "skills": type = "skill"; break; } StatsAndSkills.Add(XPUIButton($"xp.playercontrol reset {type} {data.ToLower()} {player.UserIDString}", buttonrow, buttonheight, 10, "0 0 0 1", $"⇩ {XPLang("reset", player.UserIDString)} ⇩ {resetlabel}", ".05", ".25", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } } } buttonrow++; buttonrow++; // Help if (config.playerprofilesettings.skillshelp) { StatsAndSkills.Add(XPUIButton($"xp.playercontrol help {data} {type}", buttonrow, buttonheight, 10, "0 0 0 1", $"【?】 {XPLang("help", player.UserIDString)} 【?】", ".05", ".25", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileStatsAndSkills); } #endregion } #endregion CuiHelper.AddUi(player, StatsAndSkills); } private void PlayerProfileRecords(BasePlayer player, string data, BasePlayer otherplayer = null, int page = 0, string ordertype = "timestamp", string order = "desc") { if (player == null || data == null) return; XPRecord xprecord = GetXPRecord(player); if (otherplayer != null) { xprecord = GetXPRecord(otherplayer); } if (otherplayer == null) otherplayer = player; var getplayer = otherplayer.UserIDString; float height = 0.045f; int font = 13; int current = 0; int row = 3; int rowtwo = 3; var Kills = new CuiElementContainer(); Kills.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .1", ".99 .99", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerProfileKills); switch (data) { // Main #region Main case "main": Kills.Add(XPUIButton($"xp.playercontrol history main {otherplayer.userID}", 1, height, font, "0 0 0 1", "〘 Main 〙", ".01", ".20", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history harvests {otherplayer.userID}", 1, height, font, "0 0 0 1", "Harvests", ".25", ".45", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); if (KillRecords != null) { Kills.Add(XPUIButton($"xp.playercontrol history killrecords {otherplayer.userID}", 1, height, font, "0 0 0 1", "Kills / Deaths", ".50", ".75", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); } if (XPerienceAddon != null) { Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} 0 timestamp desc", 1, height, font, "0 0 0 1", "History", ".80", ".99", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); } Kills.Add(XPUILabel($"◂════ ⋆ Player Info ⋆ ════▸", row, height, TextAnchor.MiddleLeft, 10, ".01", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; if (config.playerprofilesettings.playtime) { Kills.Add(XPUILabel($"▫ Playtime: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.secondsConnected)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.alivetime) { Kills.Add(XPUILabel($"▫ {XPLang("timealive", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsAlive)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.sleepingtime) { Kills.Add(XPUILabel($"▫ {XPLang("timesleeping", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsSleeping)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.swimingtime) { Kills.Add(XPUILabel($"▫ {XPLang("timeswimming", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsSwimming)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.drivingtime) { Kills.Add(XPUILabel($"▫ {XPLang("timedriving", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsDriving)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.flyingtime) { Kills.Add(XPUILabel($"▫ {XPLang("timeflying", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsFlying)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.boatingtime) { Kills.Add(XPUILabel($"▫ {XPLang("timeboating", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsBoating)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.basetime) { Kills.Add(XPUILabel($"▫ {XPLang("timeinbase", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsInBase)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.monumenttime) { Kills.Add(XPUILabel($"▫ {XPLang("timeinmonument", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsInMonument)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.wildernesstime) { Kills.Add(XPUILabel($"▫ {XPLang("timeinwild", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.lifeStory.secondsWilderness)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.metersran) { Kills.Add(XPUILabel($"▫ {XPLang("metersran", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{Math.Round(otherplayer.lifeStory.metersRun, 2)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.meterswalked) { Kills.Add(XPUILabel($"▫ {XPLang("meterswalk", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{Math.Round(otherplayer.lifeStory.metersWalked, 2)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.lastdmgrec) { Kills.Add(XPUILabel($"▫ {XPLang("timedmgrec", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "dmgrecieved", otherplayer.SecondsSinceAttacked)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.lastdmgrecby) { Kills.Add(XPUILabel($"▫ {XPLang("timedmgrecfrom", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerInfoValues(player, otherplayer.lastAttacker, "dmgrecieved")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.lastdmgdelt) { Kills.Add(XPUILabel($"▫ {XPLang("timedmgdelt", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerTimeValues(player, "", otherplayer.SecondsSinceDealtDamage)}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } if (config.playerprofilesettings.lastdmgdeltto) { Kills.Add(XPUILabel($"▫ {XPLang("timedeltto", player.UserIDString)}: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{PlayerInfoValues(player, otherplayer.lastDealtDamageTo, "dmgdelt")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".75", "1 1 1 1"), XPeriencePlayerProfileKills); row++; } break; #endregion // Harvests #region Harvests case "harvests": Kills.Add(XPUIButton($"xp.playercontrol history main {otherplayer.userID}", 1, height, font, "0 0 0 1", "Main", ".01", ".20", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history harvests {otherplayer.userID}", 1, height, font, "0 0 0 1", "〘 Harvests 〙", ".25", ".45", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); if (KillRecords != null) { Kills.Add(XPUIButton($"xp.playercontrol history killrecords {otherplayer.userID}", 1, height, font, "0 0 0 1", "Kills / Deaths", ".50", ".75", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); } if (XPerienceAddon != null) { Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} 0 timestamp desc", 1, height, font, "0 0 0 1", "History", ".80", ".99", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); } Kills.Add(XPUILabel($"◂════ ⋆ Harvests Total ⋆ ════▸", row, height, TextAnchor.MiddleLeft, 12, ".01", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Wood: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Wood}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Stone: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Stone}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Metal: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Metal}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Sulfur: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Sulfur}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Cactus: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Cactus}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Berries: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Berries}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Pumpkins: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Pumpkin}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Potatos: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Potato}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Corn: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Corn}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Mushrooms: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Mushroom}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Hemp: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Hemp}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Seeds: ", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{xprecord.Seed}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); // Column Two if (KillRecords != null) { Kills.Add(XPUILabel($"◂════ ⋆ Harvests Count ⋆ ════▸", rowtwo, height, TextAnchor.MiddleLeft, 12, "0.51", "99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Trees:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "trees")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Wood Picked Up:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "wood")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Ore Mined:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "oremined")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Ore Picked Up:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "orepickup")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Berries:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "berries")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Seeds:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "seed")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Hemp:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "hemp")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Potatos:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "potato")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Pumpkin:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "pumpkin")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Mushroom:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "mushroom")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Corn:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "corn")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Animal Harvested:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "basecorpse")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Corpse Harvested:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "npcplayercorpse")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; rowtwo++; Kills.Add(XPUILabel($"◂════ ⋆ Loot ⋆ ════▸", rowtwo, height, TextAnchor.MiddleLeft, 12, "0.51", "99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Loot Containers:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "lootcontainer")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Underwater Containers:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "underwaterlootcontainer")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Brad/Heli Crates:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "lockedbyentcrate")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Hackable Crates:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "hackablelockedcrate")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); } break; #endregion // Kill Records #region KillRecords case "killrecords": Kills.Add(XPUIButton($"xp.playercontrol history main {otherplayer.userID}", 1, height, font, "0 0 0 1", "Main", ".01", ".20", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history harvests {otherplayer.userID}", 1, height, font, "0 0 0 1", "Harvests", ".25", ".45", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); if (KillRecords != null) { Kills.Add(XPUIButton($"xp.playercontrol history killrecords {otherplayer.userID}", 1, height, font, "0 0 0 1", "〘 Kills / Deaths 〙", ".50", ".75", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); } if (XPerienceAddon != null) { Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} 0 timestamp desc", 1, height, font, "0 0 0 1", "History", ".80", ".99", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); } // Kills Kills.Add(XPUILabel($"◂════ ⋆ Kills ⋆ ════▸", row, height, TextAnchor.MiddleLeft, 12, ".01", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Chickens:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "chicken")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Boars:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "boar")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Stags:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "stag")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Wolves:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "wolf")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Bears:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "bear")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Polar Bears:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "polarbear")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Sharks:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "shark")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Horses:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "horse")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Fish:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "fish")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Scientist:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "scientistnpcnew")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Scare Crow:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "scarecrow")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Zombie:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "zombie")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Dwellers:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "tunneldweller")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Players:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "baseplayer")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Bradley APCs:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "bradleyapc")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Patrol Helicopters:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "patrolhelicopter")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); row++; Kills.Add(XPUILabel($"▫ Turret:", row, height, TextAnchor.MiddleLeft, 10, ".01", ".30", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "turret")}", row, height, TextAnchor.MiddleLeft, 10, ".31", ".50", "1 1 1 1"), XPeriencePlayerProfileKills); // Deaths Kills.Add(XPUILabel($"◂════ ⋆ Deaths ⋆ ════▸", rowtwo, height, TextAnchor.MiddleLeft, 13, "0.51", "99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Deaths:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "death")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); rowtwo++; Kills.Add(XPUILabel($"▫ Suicides:", rowtwo, height, TextAnchor.MiddleLeft, 10, ".51", ".80", "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"| {GetKillRecords(getplayer, "suicide")}", rowtwo, height, TextAnchor.MiddleLeft, 10, ".80", ".99", "1 1 1 1"), XPeriencePlayerProfileKills); break; #endregion // XPerience Addon Death Records #region DeathRecords case "killlist": if (XPerienceAddon != null) { var deathrecords = XPerienceAddon?.Call("GetDeathCache"); var deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.timestamp); int total = 0; switch (ordertype) { case "victim": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.victim); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.victim); order = "asc"; break; } break; case "attacker": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.attacker); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.attacker); order = "asc"; break; } break; case "weapon": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.weapon); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.weapon); order = "asc"; break; } break; case "lastdamage": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.lastdamage); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.lastdamage); order = "asc"; break; } break; case "distance": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.distance); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.distance); order = "asc"; break; } break; case "timestamp": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.timestamp); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.timestamp); order = "asc"; break; } break; } Kills.Add(XPUIButton($"xp.playercontrol history main {otherplayer.userID}", 1, height, font, "0 0 0 1", "Main", ".01", ".20", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history harvests {otherplayer.userID}", 1, height, font, "0 0 0 1", "Harvests", ".25", ".45", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); if (KillRecords != null) { Kills.Add(XPUIButton($"xp.playercontrol history killrecords {otherplayer.userID}", 1, height, font, "0 0 0 1", "Kills / Deaths", ".50", ".75", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); } if (XPerienceAddon != null) { Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} 0 timestamp desc", 1, height, font, "0 0 0 1", "〘 History 〙", ".80", ".99", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerProfileKills); } Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} {page} victim {order}", 3, height, 11, "0 0 0 0", "Victim", ".01", ".23", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} {page} attacker {order}", 3, height, 11, "0 0 0 0", "Attacker", ".24", ".47", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} {page} weapon {order}", 3, height, 11, "0 0 0 0", "Weapon", ".48", ".68", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} {page} lastdamage {order}", 3, height, 11, "0 0 0 0", "Damage", ".69", ".79", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} {page} distance {order}", 3, height, 11, "0 0 0 0", "Range", ".80", ".88", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileKills); Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.userID} {page} timestamp {order}", 3, height, 11, "0 0 0 0", "Time", ".89", ".99", TextAnchor.MiddleLeft, "1 1 1 1"), XPeriencePlayerProfileKills); foreach (var deaths in deathlist) { if (deaths.Value.victim.ToString() == otherplayer.UserIDString || deaths.Value.attacker.ToString() == otherplayer.UserIDString) { // Victim var victimname = deaths.Value.victimname; var victim = FindPlayer(deaths.Value.victim.ToString()); if (victimname == null) { victimname = deaths.Value.victim; if (deaths.Value.victim.IsSteamId()) { if (victim != null) { victimname = victim.displayName; } } } // Attacker var attackername = deaths.Value.attackername; var attacker = FindPlayer(deaths.Value.attacker.ToString()); if (attackername == null) { attackername = deaths.Value.attacker; if (deaths.Value.attacker.IsSteamId()) { if (attacker != null) { attackername = attacker.displayName; } } } // Show Player Death Records if (current >= page && current < page + 20) { int pos = ((current + 3) - page); string color = "1 1 1 1"; if (current % 2 == 0) { color = ".5 .5 .5 1"; } var timestamp = ConvertUnixTimeStampToDateTime((int)deaths.Value.timestamp); string distance = $"{Math.Round(deaths.Value.distance)}m"; if (Math.Round(deaths.Value.distance) < 1) { distance = "<1m"; } Kills.Add(XPUILabel($"{current + 1}. {victimname}", pos + 1, height, TextAnchor.MiddleLeft, 10, ".01", ".23", $"{color}"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{attackername}", pos + 1, height, TextAnchor.MiddleLeft, 10, ".24", ".47", $"{color}"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{deaths.Value.weapon}", pos + 1, height, TextAnchor.MiddleLeft, 10, ".48", ".68", $"{color}"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{deaths.Value.lastdamage}", pos + 1, height, TextAnchor.MiddleLeft, 10, ".69", ".79", $"{color}"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{distance}", pos + 1, height, TextAnchor.MiddleLeft, 10, ".80", ".88", $"{color}"), XPeriencePlayerProfileKills); Kills.Add(XPUILabel($"{timestamp}", pos + 1, height, TextAnchor.MiddleLeft, 8, ".89", ".99", $"{color}"), XPeriencePlayerProfileKills); } current++; } } int back = page <= 20 ? 0 : page - 20; int next = page + 20 >= current ? page : page + 20; switch (ordertype) { case "victim": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.victim); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.victim); order = "asc"; break; } break; case "attacker": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.attacker); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.attacker); order = "asc"; break; } break; case "weapon": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.weapon); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.weapon); order = "asc"; break; } break; case "lastdamage": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.lastdamage); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.lastdamage); order = "asc"; break; } break; case "distance": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.distance); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.distance); order = "asc"; break; } break; case "timestamp": switch (order) { case "asc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderBy(i => i.Value.timestamp); order = "desc"; break; case "desc": deathlist = JsonConvert.DeserializeObject>((string)deathrecords).OrderByDescending(i => i.Value.timestamp); order = "asc"; break; } break; } foreach (var d in deathlist) { if (d.Value.victim.ToString() == otherplayer.UserIDString || d.Value.attacker.ToString() == otherplayer.UserIDString) { total++; } } Kills.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} 0", "1 .1", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerProfileKillsPages); // Prev Page if (page >= 1) { Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.UserIDString} {back} {ordertype} {order}", 1, 1f, 25, "0 0 0 0", "⇧", ".20", ".30", TextAnchor.MiddleCenter, "1 1 0 1"), XPeriencePlayerProfileKillsPages); } // Next Page if (page + 20 < total) { Kills.Add(XPUIButton($"xp.playercontrol history killlist {otherplayer.UserIDString} {next} {ordertype} {order}", 1, 1f, 25, "0 0 0 0", "⇩", ".70", ".80", TextAnchor.MiddleCenter, "1 1 0 1"), XPeriencePlayerProfileKillsPages); } } break; #endregion } CuiHelper.AddUi(player, Kills); } private void PlayerProfileRaids(BasePlayer player, int page = 0, BasePlayer otherplayer = null) { if (player == null) return; if (otherplayer == null) otherplayer = player; int current = 0; float height = 0.05f; int total = 0; string mode = "Easy"; string pvp = "[PVP]"; var image = XPerienceraideasy; // Page Title var Kills = new CuiElementContainer(); // Page Contents Kills.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .1", ".99 .99", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerProfileRaids); var raidrecords = XPerienceAddon.Call("GetRaidCache"); var raidlist = JsonConvert.DeserializeObject>((string)raidrecords); Kills.Add(XPUILabel("Completed Raids", 1, height, TextAnchor.MiddleLeft, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileRaids); foreach (var raids in raidlist) { foreach (var playerraids in raids.Value.raiders) { if (otherplayer.userID == playerraids) { switch (raids.Value.mode) { case 0: mode = "Easy"; image = XPerienceraideasy; break; case 1: mode = "Medium"; image = XPerienceraidmedium; break; case 2: mode = "Hard"; image = XPerienceraidhard; break; case 3: mode = "Expert"; image = XPerienceraidexpert; break; case 4: mode = "Nightmare"; image = XPerienceraidnightmare; break; } if (!raids.Value.allowPVP) { pvp = "[PVE]"; } // Show Player Death Records if (current >= page && current < page + 10) { int pos = ((current + 2) - page); var starttime = DateTime.Now - raids.Value.spawnDateTime; var endtime = DateTime.Now - raids.Value.despawnDateTime; int enddays = int.Parse(endtime.Days.ToString()); int endhours = int.Parse(endtime.Hours.ToString()); int endminutes = int.Parse(endtime.Minutes.ToString()); Kills.Add(XPUILabel($"{current + 1}. ", pos + 1, height, TextAnchor.MiddleLeft, 10, "0.01", "0.03", "1 1 1 1"), XPeriencePlayerProfileRaids); Kills.Add(XPUIImage(XPeriencePlayerProfileRaids, image, pos + 1, height, "0.03", "0.06")); Kills.Add(XPUILabel($"{mode} | {pvp}", pos + 1, height, TextAnchor.MiddleLeft, 10, "0.07", "0.20", "1 1 1 1"), XPeriencePlayerProfileRaids); Kills.Add(XPUILabel($"Location: [{PositionToGrid(raids.Value.Location)}] {raids.Value.Location}", pos + 1, height, TextAnchor.MiddleLeft, 10, "0.21", "0.54", "1 1 1 1"), XPeriencePlayerProfileRaids); Kills.Add(XPUILabel($"Despawned: {enddays} Days, {endhours} Hours, {endminutes} Mins", pos + 1, height, TextAnchor.MiddleLeft, 10, "0.55", "0.99", "1 1 1 1"), XPeriencePlayerProfileRaids); } current++; total++; } } } int back = page <= 10 ? 0 : page - 10; int next = page + 10 >= current ? page : page + 10; Kills.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} 0", "1 .1", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerProfileRaidsPages); // Prev Page if (page >= 1) { Kills.Add(XPUIButton($"xp.playercontrol raids {back} {otherplayer.userID}", 1, 1f, 25, "0 0 0 0", "⇧", ".20", ".30", TextAnchor.MiddleCenter, "1 1 0 1"), XPeriencePlayerProfileRaidsPages); } // Next Page if (page + 10 < total) { Kills.Add(XPUIButton($"xp.playercontrol raids {next} {otherplayer.userID}", 1, 1f, 25, "0 0 0 0", "⇩", ".70", ".80", TextAnchor.MiddleCenter, "1 1 0 1"), XPeriencePlayerProfileRaidsPages); } // UI End CuiHelper.AddUi(player, Kills); } private void PlayerTopList(BasePlayer player, int page, string selection, int number) { if (player == null) return; if (selection == null) { selection = "mentality"; } var TopList = new CuiElementContainer(); var height = 0.045f; int maxplayers = config.defaultOptions.topplayersperpage; var vals = GetTopXP(page, maxplayers, selection); if (vals == null) { return; } var index = 0; int row = 1; int start = number; TopList.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .1", ".99 .99", "0 0 0 0"), XPeriencePlayerProfile, XPerienceTopInner); TopList.Add(XPUIButton($"xp.topplayers 1 levels {SelectedData("prev", selection, "top")} 0", row, height, 10, "0 0 0 0", $"⇦ {XPLang(SelectedData("prev", selection, "top").ToString(), player.UserIDString)}", ".01", ".2", TextAnchor.MiddleLeft, "1 1 1 1"), XPerienceTopInner); TopList.Add(XPUILabel($"◂════ ⋆ {XPLang("topplayers", player.UserIDString)}: 〘{XPLang(selection, player.UserIDString)}〙⋆ ════▸", row, height, TextAnchor.MiddleCenter, 13, ".2", ".8", "1 1 1 1"), XPerienceTopInner); TopList.Add(XPUIButton($"xp.topplayers 1 levels {SelectedData("next", selection, "top")} 0", row, height, 10, "0 0 0 0", $"{XPLang(SelectedData("next", selection, "top").ToString(), player.UserIDString)} ⇨", ".8", ".99", TextAnchor.MiddleRight, "1 1 1 1"), XPerienceTopInner); row++; row++; TopList.Add(XPUILabel("Player:", row, height, TextAnchor.MiddleLeft, 12, ".03", ".5", "1 1 1 1"), XPerienceTopInner); if (config.xpLevelRanks.enableresetranks) { TopList.Add(XPUILabel("Rank (#):", row, height, TextAnchor.MiddleLeft, 12, ".5", ".75", "1 1 1 1"), XPerienceTopInner); } TopList.Add(XPUILabel($"{XPLang(selection, player.UserIDString)}:", row, height, TextAnchor.MiddleRight, 12, ".75", ".95", "1 1 1 1"), XPerienceTopInner); row++; int totalrows = row + maxplayers; for (row = 4; row < totalrows; row++) { if (vals.ElementAtOrDefault(index) == null) { continue; } var playerdata = vals.ElementAtOrDefault(index); if (playerdata == null) continue; Ranks rank = GetXPRank(playerdata.rank); var playerdatatype = playerdata.Mentality; switch (selection) { case "rank": playerdatatype = playerdata.rank; break; case "basiclevel": playerdatatype = (int)playerdata.level; break; case "basicexperience": playerdatatype = (int)playerdata.experience; break; case "level": playerdatatype = (int)playerdata.truelevel; break; case "experience": playerdatatype = (int)playerdata.trueexperience; break; case "mentality": playerdatatype = playerdata.Mentality; break; case "dexterity": playerdatatype = playerdata.Dexterity; break; case "might": playerdatatype = playerdata.Might; break; case "captaincy": playerdatatype = playerdata.Captaincy; break; case "weaponry": playerdatatype = playerdata.Weaponry; break; case "ninjary": playerdatatype = playerdata.Ninjary; break; case "woodcutter": playerdatatype = playerdata.WoodCutter; break; case "smithy": playerdatatype = playerdata.Smithy; break; case "miner": playerdatatype = playerdata.Miner; break; case "forager": playerdatatype = playerdata.Forager; break; case "hunter": playerdatatype = playerdata.Hunter; break; case "fisher": playerdatatype = playerdata.Fisher; break; case "crafter": playerdatatype = playerdata.Crafter; break; case "framer": playerdatatype = playerdata.Framer; break; case "medic": playerdatatype = playerdata.Medic; break; case "scavenger": playerdatatype = playerdata.Scavenger; break; case "electrician": playerdatatype = playerdata.Electrician; break; case "demolitionist": playerdatatype = playerdata.Demolitionist; break; case "tamer": playerdatatype = playerdata.Tamer; break; } if (playerdatatype > 0) { number++; if (row < maxplayers + 4) { if (playerdata.displayname == player.displayName) { TopList.Add(XPUILabel(("➤"), row, height, TextAnchor.MiddleLeft, 11, ".01", ".03", "1 .92 .016 1"), XPerienceTopInner); } else { if (config.defaultOptions.showonlinestatus) { if (playerdata.Status) { TopList.Add(XPUIImage(XPerienceTopInner, XPerienceonline, row, height, ".01", ".03")); } else { TopList.Add(XPUIImage(XPerienceTopInner, XPerienceoffline, row, height, ".01", ".03")); } } } if (FindPlayer(playerdata.id) != null) { TopList.Add(XPUIButton($"xp.playercontrol main stats {playerdata.id}", row, height, 11, "0 0 0 0", $"{number}. {rank.sig}{playerdata.displayname}", ".04", ".5"), XPerienceTopInner); } else { TopList.Add(XPUILabel($"{number}. {rank.sig}{playerdata.displayname}", row, height, TextAnchor.MiddleLeft, 11, ".04", ".5", ".5 .5 .5 1"), XPerienceTopInner); } if (config.xpLevelRanks.enableresetranks) { TopList.Add(XPUILabel($"{rank.name}", row, height, TextAnchor.MiddleLeft, 11, ".5", ".75", "1 1 1 1"), XPerienceTopInner); } TopList.Add(XPUILabel($"{String.Format("{0:N0}", playerdatatype)}", row, height, TextAnchor.MiddleRight, 11, ".75", ".95", "1 1 1 1"), XPerienceTopInner); } } index++; } // Page Selection TopList.Add(XPUIPanel(".16 0", "1 .1", "0 0 0 0"), XPeriencePlayerProfile, XPerienceTopPageSelection); if (page > 1) { TopList.Add(XPUIButton($"xp.topplayers {page - 1} stats {selection} {start - maxplayers}", 1, 1f, 25, "0 0 0 0", "⇧", ".20", ".30", TextAnchor.MiddleCenter, "1 1 0 1"), XPerienceTopPageSelection); } int totalplayers = start + maxplayers; if (number >= totalplayers) { TopList.Add(XPUIButton($"xp.topplayers {page + 1} stats {selection} {number}", 1, 1f, 25, "0 0 0 0", "⇩", ".70", ".80", TextAnchor.MiddleCenter, "1 1 0 1"), XPerienceTopPageSelection); } CuiHelper.AddUi(player, TopList); } private void PlayerSettings(BasePlayer player) { if (player == null) return; #region Layout float height = 0.05f; int row = 2; string lableL = ".01"; string lableR = ".30"; string value1L = ".30"; string value1R = ".35"; string value2L = ".36"; string value2R = ".40"; string value3R = ".60"; #endregion XPRecord xprecord = GetXPRecord(player); var Settings = new CuiElementContainer(); Settings.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .01", ".99 .99", "0 0 0 0.50"), XPeriencePlayerProfile, XPeriencePlayerProfileSettings); Settings.Add(XPUILabel($"◂════ ⋆ {XPLang("playersettings", player.UserIDString)} ⋆ ════▸", row, height, TextAnchor.MiddleCenter, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerProfileSettings); row++; // Live UI Location Selection #region LiveUI if (config.defaultOptions.liveuistatslocationmoveable) { Settings.Add(XPUILabel($"{XPLang("liveuiselection", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // UI Off Settings.Add(XPUIButton($"xp.playeredits settings liveui 0", row, height, 10, "0 0 0 0", "off", "0.26", "0.29", TextAnchor.MiddleCenter, $"{LiveUISelection("UI0", xprecord.UILocation)}"), XPeriencePlayerProfileSettings); // UI 1 Settings.Add(XPUIButton($"xp.playeredits settings liveui 1", row, height, 10, "0 0 0 0", "1", "0.30", "0.31", TextAnchor.MiddleCenter, $"{LiveUISelection("UI1", xprecord.UILocation)}"), XPeriencePlayerProfileSettings); // UI 2 Settings.Add(XPUIButton($"xp.playeredits settings liveui 2", row, height, 10, "0 0 0 0", "2", "0.32", "0.33", TextAnchor.MiddleCenter, $"{LiveUISelection("UI2", xprecord.UILocation)}"), XPeriencePlayerProfileSettings); // UI 3 Settings.Add(XPUIButton($"xp.playeredits settings liveui 3", row, height, 10, "0 0 0 0", "3", "0.34", "0.35", TextAnchor.MiddleCenter, $"{LiveUISelection("UI3", xprecord.UILocation)}"), XPeriencePlayerProfileSettings); // UI 4 Settings.Add(XPUIButton($"xp.playeredits settings liveui 4", row, height, 10, "0 0 0 0", "4", "0.36", "0.37", TextAnchor.MiddleCenter, $"{LiveUISelection("UI4", xprecord.UILocation)}"), XPeriencePlayerProfileSettings); // UI 5 Settings.Add(XPUIButton($"xp.playeredits settings liveui 5", row, height, 10, "0 0 0 0", "5", "0.38", "0.39", TextAnchor.MiddleCenter, $"{LiveUISelection("UI5", xprecord.UILocation)}"), XPeriencePlayerProfileSettings); row++; } #endregion // Dash Panel #region DashPanel if (config.defaultOptions.enabledashpanel) { // Enable DashPanel Settings.Add(XPUILabel($"Enable Dash Panel:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // Yes Settings.Add(XPUIButton($"xp.playeredits settings enabledash 1", row, height, 10, "0 0 0 0", "Yes", value1L, value1R, TextAnchor.MiddleCenter, $"{DashSelection(1, xprecord.dash)}"), XPeriencePlayerProfileSettings); // No Settings.Add(XPUIButton($"xp.playeredits settings enabledash 0", row, height, 10, "0 0 0 0", "No", value2L, value2R, TextAnchor.MiddleCenter, $"{DashSelection(0, xprecord.dash)}"), XPeriencePlayerProfileSettings); row++; if (xprecord.dash == 1) { // Speedometer Type Settings.Add(XPUILabel($"{XPLang("playerspeedometertype", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // MPH Settings.Add(XPUIButton($"xp.playeredits settings speedometertype 1", row, height, 10, "0 0 0 0", "MPH", value1L, value1R, TextAnchor.MiddleCenter, $"{DashSelection(1, xprecord.speedometertype)}"), XPeriencePlayerProfileSettings); // KMH Settings.Add(XPUIButton($"xp.playeredits settings speedometertype 2", row, height, 10, "0 0 0 0", "KMH", value2L, value2R, TextAnchor.MiddleCenter, $"{DashSelection(2, xprecord.speedometertype)}"), XPeriencePlayerProfileSettings); row++; } } #endregion // Ranks if (config.xpLevelRanks.enableresetranks && config.xpLevelRanks.allowplayerdisable) { // Auto Ranks Settings.Add(XPUILabel($"{XPLang("playerautoranks", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // Yes Settings.Add(XPUIButton($"xp.playeredits settings disableranks false", row, height, 10, "0 0 0 0", "Yes", value1L, value1R, TextAnchor.MiddleCenter, $"{DisableRankSelection("No", xprecord.DisableRank)}"), XPeriencePlayerProfileSettings); // No Settings.Add(XPUIButton($"xp.playeredits settings disableranks true", row, height, 10, "0 0 0 0", "No", value2L, value2R, TextAnchor.MiddleCenter, $"{DisableRankSelection("Yes", xprecord.DisableRank)}"), XPeriencePlayerProfileSettings); row++; } // Prompt Box if (config.defaultOptions.enableconfirmationprompt) { // Disable Prompt Settings.Add(XPUILabel($"{XPLang("playerconfirmationprompt", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // Yes Settings.Add(XPUIButton($"xp.playeredits settings prompt true", row, height, 10, "0 0 0 0", "Yes", value1L, value1R, TextAnchor.MiddleCenter, $"{DisableSelection("Yes", xprecord.enableconfirmationprompt)}"), XPeriencePlayerProfileSettings); // No Settings.Add(XPUIButton($"xp.playeredits settings prompt false", row, height, 10, "0 0 0 0", "No", value2L, value2R, TextAnchor.MiddleCenter, $"{DisableSelection("No", xprecord.enableconfirmationprompt)}"), XPeriencePlayerProfileSettings); row++; } // Chat Notify if (config.defaultOptions.showchatnotifications) { // Disable Chat Notify Settings.Add(XPUILabel($"Show Chat Notifications:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // Yes Settings.Add(XPUIButton($"xp.playeredits settings chatnotify true", row, height, 10, "0 0 0 0", "Yes", value1L, value1R, TextAnchor.MiddleCenter, $"{DisableSelection("Yes", xprecord.showchatnotifications)}"), XPeriencePlayerProfileSettings); // No Settings.Add(XPUIButton($"xp.playeredits settings chatnotify false", row, height, 10, "0 0 0 0", "No", value2L, value2R, TextAnchor.MiddleCenter, $"{DisableSelection("No", xprecord.showchatnotifications)}"), XPeriencePlayerProfileSettings); row++; } // Chat profile if (config.defaultOptions.showchatprofileonconnect) { // Disable Chat Profile Settings.Add(XPUILabel($"Show Stats In Chat:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // Yes Settings.Add(XPUIButton($"xp.playeredits settings chatprofile true", row, height, 10, "0 0 0 0", "Yes", value1L, value1R, TextAnchor.MiddleCenter, $"{DisableSelection("Yes", xprecord.showchatprofileonconnect)}"), XPeriencePlayerProfileSettings); // No Settings.Add(XPUIButton($"xp.playeredits settings chatprofile false", row, height, 10, "0 0 0 0", "No", value2L, value2R, TextAnchor.MiddleCenter, $"{DisableSelection("No", xprecord.showchatprofileonconnect)}"), XPeriencePlayerProfileSettings); row++; } // Chat XP Settings.Add(XPUILabel($"Show XP Gain in Chat:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // Yes Settings.Add(XPUIButton($"xp.playeredits settings xpchat true", row, height, 10, "0 0 0 0", "Yes", value1L, value1R, TextAnchor.MiddleCenter, $"{DisableSelection("Yes", xprecord.showchatxp)}"), XPeriencePlayerProfileSettings); // No Settings.Add(XPUIButton($"xp.playeredits settings xpchat false", row, height, 10, "0 0 0 0", "No", value2L, value2R, TextAnchor.MiddleCenter, $"{DisableSelection("No", xprecord.showchatxp)}"), XPeriencePlayerProfileSettings); row++; // Addon Features if (XPerienceAddon != null) { // Welcome Panel if (config.playerprofilesettings.profilemenuwelcome) { Settings.Add(XPUILabel($"{XPLang("showaddonwelcome", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 11, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); // Yes Settings.Add(XPUIButton($"xp.playeredits settings welcomepanel true", row, height, 10, "0 0 0 0", "Yes", value1L, value1R, TextAnchor.MiddleCenter, $"{DisableSelection("Yes", xprecord.showwelcomepanel)}"), XPeriencePlayerProfileSettings); // No Settings.Add(XPUIButton($"xp.playeredits settings welcomepanel false", row, height, 10, "0 0 0 0", "No", value2L, value2R, TextAnchor.MiddleCenter, $"{DisableSelection("No", xprecord.showwelcomepanel)}"), XPeriencePlayerProfileSettings); row++; } // Damager Bar Selection Settings.Add(XPUILabel($"{XPLang("dmgbarskin", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); Settings.Add(XPUIButton($"xp.playercontrol opendmgskins", row, height, 10, "0 0 0 0", "〘 Open Skin Selection 〙", value1L, value3R, TextAnchor.MiddleLeft, "0 1 0 1"), XPeriencePlayerProfileSettings); row++; } // Profile Background if (config.playerprofilesettings.allowprofilebgchange) { Settings.Add(XPUILabel($"{XPLang("profilebg", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 10, lableL, lableR, "1 1 1 1"), XPeriencePlayerProfileSettings); Settings.Add(XPUIButton($"xp.playercontrol openbgoptions", row, height, 10, "0 0 0 0", "〘 Open BG Selection 〙", value1L, value3R, TextAnchor.MiddleLeft, "0 1 0 1"), XPeriencePlayerProfileSettings); row++; } // Fix Data Button #region FixData DateTime resettimedata = xprecord.playerfixdata.AddMinutes(config.defaultOptions.playerfixdatatimer); TimeSpan datainterval = resettimedata - DateTime.Now; int datatimer = (int)datainterval.TotalMinutes; var button = $"{XPLang("playerfixdatabutton", player.UserIDString)}"; if (!config.defaultOptions.restristresets || config.defaultOptions.bypassadminreset && player.IsAdmin && permission.UserHasPermission(player.UserIDString, XPerience.Admin)) { datatimer = 0; } if (datatimer > 0) { button = $"{XPLang("resettimerdata", player.UserIDString, datatimer)}"; } if (!config.defaultOptions.disableplayerfixdata || (config.defaultOptions.disableplayerfixdata && config.defaultOptions.bypassadminreset && player.IsAdmin && permission.UserHasPermission(player.UserIDString, XPerience.Admin))) { row++; row++; Settings.Add(XPUIButton("xp.playercontrol fix", row, height, 10, "0.5 0.0 0.0 0.7", $"〖 {button} 〗", ".01", ".21", TextAnchor.MiddleCenter), XPeriencePlayerProfileSettings); } #endregion CuiHelper.AddUi(player, Settings); } private void PlayerHelp(BasePlayer player, string data = "main", string type = "stats") { if (player == null) return; float iconheight = 0.20f; float iconimgheight = 0.10f; double iconstats = IconAdjustment(.30, "stats"); double iconskills = IconAdjustment(.05, "skills"); float labelheight = 0.11f; float height = 0.05f; var PlayerProfile = new CuiElementContainer(); if (data == "main") { PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .05", ".99 1", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUILabel($"{XPLang("xphelpnew", player.UserIDString, config.playerchatCommands.openplayerstats, config.playerchatCommands.showplayerstatschat, config.playerchatCommands.opentopplayers, config.playerchatCommands.playeraddstat, config.playerchatCommands.playeraddskill, config.playerchatCommands.playerresetstats, config.playerchatCommands.playerresetskills, config.playerchatCommands.playerliveuichange)}", 1, .5f, TextAnchor.MiddleLeft, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUILabel($"{XPLang("bindkey", player.UserIDString, config.playerchatCommands.openplayerstats)}", 2, .5f, TextAnchor.MiddleLeft, 12, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} 0", ".99 .05", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerProfileHelpPages); PlayerProfile.Add(XPUIButton($"xp.playercontrol help ui", 1, 1f, 13, "0 0 0 0", "Next Page ⇨", ".75", ".99", TextAnchor.MiddleRight, "1 1 0 1"), XPeriencePlayerProfileHelpPages); } else if (data == "ui") { PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .05", ".99 1", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUILabel($"{XPLang("uihelp", player.UserIDString, config.playerchatCommands.openplayerstats)}", 1, 1f, TextAnchor.MiddleLeft, 10, ".01", ".99", "1 1 1 1"), XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} 0", ".99 .05", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerProfileHelpPages); PlayerProfile.Add(XPUIButton($"xp.playercontrol help main", 1, 1f, 13, "0 0 0 0", "⇦ Prev Page", ".01", ".25", TextAnchor.MiddleLeft, "1 1 0 1"), XPeriencePlayerProfileHelpPages); } else { if (config.playerprofilesettings.menutype == 1) { PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .904", ".99 1", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerProfileStatsAndSkillsMenu); switch (type) { case "stats": if (config.mentality.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencementality, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help mentality stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.dexterity.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencedexterity, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help dexterity stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.might.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencemight, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help might stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.weaponry.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceweaponry, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help weaponry stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.ninjary.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceninjary, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help ninjary stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconstats += .07; } if (config.captaincy.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencecaptaincy, 1, 1f, $"{iconstats}", $"{iconstats + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help captaincy stats", 1, 1f, 22, "0 0 0 0", "", $"{iconstats}", $"{iconstats + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); } break; case "skills": if (config.woodcutter.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencewoodcutter, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help woodcutter skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.smithy.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencesmithy, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help smithy skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.miner.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceminer, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help miner skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.forager.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceforager, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help forager skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.hunter.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencehunter, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help hunter skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.crafter.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencecrafter, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help crafter skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.framer.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceframer, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help framer skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.fisher.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencefisher, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help fisher skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.medic.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencemedic, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help medic skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.scavenger.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencescavenger, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help scavenger skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.electrician.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPerienceelectrician, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help electrician skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.demolitionist.maxlvl > 0) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencedemolitionist, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help demolitionist skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); iconskills += .07; } if (config.tamer.enabletame && (PersonalAnimal != null)) { PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileStatsAndSkillsMenu, XPeriencetamer, 1, 1f, $"{iconskills}", $"{iconskills + .05}")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help tamer skills", 1, 1f, 22, "0 0 0 0", "", $"{iconskills}", $"{iconskills + .05}", TextAnchor.MiddleLeft, "0 0 0 0"), XPeriencePlayerProfileStatsAndSkillsMenu); } break; } PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .01", ".99 .92", "0 0 0 .5"), XPeriencePlayerProfile, XPeriencePlayerProfileHelp); } if (config.playerprofilesettings.menutype == 2) { PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .01", ".99 .99", "0 0 0 .5"), XPeriencePlayerProfile, XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileHelp, SelectedIcon("prev", data), 1, iconimgheight, "0.05", "0.1")); PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileHelp, SelectedIcon("next", data), 1, iconimgheight, "0.9", "0.95")); PlayerProfile.Add(XPUIButton($"xp.playercontrol help {SelectedData("prev", data)} {type}", 1, iconimgheight, 22, "0 0 0 0", "⇦", ".01", ".1", TextAnchor.MiddleLeft, "0 1 0 1"), XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUIButton($"xp.playercontrol help {SelectedData("next", data)} {type}", 1, iconimgheight, 22, "0 0 0 0", "⇨", ".9", ".99", TextAnchor.MiddleRight, "0 1 0 1"), XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUIButton($"xp.playercontrol help {SelectedData("prev", data)} {type}", 3, height, 8, "0 0 0 0", $"({XPLang($"{SelectedData("prev", data.ToLower())}", player.UserIDString)})", ".01", ".12", TextAnchor.UpperCenter, "1 1 1 .25"), XPeriencePlayerProfileHelp); ; PlayerProfile.Add(XPUIButton($"xp.playercontrol help {SelectedData("next", data)} {type}", 3, height, 8, "0 0 0 0", $"({XPLang($"{SelectedData("next", data.ToLower())}", player.UserIDString)})", ".88", ".99", TextAnchor.UpperCenter, "1 1 1 .25"), XPeriencePlayerProfileHelp); } // Page Info PlayerProfile.Add(XPUIImage(XPeriencePlayerProfileHelp, $"XPerience{data.ToLower()}", 1, iconheight, "0.45", "0.55")); PlayerProfile.Add(XPUIButton($"xp.playercontrol data {data} {type}", 2, labelheight, 18, "0 0 0 0", $"{XPLang($"{data.ToLower()}", player.UserIDString)}", ".01", ".99", TextAnchor.LowerCenter, "1 1 1 1"), XPeriencePlayerProfileHelp); PlayerProfile.Add(XPUIPanel(".01 .01", ".99 .75", "0 0 0 .25"), XPeriencePlayerProfileHelp, "about"); PlayerProfile.Add(XPUILabel($"{XPLang($"about{data.ToLower()}", player.UserIDString)}", 1, 1f, TextAnchor.UpperLeft, 12, "0", "1", "1 1 1 1"), "about"); } CuiHelper.AddUi(player, PlayerProfile); } private void PlayerCalculationPageLevels(BasePlayer player, int page = 0, int rank = 0) { var PlayerProfile = new CuiElementContainer(); #region Layout var height = 0.045f; int row = 1; int current = 0; var ranklable = ""; int count = 20; if (config.xpLevelRanks.enableresetranks && config.xpLevelRanks.increaselevelmultiplier) { ranklable = $"Rank = {rank}"; } #endregion PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .09", ".99 1", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{XPLang("calculationstitle", player.UserIDString)}", row, height, TextAnchor.MiddleLeft, 15, "0.01", "1", "1 1 1 1"), XPeriencePlayerCalculations); row++; row++; PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationslevels 0 0", row, height, 12, "0 0 0 1", "Levels", "0.02", "0.22", TextAnchor.MiddleCenter, "0 1 0 1"), XPeriencePlayerCalculations); if (config.xpLevelRanks.enableresetranks) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsranks 0", row, height, 12, "0 0 0 1", "Ranks", "0.23", "0.43", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); } PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsstats", row, height, 12, "0 0 0 1", "Stats", "0.44", "0.64", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsskills", row, height, 12, "0 0 0 1", "Skills", "0.65", "0.85", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); row++; // Max Level int startxp = (int)config.xpLevel.levelstart, reqxp = (int)config.xpLevel.levelmultiplier, reqxp2 = (int)config.xpLevelRanks.levelmultiplierincrease, maxlev = config.xpLevel.maxlevel - 1, totalreqxpmax = 0, totalreqxp = 0, b = 0, c = 0; for (int l = 0; l <= maxlev; l++) { if (config.xpLevelRanks.increaselevelmultiplier) { b = (reqxp + (reqxp2 * rank)) * l; totalreqxpmax += b; } else { b = reqxp * l; totalreqxpmax += b; } } PlayerProfile.Add(XPUILabel($"[Max Level XP Calculations] {ranklable}", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; PlayerProfile.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.xpLevel.maxlevel}", row, height, TextAnchor.MiddleLeft, 10, "0.25", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Total Required XP:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", totalreqxpmax + startxp)}", row, height, TextAnchor.MiddleLeft, 10, "0.75", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); // Level List row++; PlayerProfile.Add(XPUILabel($"[Per Level XP Calculations] {ranklable}", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerCalculations); row++; PlayerProfile.Add(XPUILabel($"{XPLang("level", player.UserIDString)}", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Requirement Increase", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Level Required XP", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUIPanel("0 0", "1 0.7", "0 0 0 0"), XPeriencePlayerCalculations, "LevelList"); var height2 = 0.052f; for (int i = 0; i <= maxlev; i++) { if (config.xpLevelRanks.increaselevelmultiplier) { c = (reqxp + (reqxp2 * rank)) * i; } else { c = reqxp * i; } totalreqxp += c; if (current >= page && current < page + count) { int pos = (current - page); string color = "1 1 1 1"; if (current % 2 == 0) { color = ".5 .5 .5 1"; } PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", current + 1)}", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.01", "0.25", color), "LevelList"); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", c)}", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.26", "0.50", color), "LevelList"); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", totalreqxp + startxp)}", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.51", "0.99", color), "LevelList"); } current++; } // Page Selection float height3 = 1f; int back = page <= count ? 0 : page - count; int next = page + count >= current ? page : page + count; PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} 0", "1 .08", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerCalculationsLevelSelection); // Prev Page if (page >= 1) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationslevelpage {back} {rank}", 1, height3, 20, "0 0 0 0", "⇧", ".1", ".2", TextAnchor.MiddleCenter, "1 1 0 1"), XPeriencePlayerCalculationsLevelSelection); } // Next Page if (page + count < config.xpLevel.maxlevel) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationslevelpage {next} {rank}", 1, height3, 20, "0 0 0 0", "⇩", ".21", ".3", TextAnchor.MiddleCenter, "1 1 0 1"), XPeriencePlayerCalculationsLevelSelection); } if (config.xpLevelRanks.enableresetranks && config.xpLevelRanks.increaselevelmultiplier) { // Prev Rank if (rank >= 1) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationslevelpage {page} {rank - 1}", 1, height3, 15, "0 0 0 0", $"{XPLang("rank", player.UserIDString)} ⇩", ".5", ".75", TextAnchor.MiddleCenter, "0 1 0 1"), XPeriencePlayerCalculationsLevelSelection); } // Next Rank if (rank < config.xpLevelRanks.maxresetrank) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationslevelpage {page} {rank + 1}", 1, height3, 15, "0 0 0 0", $"{XPLang("rank", player.UserIDString)} ⇧", ".76", ".99", TextAnchor.MiddleCenter, "0 1 0 1"), XPeriencePlayerCalculationsLevelSelection); } } // End CuiHelper.AddUi(player, PlayerProfile); } private void PlayerCalculationPageRanks(BasePlayer player, int page = 0) { var PlayerProfile = new CuiElementContainer(); #region Layout var height = 0.045f; var height2 = 0.055f; float height3 = 1f; int row = 1; int current = 0; int perpage = 20; #endregion PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .09", ".99 1", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{XPLang("calculationstitle", player.UserIDString)}", row, height, TextAnchor.MiddleLeft, 15, "0.01", "1", "1 1 1 1"), XPeriencePlayerCalculations); row++; row++; PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationslevels 0 0", row, height, 12, "0 0 0 1", "Levels", "0.02", "0.22", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); if (config.xpLevelRanks.enableresetranks) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsranks 0", row, height, 12, "0 0 0 1", "Ranks", "0.23", "0.43", TextAnchor.MiddleCenter, "0 1 0 1"), XPeriencePlayerCalculations); } PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsstats", row, height, 12, "0 0 0 1", "Stats", "0.44", "0.64", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsskills", row, height, 12, "0 0 0 1", "Skills", "0.65", "0.85", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); row++; row++; PlayerProfile.Add(XPUILabel($"[XP Calculations Per Rank]", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUIPanel("0 0", "1 0.78", "0 0 0 0"), XPeriencePlayerCalculations, "RankList"); // Ranks Without Increase #region Rank XP W/O Increase if (!config.xpLevelRanks.increaselevelmultiplier) { int startxp = (int)config.xpLevel.levelstart, reqxp = (int)config.xpLevel.levelmultiplier, maxlev = config.xpLevel.maxlevel - 1, totalreqxp = 0; for (int r = 1; r <= config.xpLevelRanks.maxresetrank; r++) { for (int l = 1; l <= maxlev; l++) { int c = reqxp * l; totalreqxp += c; } totalreqxp += startxp; if (current >= page && current < page + perpage) { int pos = (current - page); string color = "1 1 1 1"; if (current % 2 == 0) { color = ".5 .5 .5 1"; } PlayerProfile.Add(XPUILabel($"[Rank {r}]", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.01", "0.25", color), "RankList"); PlayerProfile.Add(XPUILabel($"Required XP:", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.25", "0.50", color), "RankList"); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", totalreqxp)}", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.51", "0.99", color), "RankList"); } current++; } } #endregion // Ranks With Increase #region Rank XP W Increase if (config.xpLevelRanks.increaselevelmultiplier) { int startxp2 = (int)config.xpLevel.levelstart, reqxp2 = (int)config.xpLevel.levelmultiplier, maxlev2 = config.xpLevel.maxlevel - 1, reqxp3 = (int)config.xpLevelRanks.levelmultiplierincrease, totalreqxp2 = 0, c2 = 0; for (int r2 = 1; r2 <= config.xpLevelRanks.maxresetrank; r2++) { if (r2 == 1) { for (int l2 = 1; l2 <= maxlev2; l2++) { c2 = reqxp2 * l2; totalreqxp2 += c2; } } else { for (int l2 = 1; l2 <= maxlev2; l2++) { c2 = (reqxp2 + (reqxp3 * (r2 - 1))) * l2; totalreqxp2 += c2; } } totalreqxp2 += startxp2; if (current >= page && current < page + perpage) { int pos = (current - page); string color = "1 1 1 1"; if (current % 2 == 0) { color = ".5 .5 .5 1"; } PlayerProfile.Add(XPUILabel($"[Rank {r2}]", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.01", "0.25", color), "RankList"); PlayerProfile.Add(XPUILabel($"Required XP:", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.26", "0.50", color), "RankList"); PlayerProfile.Add(XPUILabel($"{String.Format("{0:N0}", totalreqxp2)}", pos + 1, height2, TextAnchor.MiddleLeft, 10, "0.51", "0.99", color), "RankList"); } current++; } } #endregion // Page Selection int back = page <= perpage ? 0 : page - perpage; int next = page + perpage >= current ? page : page + perpage; PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} 0", "1 .08", "0 0 0 0"), XPeriencePlayerProfile, XPeriencePlayerCalculationsRanksSelection); // Prev Page if (page >= 1) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsranks {back}", 1, height3, 20, "0 0 0 0", "⇧", ".01", ".25", TextAnchor.MiddleCenter, "1 1 0 1"), XPeriencePlayerCalculationsRanksSelection); } // Next Page if (page + perpage < config.xpLevelRanks.maxresetrank) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsranks {next}", 1, height3, 20, "0 0 0 0", "⇩", ".50", ".99", TextAnchor.MiddleCenter, "1 1 0 1"), XPeriencePlayerCalculationsRanksSelection); } //AdminCalculationPageRanksPageSelection(player, back, next, page); // End CuiHelper.AddUi(player, PlayerProfile); } private void PlayerCalculationPageStats(BasePlayer player) { var PlayerProfile = new CuiElementContainer(); var height = 0.045f; int row = 1; PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .09", ".99 1", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{XPLang("calculationstitle", player.UserIDString)}", row, height, TextAnchor.MiddleLeft, 15, "0.01", "1", "1 1 1 1"), XPeriencePlayerCalculations); row++; row++; PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationslevels 0 0", row, height, 12, "0 0 0 1", "Levels", "0.02", "0.22", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); if (config.xpLevelRanks.enableresetranks) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsranks 0", row, height, 12, "0 0 0 1", "Ranks", "0.23", "0.43", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); } PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsstats", row, height, 12, "0 0 0 1", "Stats", "0.44", "0.64", TextAnchor.MiddleCenter, "0 1 0 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsskills", row, height, 12, "0 0 0 1", "Skills", "0.65", "0.85", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); row++; row++; // Level #region Level / Ranks int levelstatpoints = config.xpLevel.statpointsperlvl * config.xpLevel.maxlevel; int rankstatpoints = ((config.xpLevel.statpointsperlvl + (config.xpLevelRanks.rankstatpointincrease * config.xpLevelRanks.maxresetrank)) * config.xpLevel.maxlevel) + (config.xpLevelRanks.rankstatpointstart * config.xpLevelRanks.maxresetrank); int totalrankstatpoints = 0; int perrankstatpoints = 0; if (!config.xpLevelRanks.resetallstatsskills) { for (int x = 0; x <= config.xpLevelRanks.maxresetrank; x++) { for (int i = 0; i <= config.xpLevel.maxlevel + 1; i++) { int c = (config.xpLevel.statpointsperlvl + config.xpLevelRanks.rankstatpointincrease * x) * i; totalrankstatpoints = c + (config.xpLevelRanks.rankstatpointstart * x); } perrankstatpoints += totalrankstatpoints; } rankstatpoints = perrankstatpoints; } PlayerProfile.Add(XPUILabel($"[Level / Rank Calculations]", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; PlayerProfile.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.xpLevel.maxlevel}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Total Stat Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{levelstatpoints}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; PlayerProfile.Add(XPUILabel($"Max Rank:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.xpLevelRanks.maxresetrank}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Total Stat Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{rankstatpoints}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); #endregion // Stats #region Stats row++; row++; PlayerProfile.Add(XPUILabel($"[Stat Calculations]", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.30", "1 1 1 1"), XPeriencePlayerCalculations); row++; // Mentality int totalmentality = 0; if (config.mentality.maxlvl > 0) { for (int i = 1; i <= config.mentality.maxlvl; i++) { int ment = config.mentality.costmultiplier * i; totalmentality += ment; } totalmentality += config.mentality.pointcoststart - config.mentality.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Mentality:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.mentality.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Stat Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalmentality}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Dexterity int totaldexterity = 0; if (config.dexterity.maxlvl > 0) { for (int i = 1; i <= config.dexterity.maxlvl; i++) { int dex = config.dexterity.costmultiplier * i; totaldexterity += dex; } totaldexterity += config.dexterity.pointcoststart - config.dexterity.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Dextertiy:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.dexterity.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Stat Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totaldexterity}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Might int totalmight = 0; if (config.might.maxlvl > 0) { for (int i = 1; i <= config.might.maxlvl; i++) { int might = config.might.costmultiplier * i; totalmight += might; } totalmight += config.might.pointcoststart - config.might.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Might:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.might.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Stat Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalmight}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Captaincy int totalcaptaincy = 0; if (config.captaincy.maxlvl > 0) { for (int i = 1; i <= config.captaincy.maxlvl; i++) { int capt = config.captaincy.costmultiplier * i; totalcaptaincy += capt; } totalcaptaincy += config.captaincy.pointcoststart - config.captaincy.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Captaincy:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.captaincy.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Stat Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalcaptaincy}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Weaponry int totalweaponry = 0; if (config.weaponry.maxlvl > 0) { for (int i = 1; i <= config.weaponry.maxlvl; i++) { int weap = config.weaponry.costmultiplier * i; totalweaponry += weap; } totalweaponry += config.weaponry.pointcoststart - config.weaponry.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Weapnry:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.weaponry.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Stat Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalweaponry}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Ninjary int totalNinjary = 0; if (config.ninjary.maxlvl > 0) { for (int i = 1; i <= config.ninjary.maxlvl; i++) { int cland = config.ninjary.costmultiplier * i; totalNinjary += cland; } totalNinjary += config.ninjary.pointcoststart - config.ninjary.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Ninjary:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.ninjary.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Stat Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalNinjary}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Total Stat Points Required row++; int totalallstats = totalmentality + totaldexterity + totalmight + totalcaptaincy + totalweaponry + totalNinjary; PlayerProfile.Add(XPUILabel($"Total Stat Points Required:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalallstats}", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); #endregion // End CuiHelper.AddUi(player, PlayerProfile); } private void PlayerCalculationPageSkills(BasePlayer player) { var PlayerProfile = new CuiElementContainer(); var height = 0.045f; int row = 1; PlayerProfile.Add(XPUIPanel($"{config.playerprofilesettings.menuwidth + .005} .09", ".99 1", "0 0 0 .25"), XPeriencePlayerProfile, XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{XPLang("calculationstitle", player.UserIDString)}", row, height, TextAnchor.MiddleLeft, 15, "0.01", "1", "1 1 1 1"), XPeriencePlayerCalculations); row++; row++; PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationslevels 0 0", row, height, 12, "0 0 0 1", "Levels", "0.02", "0.22", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); if (config.xpLevelRanks.enableresetranks) { PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsranks 0", row, height, 12, "0 0 0 1", "Ranks", "0.23", "0.43", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); } PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsstats", row, height, 12, "0 0 0 1", "Stats", "0.44", "0.64", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUIButton($"xp.playercontrol calculationsskills", row, height, 12, "0 0 0 1", "Skills", "0.65", "0.85", TextAnchor.MiddleCenter, "0 1 0 1"), XPeriencePlayerCalculations); row++; row++; // Level #region Level / Ranks int levelskillpoints = config.xpLevel.skillpointsperlvl * config.xpLevel.maxlevel; int rankskillpoints = ((config.xpLevel.skillpointsperlvl + (config.xpLevelRanks.rankskillpointincrease * config.xpLevelRanks.maxresetrank)) * config.xpLevel.maxlevel) + (config.xpLevelRanks.rankskillpointstart * config.xpLevelRanks.maxresetrank); int totalrankskillpoints = 0; int perrankskillpoints = 0; if (!config.xpLevelRanks.resetallstatsskills) { for (int x = 0; x <= config.xpLevelRanks.maxresetrank; x++) { for (int i = 0; i <= config.xpLevel.maxlevel + 1; i++) { int c = (config.xpLevel.statpointsperlvl + config.xpLevelRanks.rankstatpointincrease * x) * i; totalrankskillpoints = c + (config.xpLevelRanks.rankstatpointstart * x); } perrankskillpoints += totalrankskillpoints; } rankskillpoints = perrankskillpoints; } PlayerProfile.Add(XPUILabel($"[Level / Rank Calculations]", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; PlayerProfile.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.xpLevel.maxlevel}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Total Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{levelskillpoints}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; PlayerProfile.Add(XPUILabel($"Max Rank:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.xpLevelRanks.maxresetrank}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Total Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{rankskillpoints}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); #endregion // Skills #region Skills row++; row++; PlayerProfile.Add(XPUILabel($"[Skill Calculations]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.30", "1 1 1 1"), XPeriencePlayerCalculations); row++; // Woodcutter int totalwoodcutter = 0; if (config.woodcutter.maxlvl > 0) { for (int i = 1; i <= config.woodcutter.maxlvl; i++) { int woodcutter = config.woodcutter.costmultiplier * i; totalwoodcutter += woodcutter; } totalwoodcutter += config.woodcutter.pointcoststart - config.woodcutter.costmultiplier; PlayerProfile.Add(XPUILabel($"Max WoodCutter:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.woodcutter.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalwoodcutter}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Smithy int totalsmithy = 0; if (config.smithy.maxlvl > 0) { for (int i = 1; i <= config.smithy.maxlvl; i++) { int smithy = config.smithy.costmultiplier * i; totalsmithy += smithy; } totalsmithy += config.smithy.pointcoststart - config.smithy.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Smithy:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.smithy.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalsmithy}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Miner int totalminer = 0; if (config.miner.maxlvl > 0) { for (int i = 1; i <= config.miner.maxlvl; i++) { int miner = config.miner.costmultiplier * i; totalminer += miner; } totalminer += config.miner.pointcoststart - config.miner.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Miner:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.miner.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalminer}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Forager int totalforager = 0; if (config.forager.maxlvl > 0) { for (int i = 1; i <= config.forager.maxlvl; i++) { int forager = config.forager.costmultiplier * i; totalforager += forager; } totalforager += config.forager.pointcoststart - config.forager.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Forager:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.forager.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalforager}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Hunter int totalhunter = 0; if (config.hunter.maxlvl > 0) { for (int i = 1; i <= config.hunter.maxlvl; i++) { int hunter = config.hunter.costmultiplier * i; totalhunter += hunter; } totalhunter += config.hunter.pointcoststart - config.hunter.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Hunter:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.hunter.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalhunter}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Crafter int totalcrafter = 0; if (config.crafter.maxlvl > 0) { for (int i = 1; i <= config.crafter.maxlvl; i++) { int crafter = config.crafter.costmultiplier * i; totalcrafter += crafter; } totalcrafter += config.crafter.pointcoststart - config.crafter.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Crafter:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.crafter.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalcrafter}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Framer int totalframer = 0; if (config.framer.maxlvl > 0) { for (int i = 1; i <= config.framer.maxlvl; i++) { int framer = config.framer.costmultiplier * i; totalframer += framer; } totalframer += config.framer.pointcoststart - config.framer.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Framer:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.framer.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalframer}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Fisher int totalfisher = 0; if (config.fisher.maxlvl > 0) { for (int i = 1; i <= config.fisher.maxlvl; i++) { int fisher = config.fisher.costmultiplier * i; totalfisher += fisher; } totalfisher += config.fisher.pointcoststart - config.fisher.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Fisher:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.fisher.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalfisher}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Medic int totalmedic = 0; if (config.medic.maxlvl > 0) { for (int i = 1; i <= config.medic.maxlvl; i++) { int medic = config.medic.costmultiplier * i; totalmedic += medic; } totalmedic += config.medic.pointcoststart - config.medic.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Medic:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.medic.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalmedic}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Scavenger int totalscavenger = 0; if (config.scavenger.maxlvl > 0) { for (int i = 1; i <= config.scavenger.maxlvl; i++) { int scavenger = config.scavenger.costmultiplier * i; totalscavenger += scavenger; } totalscavenger += config.scavenger.pointcoststart - config.scavenger.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Scavenger:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.scavenger.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalscavenger}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Electrician int totalelectrician = 0; if (config.electrician.maxlvl > 0) { for (int i = 1; i <= config.electrician.maxlvl; i++) { int electrician = config.electrician.costmultiplier * i; totalelectrician += electrician; } totalelectrician += config.electrician.pointcoststart - config.electrician.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Electrician:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.electrician.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalelectrician}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Demolitionist int totaldemolitionist = 0; if (config.demolitionist.maxlvl > 0) { for (int i = 1; i <= config.demolitionist.maxlvl; i++) { int demolitionist = config.demolitionist.costmultiplier * i; totaldemolitionist += demolitionist; } totaldemolitionist += config.demolitionist.pointcoststart - config.demolitionist.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Demolitionist:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.demolitionist.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totaldemolitionist}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Tamer int totaltamer = 0; if (PersonalAnimal != null && config.tamer.maxlvl > 0) { for (int i = 1; i <= config.tamer.maxlvl; i++) { int tamer = config.tamer.costmultiplier * i; totaltamer += tamer; } totaltamer += config.tamer.pointcoststart - config.tamer.costmultiplier; PlayerProfile.Add(XPUILabel($"Max Tamer:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.25", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{config.tamer.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, "0.26", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"Skill Points:", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.75", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totaltamer}", row, height, TextAnchor.MiddleLeft, 10, "0.76", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); row++; } // Total Skill Points Required row++; int totalallskills = totalwoodcutter + totalsmithy + totalminer + totalforager + totalhunter + totalcrafter + totalframer + totalfisher + totalmedic + totalscavenger + totalelectrician + totaldemolitionist + totaltamer; PlayerProfile.Add(XPUILabel($"Total Skill Points Required:", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.50", "1 1 1 1"), XPeriencePlayerCalculations); PlayerProfile.Add(XPUILabel($"{totalallskills}", row, height, TextAnchor.MiddleLeft, 10, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerCalculations); #endregion // End CuiHelper.AddUi(player, PlayerProfile); } // Pop-ups & Chat private void PlayerProfileBGImgs(BasePlayer player, int page = 0) { if (player == null) return; XPRecord xprecord = GetXPRecord(player); var BGImgs = new CuiElementContainer(); BGImgs.Add(new CuiPanel { Image = { Color = "0 0 0 0" }, RectTransform = { AnchorMin = $".5 .5", AnchorMax = $".5 .5", OffsetMin = $"-300 -200", OffsetMax = $"300 200" }, CursorEnabled = true }, "Overlay", XPeriencePlayerBGImgs); int current = 0; int bgid = 0; var bglist = config.imageicons.bgimages; int total = config.imageicons.bgimages.Count; foreach (var bgimg in bglist) { if (current >= page && current < page + 1) { int pos = (current - page); // Image BGImgs.Add(new CuiElement { Parent = XPeriencePlayerBGImgs, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", bgimg.Value.name) }, new CuiRectTransformComponent { AnchorMin = ".01 .1", AnchorMax = ".99 .99" } } }); // ID BGImgs.Add(XPUILabel($"{bgimg.Value.name}", 1, 0.07f, TextAnchor.MiddleCenter, 15, ".01", ".99", "1 1 1 1"), XPeriencePlayerBGImgs); bgid = bgimg.Key; } current++; } // Buttons BGImgs.Add(XPUIPanel(".1 0", ".9 .08", "0 0 0 1"), XPeriencePlayerBGImgs, "PBGButtons"); int back = page <= 1 ? 0 : page - 1; int next = page + 1 >= current ? page : page + 1; // Prev Page if (page >= 1) { BGImgs.Add(XPUIButton($"xp.playercontrol openbgoptions {back}", 1, 1f, 20, "0 0 0 0", "⇦", ".1", ".2", TextAnchor.MiddleCenter, "1 1 0 1"), "PBGButtons"); } // Next Page if (page + 1 < total) { BGImgs.Add(XPUIButton($"xp.playercontrol openbgoptions {next}", 1, 1f, 20, "0 0 0 0", "⇨", ".8", ".9", TextAnchor.MiddleCenter, "1 1 0 1"), "PBGButtons"); } if (bgid == xprecord.profilebg) { BGImgs.Add(XPUIButton($"", 1, 1f, 13, "0 0 0 0", "〘Selected〙", ".3", ".45", TextAnchor.MiddleCenter, "0 1 0 1"), "PBGButtons"); } else { BGImgs.Add(XPUIButton($"xp.playeredits profilebg {bgid} {page}", 1, 1f, 13, "0 0 0 0", "〘Select〙", ".3", ".45", TextAnchor.MiddleCenter, "1 0 0 1"), "PBGButtons"); } BGImgs.Add(XPUIButton("xp.playercontrol closebgoptions", 1, 1f, 13, "0 0 0 0", "〘Close〙", ".55", ".7", TextAnchor.MiddleCenter, "1 0 0 1"), "PBGButtons"); CuiHelper.AddUi(player, BGImgs); return; } private void PlayerDamageBarSkins(BasePlayer player, int page = 0) { if (player == null) return; XPRecord xprecord = GetXPRecord(player); var height = 0.030f; int row = 4; int current = 0; var dmgbarskins = XPerienceAddon?.Call("GetDmgBarList"); var dmgbarlist = JsonConvert.DeserializeObject>((string)dmgbarskins); int total = dmgbarlist.Count; var DMGSkins = new CuiElementContainer(); DMGSkins.Add(new CuiPanel { Image = { Color = "0 0 0 1" }, RectTransform = { AnchorMin = ".4 .2", AnchorMax = ".8 .8" }, CursorEnabled = true }, "Overlay", XPeriencePlayerDMGSkins); DMGSkins.Add(XPUILabel($"Damage Bar Skin Selection:", 1, 0.090f, TextAnchor.MiddleLeft, 15, ".01", ".99", "1 1 1 1"), XPeriencePlayerDMGSkins); row++; foreach (var dmgbarimg in dmgbarlist) { if (current >= page && current < page + 10) { int pos = (current - page); // Image DMGSkins.Add(XPUIImage(XPeriencePlayerDMGSkins, dmgbarimg.Value.name, row, height, ".02", ".70")); if (dmgbarimg.Key == xprecord.dmgbar) { DMGSkins.Add(XPUIButton($"", row, height, 12, "0 0 0 0", "〘Selected〙", "0.75", "0.99", TextAnchor.MiddleCenter, "0 1 0 1"), XPeriencePlayerDMGSkins); } else { DMGSkins.Add(XPUIButton($"xp.playeredits dmgskins {dmgbarimg.Key} {page}", row, height, 12, "0 0 0 0", "〘Select〙", "0.75", "0.99", TextAnchor.MiddleCenter, "1 0 0 1"), XPeriencePlayerDMGSkins); } row++; row++; row++; } current++; } // Buttons DMGSkins.Add(XPUIPanel("0 0", "1 .1", "0 0 0 0.7"), XPeriencePlayerDMGSkins, "BGButtons"); int back = page <= 10 ? 0 : page - 10; int next = page + 10 >= current ? page : page + 10; // Prev Page if (page >= 1) { DMGSkins.Add(XPUIButton($"xp.playercontrol opendmgskins {back}", 1, 1f, 20, "0 0 0 0", "⇧", ".1", ".2", TextAnchor.MiddleCenter, "1 1 0 1"), "BGButtons"); } // Next Page if (page + 10 < total) { DMGSkins.Add(XPUIButton($"xp.playercontrol opendmgskins {next}", 1, 1f, 20, "0 0 0 0", "⇩", ".8", ".9", TextAnchor.MiddleCenter, "1 1 0 1"), "BGButtons"); } DMGSkins.Add(XPUIButton($"xp.playercontrol closedmgskins", 1, 1f, 12, "0 0 0 0", "〘Close〙", ".4", ".6", TextAnchor.MiddleCenter, "1 0 0 1"), "BGButtons"); // End CuiHelper.AddUi(player, DMGSkins); } private void PlayerPromptBox(BasePlayer player, string function, string types, string name) { if (player == null || function == null || types == null || name == null) return; DestroyUi(player, XPeriencePlayerControlPrompt); XPRecord xprecord = GetXPRecord(player); float height = 0.1f; int row = 2; bool econcanafford = true; bool srewardcanafford = true; string type = ""; switch (types) { case "stats": type = "stat"; break; case "skills": type = "skill"; break; } // Create Box var PromptElements = new CuiElementContainer(); // Box PromptElements.Add(new CuiPanel { Image = { Color = "0 0 0 1" }, RectTransform = { AnchorMin = ".5 .5", AnchorMax = ".5 .5", OffsetMin = "-200 -100", OffsetMax = "200 100" }, CursorEnabled = true }, "Overlay", XPeriencePlayerControlPrompt); // Confirm Reset #region reset if (function == "reset") { if (name == "all") { PromptElements.Add(XPUILabel($"Do you want to reset all {types}?", row, height, TextAnchor.MiddleCenter, 15, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; if (XPerienceAddon != null) { PromptElements.Add(XPUILabel($"(NOTE: You will lose any extra points gained from Books or Scrolls!)", row, height, TextAnchor.MiddleCenter, 12, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; } row++; // Economics #region Economics Stats if (Economics != null) { double balance = Economics.Call("Balance", player.UserIDString); double statscost = config.xpEcon.econresetstatscost; double skillscost = config.xpEcon.econresetskillscost; if ((balance < statscost || balance < skillscost)) { econcanafford = false; } if (types == "stats" && config.xpEcon.econresetstats) { PromptElements.Add(XPUILabel($"Economics:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {statscost}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {balance}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } if (types == "skills" && config.xpEcon.econresetskills) { PromptElements.Add(XPUILabel($"Economics:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {skillscost}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {balance}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } } #endregion // Server Rewards #region ServerRewards Stats if (ServerRewards != null) { int points = ServerRewards.Call("CheckPoints", player.userID); int statspoints = config.sRewards.srewardresetstatscost; int skillspoints = config.sRewards.srewardresetskillscost; if (points < statspoints || points < skillspoints) { srewardcanafford = false; } if (types == "stats" && config.sRewards.srewardresetstats) { PromptElements.Add(XPUILabel($"Server Rewards:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {statspoints}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {points}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } if (types == "skills" && config.sRewards.srewardresetskills) { PromptElements.Add(XPUILabel($"Server Rewards:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {skillspoints}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {points}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } } #endregion } else { PromptElements.Add(XPUILabel($"Do you want to reset {XPLang($"{name}", player.UserIDString)} {type}?", row, height, TextAnchor.MiddleCenter, 15, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; if (XPerienceAddon != null) { PromptElements.Add(XPUILabel($"(NOTE: You will lose any extra points gained from Books or Scrolls!)", row, height, TextAnchor.MiddleCenter, 12, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; } row++; // Economics #region Economics Reset if (Economics != null) { double balance = Economics.Call("Balance", player.UserIDString); double statcost = config.xpEcon.econresetstatcost; double skillcost = config.xpEcon.econresetskillcost; if (balance < statcost || balance < skillcost) { econcanafford = false; } if (type == "stat" && config.xpEcon.econresetstat) { PromptElements.Add(XPUILabel($"Economics:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {statcost}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {balance}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } if (type == "skill" && config.xpEcon.econresetskill) { PromptElements.Add(XPUILabel($"Economics:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {skillcost}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {balance}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } } #endregion // Server Rewards #region ServerRewards Reset if (ServerRewards != null) { int points = ServerRewards.Call("CheckPoints", player.userID); int statpoints = config.sRewards.srewardresetstatcost; int skillpoints = config.sRewards.srewardresetskillcost; if (points < statpoints || points < skillpoints) { srewardcanafford = false; } if (type == "stat" && config.sRewards.srewardresetstat) { PromptElements.Add(XPUILabel($"Server Rewards:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {statpoints}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {points}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } if (type == "skill" && config.sRewards.srewardresetskill) { PromptElements.Add(XPUILabel($"Server Rewards:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {skillpoints}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {points}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } } #endregion } } #endregion // Confirm Level Up #region levelup if (function == "levelup") { PromptElements.Add(XPUILabel($"Do you want to level up {XPLang($"{name}", player.UserIDString)} {type}?", row, height, TextAnchor.MiddleCenter, 15, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; // Economics #region Economics Levelup if (Economics != null) { double balance = Economics.Call("Balance", player.UserIDString); double statcost = 0; double skillcost = 0; if (type == "stat" && config.xpEcon.econstatlevelcost) { switch (name) { case "mentality": statcost = config.xpEcon.econmentality; if (config.xpEcon.econstatlevelcost) { if (config.xpEcon.econstatlevelcostmultiplier > 0) { statcost = config.xpEcon.econmentality * (config.xpEcon.econstatlevelcostmultiplier * (xprecord.Mentality + 1)); } } break; case "dexterity": statcost = config.xpEcon.econdexterity; if (config.xpEcon.econstatlevelcost) { if (config.xpEcon.econstatlevelcostmultiplier > 0) { statcost = config.xpEcon.econdexterity * (config.xpEcon.econstatlevelcostmultiplier * (xprecord.Dexterity + 1)); } } break; case "might": statcost = config.xpEcon.econmight; if (config.xpEcon.econstatlevelcost) { if (config.xpEcon.econstatlevelcostmultiplier > 0) { statcost = config.xpEcon.econmight * (config.xpEcon.econstatlevelcostmultiplier * (xprecord.Might + 1)); } } break; case "captaincy": statcost = config.xpEcon.econcaptaincy; if (config.xpEcon.econstatlevelcost) { if (config.xpEcon.econstatlevelcostmultiplier > 0) { statcost = config.xpEcon.econcaptaincy * (config.xpEcon.econstatlevelcostmultiplier * (xprecord.Captaincy + 1)); } } break; case "weaponry": statcost = config.xpEcon.econweaponry; if (config.xpEcon.econstatlevelcost) { if (config.xpEcon.econstatlevelcostmultiplier > 0) { statcost = config.xpEcon.econweaponry * (config.xpEcon.econstatlevelcostmultiplier * (xprecord.Weaponry + 1)); } } break; case "ninjary": statcost = config.xpEcon.econninjary; if (config.xpEcon.econstatlevelcost) { if (config.xpEcon.econstatlevelcostmultiplier > 0) { statcost = config.xpEcon.econninjary * (config.xpEcon.econstatlevelcostmultiplier * (xprecord.Ninjary + 1)); } } break; } if (balance < statcost) { econcanafford = false; } PromptElements.Add(XPUILabel($"Economics:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {statcost}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {balance}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } if (type == "skill" && config.xpEcon.econskilllevelcost) { switch (name) { case "woodcutter": skillcost = config.xpEcon.econwoodcutter; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econwoodcutter * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.WoodCutter + 1)); } } break; case "smithy": skillcost = config.xpEcon.econsmithy; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econsmithy * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Smithy + 1)); } } break; case "miner": skillcost = config.xpEcon.econminer; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econminer * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Miner + 1)); } } break; case "forager": skillcost = config.xpEcon.econforager; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econforager * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Forager + 1)); } } break; case "hunter": skillcost = config.xpEcon.econhunter; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econhunter * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Hunter + 1)); } } break; case "crafter": skillcost = config.xpEcon.econcrafter; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econcrafter * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Crafter + 1)); } } break; case "framer": skillcost = config.xpEcon.econframer; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econframer * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Framer + 1)); } } break; case "fisher": skillcost = config.xpEcon.econfisher; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econfisher * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Fisher + 1)); } } break; case "medic": skillcost = config.xpEcon.econmedic; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econmedic * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Medic + 1)); } } break; case "scavenger": skillcost = config.xpEcon.econscavenger; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econscavenger * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Scavenger + 1)); } } break; case "electrician": skillcost = config.xpEcon.econelectrician; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econelectrician * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Electrician + 1)); } } break; case "demolitionist": skillcost = config.xpEcon.econdemolitionist; if (config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econdemolitionist * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Demolitionist + 1)); } } break; case "tamer": skillcost = config.xpEcon.econtamer; if (Economics != null && config.xpEcon.econskilllevelcost) { if (config.xpEcon.econskilllevelcostmultiplier > 0) { skillcost = config.xpEcon.econtamer * (config.xpEcon.econskilllevelcostmultiplier * (xprecord.Tamer + 1)); } } break; } if (balance < skillcost) { econcanafford = false; } PromptElements.Add(XPUILabel($"Economics:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {skillcost}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {balance}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } } #endregion // Server Rewards #region ServerRewards Levelup if (ServerRewards != null) { int points = ServerRewards.Call("CheckPoints", player.userID); int statpoints = 0; int skillpoints = 0; if (type == "stat" && config.sRewards.srewardstatlevelcost) { switch (name) { case "mentality": statpoints = config.sRewards.srewardmentality; if (config.sRewards.srewardstatlevelcost) { if (config.sRewards.srewardstatlevelcostmultiplier > 0) { statpoints = config.sRewards.srewardmentality * (config.sRewards.srewardstatlevelcostmultiplier * (xprecord.Mentality + 1)); } } break; case "dexterity": statpoints = config.sRewards.srewarddexterity; if (config.sRewards.srewardstatlevelcost) { if (config.sRewards.srewardstatlevelcostmultiplier > 0) { statpoints = config.sRewards.srewarddexterity * (config.sRewards.srewardstatlevelcostmultiplier * (xprecord.Dexterity + 1)); } } break; case "might": statpoints = config.sRewards.srewardmight; if (config.sRewards.srewardstatlevelcost) { if (config.sRewards.srewardstatlevelcostmultiplier > 0) { statpoints = config.sRewards.srewardmight * (config.sRewards.srewardstatlevelcostmultiplier * (xprecord.Might + 1)); } } break; case "captaincy": statpoints = config.sRewards.srewardcaptaincy; if (config.sRewards.srewardstatlevelcost) { if (config.sRewards.srewardstatlevelcostmultiplier > 0) { statpoints = config.sRewards.srewardcaptaincy * (config.sRewards.srewardstatlevelcostmultiplier * (xprecord.Captaincy + 1)); } } break; case "weaponry": statpoints = config.sRewards.srewardweaponry; if (config.sRewards.srewardstatlevelcost) { if (config.sRewards.srewardstatlevelcostmultiplier > 0) { statpoints = config.sRewards.srewardweaponry * (config.sRewards.srewardstatlevelcostmultiplier * (xprecord.Weaponry + 1)); } } break; case "ninjary": statpoints = config.sRewards.srewardninjary; if (config.sRewards.srewardstatlevelcost) { if (config.sRewards.srewardstatlevelcostmultiplier > 0) { statpoints = config.sRewards.srewardninjary * (config.sRewards.srewardstatlevelcostmultiplier * (xprecord.Ninjary + 1)); } } break; } if (points < statpoints) { srewardcanafford = false; } PromptElements.Add(XPUILabel($"Server Rewards:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {statpoints}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {points}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } if (type == "skill" && config.sRewards.srewardskilllevelcost) { switch (name) { case "woodcutter": skillpoints = config.sRewards.srewardwoodcutter; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardwoodcutter * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.WoodCutter + 1)); } } break; case "smithy": skillpoints = config.sRewards.srewardsmithy; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardsmithy * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Smithy + 1)); } } break; case "miner": skillpoints = config.sRewards.srewardminer; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardminer * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Miner + 1)); } } break; case "forager": skillpoints = config.sRewards.srewardforager; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardforager * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Forager + 1)); } } break; case "hunter": skillpoints = config.sRewards.srewardhunter; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardhunter * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Hunter + 1)); } } break; case "crafter": skillpoints = config.sRewards.srewardcrafter; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardcrafter * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Crafter + 1)); } } break; case "framer": skillpoints = config.sRewards.srewardframer; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardframer * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Framer + 1)); } } break; case "fisher": skillpoints = config.sRewards.srewardfisher; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardfisher * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Fisher + 1)); } } break; case "medic": skillpoints = config.sRewards.srewardmedic; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardmedic * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Medic + 1)); } } break; case "scavenger": skillpoints = config.sRewards.srewardscavenger; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardscavenger * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Scavenger + 1)); } } break; case "electrician": skillpoints = config.sRewards.srewardelectrician; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardelectrician * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Electrician + 1)); } } break; case "demolitionist": skillpoints = config.sRewards.srewardemolitionist; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardemolitionist * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Demolitionist + 1)); } } break; case "tamer": skillpoints = config.sRewards.srewardtamer; if (config.sRewards.srewardskilllevelcost) { if (config.sRewards.srewardskilllevelcostmultiplier > 0) { statpoints = config.sRewards.srewardtamer * (config.sRewards.srewardskilllevelcostmultiplier * (xprecord.Tamer + 1)); } } break; } if (points < skillpoints) { srewardcanafford = false; } PromptElements.Add(XPUILabel($"Server Rewards:", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; PromptElements.Add(XPUILabel($"Cost: {skillpoints}", row, height, TextAnchor.MiddleCenter, 11, "0.01", "0.49", "1 1 1 1"), XPeriencePlayerControlPrompt); PromptElements.Add(XPUILabel($"Balance: {points}", row, height, TextAnchor.MiddleCenter, 11, "0.51", "0.99", "1 1 1 1"), XPeriencePlayerControlPrompt); row++; row++; } } #endregion } #endregion // Yes or No if (function == "reset") { if (Economics == null || (!config.xpEcon.econresetstats && types == "stats") || (!config.xpEcon.econresetskills && types == "skills")) { econcanafford = true; } if (ServerRewards == null || (!config.sRewards.srewardresetstats && types == "stats") || (!config.sRewards.srewardresetskills && types == "skills")) { srewardcanafford = true; } if (econcanafford && srewardcanafford) { if (name == "all") { PromptElements.Add(XPUIButton($"xp.playercontrol reset {types}", row, height, 12, "0 1 0 1", "〘YES〙", "0.15", "0.35", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerControlPrompt); } else { PromptElements.Add(XPUIButton($"xp.playercontrol reset {type} {name}", row, height, 12, "0 1 0 1", "〘YES〙", "0.15", "0.35", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerControlPrompt); } } else { PromptElements.Add(XPUIButton("", row, height, 12, ".25 .25 .25 1", "〘Cannot Afford〙", "0.10", "0.35", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerControlPrompt); } } if (function == "levelup") { if (econcanafford && srewardcanafford) { PromptElements.Add(XPUIButton($"xp.playeredits {type} {name}", row, height, 12, "0 1 0 1", $"〘{XPLang("yes", player.UserIDString)}〙", "0.15", "0.35", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerControlPrompt); } else { PromptElements.Add(XPUIButton("", row, height, 12, ".25 .25 .25 1", "〘Cannot Afford〙", "0.10", "0.35", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerControlPrompt); } } PromptElements.Add(XPUIButton("xp.playercontrol closeprompt", row, height, 12, "1 0 0 1", $"〘{XPLang($"no", player.UserIDString)}〙", "0.65", "0.85", TextAnchor.MiddleCenter, "1 1 1 1"), XPeriencePlayerControlPrompt); CuiHelper.AddUi(player, PromptElements); } private void PlayerStatsChat(BasePlayer player) { XPRecord xprecord = GetXPRecord(player); player.ChatMessage(XPLang("playerprofilechatnew", player.UserIDString, xprecord.level, (int)xprecord.experience, (int)xprecord.requiredxp, xprecord.statpoint, xprecord.skillpoint, xprecord.Mentality, xprecord.Dexterity, xprecord.Might, xprecord.Captaincy, xprecord.Weaponry, xprecord.Ninjary, xprecord.WoodCutter, xprecord.Smithy, xprecord.Miner, xprecord.Forager, xprecord.Hunter, xprecord.Fisher, xprecord.Crafter, xprecord.Framer, xprecord.Medic, xprecord.Scavenger, xprecord.Electrician, xprecord.Demolitionist, xprecord.Tamer)); } #endregion #region Admin Panel // Setting Handlers #region Setting Handlers [TextArea] private string UserInputText = string.Empty; [ConsoleCommand("xp.admin")] private void Cmdadminxp(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null) return; if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; switch (arg.GetString(0)) { case "main": ClearUIs(player); AdminInfoPage(player); break; case "levelxp": ClearUIs(player); AdminLevelPage(player); break; case "ranks": ClearUIs(player); AdminRanksPage(player, arg.GetString(1), arg.GetInt(2)); break; case "deleterank": config.xpLevelRanks.ranks.Remove(Convert.ToInt32(arg.Args[1])); DestroyUi(player, XPerienceAdminPanelRanks); AdminRanksPage(player, "ranklist"); break; case "editrank": DestroyUi(player, XPerienceAdminPanelRanks); AdminRanksPage(player, "editrank", Convert.ToInt32(arg.Args[1])); break; case "dailylimits": ClearUIs(player); AdminDailyLimitsPage(player); break; case "stats": ClearUIs(player); AdminStatsPage(player, arg.GetString(1)); break; case "skills": ClearUIs(player); AdminSkillsPage(player, arg.GetString(1)); break; case "playerdata": ClearUIs(player); AdminPlayerInfoPage(player); break; case "openprofilebg": DestroyUi(player, XPerienceAdminPanelProfileBackgrounds); int bgnumber = arg.GetInt(1); int bgpagenumber = arg.GetInt(2); AdminProfileBackgrounds(player, bgnumber, bgpagenumber); break; case "closeprofilebg": DestroyUi(player, XPerienceAdminPanelProfileBackgrounds); break; case "updatebg": foreach(var bgplayer in _xperienceCache) { bgplayer.Value.profilebg = config.playerprofilesettings.profilebg; } SaveData(); ClearUIs(player); AdminPlayerInfoPage(player); break; case "timercolor": ClearUIs(player); AdminTimerColorPage(player); break; case "soundeffects": ClearUIs(player); AdminSoundEffectsPage(player); break; case "othermods": ClearUIs(player); AdminOtherModsPage(player, arg.GetString(1)); break; case "deletebackpack": config.backpacksmod.BackPackSlots.Remove(Convert.ToInt32(arg.Args[1])); DestroyUi(player, XPerienceAdminPanelOtherMods); AdminOtherModsPage(player, "backpacks"); break; case "editbackpack": DestroyUi(player, XPerienceAdminPanelOtherMods); AdminOtherModsPage(player, "backpacks", "edit", Convert.ToInt32(arg.Args[1])); break; case "newbackpack": var backpacklist = config.backpacksmod.BackPackSlots; int newkey = 0; if (backpacklist != null) { newkey = config.backpacksmod.BackPackSlots.Keys.Last() + 1; } config.backpacksmod.BackPackSlots.Add(newkey, new BackPackSlots { level = 1, slots = 6 }); DestroyUi(player, XPerienceAdminPanelOtherMods); AdminOtherModsPage(player, "backpacks", "edit", config.backpacksmod.BackPackSlots.Keys.Last()); break; case "backpackselection": if(arg.GetString(2).ToLower() == "open") { DestroyUi(player, XPerienceAdminPanelBackpackSelection); OtherMods_BackpacksSelection(player, config.backpacksmod.statorskill); return; } if(arg.GetString(1).ToLower() == "close") { DestroyUi(player, XPerienceAdminPanelBackpackSelection); return; } config.backpacksmod.statorskill = arg.GetString(1).ToLower(); ClearUIs(player); AdminOtherModsPage(player, "backpacks"); break; case "sql": ClearUIs(player); AdminSQLPage(player); break; case "save": player.ChatMessage(XPLang("saveconfig", player.UserIDString)); SaveData(); SaveConfig(); break; case "reload": SaveData(); SaveConfig(); Interface.Oxide.ReloadPlugin("XPerience"); //if(XPerienceAddon != null) //{ // Interface.Oxide.ReloadPlugin("XPerienceAddon"); //} break; case "close": DestroyUi(player, XPerienceAdminPanelMain); break; case "reset": ClearUIs(player); AdminResetPage(player); break; case "addon": if (XPerienceAddon != null) { DestroyUi(player, XPerienceAdminPanelMain); XPerienceAddon.Call("AddonAdminControlPanel", player); XPerienceAddon.Call("AddonAdminInfoPage", player); } else { DestroyUi(player, XPerienceAdminPanelInfo); DestroyUi(player, XPerienceAdminPanelLevelXP); DestroyUi(player, XPerienceAdminPanelStats); DestroyUi(player, XPerienceAdminPanelSkills); DestroyUi(player, XPerienceAdminPanelTimerColor); DestroyUi(player, XPerienceAdminPanelOtherMods); DestroyUi(player, XPerienceAdminPanelSQL); DestroyUi(player, XPerienceAdminPanelReset); DestroyUi(player, XPerienceAdminPanelInfoBox); DestroyUi(player, XPerienceAdminPanelAddon); AdminAddonPage(player); } break; case "fix": PlayerFixDataAll(player); break; case "mystats": DestroyUi(player, XPerienceAdminPanelMain); PlayerProfile(player); PlayerProfileMain(player); break; case "openelectriciansettings": DestroyUi(player, XPerienceAdminPanelElectricianSettings); AdminElectricianSettings(player); break; case "closeelectricianbox": DestroyUi(player, XPerienceAdminPanelElectricianSettings); break; case "images": ClearUIs(player); AdminImagePaths(player, arg.GetString(1), arg.GetInt(2)); break; case "specialgroups": ClearUIs(player); AdminSpecialGroups(player); break; } } [ConsoleCommand("xp.config")] private void Cmdadminxpconfig(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null) return; if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; switch (arg.GetString(0)) { case "main": DestroyUi(player, XPerienceAdminPanelInfo); AdminInfoPage(player); break; case "levelxp": switch (arg.GetString(1)) { // Main #region main case "levelstart": config.xpLevel.levelstart = Convert.ToDouble(arg.GetString(2)); break; case "levelmultiplier": config.xpLevel.levelmultiplier = Convert.ToDouble(arg.GetString(2)); break; case "levelmax": config.xpLevel.maxlevel = Convert.ToInt32(arg.GetString(2)); break; case "levelxpboost": config.xpLevel.levelxpboost = Convert.ToDouble(arg.GetString(2)); break; case "statpointsperlvl": config.xpLevel.statpointsperlvl = Convert.ToInt32(arg.GetString(2)); break; case "skillpointsperlvl": config.xpLevel.skillpointsperlvl = Convert.ToInt32(arg.GetString(2)); break; case "alwaysearnxp": config.xpLevel.alwaysearnxp = Convert.ToBoolean(arg.GetString(2)); break; case "fullhealth": config.xpLevel.fullhealth = Convert.ToBoolean(arg.GetString(2)); break; case "fullmetabolism": config.xpLevel.fullmetabolism = Convert.ToBoolean(arg.GetString(2)); break; #endregion // Night #region night case "nightenable": config.nightBonus.Enable = Convert.ToBoolean(arg.GetString(2)); break; case "nightstart": config.nightBonus.StartTime = Convert.ToInt32(arg.GetString(2)); break; case "nightend": config.nightBonus.EndTime = Convert.ToInt32(arg.GetString(2)); break; case "nightbonus": config.nightBonus.Bonus = Convert.ToDouble(arg.GetString(2)); break; case "nightskill": config.nightBonus.enableskillboosts = Convert.ToBoolean(arg.GetString(2)); break; #endregion // XP Kills #region kills case "chicken": config.xpGain.chickenxp = Convert.ToDouble(arg.GetString(2)); break; case "fish": config.xpGain.fishxp = Convert.ToDouble(arg.GetString(2)); break; case "boar": config.xpGain.boarxp = Convert.ToDouble(arg.GetString(2)); break; case "stag": config.xpGain.stagxp = Convert.ToDouble(arg.GetString(2)); break; case "wolf": config.xpGain.wolfxp = Convert.ToDouble(arg.GetString(2)); break; case "bear": config.xpGain.bearxp = Convert.ToDouble(arg.GetString(2)); break; case "polarbear": config.xpGain.polarbearxp = Convert.ToDouble(arg.GetString(2)); break; case "shark": config.xpGain.sharkxp = Convert.ToDouble(arg.GetString(2)); break; case "horse": config.xpGain.horsexp = Convert.ToDouble(arg.GetString(2)); break; case "scientist": config.xpGain.scientistxp = Convert.ToDouble(arg.GetString(2)); break; case "sc_cargo": config.xpGain.sc_cargo = Convert.ToDouble(arg.GetString(2)); break; case "sc_full": config.xpGain.sc_full = Convert.ToDouble(arg.GetString(2)); break; case "sc_heavy": config.xpGain.sc_heavy = Convert.ToDouble(arg.GetString(2)); break; case "sc_junkpile": config.xpGain.sc_junkpile = Convert.ToDouble(arg.GetString(2)); break; case "sc_oilrig": config.xpGain.sc_oilrig = Convert.ToDouble(arg.GetString(2)); break; case "sc_patrol": config.xpGain.sc_patrol = Convert.ToDouble(arg.GetString(2)); break; case "sc_peacekeeper": config.xpGain.sc_peacekeeper = Convert.ToDouble(arg.GetString(2)); break; case "sc_roam": config.xpGain.sc_roam = Convert.ToDouble(arg.GetString(2)); break; case "customnpc": config.xpGain.customnpc = Convert.ToDouble(arg.GetString(2)); break; case "dweller": config.xpGain.dwellerxp = Convert.ToDouble(arg.GetString(2)); break; case "tunneldwellerxp": config.xpGain.tunneldwellerxp = Convert.ToDouble(arg.GetString(2)); break; case "underwaterdwellerxp": config.xpGain.underwaterdwellerxp = Convert.ToDouble(arg.GetString(2)); break; case "scarecrownpc": config.xpGain.scarecrownpc = Convert.ToDouble(arg.GetString(2)); break; case "player": config.xpGain.playerxp = Convert.ToDouble(arg.GetString(2)); break; case "bradley": config.xpGain.bradley = Convert.ToDouble(arg.GetString(2)); break; case "heli": config.xpGain.patrolhelicopter = Convert.ToDouble(arg.GetString(2)); break; case "turretallow": config.xpGain.allowturretxp = Convert.ToBoolean(arg.GetString(2)); break; case "turret": config.xpGain.turretxp = Convert.ToDouble(arg.GetString(2)); break; case "zombienpc": config.xpGain.zombienpc = Convert.ToDouble(arg.GetString(2)); break; #endregion // XP Gathering/Looting #region gathering case "loot": config.xpGain.lootcontainerxp = Convert.ToDouble(arg.GetString(2)); break; case "lootbarrel": config.xpGain.lootbarrel = Convert.ToDouble(arg.GetString(2)); break; case "oilbarrel": config.xpGain.oilbarrel = Convert.ToDouble(arg.GetString(2)); break; case "vehicleparts": config.xpGain.vehicleparts = Convert.ToDouble(arg.GetString(2)); break; case "toolcrate": config.xpGain.toolcrate = Convert.ToDouble(arg.GetString(2)); break; case "foodcrate": config.xpGain.foodcrate = Convert.ToDouble(arg.GetString(2)); break; case "normalcrate": config.xpGain.normalcrate = Convert.ToDouble(arg.GetString(2)); break; case "elitecrate": config.xpGain.elitecrate = Convert.ToDouble(arg.GetString(2)); break; case "lootu": config.xpGain.underwaterlootcontainerxp = Convert.ToDouble(arg.GetString(2)); break; case "lootlocked": config.xpGain.lockedcratexp = Convert.ToDouble(arg.GetString(2)); break; case "loothacked": config.xpGain.hackablecratexp = Convert.ToDouble(arg.GetString(2)); break; case "aharvest": config.xpGain.animalharvestxp = Convert.ToDouble(arg.GetString(2)); break; case "charvest": config.xpGain.corpseharvestxp = Convert.ToDouble(arg.GetString(2)); break; case "tree": config.xpGather.treexp = Convert.ToDouble(arg.GetString(2)); break; case "ore": config.xpGather.orexp = Convert.ToDouble(arg.GetString(2)); break; case "metalorexp": config.xpGather.metalorexp = Convert.ToDouble(arg.GetString(2)); break; case "sulfurorexp": config.xpGather.sulfurorexp = Convert.ToDouble(arg.GetString(2)); break; case "stoneorexp": config.xpGather.stoneorexp = Convert.ToDouble(arg.GetString(2)); break; case "harvest": config.xpGather.harvestxp = Convert.ToDouble(arg.GetString(2)); break; case "plant": config.xpGather.plantxp = Convert.ToDouble(arg.GetString(2)); break; case "noxptools": config.xpGather.noxptools = Convert.ToBoolean(arg.GetString(2)); break; case "onetimexp": config.xpGather.onetimexp = Convert.ToBoolean(arg.GetString(2)); break; case "toolxpchance": config.xpGather.toolxpchance = Convert.ToDouble(arg.GetString(2)); break; case "toolxppercent": config.xpGather.toolxppercent = Convert.ToDouble(arg.GetString(2)); break; #endregion // Crafting/Building #region craft/build case "crafting": config.xpGain.craftingxp = Convert.ToDouble(arg.GetString(2)); break; case "craftxpdelay": config.xpGain.craftingxpdelay = Convert.ToBoolean(arg.GetString(2)); break; case "craftxpdelayseconds": config.xpGain.craftingxpdelayseconds = Convert.ToDouble(arg.GetString(2)); break; case "twigbuild": config.xpBuilding.twigstructure = Convert.ToDouble(arg.GetString(2)); break; case "woodbuild": config.xpBuilding.woodstructure = Convert.ToDouble(arg.GetString(2)); break; case "stonebuild": config.xpBuilding.stonestructure = Convert.ToDouble(arg.GetString(2)); break; case "metalbuild": config.xpBuilding.metalstructure = Convert.ToDouble(arg.GetString(2)); break; case "armorbuild": config.xpBuilding.armoredstructure = Convert.ToDouble(arg.GetString(2)); break; case "buildxpdelay": config.xpBuilding.buildxpdelay = Convert.ToBoolean(arg.GetString(2)); break; case "preventBGxp": config.xpBuilding.preventBGxp = Convert.ToBoolean(arg.GetString(2)); break; case "requirebuildingprivlidge": config.xpBuilding.requirebuildingprivlidge = Convert.ToBoolean(arg.GetString(2)); break; case "reducexp": config.xpBuilding.reducexp = Convert.ToBoolean(arg.GetString(2)); break; case "buildxpdelayseconds": config.xpBuilding.buildxpdelayseconds = Convert.ToInt32(arg.GetString(2)); break; case "buildxpreduction": config.xpBuilding.buildxpreduction = Convert.ToDouble(arg.GetString(2)); break; #endregion // XP Reduce #region xp reduce case "suicide": config.xpReducer.suicidereduce = Convert.ToBoolean(arg.GetString(2)); break; case "suicideamt": config.xpReducer.suicidereduceamount = Math.Round(Convert.ToDouble(arg.GetString(2)), 0); break; case "death": config.xpReducer.deathreduce = Convert.ToBoolean(arg.GetString(2)); break; case "deathamt": config.xpReducer.deathreduceamount = Math.Round(Convert.ToDouble(arg.GetString(2)), 0); break; case "rankdeath": config.xpReducer.rankdeathreduce = Convert.ToBoolean(arg.GetString(2)); break; #endregion // Teams #region teams case "enableteamxpgain": config.xpTeams.enableteamxpgain = Convert.ToBoolean(arg.GetString(2)); break; case "enableteamxploss": config.xpTeams.enableteamxploss = Convert.ToBoolean(arg.GetString(2)); break; case "teamdistance": config.xpTeams.teamdistance = (float)Convert.ToDouble(arg.GetString(2)); break; case "teamxpgainamt": config.xpTeams.teamxpgainamount = Convert.ToDouble(arg.GetString(2)); break; case "teamxplossamt": config.xpTeams.teamxplossamount = Convert.ToDouble(arg.GetString(2)); break; #endregion // Missions #region missions case "missionsucceeded": config.xpMissions.missionsucceededxp = Convert.ToInt32(arg.GetString(2)); break; case "missionfailed": config.xpMissions.missionfailed = Convert.ToBoolean(arg.GetString(2)); break; case "missionfailedxp": config.xpMissions.missionfailedxp = Convert.ToInt32(arg.GetString(2)); break; #endregion // XP Boost #region xp boost case "enablexpboost": config.xpGain.enablexpboost = Convert.ToBoolean(arg.GetString(2)); break; case "xpboostamount": config.xpGain.xpboostamount = Convert.ToDouble(arg.GetString(2)); break; case "xpboostorder": config.xpGain.xpboostorder = Convert.ToInt32(arg.GetString(2)); break; #endregion // Seasonal #region Seasonal case "gifts": config.xpGain.gifts = Convert.ToDouble(arg.GetString(2)); break; case "opengifts": config.xpGain.opengifts = Convert.ToDouble(arg.GetString(2)); break; case "opengiftsmed": config.xpGain.opengiftsmed = Convert.ToDouble(arg.GetString(2)); break; case "opengiftslarge": config.xpGain.opengiftslarge = Convert.ToDouble(arg.GetString(2)); break; case "upgradegiftsmed": config.xpGain.upgradegiftsmed = Convert.ToDouble(arg.GetString(2)); break; case "upgradegiftslarge": config.xpGain.upgradegiftslarge = Convert.ToDouble(arg.GetString(2)); break; #endregion // Cooking Plugin #region Cooking case "craftmeal": config.xpGain.craftmeal = Convert.ToDouble(arg.GetString(2)); break; #endregion } DestroyUi(player, XPerienceAdminPanelLevelXP); AdminLevelPage(player); break; case "ranks": switch (arg.GetString(1)) { // Ranks Settings #region Rank Settings case "enableranks": config.xpLevelRanks.enableresetranks = Convert.ToBoolean(arg.GetString(2)); break; case "resetallstatsskills": config.xpLevelRanks.resetallstatsskills = Convert.ToBoolean(arg.GetString(2)); break; case "playerdisable": config.xpLevelRanks.allowplayerdisable = Convert.ToBoolean(arg.GetString(2)); break; case "showrankinchat": config.xpLevelRanks.showrankinchat = Convert.ToBoolean(arg.GetString(2)); break; case "showrankinliveui": config.xpLevelRanks.showrankinliveui = Convert.ToBoolean(arg.GetString(2)); break; case "maxrank": config.xpLevelRanks.maxresetrank = Convert.ToInt32(arg.GetString(2)); break; case "enablerankxpboost": config.xpLevelRanks.enablerankxpboost = Convert.ToBoolean(arg.GetString(2)); break; case "rankxpboost": config.xpLevelRanks.rankxpboost = Convert.ToDouble(arg.GetString(2)); break; case "rankstatboost": config.xpLevelRanks.rankstatboost = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.researchcost = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.researchspeed = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.block = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.armor = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.distance = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.meleedmg = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.metabolism = Convert.ToBoolean(arg.GetString(2)); break; case "rankstatboostamt": config.xpLevelRanks.rankstatboostamount = Convert.ToDouble(arg.GetString(2)); break; case "rankstatpoints": config.xpLevelRanks.rankstatpointincrease = Convert.ToInt32(arg.GetString(2)); break; case "rankstatpointstart": config.xpLevelRanks.rankstatpointstart = Convert.ToInt32(arg.GetString(2)); break; case "rankskillboost": config.xpLevelRanks.rankskillboost = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.woodcuttergr = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.woodcutterbonus = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.smithypr = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.smithyps = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.smithyfc = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.smithyhqmc = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.smithyhqma = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.minergr = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.minerbonus = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.minerfuel = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.minermfc = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.minermfa = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.fisherfa = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.fisheria = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.fisherotr = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.foragergr = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.foragergwa = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.foragerric = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.huntergr = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.hunterbonus = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.hunterdmg = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.hunterndmg = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.crafterspeed = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.craftercost = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.crafterri = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.crafterrc = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.craftercc = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.crafterca = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.framerucost = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.framerrcost = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.medicrevivala = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.medicrecovera = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.medictools = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.scavelc = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.scavelm = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.scavcic = Convert.ToBoolean(arg.GetString(2)); config.Rankboostssettings.scavcim = Convert.ToBoolean(arg.GetString(2)); break; case "rankskillboostamt": config.xpLevelRanks.rankskillboostamount = Convert.ToDouble(arg.GetString(2)); break; case "rankskillpoints": config.xpLevelRanks.rankskillpointincrease = Convert.ToInt32(arg.GetString(2)); break; case "rankskillpointstart": config.xpLevelRanks.rankskillpointstart = Convert.ToInt32(arg.GetString(2)); break; case "truelevels": config.xpLevelRanks.showtruelevelprofile = Convert.ToBoolean(arg.GetString(2)); break; case "truexp": config.xpLevelRanks.showtruexpprofile = Convert.ToBoolean(arg.GetString(2)); break; case "keepremainingxp": config.xpLevelRanks.keepremainingxp = Convert.ToBoolean(arg.GetString(2)); break; case "keepgrouponrank": config.xpLevelRanks.keepgrouponrank = Convert.ToBoolean(arg.GetString(2)); break; case "increaselevelmultiplier": config.xpLevelRanks.increaselevelmultiplier = Convert.ToBoolean(arg.GetString(2)); break; case "levelmultiplierincrease": config.xpLevelRanks.levelmultiplierincrease = Convert.ToDouble(arg.GetString(2)); break; #endregion // Stat & Skill Settings #region stat/skill options case "researchcost": config.Rankboostssettings.researchcost = Convert.ToBoolean(arg.GetString(2)); break; case "researchspeed": config.Rankboostssettings.researchspeed = Convert.ToBoolean(arg.GetString(2)); break; case "block": config.Rankboostssettings.block = Convert.ToBoolean(arg.GetString(2)); break; case "armor": config.Rankboostssettings.armor = Convert.ToBoolean(arg.GetString(2)); break; case "distance": config.Rankboostssettings.distance = Convert.ToBoolean(arg.GetString(2)); break; case "meleedmg": config.Rankboostssettings.meleedmg = Convert.ToBoolean(arg.GetString(2)); break; case "metabolism": config.Rankboostssettings.metabolism = Convert.ToBoolean(arg.GetString(2)); break; case "woodcuttergr": config.Rankboostssettings.woodcuttergr = Convert.ToBoolean(arg.GetString(2)); break; case "woodcutterbonus": config.Rankboostssettings.woodcutterbonus = Convert.ToBoolean(arg.GetString(2)); break; case "smithypr": config.Rankboostssettings.smithypr = Convert.ToBoolean(arg.GetString(2)); break; case "smithyps": config.Rankboostssettings.smithyps = Convert.ToBoolean(arg.GetString(2)); break; case "smithyfc": config.Rankboostssettings.smithyfc = Convert.ToBoolean(arg.GetString(2)); break; case "smithyhqmc": config.Rankboostssettings.smithyhqmc = Convert.ToBoolean(arg.GetString(2)); break; case "smithyhqma": config.Rankboostssettings.smithyhqma = Convert.ToBoolean(arg.GetString(2)); break; case "minergr": config.Rankboostssettings.minergr = Convert.ToBoolean(arg.GetString(2)); break; case "minerbonus": config.Rankboostssettings.minerbonus = Convert.ToBoolean(arg.GetString(2)); break; case "minerfuel": config.Rankboostssettings.minerfuel = Convert.ToBoolean(arg.GetString(2)); break; case "minermfc": config.Rankboostssettings.minermfc = Convert.ToBoolean(arg.GetString(2)); break; case "minermfa": config.Rankboostssettings.minermfa = Convert.ToBoolean(arg.GetString(2)); break; case "fisherfa": config.Rankboostssettings.fisherfa = Convert.ToBoolean(arg.GetString(2)); break; case "fisheria": config.Rankboostssettings.fisheria = Convert.ToBoolean(arg.GetString(2)); break; case "fisherotr": config.Rankboostssettings.fisherotr = Convert.ToBoolean(arg.GetString(2)); break; case "foragergr": config.Rankboostssettings.foragergr = Convert.ToBoolean(arg.GetString(2)); break; case "foragergwa": config.Rankboostssettings.foragergwa = Convert.ToBoolean(arg.GetString(2)); break; case "foragerric": config.Rankboostssettings.foragerric = Convert.ToBoolean(arg.GetString(2)); break; case "huntergr": config.Rankboostssettings.huntergr = Convert.ToBoolean(arg.GetString(2)); break; case "hunterbonus": config.Rankboostssettings.hunterbonus = Convert.ToBoolean(arg.GetString(2)); break; case "hunterdmg": config.Rankboostssettings.hunterdmg = Convert.ToBoolean(arg.GetString(2)); break; case "hunterndmg": config.Rankboostssettings.hunterndmg = Convert.ToBoolean(arg.GetString(2)); break; case "crafterspeed": config.Rankboostssettings.crafterspeed = Convert.ToBoolean(arg.GetString(2)); break; case "craftercost": config.Rankboostssettings.craftercost = Convert.ToBoolean(arg.GetString(2)); break; case "crafterri": config.Rankboostssettings.crafterri = Convert.ToBoolean(arg.GetString(2)); break; case "crafterrc": config.Rankboostssettings.crafterrc = Convert.ToBoolean(arg.GetString(2)); break; case "craftercc": config.Rankboostssettings.craftercc = Convert.ToBoolean(arg.GetString(2)); break; case "crafterca": config.Rankboostssettings.crafterca = Convert.ToBoolean(arg.GetString(2)); break; case "framerucost": config.Rankboostssettings.framerucost = Convert.ToBoolean(arg.GetString(2)); break; case "framerrcost": config.Rankboostssettings.framerrcost = Convert.ToBoolean(arg.GetString(2)); break; case "medicrevivala": config.Rankboostssettings.medicrevivala = Convert.ToBoolean(arg.GetString(2)); break; case "medicrecovera": config.Rankboostssettings.medicrecovera = Convert.ToBoolean(arg.GetString(2)); break; case "medictools": config.Rankboostssettings.medictools = Convert.ToBoolean(arg.GetString(2)); break; case "scavelc": config.Rankboostssettings.scavelc = Convert.ToBoolean(arg.GetString(2)); break; case "scavelm": config.Rankboostssettings.scavelm = Convert.ToBoolean(arg.GetString(2)); break; case "scavcic": config.Rankboostssettings.scavcic = Convert.ToBoolean(arg.GetString(2)); break; case "scavcim": config.Rankboostssettings.scavcim = Convert.ToBoolean(arg.GetString(2)); break; #endregion } DestroyUi(player, XPerienceAdminPanelRanks); AdminRanksPage(player); break; case "stats": switch (arg.GetString(1)) { #region Mentality case "mentality": switch (arg.GetString(2)) { case "mentalitymaxlevel": config.mentality.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "mentalitycost": config.mentality.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "mentalitycostmultiplier": config.mentality.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "mentalityresearchcost": config.mentality.researchcost = Convert.ToDouble(arg.GetString(3)); break; case "mentalityresearchcosttechtree": config.mentality.researchcosttechtree = Convert.ToDouble(arg.GetString(3)); break; case "mentalityresearchspeed": config.mentality.researchspeed = Convert.ToDouble(arg.GetString(3)); break; case "mentalitycriticalchance": config.mentality.criticalchance = Convert.ToDouble(arg.GetString(3)); break; case "mentalitycriticaldmg": config.mentality.criticaldgm = Convert.ToDouble(arg.GetString(3)); break; case "mentalitydamagepvpnpc": config.mentality.damageincrease = Convert.ToDouble(arg.GetString(3)); break; case "mentalityothermod": config.mentality.useotherresearchmod = Convert.ToBoolean(arg.GetString(3)); break; case "mentalitylocktechtree": config.mentality.locktechtree = Convert.ToBoolean(arg.GetString(3)); break; case "mentalityunlocktechtreelevel": config.mentality.unlocktechtreelevel = Convert.ToInt32(arg.GetString(3)); break; } break; #endregion #region Dexterity case "dexterity": switch (arg.GetString(2)) { case "dexteritymaxlevel": config.dexterity.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "dexteritycost": config.dexterity.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "dexteritycostmultiplier": config.dexterity.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "dexterityblock": config.dexterity.blockchance = Convert.ToDouble(arg.GetString(3)); break; case "dexterityblockamt": config.dexterity.blockamount = Convert.ToDouble(arg.GetString(3)); break; case "dexteritydodge": config.dexterity.dodgechance = Convert.ToDouble(arg.GetString(3)); break; case "dexterityarmor": config.dexterity.reducearmordmg = Convert.ToDouble(arg.GetString(3)); break; case "horsespeed": config.dexterity.horsespeed = Convert.ToDouble(arg.GetString(3)); break; case "boatspeed": config.dexterity.boatspeed = Convert.ToDouble(arg.GetString(3)); break; case "vehiclespeed": config.dexterity.vehiclespeed = Convert.ToDouble(arg.GetString(3)); break; case "fuelreduce": config.dexterity.fuelreduce = Convert.ToDouble(arg.GetString(3)); break; } break; #endregion #region Captaincy case "captaincy": switch (arg.GetString(2)) { case "captaincymaxlevel": config.captaincy.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "captaincycost": config.captaincy.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "captaincycostmultiplier": config.captaincy.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "captaincyskillboost": config.captaincy.skillboost = Convert.ToDouble(arg.GetString(3)); break; case "captaincyenablexpboost": config.captaincy.enablexpboost = Convert.ToBoolean(arg.GetString(3)); break; case "allownoteam": config.captaincy.allownoteam = Convert.ToBoolean(arg.GetString(3)); break; case "captaincyxpboost": config.captaincy.xpboost = Convert.ToDouble(arg.GetString(3)); break; case "captaincydistance": config.captaincy.captaincydistance = (float)Convert.ToDouble(arg.GetString(3)); break; } break; #endregion #region Weaponry case "weaponry": switch (arg.GetString(2)) { case "weaponrymaxlevel": config.weaponry.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "weaponrycost": config.weaponry.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "weaponrycostmultiplier": config.weaponry.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "weaponrychance": config.weaponry.reductionchance = Convert.ToDouble(arg.GetString(3)); break; case "weaponrytools": config.weaponry.tool = Convert.ToDouble(arg.GetString(3)); break; case "weaponrypowertools": config.weaponry.powertools = Convert.ToDouble(arg.GetString(3)); break; case "weaponrymeleeweapons": config.weaponry.meleeweapons = Convert.ToDouble(arg.GetString(3)); break; case "weaponryprojectileweapons": config.weaponry.projectileweapons = Convert.ToDouble(arg.GetString(3)); break; case "weaponrymindamage": config.weaponry.mindamage = Convert.ToDouble(arg.GetString(3)); break; case "weaponrymaxammo": config.weaponry.maxammo = Convert.ToDouble(arg.GetString(3)); break; case "weaponrymaxammolimit": config.weaponry.maxammolimit = Convert.ToDouble(arg.GetString(3)); break; case "skinboxdisable": config.weaponry.skinboxdisable = Convert.ToBoolean(arg.GetString(3)); break; case "neverweartools": config.weaponry.neverweartools = Convert.ToBoolean(arg.GetString(3)); break; case "neverwearweapons": config.weaponry.neverwearweapons = Convert.ToBoolean(arg.GetString(3)); break; case "useweaponmechanics": config.weaponry.useweaponmechanics = Convert.ToBoolean(arg.GetString(3)); break; case "weaponryreloadhook": config.weaponry.reloadhook = arg.GetString(3); break; case "excludeweapons": config.weaponry.excludedweapons = arg.GetString(3); break; } break; #endregion #region Ninjary case "ninjary": switch (arg.GetString(2)) { case "ninjarymaxlevel": config.ninjary.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "ninjarycost": config.ninjary.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "ninjarycostmultiplier": config.ninjary.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "patrolstealth": config.ninjary.patrolstealth = Convert.ToDouble(arg.GetString(3)); break; case "ch47stealth": config.ninjary.ch47stealth = Convert.ToDouble(arg.GetString(3)); break; case "bradleystealth": config.ninjary.bradleystealth = Convert.ToDouble(arg.GetString(3)); break; case "npcstealth": config.ninjary.npcstealth = Convert.ToDouble(arg.GetString(3)); break; case "turretstealth": config.ninjary.turretstealth = Convert.ToDouble(arg.GetString(3)); break; case "knifeincrease": config.ninjary.knifeincrease = Convert.ToDouble(arg.GetString(3)); break; case "swordincrease": config.ninjary.swordincrease = Convert.ToDouble(arg.GetString(3)); break; } break; #endregion #region Might case "might": switch (arg.GetString(2)) { case "mightmaxlevel": config.might.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "mightcost": config.might.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "mightcostmultiplier": config.might.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "mightarmor": config.might.armor = Convert.ToDouble(arg.GetString(3)); break; case "mightmelee": config.might.meleedmg = Convert.ToDouble(arg.GetString(3)); break; case "mightmeta": config.might.metabolism = Convert.ToDouble(arg.GetString(3)); break; case "mightbleed": config.might.bleedreduction = Convert.ToDouble(arg.GetString(3)); break; case "mightrad": config.might.radreduction = Convert.ToDouble(arg.GetString(3)); break; case "mightheat": config.might.heattolerance = Convert.ToDouble(arg.GetString(3)); break; case "mightcold": config.might.coldtolerance = Convert.ToDouble(arg.GetString(3)); break; } break; #endregion } DestroyUi(player, XPerienceAdminPanelStats); AdminStatsPage(player, arg.GetString(1)); break; case "skills": switch (arg.GetString(1)) { #region Woodcutter case "woodcutter": switch (arg.GetString(2)) { case "woodcuttermaxlevel": config.woodcutter.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "woodcuttercost": config.woodcutter.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "woodcuttercostmultiplier": config.woodcutter.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "woodcuttergatherrate": config.woodcutter.gatherrate = Convert.ToDouble(arg.GetString(3)); break; case "woodcutterbonus": config.woodcutter.bonusincrease = Convert.ToDouble(arg.GetString(3)); break; case "woodcutterapple": config.woodcutter.applechance = Convert.ToDouble(arg.GetString(3)); break; } break; #endregion #region Smithy case "smithy": switch (arg.GetString(2)) { case "smithymaxlevel": config.smithy.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "smithycost": config.smithy.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "smithycostmultiplier": config.smithy.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "smithyprate": config.smithy.productionrate = Convert.ToDouble(arg.GetString(3)); break; case "smithypspeed": config.smithy.productionspeed = Convert.ToDouble(arg.GetString(3)); break; case "smithyfuel": config.smithy.fuelconsumption = Convert.ToDouble(arg.GetString(3)); break; case "smithymetalchance": config.smithy.metalchance = Convert.ToDouble(arg.GetString(3)); break; case "smithymetalamount": config.smithy.metalamount = Convert.ToInt32(arg.GetString(3)); break; } break; #endregion #region Miner case "miner": switch (arg.GetString(2)) { case "minermaxlevel": config.miner.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "minercost": config.miner.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "minercostmultiplier": config.miner.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "minergatherrate": config.miner.gatherrate = Convert.ToDouble(arg.GetString(3)); break; case "minerbonus": config.miner.bonusincrease = Convert.ToDouble(arg.GetString(3)); break; case "minerfuel": config.miner.fuelconsumption = Convert.ToDouble(arg.GetString(3)); break; case "minermetalchance": config.miner.metalchance = Convert.ToDouble(arg.GetString(3)); break; case "minermetalamount": config.miner.metalamount = Convert.ToInt32(arg.GetString(3)); break; } break; #endregion #region Forager case "forager": switch (arg.GetString(2)) { case "foragermaxlevel": config.forager.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "foragercost": config.forager.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "foragercostmultiplier": config.forager.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "foragergatherrate": config.forager.gatherrate = Convert.ToDouble(arg.GetString(3)); break; case "foragerseed": config.forager.chanceincrease = Convert.ToDouble(arg.GetString(3)); break; case "foragerrandom": config.forager.randomchance = Convert.ToDouble(arg.GetString(3)); break; case "grubwormincrease": config.forager.grubwormincrease = Convert.ToDouble(arg.GetString(32)); break; } break; #endregion #region Hunter case "hunter": switch (arg.GetString(2)) { case "huntermaxlevel": config.hunter.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "huntercost": config.hunter.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "huntercostmultiplier": config.hunter.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "huntergatherrate": config.hunter.gatherrate = Convert.ToDouble(arg.GetString(3)); break; case "hunterbonus": config.hunter.bonusincrease = Convert.ToDouble(arg.GetString(3)); break; case "hunterdamage": config.hunter.damageincrease = Convert.ToDouble(arg.GetString(3)); break; case "hunterndamage": config.hunter.nightdmgincrease = Convert.ToDouble(arg.GetString(3)); break; case "bowdmgincrease": config.hunter.bowdmgincrease = Convert.ToDouble(arg.GetString(3)); break; case "exhunterlongrange": config.hunter.excludelongrangeweapons = Convert.ToBoolean(arg.GetString(3)); break; case "exhuntermedrange": config.hunter.excludemedrangeweapons = Convert.ToBoolean(arg.GetString(3)); break; } break; #endregion #region Fisher case "fisher": switch (arg.GetString(2)) { case "fishermaxlevel": config.fisher.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "fishercost": config.fisher.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "fishercostmultiplier": config.fisher.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "fisheramount": config.fisher.fishamountincrease = Convert.ToDouble(arg.GetString(3)); break; case "fisheritem": config.fisher.itemamountincrease = Convert.ToDouble(arg.GetString(3)); break; case "fisheroxygen": config.fisher.oxygenreduction = Convert.ToDouble(arg.GetString(3)); break; case "fisheroxygentank": config.fisher.oxygentankreduction = Convert.ToDouble(arg.GetString(3)); break; } break; #endregion #region Crafter case "crafter": switch (arg.GetString(2)) { case "craftermaxlevel": config.crafter.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "craftercost": config.crafter.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "craftercostmultiplier": config.crafter.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "crafterspeed": config.crafter.craftspeed = Convert.ToDouble(arg.GetString(3)); break; case "craftercosts": config.crafter.craftcost = Convert.ToDouble(arg.GetString(3)); break; case "crafterrepair": config.crafter.repairincrease = Convert.ToDouble(arg.GetString(3)); break; case "crafterrepaircost": config.crafter.repaircost = Convert.ToDouble(arg.GetString(3)); break; case "craftercondtition": config.crafter.conditionchance = Convert.ToDouble(arg.GetString(3)); break; case "craftercondtitionamt": config.crafter.conditionamount = Convert.ToDouble(arg.GetString(3)); break; } break; #endregion #region Framer case "framer": switch (arg.GetString(2)) { case "framermaxlevel": config.framer.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "framercost": config.framer.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "framercostmultiplier": config.framer.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "framerupgrade": config.framer.upgradecost = Convert.ToDouble(arg.GetString(3)); break; case "framerrepair": config.framer.repaircost = Convert.ToDouble(arg.GetString(3)); break; case "framertime": config.framer.repairtime = Convert.ToDouble(arg.GetString(3)); break; case "woodcost": config.framer.woodcost = Convert.ToInt32(arg.GetString(3)); break; case "stonecost": config.framer.stonecost = Convert.ToInt32(arg.GetString(3)); break; case "metalcost": config.framer.metalcost = Convert.ToInt32(arg.GetString(3)); break; case "armorcost": config.framer.armorcost = Convert.ToInt32(arg.GetString(3)); break; } break; #endregion #region Electrician case "electrician": switch (arg.GetString(2)) { case "electricianmaxlevel": config.electrician.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "electriciancost": config.electrician.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "electriciancostmultiplier": config.electrician.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "solarpanelinputincrease": config.electrician.solarpanelinputincrease = Convert.ToDouble(arg.GetString(3)); break; case "solarpanelmaxincrease": config.electrician.solarpanelmaxincrease = Convert.ToDouble(arg.GetString(3)); break; case "smallbatterymaxincrease": config.electrician.smallbatterymaxincrease = Convert.ToDouble(arg.GetString(3)); break; case "mediumbatterymaxincrease": config.electrician.mediumbatterymaxincrease = Convert.ToDouble(arg.GetString(3)); break; case "largebatterymaxincrease": config.electrician.largebatterymaxincrease = Convert.ToDouble(arg.GetString(3)); break; case "smallgeneratormaxincrease": config.electrician.smallgeneratormaxincrease = Convert.ToDouble(arg.GetString(3)); break; case "testgeneratormaxincrease": config.electrician.testgeneratormaxincrease = Convert.ToDouble(arg.GetString(3)); break; case "electricwindmillmaxincrease": config.electrician.electricwindmillmaxincrease = Convert.ToDouble(arg.GetString(3)); break; case "allowminsolarinput": config.electrician.allowminsolarinput = Convert.ToBoolean(arg.GetString(3)); break; case "minsolarinput": config.electrician.minsolarinput = Convert.ToInt32(arg.GetString(3)); break; } break; #endregion #region Medic case "medic": switch (arg.GetString(2)) { case "medicmaxlevel": config.medic.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "mediccost": config.medic.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "mediccostmultiplier": config.medic.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "medicrevival": config.medic.revivehp = Convert.ToDouble(arg.GetString(3)); break; case "medicrecover": config.medic.recoverhp = Convert.ToDouble(arg.GetString(3)); break; case "mediccraft": config.medic.crafttime = Convert.ToDouble(arg.GetString(3)); break; case "medictools": config.medic.tools = Convert.ToDouble(arg.GetString(3)); break; case "medicteas": config.medic.teas = Convert.ToDouble(arg.GetString(3)); break; case "preventbandageboost": config.medic.preventbandageboost = Convert.ToBoolean(arg.GetString(3)); break; } break; #endregion #region Scavenger case "scavenger": switch (arg.GetString(2)) { case "scavmaxlevel": config.scavenger.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "scavccost": config.scavenger.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "scavcostmultiplier": config.scavenger.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "scavchance": config.scavenger.scavchance = Convert.ToDouble(arg.GetString(3)); break; case "scavlootchance": config.scavenger.scavlootchance = Convert.ToDouble(arg.GetString(3)); break; case "scavmultiplier": config.scavenger.scavmultiplier = Convert.ToDouble(arg.GetString(3)); break; case "customscavmultiplier": config.scavenger.customscavmultiplier = Convert.ToDouble(arg.GetString(3)); break; case "customscavrandom": config.scavenger.customscavrandom = Convert.ToBoolean(arg.GetString(3)); break; case "usecustomscavlist": config.scavenger.usecustomscavlist = Convert.ToBoolean(arg.GetString(3)); break; case "scavbarrel": config.scavenger.drops = Convert.ToBoolean(arg.GetString(3)); break; case "scavcrate": config.scavenger.crates = Convert.ToBoolean(arg.GetString(3)); break; case "scavuncrate": config.scavenger.uncrates = Convert.ToBoolean(arg.GetString(3)); break; case "scavlockedcrate": config.scavenger.lockedcrates = Convert.ToBoolean(arg.GetString(3)); break; case "scavhackcrate": config.scavenger.hackcrates = Convert.ToBoolean(arg.GetString(3)); break; case "scientists": config.scavenger.scientists = Convert.ToBoolean(arg.GetString(3)); break; case "scavcomponly": config.scavenger.componentsonly = Convert.ToBoolean(arg.GetString(3)); break; } break; #endregion #region Demolitionist case "demolitionist": switch (arg.GetString(2)) { case "demolitionistmaxlevel": config.demolitionist.maxlvl = Convert.ToInt32(arg.GetString(3)); break; case "demolitionistcost": config.demolitionist.pointcoststart = Convert.ToInt32(arg.GetString(3)); break; case "demolitionistcostmultiplier": config.demolitionist.costmultiplier = Convert.ToInt32(arg.GetString(3)); break; case "explosivedudreduction": config.demolitionist.explosivedudreduction = Convert.ToDouble(arg.GetString(3)); break; case "explosivedamage": config.demolitionist.explosivedamage = Convert.ToDouble(arg.GetString(3)); break; case "explosiveradius": config.demolitionist.explosiveradius = Convert.ToDouble(arg.GetString(3)); break; } break; #endregion } DestroyUi(player, XPerienceAdminPanelSkills); AdminSkillsPage(player, arg.GetString(1)); break; case "playerdata": switch(arg.GetString(1)) { case "playtime": config.playerprofilesettings.playtime = Convert.ToBoolean(arg.GetString(2)); break; case "alivetime": config.playerprofilesettings.alivetime = Convert.ToBoolean(arg.GetString(2)); break; case "sleepingtime": config.playerprofilesettings.sleepingtime = Convert.ToBoolean(arg.GetString(2)); break; case "swimmingtime": config.playerprofilesettings.swimingtime = Convert.ToBoolean(arg.GetString(2)); break; case "drivingtime": config.playerprofilesettings.drivingtime = Convert.ToBoolean(arg.GetString(2)); break; case "flyingtime": config.playerprofilesettings.flyingtime = Convert.ToBoolean(arg.GetString(2)); break; case "boatingtime": config.playerprofilesettings.boatingtime = Convert.ToBoolean(arg.GetString(2)); break; case "basetime": config.playerprofilesettings.basetime = Convert.ToBoolean(arg.GetString(2)); break; case "monumentime": config.playerprofilesettings.monumenttime = Convert.ToBoolean(arg.GetString(2)); break; case "wildernesstime": config.playerprofilesettings.wildernesstime = Convert.ToBoolean(arg.GetString(2)); break; case "metersran": config.playerprofilesettings.metersran = Convert.ToBoolean(arg.GetString(2)); break; case "meterswalked": config.playerprofilesettings.meterswalked = Convert.ToBoolean(arg.GetString(2)); break; case "lastdmgrec": config.playerprofilesettings.lastdmgrec = Convert.ToBoolean(arg.GetString(2)); break; case "lastdmgrecby": config.playerprofilesettings.lastdmgrecby = Convert.ToBoolean(arg.GetString(2)); break; case "lastdmgdelt": config.playerprofilesettings.lastdmgdelt = Convert.ToBoolean(arg.GetString(2)); break; case "lastdmgdeltto": config.playerprofilesettings.lastdmgdeltto = Convert.ToBoolean(arg.GetString(2)); break; case "showunusedeffects": config.playerprofilesettings.showunusedeffects = Convert.ToBoolean(arg.GetString(2)); break; case "useplayeravatar": config.playerprofilesettings.useplayeravatar = Convert.ToBoolean(arg.GetString(2)); break; case "profilemenusettings": config.playerprofilesettings.profilemenusettings = Convert.ToBoolean(arg.GetString(2)); break; case "profilemenuraids": config.playerprofilesettings.profilemenuraids = Convert.ToBoolean(arg.GetString(2)); break; case "profilemenutopplayers": config.playerprofilesettings.profilemenutopplayers = Convert.ToBoolean(arg.GetString(2)); break; case "profilemenuhelp": config.playerprofilesettings.profilemenuhelp = Convert.ToBoolean(arg.GetString(2)); break; case "profilemenucalculations": config.playerprofilesettings.profilemenucalculations = Convert.ToBoolean(arg.GetString(2)); break; case "skillshelp": config.playerprofilesettings.skillshelp = Convert.ToBoolean(arg.GetString(2)); break; case "profilemenuwelcome": config.playerprofilesettings.profilemenuwelcome = Convert.ToBoolean(arg.GetString(2)); break; case "menutype": config.playerprofilesettings.menutype = Convert.ToInt32(arg.GetString(2)); break; case "usebgimage": config.playerprofilesettings.usebgimage = Convert.ToBoolean(arg.GetString(2)); break; case "allowprofilebgchange": config.playerprofilesettings.allowprofilebgchange = Convert.ToBoolean(arg.GetString(2)); break; case "bgfadein": config.playerprofilesettings.bgfadein = Convert.ToDouble(arg.GetString(2)); break; case "usemenubgimage": config.playerprofilesettings.usemenubgimage = Convert.ToBoolean(arg.GetString(2)); break; case "menuheight": config.playerprofilesettings.menuheight = Convert.ToDouble(arg.GetString(2)); break; case "menuwidth": config.playerprofilesettings.menuwidth = Convert.ToDouble(arg.GetString(2)); break; case "menubuttonfont": config.playerprofilesettings.menubuttonfont = Convert.ToInt32(arg.GetString(2)); break; case "menubuttonheight": config.playerprofilesettings.menubuttonheight = Convert.ToDouble(arg.GetString(2)); break; case "AnchorMax": config.playerprofilesettings.AnchorMax = string.Join(" ", arg.Args.Skip(2)); break; case "AnchorMin": config.playerprofilesettings.AnchorMin = string.Join(" ", arg.Args.Skip(2)); break; case "OffsetMax": config.playerprofilesettings.OffsetMax = string.Join(" ", arg.Args.Skip(2)); break; case "OffsetMin": config.playerprofilesettings.OffsetMin = string.Join(" ", arg.Args.Skip(2)); break; } DestroyUi(player, XPerienceAdminPanelInfoBox); AdminPlayerInfoPage(player); break; case "playerbg": switch(arg.GetString(1)) { case "profilebg": config.playerprofilesettings.profilebg = Convert.ToInt32(arg.GetString(2)); break; } DestroyUi(player, XPerienceAdminPanelProfileBackgrounds); AdminProfileBackgrounds(player, config.playerprofilesettings.profilebg, Convert.ToInt16(arg.GetString(4))); break; case "dailylimits": switch (arg.GetString(1)) { case "resetdailytimer": DailyLimit(true); foreach (var players in BasePlayer.activePlayerList) { players.ChatMessage(XPLang("dailylimitreset", players.UserIDString, config.dailytimer.dailyresettimerhours)); } break; case "dailyresettimerhours": config.dailytimer.dailyresettimerhours = Convert.ToInt32(arg.GetString(2)); break; case "enabledailyxplimit": config.dailyxpLimit.enabledailyxplimit = Convert.ToBoolean(arg.GetString(2)); break; case "dailyxplimit": config.dailyxpLimit.dailyxplimit = Convert.ToInt32(arg.GetString(2)); break; case "dailyxplimitvip": config.dailyxpLimit.dailyxplimitvip = Convert.ToInt32(arg.GetString(2)); break; case "limitmultipliertype": config.dailyxpLimit.limitmultipliertype = Convert.ToInt32(arg.GetString(2)); break; case "limitmultiplier": config.dailyxpLimit.limitmultiplier = Convert.ToInt32(arg.GetString(2)); break; case "limitpercentage": config.dailyxpLimit.limitpercentage = Convert.ToDouble(arg.GetString(2)); break; case "enabledailyresetlimit": config.dailyresetLimit.enabledailyresetlimit = Convert.ToBoolean(arg.GetString(2)); break; case "dailystatlimit": config.dailyresetLimit.dailystatlimit = Convert.ToInt32(arg.GetString(2)); break; case "dailystatlimitvip": config.dailyresetLimit.dailystatlimitvip = Convert.ToInt32(arg.GetString(2)); break; case "dailyskilllimit": config.dailyresetLimit.dailyskilllimit = Convert.ToInt32(arg.GetString(2)); break; case "dailyskilllimitvip": config.dailyresetLimit.dailyskilllimitvip = Convert.ToInt32(arg.GetString(2)); break; } DestroyUi(player, XPerienceAdminPanelDailyLimits); AdminDailyLimitsPage(player); break; case "timercolor": switch (arg.GetString(1)) { case "userpermissions": config.defaultOptions.userpermissions = Convert.ToBoolean(arg.GetString(2)); break; case "defaultliveuimoveable": config.defaultOptions.liveuistatslocationmoveable = Convert.ToBoolean(arg.GetString(2)); break; case "defaultliveui": config.defaultOptions.liveuistatslocation = Convert.ToInt32(arg.GetString(2)); break; case "showchatprofile": config.defaultOptions.showchatprofileonconnect = Convert.ToBoolean(arg.GetString(2)); break; case "armorchat": config.defaultOptions.disablearmorchat = Convert.ToBoolean(arg.GetString(2)); break; case "NotifcationCooldown": config.defaultOptions.NotifcationCooldown = Convert.ToInt32(arg.GetString(2)); break; case "defaultrestristresets": config.defaultOptions.restristresets = Convert.ToBoolean(arg.GetString(2)); break; case "allowrespec": config.defaultOptions.allowrespec = Convert.ToBoolean(arg.GetString(2)); break; case "defaultstattimer": config.defaultOptions.resetminsstats = Convert.ToInt32(arg.GetString(2)); break; case "defaultskilltimer": config.defaultOptions.resetminsskills = Convert.ToInt32(arg.GetString(2)); break; case "defaultvipstattimer": config.defaultOptions.vipresetminstats = Convert.ToInt32(arg.GetString(2)); break; case "defaultvipskilltimer": config.defaultOptions.vipresetminsskills = Convert.ToInt32(arg.GetString(2)); break; case "defaultplayerfixdata": config.defaultOptions.playerfixdatatimer = Convert.ToInt32(arg.GetString(2)); break; case "defaultadminbypass": config.defaultOptions.bypassadminreset = Convert.ToBoolean(arg.GetString(2)); break; case "defaultfixdatadisable": config.defaultOptions.disableplayerfixdata = Convert.ToBoolean(arg.GetString(2)); break; case "defaulthardcore": config.defaultOptions.hardcorenoreset = Convert.ToBoolean(arg.GetString(2)); break; case "allowplayersearch": config.defaultOptions.allowplayersearch = Convert.ToBoolean(arg.GetString(2)); break; case "allowplayerreset": config.defaultOptions.allowplayerreset = Convert.ToBoolean(arg.GetString(2)); break; case "topplayersperpage": config.defaultOptions.topplayersperpage = Convert.ToInt32(arg.GetString(2)); break; case "showonlinestatus": config.defaultOptions.showonlinestatus = Convert.ToBoolean(arg.GetString(2)); break; case "showfuelguage": config.defaultOptions.showfuelguage = Convert.ToBoolean(arg.GetString(2)); break; case "showspeedometer": config.defaultOptions.showspeedometer = Convert.ToBoolean(arg.GetString(2)); break; case "enabledashpanel": config.defaultOptions.enabledashpanel = Convert.ToBoolean(arg.GetString(2)); break; case "speedometertype": config.defaultOptions.speedometertype = Convert.ToInt32(arg.GetString(2)); break; case "useprogressivelevelicons": config.defaultOptions.useprogressivelevelicons = Convert.ToBoolean(arg.GetString(2)); break; case "dropsgotoplayerinventory": config.defaultOptions.dropsgotoplayerinventory = Convert.ToBoolean(arg.GetString(2)); break; case "enableconfirmationprompt": config.defaultOptions.enableconfirmationprompt = Convert.ToBoolean(arg.GetString(2)); break; case "showchatnotifications": config.defaultOptions.showchatnotifications = Convert.ToBoolean(arg.GetString(2)); break; case "showlevelinchat": config.defaultOptions.showlevelinchat = Convert.ToBoolean(arg.GetString(2)); break; case "disablechats": config.defaultOptions.hidechatnotifications = Convert.ToBoolean(arg.GetString(2)); break; case "debugmode": config.defaultOptions.debugmode = Convert.ToBoolean(arg.GetString(2)); break; case "forcereload": LoadImages(true); break; } DestroyUi(player, XPerienceAdminPanelTimerColor); AdminTimerColorPage(player); break; case "soundeffects": switch(arg.GetString(1)) { case "levelup": config.soundEffects.levelup = Convert.ToBoolean(arg.GetString(2)); break; case "leveldown": config.soundEffects.leveldown = Convert.ToBoolean(arg.GetString(2)); break; case "rankup": config.soundEffects.rankup = Convert.ToBoolean(arg.GetString(2)); break; case "skillup": config.soundEffects.skillup = Convert.ToBoolean(arg.GetString(2)); break; case "statup": config.soundEffects.statup = Convert.ToBoolean(arg.GetString(2)); break; case "statreset": config.soundEffects.statreset = Convert.ToBoolean(arg.GetString(2)); break; case "skillreset": config.soundEffects.skillreset = Convert.ToBoolean(arg.GetString(2)); break; case "scavengerloot": config.soundEffects.scavengerloot = Convert.ToBoolean(arg.GetString(2)); break; case "foragerloot": config.soundEffects.foragerloot = Convert.ToBoolean(arg.GetString(2)); break; case "levelupeffect": config.soundEffects.levelupeffect = arg.GetString(2); break; case "leveldowneffect": config.soundEffects.leveldowneffect = arg.GetString(2); break; case "rankupeffect": config.soundEffects.rankupeffect = arg.GetString(2); break; case "statupeffect": config.soundEffects.statupeffect = arg.GetString(2); break; case "skillupeffect": config.soundEffects.skillupeffect = arg.GetString(2); break; case "statreseteffect": config.soundEffects.statreseteffect = arg.GetString(2); break; case "skillreseteffect": config.soundEffects.skillreseteffect = arg.GetString(2); break; case "scavengerlooteffect": config.soundEffects.scavengerlooteffect = arg.GetString(2); break; case "foragerlooteffect": config.soundEffects.foragerlooteffect = arg.GetString(2); break; } DestroyUi(player, XPerienceAdminPanelSoundEffects); AdminSoundEffectsPage(player); break; case "othermods": switch (arg.GetString(1)) { // Kill Records #region Kill Records case "krshowbutton": config.xpBonus.showkrbutton = Convert.ToBoolean(arg.GetString(3)); break; case "krenable": config.xpBonus.enablebonus = Convert.ToBoolean(arg.GetString(3)); break; case "krrequiredkills": config.xpBonus.requiredkills = Convert.ToInt32(arg.GetString(2)); break; case "krbonusamount": config.xpBonus.bonusxp = Convert.ToDouble(arg.GetString(2)); break; case "krbonusend": config.xpBonus.endbonus = Convert.ToInt32(arg.GetString(2)); break; case "krenablemulti": config.xpBonus.multibonus = Convert.ToBoolean(arg.GetString(3)); break; case "krmultitype": if (Convert.ToBoolean(arg.GetString(3))) { config.xpBonus.multibonustype = "increase"; } else { config.xpBonus.multibonustype = "fixed"; } break; #endregion // Economics #region Economics case "showbalanceprofile": config.xpEcon.showbalanceprofile = Convert.ToBoolean(arg.GetString(3)); break; case "econlevelup": config.xpEcon.econlevelup = Convert.ToBoolean(arg.GetString(3)); break; case "econleveldown": config.xpEcon.econleveldown = Convert.ToBoolean(arg.GetString(3)); break; case "econresetstats": config.xpEcon.econresetstats = Convert.ToBoolean(arg.GetString(3)); break; case "econresetskills": config.xpEcon.econresetskills = Convert.ToBoolean(arg.GetString(3)); break; case "econresetstat": config.xpEcon.econresetstat = Convert.ToBoolean(arg.GetString(3)); break; case "econresetskill": config.xpEcon.econresetskill = Convert.ToBoolean(arg.GetString(3)); break; case "econlevelreward": config.xpEcon.econlevelreward = Convert.ToInt32(arg.GetString(2)); break; case "econlevelreduction": config.xpEcon.econlevelreduction = Convert.ToInt32(arg.GetString(2)); break; case "econresetstatscost": config.xpEcon.econresetstatscost = Convert.ToInt32(arg.GetString(2)); break; case "econresetskillscost": config.xpEcon.econresetskillscost = Convert.ToInt32(arg.GetString(2)); break; case "econresetstatcost": config.xpEcon.econresetstatcost = Convert.ToInt32(arg.GetString(2)); break; case "econresetskillcost": config.xpEcon.econresetskillcost = Convert.ToInt32(arg.GetString(2)); break; case "econstatlevelcost": config.xpEcon.econstatlevelcost = Convert.ToBoolean(arg.GetString(3)); break; case "econskilllevelcost": config.xpEcon.econskilllevelcost = Convert.ToBoolean(arg.GetString(3)); break; case "econskilllevelcostmultiplier": config.xpEcon.econskilllevelcostmultiplier = Convert.ToDouble(arg.GetString(2)); break; case "econstatlevelcostmultiplier": config.xpEcon.econstatlevelcostmultiplier = Convert.ToDouble(arg.GetString(2)); break; case "econmentality": config.xpEcon.econmentality = Convert.ToDouble(arg.GetString(2)); break; case "econdexterity": config.xpEcon.econdexterity = Convert.ToDouble(arg.GetString(2)); break; case "econmight": config.xpEcon.econmight = Convert.ToDouble(arg.GetString(2)); break; case "econcaptaincy": config.xpEcon.econcaptaincy = Convert.ToDouble(arg.GetString(2)); break; case "econweaponry": config.xpEcon.econweaponry = Convert.ToDouble(arg.GetString(2)); break; case "econninjary": config.xpEcon.econninjary = Convert.ToDouble(arg.GetString(2)); break; case "econwoodcutter": config.xpEcon.econwoodcutter = Convert.ToDouble(arg.GetString(2)); break; case "econsmithy": config.xpEcon.econsmithy = Convert.ToDouble(arg.GetString(2)); break; case "econminer": config.xpEcon.econminer = Convert.ToDouble(arg.GetString(2)); break; case "econforager": config.xpEcon.econforager = Convert.ToDouble(arg.GetString(2)); break; case "econhunter": config.xpEcon.econhunter = Convert.ToDouble(arg.GetString(2)); break; case "econfisher": config.xpEcon.econfisher = Convert.ToDouble(arg.GetString(2)); break; case "econcrafter": config.xpEcon.econcrafter = Convert.ToDouble(arg.GetString(2)); break; case "econframer": config.xpEcon.econframer = Convert.ToDouble(arg.GetString(2)); break; case "econmedic": config.xpEcon.econmedic = Convert.ToDouble(arg.GetString(2)); break; case "econscavenger": config.xpEcon.econscavenger = Convert.ToDouble(arg.GetString(2)); break; case "econelectrician": config.xpEcon.econelectrician = Convert.ToDouble(arg.GetString(2)); break; case "econdemolitionist": config.xpEcon.econdemolitionist = Convert.ToDouble(arg.GetString(2)); break; case "econtamer": config.xpEcon.econtamer = Convert.ToDouble(arg.GetString(2)); break; #endregion // Server Rewards #region Server Rewards case "srewardlevelup": config.sRewards.srewardlevelup = Convert.ToBoolean(arg.GetString(3)); break; case "srewardleveldown": config.sRewards.srewardleveldown = Convert.ToBoolean(arg.GetString(3)); break; case "srewardresetstats": config.sRewards.srewardresetstats = Convert.ToBoolean(arg.GetString(3)); break; case "srewardresetskills": config.sRewards.srewardresetskills = Convert.ToBoolean(arg.GetString(3)); break; case "srewardresetstat": config.sRewards.srewardresetstat = Convert.ToBoolean(arg.GetString(3)); break; case "srewardresetskill": config.sRewards.srewardresetskill = Convert.ToBoolean(arg.GetString(3)); break; case "srewardlevelupamt": config.sRewards.srewardlevelupamt = Convert.ToInt32(arg.GetString(2)); break; case "srewardleveldownamt": config.sRewards.srewardleveldownamt = Convert.ToInt32(arg.GetString(2)); break; case "srewardresetstatscost": config.sRewards.srewardresetstatscost = Convert.ToInt32(arg.GetString(2)); break; case "srewardresetskillscost": config.sRewards.srewardresetskillscost = Convert.ToInt32(arg.GetString(2)); break; case "srewardresetstatcost": config.sRewards.srewardresetstatcost = Convert.ToInt32(arg.GetString(2)); break; case "srewardresetskillcost": config.sRewards.srewardresetskillcost = Convert.ToInt32(arg.GetString(2)); break; case "srewardstatlevelcost": config.sRewards.srewardstatlevelcost = Convert.ToBoolean(arg.GetString(3)); break; case "srewardskilllevelcost": config.sRewards.srewardskilllevelcost = Convert.ToBoolean(arg.GetString(3)); break; case "srewardskilllevelcostmultiplier": config.sRewards.srewardskilllevelcostmultiplier = Convert.ToInt32(arg.GetString(2)); break; case "srewardstatlevelcostmultiplier": config.sRewards.srewardstatlevelcostmultiplier = Convert.ToInt32(arg.GetString(2)); break; case "srewardmentality": config.sRewards.srewardmentality = Convert.ToInt32(arg.GetString(2)); break; case "srewarddexterity": config.sRewards.srewarddexterity = Convert.ToInt32(arg.GetString(2)); break; case "srewardmight": config.sRewards.srewardmight = Convert.ToInt32(arg.GetString(2)); break; case "srewardcaptaincy": config.sRewards.srewardcaptaincy = Convert.ToInt32(arg.GetString(2)); break; case "srewardweaponry": config.sRewards.srewardweaponry = Convert.ToInt32(arg.GetString(2)); break; case "srewardninjary": config.sRewards.srewardninjary = Convert.ToInt32(arg.GetString(2)); break; case "srewardwoodcutter": config.sRewards.srewardwoodcutter = Convert.ToInt32(arg.GetString(2)); break; case "srewardsmithy": config.sRewards.srewardsmithy = Convert.ToInt32(arg.GetString(2)); break; case "srewardminer": config.sRewards.srewardminer = Convert.ToInt32(arg.GetString(2)); break; case "srewardforager": config.sRewards.srewardforager = Convert.ToInt32(arg.GetString(2)); break; case "srewardhunter": config.sRewards.srewardhunter = Convert.ToInt32(arg.GetString(2)); break; case "srewardfisher": config.sRewards.srewardfisher = Convert.ToInt32(arg.GetString(2)); break; case "srewardcrafter": config.sRewards.srewardcrafter = Convert.ToInt32(arg.GetString(2)); break; case "srewardframer": config.sRewards.srewardframer = Convert.ToInt32(arg.GetString(2)); break; case "srewardmedic": config.sRewards.srewardmedic = Convert.ToInt32(arg.GetString(2)); break; case "srewardscavenger": config.sRewards.srewardscavenger = Convert.ToInt32(arg.GetString(2)); break; case "srewardelectrician": config.sRewards.srewardelectrician = Convert.ToInt32(arg.GetString(2)); break; case "srewardemolitionist": config.sRewards.srewardemolitionist = Convert.ToInt32(arg.GetString(2)); break; case "srewardtamer": config.sRewards.srewardtamer = Convert.ToInt32(arg.GetString(2)); break; #endregion // Tamer #region Tamer case "tamerenable": config.tamer.enabletame = Convert.ToBoolean(arg.GetString(3)); break; case "tamermaxlevel": config.tamer.maxlvl = Convert.ToInt32(arg.GetString(2)); break; case "tamercost": config.tamer.pointcoststart = Convert.ToInt32(arg.GetString(2)); break; case "tamercostmultiplier": config.tamer.costmultiplier = Convert.ToInt32(arg.GetString(2)); break; case "tamerchicken": config.tamer.tamechicken = Convert.ToBoolean(arg.GetString(3)); break; case "tamerboar": config.tamer.tameboar = Convert.ToBoolean(arg.GetString(3)); break; case "tamerstag": config.tamer.tamestag = Convert.ToBoolean(arg.GetString(3)); break; case "tamerwolf": config.tamer.tamewolf = Convert.ToBoolean(arg.GetString(3)); break; case "tamerbear": config.tamer.tamebear = Convert.ToBoolean(arg.GetString(3)); break; case "tamerpolarbear": config.tamer.tamepolarbear = Convert.ToBoolean(arg.GetString(3)); break; case "tamerchickenlevel": config.tamer.chickenlevel = Convert.ToInt32(arg.GetString(2)); break; case "tamerboarlevel": config.tamer.boarlevel = Convert.ToInt32(arg.GetString(2)); break; case "tamerstaglevel": config.tamer.staglevel = Convert.ToInt32(arg.GetString(2)); break; case "tamerwolflevel": config.tamer.wolflevel = Convert.ToInt32(arg.GetString(2)); break; case "tamerbearlevel": config.tamer.bearlevel = Convert.ToInt32(arg.GetString(2)); break; case "tamerpolarbearlevel": config.tamer.polarbearlevel = Convert.ToInt32(arg.GetString(2)); break; #endregion } DestroyUi(player, XPerienceAdminPanelOtherMods); AdminOtherModsPage(player, arg.GetString(4)); break; case "backpacks": switch (arg.GetString(2)) { case "backpackstatorskill": config.backpacksmod.statorskill = arg.GetString(3); break; case "backpackremove": config.backpacksmod.removeonunload = Convert.ToBoolean(arg.GetString(3)); break; case "backpacklevel": var editbackpacklevel = config.backpacksmod.BackPackSlots[Convert.ToInt32(arg.Args[3])]; editbackpacklevel.level = Convert.ToInt32(arg.Args[4]); break; case "backpackslots": var editbackpackslot = config.backpacksmod.BackPackSlots[Convert.ToInt32(arg.Args[3])]; editbackpackslot.slots = Convert.ToInt32(arg.Args[4]); break; } DestroyUi(player, XPerienceAdminPanelOtherMods); AdminOtherModsPage(player, "backpacks", arg.GetString(1), Convert.ToInt32(arg.Args[3])); break; case "backpacktoggle": config.backpacksmod.enablebackpacks = Convert.ToBoolean(arg.GetString(2)); DestroyUi(player, XPerienceAdminPanelOtherMods); AdminOtherModsPage(player, "backpacks", arg.GetString(1)); break; case "sql": switch (arg.GetString(1)) { case "sqlenable": config.sql.enablesql = Convert.ToBoolean(arg.GetString(2)); break; case "sqlhost": config.sql.SQLhost = arg.GetString(2); break; case "sqlport": config.sql.SQLport = Convert.ToInt32(arg.GetString(2)); break; case "sqldatabase": config.sql.SQLdatabase = arg.GetString(2); break; case "sqlusername": config.sql.SQLusername = arg.GetString(2); break; case "sqlpassword": config.sql.SQLpassword = arg.GetString(2); break; } DestroyUi(player, XPerienceAdminPanelSQL); AdminSQLPage(player); break; case "zonemanager": switch (arg.GetString(1)) { // Zone Manager case "noxpgain": config.zonemanagermod.noxpgain = string.Join(" ", arg.Args.Skip(2)); break; case "noxploss": config.zonemanagermod.noxploss = string.Join(" ", arg.Args.Skip(2)); break; case "disablestatsandskills": config.zonemanagermod.disablestatsandskills = string.Join(" ", arg.Args.Skip(2)); break; } DestroyUi(player, XPerienceAdminPanelOtherMods); AdminOtherModsPage(player, "zonemanager"); break; case "eventhelper": switch (arg.GetString(1)) { // Event Helper case "noxpgain": config.eventhelpermod.noxpgain = string.Join(" ", arg.Args.Skip(2)); break; case "noxploss": config.eventhelpermod.noxploss = string.Join(" ", arg.Args.Skip(2)); break; case "disablestatsandskills": config.eventhelpermod.disablestatsandskills = string.Join(" ", arg.Args.Skip(2)); break; // Survival Arena case "sanoxpgain": config.survivalarenamod.noxpgain = Convert.ToBoolean(arg.GetString(2)); break; case "sanoxploss": config.survivalarenamod.noxploss = Convert.ToBoolean(arg.GetString(2)); break; case "sadisablestatsandskills": config.survivalarenamod.disablestatsandskills = Convert.ToBoolean(arg.GetString(2)); break; } DestroyUi(player, XPerienceAdminPanelOtherMods); AdminOtherModsPage(player, "eventhelper"); break; case "reset": switch (arg.GetString(1)) { case "resetconfig": player.ChatMessage(XPLang("adminresetconfig", player.UserIDString)); LoadDefaultConfig(); SaveConfig(); DestroyUi(player, XPerienceAdminPanelReset); AdminResetPage(player); break; case "resetall": if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; _xperienceCache.Clear(); _lootCache.Clear(); _XPerienceData.Clear(); _LootContainData.Clear(); _corpseCache.Clear(); _CorpseContainData.Clear(); CheckOnlineStatus(); SaveData(); if (config.sql.enablesql) { DeleteSQL(); } if (XPerienceAddon != null) { XPerienceAddon.Call("xpglobalremove", player); XPerienceAddon.Call("Xpaddonremove", player); XPerienceAddon.Call("Xpaddonupdate", player); } player.ChatMessage(XPLang("resetxperience", player.UserIDString)); Interface.Oxide.ReloadPlugin("XPerience"); break; case "resetalllevels": PlayerAllLevelReset(player); CheckOnlineStatus(); SaveData(); if (XPerienceAddon != null) { XPerienceAddon.Call("xpglobalremove", player); XPerienceAddon.Call("Xpaddonremove", player); XPerienceAddon.Call("Xpaddonupdate", player); } break; case "resetallranks": PlayerAllRankReset(player); CheckOnlineStatus(); SaveData(); if (XPerienceAddon != null) { XPerienceAddon.Call("xpglobalremove", player); XPerienceAddon.Call("Xpaddonremove", player); XPerienceAddon.Call("Xpaddonupdate", player); } break; case "resetallkr": KillRecords.Call("AdminKRReset", player); break; case "resetnewsave": config.defaultOptions.wipedataonnewsave = Convert.ToBoolean(arg.GetString(3)); break; case "fix": PlayerFixDataAll(player); break; } DestroyUi(player, XPerienceAdminPanelReset); AdminResetPage(player); break; } } [ConsoleCommand("xp.color")] private void Cmdadminxpcolors(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null) return; if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; string color = arg.GetString(1); switch (arg.GetString(0)) { case "defaultuicolor": config.uitextColor.defaultcolor = color; break; case "ranknameuicolor": config.uitextColor.rankname = color; break; case "rankleveluicolor": config.uitextColor.ranklevel = color; break; case "rankxpuicolor": config.uitextColor.rankxp = color; break; case "leveluicolor": config.uitextColor.level = color; break; case "xpuicolor": config.uitextColor.experience = color; break; case "nextlvluicolor": config.uitextColor.nextlevel = color; break; case "remainuicolor": config.uitextColor.remainingxp = color; break; case "ssluicolor": config.uitextColor.statskilllevels = color; break; case "perksuicolor": config.uitextColor.perks = color; break; case "upointsuicolor": config.uitextColor.unspentpoints = color; break; case "spointsuicolor": config.uitextColor.spentpoints = color; break; case "petsuicolor": config.uitextColor.pets = color; break; case "mentality": config.uitextColor.mentality = color; break; case "dexterity": config.uitextColor.dexterity = color; break; case "might": config.uitextColor.might = color; break; case "captaincy": config.uitextColor.captaincy = color; break; case "weaponry": config.uitextColor.weaponry = color; break; case "Ninjary": config.uitextColor.Ninjary = color; break; case "woodcutter": config.uitextColor.woodcutter = color; break; case "smithy": config.uitextColor.smithy = color; break; case "miner": config.uitextColor.miner = color; break; case "forager": config.uitextColor.forager = color; break; case "hunter": config.uitextColor.hunter = color; break; case "fisher": config.uitextColor.fisher = color; break; case "crafter": config.uitextColor.crafter = color; break; case "framer": config.uitextColor.framer = color; break; case "medic": config.uitextColor.medic = color; break; case "scavenger": config.uitextColor.scavenger = color; break; case "electrician": config.uitextColor.electrician = color; break; case "demolitionist": config.uitextColor.demolitionist = color; break; case "tamer": config.uitextColor.tamer = color; break; case "xpbar": config.uitextColor.xpbar = color; break; case "armorbar": config.uitextColor.armorbar = color; break; } DestroyUi(player, XPerienceAdminPanelTimerColor); AdminTimerColorPage(player); } [ConsoleCommand("xp.electrician")] private void Cmdadminxpelectrician(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null) return; if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; switch (arg.GetString(0)) { case "solarpaneldefault": config.electrician.solarpaneldefault = Convert.ToInt32(arg.GetString(1)); break; case "smallbatterydefault": config.electrician.smallbatterydefault = Convert.ToInt32(arg.GetString(1)); break; case "mediumbatterydefault": config.electrician.mediumbatterydefault = Convert.ToInt32(arg.GetString(1)); break; case "largebatterydefault": config.electrician.largebatterydefault = Convert.ToInt32(arg.GetString(1)); break; case "smallgeneratordefault": config.electrician.smallgeneratordefault = Convert.ToInt32(arg.GetString(1)); break; case "testgeneratordefault": config.electrician.testgeneratordefault = Convert.ToInt32(arg.GetString(1)); break; case "electricwindmilldefault": config.electrician.electricwindmilldefault = Convert.ToInt32(arg.GetString(1)); break; } DestroyUi(player, XPerienceAdminPanelElectricianSettings); AdminElectricianSettings(player); } [ConsoleCommand("xp.ranks")] private void Cmdadminxpranks(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null) return; if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; int rankid = 0; switch (arg.GetString(0)) { // Edit Rank case "editrank": var editrank = config.xpLevelRanks.ranks[Convert.ToInt32(arg.Args[1])]; switch (arg.GetString(2)) { case "rankname": editrank.name = string.Join(" ", arg.Args.Skip(3)); break; case "ranksig": editrank.sig = string.Join(" ", arg.Args.Skip(3)); break; case "rankdet": editrank.description = string.Join(" ", arg.Args.Skip(3)); break; case "rankimage": editrank.image = string.Join(" ", arg.Args.Skip(3)); break; case "rankgroup": editrank.group = string.Join(" ", arg.Args.Skip(3)); break; } rankid = Convert.ToInt32(arg.Args[1]); break; // New Rank case "newrank": config.xpLevelRanks.ranks.Add(config.xpLevelRanks.ranks.Count, new Ranks { name = "Rank Name", sig = "〘SIG〙", image = "https://i.imgur.com/7Z9tg7J.png", group = "groupname", description = "details about this rank" }); rankid = config.xpLevelRanks.ranks.Count - 1; break; } DestroyUi(player, XPerienceAdminPanelRanks); AdminRanksPage(player, "editrank", rankid); } [ConsoleCommand("xp.images")] private void Cmdadminimages(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null || !player.IsAdmin) return; switch (arg.Args[0]) { case "resetimages": #region Default URLS config.imageicons.xperiencelogo = "https://i.imgur.com/d16zkJk.png"; config.imageicons.mainicon = "https://i.imgur.com/JUwd2a8.png"; config.imageicons.mentality = "https://i.imgur.com/LQWZH34.png"; config.imageicons.dexterity = "https://i.imgur.com/iBizHFq.png"; config.imageicons.might = "https://i.imgur.com/k9p16oj.png"; config.imageicons.captaincy = "https://i.imgur.com/DNYOr3Q.png"; config.imageicons.weaponry = "https://i.imgur.com/P7Tr0rE.png"; config.imageicons.ninjary = "https://i.imgur.com/jyo4foK.png"; config.imageicons.woodcutter = "https://i.imgur.com/4tQpa6e.png"; config.imageicons.smithy = "https://i.imgur.com/wW9oaUx.png"; config.imageicons.miner = "https://i.imgur.com/B5JS3es.png"; config.imageicons.forager = "https://i.imgur.com/ohoU0Jl.png"; config.imageicons.hunter = "https://i.imgur.com/w4dlc8a.png"; config.imageicons.fisher = "https://i.imgur.com/ete67me.png"; config.imageicons.crafter = "https://i.imgur.com/vut4FVq.png"; config.imageicons.framer = "https://i.imgur.com/Rm2pezt.png"; config.imageicons.medic = "https://i.imgur.com/DoIP2aL.png"; config.imageicons.scavenger = "https://i.imgur.com/yn5F9Cx.png"; config.imageicons.electrician = "https://i.imgur.com/0l8dux1.png"; config.imageicons.demolitionist = "https://i.imgur.com/VEX9WfH.png"; config.imageicons.tamer = "https://i.imgur.com/ZnKAIAR.png"; config.imageicons.chicken = "https://i.imgur.com/qJYzAZ6.png"; config.imageicons.boar = "https://i.imgur.com/ou1DgxE.png"; config.imageicons.stag = "https://i.imgur.com/CwACyuG.png"; config.imageicons.wolf = "https://i.imgur.com/J18C2Je.png"; config.imageicons.bear = "https://i.imgur.com/kTbD3B1.png"; config.imageicons.polarbear = "https://i.imgur.com/Shk1sza.png"; config.imageicons.archery = "https://i.imgur.com/qdm8AWg.png"; config.imageicons.wizardry = "https://i.imgur.com/aNuEdni.png"; config.imageicons.online = "https://i.imgur.com/WafMLkk.png"; config.imageicons.offline = "https://i.imgur.com/QtbFqQz.png"; config.imageicons.backpack = "https://i.imgur.com/zJbJpwx.png"; config.imageicons.xp = "https://i.imgur.com/u46vNfo.png"; config.imageicons.level = "https://i.imgur.com/2ouaBoh.png"; config.imageicons.armor = "https://i.imgur.com/mEr59mA.png"; config.imageicons.level0 = "https://i.imgur.com/7KTHgTa.png"; config.imageicons.level2 = "https://i.imgur.com/GocRCM1.png"; config.imageicons.level4 = "https://i.imgur.com/KxxRouB.png"; config.imageicons.level6 = "https://i.imgur.com/Dgy9X9P.png"; config.imageicons.level8 = "https://i.imgur.com/IYloCuJ.png"; config.imageicons.level10 = "https://i.imgur.com/Xz9ZgZ4.png"; config.imageicons.dash = "https://i.imgur.com/LLKCN1n.png"; config.imageicons.raideasy = "https://i.imgur.com/cAUlHlA.png"; config.imageicons.raidmedium = "https://i.imgur.com/Tzhbic3.png"; config.imageicons.raidhard = "https://i.imgur.com/MGNUPg0.png"; config.imageicons.raidexpert = "https://i.imgur.com/bPql6Tz.png"; config.imageicons.raidnightmare = "https://i.imgur.com/RpiC5dy.png"; config.imageicons.profilebg = "https://i.imgur.com/DdVLKsE.png"; config.imageicons.menubg = "https://i.imgur.com/DrWCba0.jpg"; config.imageicons.bgimages.Clear(); SaveData(); SaveConfig(); Interface.Oxide.ReloadPlugin("XPerience"); #endregion break; case "reloadimages": if (config.imageicons.uselocalpath) { DownloadImages(); } else { LoadImages(true); } DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "checkimages": int i = 0; int r = 0; _CheckImageList = new Dictionary(); _CheckImageListReload = new Dictionary(); _CheckImageList.Add(XPerienceicon, config.imageicons.mainicon); _CheckImageList.Add(XPeriencementality, config.imageicons.mentality); _CheckImageList.Add(XPeriencedexterity, config.imageicons.dexterity); _CheckImageList.Add(XPeriencemight, config.imageicons.might); _CheckImageList.Add(XPeriencecaptaincy, config.imageicons.captaincy); _CheckImageList.Add(XPerienceweaponry, config.imageicons.weaponry); _CheckImageList.Add(XPerienceninjary, config.imageicons.ninjary); _CheckImageList.Add(XPeriencewoodcutter, config.imageicons.woodcutter); _CheckImageList.Add(XPeriencesmithy, config.imageicons.smithy); _CheckImageList.Add(XPerienceminer, config.imageicons.miner); _CheckImageList.Add(XPerienceforager, config.imageicons.forager); _CheckImageList.Add(XPeriencehunter, config.imageicons.hunter); _CheckImageList.Add(XPeriencefisher, config.imageicons.fisher); _CheckImageList.Add(XPeriencecrafter, config.imageicons.crafter); _CheckImageList.Add(XPerienceframer, config.imageicons.framer); _CheckImageList.Add(XPeriencemedic, config.imageicons.medic); _CheckImageList.Add(XPeriencescavenger, config.imageicons.scavenger); _CheckImageList.Add(XPerienceelectrician, config.imageicons.electrician); _CheckImageList.Add(XPeriencedemolitionist, config.imageicons.demolitionist); _CheckImageList.Add(XPeriencetamer, config.imageicons.tamer); _CheckImageList.Add(XPeriencechicken, config.imageicons.chicken); _CheckImageList.Add(XPerienceboar, config.imageicons.boar); _CheckImageList.Add(XPeriencestag, config.imageicons.stag); _CheckImageList.Add(XPeriencewolf, config.imageicons.wolf); _CheckImageList.Add(XPeriencebear, config.imageicons.bear); _CheckImageList.Add(XPeriencepolarbear, config.imageicons.polarbear); _CheckImageList.Add(XPeriencearchery, config.imageicons.archery); _CheckImageList.Add(XPeriencewizardry, config.imageicons.wizardry); _CheckImageList.Add(XPerienceonline, config.imageicons.online); _CheckImageList.Add(XPerienceoffline, config.imageicons.offline); _CheckImageList.Add(XPeriencebackpack, config.imageicons.backpack); _CheckImageList.Add(XPeriencelevel, config.imageicons.level); _CheckImageList.Add(XPeriencelevel0, config.imageicons.level0); _CheckImageList.Add(XPeriencelevel2, config.imageicons.level2); _CheckImageList.Add(XPeriencelevel4, config.imageicons.level4); _CheckImageList.Add(XPeriencelevel6, config.imageicons.level6); _CheckImageList.Add(XPeriencelevel8, config.imageicons.level8); _CheckImageList.Add(XPeriencelevel10, config.imageicons.level10); _CheckImageList.Add(XPeriencedash, config.imageicons.dash); _CheckImageList.Add(XPeriencexp, config.imageicons.xp); _CheckImageList.Add(XPeriencearmor, config.imageicons.armor); _CheckImageList.Add(XPeriencelogo, config.imageicons.xperiencelogo); foreach (var rank in config.xpLevelRanks.ranks) { if (!rank.Value.image.IsNullOrEmpty() && !_CheckImageList.ContainsKey(rank.Value.image)) { _CheckImageList.Add(rank.Value.name, rank.Value.image); } } foreach (var bgimg in config.imageicons.bgimages) { if (!bgimg.Value.url.IsNullOrEmpty() && !_CheckImageList.ContainsKey(bgimg.Value.url)) { _CheckImageList.Add(bgimg.Value.name, bgimg.Value.url); } } _CheckImageList.Add(XPerienceraideasy, config.imageicons.raideasy); _CheckImageList.Add(XPerienceraidmedium, config.imageicons.raidmedium); _CheckImageList.Add(XPerienceraidhard, config.imageicons.raidhard); _CheckImageList.Add(XPerienceraidexpert, config.imageicons.raidexpert); _CheckImageList.Add(XPerienceraidnightmare, config.imageicons.raidnightmare); _CheckImageList.Add(XPerienceprofilebg, config.imageicons.profilebg); _CheckImageList.Add(XPeriencemenubg, config.imageicons.menubg); foreach (var image in _CheckImageList) { bool imagefound = ImageLibrary.Call("HasImage", image.Key); i++; if (!imagefound) { r++; _CheckImageListReload.Add(image.Key, image.Value); Puts($"Image Not Found: {image.Key} - adding image to reload list."); } } if (r > 0) { ImageLibrary?.Call("ImportImageList", Name, _CheckImageListReload, 0UL, true, new Action(Ready)); } Puts($"Image Check Complete: {i} images found | {r} images reloaded"); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "uselocalpath": config.imageicons.uselocalpath = Convert.ToBoolean(arg.Args[1]); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "rootpath": string path = Path.GetPathRoot(string.Join(" ", arg.Args.Skip(1))); config.imageicons.rootpath = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "bgnew": config.imageicons.bgimages.Add(config.imageicons.bgimages.Count, new BackgroundImgs { name = "BG Name", url = "https://i.imgur.com/7Z9tg7J.png" }); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "editbgimage", config.imageicons.bgimages.Count - 1); break; case "editbgimage": DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "editbgimage", Convert.ToInt32(arg.Args[1])); break; case "editbgimagename": var imgname = config.imageicons.bgimages[Convert.ToInt32(arg.Args[1])]; imgname.name = string.Join(" ", arg.Args.Skip(2)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "editbgimage", Convert.ToInt32(arg.Args[1])); break; case "editbgimageurl": var imgurl = config.imageicons.bgimages[Convert.ToInt32(arg.Args[1])]; imgurl.url = string.Join(" ", arg.Args.Skip(2)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "editbgimage", Convert.ToInt32(arg.Args[1])); break; case "deletebgimage": config.imageicons.bgimages.Remove(Convert.ToInt32(arg.Args[1])); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "bgimages"); return; case "xperiencelogo": config.imageicons.xperiencelogo = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "mainicon": config.imageicons.mainicon = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; #region Stats case "mentality": config.imageicons.mentality = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "dexterity": config.imageicons.dexterity = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "might": config.imageicons.might = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "weaponry": config.imageicons.weaponry = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "ninjary": config.imageicons.ninjary = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "captaincy": config.imageicons.captaincy = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; #endregion #region Skills case "woodcutter": config.imageicons.woodcutter = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "smithy": config.imageicons.smithy = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "miner": config.imageicons.miner = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "fisher": config.imageicons.fisher = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "forager": config.imageicons.forager = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "hunter": config.imageicons.hunter = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "crafter": config.imageicons.crafter = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "framer": config.imageicons.framer = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "medic": config.imageicons.medic = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "scavenger": config.imageicons.scavenger = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "electrician": config.imageicons.electrician = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "demolitionist": config.imageicons.demolitionist = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; #endregion #region Other case "chicken": config.imageicons.chicken = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "boar": config.imageicons.boar = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "stag": config.imageicons.stag = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "wolf": config.imageicons.wolf = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "bear": config.imageicons.bear = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "polarbear": config.imageicons.polarbear = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "archery": config.imageicons.archery = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "wizardry": config.imageicons.wizardry = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "online": config.imageicons.online = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "offline": config.imageicons.offline = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "backpack": config.imageicons.backpack = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "xp": config.imageicons.xp = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "armor": config.imageicons.armor = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "level": config.imageicons.level = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "level0": config.imageicons.level0 = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "level2": config.imageicons.level2 = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "level4": config.imageicons.level4 = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "level6": config.imageicons.level6 = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "level8": config.imageicons.level8 = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "level10": config.imageicons.level10 = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "dash": config.imageicons.dash = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "profilebg": config.imageicons.profilebg = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "menubg": config.imageicons.menubg = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "raideasy": config.imageicons.raideasy = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "raidmedium": config.imageicons.raidmedium = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "raidhard": config.imageicons.raidhard = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "raidexpert": config.imageicons.raidexpert = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; case "raidnightmare": config.imageicons.raidnightmare = string.Join(" ", arg.Args.Skip(1)); DestroyUi(player, XPerienceAdminPanelImages); AdminImagePaths(player, "main"); break; #endregion } } [ConsoleCommand("xp.skillitems")] private void Cmdadminskillitems(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null || !player.IsAdmin) return; switch (arg.Args[0]) { case "forager": DestroyUi(player, XPerienceAdminPanelSkills); DestroyUi(player, XPerienceAdminPanelSkillItems); AdminSkillItems(player, "forager", "forager"); break; case "scavenger": DestroyUi(player, XPerienceAdminPanelSkills); DestroyUi(player, XPerienceAdminPanelSkillItems); AdminSkillItems(player, "scavenger", "scavenger"); break; case "newitem": switch (arg.Args[1]) { case "forager": config.forager.randomChanceList.Add(config.forager.randomChanceList.Count, new RandomChanceList { shortname = "item.shortname", displayname = "", SkinID = 0, amount = 1 }); DestroyUi(player, XPerienceAdminPanelSkills); DestroyUi(player, XPerienceAdminPanelSkillItems); AdminSkillItems(player, "edititem", "forager", config.forager.randomChanceList.Count - 1); break; case "scavenger": config.scavenger.scavChanceList.Add(config.scavenger.scavChanceList.Count, new ScavChanceList { shortname = "item.shortname", displayname = "", SkinID = 0, amount = 1, maxamount = 5, requiredlevel = 1 }); DestroyUi(player, XPerienceAdminPanelSkills); DestroyUi(player, XPerienceAdminPanelSkillItems); AdminSkillItems(player, "edititem", "scavenger", config.scavenger.scavChanceList.Count - 1); break; } break; case "edititem": switch (arg.Args[1]) { case "forager": var fitem = config.forager.randomChanceList[Convert.ToInt32(arg.Args[2])]; switch (arg.Args[3]) { case "shortname": fitem.shortname = arg.Args[4]; break; case "displayname": fitem.displayname = string.Join(" ", arg.Args.Skip(4)); //fitem.displayname = arg.Args[4]; break; case "skinid": fitem.SkinID = Convert.ToUInt64(arg.Args[4]); break; case "amount": fitem.amount = Convert.ToInt32(arg.Args[4]); break; } DestroyUi(player, XPerienceAdminPanelSkillItems); AdminSkillItems(player, "edititem", "forager", Convert.ToInt32(arg.Args[2])); break; case "scavenger": var sitem = config.scavenger.scavChanceList[Convert.ToInt32(arg.Args[2])]; switch (arg.Args[3]) { case "shortname": sitem.shortname = arg.Args[4]; break; case "displayname": sitem.displayname = string.Join(" ", arg.Args.Skip(4)); //sitem.displayname = arg.Args[4]; break; case "skinid": sitem.SkinID = Convert.ToUInt64(arg.Args[4]); break; case "amount": sitem.amount = Convert.ToInt32(arg.Args[4]); break; case "maxamount": sitem.maxamount = Convert.ToInt32(arg.Args[4]); break; case "requiredlevel": sitem.requiredlevel = Convert.ToInt32(arg.Args[4]); break; } DestroyUi(player, XPerienceAdminPanelSkillItems); AdminSkillItems(player, "edititem", "scavenger", Convert.ToInt32(arg.Args[2])); break; } break; case "deleteitem": switch (arg.Args[1]) { case "forager": config.forager.randomChanceList.Remove(Convert.ToInt32(arg.Args[2])); DestroyUi(player, XPerienceAdminPanelSkills); DestroyUi(player, XPerienceAdminPanelSkillItems); AdminSkillItems(player, "forager", "forager"); break; case "scavenger": config.scavenger.scavChanceList.Remove(Convert.ToInt32(arg.Args[2])); DestroyUi(player, XPerienceAdminPanelSkills); DestroyUi(player, XPerienceAdminPanelSkillItems); AdminSkillItems(player, "scavenger", "scavenger"); break; } break; } } [ConsoleCommand("xp.specialgroups")] private void Cmdadminspecialgroups(ConsoleSystem.Arg arg) { var player = arg.Player(); if (player == null || !player.IsAdmin) return; switch (arg.Args[0]) { case "newgroup": config.specialGroups.specialgroups.Add(config.specialGroups.specialgroups.Count, new Specialgroups { groupname = "Group Name", permissionname = "groupname", grouppriority = 1, xpboost = 0.01, dailyxplimit = 1000, dailystatlimitboost = 1, dailyskilllimitboost = 1 }); DestroyUi(player, XPerienceAdminPanelSpecialGroups); AdminSpecialGroups(player, "editgroup", config.specialGroups.specialgroups.Count - 1); break; case "editgroup": var group = config.specialGroups.specialgroups[Convert.ToInt32(arg.Args[1])]; switch(arg.Args[2]) { case "groupname": group.groupname = string.Join(" ", arg.Args.Skip(3)); break; case "permissionname": group.permissionname = string.Join(" ", arg.Args.Skip(3)); break; case "grouppriority": group.grouppriority = Convert.ToInt32(arg.Args[3]); break; case "xpboost": group.xpboost = Convert.ToDouble(arg.Args[3]); break; case "dailyxplimit": group.dailyxplimit = Convert.ToInt32(arg.Args[3]); break; case "dailystatlimitboost": group.dailystatlimitboost = Convert.ToInt32(arg.Args[3]); break; case "dailyskilllimitboost": group.dailyskilllimitboost = Convert.ToInt32(arg.Args[3]); break; } DestroyUi(player, XPerienceAdminPanelSpecialGroups); AdminSpecialGroups(player, "editgroup", Convert.ToInt32(arg.Args[1])); break; case "deletegroup": config.specialGroups.specialgroups.Remove(Convert.ToInt32(arg.Args[1])); DestroyUi(player, XPerienceAdminPanelSpecialGroups); AdminSpecialGroups(player); break; } } private void ClearUIs(BasePlayer player) { if (player == null) return; DestroyUi(player, XPerienceAdminPanelInfo); DestroyUi(player, XPerienceAdminPanelLevelXP); DestroyUi(player, XPerienceAdminPanelRanks); DestroyUi(player, XPerienceAdminPanelStats); DestroyUi(player, XPerienceAdminPanelSkills); DestroyUi(player, XPerienceAdminPanelSkillItems); DestroyUi(player, XPerienceAdminPanelTimerColor); DestroyUi(player, XPerienceAdminPanelOtherMods); DestroyUi(player, XPerienceAdminPanelSQL); DestroyUi(player, XPerienceAdminPanelReset); DestroyUi(player, XPerienceAdminPanelInfoBox); DestroyUi(player, XPerienceAdminPanelAddon); DestroyUi(player, XPerienceAdminPanelDailyLimits); DestroyUi(player, XPeriencePlayerCalculations); DestroyUi(player, XPeriencePlayerCalculationsLevelSelection); DestroyUi(player, XPeriencePlayerCalculationsRanksSelection); DestroyUi(player, XPerienceAdminPanelSoundEffects); DestroyUi(player, XPerienceAdminPanelElectricianSettings); DestroyUi(player, XPerienceAdminPanelProfileBackgrounds); DestroyUi(player, XPerienceAdminPanelImages); DestroyUi(player, XPerienceAdminPanelSpecialGroups); DestroyUi(player, XPerienceAdminPanelBackpackSelection); } #endregion // Control Panels private void AdminControlPanel(BasePlayer player) { if (player == null) return; if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; var ControlPanelelements = new CuiElementContainer(); float height = 0.050f; int font = 14; int row = 0; double space = .02; // Main Screen ControlPanelelements.Add(new CuiPanel { Image = { Color = ".1 .1 .1 .99" }, RectTransform = { AnchorMin = $"0 0", AnchorMax = $"1 1" }, CursorEnabled = true }, "Overlay", XPerienceAdminPanelMain); // Top Label ControlPanelelements.Add(XPUILabel($"ⓍⓅerience {XPLang("adminpanel", player.UserIDString)}:", 1, 0.060f, TextAnchor.MiddleLeft, 20, ".01", ".18", "1 1 1 1"), XPerienceAdminPanelMain); ControlPanelelements.Add(new CuiElement { Parent = XPerienceAdminPanelMain, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", XPerienceicon) }, new CuiRectTransformComponent { AnchorMin = ".01 .80", AnchorMax = ".12 .95" } } }); // Navigation Menu ControlPanelelements.Add(XPUIPanel("0 0", ".15 .75", "1 1 1 0"), XPerienceAdminPanelMain, XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin mystats", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_014", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin main", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_001", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin levelxp", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_002", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin ranks main", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_020", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin dailylimits", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_018", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin stats main", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_003", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin skills main", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_004", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin playerdata", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_022", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin timercolor", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_005", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin othermods main", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_012", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin specialgroups", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_024", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin images main 0", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_023", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin soundeffects", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_021", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); //ControlPanelelements.Add(XPUIMenuButton("xp.admin calculationslevels 0 0", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_019", player.UserIDString)} (beta)", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin sql", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_006", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin addon", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_017", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin save", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_0070", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin reload", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_0080", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin close", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_009", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); ControlPanelelements.Add(XPUIMenuButton("xp.admin reset", row++, height, font, "0 0 0 .7", $" ◉ {XPLang("adminmenu_013", player.UserIDString)}", ".05", ".95", TextAnchor.MiddleLeft, "1 1 1 1", space), XPerienceAdminPanelMenu); CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminInfoPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelInfo); ControlPanelelements.Add(new CuiElement { Parent = XPerienceAdminPanelInfo, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", XPeriencelogo) }, new CuiRectTransformComponent { AnchorMin = "0.43 0.70", AnchorMax = "0.57 0.90" } } }); ControlPanelelements.Add(new CuiLabel { Text = { Text = $"{XPLang("adminpanelinfonew", player.UserIDString)}", FontSize = 18, Align = TextAnchor.UpperCenter, Color = "1 1 1 1" }, RectTransform = { AnchorMin = "0.02 0.0", AnchorMax = "0.98 0.70" } }, XPerienceAdminPanelInfo); CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminLevelPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.023f; double width = .006; int row = 4; int row2 = 4; int row3 = 4; // Row 1 string lableL = ".01"; string lableR = ".15"; string valueL = ".17"; string valueR = ".25"; string valuePL = ".26"; string valuePR = ".30"; // Row 2 string lableL2 = ".33"; string lableR2 = ".48"; string valueL2 = ".49"; string valueR2 = ".56"; string valueP2L = ".57"; string valueP2R = ".66"; // Row 3 string lableL3 = ".66"; string lableR3 = ".81"; string valueL3 = ".82"; string valueR3 = ".91"; //string valueP3L = ".92"; string valueP3R = ".99"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUILabel($"{XPLang("adminxp_001", player.UserIDString)}", 1, 0.090f, TextAnchor.MiddleLeft, 18, ".01", "1", "1 1 1 1"), XPerienceAdminPanelLevelXP); // Main Level Settings #region main ControlPanelelements.Add(XPUILabel($"{XPLang("adminxp_002", player.UserIDString)}", row, height, TextAnchor.MiddleLeft, 15, lableL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); row++; // Level Start ControlPanelelements.Add(XPUILabel($"{XPLang("adminxp_003", player.UserIDString)}", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp levelstart {UserInputText}", row, height, 12, $"{config.xpLevel.levelstart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Level Multiplier row++; ControlPanelelements.Add(XPUILabel($"XP Requirement Increase:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp levelmultiplier {UserInputText}", row, height, 12, $"{config.xpLevel.levelmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Max Level row++; ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp levelmax {UserInputText}", row, height, 12, $"{config.xpLevel.maxlevel}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Level XP Boost row++; ControlPanelelements.Add(XPUILabel($"Level XP Boost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp levelxpboost {UserInputText}", row, height, 12, $"{config.xpLevel.levelxpboost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpLevel.levelxpboost * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Stat Points Per LVL row++; ControlPanelelements.Add(XPUILabel($"Stat Points Per LVL:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp statpointsperlvl {UserInputText}", row, height, 12, $"{config.xpLevel.statpointsperlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Skill Points Per LVL row++; ControlPanelelements.Add(XPUILabel($"Skill Points Per LVL:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp skillpointsperlvl {UserInputText}", row, height, 12, $"{config.xpLevel.skillpointsperlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Always Earn XP row++; ControlPanelelements.Add(XPUILabel($"Earn XP Past Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp alwaysearnxp", row, height, config.xpLevel.alwaysearnxp, valueL, width), XPerienceAdminPanelLevelXP); // Full Health row++; ControlPanelelements.Add(XPUILabel($"Max Health on Level Up:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp fullhealth", row, height, config.xpLevel.fullhealth, valueL, width), XPerienceAdminPanelLevelXP); // Full Metabolism row++; ControlPanelelements.Add(XPUILabel($"Max Food/Thirst on Level Up:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp fullmetabolism", row, height, config.xpLevel.fullmetabolism, valueL, width), XPerienceAdminPanelLevelXP); #endregion // Night Bonus Settings #region night row++; row++; ControlPanelelements.Add(XPUILabel($"[Night Settings]", row, height, TextAnchor.MiddleLeft, 15, lableL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Enable / Disable row++; ControlPanelelements.Add(XPUILabel($"Enable Night Bonus:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp nightenable", row, height, config.nightBonus.Enable, valueL, width), XPerienceAdminPanelLevelXP); // Start Time row++; ControlPanelelements.Add(XPUILabel($"Start Time:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp nightstart {UserInputText}", row, height, 12, $"{config.nightBonus.StartTime}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // End Time row++; ControlPanelelements.Add(XPUILabel($"End Time:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp nightend {UserInputText}", row, height, 12, $"{config.nightBonus.EndTime}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Bonus Amount row++; ControlPanelelements.Add(XPUILabel($"Bonus Percent:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp nightbonus {UserInputText}", row, height, 12, $"{config.nightBonus.Bonus}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.nightBonus.Bonus * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Enable Skill Boost row++; ControlPanelelements.Add(XPUILabel($"Enable Night Skills:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp nightskill", row, height, config.nightBonus.enableskillboosts, valueL, width), XPerienceAdminPanelLevelXP); #endregion // XP Boost Settings #region XP Boost row++; row++; ControlPanelelements.Add(XPUILabel($"[XP Boost Settings] (xperience.xpboost)", row, height, TextAnchor.MiddleLeft, 15, lableL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Enable XP Boost row++; ControlPanelelements.Add(XPUILabel($"Enable XP Boost Permission:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp enablexpboost", row, height, config.xpGain.enablexpboost, valueL, width), XPerienceAdminPanelLevelXP); // XP Boost Amount row++; ControlPanelelements.Add(XPUILabel($"XP Boost Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp xpboostamount {UserInputText}", row, height, 12, $"{config.xpGain.xpboostamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpGain.xpboostamount * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Boost Order row++; var xpboostorder = ""; switch(config.xpGain.xpboostorder) { case 1: xpboostorder = "first"; break; case 2: xpboostorder = "last"; break; } ControlPanelelements.Add(XPUILabel($"Boost Order (Before other boosts or after):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUILabel($"| {xpboostorder}", row, height, TextAnchor.MiddleLeft, 12, "0.15", "0.20", "1 1 1 1"), XPerienceAdminPanelLevelXP); if (xpboostorder == "first") { ControlPanelelements.Add(XPUIButton($"xp.config levelxp xpboostorder 2", row, height, 12, "0.0 1.0 0.0 0", "⇩", "0.21", "0.22", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelLevelXP); } else { ControlPanelelements.Add(XPUIButton($"xp.config levelxp xpboostorder 1", row, height, 12, "0.0 1.0 0.0 0", "⇧", "0.21", "0.22", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelLevelXP); } #endregion // XP Reduce Settings #region Reductions row++; row++; ControlPanelelements.Add(XPUILabel($"[XP Reducer Settings]", row, height, TextAnchor.MiddleLeft, 15, lableL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Enable Suicide Reduction row++; ControlPanelelements.Add(XPUILabel($"Enable Suicide Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp suicide", row, height, config.xpReducer.suicidereduce, valueL, width), XPerienceAdminPanelLevelXP); // Suicide Reduction Amount row++; ControlPanelelements.Add(XPUILabel($"Suicide Reduction Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp suicideamt {UserInputText}", row, height, 12, $"{config.xpReducer.suicidereduceamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Enable Death Reduction row++; ControlPanelelements.Add(XPUILabel($"Enable Death Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp death", row, height, config.xpReducer.deathreduce, valueL, width), XPerienceAdminPanelLevelXP); // Death Reduction Amount row++; ControlPanelelements.Add(XPUILabel($"Death Reduction Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp deathamt {UserInputText}", row, height, 12, $"{config.xpReducer.deathreduceamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Enable Rank Death Reduction row++; ControlPanelelements.Add(XPUILabel($"Include Rank Bonus:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp rankdeath", row, height, config.xpReducer.rankdeathreduce, valueL, width), XPerienceAdminPanelLevelXP); #endregion // Mission Settings #region Missions row++; row++; ControlPanelelements.Add(XPUILabel($"[Mission XP Settings]", row, height, TextAnchor.MiddleLeft, 15, lableL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Mission Succeeded row++; ControlPanelelements.Add(XPUILabel($"Mission Succeeded:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp missionsucceeded {UserInputText}", row, height, 12, $"{config.xpMissions.missionsucceededxp}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Enable Mission Failed row++; ControlPanelelements.Add(XPUILabel($"Enable Failed Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp missionfailed", row, height, config.xpMissions.missionfailed, valueL, width), XPerienceAdminPanelLevelXP); // Mission Failed row++; ControlPanelelements.Add(XPUILabel($"Failed Reduction Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp missionfailedxp {UserInputText}", row, height, 12, $"{config.xpMissions.missionfailedxp}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // Teams Settings #region Teams row++; row++; ControlPanelelements.Add(XPUILabel($"[Team XP Settings]", row, height, TextAnchor.MiddleLeft, 15, lableL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Team XP Gain row++; ControlPanelelements.Add(XPUILabel($"Enable Team XP Gain:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp enableteamxpgain", row, height, config.xpTeams.enableteamxpgain, valueL, width), XPerienceAdminPanelLevelXP); // Team XP Loss row++; ControlPanelelements.Add(XPUILabel($"Enable Team XP Loss:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp enableteamxploss", row, height, config.xpTeams.enableteamxploss, valueL, width), XPerienceAdminPanelLevelXP); // Team Gain Amount row++; ControlPanelelements.Add(XPUILabel($"Team XP Gain:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp teamxpgainamt {UserInputText}", row, height, 12, $"{config.xpTeams.teamxpgainamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpTeams.teamxpgainamount * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Team Loss Amount row++; ControlPanelelements.Add(XPUILabel($"Team XP Loss:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp teamxplossamt {UserInputText}", row, height, 12, $"{config.xpTeams.teamxplossamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpTeams.teamxplossamount * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Team Distance row++; ControlPanelelements.Add(XPUILabel($"Team Distance (feet):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR , "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp teamdistance {UserInputText}", row, height, 12, $"{config.xpTeams.teamdistance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // XP Gathering/Looting #region XP Gather/Loot ControlPanelelements.Add(XPUILabel($"[XP Gathering/Looting Settings]", row2, height, TextAnchor.MiddleLeft, 15, lableL2, valueP2R, "1 1 1 1"), XPerienceAdminPanelLevelXP); row2++; // Loot Containers ControlPanelelements.Add(XPUILabel($"General Loot Containers:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp loot {UserInputText}", row2, height, 12, $"{config.xpGain.lootcontainerxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Loot Barrrels row2++; ControlPanelelements.Add(XPUILabel($"Loot Barrels:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp lootbarrel {UserInputText}", row2, height, 12, $"{config.xpGain.lootbarrel}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Oil Barrrels row2++; ControlPanelelements.Add(XPUILabel($"Oil Barrels:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp oilbarrel {UserInputText}", row2, height, 12, $"{config.xpGain.oilbarrel}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Normal Crates row2++; ControlPanelelements.Add(XPUILabel($"Normal Crates:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp normalcrate {UserInputText}", row2, height, 12, $"{config.xpGain.normalcrate}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Elite Crates row2++; ControlPanelelements.Add(XPUILabel($"Elite Crates:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp elitecrate {UserInputText}", row2, height, 12, $"{config.xpGain.elitecrate}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Tool Crates row2++; ControlPanelelements.Add(XPUILabel($"Tool Crates:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp toolcrate {UserInputText}", row2, height, 12, $"{config.xpGain.toolcrate}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Food Crates row2++; ControlPanelelements.Add(XPUILabel($"Food Crates:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp foodcrate {UserInputText}", row2, height, 12, $"{config.xpGain.foodcrate}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Vehicle Parts row2++; ControlPanelelements.Add(XPUILabel($"Vehicle Parts:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp vehicleparts {UserInputText}", row2, height, 12, $"{config.xpGain.vehicleparts}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Underwater Loot row2++; ControlPanelelements.Add(XPUILabel($"Underwater Loot Containers:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp lootu {UserInputText}", row2, height, 12, $"{config.xpGain.underwaterlootcontainerxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Locked Crate row2++; ControlPanelelements.Add(XPUILabel($"Locked Crate:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp lootlocked {UserInputText}", row2, height, 12, $"{config.xpGain.lockedcratexp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Hackable Crate row2++; ControlPanelelements.Add(XPUILabel($"Hackable Crate:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp loothacked {UserInputText}", row2, height, 12, $"{config.xpGain.hackablecratexp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); //// Heli //row2++; //ControlPanelelements.Add(XPUILabel($"Helicopter Crates:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); //ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); //ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp heli {UserInputText}", row2, height, 12, $"{config.xpGain.patrolhelicopter}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Animal Harvest row2++; ControlPanelelements.Add(XPUILabel($"Animal Harvest:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp aharvest {UserInputText}", row2, height, 12, $"{config.xpGain.animalharvestxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Corpse Harvest row2++; ControlPanelelements.Add(XPUILabel($"Corpse Harvest:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp charvest {UserInputText}", row2, height, 12, $"{config.xpGain.corpseharvestxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Tree row2++; ControlPanelelements.Add(XPUILabel($"Tree:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp tree {UserInputText}", row2, height, 12, $"{config.xpGather.treexp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // General Ore row2++; ControlPanelelements.Add(XPUILabel($"General Ore:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp ore {UserInputText}", row2, height, 12, $"{config.xpGather.orexp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Metal Ore row2++; ControlPanelelements.Add(XPUILabel($"Metal Ore:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp metalorexp {UserInputText}", row2, height, 12, $"{config.xpGather.metalorexp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Sulfur Ore row2++; ControlPanelelements.Add(XPUILabel($"Sulfur Ore:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sulfurorexp {UserInputText}", row2, height, 12, $"{config.xpGather.sulfurorexp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Stone Ore row2++; ControlPanelelements.Add(XPUILabel($"Stone Ore:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp stoneorexp {UserInputText}", row2, height, 12, $"{config.xpGather.stoneorexp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Harvest row2++; ControlPanelelements.Add(XPUILabel($"Gathering:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp harvest {UserInputText}", row2, height, 12, $"{config.xpGather.harvestxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Plant row2++; ControlPanelelements.Add(XPUILabel($"Plants:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp plant {UserInputText}", row2, height, 12, $"{config.xpGather.plantxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // One Time XP row2++; ControlPanelelements.Add(XPUILabel($"Only Give XP At End:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp onetimexp", row2, height, config.xpGather.onetimexp, valueL2, width), XPerienceAdminPanelLevelXP); // Disable Tool XP row2++; ControlPanelelements.Add(XPUILabel($"Disable Power Tool Gains:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp noxptools", row2, height, config.xpGather.noxptools, valueL2, width), XPerienceAdminPanelLevelXP); if (!config.xpGather.noxptools) { // Tool XP Chance row2++; ControlPanelelements.Add(XPUILabel($"Tool XP Chance:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp toolxpchance {UserInputText}", row2, height, 12, $"{config.xpGather.toolxpchance}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpGather.toolxpchance * 100}%", row2, height, TextAnchor.MiddleLeft, 12, valueP2L, valueP2R, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Tool XP Percent row2++; ControlPanelelements.Add(XPUILabel($"Tool XP Percent:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp toolxppercent {UserInputText}", row2, height, 12, $"{config.xpGather.toolxppercent}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpGather.toolxppercent * 100}%", row2, height, TextAnchor.MiddleLeft, 12, valueP2L, valueP2R, "1 1 1 1"), XPerienceAdminPanelLevelXP); } #endregion // XP Crafting/Building #region Craft/Build row2++; row2++; ControlPanelelements.Add(XPUILabel($"[XP Crafting/Building Settings]", row2, height, TextAnchor.MiddleLeft, 15, lableL2, valueP2R, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Crafting XP Delay Enable row2++; ControlPanelelements.Add(XPUILabel($"Delay Crafting XP:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp craftxpdelay", row2, height, config.xpGain.craftingxpdelay, valueL2, width), XPerienceAdminPanelLevelXP); // Crafting XP Delay Seconds row2++; ControlPanelelements.Add(XPUILabel($"Delay XP Seconds:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp craftxpdelayseconds {UserInputText}", row2, height, 12, $"{config.xpGain.craftingxpdelayseconds}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Crafting row2++; ControlPanelelements.Add(XPUILabel($"Crafting:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp crafting {UserInputText}", row2, height, 12, $"{config.xpGain.craftingxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Require Building Privlidge row2++; ControlPanelelements.Add(XPUILabel($"Require Building Privlidge:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp requirebuildingprivlidge", row2, height, config.xpBuilding.requirebuildingprivlidge, valueL2, width), XPerienceAdminPanelLevelXP); // Twig Building row2++; ControlPanelelements.Add(XPUILabel($"Twig Structure:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp twigbuild {UserInputText}", row2, height, 12, $"{config.xpBuilding.twigstructure}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Wood Building row2++; ControlPanelelements.Add(XPUILabel($"Wood Structure:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp woodbuild {UserInputText}", row2, height, 12, $"{config.xpBuilding.woodstructure}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Stone Building row2++; ControlPanelelements.Add(XPUILabel($"Stone Structure:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp stonebuild {UserInputText}", row2, height, 12, $"{config.xpBuilding.stonestructure}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Metal Building row2++; ControlPanelelements.Add(XPUILabel($"Metal Structure:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp metalbuild {UserInputText}", row2, height, 12, $"{config.xpBuilding.metalstructure}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Armor Building row2++; ControlPanelelements.Add(XPUILabel($"Armor Structure:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp armorbuild {UserInputText}", row2, height, 12, $"{config.xpBuilding.armoredstructure}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Building XP Delay Enable if (BuildingGrades != null) { row2++; ControlPanelelements.Add(XPUILabel($"BuildingGrades Mod Detected", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Prevent BG XP row2++; ControlPanelelements.Add(XPUILabel($"No XP with /up:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp preventBGxp", row2, height, config.xpBuilding.preventBGxp, valueL2, width), XPerienceAdminPanelLevelXP); // Building XP Delay Enable row2++; ControlPanelelements.Add(XPUILabel($"Delay Building XP:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp buildxpdelay", row2, height, config.xpBuilding.buildxpdelay, valueL2, width), XPerienceAdminPanelLevelXP); // Building XP Delay Seconds row2++; ControlPanelelements.Add(XPUILabel($"Delay XP Seconds:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp buildxpdelayseconds {UserInputText}", row2, height, 12, $"{config.xpBuilding.buildxpdelayseconds}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Reduce XP row2++; ControlPanelelements.Add(XPUILabel($"Reduce XP on Downgrade:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp reducexp", row2, height, config.xpBuilding.reducexp, valueL2, width), XPerienceAdminPanelLevelXP); // Reduce XP Amount row2++; ControlPanelelements.Add(XPUILabel($"Reduce XP Amount:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp buildxpreduction {UserInputText}", row2, height, 12, $"{config.xpBuilding.buildxpreduction}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpBuilding.buildxpreduction * 100}%", row2, height, TextAnchor.MiddleLeft, 12, valueP2L, valueP2R, "1 1 1 1"), XPerienceAdminPanelLevelXP); } #endregion // XP Kill Settings #region XP Kills ControlPanelelements.Add(XPUILabel($"[XP Kill Settings]", row3, height, TextAnchor.MiddleLeft, 15, lableL3, valueP3R, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Chicken row3++; ControlPanelelements.Add(XPUILabel($"Chicken:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp chicken {UserInputText}", row3, height, 12, $"{config.xpGain.chickenxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Fish row3++; ControlPanelelements.Add(XPUILabel($"Fish:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp fish {UserInputText}", row3, height, 12, $"{config.xpGain.fishxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Boar row3++; ControlPanelelements.Add(XPUILabel($"Boar:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp boar {UserInputText}", row3, height, 12, $"{config.xpGain.bearxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Stag row3++; ControlPanelelements.Add(XPUILabel($"Stag:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp stag {UserInputText}", row3, height, 12, $"{config.xpGain.stagxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Wolf row3++; ControlPanelelements.Add(XPUILabel($"Wolf:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp wolf {UserInputText}", row3, height, 12, $"{config.xpGain.wolfxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Bear row3++; ControlPanelelements.Add(XPUILabel($"Bear:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp bear {UserInputText}", row3, height, 12, $"{config.xpGain.bearxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // PolarBear row3++; ControlPanelelements.Add(XPUILabel($"PolarBear:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp polarbear {UserInputText}", row3, height, 12, $"{config.xpGain.polarbearxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Shark row3++; ControlPanelelements.Add(XPUILabel($"Shark:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp shark {UserInputText}", row3, height, 12, $"{config.xpGain.sharkxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Horse row3++; ControlPanelelements.Add(XPUILabel($"Horse:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp horse {UserInputText}", row3, height, 12, $"{config.xpGain.horsexp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist General row3++; ControlPanelelements.Add(XPUILabel($"General Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp scientist {UserInputText}", row3, height, 12, $"{config.xpGain.scientistxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist Cargo row3++; ControlPanelelements.Add(XPUILabel($"Cargo Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sc_cargo {UserInputText}", row3, height, 12, $"{config.xpGain.sc_cargo}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist Full row3++; ControlPanelelements.Add(XPUILabel($"Full Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sc_full {UserInputText}", row3, height, 12, $"{config.xpGain.sc_full}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist Heavy row3++; ControlPanelelements.Add(XPUILabel($"Heavy Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sc_heavy {UserInputText}", row3, height, 12, $"{config.xpGain.sc_heavy}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist Junkpile row3++; ControlPanelelements.Add(XPUILabel($"Junkpile Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sc_junkpile {UserInputText}", row3, height, 12, $"{config.xpGain.sc_junkpile}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist Oilrig row3++; ControlPanelelements.Add(XPUILabel($"Oilrig Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sc_oilrig {UserInputText}", row3, height, 12, $"{config.xpGain.sc_oilrig}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist Patrol row3++; ControlPanelelements.Add(XPUILabel($"Patrol Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sc_patrol {UserInputText}", row3, height, 12, $"{config.xpGain.sc_patrol}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist PeaceKeeper row3++; ControlPanelelements.Add(XPUILabel($"PeaceKeeper Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sc_peacekeeper {UserInputText}", row3, height, 12, $"{config.xpGain.sc_peacekeeper}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scientist Roam row3++; ControlPanelelements.Add(XPUILabel($"Roam Scientist:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp sc_roam {UserInputText}", row3, height, 12, $"{config.xpGain.sc_roam}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // General Dweller row3++; ControlPanelelements.Add(XPUILabel($"General Dweller:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp dweller {UserInputText}", row3, height, 12, $"{config.xpGain.dwellerxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Tunnel Dweller row3++; ControlPanelelements.Add(XPUILabel($"Tunnel Dweller:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp tunneldwellerxp {UserInputText}", row3, height, 12, $"{config.xpGain.tunneldwellerxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Underwater Dweller row3++; ControlPanelelements.Add(XPUILabel($"Underwater Dweller:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp underwaterdwellerxp {UserInputText}", row3, height, 12, $"{config.xpGain.underwaterdwellerxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Scarecrownpc row3++; ControlPanelelements.Add(XPUILabel($"Scare Crow:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp scarecrownpc {UserInputText}", row3, height, 12, $"{config.xpGain.scarecrownpc}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Custom NPCs row3++; ControlPanelelements.Add(XPUILabel($"Custom NPCs:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp customnpc {UserInputText}", row3, height, 12, $"{config.xpGain.customnpc}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Zombie NPCs row3++; ControlPanelelements.Add(XPUILabel($"Custom Zombie NPCs:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp zombienpc {UserInputText}", row3, height, 12, $"{config.xpGain.zombienpc}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Player row3++; ControlPanelelements.Add(XPUILabel($"Player:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp player {UserInputText}", row3, height, 12, $"{config.xpGain.playerxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Bradley row3++; ControlPanelelements.Add(XPUILabel($"Bradley:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp bradley {UserInputText}", row3, height, 12, $"{config.xpGain.bradley}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Patrol Helicopter row3++; ControlPanelelements.Add(XPUILabel($"Patrol Helicopter:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp heli {UserInputText}", row3, height, 12, $"{config.xpGain.patrolhelicopter}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Allow Turrets row3++; ControlPanelelements.Add(XPUILabel($"Allow AutoTurret XP:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPToggle($"xp.config levelxp turretallow", row3, height, config.xpGain.allowturretxp, valueL3, width), XPerienceAdminPanelLevelXP); // Turrets row3++; ControlPanelelements.Add(XPUILabel($"Auto Turrets:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp turret {UserInputText}", row3, height, 12, $"{config.xpGain.turretxp}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // Seasonal #region Seasonal row3++; row3++; ControlPanelelements.Add(XPUILabel($"[Seasonal Settings]", row3, height, TextAnchor.MiddleLeft, 15, lableL3, valueP3R, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Gift Loot row3++; ControlPanelelements.Add(XPUILabel($"Gift Loot:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp gifts {UserInputText}", row3, height, 12, $"{config.xpGain.gifts}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Open Small Gift row3++; ControlPanelelements.Add(XPUILabel($"Open Small Gift:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp opengifts {UserInputText}", row3, height, 12, $"{config.xpGain.opengifts}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Open Medium Gift row3++; ControlPanelelements.Add(XPUILabel($"Open Medium Gift:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp opengiftsmed {UserInputText}", row3, height, 12, $"{config.xpGain.opengiftsmed}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Open Large Gift row3++; ControlPanelelements.Add(XPUILabel($"Open Large Gift:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp opengiftslarge {UserInputText}", row3, height, 12, $"{config.xpGain.opengiftslarge}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Upgrade Medium Gift row3++; ControlPanelelements.Add(XPUILabel($"Upgrade To Medium Gift:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp upgradegiftsmed {UserInputText}", row3, height, 12, $"{config.xpGain.upgradegiftsmed}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); // Upgrade Large Gift row3++; ControlPanelelements.Add(XPUILabel($"Upgrade To Large Gift:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp upgradegiftslarge {UserInputText}", row3, height, 12, $"{config.xpGain.upgradegiftslarge}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // Cooking Plugin #region Cooking if (Cooking != null) { row3++; row3++; ControlPanelelements.Add(XPUILabel($"[Cooking Settings]", row3, height, TextAnchor.MiddleLeft, 15, lableL3, valueP3R, "1 1 1 1"), XPerienceAdminPanelLevelXP); // Craft Meal row3++; ControlPanelelements.Add(XPUILabel($"Craft Meal:", row3, height, TextAnchor.MiddleLeft, 12, lableL3, lableR3, "1 1 1 1"), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInputbackground(row3, height, "0 0 .1 .75", valueL3, valueR3), XPerienceAdminPanelLevelXP); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelLevelXP, $"xp.config levelxp craftmeal {UserInputText}", row3, height, 12, $"{config.xpGain.craftmeal}", valueL3, valueR3, TextAnchor.MiddleLeft, "1 1 1 1")); } #endregion CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminRanksPage(BasePlayer player, string page = "main", int rank = 0) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.025f; var height2 = 0.035f; double width = .006; int row = 1; int rowtwo = 1; string lableL = ".01"; string lableR = ".20"; string valueL = ".20"; string valueR = ".29"; string valuePL = ".30"; string valuePR = ".32"; string lableL2 = ".33"; string lableR2 = ".48"; string valueL2 = ".49"; string delL = ".01"; string delR = ".02"; string ranknameL = ".03"; string ranknameR = ".50"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelRanks); switch (page) { case "main": // Rank Settings #region Rank Settings int maxranks = config.xpLevelRanks.ranks.Count - 1; row++; ControlPanelelements.Add(XPUILabel($"[Rank Settings]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.30", "1 1 1 1"), XPerienceAdminPanelRanks); // Enable Ranks row++; row++; ControlPanelelements.Add(XPUIButton($"xp.admin ranks ranklist", row, height, 12, "0 1 0 .25", "Add / Edit Ranks", ".01", ".16", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelRanks); row++; row++; ControlPanelelements.Add(XPUILabel($"Enable Prestige Ranks:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks enableranks", row, height, config.xpLevelRanks.enableresetranks, valueL, width), XPerienceAdminPanelRanks); // Reset Stats/Skills row++; ControlPanelelements.Add(XPUILabel($"Reset All Stats/Skills", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks resetallstatsskills", row, height, config.xpLevelRanks.resetallstatsskills, valueL, width), XPerienceAdminPanelRanks); // Allow Player Disable row++; ControlPanelelements.Add(XPUILabel($"Allow Players to Disable Auto Rank:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks playerdisable", row, height, config.xpLevelRanks.allowplayerdisable, valueL, width), XPerienceAdminPanelRanks); // Keep Group on Ranks row++; ControlPanelelements.Add(XPUILabel($"Keep Previous Rank Groups:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks keepgrouponrank", row, height, config.xpLevelRanks.keepgrouponrank, valueL, width), XPerienceAdminPanelRanks); // Show Ranks in Chat row++; ControlPanelelements.Add(XPUILabel($"Show Rank Tag in Chat:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks showrankinchat", row, height, config.xpLevelRanks.showrankinchat, valueL, width), XPerienceAdminPanelRanks); // Show Ranks in LiveUI row++; ControlPanelelements.Add(XPUILabel($"Show Rank in LiveUI:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks showrankinliveui", row, height, config.xpLevelRanks.showrankinliveui, valueL, width), XPerienceAdminPanelRanks); // Max Rank row++; if (config.xpLevelRanks.maxresetrank > maxranks) { config.xpLevelRanks.maxresetrank = maxranks; } ControlPanelelements.Add(XPUILabel($"Max Prestige Rank:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks maxrank {UserInputText}", row, height, 12, $"{config.xpLevelRanks.maxresetrank}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Enable Increase XP Requirement row++; ControlPanelelements.Add(XPUILabel($"Increase Level XP Requirement:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks increaselevelmultiplier", row, height, config.xpLevelRanks.increaselevelmultiplier, valueL, width), XPerienceAdminPanelRanks); // Rank XP Requirement Increase row++; ControlPanelelements.Add(XPUILabel($"XP Requirement Increase Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks levelmultiplierincrease {UserInputText}", row, height, 12, $"{config.xpLevelRanks.levelmultiplierincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Enable Rank XP Boost row++; ControlPanelelements.Add(XPUILabel($"Enable Rank XP Boost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks enablerankxpboost", row, height, config.xpLevelRanks.enablerankxpboost, valueL, width), XPerienceAdminPanelRanks); // Rank XP Boost row++; ControlPanelelements.Add(XPUILabel($"Rank XP Boost Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks rankxpboost {UserInputText}", row, height, 12, $"{config.xpLevelRanks.rankxpboost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpLevelRanks.rankxpboost * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelRanks); // Enable Rank Stat Boost row++; ControlPanelelements.Add(XPUILabel($"Enable Rank Stats Boost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks rankstatboost", row, height, config.xpLevelRanks.rankstatboost, valueL, width), XPerienceAdminPanelRanks); // Rank Stat Boost row++; ControlPanelelements.Add(XPUILabel($"Rank Stats Boost Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks rankstatboostamt {UserInputText}", row, height, 12, $"{config.xpLevelRanks.rankstatboostamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpLevelRanks.rankstatboostamount * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelRanks); // Rank Stat Point Start row++; ControlPanelelements.Add(XPUILabel($"Rank Stats Points Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks rankstatpointstart {UserInputText}", row, height, 12, $"{config.xpLevelRanks.rankstatpointstart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Rank Stat Points row++; ControlPanelelements.Add(XPUILabel($"Rank Stats Points Increase:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks rankstatpoints {UserInputText}", row, height, 12, $"{config.xpLevelRanks.rankstatpointincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Enable Rank Skill Boost row++; ControlPanelelements.Add(XPUILabel($"Enable Rank Skills Boost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks rankskillboost", row, height, config.xpLevelRanks.rankskillboost, valueL, width), XPerienceAdminPanelRanks); // Rank Skill Boost row++; ControlPanelelements.Add(XPUILabel($"Rank Skills Boost Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks rankskillboostamt {UserInputText}", row, height, 12, $"{config.xpLevelRanks.rankskillboostamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.xpLevelRanks.rankskillboostamount * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelRanks); // Rank Skill Point Start row++; ControlPanelelements.Add(XPUILabel($"Rank Skills Points Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks rankskillpointstart {UserInputText}", row, height, 12, $"{config.xpLevelRanks.rankskillpointstart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Rank Skill Points row++; ControlPanelelements.Add(XPUILabel($"Rank Skills Points Increase:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.config ranks rankskillpoints {UserInputText}", row, height, 12, $"{config.xpLevelRanks.rankskillpointincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Show Rank TrueLevel row++; ControlPanelelements.Add(XPUILabel($"Show Rank Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks truelevels", row, height, config.xpLevelRanks.showtruelevelprofile, valueL, width), XPerienceAdminPanelRanks); // Show Rank TrueXP row++; ControlPanelelements.Add(XPUILabel($"Show Rank XP:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks truexp", row, height, config.xpLevelRanks.showtruexpprofile, valueL, width), XPerienceAdminPanelRanks); #endregion // Rank options #region Rank Options // Stats if (config.xpLevelRanks.rankstatboost) { row++; row++; ControlPanelelements.Add(XPUILabel($"[Rank Options] Stat Effects", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.30", "1 1 1 1"), XPerienceAdminPanelRanks); row++; row++; ControlPanelelements.Add(XPUILabel($"Mentality Research Cost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks researchcost", row, height, config.Rankboostssettings.researchcost, valueL, width), XPerienceAdminPanelRanks); row++; ControlPanelelements.Add(XPUILabel($"Mentality Research Speed:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks researchspeed", row, height, config.Rankboostssettings.researchspeed, valueL, width), XPerienceAdminPanelRanks); row++; ControlPanelelements.Add(XPUILabel($"Dexterity Block:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks block", row, height, config.Rankboostssettings.block, valueL, width), XPerienceAdminPanelRanks); row++; ControlPanelelements.Add(XPUILabel($"Dexterity Armor:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks armor", row, height, config.Rankboostssettings.armor, valueL, width), XPerienceAdminPanelRanks); row++; ControlPanelelements.Add(XPUILabel($"Captaincy Effective Distance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks distance", row, height, config.Rankboostssettings.distance, valueL, width), XPerienceAdminPanelRanks); row++; ControlPanelelements.Add(XPUILabel($"Might Melee Damage:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks meleedmg", row, height, config.Rankboostssettings.meleedmg, valueL, width), XPerienceAdminPanelRanks); row++; ControlPanelelements.Add(XPUILabel($"Might Metabolism:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks metabolism", row, height, config.Rankboostssettings.metabolism, valueL, width), XPerienceAdminPanelRanks); } // Skills if (config.xpLevelRanks.rankskillboost) { rowtwo++; ControlPanelelements.Add(XPUILabel($"[Rank Options] Skill Effects", rowtwo, height, TextAnchor.MiddleLeft, 15, "0.33", "0.56", "1 1 1 1"), XPerienceAdminPanelRanks); rowtwo++; rowtwo++; ControlPanelelements.Add(XPUILabel($"WoodCutter Gather Rate:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks woodcuttergr", rowtwo, height, config.Rankboostssettings.woodcuttergr, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"WoodCutter Bonus Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks woodcutterbonus", rowtwo, height, config.Rankboostssettings.woodcutterbonus, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Smithy Production Rate:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks smithypr", rowtwo, height, config.Rankboostssettings.smithypr, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Smithy Production Speed:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks smithyps", rowtwo, height, config.Rankboostssettings.smithyps, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Smithy Fuel Consumption:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks smithyfc", rowtwo, height, config.Rankboostssettings.smithyfc, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Smithy HQ Metal Chance:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks smithyhqmc", rowtwo, height, config.Rankboostssettings.smithyhqmc, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Smithy HQ Metal Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks smithyhqma", rowtwo, height, config.Rankboostssettings.smithyhqma, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Miner Gather Rate:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks minergr", rowtwo, height, config.Rankboostssettings.minergr, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Miner Bonus Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks minerbonus", rowtwo, height, config.Rankboostssettings.minerbonus, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Miner Fuel Consumption:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks minerfuel", rowtwo, height, config.Rankboostssettings.minerfuel, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Miner Metal Frament Chance:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks minermfc", rowtwo, height, config.Rankboostssettings.minermfc, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Miner Metal Frament Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks minermfa", rowtwo, height, config.Rankboostssettings.minermfa, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Fisher Fish Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks fisherfa", rowtwo, height, config.Rankboostssettings.fisherfa, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Fisher Item Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks fisheria", rowtwo, height, config.Rankboostssettings.fisheria, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Fisher Oxygen Tank Reduction:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks fisherotr", rowtwo, height, config.Rankboostssettings.fisherotr, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Forager Gather Rate:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks foragergr", rowtwo, height, config.Rankboostssettings.foragergr, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Forager Grub/Worm Chance:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks foragergwa", rowtwo, height, config.Rankboostssettings.foragergwa, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Forager Random Item Chance:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks foragerric", rowtwo, height, config.Rankboostssettings.foragerric, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Hunter Gather Rate:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks huntergr", rowtwo, height, config.Rankboostssettings.huntergr, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Hunter Bonus Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks hunterbonus", rowtwo, height, config.Rankboostssettings.hunterbonus, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Hunter Damage Increase (wildlife):", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks hunterdmg", rowtwo, height, config.Rankboostssettings.hunterdmg, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Hunter Night Damage Increase:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks hunterndmg", rowtwo, height, config.Rankboostssettings.hunterndmg, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Crafter Crafting Speed:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks crafterspeed", rowtwo, height, config.Rankboostssettings.crafterspeed, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Crafter Crafting Cost:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks craftercost", rowtwo, height, config.Rankboostssettings.craftercost, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Crafter Repair Increase:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks crafterri", rowtwo, height, config.Rankboostssettings.crafterri, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Crafter Repair Cost:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks crafterrc", rowtwo, height, config.Rankboostssettings.crafterrc, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Crafter Condition Chance:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks craftercc", rowtwo, height, config.Rankboostssettings.craftercc, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Crafter Condition Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks crafterca", rowtwo, height, config.Rankboostssettings.crafterca, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Framer Upgrade Cost:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks framerucost", rowtwo, height, config.Rankboostssettings.framerucost, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Framer Repair Cost:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks framerrcost", rowtwo, height, config.Rankboostssettings.framerrcost, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Medic Revival Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks medicrevivala", rowtwo, height, config.Rankboostssettings.medicrevivala, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Medic Recover Amount:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks medicrecovera", rowtwo, height, config.Rankboostssettings.medicrecovera, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Medic Tools:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks medictools", rowtwo, height, config.Rankboostssettings.medictools, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Scavenger Extra Loot Chance:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks scavelc", rowtwo, height, config.Rankboostssettings.scavelc, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Scavenger Extra Loot Multiplier:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks scavelm", rowtwo, height, config.Rankboostssettings.scavelm, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Scavenger Custom Item Chance:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks scavcic", rowtwo, height, config.Rankboostssettings.scavcic, valueL2, width), XPerienceAdminPanelRanks); rowtwo++; ControlPanelelements.Add(XPUILabel($"Scavenger Custom Item Multiplier:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPToggle($"xp.config ranks scavcim", rowtwo, height, config.Rankboostssettings.scavcim, valueL2, width), XPerienceAdminPanelRanks); } #endregion break; case "ranklist": // Rank List #region Rank List row++; ControlPanelelements.Add(XPUIButton($"xp.ranks newrank", row, height2, 12, "0 1 0 .25", "Create New Rank", ".01", ".16", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelRanks); row++; ControlPanelelements.Add(XPUILabel($"(If you add or remove ranks you must update the max prestige rank count on the rank settings page!)", row, height2, TextAnchor.MiddleLeft, 11, delL, ranknameR, "1 1 0 1"), XPerienceAdminPanelRanks); row++; var ranklist = config.xpLevelRanks.ranks; foreach (var getrank in ranklist) { ControlPanelelements.Add(XPUIButton($"xp.admin deleterank {getrank.Key}", row, height2, 12, "0 0 0 .25", $"ⓧ", delL, delR, TextAnchor.MiddleLeft, "1 0 0 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIButton($"xp.admin editrank {getrank.Key}", row, height2, 12, "0 0 0 .25", $"[{getrank.Key}] {getrank.Value.name}", ranknameL, ranknameR, TextAnchor.MiddleLeft, "1 1 1 1"), XPerienceAdminPanelRanks); row++; } row++; ControlPanelelements.Add(XPUIButton($"xp.admin ranks main", row, height2, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelRanks); #endregion break; case "editrank": // Edit Rank #region Edit Rank var editrank = config.xpLevelRanks.ranks[rank]; row++; ControlPanelelements.Add(XPUILabel($"Rank Name:", row, height2, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height2, "0 0 .1 .75", valueL, ranknameR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.ranks editrank {rank} rankname {UserInputText}", row, height2, 12, $"{editrank.name}", valueL, ranknameR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Rank Sig:", row, height2, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height2, "0 0 .1 .75", valueL, ranknameR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.ranks editrank {rank} ranksig {UserInputText}", row, height2, 12, $"{editrank.sig}", valueL, ranknameR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Rank Description:", row, height2, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height2, "0 0 .1 .75", valueL, ranknameR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.ranks editrank {rank} rankdet {UserInputText}", row, height2, 12, $"{editrank.description}", valueL, ranknameR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Rank Image:", row, height2, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height2, "0 0 .1 .75", valueL, ranknameR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.ranks editrank {rank} rankimage {UserInputText}", row, height2, 12, $"{editrank.image}", valueL, ranknameR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Rank Group:", row, height2, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInputbackground(row, height2, "0 0 .1 .75", valueL, ranknameR), XPerienceAdminPanelRanks); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelRanks, $"xp.ranks editrank {rank} rankgroup {UserInputText}", row, height2, 12, $"{editrank.group}", valueL, ranknameR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; row++; ControlPanelelements.Add(XPUIButton($"xp.admin ranks ranklist", row, height2, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelRanks); #endregion break; } // End CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminDailyLimitsPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.027f; double width = .006; int row = 4; string lableL = "0.01"; string lableR = "0.20"; string valueL = "0.20"; string valueR = "0.25"; string valuePL = "0.26"; string valuePR = "0.30"; string setting1L = "0.26"; string setting1R = "0.27"; string setting2L = "0.28"; string setting2R = "0.29"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUILabel($"Daily Limit Settings", 1, 0.090f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelDailyLimits); // Daily Timer #region Daily Timer row++; row++; ControlPanelelements.Add(XPUILabel($"[Daily Limit Reset]", row, height, TextAnchor.MiddleLeft, 15, "0.01", valueL, "1 1 1 1"), XPerienceAdminPanelDailyLimits); // Timer Hours row++; ControlPanelelements.Add(XPUILabel($"Player Daily Limit Reset: (hours)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits dailyresettimerhours {UserInputText}", row, height, 12, $"{config.dailytimer.dailyresettimerhours}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; row++; ControlPanelelements.Add(XPUIButton($"xp.config dailylimits resetdailytimer 0 true", row, height, 13, "0 0 0 1", "Reset ALL Player Limits", lableL, lableR, TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelDailyLimits); #endregion // Daily XP Limit Settings #region Daily XP Limits row++; row++; ControlPanelelements.Add(XPUILabel($"[XP Limit Settings] (Players with VIP Overide Special Groups)", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.5", "1 1 1 1"), XPerienceAdminPanelDailyLimits); // Enable Daily Limit row++; ControlPanelelements.Add(XPUILabel($"Enable Daily XP Limit:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPToggle($"xp.config dailylimits enabledailyxplimit", row, height, config.dailyxpLimit.enabledailyxplimit, valueL, width), XPerienceAdminPanelDailyLimits); // Daily Limit Default string deflimit = config.dailyxpLimit.dailyxplimit.ToString(); if (deflimit == "0") { deflimit = "∞"; } row++; ControlPanelelements.Add(XPUILabel($"Daily Limit Default:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits dailyxplimit {UserInputText}", row, height, 12, $"{deflimit}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Daily Limit VIP string viplimit = config.dailyxpLimit.dailyxplimitvip.ToString(); if (viplimit == "0") { viplimit = "∞"; } row++; ControlPanelelements.Add(XPUILabel($"Daily Limit VIP:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits dailyxplimitvip {UserInputText}", row, height, 12, $"{viplimit}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Multiplier Type string multipliertype = "%"; if(config.dailyxpLimit.limitmultipliertype == 1) { multipliertype = "%"; } if(config.dailyxpLimit.limitmultipliertype == 2) { multipliertype = "X"; } row++; ControlPanelelements.Add(XPUILabel($"Daily Limit Multiplier Type:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUILabel($"{multipliertype}", row, height, TextAnchor.MiddleLeft, 12, valueL, valueR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIButton($"xp.config dailylimits limitmultipliertype 1 false", row, height, 12, "0.0 1.0 0.0 0", "%", setting1L, setting1R, TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIButton($"xp.config dailylimits limitmultipliertype 2 false", row, height, 12, "1.0 0.0 0.0 0", "X", setting2L, setting2R, TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelDailyLimits); // Multiplier Value if (config.dailyxpLimit.limitmultipliertype == 1) { row++; ControlPanelelements.Add(XPUILabel($"Percentage Amount Per Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits limitpercentage {UserInputText}", row, height, 12, $"{config.dailyxpLimit.limitpercentage}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dailyxpLimit.limitpercentage * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); row++; row++; if (config.dailyxpLimit.dailyxplimit > 0) { ControlPanelelements.Add(XPUILabel($"Default: {config.dailyxpLimit.dailyxplimit} + (({config.dailyxpLimit.dailyxplimit} * {config.dailyxpLimit.limitpercentage}) * level)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); } else { ControlPanelelements.Add(XPUILabel($"Default: Unlimited", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); } row++; if (config.dailyxpLimit.dailyxplimitvip > 0) { ControlPanelelements.Add(XPUILabel($"VIP: {config.dailyxpLimit.dailyxplimitvip} + (({config.dailyxpLimit.dailyxplimitvip} * {config.dailyxpLimit.limitpercentage}) * level)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); } else { ControlPanelelements.Add(XPUILabel($"VIP: Unlimited", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); } } if (config.dailyxpLimit.limitmultipliertype == 2) { row++; ControlPanelelements.Add(XPUILabel($"Multiplier Amount Per Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits limitmultiplier {UserInputText}", row, height, 12, $"{config.dailyxpLimit.limitmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; row++; if (config.dailyxpLimit.dailyxplimit > 0) { ControlPanelelements.Add(XPUILabel($"Default Value: {config.dailyxpLimit.dailyxplimit} + (({config.dailyxpLimit.dailyxplimit} * {config.dailyxpLimit.limitmultiplier}) * level)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); } else { ControlPanelelements.Add(XPUILabel($"Default Value: Unlimited", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); } row++; if (config.dailyxpLimit.dailyxplimitvip > 0) { ControlPanelelements.Add(XPUILabel($"VIP Value: {config.dailyxpLimit.dailyxplimitvip} + (({config.dailyxpLimit.dailyxplimitvip} * {config.dailyxpLimit.limitmultiplier}) * level)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); } else { ControlPanelelements.Add(XPUILabel($"VIP Value: Unlimited", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); } } #endregion // Daily Stat & Skill Reset Limits #region Daily Stat & Skill row++; row++; ControlPanelelements.Add(XPUILabel($"[Stat & Skill Limit Settings] (Players with VIP Overide Special Groups)", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.5", "1 1 1 1"), XPerienceAdminPanelDailyLimits); // Enable Daily Limit row++; ControlPanelelements.Add(XPUILabel($"Enable Daily Reset Limits:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPToggle($"xp.config dailylimits enabledailyresetlimit", row, height, config.dailyresetLimit.enabledailyresetlimit, valueL, width), XPerienceAdminPanelDailyLimits); // Daily Stat Limit Default string defstatlimit = config.dailyresetLimit.dailystatlimit.ToString(); if (defstatlimit == "0") { defstatlimit = "∞"; } row++; ControlPanelelements.Add(XPUILabel($"Daily Stats Reset Limit Default:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits dailystatlimit {UserInputText}", row, height, 12, $"{defstatlimit}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Daily Stat Limit VIP string vipstatlimit = config.dailyresetLimit.dailystatlimitvip.ToString(); if (vipstatlimit == "0") { vipstatlimit = "∞"; } row++; ControlPanelelements.Add(XPUILabel($"Daily Stats Reset Limit VIP:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits dailystatlimitvip {UserInputText}", row, height, 12, $"{vipstatlimit}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Daily Skill Limit Default string defskilllimit = config.dailyresetLimit.dailyskilllimit.ToString(); if (defskilllimit == "0") { defskilllimit = "∞"; } row++; ControlPanelelements.Add(XPUILabel($"Daily Skill Reset Limit Default:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits dailyskilllimit {UserInputText}", row, height, 12, $"{defskilllimit}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Daily Skill Limit VIP string vipskilllimit = config.dailyresetLimit.dailyskilllimitvip.ToString(); if (vipskilllimit == "0") { vipskilllimit = "∞"; } row++; ControlPanelelements.Add(XPUILabel($"Daily Stats Reset Limit VIP:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelDailyLimits); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelDailyLimits, $"xp.config dailylimits dailyskilllimitvip {UserInputText}", row, height, 12, $"{vipskilllimit}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // End CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminStatsPage(BasePlayer player, string stat = "main") { var ControlPanelelements = new CuiElementContainer(); #region Layout int fontsize = 15; var menuheight = 0.07f; var height = 0.035f; double width = .006; int row = 2; string iconL = ".01"; string iconR = ".04"; string iconR2 = ".02"; string MlableL = ".05"; string MlableL2 = ".03"; string MlableR = ".50"; string lableL = ".01"; string lableR = ".20"; string valueL = ".20"; string valueR = ".25"; string valuePL = ".26"; string valuePR = ".36"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelStats); // Main Page if (stat == "main") { ControlPanelelements.Add(XPUILabel($"Stat Settings - Click the stat below to adjust the settings for that stat.", 1, menuheight, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelStats); // Stat List ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPeriencementality, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin stats mentality", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIButton("xp.admin stats mentality", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("mentality", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPeriencedexterity, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin stats dexterity", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIButton("xp.admin stats dexterity", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("dexterity", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPeriencemight, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin stats might", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIButton("xp.admin stats might", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("might", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPerienceweaponry, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin stats weaponry", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIButton("xp.admin stats weaponry", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("weaponry", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPerienceninjary, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin stats ninjary", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIButton("xp.admin stats ninjary", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("ninjary", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPeriencecaptaincy, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin stats captaincy", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIButton("xp.admin stats captaincy", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("captaincy", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelStats); // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } // Return to main page if (stat != "main") { ControlPanelelements.Add(XPUIButton("xp.admin stats main", row, height, 11, "0 0 0 .7", "<- Back to Stat list", lableL, lableR, TextAnchor.MiddleCenter, "0 1 1 1"), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUILabel($"Set Max Level to 0 to disable: (Yellow = max level value | Blue = max rank value)", row, height, TextAnchor.MiddleLeft, 11, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelStats); row++; } // Mentality Settings #region Mentality if (stat == "mentality") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPeriencementality, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{stat}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelStats); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalitymaxlevel {UserInputText}", row, height, 12, $"{config.mentality.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.mentality.maxlvl > 0) { // Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalitycost {UserInputText}", row, height, 12, $"{config.mentality.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalitycostmultiplier {UserInputText}", row, height, 12, $"{config.mentality.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Enable / Disable Tech Tree row++; ControlPanelelements.Add(XPUILabel($"Lock Tech Tree:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPToggle($"xp.config stats {stat} mentalitylocktechtree", row, height, config.mentality.locktechtree, valueL, width), XPerienceAdminPanelStats); // Tech Tree Level if (config.mentality.locktechtree) { row++; ControlPanelelements.Add(XPUILabel($"Tech Tree Level Requirement:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); if (config.mentality.unlocktechtreelevel == 0) { ControlPanelelements.Add(XPUILabel($"Locked", row, height, TextAnchor.MiddleLeft, 12, "0.15", "0.20", "1 1 1 1"), XPerienceAdminPanelStats); } ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalityunlocktechtreelevel {UserInputText}", row, height, 12, $"{config.mentality.unlocktechtreelevel}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); } // Research Cost Tech Tree row++; ControlPanelelements.Add(XPUILabel($"Research Cost Reduction (Tech Tree):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalityresearchcosttechtree {UserInputText}", row, height, 12, $"{config.mentality.researchcosttechtree}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.mentality.researchcosttechtree * config.mentality.maxlvl * 100}% / {((config.mentality.researchcosttechtree * config.mentality.maxlvl) + (config.xpLevelRanks.rankstatboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Research Cost row++; ControlPanelelements.Add(XPUILabel($"Research Cost Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalityresearchcost {UserInputText}", row, height, 12, $"{config.mentality.researchcost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.mentality.researchcost * config.mentality.maxlvl * 100}% / {((config.mentality.researchcost * config.mentality.maxlvl) + (config.xpLevelRanks.rankstatboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Research Speed row++; ControlPanelelements.Add(XPUILabel($"Research Speed Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalityresearchspeed {UserInputText}", row, height, 12, $"{config.mentality.researchspeed}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.mentality.researchspeed * config.mentality.maxlvl * 100}% / {((config.mentality.researchspeed * config.mentality.maxlvl) + (config.xpLevelRanks.rankstatboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Critical Chance row++; ControlPanelelements.Add(XPUILabel($"Critical Chance Percent:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalitycriticalchance {UserInputText}", row, height, 12, $"{config.mentality.criticalchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.mentality.criticalchance * config.mentality.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Critical Damage row++; ControlPanelelements.Add(XPUILabel($"Critical Damage Percent:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalitycriticaldmg {UserInputText}", row, height, 12, $"{config.mentality.criticaldgm}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.mentality.criticaldgm * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Damage PVP / NPC row++; ControlPanelelements.Add(XPUILabel($"Damage Increase to NPCs:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mentalitydamagepvpnpc {UserInputText}", row, height, 12, $"{config.mentality.damageincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.mentality.damageincrease * config.mentality.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Enable / Disable Research row++; ControlPanelelements.Add(XPUILabel($"Use Other Research Mod:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPToggle($"xp.config stats {stat} mentalityothermod", row, height, config.mentality.useotherresearchmod, valueL, width), XPerienceAdminPanelStats); } // End UI CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Dexterity Settings #region Dexterity if (stat == "dexterity") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPeriencedexterity, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{stat}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelStats); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} dexteritymaxlevel {UserInputText}", row, height, 12, $"{config.dexterity.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.dexterity.maxlvl > 0) { // Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} dexteritycost {UserInputText}", row, height, 12, $"{config.dexterity.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} dexteritycostmultiplier {UserInputText}", row, height, 12, $"{config.dexterity.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Block Chance row++; ControlPanelelements.Add(XPUILabel($"Block Chance Percent:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} dexterityblock {UserInputText}", row, height, 12, $"{config.dexterity.blockchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dexterity.blockchance * config.dexterity.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Block Amount row++; ControlPanelelements.Add(XPUILabel($"Block Amount Percent:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} dexterityblockamt {UserInputText}", row, height, 12, $"{config.dexterity.blockamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dexterity.blockamount * config.dexterity.maxlvl * 100}% / {((config.dexterity.blockamount * config.dexterity.maxlvl) + (config.xpLevelRanks.rankstatboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Dodge Chance row++; ControlPanelelements.Add(XPUILabel($"Dodge Chance Percent:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} dexteritydodge {UserInputText}", row, height, 12, $"{config.dexterity.dodgechance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dexterity.dodgechance * config.dexterity.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Armor Damage row++; ControlPanelelements.Add(XPUILabel($"Armor Damage Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} dexterityarmor {UserInputText}", row, height, 12, $"{config.dexterity.reducearmordmg}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dexterity.reducearmordmg * config.dexterity.maxlvl * 100}% / {((config.dexterity.reducearmordmg * config.dexterity.maxlvl) + (config.xpLevelRanks.rankstatboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Horse Speed row++; ControlPanelelements.Add(XPUILabel($"Horse Speed:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} horsespeed {UserInputText}", row, height, 12, $"{config.dexterity.horsespeed}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dexterity.horsespeed * config.dexterity.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Boat Speed row++; ControlPanelelements.Add(XPUILabel($"Boat Speed:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} boatspeed {UserInputText}", row, height, 12, $"{config.dexterity.boatspeed}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dexterity.boatspeed * config.dexterity.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Vehicle Speed row++; ControlPanelelements.Add(XPUILabel($"Vehicle Speed:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} vehiclespeed {UserInputText}", row, height, 12, $"{config.dexterity.vehiclespeed}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dexterity.vehiclespeed * config.dexterity.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Fuel Reduce row++; ControlPanelelements.Add(XPUILabel($"Fuel Reduction Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} fuelreduce {UserInputText}", row, height, 12, $"{config.dexterity.fuelreduce}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.dexterity.fuelreduce * config.dexterity.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); } // End UI CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Might #region Might if (stat == "might") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPeriencemight, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{stat}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelStats); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightmaxlevel {UserInputText}", row, height, 12, $"{config.might.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.might.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightcost {UserInputText}", row, height, 12, $"{config.might.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightcostmultiplier {UserInputText}", row, height, 12, $"{config.might.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Armor row++; ControlPanelelements.Add(XPUILabel($"Armor:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightarmor {UserInputText}", row, height, 12, $"{config.might.armor}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.might.armor * config.might.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Melee Dmg row++; ControlPanelelements.Add(XPUILabel($"Melee Damage Increase:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightmelee {UserInputText}", row, height, 12, $"{config.might.meleedmg}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.might.meleedmg * config.might.maxlvl * 100}% / {((config.might.meleedmg * config.might.maxlvl) + (config.xpLevelRanks.rankstatboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Metabolism row++; ControlPanelelements.Add(XPUILabel($"Metabolism (Hunger/Thirst):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightmeta {UserInputText}", row, height, 12, $"{config.might.metabolism}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.might.metabolism * config.might.maxlvl * 100}% / {((config.might.metabolism * config.might.maxlvl) + (config.xpLevelRanks.rankstatboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Bleeding row++; ControlPanelelements.Add(XPUILabel($"Bleed Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightbleed {UserInputText}", row, height, 12, $"{config.might.bleedreduction}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.might.bleedreduction * config.might.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Radiation row++; ControlPanelelements.Add(XPUILabel($"Radiation Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightrad {UserInputText}", row, height, 12, $"{config.might.radreduction}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.might.radreduction * config.might.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Heat row++; ControlPanelelements.Add(XPUILabel($"Heat Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightheat {UserInputText}", row, height, 12, $"{config.might.heattolerance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.might.heattolerance * config.might.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Cold row++; ControlPanelelements.Add(XPUILabel($"Cold Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} mightcold {UserInputText}", row, height, 12, $"{config.might.coldtolerance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.might.coldtolerance * config.might.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); } // End UI CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Weaponry #region Weaponry if (stat == "weaponry") { bool settingsopen = true; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPerienceweaponry, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{stat}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelStats); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrymaxlevel {UserInputText}", row, height, 12, $"{config.weaponry.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.weaponry.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrycost {UserInputText}", row, height, 12, $"{config.weaponry.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrycostmultiplier {UserInputText}", row, height, 12, $"{config.weaponry.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // NeverWear Plugin if (NeverWear != null) { row++; ControlPanelelements.Add(XPUILabel($"NeverWear Plugin Detected:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUILabel($"Override Tool Durability:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPToggle($"xp.config stats {stat} neverweartools", row, height, config.weaponry.neverweartools, valueL, width), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUILabel($"Override Weapon Durability:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPToggle($"xp.config stats {stat} neverwearweapons", row, height, config.weaponry.neverwearweapons, valueL, width), XPerienceAdminPanelStats); } if (NeverWear == null || (config.weaponry.neverweartools || config.weaponry.neverwearweapons)) { // Reduction Chance row++; ControlPanelelements.Add(XPUILabel($"Durability Reduction Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrychance {UserInputText}", row, height, 12, $"{config.weaponry.reductionchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.weaponry.reductionchance * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Min Damage row++; ControlPanelelements.Add(XPUILabel($"Minimum Durability Damage:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrymindamage {UserInputText}", row, height, 12, $"{config.weaponry.mindamage}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.weaponry.mindamage * config.weaponry.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); } if (NeverWear == null || config.weaponry.neverweartools) { // Tools row++; ControlPanelelements.Add(XPUILabel($"Tool Condition Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrytools {UserInputText}", row, height, 12, $"{config.weaponry.tool}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.weaponry.tool * config.weaponry.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Power Tools row++; ControlPanelelements.Add(XPUILabel($"Power Tool Condition Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrypowertools {UserInputText}", row, height, 12, $"{config.weaponry.powertools}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.weaponry.powertools * config.weaponry.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); } if (NeverWear == null || config.weaponry.neverwearweapons) { // Melee Weapons row++; ControlPanelelements.Add(XPUILabel($"Melee Weapon Condition Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrymeleeweapons {UserInputText}", row, height, 12, $"{config.weaponry.meleeweapons}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.weaponry.meleeweapons * config.weaponry.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Projectile Weapons row++; ControlPanelelements.Add(XPUILabel($"Projectile Weapon Condition Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponryprojectileweapons {UserInputText}", row, height, 12, $"{config.weaponry.projectileweapons}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.weaponry.projectileweapons * config.weaponry.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); } if (SkinBox != null) { // Enable / Disable Skinbox row++; ControlPanelelements.Add(XPUILabel($"Disable ammo for skinbox skins:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPToggle($"xp.config stats {stat} skinboxdisable", row, height, config.weaponry.skinboxdisable, valueL, width), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUILabel($"(There is a known conflict with skinbox that allows unlimited ammo per clip on weapons using skinbox skins.)", row, height, TextAnchor.MiddleLeft, 10, valuePL, "1", "1 1 1 1"), XPerienceAdminPanelStats); } // Weapon Mechanics Plugin if (WeaponMechanics != null) { row++; ControlPanelelements.Add(XPUILabel($"Weapon Mechanics Plugin Detected:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); row++; ControlPanelelements.Add(XPUILabel($"Use Weapon Mechanics:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPToggle($"xp.config stats {stat} useweaponmechanics", row, height, config.weaponry.useweaponmechanics, valueL, width), XPerienceAdminPanelStats); if (!config.weaponry.useweaponmechanics) settingsopen = false; } if (settingsopen) { if (WeaponMechanics != null && config.weaponry.useweaponmechanics) { row++; ControlPanelelements.Add(XPUILabel($"(These settings will apply after Weapon Mechanics default weapon adjustments)", row, height, TextAnchor.MiddleLeft, 10, lableL, valueR, "1 1 1 1"), XPerienceAdminPanelStats); } // Max Ammo row++; ControlPanelelements.Add(XPUILabel($"Max Ammo Increase:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrymaxammo {UserInputText}", row, height, 12, $"{config.weaponry.maxammo}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.weaponry.maxammo * config.weaponry.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Max Ammo Limit row++; ControlPanelelements.Add(XPUILabel($"Max Ammo Limit:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} weaponrymaxammolimit {UserInputText}", row, height, 12, $"{config.weaponry.maxammolimit}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"x{config.weaponry.maxammolimit * config.weaponry.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Excluded Weapons row++; ControlPanelelements.Add(XPUILabel($"Excluded Weapons (ex1,ex2,ex3):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, ".5"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} excludeweapons {UserInputText}", row, height, 12, $"{config.weaponry.excludedweapons}", valueL, ".5", TextAnchor.MiddleLeft, "1 1 1 1")); // Reload Hook row++; row++; ControlPanelelements.Add(XPUILabel($"Choose Reload Hook: (if you experience issues with max ammo ability you can select a different hook and see if it fixes your issues)", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.99", "1 1 1 1"), XPerienceAdminPanelStats); row++; string selectedhooka = string.Empty; string selectedhookb = string.Empty; if (config.weaponry.reloadhook == "OnMagazineReload") { selectedhooka = " (Selected)"; } ControlPanelelements.Add(XPUIButton($"xp.config stats {stat} weaponryreloadhook OnMagazineReload", row, height, 12, "0.0 1.0 0.0 0", $"OnMagazineReload {selectedhooka}", "0.03", "0.25", TextAnchor.MiddleLeft, "1 1 1 1"), XPerienceAdminPanelStats); row++; if (config.weaponry.reloadhook == "OnWeaponReload") { selectedhookb = " (Selected)"; } ControlPanelelements.Add(XPUIButton($"xp.config stats {stat} weaponryreloadhook OnWeaponReload", row, height, 12, "0.0 1.0 0.0 0", $"OnWeaponReload {selectedhookb}", "0.03", "0.25", TextAnchor.MiddleLeft, "1 1 1 1"), XPerienceAdminPanelStats); } } // End UI CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Ninjary #region Ninjary if (stat == "ninjary") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPerienceninjary, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{stat}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelStats); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} ninjarymaxlevel {UserInputText}", row, height, 12, $"{config.ninjary.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.ninjary.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} ninjarycost {UserInputText}", row, height, 12, $"{config.ninjary.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} ninjarycostmultiplier {UserInputText}", row, height, 12, $"{config.ninjary.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Patrol Stealth row++; ControlPanelelements.Add(XPUILabel($"Patrol Helicopter Stealth:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} patrolstealth {UserInputText}", row, height, 12, $"{config.ninjary.patrolstealth}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.ninjary.patrolstealth * config.ninjary.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // CH47 Stealth row++; ControlPanelelements.Add(XPUILabel($"CH47 Stealth:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} ch47stealth {UserInputText}", row, height, 12, $"{config.ninjary.ch47stealth}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.ninjary.ch47stealth * config.ninjary.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Bradley Stealth row++; ControlPanelelements.Add(XPUILabel($"Bradley APC Stealth:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} bradleystealth {UserInputText}", row, height, 12, $"{config.ninjary.bradleystealth}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.ninjary.bradleystealth * config.ninjary.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // NPC Stealth row++; ControlPanelelements.Add(XPUILabel($"NPC Stealth:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} npcstealth {UserInputText}", row, height, 12, $"{config.ninjary.npcstealth}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.ninjary.npcstealth * config.ninjary.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Turret Stealth row++; ControlPanelelements.Add(XPUILabel($"Turret Stealth:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} turretstealth {UserInputText}", row, height, 12, $"{config.ninjary.turretstealth}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.ninjary.turretstealth * config.ninjary.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Knife Damage row++; ControlPanelelements.Add(XPUILabel($"Knife Damage:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} knifeincrease {UserInputText}", row, height, 12, $"{config.ninjary.knifeincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.ninjary.knifeincrease * config.ninjary.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Sword Damage row++; ControlPanelelements.Add(XPUILabel($"Sword Damage:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} swordincrease {UserInputText}", row, height, 12, $"{config.ninjary.swordincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.ninjary.swordincrease * config.ninjary.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); } // End UI CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Captaincy Settings #region Captaincy if (stat == "captaincy") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelStats, XPeriencecaptaincy, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{stat}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelStats); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} captaincymaxlevel {UserInputText}", row, height, 12, $"{config.captaincy.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.captaincy.maxlvl > 0) { // Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} captaincycost {UserInputText}", row, height, 12, $"{config.captaincy.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} captaincycostmultiplier {UserInputText}", row, height, 12, $"{config.captaincy.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Allow No Team row++; ControlPanelelements.Add(XPUILabel($"Allow No Team:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPToggle($"xp.config stats {stat} allownoteam", row, height, config.captaincy.allownoteam, valueL, width), XPerienceAdminPanelStats); // Effective Distance row++; ControlPanelelements.Add(XPUILabel($"Effective Distance (feet):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} captaincydistance {UserInputText}", row, height, 12, $"{config.captaincy.captaincydistance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.captaincy.captaincydistance * config.captaincy.maxlvl} / {((config.captaincy.captaincydistance * config.captaincy.maxlvl) + ((config.xpLevelRanks.rankstatboostamount * config.xpLevelRanks.maxresetrank) * 100))}", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Skill Boost row++; ControlPanelelements.Add(XPUILabel($"Team Skill Boost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} captaincyskillboost {UserInputText}", row, height, 12, $"{config.captaincy.skillboost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.captaincy.skillboost * config.captaincy.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); // Enable XP Boost row++; ControlPanelelements.Add(XPUILabel($"Enable Team XP Boost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPToggle($"xp.config stats {stat} captaincyenablexpboost", row, height, config.captaincy.enablexpboost, valueL, width), XPerienceAdminPanelStats); // XP Boost row++; ControlPanelelements.Add(XPUILabel($"Team XP Boost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelStats); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelStats, $"xp.config stats {stat} captaincyxpboost {UserInputText}", row, height, 12, $"{config.captaincy.xpboost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.captaincy.xpboost * config.captaincy.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelStats); } // End UI CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion } private void AdminSkillsPage(BasePlayer player, string skill = "main") { var ControlPanelelements = new CuiElementContainer(); #region Layout int fontsize = 15; var menuheight = 0.07f; var height = 0.035f; double width = .006; int row = 2; string iconL = ".01"; string iconR = ".04"; string iconR2 = ".02"; string MlableL = ".05"; string MlableL2 = ".03"; string MlableR = ".50"; string lableL = ".01"; string lableR = ".20"; string valueL = ".20"; string valueR = ".25"; string valuePL = ".26"; string valuePR = ".36"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelSkills); // Main Page if(skill == "main") { ControlPanelelements.Add(XPUILabel($"Skills Settings - Click the skill below to adjust the settings for that skill.", 1, menuheight, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelSkills); // Skill List ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencewoodcutter, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills woodcutter", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills woodcutter", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("woodcutter", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencesmithy, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills smithy", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills smithy", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("smithy", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPerienceminer, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills miner", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills miner", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("miner", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencefisher, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills fisher", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills fisher", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("fisher", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPerienceforager, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills forager", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills forager", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("forager", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencehunter, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills hunter", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills hunter", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("hunter", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencecrafter, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills crafter", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills crafter", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("crafter", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPerienceframer, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills framer", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills framer", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("framer", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencemedic, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills medic", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills medic", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("medic", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencescavenger, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills scavenger", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills scavenger", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("scavenger", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPerienceelectrician, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills electrician", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills electrician", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("electrician", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencedemolitionist, row, menuheight, iconL, iconR)); ControlPanelelements.Add(XPUIButton("xp.admin skills demolitionist", row, menuheight, fontsize, "0 0 0 0", "", iconL, iconR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIButton("xp.admin skills demolitionist", row, menuheight, fontsize, "0 0 0 0", $" {XPLang("demolitionist", player.UserIDString)}", MlableL, MlableR, TextAnchor.MiddleLeft), XPerienceAdminPanelSkills); // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } // Return to main page if (skill != "main") { ControlPanelelements.Add(XPUIButton("xp.admin skills main", row, height, 11, "0 0 0 .7", "<- Back to Skill list", lableL, lableR, TextAnchor.MiddleCenter, "0 1 1 1"), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUILabel($"Set Max Level to 0 to disable: (Yellow = max level value | Blue = max rank value)", row, height, TextAnchor.MiddleLeft, 11, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelSkills); row++; } // WoodCutter Settings #region WoodCutter if (skill == "woodcutter") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencewoodcutter, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} woodcuttermaxlevel {UserInputText}", row, height, 12, $"{config.woodcutter.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.woodcutter.maxlvl > 0) { // Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} woodcuttercost {UserInputText}", row, height, 12, $"{config.woodcutter.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} woodcuttercostmultiplier {UserInputText}", row, height, 12, $"{config.woodcutter.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Gather Rate row++; ControlPanelelements.Add(XPUILabel($"Gather Rate:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} woodcuttergatherrate {UserInputText}", row, height, 12, $"{config.woodcutter.gatherrate}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.woodcutter.gatherrate * config.woodcutter.maxlvl) * 100}% / {((config.woodcutter.gatherrate * config.woodcutter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Bonus Amount row++; ControlPanelelements.Add(XPUILabel($"Bonus Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} woodcutterbonus {UserInputText}", row, height, 12, $"{config.woodcutter.bonusincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.woodcutter.bonusincrease * config.woodcutter.maxlvl) * 100}% / {((config.woodcutter.bonusincrease * config.woodcutter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Apple Chance row++; ControlPanelelements.Add(XPUILabel($"Apple Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} woodcutterapple {UserInputText}", row, height, 12, $"{config.woodcutter.applechance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.woodcutter.applechance * config.woodcutter.maxlvl) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Smithy Settings #region Smithy if (skill == "smithy") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencesmithy, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smithymaxlevel {UserInputText}", row, height, 12, $"{config.smithy.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.smithy.maxlvl > 0) { // Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smithycost {UserInputText}", row, height, 12, $"{config.smithy.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smithycostmultiplier {UserInputText}", row, height, 12, $"{config.smithy.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Production Rate row++; ControlPanelelements.Add(XPUILabel($"Production Rate:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smithyprate {UserInputText}", row, height, 12, $"{config.smithy.productionrate}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.smithy.productionrate * config.smithy.maxlvl) * 100}% / {((config.smithy.productionrate * config.smithy.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Production Speed row++; ControlPanelelements.Add(XPUILabel($"Production Speed:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smithypspeed {UserInputText}", row, height, 12, $"{config.smithy.productionspeed}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.smithy.productionspeed * config.smithy.maxlvl) * 100}% / {((config.smithy.productionspeed * config.smithy.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Fuel Consumption row++; ControlPanelelements.Add(XPUILabel($"Fuel Consumption:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smithyfuel {UserInputText}", row, height, 12, $"{config.smithy.fuelconsumption}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.smithy.fuelconsumption * config.smithy.maxlvl) * 100}% / {((config.smithy.fuelconsumption * config.smithy.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Metal Chance row++; ControlPanelelements.Add(XPUILabel($"High Quality Metal Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smithymetalchance {UserInputText}", row, height, 12, $"{config.smithy.metalchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.smithy.metalchance * config.smithy.maxlvl) * 100}% / {((config.smithy.metalchance * config.smithy.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Metal Amount row++; ControlPanelelements.Add(XPUILabel($"High Quality Metal Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smithymetalamount {UserInputText}", row, height, 12, $"{config.smithy.metalamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.smithy.metalamount * config.smithy.maxlvl} / {(config.smithy.metalamount * config.smithy.maxlvl) + ((config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank) * 100)}", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Miner Settings #region Miner if (skill == "miner") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPerienceminer, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minermaxlevel {UserInputText}", row, height, 12, $"{config.miner.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.miner.maxlvl > 0) { // Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minercost {UserInputText}", row, height, 12, $"{config.miner.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minercostmultiplier {UserInputText}", row, height, 12, $"{config.miner.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Gather Rate row++; ControlPanelelements.Add(XPUILabel($"Gather Rate:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minergatherrate {UserInputText}", row, height, 12, $"{config.miner.gatherrate}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.miner.gatherrate * config.miner.maxlvl) * 100}% / {((config.miner.gatherrate * config.miner.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Bonus Amount row++; ControlPanelelements.Add(XPUILabel($"Bonus Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minerbonus {UserInputText}", row, height, 12, $"{config.miner.bonusincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.miner.bonusincrease * config.miner.maxlvl) * 100}% / {((config.miner.bonusincrease * config.miner.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Fuel Consumption row++; ControlPanelelements.Add(XPUILabel($"Fuel Consumption:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minerfuel {UserInputText}", row, height, 12, $"{config.miner.fuelconsumption}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.miner.fuelconsumption * config.miner.maxlvl) * 100}% / {((config.miner.fuelconsumption * config.miner.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Metal Chance row++; ControlPanelelements.Add(XPUILabel($"Metal Fragment Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minermetalchance {UserInputText}", row, height, 12, $"{config.miner.metalchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.miner.metalchance * config.miner.maxlvl) * 100}% / {((config.miner.metalchance * config.miner.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Metal Amount row++; ControlPanelelements.Add(XPUILabel($"Metal Fragment Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minermetalamount {UserInputText}", row, height, 12, $"{config.miner.metalamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.miner.metalamount * config.miner.maxlvl} / {(config.miner.metalamount * config.miner.maxlvl) + ((config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank) * 100)}", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Fisher Settings #region Fisher if (skill == "fisher") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencefisher, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} fishermaxlevel {UserInputText}", row, height, 12, $"{config.fisher.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.woodcutter.maxlvl > 0) { // Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} fishercost {UserInputText}", row, height, 12, $"{config.fisher.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} fishercostmultiplier {UserInputText}", row, height, 12, $"{config.fisher.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Fish Amount row++; ControlPanelelements.Add(XPUILabel($"Fish Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} fisheramount {UserInputText}", row, height, 12, $"{config.fisher.fishamountincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.fisher.fishamountincrease * config.fisher.maxlvl) * 100}% / {((config.fisher.fishamountincrease * config.fisher.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Item Amount row++; ControlPanelelements.Add(XPUILabel($"Item Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} fisheritem {UserInputText}", row, height, 12, $"{config.fisher.itemamountincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.fisher.itemamountincrease * config.fisher.maxlvl) * 100}% / {((config.fisher.itemamountincrease * config.fisher.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Oxygen Amount row++; ControlPanelelements.Add(XPUILabel($"Oxygen Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} fisheroxygen {UserInputText}", row, height, 12, $"{config.fisher.oxygenreduction}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.fisher.oxygenreduction * config.fisher.maxlvl) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Oxygen Tank Amount row++; ControlPanelelements.Add(XPUILabel($"Oxygen Tank Reduction:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} fisheroxygentank {UserInputText}", row, height, 12, $"{config.fisher.oxygentankreduction}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.fisher.oxygentankreduction * config.fisher.maxlvl) * 100}% / {((config.fisher.oxygentankreduction * config.fisher.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Forager #region Forager if (skill == "forager") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPerienceforager, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} foragermaxlevel {UserInputText}", row, height, 12, $"{config.forager.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.forager.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} foragercost {UserInputText}", row, height, 12, $"{config.forager.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} foragercostmultiplier {UserInputText}", row, height, 12, $"{config.forager.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Gather Rate row++; ControlPanelelements.Add(XPUILabel($"Gather Rate:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} foragergatherrate {UserInputText}", row, height, 12, $"{config.forager.gatherrate}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.forager.gatherrate * config.forager.maxlvl * 100}% / {((config.forager.gatherrate * config.forager.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Seed Chance row++; ControlPanelelements.Add(XPUILabel($"Increase Seed Chance/Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} foragerseed {UserInputText}", row, height, 12, $"{config.forager.chanceincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.forager.chanceincrease * config.forager.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Worm / Grub Chance row++; ControlPanelelements.Add(XPUILabel($"Increase Grub/Worm Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} grubwormincrease {UserInputText}", row, height, 12, $"{config.forager.grubwormincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.forager.grubwormincrease * config.forager.maxlvl * 100}% / {((config.forager.grubwormincrease * config.forager.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Item Chance row++; ControlPanelelements.Add(XPUILabel($"Random Item Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} foragerrandom {UserInputText}", row, height, 12, $"{config.forager.randomchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.forager.randomchance * config.forager.maxlvl * 100}% / {((config.forager.randomchance * config.forager.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Item List row++; row++; ControlPanelelements.Add(XPUIButton($"xp.skillitems forager", row, height, 12, "0 1 0 .25", "Add/Edit Random Items", ".01", ".15", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Hunter #region Hunter if (skill == "hunter") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencehunter, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} huntermaxlevel {UserInputText}", row, height, 12, $"{config.hunter.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.hunter.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} huntercost {UserInputText}", row, height, 12, $"{config.hunter.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} huntercostmultiplier {UserInputText}", row, height, 12, $"{config.hunter.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Gather Rate row++; ControlPanelelements.Add(XPUILabel($"Gather Rate:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} huntergatherrate {UserInputText}", row, height, 12, $"{config.hunter.gatherrate}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.hunter.gatherrate * config.hunter.maxlvl * 100}% / {((config.hunter.gatherrate * config.hunter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Bonus Amount row++; ControlPanelelements.Add(XPUILabel($"Bonus Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} hunterbonus {UserInputText}", row, height, 12, $"{config.hunter.bonusincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.hunter.bonusincrease * config.hunter.maxlvl * 100}% / {((config.hunter.bonusincrease * config.hunter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Damage Increase Wildlife row++; ControlPanelelements.Add(XPUILabel($"Damage Increase (Wildlife):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} hunterdamage {UserInputText}", row, height, 12, $"{config.hunter.damageincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.hunter.damageincrease * config.hunter.maxlvl * 100}% / {((config.hunter.damageincrease * config.hunter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Exclude Weapons row++; ControlPanelelements.Add(XPUILabel($"Exclude Long Range Weapons:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} exhunterlongrange", row, height, config.hunter.excludelongrangeweapons, valueL, width), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUILabel($"Exclude Medium Range Weapons:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} exhuntermedrange", row, height, config.hunter.excludemedrangeweapons, valueL, width), XPerienceAdminPanelSkills); // Damage Increase Night row++; ControlPanelelements.Add(XPUILabel($"Night Damage Increase (Wildlife):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} hunterndamage {UserInputText}", row, height, 12, $"{config.hunter.nightdmgincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.hunter.nightdmgincrease * config.hunter.maxlvl * 100}% / {((config.hunter.nightdmgincrease * config.hunter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Damage Increase Bows row++; ControlPanelelements.Add(XPUILabel($"Bow Damage Increase:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} bowdmgincrease {UserInputText}", row, height, 12, $"{config.hunter.bowdmgincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.hunter.bowdmgincrease * config.hunter.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Crafter #region Crafter if (skill == "crafter") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencecrafter, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} craftermaxlevel {UserInputText}", row, height, 12, $"{config.crafter.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.crafter.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} craftercost {UserInputText}", row, height, 12, $"{config.crafter.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} craftercostmultiplier {UserInputText}", row, height, 12, $"{config.crafter.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Craft Speed row++; ControlPanelelements.Add(XPUILabel($"Crafting Speed: (+)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} crafterspeed {UserInputText}", row, height, 12, $"{config.crafter.craftspeed}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.crafter.craftspeed * config.crafter.maxlvl * 100}% / {((config.crafter.craftspeed * config.crafter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Craft Cost row++; ControlPanelelements.Add(XPUILabel($"Crafting Cost: (-)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} craftercosts {UserInputText}", row, height, 12, $"{config.crafter.craftcost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.crafter.craftcost * config.crafter.maxlvl * 100}% / {((config.crafter.craftcost * config.crafter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Repair Increase row++; ControlPanelelements.Add(XPUILabel($"Repair Increase:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} crafterrepair {UserInputText}", row, height, 12, $"{config.crafter.repairincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.crafter.repairincrease * config.crafter.maxlvl * 100}% / {((config.crafter.repairincrease * config.crafter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Repair Cost row++; ControlPanelelements.Add(XPUILabel($"Repair Cost: (-)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} crafterrepaircost {UserInputText}", row, height, 12, $"{config.crafter.repaircost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.crafter.repaircost * config.crafter.maxlvl * 100}% / {((config.crafter.repaircost * config.crafter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Condition Chance row++; ControlPanelelements.Add(XPUILabel($"Condition Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} craftercondtition {UserInputText}", row, height, 12, $"{config.crafter.conditionchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.crafter.conditionchance * config.crafter.maxlvl * 100}% / {((config.crafter.conditionchance * config.crafter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Condition Amount row++; ControlPanelelements.Add(XPUILabel($"Condition Amount: (+)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} craftercondtitionamt {UserInputText}", row, height, 12, $"{config.crafter.conditionamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.crafter.conditionamount * config.crafter.maxlvl * 100}% / {((config.crafter.conditionamount * config.crafter.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Framer Settings #region Framer if (skill == "framer") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPerienceframer, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} framermaxlevel {UserInputText}", row, height, 12, $"{config.framer.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.framer.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} framercost {UserInputText}", row, height, 12, $"{config.framer.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} framercostmultiplier {UserInputText}", row, height, 12, $"{config.framer.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Upgrade Cost row++; ControlPanelelements.Add(XPUILabel($"Upgrade Cost: (-)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} framerupgrade {UserInputText}", row, height, 12, $"{config.framer.upgradecost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.framer.upgradecost * config.framer.maxlvl * 100}% / {((config.framer.upgradecost * config.framer.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Repair Cost row++; ControlPanelelements.Add(XPUILabel($"Repair Cost: (-)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} framerrepair {UserInputText}", row, height, 12, $"{config.framer.repaircost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.framer.repaircost * config.framer.maxlvl * 100}% / {((config.framer.repaircost * config.framer.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Repair Time row++; ControlPanelelements.Add(XPUILabel($"Repair Time: (-)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} framertime {UserInputText}", row, height, 12, $"{config.framer.repairtime}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.framer.repairtime * config.framer.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Base Costs //row++; //row++; //row++; //ControlPanelelements.Add(XPUILabel($"Base Cost (wood)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); //ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); //ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} woodcost {UserInputText}", row, height, 12, $"{config.framer.woodcost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); //row++; //ControlPanelelements.Add(XPUILabel($"Base Cost (stone)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); //ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); //ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} stonecost {UserInputText}", row, height, 12, $"{config.framer.stonecost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); //row++; //ControlPanelelements.Add(XPUILabel($"Base Cost (metal)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); //ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); //ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} metalcost {UserInputText}", row, height, 12, $"{config.framer.metalcost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); //row++; //ControlPanelelements.Add(XPUILabel($"Base Cost (armored)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); //ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); //ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} armorcost {UserInputText}", row, height, 12, $"{config.framer.armorcost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Medic Settings #region Medic if (skill == "medic") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencemedic, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} medicmaxlevel {UserInputText}", row, height, 12, $"{config.medic.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.medic.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} mediccost {UserInputText}", row, height, 12, $"{config.medic.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} mediccostmultiplier {UserInputText}", row, height, 12, $"{config.medic.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Revive HP row++; ControlPanelelements.Add(XPUILabel($"Revival Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} medicrevival {UserInputText}", row, height, 12, $"{config.medic.revivehp}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.medic.revivehp * config.medic.maxlvl} / {(config.medic.revivehp * config.medic.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)}", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Recover HP row++; ControlPanelelements.Add(XPUILabel($"Recover Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} medicrecover {UserInputText}", row, height, 12, $"{config.medic.recoverhp}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.medic.recoverhp * config.medic.maxlvl} / {(config.medic.recoverhp * config.medic.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)}", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Medic Tools row++; ControlPanelelements.Add(XPUILabel($"Medical Tools:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} medictools {UserInputText}", row, height, 12, $"{config.medic.tools}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.medic.tools * config.medic.maxlvl} / {(config.medic.tools * config.medic.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)}", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Medic Teas row++; ControlPanelelements.Add(XPUILabel($"Medical Teas:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} medicteas {UserInputText}", row, height, 12, $"{config.medic.teas}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.medic.teas * config.medic.maxlvl) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Mixing Speed row++; ControlPanelelements.Add(XPUILabel($"Mixing Table Speed:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} mediccraft {UserInputText}", row, height, 12, $"{config.medic.crafttime}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.medic.crafttime * config.medic.maxlvl) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUILabel($"Prevent Bandage Boost:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} preventbandageboost", row, height, config.medic.preventbandageboost, valueL, width), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Scavenger Settings #region Scavenger if (skill == "scavenger") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencescavenger, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} scavmaxlevel {UserInputText}", row, height, 12, $"{config.scavenger.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.scavenger.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} scavccost {UserInputText}", row, height, 12, $"{config.scavenger.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} scavcostmultiplier {UserInputText}", row, height, 12, $"{config.scavenger.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Default Multiplier Chance row++; ControlPanelelements.Add(XPUILabel($"Extra Loot Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} scavlootchance {UserInputText}", row, height, 12, $"{config.scavenger.scavlootchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.scavenger.scavlootchance * config.scavenger.maxlvl) * 100}% / {((config.scavenger.scavlootchance * config.scavenger.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Default Multiplier row++; ControlPanelelements.Add(XPUILabel($"Extra Loot Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} scavmultiplier {UserInputText}", row, height, 12, $"{config.scavenger.scavmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.scavenger.scavmultiplier * config.scavenger.maxlvl}x / {(config.scavenger.scavlootchance * config.scavenger.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)}x", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Drops row++; ControlPanelelements.Add(XPUILabel($"Increase Loot Drops:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} scavbarrel", row, height, config.scavenger.drops, valueL, width), XPerienceAdminPanelSkills); // Loot Crates row++; ControlPanelelements.Add(XPUILabel($"Increase Loot Crates:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} scavcrate", row, height, config.scavenger.crates, valueL, width), XPerienceAdminPanelSkills); // UnLoot Crates row++; ControlPanelelements.Add(XPUILabel($"Increase Water Loot Crates:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} scavuncrate", row, height, config.scavenger.uncrates, valueL, width), XPerienceAdminPanelSkills); // Locked Crates row++; ControlPanelelements.Add(XPUILabel($"Increase Locked Crates:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} scavlockedcrate", row, height, config.scavenger.lockedcrates, valueL, width), XPerienceAdminPanelSkills); // Hack Crates row++; ControlPanelelements.Add(XPUILabel($"Increase Hackable Crates:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} scavhackcrate", row, height, config.scavenger.hackcrates, valueL, width), XPerienceAdminPanelSkills); // Scientists row++; ControlPanelelements.Add(XPUILabel($"Increase Scientists Loot:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} scientists", row, height, config.scavenger.scientists, valueL, width), XPerienceAdminPanelSkills); // Components Only row++; ControlPanelelements.Add(XPUILabel($"Increase Components Only:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} scavcomponly", row, height, config.scavenger.componentsonly, valueL, width), XPerienceAdminPanelSkills); // Custom List Enable row++; ControlPanelelements.Add(XPUILabel($"Use Custom Item List:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} usecustomscavlist", row, height, config.scavenger.usecustomscavlist, valueL, width), XPerienceAdminPanelSkills); // Custom Item Chance row++; ControlPanelelements.Add(XPUILabel($"Custom Item Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} scavchance {UserInputText}", row, height, 12, $"{config.scavenger.scavchance}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{(config.scavenger.scavchance * config.scavenger.maxlvl) * 100}% / {((config.scavenger.scavchance * config.scavenger.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)) * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Custom Multiplier row++; ControlPanelelements.Add(XPUILabel($"Custom Item Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} customscavmultiplier {UserInputText}", row, height, 12, $"{config.scavenger.customscavmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.scavenger.customscavmultiplier * config.scavenger.maxlvl}x / {(config.scavenger.scavlootchance * config.scavenger.maxlvl) + (config.xpLevelRanks.rankskillboostamount * config.xpLevelRanks.maxresetrank)}x", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Custom Random row++; ControlPanelelements.Add(XPUILabel($"Custom Item Random Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} customscavrandom", row, height, config.scavenger.customscavrandom, valueL, width), XPerienceAdminPanelSkills); // Item List row++; row++; ControlPanelelements.Add(XPUIButton($"xp.skillitems scavenger", row, height, 12, "0 1 0 .25", "Add/Edit Custom Items", ".01", ".15", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Electrician Settings #region Electrician if (skill == "electrician") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPerienceelectrician, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; ControlPanelelements.Add(XPUIButton($"xp.admin openelectriciansettings", row, height, 12, "1.0 0.0 0.0 0.7", $"〘Edit Default Power Output Settings〙", "0.01", "0.20", TextAnchor.MiddleCenter), XPerienceAdminPanelSkills); row++; row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} electricianmaxlevel {UserInputText}", row, height, 12, $"{config.electrician.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.electrician.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} electriciancost {UserInputText}", row, height, 12, $"{config.electrician.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} electriciancostmultiplier {UserInputText}", row, height, 12, $"{config.electrician.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Solar Panel Input Increase row++; ControlPanelelements.Add(XPUILabel($"Solar Panel Input:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} solarpanelinputincrease {UserInputText}", row, height, 12, $"{config.electrician.solarpanelinputincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.solarpanelinputincrease * config.electrician.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Solar Panel Max Increase row++; ControlPanelelements.Add(XPUILabel($"Solar Panel MaxOutput:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} solarpanelmaxincrease {UserInputText}", row, height, 12, $"{config.electrician.solarpanelmaxincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.solarpanelmaxincrease * config.electrician.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Small Battery MaxOutput row++; ControlPanelelements.Add(XPUILabel($"Small Battery MaxOutput:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smallbatterymaxincrease {UserInputText}", row, height, 12, $"{config.electrician.smallbatterymaxincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.smallbatterymaxincrease * config.electrician.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Medium Battery MaxOutput row++; ControlPanelelements.Add(XPUILabel($"Medium Battery MaxOutput:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} mediumbatterymaxincrease {UserInputText}", row, height, 12, $"{config.electrician.mediumbatterymaxincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.mediumbatterymaxincrease * config.electrician.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Large Battery MaxOutput row++; ControlPanelelements.Add(XPUILabel($"Large Battery MaxOutput:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} largebatterymaxincrease {UserInputText}", row, height, 12, $"{config.electrician.largebatterymaxincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.largebatterymaxincrease * config.electrician.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Small Generator MaxOutput row++; ControlPanelelements.Add(XPUILabel($"Small Generator MaxOutput:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} smallgeneratormaxincrease {UserInputText}", row, height, 12, $"{config.electrician.smallgeneratormaxincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.smallgeneratormaxincrease * config.electrician.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Test Generator MaxOutput row++; ControlPanelelements.Add(XPUILabel($"Test Generator MaxOutput:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} testgeneratormaxincrease {UserInputText}", row, height, 12, $"{config.electrician.testgeneratormaxincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.testgeneratormaxincrease * config.electrician.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Electric Windmill MaxOutput row++; ControlPanelelements.Add(XPUILabel($"Electric Windmill MaxOutput:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} electricwindmillmaxincrease {UserInputText}", row, height, 12, $"{config.electrician.electricwindmillmaxincrease}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.electricwindmillmaxincrease * config.electrician.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Allow Min Solar Input row++; ControlPanelelements.Add(XPUILabel($"Allow Min Solar Input:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPToggle($"xp.config skills {skill} allowminsolarinput", row, height, config.electrician.allowminsolarinput, valueL, width), XPerienceAdminPanelSkills); // Minimum Solar Input row++; ControlPanelelements.Add(XPUILabel($"Min Solar Input:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} minsolarinput {UserInputText}", row, height, 12, $"{config.electrician.minsolarinput}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.electrician.minsolarinput * config.electrician.maxlvl}", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion // Demolitionist #region Demolitionist if (skill == "demolitionist") { ControlPanelelements.Add(XPUIImage(XPerienceAdminPanelSkills, XPeriencedemolitionist, row, height, iconL, iconR2)); ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} {XPLang($"settings", player.UserIDString)}:", row, height, TextAnchor.MiddleLeft, 14, MlableL2, MlableR, "1 1 1 1"), XPerienceAdminPanelSkills); row++; // Max Level ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} demolitionistmaxlevel {UserInputText}", row, height, 12, $"{config.demolitionist.maxlvl}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (config.demolitionist.maxlvl > 0) { // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} demolitionistcost {UserInputText}", row, height, 12, $"{config.demolitionist.pointcoststart}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} demolitionistcostmultiplier {UserInputText}", row, height, 12, $"{config.demolitionist.costmultiplier}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Explosive Dud Chance row++; ControlPanelelements.Add(XPUILabel($"Explosive Dud Chance:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} explosivedudreduction {UserInputText}", row, height, 12, $"{config.demolitionist.explosivedudreduction}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.demolitionist.explosivedudreduction * config.demolitionist.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Explosive Damage row++; ControlPanelelements.Add(XPUILabel($"Explosive Damage:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} explosivedamage {UserInputText}", row, height, 12, $"{config.demolitionist.explosivedamage}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.demolitionist.explosivedamage * config.demolitionist.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); // Explosive Radius row++; ControlPanelelements.Add(XPUILabel($"Explosive Radius:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkills); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkills, $"xp.config skills {skill} explosiveradius {UserInputText}", row, height, 12, $"{config.demolitionist.explosiveradius}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.demolitionist.explosiveradius * config.demolitionist.maxlvl * 100}%", row, height, TextAnchor.MiddleLeft, 10, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelSkills); } // UI End CuiHelper.AddUi(player, ControlPanelelements); return; } #endregion } private void AdminSkillItems(BasePlayer player, string page, string skill, int item = 0) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.035f; int row = 2; string delL = ".01"; string delR = ".02"; string lableL = "0.01"; string lableL2 = "0.03"; string lableR = "0.15"; string valueL = "0.15"; string valueR = "0.45"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelSkillItems); switch(page) { case "forager": #region Forager ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} Random Item List:", row, height, TextAnchor.MiddleLeft, 14, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelSkillItems); row++; ControlPanelelements.Add(XPUIButton($"xp.skillitems newitem {skill}", row, height, 12, "0 1 0 .25", "Create New Item", "0.02", "0.12", TextAnchor.MiddleCenter, "0 1 0 1"), XPerienceAdminPanelSkillItems); row++; row++; foreach (var fitems in config.forager.randomChanceList) { ControlPanelelements.Add(XPUIButton($"xp.skillitems deleteitem {skill} {fitems.Key}", row, height, 12, "0 0 0 .25", $"ⓧ", delL, delR, TextAnchor.MiddleLeft, "1 0 0 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIButton($"xp.skillitems edititem {skill} {fitems.Key} item value", row, height, 12, "0 0 0 .25", $"{fitems.Value.shortname}", lableL2, lableR, TextAnchor.MiddleLeft, "1 1 1 1"), XPerienceAdminPanelSkillItems); row++; } row++; ControlPanelelements.Add(XPUIButton($"xp.admin skills forager", row, height, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelSkillItems); #endregion break; case "scavenger": #region Scavenger ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} Random Item List:", row, height, TextAnchor.MiddleLeft, 14, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelSkillItems); row++; ControlPanelelements.Add(XPUIButton($"xp.skillitems newitem {skill} ", row, height, 12, "0 1 0 .25", "Create New Item", "0.02", "0.12", TextAnchor.MiddleCenter, "0 1 0 1"), XPerienceAdminPanelSkillItems); row++; row++; foreach (var sitems in config.scavenger.scavChanceList) { ControlPanelelements.Add(XPUIButton($"xp.skillitems deleteitem {skill} {sitems.Key}", row, height, 12, "0 0 0 .25", $"ⓧ", delL, delR, TextAnchor.MiddleLeft, "1 0 0 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIButton($"xp.skillitems edititem {skill} {sitems.Key} item value", row, height, 12, "0 0 0 .25", $"{sitems.Value.shortname}", lableL2, lableR, TextAnchor.MiddleLeft, "1 1 1 1"), XPerienceAdminPanelSkillItems); row++; } row++; ControlPanelelements.Add(XPUIButton($"xp.admin skills scavenger", row, height, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelSkillItems); #endregion break; case "edititem": switch(skill) { case "forager": #region Forager var fitem = config.forager.randomChanceList[item]; ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} Random Item List:", row, height, TextAnchor.MiddleLeft, 14, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelSkillItems); row++; row++; ControlPanelelements.Add(XPUILabel($"ShortName:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} shortname {UserInputText}", row, height, 12, $"{fitem.shortname}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Display Name:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} displayname {UserInputText}", row, height, 12, $"{fitem.displayname}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"SkinID:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} skinid {UserInputText}", row, height, 12, $"{fitem.SkinID}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} amount {UserInputText}", row, height, 12, $"{fitem.amount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; row++; ControlPanelelements.Add(XPUIButton($"xp.skillitems forager", row, height, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelSkillItems); #endregion break; case "scavenger": #region Scavenger var sitem = config.scavenger.scavChanceList[item]; ControlPanelelements.Add(XPUILabel($"{XPLang($"{skill}", player.UserIDString)} Random Item List:", row, height, TextAnchor.MiddleLeft, 14, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelSkillItems); row++; row++; ControlPanelelements.Add(XPUILabel($"ShortName:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} shortname {UserInputText}", row, height, 12, $"{sitem.shortname}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Display Name:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} displayname {UserInputText}", row, height, 12, $"{sitem.displayname}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"SkinID:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} skinid {UserInputText}", row, height, 12, $"{sitem.SkinID}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} amount {UserInputText}", row, height, 12, $"{sitem.amount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Max Amount:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} maxamount {UserInputText}", row, height, 12, $"{sitem.maxamount}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Required Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSkillItems); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSkillItems, $"xp.skillitems edititem {skill} {item} requiredlevel {UserInputText}", row, height, 12, $"{sitem.requiredlevel}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; row++; ControlPanelelements.Add(XPUIButton($"xp.skillitems scavenger", row, height, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelSkillItems); #endregion break; } break; } // UI End CuiHelper.AddUi(player, ControlPanelelements); } private void AdminSpecialGroups(BasePlayer player, string page = "main", int groupid = 0) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.035f; int row = 2; string delL = ".01"; string delR = ".02"; string lableL = "0.01"; string lableL2 = "0.03"; string lableR = "0.15"; string valueL = "0.15"; string valueR = "0.45"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUILabel($"Special Groups:", row, height, TextAnchor.MiddleLeft, 14, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelSpecialGroups); row++; ControlPanelelements.Add(XPUILabel($" * Players assigned to these groups will have added bonuses listed within the group.", row, height, TextAnchor.MiddleLeft, 10, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelSpecialGroups); row++; ControlPanelelements.Add(XPUILabel($" * If player is listed in multiple groups, highest priority group will be used.", row, height, TextAnchor.MiddleLeft, 10, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelSpecialGroups); row++; ControlPanelelements.Add(XPUILabel($" * After you create/edit a group make sure you save and reload plugin for group to be created within oxide!", row, height, TextAnchor.MiddleLeft, 10, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelSpecialGroups); switch(page) { case "main": row++; row++; ControlPanelelements.Add(XPUIButton($"xp.specialgroups newgroup", row, height, 12, "0 1 0 .25", "Create New Group", "0.02", "0.12", TextAnchor.MiddleCenter, "0 1 0 1"), XPerienceAdminPanelSpecialGroups); row++; row++; foreach (var groups in config.specialGroups.specialgroups) { ControlPanelelements.Add(XPUIButton($"xp.specialgroups deletegroup {groups.Key}", row, height, 12, "0 0 0 .25", $"ⓧ", delL, delR, TextAnchor.MiddleLeft, "1 0 0 1"), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIButton($"xp.specialgroups editgroup {groups.Key} group 0", row, height, 12, "0 0 0 .25", $"{groups.Value.groupname}", lableL2, lableR, TextAnchor.MiddleLeft, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); row++; } break; case "editgroup": var group = config.specialGroups.specialgroups[groupid]; row++; row++; ControlPanelelements.Add(XPUILabel($"Group Name:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSpecialGroups, $"xp.specialgroups editgroup {groupid} groupname {UserInputText}", row, height, 12, $"{group.groupname}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Group Permission Name:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSpecialGroups, $"xp.specialgroups editgroup {groupid} permissionname {UserInputText}", row, height, 12, $"{group.permissionname}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Priority:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSpecialGroups, $"xp.specialgroups editgroup {groupid} grouppriority {UserInputText}", row, height, 12, $"{group.grouppriority}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"XP Boost: (%)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSpecialGroups, $"xp.specialgroups editgroup {groupid} xpboost {UserInputText}", row, height, 12, $"{group.xpboost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{group.xpboost * 100}%", row, height, TextAnchor.MiddleLeft, 12, ".46", ".56", "1 1 1 1"), XPerienceAdminPanelSpecialGroups); row++; ControlPanelelements.Add(XPUILabel($"Daily XP Limit: (+)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSpecialGroups, $"xp.specialgroups editgroup {groupid} dailyxplimit {UserInputText}", row, height, 12, $"{group.dailyxplimit}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Daily Stat Reset Limit: (+)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSpecialGroups, $"xp.specialgroups editgroup {groupid} dailystatlimitboost {UserInputText}", row, height, 12, $"{group.dailystatlimitboost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Daily Skill Reset Limit: (+)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSpecialGroups); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSpecialGroups, $"xp.specialgroups editgroup {groupid} dailyskilllimitboost {UserInputText}", row, height, 12, $"{group.dailyskilllimitboost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; row++; ControlPanelelements.Add(XPUIButton($"xp.admin specialgroups", row, height, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelSpecialGroups); break; } // UI End CuiHelper.AddUi(player, ControlPanelelements); } private void AdminPlayerInfoPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.028f; double width = .006; int row = 3; int row2 = 3; string lableL = "0.01"; string lableR = "0.20"; string valueL = "0.20"; string valueR = "0.25"; string valuePL = "0.26"; string valuePR = "0.30"; string lableL2 = "0.51"; string lableR2 = "0.70"; string valueL2 = "0.71"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUILabel($"[Player Profile Menu]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.50", "1 1 1 1"), XPerienceAdminPanelInfoBox); row++; ControlPanelelements.Add(XPUILabel($"Profile UI AnchorMax:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata AnchorMax {UserInputText}", row, height, 12, $"{config.playerprofilesettings.AnchorMax}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Profile UI AnchorMin:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata AnchorMin {UserInputText}", row, height, 12, $"{config.playerprofilesettings.AnchorMin}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Profile UI OffsetMax:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata OffsetMax {UserInputText}", row, height, 12, $"{config.playerprofilesettings.OffsetMax}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Profile UI OffsetMin:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata OffsetMin {UserInputText}", row, height, 12, $"{config.playerprofilesettings.OffsetMin}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Menu Height:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata menuheight {UserInputText}", row, height, 12, $"{config.playerprofilesettings.menuheight}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.playerprofilesettings.menuheight * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelInfoBox); //row++; //ControlPanelelements.Add(XPUILabel($"Menu Height:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); //ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); //ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata menuheight {UserInputText}", row, height, 12, $"{config.playerprofilesettings.menuheight}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); //ControlPanelelements.Add(XPUILabel($"{config.playerprofilesettings.menuheight * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelInfoBox); row++; ControlPanelelements.Add(XPUILabel($"Menu Width:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata menuwidth {UserInputText}", row, height, 12, $"{config.playerprofilesettings.menuwidth}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.playerprofilesettings.menuwidth * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelInfoBox); row++; ControlPanelelements.Add(XPUILabel($"Menu Button Height:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata menubuttonheight {UserInputText}", row, height, 12, $"{config.playerprofilesettings.menubuttonheight}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); ControlPanelelements.Add(XPUILabel($"{config.playerprofilesettings.menubuttonheight * 100}%", row, height, TextAnchor.MiddleLeft, 12, valuePL, valuePR, "1 1 1 1"), XPerienceAdminPanelInfoBox); row++; ControlPanelelements.Add(XPUILabel($"Menu Button Font:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata menubuttonfont {UserInputText}", row, height, 12, $"{config.playerprofilesettings.menubuttonfont}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Player Avatar row++; ControlPanelelements.Add(XPUILabel($"Use Player Avatar:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata useplayeravatar", row, height, config.playerprofilesettings.useplayeravatar, valueL, width), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUILabel("<- ImageLibrary Config: (Avatars - Store player avatars = true)", row, height, TextAnchor.MiddleCenter, 8, valuePR, lableL2, "1 1 1 1"), XPerienceAdminPanelInfoBox); // Show Settings Button row++; ControlPanelelements.Add(XPUILabel($"Show Settings Button:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata profilemenusettings", row, height, config.playerprofilesettings.profilemenusettings, valueL, width), XPerienceAdminPanelInfoBox); // Show Top Players Button row++; ControlPanelelements.Add(XPUILabel($"Show Top Players Button:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata profilemenutopplayers", row, height, config.playerprofilesettings.profilemenutopplayers, valueL, width), XPerienceAdminPanelInfoBox); // Show Help Button row++; ControlPanelelements.Add(XPUILabel($"Show Help Button:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata profilemenuhelp", row, height, config.playerprofilesettings.profilemenuhelp, valueL, width), XPerienceAdminPanelInfoBox); // Show Calculations Button row++; ControlPanelelements.Add(XPUILabel($"Show Calculations Button:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata profilemenucalculations", row, height, config.playerprofilesettings.profilemenucalculations, valueL, width), XPerienceAdminPanelInfoBox); // Show Raids Button if (RaidableBases != null) { row++; ControlPanelelements.Add(XPUILabel($"Show Raids Button:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata profilemenuraids", row, height, config.playerprofilesettings.profilemenuraids, valueL, width), XPerienceAdminPanelInfoBox); } // Show Welcome Button if (XPerienceAddon != null) { row++; ControlPanelelements.Add(XPUILabel($"Show Welcome Panel Button:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata profilemenuwelcome", row, height, config.playerprofilesettings.profilemenuwelcome, valueL, width), XPerienceAdminPanelInfoBox); } row++; row++; ControlPanelelements.Add(XPUILabel($"[Stats / Skill Pages]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.50", "1 1 1 1"), XPerienceAdminPanelInfoBox); // Show Unused Effects row++; ControlPanelelements.Add(XPUILabel($"Show Unused Effects in UI:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata showunusedeffects", row, height, config.playerprofilesettings.showunusedeffects, valueL, width), XPerienceAdminPanelInfoBox); // Menu Style row++; string menulabel = ""; switch(config.playerprofilesettings.menutype) { case 1: menulabel = "All Icons"; break; case 2: menulabel = "Prev/Next Icons"; break; } ControlPanelelements.Add(XPUILabel($"Stat / Skill Menu Type:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUILabel($"{menulabel}", row, height, TextAnchor.MiddleLeft, 12, valueL, valuePR, "1 1 1 1"), XPerienceAdminPanelInfoBox); if (config.playerprofilesettings.menutype == 1) { ControlPanelelements.Add(XPUIButton($"xp.config playerdata menutype 2 false", row, height, 12, "0 1 0 0", "◎", ".30", ".31", TextAnchor.MiddleCenter, "0 1 0 1"), XPerienceAdminPanelInfoBox); } if (config.playerprofilesettings.menutype == 2) { ControlPanelelements.Add(XPUIButton($"xp.config playerdata menutype 1 false", row, height, 12, "1 0 0 0", "◉", ".30", ".31", TextAnchor.MiddleCenter, "1 0 0 1"), XPerienceAdminPanelInfoBox); } // Show Help Button row++; ControlPanelelements.Add(XPUILabel($"Show Stat/Skill Help Button:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata skillshelp", row, height, config.playerprofilesettings.skillshelp, valueL, width), XPerienceAdminPanelInfoBox); row++; row++; ControlPanelelements.Add(XPUILabel($"[Background Options] - Images can be added/edited on the Image URLs page", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.50", "1 1 1 1"), XPerienceAdminPanelInfoBox); row++; ControlPanelelements.Add(XPUILabel($"Use Background Image:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata usebgimage", row, height, config.playerprofilesettings.usebgimage, valueL, width), XPerienceAdminPanelInfoBox); if (config.playerprofilesettings.usebgimage) { row++; ControlPanelelements.Add(XPUILabel($"Allow Players To Change Background:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata allowprofilebgchange", row, height, config.playerprofilesettings.allowprofilebgchange, valueL, width), XPerienceAdminPanelInfoBox); row++; ControlPanelelements.Add(XPUILabel($"Fade-In Effect:(seconds)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelInfoBox, $"xp.config playerdata bgfadein {UserInputText}", row, height, 12, $"{config.playerprofilesettings.bgfadein}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Use Menu Background Image:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata usemenubgimage", row, height, config.playerprofilesettings.usemenubgimage, valueL, width), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUILabel($"(uses second image for menu area background)", row, height, TextAnchor.MiddleLeft, 10, ".26", ".5", "1 1 1 1"), XPerienceAdminPanelInfoBox); row++; ControlPanelelements.Add(XPUILabel($"Select Default Background Image:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIButton($"xp.admin openprofilebg", row, height, 12, "0 1 0 .25", "Open BG Selection", valueL, valuePR, TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPUIButton($"xp.admin updatebg", row, height, 12, "1 1 0 .25", "Update All Player BGs", "0.31", "0.43", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelInfoBox); } // Rust Info #region Rust Data ControlPanelelements.Add(XPUILabel($"[Player Info]", row2, height, TextAnchor.MiddleLeft, 15, "0.51", "0.99", "1 1 1 1"), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Play Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata playtime", row2, height, config.playerprofilesettings.playtime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Alive Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata alivetime", row2, height, config.playerprofilesettings.alivetime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Sleeping Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata sleepingtime", row2, height, config.playerprofilesettings.sleepingtime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Swimming Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata swimmingtime", row2, height, config.playerprofilesettings.swimingtime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Driving Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata drivingtime", row2, height, config.playerprofilesettings.drivingtime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Flying Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata flyingtime", row2, height, config.playerprofilesettings.flyingtime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Boating Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata boatingtime", row2, height, config.playerprofilesettings.boatingtime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Base Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata basetime", row2, height, config.playerprofilesettings.basetime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Monument Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata monumentime", row2, height, config.playerprofilesettings.monumenttime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Wilderness Time:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata wildernesstime", row2, height, config.playerprofilesettings.wildernesstime, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Meters Ran:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata metersran", row2, height, config.playerprofilesettings.metersran, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Meters Walked:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata meterswalked", row2, height, config.playerprofilesettings.meterswalked, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Last DMG Recieved:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata lastdmgrec", row2, height, config.playerprofilesettings.lastdmgrec, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Last DMG Recieved By:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata lastdmgrecby", row2, height, config.playerprofilesettings.lastdmgrecby, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Last DMG Delt:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata lastdmgdelt", row2, height, config.playerprofilesettings.lastdmgdelt, valueL2, width), XPerienceAdminPanelInfoBox); row2++; ControlPanelelements.Add(XPUILabel($"Show Last DMG Delt To:", row2, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelInfoBox); ControlPanelelements.Add(XPToggle($"xp.config playerdata lastdmgdeltto", row2, height, config.playerprofilesettings.lastdmgdeltto, valueL2, width), XPerienceAdminPanelInfoBox); #endregion // End CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminTimerColorPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.026f; double width = .006; int row = 4; int rowtwo = 4; string lableL = "0.01"; string lableR = "0.20"; string valueL = "0.20"; string valueR = "0.30"; string lableL2 = "0.50"; string lableR2 = "0.60"; string valueL2 = "0.60"; string valueR2 = "0.70"; string setting1L = "0.26"; string setting1R = "0.27"; string setting2L = "0.28"; string setting2R = "0.29"; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUILabel($"Other Settings", 1, 0.090f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelTimerColor); // Reload Icons if (ImageLibrary != null) { ControlPanelelements.Add(XPUILabel($"[Images & Icons]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.30", "1 1 1 1"), XPerienceAdminPanelTimerColor); row++; row++; ControlPanelelements.Add(XPUIButton($"xp.admin images main 0", row, height, 12, "0 1 0 .25", "Add/Edit Images", "0.02", "0.12", TextAnchor.MiddleCenter, "0 1 0 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIButton($"xp.config timercolor forcereload 0 false", row, height, 12, "0 1 0 .25", "Reload Images", "0.15", "0.25", TextAnchor.MiddleCenter, "1 0 0 1"), XPerienceAdminPanelTimerColor); row++; row++; } #region Live Stats & UI / Chat Settings ControlPanelelements.Add(XPUILabel($"[Live Stats & UI / Chat Settings]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.30", "1 1 1 1"), XPerienceAdminPanelTimerColor); // Default Location row++; ControlPanelelements.Add(XPUILabel($"Default Live UI Location:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUILabel($"| {config.defaultOptions.liveuistatslocation}", row, height, TextAnchor.MiddleLeft, 12, valueL, valueR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIButton($"xp.config timercolor defaultliveui 1 false", row, height, 12, "0.0 1.0 0.0 0", "1", setting1L, setting1R, TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIButton($"xp.config timercolor defaultliveui 2 false", row, height, 12, "1.0 0.0 0.0 0", "2", setting2L, setting2R, TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIButton($"xp.config timercolor defaultliveui 3 false", row, height, 12, "0.0 1.0 0.0 0", "3", "0.30", "0.31", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIButton($"xp.config timercolor defaultliveui 4 false", row, height, 12, "1.0 0.0 0.0 0", "4", "0.32", "0.33", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIButton($"xp.config timercolor defaultliveui 5 false", row, height, 12, "1.0 0.0 0.0 0", "5", "0.34", "0.35", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelTimerColor); // Allow Live UI Location Move row++; ControlPanelelements.Add(XPUILabel($"Allow Players to Move UI:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor defaultliveuimoveable", row, height, config.defaultOptions.liveuistatslocationmoveable, valueL, width), XPerienceAdminPanelTimerColor); // Enable Dash Panel row++; ControlPanelelements.Add(XPUILabel($"Enable Dash Panel:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor enabledashpanel", row, height, config.defaultOptions.enabledashpanel, valueL, width), XPerienceAdminPanelTimerColor); // Speedometer Type row++; string speedometer = "MPH"; if (config.defaultOptions.speedometertype == 1) { speedometer = "MPH"; } if (config.defaultOptions.speedometertype == 2) { speedometer = "KPH"; } ControlPanelelements.Add(XPUILabel($"Default Speedometer Type:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUILabel($"| {speedometer}", row, height, TextAnchor.MiddleLeft, 12, valueL, valueR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIButton($"xp.config timercolor speedometertype 1 false", row, height, 12, "0.0 1.0 0.0 0", "MPH", setting1L, setting2L, TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIButton($"xp.config timercolor speedometertype 2 false", row, height, 12, "1.0 0.0 0.0 0", "KPH", setting2R, "0.31", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelTimerColor); // Progressive Level Icons row++; ControlPanelelements.Add(XPUILabel($"Use Progressive Level Icons:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor useprogressivelevelicons", row, height, config.defaultOptions.useprogressivelevelicons, valueL, width), XPerienceAdminPanelTimerColor); // Player Search row++; ControlPanelelements.Add(XPUILabel($"Allow Player Search:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor allowplayersearch", row, height, config.defaultOptions.allowplayersearch, valueL, width), XPerienceAdminPanelTimerColor); // Show Online Status row++; ControlPanelelements.Add(XPUILabel($"Show Online Status:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor showonlinestatus", row, height, config.defaultOptions.showonlinestatus, valueL, width), XPerienceAdminPanelTimerColor); // Player Reset row++; ControlPanelelements.Add(XPUILabel($"Allow Player Reset:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor allowplayerreset", row, height, config.defaultOptions.allowplayerreset, valueL, width), XPerienceAdminPanelTimerColor); // Top Player Per Page row++; ControlPanelelements.Add(XPUILabel($"Top Players Per Page: (max 20)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); if (config.defaultOptions.topplayersperpage > 20) { config.defaultOptions.topplayersperpage = 20; } ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.config timercolor topplayersperpage {UserInputText}", row, height, 12, $"{config.defaultOptions.topplayersperpage}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; // Live XP Bar Color ControlPanelelements.Add(XPUILabel($"XP Bar Color:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color xpbar {UserInputText}", row, height, 12, $"{config.uitextColor.xpbar}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; // Live Armor Bar Color ControlPanelelements.Add(XPUILabel($"Armor Bar Color:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color armorbar {UserInputText}", row, height, 12, $"{config.uitextColor.armorbar}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Show Profile in Chat row++; ControlPanelelements.Add(XPUILabel($"Show Player Stats in Chat On Connect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor showchatprofile", row, height, config.defaultOptions.showchatprofileonconnect, valueL, width), XPerienceAdminPanelTimerColor); // Show Level in Chat row++; ControlPanelelements.Add(XPUILabel($"Show Player Levels in Chat:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor showlevelinchat", row, height, config.defaultOptions.showlevelinchat, valueL, width), XPerienceAdminPanelTimerColor); // Disable Chats row++; ControlPanelelements.Add(XPUILabel($"Disable All Chat Notifacations:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor disablechats", row, height, config.defaultOptions.hidechatnotifications, valueL, width), XPerienceAdminPanelTimerColor); if (!config.defaultOptions.hidechatnotifications) { // Show Armor Absorb Chat row++; ControlPanelelements.Add(XPUILabel($"Show Armor Absorb Chat Messages:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor armorchat", row, height, config.defaultOptions.disablearmorchat, valueL, width), XPerienceAdminPanelTimerColor); // Notifcation Cooldown row++; ControlPanelelements.Add(XPUILabel($"Chat Message Cooldown: (seconds)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.config timercolor NotifcationCooldown {UserInputText}", row, height, 12, $"{config.defaultOptions.NotifcationCooldown}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); } #endregion // Stat / Skill Settings #region Stat / Skill Settings row++; row++; ControlPanelelements.Add(XPUILabel($"[Stat / Skill Settings]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.30", "1 1 1 1"), XPerienceAdminPanelTimerColor); // Use Permissions row++; ControlPanelelements.Add(XPUILabel($"Use Permissions:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor userpermissions", row, height, config.defaultOptions.userpermissions, valueL, width), XPerienceAdminPanelTimerColor); // Drops to Inventory row++; ControlPanelelements.Add(XPUILabel($"Drops go in player inventory:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor dropsgotoplayerinventory", row, height, config.defaultOptions.dropsgotoplayerinventory, valueL, width), XPerienceAdminPanelTimerColor); // Show Confirmation Prompt row++; ControlPanelelements.Add(XPUILabel($"Show Confirmation Prompt:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor enableconfirmationprompt", row, height, config.defaultOptions.enableconfirmationprompt, valueL, width), XPerienceAdminPanelTimerColor); // Show Chat Messages row++; ControlPanelelements.Add(XPUILabel($"Show Chat Notifications:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor showchatnotifications", row, height, config.defaultOptions.showchatnotifications, valueL, width), XPerienceAdminPanelTimerColor); // Hardcore Mode Resets row++; ControlPanelelements.Add(XPUILabel($"Hardcore Mode (No Resets):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor defaulthardcore", row, height, config.defaultOptions.hardcorenoreset, valueL, width), XPerienceAdminPanelTimerColor); if (!config.defaultOptions.hardcorenoreset) { // Restrict Resets row++; ControlPanelelements.Add(XPUILabel($"Restrict Resets:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor defaultrestristresets", row, height, config.defaultOptions.restristresets, valueL, width), XPerienceAdminPanelTimerColor); // Stat Reset Timer row++; ControlPanelelements.Add(XPUILabel($"Stat Reset Timer Mins:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.config timercolor defaultstattimer {UserInputText}", row, height, 12, $"{config.defaultOptions.resetminsstats}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Skill Reset Timer row++; ControlPanelelements.Add(XPUILabel($"Skill Reset Timer:(mins)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.config timercolor defaultskilltimer {UserInputText}", row, height, 12, $"{config.defaultOptions.resetminsskills}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // VIP Stat Reset Timer row++; ControlPanelelements.Add(XPUILabel($"VIP Stat Reset Timer:(mins)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.config timercolor defaultvipstattimer {UserInputText}", row, height, 12, $"{config.defaultOptions.vipresetminstats}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // VIP Skill Reset Timer row++; ControlPanelelements.Add(XPUILabel($"VIP Skill Reset Timer:(mins)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.config timercolor defaultvipskilltimer {UserInputText}", row, height, 12, $"{config.defaultOptions.vipresetminsskills}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Disable Fix Data row++; ControlPanelelements.Add(XPUILabel($"Disable Fix Data (players):", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor defaultfixdatadisable", row, height, config.defaultOptions.disableplayerfixdata, valueL, width), XPerienceAdminPanelTimerColor); // Fix Data Reset Timer if (!config.defaultOptions.disableplayerfixdata) { row++; ControlPanelelements.Add(XPUILabel($"Player Fix Data Timer:(mins)", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.config timercolor defaultplayerfixdata {UserInputText}", row, height, 12, $"{config.defaultOptions.playerfixdatatimer}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); } } // Admin Bypass Resets row++; ControlPanelelements.Add(XPUILabel($"Admins Bypass:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor defaultadminbypass", row, height, config.defaultOptions.bypassadminreset, valueL, width), XPerienceAdminPanelTimerColor); // Debug Mode row++; ControlPanelelements.Add(XPUILabel($"Debug Mode:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPToggle($"xp.config timercolor debugmode", row, height, config.defaultOptions.debugmode, valueL, width), XPerienceAdminPanelTimerColor); #endregion // Color Options #region Color Options ControlPanelelements.Add(XPUILabel($"[UI Text Color Settings]", rowtwo, height, TextAnchor.MiddleLeft, 15, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); // Default rowtwo++; ControlPanelelements.Add(XPUILabel($"Default Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color defaultuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.defaultcolor}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Rank Name rowtwo++; ControlPanelelements.Add(XPUILabel($"Rank Name Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color ranknameuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.rankname}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Rank Level rowtwo++; ControlPanelelements.Add(XPUILabel($"Rank Level Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color rankleveluicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.ranklevel}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Rank XP rowtwo++; ControlPanelelements.Add(XPUILabel($"Rank XP Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color rankxpuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.rankxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Level rowtwo++; ControlPanelelements.Add(XPUILabel($"Level Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color leveluicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.level}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Experience rowtwo++; ControlPanelelements.Add(XPUILabel($"Experience Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color xpuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.experience}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Next Level rowtwo++; ControlPanelelements.Add(XPUILabel($"Next Level Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color nextlvluicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.nextlevel}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Remaining XP rowtwo++; ControlPanelelements.Add(XPUILabel($"Remaining XP Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color remainuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.remainingxp}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Stats / Skills / Levels rowtwo++; ControlPanelelements.Add(XPUILabel($"Stats/Skills/Levels Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color ssluicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.statskilllevels}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Perks rowtwo++; ControlPanelelements.Add(XPUILabel($"Perks Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color perksuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.perks}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Unspent Points rowtwo++; ControlPanelelements.Add(XPUILabel($"Unspent Points Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color upointsuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.unspentpoints}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Spent Points rowtwo++; ControlPanelelements.Add(XPUILabel($"Spent Points Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color spointsuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.spentpoints}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Personal Animals rowtwo++; ControlPanelelements.Add(XPUILabel($"Personal Animals Color:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color petsuicolor {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.pets}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; rowtwo++; // Stats ControlPanelelements.Add(XPUILabel($"[Stats Label Color Settings]", rowtwo, height, TextAnchor.MiddleLeft, 15, lableL2, "0.98", "1 1 1 1"), XPerienceAdminPanelTimerColor); // Mentality rowtwo++; ControlPanelelements.Add(XPUILabel($"Mentality:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color mentality {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.mentality}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Dexterity rowtwo++; ControlPanelelements.Add(XPUILabel($"Dexterity:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color dexterity {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.dexterity}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Might rowtwo++; ControlPanelelements.Add(XPUILabel($"Might:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color might {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.might}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Captaincy rowtwo++; ControlPanelelements.Add(XPUILabel($"Captaincy:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color captaincy {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.captaincy}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Weaponry rowtwo++; ControlPanelelements.Add(XPUILabel($"Weaponry:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color weaponry {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.weaponry}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); // Ninjary rowtwo++; ControlPanelelements.Add(XPUILabel($"Ninjary:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color Ninjary {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.Ninjary}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; rowtwo++; // Skills ControlPanelelements.Add(XPUILabel($"[Skill Label Color Settings]", rowtwo, height, TextAnchor.MiddleLeft, 15, lableL2, "0.98", "1 1 1 1"), XPerienceAdminPanelTimerColor); rowtwo++; // WoodCutter ControlPanelelements.Add(XPUILabel($"WoodCutter:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color woodcutter {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.woodcutter}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Smithy ControlPanelelements.Add(XPUILabel($"Smithy:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color smithy {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.smithy}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Miner ControlPanelelements.Add(XPUILabel($"Miner:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color miner {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.miner}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Forager ControlPanelelements.Add(XPUILabel($"Forager:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color forager {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.forager}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Hunter ControlPanelelements.Add(XPUILabel($"Hunter:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color hunter {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.hunter}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Fisher ControlPanelelements.Add(XPUILabel($"Fisher:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color fisher {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.fisher}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Crafter ControlPanelelements.Add(XPUILabel($"Crafter:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color crafter {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.crafter}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Framer ControlPanelelements.Add(XPUILabel($"Framer:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color framer {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.framer}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Medic ControlPanelelements.Add(XPUILabel($"Medic:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color medic {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.medic}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Scavenger ControlPanelelements.Add(XPUILabel($"Scavenger:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color scavenger {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.scavenger}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Electrician ControlPanelelements.Add(XPUILabel($"Electrician:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color electrician {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.electrician}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Demolitionist ControlPanelelements.Add(XPUILabel($"Demolitionist:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color demolitionist {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.demolitionist}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); rowtwo++; // Tamer ControlPanelelements.Add(XPUILabel($"Tamer:", rowtwo, height, TextAnchor.MiddleLeft, 12, lableL2, lableR2, "1 1 1 1"), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInputbackground(rowtwo, height, "0 0 .1 .75", valueL2, valueR2), XPerienceAdminPanelTimerColor); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelTimerColor, $"xp.color tamer {UserInputText}", rowtwo, height, 12, $"{config.uitextColor.tamer}", valueL2, valueR2, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // End CuiHelper.AddUi(player, ControlPanelelements); } private void AdminImagePaths(BasePlayer player, string page = "main", int bg = 0) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.028f; int row = 2; string delL = ".01"; string delR = ".02"; string lableL = "0.01"; string lableL2 = "0.03"; string lableR = "0.10"; string valueL = "0.10"; string valueR = "0.48"; string lable2L = "0.50"; string lable2R = "0.59"; string value2L = "0.59"; string value2R = "0.98"; #endregion ControlPanelelements.Add(XPUIPanel(".16 0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelImages); ControlPanelelements.Add(XPUILabel($"Image URLs: (Once a URL is changed use the reload button so the images are updated)", row, height, TextAnchor.MiddleLeft, 15, lableL, ".99", "1 1 1 1"), XPerienceAdminPanelImages); row++; row++; switch (page) { case "main": #region Image URLS ControlPanelelements.Add(XPUIButton($"xp.admin images bgimages", row, height, 12, "0 1 0 .25", "Profile BG Images", "0.02", "0.12", TextAnchor.MiddleCenter, "0 1 0 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIButton($"xp.images reloadimages", row, height, 12, "0 1 0 .25", "Reload Images", "0.13", "0.23", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIButton($"xp.images resetimages", row, height, 12, "0 1 0 .25", "Reset Default URLs", "0.24", "0.37", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIButton($"xp.images checkimages", row, height, 12, "0 1 0 .25", "Check Images", "0.38", "0.48", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelImages); row++; row++; ControlPanelelements.Add(XPUILabel($"Use Local Path:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPToggle($"xp.images uselocalpath", row, height, config.imageicons.uselocalpath, valueL), XPerienceAdminPanelImages); if (config.imageicons.uselocalpath) { row++; ControlPanelelements.Add(XPUILabel($"Path to Oxide folder:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images rootpath {UserInputText}", row, height, 12, $"{config.imageicons.rootpath}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); if (Directory.Exists($"{config.imageicons.rootpath}")) { row++; ControlPanelelements.Add(XPUILabel("(Oxide Folder Found)", row, height, TextAnchor.MiddleLeft, 12, valueL, valueR, "0 1 0 1"), XPerienceAdminPanelImages); } else { row++; ControlPanelelements.Add(XPUILabel($"(Oxide Folder Not Found, Try: {Directory.GetCurrentDirectory()}/oxide)", row, height, TextAnchor.MiddleLeft, 12, valueL, valueR, "1 0 0 1"), XPerienceAdminPanelImages); } row++; ControlPanelelements.Add(XPUILabel($"(Click Reload Images after path is set. Once images are downloaded make sure you click save on the menu and reload images again. You may have to reload Image Library as well for images to load.)", row, height, TextAnchor.MiddleLeft, 10, ".01", ".99", "1 1 0 1"), XPerienceAdminPanelImages); row++; ControlPanelelements.Add(XPUILabel($"(For help with this you can visit the XPerience website here: https://www.rustlevels.com/XPerience/index.php/setup/image-urls)", row, height, TextAnchor.MiddleLeft, 10, ".01", ".99", "1 1 0 1"), XPerienceAdminPanelImages); } row++; int row2 = row; ControlPanelelements.Add(XPUILabel($"Logo:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images xperiencelogo {UserInputText}", row, height, 12, $"{config.imageicons.xperiencelogo}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Icon:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images mainicon {UserInputText}", row, height, 12, $"{config.imageicons.mainicon}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Stats #region Stats row++; ControlPanelelements.Add(XPUILabel($"Mentality:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images mentality {UserInputText}", row, height, 12, $"{config.imageicons.mentality}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Dexterity:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images dexterity {UserInputText}", row, height, 12, $"{config.imageicons.dexterity}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Might:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images might {UserInputText}", row, height, 12, $"{config.imageicons.might}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Weaponry:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images weaponry {UserInputText}", row, height, 12, $"{config.imageicons.weaponry}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Ninjary:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images ninjary {UserInputText}", row, height, 12, $"{config.imageicons.ninjary}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Captaincy:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images captaincy {UserInputText}", row, height, 12, $"{config.imageicons.captaincy}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // Skills #region Skills row++; ControlPanelelements.Add(XPUILabel($"Woodcutter:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images woodcutter {UserInputText}", row, height, 12, $"{config.imageicons.woodcutter}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Smithy:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images smithy {UserInputText}", row, height, 12, $"{config.imageicons.smithy}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Miner:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images miner {UserInputText}", row, height, 12, $"{config.imageicons.miner}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Fisher:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images fisher {UserInputText}", row, height, 12, $"{config.imageicons.fisher}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Forager:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images forager {UserInputText}", row, height, 12, $"{config.imageicons.forager}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Hunter:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images hunter {UserInputText}", row, height, 12, $"{config.imageicons.hunter}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Crafter:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images crafter {UserInputText}", row, height, 12, $"{config.imageicons.crafter}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Framer:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images framer {UserInputText}", row, height, 12, $"{config.imageicons.framer}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Medic:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images medic {UserInputText}", row, height, 12, $"{config.imageicons.medic}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Scavenger:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images scavenger {UserInputText}", row, height, 12, $"{config.imageicons.scavenger}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Electrician:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images electrician {UserInputText}", row, height, 12, $"{config.imageicons.electrician}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Demolitionist:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images demolitionist {UserInputText}", row, height, 12, $"{config.imageicons.demolitionist}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // Other #region Other row++; ControlPanelelements.Add(XPUILabel($"Chicken:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images chicken {UserInputText}", row, height, 12, $"{config.imageicons.chicken}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Boar:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images boar {UserInputText}", row, height, 12, $"{config.imageicons.boar}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Stag:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images stag {UserInputText}", row, height, 12, $"{config.imageicons.stag}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Wolf:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images wolf {UserInputText}", row, height, 12, $"{config.imageicons.wolf}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Bear:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images bear {UserInputText}", row, height, 12, $"{config.imageicons.bear}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Polar Bear:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images polarbear {UserInputText}", row, height, 12, $"{config.imageicons.polarbear}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // Row 2 #region Misc ControlPanelelements.Add(XPUILabel($"XP:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images xp {UserInputText}", row2, height, 12, $"{config.imageicons.xp}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Level:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images level {UserInputText}", row2, height, 12, $"{config.imageicons.level}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Level 0%:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images level0 {UserInputText}", row2, height, 12, $"{config.imageicons.level0}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Level 20%:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images level2 {UserInputText}", row2, height, 12, $"{config.imageicons.level2}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Level 40%:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images level4 {UserInputText}", row2, height, 12, $"{config.imageicons.level4}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Level 60%:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images level6 {UserInputText}", row2, height, 12, $"{config.imageicons.level6}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Level 80%:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images level8 {UserInputText}", row2, height, 12, $"{config.imageicons.level8}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Level 100%:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images level10 {UserInputText}", row2, height, 12, $"{config.imageicons.level10}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Armor:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images armor {UserInputText}", row2, height, 12, $"{config.imageicons.armor}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Online:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images online {UserInputText}", row2, height, 12, $"{config.imageicons.online}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Offline:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images offline {UserInputText}", row2, height, 12, $"{config.imageicons.offline}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Backpack:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images backpack {UserInputText}", row2, height, 12, $"{config.imageicons.backpack}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Dash Panel:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images dash {UserInputText}", row2, height, 12, $"{config.imageicons.dash}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Default Profile BG:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images profilebg {UserInputText}", row2, height, 12, $"{config.imageicons.profilebg}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Profile Menu BG:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images menubg {UserInputText}", row2, height, 12, $"{config.imageicons.menubg}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); if(RaidableBases != null) { row2++; ControlPanelelements.Add(XPUILabel($"Raid Easy:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images raideasy {UserInputText}", row2, height, 12, $"{config.imageicons.raideasy}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Raid Medium:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images raidmedium {UserInputText}", row2, height, 12, $"{config.imageicons.raidmedium}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Raid Hard:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images raidhard {UserInputText}", row2, height, 12, $"{config.imageicons.raidhard}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Raid Expert:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images raidexpert {UserInputText}", row2, height, 12, $"{config.imageicons.raidexpert}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); row2++; ControlPanelelements.Add(XPUILabel($"Raid Nightmare:", row2, height, TextAnchor.MiddleLeft, 12, lable2L, lable2R, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row2, height, "0 0 .1 .75", value2L, value2R), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images raidnightmare {UserInputText}", row2, height, 12, $"{config.imageicons.raidnightmare}", value2L, value2R, TextAnchor.MiddleLeft, "1 1 1 1")); } #endregion #endregion break; case "bgimages": #region BG Images ControlPanelelements.Add(XPUILabel($"Profile BG Images", row, height, TextAnchor.MiddleLeft, 15, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelImages); row++; row++; ControlPanelelements.Add(XPUIButton($"xp.images bgnew", row, height, 12, "0 1 0 .25", "Create BG Image", "0.02", "0.12", TextAnchor.MiddleCenter, "0 1 0 1"), XPerienceAdminPanelImages); row++; row++; foreach (var bgimage in config.imageicons.bgimages) { ControlPanelelements.Add(XPUIButton($"xp.images deletebgimage {bgimage.Key}", row, height, 12, "0 0 0 .25", $"ⓧ", delL, delR, TextAnchor.MiddleLeft, "1 0 0 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIButton($"xp.images editbgimage {bgimage.Key}", row, height, 12, "0 0 0 .25", $"{bgimage.Value.name}", lableL2, lableR, TextAnchor.MiddleLeft, "1 1 1 1"), XPerienceAdminPanelImages); row++; } row++; ControlPanelelements.Add(XPUIButton($"xp.admin images main", row, height, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelImages); #endregion break; case "editbgimage": #region Edit BG Image ControlPanelelements.Add(XPUILabel($"Profile BG Image: {bg}", row, height, TextAnchor.MiddleLeft, 15, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelImages); row++; var editbgimage = config.imageicons.bgimages[bg]; ControlPanelelements.Add(XPUILabel($"Name:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images editbgimagename {bg} {UserInputText}", row, height, 12, $"{editbgimage.name}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"URL:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelImages); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelImages, $"xp.images editbgimageurl {bg} {UserInputText}", row, height, 12, $"{editbgimage.url}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; row++; ControlPanelelements.Add(XPUIButton($"xp.admin images bgimages", row, height, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelImages); // Preview row++; row++; ControlPanelelements.Add(XPUILabel($"Preview:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelImages); ControlPanelelements.Add(new CuiElement { Parent = XPerienceAdminPanelImages, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", editbgimage.name) }, new CuiRectTransformComponent { AnchorMin = ".01 .35", AnchorMax = ".50 .70" } } }); #endregion break; } // End CuiHelper.AddUi(player, ControlPanelelements); } private void AdminOtherModsPage(BasePlayer player, string mod, string page = "main", int option = 0) { switch(mod) { case "main": var ControlPanelelements = new CuiElementContainer(); var height = 0.023f; int fontsize = 11; bool modsinstalled = false; ControlPanelelements.Add(XPUIPanel(".16 0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"Other Mod Settings", 1, 0.05f, TextAnchor.MiddleLeft, 18, ".01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel("Compatible plugins will show below. Select the plugin you wish to edit or have XPerience control. These mods are not required to use XPerience.", 2, 0.05f, TextAnchor.MiddleLeft, 15, ".01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); int row = 6; // Mod List if (ZoneManager != null) { ControlPanelelements.Add(XPUIButton("xp.admin othermods zonemanager", row, height, fontsize, "0 0 0 .7", "Zone Manager", ".02", ".2", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); row++; row++; modsinstalled = true; } if (EventHelper != null || SurvivalArena != null) { ControlPanelelements.Add(XPUIButton("xp.admin othermods eventhelper", row, height, fontsize, "0 0 0 .7", "Event Helper / Survival Arena", ".02", ".2", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); row++; row++; modsinstalled = true; } if (KillRecords != null) { ControlPanelelements.Add(XPUIButton("xp.admin othermods killrecords", row, height, fontsize, "0 0 0 .7", "Kill Records", ".02", ".2", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); row++; row++; modsinstalled = true; } if (Economics != null) { ControlPanelelements.Add(XPUIButton("xp.admin othermods econ", row, height, fontsize, "0 0 0 .7", "Economics", ".02", ".2", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); row++; row++; modsinstalled = true; } if (ServerRewards != null) { ControlPanelelements.Add(XPUIButton("xp.admin othermods srewards", row, height, fontsize, "0 0 0 .7", "Server Rewards", ".02", ".2", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); row++; row++; modsinstalled = true; } if (Backpacks != null) { ControlPanelelements.Add(XPUIButton("xp.admin othermods backpacks", row, height, fontsize, "0 0 0 .7", "Backpacks", ".02", ".2", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); row++; row++; modsinstalled = true; } if (PersonalAnimal != null) { ControlPanelelements.Add(XPUIButton("xp.admin othermods pets", row, height, fontsize, "0 0 0 .7", "Personal Animals (Tamer Skill)", ".02", ".2", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); modsinstalled = true; } if (!modsinstalled) { ControlPanelelements.Add(XPUILabel("There are no compatible plugins installed that can be used/controlled by XPerience.", row, 0.05f, TextAnchor.MiddleLeft, 15, ".01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); } // UI End CuiHelper.AddUi(player, ControlPanelelements); break; case "zonemanager": OtherMods_ZoneManager(player); break; case "eventhelper": OtherMods_EventHelper(player); break; case "killrecords": OtherMods_KillRecords(player); break; case "econ": OtherMods_Economics(player); break; case "srewards": OtherMods_ServerRewards(player); break; case "backpacks": OtherMods_Backpacks(player, page, option); break; case "pets": OtherMods_Pets(player); break; } } #region Other Mods private void OtherMods_KillRecords(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.023f; int buttonsize = 12; int fontsize = 11; int row = 5; ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton("xp.admin othermods main", 2, 0.030f, 15, "0 0 0 .7", $"<-- Back To Mod List", "0.02", "0.15", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"[Kill Records Settings] (Requires KillRecords plugin)", 3, 0.035f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); #region KillRecords // KR Enable row++; ControlPanelelements.Add(XPUILabel($"Enable KillRecords Bonus:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpBonus.enablebonus}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krenable 0 true killrecords", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krenable 0 false killrecords", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // KR Button row++; ControlPanelelements.Add(XPUILabel($"Show KillRecords Button:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpBonus.showkrbutton}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krshowbutton 0 true killrecords", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krshowbutton 0 false killrecords", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // KR Required Kills row++; ControlPanelelements.Add(XPUILabel($"Required Kills:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpBonus.requiredkills}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krrequiredkills {config.xpBonus.requiredkills + 5} false killrecords", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krrequiredkills {config.xpBonus.requiredkills - 5} false killrecords", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // KR Bonus Amount row++; ControlPanelelements.Add(XPUILabel($"Bonus XP Amount:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpBonus.bonusxp}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krbonusamount {config.xpBonus.bonusxp + 5} false killrecords", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krbonusamount {config.xpBonus.bonusxp - 5} false killrecords", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // KR Bonus End row++; ControlPanelelements.Add(XPUILabel($"Bonus XP End:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpBonus.endbonus}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krbonusend {config.xpBonus.endbonus + 10} false killrecords", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krbonusend {config.xpBonus.endbonus - 10} false killrecords", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // KR Enable MultiBonus row++; ControlPanelelements.Add(XPUILabel($"Multiple Bonus:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpBonus.multibonus}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krenablemulti 0 true killrecords", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krenablemulti 0 false killrecords", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // KR MultiBonus Type row++; ControlPanelelements.Add(XPUILabel($"Multiple Bonus Type:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpBonus.multibonustype}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.26", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krmultitype 0 true killrecords", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods krmultitype 0 false killrecords", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); #endregion CuiHelper.AddUi(player, ControlPanelelements); } private void OtherMods_ZoneManager(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.023f; int fontsize = 11; int row = 8; ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton("xp.admin othermods main", 2, 0.030f, 15, "0 0 0 .7", $"<-- Back To Mod List", "0.02", "0.15", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"[Zone Manager Settings]", 3, 0.035f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"(Requires ZoneManager plugin: List each zone in the area below seperated by a comma , without spaces)", 4, 0.035f, TextAnchor.MiddleLeft, 13, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); #region ZoneManager // No XP Gain ControlPanelelements.Add(XPUILabel($"No XP Gain:", row, height, TextAnchor.MiddleLeft, fontsize, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", ".11", ".99"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelOtherMods, $"xp.config zonemanager noxpgain {UserInputText}", row, height, fontsize, $"{config.zonemanagermod.noxpgain}", ".11", ".99", TextAnchor.MiddleLeft, "1 1 1 1")); // No XP Loss row++; row++; ControlPanelelements.Add(XPUILabel($"No XP Loss:", row, height, TextAnchor.MiddleLeft, fontsize, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", ".11", ".99"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelOtherMods, $"xp.config zonemanager noxploss {UserInputText}", row, height, fontsize, $"{config.zonemanagermod.noxploss}", ".11", ".99", TextAnchor.MiddleLeft, "1 1 1 1")); // No XP Loss row++; row++; ControlPanelelements.Add(XPUILabel($"No Stats/Skills:", row, height, TextAnchor.MiddleLeft, fontsize, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", ".11", ".99"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelOtherMods, $"xp.config zonemanager disablestatsandskills {UserInputText}", row, height, fontsize, $"{config.zonemanagermod.disablestatsandskills}", ".11", ".99", TextAnchor.MiddleLeft, "1 1 1 1")); #endregion CuiHelper.AddUi(player, ControlPanelelements); } private void OtherMods_EventHelper(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.023f; int fontsize = 11; int row = 8; ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton("xp.admin othermods main", 2, 0.030f, 15, "0 0 0 .7", $"<-- Back To Mod List", "0.02", "0.15", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"[Event Helper / Survival Arena Settings]", 3, 0.035f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"(Requires EventHelper or Survival Arena plugins)", 4, 0.035f, TextAnchor.MiddleLeft, 13, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); #region EventHelper if (EventHelper != null) { ControlPanelelements.Add(XPUILabel($"EventHelper: List each event name in the area below seperated by a comma ( , )", row, height, TextAnchor.MiddleLeft, 13, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); row++; // No XP Gain ControlPanelelements.Add(XPUILabel($"No XP Gain:", row, height, TextAnchor.MiddleLeft, fontsize, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", ".11", ".99"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelOtherMods, $"xp.config eventhelper noxpgain {UserInputText}", row, height, fontsize, $"{config.eventhelpermod.noxpgain}", ".11", ".99", TextAnchor.MiddleLeft, "1 1 1 1")); // No XP Loss row++; ControlPanelelements.Add(XPUILabel($"No XP Loss:", row, height, TextAnchor.MiddleLeft, fontsize, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", ".11", ".99"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelOtherMods, $"xp.config eventhelper noxploss {UserInputText}", row, height, fontsize, $"{config.eventhelpermod.noxploss}", ".11", ".99", TextAnchor.MiddleLeft, "1 1 1 1")); // No XP Loss row++; ControlPanelelements.Add(XPUILabel($"No Stats/Skills:", row, height, TextAnchor.MiddleLeft, fontsize, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", ".11", ".99"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelOtherMods, $"xp.config eventhelper disablestatsandskills {UserInputText}", row, height, fontsize, $"{config.eventhelpermod.disablestatsandskills}", ".11", ".99", TextAnchor.MiddleLeft, "1 1 1 1")); row++; row++; } #endregion #region Survival Arena if (SurvivalArena != null) { ControlPanelelements.Add(XPUILabel($"Survival Arena:", row, height, TextAnchor.MiddleLeft, 13, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Disable XP Gain:", row, height, TextAnchor.MiddleLeft, 12, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPToggle($"xp.config eventhelper sanoxpgain", row, height, config.survivalarenamod.noxpgain, "0.11"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Disable XP Loss:", row, height, TextAnchor.MiddleLeft, 12, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPToggle($"xp.config eventhelper sanoxploss", row, height, config.survivalarenamod.noxploss, "0.11"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Disable Stats/Skills:", row, height, TextAnchor.MiddleLeft, 12, ".01", ".10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPToggle($"xp.config eventhelper sadisablestatsandskills", row, height, config.survivalarenamod.disablestatsandskills, "0.11"), XPerienceAdminPanelOtherMods); } #endregion CuiHelper.AddUi(player, ControlPanelelements); } private void OtherMods_Economics(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.023f; int buttonsize = 12; int fontsize = 11; int row = 5; ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton("xp.admin othermods main", 2, 0.030f, 15, "0 0 0 .7", $"<-- Back To Mod List", "0.02", "0.15", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"[Economics Settings] (Requires Economics plugin)", 3, 0.035f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); #region Economics // Show Profile Balance row++; ControlPanelelements.Add(XPUILabel($"Show Balance in Profiles:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.showbalanceprofile}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods showbalanceprofile 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods showbalanceprofile 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Levelup Reward row++; ControlPanelelements.Add(XPUILabel($"Enable Level Up Reward:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econlevelup}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econlevelup 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econlevelup 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Leveldown Reduction row++; ControlPanelelements.Add(XPUILabel($"Enable Level Down Reduction:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econleveldown}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econleveldown 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econleveldown 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Level Up Reward Amount row++; ControlPanelelements.Add(XPUILabel($"Level Up Reward Amount:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econlevelreward}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econlevelreward {config.xpEcon.econlevelreward + 10} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econlevelreward {config.xpEcon.econlevelreward - 10} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Level Down Reduction row++; ControlPanelelements.Add(XPUILabel($"Level Loss Reduction:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econlevelreduction}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econlevelreduction {config.xpEcon.econlevelreduction + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econlevelreduction {config.xpEcon.econlevelreduction - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable ResetStats Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Reset Stats Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econresetstats}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetstats 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetstats 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable ResetSkill Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Reset Skills Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econresetskills}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetskills 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetskills 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable RespecStats Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Respec Stat Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econresetstat}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetstat 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetstat 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable RespecSkill Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Respec Skill Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econresetskill}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetskill 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetskill 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Reset Stats Cost row++; ControlPanelelements.Add(XPUILabel($"Reset Stats Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econresetstatscost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetstatscost {config.xpEcon.econresetstatscost + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetstatscost {config.xpEcon.econresetstatscost - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Reset Skills Cost row++; ControlPanelelements.Add(XPUILabel($"Reset Skills Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econresetskillscost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetskillscost {config.xpEcon.econresetskillscost + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetskillscost {config.xpEcon.econresetskillscost - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Respec Stat Cost row++; ControlPanelelements.Add(XPUILabel($"Respec Stat Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econresetstatcost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetstatcost {config.xpEcon.econresetstatcost + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetstatcost {config.xpEcon.econresetstatcost - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Respec Skill Cost row++; ControlPanelelements.Add(XPUILabel($"Respec Skill Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econresetskillcost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetskillcost {config.xpEcon.econresetskillcost + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econresetskillcost {config.xpEcon.econresetskillcost - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Stat Level Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Stat Level Up Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econstatlevelcost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econstatlevelcost 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econstatlevelcost 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Stat Level Up Multiplier row++; ControlPanelelements.Add(XPUILabel($"Stat Cost Multiplier:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econstatlevelcostmultiplier}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econstatlevelcostmultiplier {config.xpEcon.econstatlevelcostmultiplier + 1} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econstatlevelcostmultiplier {config.xpEcon.econstatlevelcostmultiplier - 1} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Stat Costs row++; ControlPanelelements.Add(XPUILabel($"Mentality Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econmentality}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econmentality {config.xpEcon.econmentality + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econmentality {config.xpEcon.econmentality - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Dexterity Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econdexterity}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econdexterity {config.xpEcon.econdexterity + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econdexterity {config.xpEcon.econdexterity - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Might Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econmight}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econmight {config.xpEcon.econmight + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econmight {config.xpEcon.econmight - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Captaincy Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econcaptaincy}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econcaptaincy {config.xpEcon.econcaptaincy + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econcaptaincy {config.xpEcon.econcaptaincy - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Weaponry Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econweaponry}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econweaponry {config.xpEcon.econweaponry + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econweaponry {config.xpEcon.econweaponry - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Ninjary Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econninjary}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econninjary {config.xpEcon.econninjary + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econninjary {config.xpEcon.econninjary - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Skill Level Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Skill Level Up Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econskilllevelcost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econskilllevelcost 0 true econ", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econskilllevelcost 0 false econ", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Skill Level Up Multiplier row++; ControlPanelelements.Add(XPUILabel($"Skill Cost Multiplier:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econskilllevelcostmultiplier}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econskilllevelcostmultiplier {config.xpEcon.econskilllevelcostmultiplier + 1} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econskilllevelcostmultiplier {config.xpEcon.econskilllevelcostmultiplier - 1} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Skill Costs row++; ControlPanelelements.Add(XPUILabel($"WoodCutter Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econwoodcutter}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econwoodcutter {config.xpEcon.econwoodcutter + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econwoodcutter {config.xpEcon.econwoodcutter - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Smithy Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econsmithy}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econsmithy {config.xpEcon.econsmithy + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econsmithy {config.xpEcon.econsmithy - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Miner Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econminer}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econminer {config.xpEcon.econminer + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econminer {config.xpEcon.econminer - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Forager Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econforager}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econforager {config.xpEcon.econforager + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econforager {config.xpEcon.econforager - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Hunter Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econhunter}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econhunter {config.xpEcon.econhunter + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econhunter {config.xpEcon.econhunter - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Fisher Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econfisher}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econfisher {config.xpEcon.econfisher + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econfisher {config.xpEcon.econfisher - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Crafter Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econcrafter}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econcrafter {config.xpEcon.econcrafter + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econcrafter {config.xpEcon.econcrafter - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Framer Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econframer}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econframer {config.xpEcon.econframer + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econframer {config.xpEcon.econframer - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Medic Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econmedic}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econmedic {config.xpEcon.econmedic + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econmedic {config.xpEcon.econmedic - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Scavenger Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econscavenger}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econscavenger {config.xpEcon.econscavenger + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econscavenger {config.xpEcon.econscavenger - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Electrician Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econelectrician}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econelectrician {config.xpEcon.econelectrician + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econelectrician {config.xpEcon.econelectrician - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Demolitionist Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econdemolitionist}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econdemolitionist {config.xpEcon.econdemolitionist + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econdemolitionist {config.xpEcon.econdemolitionist - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Tamer Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.xpEcon.econtamer}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econtamer {config.xpEcon.econtamer + 5} false econ", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods econtamer {config.xpEcon.econtamer - 5} false econ", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); #endregion CuiHelper.AddUi(player, ControlPanelelements); } private void OtherMods_ServerRewards(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.023f; int buttonsize = 12; int fontsize = 11; int row = 5; ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton("xp.admin othermods main", 2, 0.030f, 15, "0 0 0 .7", $"<-- Back To Mod List", "0.02", "0.15", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"[Server Rewards Settings] (Requires Server Rewards plugin)", 3, 0.035f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); #region ServerRewards // Enable Level Up Reward row++; ControlPanelelements.Add(XPUILabel($"Enable Level Up Reward:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardlevelup}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardlevelup 0 true srewards", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardlevelup 0 false srewards", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Level Down Reduction row++; ControlPanelelements.Add(XPUILabel($"Enable Level Down Reduction:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardleveldown}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardleveldown 0 true srewards", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardleveldown 0 false srewards", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Level Up Amount row++; ControlPanelelements.Add(XPUILabel($"Level Up Amount:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardlevelupamt}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardlevelupamt {config.sRewards.srewardlevelupamt + 1} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardlevelupamt {config.sRewards.srewardlevelupamt - 1} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Level Down Amount row++; ControlPanelelements.Add(XPUILabel($"Level Down Amount:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardleveldownamt}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardleveldownamt {config.sRewards.srewardleveldownamt + 1} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardleveldownamt {config.sRewards.srewardleveldownamt - 1} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable ResetStats Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Reset Stats Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardresetstats}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetstats 0 true srewards", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetstats 0 false srewards", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable ResetSkill Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Reset Skills Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardresetskills}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetskills 0 true srewards", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetskills 0 false srewards", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable RespecStats Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Respec Stat Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardresetstat}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetstat 0 true srewards", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetstat 0 false srewards", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable RespecSkill Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Respec Skill Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardresetskill}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetskill 0 true srewards", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetskill 0 false srewards", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Reset Stats Cost row++; ControlPanelelements.Add(XPUILabel($"Reset Stats Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardresetstatscost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetstatscost {config.sRewards.srewardresetstatscost + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetstatscost {config.sRewards.srewardresetstatscost - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Reset Skills Cost row++; ControlPanelelements.Add(XPUILabel($"Reset Skills Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardresetskillscost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetskillscost {config.sRewards.srewardresetskillscost + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetskillscost {config.sRewards.srewardresetskillscost - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Respec Stats Cost row++; ControlPanelelements.Add(XPUILabel($"Respec Stat Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardresetstatcost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetstatcost {config.sRewards.srewardresetstatcost + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetstatcost {config.sRewards.srewardresetstatcost - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Respec Skills Cost row++; ControlPanelelements.Add(XPUILabel($"Respec Skill Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardresetskillcost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetskillcost {config.sRewards.srewardresetskillcost + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardresetskillcost {config.sRewards.srewardresetskillcost - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Stat Level Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Stat Level Up Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardstatlevelcost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardstatlevelcost 0 true srewards", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardstatlevelcost 0 false srewards", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Stat Level Up Multiplier row++; ControlPanelelements.Add(XPUILabel($"Stat Cost Multiplier:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardstatlevelcostmultiplier}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardstatlevelcostmultiplier {config.sRewards.srewardstatlevelcostmultiplier + 1} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardstatlevelcostmultiplier {config.sRewards.srewardstatlevelcostmultiplier - 1} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Stat Costs row++; ControlPanelelements.Add(XPUILabel($"Mentality Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardmentality}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardmentality {config.sRewards.srewardmentality + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardmentality {config.sRewards.srewardmentality - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Dexterity Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewarddexterity}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewarddexterity {config.sRewards.srewarddexterity + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewarddexterity {config.sRewards.srewarddexterity - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Might Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardmight}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardmight {config.sRewards.srewardmight + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardmight {config.sRewards.srewardmight - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Captaincy Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardcaptaincy}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardcaptaincy {config.sRewards.srewardcaptaincy + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardcaptaincy {config.sRewards.srewardcaptaincy - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Weaponry Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardweaponry}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardweaponry {config.sRewards.srewardweaponry + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardweaponry {config.sRewards.srewardweaponry - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Ninjary Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardninjary}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardninjary {config.sRewards.srewardninjary + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardninjary {config.sRewards.srewardninjary - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Skill Level Cost row++; ControlPanelelements.Add(XPUILabel($"Enable Skill Level Up Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardskilllevelcost}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardskilllevelcost 0 true srewards", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardskilllevelcost 0 false srewards", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Skill Level Up Multiplier row++; ControlPanelelements.Add(XPUILabel($"Skill Cost Multiplier:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardskilllevelcostmultiplier}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardskilllevelcostmultiplier {config.sRewards.srewardskilllevelcostmultiplier + 1} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardskilllevelcostmultiplier {config.sRewards.srewardskilllevelcostmultiplier - 1} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Skill Costs row++; ControlPanelelements.Add(XPUILabel($"WoodCutter Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardwoodcutter}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardwoodcutter {config.sRewards.srewardwoodcutter + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardwoodcutter {config.sRewards.srewardwoodcutter - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Smithy Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardsmithy}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardsmithy {config.sRewards.srewardsmithy + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardsmithy {config.sRewards.srewardsmithy - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Miner Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardminer}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardminer {config.sRewards.srewardminer + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardminer {config.sRewards.srewardminer - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Forager Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardforager}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardforager {config.sRewards.srewardforager + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardforager {config.sRewards.srewardforager - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Hunter Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardhunter}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardhunter {config.sRewards.srewardhunter + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardhunter {config.sRewards.srewardhunter - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Fisher Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardfisher}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardfisher {config.sRewards.srewardfisher + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardfisher {config.sRewards.srewardfisher - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Crafter Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardcrafter}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardcrafter {config.sRewards.srewardcrafter + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardcrafter {config.sRewards.srewardcrafter - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Framer Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardframer}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardframer {config.sRewards.srewardframer + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardframer {config.sRewards.srewardframer - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Medic Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardmedic}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardmedic {config.sRewards.srewardmedic + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardmedic {config.sRewards.srewardmedic - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Scavenger Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardscavenger}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardscavenger {config.sRewards.srewardscavenger + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardscavenger {config.sRewards.srewardscavenger - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Electrician Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardelectrician}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardelectrician {config.sRewards.srewardelectrician + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardelectrician {config.sRewards.srewardelectrician - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Demolitionist Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardemolitionist}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardemolitionist {config.sRewards.srewardemolitionist + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardemolitionist {config.sRewards.srewardemolitionist - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); row++; ControlPanelelements.Add(XPUILabel($"Tamer Base Cost:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.sRewards.srewardtamer}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardtamer {config.sRewards.srewardtamer + 5} false srewards", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods srewardtamer {config.sRewards.srewardtamer - 5} false srewards", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.28", "0.29", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); #endregion CuiHelper.AddUi(player, ControlPanelelements); } private void OtherMods_Pets(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.023f; int buttonsize = 12; int fontsize = 11; int row = 5; ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton("xp.admin othermods main", 2, 0.030f, 15, "0 0 0 .7", $"<-- Back To Mod List", "0.02", "0.15", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"[Tamer Settings] (Requires Personal Animals plugin)", 3, 0.035f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); #region Tamer row++; // Enable / Disable row++; ControlPanelelements.Add(XPUILabel($"Enable Pets:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.enabletame}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerenable 0 true pets", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerenable 0 false pets", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Max Level row++; ControlPanelelements.Add(XPUILabel($"Max Level:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.maxlvl}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamermaxlevel {config.tamer.maxlvl + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamermaxlevel {config.tamer.maxlvl - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Max Cost to Start row++; ControlPanelelements.Add(XPUILabel($"Point Cost To Start:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.pointcoststart}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamercost {config.tamer.pointcoststart + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamercost {config.tamer.pointcoststart - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Cost Multiplier row++; ControlPanelelements.Add(XPUILabel($"Cost Multiplier:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.costmultiplier}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamercostmultiplier {config.tamer.costmultiplier + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamercostmultiplier {config.tamer.costmultiplier - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Chicken row++; ControlPanelelements.Add(XPUILabel($"Chicken:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.tamechicken}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerchicken 0 true pets", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerchicken 0 false pets", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Boar row++; ControlPanelelements.Add(XPUILabel($"Boar:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.tameboar}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerboar 0 true pets", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerboar 0 false pets", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Stag row++; ControlPanelelements.Add(XPUILabel($"Stag:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.tamestag}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerstag 0 true pets", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerstag 0 false pets", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Wolf row++; ControlPanelelements.Add(XPUILabel($"Wolf:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.tamewolf}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerwolf 0 true pets", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerwolf 0 false pets", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable Bear row++; ControlPanelelements.Add(XPUILabel($"Bear:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.tamebear}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerbear 0 true pets", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerbear 0 false pets", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Enable PolarBear row++; ControlPanelelements.Add(XPUILabel($"PolarBear:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.tamepolarbear}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerpolarbear 0 true pets", row, height, fontsize, "0.0 1.0 0.0 0", "T", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerpolarbear 0 false pets", row, height, fontsize, "1.0 0.0 0.0 0", "F", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Chicken Level row++; ControlPanelelements.Add(XPUILabel($"Chicken Level:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.chickenlevel}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerchickenlevel {config.tamer.chickenlevel + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerchickenlevel {config.tamer.chickenlevel - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Boar Level row++; ControlPanelelements.Add(XPUILabel($"Boar Level:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.boarlevel}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerboarlevel {config.tamer.boarlevel + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerboarlevel {config.tamer.boarlevel - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Stag Level row++; ControlPanelelements.Add(XPUILabel($"Stag Level:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.staglevel}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerstaglevel {config.tamer.staglevel + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerstaglevel {config.tamer.staglevel - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Wolf Level row++; ControlPanelelements.Add(XPUILabel($"Wolf Level:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.wolflevel}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerwolflevel {config.tamer.wolflevel + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerwolflevel {config.tamer.wolflevel - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Bear Level row++; ControlPanelelements.Add(XPUILabel($"Bear Level:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.bearlevel}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerbearlevel {config.tamer.bearlevel + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerbearlevel {config.tamer.bearlevel - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); // Polar Bear Level row++; ControlPanelelements.Add(XPUILabel($"Polar Bear Level:", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| {config.tamer.polarbearlevel}", row, height, TextAnchor.MiddleLeft, fontsize, "0.20", "0.25", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerpolarbearlevel {config.tamer.polarbearlevel + 1} false pets", row, height, buttonsize, "0.0 1.0 0.0 0", "⇧", "0.26", "0.27", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.config othermods tamerpolarbearlevel {config.tamer.polarbearlevel - 1} false pets", row, height, buttonsize, "1.0 0.0 0.0 0", "⇩", "0.27", "0.28", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelOtherMods); #endregion CuiHelper.AddUi(player, ControlPanelelements); } private void OtherMods_Backpacks(BasePlayer player, string page = "main", int option = 0) { var ControlPanelelements = new CuiElementContainer(); #region Layout var height = 0.023f; int fontsize = 11; int row = 5; double width = .006; string lableL = ".01"; string lableR = ".20"; string valueL = ".20"; string valueR = ".29"; string valuePL = ".30"; string valuePR = ".40"; string delL = ".02"; string delR = ".03"; int i = 0; #endregion ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelOtherMods); switch(page) { case "main": ControlPanelelements.Add(XPUIButton("xp.admin othermods main", 2, 0.030f, 15, "0 0 0 .7", $"<-- Back To Mod List", "0.02", "0.15", TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"[Backpacks Settings] (Requires Backpacks plugin)", 3, 0.035f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); row++; // Enable row++; ControlPanelelements.Add(XPUILabel($"Enable Backpacks:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPToggle($"xp.config backpacktoggle main", row, height, config.backpacksmod.enablebackpacks, valueL, width), XPerienceAdminPanelOtherMods); // Stat or Skill row++; ControlPanelelements.Add(XPUILabel($"Stat or Skill Control:", row, height, TextAnchor.MiddleLeft, fontsize, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"{XPLang($"{config.backpacksmod.statorskill}")}", row, height, TextAnchor.MiddleLeft, fontsize, valueL, valueR, "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.admin backpackselection {config.backpacksmod.statorskill} open", row, height, 12, "0 1 0 .25", $"Select Stat/Skill", valuePL, valuePR, TextAnchor.MiddleCenter), XPerienceAdminPanelOtherMods); //List of Options row++; row++; ControlPanelelements.Add(XPUIButton($"xp.admin newbackpack", row, height, 12, "0 1 0 .25", "Add New Backpack Level", ".01", ".20", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelOtherMods); row++; row++; ControlPanelelements.Add(XPUILabel($"| Delete |", row, height, TextAnchor.MiddleCenter, fontsize, "0.01", "0.05", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| Edit |", row, height, TextAnchor.MiddleCenter, fontsize, "0.06", "0.10", "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUILabel($"| Level | Size |", row, height, TextAnchor.MiddleCenter, fontsize, "0.10", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); var backpacklist = config.backpacksmod.BackPackSlots; if (backpacklist == null) { row++; ControlPanelelements.Add(XPUILabel($"No Backpack options created", row, height, TextAnchor.MiddleLeft, fontsize, "0.01", "0.20", "1 1 1 1"), XPerienceAdminPanelOtherMods); } else { foreach (var optionlist in backpacklist) { row++; i++; ControlPanelelements.Add(XPUIButton($"xp.admin deletebackpack {optionlist.Key}", row, height, fontsize, "0 0 0 .25", $"ⓧ", ".02", ".03", TextAnchor.MiddleCenter, "1 0 0 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.admin editbackpack {optionlist.Key}", row, height, fontsize, "0 0 0 .25", $"≡", ".07", ".08", TextAnchor.MiddleCenter, "1 1 0 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIButton($"xp.admin editbackpack {optionlist.Key}", row, height, fontsize, "0 0 0 .25", $"| {optionlist.Value.level} | {optionlist.Value.slots} |", "0.10", "0.20", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelOtherMods); } } break; case "edit": ControlPanelelements.Add(XPUILabel($"[Create/Edit Backpack Option]", 3, 0.035f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelOtherMods); var editbackpack = config.backpacksmod.BackPackSlots[option]; row++; ControlPanelelements.Add(XPUILabel($"Level:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelOtherMods, $"xp.config backpacks edit backpacklevel {option} {UserInputText}", row, height, 12, $"{editbackpack.level}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Slots:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelOtherMods); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelOtherMods, $"xp.config backpacks edit backpackslots {option} {UserInputText}", row, height, 12, $"{editbackpack.slots}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUIButton($"xp.admin othermods backpacks", row, height, 12, "0 1 0 .25", "Return", ".01", ".11", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelOtherMods); break; } CuiHelper.AddUi(player, ControlPanelelements); } private void OtherMods_BackpacksSelection(BasePlayer player, string selected) { var height = 0.025f; int fontsize = 10; int row = 2; var ControlPanelelements = new CuiElementContainer(); ControlPanelelements.Add(XPUIPanel(".5 .25", ".70 .90", "0 0 0 1"), XPerienceAdminPanelMain, XPerienceAdminPanelBackpackSelection); ControlPanelelements.Add(XPUILabel($"Select Stat or Skill:", row, height, TextAnchor.MiddleCenter, fontsize, ".01", ".99", "1 1 1 1"), XPerienceAdminPanelBackpackSelection); List options = new List { "mentality", "dexterity", "might", "weaponry", "ninjary", "captaincy", "woodcutter", "smithy", "miner", "fisher", "forager", "hunter", "crafter", "framer", "medic", "scavenger", "electrician", "demolitionist" }; for (int i = 0; i < options.Count; i++) { row++; row++; ControlPanelelements.Add(XPUIButton($"xp.admin backpackselection {options[i]}", row, height, fontsize, "0 1 0 .25", $"{XPLang($"{options[i]}")}", ".25", ".75", TextAnchor.MiddleCenter), XPerienceAdminPanelBackpackSelection); } row++; row++; ControlPanelelements.Add(XPUIButton($"xp.admin backpackselection close", row, height, fontsize, "1 0 0 .25", $"Close", ".25", ".75", TextAnchor.MiddleCenter), XPerienceAdminPanelBackpackSelection); CuiHelper.AddUi(player, ControlPanelelements); } #endregion private void AdminSoundEffectsPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.026f; double width = .006; int row = 4; string lableL = "0.01"; string lableR = "0.20"; string valueL = "0.20"; string valueR = "0.60"; // Page Title ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUILabel($"{XPLang("adminmenu_021", player.UserIDString)} - Sound effect path must be entered in config manually", 1, 0.090f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelSoundEffects); #region Enable/Disable ControlPanelelements.Add(XPUILabel($"[Sound Effect Settings]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.99", "1 1 1 1"), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Levelup Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects levelup", row, height, config.soundEffects.levelup, valueL, width), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Leveldown Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects leveldown", row, height, config.soundEffects.leveldown, valueL, width), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Rankup Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects rankup", row, height, config.soundEffects.rankup, valueL, width), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Statup Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects statup", row, height, config.soundEffects.statup, valueL, width), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Skillup Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects skillup", row, height, config.soundEffects.skillup, valueL, width), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Stat Reset Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects statreset", row, height, config.soundEffects.statreset, valueL, width), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Skill Reset Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects skillreset", row, height, config.soundEffects.skillreset, valueL, width), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Scavenger Loot Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects scavengerloot", row, height, config.soundEffects.scavengerloot, valueL, width), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"Enable Forager Item Drop Effect:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPToggle($"xp.config soundeffects foragerloot", row, height, config.soundEffects.foragerloot, valueL, width), XPerienceAdminPanelSoundEffects); row++; row++; #endregion #region Effects Paths ControlPanelelements.Add(XPUILabel($"[Sound Effect Paths]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.99", "1 1 1 1"), XPerienceAdminPanelSoundEffects); row++; ControlPanelelements.Add(XPUILabel($"(Full list of prefabs can be found at: https://www.corrosionhour.com/rust-prefab-list/)", row, height, TextAnchor.MiddleLeft, 10, "0.01", "0.99", "1 1 1 1"), XPerienceAdminPanelSoundEffects); row++; row++; ControlPanelelements.Add(XPUILabel($"Levelup Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects levelupeffect {UserInputText}", row, height, 12, $"{config.soundEffects.levelupeffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Leveldown Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects leveldowneffect {UserInputText}", row, height, 12, $"{config.soundEffects.leveldowneffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Rankup Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects rankupeffect {UserInputText}", row, height, 12, $"{config.soundEffects.rankupeffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Statup Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects statupeffect {UserInputText}", row, height, 12, $"{config.soundEffects.statupeffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Skillup Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects skillupeffect {UserInputText}", row, height, 12, $"{config.soundEffects.skillupeffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Stat Reset Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects statreseteffect {UserInputText}", row, height, 12, $"{config.soundEffects.statreseteffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Skill Reset Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects skillreseteffect {UserInputText}", row, height, 12, $"{config.soundEffects.skillreseteffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Scavenger Loot Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects scavengerlooteffect {UserInputText}", row, height, 12, $"{config.soundEffects.scavengerlooteffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"Forager Item Drop Effect:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSoundEffects); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSoundEffects, $"xp.config soundeffects foragerlooteffect {UserInputText}", row, height, 12, $"{config.soundEffects.foragerlooteffect}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); #endregion // End CuiHelper.AddUi(player, ControlPanelelements); } private void AdminSQLPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.030f; double width = .006; string lableL = ".01"; string lableR = ".15"; string valueL = ".17"; string valueR = ".40"; int row = 5; ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUILabel($"SQL Settings / Info", 1, 0.090f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelSQL); // Main SQL Settings ControlPanelelements.Add(XPUILabel($"[SQL Settings]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.30", "1 1 1 1"), XPerienceAdminPanelSQL); // Enable SQL row++; ControlPanelelements.Add(XPUILabel($"Enable SQL Save:", row, height, TextAnchor.MiddleLeft, 12, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPToggle($"xp.config sql sqlenable", row, height, config.sql.enablesql, valueL, width), XPerienceAdminPanelSQL); // Main SQL Settings row++; row++; ControlPanelelements.Add(XPUILabel($"[SQL Info] (change in config file)", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.50", "1 1 1 1"), XPerienceAdminPanelSQL); // SQL Info row++; ControlPanelelements.Add(XPUILabel($"SQL Host IP:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSQL, $"xp.config sql sqlhost {UserInputText}", row, height, 12, $"{config.sql.SQLhost}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"SQL Host Port:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSQL, $"xp.config sql sqlport {UserInputText}", row, height, 12, $"{config.sql.SQLport}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"SQL Host Database:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSQL, $"xp.config sql sqldatabase {UserInputText}", row, height, 12, $"{config.sql.SQLdatabase}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"SQL Host Username:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSQL, $"xp.config sql sqlusername {UserInputText}", row, height, 12, $"********", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); row++; ControlPanelelements.Add(XPUILabel($"SQL Host Password:", row, height, TextAnchor.MiddleLeft, 12, "0.01", "0.15", "1 1 1 1"), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelSQL); ControlPanelelements.Add(XPUIInput(XPerienceAdminPanelSQL, $"xp.config sql sqlpassword {UserInputText}", row, height, 12, $"********", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminResetPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.030f; int row = 7; ControlPanelelements.Add(XPUIPanel("0.16 0.0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"Reset Config / Players", 1, 0.090f, TextAnchor.MiddleLeft, 18, "0.01", "1", "1 1 1 1"), XPerienceAdminPanelReset); // Reset Config ControlPanelelements.Add(XPUILabel($"[Reset Config]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.25", "1 1 1 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUIButton($"xp.config reset resetconfig 0 true", row, height, 12, "1 0 0 1", "[ Reset Config ]", "0.30", "0.40", TextAnchor.MiddleCenter, "0 0 0 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"(Resets config back to default)", row, height, TextAnchor.MiddleLeft, 12, "0.50", "0.99", "1 1 1 1"), XPerienceAdminPanelReset); // Reset All Levels row++; row++; ControlPanelelements.Add(XPUILabel($"[Reset All Player Levels]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.25", "1 1 1 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUIButton($"xp.config reset resetalllevels 0 true", row, height, 12, "1 0 0 1", "[ Reset levels ]", "0.30", "0.40", TextAnchor.MiddleCenter, "0 0 0 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"(Resets all players level back to 0)", row, height, TextAnchor.MiddleLeft, 12, "0.50", "0.99", "1 1 1 1"), XPerienceAdminPanelReset); // Reset All Ranks row++; row++; ControlPanelelements.Add(XPUILabel($"[Reset All Player Ranks]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.25", "1 1 1 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUIButton($"xp.config reset resetallranks 0 true", row, height, 12, "1 0 0 1", "[ Reset Ranks ]", "0.30", "0.40", TextAnchor.MiddleCenter, "0 0 0 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"(Resets all players rank back to 0)", row, height, TextAnchor.MiddleLeft, 12, "0.50", "0.99", "1 1 1 1"), XPerienceAdminPanelReset); // Reset All Players row++; row++; ControlPanelelements.Add(XPUILabel($"[Reset All Players]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.25", "1 1 1 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUIButton($"xp.config reset resetall 0 true", row, height, 12, "1 0 0 1", "[ Reset Players ]", "0.30", "0.40", TextAnchor.MiddleCenter, "0 0 0 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"(Full Wipe of XPerience and all players)", row, height, TextAnchor.MiddleLeft, 12, "0.50", "0.99", "1 1 1 1"), XPerienceAdminPanelReset); // Reset Kill Records if (KillRecords != null) { row++; row++; ControlPanelelements.Add(XPUILabel($"[Reset All Kill Records]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.25", "1 1 1 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUIButton($"xp.config reset resetallkr 0 true", row, height, 12, "1 0 0 1", "[ Reset Kill Records ]", "0.30", "0.40", TextAnchor.MiddleCenter, "0 0 0 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"(Deletes all players kill records from Kill Records plugin)", row, height, TextAnchor.MiddleLeft, 12, "0.50", "0.99", "1 1 1 1"), XPerienceAdminPanelReset); } // Reset on Wipe row++; row++; ControlPanelelements.Add(XPUILabel($"[Reset XPerience on Wipe]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.25", "1 1 1 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"| {config.defaultOptions.wipedataonnewsave}", row, height, TextAnchor.MiddleLeft, 12, "0.30", "0.35", "1 1 1 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUIButton($"xp.config reset resetnewsave 0 true", row, height, 12, "0.0 1.0 0.0 0", "T", "0.40", "0.42", TextAnchor.MiddleCenter, "0.0 1.0 0.0 1.0"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUIButton($"xp.config reset resetnewsave 0 false", row, height, 12, "1.0 0.0 0.0 0", "F", "0.42", "0.44", TextAnchor.MiddleCenter, "1.0 0.0 0.0 1.0"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"(Full Wipe of XPerience when new save loaded or wiped)", row, height, TextAnchor.MiddleLeft, 12, "0.50", "0.99", "1 1 1 1"), XPerienceAdminPanelReset); // Fix Data row++; row++; ControlPanelelements.Add(XPUILabel($"[Fix Player Data]", row, height, TextAnchor.MiddleLeft, 15, "0.01", "0.25", "1 1 1 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUIButton($"xp.config reset fix 0 true", row, height, 12, "1 0 0 1", "[ Fix Player Data ]", "0.30", "0.40", TextAnchor.MiddleCenter, "0 0 0 1"), XPerienceAdminPanelReset); ControlPanelelements.Add(XPUILabel($"(Resets & Recalculates all player's data based on current xp)", row, height, TextAnchor.MiddleLeft, 12, "0.50", "0.99", "1 1 1 1"), XPerienceAdminPanelReset); CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminAddonPage(BasePlayer player) { var ControlPanelelements = new CuiElementContainer(); var height = 0.030f; ControlPanelelements.Add(XPUIPanel(".16 0", "1 1", "0 0 0 .7"), XPerienceAdminPanelMain, XPerienceAdminPanelAddon); // Addon Not Installed ControlPanelelements.Add(XPUILabel($"[XPerience Addon Not Installed]", 2, height, TextAnchor.MiddleLeft, 18, ".01", ".25", "1 1 1 1"), XPerienceAdminPanelAddon); ControlPanelelements.Add(XPUILabel($"You can get the XPerience Addon on Codefling https://codefling.com/ or join our discord at https://discord.rustlevels.com", 3, height, TextAnchor.MiddleLeft, 15, ".01", ".98", "1 1 1 1"), XPerienceAdminPanelAddon); ControlPanelelements.Add(new CuiLabel { Text = { Text = $"" + $"XPerience Addon adds many features including global event, damage bar UI, death records, welcome menu, player notes, global/player UI notifications, stat and skill abilities, special items drops such as xp boosters, stat/skill books, and much more. " + $"All servers with the XPerience Addon mod can also be publicly shown on RustLevels.com with their own page and player profiles that show all player data from XPerience and Kill Records(optional). " + $"Once purchased you must submit your server's IP or DNS to RustLevels discord at: https://discord.rustlevels.com so that it can be allowed to access RustLevels database and receive your Unique ServerIDKey to place in your Addon config file. This feature is completely optional. " + $"Please allow up to 48 hours for your server to be accepted." + $"\n\nPlayer steam badges can be hidden on RustLevels.com by config option.This will prevent steam badges for your server players being shown on our website however it will not prevent steam information from being shown on other public sites not releated to RustLevels. " + $"All player steam information is supplied by Steamworks API with permissions listed in steams privacy policy section 5.5 which RustLevels has no control over: https://store.steampowered.com/privacy_agreement/ " + $"\n\n" + $"Features:\n" + $"▫ More Stat/Skill abilities\n" + $"▫ Global Event\n" + $"▫ Damage Bar Popup UI\n" + $"▫ Global/Player Popup Notification UIs\n" + $"▫ Player Kills and Death records\n" + $"▫ Welcome Panel\n" + $"▫ Special Items (xp boosters, stat/skill books)\n" + $"▫ and more...\n" + $"\nPlugin Data Sent to RustLevels.com: (Optional)\n" + $"▫ XPerience\n" + $"▫ Kill Records\n" + $"▫ Personal Animals\n" + $"▫ Backpacks\n" + $"\n\n" + $"DiscordMessages Support: (requires DiscordMessages plugin)\n" + $"▫ Discord webhook URL\n" + $"▫ Option to send player rank up to discord\n" + $"▫ Option to send player level up to discord\n" + $"▫ Option to send player stat level up to discord\n" + $"▫ Option to send player skill level up to discord" + $"", FontSize = 13, Align = TextAnchor.UpperLeft, Color = "1 1 1 1" }, RectTransform = { AnchorMin = ".01 0", AnchorMax = ".98 .90" } }, XPerienceAdminPanelAddon); CuiHelper.AddUi(player, ControlPanelelements); return; } private void AdminElectricianSettings(BasePlayer player) { if (player == null) return; if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; var ElectricianSettings = new CuiElementContainer(); #region Layout int fontsize = 12; var height = 0.040f; int row = 2; string lableL = ".01"; string lableR = ".30"; string valueL = ".35"; string valueR = ".55"; #endregion ElectricianSettings.Add(new CuiPanel { Image = { Color = "0 0 0 1" }, RectTransform = { AnchorMin = "0.25 0.25", AnchorMax = "0.75 0.75" }, CursorEnabled = true }, "Overlay", XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUILabel($"Global Default Settings:", row, height, TextAnchor.MiddleCenter, 13, "0.01", "0.99", "1 1 1 1"), XPerienceAdminPanelElectricianSettings); // Solar Panel row++; row++; row++; ElectricianSettings.Add(XPUILabel($"Solar Panel Default MaxOutput:", row, height, TextAnchor.MiddleLeft, fontsize, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInput(XPerienceAdminPanelElectricianSettings, $"xp.electrician solarpaneldefault {UserInputText}", row, height, fontsize, $"{config.electrician.solarpaneldefault}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Small Battery row++; row++; ElectricianSettings.Add(XPUILabel($"Small Battery Default MaxOutput:", row, height, TextAnchor.MiddleLeft, fontsize, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInput(XPerienceAdminPanelElectricianSettings, $"xp.electrician smallbatterydefault {UserInputText}", row, height, fontsize, $"{config.electrician.smallbatterydefault}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Medium Battery row++; row++; ElectricianSettings.Add(XPUILabel($"Medium Battery Default MaxOutput:", row, height, TextAnchor.MiddleLeft, fontsize, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInput(XPerienceAdminPanelElectricianSettings, $"xp.electrician mediumbatterydefault {UserInputText}", row, height, fontsize, $"{config.electrician.mediumbatterydefault}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Large Battery row++; row++; ElectricianSettings.Add(XPUILabel($"Large Battery Default MaxOutput:", row, height, TextAnchor.MiddleLeft, fontsize, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInput(XPerienceAdminPanelElectricianSettings, $"xp.electrician largebatterydefault {UserInputText}", row, height, fontsize, $"{config.electrician.largebatterydefault}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Small Generator row++; row++; ElectricianSettings.Add(XPUILabel($"Small Generator Default MaxOutput:", row, height, TextAnchor.MiddleLeft, fontsize, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInput(XPerienceAdminPanelElectricianSettings, $"xp.electrician smallgeneratordefault {UserInputText}", row, height, fontsize, $"{config.electrician.smallgeneratordefault}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Test Generator row++; row++; ElectricianSettings.Add(XPUILabel($"Test Generator Default MaxOutput:", row, height, TextAnchor.MiddleLeft, fontsize, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInput(XPerienceAdminPanelElectricianSettings, $"xp.electrician testgeneratordefault {UserInputText}", row, height, fontsize, $"{config.electrician.testgeneratordefault}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Electric Windmill row++; row++; ElectricianSettings.Add(XPUILabel($"Electric Windmill Default MaxOutput:", row, height, TextAnchor.MiddleLeft, fontsize, lableL, lableR, "1 1 1 1"), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInputbackground(row, height, "0 0 .1 .75", valueL, valueR), XPerienceAdminPanelElectricianSettings); ElectricianSettings.Add(XPUIInput(XPerienceAdminPanelElectricianSettings, $"xp.electrician electricwindmilldefault {UserInputText}", row, height, fontsize, $"{config.electrician.electricwindmilldefault}", valueL, valueR, TextAnchor.MiddleLeft, "1 1 1 1")); // Close row++; row++; ElectricianSettings.Add(XPUIButton("xp.admin closeelectricianbox", row, height, fontsize, "1 0 0 1", "〘Close Default Settings〙", "0.25", "0.75", TextAnchor.MiddleCenter, "1 1 1 1"), XPerienceAdminPanelElectricianSettings); // UI End CuiHelper.AddUi(player, ElectricianSettings); } private void AdminProfileBackgrounds(BasePlayer player, int selected = 0, int page = 0) { if (player == null) return; if (!player.IsAdmin && !permission.UserHasPermission(player.UserIDString, Admin)) return; var AdminProfileBackgrounds = new CuiElementContainer(); AdminProfileBackgrounds.Add(new CuiPanel { Image = { Color = "0 0 0 0" }, RectTransform = { AnchorMin = $".5 .5", AnchorMax = $".5 .5", OffsetMin = $"-300 -200", OffsetMax = $"300 200" }, CursorEnabled = true }, "Overlay", XPerienceAdminPanelProfileBackgrounds); int current = 0; int bgid = 0; var bglist = config.imageicons.bgimages; int total = config.imageicons.bgimages.Count; foreach (var bgimg in bglist) { if (current >= page && current < page + 1) { int pos = (current - page); // Image AdminProfileBackgrounds.Add(new CuiElement { Parent = XPerienceAdminPanelProfileBackgrounds, Components = { new CuiRawImageComponent { Png = ImageLibrary?.Call("GetImage", bgimg.Value.name) }, new CuiRectTransformComponent { AnchorMin = ".01 .1", AnchorMax = ".99 .99" } } }); // ID bgid = bgimg.Key; } current++; } // Buttons AdminProfileBackgrounds.Add(XPUIPanel(".1 0", ".9 .08", "0 0 0 1"), XPerienceAdminPanelProfileBackgrounds, "BGButtons"); int back = page <= 1 ? 0 : page - 1; int next = page + 1 >= current ? page : page + 1; // Prev Page if (page >= 1) { AdminProfileBackgrounds.Add(XPUIButton($"xp.admin openprofilebg {bgid} {back}", 1, 1f, 20, "0 0 0 0", "⇦", ".1", ".2", TextAnchor.MiddleCenter, "1 1 0 1"), "BGButtons"); } // Next Page if (page + 1 < total) { AdminProfileBackgrounds.Add(XPUIButton($"xp.admin openprofilebg {bgid} {next}", 1, 1f, 20, "0 0 0 0", "⇨", ".8", ".9", TextAnchor.MiddleCenter, "1 1 0 1"), "BGButtons"); } if(bgid == config.playerprofilesettings.profilebg) { AdminProfileBackgrounds.Add(XPUIButton($"", 1, 1f, 13, "0 0 0 0", "〘Selected〙", ".3", ".45", TextAnchor.MiddleCenter, "0 1 0 1"), "BGButtons"); } else { AdminProfileBackgrounds.Add(XPUIButton($"xp.config playerbg profilebg {bgid} false {page}", 1, 1f, 13, "0 0 0 0", "〘Select〙", ".3", ".45", TextAnchor.MiddleCenter, "1 0 0 1"), "BGButtons"); } AdminProfileBackgrounds.Add(XPUIButton("xp.admin closeprofilebg", 1, 1f, 13, "0 0 0 0", "〘Close〙", ".55", ".7", TextAnchor.MiddleCenter, "1 0 0 1"), "BGButtons"); CuiHelper.AddUi(player, AdminProfileBackgrounds); } #endregion #region Lang private string XPLang(string key, string id = null, params object[] args) => string.Format(lang.GetMessage(key, this, id), args); protected override void LoadDefaultMessages() { lang.RegisterMessages(new Dictionary { ["adminpanel"] = "Admin", ["adminmenu_001"] = "Main", ["adminmenu_002"] = "Level / XP", ["adminmenu_003"] = "Stats", ["adminmenu_004"] = "Skills", ["adminmenu_005"] = "Other Settings", ["adminmenu_006"] = "SQL", ["adminmenu_0070"] = "Save Settings", ["adminmenu_0080"] = "Reload Plugin", ["adminmenu_009"] = "CLOSE", ["adminmenu_010"] = "Reset Default Settings", ["adminmenu_011"] = "Fix Player Data", ["adminmenu_012"] = "Other Mod Settings", ["adminmenu_013"] = "Reset Options", ["adminmenu_014"] = "My Stats", ["adminmenu_015"] = "Player's Stats", ["adminmenu_016"] = "Player Info", ["adminmenu_017"] = "XPerience Addon", ["adminmenu_018"] = "Daily Limits", ["adminmenu_019"] = "Calculations", ["adminmenu_020"] = "Ranks", ["adminmenu_021"] = "Sound Effects", ["adminmenu_022"] = "Player Profiles", ["adminmenu_023"] = "Image URLs", ["adminmenu_024"] = "Special Groups", ["adminitemchange"] = "{0} condition is now {1} and max condition is now {2}", ["adminitemchangerequirement"] = "{0} current condition is {1} and max condition is {2}\nTo change this use /{3} (condition value) (maxcondition value)", ["adminfixplayers"] = "All player data has been reset except experience.\nLevels, points and requirements recalculated.", ["adminresetconfig"] = "Config has been reset to default values.", ["saveconfig"] = "New Config has been Saved", ["admininfoliveui"] = "Default Live UI Location", ["adminxp_001"] = "Level & XP Settings", ["adminxp_002"] = "[Level / Point Settings]", ["adminxp_003"] = "Level Start:", ["adminxp_004"] = "Rank Settings:", ["playerfixdata"] = "Your data has been fixed and your level recalculated. You will need to reapply your stat & skill points", ["playersettings"] = "My Settings", ["playerconfirmationprompt"] = "Show Confirmation Prompt", ["playerfixdatabutton"] = "Fix My Data", ["playerautoranks"] = "Auto Rank Up", ["playerdashpaneltype"] = "Dash Panel Type", ["playerdisablefuelgauge"] = "Disable Fuel Gauge", ["playerdisablespeedometer"] = "Disable Speedometer", ["playerspeedometertype"] = "Speedometer Type", ["playerharveststats"] = "Total Harvest Count", ["playerharvestreset"] = "Player harvest count has been reset", ["selectedplayerharvestreset"] = "Player {0} harvest count has been reset", ["playerlevelreset"] = "Player level has been reset", ["allplayerlevelreset"] = "All Player levels have been reset", ["selectedplayerlevelreset"] = "Player {0} level has been reset", ["playerrankreset"] = "Player rank has been reset", ["allplayerrankreset"] = "All Player ranks have been reset", ["selectedplayerrankreset"] = "Player {0} rank has been reset", ["playerresetdisabled"] = "Player reset disabled, contact server admin", ["playersearchdisabled"] = "Player searching is currently disabled", ["imgwaiting"] = "Waiting On ImageLibrary to finish the load order", ["zonedisabled"] = "You have entered a restricted zone. All Stat/Skill abilities have been disabled.", ["zoneenabled"] = "You have left the restricted zone. All Stat/Skill abilities have been enabled.", ["enterraidbase"] = "You have entered a raidable base. All Stat/Skill abilities have been disabled.", ["exitraidbase"] = "You have left the raidable base. All Stat/Skill abilities have been enabled.", ["zonenoedit"] = "You are in a restricted zone. Stat/Skill abilities cannot be edited.", ["resettimerdata"] = "{0} mins", ["xphelpnew"] = "XPerience Plugin by M@CHIN3 - (Most features can be accessed easily within this panel without the need to use chat commands.) \n\n Chat Commands: \n" + "/{0} - Opens your profile UI \n" + "/{1} - Show your profile in chat \n" + "/{2} - Opens top players UI \n" + "/{3} (stat) - level up selected stat \n" + "/{4} (skill) - level up selected skill \n" + "/{5} - resets all stats and refunds points \n" + "/{6} - resets all skills and refunds points \n" + "/{7} (0-5) - Live UI Location / 0 = off", ["xphelpadmin"] = "XPerience Plugin by M@CHIN3 \n Admin Commands: \n" + "/{0} - Opens admin control panel for mod setup" + "/{1} - resets entire mod and deletes all player data \n" + "/{2} (playername) - resets selected player data \n" + "/{3} (playername) (amount) - gives x amount of experience to selected player \n" + "/{4} (playername) (amount) - takes x amount of experience from selected player \n" + "/{5} (conditionvalue) (maxconditionvalue) - changes the item condition and max condition in your hand", ["playerprofilechatnew"] = "My Stats: \n" + "---------------- \n" + "Level: {0} \n" + "Current XP: {1} \n" + "Next Level: {2} \n" + "Stat Points: {3} \n" + "Skill Points: {4} \n" + "---------------- \n" + "Mentality: {5} \n" + "Dexterity: {6} \n" + "Might: {7} \n" + "Captaincy: {8} \n" + "Weaponry: {9} \n" + "Ninjary: {10} \n" + "---------------- \n" + "WoodCutter: {11} \n" + "Smithy: {12} \n" + "Miner: {13} \n" + "Forager: {14} \n" + "Hunter: {15} \n" + "Fisher: {16} \n" + "Crafter: {17} \n" + "Framer: {18} \n" + "Medic: {19} \n" + "Scavenger: {20} \n" + "Electrician: {21} \n" + "Demolitionist: {22} \n" + "Tamer: {23} \n", ["plusxp"] = "+{0} XP", ["suicide"] = "You have lost {0} XP for commiting suicide", ["death"] = "Your XP has been reduced by {0} for death", ["levelup"] = "You are now Level {0}. You have recieved {1} stat point and {2} skill points", ["leveldown"] = "You have lost a level! You are now Level {0}", ["statdown"] = "You have lost {0} stats points", ["skilldown"] = "You have lost {0} skill points", ["statdownextra"] = "You did not have enough unspent stat points to take, your ({0}) stat has been lowered and you have lost {1} stats points, {2} stat points returned to your unspent amount", ["skilldownextra"] = "You did not have enough unspent skill points to take, your ({0}) skill has been lowered and you have lost {1} skill points, {2} skill points returned to your unspent amount", ["bonus"] = "You get a bonus {0} XP for {1} {2}", ["notenoughpoints"] = "You do not have enough points", ["notenoughstatpoints"] = "You do not have enough points for level {0} {1}, requires {2} statpoints", ["notenoughskillpoints"] = "You do not have enough points for level {0} {1}, requires {2} skillpoints", ["pointsadded"] = "you now have {0} points applied in {1}", ["pointsremoved"] = "you have remove {0} points from {1}", ["statup"] = "You used {0} statpoints to reach Level {1} in {2}", ["skillup"] = "You used {0} skillpoints to reach Level {1} in {2}", ["nostatpoints"] = "You have lost all stat points", ["noskillpoints"] = "You have lost all skill points", ["resetstats"] = "You have reset your stats and have {0} stat points returned", ["resetstat"] = "You have reset your {0} stat and have {1} stat points returned", ["resetskills"] = "You have reset your skills and have {0} skill points returned", ["resetskill"] = "You have reset your {0} skill and have {1} skill points returned", ["attackerdodge"] = "Your victim dodged your attack", ["attackerblock"] = "Your victim blocked {0} damage from your attack", ["boatspeed"] = "Boat Speed", ["boatspeedon"] = "Boat Speed Boost Activated", ["boatspeedoff"] = "Boat Speed Boost Deactivated", ["boatspeedmessage"] = "Press RELOAD to activate/deactivate speed boost", ["horsespeed"] = "Horse Speed", ["horsespeedon"] = "Horse Speed Boost Activated", ["horsespeedoff"] = "Horse Speed Boost Deactivated", ["horsespeedmessage"] = "Press USE to activate/deactivate speed boost", ["vehiclespeed"] = "Vehicle Speed", ["vehiclespeedon"] = "Vehicle Speed Boost Activated", ["vehiclespeedoff"] = "Vehicle Speed Boost Deactivated", ["vehiclespeedmessage"] = "Press RELOAD to activate/deactivate speed boost", ["minispeedon"] = "MiniCopterP Speed Boost Activated", ["minispeedoff"] = "MiniCopterP Speed Boost Deactivated", ["minispeedmessage"] = "Press RELOAD to activate/deactivate speed boost", ["vehiclefuelreduce"] = "Fuel Reduction Chance", ["victimdodge"] = "You dodged last attack", ["victimblock"] = "You blocked {0} damage from last attack", ["crithit"] = "You preformed a critical hit for {0} extra damage", ["weaponcon"] = "New weapon condition is now {0}", ["medictools"] = "Medical Tools", ["medicteas"] = "Healing Teas", ["medichealingtimer"] = "Heal Every", ["medichealingamount"] = "Healing Amount", ["medictooluseowner"] = "You gave an extra {0} health from {1} to {2}", ["medictooluse"] = "You recived an extra {0} health from {1}", ["medicrecoverplayer"] = "You have recovered with an extra {0} health.", ["medicreviveplayer"] = "You have been revived with an extra {0} health.", ["medicrevivereviver"] = "You have revived player with an extra {0} health.", ["captaincyskillboost"] = "Team Skill Boost", ["captaincyxpboost"] = "Team XP Boost", ["captaincydistance"] = "Effective Distance", ["captaincyteamrequired"] = "Must be part of a team!", ["weaponrychance"] = "Condition Reduction Chance", ["weaponrytools"] = "Hand Tool Condition", ["weaponrypowertools"] = "Power Tool Condition", ["weaponryweaponsmelee"] = "Melee Weapon Condition", ["weaponryweaponsprojectile"] = "Projectile Weapon Condition", ["weaponryweaponsammo"] = "Max Ammo", ["techtreelocked"] = "Tech Tree Is Locked By Server.", ["techtreereq"] = "You must have a Mentality level of {0} to unlock tech tree items.", ["techtreestatus"] = "Tech Tree Status:", ["playerinfoalive"] = "Player Info Since Last Spawn:", ["timealive"] = "Alive", ["timeflying"] = "Flying Time", ["timedriving"] = "Driving Time", ["timeboating"] = "Boating Time", ["timesleeping"] = "Sleeping Time", ["timeswimming"] = "Swimming Time", ["timeinbase"] = "Time In Base", ["timedmgrec"] = "Last Dmg Recieved", ["timedmgrecfrom"] = "Last Dmg From", ["timedmgdelt"] = "Last Dmg Delt", ["timedeltto"] = "Last Dmg To", ["timeinmonument"] = "Time In Monuments", ["timeinwild"] = "Time In Wilderness", ["playtime"] = "Playtime", ["status"] = "Status", ["online"] = "Online", ["offline"] = "Offline", ["metersran"] = "Meters Ran", ["meterswalk"] = "Meters Walked", ["level"] = "Level", ["experience"] = "Experience", ["basiclevel"] = "Level", ["basicexperience"] = "Experience", ["xp"] = "XP", ["points"] = "Points", ["months"] = "Months", ["weeks"] = "Weeks", ["days"] = "Days", ["hours"] = "Hours", ["mins"] = "Mins", ["secs"] = "Secs", ["mentality"] = "Mentality", ["dexterity"] = "Dexterity", ["might"] = "Might", ["captaincy"] = "Captaincy", ["weaponry"] = "Weaponry", ["ninjary"] = "Ninjary", ["woodcutter"] = "WoodCutter", ["smithy"] = "Smithy", ["miner"] = "Miner", ["forager"] = "Forager", ["hunter"] = "Hunter", ["fisher"] = "Fisher", ["crafter"] = "Crafter", ["framer"] = "Framer", ["medic"] = "Medic", ["scavenger"] = "Scavenger", ["electrician"] = "Electrician", ["demolitionist"] = "Demolitionist", ["tamer"] = "Tamer", ["stats"] = "Stats", ["skills"] = "Skills", ["statistics"] = "Statistics", ["raids"] = "Raids", ["topplayers"] = "Top Players", ["close"] = "Close", ["profile"] = "Profile", ["myprofile"] = "My Profile", ["settings"] = "Settings", ["researchcost"] = "Research Cost", ["researchspeed"] = "Research Speed", ["critchance"] = "Critical Chance", ["critdmgamount"] = "Critical Damage", ["damagenpc"] = "Damage (NPC)", ["blockchance"] = "Block Chance", ["dodgechance"] = "Dodge Chance", ["fishamount"] = "Fish Amount", ["fishitems"] = "Item Amount", ["fishoxygen"] = "Oxygen Reduction", ["fishoxygentank"] = "Oxygen Tank Reduction", ["armor"] = "Armor", ["tea"] = "Tea Boost", ["teatypenone"] = "None", ["teatypemaxhealthtea"] = "Basic", ["teatypemaxhealthtea.advanced"] = "Advanced", ["teatypemaxhealthtea.pure"] = "Pure", ["melee"] = "Melee Damage", ["calories"] = "Max Calories", ["hydration"] = "Max Hydration", ["bleed"] = "Bleeding Time", ["radiation"] = "Radiation", ["radiationpoison"] = "Radiation Poison", ["heat"] = "Heat Tolerance", ["cold"] = "Cold Tolerance", ["craftspeed"] = "Crafting Speed", ["woodgather"] = "Wood Gathering", ["clothgather"] = "Cloth Gathering", ["woodbonus"] = "Bonus Gathering", ["woodapple"] = "Apple Chance", ["productionrate"] = "Production Chance", ["productionspeed"] = "Production Speed", ["productionamount"] = "Amount", ["fuelconsumption"] = "Fuel Consumption", ["fuelconsumptionhats"] = "Fuel Consumption (hats)", ["metalchance"] = "Metal Fragment Chance", ["metalamount"] = "Metal Fragment Amount", ["hmetalchance"] = "High Quality Chance", ["hmetalamount"] = "High Quality Amount", ["oregather"] = "Ore Gathering", ["orebonus"] = "Bonus Gathering", ["gather"] = "Gathering", ["seedbonus"] = "Seed Bonus", ["randomitem"] = "Random Item", ["foodgather"] = "Food Gathering", ["bonusgather"] = "Bonus Gathering", ["damagewildlife"] = "Damage (wildlife)", ["nightdamage"] = "Night Damage (wildlife)", ["bowdamage"] = "Bow Damage", ["costreduction"] = "Cost", ["fullrepair"] = "Full Repair Chance", ["highcond"] = "Higher Condition Chance", ["upgradecost"] = "Upgrade Cost", ["repairtime"] = "Repair Time", ["repaircost"] = "Repair Cost", ["currentlevel"] = "Current Level", ["nextlevel"] = "Next Level", ["maxlevel"] = "Max Level", ["used"] = "Used", ["available"] = "Available", ["abilities"] = "Abilities", ["options"] = "Options", ["levelupbutton"] = "Level Up", ["reset"] = "Reset", ["history"] = "History", ["kills"] = "Kills", ["deaths"] = "Deaths", ["yes"] = "Yes", ["no"] = "No", ["autorankoffmaxlevel"] = "You have reached max level {0} of rank {1}. Click rank up in your profile or Turn on auto ranks in settings to rank up.", ["medicrevive"] = "Revival Health", ["medicrecover"] = "Recover Health", ["mediccrafting"] = "Mixing Table Speed", ["scavchance"] = "Extra Loot Chance", ["scavmultiplier"] = "Extra Loot Multiplier", ["customscavchance"] = "Custom Loot Chance", ["customscavmultiplier"] = "Custom Loot Multiplier", ["unusedstatpoints"] = "Stat Points", ["unusedskillpoints"] = "Skill Points", ["totalspent"] = "Points Used", ["liveuilocationoff"] = "Live XP UI Stats are off", ["dmgbarskin"] = "Damage Bar Skin", ["profilebg"] = "Profile UI Background", ["liveuilocation"] = "Live XP UI location is {0}", ["liveuilocationhelp"] = "/xpliveui (0-4) - Live UI Location / 0 = off \n Current UI location is {0}", ["resetstatsbutton"] = "Reset Stats", ["minsolarpanelinput"] = "Min Solar Panel Input", ["solarpanelinput"] = "Solar Panel Input", ["solarpaneloutput"] = "Solar Panel Max Output", ["smallbatteryoutput"] = "Small Battery Max Output", ["mediumbatteryoutput"] = "Medium Battery Max Output", ["largebatteryoutput"] = "Large Battery Max Output", ["smallgeneratoroutput"] = "Small Generator Max Output", ["testgeneratoroutput"] = "Test Generator Max Output", ["windmilloutput"] = "Windmill Output", ["windmillmaxoutput"] = "Windmill Max Output", ["resetskillsbutton"] = "Reset Skills", ["nopermordisabled"] = "Stat/Skill disabled or you do not have permission to use.", ["chicken"] = "Chicken", ["boar"] = "Boar", ["stag"] = "Stag", ["wolf"] = "Wolf", ["bear"] = "Bear", ["polarbear"] = "PolarBear", ["tamerinc"] = "Increase Tamer to tame animals", ["tamerpets"] = "Tameable Pets", ["topplayers"] = "Top Players", ["resetxperience"] = "All XPerience player data deleted", ["resettimerstats"] = "You have {0} mins left before you can reset your stats", ["resettimerskills"] = "You have {0} mins left before you can reset your skills", ["canresetstats"] = "{0} mins", ["canresetskills"] = "{0} mins", ["victimarmordmg"] = "Armor Absorbed {0} Damage", ["armordmgabsorb"] = "Armor Damage", ["liveuiselection"] = "LiveUI Location", ["mystats"] = "My Stats", ["help"] = "HELP", ["helpprev"] = "⇦ Prev Page", ["helpnext"] = "Next Page ⇨", ["helpcommands"] = "Chat Commands", ["helpcommandslist"] = "Note that many of these commands can be used within your control panel without using chat. \n\n" + "/{0} - shows chat commands in chat \n\n" + "/{1} - brings up your control panel \n\n" + "/{1} (playername) = brings up another players full profile \n\n" + "/{2} - shows your level, xp, stats, and skills in chat \n\n" + "/{3} - brings up top players panel \n\n" + "/{4} (stat) - level up selected stat \n\n" + "/{5} (skill) - level up selected skill \n\n" + "/{6} - resets all stats and refunds points \n\n" + "/{7} - resets all skills and refunds points \n\n" + "/{8} (0-5) - Live UI Location / 0 = off \n\n", ["moddetails"] = "About XPerience Created by:", ["bindkey"] = "You can bind any key to open your XPerience control panel. \n" + "Press F1 to open your console \n" + "Decide what key you want to bind the command to \n" + "Type bind 0 chat.say /{0} \n" + "This will bind the 0 key to open the control panel. \n" + "Next execute the writecfg command in your console to save the config so it won't reset when you relaunch the game", ["aboutxperience"] = "\n\n XPerience is an extremely detailed RPG based mod that allows players to earn experience and levels by interacting with all aspects of the game. You can earn experience from just about " + "anything from cutting down trees, mining ore, hunting, killing, fishing, building, and more.. As you earn experience you will progress in levels that grant stat points and skill points you can spend in different traits " + "that will give you increased abilities. There are currently 4 major Stats and 11 secondary Skills each with their own special attributes, more may come in the future. Stats will grant you overall character strengths while Skills grant you increased abilities when " + "interacting with the world. For every level you increase these traits it will increase the strength of the abilities that each one gives you. The higher the level of each trait the more points it requires to reach the next level. " + "Server owners can configure and adjust every aspect of the XPerience mod including level requirements, level multiplier, xp gained from each source, points awarded per level, point cost per level, bonuses, stat and skill strengths per level, max level of stats " + "and skills, reset timers, and more.", ["serversettings"] = "Every server that uses XPerience can be setup differently to fit their preference. Below are some of the settings for this server. Many things can effect these values like other mods that may be installed. \n\n" + "[MAIN SETTINGS] Levels, Multipliers, Points, Timers, etc..\n" + "Level Start: {0} | Required XP to reach level 1 \n" + "XP Requirment: {1} | XP Requirement increase for next level ex. ({0} + {1} to reach level 2) \n" + "Level XP Boost: {2}% | XP increase per level \n" + "Stat Points Earned Per Level: {3} \n" + "Skill Points Earned Per Level: {4} \n" + "Reset Timers: Enabled:{5} Stats {6} / Skills {7} | Time in mins before you can reset your stats or skills \n" + "VIP Reset Timers: Stats {8} / Skills {9} | Time in mins before VIP players can reset stats and skills \n" + "Night Bonus XP: Enabled:{10} | {11}% | Bonus XP received between {12}:00 and {13}:00 hours game time if enabled \n" + "Night Skills Enabled: {14} | Skills that have bonuses at night between {12}:00 and {13}:00 hours game time \n\n", ["xpsettings"] = "[XP Settings]: Amount of XP earned for kills, gathering, building, crafting, etc.. \n", ["xpsettingskills"] = "[Kills & Revive] \n\n" + "Chickens: {0} \n" + "Fish: {1} \n" + "Boar: {2} \n" + "Stag: {3} \n" + "Wolf: {4} \n" + "Bear: {5} \n" + "Shark: {6} \n" + "Horse: {7} \n" + "Scientist: {8} \n" + "Dweller: {9} \n" + "Player: {10} \n" + "Bradley: {11} \n" + "Helicopter: {12}\n\n" + "Reviving: {13}", ["xpsettingsloot"] = "[Gathering / Looting] \n\n" + "Loot Container: {0} \n" + "Underwater Loot Container: {1} \n" + "Locked Crate: {2} \n" + "Hackable Crate: {3} \n" + "Animal Harvest: {4} \n" + "Corpse Harvest: {5} \n" + "Tree: {6} \n" + "Ore: {7} \n" + "Gathering: {8} \n" + "Plant: {9}", ["xpsettingscraft"] = "[Crafting / Building] \n\n" + "Crafting: {0} \n" + "Wood Structure: {1} \n" + "Stone Structure: {2} \n" + "Metal Structure: {3} \n" + "Armored Structure: {4} \n", ["xpmissionsettings"] = "[Missions] \n\n" + "Mission Succeeded: {0} \n" + "Failed Reduction Enabled: {1} \n" + "Failed Reduction Amount: {2} \n", ["xpreductionsettings"] = "[XP Reduction] \n\n" + "Death: {0}% Enabled: {1}\n" + "Suicide: {2}% Enabled: {3}\n", ["nextpagestats"] = "To view details about Stats and Skills click Next Page at the top.", ["aboutstats"] = "The 4 major Stats are Mentality, Dexterity, Might & Captaincy.", ["aboutmentality"] = "Grants you the ability to lower research costs such as the amount of scrap required to unlock new items, Reduces Research Speed that decreases the amount of time it takes to research items in the research station, " + "gives you increased chance to attack with a critical hit and cause more damage to an enemy or animal, and give you a damage increase to NPCs", ["aboutmentalitysettings"] = "[Current Mentality Settings] \nMax Level: {0} \nStarting Cost: {1} \nCost Multiplier: {2}x Level \nResearch Cost Reduction: {3}% \nResearch Speed Reduction: {4}% \n" + "Critical Chance: {5}%", ["aboutdexterity"] = "Grants you increased chance to Block attacks and lower the amount of damage you recieve, increased the chance to Dodge an attack completely and take no damage, and decrease the damage you recieve when your Armor bar is " + "full (Armor requires Might). It also give you a speed boost for horses, vehicles, and boats with a chance of consuming less fuel.", ["aboutdexteritysettings"] = "[Current Dexterity Settings]\nMax Level: {0} \nStarting Cost: {1} \nCost Multiplier: {2}x Level \nBlock Chance: {3}% | Block Amount: {4} \nDodge Chance: {5}% \nReduced Armor Damage: {6}%", ["aboutmight"] = "This is one of the most beneficial stats in the system! It grants you the ability to reduce bleeding time, radiation taken, greater tolerance to heat and cold, higher max calories and hydration, increased max health (Armor) " + "as well as increases the damage you do with melee weapons.", ["aboutmightsettings"] = "[Current Might Settings] \nMax Level: {0} \nStarting Cost: {1} \nCost Multiplier: {2}x Level \nArmor: {3}% | Increased Max Health \nMelee Damage Increase: {4}% \n" + "Metabolism Increase: {5}% | Thirst/Hunger \nBleed Reduction: {6}% \nRadiation Reduction: {7}% \nIncreased Heat Tolerance: {8}% \nIncreased Cold Tolerance: {9}%", ["aboutcaptaincy"] = "Gives other team members overall skill boosts and XP boost within a certain range. Stacks on a % increase of the team members skills to increase the skills abilities for each team member seperatly based on the skill level of each member. Only effects skills and not stats. Requires at least 2 members in a team and has no effect on the current player.", ["aboutcaptaincysettings"] = "[Current Captaincy Settings]\nMax Level: {0} \nStarting Cost: {1} \nCost Multiplier: {2}x Level \nEffective Distance: {3}FT \nSkill Boost: {4}%\n XP Boost Enabled: {5}\n XP Boost: {6}%", ["aboutweaponry"] = "Gives you a chance to have less condition damage when using tools, power tools, melee weapons, projectile weapons, so they last longer. It also give you a bonus ammo amount so projectile weapons hold more ammo per clip.", ["aboutweaponrysettings"] = "[Current Weaponry Settings]\nMax Level: {0} \nStarting Cost: {1} \nCost Multiplier: {2}x Condition Reduction Chance: {3}% \nHand Tools: {4}%\nPower Tools: {5}%\nMelee Weapons: {6}%\nProjectile Weapons: {7}%\nMin Damage Allowed: {8}%\nMax Ammo Increase: {9}%", ["aboutskills"] = "The 11 secondary skills are Woodcutter, Smithy, Miner, Forager, Hunter, Crafter, Framer, Fisher, Medic, Scavenger & Tamer\n(taming requires pets mod and may not be available on certain servers).", ["aboutwoodcutter"] = "Increases the amount of wood you receive from cutting down trees, increases the bonus amount you get when a tree has been cut down, and gives you increased chances to have apples fall while cutting a tree.", ["aboutwoodcuttersettings"] = "[Current WoodCutter Settingss] \nMax Level: {0} \nStarting Cost: {1} \nCost Multiplier: {2}x Level \nGather Rate: +{3}% \nBonus: +{4}% \nApple Chance: {5}%", ["aboutsmithy"] = "Increases the chance of extra production from smelting or cooking in a furnace or grill and reduces the amount of fuel used in a furnace or grill so they burn longer with less fuel.", ["aboutsmithysettings"] = "[Current Smithy Settings]\nMax Level: {0} \nStarting Cost: {1} \nCost Multiplier: {2}x Level \nIncreased Production: {3}% \n Fuel Consumption: -{4}%", ["aboutminer"] ="Increases the amount of ore gathered from stone, metal, sulfur, etc.. and the amount of bonus material recieved when an ore has been fully collected. This skill also reduces the amount of fuel used when wearing a hat that consumes fuel like the mining hat, candle hat, etc..", ["aboutminersettings"] = "[Current Miner Settings]\nMax Level: {0}\nStarting Cost: {1}\nCost Multiplier: {2}\nGather Rate: +{3}%\nBonus: +{4}%\nFuel Consumption: -{5}%", ["aboutforager"] = "Increases the amount of resources you receive when collecting by hand from the ground such as wood, stone, metal, sulfer, berries, mushrooms, etc.. anything collected on the ground by hand. You also get an increased amount of seeds from berries, hemp, and other resources that provide seeds. This skill also gives you an increased chance to find random items when gathering by hand so make sure you keep an eye out around you for random item.", ["aboutforagersettings"] = "[Current Forager Settings]\nMax Level: {0}\nStarting Cost: {1}\nCost Multiplier: {2}\nGather Rate: +{3}%\nSeed Chance: +{4}% Amount: {5}\nRandom Item: {6}%", ["abouthunter"] = "Grants you the ability to get more food from animals when harvesting, increased bonus amount when fully harvested, increased damage to wildlife and even greater damage to wildlife when hunting at night.", ["abouthuntersettings"] = "[Current Hunter Settings]\nMax Level: {0}\nStarting Cost: {1}\nCost Multiplier: {2}\nGather Rate: +{3}%\nBonus: +{4}%\nWildlife Dmg Increase: +{5}%\nNight Dmg Increase: +{6}%", ["aboutcrafter"] = "Grants you increased crafting speed while reducing the amount of material cost when crafting. Gives you increased chance to fully repair items and increased chance to create items with up to 10% higher condition.", ["aboutcraftersettings"] = "[Current Crafter Settings]\nMax Level: {0}\nStarting Cost: {1}\nCost Multiplier: {2}\nCraft Speed: -{3}%\nCraft Cost: -{4}%\nRepair Speed: {5}%\nCondition Chance: {6}%\nCondition Increase: +10%", ["aboutframer"] = "Decreases the cost of materials needed to upgrade or repair buildings as well as reduces the repair time when a building has been damaged.", ["aboutframersettings"] = "[Current Framer Settings]\nMax Level: {0}\nStarting Cost: {1}\nCost Multiplier: {2}\n Upgrade Cost: {3}%\nRepair Cost: {4}%\nRepair Time: {5}%", ["aboutfisher"] = "Gives you the ability to catch more fish at one time or increases the items you collect when fishing if you don't catch a fish.", ["aboutfishersettings"] = "[Current Fisher Settings]\nMax Level: {0}\nStarting Cost: {1} \nCost Multiplier: {2} \nFish Increase: {3} \nItem Increase: {4}", ["aboutmedic"] = "Gives you the ability to revive yourself and other players with more health once revived as well as reduces the time it takes to craft teas or other items in the mixing table.", ["aboutscavenger"] = "Increases chance to find more loot inside containers with chance to find bonus items when looting containers. The higher your level the more items you'll find. Keep an eye out around these containers for your extra loot!", ["aboutmedicsettings"] = "[Current Medic Settings]\nMax Level: {0}\nStarting Cost: {1} \nCost Multiplier: {2} \nRevival Health: {3} \nRecover Health: {4} \nCrafting Time: {5}%", ["abouttamer"] = "If this skill is available then it will grant you the ability to tame animals as pets. Each level allows you to tame a bigger animal that can help you survive in the world. These pets can also carry items and even attack your enemies. Pets are currently controlled by a seperate mod with it's own settings and adjustments. More details about Pets can be found using the '/pet help' chat command", ["abouttamersettings"] = "[Current Tamer Settings]\nEnabled: {0} \nMax Level: {1} \nStarting Cost: {2} \nCost Multiplier: {3} \n\n[Tameable Pets]\nChicken: {4} | Level Req: {5} \nBoar: {6} | Level Req: {7} \nStag: {8} | Level Req:{9} \nWolf: {10} | Level Req: {11} \nBear: {12} | Level Req: {13}", ["aboutelectrician"] = "Increases the power output of almost all electrical sources including generators, solar panels, windmills, batteries, etc.. Can also increase the amount of power gained from solar panels even durring the night.", ["aboutdemolitionist"] = "Decreases the chance of explosive duds, increases the damage and radius of most explosives.", ["aboutninjary"] = "Decreases the chance of certain entities detecting you as long as you are not hostile or attack them. This can include the patrol helicopter, bradley tank, turrets, and NPCs. You also gain a bonus damage when using knives and swords to attack.", ["nextpageskills"] = "Click Next Page to view more skill information", ["techtreenode"] = "You need {0} scrap to research {1}", ["xpgiveneedtype"] = "Need to enter a player type: /xpgive (type name or id) (playername or playerid) (amount)", ["xpgiveneedname"] = "Need to enter a player name or id: /xpgive (type name or id) (playername or playerid) (amount)", ["pointsgiveneedtype"] = "Need to enter a point/player type: /xpgivepoints (type stat or skill) (type name or id) (playername or playerid) (amount)", ["pointsgiveneedname"] = "Need to enter a player name or id: /xpgivepoints (type stat or skill) (type name or id) (playername or playerid) (amount)", ["xpgivenotfound"] = "Player not found", ["xpgiveneedamount"] = "Need to enter an amount /xpgive (type name or id) (playername or playerid) (amount)", ["pointsgiveneedamount"] = "Need to enter an amount /xpgivepoints (type stat or skill) (type name or id) (playername or playerid) (amount)", ["xpgiveplayer"] = "You have given {0} {1} experience, they now have a total of {2} experience.", ["pointsgiveplayer"] = "You have given {0} {1} {2} points, they now have a total of {3} {2} points.", ["xpgiveall"] = "You have given all players {0} experience", ["xpresetneedtype"] = "Need to enter a player type: /xpreset (name or id) (playername or id)", ["xpresetneedname"] = "Need to enter a player name: /xpreset (name or id) (playername or id)", ["xpresetnotfound"] = "Player not found", ["xpresetplayer"] = "You have reset your character.", ["xpresetselectedplayer"] = "You have reset {0}", ["xptakeneedtype"] = "Need to enter a player type: /xptake (name or id) (playername or id) (amount)", ["xptakeneedname"] = "Need to enter a player name: /xptake (name or id) (playername or id) (amount)", ["xptakenotfound"] = "Player not found", ["xptakeneedamount"] = "Need to enter an amount: /xptake (name or id) (playername or id) (amount)", ["xptakeplayer"] = "You have taken {0} experince from {1}, they now have a total of {2} experience.", ["adminpanelinfonew"] = "ⓍⓅerience Admin Control Panel\n\n Here you can adjust all the settings for this mod without having to open and edit the config file. On the menu to your left are several pages where you can adjust " + "everything from levels, experience, stats, skills, and more.. Once you have made any adjustments to these pages make sure you click Save & Reload on the menu so that these adjustments are writen to the config " + "and loaded. If you do not click save and reload any adjustment you made will be lost! Keep in mind this is an extremely detailed mod and even the slightest adjustment can make a huge difference on how this mod functions! It is " + "suggested that you make minor adjustments to see how the settings will effect your server and player's gaming experience. If you adjust the level start, xp requirement increase, stat points per level or skill points per level settings after players have been playing on your server make sure you click Fix Player Data " + "on the Reset Options page AFTER you save and reload the mod so that the system can recalculate all players levels and requirements. Players will not loose any XP but they will have their profile reset and will have to reapply any points they have.\n\n" + "If you have any issues, questions, or suggestions you can join the mod developer's discord at \ndiscord.rustlevels.com\nhttps://discord.gg/gfZn8tvQGW\n\n You can also get updates, access to prerelease versions (beta), and more on our discord." + "\n\nⓍⓅerience was created by MACHIN3", ["playerfixdatahelp"] = "You can use the Fix My Data button below to have your xperience data recalculated. This will reset all your stats except your experience. Your level, required xp, points, and info will be reset and recalculated based on the current server settings and your current experience. You will receive " + "however many points for stats and skills that your level should have and you will need to reapply them towards your stats and skills.\n\n Reasons you may need to do this:\n1. Server settings may have been changed since your last login.\n2.Map wipe didn't properly link your data.\n3. New features were added.\n4. Server was restored to an earlier date.", ["uinotify_xpgain"] = "+{0} XP", ["uinotify_xploss"] = "-{0} XP", ["econbalance"] = "Balance:", ["econdeposit"] = "You received a deposit of {0} into your account for leveling up", ["econwidthdrawlevel"] = "You lost {0} from your account for level loss", ["econwidthdrawresetstat"] = "You spent {0} for resetting stats, your balance is now {1}", ["econwidthdrawresetskill"] = "You spent {0} for resetting skills, your balance is now {1}", ["econwidthdrawresetstatfailed"] = "You Do Not Have {0} for resetting stats, your balance is {1}", ["econwidthdrawresetskillfailed"] = "You Do Not Have {0} for resetting skills, your balance is {1}", ["econwidthdrawlevelup"] = "You spent {0} for leveling up {1}, your balance is now {2}", ["econwidthdrawlevelupfailed"] = "You Do Not Have {0} for leveling up {1}, your balance is {2}", ["srewardwidthdrawresetstat"] = "You spent {0} points for resetting stats, your balance is now {1}", ["srewardwidthdrawresetskill"] = "You spent {0} points for resetting skills, your balance is now {1}", ["srewardwidthdrawresetstatfailed"] = "You Do Not Have {0} points for resetting stats, your balance is {1}", ["srewardnwidthdrawresetskillfailed"] = "You Do Not Have {0} points for resetting skills, your balance is {1}", ["srewardwidthdrawlevelup"] = "You spent {0} points for leveling up {1}, your balance is now {2}", ["srewardswidthdrawlevelupfailed"] = "You Do Not Have {0} points for leveling up {1}, your balance is {2}", ["srewardsup"] = "You recieved {0} points in server rewards for leveling up", ["srewardsdown"] = "You lost {0} points in server rewards for leveling down", ["fixdatadisabled"] = "Fix Data Option Disabled By Admin", ["hardcorenoreset"] = "Hardcore mode enabled, Stat/Skill Reset is Disabed", ["crafternotenough"] = "Not enough resources to repair item", ["killrecords"] = "Kill Records", ["mykillrecords"] = "My Kill Records", ["mydeathrecords"] = "My Death Records", ["playerdeathrecords"] = "Player's Death Records", ["playerkillrecords"] = "Player's Kill Records", ["maxleveled"] = "You have reached the max level for {0}", ["playerrankup"] = "You have reached the Rank of {0}, your level, experience, stats, and skills have been reset. You start with {1} stat points and {2} skill points", ["rank"] = "Rank", ["ranksig"] = "Rank Tag", ["ranklevel"] = "Rank Level", ["rankxp"] = "Rank XP", ["uiscale"] = "UI Scale {0}", ["backpackgrant"] = "You have a backpack with {0} slots.", ["backpackrevoke"] = "You have lost permission to use your backpack.", ["quarryboost"] = "Quarry Production", ["quarryduration"] = "Quarry Dursation", ["quarrycooldown"] = "Quarry Cooldown", ["weaponryaddonammochance"] = "Free Ammo Chance", ["weaponryaddonreload"] = "Reload Speed", ["weaponryaddondistance"] = "Max Distance", ["weaponryaddonrange"] = "Effective Range", ["addonscavengervendorchance"] = "Extra Vending Chance", ["addonscavengervendoramount"] = "Extra Vending Amount", ["addonrecyclerchance"] = "Free Recycle Chance", ["addonrecyclerspeed"] = "Recycle Speed", ["grubworm"] = "Grub/Worm", ["myraids"] = "My Raids Completed", ["otherraids"] = "Player's Raids Completed", ["dailylimitreset"] = "Daily limit timer has been reset. Next Daily reset will be in {0} hours.", ["dailyxplimitreached"] = "You have earned the maximum allowed XP today ({0}). You can start earning XP again in {1} {2}.", ["dailyxplimit"] = "Daily XP limit", ["dailyresetlimit"] = "Daily Reset limit", ["dailyresetlimitreached"] = "You have reached the maximum allowed reset limit today ({0}). You can reset again in {1} {2}.", ["evaded"] = "You have evaded detection from {0}.", ["Ninjarypatrolstealth"] = "Patrol Helicopter Stealth", ["Ninjarych47stealth"] = "CH47 Helicopter Stealth", ["Ninjarybradleystealth"] = "Bradley APC Stealth", ["Ninjarynpcstealth"] = "NPC Stealth", ["Ninjaryturretstealth"] = "Turret Stealth", ["Ninjaryknifeincrease"] = "Knife Damage", ["Ninjaryswordincrease"] = "Sword Damage", ["playernotfound"] = "No player name with {0} found.", ["addonwelcome"] = "Welcome Panel", ["disabledbyadmin"] = "{0} is disabled by server admin", ["donothavepermission"] = "You do not have permission to use {0}", ["showaddonwelcome"] = "Show Welcome Panel", ["explosivedudreduction"] = "Explosive Dud Chance", ["explosivedamage"] = "Explosive Damage", ["explosiveradius"] = "Explosive Radius", ["rocketlockchance"] = "Rocket Lock Chance", ["rocketlocktime"] = "Rocket Lock Time (seconds)", ["rocketlockmindistance"] = "Rocket Lock Distance", ["rocketexplode"] = "Rocket Detonation Time", ["rocketspeed"] = "Rocket Speed", ["rocketdmg"] = "Rocket Damage", ["calculations"] = "Calculations", ["calculationstitle"] = "Level Calculations", ["xpboosteractive"] = "XP Boost", ["eventnoxpgain"] = "You have entered the {0} event. You will not gain any XP while in this event", ["eventnoxploss"] = "You have entered the {0} event. You will not lose any XP while in this event", ["eventnoskills"] = "You have entered the {0} event. All Stats and Skills are disabled while in this event", ["uihelp"] = "Navigating the UI:\nThe main menu on the side allows you to view the different pages available such as your main profile, statistics, settings, top players, stats or skills, and more depending on what your server allows.\n\nProfiles:\nThe main profile page shows all your XPerience data including XP, level, rank, Stat levels, Skill levels, overall character data and more. There you can tell how much XP you have earned, how much you need to reach the next available level, and the total stat or skill points earned and spent. You can switch between Stats and Skills by clicking the label above those listed and each Stat and Skill name is also clickable to view each ones edit page where you can spend your available points.\n\nStatistics:\nThe statistics page will show you all the recourses you have gathered including wood, stone, metal, sulfur and much more. This page will also show your total kills, kill history, and looting if available.\n\nStats/Skills:\nThese pages will show you all the available stats and skills, the abilities each one grants you, current and max level of each stat or skill, points spent, needed to reach next level and total points needed to reach the max level. Each stat and skill page will have options to level up if you have enough points, reset the stat or skill if allowed, and help button to view more detailed explaination of each one. The icons at the top will switch between each stat or skill and the main icon is also clickable to view the help section for each.\n\nSettings:\nThe settings page will show you all the available options you can change based on how you want certain things to look such as the live UI location on your screen, dash panel UI and the type of display from MPH to KMH, enable or disable confirmation prompts, chat messages, and more.\n\nTop Players:\nThe top players pages allows you to view the top players on the server for different things such as top players in level, rank, XP, as well as each stat or skill. At the top of the page you can switch between the top player lists.", }, this); } #endregion #region API / Other Mod Hooks [HookMethod("GiveXPID")] void GiveXPID(ulong playerid, double amount) { string player = playerid.ToString(); if (player == null || amount == 0) return; var user = _xperienceCache.ToList().FirstOrDefault(x => x.Value.id.ToString().ToLower().Contains(player)); if (user.Value == null) return; XPRecord vxprecord = GetPlayerRecord(user.Value.id); if(vxprecord == null) return; GainExpID(user.Value.id, amount); } [HookMethod("GiveXP")] void GiveXP(BasePlayer player, double amount) { if (player == null || amount == 0) return; GainExp(player, amount); } [HookMethod("GiveXPBasic")] void GiveXPBasic(BasePlayer player, double amount) { if (player == null || amount == 0) return; GainExpBasic(player, amount); } [HookMethod("GiveStatPoints")] void GiveStatPoints(BasePlayer player, int amount) { if (player == null || amount == 0) return; GivePoints(player, "stat", amount); } [HookMethod("GiveSkillPoints")] void GiveSkillPoints(BasePlayer player, int amount) { if (player == null || amount == 0) return; GivePoints(player, "skill", amount); } [HookMethod("TakeXP")] void TakeXP(BasePlayer player, double amount) { if (player == null || amount == 0) return; LoseExp(player, amount); } [HookMethod("GetXPCache")] string GetXPCache(BasePlayer player, string info) { if (player == null || !player.userID.Get().IsSteamId() || info == null) return "Data Missing"; XPRecord xprecord = GetXPRecord(player); Ranks rank = GetXPRank(xprecord.rank); switch (info.ToLower()) { case "steamid": info = player.UserIDString; break; case "displayname": info = player.displayName; break; case "level": info = xprecord.level.ToString(); break; case "xp": info = xprecord.experience.ToString(); break; case "lastreqxp": info = (xprecord.requiredxp - (xprecord.level * config.xpLevel.levelmultiplier)).ToString(); break; case "reqxp": info = xprecord.requiredxp.ToString(); break; case "statp": info = xprecord.statpoint.ToString(); break; case "skillp": info = xprecord.skillpoint.ToString(); break; case "mentality": info = xprecord.Mentality.ToString(); break; case "mentalityp": info = xprecord.MentalityP.ToString(); break; case "dexterity": info = xprecord.Dexterity.ToString(); break; case "dexterityp": info = xprecord.DexterityP.ToString(); break; case "might": info = xprecord.Might.ToString(); break; case "mightp": info = xprecord.MightP.ToString(); break; case "captaincy": info = xprecord.Captaincy.ToString(); break; case "captaincyp": info = xprecord.CaptaincyP.ToString(); break; case "weaponry": info = xprecord.Weaponry.ToString(); break; case "weaponryp": info = xprecord.WeaponryP.ToString(); break; case "ninjary": info = xprecord.Ninjary.ToString(); break; case "ninjaryp": info = xprecord.NinjaryP.ToString(); break; case "woodcutter": info = xprecord.WoodCutter.ToString(); break; case "woodcutterp": info = xprecord.WoodCutterP.ToString(); break; case "smithy": info = xprecord.Smithy.ToString(); break; case "smithyp": info = xprecord.SmithyP.ToString(); break; case "miner": info = xprecord.Miner.ToString(); break; case "minerp": info = xprecord.MinerP.ToString(); break; case "forager": info = xprecord.Forager.ToString(); break; case "foragerp": info = xprecord.ForagerP.ToString(); break; case "fisher": info = xprecord.Fisher.ToString(); break; case "fisherp": info = xprecord.FisherP.ToString(); break; case "hunter": info = xprecord.Hunter.ToString(); break; case "hunterp": info = xprecord.HunterP.ToString(); break; case "scavenger": info = xprecord.Scavenger.ToString(); break; case "scavengerp": info = xprecord.ScavengerP.ToString(); break; case "electrician": info = xprecord.Electrician.ToString(); break; case "electricianp": info = xprecord.ElectricianP.ToString(); break; case "demolitionist": info = xprecord.Demolitionist.ToString(); break; case "demolitionistp": info = xprecord.DemolitionistP.ToString(); break; case "tamer": info = xprecord.Tamer.ToString(); break; case "tamerp": info = xprecord.TamerP.ToString(); break; case "medic": info = xprecord.Medic.ToString(); break; case "medicp": info = xprecord.MedicP.ToString(); break; case "framer": info = xprecord.Framer.ToString(); break; case "framerp": info = xprecord.FramerP.ToString(); break; case "crafter": info = xprecord.Crafter.ToString(); break; case "crafterp": info = xprecord.CrafterP.ToString(); break; case "status": info = xprecord.Status.ToString(); break; case "wood": info = xprecord.Wood.ToString(); break; case "stone": info = xprecord.Stone.ToString(); break; case "metal": info = xprecord.Metal.ToString(); break; case "sulfur": info = xprecord.Sulfur.ToString(); break; case "cactus": info = xprecord.Cactus.ToString(); break; case "berries": info = xprecord.Berries.ToString(); break; case "potato": info = xprecord.Potato.ToString(); break; case "pumpkin": info = xprecord.Pumpkin.ToString(); break; case "corn": info = xprecord.Corn.ToString(); break; case "mushroom": info = xprecord.Mushroom.ToString(); break; case "hemp": info = xprecord.Hemp.ToString(); break; case "seed": info = xprecord.Seed.ToString(); break; case "ranksenabled": info = config.xpLevelRanks.enableresetranks.ToString(); break; case "truexp": info = xprecord.trueexperience.ToString(); break; case "truelevel": info = xprecord.truelevel.ToString(); break; case "rank": info = xprecord.rank.ToString(); break; case "rankname": info = rank.name.ToString(); break; case "ranksig": info = rank.sig.ToString(); break; case "rankimg": info = rank.image.ToString(); break; } return info; } #endregion } #region Extension Methods namespace XPerienceEx { public static class PlayerEx { public static void RunEffect(this BasePlayer player, string prefab) { Effect effect = new Effect(); effect.Init(Effect.Type.Generic, player.ServerPosition, Vector3.zero); effect.pooledString = prefab; EffectNetwork.Send(effect, player.Connection); } } } #endregion }