Skip to content

PANP2010/florr_powerful_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌸 Florr Powerful Tools

πŸ€– AI-Powered Automation Toolkit for florr.io β€” Smart AFK protection, auto-pathfinding, combat AI, and custom model training

Python License Platform Last Commit CI Stars


🎯 What is This?

Florr Powerful Tools is a comprehensive automation framework for the popular florr.io browser game. It combines computer vision, deep learning, and path-planning algorithms to provide intelligent game assistance β€” without cheating, just making the game more enjoyable.

Whether you need AFK protection, want to auto-navigate maps, train custom AI models, or collect training data β€” this toolkit has you covered.

florr.io screenshot


✨ Key Features

Feature Description Status
πŸ›‘οΈ AFK Protection Auto-detect & solve AFK verification challenges βœ… Stable
πŸ—ΊοΈ Auto Pathfinding Lazy Theta* algorithm for intelligent navigation βœ… Stable
βš”οΈ Auto Combat Smart mob detection, targeting & fighting βœ… Stable
🧠 AI Training Build custom models with PyTorch + YOLO26 βœ… Stable
πŸ“Š Data Collection Harvest gameplay data for model training βœ… Stable
πŸ“Έ Visual Testing Browser screenshot + functional test harness βœ… New

πŸš€ Quick Start

Prerequisites

  • Python 3.9–3.11
  • Windows 10/11, macOS, or Linux
  • (Optional) GPU for training

Installation

# Clone the repo
git clone https://github.com/PANP2010/florr_powerful_tools.git
cd florr_powerful_tools

# Create virtual environment
python -m venv venv
source venv/bin/activate        # Linux/macOS
# venv\Scripts\activate.bat     # Windows

# Install dependencies
pip install -r florr_assistant/requirements.txt

# Install Playwright for browser testing (optional)
pip install playwright
playwright install chromium

Run the Assistant

cd florr_assistant
python main.py

Run Tests

# Full test suite (screenshot + module tests)
bash browser_test_env/run_all_tests.sh

# Module tests only
python browser_test_env/module_tester.py

# Screenshot tests only
python browser_test_env/screenshot_tester.py --florr

πŸ—οΈ Project Architecture

florr_powerful_tools/
β”œβ”€β”€ florr_assistant/             # 🧠 Main integrated assistant
β”‚   β”œβ”€β”€ core/                    # Core services (engine, logger, config, platform)
β”‚   β”œβ”€β”€ ui/                      # PyQt5 UI (main window, overlay, data collection)
β”‚   └── modules/                 # Feature modules
β”‚       β”œβ”€β”€ afk/                 # AFK detection & response
β”‚       β”œβ”€β”€ pathing/             # Navigator + map classifier
β”‚       β”œβ”€β”€ combat/              # Fighter + target selector
β”‚       β”œβ”€β”€ data_collector/       # Training data collection
β”‚       └── stats/               # Statistics gathering
β”‚
β”œβ”€β”€ browser_test_env/            # πŸ†• Browser test harness (Playwright)
β”‚   β”œβ”€β”€ screenshot_tester.py    # Headless screenshot capture
β”‚   β”œβ”€β”€ module_tester.py         # Import & functionality tests
β”‚   └── run_all_tests.sh         # One-command test runner
β”‚
β”œβ”€β”€ florr-auto-afk-main/         # Standalone AFK detection
β”œβ”€β”€ florr-auto-pathing/          # Standalone pathfinding
β”œβ”€β”€ florr-auto-framework-pytorch/ # AI training framework
β”œβ”€β”€ florr-auto-sszone/           # Auto mob zone farming
β”‚
β”œβ”€β”€ upload_package/              # πŸ“¦ Kaggle training package
β”œβ”€β”€ train_package/               # πŸ‹οΈ Local training package
└── florr_knowledge_base/        # πŸ“š Game wiki & data

πŸ›‘οΈ AFK Protection

Never get kicked for being idle again. The AFK module:

  • Uses YOLO models (afk-det.pt, afk-seg.pt) to detect AFK windows (>90% accuracy)
  • Plans a path through verification using an improved Dijkstra algorithm
  • Responds to LLM-powered chat challenges
  • Integrates via WebSocket browser extension (Tampermonkey)
# Quick test
cd florr-auto-afk-main
pip install -r py311-requirements.txt
python segment.py

πŸ—ΊοΈ Auto Pathfinding

Built on the Lazy Theta* path-planning algorithm β€” smarter than A* because it accounts for line-of-sight:

  • βœ… 8-map support: Ocean, Desert, Jungle, Garden, Hel, Anthell, Sewers, and more
  • βœ… Real-time player position detection via HSV color filtering
  • βœ… Stuck detection & recovery with random directional nudges
  • βœ… Configurable target maps and navigation intervals
# Quick test
cd florr-auto-pathing
python main.py

βš”οΈ Auto Combat

Fight smarter, not harder:

  • YOLO mob detection across 77+ mob types
  • Priority-based targeting with rarity weighting (Mythic 3.7Γ—, Ultra 1.8Γ—, Legendary 0.6Γ—)
  • Auto-equip switching and petal management
  • Sandstorm detection & avoidance
# Quick test
cd florr-assistant
python -c "from modules.combat import Fighter; print('Combat module loaded')"

🧠 AI Training Framework

Train your own custom models:

Model Architecture Input Output
Base 3-layer MLP 73-dim state 5-dim action
Attention Multi-head attention 73-dim state 5-dim action

Training stack: PyTorch + Ultralytics YOLO26 + NumPy

# Kaggle / Google Colab (free GPU)
!python scripts/train_cloud.py --mode all --num-samples 5000 --epochs 100 --batch 16

# Local (needs GPU)
python scripts/train_cloud.py --mode all --num-samples 10000 --epochs 150 --batch 32

YOLO26 vs YOLOv8:

Metric YOLOv8s YOLO26s Improvement
mAP50-95 44.8% 48.6% +3.8%
Params 11.2M 9.5M -15%
CPU speed baseline +43% faster

πŸ§ͺ Testing

The project includes a browser test harness powered by Playwright:

# Run everything
bash browser_test_env/run_all_tests.sh

# Just module import tests
python browser_test_env/module_tester.py

# Screenshot tests
python browser_test_env/screenshot_tester.py --florr
python browser_test_env/screenshot_tester.py --url https://github.com

Test coverage:

Category Status
Core modules (logger, config, engine, events) βœ… Pass
Feature modules (AFK, pathing, combat, data) βœ… Pass
OpenCV (cv2) βœ… Pass
PyTorch ⚠️ Optional
YOLO (ultralytics) ⚠️ Optional
GUI (PyQt5) ⚠️ Needs display

βš™οΈ Configuration

Main config: config/default.yaml

modules:
  afk:
    enabled: true
    idle_threshold: 10
    detection_interval: 3

  pathing:
    enabled: true
    target_map: "ocean"
    avoid_danger: true

  combat:
    enabled: false
    safe_distance: 200
    attack_distance: 150

ui:
  theme: "dark"   # light / dark
  language: "zh-cn"  # en-us / zh-cn

πŸ”§ Development

Add a new module

from florr_assistant.modules.base import BaseModule

class MyModule(BaseModule):
    name = "my_module"
    version = "1.0.0"
    description = "My awesome feature"
    priority = 50  # Lower = runs later
    dependencies = []  # e.g. ["map_classifier"]

    def _on_start(self):
        self._log("My module started")

    def _on_tick(self):
        pass  # Called every loop iteration

    def _on_stop(self):
        self._log("My module stopped")

πŸ“œ Tech Stack

Category Technologies
Language Python 3.9+
Computer Vision OpenCV, PIL, NumPy
Deep Learning PyTorch, Ultralytics (YOLO26)
GUI PyQt5, Tkinter
Automation PyAutoGUI, PyWin32, mss
Web FastAPI, WebSocket
Testing Playwright, pytest

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

GPL v3 β€” see LICENSE for details.


πŸ™ Acknowledgements

  • Shiny-Ladybug β€” original florr-auto-afk project
  • Ultralytics β€” YOLO framework
  • The florr.io community πŸ’

Made with ❀️ for the florr.io community