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
 
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 :)
 
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 ^^
 
:D

http://forum.ragezone.com/f722/db-log-plus-weapons-globals-934558/

System iSRO

Comandante - Plus Auto Notice(Sample + Source) - RaGEZONE Forums
 
@comandante, this part creates the non stop spam "string text = mesaj.Text;"
mesaj = texbox object. everytime the timer runs, read the value on that box and send the packet with that value
how to fix?.. make some filter like "if (blablalbla)"
or create a new empty and hidden texbox and transfer the value to the packet from there, like: ( this are parts of the code)

textBox1.Text = (string)reader["message"];
mesaj.Text = textBox1.Text;

and
string text = textBox1.Text;
Packet packet = new Packet(0x7025);
packet.WriteUInt8((byte)7);
packet.WriteUInt8((byte)0);
packet.WriteAscii(text);
if (!string.IsNullOrEmpty(text))
{
Agent.Send(packet);
textBox1.Text = "";
}

this way, the packet value is sent 1 time from a hidden non visible clone of mesaj textbox, is sent 1 time and cleaned form the hidden one but still visible at the form form mesaj

is a weird and tricky way, but is what i can do with my limited knowlege of c/c#
 
Last edited:
i add id but how i can change ITEM_CH_BLADE_xxx to Ingame name=Coper Blade or so?
 
@comandante, this part creates the non stop spam "string text = mesaj.Text;"
mesaj = texbox object. everytime the timer runs, read the value on that box and send the packet with that value
how to fix?.. make some filter like "if (blablalbla)"
or create a new empty and hidden texbox and transfer the value to the packet from there, like: ( this are parts of the code)

textBox1.Text = (string)reader["message"];
mesaj.Text = textBox1.Text;

and
string text = textBox1.Text;
Packet packet = new Packet(0x7025);
packet.WriteUInt8((byte)7);
packet.WriteUInt8((byte)0);
packet.WriteAscii(text);
if (!string.IsNullOrEmpty(text))
{
Agent.Send(packet);
textBox1.Text = "";
}

this way, the packet value is sent 1 time from a hidden non visible clone of mesaj textbox, is sent 1 time and cleaned form the hidden one but still visible at the form form mesaj

is a weird and tricky way, but is what i can do with my limited knowlege of c/c#

Fixed with my way :) From now, old/empty notices won't be sent.

i add id but how i can change ITEM_CH_BLADE_xxx to Ingame name=Coper Blade or so?

Check my posts.
 
I see it but you could have explained it better ..
because I understand it non.






well no matter thx for nothing
 
I see it but you could have explained it better ..
because I understand it non.






well no matter thx for nothing


It's not my problem. As i said before i'm not going to make a full guide and "people with brain can handle it"... Some people borns with brain some doesn't. Some people will give thanks for developing their server some doesn't... So... You're welcome dude.


i need help to add it :)

What's the problem?
 
Last edited:
Seriosuly you did a great job with the base idea
but i can tell you that your c# code is a miss :D
how ever i took your sql procedure system into my tool

M6jlKdZ - Plus Auto Notice(Sample + Source) - RaGEZONE Forums

and thank you for sharing anyway

Hehe :) it was just a little sample which took my 1 hr, i'm not even going to use that on my server with this version :) still developing that for better performance. Since i've shared the base i think you guys can develope that too :)) You're welcome.
 
Back