Hi!
I am happy to share with you a python bot script for notify in your desktop the REGION available in each moment in Splinterlands. For to know when we can buy our REGION target. It can be modified easily for adapt to PLOT or TRACT selection.
In the firsts lines in user settings, you can set your REGION target and email address, for receive a email notification when your buy moment arrive.
You can download this and save the file like "notification.py", and program your desktop or server for execute this when restart with the command:
python3 notification.py
Of course, it requires having python3 installed.
You can download the file here:
https://www.dropbox.com/s/uv8ayff26yrdxs6/notification.py?dl=0
Here the code. Enjoy!
from gi.repository import Notify
import json
import requests
import time
import os
# Config settings for the user
email="[email protected]"
region_target="40"
email_active=True
#-------
def checkRegion():
api = json.loads(response.text)
response = requests.get("https://vapi.splinterlands.com/land/collection/list/view?player=molins")
region = api["data"]["mapAvailability"]["regions"][0]
region_name = str(region["name"])
region_number = str(region["region_number"])
return region_name,region_number
region_name,region_number = checkRegion()
last_region=region_number
Notify.init("Molins Notificator")
notification = Notify.Notification.new("Actual Region:", str(region_number)+" - "+str(region_name))
notification.show()
while True:
region_name,region_number = checkRegion()
print("last_region: "+last_region+" | region_available:"+region_number)
if region_number > last_region:
# Change application name
notification.set_app_name("Molins Notificator")
# Change summary and body
notification.update("New REGION Available!", "Actual Region:", str(region_number)+" - "+str(region_name))
# Show again
notification.show()
last_region = region_number
if region_number == region_target:
if email_active == True:
print("email sent!")
time.sleep(60)
exec("echo "BUY NOW!! https://next.splinterlands.com/collection/land/redeem " | mail -s "REGION "+region_target+"-"+region_name+" AVAILABLE!" ""+email+""")
Congratulations @molins! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)
Your next target is to reach 200 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out our last posts:
Support the HiveBuzz project. Vote for our proposal!
May we ask you to review and support the our proposal renewal so our team can continue its work?
You can support the new proposal (#248) on Peakd, Ecency, or using HiveSigner.
Thank you!Dear @molins,