Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 974 Bytes

README.md

File metadata and controls

37 lines (31 loc) · 974 Bytes

pyda

A Dark Ages client written in Python

This project is a language rewrite of kojasou's consoleda.

Setup

Clone this repository.

git clone https://github.com/ericvaladas/pyda.git

Usage

Extend the base Client class and override the packet handlers.

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.

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
  • Generate a working client ID for login
  • Add more packet handlers