mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
using config to toggle chat functionnality and suggest dungeon
This commit is contained in:
@@ -1238,6 +1238,19 @@ AiPlayerbot.CommandPrefix = ""
|
||||
# Separator for bot chat commands
|
||||
AiPlayerbot.CommandSeparator = "\\\\"
|
||||
|
||||
# Enable playerbot talk (say / yell / general chatting / lfg)
|
||||
AiPlayerbot.RandomBotTalk = 0
|
||||
|
||||
# Enable playerbot emote
|
||||
AiPlayerbot.RandomBotEmote = 0
|
||||
|
||||
# Enable dungeon suggestions for random bots
|
||||
AiPlayerbot.RandomBotSuggestDungeons = 1
|
||||
|
||||
# Bots greet to the players
|
||||
AiPlayerbot.EnableGreet = 0
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
@@ -1276,9 +1289,6 @@ AiPlayerbot.RandomBotLoginAtStartup = 1
|
||||
# Guild Task system
|
||||
AiPlayerbot.EnableGuildTasks = 0
|
||||
|
||||
# Enable dungeon suggestions for random bots
|
||||
AiPlayerbot.RandomBotSuggestDungeons = 1
|
||||
|
||||
# Enable dungeon suggestions in lower case randomly
|
||||
AiPlayerbot.SuggestDungeonsInLowerCaseRandomly = 0
|
||||
|
||||
@@ -1297,9 +1307,6 @@ AiPlayerbot.RandombotsWalkingRPG = 0
|
||||
# Set randombots movement speed to walking only inside buildings
|
||||
AiPlayerbot.RandombotsWalkingRPG.InDoors = 0
|
||||
|
||||
# Bots greet to the players
|
||||
AiPlayerbot.EnableGreet = 0
|
||||
|
||||
# Specify percent of active bots
|
||||
# The default is 10. With 10% of all bots going active or inactive each minute.
|
||||
AiPlayerbot.BotActiveAlone = 100
|
||||
|
||||
@@ -140,6 +140,8 @@ bool PlayerbotAIConfig::Initialize()
|
||||
minRandomBotsPriceChangeInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBotsPriceChangeInterval", 2 * HOUR);
|
||||
maxRandomBotsPriceChangeInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomBotsPriceChangeInterval", 48 * HOUR);
|
||||
randomBotJoinLfg = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotJoinLfg", true);
|
||||
randomBotTalk = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotTalk", false);
|
||||
randomBotEmote = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotEmote", false);
|
||||
randomBotSuggestDungeons = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotSuggestDungeons", true);
|
||||
suggestDungeonsInLowerCaseRandomly = sConfigMgr->GetOption<bool>("AiPlayerbot.SuggestDungeonsInLowerCaseRandomly", false);
|
||||
randomBotJoinBG = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotJoinBG", true);
|
||||
|
||||
@@ -95,6 +95,8 @@ class PlayerbotAIConfig
|
||||
uint32 randomBotsPerInterval;
|
||||
uint32 minRandomBotsPriceChangeInterval, maxRandomBotsPriceChangeInterval;
|
||||
bool randomBotJoinLfg;
|
||||
bool randomBotTalk;
|
||||
bool randomBotEmote;
|
||||
bool randomBotSuggestDungeons;
|
||||
bool suggestDungeonsInLowerCaseRandomly;
|
||||
bool randomBotJoinBG;
|
||||
|
||||
@@ -349,6 +349,8 @@ SuggestDungeonAction::SuggestDungeonAction(PlayerbotAI* botAI) : SuggestWhatToDo
|
||||
|
||||
bool SuggestDungeonAction::Execute(Event event)
|
||||
{
|
||||
// TODO: use sPlayerbotDungeonSuggestionMgr
|
||||
|
||||
if (instances.empty())
|
||||
{
|
||||
instances["Ragefire Chasm"] = 15;
|
||||
|
||||
@@ -7,22 +7,25 @@
|
||||
|
||||
void EmoteStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
if (sPlayerbotAIConfig->randomBotEmote)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("seldom", NextAction::array(0, new NextAction("emote", 1.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("suggest what to do", 1.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("suggest trade", 1.0f), nullptr)));
|
||||
|
||||
if (sPlayerbotAIConfig->randomBotSuggestDungeons)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("random", NextAction::array(0, new NextAction("suggest dungeon", 1.0f), nullptr)));
|
||||
}
|
||||
|
||||
if (sPlayerbotAIConfig->enableGreet)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("new player nearby", NextAction::array(0, new NextAction("greet", 1.0f), nullptr)));
|
||||
}
|
||||
|
||||
triggers.push_back(new TriggerNode("seldom", NextAction::array(0, new NextAction("talk", 1.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("receive text emote", NextAction::array(0, new NextAction("emote", 10.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("receive emote", NextAction::array(0, new NextAction("emote", 10.0f), nullptr)));
|
||||
}
|
||||
|
||||
if (sPlayerbotAIConfig->randomBotTalk)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("suggest what to do", 1.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("suggest trade", 1.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("seldom", NextAction::array(0, new NextAction("talk", 1.0f), nullptr)));
|
||||
}
|
||||
|
||||
if (sPlayerbotAIConfig->randomBotSuggestDungeons)
|
||||
triggers.push_back(new TriggerNode("random", NextAction::array(0, new NextAction("suggest dungeon", 1.0f), nullptr)));
|
||||
|
||||
if (sPlayerbotAIConfig->enableGreet)
|
||||
triggers.push_back(new TriggerNode("new player nearby", NextAction::array(0, new NextAction("greet", 1.0f), nullptr)));
|
||||
|
||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("rpg mount anim", 1.0f), nullptr)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user