diff --git a/zone/bot_commands/spell_aggro_checks.cpp b/zone/bot_commands/spell_aggro_checks.cpp index 2c5b92aaf..1c5a34e02 100644 --- a/zone/bot_commands/spell_aggro_checks.cpp +++ b/zone/bot_commands/spell_aggro_checks.cpp @@ -94,8 +94,16 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { - c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { + c->Message( + Chat::Yellow, + fmt::format( + "You must choose a valid spell type. Use {} for information regarding this command.", + Saylink::Silent( + fmt::format("{} help", sep->arg[0]) + ) + ).c_str() + ); return; } diff --git a/zone/bot_commands/spell_delays.cpp b/zone/bot_commands/spell_delays.cpp index 1decded54..a28431660 100644 --- a/zone/bot_commands/spell_delays.cpp +++ b/zone/bot_commands/spell_delays.cpp @@ -106,13 +106,17 @@ void bot_command_spell_delays(Client* c, const Seperator* sep) { if ( (clientSetting && !IsClientBotSpellType(spell_type)) || - (!clientSetting && (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END)) + (!clientSetting && !EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) ) { c->Message( Chat::Yellow, - clientSetting ? "Invalid spell type for clients." : "You must choose a valid spell type. Spell types range from %i to %i", - BotSpellTypes::START, - BotSpellTypes::END + fmt::format( + "{}. Use {} for information regarding this command.", + (!clientSetting ? "You must choose a valid spell type" : "You must choose a valid client spell type"), + Saylink::Silent( + fmt::format("{} help", sep->arg[0]) + ) + ).c_str() ); if (clientSetting) { diff --git a/zone/bot_commands/spell_engaged_priority.cpp b/zone/bot_commands/spell_engaged_priority.cpp index 3621c6c6b..d01366178 100644 --- a/zone/bot_commands/spell_engaged_priority.cpp +++ b/zone/bot_commands/spell_engaged_priority.cpp @@ -99,7 +99,7 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return; diff --git a/zone/bot_commands/spell_holds.cpp b/zone/bot_commands/spell_holds.cpp index b7ad108ae..5b5815fb5 100644 --- a/zone/bot_commands/spell_holds.cpp +++ b/zone/bot_commands/spell_holds.cpp @@ -78,7 +78,7 @@ void bot_command_spell_holds(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return; diff --git a/zone/bot_commands/spell_idle_priority.cpp b/zone/bot_commands/spell_idle_priority.cpp index 830cd8f3b..4ae827639 100644 --- a/zone/bot_commands/spell_idle_priority.cpp +++ b/zone/bot_commands/spell_idle_priority.cpp @@ -99,7 +99,7 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return; diff --git a/zone/bot_commands/spell_max_hp_pct.cpp b/zone/bot_commands/spell_max_hp_pct.cpp index c1a9d43b3..5bc42a7ad 100644 --- a/zone/bot_commands/spell_max_hp_pct.cpp +++ b/zone/bot_commands/spell_max_hp_pct.cpp @@ -91,7 +91,7 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return; diff --git a/zone/bot_commands/spell_max_mana_pct.cpp b/zone/bot_commands/spell_max_mana_pct.cpp index 38c78a7e4..0e526ab8e 100644 --- a/zone/bot_commands/spell_max_mana_pct.cpp +++ b/zone/bot_commands/spell_max_mana_pct.cpp @@ -91,7 +91,7 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return; diff --git a/zone/bot_commands/spell_max_thresholds.cpp b/zone/bot_commands/spell_max_thresholds.cpp index 328345a2d..ec4faca4e 100644 --- a/zone/bot_commands/spell_max_thresholds.cpp +++ b/zone/bot_commands/spell_max_thresholds.cpp @@ -102,13 +102,17 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep) { if ( (clientSetting && !IsClientBotSpellType(spell_type)) || - (!clientSetting && (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END)) + (!clientSetting && !EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) ) { c->Message( Chat::Yellow, - clientSetting ? "Invalid spell type for clients." : "You must choose a valid spell type. Spell types range from %i to %i", - BotSpellTypes::START, - BotSpellTypes::END + fmt::format( + "{}. Use {} for information regarding this command.", + (!clientSetting ? "You must choose a valid spell type" : "You must choose a valid client spell type"), + Saylink::Silent( + fmt::format("{} help", sep->arg[0]) + ) + ).c_str() ); if (clientSetting) { diff --git a/zone/bot_commands/spell_min_hp_pct.cpp b/zone/bot_commands/spell_min_hp_pct.cpp index 64a1531fc..11da31ac8 100644 --- a/zone/bot_commands/spell_min_hp_pct.cpp +++ b/zone/bot_commands/spell_min_hp_pct.cpp @@ -91,7 +91,7 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return; diff --git a/zone/bot_commands/spell_min_mana_pct.cpp b/zone/bot_commands/spell_min_mana_pct.cpp index f99539c58..4fa3405df 100644 --- a/zone/bot_commands/spell_min_mana_pct.cpp +++ b/zone/bot_commands/spell_min_mana_pct.cpp @@ -91,7 +91,7 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return; diff --git a/zone/bot_commands/spell_min_thresholds.cpp b/zone/bot_commands/spell_min_thresholds.cpp index f39194e2a..6fcd43bed 100644 --- a/zone/bot_commands/spell_min_thresholds.cpp +++ b/zone/bot_commands/spell_min_thresholds.cpp @@ -104,13 +104,17 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep) { if ( (clientSetting && !IsClientBotSpellType(spell_type)) || - (!clientSetting && (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END)) + (!clientSetting && !EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) ) { c->Message( Chat::Yellow, - clientSetting ? "Invalid spell type for clients." : "You must choose a valid spell type. Spell types range from %i to %i", - BotSpellTypes::START, - BotSpellTypes::END + fmt::format( + "{}. Use {} for information regarding this command.", + (!clientSetting ? "You must choose a valid spell type" : "You must choose a valid client spell type"), + Saylink::Silent( + fmt::format("{} help", sep->arg[0]) + ) + ).c_str() ); if (clientSetting) { diff --git a/zone/bot_commands/spell_pursue_priority.cpp b/zone/bot_commands/spell_pursue_priority.cpp index eeba9792c..feb08fbe2 100644 --- a/zone/bot_commands/spell_pursue_priority.cpp +++ b/zone/bot_commands/spell_pursue_priority.cpp @@ -99,7 +99,7 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return; diff --git a/zone/bot_commands/spell_target_count.cpp b/zone/bot_commands/spell_target_count.cpp index c14167846..322de0d2d 100644 --- a/zone/bot_commands/spell_target_count.cpp +++ b/zone/bot_commands/spell_target_count.cpp @@ -91,7 +91,7 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep) if (sep->IsNumber(1)) { spell_type = atoi(sep->arg[1]); - if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) { + if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) { c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END); return;