https://github.com/ericvaladas/pyda
A Dark Ages client written in Python
https://github.com/ericvaladas/pyda
Last synced: about 1 month ago
JSON representation
A Dark Ages client written in Python
- Host: GitHub
- URL: https://github.com/ericvaladas/pyda
- Owner: ericvaladas
- Created: 2015-04-07T02:14:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-10-01T16:18:14.000Z (almost 9 years ago)
- Last Synced: 2023-03-25T13:05:59.617Z (over 3 years ago)
- Language: Python
- Size: 28.3 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pyda
A Dark Ages client written in Python
This project is a language rewrite of kojasou's [consoleda](https://github.com/kojasou/consoleda).
### Setup
Clone this repository.
```sh
git clone https://github.com/ericvaladas/pyda.git
```
### Usage
Extend the base Client class and override the packet handlers.
```py
from client import Client as _Client
class Client(_Client):
def packet_handler_0x0A_system_message(self, packet):
packet.read_byte()
message = packet.read_string16()
print(message)
Client.run('username', 'password')
```
Want to reconnect after being disconnected? No problem.
```py
class Client(_Client):
def handle_recv(self, recv_buffer):
super(Client, self).handle_recv(recv_buffer)
if not recv_buffer:
self.reconnect()
```
### Todo
- Implement [a better IO Loop](http://tornado.readthedocs.org/en/latest/ioloop.html)
- ~~Generate a working client ID for login~~
- Add more packet handlers