ACMD_DEF(afk),
atcommand.c: In function 'atcommand_afk':atcommand.c:9444: warning: implicit declaration of function 'trade_tradeack'atcommand.c:9452: warning: implicit declaration of function 'clif_authfail_fd'atcommand.c:9485: warning: implicit declaration of function 'clif_displaymessage'atcommand.c: In function 'atcommand_basecommands':atcommand.c:9752: warning: initialization from incompatible pointer type/*==========================================* @afk by Rad, built on by Tubby * same as autotrade, but works without vending*------------------------------------------*/int atcommand_afk(const int fd, struct map_session_data* sd, const char* command, const char* message){nullpo_retr(-1, sd);if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag ){if (!message || !*message) {chat_createpcchat(sd, "(@afk) Away", "", 1, 1);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);}if((strlen(message) < 0)||(strlen(message) > 36)) {chat_createpcchat(sd, "(@afk) Away", "", 1, 1);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);}chat_createpcchat(sd, message, "", 1, 1);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);} elseclif_displaymessage(fd, "AFK is not allowed on this map.");return 0;}And also addInto src/map/atcommand.cCode:ACMD_DEF(afk),
There's some plugin version floating around that I've not been able to get working.
/** * Fills the reference of available commands in atcommand DBMap **/
ACMD_DEF(channel), ACMD_DEF(fontcolor), ACMD_DEF(searchstore), ACMD_DEF(costume), ACMD_DEF(afk),
i think you need to change them toatcommand.c: In function 'atcommand_afk':atcommand.c:9444: warning: implicit declaration of function 'trade_tradeack'
atcommand.c:9452: warning: implicit declaration of function 'clif_authfail_fd'
atcommand.c:9485: warning: implicit declaration of function 'clif_displaymessage'
atcommand.c: In function 'atcommand_basecommands':
atcommand.c:9752: warning: initialization from incompatible pointer type
trade->tradeack
clif->authfail_fd
clif->displaymessage
I paste before this lineYou did something wrong, then.
Place the first bit of code right above:
/** * Fills the reference of available commands in atcommand DBMap **/The second bit of code, further down in the file, like so:Works fine for me when placed in the correct location. /wahCode:ACMD_DEF(channel), ACMD_DEF(fontcolor), ACMD_DEF(searchstore), ACMD_DEF(costume), ACMD_DEF(afk),
ACMD_DEF(afk),
ACMD(afk){ nullpo_retr(-1, sd); if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag ){ chat_createpcchat(sd, "Be Right Back", "", 1, 1); 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->chsys_quit(sd); clif->authfail_fd(sd->fd, 15); }else{ clif->message(fd, "AFK is not allowed on this map."); } return 0;}
We use essential cookies to make this site work, and optional cookies to enhance your experience.