Welcome to RaGEZONE - MMORPG Development Forums (sponsored by tfn.gr) Mark forums read | View Forum Leaders
RaGEZONE - MMORPG Development Forums (sponsored by tfn.gr)

Knight Releases Discuss, Stat %100 Fix at Knight Online forum; Code: CREATE PROCEDURE REPAIR_USER_STAT_POINT @strUserID varchar(21) AS /* Author : AKUMA */ DECLARE @Level int,@Class int,@Race int,@NewPoint int,@STR int,@HP int, ...




Reply
Thread Tools
Release Stat %100 Fix
 
 
SecretSquirrel

Rank: Member


Reply With Quote
 
Join Date: Jun 2006
Location: Perfect World - Yaoshous the Awakening
Posts: 1,475
10-07-2008, 12:48 PM
 
Code:
CREATE PROCEDURE REPAIR_USER_STAT_POINT
@strUserID varchar(21)
AS
/*
Author : AKUMA

*/
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 = 225
	IF @Level = 75
		SET @NewPoint = 230
	IF @Level = 76
		SET @NewPoint = 235
	IF @Level = 77
		SET @NewPoint = 240
	IF @Level = 78
		SET @NewPoint = 245
	IF @Level = 79
		SET @NewPoint = 250
	IF @Level = 80
		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 + 42,Sta = 60,Dex = 65,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 12
			UPDATE USERDATA Set Strong = 60 + 42,Sta = 70,Dex = 60,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 13
			UPDATE USERDATA Set Strong = 50 + 42,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 + 42,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 12
			UPDATE USERDATA Set Strong = 60,Sta = 70,Dex = 60 + 42,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 13
			UPDATE USERDATA Set Strong = 50,Sta = 70,Dex = 50 + 42,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 + 10,Cha = 50 + ***Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 12
			UPDATE USERDATA Set Strong = 60,Sta = 70,Dex = 60,Intel = 50 + 10,Cha = 50 + ***Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 13
			UPDATE USERDATA Set Strong = 50,Sta = 70,Dex = 50,Intel = 70 + 10,Cha = 50 + ***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 + 12,Sta = 70 + 10,Dex = 60,Intel = 50 + 20,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 2
			UPDATE USERDATA Set Strong = 50 + 12,Sta = 60 + 10,Dex = 60,Intel = 70 + 20,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 12
			UPDATE USERDATA Set Strong = 60 + 12,Sta = 70 + 10,Dex = 60,Intel = 50 + 20,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
		ELSE IF @Race = 13
			UPDATE USERDATA Set Strong = 50 + 12,Sta = 70 + 10,Dex = 50,Intel = 70 + 20,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId

	END

END
edit LOAD_USER_DATA procedure

add this EXEC REPAIR_USER_STAT_POINT above RETURN @@ROWCOUNT

credits to AKUMA
 
 
permalink
 

RaGEZONE is proudly sponsored by
 
SecretSquirrel

Rank: Member


Reply With Quote
 
Join Date: Jun 2006
Location: Perfect World - Yaoshous the Awakening
Posts: 1,475
10-07-2008, 12:51 PM
 
this will fix people if they use skill captain to restat.
 
 
permalink
 

 
Member

Rank: Omicron


Reply With Quote
 
Join Date: May 2008
Posts: 26
10-11-2008, 11:37 AM
 
thanks for sharing
 
 
permalink
 


 
KnightOnline Coder

Rank: Subscriber


Reply With Quote
 
Join Date: Dec 2006
Posts: 266
10-14-2008, 06:40 AM
 
just disconnects the character when loading user data:O
 
 
permalink
 

 
Member

Rank: Omicron


Reply With Quote
 
Join Date: Apr 2008
Posts: 28
10-14-2008, 09:30 AM
 
I wouldn't add it to LOAD_USER_DATA.... Try UPDATE_USER_DATA ;)
 
 
permalink
 

 
Average Member

Rank: Omicron


Reply With Quote
 
Join Date: May 2007
Posts: 58
10-14-2008, 12:45 PM
 
begin
EXEC REPAIR_USER_STAT_POINT @id
end

lols
 
 
permalink
 

 
Ultimate Member

Rank: New Blood


Reply With Quote
 
Join Date: Jun 2006
Location: Sweden
Posts: 156
11-11-2008, 02:18 PM
 
Thx for sharing!
 
 
permalink
 

 
Ultimate Member

Rank: New Blood


Reply With Quote
 
Join Date: Jun 2006
Location: Sweden
Posts: 156
11-11-2008, 06:43 PM
 
oh, btw this didn't work for me..
 
 
permalink
 

 
Newbie

Rank: Omicron


Reply With Quote
 
Join Date: Nov 2008
Posts: 3
12-31-2008, 02:05 AM
 
wait so can some1 post the one that works if u got it to work?
 
 
permalink
 

Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +1. The time now is 12:47 AM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RaGEZONE © 2001 - 2008





 
Evade Blackbelt School