Since Silkroad Section is Dead i'll Release something good
today i was searching on my DB
i found a good system when you kill a player for the first time you will get silk + arena coins
and for 2nd time only arena...etc
if you killed the same player 5 times you have to wait 3 hours before killing him again
also it checks if the user is the same IP
here's the system
Tables
Code:
USE [SRO_VT_SHARDLOG]GO
/****** Object: Table [dbo].[_Check] Script Date: 25/07/2014 10:14:09 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[_Check](
[ID] [int] IDENTITY(1,1) NOT NULL,
[KilledCharID] [int] NOT NULL,
[FromCharID] [int] NOT NULL,
[Times] [tinyint] NOT NULL,
[StartDate] [smalldatetime] NOT NULL,
[EndDate] [smalldatetime] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[_Check] ADD CONSTRAINT [DF__Check_Times] DEFAULT ((1)) FOR [Times]
GO
ALTER TABLE [dbo].[_Check] ADD CONSTRAINT [DF__Check_StartDate] DEFAULT (getdate()) FOR [StartDate]
GO
ALTER TABLE [dbo].[_Check] ADD CONSTRAINT [DF__Check_EndDate] DEFAULT (dateadd(hour,(6),getdate())) FOR [EndDate]
GO
Code:
USE [SRO_VT_SHARDLOG]GO
/****** Object: Table [dbo].[_IPLogs] Script Date: 25/07/2014 10:14:50 PM ******/
SET ANSI_NULLS ON
GO
Dont use it in query just open procedure and put this code in the end of it
Code:
DECLARE @DyniP VARCHAR(12)
DECLARE @CoSID int
DECLARE @CoSlevel TINYINT
DECLARE @Aha INT
DECLARE @petOption tinyint
DECLARE @CharName Varchar(64)
DECLARE @JiD int
DECLARE @CharLevel tinyint = (SELECT CurLevel from SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
IF @eventID = 4)
BEGIN
SELECT @CharName = CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID
exec @DyniP = SRO_VT_ACCOUNT.dbo.split_ip @data2
INSERT INTO _IPLogs (CharID,Charname,IP,[Date]) VALUES @CharID, @CharName, @DyniP, GETDATE())
END
IF @eventID = 6)
BEGIN
DELETE FROM _IPLogs WHERE CharID = @CharID
END
IF @eventID = 19 AND @desc like '%My: Robber%' OR @eventID = 19 AND @desc like '%My: Trader%' OR @eventID = 19 AND @desc like '%My: Hunter%')
EXEC KillSystem @CharLevel, @desc
26-07-14
JairValerio
Re: Since Silkroad Section is Dead i'll Release something good
Kill job ?
26-07-14
POWEREDSHELL
Re: Since Silkroad Section is Dead i'll Release something good
yeah only JOB
26-07-14
MissinGDeaTh
Re: Since Silkroad Section is Dead i'll Release something good
any one tested it yet ?
26-07-14
xaviar
Re: Since Silkroad Section is Dead i'll Release something good
thank you i will test it.
26-07-14
dafuq99
Re: Since Silkroad Section is Dead i'll Release something good
iwant to make thes script working only at 1 area and change 3hours to 24 hours
26-07-14
lemoniscool
Re: Since Silkroad Section is Dead i'll Release something good
Quote:
Originally Posted by dafuq99
iwant to make thes script working only at 1 area and change 3hours to 24 hours
idk what you meant with "only at 1 arena" but this will make the player wait 24 hours instead of 3 hours:
Code:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[KillSystem] Script Date: 25/07/2014 9:55:54 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[KillSystem]
@CharID INT,
@CharLevel SMALLINT,
@desc varchar(128)
AS
SET NOCOUNT ON
DECLARE @JiD int = (SELECT UserJID FROM SRO_VT_SHARD.dbo.[_User] WHERE CharID = @CharID)
DECLARE @IP1 VARCHAR(12) = (SELECT IP FROM dbo.[_IPLogs] WHERE CharID = @CharID)
DECLARE @IP2 VARCHAR(12)
DECLARE @CharName VARCHAR(64)
DECLARE @CharName1 varchar(64) = (SELECT CharName16 from SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
DECLARE @CharID1 INT
DECLARE @Times TINYINT
DECLARE @Check smallint
DECLARE @Player2 smallint
DECLARE @Contribution tinyint
DECLARE @return tinyint
DECLARE @account varchar(100)
DECLARE @EndDate SMALLDATETIME
IF (@IP1 != @IP2 AND @Check <= 10)
BEGIN
--------------------------------------------------------------
IF (NOT EXISTS(SELECT KilledCharID, FromCharID FROM _Check WHERE KilledCharID = @CharID AND FromCharID = @CharID1))
INSERT INTO dbo.[_Check]
( KilledCharID ,
FromCharID ,
Times
)
VALUES ( @CharID , -- KilledCharID - int
@CharID1 , -- FromCharID - int
0 -- Times - tinyint
)
IF (NOT EXISTS(SELECT JID FROM SRO_VT_ACCOUNT.dbo.SK_Silk WHERE JID = @JiD))
INSERT INTO SRO_VT_ACCOUNT.dbo.SK_Silk
( JID ,
silk_own ,
silk_gift ,
silk_point
)
VALUES ( @JiD , -- JID - int
0 , -- silk_own - int
0 , -- silk_gift - int
0 -- silk_point - int
)
IF (NOT EXISTS(SELECT CHarID from _Contribution WHERE CharID = @CharID))
INSERT INTO _Contribution (CharID, Contribution) VALUES @CharID, 0)
--------------------------------------------------------------
SELECT @Times = Times FROM dbo.[_Check] WHERE KilledCharID = @CharID AND FromCharID = @CharID1
IF @Times < 5)
BEGIN
UPDATE dbo.[_Check] SET Times = Times+1, EndDate = dateadd(hour, +24, getdate()) WHERE KilledCharID = @CharID AND FromCharID = @CharID1
EXEC [SRO_VT_ACCOUNT].[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @userID = @id, @PkgID = NULL, @NumSilk = 2, @price = NULL
UPDATE _Contribution SET Contribution = Contribution + 1 WHERE CHarID = @CharID
SELECT @Contribution = Contribution from _Contribution WHERE CharID = @CharID
IF @Contribution = 3)
BEGIN
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN] @Charname = @CharName1, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 1, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
IF @return <= 0)
BEGIN
SELECT @account = AccountID from SRO_VT_SHARD.dbo._AccountJID WHERE JID = @JiD
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN_CHEST] @account_name = @account, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 1, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
--UPDATE SRO_VT_SHARD.dbo._CharTrijob SET Exp = + 20 WHERE CharID = @CharID
END
ELSE IF @Times = 5)
BEGIN
SELECT @EndDate = EndDate FROM dbo.[_Check] WHERE FromCharID = @CharID1 AND KilledCharID = @CharID
IF @EndDate <= GETDATE())
BEGIN
UPDATE dbo.[_Check] SET Times = 1 WHERE KilledCharID = @CharID AND FromCharID = @CharID
EXEC [SRO_VT_ACCOUNT].[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @userID = @id, @PkgID = NULL, @NumSilk = 2, @price = NULL
UPDATE _Contribution SET Contribution = Contribution + 1 WHERE CHarID = @CharID
SELECT @Contribution = Contribution from _Contribution WHERE CharID = @CharID
IF @Contribution = 3)
BEGIN
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN] @Charname = @CharName1, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 5, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
IF @return <= 0)
BEGIN
SELECT @account = AccountID from SRO_VT_SHARD.dbo._AccountJID WHERE JID = @JiD
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN_CHEST] @account_name = @account, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 5, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
UPDATE SRO_VT_SHARD.dbo._CharTrijob SET Exp = + 20 WHERE CharID = @CharID
END
END
END
btw quite some nice release, but you forgot to mention that this procedure is never called anywhere and thus you will have to alter _AddLogChar procedure to call it ^^ its event id 19 or 20 .. forgot which one was for kill and which one for died
also, this does not only count for job pvp kills, from what i can see it will count every kill, even murder
26-07-14
ilowe
Re: Since Silkroad Section is Dead i'll Release something good
_AddLogChar What to do?
this way does not give you anything ?
26-07-14
lemoniscool
Re: Since Silkroad Section is Dead i'll Release something good
Quote:
Originally Posted by lemoniscool
btw quite some nice release, but you forgot to mention that this procedure is never called anywhere and thus you will have to alter _AddLogChar procedure to call it ^^ its event id 19 or 20 .. forgot which one was for kill and which one for died
@ilowe: please read the thread before posting .. i already said what to do in _AddLogChar ...
26-07-14
POWEREDSHELL
Re: Since Silkroad Section is Dead i'll Release something good
Edited First Post
Thanks to Lemoniscool for remind me :):
26-07-14
ilowe
Re: Since Silkroad Section is Dead i'll Release something good
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 42
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 46
Incorrect syntax near '@CharID'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 49
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 53
Incorrect syntax near ')'.
27-07-14
POWEREDSHELL
Re: Since Silkroad Section is Dead i'll Release something good
Quote:
Originally Posted by ilowe
Spoiler:
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 42
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 46
Incorrect syntax near '@CharID'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 49
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 53
Incorrect syntax near ')'.
you deleted everything in _AddLogChar ??
Add this in the end OF _AddLogChar Dont edit anything
27-07-14
ilowe
Re: Since Silkroad Section is Dead i'll Release something good
don't delete
I added at the end of his
27-07-14
dafuq99
Re: Since Silkroad Section is Dead i'll Release something good
Quote:
Originally Posted by lemoniscool
idk what you meant with "only at 1 arena" but this will make the player wait 24 hours instead of 3 hours:
Code:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[KillSystem] Script Date: 25/07/2014 9:55:54 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[KillSystem]
@CharID INT,
@CharLevel SMALLINT,
@desc varchar(128)
AS
SET NOCOUNT ON
DECLARE @JiD int = (SELECT UserJID FROM SRO_VT_SHARD.dbo.[_User] WHERE CharID = @CharID)
DECLARE @IP1 VARCHAR(12) = (SELECT IP FROM dbo.[_IPLogs] WHERE CharID = @CharID)
DECLARE @IP2 VARCHAR(12)
DECLARE @CharName VARCHAR(64)
DECLARE @CharName1 varchar(64) = (SELECT CharName16 from SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
DECLARE @CharID1 INT
DECLARE @Times TINYINT
DECLARE @Check smallint
DECLARE @Player2 smallint
DECLARE @Contribution tinyint
DECLARE @return tinyint
DECLARE @account varchar(100)
DECLARE @EndDate SMALLDATETIME
IF (@IP1 != @IP2 AND @Check <= 10)
BEGIN
--------------------------------------------------------------
IF (NOT EXISTS(SELECT KilledCharID, FromCharID FROM _Check WHERE KilledCharID = @CharID AND FromCharID = @CharID1))
INSERT INTO dbo.[_Check]
( KilledCharID ,
FromCharID ,
Times
)
VALUES ( @CharID , -- KilledCharID - int
@CharID1 , -- FromCharID - int
0 -- Times - tinyint
)
IF (NOT EXISTS(SELECT JID FROM SRO_VT_ACCOUNT.dbo.SK_Silk WHERE JID = @JiD))
INSERT INTO SRO_VT_ACCOUNT.dbo.SK_Silk
( JID ,
silk_own ,
silk_gift ,
silk_point
)
VALUES ( @JiD , -- JID - int
0 , -- silk_own - int
0 , -- silk_gift - int
0 -- silk_point - int
)
IF (NOT EXISTS(SELECT CHarID from _Contribution WHERE CharID = @CharID))
INSERT INTO _Contribution (CharID, Contribution) VALUES @CharID, 0)
--------------------------------------------------------------
SELECT @Times = Times FROM dbo.[_Check] WHERE KilledCharID = @CharID AND FromCharID = @CharID1
IF @Times < 5)
BEGIN
UPDATE dbo.[_Check] SET Times = Times+1, EndDate = dateadd(hour, +24, getdate()) WHERE KilledCharID = @CharID AND FromCharID = @CharID1
EXEC [SRO_VT_ACCOUNT].[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @userID = @id, @PkgID = NULL, @NumSilk = 2, @price = NULL
UPDATE _Contribution SET Contribution = Contribution + 1 WHERE CHarID = @CharID
SELECT @Contribution = Contribution from _Contribution WHERE CharID = @CharID
IF @Contribution = 3)
BEGIN
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN] @Charname = @CharName1, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 1, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
IF @return <= 0)
BEGIN
SELECT @account = AccountID from SRO_VT_SHARD.dbo._AccountJID WHERE JID = @JiD
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN_CHEST] @account_name = @account, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 1, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
--UPDATE SRO_VT_SHARD.dbo._CharTrijob SET Exp = + 20 WHERE CharID = @CharID
END
ELSE IF @Times = 5)
BEGIN
SELECT @EndDate = EndDate FROM dbo.[_Check] WHERE FromCharID = @CharID1 AND KilledCharID = @CharID
IF @EndDate <= GETDATE())
BEGIN
UPDATE dbo.[_Check] SET Times = 1 WHERE KilledCharID = @CharID AND FromCharID = @CharID
EXEC [SRO_VT_ACCOUNT].[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @userID = @id, @PkgID = NULL, @NumSilk = 2, @price = NULL
UPDATE _Contribution SET Contribution = Contribution + 1 WHERE CHarID = @CharID
SELECT @Contribution = Contribution from _Contribution WHERE CharID = @CharID
IF @Contribution = 3)
BEGIN
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN] @Charname = @CharName1, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 5, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
IF @return <= 0)
BEGIN
SELECT @account = AccountID from SRO_VT_SHARD.dbo._AccountJID WHERE JID = @JiD
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN_CHEST] @account_name = @account, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 5, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
UPDATE SRO_VT_SHARD.dbo._CharTrijob SET Exp = + 20 WHERE CharID = @CharID
END
END
END
btw quite some nice release, but you forgot to mention that this procedure is never called anywhere and thus you will have to alter _AddLogChar procedure to call it ^^ its event id 19 or 20 .. forgot which one was for kill and which one for died
also, this does not only count for job pvp kills, from what i can see it will count every kill, even murder
Thanks
btw i want to modfiy the amonut of silk
- - - Updated - - -
Quote:
Originally Posted by lemoniscool
idk what you meant with "only at 1 arena" but this will make the player wait 24 hours instead of 3 hours:
Code:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[KillSystem] Script Date: 25/07/2014 9:55:54 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[KillSystem]
@CharID INT,
@CharLevel SMALLINT,
@desc varchar(128)
AS
SET NOCOUNT ON
DECLARE @JiD int = (SELECT UserJID FROM SRO_VT_SHARD.dbo.[_User] WHERE CharID = @CharID)
DECLARE @IP1 VARCHAR(12) = (SELECT IP FROM dbo.[_IPLogs] WHERE CharID = @CharID)
DECLARE @IP2 VARCHAR(12)
DECLARE @CharName VARCHAR(64)
DECLARE @CharName1 varchar(64) = (SELECT CharName16 from SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
DECLARE @CharID1 INT
DECLARE @Times TINYINT
DECLARE @Check smallint
DECLARE @Player2 smallint
DECLARE @Contribution tinyint
DECLARE @return tinyint
DECLARE @account varchar(100)
DECLARE @EndDate SMALLDATETIME
IF (@IP1 != @IP2 AND @Check <= 10)
BEGIN
--------------------------------------------------------------
IF (NOT EXISTS(SELECT KilledCharID, FromCharID FROM _Check WHERE KilledCharID = @CharID AND FromCharID = @CharID1))
INSERT INTO dbo.[_Check]
( KilledCharID ,
FromCharID ,
Times
)
VALUES ( @CharID , -- KilledCharID - int
@CharID1 , -- FromCharID - int
0 -- Times - tinyint
)
IF (NOT EXISTS(SELECT JID FROM SRO_VT_ACCOUNT.dbo.SK_Silk WHERE JID = @JiD))
INSERT INTO SRO_VT_ACCOUNT.dbo.SK_Silk
( JID ,
silk_own ,
silk_gift ,
silk_point
)
VALUES ( @JiD , -- JID - int
0 , -- silk_own - int
0 , -- silk_gift - int
0 -- silk_point - int
)
IF (NOT EXISTS(SELECT CHarID from _Contribution WHERE CharID = @CharID))
INSERT INTO _Contribution (CharID, Contribution) VALUES @CharID, 0)
--------------------------------------------------------------
SELECT @Times = Times FROM dbo.[_Check] WHERE KilledCharID = @CharID AND FromCharID = @CharID1
IF @Times < 5)
BEGIN
UPDATE dbo.[_Check] SET Times = Times+1, EndDate = dateadd(hour, +24, getdate()) WHERE KilledCharID = @CharID AND FromCharID = @CharID1
EXEC [SRO_VT_ACCOUNT].[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @userID = @id, @PkgID = NULL, @NumSilk = 2, @price = NULL
UPDATE _Contribution SET Contribution = Contribution + 1 WHERE CHarID = @CharID
SELECT @Contribution = Contribution from _Contribution WHERE CharID = @CharID
IF @Contribution = 3)
BEGIN
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN] @Charname = @CharName1, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 1, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
IF @return <= 0)
BEGIN
SELECT @account = AccountID from SRO_VT_SHARD.dbo._AccountJID WHERE JID = @JiD
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN_CHEST] @account_name = @account, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 1, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
--UPDATE SRO_VT_SHARD.dbo._CharTrijob SET Exp = + 20 WHERE CharID = @CharID
END
ELSE IF @Times = 5)
BEGIN
SELECT @EndDate = EndDate FROM dbo.[_Check] WHERE FromCharID = @CharID1 AND KilledCharID = @CharID
IF @EndDate <= GETDATE())
BEGIN
UPDATE dbo.[_Check] SET Times = 1 WHERE KilledCharID = @CharID AND FromCharID = @CharID
EXEC [SRO_VT_ACCOUNT].[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @userID = @id, @PkgID = NULL, @NumSilk = 2, @price = NULL
UPDATE _Contribution SET Contribution = Contribution + 1 WHERE CHarID = @CharID
SELECT @Contribution = Contribution from _Contribution WHERE CharID = @CharID
IF @Contribution = 3)
BEGIN
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN] @Charname = @CharName1, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 5, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
IF @return <= 0)
BEGIN
SELECT @account = AccountID from SRO_VT_SHARD.dbo._AccountJID WHERE JID = @JiD
EXEC @return = SRO_VT_SHARD.dbo.[_ADD_ITEM_EXTERN_CHEST] @account_name = @account, -- varchar(64)
@codename = 'ITEM_ETC_ARENA_COIN', -- varchar(128)
@data = 5, -- int
@opt_level = 0 -- int
UPDATE _Contribution SET Contribution = 0 WHERE CharID = @CharID
END
UPDATE SRO_VT_SHARD.dbo._CharTrijob SET Exp = + 20 WHERE CharID = @CharID
END
END
END
btw quite some nice release, but you forgot to mention that this procedure is never called anywhere and thus you will have to alter _AddLogChar procedure to call it ^^ its event id 19 or 20 .. forgot which one was for kill and which one for died
also, this does not only count for job pvp kills, from what i can see it will count every kill, even murder
Thanks
btw i want to modfiy the amonut of silk
27-07-14
oXo
Re: Since Silkroad Section is Dead i'll Release something good
I will test this aswell, thanks.
27-07-14
POWEREDSHELL
Re: Since Silkroad Section is Dead i'll Release something good
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogChar] Script Date: 7/29/2014 6:01:45 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_AddLogChar] @CharID int, @eventID tinyint, @data1 int, @data2 int,
@strPos varchar(64), @desc varchar(128)
as
declare @Len_pos int
declare @Len_desc int
set @Len_pos = len(@strPos)
set @Len_desc = len @desc)
if @Len_pos > 0 and @Len_desc > 0)
begin
insert _LogEventChar values @CharID, GetDate(), @eventID, @data1, @data2, @strPos, @desc)
end
else if @Len_pos > 0 and @Len_desc = 0)
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values @CharID, GetDate(), @eventID, @data1, @data2, @strPos)
end
else if @Len_pos = 0 and @Len_desc > 0)
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values @CharID, GetDate(), @eventID, @data1, @data2, @desc)
end
else
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values @CharID, GetDate(), @eventID, @data1, @data2)
end
--For the new IPLog table
Declare @DyniP varchar(max);
exec @DyniP = SRO_VT_ACCOUNT.dbo.split_ip @data2
INSERT INTO _IPLogs (CharID,Charname,IP,[Date]) VALUES @CharID, (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID) @DyniP,GETDATE())
-- END
-- Banned IP stuff
IF exists (SELECT IP FROM _BannedIPs WHERE IP like @DyniP)
BEGIN
Declare @Charname varchar(max) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
exec SRO_VT_ACCOUNT.dbo._BannPlayerSP @Charname,'usage of a banned IP'
-- END banned IP stuff
END