[HELP]Wild Stats When Character Created

10/01/2011 12:16 [Admin]Jet#1
Hey Guys,

Got a little problem. When we create a character in game and level up the stats become all wonky. I.e: the kills are like 14k deaths like 9k and you can hit for a 15k crit.

Anyone know how to solve this? will be greatly appreciated.

Thanks.

Jet
10/01/2011 12:58 Xx.LaMin.xX#2
Check [dbo].[usp_Create_Char_R] in your PS_GameData. There is must some edited stuffs like you said. If you dont understand what it in the query post it here i will help you.
10/01/2011 13:09 [Admin]Jet#3
Hey lamin thanks for you reply, i looked at the sp and stll cant figure it out so heres the query:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO


/****** Object: Stored Procedure dbo.usp_Create_Char_R Script Date: 2008-6-7 18:31:57 ******/

/****** Object: Stored Procedure dbo.usp_Create_Char_R Script Date: 2008/3/15 下午 05:25:51 ******/


/****** 偃羹: 盪濰 煎衛盪 dbo.usp_Create_Char_R 蝶觼董 陳瞼: 2006-05-26 螃 1:54:44 ******/

ALTER Proc [dbo].[usp_Create_Char_R]

@ServerID tinyint,
@UserID varchar(18),
@UserUID int,
@CharName varchar(50) ,

@Slot Tinyint,
@Family Tinyint,
@Grow Tinyint,
@Hair Tinyint,
@Face Tinyint,
@Size Tinyint,
@Job Tinyint,
@Sex Tinyint,
@Level Smallint,
@Statpoint Smallint,
@Skillpoint Smallint,
@Str Smallint,
@Dex Smallint,
@Rec Smallint,
@Int Smallint,
@Luc Smallint,
@Wis Smallint,
@Hp Smallint,
@Mp Smallint,
@Sp Smallint,
@Map Smallint,
@Dir Smallint,
@Exp Int,
@Money Int,
@Posx Real,
@Posy Real,
@Posz Real,
@Hg Smallint,
@Vg Smallint,
@Cg Tinyint,
@Og Tinyint,
@Ig Tinyint,


/* 罹晦梱雖 檣濠高 輿橫螳撿  */

/* SP 頂睡 霤褻辨 滲熱 */

@CharID int = 0,
@NameCnt tinyint = 0

AS

SET NOCOUNT ON

SET @CharName = LTRIM(RTRIM(@CharName))
SET @SkillPoint = 5



IF EXISTS ( SELECT CharID FROM Chars WHERE CharName=@CharName AND Del=0)
BEGIN
RETURN -2
END
ELSE
BEGIN
INSERT INTO Chars(ServerID,UserUID, CharName, Slot, Family, Grow,
Hair, Face, [Size], Job, Sex, [Level], StatPoint, SkillPoint,
[Str], Dex, Rec, [Int], Luc, Wis, HP, MP, SP, Map, Dir, [Exp], [Money],
PosX, PosY, Posz, Hg, Vg, Cg, Og, Ig, RenameCnt, RemainTime)

VALUES(@ServerID, @UserUID, @CharName, @Slot, @Family, @Grow,
@Hair, @Face, @Size, @Job, @Sex, @Level, @StatPoint, @SkillPoint,
@Str, @Dex, @Rec, @Int, @Luc, @Wis, @HP, @MP, @SP, @Map, @Dir, @Exp, @Money,
@PosX, @PosY, @Posz, @Hg, @Vg, @Cg, @Og, @Ig, 0,0)

IF ( @@ERROR<>0 )
RETURN -1

SET @CharID = IDENT_CURRENT('Chars')
RETURN @CharID
END


SET NOCOUNT OFF
10/01/2011 16:15 JuuF#4
hmm did you clear PS_GameData? sometimes it makes bug like this. Just reattach it.
10/01/2011 16:21 Xx.LaMin.xX#5
Ok change this
Quote:
INSERT INTO Chars(ServerID,UserUID, CharName, Slot, Family, Grow,
Hair, Face, [Size], Job, Sex, [Level], StatPoint, SkillPoint,
[Str], Dex, Rec, [Int], Luc, Wis, HP, MP, SP, Map, Dir, [Exp], [Money],
PosX, PosY, Posz, Hg, Vg, Cg, Og, Ig, RenameCnt, RemainTime)

VALUES(@ServerID, @UserUID, @CharName, @Slot, @Family, @Grow,
@Hair, @Face, @Size, @Job, @Sex, @Level, @StatPoint, @SkillPoint,
@Str, @Dex, @Rec, @Int, @Luc, @Wis, @HP, @MP, @SP, @Map, @Dir, @Exp, @Money,
@PosX, @PosY, @Posz, @Hg, @Vg, @Cg, @Og, @Ig, 0,0)
To This
Quote:
INSERT INTO Chars(ServerID,UserUID, CharName, Slot, Family, Grow,
Hair, Face, [Size], Job, Sex, [Level], StatPoint, SkillPoint,
[Str], Dex, Rec, [Int], Luc, Wis, HP, MP, SP, Map, Dir, [Exp], [Money],
PosX, PosY, Posz, Hg, Vg, Cg, Og, Ig, RenameCnt, RemainTime,K1,K2)

VALUES(@ServerID, @UserUID, @CharName, @Slot, @Family, @Grow,
@Hair, @Face, @Size, @Job, @Sex, @Level, @StatPoint, @SkillPoint,
0, 0, 0, 0, 0, 0, @HP, @MP, @SP, @Map, @Dir, @Exp, @Money,
@PosX, @PosY, @Posz, @Hg, @Vg, @Cg, @Og, @Ig, 0,0,0,0)
Red color is what i changed.

Can you check if you have any triggers for dbo.Chars table? if yes post it on here.
10/01/2011 17:53 [Admin]Jet#6
thanks Lamin and i dont have any triggers for the table
10/01/2011 18:38 Xx.LaMin.xX#7
Okay good then just add the one i edited. It will work like a charm :). Good luck my friend.
10/01/2011 20:07 [Admin]Jet#8
thanks bro, i got another small question. Were getting dc'ed fter login but not sure why any ideas?
10/01/2011 23:00 cantdoit666#9
Quote:
Originally Posted by Xx.LaMin.xX View Post
Ok change this


To This


Red color is what i changed.

Can you check if you have any triggers for dbo.Chars table? if yes post it on here.
One question Lamin, should createcharR always look like this or just in this specific case only? mine looks like the one that Jet has. just a thought.
10/02/2011 10:47 [Admin]Crip#10
Thank you Lamin! :D
10/02/2011 10:59 Xx.LaMin.xX#11
@Jet: can you please post the log from server? so i can see it.

@cantdoit666: Yes that is standard query. But sometime you have bugs on server so you must rewrite some queries by your own. =)

and all you dont spam the thanks XD Mod or Guardian will warn you. Just hit the Thanks button. =)
10/02/2011 20:17 cantdoit666#12
Well Ive have a bug where kills just start decreasing for players at a certain rate, until i restarted the server and then it went away. and also a bug where bosses ( sera angel and some GRB ones ) respawn 10 seconds after death.. im wondering if i fix that quiry like you put it will only help and not hurt right?
10/02/2011 22:01 viper4513#13
Considering that Stored Procedure is for Created Chars only.. it wont affect your bosses atall.
10/02/2011 22:05 Xx.LaMin.xX#14
about those GRB bosses or mobs are DB side. You need to fix the mobs table or try to get better DB. I had it before (1,5 year ago).. i think i used new DB . It worked fine after that. So try to get better DB somewhere on this site :P
10/02/2011 22:59 cantdoit666#15
Quote:
Originally Posted by viper4513 View Post
Considering that Stored Procedure is for Created Chars only.. it wont affect your bosses atall.
Hence why i said "and also"
and thanks lamin for the answers. this helped.