Forum Gel

http://ortakheyecan.com/ortakgelir/affiliates/signup.php?pid=4c4f89d1#SignupForm Kolay Yoldan Para Kazanmak İstiyorsanız Bu Site Çok Uygun Sadece Linke Tıklamanız Yeterlidir...Linke Tıklayanlar Benle İletişime Geçsin. yusuf_yavuz61@hotmail.com
 
AnasayfaKolay Yoldan PaTakvimSSSKayıt OlGiriş yap

Paylaş | 
 

 Oyun İçin Kullanıcı ve Clan Sıralaması

Aşağa gitmek 
YazarMesaj




Rep Gücü : 0
Kayıt tarihi : 01/01/70

MesajKonu: Oyun İçin Kullanıcı ve Clan Sıralaması   Paz Mayıs 30, 2010 10:55 am

AŞaĞıdaki kodları sırasıyla uygulayarak oyun için kullanıcı ve clan sıralaması oluŞturabilirsiniz.
1.Uygulanacak Kod

Kod:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CLAN_SIRALAMA]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CLAN_SIRALAMA]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[KULLANICI_SIRALAMA]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[KULLANICI_SIRALAMA]
GO
CREATE TABLE [dbo].[CLAN_SIRALAMA] (
[ClanName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Sira] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[KULLANICI_SIRALAMA] (
[KullaniciName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Loyalty] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Sira] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL
) ON [PRIMARY]
GO
2.Uygulanacak Kod

Kod:
delete from k_npc where sSid > 2540 and sSid < 2551 or sSid = 2556 or sSid = 2557
delete from k_npcpos where NpcID > 2540 and NpcID < 2551 or NpcID = 2556 or NpcID = 2557

insert into k_npc values (2541 , '[Kullanici Siralamasi]' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2542 , '[1.] MrZapp ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2543 , '[2.] PvP_GeN_TR ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2544 , '[3.] CrusH ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2545 , '[4.] TurkGamers ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2546 , '[5.] BurcaY ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2547 , '[Clan Siralamasi]' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2548 , '[1.] PvP_GeN_TR ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2549 , '[2.] Larva ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2550 , '[3.] Shadow ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2556 , '[4.] Dark ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)
insert into k_npc values (2557 , '[5.] EsTarGon ' , 11000 , 100 , 150210000 , 170210000 , 1 , 5 , 11 , 1 , 1 , 1 , 0 , 60 , 0 , 0 , 6000 , 0 , 0 , 3000 , 194 , 194 , 1000 , 1500 , 2 , 7 , 1000 , 0 , 0 , 0 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 3000 , 90 , 7 , 14 , 35 , 0 , 0 , 0 , 0 , 0)

-- Clan Sıralaması
insert into k_npcpos values (21 , 2541 , 103 , 0 , 0 , 0 , 0 , 364 , 369 , 364 , 369 , 364 , 369 , 364 , 369 , 1 , 3600 , 0 , 3 , '0364036903640369')
insert into k_npcpos values (21 , 2542 , 103 , 0 , 0 , 0 , 0 , 366 , 368 , 366 , 368 , 366 , 368 , 366 , 368 , 1 , 3600 , 0 , 3 , '0366036803660368')
insert into k_npcpos values (21 , 2543 , 103 , 0 , 0 , 0 , 0 , 367 , 369 , 367 , 369 , 367 , 369 , 367 , 369 , 1 , 3600 , 0 , 3 , '0367036903670369')
insert into k_npcpos values (21 , 2544 , 103 , 0 , 0 , 0 , 0 , 367 , 370 , 367 , 370 , 367 , 370 , 367 , 370 , 1 , 3600 , 0 , 3 , '0367037003670370')
insert into k_npcpos values (21 , 2545 , 103 , 0 , 0 , 0 , 0 , 366 , 366 , 366 , 366 , 366 , 366 , 366 , 366 , 1 , 3600 , 0 , 3 , '0366036603660366')
insert into k_npcpos values (21 , 2546 , 103 , 0 , 0 , 0 , 0 , 366 , 365 , 366 , 365 , 366 , 365 , 366 , 365 , 1 , 3600 , 0 , 3 , '0366036503660365')
-- Kullanıcı Sıralaması
insert into k_npcpos values (21 , 2547 , 103 , 0 , 0 , 0 , 0 , 376 , 396 , 376 , 396 , 376 , 396 , 376 , 396 , 1 , 3600 , 0 , 3 , '0376039603760396')
insert into k_npcpos values (21 , 2548 , 103 , 0 , 0 , 0 , 0 , 377 , 396 , 377 , 396 , 377 , 396 , 377 , 396 , 1 , 3600 , 0 , 3 , '0376039603760396')
insert into k_npcpos values (21 , 2549 , 103 , 0 , 0 , 0 , 0 , 377 , 397 , 377 , 397 , 377 , 397 , 377 , 397 , 1 , 3600 , 0 , 3 , '0377039603770396')
insert into k_npcpos values (21 , 2550 , 103 , 0 , 0 , 0 , 0 , 378 , 398 , 378 , 398 , 378 , 398 , 378 , 398 , 1 , 3600 , 0 , 3 , '0378039803780398')
insert into k_npcpos values (21 , 2556 , 103 , 0 , 0 , 0 , 0 , 378 , 399 , 378 , 399 , 378 , 399 , 378 , 399 , 1 , 3600 , 0 , 3 , '0378039903780399')
insert into k_npcpos values (21 , 2557 , 103 , 0 , 0 , 0 , 0 , 375 , 395 , 375 , 395 , 375 , 395 , 375 , 395 , 1 , 3600 , 0 , 3 , '0375039503750395')
3.Uygulanacak Kod

Kod:
CREATE PROCEDURE [dbo].[oyuniciguncelle]
AS

begin
begin transaction
truncate table clan_siralama
truncate table kullanici_siralama
insert kullanici_siralama (kullaniciname, loyalty)
select top 5 struserid, loyalty from userdata order by loyalty desc, loyaltymonthly desc, [level] asc
exec oyunicikullanici
if @@ERROR != 0
begin
rollback transaction
return
end
else
begin
commit transaction
return
end
end


begin
begin transaction
insert clan_siralama (clanname)
select top 5 idname from knights order by points desc, members asc
if @@ERROR != 0
begin
rollback transaction
return
end
else
begin
commit transaction
return
end
end

update k_npc set StrName = '[1.] '+(select ClanName from clan_siralama where Sira = 1) where sSid = 2548
update k_npc set StrName = '[2.] '+(select ClanName from clan_siralama where Sira = 2) where sSid = 2549
update k_npc set StrName = '[3.] '+(select ClanName from clan_siralama where Sira = 3) where sSid = 2550
update k_npc set StrName = '[4.] '+(select ClanName from clan_siralama where Sira = 4) where sSid = 2556
update k_npc set StrName = '[5.] '+(select ClanName from clan_siralama where Sira = 5) where sSid = 2557
update k_npc set StrName = '[1.] '+(select KullaniciName from kullanici_siralama where Sira = 1) where sSid = 2542
update k_npc set StrName = '[2.] '+(select KullaniciName from kullanici_siralama where Sira = 2) where sSid = 2543
update k_npc set StrName = '[3.] '+(select KullaniciName from kullanici_siralama where Sira = 3) where sSid = 2544
update k_npc set StrName = '[4.] '+(select KullaniciName from kullanici_siralama where Sira = 4) where sSid = 2545
update k_npc set StrName = '[5.] '+(select KullaniciName from kullanici_siralama where Sira = 5) where sSid = 2546 :
Sayfa başına dön Aşağa gitmek
 
Oyun İçin Kullanıcı ve Clan Sıralaması
Sayfa başına dön 
1 sayfadaki 1 sayfası
 Similar topics
-
» Kullanıcı Adı Değiştirme Formu
» sevgilim7bni 4x kullanımı

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
Forum Gel :: Online Oyunlar Bölümü :: Knight Online :: Prosedürler & Kodlar-
Buraya geçin: