اتفضل و اظبتهولي كله بقا و صلحه و في كدة سيستم عندي مش شغال بتاغ banned ip شيله هو في البروسيدور ده
كود PHP:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogChar] Script Date: 18/02/2016 09:45:37 ص ******/
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
IF(@EventID = 4 OR @EventID = 6)
BEGIN
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
END
declare @curlevel int=(select curlevel from SRO_VT_SHARD.._char where CharID=@CharID)
if @curlevel>=100
if @EventID = '22' and @Data2 > @Data1 and @Data2 between '0' and '90'
begin
exec SRO_VT_SHARDLOG.DBO.[Auto_Equip_Mr.x] @charid,@data2
end
if @EventID in (4,6,9)
begin
update SRO_VT_SHARD.dbo._Items set OptLevel=12 where OptLevel in (13,14,15,16,17)
end
if @EventID in (4,6,9)
begin
update SRO_VT_SHARD.dbo._Char set CurLevel =110 where CurLevel in (111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130)
update SRO_VT_SHARD.dbo._Char set maxlevel =110 where maxLevel in (111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130)
end
IF @EventID = 19 and
(@Desc Like '%My: Robber, Murderer%' -- Pk by Thief
Or @Desc Like '%My: Trader, Murderer%' -- Pk by Trader
Or @Desc Like '%My: Hunter, Murderer%' -- Pk by Hunter
Or @Desc Like '%My: no job, Murderer%') -- Pk by Normal Status
Begin
Execute [dbo].[_MurdererAutoBanned] @CharID
End
if @EventID = '6' and exists (Select * from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID and Contribution >= '2099235' )
begin Exec [dbo].[_JobCoins] @charid , @eventid
end