diff --git a/ARCHBLOXLauncher.csproj b/ARCHBLOXLauncher.csproj new file mode 100644 index 0000000..5006876 --- /dev/null +++ b/ARCHBLOXLauncher.csproj @@ -0,0 +1,13 @@ + + + + Exe + netcoreapp3.1 + archblox.ico + + + + + + + diff --git a/ARCHBLOXLauncher.sln b/ARCHBLOXLauncher.sln new file mode 100644 index 0000000..9b1c40d --- /dev/null +++ b/ARCHBLOXLauncher.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32516.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ARCHBLOXLauncher", "ARCHBLOXLauncher.csproj", "{1ABADBCC-4FC4-4496-8FDF-9A60DF745D2B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1ABADBCC-4FC4-4496-8FDF-9A60DF745D2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1ABADBCC-4FC4-4496-8FDF-9A60DF745D2B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1ABADBCC-4FC4-4496-8FDF-9A60DF745D2B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1ABADBCC-4FC4-4496-8FDF-9A60DF745D2B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {68C688A5-0720-4EB9-B32F-AFFB9E29F868} + EndGlobalSection +EndGlobal diff --git a/NewFile b/NewFile new file mode 100644 index 0000000..e69de29 diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..bbc4de6 --- /dev/null +++ b/Program.cs @@ -0,0 +1,69 @@ +using System; +using System.Net; +using System.Text; +using System.IO; +namespace ConsoleApp1 +{ + internal class Program + { + private static WebClient wc = new WebClient(); + static void Main() + { + Console.Clear(); + byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt"); + string webData = Encoding.UTF8.GetString(raw); + string version_string = webData; + string folderPath = Path.Combine(@"C:\ARCHBLOX\", version_string + @"\"); + string filePath = Path.Combine(folderPath, "ArchbloxPlayerBeta.exe"); + Console.WriteLine("ARCHBLOX"); + Console.WriteLine("1) Join a Game"); + Console.WriteLine("2) Host a Game"); + string number = Console.ReadLine(); + if (number == "1") + { + Console.Clear(); + Console.WriteLine("Server IP:"); + string ip = Console.ReadLine(); + Console.WriteLine("Server Port:"); + int port = Convert.ToInt32(Console.ReadLine()); + Console.WriteLine("Username:"); + string username = Console.ReadLine(); + Console.WriteLine("User ID:"); + int userid = Convert.ToInt32(Console.ReadLine()); + Console.WriteLine("Membership: (None BuildersClub TurboBuildersClub OutrageousBuildersClub)"); + string membership = Console.ReadLine(); + using (System.Diagnostics.Process pProcess = new System.Diagnostics.Process()) + { + pProcess.StartInfo.FileName = filePath; + pProcess.StartInfo.Arguments = "-a \"http://www.morblox.us/\" -j \"http://www.morblox.us/game/join.php?port=" + port + "&app=" + userid + "&ip=" + ip + "&username=" + username + "&id=" + userid + "&membership=" + membership + "\" -t \"1\""; + pProcess.StartInfo.UseShellExecute = false; + pProcess.StartInfo.RedirectStandardOutput = true; + pProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; + pProcess.StartInfo.CreateNoWindow = false; + pProcess.Start(); + Main(); + } + } + else if (number == "2") + { + Console.Clear(); + Console.WriteLine("Server Port:"); + int port = Convert.ToInt32(Console.ReadLine()); + using (System.Diagnostics.Process pProcess = new System.Diagnostics.Process()) + { + pProcess.StartInfo.FileName = filePath; + pProcess.StartInfo.Arguments = "-a \"http://www.morblox.us/\" -j \"http://www.morblox.us/game/gameserver.php?port=" + port + "\" -t \"1\""; + pProcess.StartInfo.UseShellExecute = false; + pProcess.StartInfo.RedirectStandardOutput = true; + pProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; + pProcess.StartInfo.CreateNoWindow = false; + pProcess.Start(); + Main(); + } + } else + { + Main(); + } + } + } +} diff --git a/archblox.ico b/archblox.ico new file mode 100644 index 0000000..ca5f59f Binary files /dev/null and b/archblox.ico differ