ИндексCalendarGalleryВъпроси/ОтговориТърсенеРегистрирайте сеВход

За да имате баннер или важна тема се свържете с :DIEL

Share | 
 

 [Release] Anti Dupe Bann [For All Versions]

Предишната тема Следващата тема Go down 
АвторСъобщение
Guest
Гост
avatar


ПисанеЗаглавие: [Release] Anti Dupe Bann [For All Versions]   Вто Фев 15, 2011 8:56 pm

Код:
 
if exists(!@#$%^ * from dbo.sysobjects where type='p' and name='WZ_GetItemSerial')
drop procedure WZ_GetItemSerial
go
CREATE procedure WZ_GetItemSerial
as
BEGIN
DECLARE @ItemSerial int
set nocount on
begin transaction
update GameServerInfo set @ItemSerial = ItemCount = (case when ItemCount < 0x7effffff then ItemCount+1
else 1
end )
if(@@error <> 0)
begin
rollback transaction
!@#$%^-1
end
else
begin
commit transaction
!@#$%^ @ItemSerial
end
END
GO
if exists (!@#$%^ * from dbo.sysobjects where id = object_id(N'[dbo].[trg_CheckSameID]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
drop trigger [dbo].[trg_CheckSameID]
GO
if exists (!@#$%^ * from dbo.sysobjects where id = object_id(N'[dbo].[AllItemsLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AllItemsLog]
GO
if exists (!@#$%^ * from dbo.sysobjects where id = object_id(N'[dbo].[CopyLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CopyLog]
GO
CREATE TABLE [dbo].[AllItemsLog] (
[items_id] [int] IDENTITY (1, 1) NOT NULL ,
[items_type] [binary] (1) NOT NULL ,
[items_serial] [binary] (4) NOT NULL ,
[items_acid] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[CopyLog] (
[copy_id] [int] IDENTITY (1, 1) NOT NULL ,
[copy_acid] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[copy_whdata] [binary] (1200) NOT NULL ,
[copy_date] [datetime] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AllItemsLog] ADD
CONSTRAINT [DF_CT_ITEM_item] DEFAULT (0) FOR [items_type],
CONSTRAINT [DF_CT_ITEM_itemid] DEFAULT (0) FOR [items_serial],
CONSTRAINT [DF_CT_ITEM_itemrole] DEFAULT ('') FOR [items_acid]
GO
CREATE INDEX [IX_CT_ITEM] ON [dbo].[AllItemsLog]([items_type], [items_serial]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CopyLog] ADD
CONSTRAINT [DF_CopyLog_copy_date] DEFAULT (getdate()) FOR [copy_date]
GO

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE TRIGGER [dbo].[trg_CheckSameID] ON [dbo].[character]
FOR UPDATE
AS
BEGIN
IF UPDATE(inventory)
BEGIN
SET NOCOUNT ON
DECLARE
@wh_acid varchar(10),
@wh_data binary(1200),
@wh_type binary(1),
@wh_serial binary(4),
@cr_user varchar(10),
@cr_acid varchar(10),
@cr_data binary(760),
@cr_type binary(1),
@cr_serial binary(4),
@al_acid varchar(10),
@j int,
@k int,
@find bit
!@#$%^ @cr_acid=i.accountid,
@cr_data=i.inventory
FROM inserted i
SET @j=0
SET @find=0
WHILE @j<76 AND @cr_data IS NOT NULL
BEGIN
SET @cr_type=SUBSTRING(@cr_data,@j*10+1,1)
SET @cr_serial=SUBSTRING(@cr_data,@j*10+4,4)
IF @cr_type<>0xFF AND @cr_serial<>0x00000000
BEGIN
!@#$%^ @al_acid=items_acid FROM allitemslog WHERE items_type=@cr_type AND items_serial=@cr_serial

IF @al_acid IS NULL
INSERT INTO allitemslog (items_type,items_serial,items_acid) VALUES (@cr_type,@cr_serial,@cr_acid)
ELSE
BEGIN
UPDATE allitemslog SET items_acid=@cr_acid WHERE items_type=@cr_type AND items_serial=@cr_serial

!@#$%^ @wh_data=items FROM warehouse WHERE accountid=@al_acid
SET @k=0
WHILE @k<120 AND @wh_data IS NOT NULL
BEGIN
SET @wh_type=SUBSTRING(@wh_data,@k*10+1,1)
SET @wh_serial=SUBSTRING(@wh_data,@k*10+4,4)
IF @wh_type=@cr_type AND @wh_serial=@cr_serial
SET @find=1
SET @k=@k+1
END
END
END
SET @j=@j+1
END
IF @find=1
BEGIN
INSERT INTO copylog (copy_whdata,copy_acid,copy_date) VALUES (@wh_data,@al_acid,getdate())
-- this is wer u can add more punishment like ban or lock characters
UPDATE Character SET CtlCode=1 WHERE accountid=@al_acid
END
SET NOCOUNT OFF
END
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
DECLARE @al_acid char(50)
set @al_acid = 'ASUS'
UPDATE Character SET CtlCode=1 WHERE accountid=@al_acid
go
!@#$%^ * from AllItemsLog
!@#$%^ * from CopyLog



За всички версии става.Успех!


Последната промяна е направена от jordan4o на Нед Фев 27, 2011 5:11 pm; мнението е било променяно общо 1 път
Върнете се в началото Go down
aFT3rSh0Ck
Level 1
Level 1
avatar

Брой мнения : 20
Join date : 31.01.2011

ПисанеЗаглавие: Re: [Release] Anti Dupe Bann [For All Versions]   Сря Фев 16, 2011 1:45 pm

добра работа
Върнете се в началото Go down
ShAd0w
Level 2
Level 2
avatar

Брой мнения : 27
Birthday : 19.07.1995
Join date : 22.12.2009
Age : 22
Местожителство : Пловдив

ПисанеЗаглавие: Re: [Release] Anti Dupe Bann [For All Versions]   Съб Фев 19, 2011 7:05 am

това как се прави ако може да попитам 29
Върнете се в началото Go down
http://vavilon-mu.malware-site.www
????
Гост
avatar


ПисанеЗаглавие: Re: [Release] Anti Dupe Bann [For All Versions]   Вто Фев 22, 2011 6:38 pm

има по добър скрипт :) от този
Върнете се в началото Go down
Cezar
Level 3
Level 3
avatar

Брой мнения : 53
Birthday : 27.01.1992
Join date : 08.06.2010
Age : 25
Местожителство : Blagoevgrad

ПисанеЗаглавие: Re: [Release] Anti Dupe Bann [For All Versions]   Нед Фев 27, 2011 2:32 pm

Сподели го KR373N ще е от полза за много хора :)
Върнете се в началото Go down
http://facectrl.omgforum.net
????
Гост
avatar


ПисанеЗаглавие: Re: [Release] Anti Dupe Bann [For All Versions]   Нед Фев 27, 2011 5:09 pm

Код:

if exists (!@#$%^ * from dbo.sysobjects where id = object_id(N'[dbo].[trg_CheckSameID]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
drop trigger [dbo].[trg_CheckSameID]
GO

if exists (!@#$%^ * from dbo.sysobjects where id = object_id(N'[dbo].[AllItemsLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AllItemsLog]
GO

if exists (!@#$%^ * from dbo.sysobjects where id = object_id(N'[dbo].[CopyLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CopyLog]
GO

CREATE TABLE [dbo].[AllItemsLog] (
[items_id] [int] IDENTITY (1, 1) NOT NULL ,
[items_type] [binary] (1) NOT NULL ,
[items_serial] [binary] (4) NOT NULL ,
[items_acid] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[CopyLog] (
[copy_id] [int] IDENTITY (1, 1) NOT NULL ,
[copy_acid] [varchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[copy_whdata] [binary] (1200) NOT NULL ,
[copy_date] [datetime] NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[AllItemsLog] ADD
CONSTRAINT [DF_CT_ITEM_item] DEFAULT (0) FOR [items_type],
CONSTRAINT [DF_CT_ITEM_itemid] DEFAULT (0) FOR [items_serial],
CONSTRAINT [DF_CT_ITEM_itemrole] DEFAULT ('\') FOR [items_acid]
GO

CREATE INDEX [IX_CT_ITEM] ON [dbo].[AllItemsLog]([items_type], [items_serial]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[CopyLog] ADD
CONSTRAINT [DF_CopyLog_copy_date] DEFAULT (getdate()) FOR [copy_date]
GO


SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE TRIGGER [dbo].[trg_CheckSameID] ON [dbo].[character]
FOR UPDATE
AS
BEGIN
IF UPDATE(inventory)
BEGIN
SET NOCOUNT ON
DECLARE
@wh_acid varchar(10),
@wh_data binary(1200),
@wh_type binary(1),
@wh_serial binary(4),

@cr_user varchar(10),
@cr_acid varchar(10),
@cr_data binary(760),
@cr_type binary(1),
@cr_serial binary(4),

@al_acid varchar(10),
@j int,
@k int,
@find bit

!@#$%^ @cr_acid=i.accountid,
@cr_data=i.inventory
FROM inserted i

SET @j=0
SET @find=0

WHILE @j<76 AND @cr_data IS NOT NULL
BEGIN
SET @cr_type=SUBSTRING(@cr_data,@j*10+1,1)
SET @cr_serial=SUBSTRING(@cr_data,@j*10+4,4)
IF @cr_type<>0xFF AND @cr_serial<>0x00000000
BEGIN
!@#$%^ @al_acid=items_acid FROM allitemslog WHERE items_type=@cr_type AND items_serial=@cr_serial


IF @al_acid IS NULL
INSERT INTO allitemslog (items_type,items_serial,items_acid) VALUES (@cr_type,@cr_serial,@cr_acid)
ELSE
BEGIN
UPDATE allitemslog SET items_acid=@cr_acid WHERE items_type=@cr_type AND items_serial=@cr_serial


!@#$%^ @wh_data=items FROM warehouse WHERE accountid=@al_acid

SET @k=0
WHILE @k<120 AND @wh_data IS NOT NULL
BEGIN
SET @wh_type=SUBSTRING(@wh_data,@k*10+1,1)
SET @wh_serial=SUBSTRING(@wh_data,@k*10+4,4)
IF @wh_type=@cr_type AND @wh_serial=@cr_serial
SET @find=1
SET @k=@k+1
END
END
END
SET @j=@j+1
END
IF @find=1
BEGIN
INSERT INTO copylog (copy_whdata,copy_acid,copy_date) VALUES (@wh_data,@al_acid,getdate())
-- this is wer u can add more punishment like ban or lock characters
UPDATE warehouse SET pw=5555,items=null WHERE accountid=@al_acid
END
SET NOCOUNT OFF
END
END


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Върнете се в началото Go down
Sponsored content




ПисанеЗаглавие: Re: [Release] Anti Dupe Bann [For All Versions]   

Върнете се в началото Go down
 
[Release] Anti Dupe Bann [For All Versions]
Предишната тема Следващата тема Върнете се в началото 
Страница 1 от 1
 Similar topics
-
» Malwarebytes Anti-Exploit
» GridinSoft Anti-Ransomware - антивирус, криптовирус защита

Permissions in this forum:Не Можете да отговаряте на темите
 :: .: Mu Online :. :: Releases-
Идете на: