eolib.protocol.pub.server¶
EO server pub file data structures.
- class DropFile[source]¶
Bases:
objectEndless Drop File
- __init__(*, npcs)[source]¶
Create a new instance of DropFile.
- Parameters:
npcs (
Iterable[DropNpcRecord])
- property npcs: tuple[DropNpcRecord, ...]¶
The npcs field.
- class DropNpcRecord[source]¶
Bases:
objectRecord 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 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:
objectRecord of an item an NPC can drop when killed
- 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:
objectEndless Inn File
- class InnQuestionRecord[source]¶
Bases:
objectRecord of a question and answer that the player must answer to register citizenship with an inn
- static serialize(writer, data) None[source]¶
Serializes an instance of InnQuestionRecord to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
InnQuestionRecord) – The data to serialize.
- 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:
objectRecord 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 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 questions: tuple[InnQuestionRecord, ...]¶
The questions field.
- class ShopCraftIngredientRecord[source]¶
Bases:
objectRecord of an ingredient for crafting an item in a shop
- static serialize(writer, data) None[source]¶
Serializes an instance of ShopCraftIngredientRecord to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
ShopCraftIngredientRecord) – The data to serialize.
- 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:
objectRecord of an item that can be crafted in a shop
- __init__(*, item_id, ingredients)[source]¶
Create a new instance of ShopCraftRecord.
- Parameters:
item_id (
int) – (Value range is 0-64008.)ingredients (
Iterable[ShopCraftIngredientRecord]) – (Length must be 4.)
- 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:
objectEndless Shop File
- __init__(*, shops)[source]¶
Create a new instance of ShopFile.
- Parameters:
shops (
Iterable[ShopRecord])
- property shops: tuple[ShopRecord, ...]¶
The shops field.
- class ShopRecord[source]¶
Bases:
objectRecord 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 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:
objectRecord 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.)
- 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:
objectEndless Skill Master File
- __init__(*, skill_masters)[source]¶
Create a new instance of SkillMasterFile.
- Parameters:
skill_masters (
Iterable[SkillMasterRecord])
- 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:
objectRecord 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 skills: tuple[SkillMasterSkillRecord, ...]¶
The skills field.
- static serialize(writer, data) None[source]¶
Serializes an instance of SkillMasterRecord to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
SkillMasterRecord) – The data to serialize.
- 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:
objectRecord 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 skill_requirements: tuple[int, ...]¶
IDs of skills that must be learned before a player can learn this skill
- static serialize(writer, data) None[source]¶
Serializes an instance of SkillMasterSkillRecord to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
SkillMasterSkillRecord) – The data to serialize.
- 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:
objectEndless Talk File
- __init__(*, npcs)[source]¶
Create a new instance of TalkFile.
- Parameters:
npcs (
Iterable[TalkRecord])
- property npcs: tuple[TalkRecord, ...]¶
The npcs field.
- class TalkMessageRecord[source]¶
Bases:
objectRecord 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.)
- static serialize(writer, data) None[source]¶
Serializes an instance of TalkMessageRecord to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
TalkMessageRecord) – The data to serialize.
- 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:
objectRecord 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 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.