Jump to content
  • 0

Emergency call with @at player


Question

Posted

in my server have guild recall npc at savepoint but if guild member use @at or @afk when recall guild to savepoint character is hold and then if you login to this character it's can't login

i must use @kick player name

i want to edit emergency call if guild member use @at don't call to guild master

6 answers to this question

Recommended Posts

Posted

GD_EMERGENCYCALL should already skip @autotrade players.

If you look at /trunk/src/map/skill.c (line 7020)

	case GD_EMERGENCYCALL:
	{
		int dx[9]={-1, 1, 0, 0,-1, 1,-1, 1, 0};
		int dy[9]={ 0, 0, 1,-1, 1,-1,-1, 1, 0};
		int j = 0;
		struct guild *g = NULL;
		// i don't know if it actually summons in a circle, but oh well. ;P
		g = sd?sd->state.gmaster_flag:guild_search(status_get_guild_id(src));
		if (!g)
			break;
		clif_skill_nodamage(src,bl,skillid,skilllv,1);
		for(i = 0; i <g->max_member; i++, j++) {
			if (j>8) j=0;
			if ((dstsd = g->member[i].sd) != NULL && sd != dstsd && !dstsd->state.autotrade && !pc_isdead(dstsd)) {
				if (map[dstsd->bl.m].flag.nowarp && !map_flag_gvg2(dstsd->bl.m))
					continue;
				if(map_getcell(src->m,src->x+dx[j],src->y+dy[j],CELL_CHKNOREACH))
					dx[j] = dy[j] = 0;
				pc_setpos(dstsd, map_id2index(src->m), src->x+dx[j], src->y+dy[j], CLR_RESPAWN);
			}
		}
		if (sd)
			guild_block_skill(sd,skill_get_time2(skillid,skilllv));
	}
	break;

Does your @afk set some flag?

(like @autotrade sets state.autotrade)

Posted

/src/map/atcommand.c (after line 3798)

Add this:

			if (pl_sd->state.autotrade || pc_isdead(pl_sd))
			continue; // skip players who are @autotrade or dead

so the whole block looks like:

	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 && pl_sd->status.party_id == p->party.party_id)
	{
		if (pl_sd->state.autotrade || pc_isdead(pl_sd))
			continue; // skip players who are @autotrade or dead
		if (pc_get_group_level(pl_sd) > pc_get_group_level(sd))
			continue; //Skip GMs greater than you.
		if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE))
			count++;
		else
			pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
	}
}
mapit_free(iter);

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...