• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook pagefor updates, or we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.)

Messenger and nickname problem

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jan 28, 2011
Messages
17
Reaction score
0
Hello all :)

I got my server to work thanks to this forum :D
but I have a some questions.

I couldnt seem to find any threads that fix the messenger, or get it to work, everytime i add buddy, they don't see it and it disappears when i login, it says "retrieving buddy list".

and is there any way to get your in-game-name saved?
everytime i change my IGN it changes back to my username when i relog :)

any help is appreciated :D thanks!

( sorry if this is already discussed somewhere else, i did use the search button but couldnt find anything :(: )
 
Joined
Jul 18, 2009
Messages
392
Reaction score
129
For the Messenger, I have the same problem and am still trying to find out a way to fix it. However, so far no luck for me.

About the nickname changing...there is a way to make it available, but not ingame.
What I did was create a simple PHP script where people can update their nickname free of charge.
Now, I'm no professional PHP coder and don't have a lot of knowledge about PHP to begin with. So my script will probably be a mess when a real PHP coder looks at it :p

But that's your best bet for now until we found a way to fix these issues.

If you are interested in the PHP script, however, feel free to send me a PM, and I'll send you my script.
 
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
For the messenger: It's simple to fix, the logs will tell you that a procedure is missing. Simply stub it and friends will work.

As for the nickname update: Works fine. Go to the game settings, in the tab "game" is a field "Nickname" you can use to update your nickname.
 
Junior Spellweaver
Joined
Nov 12, 2010
Messages
169
Reaction score
69
About the nickname changing...there is a way to make it available, but not ingame.

Oh weird o_O
I have no problem to change the nickname ingame as Tsukasa said above : in the options! button on top right of the screen. Have you any error message in the log ?
 
Last edited:
Joined
Jul 18, 2009
Messages
392
Reaction score
129
No errors or references to nickname changing in my logs, no.

It does change the nickname, but as soon as you re-login, it's back to the old name.
AKA it doesn't insert the new nickname into the DB which probably means it doesn't call for the procedure?

@Tsukasa: Thanks for your guideline there, fixed Messenger ;)
 
Last edited:
Creator of Code
Joined
Mar 5, 2006
Messages
371
Reaction score
131
USE [Pangya_S4_TH]
GO
/****** Object: StoredProcedure [dbo].[USP_NICKNAME_UPDATE] Script Date: 02/01/2011 22:12:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[USP_NICKNAME_UPDATE]
@x int,
@y varchar(20)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
DECLARE @Occupied INT
EXEC @Occupied = [dbo].[USP_NICKNAME_CHECK] @y
IF @Occupied = 0 BEGIN
UPDATE Pangya_Member_Info
SET NickName = @y WHERE userid = @x
SELECT 0
END
ELSE BEGIN
SELECT 1
END
END

Try that one
 
Newbie Spellweaver
Joined
Jan 28, 2011
Messages
17
Reaction score
0
For the messenger: It's simple to fix, the logs will tell you that a procedure is missing. Simply stub it and friends will work.

As for the nickname update: Works fine. Go to the game settings, in the tab "game" is a field "Nickname" you can use to update your nickname.

hmm, i don´t see in the logs that a procedure is missing.
so I'm kinda stuck here :(:
 
Joined
Jul 18, 2009
Messages
392
Reaction score
129
People might not like it if I do this, but the procedure that's being called is dbo.USP_GUILD_MEMBER_LIST

The rest is something you'll just have to figure out ;)
I did the same.
 
Junior Spellweaver
Joined
May 26, 2005
Messages
101
Reaction score
6
People might not like it if I do this, but the procedure that's being called is dbo.USP_GUILD_MEMBER_LIST

The rest is something you'll just have to figure out ;)
I did the same.
go on... share the rest :D
 
Joined
Jul 18, 2009
Messages
392
Reaction score
129
There isn't much more to share actually ;)

I'll try to explain.

What you should see in the logs of your messenger server is that it calls for a procedure. This procedure is called "dbo.USP_GUILD_MEMBER_LIST".

Your next step would be opening up SQL and checking if the procedure exists.
In our case, the procedure is missing.

Normally this means you will have to write the complete procedure, but as we can figure out what the procedure does, it's not necessary.
In my opinion, this procedure reads the list of guild members on the "Guild" tab in the Messenger, but since we have no guilds, we don't really care if that works or not :D


Now for the way to fix it.
Simply create the new Stored Procedure.
The way you do this depends on you. I just copied another procedure and changed the name of the procedure.

This is my final procedure:
Code:
USE [Pangya_S4_TH]
GO
/****** Object:  StoredProcedure [dbo].[USP_GUILD_MEMBER_LIST]    Script Date: 02/02/2011 02:40:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROC [dbo].[USP_GUILD_MEMBER_LIST] (    
	   @UID			INT	= 0     
	 , @CARD_TYPE	TINYINT	= 9 -- add : 2009-06-04
	 , @CARD_TYPEID INT = 0  
	 , @QTY			INT	= 0
	 , @TYPES		TINYINT = 1
	 , @OUTPUT		INT = -1
	 , @RESULT		INT = 0			OUTPUT
	 , @OUT_CARD_ITEMID BIGINT = 0	OUTPUT  
)     
-- -- WITH ENCRYPTION
AS
     
/*********************************************  
	카드 추가  대부분 카드팩/개별카드
	2009-04-29, GOMI97

	2009-06-03, GOMI97
	- USP_CARDBOX_USRS 통합

	# CARD_TYPE
	0 : 캐릭터
	1 : 캐디
	2 : 스페셜
	3 : 팡야카드팩 V1, 골드, 실버, 브론즈 
	4 : 카드박스


	# ERRCODE
	 0 : 성공
	 1 : 실패 (SYS ERR)
	 9 : CARD_TYPE 없음
	 4 : 요청된 CARD_TYPEID ROWCOUNT 중복
	 6 : 해당 UID 없음
	 2 : ERR 횟수가 2 - 비정상적인 케이스임 

	#USAGE :

	DECLARE @CARD_PUSH_ERR  INT
	EXEC USP_CARD_PUSH_S4 3556218, 2088763599, 1, 'SHOP', @CARD_PUSH_ERR OUTPUT

	SELECT @CARD_PUSH_ERR

***********************************************/    
BEGIN     
SET NOCOUNT ON    
  
	DECLARE @CARD_ITEMID BIGINT, @ERR TINYINT, @TOT_QTY INT

	SET @ERR = 0
	SET @CARD_ITEMID = 0
	SET @TOT_QTY = 0

	IF EXISTS ( SELECT 1 FROM PANGYA_MEMBER_INFO WHERE UID = @UID ) BEGIN
		
		-- #0. CHECK CARD
		SELECT	@CARD_ITEMID = CARD_ITEMID, @TOT_QTY = ( QTY + @QTY )
		FROM	DBO.TD_CARD_USRS  
		WHERE	UID = @UID 
		  AND	CARD_TYPEID = @CARD_TYPEID 
		  AND	USE_YN = 'Y' 
		  AND	QTY > 0 
		  AND	END_DT IS NULL

		BEGIN TRAN
 		
		IF ( @CARD_ITEMID > 0 AND @CARD_TYPE < 4 ) BEGIN  

				UPDATE	DBO.TD_CARD_USRS  
				SET		QTY = @TOT_QTY
						, GET_DT = GETDATE()     
				WHERE	UID = @UID   
				  AND	CARD_ITEMID =  @CARD_ITEMID   

				SELECT @ERR = CASE WHEN (@@ERROR != 0) THEN @ERR + 1 ELSE 0 END   

		      
		END ELSE IF ( @CARD_ITEMID = 0 OR @CARD_TYPE >= 4 ) BEGIN
  
			IF ( @CARD_TYPE = 9 ) BEGIN 
				SELECT	@CARD_TYPE = COM0  
				  FROM	DBO.PANGYA_ITEM_TYPELIST  
				 WHERE	TYPEID = @CARD_TYPEID  
				   AND	TYPE = 31 
			END

			IF ( @CARD_TYPE = 9 ) BEGIN 
				SET @ERR = 9 -- 해당 @CARD_TYPE 없음
			END ELSE BEGIN
		  
				INSERT INTO DBO.TD_CARD_USRS (UID, CARD_TYPEID, CARD_TYPE, QTY, GET_DT, USE_YN)  
				SELECT @UID, @CARD_TYPEID, @CARD_TYPE, @QTY, GETDATE(), 'Y'

				SELECT @ERR = CASE WHEN (@@ERROR != 0) THEN @ERR + 1 ELSE 0 END, @CARD_ITEMID = SCOPE_IDENTITY(), @TOT_QTY = @QTY    
	 
			END

		END

			IF ( @ERR = 0 ) BEGIN
				COMMIT TRAN
				SELECT @RESULT = @ERR, @OUT_CARD_ITEMID = @CARD_ITEMID		

				IF ( @OUTPUT <> -1 ) SELECT ERRCODE = @ERR, CARD_ITEMID = @CARD_ITEMID, QTY = @TOT_QTY, ADD_QTY = @QTY
				
		 
			END ELSE BEGIN
				ROLLBACK TRAN
				SELECT @RESULT = @ERR, @OUT_CARD_ITEMID = @CARD_ITEMID	

				IF ( @OUTPUT <> -1 ) SELECT ERRCODE = @ERR, CARD_ITEMID = @CARD_ITEMID, QTY = @TOT_QTY, ADD_QTY = 0 
			END


	END ELSE BEGIN
		-- PANGYA_UID NOT MATCH
		SELECT @ERR = 6
		SELECT @RESULT = @ERR, @OUT_CARD_ITEMID = @CARD_ITEMID		

		IF ( @OUTPUT <> -1 ) SELECT ERRCODE = @ERR, CARD_ITEMID = @CARD_ITEMID, QTY = @TOT_QTY, ADD_QTY = @QTY
		
	END 

	-- FINAL NEW CARD LOG	
	INSERT INTO Pangya_S4_TH.DBO.TZ_CARD_LOG (TYPES, ERRCODE, UID, ORI_ITEMID, CARD_ITEMID, CARD_TYPEID, QTY, FINAL_QTY, REGDATE)
	SELECT @TYPES, ERRCODE = @ERR, @UID, ORI_CARD_ITEMID = 0, CARD_ITEMID = @CARD_ITEMID, CARD_TYPEID = @CARD_TYPEID, 
			ADD_QTY = CASE WHEN (@ERR != 0) THEN 0 ELSE @QTY END, QTY = @TOT_QTY, GETDATE()
	-- FINAL NEW CARD LOG

END

I know, the content of the procedure doesn't make any sense, because it's from one of the Card Procedures. But the important thing is that the Procedure the messenger server looks for, exists.
Once you have updated this procedure, you'll find your Messenger working like a charm :)
 
Junior Spellweaver
Joined
May 26, 2005
Messages
101
Reaction score
6
Well since i don't have guild also, i don't know what output the game will show...

so i made this proc instead...

Code:
USE [Pangya_S4_TH]
GO
/****** Object:  StoredProcedure [dbo].[USP_GUILD_MEMBER_LIST]    Script Date: 02/02/2011 08:31:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE proc [dbo].[USP_GUILD_MEMBER_LIST]    
@userid  int
-- WITH ENCRYPTION      
as      

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED


SELECT top 50 TD_GUILD_INFO.GUILD_ID ,       
  TD_GUILD_INFO.GUILD_NAME,       
             TD_GUILD_INFO.NUMOFUSERS       
FROM  dbo.TD_GUILD_USER_LIST    INNER JOIN      
           dbo.TD_GUILD_INFO   

ON TD_GUILD_USER_LIST.GUILD_IDX = TD_GUILD_INFO.GUILD_ID       
WHERE   TD_GUILD_USER_LIST.UID = @userid

again... i don't know if this correct or not ingame :laugh:
 
Newbie Spellweaver
Joined
Jan 28, 2011
Messages
17
Reaction score
0
i created the dbo.USP_GUILD_MEMBER_LIST as you said.

but when i try it, the messenger still says retrieving friend list :S
 
Joined
Jul 18, 2009
Messages
392
Reaction score
129
Search your MSG Server Log for errors regarding retrieving the friendlist.
If it shows any errors or procedure calls, post those and we might be able to help you further.
I'm using the default database on my server and just adding the procedure fixed it for me.
 
Newbie Spellweaver
Joined
Jan 28, 2011
Messages
17
Reaction score
0
*edit*

Messenger is working now :D THANK YOU!!
 
Last edited:
Status
Not open for further replies.
Back
Top