Plus Auto Notice(Sample + Source)

replace this
Code:
    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
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 @plus = SUBSTRING(@strDesc, CHARINDEX('+',@strDesc,0) + 1, LEN(@strDesc)) 
    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

I have to restart the notice program after i edit the proc ?
 
Help me

Adsız - Plus Auto Notice(Sample + Source) - RaGEZONE Forums
 
Help Guys When i Write User Name And Pw Account Gm Dont Give Me Select Char or any Thing when i write normal char its work but normal char without notice Help
 
with the Auto Notice v3 you can also make an automated notice when a GM logs in or logs out, simply add the following to SRO_VT_SHARDLOG stored procedure "_AddLogChar" and change the char names (in case you got more add another line, in case you got less delete them)

Code:
IF @EventID = 6 begin
	if @CharID = (select CharID from SRO_VT_SHARD.dbo._Char where CharName16 like 'CHARNAME1') OR
	   @CharID = (select CharID from SRO_VT_SHARD.dbo._Char where CharName16 like 'CHARNAME2') OR
	   @CharID = (select CharID from SRO_VT_SHARD.dbo._Char where CharName16 like 'CHARNAME3') OR
	   @CharID = (select CharID from SRO_VT_SHARD.dbo._Char where CharName16 like 'CHARNAME4') begin
		declare @veremos_out varchar(200)
		declare @cname_out varchar(50) = (select CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID)
		select @veremos_out = '[GM] ' + @cname_out + ' has logged out!'
		declare @azar_out INT
		declare @randomfile_out varchar(50) 
		SELECT top 1 @azar_out = (ABS(CHECKSUM(NEWID())) % 10000) FROM Master.dbo.Syscolumns
		select @randomfile_out = 'C:\MSSQLTips\' + convert(varchar, @azar_out) + '.txt'
		SELECT dbo.WriteTextFile(@veremos_out, @randomfile_out, 0)	
	end
end
IF @EventID = 4
BEGIN
	if @CharID = (select CharID from SRO_VT_SHARD.dbo._Char where CharName16 like 'CHARNAME1') OR
	   @CharID = (select CharID from SRO_VT_SHARD.dbo._Char where CharName16 like 'CHARNAME2') OR
	   @CharID = (select CharID from SRO_VT_SHARD.dbo._Char where CharName16 like 'CHARNAME3') OR
	   @CharID = (select CharID from SRO_VT_SHARD.dbo._Char where CharName16 like 'CHARNAME3') begin
		declare @veremos varchar(200)
		declare @cname varchar(50) = (select CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID)
		select @veremos = '[GM] ' + @cname + ' has logged in!'
		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
END
 
Last edited:
in fact, if you get the right eventid or operation, you can show on msg almost everything, like:
reaching max lvl
xxxx player got yyyy especial item
xxx item is destroyed
xxx player killed a gm

the sky (and your knowlege of sql) is the limit

btw, the part with "--" on the sql code is not need, i forgot to take it out on the original procedure release
 
Hmm does it work on windows 7 (using it for the tests), seems like everything is working fine but I think it is not allowed to create files in the folder I created in C:\ ... and I think its not working becuz of this.. ideas ?
 
Caosfox.. it doesn't create any text files and yes the folder is C:\MSSQLTips


Caosfox.. it doesn't create any text files and yes the folder is C:\MSSQLTips
 
The program doesnt even start for me?
What to do?

any error? what os?

Caosfox.. it doesn't create any text files and yes the folder is C:\MSSQLTips

what sql server version are you using 2008r2?
no errors during sql dll install?

execute this querry to test it

SELECT dbo.WriteTextFile('this is a test', 'c:\test.txt', 0)

and check if test.txt is created at c:\
if not, you installed wrong the dll
if yes, you have wrong the proc
 
Back