An advanced automation bot for Cookie Clicker, built using Selenium WebDriver. This bot enhances your gameplay by automating cookie clicking, golden cookie collection, upgrade purchases, and game save management.
Note: This bot is designed to assist with cookie farming while you're away. It is not a fully autonomous bot that plays through the entire game. This way, you can still enjoy the core fun of the game, such as planning your strategies, making legacy upgrades, and unlocking achievements. The bot simply ensures that your progress continues even when you're not actively playing.
- Automated Big Cookie Clicking: Rapidly clicks the big cookie to maximize cookie production.
- Golden Cookie Detection and Clicking: Continuously monitors and clicks golden cookies immediately upon appearance.
- Automatic Upgrades and Product Purchases:
- Buys available upgrades to boost production efficiency.
- Purchases products, prioritizing the most expensive affordable ones to optimize growth.
- Game Save Management:
- Initial Save Loading: Automatically imports the most recent game save at startup.
- Periodic Backups: Exports and saves the game state at configurable intervals.
- Backup Rotation: Retains a specified number of backups, deleting the oldest to manage storage.
- Python 3.7 or higher
- Google Chrome Browser
- Chrome WebDriver: Managed automatically via
webdriver-manager. - Dependencies: Listed in
requirements.txt.
Ensure Python 3.7 or higher is installed. Download it from python.org.
Open Command Prompt and run:
git clone https://github.com/timoinglin/CookieClickerSeleniumBot.git
cd CookieClickerSeleniumBotCreate a virtual environment to manage dependencies:
python -m venv venvvenv\Scripts\activatepip install --upgrade pipInstall the required Python packages:
pip install -r requirements.txtTo simplify running the bot, a start_bot.bat file is provided in the root directory.
- Ensure the virtual environment is created as per the installation instructions.
- Double-click the
start_bot.batfile in the project directory. - The bot will start automatically, activating the virtual environment and running the script.
- The Command Prompt window will remain open to display logs and messages.
With the virtual environment activated, you can run the bot via Command Prompt:
python cookie_clicker_bot.py- Pause the Bot: Press
Escwhile the bot is running to pause automation. - Resume or Exit: After pausing, press
xto exit or any other key to resume.
You can adjust settings by modifying constants at the beginning of the script:
CHECK_INTERVAL: Interval in seconds to check for upgrades and products (default: 5 seconds).EXPORT_INTERVAL: Interval in seconds to export game saves (default: 60 seconds).MAX_BACKUPS: Maximum number of backup files to retain (default: 30).COOKIE_CLICK_DELAY: Delay between big cookie clicks in seconds (default: 0.01 seconds).
- Location: Game saves are stored in the
exportsdirectory within the project folder. - Backup Management: The bot maintains backups by date and time, deleting the oldest when
MAX_BACKUPSis exceeded.
This project is licensed under the MIT License. See the LICENSE file for details.