A core PHP library for writing applications related to Endless Online.
$ composer require exilestudios/eolib-php-dist
Read and write the following EO data structures:
- Client packets
- Server packets
- Endless Map Files (EMF)
- Endless Item Files (EIF)
- Endless NPC Files (ENF)
- Endless Spell Files (ESF)
- Endless Class Files (ECF)
Utilities:
- Data reader
- Data writer
- Number encoding
- String encoding
- Data encryption
- Packet sequencer
Here's an example of how to use the PacketFamily class from the library:
<?php
require_once 'vendor/exilestudios/eolib-php-dist/vendor/autoload.php';
use Eolib\Protocol\Net\PacketFamily;
// Access packet family constants
echo PacketFamily::CONNECTION; // Output: 1
echo PacketFamily::ACCOUNT; // Output: 2
echo PacketFamily::CHARACTER; // Output: 3
// ...
// Use packet family constants in your code
$packetFamily = PacketFamily::LOGIN;
if ($packetFamily === PacketFamily::LOGIN) {
// Handle login packet
// ...
}
The library documentation is available online at: https://exilestudios.github.io/eolib-php You can browse the documentation to learn about the available classes, methods, and their usage.
- PHP 7.4 or higher
- Composer
- Clone the repository:
$ git clone https://github.com/ExileStudios/eolib-php.git
$ cd eolib-php
- Install dependencies:
$ composer install
$ composer dump-autoload
- Fetch the latest protocol files:
$ composer fetch-protocol
- Generate the protocol code:
$ composer generate-protocol
- Generate the documentation:
$ composer generate-docs
To fetch the latest protocol files, generate the protocol code, and generate the documentation:
$ composer build
The generated protocol code will be available in the Eolib/Protocol directory. Under the namespace Eolib\Protocol
.
The generated documentation will be available in the docs directory.
This library is open-source software licensed under the MIT license.