diff --git a/BodyColorGen/BodyColorGen.sln b/BodyColorGen/BodyColorGen.sln new file mode 100644 index 0000000..8d9181e --- /dev/null +++ b/BodyColorGen/BodyColorGen.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +# SharpDevelop 4.4 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BodyColorGen", "BodyColorGen\BodyColorGen.csproj", "{7368B594-5126-4A81-B047-E5A2580D968C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7368B594-5126-4A81-B047-E5A2580D968C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7368B594-5126-4A81-B047-E5A2580D968C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7368B594-5126-4A81-B047-E5A2580D968C}.Release|Any CPU.Build.0 = Release|Any CPU + {7368B594-5126-4A81-B047-E5A2580D968C}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/BodyColorGen/BodyColorGen/BodyColorGen.csproj b/BodyColorGen/BodyColorGen/BodyColorGen.csproj new file mode 100644 index 0000000..d7cf688 --- /dev/null +++ b/BodyColorGen/BodyColorGen/BodyColorGen.csproj @@ -0,0 +1,53 @@ + + + + {7368B594-5126-4A81-B047-E5A2580D968C} + Debug + AnyCPU + Exe + BodyColorGen + BodyColorGen + v3.5 + Properties + Resources\RBXLegacyIcon.ico + False + + + x86 + + + bin\Debug\ + True + Full + False + True + DEBUG;TRACE + + + bin\Release\ + False + None + True + False + TRACE + + + + + 3.5 + + + + 3.5 + + + + 3.5 + + + + + + + + \ No newline at end of file diff --git a/BodyColorGen/BodyColorGen/Program.cs b/BodyColorGen/BodyColorGen/Program.cs new file mode 100644 index 0000000..ad3809c --- /dev/null +++ b/BodyColorGen/BodyColorGen/Program.cs @@ -0,0 +1,105 @@ +/* + * Created by SharpDevelop. + * User: BITL + * Date: 5/24/2017 + * Time: 7:01 PM + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ +using System; +using System.Xml; +using System.IO; + +namespace BodyColorGen +{ + class Program + { + public static void Main(string[] args) + { + Console.Title = "RBXLegacy - Body Color Generator"; + + int[] colorArray = new int[32] {1,208,194,199,26,21,24,226,23,107,102,11,45,135,106,105,141,28,37,119,29,151,38,192,104,9,101,5,153,217,18,125}; + int HeadColor,TorsoColor,LArmColor,RArmColor,LLegColor,RLegColor; + int FleshColor,ShirtColor,PantsColor; + while (true) + { + Random rand = new Random(); + FleshColor = rand.Next(colorArray.Length); + ShirtColor = rand.Next(colorArray.Length); + PantsColor = rand.Next(colorArray.Length); + HeadColor = colorArray[FleshColor]; + TorsoColor = colorArray[ShirtColor]; + LArmColor = colorArray[FleshColor]; + RArmColor = colorArray[FleshColor]; + LLegColor = colorArray[PantsColor]; + RLegColor = colorArray[PantsColor]; + string dirname = "bodycolors/"; + if(!Directory.Exists(dirname)) + { + System.IO.Directory.CreateDirectory(dirname); + } + string filename = dirname + HeadColor + "-" + TorsoColor + "-" + LArmColor + "-" + RArmColor + "-" + LLegColor + "-" + RLegColor +".rbxm"; + if (!File.Exists(filename)) + { + Console.ForegroundColor = ConsoleColor.Green; + Console.WriteLine("Writing " + filename); + XmlTextWriter writer = new XmlTextWriter(filename, System.Text.Encoding.UTF8); + writer.Formatting = Formatting.Indented; + writer.Indentation = 3; + writer.WriteStartDocument(true); + writer.WriteStartElement("roblox"); + writer.WriteAttributeString("xmlns:xmime", "http://www.w3.org/2005/05/xmlmime"); + writer.WriteAttributeString("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + writer.WriteAttributeString("xsi:noNamespaceSchemaLocation", "http://www.roblox.com/roblox.xsd"); + writer.WriteAttributeString("version", "4"); + writer.WriteStartElement("External"); + writer.WriteString("null"); + writer.WriteEndElement(); + writer.WriteStartElement("External"); + writer.WriteString("nil"); + writer.WriteEndElement(); + writer.WriteStartElement("Item"); + writer.WriteAttributeString("class", "BodyColors"); + writer.WriteStartElement("Properties"); + writer.WriteStartElement("int"); + writer.WriteAttributeString("name", "HeadColor"); + writer.WriteString(HeadColor.ToString()); + writer.WriteEndElement(); + writer.WriteStartElement("int"); + writer.WriteAttributeString("name", "LeftArmColor"); + writer.WriteString(LArmColor.ToString()); + writer.WriteEndElement(); + writer.WriteStartElement("int"); + writer.WriteAttributeString("name", "LeftLegColor"); + writer.WriteString(LLegColor.ToString()); + writer.WriteEndElement(); + writer.WriteStartElement("string"); + writer.WriteAttributeString("name", "Name"); + writer.WriteString("Body Colors"); + writer.WriteEndElement(); + writer.WriteStartElement("int"); + writer.WriteAttributeString("name", "RightArmColor"); + writer.WriteString(RArmColor.ToString()); + writer.WriteEndElement(); + writer.WriteStartElement("int"); + writer.WriteAttributeString("name", "RightLegColor"); + writer.WriteString(RLegColor.ToString()); + writer.WriteEndElement(); + writer.WriteStartElement("int"); + writer.WriteAttributeString("name", "TorsoColor"); + writer.WriteString(TorsoColor.ToString()); + writer.WriteEndElement(); + writer.WriteStartElement("bool"); + writer.WriteAttributeString("name", "archivable"); + writer.WriteString("true"); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.WriteEndDocument(); + writer.Close(); + } + } + } + } +} \ No newline at end of file diff --git a/BodyColorGen/BodyColorGen/Properties/AssemblyInfo.cs b/BodyColorGen/BodyColorGen/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5eb6d4a --- /dev/null +++ b/BodyColorGen/BodyColorGen/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("BodyColorGen")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("BodyColorGen")] +[assembly: AssemblyCopyright("Copyright 2017")] +[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/BodyColorGen/BodyColorGen/Resources/RBXLegacyIcon.ico b/BodyColorGen/BodyColorGen/Resources/RBXLegacyIcon.ico new file mode 100644 index 0000000..d166bf8 Binary files /dev/null and b/BodyColorGen/BodyColorGen/Resources/RBXLegacyIcon.ico differ diff --git a/CSMPFunctions.lua b/CSMPFunctions.lua index 53f8eb0..a9bc2d9 100644 --- a/CSMPFunctions.lua +++ b/CSMPFunctions.lua @@ -1,5 +1,3 @@ -rbxversion = version(); -print("ROBLOX Client version '" .. rbxversion .. "' loaded."); --set this to pre-alpha, alpha, beta, pre-gamma, gamma, delta-gamma or delta. rbxlegacyversion = "" if (rbxlegacyversion == "pre-alpha") then --mid-2008 and below. currently for the modified clients. @@ -52,6 +50,9 @@ elseif (rbxlegacyversion == "delta") then -- late 2010-early 2011. end)) end +rbxversion = version(); +print("ROBLOX Client version '" .. rbxversion .. "' loaded."); + HeadColor=BrickColor.DarkGray(); TorsoColor=BrickColor.DarkGray(); LArmColor=BrickColor.DarkGray(); @@ -59,9 +60,9 @@ LLegColor=BrickColor.DarkGray(); RArmColor=BrickColor.DarkGray(); RLegColor=BrickColor.DarkGray(); --localized hats. -Hat1 = "fedora.rbxm" -Hat2 = "fedora.rbxm" -Hat3 = "fedora.rbxm" +Hat1 = "NoHat.rbxm"; +Hat2 = "NoHat.rbxm"; +Hat3 = "NoHat.rbxm"; function PlayerColorize() if (rbxlegacyversion == "pre-alpha") then @@ -404,7 +405,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,Hat1ID,Hat2ID, Hat1 = "rbxasset://charcustom/hats/"..Hat1ID Hat2 = "rbxasset://charcustom/hats/"..Hat2ID Hat3 = "rbxasset://charcustom/hats/"..Hat3ID - local charapp = "rbxasset://charcustom/CharacterColors.rbxm;"..Hat1..";"..Hat2..";"..Hat3 + local charapp = "rbxasset://charcustom/bodycolors/"..HeadColorID.."-"..TorsoColorID.."-"..LeftArmColorID.."-"..RightArmColorID.."-"..LeftLegColorID.."-"..RightLegColorID..".rbxm;"..Hat1..";"..Hat2..";"..Hat3 player.CharacterAppearance = charapp else Player.CharacterAppearance=0; @@ -514,7 +515,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,Hat1ID,Hat2ID, Hat1 = "rbxasset://charcustom/hats/"..Hat1ID Hat2 = "rbxasset://charcustom/hats/"..Hat2ID Hat3 = "rbxasset://charcustom/hats/"..Hat3ID - local charapp = "rbxasset://charcustom/CharacterColors.rbxm;"..Hat1..";"..Hat2..";"..Hat3 + local charapp = "rbxasset://charcustom/bodycolors/"..HeadColorID.."-"..TorsoColorID.."-"..LeftArmColorID.."-"..RightArmColorID.."-"..LeftLegColorID.."-"..RightLegColorID..".rbxm;"..Hat1..";"..Hat2..";"..Hat3 player.CharacterAppearance = charapp else Player.CharacterAppearance=0; @@ -524,7 +525,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,Hat1ID,Hat2ID, game:GetService("Visit"); game.GuiRoot.MainMenu.Tools:Remove() game.GuiRoot.MainMenu.Insert:Remove() - game.GuiRoot.RightPalette.ReportAbuse:Remove() else pcall(function() game:SetPlaceID(-1, false) end); pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end); @@ -552,7 +552,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,Hat1ID,Hat2ID, Hat1 = "rbxasset://charcustom/hats/"..Hat1ID Hat2 = "rbxasset://charcustom/hats/"..Hat2ID Hat3 = "rbxasset://charcustom/hats/"..Hat3ID - local charapp = "rbxasset://charcustom/CharacterColors.rbxm;"..Hat1..";"..Hat2..";"..Hat3 + local charapp = "rbxasset://charcustom/bodycolors/"..HeadColorID.."-"..TorsoColorID.."-"..LeftArmColorID.."-"..RightArmColorID.."-"..LeftLegColorID.."-"..RightLegColorID..".rbxm;"..Hat1..";"..Hat2..";"..Hat3 player.CharacterAppearance = charapp else player.CharacterAppearance=0; @@ -615,7 +615,6 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,Hat1ID,Hat2ID, game.GuiRoot.MainMenu["Tools"]:Remove() game.GuiRoot.MainMenu["Insert"]:Remove() end - game.GuiRoot.RightPalette.ReportAbuse:Remove() end) if not suc then @@ -654,11 +653,12 @@ function CSSolo(UserID,PlayerName,BodyColors,OutfitID,Hat1ID,Hat2ID,Hat3ID,HeadC Hat1 = "rbxasset://charcustom/hats/"..Hat1ID Hat2 = "rbxasset://charcustom/hats/"..Hat2ID Hat3 = "rbxasset://charcustom/hats/"..Hat3ID - local charapp = "rbxasset://charcustom/CharacterColors.rbxm;"..Hat1..";"..Hat2..";"..Hat3 + local charapp = "rbxasset://charcustom/bodycolors/"..HeadColorID.."-"..TorsoColorID.."-"..LeftArmColorID.."-"..RightArmColorID.."-"..LeftLegColorID.."-"..RightLegColorID..".rbxm;"..Hat1..";"..Hat2..";"..Hat3 plr.CharacterAppearance = charapp else plr.CharacterAppearance=0; end + game:GetService("Visit"); while true do wait() if (plr.Character.Humanoid.Health == 0) then diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterColors.cs b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterColors.cs index 54e318c..113b4e9 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterColors.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterColors.cs @@ -176,42 +176,33 @@ namespace RBXLegacyLauncher void ChangeColorOfPart(int ColorID, Color ButtonColor) { - if (SelectedPart == "Head") + if (SelectedPart == "Head" || SelectedPart == "Right Arm" || SelectedPart == "Left Arm") { HeadColor = ColorID; - GlobalVars.HeadColorID = 24; + GlobalVars.HeadColorID = ColorID; button1.BackColor = ButtonColor; + RArmColor = ColorID; + GlobalVars.RightArmColorID = ColorID; + button3.BackColor = ButtonColor; + LArmColor = ColorID; + GlobalVars.LeftArmColorID = ColorID; + button4.BackColor = ButtonColor; + } + else if (SelectedPart == "Right Leg" || SelectedPart == "Left Leg") + { + RLegColor = ColorID; + GlobalVars.RightLegColorID = ColorID; + button5.BackColor = ButtonColor; + LLegColor = ColorID; + GlobalVars.LeftLegColorID = ColorID; + button6.BackColor = ButtonColor; } else if (SelectedPart == "Torso") { TorsoColor = ColorID; - GlobalVars.TorsoColorID = 23; + GlobalVars.TorsoColorID = ColorID; button2.BackColor = ButtonColor; } - else if (SelectedPart == "Right Arm") - { - RArmColor = ColorID; - GlobalVars.RightArmColorID = 24; - button3.BackColor = ButtonColor; - } - else if (SelectedPart == "Left Arm") - { - LArmColor = ColorID; - GlobalVars.LeftArmColorID = 24; - button4.BackColor = ButtonColor; - } - else if (SelectedPart == "Right Leg") - { - RLegColor = ColorID; - GlobalVars.RightLegColorID = 119; - button5.BackColor = ButtonColor; - } - else if (SelectedPart == "Left Leg") - { - LLegColor = ColorID; - GlobalVars.LeftLegColorID = 119; - button6.BackColor = ButtonColor; - } } void Button7Click(object sender, EventArgs e) diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterColors.resx b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterColors.resx index 3ce0458..92e6fa6 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterColors.resx +++ b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterColors.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.Designer.cs b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.Designer.cs index 96d9b3e..dcc466b 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.Designer.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.Designer.cs @@ -48,15 +48,15 @@ namespace RBXLegacyLauncher // // label17 // - this.label17.Location = new System.Drawing.Point(111, 245); + this.label17.Location = new System.Drawing.Point(115, 245); this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(35, 18); + this.label17.Size = new System.Drawing.Size(35, 14); this.label17.TabIndex = 37; this.label17.Text = "Hat 3"; // // label16 // - this.label16.Location = new System.Drawing.Point(111, 157); + this.label16.Location = new System.Drawing.Point(115, 157); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(35, 13); this.label16.TabIndex = 36; @@ -64,7 +64,7 @@ namespace RBXLegacyLauncher // // label12 // - this.label12.Location = new System.Drawing.Point(111, 69); + this.label12.Location = new System.Drawing.Point(115, 69); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(35, 13); this.label12.TabIndex = 35; @@ -73,7 +73,7 @@ namespace RBXLegacyLauncher // listBox3 // this.listBox3.FormattingEnabled = true; - this.listBox3.Location = new System.Drawing.Point(9, 266); + this.listBox3.Location = new System.Drawing.Point(9, 262); this.listBox3.Name = "listBox3"; this.listBox3.Size = new System.Drawing.Size(243, 69); this.listBox3.TabIndex = 34; @@ -112,7 +112,7 @@ namespace RBXLegacyLauncher 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(259, 344); + this.ClientSize = new System.Drawing.Size(259, 339); this.Controls.Add(this.label17); this.Controls.Add(this.label16); this.Controls.Add(this.label12); diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.cs b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.cs index 6e53e5a..ef6f290 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.cs @@ -32,6 +32,9 @@ namespace RBXLegacyLauncher void CharacterCustomizationLoad(object sender, EventArgs e) { + listBox1.Items.Clear(); + listBox2.Items.Clear(); + listBox3.Items.Clear(); string hatdir = GlobalVars.ClientDir + @"\\" + GlobalVars.SelectedClient + @"\\content\\charcustom\\hats"; if (Directory.Exists(hatdir)) { @@ -39,7 +42,17 @@ namespace RBXLegacyLauncher FileInfo[] Files = dinfo.GetFiles("*.rbxm"); foreach( FileInfo file in Files ) { - listBox1.Items.Add(file.Name); + if (file.Name.Equals(String.Empty)) + { + continue; + } + + if (file.Name.Equals("TeapotTurret.rbxm") && GlobalVars.AdminMode != true) + { + continue; + } + + listBox1.Items.Add(file.Name); listBox2.Items.Add(file.Name); listBox3.Items.Add(file.Name); } @@ -49,24 +62,21 @@ namespace RBXLegacyLauncher listBox1.Enabled = true; listBox2.Enabled = true; listBox3.Enabled = true; - button1.Enabled = true; } else { - listBox1.Items.Add("Offline character customization is not supported"); + listBox1.Items.Add("Hats are not supported"); listBox1.Items.Add("on this client."); listBox1.Enabled = false; listBox2.Enabled = false; - listBox3.Enabled = false; - button1.Enabled = false; + listBox3.Enabled = false; } } void Button1Click(object sender, EventArgs e) { - //CharacterColors ccol = new CharacterColors(); - //ccol.Show(); - MessageBox.Show("Coming Soon."); + CharacterColors ccol = new CharacterColors(); + ccol.Show(); } void ListBox1SelectedIndexChanged(object sender, EventArgs e) diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.resx b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.resx index 3ce0458..92e6fa6 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.resx +++ b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/ClientinfoCreator.resx b/RBXLegacyLauncher/RBXLegacyLauncher/ClientinfoCreator.resx index 3ce0458..92e6fa6 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/ClientinfoCreator.resx +++ b/RBXLegacyLauncher/RBXLegacyLauncher/ClientinfoCreator.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/GlobalVars.cs b/RBXLegacyLauncher/RBXLegacyLauncher/GlobalVars.cs index e8da9b0..8d72e05 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/GlobalVars.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/GlobalVars.cs @@ -30,6 +30,7 @@ public static bool LoadsAssetsOnline = false; public static bool ModernClient = false; public static bool SupportsCharacterCustomization = false; + public static bool AdminMode = false; //clientinfocreator public static bool ClientCreator_UsesPlayerName = false; public static bool ClientCreator_UsesID = false; diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs index fff1e4e..d7438b6 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs @@ -62,6 +62,21 @@ namespace RBXLegacyLauncher this.label30 = new System.Windows.Forms.Label(); this.listBox2 = new System.Windows.Forms.ListBox(); this.label18 = new System.Windows.Forms.Label(); + this.tabPage6 = new System.Windows.Forms.TabPage(); + this.button17 = new System.Windows.Forms.Button(); + this.button16 = new System.Windows.Forms.Button(); + this.button15 = new System.Windows.Forms.Button(); + this.button14 = new System.Windows.Forms.Button(); + this.button13 = new System.Windows.Forms.Button(); + this.button12 = new System.Windows.Forms.Button(); + this.label38 = new System.Windows.Forms.Label(); + this.label39 = new System.Windows.Forms.Label(); + this.label37 = new System.Windows.Forms.Label(); + this.label36 = new System.Windows.Forms.Label(); + this.listBox4 = new System.Windows.Forms.ListBox(); + this.listBox3 = new System.Windows.Forms.ListBox(); + this.label21 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.tabPage5 = new System.Windows.Forms.TabPage(); this.label40 = new System.Windows.Forms.Label(); this.button11 = new System.Windows.Forms.Button(); @@ -81,21 +96,8 @@ namespace RBXLegacyLauncher this.textBox3 = new System.Windows.Forms.TextBox(); this.label29 = new System.Windows.Forms.Label(); this.checkBox3 = new System.Windows.Forms.CheckBox(); - this.tabPage6 = new System.Windows.Forms.TabPage(); - this.button17 = new System.Windows.Forms.Button(); - this.button16 = new System.Windows.Forms.Button(); - this.button15 = new System.Windows.Forms.Button(); - this.button14 = new System.Windows.Forms.Button(); - this.button13 = new System.Windows.Forms.Button(); - this.button12 = new System.Windows.Forms.Button(); - this.label38 = new System.Windows.Forms.Label(); - this.label39 = new System.Windows.Forms.Label(); - this.label37 = new System.Windows.Forms.Label(); - this.label36 = new System.Windows.Forms.Label(); - this.listBox4 = new System.Windows.Forms.ListBox(); - this.listBox3 = new System.Windows.Forms.ListBox(); - this.label21 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); + this.tabPage7 = new System.Windows.Forms.TabPage(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.tabPage4 = new System.Windows.Forms.TabPage(); this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); @@ -125,8 +127,9 @@ namespace RBXLegacyLauncher this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.tabPage3.SuspendLayout(); - this.tabPage5.SuspendLayout(); this.tabPage6.SuspendLayout(); + this.tabPage5.SuspendLayout(); + this.tabPage7.SuspendLayout(); this.tabPage4.SuspendLayout(); this.SuspendLayout(); // @@ -150,8 +153,9 @@ namespace RBXLegacyLauncher this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage3); - this.tabControl1.Controls.Add(this.tabPage5); this.tabControl1.Controls.Add(this.tabPage6); + this.tabControl1.Controls.Add(this.tabPage5); + this.tabControl1.Controls.Add(this.tabPage7); this.tabControl1.Controls.Add(this.tabPage4); this.tabControl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabControl1.Location = new System.Drawing.Point(12, 137); @@ -179,7 +183,7 @@ namespace RBXLegacyLauncher this.tabPage1.RightToLeft = System.Windows.Forms.RightToLeft.No; this.tabPage1.Size = new System.Drawing.Size(405, 284); this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "JOIN SERVER"; + this.tabPage1.Text = "JOIN"; this.tabPage1.ToolTipText = "Join a server via IP Address"; this.tabPage1.UseVisualStyleBackColor = true; // @@ -285,7 +289,7 @@ namespace RBXLegacyLauncher this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Size = new System.Drawing.Size(405, 284); this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "START SERVER"; + this.tabPage2.Text = "HOST"; this.tabPage2.ToolTipText = "Start a server for other players to play"; this.tabPage2.UseVisualStyleBackColor = true; // @@ -430,6 +434,155 @@ namespace RBXLegacyLauncher this.label18.TabIndex = 0; this.label18.Text = "CLIENT INFORMATION:"; // + // tabPage6 + // + this.tabPage6.Controls.Add(this.button17); + this.tabPage6.Controls.Add(this.button16); + this.tabPage6.Controls.Add(this.button15); + this.tabPage6.Controls.Add(this.button14); + this.tabPage6.Controls.Add(this.button13); + this.tabPage6.Controls.Add(this.button12); + this.tabPage6.Controls.Add(this.label38); + this.tabPage6.Controls.Add(this.label39); + this.tabPage6.Controls.Add(this.label37); + this.tabPage6.Controls.Add(this.label36); + this.tabPage6.Controls.Add(this.listBox4); + this.tabPage6.Controls.Add(this.listBox3); + this.tabPage6.Controls.Add(this.label21); + this.tabPage6.Controls.Add(this.label14); + this.tabPage6.Location = new System.Drawing.Point(4, 22); + this.tabPage6.Name = "tabPage6"; + this.tabPage6.Padding = new System.Windows.Forms.Padding(3); + this.tabPage6.Size = new System.Drawing.Size(405, 284); + this.tabPage6.TabIndex = 6; + this.tabPage6.Text = "SAVED"; + this.tabPage6.ToolTipText = "Lists all your saved servers and ports"; + this.tabPage6.UseVisualStyleBackColor = true; + // + // button17 + // + this.button17.Location = new System.Drawing.Point(213, 223); + this.button17.Name = "button17"; + this.button17.Size = new System.Drawing.Size(54, 23); + this.button17.TabIndex = 13; + this.button17.Text = "Add"; + this.button17.UseVisualStyleBackColor = true; + this.button17.Click += new System.EventHandler(this.Button17Click); + // + // button16 + // + this.button16.Location = new System.Drawing.Point(3, 223); + this.button16.Name = "button16"; + this.button16.Size = new System.Drawing.Size(60, 23); + this.button16.TabIndex = 12; + this.button16.Text = "Add"; + this.button16.UseVisualStyleBackColor = true; + this.button16.Click += new System.EventHandler(this.Button16Click); + // + // button15 + // + this.button15.Location = new System.Drawing.Point(339, 223); + this.button15.Name = "button15"; + this.button15.Size = new System.Drawing.Size(60, 23); + this.button15.TabIndex = 11; + this.button15.Text = "Reset"; + this.button15.UseVisualStyleBackColor = true; + this.button15.Click += new System.EventHandler(this.Button15Click); + // + // button14 + // + this.button14.Location = new System.Drawing.Point(137, 223); + this.button14.Name = "button14"; + this.button14.Size = new System.Drawing.Size(55, 23); + this.button14.TabIndex = 10; + this.button14.Text = "Reset"; + this.button14.UseVisualStyleBackColor = true; + this.button14.Click += new System.EventHandler(this.Button14Click); + // + // button13 + // + this.button13.Location = new System.Drawing.Point(273, 223); + this.button13.Name = "button13"; + this.button13.Size = new System.Drawing.Size(60, 23); + this.button13.TabIndex = 9; + this.button13.Text = "Remove"; + this.button13.UseVisualStyleBackColor = true; + this.button13.Click += new System.EventHandler(this.Button13Click); + // + // button12 + // + this.button12.Location = new System.Drawing.Point(69, 223); + this.button12.Name = "button12"; + this.button12.Size = new System.Drawing.Size(62, 23); + this.button12.TabIndex = 8; + this.button12.Text = "Remove"; + this.button12.UseVisualStyleBackColor = true; + this.button12.Click += new System.EventHandler(this.Button12Click); + // + // label38 + // + this.label38.Location = new System.Drawing.Point(213, 261); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(120, 20); + this.label38.TabIndex = 7; + // + // label39 + // + this.label39.Location = new System.Drawing.Point(213, 249); + this.label39.Name = "label39"; + this.label39.Size = new System.Drawing.Size(149, 12); + this.label39.TabIndex = 6; + this.label39.Text = "CURRENT SERVER PORT:"; + // + // label37 + // + this.label37.Location = new System.Drawing.Point(6, 261); + this.label37.Name = "label37"; + this.label37.Size = new System.Drawing.Size(120, 20); + this.label37.TabIndex = 5; + // + // label36 + // + this.label36.Location = new System.Drawing.Point(6, 249); + this.label36.Name = "label36"; + this.label36.Size = new System.Drawing.Size(136, 12); + this.label36.TabIndex = 4; + this.label36.Text = "CURRENT SERVER IP:"; + // + // listBox4 + // + this.listBox4.FormattingEnabled = true; + this.listBox4.Location = new System.Drawing.Point(213, 21); + this.listBox4.Name = "listBox4"; + this.listBox4.Size = new System.Drawing.Size(186, 199); + this.listBox4.TabIndex = 3; + this.listBox4.SelectedIndexChanged += new System.EventHandler(this.ListBox4SelectedIndexChanged); + // + // listBox3 + // + this.listBox3.FormattingEnabled = true; + this.listBox3.Location = new System.Drawing.Point(6, 21); + this.listBox3.Name = "listBox3"; + this.listBox3.Size = new System.Drawing.Size(186, 199); + this.listBox3.TabIndex = 2; + this.listBox3.SelectedIndexChanged += new System.EventHandler(this.ListBox3SelectedIndexChanged); + // + // label21 + // + this.label21.Location = new System.Drawing.Point(282, 3); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(59, 15); + this.label21.TabIndex = 1; + this.label21.Text = "PORTS"; + // + // label14 + // + this.label14.Location = new System.Drawing.Point(67, 3); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(59, 15); + this.label14.TabIndex = 0; + this.label14.Text = "SERVERS"; + // // tabPage5 // this.tabPage5.Controls.Add(this.label40); @@ -628,154 +781,28 @@ namespace RBXLegacyLauncher this.checkBox3.UseVisualStyleBackColor = true; this.checkBox3.CheckedChanged += new System.EventHandler(this.CheckBox3CheckedChanged); // - // tabPage6 + // tabPage7 // - this.tabPage6.Controls.Add(this.button17); - this.tabPage6.Controls.Add(this.button16); - this.tabPage6.Controls.Add(this.button15); - this.tabPage6.Controls.Add(this.button14); - this.tabPage6.Controls.Add(this.button13); - this.tabPage6.Controls.Add(this.button12); - this.tabPage6.Controls.Add(this.label38); - this.tabPage6.Controls.Add(this.label39); - this.tabPage6.Controls.Add(this.label37); - this.tabPage6.Controls.Add(this.label36); - this.tabPage6.Controls.Add(this.listBox4); - this.tabPage6.Controls.Add(this.listBox3); - this.tabPage6.Controls.Add(this.label21); - this.tabPage6.Controls.Add(this.label14); - this.tabPage6.Location = new System.Drawing.Point(4, 22); - this.tabPage6.Name = "tabPage6"; - this.tabPage6.Padding = new System.Windows.Forms.Padding(3); - this.tabPage6.Size = new System.Drawing.Size(405, 284); - this.tabPage6.TabIndex = 6; - this.tabPage6.Text = "SAVED"; - this.tabPage6.ToolTipText = "Lists all your saved servers and ports"; - this.tabPage6.UseVisualStyleBackColor = true; + this.tabPage7.BackColor = System.Drawing.SystemColors.ControlText; + this.tabPage7.Controls.Add(this.richTextBox1); + this.tabPage7.Location = new System.Drawing.Point(4, 22); + this.tabPage7.Name = "tabPage7"; + this.tabPage7.Padding = new System.Windows.Forms.Padding(3); + this.tabPage7.Size = new System.Drawing.Size(405, 284); + this.tabPage7.TabIndex = 7; + this.tabPage7.Text = "DEV CONSOLE"; // - // button17 + // richTextBox1 // - this.button17.Location = new System.Drawing.Point(213, 223); - this.button17.Name = "button17"; - this.button17.Size = new System.Drawing.Size(54, 23); - this.button17.TabIndex = 13; - this.button17.Text = "Add"; - this.button17.UseVisualStyleBackColor = true; - this.button17.Click += new System.EventHandler(this.Button17Click); - // - // button16 - // - this.button16.Location = new System.Drawing.Point(3, 223); - this.button16.Name = "button16"; - this.button16.Size = new System.Drawing.Size(60, 23); - this.button16.TabIndex = 12; - this.button16.Text = "Add"; - this.button16.UseVisualStyleBackColor = true; - this.button16.Click += new System.EventHandler(this.Button16Click); - // - // button15 - // - this.button15.Location = new System.Drawing.Point(339, 223); - this.button15.Name = "button15"; - this.button15.Size = new System.Drawing.Size(60, 23); - this.button15.TabIndex = 11; - this.button15.Text = "Reset"; - this.button15.UseVisualStyleBackColor = true; - this.button15.Click += new System.EventHandler(this.Button15Click); - // - // button14 - // - this.button14.Location = new System.Drawing.Point(137, 223); - this.button14.Name = "button14"; - this.button14.Size = new System.Drawing.Size(55, 23); - this.button14.TabIndex = 10; - this.button14.Text = "Reset"; - this.button14.UseVisualStyleBackColor = true; - this.button14.Click += new System.EventHandler(this.Button14Click); - // - // button13 - // - this.button13.Location = new System.Drawing.Point(273, 223); - this.button13.Name = "button13"; - this.button13.Size = new System.Drawing.Size(60, 23); - this.button13.TabIndex = 9; - this.button13.Text = "Remove"; - this.button13.UseVisualStyleBackColor = true; - this.button13.Click += new System.EventHandler(this.Button13Click); - // - // button12 - // - this.button12.Location = new System.Drawing.Point(69, 223); - this.button12.Name = "button12"; - this.button12.Size = new System.Drawing.Size(62, 23); - this.button12.TabIndex = 8; - this.button12.Text = "Remove"; - this.button12.UseVisualStyleBackColor = true; - this.button12.Click += new System.EventHandler(this.Button12Click); - // - // label38 - // - this.label38.Location = new System.Drawing.Point(213, 261); - this.label38.Name = "label38"; - this.label38.Size = new System.Drawing.Size(120, 20); - this.label38.TabIndex = 7; - // - // label39 - // - this.label39.Location = new System.Drawing.Point(213, 249); - this.label39.Name = "label39"; - this.label39.Size = new System.Drawing.Size(149, 12); - this.label39.TabIndex = 6; - this.label39.Text = "CURRENT SERVER PORT:"; - // - // label37 - // - this.label37.Location = new System.Drawing.Point(6, 261); - this.label37.Name = "label37"; - this.label37.Size = new System.Drawing.Size(120, 20); - this.label37.TabIndex = 5; - // - // label36 - // - this.label36.Location = new System.Drawing.Point(6, 249); - this.label36.Name = "label36"; - this.label36.Size = new System.Drawing.Size(136, 12); - this.label36.TabIndex = 4; - this.label36.Text = "CURRENT SERVER IP:"; - // - // listBox4 - // - this.listBox4.FormattingEnabled = true; - this.listBox4.Location = new System.Drawing.Point(213, 21); - this.listBox4.Name = "listBox4"; - this.listBox4.Size = new System.Drawing.Size(186, 199); - this.listBox4.TabIndex = 3; - this.listBox4.SelectedIndexChanged += new System.EventHandler(this.ListBox4SelectedIndexChanged); - // - // listBox3 - // - this.listBox3.FormattingEnabled = true; - this.listBox3.Location = new System.Drawing.Point(6, 21); - this.listBox3.Name = "listBox3"; - this.listBox3.Size = new System.Drawing.Size(186, 199); - this.listBox3.TabIndex = 2; - this.listBox3.SelectedIndexChanged += new System.EventHandler(this.ListBox3SelectedIndexChanged); - // - // label21 - // - this.label21.Location = new System.Drawing.Point(282, 3); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(59, 15); - this.label21.TabIndex = 1; - this.label21.Text = "PORTS"; - // - // label14 - // - this.label14.Location = new System.Drawing.Point(67, 3); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(59, 15); - this.label14.TabIndex = 0; - this.label14.Text = "SERVERS"; + this.richTextBox1.BackColor = System.Drawing.SystemColors.ControlText; + this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.richTextBox1.ForeColor = System.Drawing.Color.White; + this.richTextBox1.Location = new System.Drawing.Point(3, 3); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(399, 278); + this.richTextBox1.TabIndex = 2; + this.richTextBox1.Text = ""; + this.richTextBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.richTextBox1_KeyDown); // // tabPage4 // @@ -1049,13 +1076,16 @@ namespace RBXLegacyLauncher this.tabPage2.ResumeLayout(false); this.tabPage3.ResumeLayout(false); this.tabPage3.PerformLayout(); + this.tabPage6.ResumeLayout(false); this.tabPage5.ResumeLayout(false); this.tabPage5.PerformLayout(); - this.tabPage6.ResumeLayout(false); + this.tabPage7.ResumeLayout(false); this.tabPage4.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); } + private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.TabPage tabPage7; private System.Windows.Forms.Button button20; private System.Windows.Forms.Label label40; private System.Windows.Forms.Button button19; diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs index 3db150f..732baa1 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs @@ -124,19 +124,25 @@ namespace RBXLegacyLauncher void MainFormLoad(object sender, EventArgs e) { + string[] lines = File.ReadAllLines("info.txt"); //File is in System.IO + string version = lines[0]; string[] defaultclient = File.ReadAllLines("info.txt"); string defcl = defaultclient[1]; GlobalVars.SelectedClient = defcl; + ConsolePrint("RBXLegacy Launcher version " + version + " loaded. Initializing config.", 4); if (!File.Exists("config.txt")) { + ConsolePrint("WARNING 1 - config.txt not found. Creating one with default values.", 5); WriteConfigValues(); } if (!File.Exists("servers.txt")) { + ConsolePrint("WARNING 2 - servers.txt not found. Creating empty file.", 5); File.Create("servers.txt").Dispose(); } if (!File.Exists("ports.txt")) { + ConsolePrint("WARNING 2 - servers.txt not found. Creating empty file.", 5); File.Create("ports.txt").Dispose(); } GlobalVars.ClientDir = Path.Combine(Environment.CurrentDirectory, @"clients"); @@ -151,8 +157,6 @@ namespace RBXLegacyLauncher label8.Text = Application.ProductVersion; GlobalVars.IP = "localhost"; GlobalVars.Map = "Baseplate.rbxl"; - string[] lines = File.ReadAllLines("info.txt"); //File is in System.IO - string version = lines[0]; label11.Text = version; GlobalVars.Version = version; ReadConfigValues(); @@ -293,6 +297,7 @@ namespace RBXLegacyLauncher textBox4.Text = GlobalVars.RobloxPort.ToString(); label37.Text = GlobalVars.IP; label38.Text = GlobalVars.RobloxPort.ToString(); + ConsolePrint("Config loaded.", 3); ReadClientValues(GlobalVars.SelectedClient); } @@ -320,6 +325,7 @@ namespace RBXLegacyLauncher GlobalVars.RightLegColorID.ToString(), }; File.WriteAllLines("config.txt", lines); + ConsolePrint("Config Saved.", 3); } void ResetConfigValues() @@ -343,6 +349,7 @@ namespace RBXLegacyLauncher GlobalVars.RightArmColorID = 24; GlobalVars.LeftLegColorID = 119; GlobalVars.RightLegColorID = 119; + ConsolePrint("All config settings reset. Reloading config.", 4); WriteConfigValues(); ReadConfigValues(); } @@ -353,6 +360,7 @@ namespace RBXLegacyLauncher if (!File.Exists(clientpath)) { + ConsolePrint("ERROR 1 - No clientinfo.txt detected with the client you chose. The client either cannot be loaded, or it is not available.", 2); MessageBox.Show("No clientinfo.txt detected with the client you chose. The client either cannot be loaded, or it is not available.","RBXLegacy Launcher - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error); GlobalVars.SelectedClient = "2008"; } @@ -484,6 +492,7 @@ namespace RBXLegacyLauncher textBox6.Text = GlobalVars.SelectedClientDesc; label26.Text = GlobalVars.SelectedClient; + ConsolePrint("Client '" + GlobalVars.SelectedClient + "' successfully loaded.", 3); } void GeneratePlayerID() @@ -604,7 +613,7 @@ namespace RBXLegacyLauncher int parsedValue; if (int.TryParse(textBox3.Text, out parsedValue)) { - if (textBox3.Text == "") + if (textBox3.Text.Equals("")) { GlobalVars.CharacterAppearanceID = 0; } @@ -693,7 +702,7 @@ namespace RBXLegacyLauncher int parsedValue; if (int.TryParse(textBox4.Text, out parsedValue)) { - if (textBox4.Text == "") + if (textBox4.Text.Equals("")) { //set it to the normal port, 53640. it wouldn't make any sense if we set it to 0. GlobalVars.RobloxPort = GlobalVars.DefaultRobloxPort; @@ -716,7 +725,7 @@ namespace RBXLegacyLauncher int parsedValue; if (int.TryParse(textBox5.Text, out parsedValue)) { - if (textBox5.Text == "") + if (textBox5.Text.Equals("")) { GlobalVars.UserID = 0; } @@ -866,10 +875,7 @@ namespace RBXLegacyLauncher void Button19Click(object sender, EventArgs e) { - int timerset = 3000; - int msgdivide = timerset / 1000; - - DialogResult result = MessageBox.Show("Be sure to save your config options with the 'Save Config' button before starting a solo game!"+ Environment.NewLine + Environment.NewLine +"Note: The launcher will start up a server and then launch the client "+ msgdivide +" seconds after. If the health bar does not appear, just reset your character. If your character does not move or your character lags after the client window is loaded, just open the server window then minimize it.","RBXLegacy Launcher - Play Solo", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); + DialogResult result = MessageBox.Show("Be sure to save your config options with the 'Save Config' button before starting a solo game!","RBXLegacy Launcher - Play Solo", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (result == DialogResult.Cancel) return; @@ -881,6 +887,26 @@ namespace RBXLegacyLauncher } } + void Button20Click(object sender, EventArgs e) + { + ServerInfo infopanel = new ServerInfo(); + infopanel.Show(); + } + + void richTextBox1_KeyDown(object sender, KeyEventArgs e) + { + //Command proxy + + int totalLines = richTextBox1.Lines.Length; + string lastLine = richTextBox1.Lines[totalLines - 1]; + + if (e.KeyCode == Keys.Enter) + { + richTextBox1.AppendText(Environment.NewLine); + ConsoleProcessCommands(lastLine); + } + } + void StartClient() { string luafile = "rbxasset://scripts\\\\CSMPFunctions.lua"; @@ -940,10 +966,12 @@ namespace RBXLegacyLauncher } try { + ConsolePrint("Client Loaded.", 4, false); Process.Start(rbxexe, args); } catch (Exception ex) { + ConsolePrint("ERROR 2 - Failed to launch RBXLegacy. (" + ex.Message + ")", 2, false); DialogResult result2 = MessageBox.Show("Failed to launch RBXLegacy. (Error: " + ex.Message + ")","RBXLegacy Launcher - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1061,13 +1089,14 @@ namespace RBXLegacyLauncher args = quote + mapfile + "\" -script \"dofile('" + luafile + "'); _G.CSSolo(0,'Player',false);" + quote; } } - try { + ConsolePrint("Play Solo Loaded.", 4, false); Process.Start(rbxexe, args); } catch (Exception ex) { + ConsolePrint("ERROR 2 - Failed to launch RBXLegacy. (" + ex.Message + ")", 2, false); DialogResult result2 = MessageBox.Show("Failed to launch RBXLegacy. (Error: " + ex.Message + ")","RBXLegacy Launcher - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1090,10 +1119,12 @@ namespace RBXLegacyLauncher } try { + ConsolePrint("Server Loaded.", 4, false); Process.Start(rbxexe, args); } catch (Exception ex) { + ConsolePrint("ERROR 2 - Failed to launch RBXLegacy. (" + ex.Message + ")", 2, false); DialogResult result2 = MessageBox.Show("Failed to launch RBXLegacy. (Error: " + ex.Message + ")","RBXLegacy Launcher - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1115,10 +1146,12 @@ namespace RBXLegacyLauncher } try { + ConsolePrint("Server Loaded in No3d.", 4, false); Process.Start(rbxexe, args); } catch (Exception ex) { + ConsolePrint("ERROR 2 - Failed to launch RBXLegacy. (" + ex.Message + ")", 2, false); DialogResult result2 = MessageBox.Show("Failed to launch RBXLegacy. (Error: " + ex.Message + ")","RBXLegacy Launcher - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -1139,18 +1172,130 @@ namespace RBXLegacyLauncher } try { + ConsolePrint("Studio Loaded.", 4, false); Process.Start(rbxexe, args); } catch (Exception ex) { + ConsolePrint("ERROR 2 - Failed to launch RBXLegacy. (" + ex.Message + ")", 2, false); DialogResult result2 = MessageBox.Show("Failed to launch RBXLegacy. (Error: " + ex.Message + ")","RBXLegacy Launcher - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } - void Button20Click(object sender, EventArgs e) + void ConsolePrint(string text, int type, bool newline = true) { - ServerInfo infopanel = new ServerInfo(); - infopanel.Show(); + richTextBox1.AppendText("[" + DateTime.Now.ToShortTimeString() + "]", Color.White); + richTextBox1.AppendText(" - ", Color.White); + if (type == 1) + { + richTextBox1.AppendText(text, Color.White); + } + else if (type == 2) + { + richTextBox1.AppendText(text, Color.Red); + } + else if (type == 3) + { + richTextBox1.AppendText(text, Color.Lime); + } + else if (type == 4) + { + richTextBox1.AppendText(text, Color.Aqua); + } + else if (type == 5) + { + richTextBox1.AppendText(text, Color.Yellow); + } + + if (newline == true) + { + richTextBox1.AppendText(Environment.NewLine); + } + } + + void ConsoleProcessCommands(string command) + { + if (command.Equals("rbxlegacy server")) + { + StartServer(); + } + else if (command.Equals("rbxlegacy server no3d")) + { + StartServerNo3D(); + } + else if (command.Equals("rbxlegacy client")) + { + StartClient(); + } + else if (command.Equals("rbxlegacy client solo")) + { + StartSolo(); + } + else if (command.Equals("rbxlegacy studio")) + { + StartStudio(); + } + else if (command.Equals("rbxlegacy config save")) + { + WriteConfigValues(); + } + else if (command.Equals("rbxlegacy config load")) + { + ReadConfigValues(); + } + else if (command.Equals("rbxlegacy config reset")) + { + ResetConfigValues(); + } + else if (command.Equals("rbxlegacy help")) + { + ConsoleRBXLegacyHelp(false); + } + else if (command.Equals("rbxlegacy")) + { + ConsoleRBXLegacyHelp(false); + } + else if (command.Equals("rbxlegacy config")) + { + ConsoleRBXLegacyHelp(true); + } + else if (command.Equals("rbxlegacy kanrisha")) + { + GlobalVars.AdminMode = true; + ConsolePrint("ADMIN MODE ENABLED.", 4); + ConsolePrint("YOU ARE GOD.", 2, false); + } + else + { + ConsolePrint("ERROR 3 - Command is either not registered or valid", 2, false); + } + + } + + void ConsoleRBXLegacyHelp(bool config) + { + if (config == true) + { + ConsolePrint("rbxlegacy config", 1); + ConsolePrint("-------------------------", 1); + ConsolePrint("= save | Saves the config file", 1); + ConsolePrint("= load | Reloads the config file", 1); + ConsolePrint("= reset | Resets the config file", 1, false); + } + else + { + ConsolePrint("rbxlegacy", 1); + ConsolePrint("---------", 1); + ConsolePrint("= client | Loads client with launcher settings", 1); + ConsolePrint("== solo | Loads client in Play Solo mode with launcher settings", 1); + ConsolePrint("= server | Loads server with launcher settings", 1); + ConsolePrint("== no3d | Loads server in NoGraphics mode with launcher settings", 1); + ConsolePrint("= studio | Loads Roblox Studio with launcher settings", 1); + ConsolePrint("= config", 1); + ConsolePrint("== save | Saves the config file", 1); + ConsolePrint("== load | Reloads the config file", 1); + ConsolePrint("== reset | Resets the config file", 1, false); + } } } } diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.resx b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.resx index d700b84..f3665cf 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.resx +++ b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/RBXLegacyLauncher.csproj b/RBXLegacyLauncher/RBXLegacyLauncher/RBXLegacyLauncher.csproj index 9772f16..c529579 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/RBXLegacyLauncher.csproj +++ b/RBXLegacyLauncher/RBXLegacyLauncher/RBXLegacyLauncher.csproj @@ -7,7 +7,7 @@ WinExe RBXLegacyLauncher RBXLegacyLauncher - v4.0 + v2.0 Properties @@ -45,19 +45,10 @@ - - 3.5 - - - 3.5 - - - 3.5 - @@ -73,6 +64,7 @@ ClientinfoCreator.cs + ServerInfo.cs diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/RichTextBoxExtensions.cs b/RBXLegacyLauncher/RBXLegacyLauncher/RichTextBoxExtensions.cs new file mode 100644 index 0000000..6850363 --- /dev/null +++ b/RBXLegacyLauncher/RBXLegacyLauncher/RichTextBoxExtensions.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; + +// you need this once (only), and it must be in this namespace +namespace System.Runtime.CompilerServices +{ + [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class + | AttributeTargets.Method)] + public sealed class ExtensionAttribute : Attribute {} +} + +public static class RichTextBoxExtensions +{ + public static void AppendText(this RichTextBox box, string text, Color color) + { + box.SelectionStart = box.TextLength; + box.SelectionLength = 0; + + box.SelectionColor = color; + box.AppendText(text); + box.SelectionColor = box.ForeColor; + } +} \ No newline at end of file diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/ServerInfo.resx b/RBXLegacyLauncher/RBXLegacyLauncher/ServerInfo.resx index 3ce0458..92e6fa6 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/ServerInfo.resx +++ b/RBXLegacyLauncher/RBXLegacyLauncher/ServerInfo.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/app.config b/RBXLegacyLauncher/RBXLegacyLauncher/app.config index 970c80b..8520aac 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/app.config +++ b/RBXLegacyLauncher/RBXLegacyLauncher/app.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/RBXLegacySetup.iss b/RBXLegacySetup.iss index 5466117..fe87a63 100644 --- a/RBXLegacySetup.iss +++ b/RBXLegacySetup.iss @@ -1,7 +1,7 @@ ; Script generated by the Inno Script Studio Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! -#define AppVer "1.14.1" +#define AppVer "1.15" [Setup] ; NOTE: The value of AppId uniquely identifies this application. diff --git a/charcustom/CharacterColors.rbxm b/charcustom/CharacterColors.rbxm deleted file mode 100644 index ab10a6c..0000000 --- a/charcustom/CharacterColors.rbxm +++ /dev/null @@ -1,4 +0,0 @@ - - null - nil - \ No newline at end of file diff --git a/charcustom/bodycolors.7z b/charcustom/bodycolors.7z new file mode 100644 index 0000000..bcf06ac Binary files /dev/null and b/charcustom/bodycolors.7z differ diff --git a/charcustom/hats/NoHat.rbxm b/charcustom/hats/NoHat.rbxm index e6195e8..ab10a6c 100644 --- a/charcustom/hats/NoHat.rbxm +++ b/charcustom/hats/NoHat.rbxm @@ -1,99 +1,4 @@ null nil - - - - 0 - -0.25 - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 1 - - 2 - NoHat - true - - - - false - -0.5 - 0.5 - 0 - 0 - -0.5 - 0.5 - 0 - 0 - 1 - - -23 - 1.20000005 - 17 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 1 - - false - false - 0 - true - true - false - 0.5 - 2 - 0.300000012 - -0.5 - 0.5 - 0 - 0 - -0.5 - 0.5 - 0 - 0 - true - Handle - 0 - -0.5 - 0.5 - 0 - 0 - - 0 - 0 - 0 - - -0.5 - 0.5 - 0 - 0 - 1 - - 0 - 0 - 0 - - true - 1 - - 0.1 - 0.1 - 0.1 - - - - \ No newline at end of file