[GSP] How can I fix error message when creating character? + be able to delete

smoochy boys on tour

GotEM

Loyal Member
Loyal Member
Jul 19, 2016
10
0
27
sHoSMHJ.png

Hello LOMCN :)

I get this error every time I try to make a character. I am also unable to delete characters and I think its because of this? How do I fox
 

DjDarkBoyZ

Dev
Golden Oldie
Aug 11, 2006
1,065
228
260
127.Ø.Ø.1
you need to fix the storage procedures of your SQL for the new character and delete character calls.

pd: hello gm of ignis :P

everybody is making new accounts in lomcn to hide from everyone? lol xD
 
Upvote 0

ventus

LOMCN Veteran
Veteran
Oct 17, 2013
926
132
105
These are the correct storage procedures for character create and deleting
Character create
Code:
USE [Game]
GO
/****** Object:  StoredProcedure [dbo].[msp_character_create]    Script Date: 7/19/2016 4:30:50 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        <Author,,Name>
-- Create date: <Create Date,,>
-- Description:    <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[msp_character_create]
    -- Add the parameters for the stored procedure here
     (@mir_userid nvarchar(25), @char_name nvarchar(30), @char_hair tinyint, @char_sex tinyint, @char_job tinyint)

AS 
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    --100- 未知错误
    --101 无法创建超过4个角色
    --102 该角色名已经存在
    --103 该角色名已经存在
    --104+ 未知错误
    --110
    --111
    --112
    --113
    --114

    declare @charcount int

    --if(dbo.vmsf_CheckMainDB()==0) --是否为主数据库 1=yes,0-no
    --begin
    --     OPENQUERY (linked_server ,'query')
    --end

    ----------
    
    --if (dbo.vmsf_CheckLoginId(@mir_userid)=0) --检查用户ID是否存在 并且未被封号(1=ok,0=no)
    --    return 100
    --
    --if exists (select 1 from TBL_GlobalCharacter where FLD_CHARACTERNAME = @char_name) --检查角色名是否已经存在
    --    return 102
    
    declare @errorcode int
    --
    --EXEC @errorcode=[RAccount].[Account].[dbo].[rmsp_character_create] @mir_userid=@mir_userid,@char_name=@char_name
    
    if(@errorcode>0)
    return @errorcode

    select @charcount=count(1) from TBL_CHARACTER where FLD_UserId=@mir_userid and FLD_DELETED=0
    if(@charcount>=4)    --检查拥有角色是否达到4个
        return 101

    -- Insert statements for procedure here
    INSERT into TBL_CHARACTER (
                FLD_CHARACTER, FLD_USERID, FLD_DELETED,FLD_UPDATEDATETIME, FLD_DBVERSION,
                FLD_MAPNAME,FLD_CX, FLD_CY, FLD_DIR, FLD_HAIR,
                FLD_HAIRCOLORR, FLD_HAIRCOLORG, FLD_HAIRCOLORB,FLD_SEX, FLD_JOB, 
                FLD_LEVEL, FLD_GOLD,FLD_HOMEMAP, FLD_HOMEX, FLD_HOMEY, FLD_PKPOINT,
                FLD_ALLOWPARTY, FLD_FREEGULITYCOUNT, FLD_ATTACKMODE,FLD_FIGHTZONEDIE, FLD_BODYLUCK, 
                FLD_INCHEALTH,FLD_INCSPELL, FLD_INCHEALING, FLD_BONUSAPPLY,FLD_BONUSPOINT, 
                FLD_HUNGRYSTATE, FLD_TESTSERVERRESETCOUNT,
                FLD_CGHUSETIME, FLD_ENABLEGRECALL, FLD_BYTES_1, FLD_HORSERACE, FLD_MAKEDATE)
                VALUES
                ( @char_name, @mir_userid, 0, GETDATE(), 0,
                '', 0, 0, 0, @char_hair,
                0, 0, 0, @char_sex, @char_job,
                0, 0,'', 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, 0, 0, 0,
                0, 0, GETDATE())
    --insert into TBL_GlobalCharacter (FLD_CHARACTERNAME) values (@char_name)
    select FLD_CHARACTER=@char_name, FLD_JOB=@char_job, FLD_HAIR=@char_hair, FLD_LEVEL=0, FLD_SEX=@char_sex
    return 0


END

and

Character Deleting
Code:
USE [Game]
GO
/****** Object:  StoredProcedure [dbo].[msp_character_delete]    Script Date: 7/19/2016 4:33:01 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        <Author,,Name>
-- Create date: <Create Date,,>
-- Description:    <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[msp_character_delete]
    -- Add the parameters for the stored procedure here
     (@mir_userid nvarchar(21) , @char_name nvarchar(30), @user_password nvarchar(30))
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
    --101- 删除过程中出现了一个错误
    --102 您输入的密码是无效的
    --103+ 删除过程中出现了一个错误
    --insert into TBL_Temp_LOG (FLD_P1,FLD_P2,FLD_P3,FLD_P4,FLD_P5) values('msp_character_delete',@mir_userid,@char_name,@user_password,GETDATE())

    UPDATE TBL_CHARACTER SET FLD_DELETED=1 WHERE FLD_CHARACTER=@char_name and FLD_USERID=@mir_userid and  EXISTS(select FLD_PASSWORD from GSPAccount.dbo.TBL_ACCOUNT where FLD_USERID=@mir_userid and FLD_PASSWORD=@user_password)
    --101 
    --return 102

    --UPDATE TBL_CHARACTER SET FLD_DELETED=1 WHERE FLD_CHARACTER=@char_name and FLD_DELETED=0 and FLD_USERID=@mir_userid and  exists(select FLD_USERID from [RAccount].[Account].[dbo].[TBL_ACCOUNT] where FLD_USERID=@mir_userid and FLD_PASSWORD=@user_password)
    --select 102

    if(@@ROWCOUNT>0)
    begin
        --EXEC [RAccount].[Account].[dbo].[rmsp_character_delete] @mir_userid=@mir_userid,@char_name=@char_name 
        update TBL_GlobalCharacter set FLD_deleted=1 where FLD_CharacterName=@char_name
        return 0
    end
    else
    begin
        return 102
    end

    SET NOCOUNT OFF;


END




Also login and storage procedures have problems as well... I wasn't able to figure those ones out. :( Could you post correct procedure for them please


Edited*

---------- Post Merged at 11:34 AM ---------- Previous Post was at 11:17 AM ----------

Added the correct storage procedures for character create and character deleting. Hope that helps people who were having problems with creating/deleting characters
 
Last edited:
Upvote 0

GotEM

Loyal Member
Loyal Member
Jul 19, 2016
10
0
27
Thanks that did the job.

Note if you change your database name like I did then you need to edit GSPAccount to your DB name

FLD_PASSWORD from GSPAccount.dbo.TBL_ACCOUNT
 
Upvote 0

ventus

LOMCN Veteran
Veteran
Oct 17, 2013
926
132
105
No problem :) Now we just need to fix the login procedure, if you enter an incorrect password with Capitals and characters like "@&^AW^#@" you can freeze the loginserver for a moment and cause an SQL connect error.

Dj just fixed it for Uncharted, as we all the storage procedures I hope he could post the fixes ;)
 
Upvote 0

GotEM

Loyal Member
Loyal Member
Jul 19, 2016
10
0
27
No problem :) Now we just need to fix the login procedure, if you enter an incorrect password with Capitals and characters like "@&^AW^#@" you can freeze the loginserver for a moment and cause an SQL connect error.

Dj just fixed it for Uncharted, as we all the storage procedures I hope he could post the fixes ;)
Hopefully.

I have come across a problem. Only one of my characters seem to always get disconnect after selection screen. I have heard of this problem with other servers. Reboots do not fix it.

http://i.imgur.com/uvYmBTl.png

Is this a known problem?
 
Upvote 0

ventus

LOMCN Veteran
Veteran
Oct 17, 2013
926
132
105
Hopefully.

I have come across a problem. Only one of my characters seem to always get disconnect after selection screen. I have heard of this problem with other servers. Reboots do not fix it.

http://i.imgur.com/uvYmBTl.png

Is this a known problem?

Ive also heard of this problem but ive never had it myself. Does changing the characters map via sql help at all?
 
Upvote 0

GotEM

Loyal Member
Loyal Member
Jul 19, 2016
10
0
27
Ive also heard of this problem but ive never had it myself. Does changing the characters map via sql help at all?
That did fix it thanks.

Do you know where mob drops / respawn amount/times are located? I can't find them in mir3res.dat
 
Upvote 0

Azura

Mir3 Coder & Adviser
Mar 12, 2005
3,249
111
300
Hopefully.

I have come across a problem. Only one of my characters seem to always get disconnect after selection screen. I have heard of this problem with other servers. Reboots do not fix it.

http://i.imgur.com/uvYmBTl.png

Is this a known problem?

You need to run 7201 and 7202 gates as the servers map are spread across two gates.

If you log out in map 2 (LostParadise) for example you cannot log back in

Also make sure your msp_character_map_info looks like this

ALTER PROCEDURE [dbo].[msp_character_map_info] -- Add the parameters for the stored procedure here
(@mir_userid nvarchar(25),@char_name nvarchar(30))
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;


-- Insert statements for procedure here
-- if exists(select 1 from [Account].dbo.TBL_ACCOUNT where FLD_LOGINID=@mir_userid)
--begin
if exists(select 1 from TBL_CHARACTER where FLD_USERID=@mir_userid)
begin
SELECT FLD_MAPNAME FROM TBL_CHARACTER WHERE FLD_CHARACTER=@char_name
end
--end


END

And make sure you have port 7201 and port 7202 in your ServerGate table
 
Upvote 0

Meteorserver

Dedicated Member
Dedicated Member
Jun 28, 2010
132
6
50
BichonWall
Hi guys, anyone have the delete script working?

I only can erase all characters at once or delete specific characters indicated in the script but I can not automatically detect the name of the user requesting the operation and delete it.

If anyone can help me thx in advance :eagerness:

-- Fixed
 
Last edited:
Upvote 0