[Release] Anti Dupe Ban

KR373N

Well-Known Member
Joined
May 18, 2008
Messages
1,944
Reaction score
445
PHP:
 use muonline
if exists(select * 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
select-1
end
else
begin
commit transaction
select @ItemSerial
end
END
GO
if exists (select * 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 (select * from dbo.sysobjects where id = object_id(N'[dbo].[AllItemsLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AllItemsLog]
GO
if exists (select * 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
SELECT @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
SELECT @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

SELECT @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
select * from AllItemsLog
select * from CopyLog

The Best SQL Script!!
 
Last edited:

Stifi

New Member
Joined
Jun 5, 2008
Messages
175
Reaction score
11
За коя версия е ?
Има ли бъгове ?

#Няма ли да има лаг?
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]
всички итеми да се лагват в база данни ?
и после как се изкарва лога от там
?
 
Last edited:
  • Like
Reactions: imorala

KR373N

Well-Known Member
Joined
May 18, 2008
Messages
1,944
Reaction score
445
за всички версий е няма бъг :)
 
  • Like
Reactions: imorala

Hibernate

New Member
Joined
Dec 2, 2008
Messages
18
Reaction score
0
да наистина,може ли и аз да попитам къде да сложа кода?
 

Gasolincho

Well-Known Member
Joined
May 15, 2008
Messages
682
Reaction score
690
да наистина,може ли и аз да попитам къде да сложа кода?
Code:
use [B][COLOR="Red"]muonline[/COLOR][/B]
if exists(select * from dbo.sysobjects where type='p' and name='WZ_GetItemSerial')
drop procedure WZ_GetItemSerial
 

vesichaa

Active Member
Joined
Aug 17, 2008
Messages
514
Reaction score
148
PHP:
 use muonline
if exists(select * 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
select-1
end
else
begin
commit transaction
select @itemserial
end
end
go
if exists (select * 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 (select * from dbo.sysobjects where id = object_id(n'[dbo].[allitemslog]') and objectproperty(id, n'isusertable') = 1)
drop table [dbo].[allitemslog]
go
if exists (select * 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
select @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
select @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

select @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
select * from allitemslog
select * from copylog

the best sql script!!

Каде се Добавя това ?
 

Slackware

New Member
Joined
Oct 19, 2008
Messages
87
Reaction score
17
Може ли примир ?
Цъкаш на "Start" > All programs > Microsoft SQL Server > Query analizer > Пишеш си SQL Паролата > Влизаш > Цъкаш на MuOnline от ляво в колонката > Слагаш кода който е написан тук и после цъкаш на Зелената стрелка горе в средата ... и мисля, че това е всичко :)
 

vesichaa

Active Member
Joined
Aug 17, 2008
Messages
514
Reaction score
148
Благодаря Отново ми помогна :):yes:
 

Lesh0

New Member
Joined
Apr 22, 2008
Messages
705
Reaction score
89
добро е но съм чувал че товари сървъра !!
 

Damian

Team Member
Joined
Jun 12, 2008
Messages
612
Reaction score
576
Аз съм с подобен скрипт и малко лаги да ви кажа. Ама по добре малко да лаги от колкото секи да си дупи итеми.
 

ludlud

Active Member
Joined
Jun 27, 2008
Messages
917
Reaction score
101
Аз съм с подобен скрипт и малко лаги да ви кажа. Ама по добре малко да лаги от колкото секи да си дупи итеми.
Много лудо товари сървъра .... Няма ли как да се намали лага ?
 

diablo21

Banned
Joined
Sep 9, 2008
Messages
1,052
Reaction score
475
най-добре ползвайте на SCF Dupe Finger v2.0
 

Hogu

New Member
Joined
Oct 29, 2008
Messages
72
Reaction score
7
Много лудо товари сървъра .... Няма ли как да се намали лага ?
Къту си със слаба машина кво сакаш :d
 

ludlud

Active Member
Joined
Jun 27, 2008
Messages
917
Reaction score
101
Братле компа ми е 4 ГБ рам не мисля че съм със слаб комп :)
 

ReSpEc7

Well-Known Member
Joined
Sep 27, 2008
Messages
1,173
Reaction score
259
що си мисля че бачка само на 99б или се заблуждавам
 
Thread starter Similar threads Forum Replies Date
hrisiz [Release] AntiDupe Script Update Releases 1
Mr.Stoyanov [Release] Anti Dupe 99b+ Releases 6
LasTPr0 [Release] Anti-Dupe Script Releases 13
Mortred [Release] Anti Dupe Locked Warehouse Releases 48
noLove [Release] Antihack GameGuard (DLL) Releases 2
noLove [Release] SlineMU Antihack and Website premium Releases 17
DemonuMu [Release] MHP AntiHack MU Full Source Releases 3
DemonuMu [Release] H-Guard Anti-hack System Releases 11
S [Release] Play AntiCheat Releases 0
DemonuMu [Release] MuEMU Anti-Cheat Source Releases 0
DemonuMu [Release] Anti DDoS Guardian 3.4 Cracked Releases 0
DemonuMu [Release] Main 99b + Anti-Hack For Free Releases 15
L [Release] ExTeam Season 4 Ep 6 FULL + Stable AntiCheat, DDos, Customs, New Item Releases 9
D [Release] MuEMU Antihack + Video Guide 97D Releases 9
L [Release] ConnectServer + Anti Syn Flood + Port Change Option Releases 2
L [Release] ZyGuard Antihack Full Releases 8
DemonuMu [Release] MuEMU Anti-Hack For Free Releases 24
DemonuMu [Release] Main 97d+99i Free Anti-Hack Releases 106
DemonuMu [Release] MuOnline Anti-DDoS 2013 Releases 5
D [Release] Anti Hack Server & Client Side (Source Code) Releases 2
D [Release] Codex Anticheat v3 modified Releases 3
L [Release] ZyGuard Free Full MuOnline Antihack Releases 11
L [Release] NSEngine Anti-Cheat Releases 4
Deadman [Release] Anti ddos Guardian Plus Releases 20
P [Release] MuGuard Anti Flood Releases 1
Angerfist [Release] Main 99b + AntiHack Releases 6
ludaka [Release] Anti shadow bug Releases 2
D [Release] Pinkof Anticheat 3.0.3 Releases 12
1 [Release] CheatShield Mu Online Antihack [Server & Client ] Releases 3
Angerfist [Release] Source Code - Dll Hide Main - Write Mem Serial - Anti SendPacket Releases 1
Angerfist [Release] LockSystem - Anti DoS Releases 0
Angerfist [Release] Cheats DB for any Dll Antihack Releases 3
tomas08 [Release] OMEGA Repack - Titan Tech 11.00.35 + Patch 1.04c + Antihack + AutoBackup Releases 3
GTI [Release] Main + AntiHack Releases 71
Toshy [Release] KiwiGuard Anti DDos System Releases 8
L [Release] AntiLag Patch V9 Releases 2
L [Release] ConnectServer + Anti SyN Flood + Port Change Option Releases 8
L [Release] Titans Tech 10.07.65 Season 6 By Antiferna Releases 5
GTI [Release] AntiHacks Releases 35
pafa7a [Release] Pinkof AntiCheats Releases 61
enemysss [Release] Линк за точки (по име) + Anti Proxy Releases 14
Dungeon [Release] AntiHack + main Releases 76
KR373N [Release] AntiHideToolz - Kill Process Hide And Kill Main Releases 4
pafa7a [Release] Repack SCFMT 10.03.96 by Antiferna Releases 8
L [Release] Anti Proxy Script Releases 9
pafa7a [Release] Simply MuOnline Launcher + AntiCheat Releases 32
DarkMaster [Release] 99b Main + AntiHack & 100+ Items Support Releases 20
redfighterxp [Release] MuServer Season3 Episode1 By ANtiHazarD Releases 26
DarkMaster [Release] MuOnline AntiHack DLL Releases 136
ludaka [Release] Main 99b + AntiHack Releases 26

Similar threads