From c2ab3377eafb9f941344a388f038ecec45f87f9c Mon Sep 17 00:00:00 2001 From: mc_cameri Date: Fri, 17 Dec 2004 10:53:38 +0000 Subject: git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@595 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/charcommand.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/map/charcommand.c') diff --git a/src/map/charcommand.c b/src/map/charcommand.c index f38914553..277c9ebfd 100644 --- a/src/map/charcommand.c +++ b/src/map/charcommand.c @@ -44,6 +44,7 @@ CCMD_FUNC(stats_all); CCMD_FUNC(reset); CCMD_FUNC(spiritball); CCMD_FUNC(itemlist); +CCMD_FUNC(effect); #ifdef TXT_ONLY /* TXT_ONLY */ @@ -74,6 +75,7 @@ static CharCommandInfo charcommand_info[] = { { CharCommandStatsAll, "#statsall", 40, charcommand_stats_all }, { CharCommandSpiritball, "#spiritball", 40, charcommand_spiritball }, { CharCommandItemList, "#itemlist", 40, charcommand_itemlist }, + { CharCommandEffect, "#effect", 40, charcommand_effect }, #ifdef TXT_ONLY /* TXT_ONLY */ @@ -864,3 +866,32 @@ charcommand_itemlist( return 0; } + +/*========================================== + * #effect by [MouseJstr] + * + * Create a effect localized on another character + *------------------------------------------ + */ +int +charcommand_effect(const int fd, struct map_session_data* sd, + const char* command, const char* message) +{ + struct map_session_data *pl_sd = NULL; + char target[255]; + int type = 0; + nullpo_retr(-1, sd); + + if (!message || !*message || sscanf(message, "%d %s", &type, target) != 2) { + clif_displaymessage(fd, "usage: #effect ."); + return -1; + } + + if((pl_sd=map_nick2sd((char *) target)) == NULL) + return -1; + + clif_specialeffect(&pl_sd->bl, type, 0); + clif_displaymessage(fd, msg_table[229]); // Your effect has changed. + + return 0; +} -- cgit v1.2.3-70-g09d2