CREATE PROCEDURE JrAvalanche
@id char(100)
AS
declare @lwl char(10)
select @lwl = level from userdata where struserid = @id
if @lwl = '80'
begin
update userdata set points = points + 3 where struserid = @id and e** = '500000000'
update userdata set level = '81' where struserid = @id and e** = '500000000'
update userdata set e** = '0' where struserid = @id and e** = '500000000'
end
if @lwl = '81'
begin
update userdata set points = points + 3 where struserid = @id and e** = '500000000'
update userdata set level = '82' where struserid = @id and e** = '500000000'
update userdata set e** = '0' where struserid = @id and e** = '500000000'
end
if @lwl = '82'
begin
update userdata set points = points + 3 where struserid = @id and e** = '500000000'
update userdata set level = '83' where struserid = @id and e** = '500000000'
update userdata set e** = '0' where struserid = @id and e** = '500000000'
end
GO
LOAD_USER_DATA KODU BULUN
SELECT Nation, Race, Class, HairColor, Rank, Title, [Level], [E**], Loyalty, Face, City, Knights, Fame,
Hp, Mp, Sp, Strong, Sta, Dex, Intel, Cha, Authority, Points, Gold, [Zone], Bind, PX, PZ, PY, dwTime, strSkill, strItem,strSerial, sQuestCount, strQuest, MannerPoint, LoyaltyMonthly
FROM USERDATA WHERE strUserId = @id
Hemen Ustunde Bunu Koyun
exec JrAvalanche @id
EGER 83 LWL YAPTIYSANIZ STAT SIFIRLAMADA BUG VARSA KOD !!
CREATE PROCEDURE REPAIR_USER_STAT_POINT
@strUserID varchar(21)
AS
/*
Author : JrAvalanche
83 Level sınırına göre düzenleme JrAvalanche 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 JrAvalanche*/
GO