|
You last visited: Today at 08:34
Advertisement
[Release]Plus Auto Notice(Sample + Source)
Discussion on [Release]Plus Auto Notice(Sample + Source) within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
06/12/2013, 18:48
|
#1
|
elite*gold: 0
Join Date: May 2013
Posts: 6
Received Thanks: 13
|
[Release]Plus Auto Notice(Sample + Source)
Hey there,
First of all #DirenGezi, #OccupyTurkey
And then
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
To _AddLogItem procedure in log DB(be sure that you've changed "SRO_VT_SHARD" to your own shard db in procedure + Be sure that you've created a table in log db with PlusNotice name and 3 columns(sent(int DEFAULT VALUE MUST BE 0), message(varchar(150-200), Date(datetime, defaultvalue GetDate() ) )
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 log:
v1.0.1:
-Sql connection issue fixed
v1.0.2:
-added remote connection
v1.0.3:
-empty/old notice spam fixed
v1.0.4:
-Packet sending issue fixed
V1.0.5:
-Manuel gateway port selection
And the download links of source and the sample:
Sample:  Source:
Password: without space
Virustotal:
Hope you enjoy and hope it works for you
|
|
|
06/12/2013, 18:49
|
#2
|
Chat Killer In Duty
elite*gold: 5
Join Date: May 2008
Posts: 16,397
Received Thanks: 6,509
|
#approved
|
|
|
06/12/2013, 19:18
|
#3
|
elite*gold: 200
Join Date: Nov 2008
Posts: 1,263
Received Thanks: 680
|
Thanks, I was waiting for such release 
Btw, you need an notice writer char to use it yea?
|
|
|
06/12/2013, 19:25
|
#4
|
elite*gold: 0
Join Date: May 2013
Posts: 6
Received Thanks: 13
|
Quote:
Originally Posted by flozz
Thanks for me, I was waiting for such release 
Btw, you need an notice writer char to use it yea?
|
Yep, true
|
|
|
06/14/2013, 02:01
|
#5
|
elite*gold: 0
Join Date: Nov 2011
Posts: 173
Received Thanks: 139
|
good job
|
|
|
06/14/2013, 09:05
|
#6
|
elite*gold: 200
Join Date: Nov 2008
Posts: 1,263
Received Thanks: 680
|
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
|
|
|
06/14/2013, 14:46
|
#7
|
elite*gold: 0
Join Date: May 2013
Posts: 6
Received Thanks: 13
|
Quote:
Originally Posted by PlayCreedSRO
good job
|
Thank you.
Quote:
Originally Posted by flozz
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
|
Try now
|
|
|
06/15/2013, 06:18
|
#8
|
elite*gold: 460
Join Date: Jul 2012
Posts: 394
Received Thanks: 272
|
thanks good work
|
|
|
06/18/2013, 13:16
|
#9
|
elite*gold: 0
Join Date: May 2013
Posts: 86
Received Thanks: 34
|
thanks good work #
|
|
|
06/18/2013, 15:00
|
#10
|
elite*gold: 0
Join Date: Nov 2011
Posts: 173
Received Thanks: 139
|
good job
|
|
|
06/20/2013, 15:37
|
#11
|
dotCom
elite*gold: 9842
Join Date: Mar 2009
Posts: 16,856
Received Thanks: 4,683
|
haha they copied my tool 
Can anyone send me the ******** link ??
|
|
|
06/26/2013, 08:53
|
#12
|
elite*gold: 0
Join Date: Aug 2012
Posts: 16
Received Thanks: 1
|
Thank you
|
|
|
06/29/2013, 12:50
|
#13
|
elite*gold: 0
Join Date: Aug 2010
Posts: 146
Received Thanks: 17
|
Can we do it and above +8 ?
|
|
|
06/29/2013, 17:09
|
#14
|
dotCom
elite*gold: 9842
Join Date: Mar 2009
Posts: 16,856
Received Thanks: 4,683
|
Quote:
Originally Posted by onurgs59
Can we do it and above +8 ?
|
Its an Notice Writer not an pimp tool dude, wrong section
|
|
|
06/29/2013, 18:10
|
#15
|
elite*gold: 0
Join Date: Aug 2010
Posts: 146
Received Thanks: 17
|
Quote:
Originally Posted by Devsome
Its an Notice Writer not an pimp tool dude, wrong section
|
I don't understand ?
|
|
|
Similar Threads
|
Auto-notice.
05/31/2013 - Flyff Private Server - 13 Replies
For example, in source of LTD:
In:
void CDPClient::OnJoin( CAr & ar )
//DSystem
CString nick = pMover->GetName();
g_WndMng.PutString( " Bienvenue, " + nick + ", passez un bon moment!", NULL, prj.GetTextColor(TID_ADMIN_ANNOUNCE), CHATSTY_SYSTEM );
Work, but this string don't accept characteres with accents.
|
[Release] vSRO - Auto Notice
03/10/2013 - SRO PServer Guides & Releases - 6 Replies
Auto-notice is a file which sends notices whilst your away, it's pretty self-explanatory, the picture below explains.
http://i46.tinypic.com/w17ald.png
1) - Enter your server IP, Locale and Version, then click "connect to server."
2) Enter you account ID & PW, Login and select your character.
3) Write your notice, and choose the time scale you want the program to send out the notice.
|
auto notice
10/05/2012 - Rappelz Private Server - 0 Replies
auto notice how do I delete
and
How do I change the language of the server
|
All times are GMT +1. The time now is 08:36.
|
|