Jump to content
  • 0
Sign in to follow this  
Lissandra

@maprecall

Question

11 answers to this question

Recommended Posts

  • 0

/*========================================== * Recall all characters on your map to your location *------------------------------------------*/ACMD(maprecall){        struct map_session_data* pl_sd;        struct s_mapiterator* iter;        int count;        nullpo_retr(-1, sd);        memset(atcmd_output, '0', sizeof(atcmd_output));        if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto) {                clif->message(fd, "You are not authorized to warp someone to your actual map.");                return false;        }        count = 0;        iter = mapit_getallusers();        for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )        {		if (sd->status.account_id != pl_sd->status.account_id && pc_get_group_level(sd) >= pc_get_group_level(pl_sd) && pl_sd->bl.m == sd->bl.m)                {                        if ( pl_sd->vender_id || pl_sd->chatID ) //Skip recalling players who are vending or in a chatroom                                count++;                        else {                                // atcommand_raise_sub(pl_sd); //Ressurect dead people                                pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);                        }                }        }        mapit_free(iter);        clif->message(fd, "All characters on your map recalled!");        if (count) {                sprintf(atcmd_output, "%d player(s) have not been recalled because they are vending or in a chatroom.", count);                clif->message(fd, atcmd_output);        }        return true;}

 

 

Remember to add 

ACMD_DEF(maprecall),

 

 

in the atcommand_basecommands section, at the bottom.

Share this post


Link to post
Share on other sites
  • 0

You know you have to recompile your server with those modifications applied? In case you didn't, you will never get that command. Just do what Yommy said before and if you have that command properly installed and recompile your server (and have a recent Hercules version) you are 99% sure to get it working.

Share this post


Link to post
Share on other sites
  • 0

this should be included in hercules.


Ontopic

just edit your source then recompile.

or use this script if you dont like to edit source

-	script	atcmd_maprecall	-1,{	OnInit:		bindatcmd("maprecall",strnpcinfo(3)+"::OnATC");		end;	OnATC:		if(getgmlevel()==0) end;		getmapxy .@map$,.@x,.@y,0;		mapwarp .@map$,.@map$,.@x,.@y,0;}

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.