πŸ”΄ A Bot Alarm for BUY fast your 🏞️ REGION target + πŸ“’ email notification

in Splinterlands β€’ 2 years ago (edited)

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="put_here_your_email@proton.me" region_target="40" email_active=True #------- def checkRegion(): response = requests.get("https://vapi.splinterlands.com/land/collection/list/view?player=molins") api = json.loads(response.text) 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: exec("echo "BUY NOW!! https://next.splinterlands.com/collection/land/redeem " | mail -s "REGION "+region_target+"-"+region_name+" AVAILABLE!" ""+email+""") print("email sent!") time.sleep(60)

Sort: Β 

Congratulations @molins! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 100 upvotes.
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:

HiveBuzz World Cup Contest - Recap of 3rd Place match
The Hive Gamification Proposal Renewal
Support the HiveBuzz project. Vote for our proposal!

Dear @molins,
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,

Hive.blog / https://wallet.hive.blog/proposals
or using HiveSigner.
https://peakd.com/me/proposals/248

Thank you!