No Premium Block
If you want to make a Pay 2 Play server, add this account login Procedure or Update your own:USEset ANSI_NULLSON
set QUOTED_IDENTIFIERON
---------- //Created by Zenocide// ---------
GO
CREATE PROCEDURE .
@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
Next you will need to add a new Table, add the Following.
USE
GO
/****** Object:Table . Script Date: 09/26/2008 11:07:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE .(
(21) COLLATE Latin1_General_CI_AI NOT NULL
) ON
GO
SET ANSI_PADDING OFF You now have a Pay 2 Play server, depending on the structure of your premium scripts/procedures you can add other checks e.g to auto insert a users id who buys premium and to Auto remove the user when they have no more premium days.
I will let you figure this one out, its quiet easy.
To block a user manually just simpily enter there accountid into the PremimCheck table.
页:
[1]