Heisenberg is a Python command line application and a library to play drugwars without using the website.
Drugwars is a blockchain based game. That makes it possible for the blockchain accounts to play the game using off-site transactions.
Installation requires Python3.6 or a greater version. It's always recommended to install the library into a virtual Python environment.
$ pip install heisenberg_drugwars
from heisenberg.core import Heisenberg
h = Heisenberg(
'emrebeyler',
''
)
tx_data = h.heist(1000)
print(tx_data)
tx_data = h.unit("bouncer", 1)
print(tx_data)
tx_data = h.upgrade("headquarters")
print(tx_data)
Note: Battle system is disabled, at the moment.
tx_data = h.attack(
"",
[{'unit': 'knifer', 'amount': 3}, {'unit': 'bouncer', 'amount': 2}]
))
Only once in the beginning.
h.char("1", referer="emrebeyler")
This script invests 420 DRUGs in every 5 minutes.
Heisenberg has an interactive shell where you can set your account credentials and play the game via console.
Run it by typing heisenberg in your console:
$ heisenberg
Available commands:
set_credentials username private_posting_keyheist <amount>unit <unit_name> <unit_type>Even though, you can broadcast the custom jsons with this library, it may not have an affect in the game since @drugwars account is the authority point and they may refuse to pick up transactions if transactions are malformed or includes incorrect data.
For example, if you have 10k DRUGs and try investing 20k DRUGs, your transactions won't be picked up by the game since you don't have enough balance.
Also, if you didn't created your game account and want to try, consider registering with my reference link which will give me a %5 bonus on your earnings.
Drugwars is on constant development progress. Custom JSON definitions on the game may change. I am planning to maintain and update the library as long as I play the game, however, make sure you always audit the code and use it on your own risk.
I do my best to support the blockchain with my skills. If you like what I do, consider casting a vote on via Steemconnect or on steemit.com