Jump to content
  • 0

@afk


PapaZola

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

anyone still have patch for @afk with latest github?

please share

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  136
  • Reputation:   48
  • Joined:  06/18/12
  • Last Seen:  

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: 0

Add [ Below ] :

 

Spoiler

// Set this to the amount of minutes afk chars will be kicked from the server.
afk_timeout: 0


 

  • Upvote 1
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

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: 0

Add [ 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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  136
  • Reputation:   48
  • Joined:  06/18/12
  • Last Seen:  

4 minutes ago, DevMarikuLabsan said:

 

Hi, is ths working?

Currently using on my server. Yes. ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

I'm having an error on atcommand.c

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  193
  • Reputation:   41
  • Joined:  07/21/16
  • Last Seen:  

25 minutes ago, Gerzzie said:

Currently using on my server. Yes. ?

Is your server latest rA?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

3 minutes ago, Hijirikawa said:

Is your server latest rA?

My server is latest rAthena. I'm having an error. *bump*

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   232
  • Joined:  07/24/13
  • Last Seen:  

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;

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  11
  • Reputation:   2
  • Joined:  03/15/14
  • Last Seen:  

same not working rathena

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  08/20/14
  • Last Seen:  

Does not work in the latest git version
Any tips?
Using this tutorial> fail
https://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


 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  9
  • Reputation:   0
  • Joined:  07/16/20
  • Last Seen:  

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: 0

Add [ 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 ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  126
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

On 5/25/2019 at 1:15 AM, Balfear said:

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;

yes its working

i tested.! ty


how to add AFK Hat ,  using @afk?

Edited by markiez22
add a question
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

does this still works in latest rA git?

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.02
  • Content Count:  291
  • Reputation:   26
  • Joined:  12/16/17
  • Last Seen:  

THIS IS NOT WORKING.

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.02
  • Content Count:  55
  • Reputation:   0
  • Joined:  09/26/20
  • Last Seen:  

any update on this ,as this is not working

Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  82
  • Reputation:   4
  • Joined:  10/20/16
  • Last Seen:  

Does not work in the last rA

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...