test
This commit is contained in:
parent
ae05a413de
commit
b5529eaff7
|
|
@ -0,0 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<ApplicationIcon>archblox.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="archblox.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -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
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 183 KiB |
Loading…
Reference in New Issue