diff --git a/zone/command.cpp b/zone/command.cpp index 375674bd6..155e55fa9 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -125,8 +125,6 @@ int command_init(void) command_add("attack", "[Entity Name] - Make your NPC target attack an entity by name", AccountStatus::GMLeadAdmin, command_attack) || command_add("augmentitem", "Force augments an item. Must have the augment item window open.", AccountStatus::GMImpossible, command_augmentitem) || command_add("ban", "[name] [reason]- Ban by character name", AccountStatus::GMLeadAdmin, command_ban) || - command_add("beard", "- Change the beard of your target", AccountStatus::QuestTroupe, command_beard) || - command_add("beardcolor", "- Change the beard color of your target", AccountStatus::QuestTroupe, command_beardcolor) || command_add("bestz", "- Ask map for a good Z coord for your x,y coords.", AccountStatus::Player, command_bestz) || command_add("bind", "- Sets your targets bind spot to their current location", AccountStatus::GMMgmt, command_bind) || @@ -153,7 +151,6 @@ int command_init(void) command_add("depop", "- Depop your NPC target", AccountStatus::Guide, command_depop) || command_add("depopzone", "- Depop the zone", AccountStatus::GMAdmin, command_depopzone) || command_add("devtools", "- Manages devtools", AccountStatus::GMMgmt, command_devtools) || - command_add("details", "- Change the details of your target (Drakkin Only)", AccountStatus::QuestTroupe, command_details) || command_add("disablerecipe", "[Recipe ID] - Disables a Recipe", AccountStatus::QuestTroupe, command_disablerecipe) || command_add("disarmtrap", "Analog for ldon disarm trap for the newer clients since we still don't have it working.", AccountStatus::QuestTroupe, command_disarmtrap) || command_add("distance", "- Reports the distance between you and your target.", AccountStatus::QuestTroupe, command_distance) || @@ -170,8 +167,8 @@ int command_init(void) command_add("enablerecipe", "[Recipe ID] - Enables a Recipe", AccountStatus::QuestTroupe, command_enablerecipe) || command_add("endurance", "Restores your or your target's endurance.", AccountStatus::Guide, command_endurance) || command_add("equipitem", "[slotid(0-21)] - Equip the item on your cursor into the specified slot", AccountStatus::Guide, command_equipitem) || - command_add("face", "- Change the face of your target", AccountStatus::QuestTroupe, command_face) || command_add("faction", "[Find (criteria | all ) | Review (criteria | all) | Reset (id)] - Resets Player's Faction", AccountStatus::QuestTroupe, command_faction) || + command_add("feature", "- Change your or your target's feature's temporarily", AccountStatus::QuestTroupe, command_feature) || command_add("findaliases", "[search criteria]- Searches for available command aliases, by alias or command", AccountStatus::Player, command_findaliases) || command_add("findclass", "[search criteria] - Search for a class", AccountStatus::Guide, command_findclass) || command_add("findfaction", "[search criteria] - Search for a faction", AccountStatus::Guide, command_findfaction) || @@ -206,14 +203,10 @@ int command_init(void) command_add("guildapprove", "[guildapproveid] - Approve a guild with specified ID (guild creator receives the id)", AccountStatus::Player, command_guildapprove) || command_add("guildcreate", "[guildname] - Creates an approval setup for guild name specified", AccountStatus::Player, command_guildcreate) || command_add("guildlist", "[guildapproveid] - Lists character names who have approved the guild specified by the approve id", AccountStatus::Player, command_guildlist) || - command_add("hair", "- Change the hair style of your target", AccountStatus::QuestTroupe, command_hair) || - command_add("haircolor", "- Change the hair color of your target", AccountStatus::QuestTroupe, command_haircolor) || command_add("haste", "[percentage] - Set your haste percentage", AccountStatus::GMAdmin, command_haste) || command_add("hatelist", "- Display hate list for NPC.", AccountStatus::QuestTroupe, command_hatelist) || command_add("heal", "- Completely heal your target", AccountStatus::Steward, command_heal) || - command_add("helm", "- Change the helm of your target", AccountStatus::QuestTroupe, command_helm) || command_add("help", "[search term] - List available commands and their description, specify partial command as argument to search", AccountStatus::Player, command_help) || - command_add("heritage", "- Change the heritage of your target (Drakkin Only)", AccountStatus::QuestTroupe, command_heritage) || command_add("heromodel", "[hero model] [slot] - Full set of Hero's Forge Armor appearance. If slot is set, sends exact model just to slot.", AccountStatus::GMMgmt, command_heromodel) || command_add("hideme", "[on/off] - Hide yourself from spawn lists.", AccountStatus::QuestTroupe, command_hideme) || command_add("hotfix", "[hotfix_name] - Reloads shared memory into a hotfix, equiv to load_shared_memory followed by apply_shared_memory", AccountStatus::GMImpossible, command_hotfix) || @@ -354,7 +347,6 @@ int command_init(void) command_add("showzonegloballoot", "Show GlobalLoot entires on this zone", AccountStatus::Guide, command_showzonegloballoot) || command_add("showzonepoints", "Show zone points for current zone", AccountStatus::Guide, command_showzonepoints) || command_add("shutdown", "- Shut this zone process down", AccountStatus::GMLeadAdmin, command_shutdown) || - command_add("size", "[size] - Change size of you or your target", AccountStatus::Guide, command_size) || command_add("spawn", "[name] [race] [level] [material] [hp] [gender] [class] [priweapon] [secweapon] [merchantid] - Spawn an NPC", AccountStatus::Steward, command_spawn) || command_add("spawneditmass", "Mass editing spawn command", AccountStatus::GMLeadAdmin, command_spawneditmass) || command_add("spawnfix", "- Find targeted NPC in database based on its X/Y/heading and update the database to make it spawn at your current location/heading.", AccountStatus::GMAreas, command_spawnfix) || @@ -366,7 +358,6 @@ int command_init(void) command_add("summonitem", "[itemid] [charges] - Summon an item onto your cursor. Charges are optional.", AccountStatus::GMMgmt, command_summonitem) || command_add("suspend", "[name] [days] [reason] - Suspend by character name and for specificed number of days", AccountStatus::GMLeadAdmin, command_suspend) || command_add("task", "(subcommand) - Task system commands", AccountStatus::GMLeadAdmin, command_task) || - command_add("tattoo", "- Change the tattoo of your target (Drakkin Only)", AccountStatus::QuestTroupe, command_tattoo) || command_add("tempname", "[newname] - Temporarily renames your target. Leave name blank to restore the original name.", AccountStatus::GMAdmin, command_tempname) || command_add("petname", "[newname] - Temporarily renames your pet. Leave name blank to restore the original name.", AccountStatus::GMAdmin, command_petname) || command_add("texture", "[Texture] [Helmet Texture] - Change your or your target's texture (Helmet Texture defaults to 0 if not used)", AccountStatus::Steward, command_texture) || @@ -1189,8 +1180,6 @@ void command_bot(Client *c, const Seperator *sep) #include "gm_commands/attack.cpp" #include "gm_commands/augmentitem.cpp" #include "gm_commands/ban.cpp" -#include "gm_commands/beard.cpp" -#include "gm_commands/beardcolor.cpp" #include "gm_commands/bestz.cpp" #include "gm_commands/bind.cpp" #include "gm_commands/camerashake.cpp" @@ -1211,7 +1200,6 @@ void command_bot(Client *c, const Seperator *sep) #include "gm_commands/delpetition.cpp" #include "gm_commands/depop.cpp" #include "gm_commands/depopzone.cpp" -#include "gm_commands/details.cpp" #include "gm_commands/devtools.cpp" #include "gm_commands/disablerecipe.cpp" #include "gm_commands/disarmtrap.cpp" @@ -1230,8 +1218,8 @@ void command_bot(Client *c, const Seperator *sep) #include "gm_commands/enablerecipe.cpp" #include "gm_commands/endurance.cpp" #include "gm_commands/equipitem.cpp" -#include "gm_commands/face.cpp" #include "gm_commands/faction.cpp" +#include "gm_commands/feature.cpp" #include "gm_commands/findclass.cpp" #include "gm_commands/findfaction.cpp" #include "gm_commands/findnpctype.cpp" @@ -1265,13 +1253,9 @@ void command_bot(Client *c, const Seperator *sep) #include "gm_commands/guildapprove.cpp" #include "gm_commands/guildcreate.cpp" #include "gm_commands/guildlist.cpp" -#include "gm_commands/hair.cpp" -#include "gm_commands/haircolor.cpp" #include "gm_commands/haste.cpp" #include "gm_commands/hatelist.cpp" #include "gm_commands/heal.cpp" -#include "gm_commands/helm.cpp" -#include "gm_commands/heritage.cpp" #include "gm_commands/heromodel.cpp" #include "gm_commands/hideme.cpp" #include "gm_commands/hp.cpp" @@ -1411,7 +1395,6 @@ void command_bot(Client *c, const Seperator *sep) #include "gm_commands/showzonegloballoot.cpp" #include "gm_commands/showzonepoints.cpp" #include "gm_commands/shutdown.cpp" -#include "gm_commands/size.cpp" #include "gm_commands/spawn.cpp" #include "gm_commands/spawnfix.cpp" #include "gm_commands/spawnstatus.cpp" @@ -1422,7 +1405,6 @@ void command_bot(Client *c, const Seperator *sep) #include "gm_commands/summonitem.cpp" #include "gm_commands/suspend.cpp" #include "gm_commands/task.cpp" -#include "gm_commands/tattoo.cpp" #include "gm_commands/tempname.cpp" #include "gm_commands/texture.cpp" #include "gm_commands/time.cpp" diff --git a/zone/command.h b/zone/command.h index 26476becc..0768b4bdf 100644 --- a/zone/command.h +++ b/zone/command.h @@ -39,8 +39,6 @@ void command_apply_shared_memory(Client *c, const Seperator *sep); void command_attack(Client *c, const Seperator *sep); void command_augmentitem(Client *c, const Seperator *sep); void command_ban(Client *c, const Seperator *sep); -void command_beard(Client *c, const Seperator *sep); -void command_beardcolor(Client *c, const Seperator *sep); void command_bind(Client *c, const Seperator *sep); void command_camerashake(Client *c, const Seperator *sep); void command_castspell(Client *c, const Seperator *sep); @@ -61,7 +59,6 @@ void command_delpetition(Client *c, const Seperator *sep); void command_depop(Client *c, const Seperator *sep); void command_depopzone(Client *c, const Seperator *sep); void command_devtools(Client *c, const Seperator *sep); -void command_details(Client *c, const Seperator *sep); void command_disablerecipe(Client *c, const Seperator *sep); void command_disarmtrap(Client *c, const Seperator *sep); void command_door(Client *c, const Seperator *sep); @@ -78,8 +75,8 @@ void command_emptyinventory(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); +void command_feature(Client *c, const Seperator *sep); void command_findaliases(Client *c, const Seperator *sep); void command_findclass(Client *c, const Seperator *sep); void command_findfaction(Client *c, const Seperator *sep); @@ -115,14 +112,10 @@ bool helper_guild_edit(Client *c, uint32 dbid, uint32 eqid, uint8 rank, const ch void command_guildapprove(Client *c, const Seperator *sep); void command_guildcreate(Client *c, const Seperator *sep); void command_guildlist(Client *c, const Seperator *sep); -void command_hair(Client *c, const Seperator *sep); -void command_haircolor(Client *c, const Seperator *sep); void command_haste(Client *c, const Seperator *sep); void command_hatelist(Client *c, const Seperator *sep); void command_heal(Client *c, const Seperator *sep); -void command_helm(Client *c, const Seperator *sep); void command_help(Client *c, const Seperator *sep); -void command_heritage(Client *c, const Seperator *sep); void command_heromodel(Client *c, const Seperator *sep); void command_hideme(Client *c, const Seperator *sep); void command_hotfix(Client *c, const Seperator *sep); @@ -276,7 +269,6 @@ void command_showstats(Client *c, const Seperator *sep); void command_showzonegloballoot(Client *c, const Seperator *sep); void command_showzonepoints(Client *c, const Seperator *sep); void command_shutdown(Client *c, const Seperator *sep); -void command_size(Client *c, const Seperator *sep); void command_spawn(Client *c, const Seperator *sep); void command_spawneditmass(Client *c, const Seperator *sep); void command_spawnfix(Client *c, const Seperator *sep); @@ -288,7 +280,6 @@ void command_summonburiedplayercorpse(Client *c, const Seperator *sep); void command_summonitem(Client *c, const Seperator *sep); void command_suspend(Client *c, const Seperator *sep); void command_task(Client *c, const Seperator *sep); -void command_tattoo(Client *c, const Seperator *sep); void command_tempname(Client *c, const Seperator *sep); void command_petname(Client *c, const Seperator *sep); void command_texture(Client *c, const Seperator *sep); diff --git a/zone/gm_commands/beard.cpp b/zone/gm_commands/beard.cpp deleted file mode 100755 index b43b7b9d4..000000000 --- a/zone/gm_commands/beard.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_beard(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #beard [number of beard style]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = atoi(sep->arg[1]); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Beard = %i", atoi(sep->arg[1])); - } -} - diff --git a/zone/gm_commands/beardcolor.cpp b/zone/gm_commands/beardcolor.cpp deleted file mode 100755 index 85eccf390..000000000 --- a/zone/gm_commands/beardcolor.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_beardcolor(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #beardcolor [number of beard color]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = atoi(sep->arg[1]); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Beard Color = %i", atoi(sep->arg[1])); - } -} - diff --git a/zone/gm_commands/details.cpp b/zone/gm_commands/details.cpp deleted file mode 100755 index f8b5dee8f..000000000 --- a/zone/gm_commands/details.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_details(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #details [number of drakkin detail]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = atoi(sep->arg[1]); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Details = %i", atoi(sep->arg[1])); - } -} - diff --git a/zone/gm_commands/face.cpp b/zone/gm_commands/face.cpp deleted file mode 100755 index 274d5a300..000000000 --- a/zone/gm_commands/face.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_face(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #face [number of face]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = atoi(sep->arg[1]); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Face = %i", atoi(sep->arg[1])); - } -} - diff --git a/zone/gm_commands/feature.cpp b/zone/gm_commands/feature.cpp new file mode 100644 index 000000000..bacd6c7c0 --- /dev/null +++ b/zone/gm_commands/feature.cpp @@ -0,0 +1,236 @@ +#include "../client.h" + +void command_feature(Client *c, const Seperator *sep) +{ + int arguments = sep->argnum; + if (arguments < 2) { + auto feature_save_link = EQ::SayLinkEngine::GenerateQuestSaylink( + "#npcedit featuresave", + false, + "#npcedit featuresave" + ); + + c->Message(Chat::White, "Usage: #feature beard [Beard] - Change your or your target's Beard"); + c->Message(Chat::White, "Usage: #feature beardcolor [Beard Color] - Change your or your target's Beard Color"); + c->Message(Chat::White, "Usage: #feature details [Details] - Change your or your target's Drakkin Details"); + c->Message(Chat::White, "Usage: #feature face [Face] - Change your or your target's Face"); + c->Message(Chat::White, "Usage: #feature gender [Gender] - Change your or your target's Gender"); + c->Message(Chat::White, "Usage: #feature hair [Hair] - Change your or your target's Hair"); + c->Message(Chat::White, "Usage: #feature haircolor [Hair Color] - Change your or your target's Hair Color"); + c->Message(Chat::White, "Usage: #feature helm [Helmet Texture] - Change your or your target's Helmet Texture"); + c->Message(Chat::White, "Usage: #feature heritage [Heritage] - Change your or your target's Drakkin Heritage"); + c->Message(Chat::White, "Usage: #feature race [Race ID] - Change your or your target's Race"); + c->Message(Chat::White, "Usage: #feature size [Size] - Change your or your target's Size (Valid values are 0 to 255, decimal increments are allowed.)"); + c->Message(Chat::White, "Usage: #feature tattoo [Tattoo] - Change your or your target's Drakkin Tattoos"); + c->Message(Chat::White, "Usage: #feature texture [Texture] - Change your or your target's Texture"); + c->Message( + Chat::White, + fmt::format( + "Note: All features are temporary. If your target is an NPC, you can save these features to the database using {}.", + feature_save_link + ).c_str() + ); + return; + } + + Mob* target = c->GetTarget() ? c->GetTarget() : c; + + bool is_beard = !strcasecmp(sep->arg[1], "beard"); + bool is_beard_color = !strcasecmp(sep->arg[1], "beardcolor"); + bool is_details = !strcasecmp(sep->arg[1], "details"); + bool is_face = !strcasecmp(sep->arg[1], "face"); + bool is_gender = !strcasecmp(sep->arg[1], "gender"); + bool is_hair = !strcasecmp(sep->arg[1], "hair"); + bool is_hair_color = !strcasecmp(sep->arg[1], "haircolor"); + bool is_helm = !strcasecmp(sep->arg[1], "helm"); + bool is_heritage = !strcasecmp(sep->arg[1], "heritage"); + bool is_race = !strcasecmp(sep->arg[1], "race"); + bool is_size = !strcasecmp(sep->arg[1], "size"); + bool is_tattoo = !strcasecmp(sep->arg[1], "tattoo"); + bool is_texture = !strcasecmp(sep->arg[1], "texture"); + + if ( + !is_beard && + !is_beard_color && + !is_details && + !is_face && + !is_gender && + !is_hair && + !is_hair_color && + !is_helm && + !is_heritage && + !is_race && + !is_size && + !is_tattoo && + !is_texture + ) { + auto feature_save_link = EQ::SayLinkEngine::GenerateQuestSaylink( + "#npcedit featuresave", + false, + "#npcedit featuresave" + ); + + c->Message(Chat::White, "Usage: #feature beard [Beard] - Change your or your target's Beard"); + c->Message(Chat::White, "Usage: #feature beardcolor [Beard Color] - Change your or your target's Beard Color"); + c->Message(Chat::White, "Usage: #feature details [Details] - Change your or your target's Drakkin Details"); + c->Message(Chat::White, "Usage: #feature face [Face] - Change your or your target's Face"); + c->Message(Chat::White, "Usage: #feature gender [Gender] - Change your or your target's Gender"); + c->Message(Chat::White, "Usage: #feature hair [Hair] - Change your or your target's Hair"); + c->Message(Chat::White, "Usage: #feature haircolor [Hair Color] - Change your or your target's Hair Color"); + c->Message(Chat::White, "Usage: #feature helm [Helmet Texture] - Change your or your target's Helmet Texture"); + c->Message(Chat::White, "Usage: #feature heritage [Heritage] - Change your or your target's Drakkin Heritage"); + c->Message(Chat::White, "Usage: #feature race [Race ID] - Change your or your target's Race"); + c->Message(Chat::White, "Usage: #feature size [Size] - Change your or your target's Size (Valid values are 0 to 255, decimal increments are allowed.)"); + c->Message(Chat::White, "Usage: #feature tattoo [Tattoo] - Change your or your target's Drakkin Tattoos"); + c->Message(Chat::White, "Usage: #feature texture [Texture] - Change your or your target's Texture"); + c->Message( + Chat::White, + fmt::format( + "Note: All features are temporary. If your target is an NPC, you can save these features to the database using {}.", + feature_save_link + ).c_str() + ); + return; + } + + auto beard = target->GetBeard(); + auto beard_color = target->GetBeardColor(); + auto details = target->GetDrakkinDetails(); + auto face = target->GetLuclinFace(); + auto gender = target->GetGender(); + auto hair = target->GetHairStyle(); + auto hair_color = target->GetHairColor(); + auto helm_texture = target->GetHelmTexture(); + auto heritage = target->GetDrakkinHeritage(); + auto race = target->GetModel(); + auto size = target->GetSize(); + auto tattoo = target->GetDrakkinTattoo(); + auto texture = target->GetTexture(); + + + std::string feature_changed; + float value_changed; + + if (is_beard) { + beard = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Beard"; + value_changed = beard; + } else if (is_beard_color) { + beard_color = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Beard Color"; + value_changed = beard_color; + } else if (is_details) { + if (target->GetRace() != DRAKKIN) { + c->Message(Chat::White, "You must target a Drakkin to use this command."); + return; + } + + details = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Drakkin Details"; + value_changed = details; + } else if (is_face) { + face = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Face"; + value_changed = face; + } else if (is_gender) { + gender = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Gender"; + value_changed = gender; + } else if (is_hair) { + hair = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Hair"; + value_changed = hair; + } else if (is_hair_color) { + hair_color = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Hair Color"; + value_changed = hair_color; + } else if (is_helm) { + helm_texture = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Helmet Texture"; + value_changed = helm_texture; + } else if (is_heritage) { + if (target->GetRace() != DRAKKIN) { + c->Message(Chat::White, "You must target a Drakkin to use this command."); + return; + } + + heritage = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Drakkin Heritage"; + value_changed = heritage; + } else if (is_race) { + race = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Race"; + value_changed = race; + } else if (is_size) { + size = std::stof(sep->arg[2]); + + if (size < 0 || size > 255) { + c->Message(Chat::White, "Usage: #feature size [Size] - Change your or your target's Size temporarily (Valid values are 0 to 255, decimal increments are allowed.)"); + return; + } + + feature_changed = "Size"; + value_changed = size; + } else if (is_tattoo) { + if (target->GetRace() != DRAKKIN) { + c->Message(Chat::White, "You must target a Drakkin to use this command."); + return; + } + + tattoo = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Drakkin Tattoos"; + value_changed = tattoo; + } else if (is_texture) { + texture = static_cast(std::stoul(sep->arg[2])); + feature_changed = "Texture"; + value_changed = texture; + } + + target->SendIllusionPacket( + race, + gender, + texture, + helm_texture, + hair_color, + beard_color, + target->GetEyeColor1(), + target->GetEyeColor2(), + hair, + face, + beard, + 0xFF, + heritage, + tattoo, + details, + size + ); + + c->Message( + Chat::White, + fmt::format( + "{} set for {} to {}.", + feature_changed, + ( + c == target ? + "yourself" : + fmt::format( + "{} ({})", + target->GetCleanName(), + target->GetID() + ) + ), + ( + is_size ? + fmt::format( + "{:.2f}", + value_changed + ) : + fmt::format( + "{}", + static_cast(value_changed) + ) + ) + ).c_str() + ); +} + diff --git a/zone/gm_commands/hair.cpp b/zone/gm_commands/hair.cpp deleted file mode 100755 index 56f80aaed..000000000 --- a/zone/gm_commands/hair.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_hair(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #hair [number of hair style]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = atoi(sep->arg[1]); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Hair = %i", atoi(sep->arg[1])); - } -} - diff --git a/zone/gm_commands/haircolor.cpp b/zone/gm_commands/haircolor.cpp deleted file mode 100755 index 2767808ac..000000000 --- a/zone/gm_commands/haircolor.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_haircolor(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #haircolor [number of hair color]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = atoi(sep->arg[1]); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Hair Color = %i", atoi(sep->arg[1])); - } -} - diff --git a/zone/gm_commands/helm.cpp b/zone/gm_commands/helm.cpp deleted file mode 100755 index 8d0a36407..000000000 --- a/zone/gm_commands/helm.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_helm(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #helm [number of helm texture]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = atoi(sep->arg[1]); - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Helm = %i", atoi(sep->arg[1])); - } -} - diff --git a/zone/gm_commands/heritage.cpp b/zone/gm_commands/heritage.cpp deleted file mode 100755 index 0f4e1d9e9..000000000 --- a/zone/gm_commands/heritage.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_heritage(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #heritage [number of Drakkin heritage]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = atoi(sep->arg[1]); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Heritage = %i", atoi(sep->arg[1])); - } -} - diff --git a/zone/gm_commands/npcedit.cpp b/zone/gm_commands/npcedit.cpp index 50d15b0bc..e0c426563 100755 --- a/zone/gm_commands/npcedit.cpp +++ b/zone/gm_commands/npcedit.cpp @@ -537,19 +537,29 @@ void command_npcedit(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "featuresave") == 0) { c->Message( Chat::Yellow, - fmt::format("NPC ID {} saved with all current facial feature settings.", npc_id).c_str()); + fmt::format("NPC ID {} saved with all current body and facial feature settings.", npc_id).c_str()); Mob *target = c->GetTarget(); std::string query = fmt::format( "UPDATE npc_types " "SET luclin_haircolor = {}, luclin_beardcolor = {}, " "luclin_hairstyle = {}, luclin_beard = {}, " "face = {}, drakkin_heritage = {}, " - "drakkin_tattoo = {}, drakkin_details = {} " + "drakkin_tattoo = {}, drakkin_details = {}, " + "texture = {}, helmtexture = {}, " + "gender = {}, size = {:.2f}" "WHERE id = {}", - target->GetHairColor(), target->GetBeardColor(), - target->GetHairStyle(), target->GetBeard(), - target->GetLuclinFace(), target->GetDrakkinHeritage(), - target->GetDrakkinTattoo(), target->GetDrakkinDetails(), + target->GetHairColor(), + target->GetBeardColor(), + target->GetHairStyle(), + target->GetBeard(), + target->GetLuclinFace(), + target->GetDrakkinHeritage(), + target->GetDrakkinTattoo(), + target->GetDrakkinDetails(), + target->GetTexture(), + target->GetHelmTexture(), + target->GetGender(), + target->GetSize(), npc_id ); content_db.QueryDatabase(query); diff --git a/zone/gm_commands/size.cpp b/zone/gm_commands/size.cpp deleted file mode 100755 index 3ff412549..000000000 --- a/zone/gm_commands/size.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#include "../client.h" - -void command_size(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #size [0 - 255] (Decimal increments are allowed)"); - } - else { - float newsize = atof(sep->arg[1]); - if (newsize > 255) { - c->Message(Chat::White, "Error: #size: Size can not be greater than 255."); - } - else if (newsize < 0) { - c->Message(Chat::White, "Error: #size: Size can not be less than 0."); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetModel(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = target->GetDrakkinTattoo(); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails, newsize - ); - - c->Message(Chat::White, "Size = %f", atof(sep->arg[1])); - } - } -} - diff --git a/zone/gm_commands/tattoo.cpp b/zone/gm_commands/tattoo.cpp deleted file mode 100755 index 8d1433bbe..000000000 --- a/zone/gm_commands/tattoo.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "../client.h" - -void command_tattoo(Client *c, const Seperator *sep) -{ - Mob *target = c->GetTarget(); - if (!sep->IsNumber(1)) { - c->Message(Chat::White, "Usage: #tattoo [number of Drakkin tattoo]"); - } - else if (!target) { - c->Message(Chat::White, "Error: this command requires a target"); - } - else { - uint16 Race = target->GetRace(); - uint8 Gender = target->GetGender(); - uint8 Texture = 0xFF; - uint8 HelmTexture = 0xFF; - uint8 HairColor = target->GetHairColor(); - uint8 BeardColor = target->GetBeardColor(); - uint8 EyeColor1 = target->GetEyeColor1(); - uint8 EyeColor2 = target->GetEyeColor2(); - uint8 HairStyle = target->GetHairStyle(); - uint8 LuclinFace = target->GetLuclinFace(); - uint8 Beard = target->GetBeard(); - uint32 DrakkinHeritage = target->GetDrakkinHeritage(); - uint32 DrakkinTattoo = atoi(sep->arg[1]); - uint32 DrakkinDetails = target->GetDrakkinDetails(); - - target->SendIllusionPacket( - Race, Gender, Texture, HelmTexture, HairColor, BeardColor, - EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, - DrakkinHeritage, DrakkinTattoo, DrakkinDetails - ); - - c->Message(Chat::White, "Tattoo = %i", atoi(sep->arg[1])); - } -} -