Jump to content

Recommended Posts

Posted (edited)

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
Posted

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.

Posted

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

Posted

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;
}

Posted

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

  • 2 weeks later...
Posted

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.

Posted

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
Posted (edited)

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
Posted

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...