[N-Guard] En Uygun Procedureler & Serverfiles!

    Paylaş

    LiveYourLife
    Forum Kurucusu
    Forum Kurucusu

    Mesaj Sayısı Mesaj Sayısı : 525
    Leader Point: Leader Point: : 12513
    Kayıt tarihi Kayıt tarihi : 19/01/10
    Nerden Nerden : Derinliklerden :)

    ikon10 [N-Guard] En Uygun Procedureler & Serverfiles!

    Mesaj tarafından LiveYourLife Bir Cuma Ocak 22, 2010 3:42 pm

    İlk Öncelikle Fix Aujard & Login Serveri indiriyoruz (Rar Şifresi: neo_tr)

    Linki Görmek İçin Mesaj Atmalısınız !
    <table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tr><td class="quote"><table width="90%" align="center" border="0" cellpadding="3" cellspacing="1"><tr><td class="quote">http://rapidshare.com/files/121891779/FixServer.rar.html%3Cbr%20/%3E</td></tr></table>
    </td></tr></table>
    1-)Account_Logout

    Kod:
    CREATE PROCEDURE ACCOUNT_LOGOUT
    @AccountID varchar(21),
    @nRet smallint OUTPUT
    AS
    BEGIN
    DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
    SET @nRet = 1
    END
    GO

    2-)ACCOUNT_LOGIN

    Kod:
    CREATE PROCEDURE ACCOUNT_LOGIN
    @AccountID varchar(21),
    @Password varchar(13),
    @nRet smallint OUTPUT

    AS

    DECLARE @Nation tinyint, @CharNum smallint,@Game int,@Limit int
    SET @Nation = 0
    SET @CharNum = 0
    SET @Limit = 800
    Select @Game = Count(*) From CURRENTUSER


    DECLARE @pwd varchar(13)

    SET @pwd = null
    IF @Game <= @Limit
    BEGIN
    SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID
    END
    ELSE IF @Game > @Limit
    BEGIN
    SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and Premium > 0
    END
    IF @pwd IS null
    BEGIN
    SET @nRet = 0
    --SET @nRet = 4
    RETURN
    END

    ELSE IF @pwd <> @Password
    BEGIN
    SET @nRet = 0
    --SET @nRet = 3
    RETURN
    END

    UPDATE TB_USER Set Premium = 0 Where strAccountID = @AccountID and PreDay = 0

    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 = @Nation+1
    --SET @nRet = 1
    RETURN
    END
    GO

    3-)LOAD_PREMIUM_SERVICE_USER

    Kod:
    CREATE PROCEDURE LOAD_PREMIUM_SERVICE_USER
    @AccountID varchar(27),
    @nRet1 smallint OUTPUT,
    @nRet2 smallint OUTPUT
    AS
    DECLARE @nRow smallint
    SET @nRow = 0
    DECLARE @Type smallint
    SET @Type = null
    DECLARE @Days smallint
    SET @Days = null
    SELECT @nRow = COUNT(*) FROM TB_USER WHERE strAccountID = @AccountID and Premium > 0
    IF @nRow = 0
    BEGIN
    SET @nRet1 = 0
    SET @nRet2 = 0
    RETURN
    END
    BEGIN TRAN
    SELECT @Type = Premium, @Days = PreDay FROM TB_USER WHERE strAccountID = @AccountID
    IF @Days = 0
    BEGIN
    UPDATE TB_USER SET Premium = 0 WHERE strAccountID = @AccountID
    SET @nRet1 = 0
    SET @nRet2 = 0
    RETURN
    END
    COMMIT TRAN
    SET @nRet1 = @Type
    SET @nRet2 = @Days
    GO

    4-)UPDATE_PREMIUM_SERVICE_USER

    Kod:
    CREATE PROCEDURE UPDATE_PREMIUM_SERVICE_USER
    @AccountID varchar(27),
    @Days smallint
    AS
    UPDATE TB_USER SET PreDay = @Days WHERE strAccountID = @AccountID
    UPDATE TB_USER SET Premium = 0 WHERE PreDay = 0 and Premium = 1
    GO

    5-)PROC_INSERT_CURRENTUSER

    Kod:
    CREATE PROCEDURE PROC_INSERT_CURRENTUSER
    @AccountID varchar(50),
    @CharID varchar(50),
    @ServerNo int,
    @ServerIP varchar(50),
    @ClientIP varchar(50),
    @nret smallint output

    AS

    INSERT
    INTO CURRENTUSER (nServerNo, strServerIP, strAccountID, strCharID,
    strClientIP ) Values (@ServerNo, @ServerIP, @AccountID, @CharID,
    @ClientIP )
    set @nret=1
    GO

    6-)CLEAR_REMAIN_USERS

    Kod:
    CREATE PROCEDURE CLEAR_REMAIN_USERS
    @AccountID varchar(50)
    AS
    BEGIN TRAN
    DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
    UPDATE TB_USER SET idays = 0
    TRUNCATE TABLE CURRENTUSER
    COMMIT TRAN
    GO

    7-)ACCOUNT_NEOTR

    Kod:
    CREATE PROCEDURE ACCOUNT_NEOTR
    @AccountID varchar(21),
    @Password varchar(13),
    @nRet smallint OUTPUT
    AS

    DECLARE @Nation tinyint
    SET @Nation = 0
    -- tid login method by samma 2004.02.24
    DECLARE @pwd varchar(13)

    SET @pwd = null

    SELECT @pwd = strPasswd FROM TB_USER WHERE strAccountID = @AccountID and idays = 1
    IF @pwd IS null
    BEGIN
    SET @nRet = 0
    RETURN
    END

    ELSE IF @pwd <> @Password
    BEGIN
    SET @nRet = 0
    RETURN
    END

    SELECT @Nation = bNation FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
    exec otonp
    exec otonpsimgesi
    exec RANK_KNIGHTS
    IF @@ROWCOUNT = 0
    BEGIN
    SET @nRet = 1
    RETURN
    END
    BEGIN
    SET @nRet = 1
    RETURN
    END
    BEGIN
    SET @nRet = @Nation+1
    RETURN
    END
    GO

    8-)TABLO EKLERİ

    Kod:
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TB_USER]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[TB_USER]
    GO

    CREATE TABLE [dbo].[TB_USER] (
    [Premium] [int] NULL
    [PreDay] [int] NULL
    ) ON [PRIMARY]
    GO

      Forum Saati Cuma Ara. 09, 2016 3:27 pm