eolib.protocol.pub.server

EO server pub file data structures.

class DropFile[source]

Bases: object

Endless Drop File

__init__(*, npcs)[source]

Create a new instance of DropFile.

Parameters:

npcs (Iterable[DropNpcRecord])

property byte_size: int

The size of the data that this was deserialized from.

property npcs: tuple[DropNpcRecord, ...]

The npcs field.

static serialize(writer, data) None[source]

Serializes an instance of DropFile to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (DropFile) – The data to serialize.

static deserialize(reader) DropFile[source]

Deserializes an instance of DropFile from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class DropNpcRecord[source]

Bases: object

Record of potential drops from an NPC

__init__(*, npc_id, drops)[source]

Create a new instance of DropNpcRecord.

Parameters:
  • npc_id (int) – (Value range is 0-64008.)

  • drops (Iterable[DropRecord]) – (Length must be 64008 or less.)

property byte_size: int

The size of the data that this was deserialized from.

property npc_id: int

The npc_id field.

property drops: tuple[DropRecord, ...]

The drops field.

static serialize(writer, data) None[source]

Serializes an instance of DropNpcRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (DropNpcRecord) – The data to serialize.

static deserialize(reader) DropNpcRecord[source]

Deserializes an instance of DropNpcRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class DropRecord[source]

Bases: object

Record of an item an NPC can drop when killed

__init__(*, item_id, min_amount, max_amount, rate)[source]

Create a new instance of DropRecord.

Parameters:
  • item_id (int) – (Value range is 0-64008.)

  • min_amount (int) – (Value range is 0-16194276.)

  • max_amount (int) – (Value range is 0-16194276.)

  • rate (int) – Chance (x in 64,000) of the item being dropped (Value range is 0-64008.)

property byte_size: int

The size of the data that this was deserialized from.

property item_id: int

The item_id field.

property min_amount: int

The min_amount field.

property max_amount: int

The max_amount field.

property rate: int

Chance (x in 64,000) of the item being dropped

static serialize(writer, data) None[source]

Serializes an instance of DropRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (DropRecord) – The data to serialize.

static deserialize(reader) DropRecord[source]

Deserializes an instance of DropRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class InnFile[source]

Bases: object

Endless Inn File

__init__(*, inns)[source]

Create a new instance of InnFile.

Parameters:

inns (Iterable[InnRecord])

property byte_size: int

The size of the data that this was deserialized from.

property inns: tuple[InnRecord, ...]

The inns field.

static serialize(writer, data) None[source]

Serializes an instance of InnFile to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (InnFile) – The data to serialize.

static deserialize(reader) InnFile[source]

Deserializes an instance of InnFile from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class InnQuestionRecord[source]

Bases: object

Record of a question and answer that the player must answer to register citizenship with an inn

__init__(*, question, answer)[source]

Create a new instance of InnQuestionRecord.

Parameters:
  • question (str) – (Length must be 252 or less.)

  • answer (str) – (Length must be 252 or less.)

property byte_size: int

The size of the data that this was deserialized from.

property question: str

The question field.

property answer: str

The answer field.

static serialize(writer, data) None[source]

Serializes an instance of InnQuestionRecord to the provided EoWriter.

Parameters:
static deserialize(reader) InnQuestionRecord[source]

Deserializes an instance of InnQuestionRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class InnRecord[source]

Bases: object

Record of Inn data in an Endless Inn File

__init__(*, behavior_id, name, spawn_map, spawn_x, spawn_y, sleep_map, sleep_x, sleep_y, alternate_spawn_enabled, alternate_spawn_map, alternate_spawn_x, alternate_spawn_y, questions)[source]

Create a new instance of InnRecord.

Parameters:
  • behavior_id (int) – Behavior ID of the NPC that runs the inn. 0 for default inn (Value range is 0-64008.)

  • name (str) – (Length must be 252 or less.)

  • spawn_map (int) – ID of the map the player is sent to after respawning (Value range is 0-64008.)

  • spawn_x (int) – X coordinate of the map the player is sent to after respawning (Value range is 0-252.)

  • spawn_y (int) – Y coordinate of the map the player is sent to after respawning (Value range is 0-252.)

  • sleep_map (int) – ID of the map the player is sent to after sleeping at the inn (Value range is 0-64008.)

  • sleep_x (int) – X coordinate of the map the player is sent to after sleeping at the inn (Value range is 0-252.)

  • sleep_y (int) – Y coordinate of the map the player is sent to after sleeping at the inn (Value range is 0-252.)

  • alternate_spawn_enabled (bool) – Flag for an alternate spawn point. If true, the server will use this alternate spawn map, x, and, y based on some other condition. In the official server, this is used to respawn new characters on the noob island until they reach a certain level.

  • alternate_spawn_map (int) – (Value range is 0-64008.)

  • alternate_spawn_x (int) – (Value range is 0-252.)

  • alternate_spawn_y (int) – (Value range is 0-252.)

  • questions (Iterable[InnQuestionRecord]) – (Length must be 3.)

property byte_size: int

The size of the data that this was deserialized from.

property behavior_id: int

Behavior ID of the NPC that runs the inn. 0 for default inn

property name: str

The name field.

property spawn_map: int

ID of the map the player is sent to after respawning

property spawn_x: int

X coordinate of the map the player is sent to after respawning

property spawn_y: int

Y coordinate of the map the player is sent to after respawning

property sleep_map: int

ID of the map the player is sent to after sleeping at the inn

property sleep_x: int

X coordinate of the map the player is sent to after sleeping at the inn

property sleep_y: int

Y coordinate of the map the player is sent to after sleeping at the inn

property alternate_spawn_enabled: bool

Flag for an alternate spawn point. If true, the server will use this alternate spawn map, x, and, y based on some other condition.

In the official server, this is used to respawn new characters on the noob island until they reach a certain level.

property alternate_spawn_map: int

The alternate_spawn_map field.

property alternate_spawn_x: int

The alternate_spawn_x field.

property alternate_spawn_y: int

The alternate_spawn_y field.

property questions: tuple[InnQuestionRecord, ...]

The questions field.

static serialize(writer, data) None[source]

Serializes an instance of InnRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (InnRecord) – The data to serialize.

static deserialize(reader) InnRecord[source]

Deserializes an instance of InnRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class ShopCraftIngredientRecord[source]

Bases: object

Record of an ingredient for crafting an item in a shop

__init__(*, item_id, amount)[source]

Create a new instance of ShopCraftIngredientRecord.

Parameters:
  • item_id (int) – Item ID of the craft ingredient, or 0 if the ingredient is not present (Value range is 0-64008.)

  • amount (int) – (Value range is 0-252.)

property byte_size: int

The size of the data that this was deserialized from.

property item_id: int

Item ID of the craft ingredient, or 0 if the ingredient is not present

property amount: int

The amount field.

static serialize(writer, data) None[source]

Serializes an instance of ShopCraftIngredientRecord to the provided EoWriter.

Parameters:
static deserialize(reader) ShopCraftIngredientRecord[source]

Deserializes an instance of ShopCraftIngredientRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class ShopCraftRecord[source]

Bases: object

Record of an item that can be crafted in a shop

__init__(*, item_id, ingredients)[source]

Create a new instance of ShopCraftRecord.

Parameters:
property byte_size: int

The size of the data that this was deserialized from.

property item_id: int

The item_id field.

property ingredients: tuple[ShopCraftIngredientRecord, ...]

The ingredients field.

static serialize(writer, data) None[source]

Serializes an instance of ShopCraftRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (ShopCraftRecord) – The data to serialize.

static deserialize(reader) ShopCraftRecord[source]

Deserializes an instance of ShopCraftRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class ShopFile[source]

Bases: object

Endless Shop File

__init__(*, shops)[source]

Create a new instance of ShopFile.

Parameters:

shops (Iterable[ShopRecord])

property byte_size: int

The size of the data that this was deserialized from.

property shops: tuple[ShopRecord, ...]

The shops field.

static serialize(writer, data) None[source]

Serializes an instance of ShopFile to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (ShopFile) – The data to serialize.

static deserialize(reader) ShopFile[source]

Deserializes an instance of ShopFile from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class ShopRecord[source]

Bases: object

Record of Shop data in an Endless Shop File

__init__(*, behavior_id, name, min_level, max_level, class_requirement, trades, crafts)[source]

Create a new instance of ShopRecord.

Parameters:
  • behavior_id (int) – (Value range is 0-64008.)

  • name (str) – (Length must be 252 or less.)

  • min_level (int) – Minimum level required to use this shop (Value range is 0-252.)

  • max_level (int) – Maximum level allowed to use this shop (Value range is 0-252.)

  • class_requirement (int) – Class required to use this shop (Value range is 0-252.)

  • trades (Iterable[ShopTradeRecord]) – (Length must be 64008 or less.)

  • crafts (Iterable[ShopCraftRecord]) – (Length must be 252 or less.)

property byte_size: int

The size of the data that this was deserialized from.

property behavior_id: int

The behavior_id field.

property name: str

The name field.

property min_level: int

Minimum level required to use this shop

property max_level: int

Maximum level allowed to use this shop

property class_requirement: int

Class required to use this shop

property trades: tuple[ShopTradeRecord, ...]

The trades field.

property crafts: tuple[ShopCraftRecord, ...]

The crafts field.

static serialize(writer, data) None[source]

Serializes an instance of ShopRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (ShopRecord) – The data to serialize.

static deserialize(reader) ShopRecord[source]

Deserializes an instance of ShopRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class ShopTradeRecord[source]

Bases: object

Record of an item that can be bought or sold in a shop

__init__(*, item_id, buy_price, sell_price, max_amount)[source]

Create a new instance of ShopTradeRecord.

Parameters:
  • item_id (int) – (Value range is 0-64008.)

  • buy_price (int) – How much it costs to buy the item from the shop (Value range is 0-16194276.)

  • sell_price (int) – How much the shop will pay for the item (Value range is 0-16194276.)

  • max_amount (int) – Max amount of the item that can be bought or sold at one time (Value range is 0-252.)

property byte_size: int

The size of the data that this was deserialized from.

property item_id: int

The item_id field.

property buy_price: int

How much it costs to buy the item from the shop

property sell_price: int

How much the shop will pay for the item

property max_amount: int

Max amount of the item that can be bought or sold at one time

static serialize(writer, data) None[source]

Serializes an instance of ShopTradeRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (ShopTradeRecord) – The data to serialize.

static deserialize(reader) ShopTradeRecord[source]

Deserializes an instance of ShopTradeRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class SkillMasterFile[source]

Bases: object

Endless Skill Master File

__init__(*, skill_masters)[source]

Create a new instance of SkillMasterFile.

Parameters:

skill_masters (Iterable[SkillMasterRecord])

property byte_size: int

The size of the data that this was deserialized from.

property skill_masters: tuple[SkillMasterRecord, ...]

The skill_masters field.

static serialize(writer, data) None[source]

Serializes an instance of SkillMasterFile to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (SkillMasterFile) – The data to serialize.

static deserialize(reader) SkillMasterFile[source]

Deserializes an instance of SkillMasterFile from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class SkillMasterRecord[source]

Bases: object

Record of Skill Master data in an Endless Skill Master File

__init__(*, behavior_id, name, min_level, max_level, class_requirement, skills)[source]

Create a new instance of SkillMasterRecord.

Parameters:
  • behavior_id (int) – Behavior ID of the Skill Master NPC (Value range is 0-64008.)

  • name (str) – (Length must be 252 or less.)

  • min_level (int) – Minimum level required to use this Skill Master (Value range is 0-252.)

  • max_level (int) – Maximum level allowed to use this Skill Master (Value range is 0-252.)

  • class_requirement (int) – Class required to use this Skill Master (Value range is 0-252.)

  • skills (Iterable[SkillMasterSkillRecord]) – (Length must be 64008 or less.)

property byte_size: int

The size of the data that this was deserialized from.

property behavior_id: int

Behavior ID of the Skill Master NPC

property name: str

The name field.

property min_level: int

Minimum level required to use this Skill Master

property max_level: int

Maximum level allowed to use this Skill Master

property class_requirement: int

Class required to use this Skill Master

property skills: tuple[SkillMasterSkillRecord, ...]

The skills field.

static serialize(writer, data) None[source]

Serializes an instance of SkillMasterRecord to the provided EoWriter.

Parameters:
static deserialize(reader) SkillMasterRecord[source]

Deserializes an instance of SkillMasterRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class SkillMasterSkillRecord[source]

Bases: object

Record of a skill that a Skill Master NPC can teach

__init__(*, skill_id, level_requirement, class_requirement, price, skill_requirements, str_requirement, int_requirement, wis_requirement, agi_requirement, con_requirement, cha_requirement)[source]

Create a new instance of SkillMasterSkillRecord.

Parameters:
  • skill_id (int) – (Value range is 0-64008.)

  • level_requirement (int) – Level required to learn this skill (Value range is 0-252.)

  • class_requirement (int) – Class required to learn this skill (Value range is 0-252.)

  • price (int) – (Value range is 0-4097152080.)

  • skill_requirements (Iterable[int]) – IDs of skills that must be learned before a player can learn this skill (Length must be 4.) (Element value range is 0-64008.)

  • str_requirement (int) – Strength required to learn this skill (Value range is 0-64008.)

  • int_requirement (int) – Intelligence required to learn this skill (Value range is 0-64008.)

  • wis_requirement (int) – Wisdom required to learn this skill (Value range is 0-64008.)

  • agi_requirement (int) – Agility required to learn this skill (Value range is 0-64008.)

  • con_requirement (int) – Constitution required to learn this skill (Value range is 0-64008.)

  • cha_requirement (int) – Charisma required to learn this skill (Value range is 0-64008.)

property byte_size: int

The size of the data that this was deserialized from.

property skill_id: int

The skill_id field.

property level_requirement: int

Level required to learn this skill

property class_requirement: int

Class required to learn this skill

property price: int

The price field.

property skill_requirements: tuple[int, ...]

IDs of skills that must be learned before a player can learn this skill

property str_requirement: int

Strength required to learn this skill

property int_requirement: int

Intelligence required to learn this skill

property wis_requirement: int

Wisdom required to learn this skill

property agi_requirement: int

Agility required to learn this skill

property con_requirement: int

Constitution required to learn this skill

property cha_requirement: int

Charisma required to learn this skill

static serialize(writer, data) None[source]

Serializes an instance of SkillMasterSkillRecord to the provided EoWriter.

Parameters:
static deserialize(reader) SkillMasterSkillRecord[source]

Deserializes an instance of SkillMasterSkillRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class TalkFile[source]

Bases: object

Endless Talk File

__init__(*, npcs)[source]

Create a new instance of TalkFile.

Parameters:

npcs (Iterable[TalkRecord])

property byte_size: int

The size of the data that this was deserialized from.

property npcs: tuple[TalkRecord, ...]

The npcs field.

static serialize(writer, data) None[source]

Serializes an instance of TalkFile to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (TalkFile) – The data to serialize.

static deserialize(reader) TalkFile[source]

Deserializes an instance of TalkFile from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class TalkMessageRecord[source]

Bases: object

Record of a message that an NPC can say

__init__(*, message)[source]

Create a new instance of TalkMessageRecord.

Parameters:

message (str) – (Length must be 252 or less.)

property byte_size: int

The size of the data that this was deserialized from.

property message: str

The message field.

static serialize(writer, data) None[source]

Serializes an instance of TalkMessageRecord to the provided EoWriter.

Parameters:
static deserialize(reader) TalkMessageRecord[source]

Deserializes an instance of TalkMessageRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class TalkRecord[source]

Bases: object

Record of Talk data in an Endless Talk File

__init__(*, npc_id, rate, messages)[source]

Create a new instance of TalkRecord.

Parameters:
  • npc_id (int) – ID of the NPC that will talk (Value range is 0-64008.)

  • rate (int) – Chance that the NPC will talk (0-100) (Value range is 0-252.)

  • messages (Iterable[TalkMessageRecord]) – (Length must be 252 or less.)

property byte_size: int

The size of the data that this was deserialized from.

property npc_id: int

ID of the NPC that will talk

property rate: int

Chance that the NPC will talk (0-100)

property messages: tuple[TalkMessageRecord, ...]

The messages field.

static serialize(writer, data) None[source]

Serializes an instance of TalkRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (TalkRecord) – The data to serialize.

static deserialize(reader) TalkRecord[source]

Deserializes an instance of TalkRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.