Plus Auto Notice(Sample + Source)

Page 18 of 25 FirstFirst ... 810111213141516171819202122232425 LastLast
Results 256 to 270 of 372
  1. #256
    In the Emperor name Caosfox is offline
    MemberRank
    Jun 2011 Join Date
    Balcora GateLocation
    1,608Posts

    Re: Plus Auto Notice(Sample + Source)

    mhh, weird, ofc problem looks is like at proc (if using writetextfile directly works)

  2. #257
    Valued Member trytokillme is offline
    MemberRank
    Nov 2011 Join Date
    101Posts

    Re: Plus Auto Notice(Sample + Source)

    I dont know why it dont insert anything in the tables...

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

    Re: Plus Auto Notice(Sample + Source)

    try this:
    replace everything under if (@Operation = 90 OR @Operation = 160)
    for this
    Code:
      if(@Operation = 90)
       begin
        declare @iname varchar(129)
        declare @iid int
        declare @nombre varchar(200)
            declare @plus varchar(5)    
            declare @cname varchar(64)
        select @iid = RefItemID from SRO_VT_SHARD.dbo._Items where Serial64 = @ItemSerial
        select @iname = NameStrID128 from SRO_VT_SHARD.dbo._RefObjCommon where id = @iid
        select @cname = CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID
        select @nombre = itemname from SRO_VT_SHARD.dbo.nombredeitems where itemcode = @iname
        select @plus = SUBSTRING(@strDesc, CHARINDEX('+',@strDesc,0) + 1, LEN(@strDesc)) 
        insert PlusNotice(Sent, Message, Date)values(0,'[' + @cname +']'+ ' has increased '+'[' + @nombre + ']'+' to lvl [' + @plus ,GETDATE())
        declare @veremos varchar(200)
        select @veremos = '[' + @cname +']'+ ' has increased '+'[' + @nombre + ']'+' to level [' + @plus
        declare @azar INT
        declare @randomfile varchar(50) 
        SELECT top 1 @azar = (ABS(CHECKSUM(NEWID())) % 10000) FROM Master.dbo.Syscolumns
        select @randomfile = 'C:\MSSQLTips\' + convert(varchar, @azar) + '.txt'
        SELECT dbo.WriteTextFile(@veremos, @randomfile, 0)
        end
    is not going to write anything in tables, but must show a msg when you plus

  4. #259
    Valued Member trytokillme is offline
    MemberRank
    Nov 2011 Join Date
    101Posts

    Re: Plus Auto Notice(Sample + Source)

    Hmm its correct like that because its still not work (made a bow +9 etc.)

    USE [u28gzUEanKJYL2aH9BRJap3Tx]
    GO
    /****** Object: StoredProcedure [dbo].[_AddLogItem] Script Date: 08/08/2013 22:51:21 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    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)
    begin
    declare @iname varchar(129)
    declare @iid int
    declare @nombre varchar(200)
    declare @plus varchar(5)
    declare @cname varchar(64)
    select @iid = RefItemID from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._Items where Serial64 = @ItemSerial
    select @iname = Name from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._ItemName where CodeName128 in(select CodeName128 from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._RefObjCommon where id = @iid)
    select @cname = CharName16 from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._Char where CharID = @CharID
    --select @nombre = itemname from cKPekjnu5NKqdPbDh4CnVy9gS.dbo.nombredeitems where itemcode = @iname
    select @plus = SUBSTRING(@strDesc, CHARINDEX('+',@strDesc,0) + 1, LEN(@strDesc))
    insert PlusNotice(Sent, Message, Date)values(0,'[' + @cname +']'+ ' has increased '+'[' + @iname + ']'+' to lvl [' + @plus ,GETDATE())
    declare @veremos varchar(200)
    select @veremos = '[' + @cname +']'+ ' has increased '+'[' + @iname + ']'+' to level [' + @plus
    declare @azar INT
    declare @randomfile varchar(50)
    SELECT top 1 @azar = (ABS(CHECKSUM(NEWID())) % 10000) FROM Master.dbo.Syscolumns
    select @randomfile = 'C:\MSSQLTips\' + convert(varchar, @azar) + '.txt'
    SELECT dbo.WriteTextFile(@veremos, @randomfile, 0)
    end

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

    Re: Plus Auto Notice(Sample + Source)

    PlusNotice , my table is named PlusNotice, not _PlusNotice. edit it to your db and check if save any data

  6. #261
    Valued Member trytokillme is offline
    MemberRank
    Nov 2011 Join Date
    101Posts

    Re: Plus Auto Notice(Sample + Source)

    Hmm? Where you see _PlusNotice? My Table is also named PlusNotice not _PlusNotice ^^

    Ok i found there musst be something wrong with the
    Code:
    SELECT @veremos = '[' + @cname +']'+' has Succeeded in Plusing '+'[' + @iname + ']'+' to Plus [' + @plus + ']'
    Because if i run the query it dont give out any file, but if i set @veremos to any text it gives me the file correct!

    Ok, i fixed now the Login and Logout notice of GM's and i still work on the alchemy notice...

    The main problem is, the procedure ignores the insert statments! I tested If (@Operation = 90) [91 and also != 90) it dont insert anythink in the PlusNotice table....

    I tested it with this codes:

    Code:
     if(@Operation = 90)
       begin
    declare @azar INT
    declare @randomfile varchar(50)
    declare @veremos as varchar(max)
    declare @iname varchar(200)
    declare @iid int
    declare @plus varchar(200)
    declare @cname varchar(64)
    set @iid = (SELECT RefItemID from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._Items where Serial64 = @ItemSerial)
    set @iname = (SELECT Name from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._ItemName where CodeName128 in(select CodeName128 from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._RefObjCommon where id = @iid))
    set @cname = (SELECT CharName16 from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._Char where CharID = @CharID)
    set @plus = SUBSTRING(@strDesc, CHARINDEX('+',@strDesc,0) + 1, LEN(0))
    set @veremos = '['+ @cname +']'+' has successfully fused '+'['+ @iname +']'+' to plus ['+ @plus +']'
    SELECT top 1 @azar = (ABS(CHECKSUM(NEWID())) % 10000) FROM Master.dbo.Syscolumns
    set @randomfile = 'C:\MSSQLTips\' + convert(varchar, @azar) + '.txt'
    SELECT dbo.WriteTextFile(@veremos, @randomfile, 0)
    Insert into PlusNotice (Sent, Message) values ('0',@veremos)
    Insert into PlusNotice (Sent, Result) values ('0', 'Success')
        end
        
         if(@Operation = 91)
       begin
       declare @plus2 int
    set @iid = (SELECT RefItemID from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._Items where Serial64 = @ItemSerial)
    set @iname = (SELECT Name from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._ItemName where CodeName128 in(select CodeName128 from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._RefObjCommon where id = @iid))
    set @cname = (SELECT CharName16 from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._Char where CharID = @CharID)
    set @plus = SUBSTRING(@strDesc, CHARINDEX('+',@strDesc,0) + 1, LEN(0))
    set @plus2 = @plus + 1
    set @veremos = '['+ @cname +']'+' has failed at fusing '+'['+ @iname +']'+' to plus ['+ @plus2 +']'
    SELECT top 1 @azar = (ABS(CHECKSUM(NEWID())) % 10000) FROM Master.dbo.Syscolumns
    set @randomfile = 'C:\MSSQLTips\' + convert(varchar, @azar) + '.txt'
    SELECT dbo.WriteTextFile(@veremos, @randomfile, 0)
    Insert into PlusNotice (Sent, Message) values ('0',@veremos)
    Insert into PlusNotice (Sent, Result) values ('0','Failed')
        end
    If (@Operation != 90) 
    begin
    set @iid = (SELECT RefItemID from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._Items where Serial64 = @ItemSerial)
    set @iname = (SELECT Name from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._ItemName where CodeName128 in(select CodeName128 from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._RefObjCommon where id = @iid))
    set @cname = (SELECT CharName16 from cKPekjnu5NKqdPbDh4CnVy9gS.dbo._Char where CharID = @CharID)
    set @plus = SUBSTRING(@strDesc, CHARINDEX('+',@strDesc,0) + 1, LEN(0))
    set @veremos = '['+ @cname +']'+' has successfully fused '+'['+ @iname +']'+' to plus ['+ @plus +']'
    SELECT top 1 @azar = (ABS(CHECKSUM(NEWID())) % 10000) FROM Master.dbo.Syscolumns
    set @randomfile = 'C:\MSSQLTips\' + convert(varchar, @azar) + '.txt'
    SELECT dbo.WriteTextFile(@veremos, @randomfile, 0)
    Insert into PlusNotice (Sent, Message) values ('0',@veremos)
    Insert into PlusNotice (Sent, Result) values ('0', 'Success')
        end
    Last edited by trytokillme; 09-08-13 at 03:07 PM.

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

    Re: Plus Auto Notice(Sample + Source)

    not even insert to db?, try to run this simply query

    Insert into PlusNotice (Sent, Result) values ('0', 'Success')

    and check if inster that line on the db

  8. #263
    Valued Member trytokillme is offline
    MemberRank
    Nov 2011 Join Date
    101Posts

    Re: Plus Auto Notice(Sample + Source)

    Yup it inserts successfully. I guess there is a problem with the whole procedure....I made also now a working Academy Notice system (everything works fine). just this stupid alchemy notice dont work

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

    Re: Plus Auto Notice(Sample + Source)

    mhhh, try this
    replace

    if(@Operation = 90)

    for

    if (@Operation = '90')

  10. #265
    Valued Member trytokillme is offline
    MemberRank
    Nov 2011 Join Date
    101Posts

    Re: Plus Auto Notice(Sample + Source)

    Still doesnt work xD

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

    Re: Plus Auto Notice(Sample + Source)

    stupid procedure...

  12. #267
    Valued Member trytokillme is offline
    MemberRank
    Nov 2011 Join Date
    101Posts

    Re: Plus Auto Notice(Sample + Source)

    Could you post your complete procedure?

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

    Re: Plus Auto Notice(Sample + Source)

    enjoy
    proc.rar

  14. #269
    Member longway is offline
    MemberRank
    Sep 2012 Join Date
    Alexandria, EgyLocation
    76Posts

    Re: Plus Auto Notice(Sample + Source)

    Caosfox Can you come T.V and help me in this shit Auto plus notice

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

    Re: Plus Auto Notice(Sample + Source)

    i can later, when im home



Advertisement