This is where you locate your file : [ File Location: trunk/src/map/atcommand.c ]
Find:
ACMD_FUNC(reloadmsgconf)
{
map_msg_reload();
clif_displaymessage(fd, msg_txt(sd,463)); // Message configuration has been reloaded.
return 0;
}
Add below:
ACMD_FUNC(afk)
{
nullpo_retr(-1, sd);
trade_tradeack(sd,4);
sd->state.autotrade = 1;
if( battle_config.at_timeout )
{
int timeout = atoi(message);
status_change_start(&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0);
}
clif_authfail_fd(fd, 15);
return 0;
}
Find:
AtCommandInfo atcommand_base[] = {
Add below:
ACMD_DEF(afk),