[RELEASE] 5293 Packet Structures

08/25/2010 00:41 fm_sparkart#16
I don't believe the packet structure for the key exchange is on the wiki (although its lurking around the forums).
08/25/2010 01:04 CptSky#17
Quote:
Originally Posted by fm_sparkart View Post
I don't believe the packet structure for the key exchange is on the wiki (although its lurking around the forums).
On the wiki thread.
08/25/2010 18:08 fm_sparkart#18
Quote:
Originally Posted by CptSky View Post
On the wiki thread.
It's not on the wiki because it is still incomplete? Or the junk is really just junk?
08/25/2010 18:27 Basser#19
A (Part of a) Byte array is often called 'Junk' because they are unused, but not empty bytes.
08/25/2010 18:30 CptSky#20
Quote:
Originally Posted by fm_sparkart View Post
It's not on the wiki because it is still incomplete? Or the junk is really just junk?
It's complete, I think... The junk is a bunch of random bytes. Or maybe, there is a signification, but works with random bytes.
08/25/2010 19:02 CØĐ£Ř||Mã©hÍñє#21
good luck mate its helpfull
08/31/2010 01:33 442077771#22
Character Spawning
Packet Layout Offset Type Value
0 ushort 138 + Character_Name
2 ushort 10014
4 uint Character_ModelID
8 uint Character_ID
12 ushort Character_GuildID
14 ushort Character_GuildRank
16 ulong Character_Status
24 uint Character_Helm_ID
28 uint Character_Armour_ID
32 uint Character_Garment_ID
36 uint Character_LeftHand_ID
40 uint Character_RightHand_ID
44 uint Character_Steed_ID
56 ushort Character_HairStyle
58 ushort Character_CordX
60 ushort Character_CordY
62 byte Character_Direction
63 byte Character_Action
68 byte Character_Reborn
69 byte Character_Level
88 byte Character_Nobility
92 ushort Armour_Colour
94 ushort leftHand_Colour
96 ushort HeadGear_Colour
98 uint Character_QuizPoints
102 ushort Linage
108 uint Linage_Points
136 byte String_Count
137 byte Character_Name_Length
138 string Character_Name

i 5290 and 5165 source and different of packet ( Character Spawning 1014/10014)

But I find, please help me
08/31/2010 11:45 -Fáng-#23
Quote:
Originally Posted by 442077771 View Post
Character Spawning
Packet Layout Offset Type Value
0 ushort 138 + Character_Name
2 ushort 10014
4 uint Character_ModelID
8 uint Character_ID
12 ushort Character_GuildID
14 ushort Character_GuildRank
16 ulong Character_Status
24 uint Character_Helm_ID
28 uint Character_Armour_ID
32 uint Character_Garment_ID
36 uint Character_LeftHand_ID
40 uint Character_RightHand_ID
44 uint Character_Steed_ID
56 ushort Character_HairStyle
58 ushort Character_CordX
60 ushort Character_CordY
62 byte Character_Direction
63 byte Character_Action
68 byte Character_Reborn
69 byte Character_Level
88 byte Character_Nobility
92 ushort Armour_Colour
94 ushort leftHand_Colour
96 ushort HeadGear_Colour
98 uint Character_QuizPoints
102 ushort Linage
108 uint Linage_Points
136 byte String_Count
137 byte Character_Name_Length
138 string Character_Name

i 5290 and 5165 source and different of packet ( Character Spawning 1014/10014)

But I find, please help me
Use a breakpoint test and figure it out yourself. Make a character from 5165 and implant it in 5290 so you know what values to look for.

This is my 5179 Packet (the same as 5165):
Code:
public static byte[] SpawnCharacter(ClientSocket CSocket)
        {
            PacketBuilder P = new PacketBuilder(10014, 138 + CSocket.Client.Name.Length);
            P.Long(CSocket.Client.Model); //Character_ModelID [4]
            P.Long(CSocket.Client.ID); //Character_ID [8]
            if (CSocket.Client.Guild != null) // [12]
            {
                P.Short(CSocket.Client.GuildID); //Character_GuildID [12]
                P.Int(1); // [14]
                P.Byte((byte)CSocket.Client.GuildRank); //Character_GuildRank [15]
            }
            else // [12]
                P.Move(4);
            P.ULong(0); //Character_Status [16]
            if (!CSocket.Client.Dead && !CSocket.Client.Transformed) // [24]
            {
                int Garment = 0;
                int Head = 0;
                int Armor = 0;
                int RH = 0;
                int LH = 0;
                int Steed = 0;
                foreach (KeyValuePair<int, Struct.ItemInfo> Item in CSocket.Client.Equipment)
                {
                    if (Item.Value.Position == 1)
                        Head = Item.Value.ItemID;
                    else if (Item.Value.Position == 3 && Armor == 0)
                        Armor = Item.Value.ItemID;
                    else if (Item.Value.Position == 4)
                        RH = Item.Value.ItemID;
                    else if (Item.Value.Position == 5)
                        LH = Item.Value.ItemID;
                    else if (Item.Value.Position == 9)
                        Garment = Item.Value.ItemID;
                    else if (Item.Value.Position == 12)
                        Steed = Item.Value.ItemID;
                }
                P.Long(Head); //Character_Helm_ID [24]
                P.Long(Garment); //Character_Armor_ID [28]
                P.Long(Armor); //Character_Garment_ID [32]
                P.Long(LH); //Character_LeftHand_ID [36]
                P.Long(RH); //Character_RightHand_ID [40]
                P.Long(Steed); //Character_Steed_ID [44]
            }
            else
                P.Move(24); // [24]
            P.Long(12); // [48]
            P.Short(0); // [52]
            P.Short(0); // [54]
            if (!CSocket.Client.Dead)
                P.Short(CSocket.Client.Hair); //Character_HairStyle [56]
            else 
                P.Move(2); // [56]
            P.Short(CSocket.Client.Loc.X); //Character_CordX [58]
            P.Short(CSocket.Client.Loc.Y); //Character_CordY [60]

            P.Byte((byte)CSocket.Client.Direction); //Character_Direction [62]
            P.Byte((byte)CSocket.Client.Action); //Character_Action [63]
            P.Move(4); //[64]
            P.Byte((byte)CSocket.Client.Reborn); //Character_Reborn [68]
            P.Short(CSocket.Client.Level); //Character_Level [69]
            P.Byte(0); // 0 = Screen / 1 = window [71]
            P.Move(16); // [72]
            P.Long(CSocket.Client.NobleRank); //Character_Nobility [88]
            if (CSocket.Client.Equipment.ContainsKey(3)) 
            {
                Struct.ItemInfo Item1 = CSocket.Client.Equipment[3];
                P.Short(Item1.Color); //Armor_Color [92]
            }
            else
                P.Move(2);
            if (CSocket.Client.Equipment.ContainsKey(5)) 
            {
                Struct.ItemInfo Item2 = CSocket.Client.Equipment[5];
                P.Short(Item2.Color); //leftHand_Color [94]
            }
            else
                P.Move(2);
            if (CSocket.Client.Equipment.ContainsKey(1)) 
            {
                Struct.ItemInfo Item3 = CSocket.Client.Equipment[1];
                P.Short(Item3.Color); //HeadGear_Color [96]
            }
            else
                P.Move(2);
            P.Long(CSocket.Client.UPoints); //Character_QuizPoints [98]
            if (CSocket.Client.Equipment.ContainsKey(12))
            {
                Struct.ItemInfo Item4 = CSocket.Client.Equipment[12];
                P.Short(Item4.Plus); //Linage [102]
            }
            else
                P.Move(2); // [102]
            P.Long(0); // Unknown [104]
            if (CSocket.Client.Equipment.ContainsKey(12))
            {
                Struct.ItemInfo Item5 = CSocket.Client.Equipment[12];
                P.Long(Item5.SocketProgress); //Linage_Points [108]
            }
            else
                P.Move(4);
            P.Move(24); // [112]
            P.Byte(1); //String_Count [136]
            P.Byte((byte)CSocket.Client.Name.Length); //Character_Name_Length [137]
            P.Text(CSocket.Client.Name); //Character_Name [138]
            return P.getFinal(); // <== sends [138 + Char Name]
        }
08/31/2010 12:30 Basser#24
Unfortunately, I did not receive this packet (yet).
I will do this later.
09/01/2010 21:53 -Fáng-#25
Your character info packet is wrong. It works but it's only half complete.
Otherwise, good job =]
09/01/2010 22:02 FrontBoy#26
Thank you
09/02/2010 06:36 -Fáng-#27
Quote:
Originally Posted by filip100456 View Post
Thank you
Your welcome, lol.
I know it's not the same but that should help you get started. =]
09/02/2010 17:08 Basser#28
What does my character info miss?
09/02/2010 19:46 -Fáng-#29
Quote:
Originally Posted by Basser View Post
What does my character info miss?
Don't worry about it. It works right? =P
You did a good job starting people off. It's their job to figure out the rest =]
Good luck on your server!
09/02/2010 21:38 Korvacs#30
Quote:
Originally Posted by Basser View Post
What does my character info miss?
Stead Point thingys, i cant remember their name, but thats missing i think.