Conquer Resource Wiki

12/16/2010 07:59 pro4never#151
Quote:
Originally Posted by stickray View Post
Can somebody tell me the Packet Structure of 1109? Guess this packet handles the Vendor_IDs if you enter the Market no?

Thanks
1009 is a very multi purpose packet... it's used for everything from determining your player ping to equiping items... etc.


In general the client sends a 1009 packet to server requesting an action and it then returns either a 1009 response or a set of different packets.

EG: for type 46 (show client gear) you are doing a uint32 for item uid in each equipment slot... but for other things like use item you're using a uint location/use type and most of the other parts of the packet are left blank (talking server>client here). I'd suggest simply logging the type of 1009 you want as it doesn't have a really consistent structure... well... it does... ushort, ushort followed by all uint32s but their usage changes almost as much as general data subtypes do if not more.
12/16/2010 09:59 samehvan#152
he is asking about 1009 or 1109??
12/16/2010 10:11 pro4never#153
Quote:
Originally Posted by samehvan View Post
he is asking about 1009 or 1109??
Shit sorry. Tired and didn't notice the 1 there cause I've seen 1009 used sooo many times lol!

Can't say I've structured it before... My bad.
12/16/2010 23:55 CptSky#154
From my very old 5017 source... The packet is incomplete, but functionnal. It's spawn a shop carpet.

Code:
UInt16 -> Length (28 + String Length)
UInt16 -> Type (1109)
UInt32 -> UniqId (Shop)
UInt64 -> Unknow
UInt16 -> PosX (Player.PosX + 1)
UInt16 -> PosY (Player.PosY)
UInt16 -> Look (406)
UInt16 -> Type (14)
UInt16 -> Unknow
UInt8 -> String Count (1)
foreach String
  UInt8 -> String Length
  UInt8* -> String (Player.Name)
12/17/2010 13:21 samehvan#155
it is for spawning tnpcs

Code:
            ushort(28+Name.Lenght);            
            ushort(1109);            
            uint32(TerrianNpcID);
            uint32(TerrianMaxHp);
            uint32(TerrianCurrentHp);
            uint32(TerrianX);
            uint32(TerrianY);
            uint32(TerrianNpcType);
            ushort(26);//unknown i think it may be TerrianNpc.Look (Subtype)
            byte(Terrian.Facing);
            byte(Name.Length);
            Text(Name);
12/17/2010 21:14 Basser#156
Quote:
Originally Posted by samehvan View Post
it is for spawning tnpcs

Code:
            ushort(28+Name.Lenght);            
            ushort(1109);            
            uint32(TerrianNpcID);
            uint32(TerrianMaxHp);
            uint32(TerrianCurrentHp);
            uint32(TerrianX);
            uint32(TerrianY);
            uint32(TerrianNpcType);
            ushort(26);//unknown i think it may be TerrianNpc.Look (Subtype)
            byte(Terrian.Facing);
            byte(Name.Length);
            Text(Name);
Is this the same as SOBs?
12/18/2010 18:55 samehvan#157
yea,, i am pretty sure it's the same ,
12/21/2010 05:27 Arcо#158
5017 Composition packet
ushort 28 0
ushort 2036 2
uint Junk 4
uint MainUID 8
uint aMinorUID 12
uint bMinorUID 16
uint aGem 20
uint bGem 24
12/21/2010 11:24 InfamousNoone#159
Quote:
Originally Posted by CptSky View Post
From my very old 5017 source... The packet is incomplete, but functionnal. It's spawn a shop carpet.

Code:
UInt16 -> Length (28 + String Length)
UInt16 -> Type (1109)
UInt32 -> UniqId (Shop)
UInt64 -> Unknow
UInt16 -> PosX (Player.PosX + 1)
UInt16 -> PosY (Player.PosY)
UInt16 -> Look (406)
UInt16 -> Type (14)
UInt16 -> Unknow
UInt8 -> String Count (1)
foreach String
  UInt8 -> String Length
  UInt8* -> String (Player.Name)
Quote:
Originally Posted by samehvan View Post
it is for spawning tnpcs

Code:
            ushort(28+Name.Lenght);            
            ushort(1109);            
            uint32(TerrianNpcID);
            uint32(TerrianMaxHp);
            uint32(TerrianCurrentHp);
            uint32(TerrianX);
            uint32(TerrianY);
            uint32(TerrianNpcType);
            ushort(26);//unknown i think it may be TerrianNpc.Look (Subtype)
            byte(Terrian.Facing);
            byte(Name.Length);
            Text(Name);
Just a copy-paste from ConquerServer_v2 with a quick-mod:
\Packet Structures\Spawn SOB 0x455.cs\
Code:
    public enum SOBType : ushort
    {
        Gate = 0x1A,
        Scarecrow = 0x16,
        Stake = 0x15,
        Pole = 0x0A,
        Carpet = 0x0E
    }
    public enum SOBMesh : ushort
    {
        LeftGate = 0x00F1,
        RightGate = 0x0115,
        Pole = 0x471,
        Carpet = 0x196
    }

    /// <summary>
    /// 0x455 (Server->Client)
    /// </summary>
    public unsafe struct SpawnSOBPacket
    {
        public ushort Size;
        public ushort Type;
        public uint UID;
        public int MaxHitpoints;
        public int Hitpoints;
        public ushort X;
        public ushort Y;
        public SOBMesh SOBMesh;
        public SOBType SOBType;
        public ushort Facing;
        public bool ShowName;
        public byte NameLength;
        public fixed byte Strings[24];

        public static SpawnSOBPacket Create()
        {
            SpawnSOBPacket Data = new SpawnSOBPacket();
            Data.Size = 0x1C;
            Data.Type = 0x455;  
            PacketBuilder.AppendTQServer(Data.Strings, 8);
            return Data;
        }
    }
If a name was assigned (and note: having a name is optional) to the static-object-monster the following changes are required:
\Core\SOBMonster.cs
Code:
            set
            {
                if (value.Length > 15)
                    value = value.Substring(0, 15);
                m_Name = value;
                Spawn.ShowName = true;
                Spawn.NameLength = (byte)value.Length;
                fixed (byte* lpStrings = Spawn.Strings)
                {
                    MSVCRT.memset(lpStrings, 0, 24);
                    m_Name.CopyTo(lpStrings);
                    PacketBuilder.AppendTQServer((byte*)lpStrings + Spawn.NameLength + 1, 8);
                }
                Spawn.Size = (ushort)(0x1C + Spawn.NameLength + 1);
            }
12/26/2010 22:40 -Shunsui-#160
anyone got the Name offset for players. for patch 5295
12/28/2010 12:36 Basser#161
Quote:
Originally Posted by -Shunsui- View Post
anyone got the Name offset for players. for patch 5295
Having trouble finding a string?
seriously?
Have you even tried logging the packet?
12/28/2010 19:56 -Shunsui-#162
Quote:
Originally Posted by Basser View Post
Having trouble finding a string?
seriously?
Have you even tried logging the packet?
i did i got 76 but i want to double check if its right because it dosent seem to be working
12/28/2010 21:41 samehvan#163
Quote:
Originally Posted by -Shunsui- View Post
i did i got 76 but i want to double check if its right because it dosent seem to be working
as i can remember it was

byte(Name.Length,156);
string(Name,157);

and i am sure about 5350+

byte(Name.Length,212);
string(Name,213);

Of course this is the spawning packet :p

if u need the Character info packets also , just let me know
12/28/2010 23:12 -Shunsui-#164
oops lmao, i ment the Level offset. was working with both of those for a while got confused,
12/29/2010 02:37 Arcо#165
Quote:
Originally Posted by -Shunsui- View Post
oops lmao, i ment the Level offset. was working with both of those for a while got confused,
Displayable variables are the easiest. Just test and test and test.