diff --git a/zone/command.cpp b/zone/command.cpp index 80d6a737a..f5d02cc70 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -251,7 +251,7 @@ int command_init(void) command_add("npccast", "[targetname/entityid] [spellid] - Causes NPC target to cast spellid on targetname/entityid", AccountStatus::QuestTroupe, command_npccast) || command_add("npcedit", "[column] [value] - Mega NPC editing command", AccountStatus::GMAdmin, command_npcedit) || command_add("npceditmass", "[name-search] [column] [value] - Mass (Zone wide) NPC data editing command", AccountStatus::GMAdmin, command_npceditmass) || - command_add("npcemote", "[message] - Make your NPC target emote a message.", AccountStatus::GMLeadAdmin, command_npcemote) || + command_add("npcemote", "[Message] - Make your NPC target emote a message.", AccountStatus::GMLeadAdmin, command_npcemote) || command_add("npcloot", "- Manipulate the loot an NPC is carrying. Use #npcloot help for more information.", AccountStatus::QuestTroupe, command_npcloot) || command_add("npcsay", "[Message] - Make your NPC target say a message.", AccountStatus::GMLeadAdmin, command_npcsay) || command_add("npcshout", "[Message] - Make your NPC target shout a message.", AccountStatus::GMLeadAdmin, command_npcshout) || diff --git a/zone/gm_commands/npcemote.cpp b/zone/gm_commands/npcemote.cpp index c4ba83388..52697c6d6 100755 --- a/zone/gm_commands/npcemote.cpp +++ b/zone/gm_commands/npcemote.cpp @@ -2,11 +2,18 @@ void command_npcemote(Client *c, const Seperator *sep) { - if (c->GetTarget() && c->GetTarget()->IsNPC() && sep->arg[1][0]) { - c->GetTarget()->Emote(sep->argplus[1]); + if (!c->GetTarget() || !c->GetTarget()->IsNPC()) { + c->Message(Chat::White, "You must target an NPC to use this command."); + return; } - else { - c->Message(Chat::White, "Usage: #npcemote message (requires NPC target"); + + int arguments = sep->argnum; + if (!arguments) { + c->Message(Chat::White, "Usage: #npcemote [Message]"); + return; } + + std::string message = sep->argplus[1]; + c->GetTarget()->Emote(message.c_str()); }