• 0
Ryo Osaki

@afk request

Question

Hi,

Can i request @afk command 

players without vend and not merchant all jobs.

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Oh como'n man, there are several of this system here in rA, please use the search button.

 

CSJLXHy.png

Share this post


Link to post
Share on other sites
  • 0
1 minute ago, Kakaroto said:

Oh como'n man, there are several of this system here in rA, please use the search button.

 

CSJLXHy.png

Hi, Thanks.

But my problem is i find outdated files of @afk command and not working.

I can't find the latest @afk command. 🙂

Share this post


Link to post
Share on other sites
  • 0

src/map/atcommand.c

add this

Find
 

ACMD_FUNC(camerainfo){
	nullpo_retr(-1, sd);

	if( message == nullptr || message[0] == '\0' ){
		clif_camerainfo( sd, true );
		return 0;
	}

	float range = 0;
	float rotation = 0;
	float latitude = 0;

	if( sscanf( message, "%f %f %f", &range, &rotation, &latitude ) < 3 ){
		clif_displaymessage( fd, msg_txt( sd, 793 ) ); // Usage @camerainfo range rotation latitude
		return -1;
	}

	clif_camerainfo( sd, false, range, rotation, latitude );

	return 0;
}

Add Below

/*==========================================
* @afk
*------------------------------------------*/
ACMD_FUNC(afk) {
 
        nullpo_retr(-1, sd);
                        sd->state.autotrade = 1;
                        sd->state.block_action |= PCBLOCK_IMMUNE;
                        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:

ACMD_DEFR(camerainfo, ATCMD_NOCONSOLE|ATCMD_NOAUTOTRADE),

Add Below

ACMD_DEF(afk)

 

Edited by BeWan
  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0
10 minutes ago, Ryo Osaki said:

Error @BeWan

image.png.ada455d6b866ee2306bca5a98c228a7d.png

src/map/battle.cpp
Find : 

{ "at_timeout",                         &battle_config.at_timeout,                      0,      0,      INT_MAX,        },

Add [ Below ] :

{ "afk_timeout",                        &battle_config.afk_timeout,                     0,      0,      INT_MAX,        },

 

src/map/battle.hpp

Find : 
int at_timeout;

Add [ Below ] :

int afk_timeout;

Find :
mail_show_status: 0

Add [ Below ] :

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

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0
9 minutes ago, BeWan said:

src/map/battle.cpp
Find : 

{ "at_timeout",                         &battle_config.at_timeout,                      0,      0,      INT_MAX,        },

Add [ Below ] :

{ "afk_timeout",                        &battle_config.afk_timeout,                     0,      0,      INT_MAX,        },

 

src/map/battle.hpp

Find : 
int at_timeout;

Add [ Below ] :

int afk_timeout;

Find :
mail_show_status: 0

Add [ Below ] :

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

where can i find mail_show_status: 0?

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, Ryo Osaki said:

where can i find mail_show_status: 0?

conf/battle/misc.conf

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...