auto-registration

04/29/2025 16:09 sudomehanik#1
Can you tell me if it is possible to enable auto-registration in the game? For example, I enter my username and password, and the account is automatically created. If so, how to do it. This technical point is interesting
05/03/2025 19:28 Hatrick_#2
i don't know if there is an in-game implementation for it but you might achieve something by editing the smp_account in Auth database.
the concept will be checking if the entered user exists if the results return empty then an account will be created and returned as result.
however, i can see this might be with some issue such as if someone entered a wrong account name or misspelled the name you would have bunch of unwanted account.
05/05/2025 18:03 atherounge3#3
Quote:
Originally Posted by sudomehanik View Post
Can you tell me if it is possible to enable auto-registration in the game? For example, I enter my username and password, and the account is automatically created. If so, how to do it. This technical point is interesting
Glandu2 emu have
#sql.db_securitynocheck.query:{CALL smp_new_check_security(?, ?)}

Delete comment it and comment query

You need this procedure, I not know if this will work (I did not tested) but you may try:

Code:
CREATE PROCEDURE smp_new_check_security
    @ account VARCHAR(60),
    @ pass VARCHAR(255)
AS
BEGIN
    SET NOCOUNT ON;

    DECLARE @ hashedpass VARBINARY(16);
    SET @ hashedpass = HASHBYTES('MD5', '2011' + @ pass);

    IF EXISTS (
        SELECT TOP 1
        FROM Auth.dbo.Account WITH (NOLOCK)
        WHERE account = @ account AND password = @ hashedpass
    )

    BEGIN
        SELECT * FROM Auth.dbo.Account WITH (NOLOCK)
        WHERE account = @ account AND password = @ hashedpass;
    END

    ELSE

    BEGIN
        INSERT INTO Auth.dbo.Account (account, password)
        VALUES @ account, @ hashedpass);

        SELECT * FROM Auth.dbo.Account WITH (NOLOCK)
        WHERE account = @ account AND password = @ hashedpass;
    END
END
Assuming you have rest columns with default values and your account is 60 and password is 255 and you use default left salt 2011

Delete spacebars after @