Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 15:00

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Confused about the spawn entity packet

Discussion on Confused about the spawn entity packet within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Confused about the spawn entity packet

So I wanted to update the spawn entity packet from Hybrid's source (5135 -> 5165)
Code:
public unsafe struct SpawnEntityPacket
    {
        [FieldOffset(0)]
        public ushort Size;
        [FieldOffset(2)]
        public ushort Type;
        [FieldOffset(4)]
        public uint Model;
        [FieldOffset(8)]
        public uint UID;
        [FieldOffset(12)]
        public ushort GuildID;
        [FieldOffset(15)]
        public GuildRank GuildRank;
        [FieldOffset(16)]
        public ulong StatusFlag;

        [FieldOffset(24)]
        public uint HelmetID;
        [FieldOffset(28)]
        public uint HorseID;
        [FieldOffset(32)]
        public uint ArmorID;
        [FieldOffset(36)]
        public uint LeftHandID;
        [FieldOffset(40)]
        public uint RightHandID;

        [FieldOffset(48)]
        public ushort Hitpoints;
        [FieldOffset(50)]
        public ushort Level;
        [FieldOffset(52)]
        public ushort Hairstyle;
        [FieldOffset(54)]
        public ushort X;
        [FieldOffset(56)]
        public ushort Y;
        [FieldOffset(58)]
        public ConquerAngle Facing;
        [FieldOffset(59)]
        public ConquerAction Action;
        [FieldOffset(64)]
        public byte Reborn;

        [FieldOffset(65)]
        public ushort LevelPotency;
        [FieldOffset(70)]
        public int OtherPotency;
        [FieldOffset(84)]
        public NobilityID Nobility;

        [FieldOffset(88)]
        public ushort ArmorColor;
        [FieldOffset(90)]
        public ushort ShieldColor;
        [FieldOffset(92)]
        public ushort HeadColor;

        [FieldOffset(110)]
        public byte StringsCount;
        [FieldOffset(111)]
        public byte NameLength;
        [FieldOffset(112)]
        public fixed byte Strings[24];

        public void SetName(string value)
        {
            string m_Name = value;
            if (m_Name.Length > 15)
                m_Name = m_Name.Substring(0, 15);
            Size = (byte)(0x70 + m_Name.Length);
            StringsCount = 1;
            NameLength = (byte)m_Name.Length;
            fixed (byte* ptr = Strings)
            {
                MSVCRT.memset(ptr, 0, 24);
                value.CopyTo(ptr);
                PacketBuilder.AppendTQServer(ptr + NameLength, 8);
            }
        }

        public static SpawnEntityPacket Create()
        {
            // Size and TQServer are appended when SetName() is called.
            SpawnEntityPacket packet = new SpawnEntityPacket();
            packet.Type = 0x271E;
            return packet;
        }
But there are a few things confusing me:

[FieldOffset(48)]
public ushort Hitpoints;
[FieldOffset(65)]
public ushort LevelPotency;
[FieldOffset(70)]
public int OtherPotency;

According to the packet wiki () there's no such thing as HP, LevelPotency and OtherPotency in the packet yet there is in Hybrid's.
So how should I update this?
Kiyono is offline  
Old 12/19/2010, 14:47   #2


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Depends which your spawning, the packet wiki only contains the offsets for the character spawning, monster spawning uses offsets which are also used by characters but in a different way. HP, Level Potency and Other Potency are only ever used, to my knowledge for monsters, since they display these details, characters do not.
Korvacs is offline  
Old 12/19/2010, 15:29   #3

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by Korvacs View Post
Depends which your spawning, the packet wiki only contains the offsets for the character spawning, monster spawning uses offsets which are also used by characters but in a different way. HP, Level Potency and Other Potency are only ever used, to my knowledge for monsters, since they display these details, characters do not.
I thought that Level and Other Potency were used for this:

And it doesn't really explain why those values aren't there in the 5165 version.
Kiyono is offline  
Old 12/19/2010, 17:42   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
as korv said. not all values for every use of packets are posted on his wiki. spawn entity can be used for a number of things and therefor some fields will be used in different ones. IE; hp when spawning mobs or the bp calc as mentioned.

Just run through the diff offsets yourself using a cmd and you'll be able to structure it easily enough.
pro4never is offline  
Old 12/19/2010, 18:22   #5


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by Kiyono View Post
I thought that Level and Other Potency were used for this:

And it doesn't really explain why those values aren't there in the 5165 version.
Your confusing 2 systems, the spawn packet does not relate to that.
Korvacs is offline  
Old 12/19/2010, 18:58   #6
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by Kiyono View Post
So I wanted to update the spawn entity packet from Hybrid's source (5135 -> 5165)
Code:
public unsafe struct SpawnEntityPacket
    {
        [FieldOffset(0)]
        public ushort Size;
        [FieldOffset(2)]
        public ushort Type;
        [FieldOffset(4)]
        public uint Model;
        [FieldOffset(8)]
        public uint UID;
        [FieldOffset(12)]
        public ushort GuildID;
        [FieldOffset(15)]
        public GuildRank GuildRank;
        [FieldOffset(16)]
        public ulong StatusFlag;

        [FieldOffset(24)]
        public uint HelmetID;
        [FieldOffset(28)]
        public uint HorseID;
        [FieldOffset(32)]
        public uint ArmorID;
        [FieldOffset(36)]
        public uint LeftHandID;
        [FieldOffset(40)]
        public uint RightHandID;

        [FieldOffset(48)]
        public ushort Hitpoints;
        [FieldOffset(50)]
        public ushort Level;
        [FieldOffset(52)]
        public ushort Hairstyle;
        [FieldOffset(54)]
        public ushort X;
        [FieldOffset(56)]
        public ushort Y;
        [FieldOffset(58)]
        public ConquerAngle Facing;
        [FieldOffset(59)]
        public ConquerAction Action;
        [FieldOffset(64)]
        public byte Reborn;

        [FieldOffset(65)]
        public ushort LevelPotency;
        [FieldOffset(70)]
        public int OtherPotency;
        [FieldOffset(84)]
        public NobilityID Nobility;

        [FieldOffset(88)]
        public ushort ArmorColor;
        [FieldOffset(90)]
        public ushort ShieldColor;
        [FieldOffset(92)]
        public ushort HeadColor;

        [FieldOffset(110)]
        public byte StringsCount;
        [FieldOffset(111)]
        public byte NameLength;
        [FieldOffset(112)]
        public fixed byte Strings[24];

        public void SetName(string value)
        {
            string m_Name = value;
            if (m_Name.Length > 15)
                m_Name = m_Name.Substring(0, 15);
            Size = (byte)(0x70 + m_Name.Length);
            StringsCount = 1;
            NameLength = (byte)m_Name.Length;
            fixed (byte* ptr = Strings)
            {
                MSVCRT.memset(ptr, 0, 24);
                value.CopyTo(ptr);
                PacketBuilder.AppendTQServer(ptr + NameLength, 8);
            }
        }

        public static SpawnEntityPacket Create()
        {
            // Size and TQServer are appended when SetName() is called.
            SpawnEntityPacket packet = new SpawnEntityPacket();
            packet.Type = 0x271E;
            return packet;
        }
But there are a few things confusing me:

[FieldOffset(48)]
public ushort Hitpoints;
[FieldOffset(65)]
public ushort LevelPotency;
[FieldOffset(70)]
public int OtherPotency;

According to the packet wiki () there's no such thing as HP, LevelPotency and OtherPotency in the packet yet there is in Hybrid's.
So how should I update this?
Hitpoints refers to a monsters hitpoints (as monters are spawned with given HP). LevelPotency, and OtherPotency is visible when you view a persons equipment. I'd assume this is "LevelPotency":
Quote:
69 byte Character_Level
and OtherPotency simply isn't documented in this structure (so you'd have to guess & test to find out where it is, it's likely between 69-88).

So, you'll have to find the new offsets for OtherPotency, and Hitpoints. You can base them off my current offsets, and,
Essentially, this hints the value is either at the offset specified or above it.
InfamousNoone is offline  
Old 12/19/2010, 22:42   #7

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by InfamousNoone View Post
Hitpoints refers to a monsters hitpoints (as monters are spawned with given HP). LevelPotency, and OtherPotency is visible when you view a persons equipment. I'd assume this is "LevelPotency":

and OtherPotency simply isn't documented in this structure (so you'd have to guess & test to find out where it is, it's likely between 69-88).

So, you'll have to find the new offsets for OtherPotency, and Hitpoints. You can base them off my current offsets, and,
Essentially, this hints the value is either at the offset specified or above it.
Isn't this the character level?
[FieldOffset(50)]
public ushort Level;
Kiyono is offline  
Old 12/20/2010, 01:41   #8
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by Kiyono View Post
Isn't this the character level?
[FieldOffset(50)]
public ushort Level;

Uh, there's two "level" offsets in the spawn packet. One is for monsters (it's how the client determines whether a monster is black name or redname)... and the other one is for potency (like, when you view someone's equipment, it says their level).
InfamousNoone is offline  
Reply


Similar Threads Similar Threads
[Request] NPC Spawn Packet Patch 5325
12/03/2010 - CO2 Private Server - 5 Replies
Im currently working on a source for 5325, and for some odd reason the NPCs dont want to spawn. The packets are sending at the correct time etc, so its something with the packet. The current packet i have is this: Packet Length = 36 ushort 28, offset 0 //also tried ushort of 20 ushort 2030, offset 2 uint UID, offset 4 ushort X, offset 8 ushort Y, offset 10 ushort Type, offset 12 ushort Kind, offset 14
[Question] Spawn Packet of 5290 source
08/31/2010 - CO2 Private Server - 5 Replies
:handsdown:Entity SendSpaw packet (10014):handsdown: When I use tow account 5290 client login game. One Role can not see another Role I think the problem is in Packet: Entity SendSpaw The following is the structure of 5165
Spawn Entity - Equipment (5273)
06/29/2010 - CO2 Private Server - 9 Replies
The Entity Spawn packet (10014) is sent by the server and contains values to spawn the character, such as the equipment id's. Now when logging packets, I never once see this packet sent, am I missing something? I need to log it to get the correct offsets of the equipment id's, since my equipment isn't showing up on my character (looks naked, but if you go in the stats it shows the equipment is equipped). So does anyone know if TQ changed some shit around? Thanks. (PS, this is for client...
:confused::confused: Rates ändern :confused::confused:
03/06/2010 - Metin2 PServer Guides & Strategies - 7 Replies
Hallo epvp. Folgendes:Ich wollte meine Rates so ändenr wie auf Doofmt2 oder ShenShi. Irgednjemand sagste was von event oder so. ICh will nur wissen wie man sie PERMANENT ändert und nicht /priv_empire ...



All times are GMT +1. The time now is 15:01.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.