|
You last visited: Today at 02:59
Advertisement
Built in Registration
Discussion on Built in Registration within the Shaiya Private Server forum part of the Shaiya category.
11/20/2011, 16:49
|
#1
|
elite*gold: 0
Join Date: Aug 2011
Posts: 119
Received Thanks: 32
|
Built in Registration
I saw a server with a built in registration system . is there any1 who know how to do ? by that i mean , the user/pass ur gonna use to login will be your account further.
|
|
|
11/20/2011, 21:12
|
#2
|
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,977
|
For this you need to know what you are doing, just getting it done won't really hel you out, as if you get an error (can always happen) you won't know how to fix it, I would suggest to keep the common registration, until you actually get to know how to code that built-in registration
|
|
|
11/20/2011, 22:17
|
#3
|
elite*gold: 0
Join Date: Aug 2011
Posts: 119
Received Thanks: 32
|
ok well , is the built in registratin that hard? i mean , harder then making a web register page .. ?
|
|
|
11/20/2011, 22:24
|
#4
|
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,977
|
You have to do it through your ps_game.exe/game.exe to do it properly
|
|
|
11/20/2011, 22:32
|
#5
|
elite*gold: 0
Join Date: Aug 2011
Posts: 119
Received Thanks: 32
|
um ok well nvm bout this u can close this thread. ill continue working on a web registration page >.>
|
|
|
11/21/2011, 10:13
|
#6
|
elite*gold: 0
Join Date: Dec 2009
Posts: 92
Received Thanks: 52
|
Not only that, but even though it appears cool at a glance to have auto-registration, it kinda seems like it would turn out to be a logistical nightmare for the admins. Every time someone puts in the wrong account name, or typos it, or whatever, it makes *another* (probably useless) account. You could periodically go through and delete accounts that were never logged I suppose, but overall, is it really worth all the hassle to avoid the, what, 10 seconds it takes to register an account online? o.O Just my 2 cents. lol
|
|
|
11/21/2011, 11:53
|
#7
|
elite*gold: 0
Join Date: Dec 2010
Posts: 717
Received Thanks: 3,359
|
Quote:
Originally Posted by benoli105
ok well , is the built in registratin that hard? i mean , harder then making a web register page .. ?
|
no it's quite easier.
registration by web-based form requires:
- setting up a php, asp, cgi, ..., http server
- running connection between http server & SQL server
- knowing how registration is done at svr game side
auto-registration only requires
- knowing how registration is done at svr game side
but the point of Phantomangel042 is important, your login process will not be able to detect any mistyping (coz its purpose is to create a new account if given user's name doesn't exist) and thus it can be confusing to players: their first reaction will be to think that they enter the correct user name and their account has been deleted or hacked.
if you still want to implement auto-registration, simply change the PS_UserData.dbo.usp_Try_GameLogin_Taiwan stored procedure
one possible version of your current script can be:
Code:
USE [PS_UserData]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER Proc [dbo].[usp_Try_GameLogin_Taiwan]
@UserID varchar(18),
@InPassword varchar(32),
@SessionID bigint,
@UserIP varchar(15),
@UserUID int = -1,
@LoginType smallint = 1,
@LoginTime datetime = NULL
AS
SET NOCOUNT ON
DECLARE
@Status smallint,
@Leave tinyint,
@LeaveDate datetime
/*==================================================
-1 Invalid ID and Password
-2 Can't connect with the account since it's not selected as free challenger
-3 Account doesn't exist
-4 ID inprocess of termination follwing user's request.
-5 Your account is blocked now. You can't log into the game.
-6 Your account is blocked now. You can't log into the game.
-7 Account still restricted
==================================================*/
SET @Status = -1
SET @LoginTime = GETDATE()
--------------------------------------------------
SELECT @UserUID=[UserUID], @Status=[Status], @Leave=[Leave], @LeaveDate=LeaveDate
FROM Users_Master
WHERE UserID = @UserID AND Pw = @InPassword
-- NotExist User OR Leave User
IF( @UserUID = -1) -- !! some scripts test 0 while above default value is -1
BEGIN
SET @Status = -3
END
ELSE IF (@Leave = 1) --This blocks a logged in account from being kicked
BEGIN
SET @Status = -5
END
ELSE IF (DATEDIFF(SECOND, @LeaveDate, GETDATE()) < 6)--This is the time delay
BEGIN
SET @Status = -7
END
-- BlockUser Check
IF( (@Status >= 2) AND (@Status <= 6) )
BEGIN
-- Get Block Limit Date AND Replace date text
DECLARE @BlockEndDate datetime
SELECT @BlockEndDate = BlockEndDate FROM Users_Block WHERE UserUID = @UserUID
IF ( @@ROWCOUNT <> 0 )
BEGIN
-- Block Release
IF (@BlockEndDate <= @LoginTime)
BEGIN
SET @Status = 0
UPDATE Users_Master SET Status=@Status WHERE UserUID=@UserUID
END
END
END
-- Select
SELECT @Status AS Status, @UserUID AS UserUID
-- Log Insert
IF (@Status=0 OR @Status=16 OR @Status=32 OR @Status=48 OR @Status=64 OR @Status=80)
BEGIN
UPDATE Users_Master SET Leave=1, JoinDate=GETDATE() WHERE UserUID=@UserUID
END
SET NOCOUNT OFF
change it to be: (part of PS_UserData.dbo.usp_Try_GameLogin_Taiwan)
Code:
-- try to select user by name,password
SELECT @UserUID=[UserUID], @Status=[Status], @Leave=[Leave], @LeaveDate=LeaveDate
FROM Users_Master
WHERE UserID = @UserID AND Pw = @InPassword
-- NotExist User OR Leave User
IF (@UserUID = -1) -- account does not exist, will create it
BEGIN
-- define unique ID of new account
select @UserUID=isnull(max(UserUID),0)+1 FROM Users_Master
set @Status = 0
-- auto-register new account
INSERT INTO Users_Master ([UserUID],[UserID],[Pw],[JoinDate],[Status])
VALUES (@UserUID,@UserID,@InPassword,GETDATE(),@Status)
END
-- Select responses
SELECT @Status AS Status, @UserUID AS UserUID
full:
Code:
USE [PS_UserData]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER Proc [dbo].[usp_Try_GameLogin_Taiwan]
@UserID varchar(18),
@InPassword varchar(32),
@SessionID bigint,
@UserIP varchar(15),
@UserUID int = -1,
@LoginType smallint = 1,
@LoginTime datetime = NULL
AS
SET NOCOUNT ON
DECLARE
@Status smallint,
@Leave tinyint,
@LeaveDate datetime
/*==================================================
-1 Invalid ID and Password
-2 Can't connect with the account since it's not selected as free challenger
-3 Account doesn't exist
-4 ID inprocess of termination follwing user's request.
-5 Your account is blocked now. You can't log into the game.
-6 Your account is blocked now. You can't log into the game.
-7 Account still restricted
==================================================*/
SET @Status = -1
SET @LoginTime = GETDATE()
-- ------------------------------------------------
SELECT @UserUID=[UserUID], @Status=[Status], @Leave=[Leave], @LeaveDate=LeaveDate
FROM Users_Master
WHERE UserID = @UserID AND Pw = @InPassword
-- NotExist User OR Leave User
IF (@UserUID = -1) -- account does not exist, will create it
BEGIN
-- define unique ID of new account
select @UserUID=isnull(max(UserUID),0)+1 FROM Users_Master
--
set @Status = 0
-- auto-register new account
INSERT INTO Users_Master ([UserUID],[UserID],[Pw],[JoinDate],[Status])
VALUES (@UserUID,@UserID,@InPassword,GETDATE(),@Status)
END
ELSE IF (@Leave = 1) -- This blocks a logged in account from being kicked
BEGIN
SET @Status = -5
END
-- ELSE IF (DATEDIFF(SECOND, @LeaveDate, GETDATE()) < 6)--This is the time delay
-- BEGIN
-- SET @Status = -7
-- END
-- BlockUser Check
IF( (@Status >= 2) AND (@Status <= 6) )
BEGIN
-- Get Block Limit Date AND Replace date text
DECLARE @BlockEndDate datetime
SELECT @BlockEndDate = BlockEndDate FROM Users_Block WHERE UserUID = @UserUID
IF ( @@ROWCOUNT <> 0 )
BEGIN
-- Block Release
IF (@BlockEndDate <= @LoginTime)
BEGIN
SET @Status = 0
UPDATE Users_Master SET Status=@Status WHERE UserUID=@UserUID
END
END
END
-- Select
SELECT @Status AS Status, @UserUID AS UserUID
-- Log Insert
IF (@Status=0 OR @Status=16 OR @Status=32 OR @Status=48 OR @Status=64 OR @Status=80)
BEGIN
UPDATE Users_Master SET Leave=1, JoinDate=GETDATE() WHERE UserUID=@UserUID
END
SET NOCOUNT OFF
I said, auto-reg is (can be) quite easy, don't forget that it's even more easy to introduce mistakes. if your login process fails, verify *all* tests & write operations made on the PS_UserData.dbo.usp_Try_GameLogin_Taiwan and PS_UserData.dbo.usp_Try_GameLogout_R procedures to find out the errors.
but fortunately, login (with or without registration) only depends on invoked SP - it does not depend on your client game nor on the server ps_game (as long as the server components do use the SP listed herebefore).
|
|
|
|
Similar Threads
|
Need a Website Built
09/01/2011 - Off Topic - 3 Replies
Hey everyone Colt here with some news for the general public. I am currently making websites for your future games or fan sites to earn you some more publicity. I have a sample of my work below and if you need anything like a fan site or a page built I'm the one to do it. You don't need someone that waste time or takes no time making your site you need someone that has a creative edge and works around the clock to get your site done.
Wix.com colt91zedgefanpage created by derrickcolt based on...
|
Can Anyone Help me Built Wr PServer ?
05/29/2011 - WarRock - 10 Replies
Please I need help at WarRock private Server built
i got the Tutorial / Files, But i dont understand. please help
Thanks for him/she who helped me!
|
What built is better
07/09/2009 - Silkroad Online - 7 Replies
my friend is a spear/thunder/fire
and i am spear/thunder/ice
i wear protector and he wears armor
he says if i wear armor that i dont need Ice and that his built is stronger
what do ya think is it worth changing to his built i am lvl 46 right now
|
weapon built
10/03/2007 - Archlord - 6 Replies
hello ppl :P
i have one question abute weapon builts
you know abute sockets, (+) of you weapon and elemental and stones.
so tell me whats better 2 have in your weapon elemental stones ( and which stones are better ) or are atack stones better( lithning, cold or poison atack stones)
PLS help me and if you have an idea for a built write it like the weapon is a 6 socket OK
text2schild.php?smilienummer=1&text=THX for your help' border='0' alt='THX for your help' />
|
Built your Ultimate Pet
10/14/2005 - WoW Guides & Templates - 10 Replies
Found this
So you have your ultimate pet, or so you think. Many people don't realize this, but as a hunter you can train your pets in skills other than "growl". How you ask? That is the purpose of this tutorial!
So for instance, let's say you trained a standard brown bear from an area such as Loch Modan. Did you know that same bear can learn THREE other HIGHLY useful skills? Unfortunately, you can't learn these skills from the standard pet trainer, you have to learn them "yourself" by...
|
All times are GMT +2. The time now is 02:59.
|
|