You last visited: Today at 23:06
Advertisement
5180 CharacterInfo packet ( Impule's )
Discussion on 5180 CharacterInfo packet ( Impule's ) within the CO2 Private Server forum part of the Conquer Online 2 category.
07/04/2010, 01:38
#1
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
5180 CharacterInfo packet ( Impule's )
My packet appears to be wrong, the characternames are fucked up...and I cant see anybody else but can see other people talking/whispers along with them dropping things and doing things like @gm hey but if I whisper them using the name that appears when they talk its like E Speak to all: Hey but if I whisper there real name they get it and my names appears fucked. heres my packet with a few /* */ things
Code:
using System;
namespace Conquer_Online_Server.Network.GamePackets
{
public class CharacterInfo : Writer, Interfaces.IPacket
{
Client.GameState client;
public CharacterInfo(Client.GameState _client)
{
client=_client;
}
public void Deserialize(byte[] buffer)
{
throw new NotImplementedException();
}
public byte[] ToArray()
{
byte[] Packet = new byte[8 + 92 + client.Entity.Spouse.Length + client.Entity.Name.Length];
WriteUInt16((ushort)(Packet.Length - 8), 0, Packet);
WriteUInt16(0x3ee, 2, Packet);
WriteUInt32(client.Entity.UID, 4, Packet);
WriteUInt32(client.Entity.Mesh, 8, Packet);
WriteUInt16(client.Entity.HairStyle, 12, Packet);
WriteUInt32(client.Entity.Money, 14, Packet);
WriteUInt32(client.Entity.ConquerPoints, 18, Packet);
WriteUInt64(client.Entity.Experience, 22, Packet);
WriteUInt16(client.Entity.Strength, 50, Packet);
WriteUInt16(client.Entity.Agility, 52, Packet);
WriteUInt16(client.Entity.Vitality, 54, Packet);
WriteUInt16(client.Entity.Spirit, 56, Packet);
WriteUInt16(client.Entity.Atributes, 58, Packet);
WriteUInt16((ushort)client.Entity.Hitpoints, 60, Packet);
WriteUInt16(client.Entity.Mana, 62, Packet);
WriteUInt16(client.Entity.PKPoints, 64, Packet);
Packet[66] = client.Entity.Level;
Packet[67] = client.Entity.Class;
Packet[69] = client.Entity.Reborn;
Packet[70] = 1;
WriteUInt32(client.Entity.QuizPoints, 71, Packet);
Packet[81] = 1;
Packet[89] = 2;
Packet[90] = (byte)client.Entity.Name.Length;
WriteStringWithLength(client.Entity.Name, 91, Packet);
Packet[91 + Packet[90]] = (byte)client.Entity.Spouse.Length;
WriteStringWithLength(client.Entity.Spouse, 92 + Packet[90], Packet);
WriteUInt16((ushort)client.Entity.HonorPoints, 93, Packet);
return Packet;
/*(0, 75, buffer);
Packet[81] = 1;
Packet[89] = 2;
Packet[87] = 2;
Packet[90] = (byte)client.Entity.Name.Length;
WriteStringWithLength(client.Entity.Name, Packet[90] + 92, Packet);
WriteStringWithLength(client.Entity.Spouse, 92, Packet);
return Packet;*/
}
public void Send(Client.GameState client)
{
client.Send(ToArray());
}
}
}
Any help im useless with packets btw if anyone want to put a few packets from hex to a structure pm me :P
07/04/2010, 10:03
#2
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Bump
07/04/2010, 22:26
#3
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
If your name looks fine, try updating the entity spawn packet (Entity.cs)
07/04/2010, 22:32
#4
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Thanks, I figured that out know my name is slighty screwed like like E^2 8mination[PM I take it thats whats causing me not being able to see others ?
Code:
public string Name
{
get
{
return _Name;
}
set
{
_Name = value;
SpawnPacket = new byte[8 + 168 + Name.Length];
WriteUInt16((ushort)(168 + Name.Length), 0, SpawnPacket);
WriteUInt16(10014, 2, SpawnPacket);
SpawnPacket[136] = 1;
SpawnPacket[137] = (byte)_Name.Length;
WriteString(_Name, 138, SpawnPacket);
}
}
?
07/04/2010, 22:44
#5
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by
MonstersAbroad
Thanks, I figured that out know my name is slighty screwed like like E^2 8mination[PM I take it thats whats causing me not being able to see others ?
Code:
public string Name
{
get
{
return _Name;
}
set
{
_Name = value;
SpawnPacket = new byte[8 + 168 + Name.Length];
WriteUInt16((ushort)(168 + Name.Length), 0, SpawnPacket);
WriteUInt16(10014, 2, SpawnPacket);
SpawnPacket[136] = 1;
SpawnPacket[137] = (byte)_Name.Length;
WriteString(_Name, 138, SpawnPacket);
}
}
?
The offsets has changed? LOL for X,Y (that's what mainly matters)
07/04/2010, 22:54
#6
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
I'm kinda noob and have no idea what im doing with packets and im trying so what are the offsets ? SpawnPacket[136] = 1;
SpawnPacket[137] = (byte)_Name.Length;
?
Offtopic:
Anybody got that Jingle bell's song acidco had ? It's stuck in my head after watching a video and I REALLY need to listen to it :/
07/05/2010, 00:29
#7
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Quote:
Originally Posted by
MonstersAbroad
I'm kinda noob and have no idea what im doing with packets and im trying so what are the offsets ? SpawnPacket[136] = 1;
SpawnPacket[137] = (byte)_Name.Length;
?
The number in the [] is the offset.
07/05/2010, 02:08
#8
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
So like
Code:
_Name = value;
SpawnPacket = new byte[8 + 168 + Name.Length];
//WriteUInt16((ushort)(168 + Name.Length), 0, SpawnPacket);
WriteUInt16((ushort)(ToArray().Length - 8), 0, SpawnPacket);
WriteUInt16(10014, 2, SpawnPacket);
SpawnPacket[71] = 1;
//SpawnPacket[137] = (byte)_Name.Length;
this.Name = Name;
//WriteString(_Name, 138, SpawnPacket);
? -- Edited stright from Immune's source
edit done a ton of testing ive got this
Code:
set
{
_Name = value;
SpawnPacket = new byte[8 + 168 + Name.Length];
WriteUInt16((ushort)(168 + Name.Length), 0, SpawnPacket);
//WriteUInt16((ushort)(TToArray().Length - 8), 0, SpawnPacket);
WriteUInt16(10014, 2, SpawnPacket);
SpawnPacket[71] = 1;
//SpawnPacket[137] = (byte)_Name.Length;
//this.Name = Name;
WriteString(_Name, 72, SpawnPacket);
}
Result
View full size.
Been at this for over 3 hours now cmon help anyone?
07/05/2010, 10:28
#9
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
No dude, that means that your character info packet is not good.
using System;
namespace Conquer_Online_Server.Network.GamePackets
{
public class CharacterInfo : Writer, Interfaces.IPacket
{
Client.GameState client;
public CharacterInfo(Client.GameState _client)
{
client=_client;
}
public void Deserialize(byte[] buffer)
{
throw new NotImplementedException();
}
public byte[] ToArray()
{
byte[] Packet = new byte[100 + client.Entity.Spouse.Length + client.Entity.Name.Length];
WriteUInt16((ushort)(Packet.Length - 8), 0, Packet);
WriteUInt16(0x3ee, 2, Packet);
WriteUInt32(client.Entity.UID, 4, Packet);
WriteUInt32(client.Entity.Mesh, 8, Packet);
WriteUInt16(client.Entity.HairStyle, 12, Packet);
WriteUInt32(client.Entity.Money, 14, Packet);
WriteUInt32(client.Entity.ConquerPoints, 18, Packet);
WriteUInt64(client.Entity.Experience, 22, Packet);
WriteUInt16(client.Entity.Strength, 50, Packet);
WriteUInt16(client.Entity.Agility, 52, Packet);
WriteUInt16(client.Entity.Vitality, 54, Packet);
WriteUInt16(client.Entity.Spirit, 56, Packet);
WriteUInt16(client.Entity.Atributes, 58, Packet);
WriteUInt16((ushort)client.Entity.Hitpoints, 60, Packet);
WriteUInt16(client.Entity.Mana, 62, Packet);
WriteUInt16(client.Entity.PKPoints, 64, Packet);
Packet[66] = client.Entity.Level;
Packet[67] = client.Entity.Class;
Packet[69] = client.Entity.Reborn;
Packet[70] = 1;
WriteUInt32(client.Entity.QuizPoints, 71, Packet);
WriteUInt16(0/*Enlight points*/, 75, Packet);
Packet[81] = 1;
Packet[89] = 2;
WriteStringWithLength(client.Entity.Name, 90, Packet);
WriteStringWithLength(client.Entity.Spouse, 91 + Packet[90], Packet);
return Packet;
}
public void Send(Client.GameState client)
{
client.Send(ToArray());
}
}
}
07/05/2010, 16:51
#10
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Thanks!, Can anybody help me with my spawnpacket?
Code:
_Name = value;
SpawnPacket = new byte[8 + 168 + Name.Length];
WriteUInt16((ushort)(168 + Name.Length), 0, SpawnPacket);
//WriteUInt16((ushort)(TToArray().Length - 8), 0, SpawnPacket);
WriteUInt16(10014, 2, SpawnPacket);
SpawnPacket[71] = 1;
//SpawnPacket[137] = (byte)_Name.Length;
WriteString(_Name, 72, SpawnPacket);
And the result is that I can see what other people say stuff and they can see what I say to, I can see them drop items vise versia etc, cant see them visually not even there name. They are just not there...
07/05/2010, 17:29
#11
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by
MonstersAbroad
Thanks!, Can anybody help me with my spawnpacket?
Code:
_Name = value;
SpawnPacket = new byte[8 + 168 + Name.Length];
WriteUInt16((ushort)(168 + Name.Length), 0, SpawnPacket);
//WriteUInt16((ushort)(TToArray().Length - 8), 0, SpawnPacket);
WriteUInt16(10014, 2, SpawnPacket);
SpawnPacket[71] = 1;
//SpawnPacket[137] = (byte)_Name.Length;
WriteString(_Name, 72, SpawnPacket);
And the result is that I can see what other people say stuff and they can see what I say to, I can see them drop items vise versia etc, cant see them visually not even there name. They are just not there...
So I released the correct offsets, but however you fail to even recognize correct offsets? I'd say don't try to do such stuff untill you finally understand networking.
07/05/2010, 17:43
#12
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by
ImmuneOne
So I released the correct offsets, but however you fail to even recognize correct offsets? I'd say don't try to do such stuff untill you finally understand networking .
That's why people pay other people right?
07/05/2010, 18:13
#13
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
So ali, your saying I just need to correct the offsets?
#edit:
I changed to your offsets:
Result:
07/05/2010, 21:00
#14
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,519
Show us the spawn packet offsets.
07/05/2010, 21:19
#15
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by
Korvacs
Show us the spawn packet offsets.
It's kinda a whole class with lots of accessors
Similar Threads
Whats wrong with this GeneralData 5180 Packet ( impulse's )
06/27/2010 - CO2 Private Server - 4 Replies
here's a packet and I updated from the 5180 that was released but doesnt seem to want to work
using System;
namespace Conquer_Online_Server.Network.GamePackets
{
public class GeneralData : Writer, Interfaces.IPacket
{
public const ushort
SetLocation = 74,
[HELP] CharacterInfo Packet
10/09/2009 - CO2 Private Server - 5 Replies
Hi!
I would like to know if someone can post the CharacterInfo packet for thé new encryption ~5090.
I'm in trouble because i send a wrong Packet in the 1052.
So the 0x3f2 case 74 do not comes. The screen freeze a login...
So i think that I send the wrong packet.
Btw I'm using Hybrid's source.
I can't post my packet. I'm with my phone actualy.
Btw, thanks in advance for reply =)
All times are GMT +2. The time now is 23:07 .