[SQL] vSRO - Premium Free Access System [Official Feature]

Page 1 of 2 12 LastLast
Results 1 to 25 of 41
  1. #1
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    information [SQL] vSRO - Premium Free Access System [Official Feature]

    Hello Dear RaGEZOERS
    today i'm gonna share it after it worked with me
    well i promised some peoples to release the full databases but i see no need just for add only 2 feature that it can be add in different databases
    and i'm not calling it a release since already many servers have it also it already existing on Black Rogue DBs
    also big thanks for Chern0byl without him i couldn't finish what i started he gave me the idea that BR's GW can work with vSRO
    okay let's get started
    first of all we need add the required tables here we go

    1-you need to drop and re-create dbo.TB_USER
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO

    /****** Object:  Table [dbo].[TB_User]    Script Date: 05/19/2012 21:52:59 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE 
    [dbo].[TB_User](
        [
    JID] [intIDENTITY(1,1NOT NULL,
        [
    StrUserID] [varchar](25NOT NULL,
        [
    password] [varchar](50NOT NULL,
        [
    truepassword] [varchar](50NULL,
        [
    Status] [tinyintNULL,
        [
    GMrank] [tinyintNULL,
        [
    Name] [varchar](25NULL,
        [
    Email] [varchar](100NULL,
        [
    sex] [char](2NULL,
        [
    certificate_num] [varchar](30NULL,
        [
    address] [varchar](100NULL,
        [
    postcode] [varchar](10NULL,
        [
    phone] [varchar](20NULL,
        [
    mobile] [varchar](20NULL,
        [
    regtime] [datetimeNULL,
        [
    reg_ip] [varchar](25NULL,
        [
    Time_log] [datetimeNULL,
        [
    freetime] [intNULL,
        [
    sec_primary] [tinyintNOT NULL,
        [
    sec_content] [tinyintNOT NULL,
        [
    AccPlayTime] [intNULL,
        [
    LatestUpdateTime_ToPlayTime] [intNULL,
        [
    at] [smallintNULL,
        [
    block] [smallintNULL,
        [
    blockreason] [varchar](500NULL,
        [
    expired] [datetimeNULL,
        [
    emailkey] [varchar](50NULL,
        [
    hashigh] [smallintNULL,
        [
    lastloginip] [intNULL,
        [
    question] [varchar](50NULL,
        [
    answer] [varchar](50NULL,
     
    CONSTRAINT [PK_TB_UserPRIMARY KEY CLUSTERED 
    (
        [
    JIDASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONFILLFACTOR 90ON [PRIMARY],
     
    CONSTRAINT [IX_TB_UserUNIQUE NONCLUSTERED 
    (
        [
    StrUserIDASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONFILLFACTOR 90ON [PRIMARY]
    ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_Status]  DEFAULT ((1)) FOR [Status]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_GMrank]  DEFAULT ((0)) FOR [GMrank]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_regtime]  DEFAULT (getdate()) FOR [regtime]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_freetime]  DEFAULT ((0)) FOR [freetime]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_sec_primary]  DEFAULT ((3)) FOR [sec_primary]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_sec_content]  DEFAULT ((3)) FOR [sec_content]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_at]  DEFAULT ((0)) FOR [at]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_block]  DEFAULT ((0)) FOR [block]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_expired]  DEFAULT (getdate()) FOR [expired]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_hashigh]  DEFAULT ((0)) FOR [hashigh]
    GO

    ALTER TABLE 
    [dbo].[TB_UserADD  CONSTRAINT [DF_TB_User_lastloginip]  DEFAULT ((0)) FOR [lastloginip]
    GO 
    2-create dbo._FreeAccess
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO

    /****** Object:  Table [dbo].[_FreeAccess]    Script Date: 05/19/2012 21:55:16 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    CREATE TABLE 
    [dbo].[_FreeAccess](
        [
    JID] [intNOT NULL,
        [
    EndTime] [datetimeNOT NULL,
        [
    ShardID] [intNOT NULL
    ON [PRIMARY]

    GO 
    3-create dbo.BrutalBlockedIP
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO

    /****** Object:  Table [dbo].[_BrutalBlockedIP]    Script Date: 05/19/2012 21:55:58 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE 
    [dbo].[_BrutalBlockedIP](
        [
    nIdx] [intIDENTITY(1,1NOT NULL,
        [
    szIPBegin] [varchar](16NOT NULL,
        [
    szIPEnd] [varchar](16NOT NULL,
        [
    szGM] [varchar](64NOT NULL,
        [
    dIssueDate] [datetimeNOT NULL,
        [
    szISP] [varchar](256NULL,
        [
    szDesc] [varchar](512NULL,
     
    CONSTRAINT [PK__BrutalBlockedIPPRIMARY KEY CLUSTERED 
    (
        [
    nIdxASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONFILLFACTOR 90ON [PRIMARY]
    ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO 
    4-drop and create dbo._PrivilegedIP
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO

    /****** Object:  Table [dbo].[_PrivilegedIP]    Script Date: 05/19/2012 21:57:10 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE 
    [dbo].[_PrivilegedIP](
        [
    nIdx] [intIDENTITY(1,1NOT NULL,
        [
    szIPBegin] [varchar](16NOT NULL,
        [
    szIPEnd] [varchar](16NOT NULL,
        [
    szGM] [varchar](64NOT NULL,
        [
    dIssueDate] [datetimeNOT NULL,
        [
    szISP] [varchar](256NULL,
        [
    szDesc] [varchar](512NULL,
     
    CONSTRAINT [PK__PrivilegedIPPRIMARY KEY CLUSTERED 
    (
        [
    nIdxASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONFILLFACTOR 90ON [PRIMARY]
    ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO 
    Now the required stored procedures for AccountDB

    5-CertifyTB_User
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO

    /****** Object:  StoredProcedure [dbo].[_CertifyTB_User]    Script Date: 05/19/2012 21:59:22 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO



    -- 4. ALTER PROCEDURE _CertifyTB_User
    CREATE PROCEDURE 
    [dbo].[_CertifyTB_User]
        @
    szUserID    varchar(25),
        @
    szPassword    varchar(50)
    AS



        if 
    exists 
            
    select 
                
    '' 
            
    from _Punishment with nolock )
            
    where SerialNo = ( 
                
    select 
                    max
    SerialNo from _BlockedUser with nolock 
                
    where UserJID = ( SELECT JID FROM TB_User WHERE StrUserID = @szUserID ) and 
                    
    Type 99 and getdate() between timeBegin and timeEnd ) )
        
    begin
            select convert
    tinyint3), ( select JID from TB_User where StrUserID = @szUserID ), converttinyint0), converttinyint0)

            return
        
    end
        
    if exists (select 1 from TB_User where StrUserID=@szUserID and block=and expired>=GETDATE())
        
    begin
            select convert
    tinyint3), ( select JID from TB_User where StrUserID = @szUserID ), converttinyint0), converttinyint0)
            return
        
    end
        
    declare @nUserJID int
        
    declare @sec_primary tinyint
        
    declare @sec_content tinyint

        set    
    @nUserJID        0
        set    
    @sec_primary        0
        set    
    @sec_content        0

    -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    -- ?????? ?????????? ???????? ??????
        declare @
    ApplyType            tinyint
        
    declare @AccPlayTime             int        
        
    declare @LatestUpdateTime_ToPlayTime     int            

        set 
    @ApplyType                 0        -- ?????? ?????????? ???????? ?????????? ???????? ???? ?????????? ???? ??????
        
    set @AccPlayTime             0        
        set 
    @LatestUpdateTime_ToPlayTime     0  
    -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    -- ?????? ?????? ???? ????
    --    
    select @nUserJID JID, @sec_primary sec_primary, @sec_content sec_content from TB_User

        SELECT 
    @nUserJID JID, @sec_primary sec_primary, @sec_content sec_content
        
    , @AccPlayTime AccPlayTime, @LatestUpdateTime_ToPlayTime LatestUpdateTime_ToPlayTime FROM TB_User
        WHERE StrUserID 
    = @szUserID and password = @szPassword 
        
    --and AT=1

    -- Edit For fatigue system
    -- Pleasefill value to @ApplyType TEEN USER ADULT USER from your web database
    -- ex ) @ApplyType exec web.proc.certify

        
    if( @nUserJID or @nUserJID is null or @@error <> or @@rowcount 0)
        
    begin
    -- ?????? ?????? ???? ????
            
    select converttinyint1), convertint0), converttinyint0), converttinyint0)
            --
    select converttinyint1), convertint0), converttinyint0), converttinyint0), convert(tinyint0), convert(int0), convert(int0)
            return
        
    end
        
    if( existsselect Type from _BlockedUser where UserJID = @nUserJID and Type and getdate() between timeBegin and timeEnd))
        
    begin
    -- ?????? ?????? ???? ????
            
    select converttinyint3), @nUserJIDconverttinyint0), converttinyint0)
            --
    select converttinyint3), @nUserJIDconverttinyint0), converttinyint0), convert(tinyint0), convert(int0), convert(int0)
            return
        
    end
    -- ?????? ?????? ???? ????
    select convert(tinyint0), @nUserJID, @sec_primary, @sec_content
        
    --select convert(tinyint0), @nUserJID, @sec_primary, @sec_content, @ApplyType, @AccPlayTime, @LatestUpdateTime_ToPlayTime
        
    return

    GO 
    6-create _CheckfreeAccess
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO

    /****** Object:  StoredProcedure [dbo].[_CheckFreeAccess]    Script Date: 05/19/2012 22:04:52 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO




    ----------------------------------------------------------------------
    -- 
    ภฺภฏมขฑูภฬ ฐกดษวัม๖ธฆ ศฎภฮวฯฑโ ภงวั วมทฮฝรมฎ 
    ----------------------------------------------------------------------
    CREATE PROCEDURE [dbo].[_CheckFreeAccess]
        @
    JID        INT,
        @
    ShardID    INT
    AS
        -- 
    วุด็ JID ภว วุด็ ปตๅภว BanLvl ภฬ ฑโบปภฬ พฦดั พึต้ฟก EndTime ภป ฐกมฎฟยดู
        DECLARE @
    EndTIme DATETIME 
        SET 
    @EndTIme 0

        
    -- ว๖ภ็ ผณฐ่ ป๓ BANLevel ภฬ 4 BanLevel รึฐํฤก ภฮ ฐๆฟ์ฟกธธ FA ฐก ฐกดษวฯดู
        
    SELECT TOP 1 @EndTIme Endtime 
            FROM _FreeAccess 
            WHERE JID 
    = @JID 
                
    AND ShardID = @ShardID 
            ORDER BY EndTime DESC
        
    if exists (select 1 from TB_User where JID=@JID and block=1)
        
    begin
            Select 1 
            
    return
        
    end
        
    IF  ( @EndTIme <> )  AND (  DATEDIFFSECONDGETDATE(), @EndTIme  ) > )
         
    BEGIN 
            
    -- ฝรฐฃย๗ฐก พ็ผ๖ฝรฐฃ ฟฉภฏฐก ภึดยณ๐ 
            SELECT 1
        END 
        
    ELSE 
        
    BEGIN
            
    -- ฝรฐฃย๗ฐก ภฝผ๖ฝรฐฃ ฟฉภฏฐก พ๘ดยณ๐ 
            SELECT 0
        END



    GO 
    7-create _ResetFreeAccess
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO

    /****** Object:  StoredProcedure [dbo].[_ResetFreeAccess]    Script Date: 05/19/2012 22:06:14 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO




    ----------------------------------------------------------------------
    -- 
    ณฏยฅฐก ม๖ณญ พึต้ภบ ป่มฆวุ น๖ธฐดู.
    ----------------------------------------------------------------------
    CREATE PROCEDURE [dbo].[_ResetFreeAccess]
    AS
        
    DELETE FROM _FreeAccess WHERE GETDATE() > EndTime



    GO 
    now we finished AccountDB time for ShardDB

    8-create table _FreeAccessBanlvl
    PHP Code:
    USE [SRO_VT_SHARD]
    GO

    /****** Object:  Table [dbo].[_FreeAccessBanLvl]    Script Date: 05/19/2012 22:07:30 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    CREATE TABLE 
    [dbo].[_FreeAccessBanLvl](
        [
    JID] [intNOT NULL,
        [
    BanLvl] [intNOT NULL,
        [
    EndTime] [datetimeNOT NULL
    ON [PRIMARY]

    GO 
    9-create procedure _GetAllFreeAccessBanlvl
    PHP Code:
    USE [SRO_VT_SHARD]
    GO

    /****** Object:  StoredProcedure [dbo].[_GetAllFreeAccessBanLvl]    Script Date: 05/19/2012 22:10:17 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER OFF
    GO




    CREATE PROCEDURE 
    [dbo].[_GetAllFreeAccessBanLvl]
    AS
        -- 
    ธีภ๚ ฑโฐฃภฬ ม๖ณญ ณัภบ ม๖ฟ๖ น๖ธฐดู!
        
    DELETE FROM _FreeAccessBanLvl 
        WHERE GETDATE
    () > EndTime

        
    IF EXISTS (SELECT JID FROM _FreeAccessBanLvl WITH (NOLOCK))
        
    BEGIN
            
    -- SELECT ALL!!
            
    SELECT JIDBanLvlEndTime 
            FROM _FreeAccessBanLvl WITH 
    (NOLOCK)     
        
    END
        
    ELSE
        
    BEGIN
            
    -- ทนฤฺตๅฐก พ๘ดย ฐๆฟ์ ด๕นฬภป บธณปมึภฺ.
            
    SELECT 00GETDATE()
        
    END



    GO 
    10-create this function because the next stored procedure will ask for it
    PHP Code:
    USE [SRO_VT_SHARD]
    GO

    /****** Object:  UserDefinedFunction [dbo].[_DiffTime_CRTTIME_SQLTIME]    Script Date: 05/19/2012 22:13:17 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO



    CREATE 
    FUNCTION [dbo].[_DiffTime_CRTTIME_SQLTIME]
        (@
    CRTTime INT, @SQLTime DATETIME)
    RETURNS INT
    AS
    BEGIN
        
    DECLARE @nTimeTo     INT
        
    DECLARE @nTimeFrom    INT

        SET 
    @nTimeTo     0
        SET 
    @nTimeFrom    = @CRTTime

        SET 
    @nTimeTo     DATEDIFFss'1970-01-01 09:00:00', @SQLTime )
    /*
        DECLARE @nRemainHH    INT
        DECLARE @nRemainMM    INT
        DECLARE @nRemainSS    INT

        SET @nRemainHH     = (@nTimeTo - @nTimeFrom) / 60 / 60
        SET @nRemainMM     = (@nTimeTo - @nTimeFrom) / 60 - (@nRemainHH * 60)
        SET @nRemainSS    = (@nTimeTo - @nTimeFrom) - (@nRemainMM * 60 ) - (@nRemainHH * 60 * 60)
    */
    /*
        RETURN cast( abs(@nRemainHH) as varchar(128)) + 'ฝรฐฃ'
            + cast( abs(@nRemainMM) as varchar(128)) + 'บะ'
            + cast( abs(@nRemainSS) as varchar(128)) + 'รส'
    */
        
    RETURN (@nTimeFrom - @nTimeTo)
    END




    GO 
    11- create procedure _InitializeFreeAccessBanLvl
    PHP Code:
    USE [SRO_VT_SHARD]
    GO

    /****** Object:  StoredProcedure [dbo].[_InitializeFreeAccessBanLvl]    Script Date: 05/20/2012 13:15:11 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO



    CREATE proc 
    [dbo].[_InitializeFreeAccessBanLvl]
    as
        
    delete _FreeAccessBanLvl where BanLvl in(34)

        declare @
    CharID        int
        
    declare @Category    int
        
    declare @JobID        int
        
    declare @TimeToKeep    int
        
    declare @Data1        int
        
    declare @Data3        int
        
    declare @JID        int

        
    declare @Gold1D_ItemID      int
        
    declare @Gold4W_ItemID      int
        
    declare @Silver1D_ItemID int
        
    declare @Silver4W_ItemID int

        
    declare @EndDateTime    datetime

        select 
    @Gold1D_ItemID id  from _RefObjCommon with(nolockwhere codename128 'ITEM_MALL_GOLD_TIME_SERVICE_TICKET_1D'
        
    if( @@error <> or @@rowcount )
        
    begin
            raiserror
    '1ภฯ ฐ๑ตๅลธภำ พฦภฬลภฬ พ๘ฝภดฯดู.'0)
            return -
    1
        end

        select 
    @Gold4W_ItemID id  from _RefObjCommon with(nolockwhere codename128 =  'ITEM_MALL_GOLD_TIME_SERVICE_TICKET_4W'
        
    if( @@error <> or @@rowcount )
        
    begin
            raiserror
    '4มึ ฐ๑ตๅลธภำ พฦภฬลภฬ พ๘ฝภดฯดู.'0)
            return -
    1
        end

        select 
    @Silver1D_ItemID id  from _RefObjCommon with(nolockwhere codename128 =  'ITEM_MALL_SILVER_TIME_SERVICE_TICKET_1D'
        
    if( @@error <> or @@rowcount )
        
    begin
            raiserror
    '1ภฯ ฝวน๖ลธภำ พฦภฬลภฬ พ๘ฝภดฯดู.'0)
            return -
    1
        end

        select 
    @Silver4W_ItemID id  from _RefObjCommon with(nolockwhere codename128 =  'ITEM_MALL_SILVER_TIME_SERVICE_TICKET_4W'
        
    if( @@error <> or @@rowcount )
        
    begin
            raiserror
    '4มึ ฝวน๖ลธภำ พฦภฬลภฬ พ๘ฝภดฯดู.'0)
            return -
    1
        end

        set 
    @JID 0

        
    declare @Date datetime
        
    declare @DiffTime int
        set 
    @Date cast(getdate() as datetime)

        declare 
    timedjob_cursor  cursor fast_forward for    
        
        -- 
    ฐ๑ตๅฝวน๖วมธฎนฬพ๖ พฦภฬล
        select max
    (Category), max(JobID), max(TimeToKeep), max(Data1), maxisnull(Data30) ), CharID
        from _TimedJob with 
    (nolock)
        
    where Category or ( Category and JobID in( @Gold1D_ItemID,@Gold4W_ItemID,@Silver1D_ItemID,@Silver4W_ItemID ) )
        
    group by CharID

        open timedjob_cursor

        fetch next from timedjob_cursor into 
    @Category, @JobID, @TimeToKeep, @Data1, @Data3, @CharID

        
    while @@fetch_status 0
        begin    
            select 
    @JID UserJID from _User where CharID = @CharID
            
    if @@rowcount or @@error <> 0
            begin
                close timedjob_cursor
                deallocate timedjob_cursor    
                Raiserror
    ('ฤณธฏลอฟก วุด็วฯดย ฐ่มคภฬ พ๘ณื! [%d]'116, @CharID)
                return -
    1
            end

            
    if( @Category 3  )
            
    begin
                
    declare @ItemTotalSecond int
                
                select 
    @ItemTotalSecond param1 from _RefObjItem where id in select link from _RefObjCommon where id = @JobID )

                
    set @TimeToKeep = @Data1 + ( @ItemTotalSecond + ( @Data3 86400 ) + 86400 )
            
    end

            set 
    @DiffTime dbo._DiffTime_CRTTIME_SQLTIME( @TimeToKeep, @Date )
            
    set @EndDateTime DATEADD(second, @DiffTimegetdate())
            
    insert into _FreeAccessBanLvl values(@JID,  4, @EndDateTime)

            
    fetch next from timedjob_cursor into @Category, @JobID, @TimeToKeep, @Data1, @Data3, @CharID
        end

        close timedjob_cursor
        deallocate timedjob_cursor    






    GO 
    12-create procedure _InsertFreeAccessBanLvl_CashItemUsed and watch out from it because it link ShardDB with AccountDB
    PHP Code:
    USE [SRO_VT_SHARD]
    GO

    /****** Object:  StoredProcedure [dbo].[_InsertFreeAccessBanLvl_CashItemUsed]    Script Date: 05/19/2012 22:16:01 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO





    CREATE PROCEDURE 
    [dbo].[_InsertFreeAccessBanLvl_CashItemUsed]
        @
    JID        INT,
        @
    BanLevel    INT,
        @
    ValidityTerm    INT,
        @
    ShardID    INT    
    AS
        DECLARE @
    EndDate DATETIME
        SET 
    @EndDate DATEADD(second, @ValidityTermGETDATE())

        -- 
    ภฯน ฑโฐฃมฆ พฦภฬลภว ป็ฟ๋ภบ วุด็ ฤณธฏลอทฮ ฑนวัตศดู.
        
    INSERT INTO _FreeAccessBanLvl VALUES (@JID, @BanLevel, @EndDate)

    -----------------------------------------------------------------------------------------------------------------------
        --[ 
    Start !!! ] 2009.05.12FREE_ACCESS ฐณผฑ by ta4rom
    -----------------------------------------------------------------------------------------------------------------------
        --
    AccountDB มขผำ มคบธฟอ ตฅภฬลอบฃภฬฝบภฬธงภบ ม๗มข วฯตๅ ฤฺต๙ตวพ๎มฎ ภึดูกฺ บฮบะ ศฎภฮ 

        
    IF @BanLevel 
        BEGIN    
    -- นทนบง 4ภฯ ฐๆฟ์ฟกธธAcountDB ฟก วุด็ มคบธธฆ ณฒฑไดู
            
    INSERT INTO SRO_VT_ACCOUNT.dbo._FreeAccess VALUES (@JID, @EndDate, @ShardID )
            -- 
    กฺ _Account_For_SMC ภว Account DB ตฅภฬลอบฃภฬฝบธํภธทฮ พหธยฐิ ผ๖มค 
        END 

    -----------------------------------------------------------------------------------------------------------------------
        --[ 
    End !!! ] 2009.05.12FREE_ACCESS ฐณผฑ by ta4rom
    -----------------------------------------------------------------------------------------------------------------------
            
        -- 
    ปตๅธลดฯภ๚ฟกฐิ พหทมมึฑโ ภงวุ ภฬ มภป วัดู. -_-
        
    SELECT @JID, @BanLevel, @EndDate

    GO 
    look at that
    PHP Code:
    INSERT INTO SRO_VT_ACCOUNT.dbo._FreeAccess VALUES (@JID, @EndDate
    so basically if you're useing the same names of DBs then just execute without edit and if it's not then change SRO_VT_ACCOUNT to w/e

    13-create procedure _InsertFreeAccessBanLvl_SilkPurchased
    PHP Code:
    USE [SRO_VT_SHARD]
    GO

    /****** Object:  StoredProcedure [dbo].[_InsertFreeAccessBanLvl_SilkPurchased]    Script Date: 05/19/2012 22:19:35 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER OFF
    GO



    CREATE PROCEDURE 
    [dbo].[_InsertFreeAccessBanLvl_SilkPurchased]
        @
    JID        INT
    AS
        DECLARE @
    EndDate DATETIME
        SET 
    @EndDate DATEADD(dd30GETDATE())

        
    INSERT INTO _FreeAccessBanLvl VALUES (@JID1, @EndDate)

        -- 
    ปตๅธลดฯภ๚ฟกฐิ พหทมมึฑโ ภงวุ ภฬ มภป วัดู. -_-
        
    SELECT @JID1, @EndDate



    GO 
    okay that's SQL side now server side and the easy part you will just need to add 2 parameters to server.cfg under Sr_ShardManager
    PHP Code:
            EnablePremiumFreeAccess                1
            BanUselessUserWhenFreeAccess            1 
    it's not recommended to set BanUselessUserWhenFreeAccess to 0 cause it may make flood when your server get crowded
    okay you must download the GW too from Chern0byl's thread and if you got problem with download server you can replace with BR's one it works too

    last thing and most important for me:
    don't post this thread on the shit pvpers cause they will leech and will never mention the right credit
    enjoy my dears RaGEZONERS
    Last edited by SnapPop; 30-05-12 at 12:30 PM.


  2. #2
    Valued Member LoCker is offline
    MemberRank
    May 2012 Join Date
    CanadaLocation
    127Posts

    Re: [SQL] [Release] vSRO - Premium Free Access System [Official Feature]

    lol finally you released it !!
    why you took so long time to release ? as i see from the Quarie's date they are done like more than 1 week ago. is study or you was just testing ?
    thank you bro i was deadly waiting xP

  3. #3
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    Re: [SQL] [Release] vSRO - Premium Free Access System [Official Feature]

    Quote Originally Posted by LoCker View Post
    lol finally you released it !!
    why you took so long time to release ? as i see from the Quarie's date they are done like more than 1 week ago. is study or you was just testing ?
    thank you bro i was deadly waiting xP
    i'm sorry for late yeah i was testing and was a bit busy because my exams will start after 3 days i hope i not fail again i want finish that bloody collage :(

  4. #4
    Member ducker997 is offline
    MemberRank
    May 2012 Join Date
    50Posts

    Re: [SQL] [Release] vSRO - Premium Free Access System [Official Feature]

    Thanks
    But i still dont know this for what?
    What you mean premium free access system?

  5. #5
    Proficient Member safty0202 is offline
    MemberRank
    Dec 2011 Join Date
    174Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    same more explain please ?

  6. #6
    (*..:: RaGeZONER ::..*) 3d2000 is offline
    MemberRank
    Nov 2011 Join Date
    462Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    nice Release ya Prince :D Testing it :D


    just plzz leave every thing and finish your exams :) . GOOD LUCK

  7. #7
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    oh this is beautiful! i will test this on perfection + atomix servers.

  8. #8
    Account Upgraded | Title Enabled! BryanSA is offline
    MemberRank
    Jan 2012 Join Date
    EnglandLocation
    215Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    very nice, thx :)

  9. #9
    ✗ ¤ Kira ¤ ✗ Kira is offline
    MemberRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Nice work bro
    and good luck in ur Exams :)

  10. #10
    Proficient Member elitebi is offline
    MemberRank
    Feb 2012 Join Date
    196Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Thanks but what if the TB_User already have users in it? the fields are different, can't even copy

  11. #11
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    first sorry for answer late i was sleeping second thanks for all the kind posts thanks for 3d2000,Jangan,BryanSA and MR5 :)
    okay @ ducker and safty this system allow the users who using premium for login from the first time even when capacity is full and this feature exist on isro ksro br basically all the official files but not in vsro
    @ elitebi okay try to execute the procedure (CertifyTB_User) from Chern0byl's Thread :) it will work too i guess

  12. #12
    I hear your strange heart egsro is offline
    MemberRank
    Aug 2010 Join Date
    277Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    i don't want to recreate SK_USERs :(

  13. #13
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Quote Originally Posted by egsro View Post
    i don't want to recreate SK_USERs :(
    okay no problem just execute (CertifyTB_User) from Chern0byl thread (vsro login no captcha) but you must know it may miss up something and its up to you

  14. #14
    Valued Member LoCker is offline
    MemberRank
    May 2012 Join Date
    CanadaLocation
    127Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Good Luck with exams bro :)

  15. #15
    Banned nukertube is offline
    BannedRank
    Oct 2011 Join Date
    BrazilLocation
    224Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Nice Release : )
    Good Luck With exams bro :D

  16. #16
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Quote Originally Posted by LoCker View Post
    Good Luck with exams bro :)
    Quote Originally Posted by nukertube View Post
    Nice Release : )
    Good Luck With exams bro :D
    really thanks all of you
    and i'm really happy that you guys liked it :)

  17. #17
    __F0X__ arabianfox is offline
    MemberRank
    Nov 2011 Join Date
    292Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Thanks really for that and good luck with your exams..

  18. #18
    Member hellspawn80 is offline
    MemberRank
    Apr 2012 Join Date
    95Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    What this exactly do ? (noob Inside)

  19. #19
    Valued Member LoCker is offline
    MemberRank
    May 2012 Join Date
    CanadaLocation
    127Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Quote Originally Posted by SnapPop View Post
    really thanks all of you
    and i'm really happy that you guys liked it :)
    are you kedding ! sure bro its awesome
    and i'm still waiting for the database that you said it suppose to make vsro files same like any official files ;)
    just take your time with exams and all the best my friend :)

  20. #20
    Proficient Member elitebi is offline
    MemberRank
    Feb 2012 Join Date
    196Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    When I try to execute CertifyTB_User , I get this error

    Code:
    Msg 201, Level 16, State 4, Procedure _CertifyTB_User, Line 0
    Procedure or function '_CertifyTB_User' expects parameter '@szUserID', which was not supplied.

  21. #21
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Quote Originally Posted by elitebi View Post
    When I try to execute CertifyTB_User , I get this error

    Code:
    Msg 201, Level 16, State 4, Procedure _CertifyTB_User, Line 0
    Procedure or function '_CertifyTB_User' expects parameter '@szUserID', which was not supplied.
    try this but as i said before it may miss up something and may system will be incompleted
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO
    /****** Object:  StoredProcedure [dbo].[_CertifyTB_User]    Script Date: 04/26/2012 14:41:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO

    -- 4. ALTER PROCEDURE _CertifyTB_User
    ALTER PROCEDURE 
    [dbo].[_CertifyTB_User]
        @
    szUserID    varchar(25),
        @
    szPassword    varchar(50)
    AS



        if 
    exists 
            
    select 
                
    '' 
            
    from _Punishment with nolock )
            
    where SerialNo = ( 
                
    select 
                    max
    SerialNo from _BlockedUser with nolock 
                
    where UserJID = ( SELECT JID FROM TB_User WHERE StrUserID = @szUserID ) and 
                    
    Type 99 and getdate() between timeBegin and timeEnd ) )
        
    begin
            select convert
    tinyint3), ( select JID from TB_User where StrUserID = @szUserID ), converttinyint0), converttinyint0)

            return
        
    end

        
    declare @nUserJID int
        
    declare @sec_primary tinyint
        
    declare @sec_content tinyint

        set    
    @nUserJID        0
        set    
    @sec_primary        0
        set    
    @sec_content        0

    -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    -- ?????? ?????????? ???????? ??????
        declare @
    ApplyType            tinyint
        
    declare @AccPlayTime             int        
        
    declare @LatestUpdateTime_ToPlayTime     int            

        set 
    @ApplyType                 0        -- ?????? ?????????? ???????? ?????????? ???????? ???? ?????????? ???? ??????
        
    set @AccPlayTime             0        
        set 
    @LatestUpdateTime_ToPlayTime     0  
    -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    -- ?????? ?????? ???? ????
    --    
    select @nUserJID JID, @sec_primary sec_primary, @sec_content sec_content from TB_User

        SELECT 
    @nUserJID JID, @sec_primary sec_primary, @sec_content sec_content
        
    , @AccPlayTime AccPlayTime, @LatestUpdateTime_ToPlayTime LatestUpdateTime_ToPlayTime FROM TB_User
        WHERE StrUserID 
    = @szUserID and password = @szPassword 
        
    --and AT=1

    -- Edit For fatigue system
    -- Pleasefill value to @ApplyType TEEN USER ADULT USER from your web database
    -- ex ) @ApplyType exec web.proc.certify

        
    if( @nUserJID or @nUserJID is null or @@error <> or @@rowcount 0)
        
    begin
    -- ?????? ?????? ???? ????
            
    select converttinyint1), convertint0), converttinyint0), converttinyint0)
            --
    select converttinyint1), convertint0), converttinyint0), converttinyint0), convert(tinyint0), convert(int0), convert(int0)
            return
        
    end
        
    if( existsselect Type from _BlockedUser where UserJID = @nUserJID and Type and getdate() between timeBegin and timeEnd))
        
    begin
    -- ?????? ?????? ???? ????
            
    select converttinyint3), @nUserJIDconverttinyint0), converttinyint0)
            --
    select converttinyint3), @nUserJIDconverttinyint0), converttinyint0), convert(tinyint0), convert(int0), convert(int0)
            return
        
    end
    -- ?????? ?????? ???? ????
    select convert(tinyint0), @nUserJID, @sec_primary, @sec_content
        
    --select convert(tinyint0), @nUserJID, @sec_primary, @sec_content, @ApplyType, @AccPlayTime, @LatestUpdateTime_ToPlayTime
        
    return 

  22. #22
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    guys what do you think about that ?
    http://www.******.com/forum/private-...ss-system.html

  23. #23
    Valued Member LoCker is offline
    MemberRank
    May 2012 Join Date
    CanadaLocation
    127Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    Quote Originally Posted by SnapPop View Post
    guys what do you think about that ?
    http://www.******.com/forum/private-...ss-system.html
    opps
    but i guess its normal thing that other forum steal your work since silkroad section isn't private for RaGEZONERS only
    but anyway we know that it's your own work so just ignore these noobs lechers

  24. #24
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    okay never mind Locker and next time i will be more carefully to prevent these shit from leak my work
    but these leechers say that this system can't work with vsro shard is that right ?
    @Jangan you tested or not yet ?
    come on someone test and post here by making capacity (1) and login with normal account and then login with premium account
    i can't test that on my machine basically i can't run server files + 2 clients on dead machine with 1GB ram but i can run the first client and it logins normally someone test with 2 client with capacity (1)

  25. #25
    Enthusiast kibritcheto is offline
    MemberRank
    Jul 2010 Join Date
    46Posts

    Re: [SQL] vSRO - Premium Free Access System [Official Feature]

    EnablePremiumFreeAccess
    BanUselessUserWhenFreeAccess

    not exist on vsro sr_shardmanager.exe



Page 1 of 2 12 LastLast

Advertisement