Register for your free account! | Forgot your password?

You last visited: Today at 18:48

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

Advertisement



SpawnPackets??

Discussion on SpawnPackets?? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
SpawnPackets??

Hey1 every1

Can any one Explain To me What spawnPackets is ??

Ty For ur Time

abdoumatrix is offline  
Old 02/19/2013, 14:21   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
A packet that spawns something. Likely you're referring to entity spawn packet.

It's the server saying "There's someone on your screen with this information". The client can then display that object (monster, client, item, etc)
pro4never is offline  
Thanks
2 Users
Old 02/19/2013, 14:22   #3
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Spawn packet is the packet responsible for Appearence of Monsters / Other Players its type is 10014 and its length depends on Name length of Character , Clan name length too.. once there is smthing wrong in any of those offsets (Body / Name / X / Y) the Player Or monster will be Invisible for u although they exist in server .. Hope i helped u
shadowman123 is offline  
Thanks
2 Users
Old 02/19/2013, 14:23   #4
 
sweetloudpl's Avatar
 
elite*gold: 0
Join Date: Jul 2012
Posts: 17
Received Thanks: 9
Quote:
Originally Posted by abdoumatrix View Post
Hey1 every1

Can any one Explain To me What spawnPackets is ??

Ty For ur Time

version ?
sweetloudpl is offline  
Old 02/19/2013, 14:27   #5
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by sweetloudpl View Post
version ?
i guess u missunderstood him .. all he needs is Packet Describtion not Structure so Version doesnt do matter in this case
shadowman123 is offline  
Old 02/19/2013, 14:30   #6
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
Quote:
Originally Posted by pro4never View Post
A packet that spawns something. Likely you're referring to entity spawn packet.

It's the server saying "There's someone on your screen with this information". The client can then display that object (monster, client, item, etc)
Quote:
Originally Posted by shadowman123 View Post
Spawn packet is the packet responsible for Appearence of Monsters / Other Players its type is 10014 and its length depends on Name length of Character , Clan name length too.. once there is smthing wrong in any of those offsets (Body / Name / X / Y) the Player Or monster will be Invisible for u although they exist in server .. Hope i helped u
Quote:
Originally Posted by sweetloudpl View Post
version ?
I'm asking to know what change in 5700+ patch

cuz i have seen this

Quote:
Originally Posted by sala7mostafa View Post
U can use 5696 to make the new class
Just spawnPackets changed in this patch
Quote:
Originally Posted by sala7mostafa View Post
u should +2 on name, clan name, X, Y and HitPoints
thats it
So Most changes is in Entity File

Is this Right?

PHP Code:
public string Name
        
{
            
get
            
{
                return 
_Name;
            }
            
set
            
{
                
this._Name value;
                
int index 234;
                if (
this.ClanName != "")
                {
                    
this.SpawnPacket = new byte[((((index) + 3) + this.Name.Length) + this.ClanName.Length) + 2];
                    
Writer.WriteUInt16((ushort)((((index 3) + this.Name.Length) + this.ClanName.Length) + 2), 0this.SpawnPacket);
                    
Writer.WriteUInt16(0x271e2this.SpawnPacket);
                    
Writer.WriteUInt32(this.Flagindex 7this.SpawnPacket);
                    
this.SpawnPacket[index] = 4;
                    
this.SpawnPacket[index 1] = (byte)this._Name.Length;
                    
Writer.WriteString(this._Nameindex 2this.SpawnPacket);
                    
this.SpawnPacket[((index 1) + this.SpawnPacket[index 1]) + 2] = (byte)this.ClanName.Length;
                    
Writer.WriteString(this.ClanName, ((index 1) + this.SpawnPacket[index 1]) + 3this.SpawnPacket);
                }
                else
                {
                    
this.SpawnPacket = new byte[((index) + 3) + this.Name.Length];
                    
Writer.WriteUInt16((ushort)((index 3) + this.Name.Length), 0this.SpawnPacket);
                    
Writer.WriteUInt16(0x271e2this.SpawnPacket);
                    
Writer.WriteUInt32(this.Flagindex 7this.SpawnPacket);
                    
this.SpawnPacket[index] = 4;
                    
this.SpawnPacket[index 1] = (byte)this._Name.Length;
                    
Writer.WriteString(this._Nameindex 2this.SpawnPacket);
                }
            }
        }


______________________________________________________________________________________________________


 
public ushort X
        
{
            
get
            
{
                return 
this._x;
            }
            
set
            
{
                
this._x value;
                
Writer.WriteUInt16(value94this.SpawnPacket);
            }
        }


______________________________________________________________________________________________________

        
public ushort Y
        
{
            
get
            
{
                return 
this._y;
            }
            
set
            
{
                
this._y value;
                
Writer.WriteUInt16(value96this.SpawnPacket);
            }
        }

_______________________________________________________________________________________________________

public uint Hitpoints
        
{
            
get
            
{
                return 
this._hitpoints;
            }
            
set
            
{
                if (
this.EntityFlag == Conquer_Online_Server.Game.EntityFlag.Player)
                {
                    
this.Update(0valuefalse);
                }
                
this._hitpoints value;
                if (
this.Boss 0)
                {
                    
uint num this.MaxHitpoints 10000;
                    if (
num != 0)
                    {
                        
Writer.WriteUInt16((ushort)(value num), 86this.SpawnPacket);
                    }
                    else
                    {
                        
Writer.WriteUInt16((ushort)(((double)((value this.MaxHitpoints) / 1000)) / 1.09), 86this.SpawnPacket);
                    }
                }
                else
                {
                    
Writer.WriteUInt16((ushort)value86this.SpawnPacket);
                }
            }
        } 
abdoumatrix is offline  
Old 02/19/2013, 14:40   #7
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
X , Y , Actions , Angle , First Class , 2nd & 3rd Classes , ClanName , PlayerName ... btw Name spawn packet is coded Badly ... too useless Codes
shadowman123 is offline  
Old 02/19/2013, 15:26   #8
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
Quote:
Originally Posted by shadowman123 View Post
X , Y , Actions , Angle , First Class , 2nd & 3rd Classes , ClanName , PlayerName ... btw Name spawn packet is coded Badly ... too useless Codes
Is IT All >>>> Spawn Packets
PHP Code:
Actions Angle First Class , 2nd 3rd Classes ClanName PlayerName 

Dont get the highlights

do u mean it bad coded or it is still the same unchanged
abdoumatrix is offline  
Old 02/19/2013, 15:40   #9
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by abdoumatrix View Post
Is IT All >>>> Spawn Packets
PHP Code:
Actions Angle First Class , 2nd 3rd Classes ClanName PlayerName 

Dont get the highlights

do u mean it bad coded or it is still the same unchanged
i mean its badly coded :S .. it changed for sure and about what i mentioned they arent all spawn packet Variables but these are the changed Ones
shadowman123 is offline  
Old 02/19/2013, 16:07   #10
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
People need to stop writing their spawnpacket in the properties and just make a method to generate the spawnpacket whenever needed.

Much easier to control.

Ex.
Code:
		/// <summary>
		/// Creates the spawnpacket associated with the client.
		/// </summary>
		public Packets.SpawnPacket CreateSpawnPacket()
		{
			Packets.SpawnPacket spawn = new ProjectX_V3_Game.Packets.SpawnPacket(
				new ProjectX_V3_Game.Packets.StringPacker(Name, "", ""));
			spawn.Mesh = Mesh;
			spawn.EntityUID = EntityUID;
			spawn.GuildRank = Enums.GuildRank.None;

			Data.ItemInfo head = Equipments[Enums.ItemLocation.Head];
			if (head != null)
				spawn.HelmetID = head.ItemID;
			
			Data.ItemInfo garment = Equipments[Enums.ItemLocation.Garment];
			if (garment != null)
				spawn.GarmentID = garment.ItemID;
			
			Data.ItemInfo armor = Equipments[Enums.ItemLocation.Armor];
			if (armor != null)
				spawn.ArmorID = armor.ItemID;
			
			Data.ItemInfo right = Equipments[Enums.ItemLocation.WeaponR];
			if (right != null)
				spawn.RightHandID = right.ItemID;
			
			Data.ItemInfo left = Equipments[Enums.ItemLocation.WeaponL];
			if (left != null)
				spawn.LeftHandID = left.ItemID;
			
			Data.ItemInfo steed = Equipments[Enums.ItemLocation.Steed];
			if (steed != null)
			{
				spawn.SteedID = steed.ItemID;
				spawn.MountColor = steed.SocketAndRGB;
			}

			spawn.HP = HP;
			spawn.HairStyle = HairStyle;
			spawn.X = X;
			spawn.Y = Y;
			spawn.Direction = Direction;
			spawn.Action = Action;
			spawn.Reborns = Reborns;
			spawn.Level = Level;
			spawn.Job = Class;
			return spawn;
		}
Note: ^Uncompleted.
Super Aids is offline  
Old 02/19/2013, 16:13   #11
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Quote:
Originally Posted by Super Aids View Post
People need to stop writing their spawnpacket in the properties and just make a method to generate the spawnpacket whenever needed.

Much easier to control.

Ex.
Code:
		/// <summary>
		/// Creates the spawnpacket associated with the client.
		/// </summary>
		public Packets.SpawnPacket CreateSpawnPacket()
		{
			Packets.SpawnPacket spawn = new ProjectX_V3_Game.Packets.SpawnPacket(
				new ProjectX_V3_Game.Packets.StringPacker(Name, "", ""));
			spawn.Mesh = Mesh;
			spawn.EntityUID = EntityUID;
			spawn.GuildRank = Enums.GuildRank.None;

			Data.ItemInfo head = Equipments[Enums.ItemLocation.Head];
			if (head != null)
				spawn.HelmetID = head.ItemID;
			
			Data.ItemInfo garment = Equipments[Enums.ItemLocation.Garment];
			if (garment != null)
				spawn.GarmentID = garment.ItemID;
			
			Data.ItemInfo armor = Equipments[Enums.ItemLocation.Armor];
			if (armor != null)
				spawn.ArmorID = armor.ItemID;
			
			Data.ItemInfo right = Equipments[Enums.ItemLocation.WeaponR];
			if (right != null)
				spawn.RightHandID = right.ItemID;
			
			Data.ItemInfo left = Equipments[Enums.ItemLocation.WeaponL];
			if (left != null)
				spawn.LeftHandID = left.ItemID;
			
			Data.ItemInfo steed = Equipments[Enums.ItemLocation.Steed];
			if (steed != null)
			{
				spawn.SteedID = steed.ItemID;
				spawn.MountColor = steed.SocketAndRGB;
			}

			spawn.HP = HP;
			spawn.HairStyle = HairStyle;
			spawn.X = X;
			spawn.Y = Y;
			spawn.Direction = Direction;
			spawn.Action = Action;
			spawn.Reborns = Reborns;
			spawn.Level = Level;
			spawn.Job = Class;
			return spawn;
		}
Note: ^Uncompleted.

you mean using smthing like that

PHP Code:
public static void NewEntity(Entity TargetEntity client)
        {
            
byte[] Buffer;
            
byte Length w.e;
            
Buffer = new byte[Length];
            
Writer.WriteUInt16(Length0Buffer);
            
Writer.WriteUInt16(100142Buffer);
            
Writer.WriteUInt32(Target.Body4Buffer);
            
Writer.WriteUInt32(Target.UID8Buffer);
            
Writer.WriteUInt32(Target.GuildID12Buffer);
            
Writer.WriteUInt32(Target.GuildRank16Buffer);
            
Writer.WriteUInt32(Target.Hitpoints84Buffer);
            
Target.Owner.Equipment.SendAllEquips(client.Owner);
            
client.Owner.Send(Buffer);
        } 
shadowman123 is offline  
Old 02/19/2013, 16:16   #12
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Quote:
Originally Posted by shadowman123 View Post
you mean using smthing like that

PHP Code:
public static void NewEntity(Entity TargetEntity client)
        {
            
byte[] Buffer;
            
byte Length w.e;
            
Buffer = new byte[Length];
            
Writer.WriteUInt16(Length0Buffer);
            
Writer.WriteUInt16(100142Buffer);
            
Writer.WriteUInt32(Target.Body4Buffer);
            
Writer.WriteUInt32(Target.UID8Buffer);
            
Writer.WriteUInt32(Target.GuildID12Buffer);
            
Writer.WriteUInt32(Target.GuildRank16Buffer);
            
Writer.WriteUInt32(Target.Hitpoints84Buffer);
            
Target.Owner.Equipment.SendAllEquips(client.Owner);
            
client.Owner.Send(Buffer);
        } 
Indeed, although do null checks on Owner, because you don't want to send packets to ex. a monster xD

The only thing I dislike about that is you're not using a packethandler to handle the actual structure of the packet.
Super Aids is offline  
Old 02/19/2013, 16:27   #13
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
well what came on my mind is adding case :-

PHP Code:
#region SpawnPacket [10014]
                
case 10014:
                    {
                        foreach (
Client.GameState player in Kernel.GamePool.Values)
                        {
                            if (
player.Entity.UID != client.Entity.UID)
                            {
                                
// if there are players in Clients Screen send each player status to client
                            
}
                        }
                        break;
                    }
                
#endregion 
shadowman123 is offline  
Thanks
1 User
Old 02/19/2013, 17:13   #14
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
If you are referring to when a packet is received then the spawnpacket is never received. Although there is a subtype of GeneralData that requests specific entities in your screen if they have left the screen.

Also you really need some kind of screen class and map class to handle your spawns.

Instead of looping through ALL clients then do it like this.
Code:
1. Loop through the collection for your screen.
2. Check if distance is valid between the entity and the one checking.
3. If the distance is valid then send spawnpaclet (there is 3 different, entity, ground and npc).
4. If the distance is invalid then send packets to remove (there is 2 different, subtype of generaldata and subtype of grounditem) + remove from screen collection
5. Loop through the collection in your map
6. Check if distance is valid between the entity and the one checking.
7. If the distance is valid then send spawnpaclet (there is 3 different, entity, ground and npc). + add to screen collection
8. If the distance is invalid then send packets to remove (there is 2 different, subtype of generaldata and subtype of grounditem) + remove from screen collection
Super Aids is offline  
Thanks
1 User
Old 02/19/2013, 22:01   #15
 
elite*gold: 0
Join Date: Feb 2009
Posts: 259
Received Thanks: 159
is easy to update in properties ... if you use your mind

Code:
public enum objpos : byte
    {
        Uint32_Mesh = 4,
        Uint32_UID = 8,
        Uint32_GuildId = 12,
        Uint32_GuildRank = 16,
        Uint16_unknown1 = 20,
        BitVector32 = 22,
        BitVector16 = 39,
        Uint32_Head = 44,
        Uint32_Garment = 48,
        Uint32_Armor = 52,
        Utin32_LeftWeapon = 56,
        Uint32_RightWeapon = 60,
        Uint32_LeftWeaponAccessory = 64,
        Uint32_RightWeaponAccessory = 68,
        Uint32_Steed = 72,

        Uint16_X = 94,
        Uint16_Y = 96,
        Byte_Fascing = 100,
        Byte_Action = 101,
        Byte_Reborn = 108,
        Byte_Level = 109,
        Byte_Nobility = 133,
        Str_Count = 234,
        Str_NameLenght = 235,
        Uint16_PLenght = 237

    }
Code:
        public CMD.ConquerAngle Facing { get { return (CMD.ConquerAngle)ReadByte((byte)objpos.Byte_Fascing); } set { WriteByte((byte)value, (byte)objpos.Byte_Fascing); } }
        public CMD.ConquerAction Action { get { return (CMD.ConquerAction)ReadByte((byte)objpos.Byte_Action); } set { WriteByte((byte)value, (byte)objpos.Byte_Action); } }


   public byte Level { get { return _lvl; } set { WriteByte(value, (byte)objpos.Byte_Level); _lvl = value; } }
and others
teroareboss1 is offline  
Reply


Similar Threads Similar Threads
Probleme mit Spawnpackets
02/21/2012 - DarkOrbit - 12 Replies
Eig bin ich eher der Typ der viel search benutzt und dann auch alles findet, aber hierbei brauch ich mal bisschen hilfe :D (hab nichts passendes gefunden) Zu meinem Problem: Ich habe in Delphi einen soweit funktionierenden sniffer bzw testbot geschrieben, der per idtcpclient sich aufm server einloggt. Das geht auch soweit, auch das laufsystem funktioniert, was aber nicht geht ist, dass er mir kein Spawnpacket für resourcen oder honeyboxen anzeigt genauso für die Streuner >_< Hab mir das...



All times are GMT +2. The time now is 18:48.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.