Skip to content

Commit

Permalink
Selfbot: Added new selfbot level which allows the always command but …
Browse files Browse the repository at this point in the history
…doesn't enable selfbot on login
  • Loading branch information
mostlikely4r committed Jan 10, 2025
1 parent 63ff8ba commit 9d7e336
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions playerbot/PlayerbotAIConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ enum class BotSelfBotLevel : uint32
DISABLED = 0,
GM_ONLY = 1,
ACTIVE_BY_COMMAND = 2,
ACTIVE_BY_LOGIN = 3,
ALWAYS_ACTIVE = 4
ALWAYS_ALLOWED = 3,
ACTIVE_BY_LOGIN = 4,
ALWAYS_ACTIVE = 5
};

enum class BotAlwaysOnline : uint32
Expand Down
2 changes: 1 addition & 1 deletion playerbot/PlayerbotMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ std::list<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* args,
messages.push_back("You do not have permission to enable player ai");
return messages;
}
else if (sPlayerbotAIConfig.selfBotLevel == BotSelfBotLevel::ACTIVE_BY_COMMAND && master->GetSession()->GetSecurity() < SEC_GAMEMASTER)
else if (sPlayerbotAIConfig.selfBotLevel < BotSelfBotLevel::ALWAYS_ALLOWED && master->GetSession()->GetSecurity() < SEC_GAMEMASTER)
{
messages.push_back("Player ai is only available while online");
return messages;
Expand Down
2 changes: 1 addition & 1 deletion playerbot/aiplayerbot.conf.dist.in
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ AiPlayerbot.PerfMonEnabled = 0

# Self bot turns your current character into a bot with the command ".bot self"
# !!DISCLAMER!! Selfbots will work and act like randombots based on their enabled strategies. Your epic mount will be sold to a vendor!
# Self bot level. Values: 0 (disabled), 1 (Game masters only), 2 (Any player), 3 (Enabled on login), 4 (Enabled even when offline)
# Self bot level. Values: 0 (disabled), 1 (Game masters only), 2 (Any player), 3 (Allow .bot always command for all players), 4 (Enabled on login), 4 (Enabled even when offline)
# AiPlayerbot.SelfBotLevel = 1

# Account/character names that are either, always online as bot (SelfBotLevel < 4) or prevented from being always online as bot (SelfBotLevel = 4)
Expand Down
2 changes: 1 addition & 1 deletion playerbot/aiplayerbot.conf.dist.in.tbc
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ AiPlayerbot.PerfMonEnabled = 0

# Self bot turns your current character into a bot with the command ".bot self"
# !!DISCLAMER!! Selfbots will work and act like randombots based on their enabled strategies. Your epic mount will be sold to a vendor!
# Self bot level. Values: 0 (disabled), 1 (Game masters only), 2 (Any player), 3 (Enabled on login), 4 (Enabled even when offline)
# Self bot level. Values: 0 (disabled), 1 (Game masters only), 2 (Any player), 3 (Allow .bot always command for all players), 4 (Enabled on login), 4 (Enabled even when offline)
# AiPlayerbot.SelfBotLevel = 1

# Account/character names that are either, always online as bot (SelfBotLevel < 4) or prevented from being always online as bot (SelfBotLevel = 4)
Expand Down
2 changes: 1 addition & 1 deletion playerbot/aiplayerbot.conf.dist.in.wotlk
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ AiPlayerbot.PerfMonEnabled = 0

# Self bot turns your current character into a bot with the command ".bot self"
# !!DISCLAMER!! Selfbots will work and act like randombots based on their enabled strategies. Your epic mount will be sold to a vendor!
# Self bot level. Values: 0 (disabled), 1 (Game masters only), 2 (Any player), 3 (Enabled on login), 4 (Enabled even when offline)
# Self bot level. Values: 0 (disabled), 1 (Game masters only), 2 (Any player), 3 (Allow .bot always command for all players), 4 (Enabled on login), 4 (Enabled even when offline)
# AiPlayerbot.SelfBotLevel = 1

# Account/character names that are either, always online as bot (SelfBotLevel < 4) or prevented from being always online as bot (SelfBotLevel = 4)
Expand Down

0 comments on commit 9d7e336

Please sign in to comment.