As you can see on the title it just sends a notice to server about alchemy actions :P When a player successfully upgrades his/her item its automatically recording to Log DB. It will be a bit buggy. I'm not going to make a full guide here but i think you guys can handle it with some brain :P
Btw i've used "auto notice's source codes by someone else". If you let me know his name i'll let others know who he is :P Log in with that old way before sending notice
Table
Code:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: Table [dbo].[PlusNotice] Script Date: 14.06.2013 18:09:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PlusNotice](
[Sent] [int] NOT NULL,
[Message] [varchar](300) NOT NULL,
[Date] [datetime] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[PlusNotice] ADD CONSTRAINT [DF_PlusNotice_Sent] DEFAULT ((0)) FOR [Sent]
GO
ALTER TABLE [dbo].[PlusNotice] ADD CONSTRAINT [DF_PlusNotice_Date] DEFAULT (getdate()) FOR [Date]
GO
To _AddLogItem procedure in log DB(be sure that you've changed "SRO_VT_SHARD" to your own shard db in procedure)
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
Don't forget to give thanks to them under this thread :) like their comments
Quote:
Originally Posted by Caosfox
Hello Ragezoners.
(first of all, my english sucks, so live with it)
Finaly is time for the notice writer v3.
requeriments:
sql 2008 r2 (maybe works with 2005 or 2012, i dont have them so not tested it. dont ask me how to make it work on another version, im not going to install 2005 or 2012)
.net framework 3.5 minimum, but recommned 4.0+
time and patience, young padawan
How it works:
is rater simply, the "plus notice" querry writes a small text file on the hard drive with "xxxx as sucess blahblahlblah to +2544" (you define it on the plus notice querry),
next the notice writer monitors that file (folder in this case) for any new file created (is on real time and uses near no processor power).
When a new file is created, reads it and send the message in game (all of that process needs only 0.5 o 0.6 seconds, so is almost real time).
this method DONT use any table in the db
Now install guide:
1) download all the files in the attach
2) create a folder in the root hard drive of your silkroad server (root must be C:) and name it MSSQLTips (so is C:\MSSQLTips),
3) copy TextFileTips.dll inside that folder
4) do a full db backup, only in case something goes wrong
5) now at SQL Server Management Studio execute this querrys:
first:
Code:
USE master
GO
sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
this querry enables CLR support for the db
second :
Code:
USE SRO_VT_SHARDLOG
GO
ALTER DATABASE SRO_VT_SHARDLOG SET TRUSTWORTHY ON
GO
needed for CLR compatibility (rename SRO_VT_SHARDLOG to your log db)
third:
Code:
CREATE ASSEMBLY TextFileTips
FROM 'C:\MSSQLTips\TextFileTips.dll'
WITH PERMISSION_SET = EXTERNAL_ACCESS
this querry installs the CLR code
5) execute this querry on your log db to create 2 new functions:
Code:
CREATE FUNCTION [dbo].[WriteTextFile](
@text [nvarchar](4000),
@path [nvarchar](4000),
@append [bit])
RETURNS [bit] WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [TextFileTips].[ReadWriteFileTips].[WriteTextFile]
GO
CREATE PROCEDURE [dbo].[ReadTextFile]
@path [nvarchar](4000)
WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [TextFileTips].[ReadWriteFileTips].[ReadTextFile]
GO
6) if any of the steps 5 or 6 gives a weird errors like :
error :
Incorrect syntax near . You may need to set the compatibility level of the current database to a higher value to enable this feature.
solution:
execute this querry (use your log db)
Code:
EXEC sp_dbcmptlevel 'SRO_VT_SHARDLOG', 100
error:
if sql says you dont hve authorization on db, is a normal error of backups dbs created on one machine and restored on another (remember, all ours dbs are backups from a original one)
to fix this, simply follow this steps:
Code:
Select the database, right click it, select PROPERTIES. A pop up window opens up and in the upper left corner you'll see "SELECT A PAGE". select FILE.
Now in the main section on the top you'll see OWNER. Select the button next to the empty box. another pop up box opens up, select browse and then you'll have to select (NT AUTHORITY\SYSTEM)
fix the error and repeat the steps
7) modify the addlogitem proc, how? like this:
on your proc, at the inserting the message to the table, comment it and add:
Code:
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)
in this querry @azar generates a random number, @veremos is the var where the "xxxx as sucessfull incresing xxx to lvl xxx" (or w/e your msg is) only that, no need date, time or anything more
@randomfile = creates a text file with the random name, you ask why need to do this? easy, if 2 or more players plus at same time and if you use fixed names,
only 1 message is send, the first. this way all msgs are send (unless you are too unlucky and the random numbers are the same, but you have 1 in 10000 chances of that
and last command writes the text file (dont change paths)
if it really works, will be epic, gonna test, thanks for the release.
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Actually its so simple :) i prefer you guys to edit it a bit :) especially the timer :) its sending notice every 10 secs and gets the newest plus message (ordering by date)
12-06-13
denise456
Re: Plus Auto Notice(Sample + Source)
Good Job
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by denise456
Good Job
Thank you.
And a suggestion: it's getting CodeName128 from _refObjCommon as item's name. As you know it's not the real name of item it's just name string. So i suggest you guys to alter _refObjCommon table and add a column which will contain item's real name and edit procedure to select that column instead of codename128
12-06-13
MaDenGo
Re: Plus Auto Notice(Sample + Source)
PHP Code:
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
When i add those lines on AddtimedJop
PHP Code:
Msg 137, Level 15, State 2, Procedure _AddTimedJob, Line 19 Must declare the scalar variable "@Operation". Msg 137, Level 15, State 2, Procedure _AddTimedJob, Line 23 Must declare the scalar variable "@ItemSerial". Msg 137, Level 15, State 2, Procedure _AddTimedJob, Line 26 Must declare the scalar variable "@strDesc_separado".
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by MaDenGo
PHP Code:
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
When i add those lines on AddtimedJop
PHP Code:
Msg 137, Level 15, State 2, Procedure _AddTimedJob, Line 19 Must declare the scalar variable "@Operation". Msg 137, Level 15, State 2, Procedure _AddTimedJob, Line 23 Must declare the scalar variable "@ItemSerial". Msg 137, Level 15, State 2, Procedure _AddTimedJob, Line 26 Must declare the scalar variable "@strDesc_separado".
aha ok my fault :)
but on this Attachment 132323
on Type your Host = server ip or SQL Server name
btw i tried both Attachment 132324
what's going on ?
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by MaDenGo
aha ok my fault :)
but on this Attachment 132323
on Type your Host = server ip or SQL Server name
btw i tried both Attachment 132324
what's going on ?
Again :) as you can see there is no username or password field for SQL that means you have to use that in localhost of server :) and yes SQL servername :)
+
An issue fixed
12-06-13
DieEyes
Re: Plus Auto Notice(Sample + Source)
@Comandante did you re-uploaded another one i got same problem ?
Yes you have to download new one.
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
In all threads which "change log" added i've changed links. Tell me your problem again?
12-06-13
Caosfox
Re: Plus Auto Notice(Sample + Source)
yup, some small things need a little edition, like the annoying Integrated Security = True replaced for user id and password (to run from any other pc)
12-06-13
DieEyes
Re: Plus Auto Notice(Sample + Source)
one more bug keep spamming at game.
[Notice]
[Notice]
[Notice]
[Notice]
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Caosfox
yup, some small things need a little edition, like the annoying Integrated Security = True replaced for user id and password (to run from any other pc)
Added :)
Quote:
Originally Posted by DieEyes
one more bug keep spamming at game.
[Notice]
[Notice]
[Notice]
[Notice]
Empty notice or sending one notice for several times?
12-06-13
DieEyes
Re: Plus Auto Notice(Sample + Source)
Empty!
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by DieEyes
Empty!
Actually it's normal while PlusNotice table is empty :) check it out and be sure that its not empty
12-06-13
DieEyes
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.
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by DieEyes
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.
12-06-13
Caosfox
1 Attachment(s)
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) Attachment 132326
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Caosfox
working perfect, only need to change some small values on proc (varchar got small and miss the last part of the msg) Attachment 132326
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 :)
12-06-13
DieEyes
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
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by DieEyes
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 :)
12-06-13
Caosfox
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 ^^
12-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Caosfox
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
btw if you wanna make it show only +12 you can add
Code:
if(@strdesc_seperado='12')
statement
12-06-13
denise456
Re: Plus Auto Notice(Sample + Source)
Same Here
13-06-13
MaDenGo
Re: Plus Auto Notice(Sample + Source)
i need help to add it :)
13-06-13
Caosfox
Re: Plus Auto Notice(Sample + Source)
@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)
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#
13-06-13
totfliega2007
Re: Plus Auto Notice(Sample + Source)
i add id but how i can change ITEM_CH_BLADE_xxx to Ingame name=Coper Blade or so?
13-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Caosfox
@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)
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.
Quote:
Originally Posted by totfliega2007
i add id but how i can change ITEM_CH_BLADE_xxx to Ingame name=Coper Blade or so?
Check my posts.
13-06-13
totfliega2007
Re: Plus Auto Notice(Sample + Source)
I see it but you could have explained it better ..
because I understand it non.
well no matter thx for nothing
13-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by totfliega2007
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.
Quote:
Originally Posted by MaDenGo
i need help to add it :)
What's the problem?
13-06-13
egsro
Re: Plus Auto Notice(Sample + Source)
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
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
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.
13-06-13
Caosfox
Re: Plus Auto Notice(Sample + Source)
yup, love your work!
even if for you took only 1 hour... for me is almost impossible ( but google is my best friend ^^)
works perfect to save globals and notices to db ( with some modifications, ofc), but logdb is going to scream for mercy if do that
maybe can make another db so save it... but lazy
13-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Caosfox
yup, love your work!
even if for you took only 1 hour... for me is almost impossible ( but google is my best friend ^^)
works perfect to save globals and notices to db ( with some modifications, ofc), but logdb is going to scream for mercy if do that
maybe can make another db so save it... but lazy
My SQL server using a lot of RAM. So i must use another version of this for a stable server with good performance. I'm decreasing logging level to minimum. Only some kind of items and GM commands. Logging them to txt from DB and then deleting the original one from DB. Otherwise SQL usage will be so high.
13-06-13
Caosfox
Re: Plus Auto Notice(Sample + Source)
true that.
indeed is better for the db to write to text file and the program works faster ( dont even need to write from db to txt, simply to program to txt)
14-06-13
BlackRoseGaming
Re: Plus Auto Notice(Sample + Source)
niceeee
14-06-13
matrixasd2
2 Attachment(s)
Re: Plus Auto Notice(Sample + Source)
Can You Help Me ..
There A problem , Table _itemPluslog is Loading Fine . Attachment 132471
The Table of PlusNotice is Empty Nothing Load Attachment 132472
How Can Fix This Table To Make Him Loading
14-06-13
Showtek
Re: Plus Auto Notice(Sample + Source)
Something wrong, If PlusNotice table clean - spamming clean notices every 10 sec, If I pluss item, notices gone, whats wrong?
AddLogItem:
Code:
USE [SRO_VT_LOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogItem] Script Date: 6/14/2013 8:45:54 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-------------------------------------------------------------------------------------------------------------------
-- Step 2
-- ±âÁ¸ ¾ÆÀÌÅÛ ·Î±× ÀÔ·Â Stored procedure ¼öÁ¤
-- DataBase : Shard Log
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
PlusNotice:
Code:
USE [SRO_VT_LOG]
GO
/****** Object: Table [dbo].[PlusNotice] Script Date: 6/14/2013 8:46:55 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PlusNotice](
[Sent] [int] NOT NULL,
[message] [varchar](max) NOT NULL,
[Date] [datetime] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[PlusNotice] ADD CONSTRAINT [DF_PlusNotice_Sent] DEFAULT ((0)) FOR [Sent]
GO
ALTER TABLE [dbo].[PlusNotice] ADD CONSTRAINT [DF_PlusNotice_Date] DEFAULT (getdate()) FOR [Date]
GO
Code:
1 Hardy has increased ITEM_CH_NECKLACE_09_A_RARE to [lvl 8] 2013-06-14 08:43:01.393
Used This Query and Still The Same Problem , Old Version Reload but don't write , New Version is Don't Load anything
14-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by matrixasd2
Used This Query and Still The Same Problem , Old Version Reload but don't write , New Version is Don't Load anything
Check the newest one maybe that will work. I've tryed that one some mins ago. And it's loading the PlusNotice messages.
Usage:
-Login to server by Oyun section, login to account, type security letters, select character and go to SQL section without touching notice in Oyun section. Then type your sql info and press activate.
14-06-13
matrixasd2
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Comandante
Check the newest one maybe that will work. I've tryed that one some mins ago. And it's loading the PlusNotice messages.
Usage:
-Login to server by Oyun section, login to account, type security letters, select character and go to SQL section without touching notice in Oyun section. Then type your sql info and press activate.
Let Me Try ..
V.1.0.3 Work oyun & load notice fine .. but don't Write Notice ,, v1.0.4 work oyun & Don't Load Notice , V1.0.5 Oyun Don't Work and Don't Load Notice
14-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by matrixasd2
Let Me Try ..
V.1.0.3 Work oyun & load notice fine .. but don't Write Notice ,, v1.0.4 work oyun & Don't Load Notice , V1.0.5 Oyun Don't Work and Don't Load Notice
What .net version you got? And can someone able to try that too so we'll see if it's about matrix's hisself or a general issue coz it's working in my dedicated and in my 2 pcs
14-06-13
matrixasd2
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Comandante
What .net version you got? And can someone able to try that too so we'll see if it's about matrix's hisself or a general issue coz it's working in my dedicated and in my 2 pcs
Woooooooooooooot work Fine now ..
But Don't Write in Notice AnyThing .. just one Time and stopped
After 1 time Stopped and don't write .. re-open it again nothing write ..
Are you using Xtrap?
14-06-13
matrixasd2
2 Attachment(s)
Re: Plus Auto Notice(Sample + Source)
Attachment 132527Attachment 132528System Work Fine Now .. Notice Reload Every 5 Succ .. Sry About worry You .. Thanks Too Much Bro .. i want know Last Thing .. how can change code in Notice To Name Item ..
14-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by matrixasd2
Attachment 132527Attachment 132528System Work Fine Now .. Notice Reload Every 5 Succ .. Sry About worry You .. Thanks Too Much Bro .. i want know Last Thing .. how can change code in Notice To Name Item ..
Here is your answer
Quote:
Originally Posted by Comandante
Thank you.
And a suggestion: it's getting CodeName128 from _refObjCommon as item's name. As you know it's not the real name of item it's just name string. So i suggest you guys to alter _refObjCommon table and add a column which will contain item's real name and edit procedure to select that column instead of codename128
14-06-13
matrixasd2
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Comandante
Here is your answer
Thanks Too Much gavur <3 .. Awesome See .. I Hope Make Auto Notice .. Write Guild War Table + Notice + .. It's Will be FTW Release :*
14-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
I'll do it if you explain a bit what do you meaning :)
14-06-13
matrixasd2
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Comandante
I'll do it if you explain a bit what do you meaning :)
Mean If 2 Guild Make Guild War .. Then The Guild war Time Finish Must Write Lose & Winner .. just 2 Guild See The Message ..
Want Message Write Automatice To All Server .. To Player In or Out Guild Know .. This Idea Will Be Special ..
Like + When Succ The Notice Write Name Player + ITem Name + [ + Succ Lvl ]
14-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by matrixasd2
Mean If 2 Guild Make Guild War .. Then The Guild war Time Finish Must Write Lose & Winner .. just 2 Guild See The Message ..
Want Message Write Automatice To All Server .. To Player In or Out Guild Know .. This Idea Will Be Special ..
Like + When Succ The Notice Write Name Player + ITem Name + [ + Succ Lvl ]
That will ruin the performance of server. :)
14-06-13
Mixizi
Re: Plus Auto Notice(Sample + Source)
Hah omygad it's awesome !!!! I can play with that now :p thanks you dude ;)
14-06-13
Comandante
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by Mixizi
Hah omygad it's awesome !!!! I can play with that now :p thanks you dude ;)
You're welcome. :) Hope you enjoy
15-06-13
Erro7
1 Attachment(s)
Re: Plus Auto Notice(Sample + Source)
Commander Where i edit name ITEM_CH_TBLADE_08_C_RARE FOR NAME WEAPON Polearm? Thx
@Comandante, if you have time pm me, i have a better version almost done ( need some small fix, code is a mess.. i sucks at c#), works on real time (dont need timers), can record almost unlimited values (pvp logs, globals, plus, anything you want) and dont use any sql connections, and performance lost on db side is near 0.. in fact you dont even need to write data to db
only downside is works in sql 2008r2 (never tested on 2008 normal, and im 80% sure dont works on 2005) and need .net 4
but like i say, need some help to make code looks and works better ( no idea how to pass vars from that weird voids things, so sending vars to textboxs and reading from there... is crazy)
only condition is, when is done, must be release for free
15-06-13
totfliega2007
Re: Plus Auto Notice(Sample + Source)
woks now with real item name :)
btw programm was crash after i make + on devilspirit ;)
thx for thats program
and sry for my shit english ^^
15-06-13
elitebi
Re: Plus Auto Notice(Sample + Source)
when I write IP/Port/version and login, I get this message "The version is incorrect, please restart the programm !" and version is correct!
15-06-13
totfliega2007
Re: Plus Auto Notice(Sample + Source)
ya but it work
u can login
just ignore thies mesage^^
15-06-13
lemoniscool
Re: Plus Auto Notice(Sample + Source)
nice release, but you should make the Notice.exe keep the information we enter (for example useing an ini file or the registry)
15-06-13
fuddreckers2
Re: Plus Auto Notice(Sample + Source)
Hello guys , i have little problem
When i Press " Connect to server " in the program
it gives me error says " The version is incorrect, please restart the programm ! "
I Checked the version and the Port of the client and its all right , nothing wrong ... i made everything correctly
so if anyone know the solution please tell me :)
15-06-13
totfliega2007
Re: Plus Auto Notice(Sample + Source)
ya but it work
u can login
just ignore thies mesage^^
16-06-13
fuddreckers2
Re: Plus Auto Notice(Sample + Source)
very usefull
16-06-13
totfliega2007
Re: Plus Auto Notice(Sample + Source)
i have change on _RefObjCommon the table objname128 to real name and on prozedur i change from select @iname = Codename128 to select @iname = ObjName128
If you are calling yourself as [Dev] you should be able to do that.
16-06-13
fuddreckers2
Re: Plus Auto Notice(Sample + Source)
Quote:
Originally Posted by RevoLand
If you are calling yourself as [Dev] you should be able to do that.
hhhhhhhhhhhhhhhh nvm fix
17-06-13
lemoniscool
1 Attachment(s)
Re: Plus Auto Notice(Sample + Source)
for everyone that wants to change code name into the real item name ..
copy the lines for all items from textdata_equip&skill.txt then remove everything but the Name code name (SN_ITEM_BLABLA) and the real name, after that remove the SN_ from name code names and then seperate them with one tab. after that copy it all to a database named SRO_VT_SHARD.sbo._ItemName (create that table with 2 columns first one named CodeName128 varchar and the other one named Name also varchar)
after that all you have to do is change the query inside _AddLogItem:
PHP Code:
select @iname = Name from SRO_VT_SHARD.dbo._ItemName where CodeName128 in(select CodeName128 from SRO_VT_SHARD.dbo._RefObjCommon where id = @iid)
for everyone that wants to change code name into the real item name ..
copy the lines for all items from textdata_equip&skill.txt then remove everything but the Name code name (SN_ITEM_BLABLA) and the real name, after that remove the SN_ from name code names and then seperate them with one tab. after that copy it all to a database named SRO_VT_SHARD.sbo._ItemName (create that table with 2 columns first one named CodeName128 varchar and the other one named Name also varchar)
after that all you have to do is change the query inside _AddLogItem:
PHP Code:
select @iname = Name from SRO_VT_SHARD.dbo._ItemName where CodeName128 in(select CodeName128 from SRO_VT_SHARD.dbo._RefObjCommon where id = @iid)
Share with me your insert PlusNotice line please :)
17-06-13
Showtek
Re: Plus Auto Notice(Sample + Source)
btw, notice.exe sometimes crashing for no eason.
17-06-13
herolord46
Re: Plus Auto Notice(Sample + Source)
any one make tutorial how to use ? please. :(
18-06-13
skerdikas
Re: Plus Auto Notice(Sample + Source)
well cannot login with any char bcuz it always writes
The version is incorrect, please restart the programm !
and gateway server writes down when i try 2 connect FRAMEWORKMSG_IMAGE_BASED_USER_VALIDATE_REQ Failed, No Registered CertParam!!
19-06-13
PX2000
Re: Plus Auto Notice(Sample + Source)
@Comandante
About the client version can you make it auto read the valid version for client in _ModuleVersion (Account DB)?
Anyone knows the operation of plussing FAIL?
19-06-13
dizzyroad
Re: Plus Auto Notice(Sample + Source)
any one do for me a Favour Notice Write in my game in PLUS(+) 1 and PLUS(+)2 +++ Iwant it to write only from 11 to 21 Please Answer for my Question fast and Plusnotice write The version is incorrect , please resatrt
19-06-13
elitebi
Re: Plus Auto Notice(Sample + Source)
anyone had this issue? it says Select your Char now ! but select char list is clean and it doesn't show any chars.