Jump to content

Recommended Posts

Posted (edited)

suggestion suppot for atcommand

@debuff 

@debuffmap "mapname"

@debuffall

ACMD_FUNC(debuff) {
	struct block_list* bl;

	nullpo_retr(-1,sd);

	bl = &sd->bl;

	if (!bl)
		return -1;

	status_change_clear(bl, 3); // remove all effects
	pc_bonus_script_clear_all(sd,1); /// Don't remove permanent script
	clif_specialeffect(bl,235,AREA);
	clif_displaymessage(sd->fd, "Remove all effects successfully.");
	return 0;
}

ACMD_FUNC(debuffmap)
{
	struct map_session_data* pl_sd;
	struct s_mapiterator* iter;
	char map_name[MAP_NAME_LENGTH_EXT];
	int m = -1;

	nullpo_retr(-1, sd);

	memset(atcmd_output, '\0', sizeof(atcmd_output));
	memset(map_name, '\0', sizeof(map_name));

	sscanf(message, "%15s", map_name);

	if (map_name[0] == '\0') {
		m = map_mapindex2mapid(sd->mapindex);
	} else {
		m = map_mapname2mapid(map_name);
	}

	if (m < 0) {
		clif_displaymessage(fd, msg_txt(sd,1));
		return -1;
	}

	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->bl.m == m) {
			status_change_clear(&pl_sd->bl, 3); // remove all effects
			pc_bonus_script_clear_all(&pl_sd,1); /// Don't remove permanent script
			clif_specialeffect(&pl_sd->bl,235,AREA);
			clif_displaymessage(pl_sd->fd, "Remove all effects successfully.");
		}
	}
	mapit_free(iter);
	clif_displaymessage(fd, "All players in your map has been debuffed!");
	return 0;
}

thank you dev team

Edited by Napster
Posted

I would say it is fairly easy to do a script command on this as it becomes more of a custom feature rather than a mandatory feature. Just my recommendation that it can be done script command easily

Posted

the commands seem useful, but I don't see any urge to add it officially (yet), and at least let's see people says. :D

  • 2 weeks later...
Posted

@debuff is extremly usefull, in my server I use a custom item with 'sc_end -1;',

@debuffmap and @debufall... I don't see why I would need this.

@debuff is for testing purposes. ( Because @die won't make your +20 foods go away )

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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...