diff --git a/zone/command.cpp b/zone/command.cpp index 123d3889b..c9dc2cf7d 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -206,6 +206,7 @@ int command_init(void) command_add("emotesearch", "Searches NPC Emotes", 80, command_emotesearch) || command_add("emoteview", "Lists all NPC Emotes", 80, command_emoteview) || command_add("enablerecipe", "[recipe_id] - Enables a recipe using the recipe id.", 80, command_enablerecipe) || + command_add("endurance", "Restores you or your target's endurance.", 50, command_endurance) || command_add("equipitem", "[slotid(0-21)] - Equip the item on your cursor into the specified slot", 50, command_equipitem) || command_add("face", "- Change the face of your target", 80, command_face) || command_add("faction", "[Find (criteria | all ) | Review (criteria | all) | Reset (id)] - Resets Player's Faction", 80, command_faction) || @@ -737,6 +738,19 @@ void command_logcommand(Client *c, const char *message) /* * commands go below here */ +void command_endurance(Client *c, const Seperator *sep) +{ + Mob *t; + + t = c->GetTarget() ? c->GetTarget() : c; + + if (t->IsClient()) + t->CastToClient()->SetEndurance(t->CastToClient()->GetMaxEndurance()); + else + t->SetEndurance(t->GetMaxEndurance()); + + t->Message(Chat::White, "Your endurance has been refilled."); +} void command_setstat(Client* c, const Seperator* sep){ if(sep->arg[1][0] && sep->arg[2][0] && c->GetTarget()!=0 && c->GetTarget()->IsClient()){ c->GetTarget()->CastToClient()->SetStats(atoi(sep->arg[1]),atoi(sep->arg[2])); diff --git a/zone/command.h b/zone/command.h index a6f967d78..bae126019 100644 --- a/zone/command.h +++ b/zone/command.h @@ -99,6 +99,7 @@ void command_emote(Client *c, const Seperator *sep); void command_emotesearch(Client* c, const Seperator *sep); void command_emoteview(Client* c, const Seperator *sep); void command_enablerecipe(Client *c, const Seperator *sep); +void command_endurance(Client *c, const Seperator *sep); void command_equipitem(Client *c, const Seperator *sep); void command_face(Client *c, const Seperator *sep); void command_faction(Client *c, const Seperator *sep);