• HyperFilter | DoS Protection | DDoS Protection | DoS Mitigation | DDoS Mitigation | AntiDoS | AntiDDoS | Proxy Shielding

Oto res yapmak isyen arkadaşlar içeriye

HumanCPU

Kayıtlı Üye
Katılım
3 Kasım 2012
Mesajlar
36
Merhaba Arkadaşlar Öncelikle Oto Res İçin Çok Kişi Şikaytci İnşallah Yardımcı Olur Paylaşım



Öncelikle Prosedur Kodlarımızı Oluşturalım



Kod:
CREATE PROCEDURE [dbo].[KUTULU_SEMBOL]

AS

/*

Author : AKUMA

E-Mail : [email][email protected][/email]

*/

SET NOCOUNT ON 

IF EXISTS (select * from sysobjects where id = object_id(N'[dbo].[KUSER_RATING]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) 

DROP TABLE [dbo].[KUSER_RATING] 

IF EXISTS (select * from sysobjects where id = object_id(N'[dbo].[EUSER_RATING]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) 

DROP TABLE [dbo].[EUSER_RATING] 

CREATE TABLE [dbo].[KUSER_RATING] ( 

    [nRank] [int] IDENTITY (1, 1) NOT NULL , 

    [strUserID] [char] (21) NULL, 

    [strKnightsName] [char] (21) NULL , 

    [nLoyalty] [int] NULL , 

) ON [PRIMARY] 

CREATE TABLE [dbo].[EUSER_RATING] ( 

    [nRank] [int] IDENTITY (1, 1) NOT NULL , 

    [strUserID] [char] (21) NULL, 

    [strKnightsName] [char] (21) NULL , 

    [nLoyalty] [int] NULL , 

) ON [PRIMARY] 

INSERT INTO KUSER_RATING 

    SELECT TOP 100 USERDATA.strUserId, KNIGHTS.IDName, USERDATA.Loyalty FROM USERDATA INNER JOIN KNIGHTS ON USERDATA.Knights = KNIGHTS.IDNum 

    WHERE   (USERDATA.Nation = 1) AND (USERDATA.City <> 255 ) AND (Authority = 1)

    ORDER BY USERDATA.Loyalty DESC 

INSERT INTO EUSER_RATING  

    SELECT TOP 100 USERDATA.strUserId, KNIGHTS.IDName, USERDATA.Loyalty FROM USERDATA INNER JOIN KNIGHTS ON USERDATA.Knights = KNIGHTS.IDNum 

    WHERE   (USERDATA.Nation = 2) AND (USERDATA.City <> 255 ) AND (Authority = 1)

    ORDER BY USERDATA.Loyalty DESC 

CREATE  INDEX [IX_RATING_RANK] ON [dbo].[KUSER_RATING]([nRank]) ON [PRIMARY] 

CREATE  INDEX [IX_RATING_RANK] ON [dbo].[EUSER_RATING]([nRank]) ON [PRIMARY] 

DECLARE @CheckUserKnightsRankTable tinyint

SELECT @CheckUserKnightsRankTable = Count(*) FROM USER_KNIGHTS_RANK

IF @CheckUserKnightsRankTable < 100

BEGIN

 DECLARE @RankName varchar(30)

 DECLARE @I int

 

 SET @I = 1

 WHILE @I < 101

 BEGIN

  IF @I = 1

  BEGIN

   SET @RankName = 'Gold Knight'

  END

  IF @I > 1 AND @I <= 4

  BEGIN

   SET @RankName = 'Silver Knight'

  END

  IF @I > 4 AND @I <= 9

  BEGIN

   SET @RankName = 'Mirage Knight'

  END

  IF @I > 9 AND @I <= 10

  BEGIN

   SET @RankName = 'Shadow Knight'

  END

  IF @I > 25 AND @I <= 50

  BEGIN

   SET @RankName = 'Mist Knight'

  END

  IF @I > 50 AND @I <= 100

  BEGIN

   SET @RankName = 'Training Knight'

  END

  

  INSERT INTO USER_KNIGHTS_RANK VALUES (@I,@RankName,NULL,NULL,0,NULL,NULL,0,1000000)

 

  SET @I = @I + 1

 END

END

DECLARE @strCharID char(21) 

DECLARE @strKnightsID char(21) 

DECLARE @nIndex smallint 

DECLARE @nLoyalty int 

SET @strCharID = NULL 

SET @strKnightsID = NULL 

SET @nIndex = 0 

SET @nLoyalty = 0 

DECLARE CRS_KARUS CURSOR FOR 

SELECT nRank, strUserID, strKnightsName, nLoyalty FROM KUSER_RATING 

OPEN CRS_KARUS 

FETCH NEXT FROM CRS_KARUS 

INTO @nIndex, @strCharID, @strKnightsID, @nLoyalty 

WHILE @@FETCH_STATUS = 0  

BEGIN 

       

 UPDATE USER_KNIGHTS_RANK SET strKarusUserID = @strCharID, strKarusKnightsName = @strKnightsID, nKarusLoyalty = @nLoyalty WHERE shIndex = @nIndex 

             

    FETCH NEXT FROM CRS_KARUS 

    INTO @nIndex, @strCharID, @strKnightsID, @nLoyalty 

END 

CLOSE CRS_KARUS 

DEALLOCATE CRS_KARUS 

DECLARE CRS_HUMAN CURSOR FOR 

SELECT nRank, strUserID, strKnightsName, nLoyalty FROM EUSER_RATING 

OPEN CRS_HUMAN 

FETCH NEXT FROM CRS_HUMAN 

INTO @nIndex, @strCharID, @strKnightsID, @nLoyalty 

WHILE @@FETCH_STATUS = 0  

BEGIN 

    

 UPDATE USER_KNIGHTS_RANK SET strElmoUserID = @strCharID, strElmoKnightsName = @strKnightsID, nElmoLoyalty = @nLoyalty WHERE shIndex = @nIndex 

             

    FETCH NEXT FROM CRS_HUMAN 

    INTO @nIndex, @strCharID, @strKnightsID, @nLoyalty 

END 

CLOSE CRS_HUMAN 

DEALLOCATE CRS_HUMAN 

IF EXISTS (select * from sysobjects where id = object_id(N'[dbo].[KUSER_RATING]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) 

DROP TABLE [dbo].[KUSER_RATING] 

IF EXISTS (select * from sysobjects where id = object_id(N'[dbo].[EUSER_RATING]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) 

DROP TABLE [dbo].[EUSER_RATING] 

SET NOCOUNT OFF



Kod:
CREATE PROCEDURE [dbo].[KUTUSUZ_SEMBOL]



AS



IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id(N'[dbo].[KPERSONAL_RANK]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[KPERSONAL_RANK]



IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id(N'[dbo].[EPERSONAL_RANK]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[EPERSONAL_RANK]



CREATE TABLE [KPERSONAL_RANK]

(

    [nRank] [int] IDENTITY (1, 1) NOT NULL,

    [strUserID] char(21) NOT NULL,

    [LoyaltyMonthly] int NOT NULL,

    [Loyalty] int NOT NULL,

    [nRankUP] int NOT NULL

) ON [PRIMARY]



CREATE TABLE [EPERSONAL_RANK]

(

    [nRank] [int] IDENTITY (1, 1) NOT NULL,

    [strUserID] char(21) NOT NULL,

    [LoyaltyMonthly] int NOT NULL,

    [Loyalty] int NOT NULL,

    [nRankUP] int NOT NULL

) ON [PRIMARY]



INSERT KPERSONAL_RANK

    SELECT TOP 100 strUserID, LoyaltyMonthly, Loyalty, 101

    FROM USERDATA

    WHERE Nation = 1 and Authority <> 255 and UpdateTime > GETDATE()-30

    ORDER BY LoyaltyMonthly desc, Loyalty desc



INSERT EPERSONAL_RANK

    SELECT TOP 100 strUserID, LoyaltyMonthly, Loyalty, 101

    FROM USERDATA

    WHERE Nation = 2 and Authority <> 255 and UpdateTime > GETDATE()-30

    ORDER BY LoyaltyMonthly desc, Loyalty desc



UPDATE KPERSONAL_RANK

    SET nRankUP = R.nRank - KPERSONAL_RANK.nRank

    FROM USER_PERSONAL_RANK R

    WHERE R.strKarusUserID = KPERSONAL_RANK.strUserID COLLATE Latin1_General_CI_AI



UPDATE EPERSONAL_RANK

    SET nRankUP = R.nRank - EPERSONAL_RANK.nRank

    FROM USER_PERSONAL_RANK R

    WHERE R.strElmoUserID = EPERSONAL_RANK.strUserID COLLATE Latin1_General_CI_AI

    

TRUNCATE TABLE USER_PERSONAL_RANK



DECLARE @UpdateDate smalldatetime

SET @UpdateDate = GETDATE()



INSERT USER_PERSONAL_RANK

    SELECT E.nRank, 1, E.nRankUP, E.strUserID, E.LoyaltyMonthly, 1, K.nRankUP, K.strUserID, K.LoyaltyMonthly, 1, 1, @UpdateDate

    FROM EPERSONAL_RANK E, KPERSONAL_RANK K

    WHERE E.nRank = K.nRank

    ORDER BY E.nRank



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank = 1)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Gold Knight', nElmoCheck = 1000000, nKarusCheck = 1000000, nSalary = 1000000 WHERE nRank = 1



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 2 AND nRank <= 4)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Silver Knight', nElmoCheck = 700000, nKarusCheck = 700000, nSalary = 700000 WHERE nRank >= 2 AND nRank <= 4



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 5 AND nRank <= 9)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Mirage Knight', nElmoCheck = 500000, nKarusCheck = 500000, nSalary = 500000 WHERE nRank >= 5 AND nRank <= 9 



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 10 AND nRank <= 25)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Shadow Knight', nElmoCheck = 300000, nKarusCheck = 300000, nSalary = 300000 WHERE nRank >= 10 AND nRank <= 25



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 26 AND nRank <= 50)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Mist Knight', nElmoCheck = 200000, nKarusCheck = 200000, nSalary = 200000 WHERE nRank >= 26 AND nRank <= 50



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 51)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Training Knight', nElmoCheck = 0, nKarusCheck = 0, nSalary = 0 WHERE nRank >= 51



BEGIN TRAN

DELETE FROM USER_PERSONAL_RANK WHERE UpdateDate < @UpdateDate

COMMIT TRAN



IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id(N'[dbo].[KPERSONAL_RANK]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[KPERSONAL_RANK]



IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id(N'[dbo].[EPERSONAL_RANK]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[EPERSONAL_RANK]



RESET KODUMUZ



Kod:
Exec KUTULU_SEMBOL

Exec KUTUSUZ_SEMBOL



Bunları Tek Kodda Toplayalım



Kod:
Create Procedure [dbo].[OTO_RESAT] 

AS



exec UPDATE_USER_KNIGHTS_RANK

EXEC UPDATE_USER_PERSONAL_RANK



EXEC RANK_KNIGHTS





Return



Bu Koduda SQL QA YAPIŞTIRIP F5 YAPTIĞIMIZDA TEK KOD OLARAK RESET KODUMUZ



Kod:
Exec OTO_RESAT



Şimdi Bu Kodu Sürekli OTOMATİK Kullanmasını Ayarlayalım ÖNCELİKLE SQL DBMİZDE PROSEDURLERİMİZDEN ACCOUNT_LOGOUT Buluyoruz Ve İçini Açıyoruz Ve Şöyle Bir Kod Olacaktır İçersinde



Kod:
ALTER PROCEDURE [dbo].[ACCOUNT_LOGOUT]

@AccountID	varchar(21),

@nRet		smallint	OUTPUT

AS



Hemen Bu As Altında Şu Kodumuzu Yazıyoruz Bu Şekilde Olacaktır.



Kod:
ALTER PROCEDURE [dbo].[ACCOUNT_LOGOUT]

@AccountID	varchar(21),

@nRet		smallint	OUTPUT

AS



exec OTO_RESET



Evet Arkadaşlar Bu Yaptığımız İşlem Nasıl Çalışacak Bunun Hakkındada Bilgilendirme Yapayım Oyundan 1 Kişi Relog Attığında Tüm Herkezin Sembolleri Güncellenecektir Ve Klanları Otomatik Olarak Grade Atlayacaktır. Umarım İşinize Yarar Kolay Gelsin.
 
Cevap: Oto res yapmak isyen arkadaşlar içeriye



Merhaba Arkadaşlar Öncelikle Oto Res İçin Çok Kişi Şikaytci İnşallah Yardımcı Olur Paylaşım



Öncelikle Prosedur Kodlarımızı Oluşturalım



Kod:
CREATE PROCEDURE [dbo].[KUTULU_SEMBOL]

AS

/*

Author : AKUMA

E-Mail : [email][email protected][/email]

*/

SET NOCOUNT ON 

IF EXISTS (select * from sysobjects where id = object_id(N'[dbo].[KUSER_RATING]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) 

DROP TABLE [dbo].[KUSER_RATING] 

IF EXISTS (select * from sysobjects where id = object_id(N'[dbo].[EUSER_RATING]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) 

DROP TABLE [dbo].[EUSER_RATING] 

CREATE TABLE [dbo].[KUSER_RATING] ( 

    [nRank] [int] IDENTITY (1, 1) NOT NULL , 

    [strUserID] [char] (21) NULL, 

    [strKnightsName] [char] (21) NULL , 

    [nLoyalty] [int] NULL , 

) ON [PRIMARY] 

CREATE TABLE [dbo].[EUSER_RATING] ( 

    [nRank] [int] IDENTITY (1, 1) NOT NULL , 

    [strUserID] [char] (21) NULL, 

    [strKnightsName] [char] (21) NULL , 

    [nLoyalty] [int] NULL , 

) ON [PRIMARY] 

INSERT INTO KUSER_RATING 

    SELECT TOP 100 USERDATA.strUserId, KNIGHTS.IDName, USERDATA.Loyalty FROM USERDATA INNER JOIN KNIGHTS ON USERDATA.Knights = KNIGHTS.IDNum 

    WHERE   (USERDATA.Nation = 1) AND (USERDATA.City <> 255 ) AND (Authority = 1)

    ORDER BY USERDATA.Loyalty DESC 

INSERT INTO EUSER_RATING  

    SELECT TOP 100 USERDATA.strUserId, KNIGHTS.IDName, USERDATA.Loyalty FROM USERDATA INNER JOIN KNIGHTS ON USERDATA.Knights = KNIGHTS.IDNum 

    WHERE   (USERDATA.Nation = 2) AND (USERDATA.City <> 255 ) AND (Authority = 1)

    ORDER BY USERDATA.Loyalty DESC 

CREATE  INDEX [IX_RATING_RANK] ON [dbo].[KUSER_RATING]([nRank]) ON [PRIMARY] 

CREATE  INDEX [IX_RATING_RANK] ON [dbo].[EUSER_RATING]([nRank]) ON [PRIMARY] 

DECLARE @CheckUserKnightsRankTable tinyint

SELECT @CheckUserKnightsRankTable = Count(*) FROM USER_KNIGHTS_RANK

IF @CheckUserKnightsRankTable < 100

BEGIN

 DECLARE @RankName varchar(30)

 DECLARE @I int

 

 SET @I = 1

 WHILE @I < 101

 BEGIN

  IF @I = 1

  BEGIN

   SET @RankName = 'Gold Knight'

  END

  IF @I > 1 AND @I <= 4

  BEGIN

   SET @RankName = 'Silver Knight'

  END

  IF @I > 4 AND @I <= 9

  BEGIN

   SET @RankName = 'Mirage Knight'

  END

  IF @I > 9 AND @I <= 10

  BEGIN

   SET @RankName = 'Shadow Knight'

  END

  IF @I > 25 AND @I <= 50

  BEGIN

   SET @RankName = 'Mist Knight'

  END

  IF @I > 50 AND @I <= 100

  BEGIN

   SET @RankName = 'Training Knight'

  END

  

  INSERT INTO USER_KNIGHTS_RANK VALUES (@I,@RankName,NULL,NULL,0,NULL,NULL,0,1000000)

 

  SET @I = @I + 1

 END

END

DECLARE @strCharID char(21) 

DECLARE @strKnightsID char(21) 

DECLARE @nIndex smallint 

DECLARE @nLoyalty int 

SET @strCharID = NULL 

SET @strKnightsID = NULL 

SET @nIndex = 0 

SET @nLoyalty = 0 

DECLARE CRS_KARUS CURSOR FOR 

SELECT nRank, strUserID, strKnightsName, nLoyalty FROM KUSER_RATING 

OPEN CRS_KARUS 

FETCH NEXT FROM CRS_KARUS 

INTO @nIndex, @strCharID, @strKnightsID, @nLoyalty 

WHILE @@FETCH_STATUS = 0  

BEGIN 

       

 UPDATE USER_KNIGHTS_RANK SET strKarusUserID = @strCharID, strKarusKnightsName = @strKnightsID, nKarusLoyalty = @nLoyalty WHERE shIndex = @nIndex 

             

    FETCH NEXT FROM CRS_KARUS 

    INTO @nIndex, @strCharID, @strKnightsID, @nLoyalty 

END 

CLOSE CRS_KARUS 

DEALLOCATE CRS_KARUS 

DECLARE CRS_HUMAN CURSOR FOR 

SELECT nRank, strUserID, strKnightsName, nLoyalty FROM EUSER_RATING 

OPEN CRS_HUMAN 

FETCH NEXT FROM CRS_HUMAN 

INTO @nIndex, @strCharID, @strKnightsID, @nLoyalty 

WHILE @@FETCH_STATUS = 0  

BEGIN 

    

 UPDATE USER_KNIGHTS_RANK SET strElmoUserID = @strCharID, strElmoKnightsName = @strKnightsID, nElmoLoyalty = @nLoyalty WHERE shIndex = @nIndex 

             

    FETCH NEXT FROM CRS_HUMAN 

    INTO @nIndex, @strCharID, @strKnightsID, @nLoyalty 

END 

CLOSE CRS_HUMAN 

DEALLOCATE CRS_HUMAN 

IF EXISTS (select * from sysobjects where id = object_id(N'[dbo].[KUSER_RATING]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) 

DROP TABLE [dbo].[KUSER_RATING] 

IF EXISTS (select * from sysobjects where id = object_id(N'[dbo].[EUSER_RATING]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) 

DROP TABLE [dbo].[EUSER_RATING] 

SET NOCOUNT OFF



Kod:
CREATE PROCEDURE [dbo].[KUTUSUZ_SEMBOL]



AS



IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id(N'[dbo].[KPERSONAL_RANK]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[KPERSONAL_RANK]



IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id(N'[dbo].[EPERSONAL_RANK]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[EPERSONAL_RANK]



CREATE TABLE [KPERSONAL_RANK]

(

    [nRank] [int] IDENTITY (1, 1) NOT NULL,

    [strUserID] char(21) NOT NULL,

    [LoyaltyMonthly] int NOT NULL,

    [Loyalty] int NOT NULL,

    [nRankUP] int NOT NULL

) ON [PRIMARY]



CREATE TABLE [EPERSONAL_RANK]

(

    [nRank] [int] IDENTITY (1, 1) NOT NULL,

    [strUserID] char(21) NOT NULL,

    [LoyaltyMonthly] int NOT NULL,

    [Loyalty] int NOT NULL,

    [nRankUP] int NOT NULL

) ON [PRIMARY]



INSERT KPERSONAL_RANK

    SELECT TOP 100 strUserID, LoyaltyMonthly, Loyalty, 101

    FROM USERDATA

    WHERE Nation = 1 and Authority <> 255 and UpdateTime > GETDATE()-30

    ORDER BY LoyaltyMonthly desc, Loyalty desc



INSERT EPERSONAL_RANK

    SELECT TOP 100 strUserID, LoyaltyMonthly, Loyalty, 101

    FROM USERDATA

    WHERE Nation = 2 and Authority <> 255 and UpdateTime > GETDATE()-30

    ORDER BY LoyaltyMonthly desc, Loyalty desc



UPDATE KPERSONAL_RANK

    SET nRankUP = R.nRank - KPERSONAL_RANK.nRank

    FROM USER_PERSONAL_RANK R

    WHERE R.strKarusUserID = KPERSONAL_RANK.strUserID COLLATE Latin1_General_CI_AI



UPDATE EPERSONAL_RANK

    SET nRankUP = R.nRank - EPERSONAL_RANK.nRank

    FROM USER_PERSONAL_RANK R

    WHERE R.strElmoUserID = EPERSONAL_RANK.strUserID COLLATE Latin1_General_CI_AI

    

TRUNCATE TABLE USER_PERSONAL_RANK



DECLARE @UpdateDate smalldatetime

SET @UpdateDate = GETDATE()



INSERT USER_PERSONAL_RANK

    SELECT E.nRank, 1, E.nRankUP, E.strUserID, E.LoyaltyMonthly, 1, K.nRankUP, K.strUserID, K.LoyaltyMonthly, 1, 1, @UpdateDate

    FROM EPERSONAL_RANK E, KPERSONAL_RANK K

    WHERE E.nRank = K.nRank

    ORDER BY E.nRank



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank = 1)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Gold Knight', nElmoCheck = 1000000, nKarusCheck = 1000000, nSalary = 1000000 WHERE nRank = 1



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 2 AND nRank <= 4)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Silver Knight', nElmoCheck = 700000, nKarusCheck = 700000, nSalary = 700000 WHERE nRank >= 2 AND nRank <= 4



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 5 AND nRank <= 9)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Mirage Knight', nElmoCheck = 500000, nKarusCheck = 500000, nSalary = 500000 WHERE nRank >= 5 AND nRank <= 9 



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 10 AND nRank <= 25)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Shadow Knight', nElmoCheck = 300000, nKarusCheck = 300000, nSalary = 300000 WHERE nRank >= 10 AND nRank <= 25



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 26 AND nRank <= 50)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Mist Knight', nElmoCheck = 200000, nKarusCheck = 200000, nSalary = 200000 WHERE nRank >= 26 AND nRank <= 50



IF EXISTS (SELECT COUNT(*) FROM USER_PERSONAL_RANK WHERE nRank >= 51)

UPDATE USER_PERSONAL_RANK SET strPosition = 'Training Knight', nElmoCheck = 0, nKarusCheck = 0, nSalary = 0 WHERE nRank >= 51



BEGIN TRAN

DELETE FROM USER_PERSONAL_RANK WHERE UpdateDate < @UpdateDate

COMMIT TRAN



IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id(N'[dbo].[KPERSONAL_RANK]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[KPERSONAL_RANK]



IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id(N'[dbo].[EPERSONAL_RANK]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[EPERSONAL_RANK]



RESET KODUMUZ



Kod:
Exec KUTULU_SEMBOL

Exec KUTUSUZ_SEMBOL



Bunları Tek Kodda Toplayalım



Kod:
Create Procedure [dbo].[OTO_RESAT] 

AS



exec UPDATE_USER_KNIGHTS_RANK

EXEC UPDATE_USER_PERSONAL_RANK



EXEC RANK_KNIGHTS





Return



Bu Koduda SQL QA YAPIŞTIRIP F5 YAPTIĞIMIZDA TEK KOD OLARAK RESET KODUMUZ



Kod:
Exec OTO_RESAT



Şimdi Bu Kodu Sürekli OTOMATİK Kullanmasını Ayarlayalım ÖNCELİKLE SQL DBMİZDE PROSEDURLERİMİZDEN ACCOUNT_LOGOUT Buluyoruz Ve İçini Açıyoruz Ve Şöyle Bir Kod Olacaktır İçersinde



Kod:
ALTER PROCEDURE [dbo].[ACCOUNT_LOGOUT]

@AccountID	varchar(21),

@nRet		smallint	OUTPUT

AS



Hemen Bu As Altında Şu Kodumuzu Yazıyoruz Bu Şekilde Olacaktır.



Kod:
ALTER PROCEDURE [dbo].[ACCOUNT_LOGOUT]

@AccountID	varchar(21),

@nRet		smallint	OUTPUT

AS



exec OTO_RESET



Evet Arkadaşlar Bu Yaptığımız İşlem Nasıl Çalışacak Bunun Hakkındada Bilgilendirme Yapayım Oyundan 1 Kişi Relog Attığında Tüm Herkezin Sembolleri Güncellenecektir Ve Klanları Otomatik Olarak Grade Atlayacaktır. Umarım İşinize Yarar Kolay Gelsin.



Bu biraz gereksiz olmuş bence.. Procların icine o kodu ekliceğine SQL nin zamanlayıcısından her 10dk da bi res atmasını ayarlayabilrisin.. Senin vermiş olduğun yöntemde 10 kişi aynı anda oyundan cıktığında 10 kez aynı işlevi yapmazmı ?
 
Geri
Üst