Jump to content

Suggestion - Atcommand for debuff


Napster

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   13
  • Joined:  06/20/12
  • Last Seen:  

@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 )

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  420
  • Reputation:   89
  • Joined:  01/30/12
  • Last Seen:  

+1 for @debuff

 

(But first, pz correct this, my poor english knowledge is crying: "Remove all effects successfully." :D)

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Bindatcommand is your friend

Edited by Stolao
Link to comment
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
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.

×
×
  • Create New...