evilpuncker 504 Posted March 21, 2014 Sir Mhalicot i try to implement you're @afk but i got this warning on console.. i can't use @afk in game, i extracted it on Hercules Folder and add "afk", in plugins.conf.. add this into your afk.c #include "../common/HPMDataCheck.h" Still the same.. can't use and i still see that warning on console remember that you need to recompile, refer: http://herc.ws/board/topic/4283-introducing-hpm-datacheck/ i did recompile, but still same problem.. post your .c file here please (at upaste) Quote Share this post Link to post Share on other sites
Ragnar Lothbrok 21 Posted March 21, 2014 (edited) here http://upaste.me/ec0311216a8321800 Edited March 21, 2014 by P r o p e r t i e s Quote Share this post Link to post Share on other sites
evilpuncker 504 Posted March 21, 2014 here http://upaste.me/ec0311216a8321800 #include "../common/HPMDataCheck.h" it should be the last file included, if it isn't the last it'll render the plugin uncompilable (intentionally). seems like you didn't read the link as I said here: http://herc.ws/board/topic/4283-introducing-hpm-datacheck/ Quote Share this post Link to post Share on other sites
Ragnar Lothbrok 21 Posted March 21, 2014 here http://upaste.me/ec0311216a8321800 #include "../common/HPMDataCheck.h" > it should be the last file included, if it isn't the last it'll render the plugin uncompilable (intentionally). seems like you didn't read the link as I said here: http://herc.ws/board/topic/4283-introducing-hpm-datacheck/ so it should be like this? http://upaste.me/f48f11218a0cfe1ee Quote Share this post Link to post Share on other sites
evilpuncker 504 Posted March 21, 2014 here http://upaste.me/ec0311216a8321800 #include "../common/HPMDataCheck.h" > it should be the last file included, if it isn't the last it'll render the plugin uncompilable (intentionally).pan> seems like you didn't read the link as I said here: http://herc.ws/board/topic/4283-introducing-hpm-datacheck/ so it should be like this? http://upaste.me/f48f11218a0cfe1ee yes Quote Share this post Link to post Share on other sites
Ragnar Lothbrok 21 Posted March 21, 2014 here http://upaste.me/ec0311216a8321800 #include "../common/HPMDataCheck.h" <blockquote> > it should be the last file included, if it isn't the last it'll render the plugin uncompilable (intentionally).pan>pan> seems like you didn't read the link as I said here: http://herc.ws/board/topic/4283-introducing-hpm-datacheck/ so it should be like this? http://upaste.me/f48f11218a0cfe1ee yes still can't use and warning on console still there Quote Share this post Link to post Share on other sites
evilpuncker 504 Posted March 21, 2014 seems like your compile is failing Quote Share this post Link to post Share on other sites
Ragnar Lothbrok 21 Posted March 21, 2014 no error when compiling... Quote Share this post Link to post Share on other sites
evilpuncker 504 Posted March 21, 2014 no error when compiling... your plugin is not added to the solution, you are using the already compiled provided in the main topic, try this guide: http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC Quote Share this post Link to post Share on other sites
Ragnar Lothbrok 21 Posted March 21, 2014 I follow that guide and i got this error Quote Share this post Link to post Share on other sites
evilpuncker 504 Posted March 21, 2014 Mhalicot should update this then 1 Mhalicot reacted to this Quote Share this post Link to post Share on other sites
Ragnar Lothbrok 21 Posted March 22, 2014 Mhalicot should update this then mhalicot please help me.. Quote Share this post Link to post Share on other sites
quesoph 105 Posted March 22, 2014 #include <stdio.h>#include <stdlib.h>#include <string.h>#include "../common/HPMi.h"#include "../common/timer.h"#include "../map/script.h"#include "../map/pc.h"#include "../map/clif.h"#include "../map/battle.h"#include "../map/status.h"#include "../common/HPMDataCheck.h"/*1.0 Initial Script [Mhalicot] Topic: http://goo.gl/vbmQnr2.0 Added Map restriction "izlude", GVG/PVP. You can't use @afk when your dead. [Mhalicot]2.1 Update compilation compatibility in latest rev. 13300 [Mhalicot]2.2 Fixed bug when using @afk. [Mhalicot]2.3 Fixed map crash when using @afk [Mhalicot]3.0 Added unable to use @afk when receiving damage. [Mhalicot]*/HPExport struct hplugin_info pinfo = { "afk", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "3.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};ACMD(afk) { if(sd->bl.m == map->mapname2mapid("izlude")) { clif->message(fd, "@afk is not allowed on this map."); return true; } if( pc_isdead(sd) ) { clif->message(fd, "Cannot use @afk if you are dead."); return true; } if(DIFF_TICK(timer->gettick(),sd->canlog_tick) < battle->bc->prevent_logout) { clif->message(fd, "Failed to use @afk, please try again later."); //<- (10s)10000ms delay to edit look for conf/battle/player.conf search for prevent_logout return true; } if( map->list[sd->bl.m].flag.autotrade == battle->bc->autotrade_mapflag ) { if(map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg){ clif->message(fd, "You may not use the @afk maps PVP or GVG."); return true; } 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->bc->at_timeout ) { int timeout = atoi(message); status->change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle->bc->at_timeout) : battle->bc->at_timeout) * 60000, 0); } clif->chsys_quit(sd); clif->authfail_fd(sd->fd, 15); } else clif->message(fd, "@afk is not allowed on this map."); return true;}/* Server Startup */HPExport void plugin_init (void){ clif = GET_SYMBOL("clif"); skill = GET_SYMBOL("skill"); script = GET_SYMBOL("script"); pc = GET_SYMBOL("pc"); battle = GET_SYMBOL("battle"); map = GET_SYMBOL("map"); status = GET_SYMBOL("status"); timer = GET_SYMBOL("timer"); addAtcommand("afk",afk);} 1 Mhalicot reacted to this Quote Share this post Link to post Share on other sites
Ragnar Lothbrok 21 Posted March 22, 2014 #include <stdio.h>#include <stdlib.h>#include <string.h>#include "../common/HPMi.h"#include "../common/timer.h"#include "../map/script.h"#include "../map/pc.h"#include "../map/clif.h"#include "../map/battle.h"#include "../map/status.h"#include "../common/HPMDataCheck.h"/*1.0 Initial Script [Mhalicot] Topic: http://goo.gl/vbmQnr2.0 Added Map restriction "izlude", GVG/PVP. You can't use @afk when your dead. [Mhalicot]2.1 Update compilation compatibility in latest rev. 13300 [Mhalicot]2.2 Fixed bug when using @afk. [Mhalicot]2.3 Fixed map crash when using @afk [Mhalicot]3.0 Added unable to use @afk when receiving damage. [Mhalicot]*/HPExport struct hplugin_info pinfo = { "afk", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "3.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};ACMD(afk) { if(sd->bl.m == map->mapname2mapid("izlude")) { clif->message(fd, "@afk is not allowed on this map."); return true; } if( pc_isdead(sd) ) { clif->message(fd, "Cannot use @afk if you are dead."); return true; } if(DIFF_TICK(timer->gettick(),sd->canlog_tick) < battle->bc->prevent_logout) { clif->message(fd, "Failed to use @afk, please try again later."); //<- (10s)10000ms delay to edit look for conf/battle/player.conf search for prevent_logout return true; } if( map->list[sd->bl.m].flag.autotrade == battle->bc->autotrade_mapflag ) { if(map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg){ clif->message(fd, "You may not use the @afk maps PVP or GVG."); return true; } 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->bc->at_timeout ) { int timeout = atoi(message); status->change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle->bc->at_timeout) : battle->bc->at_timeout) * 60000, 0); } clif->chsys_quit(sd); clif->authfail_fd(sd->fd, 15); } else clif->message(fd, "@afk is not allowed on this map."); return true;}/* Server Startup */HPExport void plugin_init (void){ clif = GET_SYMBOL("clif"); skill = GET_SYMBOL("skill"); script = GET_SYMBOL("script"); pc = GET_SYMBOL("pc"); battle = GET_SYMBOL("battle"); map = GET_SYMBOL("map"); status = GET_SYMBOL("status"); timer = GET_SYMBOL("timer"); addAtcommand("afk",afk);} Thanks! Fix Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted March 27, 2014 XD, Sorry, Kinda busy Thanks to @quesoph for fixing it.. I will update it ASAP. Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted April 27, 2014 Update: Version 3.1 Fixed compile Error Compatible to Rev. 14*** Quote Share this post Link to post Share on other sites
Sunzuki 1 Posted May 3, 2014 is it somehow possible to detect afk players via sql so I can use it for my website? Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted May 4, 2014 maybe can but I havnt test it yet.. try to use bindatcmd Quote Share this post Link to post Share on other sites
WalkingBad 0 Posted June 1, 2014 sir why im getting this error when I type @afk .. check my screen shot.. please tell what im missing on my sprite.. Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted June 1, 2014 Update your data.grf and it should be fine.. Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted June 1, 2014 Update: 4.0 Added AFK Timeout. Set Time in minutes chars will be kicked from the server. rev. 145** Quote Share this post Link to post Share on other sites
Luffy 14 Posted July 29, 2014 (edited) How to change the Message?nevermind. i've managed to do it Edited July 29, 2014 by Luffy Quote Share this post Link to post Share on other sites
Ink 1 Posted August 6, 2014 it's saying @afk is not allowed in this map no matter where i try q,q Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted August 13, 2014 did you modify the code? I can't reproduce your error Quote Share this post Link to post Share on other sites
Ink 1 Posted August 13, 2014 (edited) did you modify the code? I can't reproduce your error 1. i added afk.c to src/plugins/afk.c and changed int afk_timeout = 720; 2. i added it to makefile.in MYPLUGINS = sendmail afk 3. i added it to conf/plugins.conf //====================================================//= _ _ _ //= | | | | | | //= | |_| | ___ _ __ ___ _ _| | ___ ___ //= | _ |/ _ '__/ __| | | | |/ _ / __|//= | | | | __/ | | (__| |_| | | __/__ //= _| |_/___|_| ___|__,_|_|___||___///= //= http://herc.ws/board/ //====================================================//== Topic Discussion ================================//== http://herc.ws/board/topic/549-introducing-hercules-plugin-manager///====================================================//== Description =====================================//The plugin system allows you to create customized scripts //outside of the source. These scripts won't conflict with any //future source updates - think of it as a /conf/import/ for the source. //==================================================== /* --------------- Format ---------------After you have listed your plugin(s) in "quotations", you need to put in a comma, to separate the plugins.-----------------------------------------plugins_list: [ "example", "other", "sendmail", "afk",]-----------------------------------------Please note that your scripts need to be savedin the .c (source code) extension and placed in the /src/plugin/ folder.-----------------------------------------*/plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ //"HPMHooking", //"db2sql", //"sample", //"other", "sendmail", "afk",] Afterwards i recompiled, and started the server. (The sendmail plugin works fine btw). It's saying @afk is not allowed on this map on all maps ( Edited August 13, 2014 by Medusalem Quote Share this post Link to post Share on other sites