bWolfie 138 Posted May 29, 2017 (edited) In the following code in channel.c, when your tick is not at 0 it will direct you to message 1455, "You're talking too fast!" if (sd && chan->msg_delay != 0 && DIFF_TICK(sd->hchsysch_tick + chan->msg_delay*1000, timer->gettick()) > 0 && !pc_has_permission(sd, PC_PERM_HCHSYS_ADMIN)) { clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,1455)); return; } I wish to display the remaining ticks (seconds) instead of a static message. E.g. message 1455, "You cannot send a message to this channel for another %d seconds." Thanks. Edited May 29, 2017 by True Zeal Quote Share this post Link to post Share on other sites
0 bWolfie 138 Posted June 2, 2017 Let me rephrase my question... How do I send clifmessage->so it can send a number to %d in messages.conf? Quote Share this post Link to post Share on other sites
0 bWolfie 138 Posted June 5, 2017 Bumping this to say I found the solution and wanted to post it for future users. In channel.c, find: clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,1455)); Replace with: char output[150]; sprintf(output, msg_txt(1550), DIFF_TICK(sd->hchsysch_tick + chan->msg_delay*1000, timer->gettick()) / 1000); // "You cannot send a message to this channel for another %d seconds." clif->messagecolor_self(sd->fd, COLOR_RED, output); In messages.conf, create a new custom message. In the example above, 1550 was used. You should use whatever the next available one is. 1550: You cannot send a message to this channel for another %d seconds. Quote Share this post Link to post Share on other sites
In the following code in channel.c, when your tick is not at 0 it will direct you to message 1455, "You're talking too fast!"
I wish to display the remaining ticks (seconds) instead of a static message. E.g. message 1455, "You cannot send a message to this channel for another %d seconds."
Thanks.
Edited by True ZealShare this post
Link to post
Share on other sites