PapaZola 32 Posted May 22, 2019 anyone still have patch for @afk with latest github? please share Quote Share this post Link to post Share on other sites
0 Gerzzie 39 Posted May 22, 2019 2 hours ago, PapaZola said: anyone still have patch for @afk with latest github? please share I'm currently using this. hope this would help. src/map/atcommand.cpp Find : #include "../custom/atcommand.inc"Add [ Above ] : Spoiler /*========================================== * @afk *------------------------------------------*/ ACMD_FUNC(afk) { nullpo_retr(-1, sd); sd->state.autotrade = 1; sd->state.monster_ignore = 1; if( battle_config.afk_timeout ) { int timeout = atoi(message); status_change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ((timeout > 0) ? min(timeout,battle_config.afk_timeout) : battle_config.afk_timeout)*60000,0); } clif_authfail_fd(fd, 15); return 0; } Find : }; AtCommandInfo* atcommand; Add [ Above ] : Spoiler ACMD_DEF(afk) src/map/battle.cpp Find : { "at_timeout", &battle_config.at_timeout, 0, 0, INT_MAX, }, Add [ Below ] : Spoiler { "afk_timeout", &battle_config.afk_timeout, 0, 0, INT_MAX, }, src/map/battle.hpp Find : int at_timeout; Add [ Below ] : Spoiler int afk_timeout; conf/battle/misc.conf Find : mail_show_status: 0Add [ Below ] : Spoiler // Set this to the amount of minutes afk chars will be kicked from the server. afk_timeout: 0 1 1 Quote Share this post Link to post Share on other sites
0 Ukiram 24 Posted May 22, 2019 14 minutes ago, Gerzzie said: I'm currently using this. hope this would help. src/map/atcommand.cpp Find : #include "../custom/atcommand.inc"Add [ Above ] : Hide contents /*========================================== * @afk *------------------------------------------*/ ACMD_FUNC(afk) { nullpo_retr(-1, sd); sd->state.autotrade = 1; sd->state.monster_ignore = 1; if( battle_config.afk_timeout ) { int timeout = atoi(message); status_change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ((timeout > 0) ? min(timeout,battle_config.afk_timeout) : battle_config.afk_timeout)*60000,0); } clif_authfail_fd(fd, 15); return 0; } Find : }; AtCommandInfo* atcommand; Add [ Above ] : Reveal hidden contents ACMD_DEF(afk) src/map/battle.cpp Find : { "at_timeout", &battle_config.at_timeout, 0, 0, INT_MAX, }, Add [ Below ] : Reveal hidden contents { "afk_timeout", &battle_config.afk_timeout, 0, 0, INT_MAX, }, src/map/battle.hpp Find : int at_timeout; Add [ Below ] : Reveal hidden contents int afk_timeout; conf/battle/misc.conf Find : mail_show_status: 0Add [ Below ] : Reveal hidden contents // Set this to the amount of minutes afk chars will be kicked from the server. afk_timeout: 0 Hi, is ths working? Quote Share this post Link to post Share on other sites
0 Gerzzie 39 Posted May 22, 2019 4 minutes ago, DevMarikuLabsan said: Hi, is ths working? Currently using on my server. Yes. Quote Share this post Link to post Share on other sites
0 Ukiram 24 Posted May 22, 2019 I'm having an error on atcommand.c Quote Share this post Link to post Share on other sites
0 Hijirikawa 38 Posted May 22, 2019 25 minutes ago, Gerzzie said: Currently using on my server. Yes. Is your server latest rA? Quote Share this post Link to post Share on other sites
0 Ukiram 24 Posted May 22, 2019 3 minutes ago, Hijirikawa said: Is your server latest rA? My server is latest rAthena. I'm having an error. *bump* Quote Share this post Link to post Share on other sites
0 Balfear 145 Posted May 24, 2019 It`s working fine on last rA. But need to change in src/map/atcommand.cpp:sd->state.monster_ignore = 1; to sd->state.block_action |= PCBLOCK_IMMUNE; Quote Share this post Link to post Share on other sites
0 hytsuya123 1 Posted June 4, 2019 same not working rathena Quote Share this post Link to post Share on other sites
0 hanzobr 0 Posted February 13, 2020 Does not work in the latest git version Any tips? Using this tutorial> failhttps://github.com/rathena/rathena/wiki/diff#linux CXX atcommand.cpp atcommand.cpp: In function ‘int atcommand_afk(int, map_session_data*, const char*, const char*)’: atcommand.cpp:9264:40: error: ‘class std::unordered_map<short int, int>’ has no member named ‘autotrade’ if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag ) ^~~~~~~~~ atcommand.cpp:9267:39: error: ‘class std::unordered_map<short int, int>’ has no member named ‘pvp’ if(map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg){ ^~~ atcommand.cpp:9267:66: error: ‘class std::unordered_map<short int, int>’ has no member named ‘gvg’ if(map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg){ ^~~ atcommand.cpp:9272:35: error: ‘struct map_session_data::s_state’ has no member named ‘monster_ignore’ sd->state.monster_ignore = 1; ^~~~~~~~~~~~~~ make[1]: *** [obj/atcommand.o] Error 1 Quote Share this post Link to post Share on other sites
0 Boss Robs 0 Posted July 16, 2020 On 5/22/2019 at 11:10 PM, Gerzzie said: I'm currently using this. hope this would help. src/map/atcommand.cpp Find : #include "../custom/atcommand.inc"Add [ Above ] : Hide contents /*========================================== * @afk *------------------------------------------*/ ACMD_FUNC(afk) { nullpo_retr(-1, sd); sd->state.autotrade = 1; sd->state.monster_ignore = 1; if( battle_config.afk_timeout ) { int timeout = atoi(message); status_change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ((timeout > 0) ? min(timeout,battle_config.afk_timeout) : battle_config.afk_timeout)*60000,0); } clif_authfail_fd(fd, 15); return 0; } Find : }; AtCommandInfo* atcommand; Add [ Above ] : Hide contents ACMD_DEF(afk) src/map/battle.cpp Find : { "at_timeout", &battle_config.at_timeout, 0, 0, INT_MAX, }, Add [ Below ] : Hide contents { "afk_timeout", &battle_config.afk_timeout, 0, 0, INT_MAX, }, src/map/battle.hpp Find : int at_timeout; Add [ Below ] : Hide contents int afk_timeout; conf/battle/misc.conf Find : mail_show_status: 0Add [ Below ] : Hide contents // Set this to the amount of minutes afk chars will be kicked from the server. afk_timeout: 0 Thanks its still working in latest rA Quote Share this post Link to post Share on other sites
-1 Karthikeyan 0 Posted November 27, 2020 any update on this ,as this is not working Quote Share this post Link to post Share on other sites
-2 Ukiram 24 Posted May 22, 2019 THIS IS NOT WORKING. Quote Share this post Link to post Share on other sites
-2 Hakahay 4 Posted May 22, 2019 Does not work in the last rA Quote Share this post Link to post Share on other sites
anyone still have patch for @afk with latest github?
please share
Share this post
Link to post
Share on other sites