•         

            

            

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

1299 Rank Cz Rank System By ZeDaC Ko-Fox Özel

  • Konbuyu başlatan Konbuyu başlatan ZiPP0
  • Başlangıç tarihi Başlangıç tarihi

ZiPP0

Kayıtlı Üye
Katılım
20 Şubat 2013
Mesajlar
160
Merhabalar...

Önce Bu Kodları Sql e giriyoruz...





Kod:
[HIDE]--Npc

insert into [K_NPC] values ('29931','Karus Rank Board','20004','100','0','0','1','7','28','1','1','2','0','30','100','0','30000','0','0','5000','46','46','1000','1500','2','7','1000','0','0','0','100','100','100','100','100','100','100','90','7','14','35','100','21022','0','0','0');

insert into [K_NPC] values ('29932','Elmorad Rank Board','20005','100','0','0','2','7','28','1','1','2','0','30','100','0','30000','0','0','5000','46','46','1000','1500','2','7','1000','0','0','0','100','100','100','100','100','100','100','90','7','14','35','100','21022','0','0','0');



--Ronark Land

insert into [K_NPCPOS] values ('201','29932','100','0','0','0','99','618','933','618','933','618','933','618','933','1','3600','0','2','NULL');

insert into [K_NPCPOS] values ('201','29931','100','0','0','0','99','1378','1063','1378','1063','1378','1063','1378','1063','1','3600','0','2','NULL');



--Ardream

insert into [K_NPCPOS] values ('202','29932','100','0','0','0','99','180','905','180','905','180','905','180','905','1','3600','0','2','NULL');

insert into [K_NPCPOS] values ('202','29931','100','0','0','0','99','851','118','851','118','851','118','851','118','1','3600','0','2','NULL');



--Ronark Land Base

insert into [K_NPCPOS] values ('203','29932','100','0','0','0','99','525','904','525','904','525','904','525','904','1','3600','0','2','NULL');

insert into [K_NPCPOS] values ('203','29931','100','0','0','0','99','504','116','504','116','504','116','504','116','1','3600','0','2','NULL');

[/HIDE]

Npc Yi Oluşturduk... Şimdi Bunu uygulayalım



Kod:
[HIDE]

ALTER TABLE USERDATA ADD LoyaltyTodayNow int NOT NULL DEFAULT 0

ALTER TABLE USERDATA ADD LoyaltyToday int NOT NULL DEFAULT 0



ALTER PROCEDURE ACCOUNT_LOGOUT

@AccountID    varchar(21),

@nRet        smallint    OUTPUT

AS

BEGIN

   	

	-- # Today Ladder Rank Start # --

	DECLARE @strUserId char(21)

	SELECT @strUserId = strCharID FROM CURRENTUSER WHERE strAccountID = @AccountID

	UPDATE USERDATA SET LoyaltyToday = 0 FROM USERDATA WHERE strUserId = @strUserID

	-- # Today Ladder Rank End # --



	DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID



        SET @nRet = 1





END

[/HIDE]



Bunu Load User Dataya Eklicez...



Kod:
[HIDE]-- # Today Ladder Rank Start # --

UPDATE USERDATA SET LoyaltyTodayNow = LoyaltyMonthly FROM USERDATA WHERE strUserId = @id

UPDATE USERDATA SET LoyaltyToday = 0 FROM USERDATA WHERE strUserId = @id

-- # Today Ladder Rank End # --





-- # Automatic Today Loyalty Restarter Stat # --



DECLARE @HourForLT tinyint

DECLARE @MinuteForLT tinyint

SET @HourForLT = DATEPART(HOUR,GETDATE())

SET @MinuteForLT = DATEPART(MINUTE,GETDATE())



IF (@HourForLT = 0) AND (@MinuteForLT = 0)

BEGIN

UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0

END

ELSE IF (@HourForLT = 0) AND (@MinuteForLT = 5)

BEGIN

UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0

END

ELSE IF (@HourForLT = 0) AND (@MinuteForLT = 10)

BEGIN

UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0

END

ELSE IF (@HourForLT = 12) AND (@MinuteForLT = 0)

BEGIN

UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0

END

ELSE IF (@HourForLT = 12) AND (@MinuteForLT = 5)

BEGIN

UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0

END

ELSE IF (@HourForLT = 12) AND (@MinuteForLT = 10)

BEGIN

UPDATE USERDATA SET Loyaltytoday = 0 WHERE Loyaltytoday != 0

END



-- # Automatic Today Loyalty Restarter End # --





CREATE TRIGGER [dbo].[TODAY_LOYALTY_UPDATE] ON [dbo].[USERDATA]

AFTER UPDATE AS

IF UPDATE(LoyaltyMonthly)

BEGIN



DECLARE @strUserId char(21)

DECLARE @LoyaltyDifference int

DECLARE @LoyaltyMonthly int

DECLARE @LoyaltyTodayNow int

DECLARE @Clan int

DECLARE @Level int

DECLARE @Nation int

DECLARE @Zone int



SELECT @Clan = Knights,@level = [Level],@Nation = Nation,@strUserId = strUserId,@LoyaltyMonthly = LoyaltyMonthly,@LoyaltyTodayNow = LoyaltyTodayNow,@Zone = Zone FROM INSERTED



IF @Zone = 201 or @Zone = 202 or @Zone = 203



BEGIN

	SET @LoyaltyDifference = (@LoyaltyMonthly - @LoyaltyTodayNow)



	IF CHARINDEX('-',@LoyaltyDifference) = 0

	BEGIN

		UPDATE USERDATA SET LoyaltyToday = @LoyaltyDifference WHERE strUserId = @strUserId

	END

	ELSE

	BEGIN

		UPDATE USERDATA SET LoyaltyToday = 0 WHERE strUserId = @strUserId

	END

END



END



@@By ZeDaC!![/HIDE]



Evet sistemi db üzerine kurduk Bunları indiriyoruz Evt Dosyalarını map içine client dosyalarını client içine Rank dosyalarını appserv www içine atıyoruz ve rank sistemimiz kullanışa hazır hale geliyor...



View hidden content is available for registered users!




Bir Teşekkürü çok görmeyin...



facebook.com/Kaan7707

facebook.com/Kaan7707​
 
Geri
Üst