[Atcommand]afk

Shikazu

New member
Messages
74
Points
0
Age
36
Location
Germany
Github
shikazu
The plugin is working but has no timeout and you can sit wherever you want.

It is being reworked, when i have found out how to access the config's from a plugin.

Here it is: https://github.com/shikazu/hpm-plugins/blob/master/src/plugins/afk.c

just compile it, add it to your plugins.conf and type @afk ingame
default_smile.png


A little screenshot how it looks ingame, since you can't see it (afk logs you out, but you are still sitting there
default_biggrin.png
)

~Shikazu

screenHercules000.jpg

 
Last edited by a moderator:
ACMD(afk){ 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); clif->authfail_fd(fd, 15);  return 0;}
return 0; should be return 1; or it will display @afk failed.
default_smile.png


 
Last edited by a moderator:
I've added "afk" to the /conf/plugins.conf, added the afk.c to src/plugins/, recompiled and started the server, and when used in-game, says the command doesn't exist. Am I missing something..?

 
I've added "afk" to the /conf/plugins.conf, added the afk.c to src/plugins/, recompiled and started the server, and when used in-game, says the command doesn't exist. Am I missing something..?
Hi sir, I would just like to ask you if you could check your map server if it loaded the plugin correctly

 
I would like to mention that this command can cause some griefers on your server, since there are no checks if this command is allowed in whatever way.

A big problem could be that ppl start to mob huuuuge mobs and then type in @afk and are ignored by the monsters. If the monsters are aggressive, ppl in the near will be attacked immediately..

This is only one thing, there could be a lot of more
default_ohmy.png


EDIT:// return is fixed in git! Thank you guys!

~Shikazu

 
Last edited by a moderator:
I would like to mention that this command can cause some griefers on your server, since there are no checks if this command is allowed in whatever way.

A big problem could be that ppl start to mob huuuuge mobs and then type in @afk and are ignored by the monsters. If the monsters are aggressive, ppl in the near will be attacked immediately..

This is only one thing, there could be a lot of more
default_ohmy.png


EDIT:// return is fixed in git! Thank you guys!

~Shikazu
sir Shikazu did you find out how to add settings on conf file like a timer for afk?

 
No yet, because i have not that much time for that, but i can check it out later, if you want me to do so.

~Shikazu

 
Hello Sir Shikazu, i already compiled the @afk plugin on my server using Visual Studio. It's working.

I migrated / uploaded my server to my VPS, recompiled it and the server is running and @afk seems not working, says unknown command.

groups.conf

afk: true

Edit:

My VPS is under unix distribution.

 
Last edited by a moderator:
Did you compile plugins on linux? You have to type "make plugins" in order to compile them. (Windows Compiled wont work on *nix)

 
This afk very popular since eathena. Why not just to have this command in Hercules directly, please any one of core developer interesting to explain why not?

 
I second that notion @ OnNplay; I've made use of this since.. gosh, at least 2010? /heh

 
In fact, when I made my first server I thought this was bundled by default because all other servers I played before had it.

 
For convenience of compiling, this AFK source should go into Hercules directly instead of plugin.

 
Back
Top