Jump to content
  • 0
Sign in to follow this  
karazu

@afk v 2.0 usable even in WOE/PVP is active in the area.

Question

10 answers to this question

Recommended Posts

  • 0

yes delete this part in my plugins

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

then recompile

Edited by sevenzz23

Share this post


Link to post
Share on other sites
  • 0

comment this:

 

//clif->changelook(&sd->bl,LOOK_HEAD_TOP,471);
 

or

 

#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"#include "../map/battle.h"#include "../map/status.h"HPExport struct hplugin_info pinfo = {	    "afk",			    // Plugin name	    SERVER_TYPE_MAP,// Which server types this plugin works with?	    "1.0",					    // Plugin version	    HPM_VERSION,	    // HPM Version (don't change, macro is automatically updated)};/*==========================================* @afk*------------------------------------------*/ACMD(afk) {                if(sd->bl.m == map->mapname2mapid("izlude")) {                    clif->message(fd, "@afk is not allowed on this map.");                    return false;                }                                if( pc_isdead(sd) ) {                    clif->message(fd, "Cannot @afk if you are dead.");                    return false;                }			    if( map->list[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag )			    {					    sd->state.autotrade = 1;					    sd->state.monster_ignore = 1;                         pc_setsit(sd);					    skill->sit(sd,1);					    clif->sitting(&sd->bl);					    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->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");    if( HPMi->addCommand != NULL ) {//link our '@sample' command			    HPMi->addCommand("afk",ACMD_A(afk));    }}

 

Credits: sevenzz23

Edited by quesoph

Share this post


Link to post
Share on other sites
  • 0

 

comment this:

 

//clif->changelook(&sd->bl,LOOK_HEAD_TOP,471);
 

or

 

#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"#include "../map/battle.h"#include "../map/status.h"HPExport struct hplugin_info pinfo = {	    "afk",			    // Plugin name	    SERVER_TYPE_MAP,// Which server types this plugin works with?	    "1.0",					    // Plugin version	    HPM_VERSION,	    // HPM Version (don't change, macro is automatically updated)};/*==========================================* @afk*------------------------------------------*/ACMD(afk) {                if(sd->bl.m == map->mapname2mapid("izlude")) {                    clif->message(fd, "@afk is not allowed on this map.");                    return false;                }                                if( pc_isdead(sd) ) {                    clif->message(fd, "Cannot @afk if you are dead.");                    return false;                }			    if( map->list[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag )			    {					    sd->state.autotrade = 1;					    sd->state.monster_ignore = 1;                         pc_setsit(sd);					    skill->sit(sd,1);					    clif->sitting(&sd->bl);					    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->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");    if( HPMi->addCommand != NULL ) {//link our '@sample' command			    HPMi->addCommand("afk",ACMD_A(afk));    }}

 

Credits: sevenzz23

 

LOOK_HEAD_TOP

 

How can I change the position to others?

Share this post


Link to post
Share on other sites
  • 0

Replace it with any of this.

 

LOOK_HEAD_TOPLOOK_HEAD_BOTTOMLOOK_HEAD_MID

 

471 is the items view id.

Edited by quesoph

Share this post


Link to post
Share on other sites
  • 0

How about  to give expiration of @afk like the one who is in @afk will be kick away after 12hours?

delete 

                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 false;}
Edited by sevenzz23

Share this post


Link to post
Share on other sites
  • 0

 

How about  to give expiration of @afk like the one who is in @afk will be kick away after 12hours?

delete 

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

No what i mean is Expiration, like when they use @afk, after 12 hours of being afk they will be kicked out.

 

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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.