Rebel

@afk with AFK Hat

Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=2555

File Name: @afk with AFK Hat

File Submitter: Rebel

File Submitted: 16 Sep 2012

File Category: Source Modifications

Content Author: Axl, Rebel

Using @afk with AFK Hat. (Notice Board)

I just modified it and put the AFK Hat effect.

Changelog:

v1.0 - Initial Release - Need to open a chat room to use @afk command and it is disabled to use in prontera

v1.1 - No need to create a chat room to use @afk command as suggested by Mysterious (disabled to use in prontera)

v1.2 (eA and rA) - Added a config in misc.conf. afk_timeout: 0 (0 is default) Tested with the latest rathena - Revision 17156

v1.3 (rA ONLY) - Working with latest revision 17306 - Now you can't use @afk when you are dead.

Click here to download this file

afk_v1.3.diff

Edited by Rebel
  • Upvote 3
  • Like 1

Share this post


Link to post
Share on other sites

Suggestion: Why be in a Chat room to have @afk activated? Why not just use @afk while sitting on the side of a town then you'll get the AFK hat pop up. Don't need to be a "Chat". Maybe you can have 2 diffs? o_o. Then again, it's not hard to remove the piece of coding to check for chat.. but it's just a suggestion :P.

Share this post


Link to post
Share on other sites

Link broken?

did you noticed that there is mirror link in the first post ???

sometime the link work fine...just the author uploading new version...and have to get approve by staff team then only other member can download.

  • Upvote 1

Share this post


Link to post
Share on other sites

I'll just suggest if you can make it to have a timer that will kick the AFK player if he's time is out, maybe a 12 hours AFK time just like @autotrade, btw nice src edit /no1

Share this post


Link to post
Share on other sites

@ Emistry

Probably was the second case, because I clicked all the links before and they weren't working. Thanks for the tips ;)

Share this post


Link to post
Share on other sites

ookay ..

anyway ..both mirror link also work fine for me

  • Upvote 1

Share this post


Link to post
Share on other sites

How to enable it, so that it will work in prontera?

remove this..

if(sd->bl.m == map_mapname2mapid("prontera")) {
clif_displaymessage(fd, "@afk is not allowed on this map.");
return 0;
}

Share this post


Link to post
Share on other sites

How can i add this command to my server ?

read this Diff#Using_.diff.2F.patch_files_to_patch_your_server

or patch manually....open the diff file using textpad / notepad ..

see what content to add and what content to remove....and edit each your files accordingly..

Share this post


Link to post
Share on other sites

how to add the commands to the groups.conf?

im still error at group.conf

Share this post


Link to post
Share on other sites

how to add the commands to the groups.conf?

im still error at group.conf

If you are using the command as Group ID: 99 you shouldn't have any error with that..

If you want to add this command in another group just add an entry in your desired group id..

example:

id: 0 /* group 0 is the default group for every new account */
name: "Player"
level: 0
inherit: ( /*empty list*/ )
commands: {
+  afk: true
}
permissions: {
 /* without this basic permissions regular players could not
 trade or party */
 can_trade: true
 can_party: true
}

That's for Group ID: 0 means every normal player can use the command @afk /no1

Share this post


Link to post
Share on other sites

When using

@afk

the server logs me out.

Reason?

Nothing is stated in the map/login/character serve...

Share this post


Link to post
Share on other sites

When using

@afk

the server logs me out.

Reason?

Nothing is stated in the map/login/character serve...

this is how the @AFK work in almost all the server....character is remained in the server just like how your merchant class using autotrade.

Share this post


Link to post
Share on other sites

how to work with eA of this @afk hat command? Please release a new version of diff for eA. Thank you

Share this post


Link to post
Share on other sites

Yes, release it on eAthena. If only we can convert in rAthena.

Also, how to ENABLE it on Prontera? Thanks.

Share this post


Link to post
Share on other sites

its compatible with eAthena..

just remove this line if you want it to use in prontera,

 
if( sd -> bl . m == map_mapname2mapid ( "prontera" )) {
clif_displaymessage ( fd, "@afk is not allowed on this map." );
return 0 ;
}

  • Upvote 1

Share this post


Link to post
Share on other sites

How to make the AFK 'hat' to middle headgear position?

Share this post


Link to post
Share on other sites

Problem with the afk hat. Im using eA and Xray Client. See image below

/*==========================================
* @afk
*------------------------------------------*/
ACMD_FUNC(afk) {

	nullpo_retr(-1, sd);

			if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag )
			{

			if(map[sd->bl.m].flag.pvp  || map[sd->bl.m].flag.gvg){
			clif_displaymessage(fd, "You may not use the @afk maps PVP or GVG.");
			return -1;}

					sd->state.autotrade = 1;
					sd->state.monster_ignore = 1;
pc_setsit(sd);
					skill_sit(sd,1);
					clif_sitting(&sd->bl);
clif_changelook(&sd->bl,LOOK_HEAD_TOP,471);
					clif_specialeffect(&sd->bl, 234,AREA);					  
					if( battle_config.at_timeout )
					{
							int timeout = atoi(message);
							status_change_start(&sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout)*60000,0);
					}
					clif_authfail_fd(fd, 15);
			} else
					clif_displaymessage(fd, "@afk is not allowed on this map.");
	return 0;
}

Screenshot problem:

t7nbdy.jpg

how do i change hat to this http://ratemyserver....&isearch=Search

Thank you!

Edited by WillSuranol

Share this post


Link to post
Share on other sites

@WillSuranol

remove this ?

  clif_changelook(&sd->bl,LOOK_HEAD_TOP,471);

change the 471 to your AFK hat view id. .....

by default...in latest client / server...471 is the AFK Hat view sprite...

Share this post


Link to post
Share on other sites

@WillSuranol

remove this ?

  clif_changelook(&sd->bl,LOOK_HEAD_TOP,471);

Nothing happens. See the image below

2z9be9w.jpg

Share this post


Link to post
Share on other sites

change the 471 to your AFK hat view id. .....

by default...in latest client / server...471 is the AFK Hat view sprite...

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
Reply to this topic...

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