DB Log with Plus from Weapons, GLobals saved in tables and more

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Account Upgraded | Title Enabled! MGProjects is offline
    MemberRank
    Oct 2011 Join Date
    BrazilLocation
    400Posts

    DB Log with Plus from Weapons, GLobals saved in tables and more

    Table

    PHP Code:
    USE [ytytty]
    GO

    /****** Object:  Table [dbo].[_LogItemPlus]    Script Date: 05/29/2013 06:15:14 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE 
    [dbo].[_LogItemPlus](
        [
    ID] [intIDENTITY(1,1NOT NULL,
        [
    CharID] [varchar](10NOT NULL,
        [
    Serial64] [varchar](64NOT NULL,
        [
    Plus] [textNOT NULL,
        [
    Data] [datetimeNOT NULL,
        [
    Lido] [intNOT NULL,
     
    CONSTRAINT [PK__LogItemPlus1_1PRIMARY KEY CLUSTERED 
    (
        [
    IDASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONON [PRIMARY]
    ON [PRIMARYTEXTIMAGE_ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO 
    Procedure

    PHP Code:
    USE [ytytty]
    GO

    /****** Object:  StoredProcedure [dbo].[_AddLogItem]    Script Date: 05/29/2013 06:17:38 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO



    -------------------------------------------------------------------------------------------------------------------
    -- 
    Step 2
    -- ±âÁ¸ ¾ÆÀÌÅÛ ·Î±× ÀԷ Stored procedure ¼öÁ¤
    -- DataBase            Shard Log  
    CREATE  procedure 
    [dbo].[_AddLogItem]  
      @
    CharID  int,  
      @
    ItemRefID int,  
      @
    ItemSerial bigint,  
      @
    dwData int,  
      @
    TargetStorage tinyint,  
      @
    Operation tinyint,  
      @
    Slot_From tinyint,  
      @
    Slot_To tinyint,  
      @
    EventPos varchar(64),  
      @
    strDesc varchar(128),
      @
    Gold        bigint        -- #ifdef EXTEND_GOLD_TYPE »ðÀÔ   
      
    as  
       declare @
    len_pos int  
       
    declare @len_desc int 
       
    declare @strDesc_separado varchar(128
       declare  @
    len_desc1 int
       set 
    @len_pos len(@EventPos)  
       
    set @len_desc len(@strDesc)  
       if (@
    len_pos and @len_desc 0)  
       
    begin  
                insert _LogEventItem 
    (EventTimeCharIDItemRefIDdwDataTargetStorageOperationSlot_FromSlot_ToEventPosstrDescSerial64Gold)    -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
                
    values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @strDesc, @ItemSerial, @Gold)        -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
       
    end  
       
    else if (@len_pos and @len_desc 0)  
       
    begin  
                insert _LogEventItem 
    (EventTimeCharIDItemRefIDdwDataTargetStorageOperationSlot_FromSlot_ToEventPosSerial64Gold)            -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
                
    values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @ItemSerial, @Gold)                -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼ 
       
    end  
       
    else if (@len_pos and @len_desc 0)  
       
    begin  
                insert _LogEventItem 
    (EventTimeCharIDItemRefIDdwDataTargetStorageOperationSlot_FromSlot_TostrDescSerial64Gold)            -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
                
    values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @strDesc, @ItemSerial, @Gold)                    -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼ 
       
    end  
       
    else if (@len_pos and @len_desc 0)  
       
    begin  
                insert _LogEventItem 
    (EventTimeCharIDItemRefIDdwDataTargetStorageOperationSlot_FromSlot_ToSerial64Gold)                        -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
                
    values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @ItemSerial, @Gold)                            -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
       
    end  
       
    -- À¯·á ¾ÆÀÌÅÛ ±¸ÀÔÀ̸é!  
       -- 
    #define LOG_ITEMEVENT_BUY_CASHITEM  (BYTE)35  
       
    if (@Operation 35)  
       
    begin  
        insert _LogCashItem 
    (RefItemIDCharIDCntEventTimeSerial64)  
        
    values(@ItemRefID, @CharID, @dwDataGetDate(), @ItemSerial)  
       
    end
       
    if (@Operation 90 OR @Operation 160)  
       
    begin  
       set 
    @len_desc1 CHARINDEX (']',@strDesc
      if(@
    len_desc1 9)  
         
    begin
         set 
    @strDesc SUBSTRING(@strDesc,0,9)
         
    set @strDesc_separado SUBSTRING(@strDesc81)
        
    end
       
    else if(@len_desc1 10)
            
    begin
            set 
    @strDesc SUBSTRING(@strDesc,0,10)
            
    set @strDesc_separado SUBSTRING(@strDesc82)
            
    end
            
    if(@strDesc_separado >= 8)
            
    begin
            
    --set @strDesc_separado = @len_desc1
          insert _LogItemPlus
    (CharIDSerial64PlusDataLido)  
        
    values(@CharID, @ItemSerial, @strDesc_separadoGetDate(), '0')  
        
    end 
       end

    GO 
    Table

    PHP Code:
    USE [ytytty]
    GO

    /****** Object:  Table [dbo].[_LogGuildWar]    Script Date: 05/29/2013 06:15:54 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    CREATE TABLE 
    [dbo].[_LogGuildWar](
        [
    ID] [intIDENTITY(1,1NOT NULL,
        [
    GUILDWINNER] [textNOT NULL,
        [
    GUILDLOST] [textNOT NULL,
     
    CONSTRAINT [PK__LogGuildWarPRIMARY KEY CLUSTERED 
    (
        [
    IDASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONON [PRIMARY]
    ON [PRIMARYTEXTIMAGE_ON [PRIMARY]

    GO 
    Procedure

    Table

    PHP Code:
    USE [ytytty]
    GO

    /****** Object:  Table [dbo].[_LogPvP]    Script Date: 05/29/2013 06:16:07 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE 
    [dbo].[_LogPvP](
        [
    ID] [intIDENTITY(1,1NOT NULL,
        [
    CharWinner] [varchar](16NOT NULL,
        [
    CharLost] [varchar](16NOT NULL,
        [
    Data] [datetimeNOT NULL,
     
    CONSTRAINT [PK__log1PRIMARY KEY CLUSTERED 
    (
        [
    IDASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONON [PRIMARY]
    ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO 
    Procedure

    Table

    PHP Code:
    USE [ytytty]
    GO

    /****** Object:  Table [dbo].[_On]    Script Date: 05/29/2013 06:16:23 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE 
    [dbo].[_On](
        [
    id] [intIDENTITY(1,1NOT NULL,
        [
    CharName] [varchar](50NOT NULL,
        [
    Statu] [varchar](50NOT NULL,
     
    CONSTRAINT [PK__OnPRIMARY KEY CLUSTERED 
    (
        [
    idASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONON [PRIMARY]
    ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO 
    Procedure

    Table

    PHP Code:
    USE [ytytty]
    GO

    /****** Object:  Table [dbo].[DBItem]    Script Date: 05/29/2013 06:16:32 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE 
    [dbo].[DBItem](
        [
    ID] [intNULL,
        [
    Name] [varchar](128NULL,
        [
    CName] [varchar](128NULL,
        [
    Pict] [varchar](128NULL
    ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO 
    Procedure

    Table

    PHP Code:
    USE [ytytty]
    GO

    /****** Object:  Table [dbo].[_GlobalsLog]    Script Date: 05/29/2013 06:16:43 ******/
    SET ANSI_NULLS ON
    GO

    SET QUOTED_IDENTIFIER ON
    GO

    SET ANSI_PADDING ON
    GO

    CREATE TABLE 
    [dbo].[_GlobalsLog](
        [
    id] [intIDENTITY(1,1NOT NULL,
        [
    CharName] [varchar](16NULL,
        [
    Globals] [textNULL,
     
    CONSTRAINT [PK__GlobalsLogPRIMARY KEY CLUSTERED 
    (
        [
    idASC
    )WITH (PAD_INDEX  OFFSTATISTICS_NORECOMPUTE  OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS  ONALLOW_PAGE_LOCKS  ONON [PRIMARY]
    ON [PRIMARYTEXTIMAGE_ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF
    GO 
    Procedure



  2. #2
    SilkRoad loveme is offline
    MemberRank
    Sep 2011 Join Date
    JanganLocation
    498Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    hello

    good works

    i want

    Jobs reward

    job When giving money only I would like to give gold coin at the end of each job

  3. #3
    Valued Member DrugDealers is offline
    MemberRank
    Jan 2013 Join Date
    125Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    Good Work Bro

  4. #4
    Xeulin™ Showtek is offline
    MemberRank
    Nov 2011 Join Date
    UKLocation
    264Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    Well, only ItemPluss works fine (btw whats the min + it logs?)

  5. #5
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    youre missing the procedure parts for everything except ItemPlus ....

  6. #6
    SilkRoad loveme is offline
    MemberRank
    Sep 2011 Join Date
    JanganLocation
    498Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    SRO_VT_SHARD or SRO_VT_LOG ?

  7. #7
    Xeulin™ Showtek is offline
    MemberRank
    Nov 2011 Join Date
    UKLocation
    264Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    Quote Originally Posted by loveme View Post
    SRO_VT_SHARD or SRO_VT_LOG ?
    I think Log :)

  8. #8
    SilkRoad loveme is offline
    MemberRank
    Sep 2011 Join Date
    JanganLocation
    498Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    Quote Originally Posted by Showtek View Post
    I think Log :)
    or create a new db?

  9. #9
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    no matter what db it is, youre still missing the stored procedure edits for everything except item plus log ..

  10. #10
    Developer sladlejrhfpq is offline
    MemberRank
    Oct 2011 Join Date
    671Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    Quote Originally Posted by lemoniscool View Post
    no matter what db it is, youre still missing the stored procedure edits for everything except item plus log ..
    yeah, just took a quick look on it, but couldnt find anything related to globals, the table is created, but nothing more :)

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

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    MG,

    Change your procedures from ->
    Code:
    USE [ytytty]


    to
    Code:
    USE [SRO_VT_LOG or SRO_VT_SHARDLOG]


    yeah he is missing the insert datas for the rest of the queries... anyways...



    to MG,

    Instead of building more stress on SRO_VT_LOG Database and adding a lot more code than needed, since you are adding the same data to both _LogEventItem and _LogItemPlus

    instead of doing that, you can basically just alter the original _LogEventItem query, they are seperated into 4 main if statments:
    Code:
    if (@len_pos > 0 and @len_desc > 0)    
       else if (@len_pos > 0 and @len_desc = 0)   
       else if (@len_pos = 0 and @len_desc > 0)   
       else if (@len_pos = 0 and @len_desc = 0) 
    what you can do here is find out the len_pos and the len_desc of example the plusing of items, it will follow one of these categories. And you just need to add your own if statment inside of that if statment.

    example:
    Code:
    else if (@len_pos = 0 and @len_desc = 0) 
    if (@Operation = 35)   
       begin   
        insert _LogCashItem (RefItemID, CharID, Cnt, EventTime, Serial64)   
        values(@ItemRefID, @CharID, @dwData, GetDate(), @ItemSerial)   
       end
    else   
       begin   
                insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, Serial64, Gold)                        -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼ 
                values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @ItemSerial, @Gold)                            -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼ 
       end 
    
    so this way it will just reduce the amount of data being inserted a lot... you can do more performance steps, but generally this will make your life easier.


    Good luck and nice work.
    Last edited by Jangan; 29-05-13 at 10:07 PM.

  12. #12
    SilkRoad loveme is offline
    MemberRank
    Sep 2011 Join Date
    JanganLocation
    498Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    _LogPvP , _GlobalsLog , _On

    these negative does not save data
    Last edited by loveme; 29-05-13 at 11:13 PM.

  13. #13
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    Quote Originally Posted by loveme View Post
    _LogPvP , _GlobalsLog , _On

    these negative does not save data
    do you even read the answeres in this post Oo thats exactly what i said 3, and 7 posts above and what Jangan said 1 post above ..

    @MGProject: why dont you just tell us the EventIDs for pvp, global and guild war? we could write our own statements for the procedures then ^^

  14. #14
    Member keshk2007 is offline
    MemberRank
    Apr 2012 Join Date
    80Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    i made it but when i make plus nothing happen in game but when i enter SRO_VT_SHARDLOG ..._LogItemPlus
    i see Char ID Made Plus Number etc

    why i dont see global say .... made ... +... in game ? same ISRO or what this querys ?

  15. #15
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: DB Log with Plus from Weapons, GLobals saved in tables and more

    these querys are supposed to save the character logs in different tables not to view a message on screen if someone plussed an item ^^



Page 1 of 2 12 LastLast

Advertisement