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!

Create account and Auto-create char

Skilled Illusionist
Joined
Nov 27, 2018
Messages
339
Reaction score
66
Hello World!

I want to make a function so that when creating an Account, a character is auto created.
I created a function, and a "Nickname" column in Accounts.


this not work
PHP:
DECLARE @in_Gamertag nvarchar
    IF(@in_NickName = @in_Gamertag) 
BEGIN
        SET @in_NickName = @in_Gamertag
        UPDATE UsersChars SET Gamertag=@in_Gamertag WHERE CustomerID [USER=25895]Custom[/USER]erID
    END

this not work
PHP:
-- get new Char
    declare @in_Gamertag varchar
    SELECT @in_NickName, [USER=25895]Custom[/USER]erID from UsersChars as Gamertag
    exec UsersChars set @in_NickName=@in_Gamertag as CustomerID [USER=25895]Custom[/USER]erID
 
Joined
Apr 23, 2013
Messages
1,172
Reaction score
1,796
Open function

Code:
WZ_ACCOUNT_CREATE

Before return, add this

Code:
--Create first char
DECLARE @MyCharName VARCHAR(128) = LEFT(@in_Email, 8); --Get 8 frist caracters of email to put on Char Name    
exec FN_AddItemToUser @[I][B][URL="https://forum.ragezone.com/members/25895.html"]Custom[/URL][/B][/I]erID, 20174, 2000 --Give Character to account    
exec WZ_CharCreate @[I][B][URL="https://forum.ragezone.com/members/25895.html"]Custom[/URL][/B][/I]erID, 0, @MyCharName, 20174, 0, 2, 2 --Create first character to account

EPJfYC5 - Create account and Auto-create char - RaGEZONE Forums


Be happy!
 

Attachments

You must be registered for see attachments list
Last edited:
Upvote 0
Skilled Illusionist
Joined
Nov 27, 2018
Messages
339
Reaction score
66
Open function

Code:
WZ_ACCOUNT_CREATE

Before return, add this

Code:
--Create first char
DECLARE @MyCharName VARCHAR(128) = LEFT(@in_Email, 8); --Get 8 frist caracters of email to put on Char Name    
exec FN_AddItemToUser @[I][B][URL="https://forum.ragezone.com/members/25895.html"]Custom[/URL][/B][/I]erID, 20174, 2000 --Give Character to account    
exec WZ_CharCreate @[I][B][URL="https://forum.ragezone.com/members/25895.html"]Custom[/URL][/B][/I]erID, 0, @MyCharName, 20174, 0, 2, 2 --Create first character to account

EPJfYC5 - Create account and Auto-create char - RaGEZONE Forums


Be happy!

this is wonderful! I love you brother!
 

Attachments

You must be registered for see attachments list
Upvote 0
Initiate Mage
Joined
May 17, 2023
Messages
3
Reaction score
1
I'm learning SQL. Can you please walk me through on how I process this?
 
Upvote 0
Skilled Illusionist
Joined
Nov 27, 2018
Messages
339
Reaction score
66
I'm learning SQL. Can you please walk me through on how I process this?
this is a function for automatic character creation. If you are using 1 character in your game with no option to delete then this feature is for you.
 
Upvote 0
Back
Top