├── LICENSE ├── TibiaAPIWithApps.sln ├── apps ├── Smart AutoLooter │ ├── AddAutoLootForm.cs │ ├── AddAutoLootForm.designer.cs │ ├── AddAutoLootForm.resx │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SmartAutoLooter.csproj │ ├── app.config │ ├── uxFilterInput.Designer.cs │ ├── uxFilterInput.cs │ └── uxFilterInput.resx ├── Smart IPChanger │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SmartIPChanger.csproj │ ├── SmartIPChanger.ico │ ├── SmartIPChanger.sln │ ├── app.config │ ├── readme.txt │ └── smartipchanger-icon-source.png ├── Smart Locater │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SmartLocater.csproj │ └── app.config ├── Smart Packet Analyzer │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── MemoryEntryForm.Designer.cs │ ├── MemoryEntryForm.cs │ ├── MemoryEntryForm.resx │ ├── MemoryForm.Designer.cs │ ├── MemoryForm.cs │ ├── MemoryForm.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SmartPacketAnalyzer.csproj │ ├── app.config │ └── readme.txt ├── Smart Runemaker │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── PreviewForm.Designer.cs │ ├── PreviewForm.cs │ ├── PreviewForm.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── RuneChooser.Designer.cs │ ├── RuneChooser.cs │ ├── RuneChooser.resx │ ├── SmartRunemaker.csproj │ ├── app.config │ └── icon.ico ├── Smart Team Marker │ ├── GetCharacters.Designer.cs │ ├── GetCharacters.cs │ ├── GetCharacters.resx │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SmartTeamMarker.csproj │ └── app.config ├── Smart Update Test │ ├── My Project │ │ ├── Application.Designer.vb │ │ ├── AssemblyInfo.vb │ │ ├── Resources.Designer.vb │ │ ├── Resources.resx │ │ ├── Settings.Designer.vb │ │ ├── Settings.settings │ │ └── app.manifest │ ├── Smart Update Test.vbproj │ ├── app.config │ ├── frmBattlelist.Designer.vb │ ├── frmBattlelist.resx │ ├── frmBattlelist.vb │ ├── frmClient.Designer.vb │ ├── frmClient.resx │ ├── frmClient.vb │ ├── frmContextMenu.Designer.vb │ ├── frmContextMenu.resx │ ├── frmContextMenu.vb │ ├── frmHotkey.Designer.vb │ ├── frmHotkey.resx │ ├── frmHotkey.vb │ ├── frmIcon.Designer.vb │ ├── frmIcon.resx │ ├── frmIcon.vb │ ├── frmInventory.Designer.vb │ ├── frmInventory.resx │ ├── frmInventory.vb │ ├── frmMain.Designer.vb │ ├── frmMain.resx │ ├── frmMain.vb │ ├── frmMap.Designer.vb │ ├── frmMap.resx │ ├── frmMap.vb │ ├── frmPackets.Designer.vb │ ├── frmPackets.resx │ ├── frmPackets.vb │ ├── frmPlayer.Designer.vb │ ├── frmPlayer.resx │ ├── frmPlayer.vb │ ├── frmScreen.Designer.vb │ ├── frmScreen.resx │ ├── frmScreen.vb │ ├── frmSkin.Designer.vb │ ├── frmSkin.resx │ ├── frmSkin.vb │ ├── frmVIP.Designer.vb │ ├── frmVIP.resx │ ├── frmVIP.vb │ └── mdlObjects.vb ├── SmartDataGenerator │ ├── ItemReader.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── SmartDataGenerator.csproj │ ├── app.config │ ├── footer.txt │ ├── footertiles.txt │ ├── items.otb │ ├── items.xml │ ├── uxMain.Designer.cs │ ├── uxMain.cs │ └── uxMain.resx └── TestSuite │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── TestSuite.csproj │ ├── TibiaAPI_Inject.dll │ └── app.config ├── documentation ├── Doxygen.conf ├── _a_star_path_finder_8cs.html ├── _add_context_menu_packet_8cs.html ├── _addresses_2_battle_list_8cs.html ├── _addresses_2_client_8cs.html ├── _addresses_2_container_8cs.html ├── _addresses_2_creature_8cs.html ├── _addresses_2_hotkey_8cs.html ├── _addresses_2_map_8cs.html ├── _addresses_2_player_8cs.html ├── _addresses_2_vip_8cs.html ├── _adler_checksum_8cs.html ├── _animated_text_packet_8cs.html ├── _assembly_info_8cs.html ├── _attack_packet_8cs.html ├── _auto_walk_cancel_packet_8cs.html ├── _auto_walk_packet_8cs.html ├── _big_integer_8cs.html ├── _calculate_8cs.html ├── _can_report_bugs_packet_8cs.html ├── _cancel_move_packet_8cs.html ├── _cancel_target_packet_8cs.html ├── _channel_close_packet_8cs.html ├── _channel_close_private_packet_8cs.html ├── _channel_open_private_packet_8cs.html ├── _client_8_dll_helper_8cs.html ├── _client_8_i_o_helper_8cs.html ├── _client_8_input_helper_8cs.html ├── _client_8_login_helper_8cs.html ├── _client_8_memory_helper_8cs.html ├── _client_8_window_helper_8cs.html ├── _client_chooser_8_designer_8cs.html ├── _client_chooser_8cs.html ├── _client_chooser_base_8cs.html ├── _client_chooser_options_8cs.html ├── _client_chooser_w_p_f_8g_8cs.html ├── _client_chooser_w_p_f_8xaml_8cs.html ├── _console_8cs.html ├── _constants_2_enums_8cs.html ├── _container_add_item_packet_8cs.html ├── _container_open_packet_8cs.html ├── _container_open_parent_packet_8cs.html ├── _container_remove_item_packet_8cs.html ├── _container_update_item_packet_8cs.html ├── _context_menu_8cs.html ├── _context_menus_8cs.html ├── _creature_health_packet_8cs.html ├── _creature_light_packet_8cs.html ├── _creature_move_packet_8cs.html ├── _creature_outfit_packet_8cs.html ├── _creature_skull_packet_8cs.html ├── _creature_speech_packet_8cs.html ├── _creature_speed_packet_8cs.html ├── _creature_square_packet_8cs.html ├── _dat_item_8cs.html ├── _death_packet_8cs.html ├── _display_creature_text_packet_8cs.html ├── _display_text_packet_8cs.html ├── _event_trigger_packet_8cs.html ├── _exceptions_2_misc_8cs.html ├── _exceptions_2_version_8cs.html ├── _extensions_8cs.html ├── _f_y_i_message_packet_8cs.html ├── _fight_modes_packet_8cs.html ├── _floor_change_down_packet_8cs.html ├── _floor_change_up_packet_8cs.html ├── _follow_packet_8cs.html ├── _game_server_connection_8cs.html ├── _game_server_request_packet_8cs.html ├── _guild_8cs.html ├── _hook_proxy_8cs.html ├── _hook_send_to_server_packet_8cs.html ├── _hooks_8cs.html ├── _hooks_enable_disable_packet_8cs.html ├── _incoming_2_channel_list_packet_8cs.html ├── _incoming_2_channel_open_packet_8cs.html ├── _incoming_2_container_close_packet_8cs.html ├── _incoming_2_ping_packet_8cs.html ├── _incoming_2_tile_update_packet_8cs.html ├── _incoming_packet_8cs.html ├── _inventory_8cs.html ├── _inventory_reset_slot_packet_8cs.html ├── _inventory_set_slot_packet_8cs.html ├── _item_8cs.html ├── _item_lists_8cs.html ├── _item_move_packet_8cs.html ├── _item_rotate_packet_8cs.html ├── _item_text_window_packet_8cs.html ├── _item_use_battlelist_packet_8cs.html ├── _item_use_on_packet_8cs.html ├── _item_use_packet_8cs.html ├── _items_8cs.html ├── _keyboard_hook_8cs.html ├── _location_8cs.html ├── _login_server_connection_8cs.html ├── _login_server_request_packet_8cs.html ├── _logout_packet_8cs.html ├── _look_at_packet_8cs.html ├── _lookup_player_8cs.html ├── _magic_effect_packet_8cs.html ├── _map_description_packet_8cs.html ├── _map_merger_8cs.html ├── _map_packet_8cs.html ├── _map_viewer_8cs.html ├── _memory_8cs.html ├── _mouse_hook_8cs.html ├── _move_east_packet_8cs.html ├── _move_north_packet_8cs.html ├── _move_packet_8cs.html ├── _move_south_packet_8cs.html ├── _move_west_packet_8cs.html ├── _network_message_8cs.html ├── _npc_channel_close_packet_8cs.html ├── _objects_2_battle_list_8cs.html ├── _objects_2_client_8cs.html ├── _objects_2_container_8cs.html ├── _objects_2_creature_8cs.html ├── _objects_2_hotkey_8cs.html ├── _objects_2_map_8cs.html ├── _objects_2_player_8cs.html ├── _objects_2_vip_8cs.html ├── _on_click_context_menu_packet_8cs.html ├── _outfit_8cs.html ├── _outfit_window_packet_8cs.html ├── _outgoing_2_channel_list_packet_8cs.html ├── _outgoing_2_channel_open_packet_8cs.html ├── _outgoing_2_container_close_packet_8cs.html ├── _outgoing_2_ping_packet_8cs.html ├── _outgoing_2_tile_update_packet_8cs.html ├── _outgoing_packet_8cs.html ├── _packet_8cs.html ├── _packets_2_enums_8cs.html ├── _pipe_8cs.html ├── _pipe_packet_8cs.html ├── _player_flags_packet_8cs.html ├── _player_skills_packet_8cs.html ├── _player_speech_packet_8cs.html ├── _player_status_packet_8cs.html ├── _player_walk_cancel_packet_8cs.html ├── _private_channel_create_packet_8cs.html ├── _private_channel_open_packet_8cs.html ├── _projectile_packet_8cs.html ├── _proxy_8cs.html ├── _proxy_base_8cs.html ├── _raw_socket_8cs.html ├── _remove_all_context_menus_packet_8cs.html ├── _remove_all_text_packet_8cs.html ├── _remove_context_menu_packet_8cs.html ├── _remove_creature_text_packet_8cs.html ├── _remove_text_packet_8cs.html ├── _resources_8_designer_8cs.html ├── _rsa_8cs.html ├── _rule_violation_cancel_packet_8cs.html ├── _rule_violation_lock_packet_8cs.html ├── _rule_violation_open_packet_8cs.html ├── _rule_violation_remove_packet_8cs.html ├── _safe_trade_close_packet_8cs.html ├── _safe_trade_request_ack_packet_8cs.html ├── _safe_trade_request_no_ack_packet_8cs.html ├── _scheduler_8cs.html ├── _screen_8cs.html ├── _self_appear_packet_8cs.html ├── _set_constant_packet_8cs.html ├── _set_outfit_packet_8cs.html ├── _shop_buy_packet_8cs.html ├── _shop_close_packet_8cs.html ├── _shop_sale_gold_count_packet_8cs.html ├── _shop_sell_packet_8cs.html ├── _shop_window_close_packet_8cs.html ├── _shop_window_open_packet_8cs.html ├── _spell_8cs.html ├── _spells_8cs.html ├── _sprite_reader_8cs.html ├── _structures_8cs.html ├── _t_a_constants_8cs.html ├── _text_display_8cs.html ├── _text_message_packet_8cs.html ├── _tile_8cs.html ├── _tile_add_thing_packet_8cs.html ├── _tile_remove_thing_packet_8cs.html ├── _tile_transform_thing_packet_8cs.html ├── _tiles_8cs.html ├── _timer_8cs.html ├── _turn_packet_8cs.html ├── _update_creature_text_packet_8cs.html ├── _util_2_misc_8cs.html ├── _util_2_version_8cs.html ├── _vip_add_packet_8cs.html ├── _vip_list_8cs.html ├── _vip_login_packet_8cs.html ├── _vip_logout_packet_8cs.html ├── _vip_remove_packet_8cs.html ├── _vip_state_packet_8cs.html ├── _waiting_list_packet_8cs.html ├── _website_8cs.html ├── _who_is_online_8cs.html ├── _win_api_8cs.html ├── _world_light_packet_8cs.html ├── _xtea_8cs.html ├── annotated.html ├── class_tibia_1_1_addresses_1_1_battle_list-members.html ├── class_tibia_1_1_addresses_1_1_battle_list.html ├── class_tibia_1_1_addresses_1_1_client-members.html ├── class_tibia_1_1_addresses_1_1_client.html ├── class_tibia_1_1_addresses_1_1_container-members.html ├── class_tibia_1_1_addresses_1_1_container.html ├── class_tibia_1_1_addresses_1_1_creature-members.html ├── class_tibia_1_1_addresses_1_1_creature.html ├── class_tibia_1_1_addresses_1_1_dat_item-members.html ├── class_tibia_1_1_addresses_1_1_dat_item.html ├── class_tibia_1_1_addresses_1_1_hotkey-members.html ├── class_tibia_1_1_addresses_1_1_hotkey.html ├── class_tibia_1_1_addresses_1_1_map-members.html ├── class_tibia_1_1_addresses_1_1_map.html ├── class_tibia_1_1_addresses_1_1_player-members.html ├── class_tibia_1_1_addresses_1_1_player.html ├── class_tibia_1_1_addresses_1_1_vip-members.html ├── class_tibia_1_1_addresses_1_1_vip.html ├── class_tibia_1_1_calculate-members.html ├── class_tibia_1_1_calculate.html ├── class_tibia_1_1_clientless_1_1_game_server_connection-members.html ├── class_tibia_1_1_clientless_1_1_game_server_connection.html ├── class_tibia_1_1_clientless_1_1_login_server_connection-members.html ├── class_tibia_1_1_clientless_1_1_login_server_connection.html ├── class_tibia_1_1_constants_1_1_item_lists-members.html ├── class_tibia_1_1_constants_1_1_item_lists.html ├── class_tibia_1_1_constants_1_1_items-members.html ├── class_tibia_1_1_constants_1_1_items.html ├── class_tibia_1_1_constants_1_1_items_1_1_ammunition-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_ammunition.html ├── class_tibia_1_1_constants_1_1_items_1_1_boots-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_boots.html ├── class_tibia_1_1_constants_1_1_items_1_1_bottle-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_bottle.html ├── class_tibia_1_1_constants_1_1_items_1_1_container-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_container.html ├── class_tibia_1_1_constants_1_1_items_1_1_fluid-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_fluid.html ├── class_tibia_1_1_constants_1_1_items_1_1_food-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_food.html ├── class_tibia_1_1_constants_1_1_items_1_1_neck-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_neck.html ├── class_tibia_1_1_constants_1_1_items_1_1_potion-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_potion.html ├── class_tibia_1_1_constants_1_1_items_1_1_quest-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_quest.html ├── class_tibia_1_1_constants_1_1_items_1_1_ring-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_ring.html ├── class_tibia_1_1_constants_1_1_items_1_1_rune-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_rune.html ├── class_tibia_1_1_constants_1_1_items_1_1_tool-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_tool.html ├── class_tibia_1_1_constants_1_1_items_1_1_valuable-members.html ├── class_tibia_1_1_constants_1_1_items_1_1_valuable.html ├── class_tibia_1_1_constants_1_1_light_color-members.html ├── class_tibia_1_1_constants_1_1_light_color.html ├── class_tibia_1_1_constants_1_1_light_size-members.html ├── class_tibia_1_1_constants_1_1_light_size.html ├── class_tibia_1_1_constants_1_1_outfit_color-members.html ├── class_tibia_1_1_constants_1_1_outfit_color.html ├── class_tibia_1_1_constants_1_1_r_s_a_key-members.html ├── class_tibia_1_1_constants_1_1_r_s_a_key.html ├── class_tibia_1_1_constants_1_1_spells-members.html ├── class_tibia_1_1_constants_1_1_spells.html ├── class_tibia_1_1_constants_1_1_t_a_constants-members.html ├── class_tibia_1_1_constants_1_1_t_a_constants.html ├── class_tibia_1_1_constants_1_1_tiles.html ├── class_tibia_1_1_constants_1_1_tiles_1_1_closed_holes-members.html ├── class_tibia_1_1_constants_1_1_tiles_1_1_closed_holes.html ├── class_tibia_1_1_constants_1_1_tiles_1_1_down-members.html ├── class_tibia_1_1_constants_1_1_tiles_1_1_down.html ├── class_tibia_1_1_constants_1_1_tiles_1_1_up-members.html ├── class_tibia_1_1_constants_1_1_tiles_1_1_up.html ├── class_tibia_1_1_constants_1_1_tiles_1_1_water-members.html ├── class_tibia_1_1_constants_1_1_tiles_1_1_water.html ├── class_tibia_1_1_exceptions_1_1_assert-members.html ├── class_tibia_1_1_exceptions_1_1_assert.html ├── class_tibia_1_1_exceptions_1_1_handler-members.html ├── class_tibia_1_1_exceptions_1_1_handler.html ├── class_tibia_1_1_exceptions_1_1_inject_d_l_l_not_found_exception.html ├── class_tibia_1_1_exceptions_1_1_not_logged_in_exception.html ├── class_tibia_1_1_exceptions_1_1_packet_dll_not_found_exception.html ├── class_tibia_1_1_exceptions_1_1_proxy_disconnected_exception.html ├── class_tibia_1_1_exceptions_1_1_proxy_required_exception.html ├── class_tibia_1_1_exceptions_1_1_version_not_supported_exception-members.html ├── class_tibia_1_1_exceptions_1_1_version_not_supported_exception.html ├── class_tibia_1_1_extensions-members.html ├── class_tibia_1_1_extensions.html ├── class_tibia_1_1_hooks-members.html ├── class_tibia_1_1_hooks.html ├── class_tibia_1_1_keyboard_hook-members.html ├── class_tibia_1_1_keyboard_hook.html ├── class_tibia_1_1_misc-members.html ├── class_tibia_1_1_misc.html ├── class_tibia_1_1_mouse_hook-members.html ├── class_tibia_1_1_mouse_hook.html ├── class_tibia_1_1_objects_1_1_battle_list-members.html ├── class_tibia_1_1_objects_1_1_battle_list.html ├── class_tibia_1_1_objects_1_1_client-members.html ├── class_tibia_1_1_objects_1_1_client.html ├── class_tibia_1_1_objects_1_1_client_1_1_dll_helper-members.html ├── class_tibia_1_1_objects_1_1_client_1_1_dll_helper.html ├── class_tibia_1_1_objects_1_1_client_1_1_i_o_helper-members.html ├── class_tibia_1_1_objects_1_1_client_1_1_i_o_helper.html ├── class_tibia_1_1_objects_1_1_client_1_1_input_helper-members.html ├── class_tibia_1_1_objects_1_1_client_1_1_input_helper.html ├── class_tibia_1_1_objects_1_1_client_1_1_login_helper-members.html ├── class_tibia_1_1_objects_1_1_client_1_1_login_helper.html ├── class_tibia_1_1_objects_1_1_client_1_1_memory_helper-members.html ├── class_tibia_1_1_objects_1_1_client_1_1_memory_helper.html ├── class_tibia_1_1_objects_1_1_client_1_1_window_helper-members.html ├── class_tibia_1_1_objects_1_1_client_1_1_window_helper.html ├── class_tibia_1_1_objects_1_1_console-members.html ├── class_tibia_1_1_objects_1_1_console.html ├── class_tibia_1_1_objects_1_1_container-members.html ├── class_tibia_1_1_objects_1_1_container.html ├── class_tibia_1_1_objects_1_1_context_menu-members.html ├── class_tibia_1_1_objects_1_1_context_menu.html ├── class_tibia_1_1_objects_1_1_creature-members.html ├── class_tibia_1_1_objects_1_1_creature.html ├── class_tibia_1_1_objects_1_1_food-members.html ├── class_tibia_1_1_objects_1_1_food.html ├── class_tibia_1_1_objects_1_1_hotkey-members.html ├── class_tibia_1_1_objects_1_1_hotkey.html ├── class_tibia_1_1_objects_1_1_inventory-members.html ├── class_tibia_1_1_objects_1_1_inventory.html ├── class_tibia_1_1_objects_1_1_item-members.html ├── class_tibia_1_1_objects_1_1_item.html ├── class_tibia_1_1_objects_1_1_item_location-members.html ├── class_tibia_1_1_objects_1_1_item_location.html ├── class_tibia_1_1_objects_1_1_login_server-members.html ├── class_tibia_1_1_objects_1_1_login_server.html ├── class_tibia_1_1_objects_1_1_map-members.html ├── class_tibia_1_1_objects_1_1_map.html ├── class_tibia_1_1_objects_1_1_outfit-members.html ├── class_tibia_1_1_objects_1_1_outfit.html ├── class_tibia_1_1_objects_1_1_player-members.html ├── class_tibia_1_1_objects_1_1_player.html ├── class_tibia_1_1_objects_1_1_rune-members.html ├── class_tibia_1_1_objects_1_1_rune.html ├── class_tibia_1_1_objects_1_1_screen-members.html ├── class_tibia_1_1_objects_1_1_screen.html ├── class_tibia_1_1_objects_1_1_spell-members.html ├── class_tibia_1_1_objects_1_1_spell.html ├── class_tibia_1_1_objects_1_1_spell_list-members.html ├── class_tibia_1_1_objects_1_1_spell_list.html ├── class_tibia_1_1_objects_1_1_tile-members.html ├── class_tibia_1_1_objects_1_1_tile.html ├── class_tibia_1_1_objects_1_1_tile_object-members.html ├── class_tibia_1_1_objects_1_1_tile_object.html ├── class_tibia_1_1_objects_1_1_transforming_item-members.html ├── class_tibia_1_1_objects_1_1_transforming_item.html ├── class_tibia_1_1_objects_1_1_vip-members.html ├── class_tibia_1_1_objects_1_1_vip.html ├── class_tibia_1_1_objects_1_1_vip_list-members.html ├── class_tibia_1_1_objects_1_1_vip_list.html ├── class_tibia_1_1_packets_1_1_adler_checksum-members.html ├── class_tibia_1_1_packets_1_1_adler_checksum.html ├── class_tibia_1_1_packets_1_1_avalible_outfit-members.html ├── class_tibia_1_1_packets_1_1_avalible_outfit.html ├── class_tibia_1_1_packets_1_1_hook_proxy-members.html ├── class_tibia_1_1_packets_1_1_hook_proxy.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_animated_text_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_animated_text_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_can_report_bugs_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_can_report_bugs_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_cancel_target_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_cancel_target_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_channel_close_private_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_channel_close_private_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_channel_list_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_channel_list_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_channel_open_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_channel_open_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_channel_open_private_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_channel_open_private_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_add_item_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_add_item_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_close_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_close_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_open_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_open_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_remove_item_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_remove_item_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_update_item_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_container_update_item_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_health_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_health_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_light_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_light_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_move_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_move_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_outfit_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_outfit_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_skull_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_skull_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_speech_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_speech_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_speed_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_speed_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_square_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_creature_square_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_death_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_death_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_floor_change_down_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_floor_change_down_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_floor_change_up_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_floor_change_up_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_fyi_message_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_fyi_message_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_inventory_reset_slot_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_inventory_reset_slot_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_inventory_set_slot_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_inventory_set_slot_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_item_text_window_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_item_text_window_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_magic_effect_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_magic_effect_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_map_description_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_map_description_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_map_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_map_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_move_east_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_move_east_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_move_north_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_move_north_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_move_south_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_move_south_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_move_west_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_move_west_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_outfit_window_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_outfit_window_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_ping_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_ping_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_player_flags_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_player_flags_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_player_skills_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_player_skills_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_player_status_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_player_status_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_player_walk_cancel_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_player_walk_cancel_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_private_channel_create_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_private_channel_create_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_projectile_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_projectile_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_rule_violation_cancel_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_rule_violation_cancel_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_rule_violation_lock_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_rule_violation_lock_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_rule_violation_open_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_rule_violation_open_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_rule_violation_remove_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_rule_violation_remove_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_safe_trade_close_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_safe_trade_close_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_safe_trade_request_ack_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_safe_trade_request_ack_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_safe_trade_request_no_ack_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_safe_trade_request_no_ack_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_self_appear_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_self_appear_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_shop_sale_gold_count_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_shop_sale_gold_count_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_shop_window_close_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_shop_window_close_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_shop_window_open_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_shop_window_open_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_text_message_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_text_message_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_tile_add_thing_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_tile_add_thing_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_tile_remove_thing_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_tile_remove_thing_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_tile_transform_thing_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_tile_transform_thing_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_tile_update_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_tile_update_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_vip_login_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_vip_login_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_vip_logout_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_vip_logout_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_vip_state_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_vip_state_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_waiting_list_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_waiting_list_packet.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_world_light_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_1_1_world_light_packet.html ├── class_tibia_1_1_packets_1_1_incoming_packet-members.html ├── class_tibia_1_1_packets_1_1_incoming_packet.html ├── class_tibia_1_1_packets_1_1_network_message-members.html ├── class_tibia_1_1_packets_1_1_network_message.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_attack_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_attack_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_auto_walk_cancel_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_auto_walk_cancel_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_auto_walk_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_auto_walk_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_cancel_move_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_cancel_move_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_channel_close_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_channel_close_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_channel_list_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_channel_list_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_channel_open_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_channel_open_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_container_close_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_container_close_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_container_open_parent_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_container_open_parent_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_fight_modes_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_fight_modes_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_follow_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_follow_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_move_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_move_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_rotate_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_rotate_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_use_battlelist_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_use_battlelist_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_use_on_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_use_on_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_use_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_item_use_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_logout_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_logout_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_look_at_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_look_at_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_move_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_move_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_npc_channel_close_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_npc_channel_close_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_ping_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_ping_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_player_speech_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_player_speech_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_private_channel_open_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_private_channel_open_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_set_outfit_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_set_outfit_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_shop_buy_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_shop_buy_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_shop_close_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_shop_close_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_shop_sell_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_shop_sell_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_tile_update_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_tile_update_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_turn_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_turn_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_vip_add_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_vip_add_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_vip_remove_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_1_1_vip_remove_packet.html ├── class_tibia_1_1_packets_1_1_outgoing_packet-members.html ├── class_tibia_1_1_packets_1_1_outgoing_packet.html ├── class_tibia_1_1_packets_1_1_packet-members.html ├── class_tibia_1_1_packets_1_1_packet.html ├── class_tibia_1_1_packets_1_1_packet_creature-members.html ├── class_tibia_1_1_packets_1_1_packet_creature.html ├── class_tibia_1_1_packets_1_1_pipe-members.html ├── class_tibia_1_1_packets_1_1_pipe.html ├── class_tibia_1_1_packets_1_1_pipe_packet-members.html ├── class_tibia_1_1_packets_1_1_pipe_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_add_context_menu_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_add_context_menu_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_display_creature_text_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_display_creature_text_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_display_text_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_display_text_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_event_trigger_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_event_trigger_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_hook_send_to_server_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_hook_send_to_server_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_hooks_enable_disable_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_hooks_enable_disable_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_on_click_context_menu_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_on_click_context_menu_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_all_context_menus_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_all_context_menus_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_all_text_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_all_text_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_context_menu_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_context_menu_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_creature_text_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_creature_text_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_text_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_remove_text_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_set_constant_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_set_constant_packet.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_update_creature_text_packet-members.html ├── class_tibia_1_1_packets_1_1_pipes_1_1_update_creature_text_packet.html ├── class_tibia_1_1_packets_1_1_proxy-members.html ├── class_tibia_1_1_packets_1_1_proxy.html ├── class_tibia_1_1_packets_1_1_proxy_base-members.html ├── class_tibia_1_1_packets_1_1_proxy_base.html ├── class_tibia_1_1_packets_1_1_r_s_a_1_1_game_server_request_packet-members.html ├── class_tibia_1_1_packets_1_1_r_s_a_1_1_game_server_request_packet.html ├── class_tibia_1_1_packets_1_1_r_s_a_1_1_login_server_request_packet-members.html ├── class_tibia_1_1_packets_1_1_r_s_a_1_1_login_server_request_packet.html ├── class_tibia_1_1_packets_1_1_rsa-members.html ├── class_tibia_1_1_packets_1_1_rsa.html ├── class_tibia_1_1_packets_1_1_shop_info-members.html ├── class_tibia_1_1_packets_1_1_shop_info.html ├── class_tibia_1_1_packets_1_1_xtea-members.html ├── class_tibia_1_1_packets_1_1_xtea.html ├── class_tibia_1_1_properties_1_1_resources-members.html ├── class_tibia_1_1_properties_1_1_resources.html ├── class_tibia_1_1_util_1_1_a_star_path_finder-members.html ├── class_tibia_1_1_util_1_1_a_star_path_finder.html ├── class_tibia_1_1_util_1_1_big_integer-members.html ├── class_tibia_1_1_util_1_1_big_integer.html ├── class_tibia_1_1_util_1_1_client_chooser-members.html ├── class_tibia_1_1_util_1_1_client_chooser.html ├── class_tibia_1_1_util_1_1_client_chooser_base-members.html ├── class_tibia_1_1_util_1_1_client_chooser_base.html ├── class_tibia_1_1_util_1_1_client_chooser_options-members.html ├── class_tibia_1_1_util_1_1_client_chooser_options.html ├── class_tibia_1_1_util_1_1_client_chooser_w_p_f-members.html ├── class_tibia_1_1_util_1_1_client_chooser_w_p_f.html ├── class_tibia_1_1_util_1_1_map_merger-members.html ├── class_tibia_1_1_util_1_1_map_merger.html ├── class_tibia_1_1_util_1_1_map_viewer-members.html ├── class_tibia_1_1_util_1_1_map_viewer.html ├── class_tibia_1_1_util_1_1_map_viewer_1_1_map_marker-members.html ├── class_tibia_1_1_util_1_1_map_viewer_1_1_map_marker.html ├── class_tibia_1_1_util_1_1_memory-members.html ├── class_tibia_1_1_util_1_1_memory.html ├── class_tibia_1_1_util_1_1_scheduler-members.html ├── class_tibia_1_1_util_1_1_scheduler.html ├── class_tibia_1_1_util_1_1_sprite_reader-members.html ├── class_tibia_1_1_util_1_1_sprite_reader.html ├── class_tibia_1_1_util_1_1_timer-members.html ├── class_tibia_1_1_util_1_1_timer.html ├── class_tibia_1_1_util_1_1_win_api-members.html ├── class_tibia_1_1_util_1_1_win_api.html ├── class_tibia_1_1_version-members.html ├── class_tibia_1_1_version.html ├── class_tibia_1_1_website-members.html ├── class_tibia_1_1_website.html ├── class_tibia_1_1_website_1_1_char_death-members.html ├── class_tibia_1_1_website_1_1_char_death.html ├── class_tibia_1_1_website_1_1_char_info-members.html ├── class_tibia_1_1_website_1_1_char_info.html ├── class_tibia_1_1_website_1_1_char_online-members.html ├── class_tibia_1_1_website_1_1_char_online.html ├── classes.html ├── closed.gif ├── doxygen.css ├── doxygen.png ├── files.html ├── functions.html ├── functions_0x62.html ├── functions_0x63.html ├── functions_0x64.html ├── functions_0x65.html ├── functions_0x66.html ├── functions_0x67.html ├── functions_0x68.html ├── functions_0x69.html ├── functions_0x6a.html ├── functions_0x6b.html ├── functions_0x6c.html ├── functions_0x6d.html ├── functions_0x6e.html ├── functions_0x6f.html ├── functions_0x70.html ├── functions_0x71.html ├── functions_0x72.html ├── functions_0x73.html ├── functions_0x74.html ├── functions_0x75.html ├── functions_0x76.html ├── functions_0x77.html ├── functions_0x78.html ├── functions_0x79.html ├── functions_0x7a.html ├── functions_enum.html ├── functions_evnt.html ├── functions_func.html ├── functions_func_0x62.html ├── functions_func_0x63.html ├── functions_func_0x64.html ├── functions_func_0x65.html ├── functions_func_0x66.html ├── functions_func_0x67.html ├── functions_func_0x68.html ├── functions_func_0x69.html ├── functions_func_0x6a.html ├── functions_func_0x6b.html ├── functions_func_0x6c.html ├── functions_func_0x6d.html ├── functions_func_0x6e.html ├── functions_func_0x6f.html ├── functions_func_0x70.html ├── functions_func_0x72.html ├── functions_func_0x73.html ├── functions_func_0x74.html ├── functions_func_0x75.html ├── functions_func_0x76.html ├── functions_func_0x77.html ├── functions_func_0x78.html ├── functions_func_0x7a.html ├── functions_prop.html ├── functions_prop_0x62.html ├── functions_prop_0x63.html ├── functions_prop_0x64.html ├── functions_prop_0x65.html ├── functions_prop_0x66.html ├── functions_prop_0x67.html ├── functions_prop_0x68.html ├── functions_prop_0x69.html ├── functions_prop_0x6c.html ├── functions_prop_0x6d.html ├── functions_prop_0x6e.html ├── functions_prop_0x6f.html ├── functions_prop_0x70.html ├── functions_prop_0x72.html ├── functions_prop_0x73.html ├── functions_prop_0x74.html ├── functions_prop_0x75.html ├── functions_prop_0x76.html ├── functions_prop_0x77.html ├── functions_prop_0x78.html ├── functions_prop_0x79.html ├── functions_prop_0x7a.html ├── functions_vars.html ├── functions_vars_0x62.html ├── functions_vars_0x63.html ├── functions_vars_0x64.html ├── functions_vars_0x65.html ├── functions_vars_0x66.html ├── functions_vars_0x67.html ├── functions_vars_0x68.html ├── functions_vars_0x69.html ├── functions_vars_0x6b.html ├── functions_vars_0x6c.html ├── functions_vars_0x6d.html ├── functions_vars_0x6e.html ├── functions_vars_0x6f.html ├── functions_vars_0x70.html ├── functions_vars_0x71.html ├── functions_vars_0x72.html ├── functions_vars_0x73.html ├── functions_vars_0x74.html ├── functions_vars_0x75.html ├── functions_vars_0x76.html ├── functions_vars_0x77.html ├── functions_vars_0x78.html ├── functions_vars_0x79.html ├── functions_vars_0x7a.html ├── globals.html ├── globals_vars.html ├── hierarchy.html ├── index.html ├── namespace_tibia.html ├── namespace_tibia_1_1_addresses.html ├── namespace_tibia_1_1_clientless.html ├── namespace_tibia_1_1_constants.html ├── namespace_tibia_1_1_exceptions.html ├── namespace_tibia_1_1_objects.html ├── namespace_tibia_1_1_packets.html ├── namespace_tibia_1_1_packets_1_1_incoming.html ├── namespace_tibia_1_1_packets_1_1_outgoing.html ├── namespace_tibia_1_1_packets_1_1_pipes.html ├── namespace_tibia_1_1_packets_1_1_r_s_a.html ├── namespace_tibia_1_1_properties.html ├── namespace_tibia_1_1_util.html ├── namespacemembers.html ├── namespacemembers_enum.html ├── namespaces.html ├── open.gif ├── proxy-flow-chart.png ├── struct_tibia_1_1_objects_1_1_channel-members.html ├── struct_tibia_1_1_objects_1_1_channel.html ├── struct_tibia_1_1_objects_1_1_character_login_info-members.html ├── struct_tibia_1_1_objects_1_1_character_login_info.html ├── struct_tibia_1_1_objects_1_1_chat_message-members.html ├── struct_tibia_1_1_objects_1_1_chat_message.html ├── struct_tibia_1_1_objects_1_1_client_path_info-members.html ├── struct_tibia_1_1_objects_1_1_client_path_info.html ├── struct_tibia_1_1_objects_1_1_location-members.html ├── struct_tibia_1_1_objects_1_1_location.html ├── struct_tibia_1_1_objects_1_1_rect-members.html ├── struct_tibia_1_1_objects_1_1_rect.html ├── struct_tibia_1_1_util_1_1_win_api_1_1_p_r_o_c_e_s_s___i_n_f_o_r_m_a_t_i_o_n-members.html ├── struct_tibia_1_1_util_1_1_win_api_1_1_p_r_o_c_e_s_s___i_n_f_o_r_m_a_t_i_o_n.html ├── struct_tibia_1_1_util_1_1_win_api_1_1_r_e_c_t-members.html ├── struct_tibia_1_1_util_1_1_win_api_1_1_r_e_c_t.html ├── struct_tibia_1_1_util_1_1_win_api_1_1_s_e_c_u_r_i_t_y___a_t_t_r_i_b_u_t_e_s-members.html ├── struct_tibia_1_1_util_1_1_win_api_1_1_s_e_c_u_r_i_t_y___a_t_t_r_i_b_u_t_e_s.html ├── struct_tibia_1_1_util_1_1_win_api_1_1_s_t_a_r_t_u_p_i_n_f_o-members.html ├── struct_tibia_1_1_util_1_1_win_api_1_1_s_t_a_r_t_u_p_i_n_f_o.html ├── tab_b.gif ├── tab_l.gif ├── tab_r.gif └── tabs.css └── tibiaapi ├── Addresses ├── BattleList.cs ├── Client.cs ├── Container.cs ├── ContextMenus.cs ├── Creature.cs ├── DatItem.cs ├── DrawItem.cs ├── DrawSkin.cs ├── Hotkey.cs ├── Map.cs ├── Player.cs ├── TextDisplay.cs ├── Versions │ ├── Version.cs │ ├── Version800.cs │ ├── Version810and811.cs │ ├── Version820.cs │ ├── Version821.cs │ ├── Version822.cs │ ├── Version831.cs │ ├── Version840.cs │ ├── Version841.cs │ ├── Version842.cs │ ├── Version850.cs │ ├── Version852.cs │ ├── Version853.cs │ ├── Version854.cs │ ├── Version855.cs │ ├── Version857.cs │ ├── Version860.cs │ ├── Version861.cs │ ├── Version862.cs │ ├── Version870.cs │ ├── Version871.cs │ ├── Version872.cs │ ├── Version874.cs │ ├── Version900.cs │ └── Version910.cs └── Vip.cs ├── Clientless ├── GameServerConnection.cs └── LoginServerConnection.cs ├── Constants ├── CreatureLists.cs ├── Creatures.cs ├── Enums.cs ├── ItemDataLists.cs ├── ItemLists.cs ├── Items.cs ├── ItemsData.cs ├── Spells.cs ├── TAConstants.cs ├── TileLists.cs └── Tiles.cs ├── CurrentForumPost.txt ├── Exceptions ├── Misc.cs └── Version.cs ├── InjectedDLL ├── AssemblyInfo.cpp ├── Constants.cpp ├── Constants.h ├── Core.cpp ├── Core.h ├── Injected DLL.vcproj ├── Packet.cpp ├── Packet.h ├── resource.h ├── stdafx.cpp └── stdafx.h ├── Objects ├── BattleList.cs ├── Client.DllHelper.cs ├── Client.IOHelper.cs ├── Client.InputHelper.cs ├── Client.LoginHelper.cs ├── Client.MemoryHelper.cs ├── Client.PlayerHelper.cs ├── Client.WindowHelper.cs ├── Client.cs ├── Console.cs ├── Container.cs ├── ContextMenu.cs ├── Creature.cs ├── CreatureData.cs ├── Hotkey.cs ├── Icon.cs ├── Inventory.cs ├── Item.cs ├── ItemData.cs ├── Location.cs ├── Map.cs ├── Outfit.cs ├── Player.cs ├── Screen.cs ├── Skin.cs ├── Spell.cs ├── Structures.cs ├── Tile.cs ├── Vip.cs └── VipList.cs ├── Packets ├── AdlerChecksum.cs ├── HookProxy.cs ├── Incoming │ ├── AnimatedTextPacket.cs │ ├── CanReportBugsPacket.cs │ ├── CancelTargetPacket.cs │ ├── ChannelClosePrivatePacket.cs │ ├── ChannelListPacket.cs │ ├── ChannelOpenPacket.cs │ ├── ChannelOpenPrivatePacket.cs │ ├── ContainerAddItemPacket.cs │ ├── ContainerClosePacket.cs │ ├── ContainerOpenPacket.cs │ ├── ContainerRemoveItemPacket.cs │ ├── ContainerUpdateItemPacket.cs │ ├── CreatureHealthPacket.cs │ ├── CreatureLightPacket.cs │ ├── CreatureMovePacket.cs │ ├── CreatureOutfitPacket.cs │ ├── CreatureSkullPacket.cs │ ├── CreatureSpeechPacket.cs │ ├── CreatureSpeedPacket.cs │ ├── CreatureSquarePacket.cs │ ├── DeathPacket.cs │ ├── FYIMessagePacket.cs │ ├── FloorChangeDownPacket.cs │ ├── FloorChangeUpPacket.cs │ ├── InventoryResetSlotPacket.cs │ ├── InventorySetSlotPacket.cs │ ├── ItemTextWindowPacket.cs │ ├── MagicEffectPacket.cs │ ├── MapDescriptionPacket.cs │ ├── MapPacket.cs │ ├── MoveEastPacket.cs │ ├── MoveNorthPacket.cs │ ├── MoveSouthPacket.cs │ ├── MoveWestPacket.cs │ ├── OutfitWindowPacket.cs │ ├── PingPacket.cs │ ├── PlayerFlagsPacket.cs │ ├── PlayerSkillsPacket.cs │ ├── PlayerStatusPacket.cs │ ├── PlayerWalkCancelPacket.cs │ ├── PrivateChannelCreatePacket.cs │ ├── ProjectilePacket.cs │ ├── RuleViolationCancelPacket.cs │ ├── RuleViolationLockPacket.cs │ ├── RuleViolationOpenPacket.cs │ ├── RuleViolationRemovePacket.cs │ ├── SafeTradeClosePacket.cs │ ├── SafeTradeRequestAckPacket.cs │ ├── SafeTradeRequestNoAckPacket.cs │ ├── SelfAppearPacket.cs │ ├── ShopSaleGoldCountPacket.cs │ ├── ShopWindowClosePacket.cs │ ├── ShopWindowOpenPacket.cs │ ├── TextMessagePacket.cs │ ├── TileAddThingPacket.cs │ ├── TileRemoveThingPacket.cs │ ├── TileTransformThingPacket.cs │ ├── TileUpdatePacket.cs │ ├── VipLoginPacket.cs │ ├── VipLogoutPacket.cs │ ├── VipStatePacket.cs │ ├── WaitingListPacket.cs │ └── WorldLightPacket.cs ├── IncomingPacket.cs ├── NetworkMessage.cs ├── Outgoing │ ├── AttackPacket.cs │ ├── AutoWalkCancelPacket.cs │ ├── AutoWalkPacket.cs │ ├── CancelMovePacket.cs │ ├── ChannelClosePacket.cs │ ├── ChannelListPacket.cs │ ├── ChannelOpenPacket.cs │ ├── ContainerClosePacket.cs │ ├── ContainerOpenParentPacket.cs │ ├── FightModesPacket.cs │ ├── FollowPacket.cs │ ├── ItemMovePacket.cs │ ├── ItemRotatePacket.cs │ ├── ItemUseBattlelistPacket.cs │ ├── ItemUseOnPacket.cs │ ├── ItemUsePacket.cs │ ├── LogoutPacket.cs │ ├── LookAtPacket.cs │ ├── MovePacket.cs │ ├── NpcChannelClosePacket.cs │ ├── PingPacket.cs │ ├── PlayerSpeechPacket.cs │ ├── PrivateChannelOpenPacket.cs │ ├── SetOutfitPacket.cs │ ├── ShopBuyPacket.cs │ ├── ShopClosePacket.cs │ ├── ShopSellPacket.cs │ ├── TileUpdatePacket.cs │ ├── TurnPacket.cs │ ├── VipAddPacket.cs │ └── VipRemovePacket.cs ├── OutgoingPacket.cs ├── Packet.cs ├── Pipe.cs ├── PipePacket.cs ├── Pipes │ ├── AddContextMenuPacket.cs │ ├── AddIconPacket.cs │ ├── AddSkinPacket.cs │ ├── DisplayCreatureTextPacket.cs │ ├── DisplayTextPacket.cs │ ├── EventTriggerPacket.cs │ ├── HookSendToServerPacket.cs │ ├── HooksEnableDisablePacket.cs │ ├── OnClickContextMenuPacket.cs │ ├── OnClickIcon.cs │ ├── RemoveAllContextMenusPacket.cs │ ├── RemoveAllIconsPacket.cs │ ├── RemoveAllSkinsPacket.cs │ ├── RemoveAllTextPacket.cs │ ├── RemoveContextMenuPacket.cs │ ├── RemoveCreatureTextPacket.cs │ ├── RemoveIconPacket.cs │ ├── RemoveSkinPacket.cs │ ├── RemoveTextPacket.cs │ ├── SetConstantPacket.cs │ ├── UpdateCreatureTextPacket.cs │ ├── UpdateIconPacket.cs │ └── UpdateSkinPacket.cs ├── Proxy.cs ├── ProxyBase.cs ├── RSA │ ├── GameServerRequestPacket.cs │ └── LoginServerRequestPacket.cs ├── RawSocket.cs ├── Rsa.cs └── Xtea.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs └── Resources.resx ├── TibiaAPI.csproj ├── TibiaAPI.pfx ├── TibiaAPI.sln ├── Util ├── AStarPathFinder.cs ├── BigInteger.cs ├── Calculate.cs ├── ClientChooser.Designer.cs ├── ClientChooser.cs ├── ClientChooser.resx ├── ClientChooserBase.cs ├── ClientChooserOptions.cs ├── ClientChooserWPF.xaml ├── ClientChooserWPF.xaml.cs ├── CreatureData.cs ├── Extensions.cs ├── FixedCollector.cs ├── Hooks.cs ├── ItemData.cs ├── KeyboardHook.cs ├── MapMerger.cs ├── MapViewer.cs ├── Memory.cs ├── Misc.cs ├── MouseHook.cs ├── Scheduler.cs ├── SpriteReader.cs ├── Timer.cs └── WinApi.cs ├── Website ├── Guild.cs ├── LookupPlayer.cs ├── Website.cs └── WhoIsOnline.cs └── readme.txt /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2007 Ian Obermiller and Hugo Persson 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /apps/Smart AutoLooter/AddAutoLootForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace SmartAutoLooter 11 | { 12 | public partial class AddAutoLootForm : Form 13 | { 14 | public AddAutoLootForm() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | public ushort ItemId 20 | { 21 | get { return (ushort)numericUpDownItemId.Value; } 22 | set { numericUpDownItemId.Value = value; } 23 | } 24 | 25 | public byte ContainerNumber 26 | { 27 | get { return (byte)(numericUpDownContainer.Value - 1); } 28 | set { numericUpDownContainer.Value = value + 1; } 29 | } 30 | 31 | public string Comment 32 | { 33 | get { return textBoxComment.Text; } 34 | set { textBoxComment.Text = value; } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /apps/Smart AutoLooter/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace SmartAutoLooter 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new MainForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/Smart AutoLooter/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Smart AutoLooter")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Smart AutoLooter")] 13 | [assembly: AssemblyCopyright("Copyright © 2008")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2091dd5f-6832-4096-bfd1-7e01faa2b366")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /apps/Smart AutoLooter/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SmartAutoLooter.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/Smart AutoLooter/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/Smart AutoLooter/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/Smart AutoLooter/uxFilterInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace SmartAutoLooter 11 | { 12 | public partial class uxFilterInput : Form 13 | { 14 | public uxFilterInput() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | public int Ratio 20 | { 21 | get { return int.Parse(uxRatio.Text); } 22 | set { uxRatio.Text = value.ToString(); } 23 | } 24 | 25 | public byte ContainerNumber 26 | { 27 | get { return (byte)(numericUpDownContainer.Value - 1); } 28 | set { numericUpDownContainer.Value = value + 1; } 29 | } 30 | 31 | private void uxRatio_KeyPress(object sender, KeyPressEventArgs e) 32 | { 33 | if (e.KeyChar == (char)13) 34 | { 35 | e.Handled = true; 36 | this.DialogResult = DialogResult.OK; 37 | } 38 | else 39 | { 40 | if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), "\\d+")) 41 | { 42 | e.Handled = true; 43 | } 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /apps/Smart IPChanger/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | using System.IO; 5 | using Tibia; 6 | using Tibia.Objects; 7 | using Tibia.Util; 8 | 9 | namespace SmartIPChanger 10 | { 11 | static class Program 12 | { 13 | /// 14 | /// The main entry point for the application. 15 | /// 16 | [STAThread] 17 | static void Main(string[] args) 18 | { 19 | if (args.Length > 0) 20 | { 21 | string server = string.Empty; 22 | string port = string.Empty; 23 | 24 | if (args.Length == 1) 25 | { 26 | server = args[0]; 27 | port = "7171"; 28 | } 29 | else if (args.Length == 2) 30 | { 31 | server = args[0]; 32 | port = args[1]; 33 | } 34 | else 35 | Application.Exit(); 36 | 37 | Client client = ClientChooser.ShowBox(new ClientChooserOptions() { ShowOTOption = false }); 38 | if (client == null) 39 | { 40 | if (File.Exists("tibia.exe")) 41 | client = Client.Open(Application.StartupPath + "\\tibia.exe"); 42 | else 43 | client = Client.Open(); 44 | System.Threading.Thread.Sleep(1000); 45 | } 46 | client.Login.SetOT(server, short.Parse(port)); 47 | return; 48 | } 49 | else 50 | { 51 | Application.EnableVisualStyles(); 52 | Application.SetCompatibleTextRenderingDefault(false); 53 | Application.Run(new MainForm()); 54 | } 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /apps/Smart IPChanger/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Smart IP Changer")] 9 | [assembly: AssemblyDescription("Easily change the server your Tibia client connects to")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("TibiaAPI")] 12 | [assembly: AssemblyProduct("Smart IP Changer")] 13 | [assembly: AssemblyCopyright("Copyright © 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("42eda3f7-b82c-4095-b6c1-e5ee20fb18a7")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /apps/Smart IPChanger/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SmartIPChanger.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/Smart IPChanger/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/Smart IPChanger/SmartIPChanger.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/apps/Smart IPChanger/SmartIPChanger.ico -------------------------------------------------------------------------------- /apps/Smart IPChanger/SmartIPChanger.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartIPChanger", "SmartIPChanger.csproj", "{E0ED1D32-CB91-45EA-A5A5-F846B1D35939}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TibiaAPI", "..\..\tibiaapi\TibiaAPI.csproj", "{4D132EB7-B97D-461D-85CF-949FF5A7BA96}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {E0ED1D32-CB91-45EA-A5A5-F846B1D35939}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {E0ED1D32-CB91-45EA-A5A5-F846B1D35939}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {E0ED1D32-CB91-45EA-A5A5-F846B1D35939}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {E0ED1D32-CB91-45EA-A5A5-F846B1D35939}.Release|Any CPU.Build.0 = Release|Any CPU 18 | {4D132EB7-B97D-461D-85CF-949FF5A7BA96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {4D132EB7-B97D-461D-85CF-949FF5A7BA96}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {4D132EB7-B97D-461D-85CF-949FF5A7BA96}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {4D132EB7-B97D-461D-85CF-949FF5A7BA96}.Release|Any CPU.Build.0 = Release|Any CPU 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /apps/Smart IPChanger/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/Smart IPChanger/readme.txt: -------------------------------------------------------------------------------- 1 | Usage instructions: 2 | 3 | To use the GUI, just run the program as normal. Enter in the server address (ip or domain name) and the server port, and hit Go. If one client is running, it will be modified. If more than one client is running, you will be asked to choose a client. If no clients are running, Smart IP Changer will attempt to start a client and then change its server settings. 4 | 5 | To use via the command line, enter either the server address or the address and port. If one client is running, it will be modified. If more than one client is running, you will be asked to choose a client. If no clients are running, and the program is in the Tibia folder, Smart IP Changer will start that client and then change its server settings. If no Tibia.exe is found, the program will check default locations. 6 | 7 | Example command line usages, to be placed in a shortcut for instance: 8 | 9 | "C:\Program Files\Tibia\SmartIPChanger.exe" radonia.net 10 | "C:\Program Files\Tibia\SmartIPChanger.exe" radonia.net 7171 11 | "C:\Users\Ian\Desktop\SmartIPChanger.exe" radonia.net 12 | "C:\Users\Ian\Desktop\SmartIPChanger.exe" radonia.net 7171 -------------------------------------------------------------------------------- /apps/Smart IPChanger/smartipchanger-icon-source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/apps/Smart IPChanger/smartipchanger-icon-source.png -------------------------------------------------------------------------------- /apps/Smart Locater/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace SmartLocator 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new MainForm()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /apps/Smart Locater/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SmartLocator")] 9 | [assembly: AssemblyDescription("Locates your player on the world Tibia map.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("TibiaAPI")] 12 | [assembly: AssemblyProduct("SmartLocator")] 13 | [assembly: AssemblyCopyright("Copyright © 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b2db6859-0bd6-4b00-a269-c23fc88a848c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /apps/Smart Locater/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SmartLocator.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/Smart Locater/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/Smart Locater/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/Smart Packet Analyzer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace SmartPacketAnalyzer 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new MainForm()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /apps/Smart Packet Analyzer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Smart Packet Analyzer")] 9 | [assembly: AssemblyDescription("A simple packet logger for Tibia.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("TibiaAPI")] 12 | [assembly: AssemblyProduct("Smart Packet Analyzer")] 13 | [assembly: AssemblyCopyright("Copyright © 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("411bea70-ae06-4e9d-aaad-82afdd15f4b2")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /apps/Smart Packet Analyzer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SmartPacketAnalyzer.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/Smart Packet Analyzer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/Smart Packet Analyzer/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/Smart Packet Analyzer/readme.txt: -------------------------------------------------------------------------------- 1 | Smart Packet Analyzer 2 | 3 | 1) Start Tibia 4 | 2) Start Smart Packet Analyzer 5 | 3) Login to Tibia as normal 6 | 4) Click on the packets in the top to view the data below 7 | 5) You can drag in between the two boxes to resize -------------------------------------------------------------------------------- /apps/Smart Runemaker/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace SmartRunemaker 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.EnableVisualStyles(); 16 | Application.SetCompatibleTextRenderingDefault(false); 17 | Application.Run(new MainForm()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /apps/Smart Runemaker/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Smart Runemaker")] 9 | [assembly: AssemblyDescription("A simple, easy to use runemaker for Tibia")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("TibiaAPI")] 12 | [assembly: AssemblyProduct("Smart Runemaker")] 13 | [assembly: AssemblyCopyright("Copyright © 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2ea6ac99-8649-4671-ad8a-9518af5629ff")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /apps/Smart Runemaker/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SmartRunemaker.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/Smart Runemaker/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/Smart Runemaker/RuneChooser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace SmartRunemaker 10 | { 11 | public partial class RuneChooser : Form 12 | { 13 | private static RuneChooser newRuneChooser; 14 | private static Tibia.Objects.Rune rune; 15 | 16 | public RuneChooser() 17 | { 18 | InitializeComponent(); 19 | rune = null; 20 | } 21 | 22 | public static Tibia.Objects.Rune ShowBox() 23 | { 24 | IList runeList = new List(Tibia.Constants.ItemLists.Runes.Values); 25 | newRuneChooser = new RuneChooser(); 26 | newRuneChooser.uxRunes.DataSource = runeList; 27 | newRuneChooser.uxRunes.SelectedItem = Tibia.Constants.Items.Rune.SuddenDeath.Id; 28 | newRuneChooser.ShowDialog(); 29 | return rune; 30 | } 31 | 32 | private void uxChoose_Click(object sender, EventArgs e) 33 | { 34 | rune = (Tibia.Objects.Rune)uxRunes.SelectedItem; 35 | newRuneChooser.Dispose(); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /apps/Smart Runemaker/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/Smart Runemaker/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/apps/Smart Runemaker/icon.ico -------------------------------------------------------------------------------- /apps/Smart Team Marker/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace SmartTeamMarker 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new MainForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/Smart Team Marker/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SmartTeamMarker")] 9 | [assembly: AssemblyDescription("Mark your friends and enemies in Tibia")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("TibiaAPI")] 12 | [assembly: AssemblyProduct("SmartTeamMarker")] 13 | [assembly: AssemblyCopyright("Copyright © 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8dad3013-4d8a-49e2-b0fd-279ea578d9a3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /apps/Smart Team Marker/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SmartTeamMarker.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/Smart Team Marker/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/Smart Team Marker/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/Smart Update Test/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:2.0.50727.3607 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | 'NOTE: This file is auto-generated; do not modify it directly. To make changes, 18 | ' or if you encounter build errors in this file, go to the Project Designer 19 | ' (go to Project Properties or double-click the My Project node in 20 | ' Solution Explorer), and make changes on the Application tab. 21 | ' 22 | Partial Friend Class MyApplication 23 | 24 | _ 25 | Public Sub New() 26 | MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) 27 | Me.IsSingleInstance = false 28 | Me.EnableVisualStyles = true 29 | Me.SaveMySettingsOnExit = true 30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses 31 | End Sub 32 | 33 | _ 34 | Protected Overrides Sub OnCreateMainForm() 35 | Me.MainForm = Global.Smart_Update_Test.frmMain 36 | End Sub 37 | End Class 38 | End Namespace 39 | -------------------------------------------------------------------------------- /apps/Smart Update Test/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' General Information about an assembly is controlled through the following 6 | ' set of attributes. Change these attribute values to modify the information 7 | ' associated with an assembly. 8 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | 22 | 23 | ' Version information for an assembly consists of the following four values: 24 | ' 25 | ' Major Version 26 | ' Minor Version 27 | ' Build Number 28 | ' Revision 29 | ' 30 | ' You can specify all the values or you can default the Build and Revision Numbers 31 | ' by using the '*' as shown below: 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /apps/Smart Update Test/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/Smart Update Test/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /apps/Smart Update Test/frmBattlelist.vb: -------------------------------------------------------------------------------- 1 | Imports Tibia 2 | 3 | Public Class frmBattlelist 4 | 5 | Private Sub btnGetCreatures_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetCreatures.Click 6 | If client.LoggedIn Then 7 | lvBattlelist.Items.Clear() 8 | For Each c As Objects.Creature In client.BattleList.GetCreatures 9 | lvBattlelist.Items.Add(New ListViewItem(New String() {c.Id.ToString, c.Name.ToString, c.Location.ToString, _ 10 | c.IsWalking.ToString, c.WalkSpeed.ToString, c.Direction.ToString, _ 11 | c.IsVisible.ToString, c.Light.ToString, c.LightColor.ToString, _ 12 | c.HPBar.ToString, c.BlackSquare.ToString, c.Skull.ToString, _ 13 | c.PartyShield.ToString, c.WarIcon.ToString, c.IsBlocking.ToString, _ 14 | c.Outfit.LookType.ToString})) 15 | Next 16 | Else 17 | MessageBox.Show("Please login to perform this action.", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Error) 18 | End If 19 | End Sub 20 | 21 | Private Sub chkShowInvisible_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkShowInvisible.CheckedChanged 22 | If chkShowInvisible.Checked Then 23 | client.BattleList.ShowInvisible() 24 | Else 25 | client.BattleList.HideInvisible() 26 | End If 27 | End Sub 28 | End Class -------------------------------------------------------------------------------- /apps/Smart Update Test/frmClient.vb: -------------------------------------------------------------------------------- 1 | Public Class frmClient 2 | 3 | Private Sub frmClient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 4 | UpdateClientInfo() 5 | End Sub 6 | 7 | Private Sub UpdateClientInfo() 8 | lblActionState.Text = client.ActionState.ToString 9 | lblAttackMode.Text = client.AttackMode.ToString 10 | lblDialogCaption.Text = client.DialogCaption.ToString 11 | lblDialogPointer.Text = client.DialogPointer.ToString 12 | lblDialogPosition.Text = client.DialogPosition.ToString 13 | lblFollowMode.Text = client.FollowMode.ToString 14 | lblIsDialogOpen.Text = client.IsDialogOpen.ToString 15 | lblLastSeenCount.Text = client.LastSeenCount.ToString 16 | lblLastSeenId.Text = client.LastSeenId.ToString 17 | lblLastSeenText.Text = client.LastSeenText.ToString 18 | lblLoggedIn.Text = client.LoggedIn.ToString 19 | lblSafeMode.Text = client.SafeMode.ToString 20 | lblStatus.Text = client.Status.ToString 21 | lblStatusBar.Text = client.Statusbar.ToString 22 | lblVersion.Text = client.Version.ToString 23 | lblVersionNumber.Text = client.VersionNumber.ToString 24 | End Sub 25 | 26 | Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click 27 | UpdateClientInfo() 28 | End Sub 29 | End Class -------------------------------------------------------------------------------- /apps/Smart Update Test/frmHotkey.vb: -------------------------------------------------------------------------------- 1 | Imports Tibia 2 | 3 | Public Class frmHotkey 4 | 5 | Private Sub btnGetHotkeys_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetHotkeys.Click 6 | For i As Integer = 0 To Addresses.Hotkey.MaxHotkeys - 1 7 | Dim h As New Objects.Hotkey(client, i) 8 | If h.ObjectId > 0 Or h.Text IsNot String.Empty Then 9 | lvHotkeys.Items.Add(New ListViewItem(New String() {h.SendAutomatically.ToString, h.Text.ToString, h.ObjectId.ToString, h.ObjectUseType.ToString, h.Shortcut.ToString})) 10 | End If 11 | Next 12 | End Sub 13 | End Class -------------------------------------------------------------------------------- /apps/Smart Update Test/frmInventory.vb: -------------------------------------------------------------------------------- 1 | Imports Tibia 2 | 3 | Public Class frmInventory 4 | 5 | Private Sub btnGetItems_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetItems.Click 6 | If client.LoggedIn Then 7 | lvInventory.Items.Clear() 8 | For Each i As Objects.Item In client.Inventory.GetItems 9 | lvInventory.Items.Add(New ListViewItem(New String() {i.Id.ToString, i.Count.ToString, _ 10 | i.Width.ToString, i.Height.ToString, _ 11 | i.Layers.ToString, i.PatternX.ToString, _ 12 | i.PatternY.ToString, i.PatternDepth.ToString, i.Phase.ToString, _ 13 | i.SpriteCount.ToString, i.Flags.ToString, _ 14 | i.WalkSpeed.ToString, i.TextLimit.ToString, i.LightRadius.ToString, _ 15 | i.LightColor.ToString, i.ShiftX.ToString, i.ShiftY.ToString, _ 16 | i.WalkHeight.ToString, i.AutomapColor.ToString, i.LensHelp.ToString, _ 17 | i.TopOrder.ToString, i.HasExtraByte.ToString})) 18 | Next 19 | Else 20 | MessageBox.Show("Please login to perform this action.", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Error) 21 | End If 22 | End Sub 23 | End Class -------------------------------------------------------------------------------- /apps/Smart Update Test/frmSkin.vb: -------------------------------------------------------------------------------- 1 | Public Class frmSkin 2 | 3 | Private Sub btnAddSkin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddSkin.Click 4 | client.Skin.AddSkin(1000, 10, 10, 32, 32, 159) 5 | End Sub 6 | 7 | Private Sub btnUpdateSkin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdateSkin.Click 8 | client.Skin.UpdateSkin(1000, 10, 10, 32, 32, 161) 9 | End Sub 10 | 11 | Private Sub btnRemoveSkin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRemoveSkin.Click 12 | client.Skin.RemoveSkin(1000) 13 | End Sub 14 | 15 | Private Sub btnRemoveAllSkins_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRemoveAllSkins.Click 16 | client.Skin.RemoveAll() 17 | End Sub 18 | End Class -------------------------------------------------------------------------------- /apps/Smart Update Test/frmVIP.vb: -------------------------------------------------------------------------------- 1 | Imports Tibia 2 | 3 | Public Class frmVIP 4 | 5 | Private Sub btnGetVIP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetVIP.Click 6 | If client.LoggedIn Then 7 | lvVIP.Items.Clear() 8 | Dim VIPs As New Objects.VipList(client) 9 | For Each VIP As Objects.Vip In VIPs 10 | If VIP.Id = 0 Then Exit For 11 | lvVIP.Items.Add(New ListViewItem(New String() {VIP.Id.ToString, VIP.Name.ToString, VIP.Status.ToString, VIP.Icon.ToString})) 12 | Next 13 | Else 14 | MessageBox.Show("Please login to perform this action.", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Error) 15 | End If 16 | End Sub 17 | End Class -------------------------------------------------------------------------------- /apps/Smart Update Test/mdlObjects.vb: -------------------------------------------------------------------------------- 1 | Imports Tibia 2 | 3 | Module mdlObjects 4 | Public client As Objects.Client 5 | Public player As Objects.Player 6 | Public hook As Packets.HookProxy 7 | End Module 8 | -------------------------------------------------------------------------------- /apps/SmartDataGenerator/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace SmartDataGenerator { 7 | static class Program { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() { 13 | Application.EnableVisualStyles(); 14 | Application.SetCompatibleTextRenderingDefault(false); 15 | Application.Run(new uxMain()); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/SmartDataGenerator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SmartDataGenerator")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SmartDataGenerator")] 13 | [assembly: AssemblyCopyright("Copyright © 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f8afab3f-a3e4-415d-b8d2-014fbdeb5db3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /apps/SmartDataGenerator/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SmartDataGenerator.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/SmartDataGenerator/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/SmartDataGenerator/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/SmartDataGenerator/items.otb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/apps/SmartDataGenerator/items.otb -------------------------------------------------------------------------------- /apps/TestSuite/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace TestSuite 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new MainForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/TestSuite/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("TestSuite")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("TestSuite")] 13 | [assembly: AssemblyCopyright("Copyright © 2009")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8178c817-00d3-42b7-883a-cbfda0a743c4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /apps/TestSuite/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.1 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TestSuite.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/TestSuite/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /apps/TestSuite/TibiaAPI_Inject.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/apps/TestSuite/TibiaAPI_Inject.dll -------------------------------------------------------------------------------- /apps/TestSuite/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /documentation/closed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/documentation/closed.gif -------------------------------------------------------------------------------- /documentation/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/documentation/doxygen.png -------------------------------------------------------------------------------- /documentation/open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/documentation/open.gif -------------------------------------------------------------------------------- /documentation/proxy-flow-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/documentation/proxy-flow-chart.png -------------------------------------------------------------------------------- /documentation/tab_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/documentation/tab_b.gif -------------------------------------------------------------------------------- /documentation/tab_l.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/documentation/tab_l.gif -------------------------------------------------------------------------------- /documentation/tab_r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/documentation/tab_r.gif -------------------------------------------------------------------------------- /tibiaapi/Addresses/BattleList.cs: -------------------------------------------------------------------------------- 1 | namespace Tibia.Addresses 2 | { 3 | /// 4 | /// Battle list adddresses and distances. 5 | /// 6 | public static class BattleList 7 | { 8 | /// 9 | /// Distance between creatures. 10 | /// 11 | public static uint StepCreatures; // A8 before 8.70 12 | 13 | /// 14 | /// Maximum number of creatures. 15 | /// 16 | public static uint MaxCreatures; // it was 250 before 8.62 17 | 18 | /// 19 | /// Start of the battle list. 20 | /// 21 | public static uint Start; 22 | 23 | /// 24 | /// End of the battle list. 25 | /// 26 | public static uint End; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tibiaapi/Addresses/Creature.cs: -------------------------------------------------------------------------------- 1 | namespace Tibia.Addresses 2 | { 3 | /// 4 | /// Distances for creatures. 5 | /// 6 | public static class Creature 7 | { 8 | public static uint DistanceId; 9 | public static uint DistanceType; 10 | public static uint DistanceName; 11 | 12 | public static uint DistanceX; 13 | public static uint DistanceY; 14 | public static uint DistanceZ; 15 | public static uint DistanceScreenOffsetHoriz; 16 | public static uint DistanceScreenOffsetVert; 17 | 18 | public static uint DistanceIsWalking; 19 | public static uint DistanceDirection; 20 | 21 | public static uint DistanceOutfit; 22 | public static uint DistanceColorHead; 23 | public static uint DistanceColorBody; 24 | public static uint DistanceColorLegs; 25 | public static uint DistanceColorFeet; 26 | public static uint DistanceAddon; 27 | public static uint DistanceMountId; 28 | 29 | public static uint DistanceLight; 30 | public static uint DistanceLightColor; 31 | public static uint DistanceLightPattern; 32 | public static uint DistanceBlackSquare; 33 | public static uint DistanceHPBar; 34 | public static uint DistanceWalkSpeed; 35 | public static uint DistanceIsVisible; 36 | 37 | public static uint DistanceSkull; 38 | public static uint DistanceParty; 39 | public static uint DistanceWarIcon; 40 | public static uint DistanceIsBlocking; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tibiaapi/Addresses/DrawItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Tibia.Addresses 7 | { 8 | public class DrawItem 9 | { 10 | public static uint DrawItemFunc; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tibiaapi/Addresses/DrawSkin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Tibia.Addresses 7 | { 8 | public class DrawSkin 9 | { 10 | public static uint DrawSkinFunc; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tibiaapi/Addresses/Hotkey.cs: -------------------------------------------------------------------------------- 1 | namespace Tibia.Addresses 2 | { 3 | public class Hotkey 4 | { 5 | public static uint SendAutomaticallyStart; 6 | public static uint SendAutomaticallyStep; 7 | 8 | public static uint TextStart; 9 | public static uint TextStep; 10 | 11 | public static uint ObjectStart; 12 | public static uint ObjectStep; 13 | 14 | public static uint ObjectUseTypeStart; 15 | public static uint ObjectUseTypeStep; 16 | 17 | public static uint MaxHotkeys; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tibiaapi/Addresses/TextDisplay.cs: -------------------------------------------------------------------------------- 1 | namespace Tibia.Addresses 2 | { 3 | public static class TextDisplay 4 | { 5 | /// 6 | /// PrintName function call to overwrite 7 | /// 8 | public static uint PrintName; 9 | 10 | 11 | /// 12 | /// PrintFPS function call to overwrite 13 | /// 14 | public static uint PrintFPS; 15 | 16 | 17 | /// 18 | /// Offset, if user wants to show FPS 19 | /// 20 | public static uint ShowFPS; 21 | 22 | /// 23 | /// PrintText function address 24 | /// 29 | /// Conditional check to show FPS 30 | /// 31 | public static uint NopFPS; 32 | 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /tibiaapi/Addresses/Vip.cs: -------------------------------------------------------------------------------- 1 | namespace Tibia.Addresses 2 | { 3 | public static class Vip 4 | { 5 | /// 6 | /// Step between Players. 7 | /// 8 | public static uint StepPlayers; 9 | 10 | /// 11 | /// Max names in VipList. 12 | /// 13 | public static uint MaxPlayers; 14 | 15 | /// 16 | /// Start of the VipList. 17 | /// 18 | public static uint Start; 19 | 20 | /// 21 | /// End of the VipList. 22 | /// 23 | public static uint End; 24 | 25 | /// 26 | /// Distances for Vips. 27 | /// 28 | public static uint DistanceId; 29 | public static uint DistanceName; 30 | public static uint DistanceStatus; // 0 = offline, 1 = online 31 | public static uint DistanceIcon; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tibiaapi/Constants/TAConstants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Tibia.Constants 7 | { 8 | public static class TAConstants 9 | { 10 | public static string CurrentTibiaVersion = "9.10"; 11 | public static string AppDataPath = System.IO.Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "TibiaAPI"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tibiaapi/Exceptions/Misc.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Windows.Forms; 5 | 6 | namespace Tibia.Exceptions 7 | { 8 | /// 9 | /// Exception used mainly in Objects.Client when a player is not logged in. 10 | /// 11 | public class NotLoggedInException : InvalidOperationException { } 12 | 13 | /// 14 | /// Thrown when the proxy is not enabled, packet.dll is not found and a method tries to use packet.dll to send a packet. 15 | /// 16 | public class PacketDllNotFoundException : InvalidOperationException { } 17 | 18 | /// 19 | /// Thrown when a method requires the client to be using a proxy, ie. sending a packet to the client. 20 | /// 21 | public class ProxyRequiredException : InvalidOperationException { } 22 | 23 | /// 24 | /// Thrown when a method expects the proxy to be connected, but it is not. 25 | /// 26 | public class ProxyDisconnectedException : InvalidOperationException { } 27 | 28 | /// 29 | /// Thrown when client tries to inject DLL in addition to use Pipe but cannot found it 30 | /// 31 | public class InjectDLLNotFoundException : InvalidOperationException { } 32 | 33 | public static class Handler 34 | { 35 | public static void Handle(Exception e) 36 | { 37 | StringBuilder sb = new StringBuilder(); 38 | 39 | sb.AppendLine("TibiaAPI has encountered an error. Please report the text of this error to the developer of this program. You can copy the text by pressing ctrl+c."); 40 | sb.AppendLine(); 41 | sb.AppendLine(e.ToString()); 42 | 43 | MessageBox.Show(sb.ToString(), "TibiaAPI Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tibiaapi/InjectedDLL/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | /* 3 | using namespace System; 4 | using namespace System::Reflection; 5 | using namespace System::Runtime::CompilerServices; 6 | using namespace System::Runtime::InteropServices; 7 | using namespace System::Security::Permissions; 8 | */ 9 | // 10 | // General Information about an assembly is controlled through the following 11 | // set of attributes. Change these attribute values to modify the information 12 | // associated with an assembly. 13 | // 14 | /* 15 | [assembly:AssemblyTitleAttribute("TibiaTekBotInjectedDLL")]; 16 | [assembly:AssemblyDescriptionAttribute("")]; 17 | [assembly:AssemblyConfigurationAttribute("")]; 18 | [assembly:AssemblyCompanyAttribute("")]; 19 | [assembly:AssemblyProductAttribute("TibiaTekBotInjectedDLL")]; 20 | [assembly:AssemblyCopyrightAttribute("Copyright (c) 2007")]; 21 | [assembly:AssemblyTrademarkAttribute("")]; 22 | [assembly:AssemblyCultureAttribute("")]; 23 | */ 24 | // 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the value or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | /* 35 | [assembly:AssemblyVersionAttribute("1.0.*")]; 36 | 37 | [assembly:ComVisible(false)]; 38 | 39 | [assembly:CLSCompliantAttribute(true)]; 40 | 41 | [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; 42 | */ -------------------------------------------------------------------------------- /tibiaapi/InjectedDLL/Constants.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include 4 | #include "Constants.h" 5 | 6 | namespace Consts { 7 | 8 | /* Displaying Text Stuff */ 9 | DWORD ptrPrintName = 0; 10 | DWORD ptrPrintFPS = 0; 11 | DWORD ptrShowFPS = 0; 12 | DWORD ptrNopFPS = 0; 13 | 14 | /* Context Menu Stuff */ 15 | DWORD ptrAddContextMenu = 0; 16 | DWORD ptrOnClickContextMenu = 0; 17 | DWORD ptrSetOutfitContextMenu = 0; 18 | DWORD ptrPartyActionContextMenu = 0; 19 | DWORD ptrCopyNameContextMenu = 0; 20 | DWORD ptrTradeWithContextMenu = 0; 21 | DWORD ptrLookContextMenu = 0; 22 | DWORD prtOnClickContextMenuVf = 0; 23 | 24 | /* Socket Stuff */ 25 | DWORD ptrRecv = 0; 26 | DWORD ptrSend = 0; 27 | 28 | /* Event Trigger Stuff */ 29 | DWORD ptrEventTrigger = 0; 30 | } 31 | 32 | /* DLL Injection Related Stuff */ 33 | HINSTANCE hMod = 0; 34 | bool HooksEnabled = false; 35 | 36 | /* Pipes */ 37 | std::string PipeName; 38 | bool PipeConnected = false; 39 | HANDLE PipeThread = 0; 40 | BYTE Buffer[1024] = {0}; 41 | CRITICAL_SECTION PipeReadCriticalSection; 42 | CRITICAL_SECTION NormalTextCriticalSection; 43 | CRITICAL_SECTION CreatureTextCriticalSection; 44 | CRITICAL_SECTION ContextMenuCriticalSection; 45 | CRITICAL_SECTION OnClickCriticalSection; 46 | CRITICAL_SECTION EventTriggerCriticalSection; 47 | CRITICAL_SECTION DrawItemCriticalSection; 48 | CRITICAL_SECTION DrawSkinCriticalSection; -------------------------------------------------------------------------------- /tibiaapi/InjectedDLL/Packet.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define MAX_PACKETSIZE 1024 3 | 4 | class Packet { 5 | 6 | public: 7 | 8 | /* Constructors and Destructors */ 9 | Packet(); 10 | Packet( int PacketSize); 11 | Packet(BYTE* Packet, int PacketSize); 12 | ~Packet(); 13 | 14 | /* Methods */ 15 | void AddByte(BYTE value); 16 | void AddShort(short value); 17 | void AddWord(WORD value); 18 | void AddDWord(DWORD value); 19 | void AddString(std::string value); 20 | BYTE* GetPacket(); 21 | int GetSize(); 22 | 23 | 24 | /* Static Functions */ 25 | static BYTE ReadByte(BYTE *buffer, int *offset); 26 | static WORD ReadWord(BYTE *buffer, int *offset); 27 | static short ReadShort(BYTE *buffer, int *offset); 28 | static DWORD ReadDWord(BYTE *buffer, int *offset); 29 | static double ReadDouble(BYTE *buffer, int *offset); 30 | static std::string ReadString(BYTE *buffer, int *offset); 31 | 32 | private: 33 | BYTE* m_Packet; //Packet body 34 | BYTE* o_Packet; //Outgoing packet 35 | int m_PacketSize; 36 | int m_CurrentPos; 37 | }; 38 | -------------------------------------------------------------------------------- /tibiaapi/InjectedDLL/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by app.rc 4 | -------------------------------------------------------------------------------- /tibiaapi/InjectedDLL/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // TibiaTekBot Injected DLL.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /tibiaapi/InjectedDLL/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, 3 | // but are changed infrequently 4 | 5 | #pragma once 6 | 7 | 8 | -------------------------------------------------------------------------------- /tibiaapi/Objects/ItemData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Tibia.Packets; 4 | 5 | namespace Tibia.Objects 6 | { 7 | public class ItemData 8 | { 9 | public string Name; 10 | public uint Id; 11 | public bool Enchantable; 12 | public double Weight; 13 | public int LootValue; 14 | public List DroppedBy; 15 | 16 | public ItemData(string name, uint id, bool enchantable, double weight, int lootValue, List droppedBy) 17 | { 18 | Name = name; 19 | Id = id; 20 | Enchantable = enchantable; 21 | Weight = weight; 22 | LootValue = lootValue; 23 | DroppedBy = droppedBy; 24 | } 25 | 26 | public double ValueRatio 27 | { 28 | get 29 | { 30 | return LootValue / Weight; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tibiaapi/Objects/Vip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Tibia.Objects 5 | { 6 | /// 7 | /// Represents a vip entry. 8 | /// 9 | public class Vip 10 | { 11 | private Client client; 12 | private uint address; 13 | 14 | internal Vip(Client client, uint address) 15 | { 16 | this.client = client; 17 | this.address = address; 18 | } 19 | 20 | #region Get/Set Methods 21 | 22 | public int Id 23 | { 24 | get { return client.Memory.ReadInt32(address + Addresses.Vip.DistanceId); } 25 | set { client.Memory.WriteInt32(address + Addresses.Vip.DistanceIcon, value); } 26 | } 27 | 28 | public string Name 29 | { 30 | get { return client.Memory.ReadString(address + Addresses.Vip.DistanceName); } 31 | set { client.Memory.WriteString(address + Addresses.Vip.DistanceName, value); } 32 | } 33 | 34 | public Constants.VipStatus Status 35 | { 36 | get { return (Constants.VipStatus)client.Memory.ReadByte(address + Addresses.Vip.DistanceStatus); } 37 | set { client.Memory.WriteByte(address + Addresses.Vip.DistanceStatus, (byte)value); } 38 | } 39 | 40 | public Constants.VipIcon Icon 41 | { 42 | get { return (Constants.VipIcon)client.Memory.ReadByte(address + Addresses.Vip.DistanceIcon); } 43 | set { client.Memory.WriteByte(address + Addresses.Vip.DistanceIcon, (byte)value); } 44 | } 45 | 46 | #endregion 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /tibiaapi/Objects/VipList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Tibia.Packets; 4 | 5 | namespace Tibia.Objects 6 | { 7 | public class VipList : IEnumerable 8 | { 9 | private Client client; 10 | 11 | public VipList(Client c) 12 | { 13 | client = c; 14 | } 15 | 16 | public List GetPlayers() 17 | { 18 | List players = new List(); 19 | for (uint i = Addresses.Vip.Start; i < Addresses.Vip.End; i += Addresses.Vip.StepPlayers) 20 | { 21 | players.Add(new Vip(client,i)); 22 | } 23 | return players; 24 | } 25 | 26 | /// 27 | /// Adds Player to VIP 28 | /// 29 | /// 30 | /// 31 | public bool AddPlayer(string name) 32 | { 33 | return Packets.Outgoing.VipAddPacket.Send(client, name); 34 | } 35 | 36 | /// 37 | /// Removes Player from VIP 38 | /// 39 | /// 40 | /// 41 | public bool RemovePlayer(Vip vip) 42 | { 43 | return Packets.Outgoing.VipRemovePacket.Send(client, (uint)vip.Id); 44 | } 45 | 46 | #region IEnumerable Members 47 | 48 | IEnumerator IEnumerable.GetEnumerator() 49 | { 50 | return GetPlayers().GetEnumerator(); 51 | } 52 | 53 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() 54 | { 55 | return GetPlayers().GetEnumerator(); 56 | } 57 | 58 | #endregion 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/AnimatedTextPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class AnimatedTextPacket : IncomingPacket 6 | { 7 | public Objects.Location Location { get; set; } 8 | public string Message { get; set; } 9 | public TextColor Color { get; set; } 10 | 11 | public AnimatedTextPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.AnimatedText; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.AnimatedText) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.AnimatedText; 27 | 28 | Location = msg.GetLocation(); 29 | Color = (TextColor)msg.GetByte(); 30 | Message = msg.GetString(); 31 | 32 | return true; 33 | } 34 | 35 | public override void ToNetworkMessage(NetworkMessage msg) 36 | { 37 | msg.AddByte((byte)Type); 38 | msg.AddLocation(Location); 39 | msg.AddByte((byte)Color); 40 | msg.AddString(Message); 41 | } 42 | 43 | public static bool Send(Objects.Client client, string message, Objects.Location position, TextColor color) 44 | { 45 | AnimatedTextPacket p = new AnimatedTextPacket(client); 46 | p.Message = message; 47 | p.Location = position; 48 | p.Color = color; 49 | return p.Send(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CanReportBugsPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class CanReportBugsPacket : IncomingPacket 6 | { 7 | 8 | public byte ReportBugs { get; set; } 9 | 10 | public CanReportBugsPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.CanReportBugs; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)IncomingPacketType.CanReportBugs) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = IncomingPacketType.CanReportBugs; 24 | 25 | ReportBugs = msg.GetByte(); 26 | 27 | return true; 28 | } 29 | 30 | public override void ToNetworkMessage(NetworkMessage msg) 31 | { 32 | msg.AddByte((byte)Type); 33 | msg.AddByte(ReportBugs); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CancelTargetPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class CancelTargetPacket : IncomingPacket 7 | { 8 | public uint Count { get; set; } 9 | 10 | public CancelTargetPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.CancelTarget; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)IncomingPacketType.CancelTarget) 20 | throw new Exception(); 21 | 22 | Destination = destination; 23 | Type = IncomingPacketType.CancelTarget; 24 | 25 | if (Client.VersionNumber >= 860) 26 | { 27 | Count = msg.GetUInt32(); 28 | } 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | 37 | if (Client.VersionNumber >= 860) 38 | { 39 | msg.AddUInt32(Count); 40 | } 41 | } 42 | 43 | public static bool Send(Objects.Client client) 44 | { 45 | CancelTargetPacket p = new CancelTargetPacket(client); 46 | 47 | if (client.VersionNumber >= 860) 48 | { 49 | uint count = client.Player.AttackCount; 50 | p.Count = count; 51 | } 52 | return p.Send(); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ChannelClosePrivatePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ChannelClosePrivatePacket : IncomingPacket 6 | { 7 | 8 | public ushort ChannelId { get; set; } 9 | 10 | public ChannelClosePrivatePacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.ChannelClosePrivate; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.ChannelClosePrivate) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.ChannelClosePrivate; 26 | 27 | ChannelId = msg.GetUInt16(); 28 | 29 | return true; 30 | } 31 | 32 | public override void ToNetworkMessage(NetworkMessage msg) 33 | { 34 | msg.AddByte((byte)Type); 35 | msg.AddUInt16(ChannelId); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ChannelOpenPrivatePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ChannelOpenPrivatePacket : IncomingPacket 6 | { 7 | public string Name { get; set; } 8 | 9 | public ChannelOpenPrivatePacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = IncomingPacketType.ChannelOpenPrivate; 13 | Destination = PacketDestination.Client; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | int position = msg.Position; 19 | 20 | if (msg.GetByte() != (byte)IncomingPacketType.ChannelOpenPrivate) 21 | return false; 22 | 23 | Destination = destination; 24 | Type = IncomingPacketType.ChannelOpenPrivate; 25 | 26 | Name = msg.GetString(); 27 | 28 | return true; 29 | } 30 | 31 | public override void ToNetworkMessage(NetworkMessage msg) 32 | { 33 | msg.AddByte((byte)Type); 34 | msg.AddString(Name); 35 | } 36 | 37 | public static bool Send(Objects.Client client, string name) 38 | { 39 | ChannelOpenPrivatePacket p = new ChannelOpenPrivatePacket(client); 40 | p.Name = name; 41 | return p.Send(); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ContainerAddItemPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ContainerAddItemPacket : IncomingPacket 6 | { 7 | public byte Container { get; set; } 8 | public Objects.Item Item { get; set; } 9 | 10 | public ContainerAddItemPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.ContainerAddItem; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.ContainerAddItem) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.ContainerAddItem; 26 | 27 | Container = msg.GetByte(); 28 | Item = msg.GetItem(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | msg.AddByte(Container); 37 | msg.AddItem(Item); 38 | } 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ContainerClosePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ContainerClosePacket : IncomingPacket 6 | { 7 | public byte Id { get; set; } 8 | 9 | public ContainerClosePacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = IncomingPacketType.ContainerClose; 13 | Destination = PacketDestination.Client; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | int postion = msg.Position; 19 | 20 | if (msg.GetByte() != (byte)IncomingPacketType.ContainerClose) 21 | return false; 22 | 23 | Destination = destination; 24 | Type = IncomingPacketType.ContainerClose; 25 | 26 | Id = msg.GetByte(); 27 | 28 | return true; 29 | } 30 | 31 | public override void ToNetworkMessage(NetworkMessage msg) 32 | { 33 | msg.AddByte((byte)Type); 34 | msg.AddByte(Id); 35 | } 36 | 37 | public static bool Send(Objects.Client client, byte id) 38 | { 39 | ContainerClosePacket p = new ContainerClosePacket(client); 40 | p.Id = id; 41 | return p.Send(); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ContainerRemoveItemPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ContainerRemoveItemPacket : IncomingPacket 6 | { 7 | public byte Container { get; set; } 8 | public byte Slot { get; set; } 9 | 10 | public ContainerRemoveItemPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.ContainerRemoveItem; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.ContainerRemoveItem) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.ContainerRemoveItem; 26 | 27 | Container = msg.GetByte(); 28 | Slot = msg.GetByte(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | msg.AddByte(Container); 37 | msg.AddByte(Slot); 38 | } 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ContainerUpdateItemPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ContainerUpdateItemPacket : IncomingPacket 6 | { 7 | public byte Container { get; set; } 8 | public byte Slot { get; set; } 9 | public Objects.Item Item { get; set; } 10 | 11 | public ContainerUpdateItemPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.ContainerUpdateItem; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.ContainerUpdateItem) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.ContainerUpdateItem; 27 | 28 | Container = msg.GetByte(); 29 | Slot = msg.GetByte(); 30 | Item = msg.GetItem(); 31 | 32 | return true; 33 | } 34 | 35 | public override void ToNetworkMessage(NetworkMessage msg) 36 | { 37 | msg.AddByte((byte)Type); 38 | msg.AddByte(Container); 39 | msg.AddByte(Slot); 40 | msg.AddItem(Item); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CreatureHealthPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class CreatureHealthPacket : IncomingPacket 6 | { 7 | public uint CreatureId { get; set; } 8 | public byte Health { get; set; } 9 | 10 | public CreatureHealthPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.CreatureHealth; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.CreatureHealth) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.CreatureHealth; 26 | 27 | CreatureId = msg.GetUInt32(); 28 | Health = msg.GetByte(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | msg.AddUInt32(CreatureId); 37 | msg.AddByte(Health); 38 | } 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CreatureLightPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class CreatureLightPacket : IncomingPacket 6 | { 7 | public uint CreatureId { get; set; } 8 | public byte LightColor { get; set; } 9 | public byte LightLevel { get; set; } 10 | 11 | public CreatureLightPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.CreatureLight; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.CreatureLight) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.CreatureLight; 27 | 28 | CreatureId = msg.GetUInt32(); 29 | LightLevel = msg.GetByte(); 30 | LightColor = msg.GetByte(); 31 | 32 | return true; 33 | } 34 | 35 | public override void ToNetworkMessage(NetworkMessage msg) 36 | { 37 | msg.AddByte((byte)Type); 38 | msg.AddUInt32(CreatureId); 39 | msg.AddByte(LightLevel); 40 | msg.AddByte(LightColor); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CreatureMovePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class CreatureMovePacket : IncomingPacket 6 | { 7 | public byte FromStackPosition { get; set; } 8 | public Objects.Location FromLocation { get; set; } 9 | public Objects.Location ToLocation { get; set; } 10 | 11 | public CreatureMovePacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.CreatureMove; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.CreatureMove) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.CreatureMove; 27 | 28 | FromLocation = msg.GetLocation(); 29 | FromStackPosition = msg.GetByte(); 30 | ToLocation = msg.GetLocation(); 31 | 32 | return true; 33 | } 34 | 35 | public override void ToNetworkMessage(NetworkMessage msg) 36 | { 37 | msg.AddByte((byte)Type); 38 | msg.AddLocation(FromLocation); 39 | msg.AddByte(FromStackPosition); 40 | msg.AddLocation(ToLocation); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CreatureOutfitPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class CreatureOutfitPacket : IncomingPacket 6 | { 7 | public uint CreatureId { get; set; } 8 | public Objects.Outfit Outfit { get; set; } 9 | 10 | public CreatureOutfitPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.CreatureOutfit; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.CreatureOutfit) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.CreatureOutfit; 26 | 27 | CreatureId = msg.GetUInt32(); 28 | Outfit = msg.GetOutfit(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | msg.AddUInt32(CreatureId); 37 | msg.AddOutfit(Outfit); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CreatureSkullPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class CreatureSkullPacket : IncomingPacket 6 | { 7 | public uint CreatureId { get; set; } 8 | public byte CreatureSkull { get; set; } 9 | 10 | public CreatureSkullPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.CreatureSkull; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.CreatureSkull) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.CreatureSkull; 26 | 27 | CreatureId = msg.GetUInt32(); 28 | CreatureSkull = msg.GetByte(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | msg.AddUInt32(CreatureId); 37 | msg.AddByte(CreatureSkull); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CreatureSpeedPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class CreatureSpeedPacket : IncomingPacket 6 | { 7 | public uint CreatureId { get; set; } 8 | public ushort Speed { get; set; } 9 | 10 | public CreatureSpeedPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.CreatureSpeed; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.CreatureSpeed) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.CreatureSpeed; 26 | 27 | CreatureId = msg.GetUInt32(); 28 | Speed = msg.GetUInt16(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | msg.AddUInt32(CreatureId); 37 | msg.AddUInt16(Speed); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/CreatureSquarePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class CreatureSquarePacket : IncomingPacket 6 | { 7 | public uint CreatureId { get; set; } 8 | public SquareColor Color { get; set; } 9 | 10 | public CreatureSquarePacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.CreatureSquare; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.CreatureSquare) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.CreatureSquare; 26 | 27 | CreatureId = msg.GetUInt32(); 28 | Color = (SquareColor)msg.GetByte(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | 37 | msg.AddUInt32(CreatureId); 38 | msg.AddByte((byte)Color); 39 | } 40 | 41 | public static bool Send(Objects.Client client, uint creatureId, SquareColor color) 42 | { 43 | CreatureSquarePacket p = new CreatureSquarePacket(client); 44 | p.CreatureId = creatureId; 45 | p.Color = color; 46 | return p.Send(); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/DeathPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class DeathPacket : IncomingPacket 6 | { 7 | 8 | public DeathPacket(Objects.Client c) 9 | : base(c) 10 | { 11 | Type = IncomingPacketType.Death; 12 | Destination = PacketDestination.Client; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 16 | { 17 | if (msg.GetByte() != (byte)IncomingPacketType.Death) 18 | return false; 19 | 20 | Destination = destination; 21 | Type = IncomingPacketType.Death; 22 | 23 | //no data 24 | 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/FYIMessagePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class FyiMessagePacket : IncomingPacket 6 | { 7 | 8 | public string Message { get; set; } 9 | 10 | public FyiMessagePacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.FyiMessage; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.FyiMessage) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.FyiMessage; 26 | 27 | Message = msg.GetString(); 28 | 29 | return true; 30 | } 31 | 32 | public override void ToNetworkMessage(NetworkMessage msg) 33 | { 34 | msg.AddByte((byte)Type); 35 | msg.AddString(Message); 36 | } 37 | 38 | public static bool Send(Objects.Client client, string message) 39 | { 40 | FyiMessagePacket p = new FyiMessagePacket(client); 41 | p.Message = message; 42 | return p.Send(); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/FloorChangeUpPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class FloorChangeUpPacket : MapPacket 7 | { 8 | 9 | public FloorChangeUpPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = IncomingPacketType.FloorChangeUp ; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination, NetworkMessage outMsg) 16 | { 17 | int msgPosition = msg.Position, outMsgPosition = outMsg.Position; 18 | 19 | if (msg.GetByte() != (byte)IncomingPacketType.FloorChangeUp) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = IncomingPacketType.FloorChangeUp; 24 | outMsg.AddByte((byte)Type); 25 | 26 | Client.playerLocation.Z--; 27 | 28 | try 29 | { 30 | //going to surface 31 | if (Client.playerLocation.Z == 7) 32 | { 33 | //floor 7 and 6 already set 34 | for (int i = 5; i >= 0; i--) 35 | ParseFloorDescription(msg, Client.playerLocation.X - 8, Client.playerLocation.Y - 6, i, 18, 14, 8 - i, outMsg); 36 | } 37 | //underground, going one floor up (still underground) 38 | else if (Client.playerLocation.Z > 7) 39 | ParseFloorDescription(msg, Client.playerLocation.X - 8, Client.playerLocation.Y - 6, Client.playerLocation.Z - 2, 18, 14, 3, outMsg); 40 | 41 | return true; 42 | } 43 | finally 44 | { 45 | Client.playerLocation.X++; 46 | Client.playerLocation.Y++; 47 | } 48 | } 49 | 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/InventoryResetSlotPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class InventoryResetSlotPacket : IncomingPacket 6 | { 7 | public byte Slot { get; set; } 8 | 9 | public InventoryResetSlotPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = IncomingPacketType.InventoryResetSlot; 13 | Destination = PacketDestination.Client; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | int position = msg.Position; 19 | 20 | if (msg.GetByte() != (byte)IncomingPacketType.InventoryResetSlot) 21 | return false; 22 | 23 | Destination = destination; 24 | Type = IncomingPacketType.InventoryResetSlot; 25 | 26 | Slot = msg.GetByte(); 27 | 28 | return true; 29 | } 30 | 31 | public override void ToNetworkMessage(NetworkMessage msg) 32 | { 33 | msg.AddByte((byte)Type); 34 | msg.AddByte(Slot); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/InventorySetSlotPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class InventorySetSlotPacket : IncomingPacket 6 | { 7 | public byte Slot { get; set; } 8 | public Objects.Item Item { get; set; } 9 | 10 | public InventorySetSlotPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.InventorySetSlot; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.InventorySetSlot) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.InventorySetSlot; 26 | 27 | Slot = msg.GetByte(); 28 | 29 | Item = msg.GetItem(); 30 | 31 | return true; 32 | } 33 | 34 | public override void ToNetworkMessage(NetworkMessage msg) 35 | { 36 | msg.AddByte((byte)Type); 37 | msg.AddByte(Slot); 38 | 39 | msg.AddItem(Item); 40 | } 41 | 42 | public static bool Send(Objects.Client client, byte slot, Objects.Item item) 43 | { 44 | InventorySetSlotPacket p = new InventorySetSlotPacket(client); 45 | p.Slot = slot; 46 | p.Item = item; 47 | return p.Send(); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ItemTextWindowPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ItemTextWindowPacket : IncomingPacket 6 | { 7 | public uint WindowId { get; set; } 8 | public ushort ItemId { get; set; } 9 | public ushort MaxLength { get; set; } 10 | public string Text { get; set; } 11 | public string Author { get; set; } 12 | public string Date { get; set; } 13 | 14 | public ItemTextWindowPacket(Objects.Client c) 15 | : base(c) 16 | { 17 | Type = IncomingPacketType.ItemTextWindow; 18 | Destination = PacketDestination.Client; 19 | } 20 | 21 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 22 | { 23 | int position = msg.Position; 24 | 25 | if (msg.GetByte() != (byte)IncomingPacketType.ItemTextWindow) 26 | return false; 27 | 28 | Destination = destination; 29 | Type = IncomingPacketType.ItemTextWindow; 30 | 31 | WindowId = msg.GetUInt32(); 32 | ItemId = msg.GetUInt16(); 33 | MaxLength = msg.GetUInt16(); 34 | Text = msg.GetString(); 35 | Author = msg.GetString(); 36 | Date = msg.GetString(); 37 | 38 | return true; 39 | } 40 | 41 | public override void ToNetworkMessage(NetworkMessage msg) 42 | { 43 | msg.AddByte((byte)Type); 44 | 45 | msg.AddUInt32(WindowId); 46 | msg.AddUInt16(ItemId); 47 | msg.AddUInt16(MaxLength); 48 | msg.AddString(Text); 49 | msg.AddString(Author); 50 | msg.AddString(Date); 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/MagicEffectPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | using Tibia.Objects; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class MagicEffectPacket : IncomingPacket 7 | { 8 | public Location Location { get; set; } 9 | public Effect Effect { get; set; } 10 | 11 | public MagicEffectPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.MagicEffect; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.MagicEffect) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.MagicEffect; 27 | 28 | Location = msg.GetLocation(); 29 | Effect = (Effect)msg.GetByte(); 30 | 31 | return true; 32 | } 33 | 34 | public override void ToNetworkMessage(NetworkMessage msg) 35 | { 36 | msg.AddByte((byte)Type); 37 | msg.AddLocation(Location); 38 | msg.AddByte((byte)Effect); 39 | } 40 | 41 | public static bool Send(Objects.Client client, Location location, Effect effect) 42 | { 43 | MagicEffectPacket p = new MagicEffectPacket(client); 44 | p.Location = location; 45 | p.Effect = effect; 46 | 47 | return p.Send(); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/MoveEastPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class MoveEastPacket : MapPacket 7 | { 8 | 9 | public MoveEastPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = IncomingPacketType.MoveEast; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination, NetworkMessage outMsg) 16 | { 17 | int msgPosition = msg.Position, outMsgPosition = outMsg.Position; 18 | 19 | if (msg.GetByte() != (byte)IncomingPacketType.MoveEast) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = IncomingPacketType.MoveEast; 24 | outMsg.AddByte((byte)Type); 25 | 26 | Client.playerLocation.X++; 27 | 28 | return ParseMapDescription(msg, Client.playerLocation.X + 9, Client.playerLocation.Y - 6, Client.playerLocation.Z, 1, 14, outMsg); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/MoveNorthPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class MoveNorthPacket : MapPacket 7 | { 8 | public MoveNorthPacket(Objects.Client c) 9 | : base(c) 10 | { 11 | Type = IncomingPacketType.MoveNorth; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination, NetworkMessage outMsg) 15 | { 16 | int msgPosition = msg.Position, outMsgPosition = outMsg.Position; 17 | 18 | if (msg.GetByte() != (byte)IncomingPacketType.MoveNorth) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = IncomingPacketType.MoveNorth; 23 | outMsg.AddByte((byte)Type); 24 | 25 | Client.playerLocation.Y--; 26 | 27 | return ParseMapDescription(msg, Client.playerLocation.X - 8, Client.playerLocation.Y - 6, Client.playerLocation.Z, 18, 1, outMsg); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/MoveSouthPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class MoveSouthPacket : MapPacket 7 | { 8 | public MoveSouthPacket(Objects.Client c) 9 | : base(c) 10 | { 11 | Type = IncomingPacketType.MoveSouth ; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination, NetworkMessage outMsg) 15 | { 16 | int msgPosition = msg.Position, outMsgPosition = outMsg.Position; 17 | 18 | if (msg.GetByte() != (byte)IncomingPacketType.MoveSouth) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = IncomingPacketType.MoveSouth; 23 | outMsg.AddByte((byte)Type); 24 | 25 | Client.playerLocation.Y++; 26 | 27 | return ParseMapDescription(msg, Client.playerLocation.X - 8, Client.playerLocation.Y + 7, Client.playerLocation.Z, 18, 1, outMsg); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/MoveWestPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class MoveWestPacket : MapPacket 7 | { 8 | public MoveWestPacket(Objects.Client c) 9 | : base(c) 10 | { 11 | Type = IncomingPacketType.MoveWest; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination, NetworkMessage outMsg) 15 | { 16 | int msgPosition = msg.Position, outMsgPosition = outMsg.Position; 17 | 18 | if (msg.GetByte() != (byte)IncomingPacketType.MoveWest) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = IncomingPacketType.MoveWest; 23 | outMsg.AddByte((byte)Type); 24 | 25 | Client.playerLocation.X--; 26 | 27 | return ParseMapDescription(msg, Client.playerLocation.X - 8, Client.playerLocation.Y - 6, Client.playerLocation.Z, 1, 14, outMsg); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/PingPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class PingPacket : IncomingPacket 6 | { 7 | 8 | public PingPacket(Objects.Client c) 9 | : base(c) 10 | { 11 | Type = IncomingPacketType.Ping; 12 | Destination = PacketDestination.Client; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 16 | { 17 | if (msg.GetByte() != (byte)IncomingPacketType.Ping) 18 | return false; 19 | 20 | Destination = destination; 21 | Type = IncomingPacketType.Ping; 22 | 23 | //no data 24 | 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/PlayerFlagsPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class PlayerFlagsPacket : IncomingPacket 6 | { 7 | 8 | public ushort Flag { get; set; } 9 | 10 | public PlayerFlagsPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.PlayerFlags; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.PlayerFlags) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.PlayerFlags; 26 | 27 | Flag = msg.GetUInt16(); 28 | 29 | return true; 30 | } 31 | 32 | public override void ToNetworkMessage(NetworkMessage msg) 33 | { 34 | msg.AddByte((byte)Type); 35 | msg.AddUInt16(Flag); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/PlayerWalkCancelPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class PlayerWalkCancelPacket : IncomingPacket 6 | { 7 | public byte Direction { get; set; } 8 | 9 | public PlayerWalkCancelPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = IncomingPacketType.PlayerWalkCancel; 13 | Destination = PacketDestination.Client; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | int position = msg.Position; 19 | 20 | if (msg.GetByte() != (byte)IncomingPacketType.PlayerWalkCancel) 21 | return false; 22 | 23 | Destination = destination; 24 | Type = IncomingPacketType.PlayerWalkCancel; 25 | 26 | Direction = msg.GetByte(); 27 | 28 | return true; 29 | } 30 | 31 | public override void ToNetworkMessage(NetworkMessage msg) 32 | { 33 | msg.AddByte((byte)Type); 34 | msg.AddByte(Direction); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/PrivateChannelCreatePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class PrivateChannelCreatePacket : IncomingPacket 6 | { 7 | 8 | public string Name { get; set; } 9 | public ushort ChannelId { get; set; } 10 | 11 | public PrivateChannelCreatePacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.PrivateChannelCreate; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.PrivateChannelCreate) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.PrivateChannelCreate; 27 | 28 | ChannelId = msg.GetUInt16(); 29 | Name = msg.GetString(); 30 | 31 | return true; 32 | } 33 | 34 | public override void ToNetworkMessage(NetworkMessage msg) 35 | { 36 | msg.AddByte((byte)Type); 37 | 38 | msg.AddUInt16(ChannelId); 39 | msg.AddString(Name); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ProjectilePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ProjectilePacket : IncomingPacket 6 | { 7 | 8 | public Objects.Location FromPosition { get; set; } 9 | public Objects.Location ToPosition { get; set; } 10 | public ProjectileType Effect { get; set; } 11 | 12 | public ProjectilePacket(Objects.Client c) 13 | : base(c) 14 | { 15 | Type = IncomingPacketType.Projectile; 16 | Destination = PacketDestination.Client; 17 | } 18 | 19 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 20 | { 21 | int position = msg.Position; 22 | 23 | if (msg.GetByte() != (byte)IncomingPacketType.Projectile) 24 | return false; 25 | 26 | Destination = destination; 27 | Type = IncomingPacketType.Projectile; 28 | 29 | FromPosition = msg.GetLocation(); 30 | ToPosition = msg.GetLocation(); 31 | Effect = (ProjectileType)msg.GetByte(); 32 | 33 | return true; 34 | } 35 | 36 | public override void ToNetworkMessage(NetworkMessage msg) 37 | { 38 | msg.AddByte((byte)Type); 39 | msg.AddLocation(FromPosition); 40 | msg.AddLocation(ToPosition); 41 | msg.AddByte((byte)Effect); 42 | } 43 | 44 | public static bool Send(Objects.Client client, Objects.Location fromLocation, Objects.Location toLocation, ProjectileType effect) 45 | { 46 | ProjectilePacket p = new ProjectilePacket(client); 47 | p.FromPosition = fromLocation; 48 | p.ToPosition = toLocation; 49 | p.Effect = effect; 50 | return p.Send(); 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/RuleViolationCancelPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class RuleViolationCancelPacket : IncomingPacket 7 | { 8 | public string Name { get; set; } 9 | 10 | public RuleViolationCancelPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.RuleViolationCancel; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.RuleViolationCancel) 22 | throw new Exception(); 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.RuleViolationCancel; 26 | 27 | Name = msg.GetString(); 28 | 29 | return true; 30 | } 31 | 32 | public override void ToNetworkMessage(NetworkMessage msg) 33 | { 34 | msg.AddByte((byte)Type); 35 | msg.AddString(Name); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/RuleViolationLockPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class RuleViolationLockPacket : IncomingPacket 7 | { 8 | 9 | public RuleViolationLockPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = IncomingPacketType.RuleViolationLock; 13 | Destination = PacketDestination.Client; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)IncomingPacketType.RuleViolationLock) 19 | throw new Exception(); 20 | 21 | Destination = destination; 22 | Type = IncomingPacketType.RuleViolationLock; 23 | 24 | return true; 25 | } 26 | 27 | public override void ToNetworkMessage(NetworkMessage msg) 28 | { 29 | msg.AddByte((byte)Type); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/RuleViolationOpenPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class RuleViolationOpenPacket : IncomingPacket 7 | { 8 | public ushort ChannelId { get; set; } 9 | 10 | public RuleViolationOpenPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.RuleViolationOpen; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.RuleViolationOpen) 22 | throw new Exception(); 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.RuleViolationOpen; 26 | 27 | ChannelId = msg.GetUInt16(); 28 | 29 | return true; 30 | } 31 | 32 | public override void ToNetworkMessage(NetworkMessage msg) 33 | { 34 | msg.AddByte((byte)Type); 35 | msg.AddUInt16(ChannelId); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/RuleViolationRemovePacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class RuleViolationRemovePacket : IncomingPacket 7 | { 8 | public string Name { get; set; } 9 | 10 | public RuleViolationRemovePacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.RuleViolationRemove; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.RuleViolationRemove) 22 | throw new Exception(); 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.RuleViolationRemove; 26 | 27 | Name = msg.GetString(); 28 | 29 | return true; 30 | } 31 | 32 | public override void ToNetworkMessage(NetworkMessage msg) 33 | { 34 | msg.AddByte((byte)Type); 35 | msg.AddString(Name); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/SafeTradeClosePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class SafeTradeClosePacket : IncomingPacket 6 | { 7 | 8 | public SafeTradeClosePacket(Objects.Client c) 9 | : base(c) 10 | { 11 | Type = IncomingPacketType.SafeTradeClose; 12 | Destination = PacketDestination.Client; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 16 | { 17 | if (msg.GetByte() != (byte)IncomingPacketType.SafeTradeClose) 18 | return false; 19 | 20 | Destination = destination; 21 | Type = IncomingPacketType.SafeTradeClose; 22 | 23 | //no data 24 | 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/SafeTradeRequestAckPacket.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class SafeTradeRequestAckPacket : IncomingPacket 7 | { 8 | public string Name { get; set; } 9 | public byte Count { get; set; } 10 | public List Items { get; set; } 11 | 12 | public SafeTradeRequestAckPacket(Objects.Client c) 13 | : base(c) 14 | { 15 | Type = IncomingPacketType.SafeTradeRequestAck; 16 | Destination = PacketDestination.Client; 17 | } 18 | 19 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 20 | { 21 | int position = msg.Position; 22 | 23 | if (msg.GetByte() != (byte)IncomingPacketType.SafeTradeRequestAck) 24 | return false; 25 | 26 | Destination = destination; 27 | Type = IncomingPacketType.SafeTradeRequestAck; 28 | 29 | Name = msg.GetString(); 30 | Count = msg.GetByte(); 31 | 32 | Items = new List(Count); 33 | 34 | for (int i = 0; i < Count; i++) 35 | { 36 | Objects.Item item = msg.GetItem(); 37 | 38 | Items.Add(item); 39 | } 40 | 41 | return true; 42 | } 43 | 44 | public override void ToNetworkMessage(NetworkMessage msg) 45 | { 46 | msg.AddByte((byte)Type); 47 | 48 | msg.AddString(Name); 49 | msg.AddByte((byte)Items.Count); 50 | 51 | foreach (Objects.Item i in Items) 52 | { 53 | msg.AddItem(i); 54 | } 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/SafeTradeRequestNoAckPacket.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class SafeTradeRequestNoAckPacket : IncomingPacket 7 | { 8 | public string Name { get; set; } 9 | public byte Count { get; set; } 10 | public List Items { get; set; } 11 | 12 | public SafeTradeRequestNoAckPacket(Objects.Client c) 13 | : base(c) 14 | { 15 | Type = IncomingPacketType.SafeTradeRequestNoAck; 16 | Destination = PacketDestination.Client; 17 | } 18 | 19 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 20 | { 21 | int position = msg.Position; 22 | 23 | if (msg.GetByte() != (byte)IncomingPacketType.SafeTradeRequestNoAck) 24 | return false; 25 | 26 | Destination = destination; 27 | Type = IncomingPacketType.SafeTradeRequestNoAck; 28 | 29 | Name = msg.GetString(); 30 | Count = msg.GetByte(); 31 | 32 | Items = new List(Count); 33 | 34 | for (int i = 0; i < Count; i++) 35 | { 36 | Objects.Item item = msg.GetItem(); 37 | 38 | Items.Add(item); 39 | } 40 | 41 | return true; 42 | } 43 | 44 | public override void ToNetworkMessage(NetworkMessage msg) 45 | { 46 | msg.AddByte((byte)Type); 47 | 48 | msg.AddString(Name); 49 | msg.AddByte((byte)Items.Count); 50 | 51 | foreach (Objects.Item i in Items) 52 | { 53 | msg.AddItem(i); 54 | } 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/SelfAppearPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class SelfAppearPacket : IncomingPacket 6 | { 7 | public uint YourId { get; set; } 8 | public ushort Unknown { get; set; } 9 | public byte CanReportBug { get; set; } 10 | 11 | public SelfAppearPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.SelfAppear; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.SelfAppear) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.SelfAppear; 27 | 28 | YourId = msg.GetUInt32(); 29 | Unknown = msg.GetUInt16(); // Related to client-side drawing speed 30 | CanReportBug = msg.GetByte(); 31 | 32 | return true; 33 | } 34 | 35 | public override void ToNetworkMessage(NetworkMessage msg) 36 | { 37 | msg.AddByte((byte)Type); 38 | msg.AddUInt32(YourId); 39 | msg.AddUInt16(0x0032); // Related to client-side drawing speed 40 | msg.AddByte(CanReportBug); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ShopSaleGoldCountPacket.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class ShopSaleGoldCountPacket : IncomingPacket 7 | { 8 | public uint Cash { get; set; } 9 | public List ItemList { get; set; } 10 | 11 | public ShopSaleGoldCountPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.ShopSaleGoldCount; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.ShopSaleGoldCount) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.ShopSaleGoldCount; 27 | 28 | Cash = msg.GetUInt32(); 29 | byte count = msg.GetByte(); 30 | 31 | ItemList = new List { }; 32 | 33 | for (int i = 0; i < count; i++) 34 | { 35 | ShopInfo item = new ShopInfo(); 36 | 37 | item.ItemId = msg.GetUInt16(); 38 | item.SubType = msg.GetByte(); 39 | 40 | ItemList.Add(item); 41 | } 42 | 43 | return true; 44 | } 45 | 46 | public override void ToNetworkMessage(NetworkMessage msg) 47 | { 48 | msg.AddByte((byte)Type); 49 | msg.AddUInt32(Cash); 50 | 51 | msg.AddByte((byte)ItemList.Count); 52 | 53 | foreach (ShopInfo i in ItemList) 54 | { 55 | msg.AddUInt16(i.ItemId); 56 | msg.AddByte(i.SubType); 57 | } 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/ShopWindowClosePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class ShopWindowClosePacket : IncomingPacket 6 | { 7 | 8 | public ShopWindowClosePacket(Objects.Client c) 9 | : base(c) 10 | { 11 | Type = IncomingPacketType.ShopWindowClose; 12 | Destination = PacketDestination.Client; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 16 | { 17 | if (msg.GetByte() != (byte)IncomingPacketType.ShopWindowClose) 18 | return false; 19 | 20 | Destination = destination; 21 | Type = IncomingPacketType.ShopWindowClose; 22 | 23 | //no data 24 | 25 | return true; 26 | } 27 | 28 | public override void ToNetworkMessage(NetworkMessage msg) 29 | { 30 | msg.AddByte((byte)Type); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/TextMessagePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class TextMessagePacket : IncomingPacket 6 | { 7 | public TextMessageColor Color { get; set; } 8 | public string Message { get; set; } 9 | 10 | public TextMessagePacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.TextMessage; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.TextMessage) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.TextMessage; 26 | 27 | Color = (TextMessageColor)msg.GetByte(); 28 | Message = msg.GetString(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | msg.AddByte((byte)Color); 37 | msg.AddString(Message); 38 | } 39 | 40 | public static bool Send(Objects.Client client, TextMessageColor color, string msg) 41 | { 42 | TextMessagePacket p = new TextMessagePacket(client); 43 | p.Color = color; 44 | p.Message = msg; 45 | 46 | return p.Send(); 47 | } 48 | 49 | } 50 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/TileRemoveThingPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class TileRemoveThingPacket : IncomingPacket 6 | { 7 | public byte StackPosition { get; set; } 8 | public Objects.Location Position { get; set; } 9 | 10 | public TileRemoveThingPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.TileRemoveThing; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | int position = msg.Position; 20 | 21 | if (msg.GetByte() != (byte)IncomingPacketType.TileRemoveThing) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.TileRemoveThing; 26 | 27 | Position = msg.GetLocation(); 28 | StackPosition = msg.GetByte(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | msg.AddLocation(Position); 37 | msg.AddByte(StackPosition); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/TileUpdatePacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | 4 | namespace Tibia.Packets.Incoming 5 | { 6 | public class TileUpdatePacket : MapPacket 7 | { 8 | public TileUpdatePacket(Objects.Client c) 9 | : base(c) 10 | { 11 | Type = IncomingPacketType.TileUpdate; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination, NetworkMessage outMsg) 15 | { 16 | if (msg.GetByte() != (byte)IncomingPacketType.TileUpdate) 17 | return false; 18 | 19 | Destination = destination; 20 | Type = IncomingPacketType.TileUpdate; 21 | outMsg.AddByte((byte)Type); 22 | 23 | Objects.Location pos = msg.GetLocation(); 24 | outMsg.AddLocation(pos); 25 | 26 | ushort thingId = msg.PeekUInt16(); 27 | 28 | if (thingId == 0xFF01) 29 | { 30 | outMsg.AddUInt16(msg.GetUInt16()); 31 | } 32 | else 33 | { 34 | ParseTileDescription(msg, pos, outMsg); 35 | outMsg.AddUInt16(msg.GetUInt16()); 36 | } 37 | 38 | return true; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/VipLoginPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class VipLoginPacket : IncomingPacket 6 | { 7 | 8 | public uint PlayerId { get; set; } 9 | 10 | public VipLoginPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.VipLogin; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)IncomingPacketType.VipLogin) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = IncomingPacketType.VipLogin; 24 | 25 | PlayerId = msg.GetUInt32(); 26 | 27 | return true; 28 | } 29 | 30 | public override void ToNetworkMessage(NetworkMessage msg) 31 | { 32 | msg.AddByte((byte)Type); 33 | msg.AddUInt32(PlayerId); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/VipLogoutPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class VipLogoutPacket : IncomingPacket 6 | { 7 | 8 | public uint PlayerId { get; set; } 9 | 10 | public VipLogoutPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.VipLogout; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)IncomingPacketType.VipLogout) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = IncomingPacketType.VipLogout; 24 | 25 | PlayerId = msg.GetUInt32(); 26 | 27 | return true; 28 | } 29 | 30 | public override void ToNetworkMessage(NetworkMessage msg) 31 | { 32 | msg.AddByte((byte)Type); 33 | 34 | msg.AddUInt32(PlayerId); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/VipStatePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class VipStatePacket : IncomingPacket 6 | { 7 | 8 | public uint PlayerId { get; set; } 9 | public string PlayerName { get; set; } 10 | public byte PlayerState { get; set; } 11 | 12 | public VipStatePacket(Objects.Client c) 13 | : base(c) 14 | { 15 | Type = IncomingPacketType.VipState; 16 | Destination = PacketDestination.Client; 17 | } 18 | 19 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 20 | { 21 | if (msg.GetByte() != (byte)IncomingPacketType.VipState) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = IncomingPacketType.VipState; 26 | 27 | PlayerId = msg.GetUInt32(); 28 | PlayerName = msg.GetString(); 29 | PlayerState = msg.GetByte(); 30 | 31 | return true; 32 | } 33 | 34 | public override void ToNetworkMessage(NetworkMessage msg) 35 | { 36 | msg.AddByte((byte)Type); 37 | msg.AddUInt32(PlayerId); 38 | msg.AddString(PlayerName); 39 | msg.AddByte(PlayerState); 40 | } 41 | 42 | public static bool Send(Objects.Client client, uint playerId, string playerName, byte state) 43 | { 44 | VipStatePacket p = new VipStatePacket(client); 45 | p.PlayerId = playerId; 46 | p.PlayerName = playerName; 47 | p.PlayerState = state; 48 | return p.Send(); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/WaitingListPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class WaitingListPacket : IncomingPacket 6 | { 7 | public string Message { get; set; } 8 | public byte Time { get; set; } 9 | 10 | public WaitingListPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = IncomingPacketType.WaitingList; 14 | Destination = PacketDestination.Client; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)IncomingPacketType.WaitingList) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = IncomingPacketType.WaitingList; 24 | 25 | Message = msg.GetString(); 26 | Time = msg.GetByte(); 27 | 28 | return true; 29 | } 30 | 31 | public override void ToNetworkMessage(NetworkMessage msg) 32 | { 33 | msg.AddByte((byte)Type); 34 | msg.AddString(Message); 35 | msg.AddByte(Time); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Incoming/WorldLightPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Incoming 4 | { 5 | public class WorldLightPacket : IncomingPacket 6 | { 7 | 8 | public byte LightLevel { get; set; } 9 | public byte LightColor { get; set; } 10 | 11 | public WorldLightPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = IncomingPacketType.WorldLight; 15 | Destination = PacketDestination.Client; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | int position = msg.Position; 21 | 22 | if (msg.GetByte() != (byte)IncomingPacketType.WorldLight) 23 | return false; 24 | 25 | Destination = destination; 26 | Type = IncomingPacketType.WorldLight; 27 | 28 | LightLevel = msg.GetByte(); 29 | LightColor = msg.GetByte(); 30 | 31 | return true; 32 | } 33 | 34 | public override void ToNetworkMessage(NetworkMessage msg) 35 | { 36 | msg.AddByte((byte)Type); 37 | msg.AddByte(LightLevel); 38 | msg.AddByte(LightColor); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/IncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets 4 | { 5 | public class IncomingPacket : Packet 6 | { 7 | public IncomingPacketType Type { get; set; } 8 | 9 | public IncomingPacket(Objects.Client c) 10 | : base(c) {} 11 | } 12 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/AttackPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class AttackPacket : OutgoingPacket 6 | { 7 | public uint CreatureId { get; set; } 8 | public uint Count { get; set; } 9 | 10 | public AttackPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = OutgoingPacketType.Attack; 14 | Destination = PacketDestination.Server; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)OutgoingPacketType.Attack) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = OutgoingPacketType.Attack; 24 | 25 | CreatureId = msg.GetUInt32(); 26 | 27 | if (Client.VersionNumber >= 860) 28 | { 29 | Count = msg.GetUInt32(); 30 | } 31 | 32 | return true; 33 | } 34 | 35 | public override void ToNetworkMessage(NetworkMessage msg) 36 | { 37 | msg.AddByte((byte)Type); 38 | 39 | msg.AddUInt32(CreatureId); 40 | 41 | if (Client.VersionNumber >= 860) 42 | { 43 | msg.AddUInt32(Count); 44 | } 45 | } 46 | 47 | public static bool Send(Objects.Client client, uint creatureId) 48 | { 49 | AttackPacket p = new AttackPacket(client); 50 | p.CreatureId = creatureId; 51 | 52 | if (client.VersionNumber >= 860) 53 | { 54 | uint count = client.Player.AttackCount; 55 | p.Count = count; 56 | } 57 | return p.Send(); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/AutoWalkCancelPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class AutoWalkCancelPacket : OutgoingPacket 6 | { 7 | public AutoWalkCancelPacket(Objects.Client c) 8 | : base(c) 9 | { 10 | Type = OutgoingPacketType.AutoWalkCancel; 11 | Destination = PacketDestination.Server; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 15 | { 16 | if (msg.GetByte() != (byte)OutgoingPacketType.AutoWalkCancel) 17 | return false; 18 | 19 | Destination = destination; 20 | Type = OutgoingPacketType.AutoWalkCancel; 21 | 22 | return true; 23 | } 24 | 25 | public override void ToNetworkMessage(NetworkMessage msg) 26 | { 27 | msg.AddByte((byte)Type); 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | LogoutPacket p = new LogoutPacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/CancelMovePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class CancelMovePacket : OutgoingPacket 6 | { 7 | public CancelMovePacket(Objects.Client c) 8 | : base(c) 9 | { 10 | Type = OutgoingPacketType.CancelMove; 11 | Destination = PacketDestination.Server; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 15 | { 16 | if (msg.GetByte() != (byte)OutgoingPacketType.CancelMove) 17 | return false; 18 | 19 | Destination = destination; 20 | Type = OutgoingPacketType.CancelMove; 21 | 22 | return true; 23 | } 24 | 25 | public override void ToNetworkMessage(NetworkMessage msg) 26 | { 27 | msg.AddByte((byte)Type); 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | AttackPacket p = new AttackPacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/ChannelClosePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class ChannelClosePacket : OutgoingPacket 6 | { 7 | 8 | public ChatChannel ChannelId { get; set; } 9 | 10 | public ChannelClosePacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = OutgoingPacketType.ChannelClose; 14 | Destination = PacketDestination.Server; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)OutgoingPacketType.ChannelClose) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = OutgoingPacketType.ChannelClose; 24 | 25 | ChannelId = (ChatChannel)msg.GetUInt16(); 26 | 27 | return true; 28 | } 29 | 30 | public override void ToNetworkMessage(NetworkMessage msg) 31 | { 32 | msg.AddByte((byte)Type); 33 | msg.AddUInt16((ushort)ChannelId); 34 | } 35 | 36 | public static bool Send(Objects.Client client, ChatChannel channel) 37 | { 38 | ChannelClosePacket p = new ChannelClosePacket(client); 39 | p.ChannelId = channel; 40 | return p.Send(); 41 | } 42 | 43 | } 44 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/ChannelListPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class ChannelListPacket : OutgoingPacket 6 | { 7 | public ChannelListPacket(Objects.Client c) 8 | : base(c) 9 | { 10 | Type = OutgoingPacketType.ChannelList; 11 | Destination = PacketDestination.Server; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 15 | { 16 | if (msg.GetByte() != (byte)OutgoingPacketType.ChannelList) 17 | return false; 18 | 19 | Destination = destination; 20 | Type = OutgoingPacketType.ChannelList; 21 | 22 | return true; 23 | } 24 | 25 | public override void ToNetworkMessage(NetworkMessage msg) 26 | { 27 | msg.AddByte((byte)Type); 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | ChannelListPacket p = new ChannelListPacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/ChannelOpenPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class ChannelOpenPacket : OutgoingPacket 6 | { 7 | 8 | public ChatChannel ChannelId { get; set; } 9 | 10 | public ChannelOpenPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = OutgoingPacketType.ChannelOpen; 14 | Destination = PacketDestination.Server; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)OutgoingPacketType.ChannelOpen) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = OutgoingPacketType.ChannelOpen; 24 | 25 | ChannelId = (ChatChannel)msg.GetUInt16(); 26 | 27 | return true; 28 | } 29 | 30 | public override void ToNetworkMessage(NetworkMessage msg) 31 | { 32 | msg.AddByte((byte)Type); 33 | msg.AddUInt16((ushort)ChannelId); 34 | } 35 | 36 | public static bool Send(Objects.Client client, ChatChannel channel) 37 | { 38 | ChannelOpenPacket p = new ChannelOpenPacket(client); 39 | p.ChannelId = channel; 40 | return p.Send(); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/ContainerClosePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class ContainerClosePacket : OutgoingPacket 6 | { 7 | public byte Id { get; set; } 8 | 9 | public ContainerClosePacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = OutgoingPacketType.ContainerClose; 13 | Destination = PacketDestination.Server; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)OutgoingPacketType.ContainerClose) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = OutgoingPacketType.ContainerClose; 23 | 24 | Id = msg.GetByte(); 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | msg.AddByte(Id); 33 | } 34 | 35 | public static bool Send(Objects.Client client, byte id) 36 | { 37 | ContainerClosePacket p = new ContainerClosePacket(client); 38 | p.Id = id; 39 | return p.Send(); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/ContainerOpenParentPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class ContainerOpenParentPacket : OutgoingPacket 6 | { 7 | public byte Id { get; set; } 8 | 9 | public ContainerOpenParentPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = OutgoingPacketType.ContainerOpenParent; 13 | Destination = PacketDestination.Server; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)OutgoingPacketType.ContainerOpenParent) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = OutgoingPacketType.ContainerOpenParent; 23 | 24 | Id = msg.GetByte(); 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | msg.AddByte(Id); 33 | } 34 | 35 | public static bool Send(Objects.Client client, byte id) 36 | { 37 | ContainerOpenParentPacket p = new ContainerOpenParentPacket(client); 38 | p.Id = id; 39 | return p.Send(); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/FightModesPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class FightModesPacket : OutgoingPacket 6 | { 7 | public byte FightMode { get; set; } 8 | public byte ChaseMode { get; set; } 9 | public byte SafeMode { get; set; } 10 | 11 | public FightModesPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = OutgoingPacketType.FightModes; 15 | Destination = PacketDestination.Server; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | if (msg.GetByte() != (byte)OutgoingPacketType.FightModes) 21 | return false; 22 | 23 | Destination = destination; 24 | Type = OutgoingPacketType.FightModes; 25 | 26 | FightMode = msg.GetByte(); 27 | ChaseMode = msg.GetByte(); 28 | SafeMode = msg.GetByte(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | 37 | msg.AddByte(FightMode); 38 | msg.AddByte(ChaseMode); 39 | msg.AddByte(SafeMode); 40 | } 41 | 42 | public static bool Send(Objects.Client client, byte fightMode, byte chaseMode, byte safeMode) 43 | { 44 | FightModesPacket p = new FightModesPacket(client); 45 | p.FightMode = fightMode; 46 | p.ChaseMode = chaseMode; 47 | p.SafeMode = safeMode; 48 | return p.Send(); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/FollowPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class FollowPacket : OutgoingPacket 6 | { 7 | public uint CreatureId { get; set; } 8 | public uint Count { get; set; } 9 | 10 | public FollowPacket(Objects.Client c) 11 | : base(c) 12 | { 13 | Type = OutgoingPacketType.Follow; 14 | Destination = PacketDestination.Server; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)OutgoingPacketType.Follow) 20 | return false; 21 | 22 | Destination = destination; 23 | Type = OutgoingPacketType.Follow; 24 | 25 | CreatureId = msg.GetUInt32(); 26 | 27 | if (Client.VersionNumber >= 860) 28 | { 29 | Count = msg.GetUInt32(); 30 | } 31 | 32 | return true; 33 | } 34 | 35 | public override void ToNetworkMessage(NetworkMessage msg) 36 | { 37 | msg.AddByte((byte)Type); 38 | msg.AddUInt32(CreatureId); 39 | 40 | if (Client.VersionNumber >= 860) 41 | { 42 | msg.AddUInt32(Count); 43 | } 44 | } 45 | 46 | public static bool Send(Objects.Client client, uint creatureId) 47 | { 48 | FollowPacket p = new FollowPacket(client); 49 | p.CreatureId = creatureId; 50 | 51 | if (client.VersionNumber >= 860) 52 | { 53 | uint count = client.Player.FollowCount; 54 | p.Count = count; 55 | } 56 | return p.Send(); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/ItemRotatePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class ItemRotatePacket : OutgoingPacket 6 | { 7 | public Objects.Location Location { get; set; } 8 | public ushort ItemId { get; set; } 9 | public byte StackPosition { get; set; } 10 | 11 | public ItemRotatePacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = OutgoingPacketType.ItemRotate; 15 | Destination = PacketDestination.Server; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | if (msg.GetByte() != (byte)OutgoingPacketType.ItemRotate) 21 | return false; 22 | 23 | Destination = destination; 24 | Type = OutgoingPacketType.ItemRotate; 25 | 26 | Location = msg.GetLocation(); 27 | ItemId = msg.GetUInt16(); 28 | StackPosition = msg.GetByte(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | 36 | msg.AddByte((byte)Type); 37 | 38 | msg.AddLocation(Location); 39 | msg.AddUInt16(ItemId); 40 | msg.AddByte(StackPosition); 41 | } 42 | 43 | public static bool Send(Objects.Client client, Objects.Location location, ushort itemId, byte stackPosition) 44 | { 45 | ItemRotatePacket p = new ItemRotatePacket(client); 46 | 47 | p.Location = location; 48 | p.ItemId = itemId; 49 | p.StackPosition = stackPosition; 50 | 51 | return p.Send(); 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/LogoutPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class LogoutPacket : OutgoingPacket 6 | { 7 | public LogoutPacket(Objects.Client c) 8 | : base(c) 9 | { 10 | Type = OutgoingPacketType.Logout; 11 | Destination = PacketDestination.Server; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 15 | { 16 | if (msg.GetByte() != (byte)OutgoingPacketType.Logout) 17 | return false; 18 | 19 | Destination = destination; 20 | Type = OutgoingPacketType.Logout; 21 | 22 | return true; 23 | } 24 | 25 | public override void ToNetworkMessage(NetworkMessage msg) 26 | { 27 | msg.AddByte((byte)Type); 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | LogoutPacket p = new LogoutPacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/LookAtPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class LookAtPacket : OutgoingPacket 6 | { 7 | 8 | public Objects.Location Location { get; set; } 9 | public ushort SpriteId { get; set; } 10 | public byte StackPosition { get; set; } 11 | 12 | public LookAtPacket(Objects.Client c) 13 | : base(c) 14 | { 15 | Type = OutgoingPacketType.LookAt; 16 | Destination = PacketDestination.Server; 17 | } 18 | 19 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 20 | { 21 | if (msg.GetByte() != (byte)OutgoingPacketType.LookAt) 22 | return false; 23 | 24 | Destination = destination; 25 | Type = OutgoingPacketType.LookAt; 26 | 27 | Location = msg.GetLocation(); 28 | SpriteId = msg.GetUInt16(); 29 | StackPosition = msg.GetByte(); 30 | 31 | return true; 32 | } 33 | 34 | public override void ToNetworkMessage(NetworkMessage msg) 35 | { 36 | msg.AddByte((byte)Type); 37 | 38 | msg.AddLocation(Location); 39 | msg.AddUInt16(SpriteId); 40 | msg.AddByte(StackPosition); 41 | } 42 | 43 | public static bool Send(Objects.Client client, Objects.Location position, ushort spriteId, byte stackPosition) 44 | { 45 | LookAtPacket p = new LookAtPacket(client); 46 | p.Location = position; 47 | p.SpriteId = spriteId; 48 | p.StackPosition = stackPosition; 49 | return p.Send(); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/NpcChannelClosePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class NpcChannelClosePacket : OutgoingPacket 6 | { 7 | public NpcChannelClosePacket(Objects.Client c) 8 | : base(c) 9 | { 10 | Type = OutgoingPacketType.NpcChannelClose; 11 | Destination = PacketDestination.Server; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 15 | { 16 | if (msg.GetByte() != (byte)OutgoingPacketType.NpcChannelClose) 17 | return false; 18 | 19 | Destination = destination; 20 | Type = OutgoingPacketType.NpcChannelClose; 21 | 22 | return true; 23 | } 24 | 25 | public override void ToNetworkMessage(NetworkMessage msg) 26 | { 27 | msg.AddByte((byte)Type); 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | NpcChannelClosePacket p = new NpcChannelClosePacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/PingPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class PingPacket : OutgoingPacket 6 | { 7 | public PingPacket(Objects.Client c) 8 | : base(c) 9 | { 10 | Type = OutgoingPacketType.Ping; 11 | Destination = PacketDestination.Server; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 15 | { 16 | if (msg.GetByte() != (byte)OutgoingPacketType.Ping) 17 | return false; 18 | 19 | Destination = destination; 20 | Type = OutgoingPacketType.Ping; 21 | 22 | return true; 23 | } 24 | 25 | public override void ToNetworkMessage(NetworkMessage msg) 26 | { 27 | msg.AddByte((byte)Type); 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | PingPacket p = new PingPacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/PrivateChannelOpenPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class PrivateChannelOpenPacket : OutgoingPacket 6 | { 7 | public string Receiver { get; set; } 8 | 9 | public PrivateChannelOpenPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = OutgoingPacketType.PrivateChannelOpen; 13 | Destination = PacketDestination.Server; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)OutgoingPacketType.PrivateChannelOpen) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = OutgoingPacketType.PrivateChannelOpen; 23 | Receiver = msg.GetString(); 24 | 25 | return true; 26 | } 27 | 28 | public override void ToNetworkMessage(NetworkMessage msg) 29 | { 30 | msg.AddByte((byte)Type); 31 | msg.AddString(Receiver); 32 | } 33 | 34 | public static bool Send(Objects.Client client, string receiver) 35 | { 36 | PrivateChannelOpenPacket p = new PrivateChannelOpenPacket(client); 37 | p.Receiver = receiver; 38 | return p.Send(); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/SetOutfitPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class SetOutfitPacket : OutgoingPacket 6 | { 7 | public Objects.Outfit Outfit { get; set; } 8 | 9 | public SetOutfitPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = OutgoingPacketType.SetOutfit; 13 | Destination = PacketDestination.Server; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)OutgoingPacketType.SetOutfit) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = OutgoingPacketType.SetOutfit; 23 | 24 | Outfit = msg.GetOutfit(); 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | msg.AddOutfit(Outfit); 33 | } 34 | 35 | public static bool Send(Objects.Client client, Objects.Outfit outfit) 36 | { 37 | SetOutfitPacket p = new SetOutfitPacket(client); 38 | p.Outfit = outfit; 39 | return p.Send(); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/ShopClosePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class ShopClosePacket : OutgoingPacket 6 | { 7 | public ShopClosePacket(Objects.Client c) 8 | : base(c) 9 | { 10 | Type = OutgoingPacketType.ShopClose; 11 | Destination = PacketDestination.Server; 12 | } 13 | 14 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 15 | { 16 | if (msg.GetByte() != (byte)OutgoingPacketType.ShopClose) 17 | return false; 18 | 19 | Destination = destination; 20 | Type = OutgoingPacketType.ShopClose; 21 | 22 | return true; 23 | } 24 | 25 | public override void ToNetworkMessage(NetworkMessage msg) 26 | { 27 | msg.AddByte((byte)Type); 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | ShopClosePacket p = new ShopClosePacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/ShopSellPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class ShopSellPacket : OutgoingPacket 6 | { 7 | public ushort ItemId { get; set; } 8 | public byte Count { get; set; } 9 | public byte Amount { get; set; } 10 | 11 | public ShopSellPacket(Objects.Client c) 12 | : base(c) 13 | { 14 | Type = OutgoingPacketType.ShopSell; 15 | Destination = PacketDestination.Server; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | if (msg.GetByte() != (byte)OutgoingPacketType.ShopSell) 21 | return false; 22 | 23 | Destination = destination; 24 | Type = OutgoingPacketType.ShopSell; 25 | 26 | ItemId = msg.GetUInt16(); 27 | Count = msg.GetByte(); 28 | Amount = msg.GetByte(); 29 | 30 | return true; 31 | } 32 | 33 | public override void ToNetworkMessage(NetworkMessage msg) 34 | { 35 | msg.AddByte((byte)Type); 36 | 37 | msg.AddUInt16(ItemId); 38 | msg.AddByte(Count); 39 | msg.AddByte(Amount); 40 | } 41 | 42 | public static bool Send(Objects.Client client, ushort itemId, byte count, byte amount) 43 | { 44 | ShopSellPacket p = new ShopSellPacket(client); 45 | 46 | p.ItemId = itemId; 47 | p.Count = count; 48 | p.Amount = amount; 49 | 50 | return p.Send(); 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/TileUpdatePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class TileUpdatePacket : OutgoingPacket 6 | { 7 | public Objects.Location Location { get; set; } 8 | 9 | public TileUpdatePacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = OutgoingPacketType.TileUpdate; 13 | Destination = PacketDestination.Server; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)OutgoingPacketType.TileUpdate) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = OutgoingPacketType.TileUpdate; 23 | 24 | Location = msg.GetLocation(); 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | msg.AddLocation(Location); 33 | } 34 | 35 | public static bool Send(Objects.Client client, Objects.Location location) 36 | { 37 | TileUpdatePacket p = new TileUpdatePacket(client); 38 | p.Location = location; 39 | return p.Send(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/VipAddPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class VipAddPacket : OutgoingPacket 6 | { 7 | public string Name { get; set; } 8 | 9 | public VipAddPacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = OutgoingPacketType.VipAdd; 13 | Destination = PacketDestination.Server; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)OutgoingPacketType.VipAdd) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = OutgoingPacketType.VipAdd; 23 | 24 | Name = msg.GetString(); 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | msg.AddString(Name); 33 | } 34 | 35 | public static bool Send(Objects.Client client, string name) 36 | { 37 | VipAddPacket p = new VipAddPacket(client); 38 | p.Name = name; 39 | return p.Send(); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Outgoing/VipRemovePacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Outgoing 4 | { 5 | public class VipRemovePacket : OutgoingPacket 6 | { 7 | public uint Id { get; set; } 8 | 9 | public VipRemovePacket(Objects.Client c) 10 | : base(c) 11 | { 12 | Type = OutgoingPacketType.VipRemove; 13 | Destination = PacketDestination.Server; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)OutgoingPacketType.VipRemove) 19 | return false; 20 | 21 | Destination = destination; 22 | Type = OutgoingPacketType.VipRemove; 23 | 24 | Id = msg.GetUInt32(); 25 | 26 | return true; 27 | } 28 | 29 | public override void ToNetworkMessage(NetworkMessage msg) 30 | { 31 | msg.AddByte((byte)Type); 32 | 33 | msg.AddUInt32(Id); 34 | } 35 | 36 | public static bool Send(Objects.Client client, uint id) 37 | { 38 | VipRemovePacket p = new VipRemovePacket(client); 39 | p.Id = id; 40 | return p.Send(); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/OutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets 4 | { 5 | public class OutgoingPacket : Packet 6 | { 7 | public OutgoingPacketType Type { get; set; } 8 | 9 | public OutgoingPacket(Objects.Client c) 10 | : base(c) {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tibiaapi/Packets/PipePacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Tibia.Constants; 6 | 7 | namespace Tibia.Packets 8 | { 9 | public class PipePacket 10 | { 11 | public PipePacketType Type { get; set; } 12 | public Objects.Client Client { get; set; } 13 | public PacketDestination Destination { get; set; } 14 | 15 | public PipePacket(Objects.Client client) 16 | { 17 | Client = client; 18 | Destination = PacketDestination.Pipe; 19 | } 20 | 21 | public virtual byte[] ToByteArray() { return null; } 22 | public virtual bool ParseMessage(NetworkMessage msg, PacketDestination destination) { return false; } 23 | 24 | public bool Send() 25 | { 26 | NetworkMessage msg = new NetworkMessage(Client); 27 | msg.Position = 2; 28 | msg.AddBytes(ToByteArray()); 29 | msg.InsertPacketHeader(); 30 | 31 | Client.Dll.Pipe.Send(msg); 32 | 33 | return true; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/EventTriggerPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Objects; 3 | using Tibia.Constants; 4 | 5 | namespace Tibia.Packets.Pipes 6 | { 7 | public class EventTriggerPacket : PipePacket 8 | { 9 | public EventType eventType { get; set; } 10 | 11 | public EventTriggerPacket(Client client) 12 | : base(client) 13 | { 14 | Type = PipePacketType.EventTriggers; 15 | } 16 | 17 | ///Hooking the EventTriggerPointer in TibiaAPI_Inject.dll crashes the client when an 18 | ///event is triggered, so I'm guessing this function can be removed? 19 | /*public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 20 | { 21 | if (msg.GetByte() != (byte)PipePacketType.EventTriggers) 22 | return false; 23 | 24 | Type = PipePacketType.EventTriggers; 25 | 26 | eventType = msg.GetByte(); 27 | 28 | return true; 29 | }*/ 30 | 31 | public override byte[] ToByteArray() 32 | { 33 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 21); 34 | msg.AddByte((byte)Type); 35 | msg.AddUInt32((uint)eventType); 36 | 37 | return msg.Data; 38 | } 39 | 40 | public static bool Send(Objects.Client client, EventType eventType) 41 | { 42 | EventTriggerPacket p = new EventTriggerPacket(client); 43 | 44 | p.eventType = eventType; 45 | 46 | return p.Send(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/HookSendToServerPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | using Tibia.Objects; 3 | 4 | namespace Tibia.Packets.Pipes 5 | { 6 | public class HookSendToServerPacket : PipePacket 7 | { 8 | public byte[] PacketToSend { get; set; } 9 | 10 | public HookSendToServerPacket(Client client) 11 | : base(client) 12 | { 13 | Type = PipePacketType.HookSendToServer; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)PipePacketType.HookSendToServer) 19 | return false; 20 | 21 | Type = PipePacketType.HookSendToServer; 22 | ushort InnerLength = msg.GetUInt16(); 23 | msg.Position -= 2; 24 | PacketToSend = msg.GetBytes(InnerLength+2); 25 | 26 | return true; 27 | } 28 | 29 | public override byte[] ToByteArray() 30 | { 31 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 1 + PacketToSend.Length); 32 | msg.AddByte((byte)Type); 33 | msg.AddBytes(PacketToSend); 34 | return msg.Data; 35 | } 36 | 37 | public static bool Send(Objects.Client client, byte[] packet) 38 | { 39 | HookSendToServerPacket p = new HookSendToServerPacket(client); 40 | 41 | p.PacketToSend = packet; 42 | 43 | return p.Send(); 44 | } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/HooksEnableDisablePacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Constants; 3 | using Tibia.Objects; 4 | 5 | namespace Tibia.Packets.Pipes 6 | { 7 | public class HooksEnableDisablePacket : PipePacket 8 | { 9 | public bool Enable { get; set; } 10 | 11 | public HooksEnableDisablePacket(Client client) 12 | : base(client) 13 | { 14 | Type = PipePacketType.HooksEnableDisable; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)PipePacketType.HooksEnableDisable) 20 | return false; 21 | 22 | Type = PipePacketType.HooksEnableDisable; 23 | Enable = Convert.ToBoolean(msg.GetByte()); 24 | 25 | return true; 26 | } 27 | 28 | public override byte[] ToByteArray() 29 | { 30 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 2); 31 | msg.AddByte((byte)Type); 32 | 33 | msg.AddByte(Convert.ToByte(Enable)); 34 | return msg.Data; 35 | } 36 | 37 | public static bool Send(Objects.Client client, bool injected) 38 | { 39 | HooksEnableDisablePacket p = new HooksEnableDisablePacket(client); 40 | p.Enable = injected; 41 | return p.Send(); 42 | } 43 | 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/OnClickContextMenuPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | using Tibia.Objects; 3 | 4 | namespace Tibia.Packets.Pipes 5 | { 6 | public class OnClickContextMenuPacket : PipePacket 7 | { 8 | public int EventId { get; set; } 9 | 10 | public OnClickContextMenuPacket(Client client) 11 | : base(client) 12 | { 13 | Type = PipePacketType.OnClickContextMenu; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)PipePacketType.OnClickContextMenu) 19 | return false; 20 | 21 | Type = PipePacketType.OnClickContextMenu; 22 | EventId = (int)msg.GetUInt32(); 23 | 24 | return true; 25 | } 26 | 27 | public override byte[] ToByteArray() 28 | { 29 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 5); 30 | msg.AddByte((byte)Type); 31 | 32 | msg.AddUInt32((uint)EventId); 33 | 34 | return msg.Data; 35 | } 36 | 37 | public static bool Send(Objects.Client client, int eventId) 38 | { 39 | AddContextMenuPacket p = new AddContextMenuPacket(client); 40 | p.EventId = eventId; 41 | return p.Send(); 42 | } 43 | 44 | } 45 | } 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/OnClickIcon.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | using Tibia.Objects; 3 | 4 | namespace Tibia.Packets.Pipes 5 | { 6 | public class OnClickIconPacket:PipePacket 7 | { 8 | public uint IconId { get; set; } 9 | 10 | 11 | public OnClickIconPacket(Client client) 12 | : base(client) 13 | { 14 | Type = PipePacketType.OnClickIcon; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)PipePacketType.OnClickIcon) 20 | return false; 21 | 22 | Type = PipePacketType.OnClickIcon; 23 | IconId = msg.GetUInt32(); 24 | 25 | return true; 26 | } 27 | 28 | public override byte[] ToByteArray() 29 | { 30 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client,5); 31 | msg.AddByte((byte)Type); 32 | 33 | msg.AddUInt32(IconId); 34 | 35 | return msg.Data; 36 | } 37 | 38 | public static bool Send(Objects.Client client, uint iconId) 39 | { 40 | OnClickIconPacket p = new OnClickIconPacket(client); 41 | 42 | p.IconId = iconId; 43 | 44 | return p.Send(); 45 | } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/RemoveAllContextMenusPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Objects; 3 | using Tibia.Constants; 4 | 5 | namespace Tibia.Packets.Pipes 6 | { 7 | public class RemoveAllContextMenusPacket : PipePacket 8 | { 9 | 10 | public RemoveAllContextMenusPacket(Client client) 11 | : base(client) 12 | { 13 | Type = PipePacketType.RemoveAllContextMenus; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)PipePacketType.RemoveAllContextMenus) 19 | return false; 20 | 21 | Type = PipePacketType.RemoveAllContextMenus; 22 | 23 | return true; 24 | } 25 | 26 | public override byte[] ToByteArray() 27 | { 28 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 1); 29 | msg.AddByte((byte)Type); 30 | return msg.Data; 31 | } 32 | 33 | public static bool Send(Objects.Client client) 34 | { 35 | RemoveAllContextMenusPacket p = new RemoveAllContextMenusPacket(client); 36 | return p.Send(); 37 | } 38 | 39 | } 40 | } 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/RemoveAllIconsPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Pipes 4 | { 5 | public class RemoveAllIconsPacket:PipePacket 6 | { 7 | public RemoveAllIconsPacket(Objects.Client client) 8 | : base(client) 9 | { 10 | Type = PipePacketType.RemoveAllIcons; 11 | } 12 | 13 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 14 | { 15 | if (msg.GetByte() != (byte)PipePacketType.RemoveAllIcons) 16 | return false; 17 | 18 | Type = PipePacketType.RemoveAllIcons; 19 | 20 | return true; 21 | } 22 | 23 | public override byte[] ToByteArray() 24 | { 25 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 1); 26 | msg.AddByte((byte)Type); 27 | return msg.Data; 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | RemoveAllIconsPacket p = new RemoveAllIconsPacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/RemoveAllSkinsPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Pipes 4 | { 5 | public class RemoveAllSkinsPacket : PipePacket 6 | { 7 | public RemoveAllSkinsPacket(Objects.Client client) 8 | : base(client) 9 | { 10 | Type = PipePacketType.RemoveAllSkins; 11 | } 12 | 13 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 14 | { 15 | if (msg.GetByte() != (byte)PipePacketType.RemoveAllSkins) 16 | return false; 17 | 18 | Type = PipePacketType.RemoveAllSkins; 19 | 20 | return true; 21 | } 22 | 23 | public override byte[] ToByteArray() 24 | { 25 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 1); 26 | msg.AddByte((byte)Type); 27 | return msg.Data; 28 | } 29 | 30 | public static bool Send(Objects.Client client) 31 | { 32 | RemoveAllSkinsPacket p = new RemoveAllSkinsPacket(client); 33 | return p.Send(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/RemoveAllTextPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | using Tibia.Objects; 3 | 4 | namespace Tibia.Packets.Pipes 5 | { 6 | public class RemoveAllTextPacket : PipePacket 7 | { 8 | 9 | public RemoveAllTextPacket(Client client) 10 | : base(client) 11 | { 12 | Type = PipePacketType.RemoveAllText; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 16 | { 17 | if (msg.GetByte() != (byte)PipePacketType.RemoveAllText) 18 | return false; 19 | 20 | Type = PipePacketType.RemoveAllText; 21 | 22 | return true; 23 | } 24 | 25 | public override byte[] ToByteArray() 26 | { 27 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 1); 28 | msg.AddByte((byte)Type); 29 | return msg.Data; 30 | } 31 | 32 | public static bool Send(Objects.Client client) 33 | { 34 | RemoveAllTextPacket p = new RemoveAllTextPacket(client); 35 | return p.Send(); 36 | } 37 | } 38 | } 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/RemoveCreatureTextPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | using Tibia.Objects; 3 | 4 | namespace Tibia.Packets.Pipes 5 | { 6 | public class RemoveCreatureTextPacket : PipePacket 7 | { 8 | public uint CreatureId{get;set;} 9 | public string CreatureName { get; set; } 10 | 11 | public RemoveCreatureTextPacket(Client client) 12 | : base(client) 13 | { 14 | Type = PipePacketType.RemoveCreatureText; 15 | } 16 | 17 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 18 | { 19 | if (msg.GetByte() != (byte)PipePacketType.RemoveCreatureText) 20 | return false; 21 | 22 | Type = PipePacketType.RemoveCreatureText; 23 | CreatureId = msg.GetUInt32(); 24 | CreatureName = msg.GetString(); 25 | 26 | return true; 27 | } 28 | 29 | public override byte[] ToByteArray() 30 | { 31 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 7 + CreatureName.Length); 32 | msg.AddByte((byte)Type); 33 | 34 | msg.AddUInt32(CreatureId); 35 | msg.AddString(CreatureName); 36 | 37 | return msg.Data; 38 | } 39 | 40 | public static bool Send(Objects.Client client, uint creatureId, string creatureName) 41 | { 42 | RemoveCreatureTextPacket p = new RemoveCreatureTextPacket(client); 43 | p.CreatureId = creatureId; 44 | p.CreatureName = creatureName; 45 | return p.Send(); 46 | } 47 | 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/RemoveIconPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Pipes 4 | { 5 | public class RemoveIconPacket : PipePacket 6 | { 7 | public uint IconId { get; set; } 8 | 9 | public RemoveIconPacket(Objects.Client client) 10 | : base(client) 11 | { 12 | Type = PipePacketType.RemoveIcon; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 16 | { 17 | if (msg.GetByte() != (byte)PipePacketType.RemoveIcon) 18 | return false; 19 | 20 | Type = PipePacketType.RemoveIcon; 21 | IconId = msg.GetUInt32(); 22 | 23 | return true; 24 | } 25 | 26 | public override byte[] ToByteArray() 27 | { 28 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 5); 29 | msg.AddByte((byte)Type); 30 | 31 | msg.AddUInt32(IconId); 32 | 33 | return msg.Data; 34 | } 35 | 36 | public static bool Send(Objects.Client client, uint iconId) 37 | { 38 | RemoveIconPacket p = new RemoveIconPacket(client); 39 | 40 | p.IconId = iconId; 41 | 42 | return p.Send(); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/RemoveSkinPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | 3 | namespace Tibia.Packets.Pipes 4 | { 5 | public class RemoveSkinPacket : PipePacket 6 | { 7 | public uint SkinId { get; set; } 8 | 9 | public RemoveSkinPacket(Objects.Client client) 10 | : base(client) 11 | { 12 | Type = PipePacketType.RemoveSkin; 13 | } 14 | 15 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 16 | { 17 | if (msg.GetByte() != (byte)PipePacketType.RemoveSkin) 18 | return false; 19 | 20 | Type = PipePacketType.RemoveSkin; 21 | SkinId = msg.GetUInt32(); 22 | 23 | return true; 24 | } 25 | 26 | public override byte[] ToByteArray() 27 | { 28 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 5); 29 | msg.AddByte((byte)Type); 30 | 31 | msg.AddUInt32(SkinId); 32 | 33 | return msg.Data; 34 | } 35 | 36 | public static bool Send(Objects.Client client, uint skinId) 37 | { 38 | RemoveSkinPacket p = new RemoveSkinPacket(client); 39 | 40 | p.SkinId = skinId; 41 | 42 | return p.Send(); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/RemoveTextPacket.cs: -------------------------------------------------------------------------------- 1 | using Tibia.Constants; 2 | using Tibia.Objects; 3 | 4 | namespace Tibia.Packets.Pipes 5 | { 6 | public class RemoveTextPacket : PipePacket 7 | { 8 | public string TextName { get; set; } 9 | 10 | public RemoveTextPacket(Client client) 11 | : base(client) 12 | { 13 | Type = PipePacketType.RemoveText; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)PipePacketType.RemoveText) 19 | return false; 20 | 21 | Type = PipePacketType.RemoveText; 22 | TextName = msg.GetString(); 23 | 24 | return true; 25 | } 26 | 27 | public override byte[] ToByteArray() 28 | { 29 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 3 + TextName.Length); 30 | msg.AddByte((byte)Type); 31 | 32 | msg.AddString(TextName); 33 | 34 | return msg.Data; 35 | } 36 | 37 | public static bool Send(Objects.Client client, string textName) 38 | { 39 | RemoveTextPacket p = new RemoveTextPacket(client); 40 | p.TextName = textName; 41 | return p.Send(); 42 | } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/SetConstantPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Objects; 3 | using Tibia.Constants; 4 | 5 | namespace Tibia.Packets.Pipes 6 | { 7 | public class SetConstantPacket : PipePacket 8 | { 9 | public PipeConstantType ConstantType { get; set; } 10 | public uint Value { get; set; } 11 | 12 | public SetConstantPacket(Client client) 13 | : base(client) 14 | { 15 | Type = PipePacketType.SetConstant; 16 | } 17 | 18 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 19 | { 20 | if (msg.GetByte() != (byte)PipePacketType.SetConstant) 21 | return false; 22 | 23 | Type = PipePacketType.SetConstant; 24 | ConstantType = (PipeConstantType)msg.GetByte(); 25 | Value = msg.GetUInt32(); 26 | 27 | return true; 28 | } 29 | 30 | public override byte[] ToByteArray() 31 | { 32 | NetworkMessage msg = NetworkMessage.CreateUnencrypted(Client, 6); 33 | msg.AddByte((byte)Type); 34 | 35 | msg.AddByte((byte)ConstantType); 36 | msg.AddUInt32((uint)Value); 37 | 38 | return msg.Data; 39 | } 40 | 41 | public static bool Send(Objects.Client client, PipeConstantType constantType, uint value) 42 | { 43 | SetConstantPacket p = new SetConstantPacket(client); 44 | p.ConstantType = constantType; 45 | p.Value = value; 46 | return p.Send(); 47 | } 48 | 49 | } 50 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/UpdateIconPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Objects; 3 | using Tibia.Constants; 4 | using System.Drawing; 5 | 6 | namespace Tibia.Packets.Pipes 7 | { 8 | public class UpdateIconPacket : AddIconPacket 9 | { 10 | public UpdateIconPacket(Client client) 11 | : base(client) 12 | { 13 | Type = PipePacketType.UpdateIcon; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)PipePacketType.UpdateIcon) 19 | return false; 20 | 21 | Type = PipePacketType.UpdateIcon; 22 | IconId = msg.GetUInt32(); 23 | PosX = msg.GetUInt16(); 24 | PosY = msg.GetUInt16(); 25 | Size = msg.GetUInt16(); 26 | ItemId = msg.GetUInt16(); 27 | ItemCount = msg.GetUInt16(); 28 | Font = (ClientFont)msg.GetByte(); 29 | Color = Color.FromArgb(msg.GetByte(), msg.GetByte(), msg.GetByte()); 30 | 31 | return true; 32 | } 33 | 34 | public static new bool Send(Objects.Client client, uint iconId, ushort posX, ushort posY, ushort size, ushort itemId, ushort itemCount, ClientFont font, Color color) 35 | { 36 | UpdateIconPacket p = new UpdateIconPacket(client); 37 | 38 | p.IconId = iconId; 39 | p.PosX = posX; 40 | p.PosY = posY; 41 | p.Size = size; 42 | p.ItemId = itemId; 43 | p.ItemCount = itemCount; 44 | p.Font = font; 45 | p.Color = color; 46 | 47 | return p.Send(); 48 | } 49 | 50 | } 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /tibiaapi/Packets/Pipes/UpdateSkinPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Tibia.Objects; 3 | using Tibia.Constants; 4 | using System.Drawing; 5 | 6 | namespace Tibia.Packets.Pipes 7 | { 8 | public class UpdateSkinPacket : AddSkinPacket 9 | { 10 | public UpdateSkinPacket(Client client) 11 | : base(client) 12 | { 13 | Type = PipePacketType.UpdateSkin; 14 | } 15 | 16 | public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) 17 | { 18 | if (msg.GetByte() != (byte)PipePacketType.UpdateSkin) 19 | return false; 20 | 21 | Type = PipePacketType.UpdateSkin; 22 | SkinId = msg.GetUInt32(); 23 | PosX = msg.GetUInt16(); 24 | PosY = msg.GetUInt16(); 25 | Width = msg.GetUInt16(); 26 | Height = msg.GetUInt16(); 27 | GUIId = msg.GetUInt16(); 28 | 29 | return true; 30 | } 31 | 32 | public static new bool Send(Objects.Client client, uint skinId, ushort posX, ushort posY, ushort width, ushort height, ushort guiID) 33 | { 34 | UpdateSkinPacket p = new UpdateSkinPacket(client); 35 | 36 | p.SkinId = skinId; 37 | p.PosX = posX; 38 | p.PosY = posY; 39 | p.Width = width; 40 | p.Height = height; 41 | p.GUIId = guiID; 42 | 43 | return p.Send(); 44 | } 45 | 46 | } 47 | } -------------------------------------------------------------------------------- /tibiaapi/Packets/RSA/GameServerRequestPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Tibia.Packets.RSA 7 | { 8 | public class GameServerRequestPacket 9 | { 10 | 11 | public static NetworkMessage Create(byte OS, ushort Version, 12 | string AccountName, string CharacterName, string Password) 13 | { 14 | byte[] XteaKey = new byte[16]; 15 | new Random().NextBytes(XteaKey); 16 | return Create(OS, Version, XteaKey, AccountName, CharacterName, Password); 17 | } 18 | 19 | public static NetworkMessage Create(byte OS, ushort Version, 20 | byte[] XteaKey, string AccountName, string CharacterName, string Password) 21 | { 22 | return Create(OS, Version, XteaKey, AccountName, CharacterName, Password, false); 23 | } 24 | 25 | 26 | public static NetworkMessage Create(byte OS, ushort Version, 27 | byte[] XteaKey, string AccountName,string CharacterName, string Password, bool OpenTibia) 28 | { 29 | NetworkMessage msg = new NetworkMessage(139); 30 | msg.AddByte(0x89); 31 | msg.AddByte(0x00); 32 | msg.Position += 4; 33 | msg.AddByte(0x0A); 34 | msg.AddUInt16(OS); 35 | msg.AddUInt16(Version); 36 | msg.AddByte(0x0); 37 | msg.AddBytes(XteaKey); 38 | msg.AddByte(0x0); 39 | msg.AddString(AccountName); 40 | msg.AddString(CharacterName); 41 | msg.AddString(Password); 42 | if (OpenTibia) msg.RsaOTEncrypt(11); 43 | else msg.RsaCipEncrypt(11); 44 | msg.AddAdler32(); 45 | return msg; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /tibiaapi/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("TibiaAPI")] 9 | [assembly: AssemblyDescription("A library for interfacing with the Tibia client.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("TProgramming")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright("Copyright © 2007-2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6c5a0754-d8a9-4af9-a0c7-cb0ad28b81d6")] 24 | 25 | // version information for an assembly consists of the following four values: 26 | // 27 | // Major version 28 | // Minor version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("2.10.2.0")] 33 | [assembly: AssemblyFileVersion("2.10.2.0")] 34 | -------------------------------------------------------------------------------- /tibiaapi/TibiaAPI.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ianobermiller/tibiaapi/25e8152dce35518197d74c2b8ee9a6b375a1e191/tibiaapi/TibiaAPI.pfx -------------------------------------------------------------------------------- /tibiaapi/Util/Calculate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Tibia 4 | { 5 | public class Calculate 6 | { 7 | /// 8 | /// Calculate the experience needed for any level. 9 | /// 10 | /// 11 | /// 12 | public static long ExpForLevel(int level) 13 | { 14 | return (long)(50.0 * ((level / 3.0) * (level * (level - 6.0) + 17.0) - 4.0)); 15 | } 16 | 17 | /// 18 | /// Convert an fps value to the value needed to be written to memory 19 | /// 20 | /// 21 | /// 22 | public static double ConvertFPS(double fps) 23 | { 24 | return Math.Round((1000 / fps), 1); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tibiaapi/Util/FixedCollector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Tibia.Util 8 | { 9 | public class FixedCollector : IEnumerable 10 | { 11 | private T[] array; 12 | private int index; 13 | public int Count { get; set; } 14 | public int Size { get; set; } 15 | 16 | public FixedCollector(int size) 17 | { 18 | Reset(size); 19 | } 20 | 21 | public void Reset(int size) 22 | { 23 | Size = size; 24 | T[] old = array; 25 | array = new T[Size]; 26 | index = 0; 27 | Count = 0; 28 | } 29 | 30 | public void Push(T element) 31 | { 32 | array[index] = element; 33 | index = (index + 1) % Size; 34 | if (Count < Size) 35 | Count++; 36 | } 37 | 38 | #region IEnumerable Members 39 | 40 | public IEnumerator GetEnumerator() 41 | { 42 | int i = index; 43 | for (int j = 0; j < Count; j++) 44 | { 45 | i = ((i + Size) - 1) % Size; 46 | yield return array[i]; 47 | } 48 | } 49 | 50 | #endregion 51 | 52 | #region IEnumerable Members 53 | 54 | IEnumerator IEnumerable.GetEnumerator() 55 | { 56 | return GetEnumerator(); 57 | } 58 | 59 | #endregion 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /tibiaapi/Website/Guild.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | using System.Threading; 4 | using System.Text; 5 | using System.Text.RegularExpressions; 6 | using System.Web; 7 | using System.Windows.Forms; 8 | using System.Collections.Generic; 9 | 10 | namespace Tibia 11 | { 12 | public partial class Website 13 | { 14 | public delegate void GuildMembersReceived(List members); 15 | 16 | public static void GuildMembers(string guildName, GuildMembersReceived callback) 17 | { 18 | string url = "http://www.tibia.com/community/?subtopic=guilds&page=view&GuildName=" + guildName; 19 | HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); 20 | 21 | request.BeginGetResponse(delegate(IAsyncResult ar) 22 | { 23 | string html = GetHTML(ar); 24 | 25 | callback(ParseGuildPage(html)); 26 | }, request); 27 | } 28 | 29 | private static List ParseGuildPage(string html) 30 | { 31 | List members = new List(); 32 | 33 | MatchCollection matches = Regex.Matches(html, @""">([^<]+)(\s\(([^\)]+)\))?", RegexOptions.IgnoreCase); 34 | string guildName = Match(html, @"

([^<]*)

"); 35 | 36 | foreach (Match m in matches) 37 | { 38 | members.Add(new CharInfo() 39 | { 40 | Name = Prepare(m.Groups[1].Value), 41 | GuildNickName = Prepare(m.Groups[3].Value), 42 | GuildName = guildName 43 | }); 44 | } 45 | return members; 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /tibiaapi/Website/Website.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Net; 4 | using System.Text; 5 | using System.Text.RegularExpressions; 6 | 7 | namespace Tibia 8 | { 9 | public partial class Website 10 | { 11 | public static string GetHTML(IAsyncResult ar) 12 | { 13 | HttpWebRequest request = (HttpWebRequest)ar.AsyncState; 14 | HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar); 15 | Stream respStream = response.GetResponseStream(); 16 | string respBody = string.Empty; 17 | byte[] buf = new byte[8192]; 18 | int count = 0; 19 | do 20 | { 21 | count = respStream.Read(buf, 0, buf.Length); 22 | if (count != 0) 23 | respBody += Encoding.ASCII.GetString(buf, 0, count); 24 | } 25 | while (count > 0); 26 | return respBody; 27 | } 28 | 29 | public static string Match(string html, string pattern) 30 | { 31 | return Prepare( 32 | Regex.Match( 33 | html, 34 | pattern, 35 | RegexOptions.IgnoreCase | RegexOptions.Singleline) 36 | .Groups[1].Value); 37 | } 38 | 39 | public static string Prepare(string text) 40 | { 41 | return System.Web.HttpUtility.HtmlDecode(text) // Decode html character entities 42 | .Replace((char)0xA0, ' '); // Replace non-breaking spaces 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tibiaapi/Website/WhoIsOnline.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Text.RegularExpressions; 5 | using System.Net; 6 | using System.Web; 7 | 8 | namespace Tibia 9 | { 10 | public partial class Website 11 | { 12 | public delegate void WhoIsOnlineReceived(List chars); 13 | 14 | public static void WhoIsOnline(string worldName, WhoIsOnlineReceived callback) 15 | { 16 | string url = "http://www.tibia.com/community/?subtopic=whoisonline&world=" + worldName; 17 | HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); 18 | 19 | request.BeginGetResponse(delegate(IAsyncResult ar) 20 | { 21 | string html = GetHTML(ar); 22 | 23 | MatchCollection matches = Regex.Matches(html, @"<[^<]*>([^<]*)([^<]*)([^<]*)"); 24 | List chars = new List(matches.Count); 25 | CharOnline co; 26 | 27 | for(int i = 0; i < matches.Count; i++) 28 | { 29 | co = new CharOnline(); 30 | co.Name = Prepare(matches[i].Groups[1].Value); 31 | co.Level = int.Parse(matches[i].Groups[2].Value); 32 | co.Vocation = Prepare(matches[i].Groups[3].Value); 33 | chars.Add(co); 34 | } 35 | 36 | callback(chars); 37 | }, request); 38 | } 39 | 40 | public class CharOnline 41 | { 42 | public string Name; 43 | public int Level; 44 | public string Vocation; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tibiaapi/readme.txt: -------------------------------------------------------------------------------- 1 | TibiaAPI Readme 2 | 3 | 8.50+ Notes: 4 | - Dependency on Packet.dll has been removed, so the file has been also removed 5 | - TibiaAPI_Inject.dll is now included in TibiaAPI.dll, so that file is also no longer needed 6 | 7 | Quick User Guide: 8 | 9 | 1) Create a blank project, name it and save it. 10 | 11 | 2) Right click the Bolded project name, select Add Existing Item. Select this file: 12 | -TibiaAPI.dll 13 | 14 | 3) Then click the file in Solution Explorer, and change the property Copy to Output to "Copy if Newer". 15 | 16 | 4) Right click the References folder and click Add Reference. 17 | 18 | 5) Choose Browse, and select TibiaAPI.dll from your Project folder. 19 | 20 | 6) Now, in Form1.cs, at the top of the code, under the using System; et al., add: 21 | C# 22 | using Tibia; 23 | using Tibia.Objects; 24 | 25 | VB 26 | Imports Tibia 27 | Imports Tibia.Objects 28 | 29 | And you are good to go! If you want some more help, ask, or look at the many examples using TibiaAPI! --------------------------------------------------------------------------------