From 182327b385215e0a724c89b83e1da8d8fa17618f Mon Sep 17 00:00:00 2001 From: JJ <3617814+joligario@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:43:14 -0800 Subject: [PATCH] [Commands] Add `#forage` command (#4133) --- zone/command.cpp | 2 ++ zone/command.h | 1 + zone/gm_commands/forage.cpp | 6 ++++++ 3 files changed, 9 insertions(+) create mode 100644 zone/gm_commands/forage.cpp diff --git a/zone/command.cpp b/zone/command.cpp index 9e73ce7a4..ff4c0be3d 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -133,6 +133,7 @@ int command_init(void) command_add("find", "Search command used to find various things", AccountStatus::Guide, command_find) || command_add("fixmob", "[race|gender|texture|helm|face|hair|haircolor|beard|beardcolor|heritage|tattoo|detail] [next|prev] - Manipulate appearance of your target", AccountStatus::QuestTroupe, command_fixmob) || command_add("flagedit", "Edit zone flags on your target. Use #flagedit help for more info.", AccountStatus::GMAdmin, command_flagedit) || + command_add("forage", "Forage an item", AccountStatus::QuestTroupe, command_forage) || command_add("gearup", "Developer tool to quickly equip yourself or your target", AccountStatus::GMMgmt, command_gearup) || command_add("giveitem", "[itemid] [charges] - Summon an item onto your target's cursor. Charges are optional.", AccountStatus::GMMgmt, command_giveitem) || command_add("givemoney", "[Platinum] [Gold] [Silver] [Copper] - Gives specified amount of money to you or your player target", AccountStatus::GMMgmt, command_givemoney) || @@ -824,6 +825,7 @@ void command_bot(Client *c, const Seperator *sep) #include "gm_commands/find.cpp" #include "gm_commands/fixmob.cpp" #include "gm_commands/flagedit.cpp" +#include "gm_commands/forage.cpp" #include "gm_commands/gearup.cpp" #include "gm_commands/giveitem.cpp" #include "gm_commands/givemoney.cpp" diff --git a/zone/command.h b/zone/command.h index 1a9abc6ce..6f181978f 100644 --- a/zone/command.h +++ b/zone/command.h @@ -85,6 +85,7 @@ void command_feature(Client *c, const Seperator *sep); void command_find(Client *c, const Seperator *sep); void command_fixmob(Client *c, const Seperator *sep); void command_flagedit(Client *c, const Seperator *sep); +void command_forage(Client* c, const Seperator* sep); void command_gearup(Client *c, const Seperator *sep); void command_giveitem(Client *c, const Seperator *sep); void command_givemoney(Client *c, const Seperator *sep); diff --git a/zone/gm_commands/forage.cpp b/zone/gm_commands/forage.cpp new file mode 100644 index 000000000..b4717aac7 --- /dev/null +++ b/zone/gm_commands/forage.cpp @@ -0,0 +1,6 @@ +#include "../client.h" + +void command_forage(Client *c, const Seperator *sep) +{ + c->ForageItem(true); +}