Cleanup command format changes, remove hardcoded class IDs in examples.

This commit is contained in:
nytmyr
2025-01-22 16:41:48 -06:00
parent 42b4174861
commit 850e996b71
24 changed files with 101 additions and 186 deletions
+8 -7
View File
@@ -12,18 +12,19 @@ void bot_command_behind_mob(Client* c, const Seperator* sep)
BotCommandHelpParams p; BotCommandHelpParams p;
p.description = { "Toggles whether or not bots will stay behind the mob during combat." }; p.description = { "Toggles whether or not bots will stay behind the mob during combat." };
p.example_format = { p.example_format = { fmt::format("{} [value] [actionable]", sep->arg[0]) };
fmt::format("{} [value] [actionable]", sep->arg[0]) p.examples_one =
}; {
p.examples_one = {
"To set Monks to stay behind the mob:", "To set Monks to stay behind the mob:",
fmt::format("{} 1 byclass 7", sep->arg[0]) fmt::format("{} 1 byclass {}", sep->arg[0], Class::Monk)
}; };
p.examples_two = { p.examples_two =
{
"To force all bots to stay behind mobs:", "To force all bots to stay behind mobs:",
fmt::format("{} 1 spawned", sep->arg[0]) fmt::format("{} 1 spawned", sep->arg[0])
}; };
p.examples_three = { p.examples_three =
{
"To check the behind mob status of all bots:", "To check the behind mob status of all bots:",
fmt::format("{} current spawned", sep->arg[0]) fmt::format("{} current spawned", sep->arg[0])
}; };
+8 -13
View File
@@ -19,18 +19,19 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep)
p.description = { "Allows you to set, view and wipe blocked buffs for the selected bots." }; p.description = { "Allows you to set, view and wipe blocked buffs for the selected bots." };
p.notes = { "- You can 'set' spells to be blocked, 'remove' spells from the blocked list, 'list' the current blocked spells or 'wipe' the entire list." }; p.notes = { "- You can 'set' spells to be blocked, 'remove' spells from the blocked list, 'list' the current blocked spells or 'wipe' the entire list." };
p.example_format = { p.example_format = { fmt::format("{} [add [ID] | remove [ID] | list | wipe] [actionable, default: target]", sep->arg[0]) };
fmt::format("{} [add [ID] | remove [ID] | list | wipe] [actionable, default: target]", sep->arg[0]) p.examples_one =
}; {
p.examples_one = {
"To add Courage(Spell ID #202) to the targeted bot's blocked list:", "To add Courage(Spell ID #202) to the targeted bot's blocked list:",
fmt::format("{} add 202", sep->arg[0]) fmt::format("{} add 202", sep->arg[0])
}; };
p.examples_two = { p.examples_two =
{
"To view the targeted bot's blocked buff list:", "To view the targeted bot's blocked buff list:",
fmt::format("{} list", sep->arg[0]) fmt::format("{} list", sep->arg[0])
}; };
p.examples_three = { p.examples_three =
{
"To wipe all Warriors bots' blocked buff list:", "To wipe all Warriors bots' blocked buff list:",
fmt::format( "{} wipe byclass {}", sep->arg[0], Class::Warrior) fmt::format( "{} wipe byclass {}", sep->arg[0], Class::Warrior)
}; };
@@ -243,13 +244,7 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
"- You can 'set' spells to be blocked, 'remove' spells from the blocked list, 'list' the current blocked spells or 'wipe' the entire list.", "- You can 'set' spells to be blocked, 'remove' spells from the blocked list, 'list' the current blocked spells or 'wipe' the entire list.",
"- This controls whether or not any pet the selected bot(s) own will prevent certain beneficial buffs from landing on them." "- This controls whether or not any pet the selected bot(s) own will prevent certain beneficial buffs from landing on them."
}; };
p.example_format = p.example_format = { fmt::format("{} [add [ID] | remove [ID] | list | wipe] [actionable, default: target]", sep->arg[0]) };
{
fmt::format(
"{} [add [ID] | remove [ID] | list | wipe] [actionable, default: target]"
, sep->arg[0]
)
};
p.examples_one = p.examples_one =
{ {
"To add Courage (Spell ID #202) to the targeted bot's blocked list:", "To add Courage (Spell ID #202) to the targeted bot's blocked list:",
+9 -14
View File
@@ -486,9 +486,7 @@ void bot_command_follow_distance(Client *c, const Seperator *sep)
fmt::format("[Default]: {}", RuleI(Bots, MaxFollowDistance)), fmt::format("[Default]: {}", RuleI(Bots, MaxFollowDistance)),
fmt::format("- You must use a value between 1 and {}.", RuleI(Bots, MaxFollowDistance)) fmt::format("- You must use a value between 1 and {}.", RuleI(Bots, MaxFollowDistance))
}; };
p.example_format = { p.example_format = { fmt::format("{} [reset]/[set [value]] [actionable]", sep->arg[0]) };
fmt::format("{} [reset]/[set [value]] [actionable]", sep->arg[0])
};
p.examples_one = { p.examples_one = {
"To set all bots to follow at a distance of 25:", "To set all bots to follow at a distance of 25:",
fmt::format("{} set 25 spawned", sep->arg[0]) fmt::format("{} set 25 spawned", sep->arg[0])
@@ -1157,7 +1155,8 @@ void bot_command_stance(Client *c, const Seperator *sep)
BotCommandHelpParams p; BotCommandHelpParams p;
p.description = { "Change a bot's stance to control the way it behaves." }; p.description = { "Change a bot's stance to control the way it behaves." };
p.notes = { p.notes =
{
"- <b>Changing a stance will reset all settings to match that stance type.</b>", "- <b>Changing a stance will reset all settings to match that stance type.</b>",
"- Any changes made will only save to that stance for future use.", "- Any changes made will only save to that stance for future use.",
fmt::format( fmt::format(
@@ -1221,15 +1220,10 @@ void bot_command_stance(Client *c, const Seperator *sep)
Stance::AEBurn Stance::AEBurn
) )
}; };
p.example_format =
p.example_format = { { fmt::format( "{} [current | value]", sep->arg[0]) };
fmt::format( "{} [current | value: {}-{}]", p.examples_one =
sep->arg[0], {
Stance::Passive,
Stance::AEBurn
)
};
p.examples_one = {
"To set all bots to BurnAE:", "To set all bots to BurnAE:",
fmt::format("{} {} spawned {}", fmt::format("{} {} spawned {}",
sep->arg[0], sep->arg[0],
@@ -1237,7 +1231,8 @@ void bot_command_stance(Client *c, const Seperator *sep)
Class::ShadowKnight Class::ShadowKnight
) )
}; };
p.examples_two = { p.examples_two =
{
"To set all Shadowknights to Aggressive:", "To set all Shadowknights to Aggressive:",
fmt::format("{} {} byclass {}", fmt::format("{} {} byclass {}",
sep->arg[0], sep->arg[0],
+2 -11
View File
@@ -19,20 +19,11 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
{ {
"- You can put a spell type ID or shortname after any option except [all], [misc] and [spellsettings] to restore that specifc spell type only" "- You can put a spell type ID or shortname after any option except [all], [misc] and [spellsettings] to restore that specifc spell type only"
}; };
p.example_format = p.example_format = { fmt::format("{} [from] [to] [option]", sep->arg[0]) };
{
fmt::format(
"{} [from] [to] [option]"
, sep->arg[0]
)
};
p.examples_one = p.examples_one =
{ {
"To copy all settings from BotA to BotB:", "To copy all settings from BotA to BotB:",
fmt::format( fmt::format("{} BotA BotB all", sep->arg[0])
"{} BotA BotB all",
sep->arg[0]
)
}; };
p.examples_two = p.examples_two =
{ {
+4 -6
View File
@@ -13,16 +13,14 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
p.description = { "Restores a bot's setting(s) to defaults" }; p.description = { "Restores a bot's setting(s) to defaults" };
p.notes = { "- You can put a spell type ID or shortname after any option except [all], [misc] and [spellsettings] to restore that specifc spell type only"}; p.notes = { "- You can put a spell type ID or shortname after any option except [all], [misc] and [spellsettings] to restore that specifc spell type only"};
p.example_format = p.example_format = { fmt::format("{} [option] [actionable]", sep->arg[0]) };
{
fmt::format("{} [option] [actionable]", sep->arg[0])
};
p.examples_one = p.examples_one =
{ {
"To restore delays for Clerics:", "To restore delays for Clerics:",
fmt::format( fmt::format(
"{} delays byclass 2", "{} delays byclass {}",
sep->arg[0] sep->arg[0],
Class::Cleric
) )
}; };
p.examples_two = p.examples_two =
+1 -2
View File
@@ -21,8 +21,7 @@ void bot_command_depart(Client* c, const Seperator* sep)
p.examples_one = p.examples_one =
{ {
"To tell everyone to list their portable locations:", "To tell everyone to list their portable locations:",
fmt::format( fmt::format("{} list spawned",
"{} list spawned",
sep->arg[0] sep->arg[0]
) )
}; };
+1 -4
View File
@@ -16,10 +16,7 @@ void bot_command_discipline(Client* c, const Seperator* sep)
"Tells applicable bots to use the specified disciplines." "Tells applicable bots to use the specified disciplines."
}; };
p.notes = { "Aside from Lay On Hands and Harm Touch, you will need to know the spell ID of the discipline to tell a bot to attempt to use it." }; p.notes = { "Aside from Lay On Hands and Harm Touch, you will need to know the spell ID of the discipline to tell a bot to attempt to use it." };
p.example_format = p.example_format = { fmt::format("{} [aggressive | defensive | spell ID] [actionable, default: spawned]", sep->arg[0]) };
{
fmt::format("{} [aggressive | defensive | spell ID] [actionable, default: spawned]", sep->arg[0])
};
p.examples_one = p.examples_one =
{ {
"To tell all bots to use an aggressive discipline:", "To tell all bots to use an aggressive discipline:",
+1 -3
View File
@@ -18,9 +18,7 @@ void bot_command_distance_ranged(Client* c, const Seperator* sep)
"- Casters will never go closer than their maximum melee range.", "- Casters will never go closer than their maximum melee range.",
"- Throwing bots will never get closer than the minimum value for ranged to work, or beyond the range of their items." "- Throwing bots will never get closer than the minimum value for ranged to work, or beyond the range of their items."
}; };
p.example_format = { p.example_format = { fmt::format("{} [value] [actionable]", sep->arg[0]) };
fmt::format("{} [value] [actionable]", sep->arg[0])
};
p.examples_one = { p.examples_one = {
"To set Wizards to a range of 100:", "To set Wizards to a range of 100:",
fmt::format( fmt::format(
+3 -2
View File
@@ -17,8 +17,9 @@ void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
{ {
"To set Clerics to sit at 45% HP:", "To set Clerics to sit at 45% HP:",
fmt::format( fmt::format(
"{} 45 byclass 2", "{} 45 byclass {}",
sep->arg[0] sep->arg[0],
Class::Cleric
) )
}; };
p.examples_two = p.examples_two =
+3 -2
View File
@@ -17,8 +17,9 @@ void bot_command_sit_in_combat(Client* c, const Seperator* sep)
{ {
"To set Clerics to sit in combat:", "To set Clerics to sit in combat:",
fmt::format( fmt::format(
"{} 1 byclass 2", "{} 1 byclass {}",
sep->arg[0] sep->arg[0],
Class::Cleric
) )
}; };
p.examples_two = p.examples_two =
+3 -2
View File
@@ -17,8 +17,9 @@ void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
{ {
"To set Clerics to sit at 45% Mana:", "To set Clerics to sit at 45% Mana:",
fmt::format( fmt::format(
"{} 45 byclass 2", "{} 45 byclass {}",
sep->arg[0] sep->arg[0],
Class::Cleric
) )
}; };
p.examples_two = p.examples_two =
+8 -12
View File
@@ -14,14 +14,8 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
p.description = { "Toggles whether or not bots will cast a spell type if they think it will get them aggro." }; p.description = { "Toggles whether or not bots will cast a spell type if they think it will get them aggro." };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
@@ -41,14 +35,16 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
{ {
"To set Shadowknights to ignore aggro checks on snares:", "To set Shadowknights to ignore aggro checks on snares:",
fmt::format( fmt::format(
"{} {} 0 byclass 5", "{} {} 0 byclass {}",
sep->arg[0], sep->arg[0],
c->GetSpellTypeShortNameByID(BotSpellTypes::Snare) c->GetSpellTypeShortNameByID(BotSpellTypes::Snare),
Class::ShadowKnight
), ),
fmt::format( fmt::format(
"{} {} 0 byclass 5", "{} {} 0 byclass {}",
sep->arg[0], sep->arg[0],
BotSpellTypes::Snare BotSpellTypes::Snare,
Class::ShadowKnight
) )
}; };
p.examples_three = p.examples_three =
+8 -12
View File
@@ -19,27 +19,23 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
}; };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
"To set all Shaman to cast slows first:", "To set all Shaman to cast slows first:",
fmt::format( fmt::format(
"{} {} 1 byclass 10", "{} {} 1 byclass {}",
sep->arg[0], sep->arg[0],
c->GetSpellTypeShortNameByID(BotSpellTypes::Slow) c->GetSpellTypeShortNameByID(BotSpellTypes::Slow),
Class::Shaman
), ),
fmt::format( fmt::format(
"{} {} 1 byclass 10", "{} {} 1 byclass {}",
sep->arg[0], sep->arg[0],
BotSpellTypes::Slow BotSpellTypes::Slow,
Class::Shaman
) )
}; };
p.examples_two = p.examples_two =
+2 -8
View File
@@ -15,14 +15,8 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
p.notes = { "- All pet types are based off the pet owner's setting when a pet is the target" }; p.notes = { "- All pet types are based off the pet owner's setting when a pet is the target" };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
+8 -12
View File
@@ -19,27 +19,23 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
}; };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
"To set all Clerics to cast fast heals third:", "To set all Clerics to cast fast heals third:",
fmt::format( fmt::format(
"{} {} 3 byclass 2", "{} {} 3 byclass {}",
sep->arg[0], sep->arg[0],
c->GetSpellTypeShortNameByID(BotSpellTypes::FastHeals) c->GetSpellTypeShortNameByID(BotSpellTypes::FastHeals),
Class::Cleric
), ),
fmt::format( fmt::format(
"{} {} 3 byclass 2", "{} {} 3 byclass {}",
sep->arg[0], sep->arg[0],
BotSpellTypes::FastHeals BotSpellTypes::FastHeals,
Class::Cleric
) )
}; };
p.examples_two = p.examples_two =
+2 -8
View File
@@ -14,14 +14,8 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
p.description = { "Controls at what health percentage a bot will start casting different spell types." }; p.description = { "Controls at what health percentage a bot will start casting different spell types." };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
+2 -8
View File
@@ -14,14 +14,8 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
p.description = { "Controls at what mana percentage a bot will stop casting different spell types." }; p.description = { "Controls at what mana percentage a bot will stop casting different spell types." };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
+2 -8
View File
@@ -21,14 +21,8 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
}; };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
+2 -8
View File
@@ -14,14 +14,8 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
p.description = { "Controls at what health percentage a bot will stop casting different spell types." }; p.description = { "Controls at what health percentage a bot will stop casting different spell types." };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
+2 -8
View File
@@ -14,14 +14,8 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
p.description = { "Controls at what mana percentage a bot will stop casting different spell types." }; p.description = { "Controls at what mana percentage a bot will stop casting different spell types." };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
+8 -12
View File
@@ -21,14 +21,8 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
}; };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
@@ -48,14 +42,16 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
{ {
"To set all Druids to stop casting DoTs at 15%:", "To set all Druids to stop casting DoTs at 15%:",
fmt::format( fmt::format(
"{} {} 15 byclass 6", "{} {} 15 byclass {}",
sep->arg[0], sep->arg[0],
c->GetSpellTypeShortNameByID(BotSpellTypes::DOT) c->GetSpellTypeShortNameByID(BotSpellTypes::DOT),
Class::Druid
), ),
fmt::format( fmt::format(
"{} {} 15 byclass 6", "{} {} 15 byclass {}",
sep->arg[0], sep->arg[0],
BotSpellTypes::DOT BotSpellTypes::DOT,
Class::Druid
) )
}; };
p.examples_three = p.examples_three =
+8 -12
View File
@@ -19,14 +19,8 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
}; };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
@@ -46,14 +40,16 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
{ {
"To set all Shaman to not cast cures:", "To set all Shaman to not cast cures:",
fmt::format( fmt::format(
"{} {} 0 byclass 10", "{} {} 0 byclass {}",
sep->arg[0], sep->arg[0],
c->GetSpellTypeShortNameByID(BotSpellTypes::Cure) c->GetSpellTypeShortNameByID(BotSpellTypes::Cure),
Class::Shaman
), ),
fmt::format( fmt::format(
"{} {} 0 byclass 10", "{} {} 0 byclass {}",
sep->arg[0], sep->arg[0],
BotSpellTypes::Cure BotSpellTypes::Cure,
Class::Shaman
) )
}; };
p.examples_three = p.examples_three =
+2 -8
View File
@@ -14,14 +14,8 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
p.description = { "Decides how many eligible targets are required for an AE or group spell to cast by spell type." }; p.description = { "Decides how many eligible targets are required for an AE or group spell to cast by spell type." };
p.example_format = p.example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
"{} [Type Shortname] [value] [actionable]" fmt::format("{} [Type ID] [value] [actionable]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [value] [actionable]"
, sep->arg[0]
)
}; };
p.examples_one = p.examples_one =
{ {
+4 -4
View File
@@ -21,12 +21,12 @@ void command_spell_holds(Client *c, const Seperator *sep)
p.example_format = p.example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value]" "{} [Type Shortname] [value]",
, sep->arg[0] sep->arg[0]
), ),
fmt::format( fmt::format(
"{} [Type ID] [value]" "{} [Type ID] [value]",
, sep->arg[0] sep->arg[0]
) )
}; };
p.examples_one = p.examples_one =