Plus Auto Notice(Sample + Source)

Page 2 of 25 FirstFirst 1234567891012 ... LastLast
Results 16 to 30 of 372
  1. #16
    Valued Member Comandante is offline
    MemberRank
    Dec 2011 Join Date
    SmyrnaLocation
    113Posts

    Re: Plus Auto Notice(Sample + Source)

    Quote Originally Posted by DieEyes View Post
    Empty!
    Actually it's normal while PlusNotice table is empty :) check it out and be sure that its not empty

  2. #17
    Member DieEyes is offline
    MemberRank
    Aug 2012 Join Date
    Inside youLocation
    79Posts

    Re: Plus Auto Notice(Sample + Source)

    Yeah was empty, when i try to plus now something and its success i get error, System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'.

    Maybe i create rows with null let me check.

  3. #18
    Valued Member Comandante is offline
    MemberRank
    Dec 2011 Join Date
    SmyrnaLocation
    113Posts

    Re: Plus Auto Notice(Sample + Source)

    Quote Originally Posted by DieEyes View Post
    Yeah was empty, when i try to plus now something and its success i get error, System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'.

    Maybe i create rows with null let me check.
    Never ever allow nulls. :) Sent column is used by application to check if its already sent(coz it sends notice every 10 sec so there must be a limit) Message column is the body of application which contains notice and date column is used by application to send messages in an order :) (newest first)

    Important: Default values are important. Take a look to first post. I've added them.
    Last edited by Comandante; 12-06-13 at 08:58 PM.

  4. #19
    In the Emperor name Caosfox is offline
    MemberRank
    Jun 2011 Join Date
    Balcora GateLocation
    1,608Posts

    Re: Plus Auto Notice(Sample + Source)

    working perfect, only need to change some small values on proc (varchar got small and miss the last part of the msg)
    sro-2013-06-12-16-a

  5. #20
    Valued Member Comandante is offline
    MemberRank
    Dec 2011 Join Date
    SmyrnaLocation
    113Posts

    Re: Plus Auto Notice(Sample + Source)

    Quote Originally Posted by Caosfox View Post
    working perfect, only need to change some small values on proc (varchar got small and miss the last part of the msg)
    sro-2013-06-12-16-a
    Do not add "+" symbol to that message :) that's why i call it as lvl instead of opt :) That symbol is invisible while sending notice :)

  6. #21
    Member DieEyes is offline
    MemberRank
    Aug 2012 Join Date
    Inside youLocation
    79Posts

    Re: Plus Auto Notice(Sample + Source)

    First of all, its not working with me if i did not remove "_separado" from strDesc thats why i asked you before.

    After removing it became work, but its keep spamming in game that chr did the + for the item

  7. #22
    Valued Member Comandante is offline
    MemberRank
    Dec 2011 Join Date
    SmyrnaLocation
    113Posts

    Re: Plus Auto Notice(Sample + Source)

    Quote Originally Posted by DieEyes View Post
    First of all, its not working with me if i did not remove "_separado" from strDesc thats why i asked you before.

    After removing it became work, but its keep spamming in game that chr did the + for the item
    Code:
    ALTER  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 > 0 and @len_desc > 0)   
       begin   
                insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, strDesc, Serial64, Gold)    -- #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 > 0 and @len_desc = 0)   
       begin   
                insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, Serial64, Gold)            -- #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 = 0 and @len_desc > 0)   
       begin   
                insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, strDesc, Serial64, Gold)            -- #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 = 0 and @len_desc = 0)   
       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   
       -- À¯·á ¾ÆÀÌÅÛ ±¸ÀÔÀ̸é!   
       -- #define LOG_ITEMEVENT_BUY_CASHITEM  (BYTE)35   
       if (@Operation = 35)   
       begin   
        insert _LogCashItem (RefItemID, CharID, Cnt, EventTime, Serial64)   
        values(@ItemRefID, @CharID, @dwData, GetDate(), @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(@strDesc, 8, 1) 
        end 
       else if(@len_desc1 = 10) 
            begin 
            set @strDesc = SUBSTRING(@strDesc,0,10) 
            set @strDesc_separado = SUBSTRING(@strDesc, 8, 2) 
            end 
            if(@strDesc_separado >= 8) 
            begin 
            --set @strDesc_separado = @len_desc1 
          insert _LogItemPlus(CharID, Serial64, Plus, Data, Lido) values(@CharID, @ItemSerial, @strDesc_separado, GetDate(), '0')   
        end  
       end 
       if(@Operation = 90)
       begin
        declare @iname varchar(129)
    	declare @iid int
    	declare @cname varchar(64)
    	select @iid = RefItemID from SRO_VT_SHARD.dbo._Items where Serial64 = @ItemSerial
    	select @iname = CodeName128 from SRO_VT_SHARD.dbo._RefObjCommon where id = @iid
    	select @cname = CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID
    	insert PlusNotice(Sent, Message)values(0,@cname + ' has increased ' + @iname + ' to [lvl ' + CAST(@strDesc_separado AS NVARCHAR) + ']')
     end
    Change your procedure with this :P Let me know if it gives an error coz i cut some codes from there :)

  8. #23
    In the Emperor name Caosfox is offline
    MemberRank
    Jun 2011 Join Date
    Balcora GateLocation
    1,608Posts

    Re: Plus Auto Notice(Sample + Source)

    yes, im trying to parse the strdesc , is missing on the proc you posted (var strdesc_separado). i change it later
    now im adding some vars to the source, to do the "login" part automatic with my values, im lazy to type that much data

    nvm, you posted the full proc ^^

  9. #24
    Valued Member Comandante is offline
    MemberRank
    Dec 2011 Join Date
    SmyrnaLocation
    113Posts

    Re: Plus Auto Notice(Sample + Source)

    Quote Originally Posted by Caosfox View Post
    yes, im trying to parse the strdesc , is missing on the proc you posted (var strdesc_separado). i change it later
    now im adding some vars to the source, to do the "login" part automatic with my values, im lazy to type that much data
    I thought i'm not the only one who uses http://forum.ragezone.com/f722/db-lo...lobals-934558/ this thread :)) sorry for that, changed that procedure with new one :)

  10. #25
    Member DieEyes is offline
    MemberRank
    Aug 2012 Join Date
    Inside youLocation
    79Posts

    Re: Plus Auto Notice(Sample + Source)

    Worked fine now , Only keep spamming , i think its from the program i will restart it and check it again.

  11. #26
    Valued Member Comandante is offline
    MemberRank
    Dec 2011 Join Date
    SmyrnaLocation
    113Posts

    Re: Plus Auto Notice(Sample + Source)

    Quote Originally Posted by DieEyes View Post
    Worked fine now , Only keep spamming , i think its from the program i will restart it and check it again.
    It's about application's packet sending. I'll take a look to that while i got some time :)

  12. #27
    Member DieEyes is offline
    MemberRank
    Aug 2012 Join Date
    Inside youLocation
    79Posts

    Re: Plus Auto Notice(Sample + Source)

    Quote Originally Posted by Comandante View Post
    It's about application's packet sending. I'll take a look to that while i got some time :)
    Yeah later please check it couse still spamming :)

    Thank you again and have a nice day.

  13. #28
    In the Emperor name Caosfox is offline
    MemberRank
    Jun 2011 Join Date
    Balcora GateLocation
    1,608Posts

    Re: Plus Auto Notice(Sample + Source)

    dont worry, i have my proc edited in weird ways

  14. #29
    Valued Member nandyyto is offline
    MemberRank
    Jan 2013 Join Date
    Chile ;DLocation
    118Posts

    Re: Plus Auto Notice(Sample + Source)

    Good job, work.

  15. #30
    Learning denise456 is offline
    MemberRank
    Feb 2012 Join Date
    BrasilLocation
    318Posts

    Re: Plus Auto Notice(Sample + Source)




Page 2 of 25 FirstFirst 1234567891012 ... LastLast

Advertisement