Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Register Script for Launcher [PBRevService]

Initiate Mage
Joined
Jan 3, 2017
Messages
70
Reaction score
12
Code:
private void button2_Click(object sender, EventArgs e)
        {
            if (bunifuMaterialTextbox1.Text == "" || bunifuMaterialTextbox2.Text == "" || bunifuMaterialTextbox4.Text == "")
                MessageBox.Show("Harap lengkapi data", "Pemberitahuan", MessageBoxButtons.OK);
            else if (bunifuMaterialTextbox2.Text != bunifuMaterialTextbox3.Text)                
MessageBox.Show("Password tidak sama", "Pemberitahuan", MessageBoxButtons.OK);
            else            {
                NpgsqlConnection conn = new NpgsqlConnection("Server=SERVER_IP;Port=5432;User Id=POSTGRES_USER;Password=PASSWORD;Database=DB_NAME");                conn.Open();
                NpgsqlCommand cmd = new NpgsqlCommand("insert into contas (login,senha,email) values(:name, :pw, :email)", conn);
                
cmd.Parameters.Add(new NpgsqlParameter("name", bunifuMaterialTextbox1.Text));
            
cmd.Parameters.Add(new NpgsqlParameter("pw", bunifuMaterialTextbox2.Text));
                
cmd.Parameters.Add(new NpgsqlParameter("email", bunifuMaterialTextbox4.Text));
                cmd.ExecuteNonQuery();
                MessageBox.Show("Berhasil Mendaftar", "Pemberitahuan", MessageBoxButtons.OK);
                Clear();
            }
        }
Some simple script to make A registration work form [new Source] Launcher PB [PBRevService] work.
BTW Its not complete, you need to modif this code cause every user register can be duplicate data, like : same username and same password but with diff id.

Have a good work ^_^
use this for connection :
https://github.com/npgsql/npgsql

Or maybe you wait someone to release a fix launcher? HAHAHA. bllsht~
 
Last edited:
Junior Spellweaver
Joined
Dec 7, 2015
Messages
161
Reaction score
83
not bad work. I'm glad that someone started to develop it.
 
Initiate Mage
Joined
Jan 3, 2017
Messages
70
Reaction score
12
not bad work. I'm glad that someone started to develop it.

Yaps, because I think for what to copy someone else's project and just by changing the look of it they proudly mark their name.
 
Initiate Mage
Joined
Jan 3, 2017
Messages
70
Reaction score
12
You know that adding your SQL Information in your launcher is a big no no, yea?

But how to make it sync with database if you not want to adding an database login information to launcher?
I'm just a beginner hehe:V

Ahhh i know, maybe with post code? Like $_POST in php huh?
 
Last edited:
◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜
Developer
Joined
May 29, 2007
Messages
2,167
Reaction score
898
But how to make it sync with database if you not want to adding an database login information to launcher?
I'm just a beginner hehe:V

Ahhh i know, maybe with post code? Like $_POST in php huh?

Just build an rest API or website that accepts a HTTP Post request which executes the registration SQL for you.
SQL commands should be only executed SERVER sided, not with the client.

With your current code anyone can gain access to your database and change anything they want. You opened the door to get hacked.
 
Back
Top