cryptotwinsbr / bomberland-bot

This is a free python bot program that crosses you to farm with auto click in space crypto NFT game, having fun :) Creator: Marlon Zanardi
169 stars 62 forks source link

How to make the Bot work on a mac? #46

Open s-areal opened 2 years ago

s-areal commented 2 years ago

I´ve installe Python and then runned the following commands:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py

After that i run

python spacecrypto-bot.py

And i got the following error:

Traceback (most recent call last): File "spacecrypto-bot.py", line 2, in from cv2 import cv2 ImportError: No module named cv2

Can anyone help?

ghost commented 2 years ago

after installing pip you need to run the command:

pip install -r requirements.txt

later u run the: python spacecrypto-bot.py

s-areal commented 2 years ago

yes, i forgot to mention that I've already have runned pip install -r requirements.txt The problem was i had to add 3 to phyton. It boots running python3 spacecrypto-bot.py

It starts but it stalls next and nothing happens.... I already gave permissions for python and terminal to record screen. [2022-02-20 22:57:37] [INFO] Connect wallet button detected, logging in!

s-areal commented 2 years ago

yep nothing happens

2022-02-20 23:46:21] [INFO] Bot Iniciado. Versao: 1.06 [2022-02-20 23:46:21] [INFO] Qtd naves total: 10 [2022-02-20 23:46:21] [INFO] Qtd naves enviar: 10 [2022-02-20 23:46:21] [INFO] Starting Login [2022-02-20 23:46:23] [INFO] Connect wallet button detected, logging in! [2022-02-20 23:47:11] [INFO] Starting Login [2022-02-20 23:47:13] [INFO] Connect wallet button detected, logging in!

bolshoytoster commented 2 years ago

@s-areal I'll set up a mac vm to see if I can reproduce this.

Bryandibraga commented 2 years ago

to me shows up [WARNING] No action found.

s-areal commented 2 years ago

like i told before I already gave permissions for python and terminal to record screen. Do you have to gave some kind of permission for controlling the input device (mouse) or something like that? just a tought...

bolshoytoster commented 2 years ago

@s-areal the error is because it can't find anything it needs to do. You might have set up spacecrypto (login, go into a 'game') first.

s-areal commented 2 years ago

it should click in the button that is detected that should do the login IMO anyway i logged in manually, all my ships are 100% and it keeps repeating this, but the mouse never moves

[2022-02-21 00:21:16] [INFO] Refresh Spaceship to Fight [2022-02-21 00:21:27] [INFO] Spaceships sent to Fight: 3 [2022-02-21 00:21:38] [INFO] Spaceships sent to Fight: 6 [2022-02-21 00:21:50] [INFO] Spaceships sent to Fight: 9 [2022-02-21 00:21:55] [INFO] Finish Click ships [2022-02-21 00:21:57] [INFO] Spaceships sent to Fight: 10 [2022-02-21 00:22:08] [INFO] Refresh Spaceship to Fight [2022-02-21 00:22:20] [INFO] Spaceships sent to Fight: 3 [2022-02-21 00:22:31] [INFO] Spaceships sent to Fight: 6 [2022-02-21 00:22:43] [INFO] Spaceships sent to Fight: 9 [2022-02-21 00:22:48] [INFO] Finish Click ships

bolshoytoster commented 2 years ago

@s-areal if you run

python3 -c 'from pyautogui import moveTo
moveTo(0, 0)'

in the terminal does your cursor go to the top-left of your screen? (copy-paste the command including the newline)

s-areal commented 2 years ago

I have only 10 ships and already set this in the setting file and made a printscreen of 0/10 and 10/10

bolshoytoster commented 2 years ago

@s-areal have you run the command I asked you to?

Bryandibraga commented 2 years ago

now my cursor goes to right corner on connect wallet screen

bolshoytoster commented 2 years ago

@Bryandibraga what is the output of the bot?

s-areal commented 2 years ago

@bolshoytoster pip install -r requirements.txt - runs ok then i must type "python3 spacecrypto-bot.py" if i type "python spacecrypto-bot.py" i get the error i+ve posted before:

File "spacecrypto-bot.py", line 2, in from cv2 import cv2 ImportError: No module named cv2

And no, the cursor does not move. should i install pip again? Should I uses this commands to install PIP

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py

bolshoytoster commented 2 years ago

@s-areal what does it say when you run pip install opencv-python?

Bryandibraga commented 2 years ago

bolshoytoster what do you mean with output?

bolshoytoster commented 2 years ago

@Bryandibraga what does it say in the terminal?

s-areal commented 2 years ago

zsh: command not found: pip

bolshoytoster commented 2 years ago

@s-areal does pip3 install opencv-python work?

s-areal commented 2 years ago

I tried installing pip again, please take a look

100 2548k 100 2548k 0 0 6742k 0 --:--:-- --:--:-- --:--:-- 6742k simaoareal@Mini-de-Simao spacecrypto-bot % python3 get-pip.py

Collecting pip Using cached pip-22.0.3-py3-none-any.whl (2.1 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.0.3 Uninstalling pip-22.0.3: ERROR: Could not install packages due to an OSError: Cannot move the non-empty directory '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip-22.0.3.dist-info/': Lacking write permission to '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip-22.0.3.dist-info/'.

simaoareal@Mini-de-Simao spacecrypto-bot % pip install opencv-python zsh: command not found: pip simaoareal@Mini-de-Simao spacecrypto-bot % ls README.md debug.py requirements.txt spacecrypto-bot.py pycache get-pip.py screen_test debug.log img_compare settings.yaml simaoareal@Mini-de-Simao spacecrypto-bot % cd .. simaoareal@Mini-de-Simao ~ % pip install opencv-python zsh: command not found: pip simaoareal@Mini-de-Simao ~ %

Bryandibraga commented 2 years ago

@Bryandibraga what does it say in the terminal?

[2022-02-20 22:06:54] [INFO] Starting Login [2022-02-20 22:06:58] [INFO] Connect wallet button detected, logging in!

but teh cursor goes to extreme right bottom corner

bolshoytoster commented 2 years ago

@s-areal try running sudo python3 get-pip.py to install it.

bolshoytoster commented 2 years ago

@Bryandibraga it might be confused by the background; try logging in manually then running the bot.

Bryandibraga commented 2 years ago

@bolshoytoster After login in manually the cursor dont moves.

bolshoytoster commented 2 years ago

@Bryandibraga what does the terminal say now?

s-areal commented 2 years ago

did sudo python3 get-pip.py did pip install -r requirements.txt

and i get this

Requirement already satisfied: pyobjc-framework-ExternalAccessory==8.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from pyobjc->PyAutoGUI==0.9.53->-r requirements.txt (line 5)) (8.2)

bolshoytoster commented 2 years ago

@s-areal that's good, try running the bot again.

Bryandibraga commented 2 years ago

@bolshoytoster [2022-02-20 22:19:26] [WARNING] No action found

s-areal commented 2 years ago

i've tried again. the mouse does not move on the connect wallet. I connect to metamask manually and press play

the mouse does not move and terminal is showing up this

[2022-02-21 01:18:24] [INFO] Spaceships sent to Fight: 3 [2022-02-21 01:18:33] [INFO] Spaceships sent to Fight: 5 [2022-02-21 01:18:43] [INFO] Spaceships sent to Fight: 7 [2022-02-21 01:18:53] [INFO] Spaceships sent to Fight: 9 [2022-02-21 01:18:58] [INFO] Finish Click ships [2022-02-21 01:19:00] [INFO] Spaceships sent to Fight: 10 [2022-02-21 01:19:13] [INFO] Refresh Spaceship to Fight [2022-02-21 01:19:23] [INFO] Spaceships sent to Fight: 2

and so one

bolshoytoster commented 2 years ago

@Bryandibraga could you make sure nothing blocks the screen (i.e. the terminal window)

bolshoytoster commented 2 years ago

@s-areal could you try this again please.

s-areal commented 2 years ago

the mouse never moved, never Ive also deleted any "desktops" terminal is out of the away now

same thing

Bryandibraga commented 2 years ago

@bolshoytoster its not

s-areal commented 2 years ago

@s-areal could you try this again please.

Does not move

s-areal commented 2 years ago

@s-areal could you try this again please.

Does not move

I stop the bot, type your command and nothing happens

s-areal commented 2 years ago

dont you think this as nothing to do with permissions?

s-areal commented 2 years ago

Yeah, the bot detects what is happening, but is not able to do any task...

bolshoytoster commented 2 years ago

@s-areal you could try running sudo python3 spacecrypto-bot.py to give it superuser permissions.

s-areal commented 2 years ago

i did it and ....t doesn't work

2022-02-21 01:35:29] [INFO] Bot Iniciado. Versao: 1.06 [2022-02-21 01:35:29] [INFO] Qtd naves total: 60 [2022-02-21 01:35:29] [INFO] Qtd naves enviar: 10 [2022-02-21 01:35:32] [WARNING] Nenhuma acao encontrada [2022-02-21 01:35:33] [WARNING] Nenhuma acao encontrada [2022-02-21 01:35:33] [WARNING] Nenhuma acao encontrada [2022-02-21 01:35:34] [WARNING] Nenhuma acao encontrada [2022-02-21 01:35:34] [INFO] Refresh Spaceship to Fight [2022-02-21 01:35:45] [INFO] Spaceships sent to Fight: 3 [2022-02-21 01:35:57] [INFO] Spaceships sent to Fight: 6 [2022-02-21 01:36:08] [INFO] Spaceships sent to Fight: 9 [2022-02-21 01:36:14] [INFO] Finish Click ships [2022-02-21 01:36:16] [INFO] Spaceships sent to Fight: 10 [2022-02-21 01:36:27] [INFO] Refresh Spaceship to Fight [2022-02-21 01:36:38] [INFO] Spaceships sent to Fight: 3 [2022-02-21 01:37:12] [INFO] Spaceships sent to Fight: 6

the mouse wont move

s-areal commented 2 years ago

it doesn't work. Thanks so much for your help... I gotta go now, i will see if you reply tommorow. Thanks again

bolshoytoster commented 2 years ago

@s-areal according to this reddit post it should create a popup asking to give it permission. You might be able to get it to do the popup again by reinstalling PyAutoGUI: pip install PyAutoGUI==0.9.53 --ignore-installed.

Edit: I got my mac vm set up, you can just go into Settings -> Security & Privacy -> Accessibility -> Privacy then click the padlock in the bottom left and tick next to Terminal under Input Monitoring and Screen Recording.

bolshoytoster commented 2 years ago

The problem I've run into, the default thresholds in settings.yaml are too high I'm experimenting with lower amounts to see what will work best.

bolshoytoster commented 2 years ago

@Bryandibraga could you change hard in settings.yaml to 0.25.