Thejuster Posted February 26, 2019 Posted February 26, 2019 Hello, anyone know who are function to send message to game? i have find this int channel_send(struct Channel *channel, struct map_session_data *sd, const char *msg) { int idx = 0; if(!channel || !sd || !msg || (idx = channel_pc_haschan(sd, channel)) < 0) return -1; if(!pc_has_permission(sd, PC_PERM_CHANNEL_ADMIN) && channel->msg_delay != 0 && DIFF_TICK(sd->channel_tick[idx] + channel->msg_delay, gettick()) > 0) { clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,1455),false,SELF); //You're talking too fast! return -2; } else { char output[CHAT_SIZE_MAX]; unsigned long color = channel->color; if((channel->opt&CHAN_OPT_COLOR_OVERRIDE) && sd->fontcolor && sd->fontcolor < channel_config.colors_count && channel_config.colors[sd->fontcolor]) color = channel_config.colors[sd->fontcolor]; safesnprintf(output, CHAT_SIZE_MAX, "%s %s : %s", channel->alias, sd->status.name, msg); clif_channel_msg(channel,output,color); sd->channel_tick[idx] = gettick(); } return 0; } Componen\map-server\channel.cpp but im not sure this is a correct function to send message in public chat to field. Quote
Question
Thejuster
Hello, anyone know who are function to send message to game?
i have find this
Componen\map-server\channel.cpp
but im not sure this is a correct function to send message in public chat to field.
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.