Method PlayerBot.LoginBotByGuid [-] [+]

Logs in an existing character as a bot (ASYNCHRONOUS). Creates a WorldSession with isBot=true and loads the character from the database via DelayQueryHolder. The bot will appear in the world after a few server ticks.

If the character is already logged in, returns the existing Player object immediately. If async loading has started, returns true. Returns nil on error.

To detect when the bot finishes loading, register a PLAYER_EVENT_ON_LOGIN hook and check Player:IsBot().

@return Player|bool|nil : Player if already in world, true if async load started, nil on error

Synopsis

Playerbot.LoginBotByGuid( accountId, guidLow )

Arguments

number accountId

The account ID that owns the character.

Valid numbers: integers from 0 to 4,294,967,295.

number guidLow

The low part of the character's GUID.

Valid numbers: integers from 0 to 4,294,967,295.

Returns

Nothing.

Generated on
©2026 - ALE Lua Engine