Example #1
0
        void Button1Click(object sender, EventArgs e)
        {
            using (var sfd = new SaveFileDialog())
            {
                sfd.Filter      = "Text files (*.txt)|*.txt";
                sfd.FilterIndex = 2;
                sfd.FileName    = "clientinfo.txt";
                sfd.Title       = "Save clientinfo.txt";

                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    string[] lines =
                    {
                        SecurityFuncs.Base64Encode(GlobalVars.ClientCreator_UsesPlayerName.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.ClientCreator_UsesID.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.ClientCreator_LoadsAssetsOnline.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.ClientCreator_LegacyMode.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.ClientCreator_HasRocky.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.ClientCreator_SelectedClientMD5.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.ClientCreator_SelectedClientVersion.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.ClientCreator_SelectedClientDesc.ToString())
                    };
                    File.WriteAllText(sfd.FileName, SecurityFuncs.Base64Encode(string.Join("|", lines)));
                }
            }
        }
Example #2
0
 public static void WriteConfigValues(string cfgpath)
 {
     string[] lines =
     {
         SecurityFuncs.Base64Encode(GlobalVars.CloseOnLaunch.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.UserID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.PlayerName.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.SelectedClient.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.Custom_Hat1ID_Offline.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.Custom_Hat2ID_Offline.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.Custom_Hat3ID_Offline.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.HeadColorID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.TorsoColorID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.LeftArmColorID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.RightArmColorID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.LeftLegColorID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.RightLegColorID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ColorMenu_HeadColor.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ColorMenu_TorsoColor.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ColorMenu_LeftArmColor.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ColorMenu_RightArmColor.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ColorMenu_LeftLegColor.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ColorMenu_RightLegColor.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.Custom_TShirt.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.Custom_Shirt.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.Custom_Pants.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.Custom_IconType.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.FaceID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.HeadID.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.AdminMode.ToString())
     };
     File.WriteAllText(cfgpath, SecurityFuncs.Base64Encode(string.Join("|", lines)));
 }
 public static void WriteServerPrefs(string cfgpath)
 {
     string[] lines =
     {
         SecurityFuncs.Base64Encode(GlobalVars.Map.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ServerPort.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.DefaultRobloxPort.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.PlayerLimit.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.RespawnTime.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.IsPersonalServer.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.melee.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.navigation.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.social.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.powerup.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.explosives.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.transport.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ranged.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.musical.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.building.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.navigation.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.social.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.explosives.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.transport.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ranged.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.musical.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.building.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist1.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist2.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist3.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist4.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist5.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist6.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist7.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist8.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.upnp.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ChatType.ToString())
     };
     File.WriteAllText(cfgpath, SecurityFuncs.Base64Encode(string.Join("|", lines)));
 }
Example #4
0
        void Button7Click(object sender, EventArgs e)
        {
            using (var sfd = new SaveFileDialog())
            {
                sfd.Filter      = "Text files (*.txt)|*.txt";
                sfd.FilterIndex = 2;
                sfd.FileName    = "info.txt";
                sfd.Title       = "Save info.txt";

                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    string[] lines =
                    {
                        SecurityFuncs.Base64Encode(GlobalVars.InfoEditor_Version.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.InfoEditor_DefaultClient.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.InfoEditor_ScriptPath.ToString()),
                        SecurityFuncs.Base64Encode(GlobalVars.InfoEditor_ScriptMD5.ToString())
                    };
                    File.WriteAllText(sfd.FileName, SecurityFuncs.Base64Encode(string.Join("|", lines)));
                }
            }
        }
Example #5
0
 public static void WriteServerPrefs(string cfgpath)
 {
     string[] lines =
     {
         SecurityFuncs.Base64Encode(GlobalVars.Map.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ServerPort.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.DefaultRobloxPort.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.PlayerLimit.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.RespawnTime.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist1.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist2.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist3.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist4.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist5.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist6.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist7.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.blacklist8.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.upnp.ToString()),
         SecurityFuncs.Base64Encode(GlobalVars.ChatType.ToString())
     };
     File.WriteAllText(cfgpath, SecurityFuncs.Base64Encode(string.Join("|", lines)));
 }
Example #6
0
        void ServerPrefsLoad(object sender, EventArgs e)
        {
            textBox1.AppendText("Client: " + GlobalVars.SelectedClient);
            textBox1.AppendText(Environment.NewLine);
            textBox1.AppendText("IP: " + GetExternalIPAddress());
            textBox1.AppendText(Environment.NewLine);
            textBox1.AppendText("Port: " + GlobalVars.RobloxPort.ToString());
            textBox1.AppendText(Environment.NewLine);
            textBox1.AppendText("Map: " + GlobalVars.Map);
            textBox1.AppendText(Environment.NewLine);
            textBox1.AppendText("Players: " + GlobalVars.PlayerLimit);
            textBox1.AppendText(Environment.NewLine);
            textBox1.AppendText("Version: RBXLegacy " + GlobalVars.Version);
            textBox1.AppendText(Environment.NewLine);
            string[] lines =
            {
                SecurityFuncs.Base64Encode(GetExternalIPAddress()),
                SecurityFuncs.Base64Encode(GlobalVars.RobloxPort.ToString()),
                SecurityFuncs.Base64Encode(GlobalVars.SelectedClient)
            };
            string URI = "RBXLegacy://" + SecurityFuncs.Base64Encode(string.Join("|", lines));

            textBox1.AppendText("Online URI Link:");
            textBox1.AppendText(URI);
            textBox1.AppendText(Environment.NewLine);
            string[] lines2 =
            {
                SecurityFuncs.Base64Encode("localhost"),
                SecurityFuncs.Base64Encode(GlobalVars.RobloxPort.ToString()),
                SecurityFuncs.Base64Encode(GlobalVars.SelectedClient)
            };
            string URI2 = "RBXLegacy://" + SecurityFuncs.Base64Encode(string.Join("|", lines2));

            textBox1.AppendText("Local URI Link:");
            textBox1.AppendText(URI2);

            if (GlobalVars.PlayerLimit == 0)
            {
                //We need at least a limit of 12 players.
                GlobalVars.PlayerLimit = 12;
                textBox3.Text          = GlobalVars.PlayerLimit.ToString();
            }
            else
            {
                textBox3.Text = GlobalVars.PlayerLimit.ToString();
            }

            if (GlobalVars.ServerPort == 0)
            {
                //We need at least a limit of 12 players.
                GlobalVars.ServerPort = GlobalVars.DefaultRobloxPort;
                numericUpDown1.Text   = GlobalVars.ServerPort.ToString();
            }
            else
            {
                numericUpDown1.Text = GlobalVars.ServerPort.ToString();
            }

            if (GlobalVars.melee == true && GlobalVars.navigation == true &&
                GlobalVars.social == true && GlobalVars.powerup == true &&
                GlobalVars.explosives == true && GlobalVars.transport == true &&
                GlobalVars.ranged == true && GlobalVars.musical == true &&
                GlobalVars.building == true)
            {
                radioButton1.Checked = true;
            }
            else if (GlobalVars.melee == false && GlobalVars.navigation == false &&
                     GlobalVars.social == false && GlobalVars.powerup == false &&
                     GlobalVars.explosives == false && GlobalVars.transport == false &&
                     GlobalVars.ranged == false && GlobalVars.musical == false &&
                     GlobalVars.building == false)
            {
                radioButton3.Checked = true;
            }
            else
            {
                radioButton2.Checked = true;
            }

            if (GlobalVars.melee == true)
            {
                checkBox1.Checked = true;
            }
            else
            {
                checkBox1.Checked = false;
            }

            if (GlobalVars.navigation == true)
            {
                checkBox2.Checked = true;
            }
            else
            {
                checkBox2.Checked = false;
            }

            if (GlobalVars.social == true)
            {
                checkBox3.Checked = true;
            }
            else
            {
                checkBox3.Checked = false;
            }

            if (GlobalVars.powerup == true)
            {
                checkBox6.Checked = true;
            }
            else
            {
                checkBox6.Checked = false;
            }

            if (GlobalVars.explosives == true)
            {
                checkBox5.Checked = true;
            }
            else
            {
                checkBox5.Checked = false;
            }

            if (GlobalVars.transport == true)
            {
                checkBox4.Checked = true;
            }
            else
            {
                checkBox4.Checked = false;
            }

            if (GlobalVars.ranged == true)
            {
                checkBox9.Checked = true;
            }
            else
            {
                checkBox9.Checked = false;
            }

            if (GlobalVars.musical == true)
            {
                checkBox8.Checked = true;
            }
            else
            {
                checkBox8.Checked = false;
            }

            if (GlobalVars.building == true)
            {
                checkBox7.Checked = true;
            }
            else
            {
                checkBox7.Checked = false;
            }

            if (GlobalVars.upnp == true)
            {
                checkBox11.Checked = true;
            }
            else
            {
                checkBox11.Checked = false;
            }

            if (GlobalVars.IsPersonalServer == true)
            {
                checkBox10.Checked = true;
            }
            else
            {
                checkBox10.Checked = false;
            }

            comboBox1.SelectedText = GlobalVars.ChatType;
        }