Go Back   PvP-Kenti > 1298 Paylaşımları > 1298 Prosedürler / Kodlar

1298 Prosedürler / Kodlar Veritabanı için prosedür türlerini paylaşabileceğiniz bölüm. ( MSSQL )

Forum Reklamları
468x60

Cevapla
 
LinkBack Seçenekler Stil
Alt 28-07-2010, 18:24   #1 (permalink)
Bağımlı Üye


 
Pasali - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Jan 2010
Mesajlar: 330
Oyun Parası: $85986
Teşekkür : 320
42 Konusuna 1.344 teşekkür almış
P-K Puan: 80
Tecrübe Puanı: 13
Pasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud of
Standart ExBaşlangıç İtem Değiştirme Prosedürü - Çok Kolay - Sorunlar Fix - Güncellendi


İlk önce bu prosedür daha önce paylaşıldı fakat eksikti ve q.a.'da hata veriyordu biz bunu düzelttik gerçi bir çok database var bu prosedür fakat bilen kişi sayısı az oysa en basit başlangıç item değiştirme yöntemi denilebilir.(ve sorunsuz)


1.Girilecek Kod :
Kod:
     CREATE procedure ITEMLERI_BUL
@StrUserID varchar(30)
AS
-- By  | PvP-KenTi
DECLARE
@length int, -- stritem uzunlugu
@i int, -- item'in stritem deki yeri
@dwid int, 
@dur int,
@duar int,
@StackSize1 int,
@Sira int,
@Row int,
@name varchar(100),
@extname varchar(100),
@ext int


    set @i = 14*0+1
    set @length = 401

select @row=count(*) from userdata where struserid=@StrUserID

delete from itemler where struserid=@StrUserID

if @row>0 
  begin

WHILE @i < @length
Begin

Select @dwid=cast(cast(substring(cast(substring(strItem, @i,4) as varbinary(4)), 4, 
1)+substring(cast(substring(strItem, @i,4) as varbinary(4)), 3, 1)+substring(cast(substring(strItem, @i,4) as 
varbinary(4)), 2, 1)+substring(cast(substring(strItem, @i,4) as varbinary(4)), 1, 1) as varbinary(4)) as int(4)),
@dur = cast(cast(cast( substring(strItem, @i+5, 1) as varbinary(1))+cast(substring(strItem, @i+4, 1) as 
varbinary(1)) as varbinary(2)) as smallint),
@StackSize1 = cast(cast(cast( substring(strItem, @i+7, 1) as varbinary(1))+cast(substring(strItem, @i+6, 1) as 
varbinary(1)) as varbinary(2)) as smallint),
        @StrUserID = strUserID
        From UserData
        Where strUserID = @StrUserID




insert into itemler (dwid,stacksize,durability,struserid,sira,itembasicname,extname) 
values(@dwid,@stacksize1,@dur,@StrUserID,(@i-1) / 8,@extname,@name )

set @i=@i+8

end
end

GO
2.Girilecek Kod :
Kod:
     CREATE procedure ITEMLERI_ENCODE
@StrUserID varchar(30)
AS
-- By  | PvP-KenTi
DECLARE
@length int, -- stritem uzunlugu
@row int, -- yerine göre deisior.
@i int, -- item'in stritem deki yeri
@dwid int, -- dwid
@pos int,
@dur int,
@dur1 int,
@ext int,
@StackSize1 int,
@strName varchar(30),
@strExtName varchar(30),
@Cdwid varbinary(4),
@cdur varchar(2),
@Source tinyint,
@NEWdwid int,
@StackSize int,
@cstack varchar(2),
@sira int

    set @sira=0
    set @i = 14*0
    set @length = 401

select @row=count( * ) from userdata where struserid=@StrUserID

if @row>0 
  begin


Select @dwid=dwid,
@dur = durability,
@StackSize1 = stacksize,
        @StrUserID = strUserID
        From itemler
        Where strUserID = @StrUserID and sira=@sira

    Set @Cdwid = Substring(cast(@dwid as varbinary(4)), 4, 1) + Substring(cast(@dwid as varbinary(4)), 3, 1) + 
Substring(cast(@dwid as varbinary(4)), 2, 1) + Substring(cast(@dwid as varbinary(4)), 1, 1)
    Set @Cdur = cast(Substring(cast(@dur as varbinary(2)), 2, 1)+Substring(cast(@dur as varbinary(2)), 1, 1) as 
varchar(2))
    Set @Cstack = cast(Substring(cast(@StackSize1 as varbinary(2)), 2, 1)+Substring(cast(@StackSize1 as 
varbinary(2)), 1, 1) as varchar(2))


    update UserData set strItem = cast(cast(cast(@Cdwid as varchar(4)) + @Cdur + @Cstack as varchar(8))   as 
binary(400)) where strUserID = @strUserID


set @i=@i+8
set @sira=@sira+1



WHILE @sira < 50
Begin

Select @dwid=dwid,
@dur = durability,
@StackSize1 = stacksize,
        @StrUserID = strUserID
        From itemler
        Where strUserID = @StrUserID and sira=@sira

    Set @Cdwid = Substring(cast(@dwid as varbinary(4)), 4, 1) + Substring(cast(@dwid as varbinary(4)), 3, 1) + 
Substring(cast(@dwid as varbinary(4)), 2, 1) + Substring(cast(@dwid as varbinary(4)), 1, 1)
    Set @Cdur = cast(Substring(cast(@dur as varbinary(2)), 2, 1)+Substring(cast(@dur as varbinary(2)), 1, 1) as 
varchar(2))
    Set @Cstack = cast(Substring(cast(@StackSize1 as varbinary(2)), 2, 1)+Substring(cast(@StackSize1 as 
varbinary(2)), 1, 1) as varchar(2))


    update UserData set strItem = cast( substring(strItem, 1, @i) + cast(cast(@Cdwid as varchar(4)) + @Cdur + 
@Cstack as varchar(8)) + substring(strItem, @i+8, 401-@i) as binary(400)) where strUserID = @strUserID


set @i=@i+8
set @sira=@sira+1

end
end
delete from itemler
GO
Kullanımı :

Kod:
 -- By  | PvP-KenTi
UPDATE BASLANGIC
SET stritem = (select strItem
FROM USERDATA
WHERE StrUserID = '***** Karakter Adı *****')
WHERE Class = '***** Class Numarası *****' 
 ***** Karakter Adı ***** yazan  yere itemlerin bulunduğu karakterin adını yazınız.
***** Class Numarası ***** yazan yere hangi classın başlangıç  itemi olmasını istiyorsanız o classın numarasını giriniz.
Class Numaraları :
1 = Warrior
2 = Rogue
3 = Mage
4 = Priest

Örneğin :

Kod:
-- By  | PvP-KenTi
UPDATE BASLANGIC
SET stritem = (select strItem
FROM USERDATA
WHERE StrUserID = 'PvP')
WHERE Class = '2'
Bu kodu okuttuğunuzda PvP kullanıcısındaki itemler Rogue classının başlangıç itemleri olarak ayarlanmış olacaktır.

1 Teşekürü Cok Görmeyin

ALINTI ..




Notice: This Ad only show to guest, please register now to disappear !
__________________
PvP Destek Almak için ÖzeL Mesaj Atınız.
Pasali isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Teşekkür Edenler:Pasali
OrhanBenceGay (18-08-2010)
Sponsored Links


Alt 28-07-2010, 22:20   #2 (permalink)
Banned

 
EveryBodyFooL - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Nov 2009
Bulunduğu Yer: C:\WINDOWS\system32
Yaş: 16
Mesajlar: 863
Oyun Parası: $212374
Teşekkür : 125
133 Konusuna 1.619 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 13
EveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud ofEveryBodyFooL has much to be proud of
Standart Cevap: ExBaşlangıç İtem Değiştirme Prosedürü - Çok Kolay - Sorunlar Fix - Güncellendi


Konu Onaylanmıştır.



Notice: This Ad only show to guest, please register now to disappear !
EveryBodyFooL isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 29-07-2010, 00:07   #3 (permalink)
Bağımlı Üye


 
Pasali - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Jan 2010
Mesajlar: 330
Oyun Parası: $85986
Teşekkür : 320
42 Konusuna 1.344 teşekkür almış
P-K Puan: 80
Tecrübe Puanı: 13
Pasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud of
Standart Cevap: ExBaşlangıç İtem Değiştirme Prosedürü - Çok Kolay - Sorunlar Fix - Güncellendi


Teşekürler =)



Notice: This Ad only show to guest, please register now to disappear !
__________________
PvP Destek Almak için ÖzeL Mesaj Atınız.
Pasali isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 29-07-2010, 12:00   #4 (permalink)
Bağımlı Üye


 
Pasali - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Jan 2010
Mesajlar: 330
Oyun Parası: $85986
Teşekkür : 320
42 Konusuna 1.344 teşekkür almış
P-K Puan: 80
Tecrübe Puanı: 13
Pasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud ofPasali has much to be proud of
Standart Cevap: ExBaşlangıç İtem Değiştirme Prosedürü - Çok Kolay - Sorunlar Fix - Güncellendi


bazı arkadaslar bu kodu bulamıyor diye koydm



Notice: This Ad only show to guest, please register now to disappear !
__________________
PvP Destek Almak için ÖzeL Mesaj Atınız.
Pasali isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 18-08-2010, 12:19   #5 (permalink)
Takdir Üye


 
OrhanBenceGay - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Dec 2009
Yaş: 18
Mesajlar: 2.507
Oyun Parası: $217188
Teşekkür : 406
51 Konusuna 208 teşekkür almış
P-K Puan: 485
Tecrübe Puanı: 15
OrhanBenceGay has much to be proud ofOrhanBenceGay has much to be proud ofOrhanBenceGay has much to be proud ofOrhanBenceGay has much to be proud ofOrhanBenceGay has much to be proud ofOrhanBenceGay has much to be proud ofOrhanBenceGay has much to be proud ofOrhanBenceGay has much to be proud of
OrhanBenceGay - İCQ üzeri Mesaj gönder OrhanBenceGay - AİM üzeri Mesaj gönder OrhanBenceGay - MSN üzeri Mesaj gönder OrhanBenceGay - YAHOO üzeri Mesaj gönder
Standart Cevap: ExBaşlangıç İtem Değiştirme Prosedürü - Çok Kolay - Sorunlar Fix - Güncellendi


Teşekurler.



Notice: This Ad only show to guest, please register now to disappear !
OrhanBenceGay isimli Üye şuanda  online konumundadır   Alıntı ile Cevapla
Alt 09-09-2010, 18:01   #6 (permalink)
Yeni Üye
 
AkServer - ait Kullanıcı Resmi (Avatar)
 
Üyelik tarihi: Sep 2010
Yaş: 23
Mesajlar: 8
Oyun Parası: $500
Teşekkür : 0
0 Konusuna 0 teşekkür almış
P-K Puan: 0
Tecrübe Puanı: 0
AkServer has much to be proud ofAkServer has much to be proud ofAkServer has much to be proud ofAkServer has much to be proud ofAkServer has much to be proud ofAkServer has much to be proud ofAkServer has much to be proud ofAkServer has much to be proud of
Standart Cevap: ExBaşlangıç İtem Değiştirme Prosedürü - Çok Kolay - Sorunlar Fix - Güncellendi


Teşekkürler.



Notice: This Ad only show to guest, please register now to disappear !
AkServer isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Cevapla

Bookmarks

Etiketler
cok, deg istirme, exbaslangic, fix, guncellendi, kolay, proseduru, sorunlar, İtem

Seçenekler
Stil

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık




| oyun | kız oyunları | atari oyunları | dora oyunları | tüm oyunlar |

Tüm Zamanlar GMT +2 Olarak Ayarlanmış. Şuanki Zaman: 21:14.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

17 sorgu 0,16317 saniyede oluşturuldu