Ertha.io — Be The First One To Know And Buy Land On Ertha Metaverse With Python

ElevatedDesigns.AI
CoinsBench
Published in
6 min readJan 28, 2022

--

Hello everyone… Today I want to introduce you to Ertha.io, one of the newest and hottest “Play-to-Earn (P2e)” Metaverse — Crypto projects where you can own lands, real estate, companies, hire in-game experts to maximize your global influence, and more.

ERTHA.IO

Well, I sort of lied… but do not go… you will find this very useful, I promise.

It is not so much of an introduction to the project itself, but a way to have an advantage when it comes to buying precious desirable lands.

By the end of this article, you will be able to “Monitor & Alert” yourself when desirable lands become available for sale or have been freed from the evil imprisonment of the “I reserve as many hexes/lands as I can but never buy” user type… more on that in a moment.

Depending on the geographic location of land, it will include a percentage measured resource(s) type. Resources include water, fish, mystery, meat, wood, etc, and additional resources such as airports and ports. As one may expect, utility resources become highly desired hex lands.

In my opinion, one of the most annoying features of the project as of now is the ability to “Reserve” available lands for long periods and indefinitely.
These are the main points on reservations.
— You can reserve up to 3 lands for a maximum of 6 hours at a time… indefinitely.
—(kind of obvious) A hex land cannot be purchased or reserved by another wallet until the maximum time has passed by or the wallet removes its reservation status.

Many of these lands have been continuously reserved for weeks at a time.

These hex land kidnappers will slack sooner or later, forget to renew, or even a game bug can at times clear these reservations at any moment. That is when you can get alerted as soon as that precious land that you have waited for becomes available and snatch it.

Besides the noted group, the awesome and large amount of users participating in this project is always on the lookout too. Always ready (like a cheetah coalition) waiting for a notification from the devs on newly opened lands.

Let me attempt to paint the picture… imagine David Attenborough as a narrator.

Erthians.(“discord”) Famous for its big buyers, the supreme hunters. Earthians specialize in “click-click”; buying at speed.
Though fast, they are fragile creatures, built to sprint after small lands.

They have changed their tactics, and by doing so, they have taken their prey by surprise…. Tan Tan Taaaaaannnn….

Ok ok ok, back to the subject.

After a new dev notification on new lands is made available, you have about 5 seconds before they are gone… like it never happened.

So, let us cut to the chase…

Requirements:
— Windows, Mac OS, Linux, or any other OS where Python can be run and you have an internet connection. (I will be using Windows)
— Python 3
— A Gmail account (you could use others)
— (optional) Python IDE, or any text editor.

In summary, we will be using Python’s “requests” module to make an HTTP request to api.ertha.io, querying for a land of our choice by its assigned numerical ID.

We will then use “Task Scheduler” to run the HTTP request continuously at a configured interval.
Finally, we will use the “smtplib” python module along with a Gmail account credentials to send an email to ourselves if the land is available for sale and not reserved.

With this script, if the condition returns False for the key-value pair “is_reserved”, it will send you an email alert to notify you. If the condition returns True, no action will be taken as it will indicate that the land is still reserved by an address.

As initial testing, feel free to change line 27 of the code from False to True to confirm that you will be getting emails. In this case, you will get an alert confirming that the queried land is indeed still reserved.

Make sure to copy and paste the code into a text editor and save the file with extension py (hexNotifyandAlert.py). Save it to a known path in your system.

If you are using Windows OS, Task Scheduler is a good and easy path to take.

  • Open Task Scheduler on your computer and create a task
  • You can follow the images below for configuration
For the start date, you can select your current date minus one hour.
Use the “Browse” option and select the path to your python program. Under “Add arguments”, type the path to your saved python script.

If you are using Mac OS, crontab will be the easiest solution to schedule the python script to run.
Within your terminal, you will be able to create a crontab file. Within this file, you will enter the crontab syntax that will dictate how often to run a specific file.

The syntax format is as follows * * * * *<Command>, where each star assignment is:
— minutes (0–59)
— hour (0–23)
— day of the month (1–31)
— month (1–12)
— day of the week (0–6)
— / step values

Examples: */10 * * * * python3 /home/hexNotifyandAlert.py — this would run the python script hexNotifyandAlert.py every 10 minutes.

You can use https://crontab.guru/ to easily create crontab times.

  • Open your “Terminal” application and type “crontab -e”
  • An editor will be opened within the terminal window
  • Enter your command as noted above where you will first type the crontab syntax expression representing the time at which to execute your script, followed by calling the version of python that you may have installed (in this case python3), and lastly the path to your saved python script.
  • Once you have typed your command, you will save and exit the file by following these steps:
    Press your “ESC” escape key once
    Now enter a colon (:) by pressing the shift and colon key
    Now type wq and press enter
    This will save the file
    If everything was entered correctly, your script should be running at the configured schedule.

Alright, alright, alright… That’s it!!!

I hope you have found this article interesting and useful.

ETH/BNB:0x9c951a1005eEA716a1AEBA6239099F9a8C5b779a

— May the odds be ever in your favor

--

--

Just a guy… writing of subjects I find interesting in hopes that it helps anyone.