Jump to content
  • 0
Ukiram

@afk request

Question

7 answers to this question

Recommended Posts

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

Link to comment
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
Link to comment
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
Link to comment
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?

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.