enum EIF_Item_Type : char { 0 Static 2 Money 3 Heal 4 Teleport 5 Spell 6 EXPReward 7 StatReward 8 SkillReward 9 Key 10 Weapon 11 Shield 12 Armor 13 Hat 14 Boots 15 Gloves 16 Accessory 17 Belt 18 Necklace 19 Ring 20 Armlet 21 Bracer 22 Beer 23 EffectPotion 24 HairDye 25 CureCurse } enum EIF_Item_SubType : char { 0 None 1 Ranged 2 Arrows 3 Wings 4 TwoHanded } enum EIF_Item_Special : char { 0 Normal 1 Rare 2 Legendary 3 Unique 4 Lore 5 Cursed } enum EIF_Item_Size : char { 0 Size1x1 1 Size1x2 2 Size1x3 3 Size1x4 4 Size2x1 5 Size2x2 6 Size2x3 7 Size2x4 } struct EIF_Item { prefix_string name short graphic_id EIF_Item_Type type EIF_Item_SubType subtype EIF_Item_Special special short hp short tp short min_damage short max_damage short accuracy short evade short armor char return_damage char str char intl char wis char agi char con char cha char light_resistance char dark_resistance char earth_resistance char air_resistance char water_resistance char fire_resistance "scroll_map|doll_graphic|exp_reward|hair_color|effect|key" three spec1 "scroll_x|gender" char spec2 "scroll_y" char spec3 short level_req short class_req short str_req short int_req short wis_req short agi_req short con_req short cha_req char element char element_damage char weight char = 0 EIF_Item_Size size } struct EIF_File { raw_string(3) magic short rid[2] short num_items char = 0 struct EIF_Item items[num_items] } // --- enum ENF_NPC_Type : short { 0 NPC 1 Passive 2 Aggressive 6 Shop 7 Inn 9 Bank 10 Barber 11 Guild 12 Priest 13 Law 14 Skills 15 Quest } struct ENF_NPC { prefix_string name short graphic_id char race short boss short child ENF_NPC_Type type short behavior_id three hp short tp short min_damage short max_damage short accuracy short evade short armor char return_damage short element short element_damage short element_weakness short element_weakness_damage char level three experience } struct ENF_File { raw_string(3) magic short rid[2] short num_npcs char = 0 struct ENF_NPC npcs[num_npcs] } // --- enum ECF_Class_Type : char { 0 Melee 1 Rogue 2 Magic 3 Archer 4 Peasant } struct ECF_Class { prefix_string name char parent_type ECF_Class_Type type short str short intl short wis short agi short con short cha } struct ECF_File { raw_string(3) magic short rid[2] short num_classes char = 0 struct ECF_Class classes[num_classes] } // --- enum ESF_Spell_Type : three { 0 Heal 1 Damage 2 Bard } enum ESF_Spell_Target_Restrict : char { 0 NPC 1 Friendly 2 Opponent } enum ESF_Spell_Target_Type : char { 0 Other 1 Player 3 Group } enum ESF_Skill_Nature : char { 0 Spell 1 Skill } struct ESF_Spell { char name_length char shout_length raw_string(name_length) name raw_string(shout_length) shout short icon_id short graphic_id short tp_cost short sp_cost char cast_time ESF_Skill_Nature nature char = 1 ESF_Spell_Type type char element short element_power ESF_Spell_Target_Restrict target_restrict ESF_Spell_Target_Type target_type char target_time char = 0 short max_skill_level short min_damage short max_damage short accuracy short evade short armor char return_damage short hp_heal short tp_heal char sp_heal short str short intl short wis short agi short con short cha } struct ESF_File { raw_string(3) magic short rid[2] short num_spells char = 0 struct ESF_Spell spells[num_spells] } // --- enum EMF_Type : char { 0 Default 3 PK } enum EMF_Effect : char { 0 None 1 HPDrain 2 TPDrain 3 Quake1 4 Quake2 5 Quake3 6 Quake4 } enum EMF_Music_Control : char { 0 InterruptIfDifferentPlayOnce 1 InterruptPlayOnce 2 FinishPlayOnce 3 InterruptIfDifferentPlayRepeat 4 InterruptPlayRepeat 5 FinishPlayRepeat 6 InterruptPlayNothing } enum EMF_Tile_Spec : char { 0 Wall 1 ChairDown 2 ChairLeft 3 ChairRight 4 ChairUp 5 ChairDownRight 6 ChairUpLeft 7 ChairAll 8 Reserved8 9 Chest 10 Reserved10 11 Reserved11 12 Reserved12 13 Reserved13 14 Reserved14 15 Reserved15 16 BankVault 17 NPCBoundary 18 MapEdge 19 FakeWall 20 Board1 21 Board2 22 Board3 23 Board4 24 Board5 25 Board6 26 Board7 27 Board8 28 Jukebox 29 Jump 30 Water 31 Reserved31 32 Arena 33 AmbientSource 34 TimedSpikes 35 Spikes 36 HiddenSpikes } struct EMF_NPC { char x char y short id char spawn_type short spawn_time char amount } "A legacy EMF entity used to specify a key on a door" struct EMF_LegacyDoorKey { struct Coords coords short key } struct EMF_Item { char x char y short key_required char chest_slot short item_id short spawn_time three item_amount } struct EMF_Spec_Row_Tile { char x EMF_Tile_Spec spec } struct EMF_Spec_Row { char y char num_tiles struct EMF_Spec_Row_Tile tiles[num_tiles] } struct EMF_Gfx_Row_Tile { char x short graphic } struct EMF_Gfx_Row { char y char num_tiles struct EMF_Gfx_Row_Tile tiles[num_tiles] } struct EMF_Gfx_Layer { char num_rows struct EMF_Gfx_Row rows[num_rows] } struct EMF_Warp { short map struct Coords coords char level_required short door } struct EMF_Warp_Row_Tile { char x struct EMF_Warp warp } struct EMF_Warp_Row { char y char num_tiles struct EMF_Warp_Row_Tile tiles[num_tiles] } struct EMF_Sign { struct Coords coords short raw_text_length emf_string(raw_text_length - 1) text char title_length sub_string(text, 0, title_length) title sub_string(text, title_length) message } struct EMF_File { raw_string(3) magic short rid[2] emf_string(24) name EMF_Type type EMF_Effect effect char music_id char music_extra short ambient_sound_id char width char height short fill_tile char map_available char can_scroll char relog_x char relog_y char = 0 char num_npcs struct EMF_NPC npcs[num_npcs] char num_legacy_door_keys struct EMF_LegacyDoorKey legacy_door_keys[num_legacy_door_keys] char num_items struct EMF_Item items[num_items] char num_spec_rows struct EMF_Spec_Row spec_rows[num_spec_rows] char num_warp_rows struct EMF_Warp_Row warp_rows[num_warp_rows] struct EMF_Gfx_Layer gfx_layers[9] char num_signs struct EMF_Sign signs[num_signs] } struct Drop { short item_id three min three max short rate } struct Drop_NPC { short npc_id short num_of_drops struct Drop drops[num_of_drops] } struct Drop_File { raw_string(3) magic struct Drop_NPC npcs[] } struct Inn { short vendor_id prefix_string name short spawn_map char spawn_x char spawn_y short sleep_map char sleep_x char sleep_y char alt_spawn_enabled short alt_spawn_map char alt_spawn_x char alt_spawn_y prefix_string question1 prefix_string answer1 prefix_string question2 prefix_string answer2 prefix_string question3 prefix_string answer3 } struct Inn_File { raw_string(3) magic struct Inn inns[] } struct Skill { short skill_id char min_level char class_req int price short skill_id_req1 short skill_id_req2 short skill_id_req3 short skill_id_req4 short str_req short int_req short wis_req short agi_req short con_req short cha_req } struct SkillMaster { short vendor_id prefix_string name char min_level char max_level char class_req short num_skills struct Skill skills[num_skills] } struct SkillMaster_File { raw_string(3) magic struct SkillMaster skill_masters[] } struct Trade { short item_id three buy_price three sell_price char max_amount } struct Craft { short item_id short ingredient1_item_id char ingredient1_amount short ingredient2_item_id char ingredient2_amount short ingredient3_item_id char ingredient3_amount short ingredient4_item_id char ingredient4_amount } struct Shop { short vendor_id prefix_string name char min_level char max_level char class_req short num_trades char num_crafts struct Trade trades[num_trades] struct Craft crafts[num_crafts] } struct Shop_File { raw_string(3) magic struct Shop shops[] } struct Talk_NPC { short npc_id char rate char num_messages prefix_string messages[num_messages] } struct Talk_File { raw_string(3) magic struct Talk_NPC npcs[] }