19 Şubat 2009 Perşembe

83 Levelde Stat Bugu Sorunu çözmek !




Query Analyzer i açip bu kodu yazmanız yeterli!

CREATE PROCEDURE REPAIR_USER_STAT_POINT
@strUserID varchar(21)
AS
/*
Author : AKUMA
83 Level sınırına göre düzenleme VOIP tarafından yapılmıştır.

*/
DECLARE @Level int,@Class int,@Race int,@NewPoint int,@STR int,@HP int, @DEX int,@INT int,@MP int
DECLARE @StatTotal int

SELECT @Level = Level,@Class = Class,@Race = Race,@STR = Strong,@HP = Sta,@DEX = Dex,@INT = Intel,@MP = Cha FROM USERDATA WHERE strUserId = @strUserID

SET @StatTotal = @STR + @HP + @DEX + @INT + @MP


IF @Level >= 74 AND @StatTotal <= 350
BEGIN

IF @Level = 74
SET @NewPoint = 210
IF @Level = 75
SET @NewPoint = 215
IF @Level = 76
SET @NewPoint = 220
IF @Level = 77
SET @NewPoint = 225
IF @Level = 78
SET @NewPoint = 230
IF @Level = 79
SET @NewPoint = 235
IF @Level = 80
SET @NewPoint = 240
IF @Level = 81
SET @NewPoint = 245
IF @Level = 82
SET @NewPoint = 250
IF @Level = 83
SET @NewPoint = 255




IF (@Class = 201) OR (@Class = 205) OR (@Class = 206) OR (@Class = 101) OR (@Class = 105) OR (@Class = 106)
BEGIN

IF @Race = 1
UPDATE USERDATA Set Strong = 65 + 57,Sta = 60,Dex = 65,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 12
UPDATE USERDATA Set Strong = 60 + 57,Sta = 70,Dex = 60,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 13
UPDATE USERDATA Set Strong = 50 + 57,Sta = 70,Dex = 50,Intel = 70,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId

END
ELSE IF (@Class = 202) OR (@Class = 207) OR (@Class = 208) OR (@Class = 102) OR (@Class = 107) OR (@Class = 108)
BEGIN

IF @Race = 2
UPDATE USERDATA Set Strong = 60,Sta = 70,Dex = 60 + 57,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 12
UPDATE USERDATA Set Strong = 60,Sta = 70,Dex = 60 + 57,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 13
UPDATE USERDATA Set Strong = 50,Sta = 70,Dex = 50 + 57,Intel = 70,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId

END
ELSE IF (@Class = 203) OR (@Class = 209) OR (@Class = 210) OR (@Class = 103) OR (@Class = 109) OR (@Class = 110)
BEGIN

IF @Race = 3
UPDATE USERDATA Set Strong = 50,Sta = 70,Dex = 50,Intel = 70 + 15,Cha = 50 + 42,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 12
UPDATE USERDATA Set Strong = 60,Sta = 70,Dex = 60,Intel = 50 + 15,Cha = 50 + 42,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 13
UPDATE USERDATA Set Strong = 50,Sta = 70,Dex = 50,Intel = 70 + 15,Cha = 50 + 42,Points = @NewPoint WHERE strUserId = @strUserId

END
ELSE IF (@Class = 204) OR (@Class = 211) OR (@Class = 212) OR (@Class = 104) OR (@Class = 111) OR (@Class = 112)
BEGIN

IF @Race = 4
UPDATE USERDATA Set Strong = 60 + 17,Sta = 70 + 15,Dex = 60,Intel = 50 + 25,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 2
UPDATE USERDATA Set Strong = 50 + 17,Sta = 60 + 15,Dex = 60,Intel = 70 + 25,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 12
UPDATE USERDATA Set Strong = 60 + 17,Sta = 70 + 15,Dex = 60,Intel = 50 + 25,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 13
UPDATE USERDATA Set Strong = 50 + 17,Sta = 70 + 15,Dex = 50,Intel = 70 + 25,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId

END

END


/* Add this EXEC REPAIR_USER_STAT_POINT above RETURN @@ROWCOUNT*/

/* Credits to AKUMA*/
GO

Made By Parabola

Saygılar!

Hiç yorum yok: