Alıntı:
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 |
1-
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
-- Ko-Cuce 2008
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.] sadasd ' , 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.] essss ' , 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.] ArdreamKinq ' , 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.] Asd ' , 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.] arefasfa ' , 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.] Tottle ' , 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.] Gns ' , 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.] Ganks ' , 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.] asd ' , 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.] fOREveR ' , 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ı
-- Ko-Cuce 2008
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')
Kod:
-- Ganks Tarafından Oluşturuldu - 25 Ekim 2008
-- Berkine tY , Alperede :o
-- KO-CUCE.com için yapılmıştır...
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
--------------------------------------
--brought to you by berkin güler :-O
--------------------------------------
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
GO
Güncelleme kodu :
Kod:
exec oyuniciguncelle
KO-CUCE den alıntıdır...
Hiç yorum yok:
Yorum Gönder