Overhead

dow

New member
Messages
4
Points
0
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 !

Code:
/// 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);	}} 
 
// 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.

 
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.

 
Back
Top