Jump to content
  • 0

Regarding the Chat/PUB Room, I don’t really know what its function is.


Mice

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   19
  • Joined:  12/24/18
  • Last Seen:  

I have a custom status effect, a.k.a SC_INVASION_E which is customized. Now I want my custom status to detect if a player is in a chatroom/pub. Initially, I edited chat.cpp in the chat_createpcchat function, and it works for detecting when a chatroom is created. However, my problem is that it doesn’t detect when a player joins a chatroom. To avoid modifying chat.cpp further, I want to handle this detection in my custom status function instead. The issue is that I don’t know the correct function for detecting chatrooms; I used SC_NOCHAT

 

if (sd->sc.getSCE(SC_NOCHAT)) {
	status_change_end(&sd->bl, SC_INVASION_E);
	clif_displaymessage(sd->fd, "Invasion Spirit Off - close/leave chatroom and activate again");
	return 0;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  212
  • Reputation:   94
  • Joined:  06/02/12
  • Last Seen:  

Try chatID.

if( sd->chatID )

 

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   19
  • Joined:  12/24/18
  • Last Seen:  

2 hours ago, Racaae said:

Try chatID.

if( sd->chatID )

 

It work thank you so much

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...