From 223acc583bff6f52880b1a634003708d660fb464 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 14 Feb 2020 21:46:15 +0000 Subject: [PATCH] `handler_get_game_again` minigame handler --- houdini/handlers/games/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/houdini/handlers/games/__init__.py b/houdini/handlers/games/__init__.py index 6d93721..01dbb72 100644 --- a/houdini/handlers/games/__init__.py +++ b/houdini/handlers/games/__init__.py @@ -120,3 +120,15 @@ async def handle_set_game_data(p, index: OptionalConverter(int) = 0, *, game_dat ) await data_insert.gino.scalar() + + +@handlers.handler(XTPacket('zr', ext='z'), client=ClientType.Vanilla) +@handlers.player_attribute(agent_status=True) +async def handle_get_game_again(p): + games = list(range(1, 11)) + + games_string = f'{games.pop(random.randrange(len(games)))},' \ + f'{games.pop(random.randrange(len(games)))},' \ + f'{games.pop(random.randrange(len(games)))}' + await p.send_xt('zr', games_string, random.randint(1, 6)) +