/* * 24 00 D9 07 00 00 E0 00 A1 * E5 6E F7 05 00 00 00 00 38 66 30 30 62 32 30 34 65 39 38 30 30 39 39 38 00 25 06 2A 2F 57 */ public static void Handle(User user, byte[] bytes) { var packet = new InPacket(bytes); // Character ID // Some kind of password (NUL terminated) var charId = packet.ReadUInt(); Program.logger.Debug("Delete packet received: {0}", Util.ByteToHex(bytes)); Program.logger.Debug("Character ID to delete: {0}", charId); using (MySqlCommand cmd = Program._MySQLConn.CreateCommand()) { cmd.CommandText = "UPDATE characters SET authority = 2 WHERE id = @id AND user = @userId;"; cmd.Parameters.AddWithValue("@id", charId); cmd.Parameters.AddWithValue("@userId", user.Id); cmd.ExecuteScalar(); } user.NumChars--; // Success packet PacketBuffer del = new PacketBuffer(0x7DB, user); del.WriteByte(0x00); del.Send(); }
public static void DecodeCharacterData(Character character, InPacket packet) { packet.ReadShort(); for (int i = 0; i < 3; i++) { uint damageSeed = packet.ReadUInt(); } ulong flags = packet.ReadULong(); }
public static void Handle(User user, InPacket packet) { //Console.WriteLine("Login packet: ", Util.ByteToHex(packet.packet)); var charId = packet.ReadUInt(); packet.ReadUInt(); var loginKey = packet.ReadUInt(); // TODO: Check the loginKey // The login key is sent to the client by 0x7DE (from Channel) //Console.WriteLine("Character logging in: {0}", charId); using (MySqlCommand cmd = Program._MySQLConn.CreateCommand()) { cmd.CommandText = "SELECT * FROM characters WHERE id = @id AND authority != 2 LIMIT 1;"; cmd.Parameters.AddWithValue("@id", charId); using (MySqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { var build = reader.GetString("build").Split(','); byte slot = reader.GetByte("slot"); byte job2 = reader.GetByte("job2"); byte type2 = reader.GetByte("job2_type"); byte job3 = reader.GetByte("job3"); byte type3 = reader.GetByte("job3_type"); user.Character = new Character() { User = user, Slot = slot, Id = reader.GetUInt64("id"), Name = reader.GetString("name"), Level = reader.GetUInt16("level"), Money = reader.GetUInt32("money"), Health = reader.GetUInt16("health"), Mana = reader.GetUInt16("mana"), Map = reader.GetUInt16("map"), X = reader.GetUInt16("pos_x"), Y = reader.GetUInt16("pos_y"), FType = reader.GetByte("ftype"), Job = reader.GetByte("job"), Type = reader.GetByte("type"), Hair = reader.GetByte("hair"), Build = new CharacterBuild { Power = int.Parse(build[0]), Magic = int.Parse(build[1]), Sense = int.Parse(build[2]), Charm = int.Parse(build[3]) }, EntityId = ++Program.EntityId, CreateTime = reader.GetDateTime("create_time"), Job2 = job2, Type2 = type2, Job3 = job3, Type3 = type3, }; } } } var character = user.Character; Program.logger.Info("{0} is logging in. Map: {1} ({2})", character.Name, Data.Maps[character.Map].Name, character.Map); var success = new PacketBuffer(0x2A7, user); success.WriteUInt64(charId); success.WriteUInt64(user.Id); //success.WriteHexString("01 64 75 72 61 67 6F 6E 31 32 34 00 00 00 68 00 00 00 00 00 00 04 00 04 01 01 04 03 02 5C 51 42 5B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); success.WriteByte(character.Slot); success.WriteString(character.Name, 20); success.WriteUInt16(character.Job); // type? is it {byte} 0x00? success.WriteByte(character.Type); success.WriteByte(character.FType); // hair color? ftype? success.WriteByte((byte)character.Build.Power); success.WriteByte((byte)character.Build.Magic); success.WriteByte((byte)character.Build.Sense); success.WriteByte((byte)character.Build.Charm); // ? success.WriteUInt64(Methods.DateTimeToUnix(character.CreateTime)); // ? success.WriteUInt16(character.Type2); success.WriteByte(character.Job2); success.WriteUInt16(character.Type3); success.WriteByte(character.Job3); success.WriteBool(character.IsSoulSeed); success.WriteBool(character.IsAwaken); if (character.Couple != null) { success.WriteUInt64(character.Couple.Id); } else { success.WriteUInt64(0); // nonexistent } success.WriteHexString("00 00 00 00"); // is this used? success.Send(); var charInfo = new List <byte>(); var head = new PacketBuffer(0xE6, user); head.WriteHexString("0D D7 76 CE"); head.WriteUInt16(character.EntityId); head.WriteUInt16(character.X); head.WriteUInt16(character.Y); charInfo.AddRange(head.GetPacket()); var items = new PacketBuffer(0xE7, user); items.WriteUInt16(8); // Item count items.WriteByte(0x02); // Item class 2 items.WriteUInt32(6903); // Item ID items.WriteUInt64(3031780617); // Item UID items.WriteUInt16(1); // Count // Refine? Time? items.WriteUInt32(0); // ? items.WriteByte(0x00); // ? items.WriteByte(0x02); // Item class 2 items.WriteUInt32(6953); // Item ID items.WriteUInt64(3031780618); // Item UID items.WriteUInt16(1); // Count // Refine? Time? items.WriteUInt32(0); // ? items.WriteByte(0x00); // ? items.WriteByte(0x01); // Item class 1 items.WriteUInt32(2006); // Item ID items.WriteUInt64(3031780619); // Item UID items.WriteUInt16(30); // Count // Item class doesn't need refine/time/whatever items.WriteByte(0x01); // Item class 1 items.WriteUInt32(2206); // Item ID items.WriteUInt64(3031780620); // Item UID items.WriteUInt16(30); // Count // Item class doesn't need refine/time/whatever items.WriteByte(0x02); // Item class 2 items.WriteUInt32(17310); // Item ID items.WriteUInt64(3031780621); // Item UID items.WriteUInt16(1); // Count items.WriteByte(0); // Unknown? items.WriteByte(0); // Refine Level items.WriteByte(0); // Refine State items.WriteByte(0); // Item Slot items.WriteByte(0); // Unknown? Num attrs? // 0x14 = 20 // 0A 00 00 00 10 27 FE 7F 00 00 00 00 //items.WriteUInt32(0); // ? //items.WriteByte(0x00); // ? items.WriteByte(0x02); // Item class 2 items.WriteUInt32(17910); // Item ID items.WriteUInt64(3031780622); // Item UID items.WriteUInt16(1); // Count items.WriteUInt32(0); // ? items.WriteByte(0x00); // ? items.WriteByte(0x02); // Item class 2 items.WriteUInt32(18810); // Item ID items.WriteUInt64(3031780623); // Item UID items.WriteUInt16(1); // Count items.WriteUInt32(0); // ? items.WriteByte(0x00); // ? items.WriteByte(0x02); // Item class 2 items.WriteUInt32(19241); // Item ID items.WriteUInt64(3031780624); // Item UID items.WriteUInt16(1); // Count items.WriteUInt32(0); // ? items.WriteByte(0x00); // ? charInfo.AddRange(items.GetPacket()); var stats = new PacketBuffer(0xE9, user); //stats.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 4D B5 B4 00 00 00 00 0A 4D B5 B4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 01 00 94 00 00 00 00 00 00 00 00 00 94 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 01 50 00 00 00"); // ? stats.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); // Item UID of Dragon`s ears stats.WriteUInt64(3031780617); // Item UID of Dragon`s tail stats.WriteUInt64(3031780618); stats.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); stats.WriteHexString("01 00 00 01 00"); stats.WriteUInt16(character.Map); stats.WriteHexString("00 00 00 00 00 00 00 00"); stats.WriteUInt16(character.Map); stats.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); // ? stats.WriteUInt16(character.Hair); // ? stats.WriteByte(0x1); // ? stats.WriteUInt32(0x50); charInfo.AddRange(stats.GetPacket()); // MonsterQuest var monQuest = new PacketBuffer(0xEB, user); monQuest.WriteUInt16(0); charInfo.AddRange(monQuest.GetPacket()); // SkillQuest var skillQuest = new PacketBuffer(0x128, user); skillQuest.WriteUInt16(0); charInfo.AddRange(skillQuest.GetPacket()); // Skill var skill = new PacketBuffer(0x10F, user); skill.WriteUInt16(1); // Skill count // Magical Soul skill.WriteUInt16(2014); // Skill ID skill.WriteByte(0x01); // Skill ID skill.WriteByte(0x0D); // ? skill.WriteByte(0xB4); // ? charInfo.AddRange(skill.GetPacket()); var itemExpiry = new PacketBuffer(0x1FC, user); itemExpiry.Put(new ItemExpiry(character)); charInfo.AddRange(itemExpiry.GetPacket()); var unknown2 = new PacketBuffer(0x341, user); unknown2.WriteUInt16(0); charInfo.AddRange(unknown2.GetPacket()); var unknown3 = new PacketBuffer(0x4ED, user); unknown3.WriteUInt16(0); charInfo.AddRange(unknown3.GetPacket()); var unknown4 = new PacketBuffer(0x05, user); unknown4.WriteByte(0x00); charInfo.AddRange(unknown4.GetPacket()); var unknown5 = new PacketBuffer(0x04EF, user); unknown5.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); charInfo.AddRange(unknown5.GetPacket()); var notifyEntityId = new PacketBuffer(0x3D1, user); notifyEntityId.WriteUInt16(character.EntityId); notifyEntityId.WriteHexString("00 00 00 00 00 00 00 00 00 00"); charInfo.AddRange(notifyEntityId.GetPacket()); var unknown7 = new PacketBuffer(0x377, user); unknown7.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A8 36 00 00 00 00 00 00 00 00 17 B7 51 38 00 00 00 00 00 00 00 00"); charInfo.AddRange(unknown7.GetPacket()); var unknown8 = new PacketBuffer(0x376, user); unknown8.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A8 36 00 00 00 00 00 00 00 00 17 B7 51 38 00 00 00 00 00 00 00 00"); charInfo.AddRange(unknown8.GetPacket()); var unknown9 = new PacketBuffer(0x3D7, user); unknown9.WriteHexString("01 00 00 00 00 90 85 D5 41 00 00 00 00 00 00 00 00 00 00 00 00 DC 54 42 5B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); charInfo.AddRange(unknown9.GetPacket()); var unknown10 = new PacketBuffer(0x2A4, user); unknown10.WriteUInt16(0); charInfo.AddRange(unknown10.GetPacket()); var unknown11 = new PacketBuffer(0x3E4, user); unknown11.WriteUInt32(3); charInfo.AddRange(unknown11.GetPacket()); var unknown12 = new PacketBuffer(0x3E7, user); unknown12.WriteUInt16(character.EntityId); unknown12.WriteHexString("00 00 00 00 00 00 00 00 00 00 00"); charInfo.AddRange(unknown12.GetPacket()); var unknown13 = new PacketBuffer(0x3EA, user); unknown13.WriteUInt16(0); charInfo.AddRange(unknown13.GetPacket()); user.Socket.Send(charInfo.ToArray()); }
// 0x9C // 18 00 9C 00 00 00 63 00 9A // E2 6E F7 05 00 00 00 00 F3 5F 00 00 02 public static void EnterMap(User user, InPacket inPacket) { var enterId = inPacket.ReadUInt(); var foundUser = Program._users.Where(x => x.Value != null && x.Value.Character != null && x.Value.Character.Id == enterId).FirstOrDefault(); if (foundUser.Value == null) { throw new Exception("Zone change user not found"); } //Program.logger.Info("Old key [user]: {0}", Util.ByteToHex(user.ClientSession.Key)); //Program.logger.Info("Old key [foundUser.ClientSession]: {0}", Util.ByteToHex(foundUser.Value.ClientSession.Key)); var currSock = user.Socket; var currClientSession = user.ClientSession; //Program.logger.Info("Found user socket: {0} / New: {1}", foundUser.Value.Socket.RemoteEndPoint.ToString(), user.Socket.RemoteEndPoint.ToString()); Program._users[user.Socket.RemoteEndPoint.ToString()] = foundUser.Value; user = Program._users[user.Socket.RemoteEndPoint.ToString()]; user.Socket = currSock; user.ClientSession = currClientSession; user.ClientSession.Client = user; user.ServerSession = new SessionInfo { Client = user }; Program._users.Remove(foundUser.Key); var character = user.Character; Program.logger.Info("{0} - Enter Zone: {1} ({2})", character.Name, Data.Maps[character.Map].Name, character.Map); character.EntityId = ++Program.EntityId; { var notifyEntityId = new PacketBuffer(0x3D1, user); notifyEntityId.WriteUInt32(character.EntityId); notifyEntityId.WriteHexString("00 00 00 00 00 00 00 00"); notifyEntityId.Send(); } var charInfo = new List <byte>(); { var unk1 = new PacketBuffer(0x377, user); unk1.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A8 36 00 00 00 00 00 00 00 00 17 B7 51 38"); charInfo.AddRange(unk1.GetPacket()); } { var unk2 = new PacketBuffer(0x376, user); unk2.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A8 36 00 00 00 00 00 00 00 00 17 B7 51 38"); charInfo.AddRange(unk2.GetPacket()); } { var unk3 = new PacketBuffer(0x3D7, user); unk3.WriteHexString("01 00 00 00 00 90 85 D5 41 00 00 00 00 00 00 00 00 00 00 00 00 77 86 45 5B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); charInfo.AddRange(unk3.GetPacket()); } { var unk4 = new PacketBuffer(0x2A4, user); unk4.WriteUInt16(0); charInfo.AddRange(unk4.GetPacket()); } { var unk5 = new PacketBuffer(0x3E4, user); unk5.WriteUInt32(3); charInfo.AddRange(unk5.GetPacket()); } { var unk6 = new PacketBuffer(0x3E7, user); unk6.WriteUInt16(character.EntityId); unk6.WriteHexString("00 00 00 00 00 00 00 00 00 00 00"); charInfo.AddRange(unk6.GetPacket()); } { var unk7 = new PacketBuffer(0x3EA, user); unk7.WriteUInt16(0); charInfo.AddRange(unk7.GetPacket()); } { var unk8 = new PacketBuffer(0x4CC, user); unk8.WriteHexString("00 00 00 00"); charInfo.AddRange(unk8.GetPacket()); } { var unk9 = new PacketBuffer(0x1B5, user); unk9.WriteUInt16(character.EntityId); unk9.WriteUInt16(character.X); unk9.WriteUInt16(character.Y); unk9.WriteHexString("00 00 00 00 00"); charInfo.AddRange(unk9.GetPacket()); } { var unk10 = new PacketBuffer(0x376, user); unk10.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E2 4F 4D 3E 00 00 00 00 00 00 00 00 17 B7 51 38"); charInfo.AddRange(unk10.GetPacket()); } { var unk11 = new PacketBuffer(0x377, user); unk11.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E2 4F 4D 3E 00 00 00 00 00 00 00 00 17 B7 51 38"); charInfo.AddRange(unk11.GetPacket()); } { var notifyEntity = new PacketBuffer(0x09, user); notifyEntity.WriteUInt16(character.EntityId); notifyEntity.WriteUInt16(1); notifyEntity.WriteUInt16(character.Job); notifyEntity.WriteByte((byte)character.Hair); notifyEntity.WriteByte((byte)character.Type); notifyEntity.WriteUInt16(character.Level); notifyEntity.WriteUInt32(8); // ? notifyEntity.WriteUInt16(character.X); notifyEntity.WriteUInt16(character.Y); notifyEntity.WriteUInt16(character.X); notifyEntity.WriteUInt16(character.Y); notifyEntity.WriteString(character.Name); notifyEntity.WriteUInt32(0x00); notifyEntity.WriteUInt32(0x00); // ? notifyEntity.WriteUInt32(0x01); // ? notifyEntity.WriteUInt32(0); // ? notifyEntity.WriteUInt32(0); // ? notifyEntity.WriteUInt16(0); // ???? notifyEntity.WriteByte((byte)character.Job); /* * notifyEntity.WriteUInt32(63); * notifyEntity.WriteUInt32(6903); // Item * notifyEntity.WriteUInt32(6953); // Item * notifyEntity.WriteUInt32(0); */ notifyEntity.WriteHexString("00 00 00 00 63 00 00 00 F6 45 00 00 90 28 01 00 14 1B 00 00 46 1B 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); Program.logger.Info("Self entity packet: {0}", Util.ByteToHex(notifyEntity.GetBuffer())); charInfo.AddRange(notifyEntity.GetPacket()); } { var unk12 = new PacketBuffer(0x25C, user); charInfo.AddRange(unk12.GetPacket()); } { var unk13 = new PacketBuffer(0x377, user); unk13.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 CE 4C 3E 00 00 00 00 00 00 00 00 17 B7 51 38"); charInfo.AddRange(unk13.GetPacket()); } { var unk14 = new PacketBuffer(0x376, user); unk14.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 CE 4C 3E 00 00 00 00 00 00 00 00 17 B7 51 38"); charInfo.AddRange(unk14.GetPacket()); } { var unk15 = new PacketBuffer(0x42C, user); unk15.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"); charInfo.AddRange(unk15.GetPacket()); } { var unk16 = new PacketBuffer(0x9D, user); unk16.WriteUInt32(0); charInfo.AddRange(unk16.GetPacket()); } { var healthStatus = new PacketBuffer(0x24, user); healthStatus.WriteHexString("29 00 00 00"); charInfo.AddRange(healthStatus.GetPacket()); } { var manaStatus = new PacketBuffer(0x25, user); manaStatus.WriteHexString("05 00 00 00"); charInfo.AddRange(manaStatus.GetPacket()); } user.Socket.Send(charInfo.ToArray()); { var p1 = new PacketBuffer(0x1D8, user); p1.WriteUInt16(character.EntityId); p1.WriteByte(0x2E); p1.Send(); } }
// RECEIVE: // 14 00 DC 07 00 00 D9 00 06 // E3 6E F7 05 00 00 00 00 00 4D 02 56 85 5D E1 12 1C B9 F1 19 // // PAULA: // 14 00 DC 07 00 00 3F 00 8F // E2 6E F7 05 00 00 00 00 00 4C 02 01 12 96 9B BF 56 34 23 DF public static void Handle(User user, InPacket packet) { // Read in character ID var charId = packet.ReadUInt(); // NOTIFY GAMESERVER IP /* * REPLY: * 0x07DE * 3A 00 DE 07 00 00 3F 04 B4 * E3 6E F7 05 00 00 00 00 7D 09 DF 6A 00 00 31 33 39 2E 39 39 2E 31 31 35 2E 32 32 30 00 F8 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * * * PAULA: * 3A 00 DE 07 00 00 87 04 EE * E2 6E F7 05 00 00 00 00 80 09 3E 0A 00 00 31 33 39 2E 39 39 2E 31 31 35 2E 32 32 30 00 F8 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * */ var gs = new PacketBuffer(0x07DE, user); gs.WriteUInt64(charId); // ? gs.WriteHexString("7D 09 DF 6A 00 00"); gs.WriteString(Program.config.Server["GameIP"] /*, 15*/); // IP gs.WriteByte(0x00); gs.WriteUInt16(ushort.Parse(Program.config.Server["GamePort"])); // Port gs.WriteBytePad(0x00, 16); gs.Send(); // NOTIFY SYSTEM SERVER /* * REPLY: * 0x1585 * 2A 00 85 15 00 00 6E 04 A7 * E3 6E F7 05 00 00 00 00 31 33 39 2E 39 39 2E 31 31 35 2E 32 32 30 00 1B 34 00 00 20 07 00 00 87 05 C0 7D 51 BF F1 E2 EA 99 FD 36 A3 59 41 1D F3 83 A9 17 30 * * * PAULA: * 2A 00 85 15 00 00 77 04 1A * E2 6E F7 05 00 00 00 00 31 33 39 2E 39 39 2E 31 31 35 2E 32 32 30 00 1B 34 00 00 AE 73 00 00 80 06 54 E4 36 46 72 26 7C F5 39 62 C1 11 2D F6 8C 28 7D BF 17 */ if (Program.config.Server["SystemEnabled"] == "1" || Program.config.Server["SystemEnabled"].ToLower() == "true") { var ss = new PacketBuffer(0x1585, user); ss.WriteUInt32(charId); ss.WriteUInt32(0); // part of long ss.WriteString(Program.config.Server["SystemIP"], 15); // IP ss.WriteUInt16(ushort.Parse(Program.config.Server["SystemPort"])); // Port ss.WriteHexString("00 00 AE 73 00 00"); ss.Send(); } // Tell the client that it can connect now, with the user UID /* * REPLY: * 0x0003 * 15 00 03 00 00 00 EA 04 FD * 06 00 63 77 F6 05 00 00 00 00 * * * PAULA: * 15 00 03 00 00 00 7C 04 39 * 05 00 63 77 F6 05 00 00 00 00 */ var msg = new PacketBuffer(0x0003, user); msg.WriteUInt16(0); msg.WriteUInt64(user.Id); msg.Send(); }