lobby¶
Lobby related features
-
class
dota2.features.lobby.Lobby¶ Bases:
object-
EVENT_LOBBY_INVITE= 'lobby_invite'¶ When a lobby invite is received :param message: CSDOTALobbyInvite :type message: proto message
-
EVENT_LOBBY_INVITE_REMOVED= 'lobby_invite_removed'¶ When a lobby invite is no longer valid :param message: CSDOTALobbyInvite :type message: proto message
-
EVENT_LOBBY_NEW= 'lobby_new'¶ Entered a lobby, either by creating one or accepting an invite
Parameters: message (proto message) – CSODOTALobby
-
EVENT_LOBBY_CHANGED= 'lobby_changed'¶ Anything changes to the lobby state, players, options, broadcasters…
Parameters: message (proto message) –
-
EVENT_LOBBY_REMOVED= 'lobby_removed'¶ The lobby is not valid anymore, quit or kick.
Parameters: message (proto message) –
-
lobby= None¶
-
create_practice_lobby(password='', options=None)¶ Sends a message to the Game Coordinator requesting to create a lobby.
Parameters:
-
create_tournament_lobby(password='', tournament_game_id=None, tournament_id=0, options=None)¶ Sends a message to the Game Coordinator requesting to create a tournament lobby.
Parameters:
-
config_practice_lobby(options)¶ Change settings of the current lobby.
Parameters: options ( dict) – options to change in the lobby
-
get_lobby_list(server_region=<EServerRegion.Unspecified: 0>, game_mode=<DOTA_GameMode.DOTA_GAMEMODE_NONE: 0>)¶ Get a lobby list
Note
These are regular lobbies. (e.g. All pick, Captains Mode, etc)
Parameters: - server_region (
EServerRegion) – limit to a specific server region - game_mode (
DOTA_GameMode) – limit to specific game mode,DOTA_GAMEMODE_NONEmeans any
Returns: Return type: proto message,
None- server_region (
-
get_practice_lobby_list(tournament_games=False, password='')¶ Get list of practice lobbies
Note
These are private Custom Game lobbies
Parameters: Returns: Return type: proto message,
None
-
get_friend_practice_lobby_list()¶ Request a list of friend practice lobbies.
Returns: List of CMsgPracticeLobbyListResponseEntry Return type: proto message, None
-
balanced_shuffle_lobby()¶ Balance shuffle the the lobby.
-
flip_lobby_teams()¶ Flip both teams of the lobby.
-
invite_to_lobby(steam_id)¶ Asks to invite a player to your lobby. This creates a new default lobby when you are not already in one.
Parameters: steam_id ( int) – steam_id
-
practice_lobby_kick(account_id)¶ Kick a player from the lobby.
Parameters: account_id ( int) – 32-bit steam_id of the user to kick from the lobby
-
practice_lobby_kick_from_team(account_id)¶ Kick a player from the his current lobby team.
Parameters: account_id ( int) – 32-bit steam_id of the user to kick from a team
-
join_practice_lobby(id, password='')¶ Join the target practice lobby.
Parameters: Returns: Result of the join command from the GC
Return type: class: DOTAJoinLobbyResult. DOTAJoinLobbyResult.DOTA_JOIN_RESULT_TIMEOUT if timeout
-
leave_practice_lobby()¶ Sends a message to the Game Coordinator requesting to leave the current lobby.
-
abandon_current_game()¶ Abandon the current game.
-
launch_practice_lobby()¶ Launch the current lobby into a game.
-
join_practice_lobby_team(slot=1, team=<DOTA_GC_TEAM.PLAYER_POOL: 4>)¶ Join on of the lobby team at the specified slot.
Parameters: - slot (
int) – slot to join into - team (
DOTA_GC_TEAM) – team to join
- slot (
-
join_practice_lobby_broadcast_channel(channel=1)¶ Join a specific channel of the broadcasters.
Parameters: channel ( int) – channel to join into
-
add_bot_to_practice_lobby(slot=1, team=<DOTA_GC_TEAM.GOOD_GUYS: 0>, bot_difficulty=<DOTABotDifficulty.BOT_DIFFICULTY_PASSIVE: 0>)¶ Add a bot in the lobby.
Parameters: - slot (
int) – slot to join into - team (
DOTA_GC_TEAM) – team to join - bot_difficulty (
DOTABotDifficulty) – difficulty of the bot
- slot (
-
respond_to_lobby_invite(lobby_id, accept=False)¶ Answer to a lobby invite.
Parameters:
-