diff --git a/NovetusLauncher/NovetusCMD/NovetusCMD.csproj b/NovetusLauncher/NovetusCMD/NovetusCMD.csproj new file mode 100644 index 0000000..8432944 --- /dev/null +++ b/NovetusLauncher/NovetusCMD/NovetusCMD.csproj @@ -0,0 +1,83 @@ + + + + {BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Release + AnyCPU + Exe + NovetusCMD + NovetusCMD + v4.0 + Properties + False + False + False + False + obj\$(Configuration)\ + 4 + Resources\NovetusIcon.ico + + + x86 + 4194304 + False + Auto + 4096 + + + bin\Debug\ + True + Full + False + True + DEBUG;TRACE;NOVETUS_APPS + obj\ + + + bin\Release\ + False + None + True + False + TRACE;NOVETUS_APPS + obj\ + + + + 4.0 + + + ..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll + + + + 3.5 + + + + 3.5 + + + + + + 3.5 + + + + + + + + + + + + + {759bfc2b-c130-4a2a-a01f-65abfee85b4c} + NovetusShared + + + + \ No newline at end of file diff --git a/NovetusLauncher/NovetusCMD/Program.cs b/NovetusLauncher/NovetusCMD/Program.cs new file mode 100644 index 0000000..69efd80 --- /dev/null +++ b/NovetusLauncher/NovetusCMD/Program.cs @@ -0,0 +1,329 @@ +/* + * Created by SharpDevelop. + * User: Bitl + * Date: 6/15/2019 + * Time: 5:10 PM + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ +using System; +using Mono.Nat; +using NovetusShared; +using System.Diagnostics; +using System.IO; +using System.ComponentModel; +using System.Reflection; + +namespace NovetusCMD +{ + class Program + { + public static void InitUPnP() + { + if (GlobalVars.UPnP == true) + { + try + { + UPnP.InitUPnP(DeviceFound,DeviceLost); + ConsolePrint("UPnP: Service initialized", 3); + } + catch (Exception ex) + { + ConsolePrint("UPnP: Unable to initialize UPnP. Reason - " + ex.Message, 2); + } + } + } + + public static void StartUPnP(INatDevice device, Protocol protocol, int port) + { + if (GlobalVars.UPnP == true) + { + try + { + UPnP.StartUPnP(device,protocol,port); + ConsolePrint("UPnP: Port " + port + " opened on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3); + } + catch (Exception ex) + { + ConsolePrint("UPnP: Unable to open port mapping. Reason - " + ex.Message, 2); + } + } + } + + public static void StopUPnP(INatDevice device, Protocol protocol, int port) + { + if (GlobalVars.UPnP == true) + { + try + { + UPnP.StopUPnP(device,protocol,port); + ConsolePrint("UPnP: Port " + port + " closed on '" + device.GetExternalIP() + "' (" + protocol.ToString() + ")", 3); + } + catch (Exception ex) + { + ConsolePrint("UPnP: Unable to close port mapping. Reason - " + ex.Message, 2); + } + } + } + + private static void DeviceFound(object sender, DeviceEventArgs args) + { + try + { + INatDevice device = args.Device; + ConsolePrint("UPnP: Device '" + device.GetExternalIP() + "' registered.", 3); + StartUPnP(device, Protocol.Udp, GlobalVars.RobloxPort); + StartUPnP(device, Protocol.Tcp, GlobalVars.RobloxPort); + StartUPnP(device, Protocol.Udp, GlobalVars.WebServer_Port); + StartUPnP(device, Protocol.Tcp, GlobalVars.WebServer_Port); + } + catch (Exception ex) + { + ConsolePrint("UPnP: Unable to register device. Reason - " + ex.Message, 2); + } + } + + private static void DeviceLost(object sender, DeviceEventArgs args) + { + try + { + INatDevice device = args.Device; + ConsolePrint("UPnP: Device '" + device.GetExternalIP() + "' disconnected.", 3); + StopUPnP(device, Protocol.Udp, GlobalVars.RobloxPort); + StopUPnP(device, Protocol.Tcp, GlobalVars.RobloxPort); + StopUPnP(device, Protocol.Udp, GlobalVars.WebServer_Port); + StopUPnP(device, Protocol.Tcp, GlobalVars.WebServer_Port); + } + catch (Exception ex) + { + ConsolePrint("UPnP: Unable to disconnect device. Reason - " + ex.Message, 2); + } + } + + static void StartWebServer() + { + if (SecurityFuncs.IsElevated) + { + try + { + GlobalVars.WebServer = new SimpleHTTPServer(GlobalVars.DataPath, GlobalVars.WebServer_Port); + ConsolePrint("WebServer: Server is running on port: " + GlobalVars.WebServer.Port.ToString(), 3); + } + catch (Exception ex) + { + ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (" + ex.Message + ")", 2); + } + } + else + { + ConsolePrint("WebServer: Failed to launch WebServer. Some features may not function. (Did not run as Administrator)", 2); + } + } + + static void StopWebServer() + { + if (SecurityFuncs.IsElevated) + { + try + { + ConsolePrint("WebServer: Server has stopped on port: " + GlobalVars.WebServer.Port.ToString(), 2); + GlobalVars.WebServer.Stop(); + } + catch (Exception ex) + { + ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (" + ex.Message + ")", 2); + } + } + else + { + ConsolePrint("WebServer: Failed to stop WebServer. Some features may not function. (Did not run as Administrator)", 2); + } + } + + static void WriteConfigValues() + { + LauncherFuncs.WriteConfigValues(GlobalVars.ConfigDir + "\\config.ini"); + ConsolePrint("Config Saved.", 3); + } + + static void ProgramClose(object sender, EventArgs e) + { + WriteConfigValues(); + if (GlobalVars.IsWebServerOn == true) + { + StopWebServer(); + } + } + + static void ReadConfigValues() + { + LauncherFuncs.ReadConfigValues(GlobalVars.ConfigDir + "\\config.ini"); + + if (GlobalVars.UserID == 0) + { + LauncherFuncs.GeneratePlayerID(); + WriteConfigValues(); + } + + if (GlobalVars.PlayerLimit == 0) + { + //We need at least a limit of 12 players. + GlobalVars.PlayerLimit = 12; + } + + ConsolePrint("Config loaded.", 3); + ReadClientValues(GlobalVars.SelectedClient); + } + + static void ReadClientValues(string ClientName) + { + string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.nov"; + + if (!File.Exists(clientpath)) + { + ConsolePrint("ERROR 1 - No clientinfo.nov detected with the client you chose. The client either cannot be loaded, or it is not available.", 2); + GlobalVars.SelectedClient = GlobalVars.DefaultClient; + } + + LauncherFuncs.ReadClientValues(clientpath); + ConsolePrint("Client '" + GlobalVars.SelectedClient + "' successfully loaded.", 3); + } + + public static void Main(string[] args) + { + if (args.Length == 0) + { + ConsolePrint("NovetusCMD will use values defined from the launcher. If you want to define values for NovetusCMD, change the settings on the launcher through the 'Host' tab.", 5); + } + + string[] lines = File.ReadAllLines(GlobalVars.ConfigDir + "\\info.txt"); //File is in System.IO + string version = lines[0]; + GlobalVars.DefaultClient = lines[1]; + GlobalVars.DefaultMap = lines[2]; + GlobalVars.SelectedClient = GlobalVars.DefaultClient; + GlobalVars.Map = GlobalVars.DefaultMap; + Console.Title = "Novetus " + version; + ConsolePrint("Novetus version " + version + " loaded. Initializing config.", 4); + + if (!File.Exists(GlobalVars.ConfigDir + "\\config.ini")) + { + ConsolePrint("WARNING 2 - config.ini not found. Creating one with default values.", 5); + WriteConfigValues(); + } + + GlobalVars.Version = version; + + ReadConfigValues(); + InitUPnP(); + StartWebServer(); + + AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProgramClose); + + StartServer(true); + Console.ReadKey(); + } + + static void StartServer(bool no3d) + { + string luafile = ""; + if (!GlobalVars.FixScriptMapMode) + { + luafile = "rbxasset://scripts\\\\" + GlobalVars.ScriptName + ".lua"; + } + else + { + luafile = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\scripts\\" + GlobalVars.ScriptGenName + ".lua"; + } + string mapfile = GlobalVars.MapsDir + @"\\" + TreeNodeHelper.GetFolderNameFromPrefix(GlobalVars.Map) + GlobalVars.Map; + string rbxexe = ""; + if (GlobalVars.LegacyMode == true) + { + rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp.exe"; + } + else + { + rbxexe = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\RobloxApp_server.exe"; + } + string quote = "\""; + string args = ""; + if (GlobalVars.CustomArgs.Equals("%args%")) + { + if (!GlobalVars.FixScriptMapMode) + { + args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); " + ScriptGenerator.GetScriptFuncForType(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient) + quote + (no3d ? " -no3d" : ""); + } + else + { + ScriptGenerator.GenerateScriptForClient(ScriptGenerator.ScriptType.Server, GlobalVars.SelectedClient); + args = "-script " + quote + luafile + quote + (no3d ? " -no3d" : "") + " " + quote + mapfile + quote; + } + } + else + { + if (!no3d) + { + args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe); + } + else + { + args = ClientScript.CompileScript(GlobalVars.CustomArgs, "", "", mapfile, luafile, rbxexe); + } + } + try + { + //when we add upnp, change this + ConsolePrint("Server Loaded.", 4); + Process client = new Process(); + client.StartInfo.FileName = rbxexe; + client.StartInfo.Arguments = args; + client.EnableRaisingEvents = true; + ReadClientValues(GlobalVars.SelectedClient); + client.Exited += new EventHandler(ServerExited); + client.Start(); + SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Server); + } + catch (Exception ex) + { + ConsolePrint("ERROR 2 - Failed to launch Novetus. (" + ex.Message + ")", 2); + } + } + + static void ServerExited(object sender, EventArgs e) + { + Environment.Exit(0); + } + + static void ConsolePrint(string text, int type) + { + ConsoleText("[" + DateTime.Now.ToShortTimeString() + "] - ", ConsoleColor.White); + if (type == 1) + { + ConsoleText(text, ConsoleColor.White); + } + else if (type == 2) + { + ConsoleText(text, ConsoleColor.Red); + } + else if (type == 3) + { + ConsoleText(text, ConsoleColor.Green); + } + else if (type == 4) + { + ConsoleText(text, ConsoleColor.Cyan); + } + else if (type == 5) + { + ConsoleText(text, ConsoleColor.Yellow); + } + + ConsoleText(Environment.NewLine, ConsoleColor.White); + } + + static void ConsoleText(string text, ConsoleColor color) + { + Console.ForegroundColor = color; + Console.Write(text); + } + } +} \ No newline at end of file diff --git a/NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs b/NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..121648a --- /dev/null +++ b/NovetusLauncher/NovetusCMD/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NovetusCMD")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NovetusCMD")] +[assembly: AssemblyCopyright("Copyright 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/NovetusLauncher/NovetusCMD/Resources/NovetusIcon.ico b/NovetusLauncher/NovetusCMD/Resources/NovetusIcon.ico new file mode 100644 index 0000000..2b0c776 Binary files /dev/null and b/NovetusLauncher/NovetusCMD/Resources/NovetusIcon.ico differ diff --git a/NovetusLauncher/NovetusCMD/app.config b/NovetusLauncher/NovetusCMD/app.config new file mode 100644 index 0000000..970c80b --- /dev/null +++ b/NovetusLauncher/NovetusCMD/app.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/NovetusLauncher/NovetusCMD/packages.config b/NovetusLauncher/NovetusCMD/packages.config new file mode 100644 index 0000000..08e33ab --- /dev/null +++ b/NovetusLauncher/NovetusCMD/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/NovetusLauncher/NovetusLauncher.sln b/NovetusLauncher/NovetusLauncher.sln index f5de56c..b84b65e 100644 --- a/NovetusLauncher/NovetusLauncher.sln +++ b/NovetusLauncher/NovetusLauncher.sln @@ -4,6 +4,10 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # SharpDevelop 5.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NovetusLauncher", "NovetusLauncher\NovetusLauncher.csproj", "{F92FFBED-2767-4676-9711-BB89CDA58A43}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NovetusCMD", "NovetusCMD\NovetusCMD.csproj", "{BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NovetusShared", "NovetusShared\NovetusShared.csproj", "{759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -14,5 +18,13 @@ Global {F92FFBED-2767-4676-9711-BB89CDA58A43}.Debug|Any CPU.Build.0 = Debug|Any CPU {F92FFBED-2767-4676-9711-BB89CDA58A43}.Release|Any CPU.ActiveCfg = Release|Any CPU {F92FFBED-2767-4676-9711-BB89CDA58A43}.Release|Any CPU.Build.0 = Release|Any CPU + {BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAC99C87-F6C1-4ED0-AA2E-05C6AE8979EA}.Release|Any CPU.Build.0 = Release|Any CPU + {759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {759BFC2B-C130-4A2A-A01F-65ABFEE85B4C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/NovetusLauncher/NovetusLauncher/CharacterCustomization.cs b/NovetusLauncher/NovetusLauncher/CharacterCustomization.cs index 45b53f4..e3faa23 100644 --- a/NovetusLauncher/NovetusLauncher/CharacterCustomization.cs +++ b/NovetusLauncher/NovetusLauncher/CharacterCustomization.cs @@ -16,6 +16,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Diagnostics; using System.ComponentModel; +using NovetusShared; namespace NovetusLauncher { diff --git a/NovetusLauncher/NovetusLauncher/ClientScriptDocumentation.cs b/NovetusLauncher/NovetusLauncher/ClientScriptDocumentation.cs index 98402b6..a807486 100644 --- a/NovetusLauncher/NovetusLauncher/ClientScriptDocumentation.cs +++ b/NovetusLauncher/NovetusLauncher/ClientScriptDocumentation.cs @@ -10,6 +10,7 @@ using System; using System.Drawing; using System.Windows.Forms; using System.IO; +using NovetusShared; namespace NovetusLauncher { diff --git a/NovetusLauncher/NovetusLauncher/ClientinfoCreator.cs b/NovetusLauncher/NovetusLauncher/ClientinfoCreator.cs index c7f67d3..2daa1fb 100644 --- a/NovetusLauncher/NovetusLauncher/ClientinfoCreator.cs +++ b/NovetusLauncher/NovetusLauncher/ClientinfoCreator.cs @@ -12,6 +12,7 @@ using System.Windows.Forms; using System.IO; using System.Diagnostics; using System.Threading; +using NovetusShared; namespace NovetusLauncher { diff --git a/NovetusLauncher/NovetusLauncher/ItemMaker.cs b/NovetusLauncher/NovetusLauncher/ItemMaker.cs index 9f8f535..eeef097 100644 --- a/NovetusLauncher/NovetusLauncher/ItemMaker.cs +++ b/NovetusLauncher/NovetusLauncher/ItemMaker.cs @@ -13,6 +13,7 @@ using System.Net; using System.IO; using System.Reflection; using System.ComponentModel; +using NovetusShared; namespace NovetusLauncher { diff --git a/NovetusLauncher/NovetusLauncher/LoaderForm.cs b/NovetusLauncher/NovetusLauncher/LoaderForm.cs index 6dcb01c..d36d2db 100644 --- a/NovetusLauncher/NovetusLauncher/LoaderForm.cs +++ b/NovetusLauncher/NovetusLauncher/LoaderForm.cs @@ -16,6 +16,7 @@ using System.Reflection; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; +using NovetusShared; namespace NovetusLauncher { diff --git a/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs b/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs index 3b4bef1..67eb72f 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm.Designer.cs @@ -57,7 +57,6 @@ namespace NovetusLauncher this.button6 = new System.Windows.Forms.Button(); this.textBox3 = new System.Windows.Forms.TextBox(); this.treeView1 = new System.Windows.Forms.TreeView(); - this.checkBox2 = new System.Windows.Forms.CheckBox(); this.button23 = new System.Windows.Forms.Button(); this.button22 = new System.Windows.Forms.Button(); this.numericUpDown3 = new System.Windows.Forms.NumericUpDown(); @@ -313,7 +312,6 @@ namespace NovetusLauncher this.tabPage2.Controls.Add(this.button6); this.tabPage2.Controls.Add(this.textBox3); this.tabPage2.Controls.Add(this.treeView1); - this.tabPage2.Controls.Add(this.checkBox2); this.tabPage2.Controls.Add(this.button23); this.tabPage2.Controls.Add(this.button22); this.tabPage2.Controls.Add(this.numericUpDown3); @@ -346,7 +344,7 @@ namespace NovetusLauncher // // checkBox4 // - this.checkBox4.Location = new System.Drawing.Point(152, 198); + this.checkBox4.Location = new System.Drawing.Point(152, 187); this.checkBox4.Name = "checkBox4"; this.checkBox4.Size = new System.Drawing.Size(104, 17); this.checkBox4.TabIndex = 57; @@ -382,16 +380,6 @@ namespace NovetusLauncher this.treeView1.TabIndex = 54; this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TreeView1AfterSelect); // - // checkBox2 - // - this.checkBox2.Location = new System.Drawing.Point(152, 182); - this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(134, 16); - this.checkBox2.TabIndex = 53; - this.checkBox2.Text = "Disable Teapot Turret"; - this.checkBox2.UseVisualStyleBackColor = true; - this.checkBox2.CheckedChanged += new System.EventHandler(this.CheckBox2CheckedChanged); - // // button23 // this.button23.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -1079,7 +1067,6 @@ namespace NovetusLauncher private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label2; private System.Windows.Forms.TabPage tabPage5; - private System.Windows.Forms.CheckBox checkBox2; private System.Windows.Forms.Button button23; private System.Windows.Forms.Button button22; private System.Windows.Forms.Button button7; diff --git a/NovetusLauncher/NovetusLauncher/MainForm.cs b/NovetusLauncher/NovetusLauncher/MainForm.cs index ad14137..0b76301 100644 --- a/NovetusLauncher/NovetusLauncher/MainForm.cs +++ b/NovetusLauncher/NovetusLauncher/MainForm.cs @@ -15,6 +15,7 @@ using System.Diagnostics; using System.ComponentModel; using System.Reflection; using Mono.Nat; +using NovetusShared; namespace NovetusLauncher { @@ -411,7 +412,6 @@ namespace NovetusLauncher numericUpDown2.Value = Convert.ToDecimal(GlobalVars.RobloxPort); label37.Text = GlobalVars.IP; label38.Text = GlobalVars.RobloxPort.ToString(); - checkBox2.Checked = GlobalVars.DisableTeapotTurret; checkBox4.Checked = GlobalVars.UPnP; ConsolePrint("Config loaded.", 3); ReadClientValues(GlobalVars.SelectedClient); @@ -727,8 +727,7 @@ namespace NovetusLauncher void ConsolePrint(string text, int type) { - richTextBox1.AppendText("[" + DateTime.Now.ToShortTimeString() + "]", Color.White); - richTextBox1.AppendText(" - ", Color.White); + richTextBox1.AppendText("[" + DateTime.Now.ToShortTimeString() + "] - ", Color.White); if (type == 1) { richTextBox1.AppendText(text, Color.White); @@ -844,7 +843,6 @@ namespace NovetusLauncher client.Exited += new EventHandler(ClientExited); client.Start(); SecurityFuncs.RenameWindow(client, ScriptGenerator.ScriptType.Client); - SecurityFuncs.InjectAntiCheat(client); GlobalVars.presence.details = ""; GlobalVars.presence.state = "In " + GlobalVars.SelectedClient + " Game"; GlobalVars.presence.largeImageText = GlobalVars.PlayerName + " | In " + GlobalVars.SelectedClient + " Game"; @@ -1389,18 +1387,6 @@ namespace NovetusLauncher GlobalVars.RobloxPort = GlobalVars.DefaultRobloxPort; } - void CheckBox2CheckedChanged(object sender, EventArgs e) - { - if (checkBox2.Checked == true) - { - GlobalVars.DisableTeapotTurret = true; - } - else if (checkBox2.Checked == false) - { - GlobalVars.DisableTeapotTurret = false; - } - } - void TreeView1AfterSelect(object sender, TreeViewEventArgs e) { if (treeView1.SelectedNode.Nodes.Count == 0) diff --git a/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj b/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj index b1f786b..8d35410 100644 --- a/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj +++ b/NovetusLauncher/NovetusLauncher/NovetusLauncher.csproj @@ -18,6 +18,9 @@ False obj\$(Configuration)\ 4 + False + False + OnBuildSuccess x86 @@ -32,16 +35,18 @@ Full False True - DEBUG;TRACE + DEBUG;TRACE;LAUNCHER;NOVETUS_APPS + obj\ bin\Release\ False None True - False - TRACE + True + TRACE;LAUNCHER;NOVETUS_APPS obj\ + Project @@ -79,7 +84,6 @@ ItemMaker.cs - LoaderForm.cs @@ -129,5 +133,11 @@ + + + {759bfc2b-c130-4a2a-a01f-65abfee85b4c} + NovetusShared + + \ No newline at end of file diff --git a/NovetusLauncher/NovetusLauncher/Program.cs b/NovetusLauncher/NovetusLauncher/Program.cs index 7b9ac48..f723525 100644 --- a/NovetusLauncher/NovetusLauncher/Program.cs +++ b/NovetusLauncher/NovetusLauncher/Program.cs @@ -8,6 +8,7 @@ */ using System; using System.Windows.Forms; +using NovetusShared; namespace NovetusLauncher { diff --git a/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs b/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs index 606c495..b9ac767 100644 --- a/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs +++ b/NovetusLauncher/NovetusLauncher/Properties/AssemblyInfo.cs @@ -1,31 +1,27 @@ -#region Using directives - +#region Using directives using System; using System.Reflection; using System.Runtime.InteropServices; #endregion - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Novetus")] -[assembly: AssemblyDescription("Launcher for old ROBLOX clients")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Bitl")] -[assembly: AssemblyProduct("Novetus")] -[assembly: AssemblyCopyright("(c) Bitl 2018-2019. All rights to ROBLOX go to the ROBLOX Corporation")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - +[assembly: AssemblyTitle ("Novetus")] +[assembly: AssemblyDescription ("Launcher for old ROBLOX clients")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("Bitl")] +[assembly: AssemblyProduct ("Novetus")] +[assembly: AssemblyCopyright ("(c) Bitl 2018-2019. All rights to ROBLOX go to the ROBLOX Corporation")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] // This sets the default COM visibility of types in the assembly to invisible. // If you need to expose a type to COM, use [ComVisible(true)] on that type. -[assembly: ComVisible(false)] - +[assembly: ComVisible (false)] // The assembly version has following format : // // Major.Minor.Build.Revision // // You can specify all the values or you can use the default the Revision and // Build Numbers by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion ("1.0.*")] diff --git a/NovetusLauncher/NovetusLauncher/QuickConfigure.cs b/NovetusLauncher/NovetusLauncher/QuickConfigure.cs index 15c80f0..3bd1946 100644 --- a/NovetusLauncher/NovetusLauncher/QuickConfigure.cs +++ b/NovetusLauncher/NovetusLauncher/QuickConfigure.cs @@ -15,6 +15,7 @@ using System.Text; using System.Text.RegularExpressions; using System.IO; using System.ComponentModel; +using NovetusShared; namespace NovetusLauncher { diff --git a/NovetusLauncher/NovetusLauncher/ServerInfo.cs b/NovetusLauncher/NovetusLauncher/ServerInfo.cs index 4ba7bad..1b5fb91 100644 --- a/NovetusLauncher/NovetusLauncher/ServerInfo.cs +++ b/NovetusLauncher/NovetusLauncher/ServerInfo.cs @@ -10,6 +10,7 @@ using System; using System.Drawing; using System.Windows.Forms; using System.Net; +using NovetusShared; namespace NovetusLauncher { diff --git a/NovetusLauncher/NovetusLauncher/LauncherFuncs.cs b/NovetusLauncher/NovetusShared/LauncherFuncs.cs similarity index 98% rename from NovetusLauncher/NovetusLauncher/LauncherFuncs.cs rename to NovetusLauncher/NovetusShared/LauncherFuncs.cs index 45b68ce..d4d6b11 100644 --- a/NovetusLauncher/NovetusLauncher/LauncherFuncs.cs +++ b/NovetusLauncher/NovetusShared/LauncherFuncs.cs @@ -26,7 +26,7 @@ using System.Net.Sockets; using System.Net; using Mono.Nat; -namespace NovetusLauncher +namespace NovetusShared { /// /// Description of LauncherFuncs. @@ -39,7 +39,7 @@ namespace NovetusLauncher public static void ReadConfigValues(string cfgpath) { - string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline8, Decryptline9, Decryptline10; + string Decryptline1, Decryptline2, Decryptline3, Decryptline4, Decryptline5, Decryptline6, Decryptline7, Decryptline9, Decryptline10; IniFile ini = new IniFile(cfgpath); @@ -52,7 +52,6 @@ namespace NovetusLauncher Decryptline5 = ini.IniReadValue(section, "Map"); Decryptline6 = ini.IniReadValue(section, "RobloxPort"); Decryptline7 = ini.IniReadValue(section, "PlayerLimit"); - Decryptline8 = ini.IniReadValue(section, "DisableTeapotTurret"); Decryptline9 = ini.IniReadValue(section, "ShowHatsOnExtra"); Decryptline10 = ini.IniReadValue(section, "UPnP"); @@ -74,9 +73,6 @@ namespace NovetusLauncher int iline7 = Convert.ToInt32(Decryptline7); GlobalVars.PlayerLimit = iline7; - bool bline8 = Convert.ToBoolean(Decryptline8); - GlobalVars.DisableTeapotTurret = bline8; - bool bline9 = Convert.ToBoolean(Decryptline9); GlobalVars.Custom_Extra_ShowHats = bline9; @@ -99,7 +95,6 @@ namespace NovetusLauncher ini.IniWriteValue(section, "Map", GlobalVars.Map.ToString()); ini.IniWriteValue(section, "RobloxPort", GlobalVars.RobloxPort.ToString()); ini.IniWriteValue(section, "PlayerLimit", GlobalVars.PlayerLimit.ToString()); - ini.IniWriteValue(section, "DisableTeapotTurret", GlobalVars.DisableTeapotTurret.ToString()); ini.IniWriteValue(section, "ShowHatsOnExtra", GlobalVars.Custom_Extra_ShowHats.ToString()); ini.IniWriteValue(section, "UPnP", GlobalVars.UPnP.ToString()); WriteCustomizationValues(cfgpath.Replace(".ini","_customization.ini")); @@ -116,7 +111,6 @@ namespace NovetusLauncher GlobalVars.Map = GlobalVars.DefaultMap; GlobalVars.RobloxPort = 53640; GlobalVars.PlayerLimit = 12; - GlobalVars.DisableTeapotTurret = false; GlobalVars.Custom_Extra_ShowHats = false; GlobalVars.UPnP = false; ResetCustomizationValues(); @@ -833,17 +827,8 @@ namespace NovetusLauncher RenameWindow(exe, type); } } - - public static void InjectAntiCheat(Process client) - { - if (client.IsRunning() == true) - { - var injector = new DllInjector(); - injector.Inject(client, GlobalVars.BasePath + "\\AntiCheat.dll"); - } - } } - + public static class RichTextBoxExtensions { public static void AppendText(this RichTextBox box, string text, Color color) @@ -980,7 +965,7 @@ namespace NovetusLauncher } else if (type == ScriptType.Server) { - return "_G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + "," + GlobalVars.DisableTeapotTurret.ToString().ToLower() + ")"; + return "_G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + ")"; } else if (type == ScriptType.Solo) { @@ -1254,7 +1239,7 @@ namespace NovetusLauncher } else if (type == ScriptGenerator.ScriptType.Server) { - return "dofile('" + luafile + "'); _G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + "," + GlobalVars.DisableTeapotTurret.ToString().ToLower() + ")"; + return "dofile('" + luafile + "'); _G.CSServer(" + GlobalVars.RobloxPort + "," + GlobalVars.PlayerLimit + "," + md5s + ")"; } else if (type == ScriptGenerator.ScriptType.Solo) { @@ -2114,7 +2099,6 @@ namespace NovetusLauncher public static int DefaultRobloxPort = 53640; public static int WebServer_Port = (RobloxPort+1); public static int PlayerLimit = 12; - public static bool DisableTeapotTurret = false; //player settings public static int UserID = 0; public static string PlayerName = "Player"; diff --git a/NovetusLauncher/NovetusShared/NovetusShared.csproj b/NovetusLauncher/NovetusShared/NovetusShared.csproj new file mode 100644 index 0000000..d7f12fa --- /dev/null +++ b/NovetusLauncher/NovetusShared/NovetusShared.csproj @@ -0,0 +1,59 @@ + + + + {759BFC2B-C130-4A2A-A01F-65ABFEE85B4C} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Release + AnyCPU + Library + NovetusShared + NovetusShared + v4.0 + Properties + + + AnyCPU + + + bin\Debug\ + True + Full + False + True + DEBUG;TRACE + + + bin\Release\ + False + None + True + False + TRACE + + + + 4.0 + + + ..\packages\Mono.Nat.1.2.24.0\lib\net40\Mono.Nat.dll + + + + 3.5 + + + + + + 3.5 + + + + + + + + + + + \ No newline at end of file diff --git a/NovetusLauncher/NovetusShared/Properties/AssemblyInfo.cs b/NovetusLauncher/NovetusShared/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a4be006 --- /dev/null +++ b/NovetusLauncher/NovetusShared/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NovetusShared")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NovetusShared")] +[assembly: AssemblyCopyright("Copyright 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/NovetusLauncher/NovetusShared/obj/Release/NovetusShared.dll b/NovetusLauncher/NovetusShared/obj/Release/NovetusShared.dll new file mode 100644 index 0000000..d93da04 Binary files /dev/null and b/NovetusLauncher/NovetusShared/obj/Release/NovetusShared.dll differ diff --git a/NovetusLauncher/NovetusShared/packages.config b/NovetusLauncher/NovetusShared/packages.config new file mode 100644 index 0000000..08e33ab --- /dev/null +++ b/NovetusLauncher/NovetusShared/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/NovetusLauncher/packages/repositories.config b/NovetusLauncher/packages/repositories.config index 73d7205..599e613 100644 --- a/NovetusLauncher/packages/repositories.config +++ b/NovetusLauncher/packages/repositories.config @@ -1,4 +1,6 @@  + + \ No newline at end of file