EskiKnightOnline.net | v.1098 MYKO | 400.000 TL Ödül Havuzu | Official : 14 Haziran 2024 - 22:00 !
Cuceko
Cuceko
Cuceko

[Paylaşım] Item Arama Prosedürü (BANKA & Inventory)

  •         

            

            

            

            

  • HyperFilter | DoS Protection | DDoS Protection | DoS Mitigation | DDoS Mitigation | AntiDoS | AntiDDoS | Proxy Shielding
POGUYAGO Çevrimdışı
7 Haziran 2014
1,424
1
38
28
[HIDE-REPLY]Merhabalar,

Konu başka bir forumdan alıntıdır. İşinize yarayabileceğini düşündüm.

1299,18xx,19xx,20xx,21xx,22xx sürümlerde çalışmaktadır.

Prosedür:

Kod:
-- =============================================
-- Author: SexyReplay
-- Create date: 04/16/2009
-- Description: Find who has X item
-- =============================================
Create procedure [dbo].[FindItems]
@num int,
@mode int
as
if @mode in (1,2)
begin
if @mode = 1 begin if exists (select * from sysobjects where id = object_id(N'found') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table found CREATE TABLE found([StrUserID] [varchar](21) NULL) end
if @mode = 2 begin if exists (select * from sysobjects where id = object_id(N'found') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table found CREATE TABLE found([strAccountID] [varchar](21) NULL) end
declare @item varbinary(4), @i int
set @item = substring(cast(@num as varbinary(4)),4,1)+substring(cast(@num as varbinary(4)),3,1)+substring(cast(@num as varbinary(4)),2,1)+substring(cast(@num as varbinary(4)),1,1)
set @i = 1
if @mode = 1 -- Find X item on all char's
begin
while @i < 401
begin
insert found select struserid from userdata where substring(stritem, @i,4) = @item
set @i = @i + 8
end end else
if @mode = 2 -- Find X item on all inn's
begin
while @i < 1601
begin
insert found select straccountid from warehouse where substring(warehousedata, @i,4) = @item
set @i = @i + 8
end end
select * from found
drop table found
end


Kullanımı:

Kod:
exec finditems 999999995, 1 (Char uzerinde arar)
exec finditems 310310010, 2 (Bankada Arar)


Item numaralarını yazarak kullanabilirsiniz. Aramak istediğiniz itemin kodunu yazmanız yeterli.[/HIDE-REPLY]