
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
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
Usage
from heisenberg.core import Heisenberg
h = Heisenberg(
'emrebeyler',
''
)
Investing to heist
tx_data = h.heist(1000)
print(tx_data)
Recruting Units
tx_data = h.unit("bouncer", 1)
print(tx_data)
Upgrades with in-game resources
tx_data = h.upgrade("headquarters")
print(tx_data)
Attack to other players
Note: Battle system is disabled, at the moment.
tx_data = h.attack(
"",
[{'unit': 'knifer', 'amount': 3}, {'unit': 'bouncer', 'amount': 2}]
))
Creating a char
Only once in the beginning.
h.char("1", referer="emrebeyler")
Example script (Auto Investing to Heist)
This script invests 420 DRUGs in every 5 minutes.

Heisenberg shell
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_key
heist <amount>
unit <unit_name> <unit_type>
Notes
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.
Roadmap
- Bundle the game data (Buildings, Units, etc.) with the library to add validation on operations.
Disclaimer
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.
Vote for my witness
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