If you want to make a Pay 2 Play server, add this account login Procedure or Update your own:- USE [KN_ONLINE]
- set ANSI_NULLSON
- set QUOTED_IDENTIFIERON
- ---------- //Created by Zenocide// ---------
- GO
-
- CREATE PROCEDURE [dbo].[ACCOUNT_LOGIN]
-
- @AccountID varchar(21),
- @Password varchar(13),
- @nRet smallintOUTPUT
-
- AS
- DECLARE @Nation tinyint, @CharNum smallint, @PremyName varchar(21)
-
- -----------------------------------Process Login----------------------------------------
- SET @Nation = 0
- SET @CharNum = 0
- DECLARE @pwd varchar(13)
- SET @pwd =null
- SELECT @pwd = strPasswd FROM TB_USER WHERE strAccountID = @AccountID and idays>0
- IF @pwd ISnull
- BEGIN
- --SET @nRet = 0
- SET @nRet = 4
- RETURN
- END
- ELSEIF @pwd <> @Password
- BEGIN
- --SET @nRet = 0
- SET @nRet = 3
- RETURN
- END
- ----------------------------Premium Check-----------------------------------------------
- select @PremyName = strAccountID from PremiumCheck where strAccountID = @AccountID
- IF @PremyName = @AccountID -- Define Premium Account Name Check
- BEGIN
- SET @nRet = 12 -- Give notice, edit in texts.tbl
- RETURN
- END
-
- ------------------------------Successfull Transaction-----------------------------------
- SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
- IF@@ROWCOUNT= 0
- BEGIN
- SET @nRet = 1
- RETURN
- END
- IF @CharNum = 0
- BEGIN
- SET @nRet = 1
- RETURN
- END
- ELSE
- BEGIN
- SET @nRet = 1
- RETURN
- END
-
复制代码 |