diff --git a/Cut/BodyColorGen/BodyColorGen.sln b/Cut/BodyColorGen/BodyColorGen.sln new file mode 100644 index 0000000..8d9181e --- /dev/null +++ b/Cut/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/Cut/BodyColorGen/BodyColorGen/BodyColorGen.csproj b/Cut/BodyColorGen/BodyColorGen/BodyColorGen.csproj new file mode 100644 index 0000000..d7cf688 --- /dev/null +++ b/Cut/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/Cut/BodyColorGen/BodyColorGen/Program.cs b/Cut/BodyColorGen/BodyColorGen/Program.cs new file mode 100644 index 0000000..770a4e0 --- /dev/null +++ b/Cut/BodyColorGen/BodyColorGen/Program.cs @@ -0,0 +1,152 @@ +/* + * 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 int Main(string[] args) + { + Console.Title = "RBXLegacy - Body Color Generator"; + + // Test if input arguments were supplied: + if (args.Length == 0) + { + Console.WriteLine("Usage: BodyColorGen "); + Console.WriteLine("Number Values:"); + Console.WriteLine("0 = All possible combos"); + Console.WriteLine("1 = 2006 style patterns"); + Console.WriteLine("2 = Shirt and Pants"); + return 1; + } + + int num; + bool test = int.TryParse(args[0], out num); + if (test == false) + { + Console.WriteLine("Usage: BodyColorGen "); + Console.WriteLine("Number Values:"); + Console.WriteLine("0 = All possible combos"); + Console.WriteLine("1 = 2006 style patterns"); + Console.WriteLine("2 = Shirt and Pants"); + return 1; + } + + 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(); + if (num == 1) + { + 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]; + } + else if (num == 2) + { + FleshColor = rand.Next(colorArray.Length); + ShirtColor = rand.Next(colorArray.Length); + PantsColor = rand.Next(colorArray.Length); + HeadColor = colorArray[FleshColor]; + TorsoColor = colorArray[ShirtColor]; + LArmColor = colorArray[ShirtColor]; + RArmColor = colorArray[ShirtColor]; + LLegColor = colorArray[PantsColor]; + RLegColor = colorArray[PantsColor]; + } + else + { + HeadColor = colorArray[rand.Next(colorArray.Length)]; + TorsoColor = colorArray[rand.Next(colorArray.Length)]; + LArmColor = colorArray[rand.Next(colorArray.Length)]; + RArmColor = colorArray[rand.Next(colorArray.Length)]; + LLegColor = colorArray[rand.Next(colorArray.Length)]; + RLegColor = colorArray[rand.Next(colorArray.Length)]; + } + 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/Cut/BodyColorGen/BodyColorGen/Properties/AssemblyInfo.cs b/Cut/BodyColorGen/BodyColorGen/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5eb6d4a --- /dev/null +++ b/Cut/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/Cut/BodyColorGen/BodyColorGen/Resources/RBXLegacyIcon.ico b/Cut/BodyColorGen/BodyColorGen/Resources/RBXLegacyIcon.ico new file mode 100644 index 0000000..d166bf8 Binary files /dev/null and b/Cut/BodyColorGen/BodyColorGen/Resources/RBXLegacyIcon.ico differ