diff --git a/CSMPFunctions.lua b/CSMPFunctions.lua index e0789c9..f9807e0 100644 --- a/CSMPFunctions.lua +++ b/CSMPFunctions.lua @@ -150,7 +150,7 @@ function CSServer(Port,BodyColors) Server.IncommingConnection:connect(IncommingConnection); end -function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,ColorHash,PantsID,ShirtID,TShirtID,Hat1ID,Hat2ID,Hat3ID,Ticket) +function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,ColorHash,PantsID,ShirtID,TShirtID,Hat1ID,Hat2ID,Hat3ID,Hat1Version,Hat2Version,Hat3Version,Ticket) pcall(function() game:SetPlaceID(-1, false) end); pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end); @@ -176,7 +176,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,ColorHash,Pant elseif (ColorHash and ColorHash ~= "") then local aid = "http://www.roblox.com/asset?id=" local bcid = "http://assetgame.roblox.com/Asset/BodyColors.ashx?avatarHash=" - local charapp = bcid..ColorHash..";"..aid..PantsID..";"..aid..ShirtID..";"..aid..TShirtID..";"..aid..Hat1ID.."&version=1;"..aid..Hat2ID.."&version=1;"..aid..Hat3ID.."&version=1;" + local charapp = bcid..ColorHash..";"..aid..PantsID..";"..aid..ShirtID..";"..aid..TShirtID..";"..aid..Hat1ID.."&version="..Hat1Version..";"..aid..Hat2ID.."&version="..Hat2Version..";"..aid..Hat3ID.."&version="..Hat3Version..";" player.CharacterAppearance = charapp else player.CharacterAppearance=0; diff --git a/CSMPFunctions_Modern.lua b/CSMPFunctions_Modern.lua index 21d96d5..b12a5a4 100644 --- a/CSMPFunctions_Modern.lua +++ b/CSMPFunctions_Modern.lua @@ -251,7 +251,7 @@ function CSConnect(UserID,ServerIP,ServerPort,PlayerName,OutfitID,ColorHash,Pant elseif (ColorHash and ColorHash ~= "") then local aid = "http://www.roblox.com/asset?id=" local bcid = "http://assetgame.roblox.com/Asset/BodyColors.ashx?avatarHash=" - local charapp = bcid..ColorHash..";"..aid..PantsID..";"..aid..ShirtID..";"..aid..TShirtID..";"..aid..Hat1ID.."&version=1;"..aid..Hat2ID.."&version=1;"..aid..Hat3ID.."&version=1;" + local charapp = bcid..ColorHash..";"..aid..PantsID..";"..aid..ShirtID..";"..aid..TShirtID..";"..aid..Hat1ID.."&version="..Hat1Version..";"..aid..Hat2ID.."&version="..Hat2Version..";"..aid..Hat3ID.."&version="..Hat3Version..";" Player.CharacterAppearance = charapp else Player.CharacterAppearance=0; diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.Designer.cs b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.Designer.cs index 89be185..fef71b4 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.Designer.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.Designer.cs @@ -57,6 +57,11 @@ namespace RBXLegacyLauncher this.label11 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.textBox8 = new System.Windows.Forms.TextBox(); + this.textBox9 = new System.Windows.Forms.TextBox(); + this.textBox10 = new System.Windows.Forms.TextBox(); + this.label15 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // label1 @@ -80,14 +85,14 @@ namespace RBXLegacyLauncher // label2 // this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.label2.Location = new System.Drawing.Point(9, 58); + this.label2.Location = new System.Drawing.Point(9, 77); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(260, 2); this.label2.TabIndex = 2; // // label3 // - this.label3.Location = new System.Drawing.Point(122, 64); + this.label3.Location = new System.Drawing.Point(122, 79); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(33, 16); this.label3.TabIndex = 3; @@ -95,7 +100,7 @@ namespace RBXLegacyLauncher // // label4 // - this.label4.Location = new System.Drawing.Point(68, 84); + this.label4.Location = new System.Drawing.Point(68, 101); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(49, 14); this.label4.TabIndex = 4; @@ -103,7 +108,7 @@ namespace RBXLegacyLauncher // // label5 // - this.label5.Location = new System.Drawing.Point(68, 109); + this.label5.Location = new System.Drawing.Point(68, 127); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(49, 14); this.label5.TabIndex = 5; @@ -111,15 +116,15 @@ namespace RBXLegacyLauncher // // label6 // - this.label6.Location = new System.Drawing.Point(68, 133); + this.label6.Location = new System.Drawing.Point(68, 156); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(59, 14); + this.label6.Size = new System.Drawing.Size(58, 14); this.label6.TabIndex = 6; this.label6.Text = "T-Shirt ID"; // // textBox2 // - this.textBox2.Location = new System.Drawing.Point(122, 83); + this.textBox2.Location = new System.Drawing.Point(122, 98); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(100, 20); this.textBox2.TabIndex = 7; @@ -129,7 +134,7 @@ namespace RBXLegacyLauncher // // textBox3 // - this.textBox3.Location = new System.Drawing.Point(122, 109); + this.textBox3.Location = new System.Drawing.Point(122, 124); this.textBox3.Name = "textBox3"; this.textBox3.Size = new System.Drawing.Size(100, 20); this.textBox3.TabIndex = 8; @@ -139,7 +144,7 @@ namespace RBXLegacyLauncher // // textBox4 // - this.textBox4.Location = new System.Drawing.Point(122, 133); + this.textBox4.Location = new System.Drawing.Point(122, 150); this.textBox4.Name = "textBox4"; this.textBox4.Size = new System.Drawing.Size(100, 20); this.textBox4.TabIndex = 9; @@ -150,14 +155,14 @@ namespace RBXLegacyLauncher // label7 // this.label7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.label7.Location = new System.Drawing.Point(9, 160); + this.label7.Location = new System.Drawing.Point(12, 179); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(260, 2); this.label7.TabIndex = 10; // // textBox5 // - this.textBox5.Location = new System.Drawing.Point(122, 184); + this.textBox5.Location = new System.Drawing.Point(96, 200); this.textBox5.Name = "textBox5"; this.textBox5.Size = new System.Drawing.Size(100, 20); this.textBox5.TabIndex = 17; @@ -167,7 +172,7 @@ namespace RBXLegacyLauncher // // textBox6 // - this.textBox6.Location = new System.Drawing.Point(122, 209); + this.textBox6.Location = new System.Drawing.Point(96, 226); this.textBox6.Name = "textBox6"; this.textBox6.Size = new System.Drawing.Size(100, 20); this.textBox6.TabIndex = 16; @@ -177,7 +182,7 @@ namespace RBXLegacyLauncher // // textBox7 // - this.textBox7.Location = new System.Drawing.Point(122, 233); + this.textBox7.Location = new System.Drawing.Point(96, 252); this.textBox7.Name = "textBox7"; this.textBox7.Size = new System.Drawing.Size(100, 20); this.textBox7.TabIndex = 15; @@ -187,15 +192,15 @@ namespace RBXLegacyLauncher // // label8 // - this.label8.Location = new System.Drawing.Point(68, 233); + this.label8.Location = new System.Drawing.Point(41, 255); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(59, 14); + this.label8.Size = new System.Drawing.Size(49, 14); this.label8.TabIndex = 14; this.label8.Text = "Hat 3 ID"; // // label9 // - this.label9.Location = new System.Drawing.Point(68, 209); + this.label9.Location = new System.Drawing.Point(41, 229); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(49, 14); this.label9.TabIndex = 13; @@ -203,7 +208,7 @@ namespace RBXLegacyLauncher // // label10 // - this.label10.Location = new System.Drawing.Point(68, 184); + this.label10.Location = new System.Drawing.Point(41, 203); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(49, 14); this.label10.TabIndex = 12; @@ -211,7 +216,7 @@ namespace RBXLegacyLauncher // // label11 // - this.label11.Location = new System.Drawing.Point(122, 164); + this.label11.Location = new System.Drawing.Point(122, 181); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(33, 16); this.label11.TabIndex = 11; @@ -220,7 +225,7 @@ namespace RBXLegacyLauncher // label12 // this.label12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.label12.Location = new System.Drawing.Point(9, 260); + this.label12.Location = new System.Drawing.Point(9, 285); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(260, 2); this.label12.TabIndex = 18; @@ -229,19 +234,73 @@ namespace RBXLegacyLauncher // this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label13.ForeColor = System.Drawing.Color.Red; - this.label13.Location = new System.Drawing.Point(9, 266); + this.label13.Location = new System.Drawing.Point(9, 296); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(260, 74); this.label13.TabIndex = 19; this.label13.Text = resources.GetString("label13.Text"); this.label13.TextAlign = System.Drawing.ContentAlignment.TopCenter; // + // label14 + // + this.label14.Location = new System.Drawing.Point(200, 181); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(42, 16); + this.label14.TabIndex = 23; + this.label14.Text = "Version"; + // + // textBox8 + // + this.textBox8.Location = new System.Drawing.Point(202, 200); + this.textBox8.Name = "textBox8"; + this.textBox8.Size = new System.Drawing.Size(40, 20); + this.textBox8.TabIndex = 24; + this.textBox8.Text = "1"; + this.textBox8.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.textBox8.TextChanged += new System.EventHandler(this.TextBox8TextChanged); + // + // textBox9 + // + this.textBox9.Location = new System.Drawing.Point(200, 226); + this.textBox9.Name = "textBox9"; + this.textBox9.Size = new System.Drawing.Size(40, 20); + this.textBox9.TabIndex = 25; + this.textBox9.Text = "1"; + this.textBox9.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.textBox9.TextChanged += new System.EventHandler(this.TextBox9TextChanged); + // + // textBox10 + // + this.textBox10.Location = new System.Drawing.Point(200, 252); + this.textBox10.Name = "textBox10"; + this.textBox10.Size = new System.Drawing.Size(40, 20); + this.textBox10.TabIndex = 26; + this.textBox10.Text = "1"; + this.textBox10.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.textBox10.TextChanged += new System.EventHandler(this.TextBox10TextChanged); + // + // label15 + // + this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label15.ForeColor = System.Drawing.Color.Red; + this.label15.Location = new System.Drawing.Point(1, 49); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(278, 27); + this.label15.TabIndex = 27; + this.label15.Text = "Note: THIS IS REQUIRED IN ORDER FOR THE OUTFIT TO WORK."; + this.label15.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // // CharacterCustomization // 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(281, 336); + this.ClientSize = new System.Drawing.Size(281, 373); + this.Controls.Add(this.label15); + this.Controls.Add(this.textBox10); + this.Controls.Add(this.textBox9); + this.Controls.Add(this.textBox8); + this.Controls.Add(this.label14); this.Controls.Add(this.label13); this.Controls.Add(this.label12); this.Controls.Add(this.textBox5); @@ -270,6 +329,11 @@ namespace RBXLegacyLauncher this.ResumeLayout(false); this.PerformLayout(); } + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox textBox10; + private System.Windows.Forms.TextBox textBox9; + private System.Windows.Forms.TextBox textBox8; + private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label11; diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.cs b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.cs index 4ccbb06..f039989 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/CharacterCustomization.cs @@ -31,18 +31,21 @@ namespace RBXLegacyLauncher void CharacterCustomizationLoad(object sender, EventArgs e) { - textBox1.Text = GlobalVars.Custom_ColorID; + textBox1.Text = GlobalVars.Custom_ColorHash; textBox2.Text = GlobalVars.Custom_ShirtsID.ToString(); textBox3.Text = GlobalVars.Custom_PantsID.ToString(); textBox4.Text = GlobalVars.Custom_TShirtsID.ToString(); textBox5.Text = GlobalVars.Custom_Hat1ID.ToString(); textBox6.Text = GlobalVars.Custom_Hat2ID.ToString(); textBox7.Text = GlobalVars.Custom_Hat3ID.ToString(); + textBox8.Text = GlobalVars.Custom_Hat1Version.ToString(); + textBox9.Text = GlobalVars.Custom_Hat2Version.ToString(); + textBox10.Text = GlobalVars.Custom_Hat3Version.ToString(); } void TextBox1TextChanged(object sender, EventArgs e) { - GlobalVars.Custom_ColorID = textBox1.Text; + GlobalVars.Custom_ColorHash = textBox1.Text; } void TextBox2TextChanged(object sender, EventArgs e) @@ -128,7 +131,7 @@ namespace RBXLegacyLauncher void TextBox6TextChanged(object sender, EventArgs e) { int parsedValue; - if (int.TryParse(textBox7.Text, out parsedValue)) + if (int.TryParse(textBox6.Text, out parsedValue)) { if (textBox6.Text == "") { @@ -148,7 +151,7 @@ namespace RBXLegacyLauncher void TextBox7TextChanged(object sender, EventArgs e) { int parsedValue; - if (int.TryParse(textBox3.Text, out parsedValue)) + if (int.TryParse(textBox7.Text, out parsedValue)) { if (textBox7.Text == "") { @@ -164,5 +167,65 @@ namespace RBXLegacyLauncher GlobalVars.Custom_Hat3ID = 0; } } + + void TextBox8TextChanged(object sender, EventArgs e) + { + int parsedValue; + if (int.TryParse(textBox8.Text, out parsedValue)) + { + if (textBox8.Text == "") + { + GlobalVars.Custom_Hat1Version = 1; + } + else + { + GlobalVars.Custom_Hat1Version = Convert.ToInt32(textBox8.Text); + } + } + else + { + GlobalVars.Custom_Hat1Version = 1; + } + } + + void TextBox9TextChanged(object sender, EventArgs e) + { + int parsedValue; + if (int.TryParse(textBox9.Text, out parsedValue)) + { + if (textBox9.Text == "") + { + GlobalVars.Custom_Hat2Version = 1; + } + else + { + GlobalVars.Custom_Hat2Version = Convert.ToInt32(textBox9.Text); + } + } + else + { + GlobalVars.Custom_Hat2Version = 1; + } + } + + void TextBox10TextChanged(object sender, EventArgs e) + { + int parsedValue; + if (int.TryParse(textBox10.Text, out parsedValue)) + { + if (textBox10.Text == "") + { + GlobalVars.Custom_Hat3Version = 1; + } + else + { + GlobalVars.Custom_Hat3Version = Convert.ToInt32(textBox10.Text); + } + } + else + { + GlobalVars.Custom_Hat3Version = 1; + } + } } } diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/GlobalVars.cs b/RBXLegacyLauncher/RBXLegacyLauncher/GlobalVars.cs index 2522854..ca9477c 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/GlobalVars.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/GlobalVars.cs @@ -38,11 +38,14 @@ public static string ClientCreator_SelectedClientDesc = ""; public static bool ClientCreator_SupportsCharacterCustomization = false; //charcustom - public static string Custom_ColorID = ""; + public static string Custom_ColorHash = ""; public static int Custom_PantsID = 0; public static int Custom_ShirtsID = 0; public static int Custom_TShirtsID = 0; public static int Custom_Hat1ID = 0; public static int Custom_Hat2ID = 0; public static int Custom_Hat3ID = 0; + public static int Custom_Hat1Version = 1; + public static int Custom_Hat2Version = 1; + public static int Custom_Hat3Version = 1; } \ No newline at end of file diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs index e473454..385a69a 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs @@ -78,6 +78,16 @@ namespace RBXLegacyLauncher 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(); @@ -106,10 +116,6 @@ namespace RBXLegacyLauncher this.label28 = new System.Windows.Forms.Label(); this.button6 = new System.Windows.Forms.Button(); this.textBox5 = new System.Windows.Forms.TextBox(); - this.label36 = new System.Windows.Forms.Label(); - this.label37 = new System.Windows.Forms.Label(); - this.label38 = new System.Windows.Forms.Label(); - this.label39 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); @@ -577,6 +583,12 @@ namespace RBXLegacyLauncher // // 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); @@ -593,12 +605,102 @@ namespace RBXLegacyLauncher this.tabPage6.Text = "SAVED"; 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, 225); + this.listBox4.Size = new System.Drawing.Size(186, 199); this.listBox4.TabIndex = 3; this.listBox4.SelectedIndexChanged += new System.EventHandler(this.ListBox4SelectedIndexChanged); // @@ -607,7 +709,7 @@ namespace RBXLegacyLauncher 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, 225); + this.listBox3.Size = new System.Drawing.Size(186, 199); this.listBox3.TabIndex = 2; this.listBox3.SelectedIndexChanged += new System.EventHandler(this.ListBox3SelectedIndexChanged); // @@ -860,36 +962,6 @@ namespace RBXLegacyLauncher this.textBox5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.textBox5.TextChanged += new System.EventHandler(this.TextBox5TextChanged); // - // 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:"; - // - // 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; - // - // 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:"; - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -936,6 +1008,12 @@ namespace RBXLegacyLauncher this.ResumeLayout(false); this.PerformLayout(); } + private System.Windows.Forms.Button button16; + private System.Windows.Forms.Button button17; + private System.Windows.Forms.Button button12; + private System.Windows.Forms.Button button13; + private System.Windows.Forms.Button button14; + private System.Windows.Forms.Button button15; private System.Windows.Forms.Label label36; private System.Windows.Forms.Label label37; private System.Windows.Forms.Label label39; diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs index 7af5594..044588d 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs @@ -116,20 +116,20 @@ namespace RBXLegacyLauncher } else if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == true && !IsUsingCharacterOutfitIDs() && IsUsingCustomOutfits()) { - args = "-script " + quote + "dofile('" + luafile + "'); _G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "',0,'" + GlobalVars.Custom_ColorID + "'," + GlobalVars.Custom_PantsID + "," + GlobalVars.Custom_ShirtsID + "," + GlobalVars.Custom_TShirtsID + "," + GlobalVars.Custom_Hat1ID + "," + GlobalVars.Custom_Hat2ID + "," + GlobalVars.Custom_Hat3ID + ");" + quote; + args = "-script " + quote + "dofile('" + luafile + "'); _G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "',0,'" + GlobalVars.Custom_ColorHash + "'," + GlobalVars.Custom_PantsID + "," + GlobalVars.Custom_ShirtsID + "," + GlobalVars.Custom_TShirtsID + "," + GlobalVars.Custom_Hat1ID + "," + GlobalVars.Custom_Hat2ID + "," + GlobalVars.Custom_Hat3ID + "," + GlobalVars.Custom_Hat1Version + "," + GlobalVars.Custom_Hat2Version + "," + GlobalVars.Custom_Hat3Version + ");" + quote; } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == true && !IsUsingCharacterOutfitIDs() && IsUsingCustomOutfits()) { - args = "-script " + quote + "dofile('" + luafile + "'); _G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'Player',0,'" + GlobalVars.Custom_ColorID + "'," + GlobalVars.Custom_PantsID + "," + GlobalVars.Custom_ShirtsID + "," + GlobalVars.Custom_TShirtsID + "," + GlobalVars.Custom_Hat1ID + "," + GlobalVars.Custom_Hat2ID + "," + GlobalVars.Custom_Hat3ID + ");" + quote; + args = "-script " + quote + "dofile('" + luafile + "'); _G.CSConnect(" + GlobalVars.UserID + ",'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'Player',0,'" + GlobalVars.Custom_ColorHash + "'," + GlobalVars.Custom_PantsID + "," + GlobalVars.Custom_ShirtsID + "," + GlobalVars.Custom_TShirtsID + "," + GlobalVars.Custom_Hat1ID + "," + GlobalVars.Custom_Hat2ID + "," + GlobalVars.Custom_Hat3ID + "," + GlobalVars.Custom_Hat1Version + "," + GlobalVars.Custom_Hat2Version + "," + GlobalVars.Custom_Hat3Version + ");" + quote; } //how the fuck does this even happen? oh well. else if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == false && !IsUsingCharacterOutfitIDs() && IsUsingCustomOutfits()) { - args = "-script " + quote + "dofile('" + luafile + "'); _G.CSConnect(0,'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "',0,'" + GlobalVars.Custom_ColorID + "'," + GlobalVars.Custom_PantsID + "," + GlobalVars.Custom_ShirtsID + "," + GlobalVars.Custom_TShirtsID + "," + GlobalVars.Custom_Hat1ID + "," + GlobalVars.Custom_Hat2ID + "," + GlobalVars.Custom_Hat3ID + ");" + quote; + args = "-script " + quote + "dofile('" + luafile + "'); _G.CSConnect(0,'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'" + GlobalVars.PlayerName + "',0,'" + GlobalVars.Custom_ColorHash + "'," + GlobalVars.Custom_PantsID + "," + GlobalVars.Custom_ShirtsID + "," + GlobalVars.Custom_TShirtsID + "," + GlobalVars.Custom_Hat1ID + "," + GlobalVars.Custom_Hat2ID + "," + GlobalVars.Custom_Hat3ID + "," + GlobalVars.Custom_Hat1Version + "," + GlobalVars.Custom_Hat2Version + "," + GlobalVars.Custom_Hat3Version + ");" + quote; } else if (GlobalVars.UsesPlayerName == false && GlobalVars.UsesID == false && !IsUsingCharacterOutfitIDs() && IsUsingCustomOutfits()) { - args = "-script " + quote + "dofile('" + luafile + "'); _G.CSConnect(0,'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'Player',0,'" + GlobalVars.Custom_ColorID + "'," + GlobalVars.Custom_PantsID + "," + GlobalVars.Custom_ShirtsID + "," + GlobalVars.Custom_TShirtsID + "," + GlobalVars.Custom_Hat1ID + "," + GlobalVars.Custom_Hat2ID + "," + GlobalVars.Custom_Hat3ID + ");" + quote; + args = "-script " + quote + "dofile('" + luafile + "'); _G.CSConnect(0,'" + GlobalVars.IP + "'," + GlobalVars.RobloxPort + ",'Player',0,'" + GlobalVars.Custom_ColorHash + "'," + GlobalVars.Custom_PantsID + "," + GlobalVars.Custom_ShirtsID + "," + GlobalVars.Custom_TShirtsID + "," + GlobalVars.Custom_Hat1ID + "," + GlobalVars.Custom_Hat2ID + "," + GlobalVars.Custom_Hat3ID + "," + GlobalVars.Custom_Hat1Version + "," + GlobalVars.Custom_Hat2Version + "," + GlobalVars.Custom_Hat3Version + ");" + quote; } else if (GlobalVars.UsesPlayerName == true && GlobalVars.UsesID == true && !IsUsingCharacterOutfitIDs() && !IsUsingCustomOutfits()) { @@ -272,7 +272,7 @@ namespace RBXLegacyLauncher void ReadConfigValues() { - string line1, line2, line3, line4, line5, line6, line7, line8, line9, line10, line11, line12, line13, line14, line15, line16, line17; + string line1, line2, line3, line4, line5, line6, line7, line8, line9, line10, line11, line12, line13, line14, line15, line16, line17, line18, line19, line20; using(StreamReader reader = new StreamReader("config.txt")) { @@ -293,6 +293,9 @@ namespace RBXLegacyLauncher line15 = reader.ReadLine(); line16 = reader.ReadLine(); line17 = reader.ReadLine(); + line18 = reader.ReadLine(); + line19 = reader.ReadLine(); + line20 = reader.ReadLine(); } bool bline1 = Convert.ToBoolean(line1); @@ -322,7 +325,7 @@ namespace RBXLegacyLauncher bool bline10 = Convert.ToBoolean(line10); GlobalVars.UseCustomAppearanceID = bline10; - GlobalVars.Custom_ColorID = line11; + GlobalVars.Custom_ColorHash = line11; int iline12 = Convert.ToInt32(line12); GlobalVars.Custom_ShirtsID = iline12; @@ -342,6 +345,15 @@ namespace RBXLegacyLauncher int iline17 = Convert.ToInt32(line17); GlobalVars.Custom_Hat3ID = iline17; + int iline18 = Convert.ToInt32(line18); + GlobalVars.Custom_Hat1Version = iline18; + + int iline19 = Convert.ToInt32(line19); + GlobalVars.Custom_Hat2Version = iline19; + + int iline20 = Convert.ToInt32(line20); + GlobalVars.Custom_Hat3Version = iline20; + if (GlobalVars.CloseOnLaunch == true) { checkBox1.Checked = true; @@ -411,7 +423,7 @@ namespace RBXLegacyLauncher void WriteConfigValues() { - string[] lines = { GlobalVars.CloseOnLaunch.ToString(), GlobalVars.BodyColors.ToString(), GlobalVars.UserID.ToString(), GlobalVars.PlayerName.ToString(), GlobalVars.SelectedClient.ToString(), GlobalVars.CharacterAppearanceID.ToString(), GlobalVars.UseAppearanceID.ToString(), GlobalVars.Map.ToString(), GlobalVars.RobloxPort.ToString(), GlobalVars.UseCustomAppearanceID.ToString(), GlobalVars.Custom_ColorID.ToString(), GlobalVars.Custom_ShirtsID.ToString(), GlobalVars.Custom_PantsID.ToString(), GlobalVars.Custom_TShirtsID.ToString(), GlobalVars.Custom_Hat1ID.ToString(), GlobalVars.Custom_Hat2ID.ToString(), GlobalVars.Custom_Hat3ID.ToString()}; + string[] lines = { GlobalVars.CloseOnLaunch.ToString(), GlobalVars.BodyColors.ToString(), GlobalVars.UserID.ToString(), GlobalVars.PlayerName.ToString(), GlobalVars.SelectedClient.ToString(), GlobalVars.CharacterAppearanceID.ToString(), GlobalVars.UseAppearanceID.ToString(), GlobalVars.Map.ToString(), GlobalVars.RobloxPort.ToString(), GlobalVars.UseCustomAppearanceID.ToString(), GlobalVars.Custom_ColorHash.ToString(), GlobalVars.Custom_ShirtsID.ToString(), GlobalVars.Custom_PantsID.ToString(), GlobalVars.Custom_TShirtsID.ToString(), GlobalVars.Custom_Hat1ID.ToString(), GlobalVars.Custom_Hat2ID.ToString(), GlobalVars.Custom_Hat3ID.ToString(), GlobalVars.Custom_Hat1Version.ToString(), GlobalVars.Custom_Hat2Version.ToString(), GlobalVars.Custom_Hat3Version.ToString()}; File.WriteAllLines("config.txt", lines); } @@ -427,7 +439,7 @@ namespace RBXLegacyLauncher GlobalVars.Map = "Baseplate.rbxl"; GlobalVars.RobloxPort = 53640; GlobalVars.UseCustomAppearanceID = false; - GlobalVars.Custom_ColorID = ""; + GlobalVars.Custom_ColorHash = ""; GlobalVars.Custom_ShirtsID = 0; GlobalVars.Custom_PantsID = 0; GlobalVars.Custom_TShirtsID = 0; @@ -564,7 +576,6 @@ namespace RBXLegacyLauncher if (GlobalVars.SupportsCharacterCustomization == true) { checkBox5.Enabled = true; - button8.Enabled = true; } else if (GlobalVars.SupportsCharacterCustomization == false) { @@ -884,5 +895,59 @@ namespace RBXLegacyLauncher { File.AppendAllText("ports.txt", GlobalVars.RobloxPort + Environment.NewLine); } + + void Button12Click(object sender, EventArgs e) + { + if (listBox3.SelectedIndex >= 0) + { + TextLineRemover.RemoveTextLines(new List { listBox3.SelectedItem.ToString() }, "servers.txt", "servers.tmp"); + listBox3.Items.Clear(); + string[] lines_server = File.ReadAllLines("servers.txt"); + listBox3.Items.AddRange(lines_server); + } + } + + void Button13Click(object sender, EventArgs e) + { + if (listBox4.SelectedIndex >= 0) + { + TextLineRemover.RemoveTextLines(new List { listBox4.SelectedItem.ToString() }, "ports.txt", "ports.tmp"); + listBox4.Items.Clear(); + string[] lines_ports = File.ReadAllLines("ports.txt"); + listBox4.Items.AddRange(lines_ports); + } + } + + void Button14Click(object sender, EventArgs e) + { + File.Create("servers.txt").Dispose(); + listBox3.Items.Clear(); + string[] lines_server = File.ReadAllLines("servers.txt"); + listBox3.Items.AddRange(lines_server); + } + + void Button15Click(object sender, EventArgs e) + { + File.Create("ports.txt").Dispose(); + listBox4.Items.Clear(); + string[] lines_ports = File.ReadAllLines("ports.txt"); + listBox4.Items.AddRange(lines_ports); + } + + void Button16Click(object sender, EventArgs e) + { + File.AppendAllText("servers.txt", GlobalVars.IP + Environment.NewLine); + listBox3.Items.Clear(); + string[] lines_server = File.ReadAllLines("servers.txt"); + listBox3.Items.AddRange(lines_server); + } + + void Button17Click(object sender, EventArgs e) + { + File.AppendAllText("ports.txt", GlobalVars.RobloxPort + Environment.NewLine); + listBox4.Items.Clear(); + string[] lines_ports = File.ReadAllLines("ports.txt"); + listBox4.Items.AddRange(lines_ports); + } } } diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/RBXLegacyLauncher.csproj b/RBXLegacyLauncher/RBXLegacyLauncher/RBXLegacyLauncher.csproj index 2ae46b8..bd911da 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/RBXLegacyLauncher.csproj +++ b/RBXLegacyLauncher/RBXLegacyLauncher/RBXLegacyLauncher.csproj @@ -69,6 +69,7 @@ ClientinfoCreator.cs + diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/TextLineRemover.cs b/RBXLegacyLauncher/RBXLegacyLauncher/TextLineRemover.cs new file mode 100644 index 0000000..b6b7108 --- /dev/null +++ b/RBXLegacyLauncher/RBXLegacyLauncher/TextLineRemover.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Diagnostics; +using System.Threading; + +public static class TextLineRemover +{ + public static void RemoveTextLines(IList linesToRemove, string filename, string tempFilename) + { + // Initial values + int lineNumber = 0; + int linesRemoved = 0; + DateTime startTime = DateTime.Now; + + // Read file + using (var sr = new StreamReader(filename)) + { + // Write new file + using (var sw = new StreamWriter(tempFilename)) + { + // Read lines + string line; + while ((line = sr.ReadLine()) != null) + { + lineNumber++; + // Look for text to remove + if (!ContainsString(line, linesToRemove)) + { + // Keep lines that does not match + sw.WriteLine(line); + } + else + { + // Ignore lines that DO match + linesRemoved++; + InvokeOnRemovedLine(new RemovedLineArgs { RemovedLine = line, RemovedLineNumber = lineNumber}); + } + } + } + } + // Delete original file + File.Delete(filename); + + // ... and put the temp file in its place. + File.Move(tempFilename, filename); + + // Final calculations + DateTime endTime = DateTime.Now; + InvokeOnFinished(new FinishedArgs {LinesRemoved = linesRemoved, TotalLines = lineNumber, TotalTime = endTime.Subtract(startTime)}); + } + + private static bool ContainsString(string line, IEnumerable linesToRemove) + { + foreach (var lineToRemove in linesToRemove) + { + if(line.Contains(lineToRemove)) + return true; + } + return false; + } + + public static event RemovedLine OnRemovedLine; + public static event Finished OnFinished; + + public static void InvokeOnFinished(FinishedArgs args) + { + Finished handler = OnFinished; + if (handler != null) handler(null, args); + } + + public static void InvokeOnRemovedLine(RemovedLineArgs args) + { + RemovedLine handler = OnRemovedLine; + if (handler != null) handler(null, args); + } +} + +public delegate void Finished(object sender, FinishedArgs args); + +public class FinishedArgs +{ + public int TotalLines { get; set; } + public int LinesRemoved { get; set; } + public TimeSpan TotalTime { get; set; } +} + +public delegate void RemovedLine(object sender, RemovedLineArgs args); + +public class RemovedLineArgs +{ + public string RemovedLine { get; set; } + public int RemovedLineNumber { get; set; } +} \ No newline at end of file diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.CharacterCustomization.resources b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.CharacterCustomization.resources new file mode 100644 index 0000000..f7eea8d Binary files /dev/null and b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.CharacterCustomization.resources differ diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.ClientinfoEditor.resources b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.ClientinfoEditor.resources new file mode 100644 index 0000000..254ebd3 Binary files /dev/null and b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.ClientinfoEditor.resources differ diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.MainForm.resources b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.MainForm.resources new file mode 100644 index 0000000..20e4b44 Binary files /dev/null and b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.MainForm.resources differ diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csproj.FileListAbsolute.txt b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..dfd53b1 --- /dev/null +++ b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csproj.FileListAbsolute.txt @@ -0,0 +1,8 @@ +C:\Users\BITL\Documents\GitHub\RBXLegacy-src\RBXLegacyLauncher\RBXLegacyLauncher\obj\Release\RBXLegacyLauncher.csprojResolveAssemblyReference.cache +C:\Users\BITL\Documents\GitHub\RBXLegacy-src\RBXLegacyLauncher\RBXLegacyLauncher\obj\Release\RBXLegacyLauncher.CharacterCustomization.resources +C:\Users\BITL\Documents\GitHub\RBXLegacy-src\RBXLegacyLauncher\RBXLegacyLauncher\obj\Release\RBXLegacyLauncher.ClientinfoEditor.resources +C:\Users\BITL\Documents\GitHub\RBXLegacy-src\RBXLegacyLauncher\RBXLegacyLauncher\obj\Release\RBXLegacyLauncher.MainForm.resources +C:\Users\BITL\Documents\GitHub\RBXLegacy-src\RBXLegacyLauncher\RBXLegacyLauncher\obj\Release\RBXLegacyLauncher.csproj.GenerateResource.Cache +C:\Users\BITL\Documents\GitHub\RBXLegacy-src\RBXLegacyLauncher\RBXLegacyLauncher\bin\Release\RBXLegacyLauncher.exe.config +C:\Users\BITL\Documents\GitHub\RBXLegacy-src\RBXLegacyLauncher\RBXLegacyLauncher\bin\Release\RBXLegacyLauncher.exe +C:\Users\BITL\Documents\GitHub\RBXLegacy-src\RBXLegacyLauncher\RBXLegacyLauncher\obj\Release\RBXLegacyLauncher.exe diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csproj.GenerateResource.Cache b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csproj.GenerateResource.Cache new file mode 100644 index 0000000..f412abd Binary files /dev/null and b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csproj.GenerateResource.Cache differ diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csprojResolveAssemblyReference.cache b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..0ee1d1c Binary files /dev/null and b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.csprojResolveAssemblyReference.cache differ diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.exe b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.exe new file mode 100644 index 0000000..ec292a3 Binary files /dev/null and b/RBXLegacyLauncher/RBXLegacyLauncher/obj/Release/RBXLegacyLauncher.exe differ diff --git a/RBXLegacySetup.iss b/RBXLegacySetup.iss index 182ceee..7f86af3 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.8.2" +#define AppVer "1.8.3" [Setup] ; NOTE: The value of AppId uniquely identifies this application.