Disclaimer: This module requires both the Playerbots module and the Guild House module. Ensure both are installed and loaded before enabling this integration.
This module runs a repeating world-script timer that periodically teleports guild bots into and out of their guild house (zone 876, GM Island). Each cycle consists of an entry phase—moving a random subset of safe bots into the house—and an exit phase—returning a random subset back to their saved locations (or hearthstone fallback). On server startup it also discovers any bots already in zone 876 and tracks them.
-
Periodic Teleport Cycle
A configurable timer triggers every TeleportCycleFrequency seconds to process all guild houses. -
Entry Phase
For each guild record inguild_house, if the real-player requirement is met, the script:- Gathers all online, safe bots (alive, out of combat, not in battlegrounds/arenas/LFG/flight, not already in zone 876, not grouped with real players).
- Picks up to StaggeredTeleport.BatchSize bots at random.
- Rolls for each bot against EntryChancePercent.
- Saves its current position, teleports it to the house location and phase, sends a system message, then staggers next teleport by DelaySecondsMin–DelaySecondsMax seconds.
-
Exit Phase
For each guild’s bots currently tracked in the house:- Picks up to StaggeredTeleport.BatchSize bots at random.
- Rolls each against ExitChancePercent.
- If passed, restores the bot to its saved location (or casts hearthstone spell 8690 if lost) and sends a system message.
-
Real Player Requirement
If RequireRealPlayer istrue, entry phase only runs for guilds with at least one real human online. -
Position Persistence
Original bot positions are stored in memory each cycle and used for exit teleportation. -
Server Restart Sync
On startup the script detects any bots already in zone 876 and includes them in the exit tracking list. -
Debug Logging
When DebugEnabled istrue, detailed INFO logs are emitted at each step.
-
Clone the Module
cd /path/to/azerothcore/modules
git clone https://github.com/DustinHendrickson/mod-player-bot-guildhouse.git -
Recompile AzerothCore
cd /path/to/azerothcore
mkdir build && cd build
cmake ..
make -j$(nproc) -
Enable and Configure
mv /path/to/azerothcore/modules/mod_player_bot_guildhouse.conf.dist /path/to/azerothcore/modules/mod_player_bot_guildhouse.conf -
Restart the Server
./worldserver
Edit mod_player_bot_guildhouse.conf:
# Interval between teleport cycles in seconds.
PlayerbotGuildhouse.TeleportCycleFrequency = 120
# Maximum bots to teleport per phase.
PlayerbotGuildhouse.StaggeredTeleport.BatchSize = 5
# Require at least one real player in guild before entry phase.
PlayerbotGuildhouse.RequireRealPlayer = true
# Percent chance for a candidate bot to enter the guild house.
PlayerbotGuildhouse.EntryChancePercent = 60
# Percent chance for a tracked bot to exit the guild house.
PlayerbotGuildhouse.ExitChancePercent = 40
# Enable detailed debug logging.
PlayerbotGuildhouse.DebugEnabled = false
-
No Bots Moving
- Confirm the cycle frequency is reached (
TeleportCycleFrequency). - If
RequireRealPlayeristrue, verify at least one human is online in the guild.
- Confirm the cycle frequency is reached (
-
Bots Skipped by Safety Checks
- Ensure bots are alive, out of combat, not in battlegrounds/arenas/LFG queues, not flying, and not in zone 876.
- Check that bots are not grouped with any real players.
-
Unexpected Exit Behavior
- Verify that saved positions exist for each bot.
- If missing, bots use the hearthstone fallback spell 8690.
-
Enable Debug Logs
- Set
DebugEnabled = trueto view detailed INFO messages in your server console.
- Set
This module is released under the GNU GPL v2 license, matching AzerothCore’s licensing.
Created and maintained by Dustin Hendrickson. Pull requests and issues are welcome. Please adhere to AzerothCore coding standards.