Jump to content
  • 0
dow

Overhead

Question

Please can you help me to edit this part of source code ?

Only player who have clic on NPC can see the message.

thx a lot !

/// Public chat message (ZC_NOTIFY_CHAT). lordalfa/Skotlex - used by @me as well/// 008d <packet len>.W <id>.L <message>.?Bvoid clif_disp_overhead(struct block_list *bl, const char* mes){	unsigned char buf[256]; //This should be more than sufficient, the theoretical max is CHAT_SIZE + 8 (pads and extra inserted crap)	size_t len_mes = strlen(mes)+1; //Account for 0	if (len_mes > sizeof(buf)-8) {		ShowError("clif_disp_overhead: Message too long (length %"PRIuS")n", len_mes);		len_mes = sizeof(buf)-8; //Trunk it to avoid problems.	}	// send message to others	WBUFW(buf,0) = 0x8d;	WBUFW(buf,2) = len_mes + 8; // len of message + 8 (command+len+id)	WBUFL(buf,4) = bl->id;	safestrncpy((char*)WBUFP(buf,8), mes, len_mes);	clif->send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC);	// send back message to the speaker	if( bl->type == BL_PC ) {		WBUFW(buf,0) = 0x8e;		WBUFW(buf, 2) = len_mes + 4;		safestrncpy((char*)WBUFP(buf,4), mes, len_mes);		clif->send(buf, WBUFW(buf,2), bl, SELF);	}} 

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

 // send message to others    WBUFW(buf,0) = 0x8d;    WBUFW(buf,2) = len_mes + 8; // len of message + 8 (command+len+id)    WBUFL(buf,4) = bl->id;    safestrncpy((char*)WBUFP(buf,8), mes, len_mes);    clif->send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC);

Remove this part.

Share this post


Link to post
Share on other sites
  • 0

This is possible if you get the rid from script_state struct if the block list is BL_NPC. then get bl using id2bl and send the message using bl.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.