Game Bot with Smart Room-Hopping Module

Замовник: AI | Опубліковано: 06.04.2026

Its a bot for my game Technical Specifications: Smart Room-Hopping Module (Auto-Queue) ​Context: Implement a room monitoring system within autofarm.py to automatically switch to the room closest to starting a new round, optimizing farming efficiency. ​1. Monitoring System (Scout Bot) ​Since the client does not receive round_time packets for external rooms, a secondary bot (or a parallel socket connection) is required: ​Cyclic Scanning: The bot must iterate through room lists in the selected categories ). ​Population Filter: Only track rooms with \ge 10 mice. ​Data Extraction: Read the remaining round time and store it in a shared data structure (e.g., a dictionary or in-memory DB). ​Frequency: Data must refresh every 5 seconds. ​2. Logic & UI Integration ​Category Filters: GUI checkboxes for "", "", and "". The bot should only scan active/checked categories. ​Priority Calculation: Compare time_remaining across all monitored rooms. The "Target Room" is the one with the lowest value closest to 0. ​Short-Circuit Logic (Immediate Jump): If the scout detects any room with \le 6 seconds remaining, it must trigger an immediate jump signal without finishing the scan of other rooms or categories. ​3. Execution & Hotkeys ​Manual Trigger: Upon pressing the Shift key (configurable), the main bot must execute the /sala [room_name] command for the current "Target Room." ​Anti-Loop: The script must verify the current room name to prevent the bot from attempting to join the room it is already in. ​Entry Margin: Ideally, include a small offset (e.g., 1-2 seconds) to account for loading times, ensuring the bot enters before the new map starts. ​4. Developer Notes (Implementation Suggestions) ​Packet-Level Scraping: Use packet sniffing (e.g., 0, 5 for room lists) rather than GUI interaction for the scout to minimize resource usage. ​Early Exit: Implement the 6-second rule as an "Early Exit" in the scanning loop to maximize speed. ​Concurrency: Ensure the scout bot runs on a separate thread or asynchronous loop to avoid freezing the main bot's performance.