Mhalicot 392 Posted August 14, 2014 afk plugins is also using autotrade_mapflag. maybe you have a modification in your source or in your database about autotrade. I tried what you did and it perfectly work on mine. if you want to remove that message delete it on line 76 - } else clif->message(fd, "@afk is not allowed on this map.");+ } Quote Share this post Link to post Share on other sites
Ink 1 Posted August 16, 2014 Thank you. Yes it was the novending flag Quote Share this post Link to post Share on other sites
jaBote 438 Posted November 27, 2014 Recompile it? Quote Share this post Link to post Share on other sites
astralprojection 35 Posted January 10, 2015 its a great plugin thank you. One thing, afk character is not saving on server restart? is this normal. how can we have them back after restart? Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted January 10, 2015 its a great plugin thank you. One thing, afk character is not saving on server restart? is this normal. how can we have them back after restart? Thanks, yes.. it is normal.. maybe when i have free time.. Quote Share this post Link to post Share on other sites
astralprojection 35 Posted January 28, 2015 (edited) Plugin @afk has compile error at : clif->chsys_quit(sd); There are changes in channel system that makes the error. 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); // Change 471 to any headgear view ID you want. clif->specialeffect(&sd->bl, 234,AREA); if( afk_timeout ) { int timeout = atoi(message); status->change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,afk_timeout) : afk_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; Edited January 28, 2015 by jawbreaker Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted January 29, 2015 Plugin @afk has compile error at : clif->chsys_quit(sd); There are changes in channel system that makes the error. 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); // Change 471 to any headgear view ID you want. clif->specialeffect(&sd->bl, 234,AREA); if( afk_timeout ) { int timeout = atoi(message); status->change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,afk_timeout) : afk_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; Noted: will take a look at it soon, together with costumeitem Quote Share this post Link to post Share on other sites
astralprojection 35 Posted January 29, 2015 Plugin @afk has compile error at : clif->chsys_quit(sd); There are changes in channel system that makes the error. 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); // Change 471 to any headgear view ID you want. clif->specialeffect(&sd->bl, 234,AREA); if( afk_timeout ) { int timeout = atoi(message); status->change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,afk_timeout) : afk_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; Noted: will take a look at it soon, together with costumeitem testing this, it works great so far. #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/channel.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]3.1 Fixed Compiling Error, Thanks to quesoph4.0 Added AFK Timeout. Chars will be kicked from the server. [Mhalicot]*/HPExport struct hplugin_info pinfo = { "afk", // Plugin name SERVER_TYPE_MAP, // Which server types this plugin works with? "4.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};// Set this to the amount of minutes afk chars will be kicked from the server. 720 = 12 hoursint afk_timeout = 0;void parse_my_setting(const char *val) { afk_timeout = atoi(val);}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; } //<- (10s)10000ms delay to edit look for conf/battle/player.conf search for prevent_logout if(DIFF_TICK(timer->gettick(),sd->canlog_tick) < battle->bc->prevent_logout) { clif->message(fd, "Failed to use @afk, please try again later."); 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); // Change 471 to any headgear view ID you want. clif->specialeffect(&sd->bl, 234,AREA); if( afk_timeout ) { int timeout = atoi(message); status->change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,afk_timeout) : afk_timeout)*60000,0); } channel->quit(sd); clif->authfail_fd(sd->fd, 15); } else clif->message(fd, "@afk is not allowed on this map."); return true;}/* triggered when server starts loading, before any server-specific data is set */HPExport void server_preinit (void) { /* makes map server listen to mysetting:value in any "battleconf" file (including imported or custom ones) */ /* value is not limited to numbers, its passed to our plugins handler (parse_my_setting) as const char *, * and thus can be manipulated at will */ addBattleConf("parse_my_setting",parse_my_setting);};/* Server Startup */HPExport void plugin_init (void){ script = GET_SYMBOL("script"); battle = GET_SYMBOL("battle"); status = GET_SYMBOL("status"); timer = GET_SYMBOL("timer"); skill = GET_SYMBOL("skill"); clif = GET_SYMBOL("clif"); channel = GET_SYMBOL("channel"); map = GET_SYMBOL("map"); pc = GET_SYMBOL("pc"); addAtcommand("afk",afk);} 1 Mhalicot reacted to this Quote Share this post Link to post Share on other sites
iCORE 33 Posted February 4, 2015 HPM:plugin_load: failed to load 'plugins/afk.so' (error: plugins/afk.so: cannot open shared object file: No such file or directory), skipping... im using linux centos Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted March 17, 2015 HPM:plugin_load: failed to load 'plugins/afk.so' (error: plugins/afk.so: cannot open shared object file: No such file or directory), skipping... im using linux centos can reproduce. make sure that you compile the plugins without error. Update: 4.1 Fixed Compiling Error and Update to latest Revision e9d6955 [Mhalicot] Quote Share this post Link to post Share on other sites
thanna 11 Posted April 18, 2015 SIr may I ask if I dont want the @afk to have a time out, what should I edit? Quote Share this post Link to post Share on other sites
Bringer 0 Posted April 19, 2015 how to add this on my server Sir new on Plugin Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted April 20, 2015 SIr may I ask if I dont want the @afk to have a time out, what should I edit? Just leave it to 0 // Set this to the amount of minutes afk chars will be kicked from the server. 720 = 12 hoursint afk_timeout = 0; how to add this on my server Sir new on Plugin Please read the 1st post for instructions Quote Share this post Link to post Share on other sites
Bringer 0 Posted April 20, 2015 [Warning]: HPM:plugin_load: failed to load 'plugins/afk.so', skipping... Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted April 21, 2015 [Warning]: HPM:plugin_load: failed to load 'plugins/afk.so', skipping... Make sure that you compile it without error.. Quote Share this post Link to post Share on other sites
REKT 10 Posted May 24, 2015 [Warning]: HPM:plugin_load: failed to load 'plugins/afk.so', skipping... Make sure that you compile it without error.. @@Mhalicot is that AFK with with HAT? or just an pub-chat? Thanks! Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted May 25, 2015 [Warning]: HPM:plugin_load: failed to load 'plugins/afk.so', skipping... Make sure that you compile it without error.. @@Mhalicot is that AFK with with HAT? or just an pub-chat? Thanks! Its AFK with Hat.. Quote Share this post Link to post Share on other sites
RagnarokOnline2015 4 Posted April 30, 2016 (edited) 1>------ Rebuild All started: Project: afk, Configuration: Debug Win32 ------ 1> afk.c 1>d:\рагнарок\emu\hercules\trunk\src\common\hpmi.h(23): fatal error C1083: Cannot open include file: 'common/hercules.h': No such file or directory ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== Who know what is problem? Please tell me) Edited April 30, 2016 by RagnarokOnline2015 Quote Share this post Link to post Share on other sites
Garr 117 Posted April 30, 2016 Try removing russian characters off the folder path. Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted May 1, 2016 1>------ Rebuild All started: Project: afk, Configuration: Debug Win32 ------ 1> afk.c 1>d:\рагнарок\emu\hercules\trunk\src\common\hpmi.h(23): fatal error C1083: Cannot open include file: 'common/hercules.h': No such file or directory ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== Who know what is problem? Please tell me) Probably you are not using latest Hercules... Quote Share this post Link to post Share on other sites
RagnarokOnline2015 4 Posted May 2, 2016 (edited) 1>------ Rebuild All started: Project: afk, Configuration: Debug Win32 ------ 1> afk.c 1>d:\рагнарок\emu\hercules\trunk\src\common\hpmi.h(23): fatal error C1083: Cannot open include file: 'common/hercules.h': No such file or directory ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== Who know what is problem? Please tell me) Probably you are not using latest Hercules... Changed Russian letters Can you tell me please where can I download latest Hercules Edited May 2, 2016 by RagnarokOnline2015 Quote Share this post Link to post Share on other sites
Svanhild 2 Posted November 28, 2016 Im using the latest herc, and this issue still persists. \src\plugins\../common/HPMi.h(23): fatal error C1083: Cannot open include file: 'common/hercules.h': No such file or directory Quote Share this post Link to post Share on other sites
Easycore 31 Posted November 28, 2016 Im using the latest herc, and this issue still persists. \src\plugins\../common/HPMi.h(23): fatal error C1083: Cannot open include file: 'common/hercules.h': No such file or directory Use this plugin made by Dastgir: https://github.com/dastgir/HPM-Plugins/blob/master/src/plugins/afk.c Quote Share this post Link to post Share on other sites
Svanhild 2 Posted November 29, 2016 Im using the latest herc, and this issue still persists. \src\plugins\../common/HPMi.h(23): fatal error C1083: Cannot open include file: 'common/hercules.h': No such file or directory Use this plugin made by Dastgir: https://github.com/dastgir/HPM-Plugins/blob/master/src/plugins/afk.c Yes, that seemed to work without errors. Thanks. Quote Share this post Link to post Share on other sites