Giter Club home page Giter Club logo

monopoly-go-bot's Introduction

monopoly-go-bot

Automate playing Monopoly Go! using Python and Bluestacks.

demonstration.mp4

This script requires administrative privileges

The start.ps1 script will launch the python script with administrative privileges for you. It needs escalated privileges for these reasons:

  1. Bluestacks is a virtual machine where standard mouseclick emulation via pyautogui does not work. Instead this script uses raw Win32 calls via pydirectinput.
  2. A global key listener is setup to toggle the script on and off - this is a requirement with a low polling delay because the script takes control of the mouse.

Instructions

  1. Install the Bluestacks Android emulator.

  2. Login with Google.

  3. Install Monopoly Go! from the app store.

  4. Login

    4.1. If coming from iOS, go to settings on the game on your iOS device and connect your account to your Facebook. Use facebook to login on Bluestacks.

  5. Ensure normal app functionality works.

  6. Clone this repository, or download the zip.

  7. Install python and pip.

  8. Install the requirements pip install -r requirements.txt.

  9. Launch start.ps1 using PowerShell.

  10. Use F2 to toggle the script - it starts disabled.

  11. Make sure the BlueStacks application is open and visible on a screen at all times.

Todo

  1. Add images to explain installation steps.
  2. Keep track of menu navigation state to prevent scanning for close buttons.
  3. Use Tesseract to read cash balance and automate build upgrades.
  4. Optimise priority list of images to scan.

monopoly-go-bot's People

Contributors

dependabot[bot] avatar lewisgibson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

monopoly-go-bot's Issues

Only Screenshot Bluestacks Window?

Is it possible to make it only screenshot the Bluestacks window instead of the entire screen? Also, can it not move the mouse when it's clicking on things, so I can still use my computer while it's running?

better design

why not just find the buttons in memory and design it like that?

use cheat engine and ui automator for this

Need help with installing pip

I am very new to python, would be glad if someone can help me on how to install pip and use pip install -r requirements.txt ><

Reroll automatic.

You could merge your system with the reroll app, thus making the entire system automatic. ex: The reroll has the function of using a flaw in Monopoly apk to give you a reroll if you don't go to the desired location, plus all this manually, with your bot you could set the houses that the reroll would have to be active and houses that he would connect the cell phone network to get the points..

Communiry chest

A great addition to this (or a standalone bot) would be great for opening the community chest. I'm no programmer, but Im sure it can be done.
Have the bot scan the 9.images when CC game opens up...then click start....and botnscans 9 images for when 1 lights up

It's not working.

Hi Lewis.

I tried to execute your bot, but something is not working.

How Could I send you more information about it?

I download the project in zip format, unpack in a directory.
by the powershell with admin, I install the requirements and after start the scrit (with the bluestacks opened and the monopoly go working).
But after execute the script, it appear that nothing happens.

I tried to toggle f2 also, but nothing happens.

I'm using python 3.8, bluestack 5.

Thanks in advance
Ricardo

buttons not found

the bot doesnt find the right buttons, oftern it didnt found any button and if it find a button on the completly wron position, maybe some settings error on my site?

Build Upgrade

if the money is not enough when upgrading. this bot will be stuck there.

Scanning Problem

The scanning don't recognize button on the Bluestack screen (Bluestack is open & visible), but some how it's did recognize those picture on the folder.
Can you help me with that please?
Thanks

error on launch

pip installed everytying ok but this happens when its ran.

PS C:\monopoly-go-bot-main> python3 main.py
Traceback (most recent call last):
File "C:\monopoly-go-bot-main\main.py", line 11, in
class Monopoly:
File "C:\monopoly-go-bot-main\main.py", line 55, in Monopoly
def Find(self, image: PIL.Image.Image) -> pyscreeze.Point | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Help

Hi, I tried your bot.
At the start.ps1 step, notepad opens for me.
However if I run python main.py and hit F2 it starts scanning, but nothing happens and the mouse doesn't move.

Randomly hits stuff

Not sure what screen size i should have it at but it randomly hits random stuff at times

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.