dow 0 Posted August 23, 2015 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); }} Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted August 23, 2015 // 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. Quote Share this post Link to post Share on other sites
0 dow 0 Posted August 23, 2015 hello thx for you reply, i have test, but now it show nothing.... Quote Share this post Link to post Share on other sites
0 Sephus 203 Posted August 29, 2015 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. Quote Share this post Link to post Share on other sites
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 !
Share this post
Link to post
Share on other sites