Question

anyone still have patch for @afk with latest github?

please share

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

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


 

Share this post


Link to post
Share on other sites
  • 0
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?

Share this post


Link to post
Share on other sites
  • 0
4 minutes ago, DevMarikuLabsan said:

 

Hi, is ths working?

Currently using on my server. Yes. 🙂

Share this post


Link to post
Share on other sites
  • 0
25 minutes ago, Gerzzie said:

Currently using on my server. Yes. 🙂

Is your server latest rA?

Share this post


Link to post
Share on other sites
  • 0
3 minutes ago, Hijirikawa said:

Is your server latest rA?

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

Share this post


Link to post
Share on other sites
  • 0

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;

Share this post


Link to post
Share on other sites
  • -1

Does not work in the last rA

Share this post


Link to post
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.

Loading...