This script is based on https://github.com/lintan/OpenFarmer, the manual and code translated to english, plan to add some features on the basis of his feature, thanks to this big selfless dedication.
Visual interface
Command line interface legend:
The popularity of Farmersworld https://farmersworld.io is believed to be obvious to all.
Various auxiliary scripts on the Internet are also flying all over the sky, but the large-scale hacking incident carried out by a script company on November 7, 2021 made the majority of farmers sad and angry.
So I decided to open a simple hang-up script that I wrote, there is no gorgeous interface, only simple profiles and command lines, although it is not good, but absolutely peaceful
The code is fully open, excluding any binary executable, does not include any back door virus, completely deserving inspection
At the same time, you are welcome to mention bugs and push code, constantly improve it.
This project uses Python3 + Selenium development
Expans the platform, support Windows, Linux, MacOS
- Support multiple openings on one computer
- Support to set up HTTP proxy
- Support all tools under Mining (ax, stone ax, saw, fishing rod, fishing net, fishing boat, excavator, etc.)
- Support all crops (barley, corn) under Plant, automatic planting
- Support Eggs -> Chick -> Chicken Automatic Feeding
- Support the Calf -> Cattle -> Dairy cow feeding
- Support membership card automatic click
- Automatic repair of worn tools (please prepare enough gold coins)
- Energy is automatically replenished (please have enough meat)
- Support automatic construction (new number for the first time COOP and FARM PLOT requires 8 operations)
- Support eggs, milk, barley, corn automatic sale
- Support automatic replenishment of insufficient food and gold
- Automatic withdrawal when 5% fee withdrawal rate
Suspected students can download the latest packaged version directly on the [Releases] on the right side of the GitHub page, which only supports the Windows 64-bit system. It is recommended to run on the Win10 system, extract the directory in the compressed package, double-click to run [Gui.exe] You can, the command line version can run [main.exe], need to manually modify the configuration file before using the command line version [user.yml]
There is a requirement for security, like the drum code, it is recommended to run from the source code, step by step according to the following steps.
-
Click [CODE] => gitclone source to the local, or Download Zip Download Source Code to Local
-
Download and install Python3 (version must be greater than equals Python3.7)
Please download the latest version to Python official website: https://www.python.org/downloads/
[Note] Please remember to check [Add Python 3.10 to Path].
-
Double-click to run [Install_Depends.py] to install the dependencies, one computer only needs to install it once [Note] Please turn off the wall agent before installing and dependent, turn off the scientific Internet, otherwise you can't download the dependent package from Douban PYPI Mirror Station.
-
Install the Chrome browser and upgrade to the latest version (in the current version, make sure that the Chromedriver version is consistent).
-
Download Chromedriver, version to ensure that the Chrome version is consistent https://chromedriver.chromium.org/downloads
For example, my Chrome version is 97.0.4664.45
Then I will download Chromedriver 97.0.4664.45
In fact, the small version is inconsistent, it doesn't matter, the big version number 97 is consistent
Windows system Download [chromedriver_win32.zip] 6. Differently extract the chromedriver.exe file in the downloaded Chromedriver compression package into the source directory of this item (and main.py in a directory). 7. Modify the configuration file "user.yml".
-
Make a copy of the "user.yml.example" file and rename it to "user.yml".
-
Set the various parameters according to your actual situation (Modify "user.yml" recommended using the NodePad ++ editor, download link: [Click to download NodePad ++ Editor] (https://github.com/notepad-plus-plus/notepad-plus- Plus / Releases / Download / V8.2 / NPP.8.2.Installer.x64.exe)))).
-
WAX_ACCOUNT: (WAX account, that is, the WAX wallet address, often ending with ".wam").
-
Proxy: (You can set the HTTP agent, the format is 127.0.0.1:10809, if you do not need the agent, set to null).
-
The following (build, mining, chicken, cow, plant, mbs) correspond to construction, resource collection, chicken raising, cattle raising, farming, and member clicks, which require program automation operations, set to true, do not require program automation operations , set to false, for example, if you only farm land, plant: true, all others are false, which reduces unnecessary network operations and improves operating efficiency.
-
recover_energy: 500 (how much energy to recover when the energy is not enough, the default is 500, please prepare enough meat, the program will not automatically buy meat).
-
Building, collecting resources, raising chickens, raising cattle, farming, and member clicks require automated operations, set to true.
-
Other parameters are set according to your actual situation.
-
After modifying the configuration file, double-click [main.py] to run the script, if the program exits, you can view the log in the logs folder.
-
After the script is started, a Chrome window will pop up and automatically open the FarmersWorld official website. For the first time, please log in manually. After login is successful, the script will start automation.
-
If manual operation is required, please do not operate in the Chrome window opened by the script. The Chrome window opened by the script can be minimized, and try not to touch it. When manual operation is required, please open the Chrome browser to log in to the game. The game supports the possibility of simultaneous login through several browsers and does not require stopping the bot and the Chrome window opened by it.
-
Note that an account will run the script for the first time. When the script is automatically harvested, the WAX wallet authorization window may pop up in the Chrome browser, and stop there, this time you need to check the automatic confirmation transaction. And agree to the transaction, so that the script will be automatically processed, in fact, the first harvesting, the first harvesting, it is necessary to automatically agree to the transaction, otherwise, each time you have to pop up the authorization window, the script is only responsible for harvesting crops. Do not deal with authorized things, auto-authorization depends on user account settings
-
Script is more open, please copy the entire source directory, modify the configuration file in another directory [user.yaml] to another account, double-click Run [main.py] to start the second script, with this, Multi-to-interference
-
Correctly shut down the program, click on the X X in the upper right corner of the script console window, will be closed, or click the script console window, press Ctrl + C, try not to close the script controlled Chrome window, otherwise WebDriver is easy to produce some zombie process
! ! ! If you can't open the Python file because you don't do it, you can use the command line.
Premise is to complete the above steps, install the Python environment, install dependence
Open the command line tool (recommended to download the cmder command line tool, download link: [Click to download CMDER command line tool] (https://github.com/cmderdev/cmder/releases/download/v1.3.18/cmder_mini.zip))
Enter the project directory (assuming the project in the OpenFARMER directory of the D disk)
- Enter d: [Press Enter] in the command line tool
2, CD D: / OpenFARMER [press Enter]
(If you do not install dependencies, you can execute python install_depends.py first.
3, python main.py [press Enter] (some environment is py main.py)
- The program log shows that the chicken has been successfully added, and it is successfully watered, and it has been successfully collected. Why is the game interface in Chrome still showing no bonus, no watering, no collection?
This is because the program is the operation of directly calling the intelligent contract. The game interface in Chrome will not be updated. In fact, as long as the log display operation is successful, it has been successful, and the game interface in Chrome is not updated, no need to pay attention You can reopeize a chrome window, log in to the game, and have no success.
- Cannot log in with the Google account, prompt this browser or application may not be safe?
This is because Chrome itself is Google home, Google judges that the Chrome browser is being controlled, and it is not safe and logged in. The solution is to log in the WAX cloud money package, click [Forgot Password], enter the wax节点链接,默认使用第一个节点 can be reset, Wax cloud money package login interface, enter the Google Mail account and reset the password to log in, without a point Google icon, do not need to log in with the Google account.
Welcome to reward, support me to continue to improve english version of this project.
My WAX address: bitleggerthx (account support WAX, FWW, FWF, FWG)
To support author of Chinese version use this wallets:
TRC20 address: Txmvtz3ndhpvju7symuldlbufwdxa34QIX
WAX address: OpenFARMERCN (account support WAX, FWW, FWF, FWG)
Peasant World Chinese Tutorial: [https://fww.umaske.com] (https://fww.umaske.com)
Peasant World Real-Time Monitoring Chinese: [https://fw.umaske.com] (https://fw.umaske.com)
[Peasant World Assistant --anchor Wallet Edition]: [https://github.com/lintan/openfarmeronanchor] (https://github.com/lintan/openfarmeronanchor)]