diff --git a/NovetusLauncher/NovetusFuncs/GlobalVars.cs b/NovetusLauncher/NovetusFuncs/GlobalVars.cs index 9adfe2b..210c8c1 100644 --- a/NovetusLauncher/NovetusFuncs/GlobalVars.cs +++ b/NovetusLauncher/NovetusFuncs/GlobalVars.cs @@ -177,7 +177,8 @@ public static class GlobalVars public static string SelectedClientScriptMD5 = ""; public static bool FixScriptMapMode = false; public static bool AlreadyHasSecurity = false; - public static string CustomArgs = ""; + public static bool NoGraphicsModeOptions = false; + public static string CustomArgs = ""; public static string AddonScriptPath = ""; //charcustom public static string Custom_Hat1ID_Offline = "NoHat.rbxm"; diff --git a/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs b/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs index 6ddb9e7..2adb8bb 100644 --- a/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs +++ b/NovetusLauncher/NovetusFuncs/LauncherFuncs.cs @@ -747,7 +747,7 @@ public class LauncherFuncs public static void ReadClientValues(string clientpath) { string line1; - string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline9, Decryptline10, Decryptline11; + string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline9, Decryptline10, Decryptline11, Decryptline12; using (StreamReader reader = new StreamReader(clientpath)) { line1 = reader.ReadLine(); @@ -765,8 +765,18 @@ public class LauncherFuncs Decryptline9 = SecurityFuncs.Base64Decode(result[8]); Decryptline10 = SecurityFuncs.Base64Decode(result[9]); Decryptline11 = SecurityFuncs.Base64Decode(result[10]); - - bool bline1 = Convert.ToBoolean(Decryptline1); + try + { + Decryptline12 = SecurityFuncs.Base64Decode(result[11]); + } + catch + { + //fake this option until we properly apply it. + Decryptline11 = "False"; + Decryptline12 = SecurityFuncs.Base64Decode(result[10]); + } + + bool bline1 = Convert.ToBoolean(Decryptline1); GlobalVars.UsesPlayerName = bline1; bool bline2 = Convert.ToBoolean(Decryptline2); @@ -788,8 +798,11 @@ public class LauncherFuncs bool bline10 = Convert.ToBoolean(Decryptline10); GlobalVars.AlreadyHasSecurity = bline10; - - GlobalVars.CustomArgs = Decryptline11; + + bool bline11 = Convert.ToBoolean(Decryptline11); + GlobalVars.NoGraphicsModeOptions = bline11; + + GlobalVars.CustomArgs = Decryptline12; } public static void GeneratePlayerID() @@ -916,13 +929,17 @@ public class LauncherFuncs public static string ChangeGameSettings() { string result = ""; - if (GlobalVars.GraphicsMode == 1) + + if (!GlobalVars.NoGraphicsModeOptions) { - result += "xpcall( function() settings().Rendering.graphicsMode = 2 end, function( err ) settings().Rendering.graphicsMode = 4 end );"; - } - else if(GlobalVars.GraphicsMode == 2) - { - result += "pcall(function() settings().Rendering.graphicsMode = 3 end);"; + if (GlobalVars.GraphicsMode == 1) + { + result += "xpcall( function() settings().Rendering.graphicsMode = 2 end, function( err ) settings().Rendering.graphicsMode = 4 end );"; + } + else if (GlobalVars.GraphicsMode == 2) + { + result += "pcall(function() settings().Rendering.graphicsMode = 3 end);"; + } } //default values are ultra settings diff --git a/NovetusLauncher/NovetusLauncher/NovetusIcon.ico b/NovetusLauncher/NovetusLauncher/NovetusIcon.ico new file mode 100644 index 0000000..2b0c776 Binary files /dev/null and b/NovetusLauncher/NovetusLauncher/NovetusIcon.ico differ diff --git a/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj b/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj index 7995c5d..329d044 100644 --- a/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj +++ b/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj @@ -11,8 +11,7 @@ Properties - - + NovetusIcon.ico False False False @@ -257,12 +256,6 @@ true - - - - - - @@ -281,6 +274,9 @@ + + + diff --git a/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs b/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs index 96cf306..df4eba5 100644 --- a/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs +++ b/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.Designer.cs @@ -142,6 +142,7 @@ namespace NovetusLauncher this.label7 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); + this.checkBox5 = new System.Windows.Forms.CheckBox(); this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // @@ -1014,12 +1015,24 @@ namespace NovetusLauncher this.label9.TabIndex = 30; this.label9.Text = "Not Loaded"; // + // checkBox5 + // + this.checkBox5.AutoSize = true; + this.checkBox5.Location = new System.Drawing.Point(10, 152); + this.checkBox5.Name = "checkBox5"; + this.checkBox5.Size = new System.Drawing.Size(198, 17); + this.checkBox5.TabIndex = 31; + this.checkBox5.Text = "Doesn\'t have graphics mode options"; + this.checkBox5.UseVisualStyleBackColor = true; + this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged); + // // ClientinfoEditor // 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(632, 336); + this.Controls.Add(this.checkBox5); this.Controls.Add(this.label9); this.Controls.Add(this.label8); this.Controls.Add(this.label7); @@ -1160,5 +1173,6 @@ namespace NovetusLauncher private System.Windows.Forms.ToolStripMenuItem saveAsTextFileToolStripMenuItem; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label9; + private System.Windows.Forms.CheckBox checkBox5; } } diff --git a/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.cs b/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.cs index 3aff4b2..f3d74f4 100644 --- a/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.cs +++ b/NovetusLauncher/NovetusLauncher/SDK/ClientinfoCreator.cs @@ -30,6 +30,8 @@ namespace NovetusLauncher private bool Locked = false; private bool FixScriptMapMode = false; private bool AlreadyHasSecurity = false; + private bool NoGraphicsModeOptions = false; + private bool IsVersion2 = false; private string CustomArgs = ""; public ClientinfoEditor() @@ -205,7 +207,19 @@ namespace NovetusLauncher AlreadyHasSecurity = false; } } - + + void checkBox5_CheckedChanged(object sender, EventArgs e) + { + if (checkBox5.Checked == true) + { + NoGraphicsModeOptions = true; + } + else if (checkBox5.Checked == false) + { + NoGraphicsModeOptions = false; + } + } + void NewToolStripMenuItemClick(object sender, EventArgs e) { label9.Text = "Not Loaded"; @@ -227,6 +241,7 @@ namespace NovetusLauncher checkBox4.Checked = Locked; checkBox6.Checked = FixScriptMapMode; checkBox7.Checked = AlreadyHasSecurity; + checkBox5.Checked = NoGraphicsModeOptions; textBox3.Text = SelectedClientScriptMD5.ToUpper(CultureInfo.InvariantCulture); textBox2.Text = SelectedClientMD5.ToUpper(CultureInfo.InvariantCulture); textBox1.Text = SelectedClientDesc; @@ -247,7 +262,7 @@ namespace NovetusLauncher if (ofd.ShowDialog() == DialogResult.OK) { string line1; - string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline8, Decryptline9, Decryptline10, Decryptline11; + string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline8, Decryptline9, Decryptline10, Decryptline11, Decryptline12; using(StreamReader reader = new StreamReader(ofd.FileName)) { @@ -259,6 +274,7 @@ namespace NovetusLauncher try { + IsVersion2 = true; label9.Text = "v2"; ConvertedLine = SecurityFuncs.Base64DecodeNew(line1); } @@ -280,8 +296,21 @@ namespace NovetusLauncher Decryptline9 = SecurityFuncs.Base64Decode(result[8]); Decryptline10 = SecurityFuncs.Base64Decode(result[9]); Decryptline11 = SecurityFuncs.Base64Decode(result[10]); - - if (GlobalVars.AdminMode != true) + Decryptline12 = ""; + try + { + if (IsVersion2) + { + Decryptline12 = SecurityFuncs.Base64Decode(result[11]); + } + } + catch (Exception) + { + label9.Text = "v2 (DEV)"; + IsVersion2 = false; + } + + if (GlobalVars.AdminMode != true) { Boolean bline8 = Convert.ToBoolean(Decryptline8); if (bline8 == true) @@ -324,14 +353,26 @@ namespace NovetusLauncher bool bline10 = Convert.ToBoolean(Decryptline10); AlreadyHasSecurity = bline10; - - CustomArgs = Decryptline11; + + if (IsVersion2) + { + bool bline11 = Convert.ToBoolean(Decryptline11); + NoGraphicsModeOptions = bline11; + CustomArgs = Decryptline12; + } + else + { + //Agin, fake it. + NoGraphicsModeOptions = false; + CustomArgs = Decryptline11; + } checkBox1.Checked = UsesPlayerName; checkBox2.Checked = UsesID; checkBox3.Checked = LegacyMode; checkBox6.Checked = FixScriptMapMode; checkBox7.Checked = AlreadyHasSecurity; + checkBox5.Checked = NoGraphicsModeOptions; textBox3.Text = SelectedClientScriptMD5.ToUpper(CultureInfo.InvariantCulture); textBox2.Text = SelectedClientMD5.ToUpper(CultureInfo.InvariantCulture); textBox1.Text = SelectedClientDesc; @@ -365,7 +406,8 @@ namespace NovetusLauncher SecurityFuncs.Base64Encode(Locked.ToString()), SecurityFuncs.Base64Encode(FixScriptMapMode.ToString()), SecurityFuncs.Base64Encode(AlreadyHasSecurity.ToString()), - SecurityFuncs.Base64Encode(CustomArgs.ToString()) + SecurityFuncs.Base64Encode(NoGraphicsModeOptions.ToString()), + SecurityFuncs.Base64Encode(CustomArgs.ToString()) }; File.WriteAllText(sfd.FileName, SecurityFuncs.Base64Encode(string.Join("|",lines))); SelectedClientInfoPath = Path.GetDirectoryName(sfd.FileName); @@ -451,7 +493,8 @@ namespace NovetusLauncher SelectedClientDesc.ToString(), FixScriptMapMode.ToString(), AlreadyHasSecurity.ToString(), - CustomArgs.ToString() + NoGraphicsModeOptions.ToString(), + CustomArgs.ToString() }; File.WriteAllLines(sfd.FileName, lines); }