From 72f6ebd03f0d3f80932b33a54a4112d3a0e926de Mon Sep 17 00:00:00 2001 From: Bitl Date: Sat, 10 Oct 2020 17:55:43 -0700 Subject: [PATCH] updated SDK tools and scripts. --- Novetus/NovetusCore/SDK/Downloader.cs | 39 +++++++--- Novetus/NovetusCore/SDK/SDKFuncs.cs | 48 ++++++++----- .../StorageAndFunctions/GlobalFuncs.cs | 12 +++- .../Compact/LauncherFormCompactSettings.cs | 2 +- .../Extended/LauncherFormExtended.cs | 2 +- .../Forms/SDK/AssetSDK.Designer.cs | 72 +++++++++++++++++-- Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs | 71 ++++++++++++++++-- .../Forms/SDK/DiogenesEditor.cs | 43 ++++++----- README.md | 12 ++-- scripts/2006S-Shaders/CSMPFunctions.lua | 8 +-- scripts/2006S/CSMPFunctions.lua | 8 +-- scripts/2007M-Shaders/CSMPFunctions.lua | 8 +-- scripts/2007M/CSMPFunctions.lua | 8 +-- scripts/2008M/CSMPFunctions.lua | 8 +-- scripts/2009E/CSMPFunctions.lua | 8 +-- scripts/2009L/CSMPFunctions.lua | 5 +- scripts/2010L/CSMPFunctions.lua | 5 +- scripts/2011E/CSMPFunctions.lua | 5 +- scripts/2011M/CSMPFunctions.lua | 5 +- 19 files changed, 266 insertions(+), 103 deletions(-) diff --git a/Novetus/NovetusCore/SDK/Downloader.cs b/Novetus/NovetusCore/SDK/Downloader.cs index f15c0e5..fecbee7 100644 --- a/Novetus/NovetusCore/SDK/Downloader.cs +++ b/Novetus/NovetusCore/SDK/Downloader.cs @@ -12,6 +12,7 @@ class Downloader private readonly string fileURL; private readonly string fileName; private readonly string fileFilter; + private readonly string filePath; private string downloadOutcome; private static string downloadOutcomeException; @@ -22,6 +23,14 @@ class Downloader fileFilter = filter; } + public Downloader(string url, string name, string filter, string path) + { + fileName = name; + fileURL = url; + fileFilter = filter; + filePath = path; + } + public Downloader(string url, string name) { fileName = name; @@ -59,8 +68,6 @@ class Downloader public void InitDownload(string additionalText = "") { - string downloadOutcomeAddText = additionalText; - SaveFileDialog saveFileDialog1 = new SaveFileDialog { FileName = fileName, @@ -71,18 +78,28 @@ class Downloader if (saveFileDialog1.ShowDialog() == DialogResult.OK) { - try - { - int read = DownloadFile(fileURL, saveFileDialog1.FileName); - downloadOutcome = "File " + Path.GetFileName(saveFileDialog1.FileName) + " downloaded! " + read + " bytes written! " + downloadOutcomeAddText + downloadOutcomeException; - } - catch (Exception ex) - { - downloadOutcome = "Error when downloading file: " + ex.Message; - } + InitDownloadNoDialog(saveFileDialog1.FileName, additionalText); } } + public void InitDownloadNoDialog(string name, string additionalText = "") + { + try + { + int read = DownloadFile(fileURL, name); + downloadOutcome = "File " + Path.GetFileName(name) + " downloaded! " + read + " bytes written! " + additionalText + downloadOutcomeException; + } + catch (Exception ex) + { + downloadOutcome = "Error when downloading file: " + ex.Message; + } + } + + public string GetFullDLPath() + { + return filePath + Path.DirectorySeparatorChar + fileName; + } + private static int DownloadFile(string remoteFilename, string localFilename) { //credit to Tom Archer (https://www.codeguru.com/columns/dotnettips/article.php/c7005/Downloading-Files-with-the-WebRequest-and-WebResponse-Classes.htm) diff --git a/Novetus/NovetusCore/SDK/SDKFuncs.cs b/Novetus/NovetusCore/SDK/SDKFuncs.cs index 3434aa8..7992db0 100644 --- a/Novetus/NovetusCore/SDK/SDKFuncs.cs +++ b/Novetus/NovetusCore/SDK/SDKFuncs.cs @@ -584,23 +584,6 @@ class SDKFuncs } #endregion - #region Diogenes Editor - // credit to Carrot for this :D - - public static string DiogenesCrypt(string word) - { - StringBuilder result = new StringBuilder(""); - byte[] bytes = Encoding.ASCII.GetBytes(word); - - foreach (byte singular in bytes) - { - result.Append(Convert.ToChar(0x55 ^ singular)); - } - - return result.ToString(); - } - #endregion - #region Item SDK public static void StartItemDownload(string name, string url, string id, int ver, bool iswebsite) @@ -637,7 +620,7 @@ class SDKFuncs } else { - System.Diagnostics.Process.Start(fullURL); + Process.Start(fullURL); if (!GlobalVars.UserConfiguration.DisabledItemMakerHelp) { @@ -651,6 +634,35 @@ class SDKFuncs MessageBox.Show("Error: Unable to download the file. Try using a different file name or ID.", "Novetus Item SDK | Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } + + public static void StartItemBatchDownload(string name, string url, string id, int ver, bool iswebsite, string path) + { + try + { + string version = ((ver != 0) && (!iswebsite)) ? "&version=" + ver : ""; + string fullURL = url + id + version; + + if (!iswebsite) + { + Downloader download = new Downloader(fullURL, name, "", path); + + try + { + download.InitDownloadNoDialog(download.GetFullDLPath()); + } + catch (Exception) + { + } + } + else + { + Process.Start(fullURL); + } + } + catch (Exception) + { + } + } #endregion #region SDK Launcher diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs index b67cd55..d5e2b48 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalFuncs.cs @@ -1120,7 +1120,8 @@ public class GlobalFuncs RobloxXML.EditRenderSettings(doc, "IceQuality", MaterialQuality.ToString(), XMLTypes.Token); RobloxXML.EditRenderSettings(doc, "PlasticQuality", MaterialQuality.ToString(), XMLTypes.Token); RobloxXML.EditRenderSettings(doc, "SlateQuality", MaterialQuality.ToString(), XMLTypes.Token); - RobloxXML.EditRenderSettings(doc, "TrussDetail", MaterialQuality.ToString(), XMLTypes.Token); + // fix truss detail. We're keeping it at 0. + RobloxXML.EditRenderSettings(doc, "TrussDetail", "0", XMLTypes.Token); RobloxXML.EditRenderSettings(doc, "WoodQuality", MaterialQuality.ToString(), XMLTypes.Token); RobloxXML.EditRenderSettings(doc, "Antialiasing", AA.ToString(), XMLTypes.Token); RobloxXML.EditRenderSettings(doc, "AASamples", AASamples.ToString(), XMLTypes.Token); @@ -1567,5 +1568,14 @@ public class GlobalFuncs { await TaskEx.Delay(miliseconds); } + + // Credit to Carrot for the original code. Rewote it to be smaller and more customizable. + public static string CryptStringWithByte(string word, int byteflag) + { + byte[] bytes = Encoding.ASCII.GetBytes(word); + string result = ""; + for (int i = 0; i < bytes.Length; i++) { result += Convert.ToChar(byteflag ^ bytes[i]); } + return result; + } } #endregion diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompactSettings.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompactSettings.cs index a2039e2..ee09dbc 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompactSettings.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Compact/LauncherFormCompactSettings.cs @@ -123,7 +123,7 @@ namespace NovetusLauncher private void button1_Click(object sender, EventArgs e) { - if (comboBox2.SelectedIndex == 6) + if (GlobalVars.UserConfiguration.QualityLevel == Settings.GraphicsOptions.Level.Custom) { GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, true); CustomGraphicsOptions opt = new CustomGraphicsOptions(); diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs index c6b82b9..3c807be 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs @@ -1451,7 +1451,7 @@ namespace NovetusLauncher private void button36_Click(object sender, EventArgs e) { - if (comboBox2.SelectedIndex == 6) + if (GlobalVars.UserConfiguration.QualityLevel == Settings.GraphicsOptions.Level.Custom) { CustomGraphicsOptions opt = new CustomGraphicsOptions(); opt.Show(); diff --git a/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.Designer.cs b/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.Designer.cs index c64d306..36c032d 100644 --- a/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.Designer.cs +++ b/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.Designer.cs @@ -55,15 +55,21 @@ this.MeshConverter_CreditText = new System.Windows.Forms.Label(); this.MeshConverter_ConvertButton = new System.Windows.Forms.Button(); this.AssetLocalization_BackgroundWorker = new System.ComponentModel.BackgroundWorker(); + this.AssetDownloaderBatch = new System.Windows.Forms.GroupBox(); + this.AssetDownloaderBatch_BatchIDBox = new System.Windows.Forms.TextBox(); + this.AssetDownloader_BatchMode = new System.Windows.Forms.CheckBox(); + this.AssetDownloaderBatch_Status = new System.Windows.Forms.Label(); this.AssetDownloader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.AssetDownloader_AssetVersionSelector)).BeginInit(); this.AssetLocalization.SuspendLayout(); this.MeshConverter.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.MeshConverter_MeshVersionSelector)).BeginInit(); + this.AssetDownloaderBatch.SuspendLayout(); this.SuspendLayout(); // // AssetDownloader // + this.AssetDownloader.Controls.Add(this.AssetDownloader_BatchMode); this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetNameBox); this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetNameText); this.AssetDownloader.Controls.Add(this.AssetDownloader_LoadHelpMessage); @@ -97,11 +103,11 @@ // // AssetDownloader_LoadHelpMessage // - this.AssetDownloader_LoadHelpMessage.Location = new System.Drawing.Point(16, 112); + this.AssetDownloader_LoadHelpMessage.Location = new System.Drawing.Point(6, 114); this.AssetDownloader_LoadHelpMessage.Name = "AssetDownloader_LoadHelpMessage"; - this.AssetDownloader_LoadHelpMessage.Size = new System.Drawing.Size(220, 24); + this.AssetDownloader_LoadHelpMessage.Size = new System.Drawing.Size(145, 24); this.AssetDownloader_LoadHelpMessage.TabIndex = 19; - this.AssetDownloader_LoadHelpMessage.Text = "Disable Help Message on File Creation"; + this.AssetDownloader_LoadHelpMessage.Text = "Disable Help Messages"; this.AssetDownloader_LoadHelpMessage.UseVisualStyleBackColor = true; this.AssetDownloader_LoadHelpMessage.CheckedChanged += new System.EventHandler(this.AssetDownloader_LoadHelpMessage_CheckedChanged); // @@ -177,7 +183,7 @@ this.AssetLocalization.Controls.Add(this.AssetLocalization_StatusText); this.AssetLocalization.Controls.Add(this.AssetLocalization_AssetTypeBox); this.AssetLocalization.Controls.Add(this.AssetLocalization_LocalizeButton); - this.AssetLocalization.Location = new System.Drawing.Point(278, 42); + this.AssetLocalization.Location = new System.Drawing.Point(278, 126); this.AssetLocalization.Name = "AssetLocalization"; this.AssetLocalization.Size = new System.Drawing.Size(267, 182); this.AssetLocalization.TabIndex = 1; @@ -295,7 +301,7 @@ this.MeshConverter.Controls.Add(this.MeshConverter_MeshVersionText); this.MeshConverter.Controls.Add(this.MeshConverter_CreditText); this.MeshConverter.Controls.Add(this.MeshConverter_ConvertButton); - this.MeshConverter.Location = new System.Drawing.Point(10, 160); + this.MeshConverter.Location = new System.Drawing.Point(278, 14); this.MeshConverter.Name = "MeshConverter"; this.MeshConverter.Size = new System.Drawing.Size(262, 106); this.MeshConverter.TabIndex = 2; @@ -345,7 +351,7 @@ // MeshConverter_CreditText // this.MeshConverter_CreditText.AutoSize = true; - this.MeshConverter_CreditText.Location = new System.Drawing.Point(48, 80); + this.MeshConverter_CreditText.Location = new System.Drawing.Point(51, 90); this.MeshConverter_CreditText.Name = "MeshConverter_CreditText"; this.MeshConverter_CreditText.Size = new System.Drawing.Size(167, 13); this.MeshConverter_CreditText.TabIndex = 7; @@ -369,12 +375,58 @@ this.AssetLocalization_BackgroundWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.AssetLocalization_BackgroundWorker_ProgressChanged); this.AssetLocalization_BackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.AssetLocalization_BackgroundWorker_RunWorkerCompleted); // + // AssetDownloaderBatch + // + this.AssetDownloaderBatch.Controls.Add(this.AssetDownloaderBatch_Status); + this.AssetDownloaderBatch.Controls.Add(this.AssetDownloaderBatch_BatchIDBox); + this.AssetDownloaderBatch.Location = new System.Drawing.Point(12, 160); + this.AssetDownloaderBatch.Name = "AssetDownloaderBatch"; + this.AssetDownloaderBatch.Size = new System.Drawing.Size(260, 148); + this.AssetDownloaderBatch.TabIndex = 3; + this.AssetDownloaderBatch.TabStop = false; + this.AssetDownloaderBatch.Text = "Asset Downloader Batch Queue (IDs here!)"; + // + // AssetDownloaderBatch_BatchIDBox + // + this.AssetDownloaderBatch_BatchIDBox.Enabled = false; + this.AssetDownloaderBatch_BatchIDBox.Location = new System.Drawing.Point(6, 19); + this.AssetDownloaderBatch_BatchIDBox.Multiline = true; + this.AssetDownloaderBatch_BatchIDBox.Name = "AssetDownloaderBatch_BatchIDBox"; + this.AssetDownloaderBatch_BatchIDBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.AssetDownloaderBatch_BatchIDBox.Size = new System.Drawing.Size(242, 105); + this.AssetDownloaderBatch_BatchIDBox.TabIndex = 0; + // + // AssetDownloader_BatchMode + // + this.AssetDownloader_BatchMode.AutoSize = true; + this.AssetDownloader_BatchMode.Location = new System.Drawing.Point(157, 118); + this.AssetDownloader_BatchMode.Name = "AssetDownloader_BatchMode"; + this.AssetDownloader_BatchMode.Size = new System.Drawing.Size(84, 17); + this.AssetDownloader_BatchMode.TabIndex = 22; + this.AssetDownloader_BatchMode.Text = "Batch Mode"; + this.AssetDownloader_BatchMode.UseVisualStyleBackColor = true; + this.AssetDownloader_BatchMode.CheckedChanged += new System.EventHandler(this.AssetDownloader_BatchMode_CheckedChanged); + // + // AssetDownloaderBatch_Status + // + this.AssetDownloaderBatch_Status.AutoSize = true; + this.AssetDownloaderBatch_Status.Cursor = System.Windows.Forms.Cursors.Default; + this.AssetDownloaderBatch_Status.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.AssetDownloaderBatch_Status.ForeColor = System.Drawing.Color.Red; + this.AssetDownloaderBatch_Status.Location = new System.Drawing.Point(94, 127); + this.AssetDownloaderBatch_Status.Name = "AssetDownloaderBatch_Status"; + this.AssetDownloaderBatch_Status.Size = new System.Drawing.Size(84, 13); + this.AssetDownloaderBatch_Status.TabIndex = 1; + this.AssetDownloaderBatch_Status.Text = "Please wait..."; + this.AssetDownloaderBatch_Status.Visible = false; + // // AssetSDK // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.ClientSize = new System.Drawing.Size(556, 280); + this.ClientSize = new System.Drawing.Size(557, 320); + this.Controls.Add(this.AssetDownloaderBatch); this.Controls.Add(this.MeshConverter); this.Controls.Add(this.AssetLocalization); this.Controls.Add(this.AssetDownloader); @@ -393,6 +445,8 @@ this.MeshConverter.ResumeLayout(false); this.MeshConverter.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.MeshConverter_MeshVersionSelector)).EndInit(); + this.AssetDownloaderBatch.ResumeLayout(false); + this.AssetDownloaderBatch.PerformLayout(); this.ResumeLayout(false); } @@ -427,4 +481,8 @@ private System.Windows.Forms.TextBox AssetDownloader_AssetIDBox; private System.Windows.Forms.Button AssetDownloader_AssetDownloaderButton; private System.ComponentModel.BackgroundWorker AssetLocalization_BackgroundWorker; + private System.Windows.Forms.CheckBox AssetDownloader_BatchMode; + private System.Windows.Forms.GroupBox AssetDownloaderBatch; + private System.Windows.Forms.TextBox AssetDownloaderBatch_BatchIDBox; + private System.Windows.Forms.Label AssetDownloaderBatch_Status; } \ No newline at end of file diff --git a/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs b/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs index 0169108..397dd96 100644 --- a/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs +++ b/Novetus/NovetusLauncher/Forms/SDK/AssetSDK.cs @@ -3,6 +3,7 @@ using System; using System.ComponentModel; using System.Diagnostics; using System.IO; +using System.Linq; using System.Windows.Forms; #endregion @@ -17,6 +18,7 @@ public partial class AssetSDK : Form //downloader private string url = "https://assetdelivery.roblox.com/v1/asset/?id="; private bool isWebSite = false; + private bool batchMode = false; //obj2mesh private OpenFileDialog MeshConverter_OpenOBJDialog; #endregion @@ -93,24 +95,81 @@ public partial class AssetSDK : Form break; default: //use defaults + url = "https://assetdelivery.roblox.com/v1/asset/?id="; + isWebSite = false; break; } } private void AssetDownloader_AssetDownloaderButton_Click(object sender, EventArgs e) { - SDKFuncs.StartItemDownload( - AssetDownloader_AssetNameBox.Text, - url, - AssetDownloader_AssetIDBox.Text, - Convert.ToInt32(AssetDownloader_AssetVersionSelector.Value), - isWebSite); + if (batchMode == false) + { + SDKFuncs.StartItemDownload( + AssetDownloader_AssetNameBox.Text, + url, + AssetDownloader_AssetIDBox.Text, + Convert.ToInt32(AssetDownloader_AssetVersionSelector.Value), + isWebSite); + } + else + { + SaveFileDialog saveFileDialog1 = new SaveFileDialog + { + FileName = "Save to a directory. Files will be saved as ", + //"Compressed zip files (*.zip)|*.zip|All files (*.*)|*.*" + Filter = "Roblox Model(*.rbxm) | *.rbxm | Roblox Mesh(*.mesh) | *.mesh | PNG Image(*.png) | *.png | WAV Sound(*.wav) | *.wav", + Title = "Save files downloaded via batch" + }; + + if (saveFileDialog1.ShowDialog() == DialogResult.OK) + { + string basepath = Path.GetDirectoryName(saveFileDialog1.FileName); + string extension = Path.GetExtension(saveFileDialog1.FileName); + + AssetDownloaderBatch_Status.Visible = true; + + string[] lines = AssetDownloaderBatch_BatchIDBox.Lines; + + foreach (var line in lines) + { + SDKFuncs.StartItemBatchDownload( + line + extension, + url, + line, + Convert.ToInt32(AssetDownloader_AssetVersionSelector.Value), + isWebSite, basepath); + } + + AssetDownloaderBatch_Status.Visible = false; + + MessageBox.Show("Batch download complete! " + lines.Count() + " items downloaded!", "Novetus Item SDK", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } } private void AssetDownloader_LoadHelpMessage_CheckedChanged(object sender, EventArgs e) { GlobalVars.UserConfiguration.DisabledItemMakerHelp = AssetDownloader_LoadHelpMessage.Checked; } + private void AssetDownloader_BatchMode_CheckedChanged(object sender, EventArgs e) + { + batchMode = AssetDownloader_BatchMode.Checked; + + if (batchMode) + { + AssetDownloaderBatch_BatchIDBox.Enabled = true; + AssetDownloader_AssetIDBox.Enabled = false; + AssetDownloader_AssetNameBox.Enabled = false; + } + else + { + AssetDownloaderBatch_BatchIDBox.Enabled = false; + AssetDownloader_AssetIDBox.Enabled = true; + AssetDownloader_AssetNameBox.Enabled = true; + } + } + #endregion #region Asset Localizer diff --git a/Novetus/NovetusLauncher/Forms/SDK/DiogenesEditor.cs b/Novetus/NovetusLauncher/Forms/SDK/DiogenesEditor.cs index 8fb7fc2..347d747 100644 --- a/Novetus/NovetusLauncher/Forms/SDK/DiogenesEditor.cs +++ b/Novetus/NovetusLauncher/Forms/SDK/DiogenesEditor.cs @@ -7,9 +7,13 @@ using System.Windows.Forms; #region Diogenes Editor public partial class DiogenesEditor : Form - { +{ + #region Private vars + private int diogenesFlag = 0x55; + #endregion + #region Constructor - public DiogenesEditor() + public DiogenesEditor() { InitializeComponent(); } @@ -36,22 +40,29 @@ using System.Windows.Forms; using (StreamReader reader = new StreamReader(ofd.FileName)) { - while (!reader.EndOfStream) + if (reader.EndOfStream) { - string line = reader.ReadLine(); - - try + label2.Text = "Empty"; + } + else + { + while (!reader.EndOfStream) { - line = SDKFuncs.DiogenesCrypt(line); - label2.Text = "v2"; - } - catch (Exception) - { - label2.Text = "v1"; - continue; - } + string line = reader.ReadLine(); - builder.Append(line + Environment.NewLine); + try + { + line = GlobalFuncs.CryptStringWithByte(line, diogenesFlag); + label2.Text = "v2"; + } + catch (Exception) + { + label2.Text = "v1"; + continue; + } + + builder.Append(line + Environment.NewLine); + } } } @@ -77,7 +88,7 @@ using System.Windows.Forms; { if (sfd.FilterIndex == 1) { - builder.Append(SDKFuncs.DiogenesCrypt(s) + Environment.NewLine); + builder.Append(GlobalFuncs.CryptStringWithByte(s, diogenesFlag) + Environment.NewLine); label2.Text = "v2"; } else diff --git a/README.md b/README.md index d125af1..fe3067d 100644 --- a/README.md +++ b/README.md @@ -22,21 +22,21 @@ The LUA scripts used were borrowed from the RBXPri client and merged into 1 sing All credit for the LUA code included with the RBXPri client goes to the RBXPri team. All credit for the LUA code used with "non-modern" clients goes to Scripter John and EnergyCell. All credit for the LUA code used for character customization goes to RBXBanLand. -Parts of the codebase use bits and pieces of code from Stack Overflow, MSDN Forums and Codeproject. -The Diogenes encryption/decryption source code was made by Carrot. +Parts of the codebase use bits and pieces of code from Stack Overflow, MSDN Forums, the Novetus GitHub Pull Requests and Codeproject. +The original concept for the Diogenes editor was suggested by Carrot. The concept code was then modified to be smaller, more efficent, and more customizable. RBXMeshConverter was made by coke. (https://github.com/0xC0CAC01A/RBXMeshConverter) Roblox Legacy Place Converter was made by BakonBot. (https://github.com/BakonBot/legacy-place-converter) ROBLOX Script Generator was made by S. Costeira. All credits for the used pieces of code go to the respective authors. -Mark James' Silk icon set 1.3: +### Mark James' Silk icon set 1.3: The Discord Rich Presence icons used for this application use Mark James' Silk icon set 1.3. http://www.famfamfam.com/lab/icons/silk/ -PHP: +### PHP: This product includes PHP, freely available from http://www.php.net/ -ReShade: +### ReShade: Copyright 2014 Patrick Mours. All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -64,7 +64,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Novetus Launcher license (MIT Licence): +### Novetus Launcher license (MIT Licence): MIT License diff --git a/scripts/2006S-Shaders/CSMPFunctions.lua b/scripts/2006S-Shaders/CSMPFunctions.lua index 5639668..d27aafb 100644 --- a/scripts/2006S-Shaders/CSMPFunctions.lua +++ b/scripts/2006S-Shaders/CSMPFunctions.lua @@ -250,7 +250,7 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) coroutine.resume(coroutine.create(function() while Player ~= nil do wait(0.1) - if (Player.Character ~= nil) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then if (Player.Character.Humanoid.Health == 0) then wait(5) Player:LoadCharacter() @@ -283,7 +283,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He pcall(function() player:SetUnder13(false) end) pcall(function() player:SetAccountAge(365) end) pcall(function() player.Name=PlayerName or "" end) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) end) @@ -356,11 +356,11 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, plr:LoadCharacter() InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait(0.001) if (plr.Character ~= nil) then - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) diff --git a/scripts/2006S/CSMPFunctions.lua b/scripts/2006S/CSMPFunctions.lua index 6eba7da..9538578 100644 --- a/scripts/2006S/CSMPFunctions.lua +++ b/scripts/2006S/CSMPFunctions.lua @@ -251,7 +251,7 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) while Player ~= nil do wait(0.1) if (Player.Character ~= nil) then - if (Player.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) @@ -283,7 +283,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He pcall(function() player:SetUnder13(false) end) pcall(function() player:SetAccountAge(365) end) pcall(function() player.Name=PlayerName or "" end) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) end) @@ -356,11 +356,11 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, plr:LoadCharacter() InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait(0.001) if (plr.Character ~= nil) then - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) diff --git a/scripts/2007M-Shaders/CSMPFunctions.lua b/scripts/2007M-Shaders/CSMPFunctions.lua index f292b61..51f05a9 100644 --- a/scripts/2007M-Shaders/CSMPFunctions.lua +++ b/scripts/2007M-Shaders/CSMPFunctions.lua @@ -347,7 +347,7 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) while Player ~= nil do wait(0.1) if (Player.Character ~= nil) then - if (Player.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) @@ -379,7 +379,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He pcall(function() player:SetUnder13(false) end) pcall(function() player:SetAccountAge(365) end) pcall(function() player.Name=PlayerName or "" end) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) end) @@ -450,11 +450,11 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, plr:LoadCharacter() InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait(0.001) if (plr.Character ~= nil) then - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) diff --git a/scripts/2007M/CSMPFunctions.lua b/scripts/2007M/CSMPFunctions.lua index 169b57e..258cd7f 100644 --- a/scripts/2007M/CSMPFunctions.lua +++ b/scripts/2007M/CSMPFunctions.lua @@ -347,7 +347,7 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) while Player ~= nil do wait(0.1) if (Player.Character ~= nil) then - if (Player.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) @@ -379,7 +379,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He pcall(function() player:SetUnder13(false) end) pcall(function() player:SetAccountAge(365) end) pcall(function() player.Name=PlayerName or "" end) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) end) @@ -450,11 +450,11 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, plr:LoadCharacter() InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait(0.001) if (plr.Character ~= nil) then - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character) diff --git a/scripts/2008M/CSMPFunctions.lua b/scripts/2008M/CSMPFunctions.lua index 90ea74d..ef8b79b 100644 --- a/scripts/2008M/CSMPFunctions.lua +++ b/scripts/2008M/CSMPFunctions.lua @@ -438,7 +438,7 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) while true do wait(0.001) if (Player.Character ~= nil) then - if (Player.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) @@ -469,7 +469,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He pcall(function() player:SetAccountAge(365) end) player.CharacterAppearance=0 pcall(function() player.Name=PlayerName or "" end) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) InitalizeSecurityValues(player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) InitalizeTripcode(player,Tripcode) @@ -543,9 +543,9 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, plr.CharacterAppearance=0 InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait() - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) diff --git a/scripts/2009E/CSMPFunctions.lua b/scripts/2009E/CSMPFunctions.lua index c065fbb..963e08c 100644 --- a/scripts/2009E/CSMPFunctions.lua +++ b/scripts/2009E/CSMPFunctions.lua @@ -498,7 +498,7 @@ function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5) while true do wait(0.001) if (Player.Character ~= nil) then - if (Player.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) Player:LoadCharacter() LoadCharacterNew(newWaitForChildSecurity(Player,"Appearance"),Player.Character) @@ -541,7 +541,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He pcall(function() player:SetAccountAge(365) end) player.CharacterAppearance=0 pcall(function() player.Name=PlayerName or "" end) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") InitalizeClientAppearance(player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) InitalizeSecurityValues(player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) InitalizeTripcode(player,Tripcode) @@ -615,9 +615,9 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, plr.CharacterAppearance=0 InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait() - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) diff --git a/scripts/2009L/CSMPFunctions.lua b/scripts/2009L/CSMPFunctions.lua index 0a4b13a..b3ec0f4 100644 --- a/scripts/2009L/CSMPFunctions.lua +++ b/scripts/2009L/CSMPFunctions.lua @@ -628,7 +628,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He game.GuiRoot.MainMenu["Tools"]:Remove() game.GuiRoot.MainMenu["Insert"]:Remove() pcall(function() Visit:SetUploadUrl("") end) - game:GetService("Visit") end function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) @@ -640,9 +639,9 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, plr.CharacterAppearance=0 InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait() - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) diff --git a/scripts/2010L/CSMPFunctions.lua b/scripts/2010L/CSMPFunctions.lua index a41b341..878b579 100644 --- a/scripts/2010L/CSMPFunctions.lua +++ b/scripts/2010L/CSMPFunctions.lua @@ -628,7 +628,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He game.GuiRoot.MainMenu["Tools"]:Remove() game.GuiRoot.MainMenu["Insert"]:Remove() pcall(function() Visit:SetUploadUrl("") end) - game:GetService("Visit") end function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID) @@ -642,9 +641,9 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm") newWaitForChild(game.StarterGui, "Health") game.StarterGui.Health:clone().Parent = plr.PlayerGui - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait() - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) diff --git a/scripts/2011E/CSMPFunctions.lua b/scripts/2011E/CSMPFunctions.lua index b13b327..2105547 100644 --- a/scripts/2011E/CSMPFunctions.lua +++ b/scripts/2011E/CSMPFunctions.lua @@ -644,7 +644,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end pcall(function() Visit:SetUploadUrl("") end) - game:GetService("Visit") InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) wait(0.65) InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) @@ -673,9 +672,9 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, newWaitForChild(game.StarterGui, "Health") game.StarterGui.Dialogs:clone().Parent = plr.PlayerGui game.StarterGui.Health:clone().Parent = plr.PlayerGui - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait() - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false) diff --git a/scripts/2011M/CSMPFunctions.lua b/scripts/2011M/CSMPFunctions.lua index 5b78997..e2cdb8f 100644 --- a/scripts/2011M/CSMPFunctions.lua +++ b/scripts/2011M/CSMPFunctions.lua @@ -636,7 +636,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,He end pcall(function() Visit:SetUploadUrl("") end) - game:GetService("Visit") InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID) wait(0.65) InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5) @@ -670,9 +669,9 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID, game.StarterGui.Health:clone().Parent = plr.PlayerGui game.StarterGui.Playerlist:clone().Parent = plr.PlayerGui game.StarterGui.Backpack:clone().Parent = plr.PlayerGui - game:GetService("Visit") + game:GetService("Visit"):SetUploadUrl("") while true do wait() - if (plr.Character.Humanoid.Health == 0) then + if (plr.Character:FindFirstChild("Humanoid") and (plr.Character.Humanoid.Health == 0)) then wait(5) plr:LoadCharacter() LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false)