Register for your free account! | Forgot your password?

You last visited: Today at 15:34

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

Advertisement



Character Info

Discussion on Character Info within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 168
Received Thanks: 33
Character Info

So I'm trying to update hellmouth to 5509, however I am having some problems. When I attempt to login, it gets stuck at "logging into game server". I assume something is wrong with char info packet.

Can someone take a look and see if they see anything wrong?
Code:
 public static byte[] SpawnChar(Client C)
        {
            int Len = 8 + 114+ C.Name.Length + C.Spouse.Length;
            int Offset = 0;
            byte[] Packet = new byte[Len];
            try
            { 
                WriteUInt16(Convert.ToUInt16(Len - 8), 0, Packet);
                WriteUInt16(1006, 2, Packet);
                WriteUInt32(C.UID, 4, Packet);
                WriteUInt32(C.Mesh, 10, Packet);
                WriteUInt16(C.Hair, 14, Packet);
                WriteUInt32(C.Money, 16, Packet);
                WriteUInt32(C.CP, 20, Packet);
                WriteUInt64(C.Exp, 24, Packet);   
                WriteUInt16(C.Str, 52, Packet);
                WriteUInt16(C.Agi, 54, Packet);
                WriteUInt16(C.Vit, 56, Packet);
                WriteUInt16(C.Spi, 58, Packet);
                WriteUInt16(C.Stats, 60, Packet);
                WriteUInt16(C.Hp, 62, Packet);
                WriteUInt16(C.Mana, 64, Packet);
                WriteUInt16(C.Pk, 66, Packet);
                WriteByte(C.Level, 68, Packet);
                WriteByte(C.Job, 69, Packet);//job
                WriteByte(0, 70, Packet);//reb  
                WriteByte(1, 71, Packet);//show name
                WriteUInt32(1, 72, Packet);//quiz
                //WriteUInt32(11, 74, Packet);//enlighten
                //WriteUInt16(6, 78, Packet);
                //WriteUInt32(8040, 80, Packet); 
                WriteByte(3, 110, Packet);
                WriteByte((byte)C.Name.Length, 111, Packet);
                //WriteString(C.Name, 110, Packet);
                Offset += C.Name.Length;
                WriteByte(0, 112 + Offset, Packet);
                WriteByte((byte)C.Spouse.Length, 113 + Offset, Packet);
                WriteString(C.Spouse, 114 + Offset, Packet);
            }
            catch (Exception P)
            { Console.WriteLine(P); } 
            return Packet;
        }
Thanks
zTek is offline  
Old 07/20/2011, 18:51   #2

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
I think the login request packet thingy changed ID a while ago so that might be it.
Kiyono is offline  
Old 07/20/2011, 20:31   #3
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
I keep telling you! Blockpoint test! That's how you're supposed to debug everything in C#! If you still don't know it from watching me do it over TV - then look it up on google. You will never ask another question here again if you can blockpoint things.
Spirited is offline  
Old 07/20/2011, 20:41   #4
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Code:
            byte[] Packet = new byte[122 + client.Char.Spouse.Length + client.Char.Name.Length];
            WriteUInt16((ushort)(Packet.Length - 8), 0, Packet);
            WriteUInt16(1006, 2, Packet);
            WriteUInt32(client.Char.UID, 4, Packet);
            WriteUInt32(client.Char.Mesh, 10, Packet);
            WriteUInt16(client.Char.HairStyle, 14, Packet);
            WriteUInt32(client.Char.Money, 16, Packet);
            WriteUInt32(client.Char.ConquerPoints, 20, Packet);
            WriteUInt64(client.Char.Experience, 24, Packet);
            WriteUInt16(client.Char.Strength, 52, Packet);
            WriteUInt16(client.Char.Agility, 54, Packet);
            WriteUInt16(client.Char.Vitality, 56, Packet);
            WriteUInt16(client.Char.Spirit, 58, Packet);
            WriteUInt16(client.Char.Atributes, 60, Packet);
            WriteUInt16((ushort)client.Char.Hitpoints, 62, Packet);
            WriteUInt16(client.Char.Mana, 64, Packet);
            WriteUInt16(client.Char.PKPoints, 66, Packet);
            Packet[68] = (byte)client.Char.Level;
            Packet[69] = client.Char.Class;
            Packet[70] = client.Char.FirstRebornClass; /*Previous Reborn: shows up when u highlight the class in the status window*/
            Packet[71] = client.Char.SecondRebornClass;
            Packet[72] = client.Char.Reborn;
            //WriteUInt32(client.Char.QuizPoints, 75, Packet);
            //WriteUInt16(0/*Enlight points*/, 77, Packet);
            //WriteUInt32(500000, 89, Packet);
            Packet[110] = 0x03;
            //WriteByte(1, 108, Packet);//Correct

            Packet[111] = (byte)client.Char.Name.Length;
            WriteString(client.Char.Name, 112, Packet);
            WriteByte((byte)client.Char.Spouse.Length, 113 + client.Char.Name.Length, Packet);
            WriteString(client.Char.Spouse, 114 + client.Char.Name.Length, Packet);
            return Packet;
_DreadNought_ is offline  
Thanks
1 User
Old 07/20/2011, 21:20   #5
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 918
Quote:
Originally Posted by Fаng View Post
I keep telling you! Blockpoint test! That's how you're supposed to debug everything in C#! If you still don't know it from watching me do it over TV - then look it up on google. You will never ask another question here again if you can blockpoint things.
Haha, blockpoint.

If you search google for that, it's probably gonna say "Did you mean: breakpoint?".
Lateralus is offline  
Old 07/20/2011, 22:22   #6
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by Lateralus View Post
Haha, blockpoint.

If you search google for that, it's probably gonna say "Did you mean: breakpoint?".
Yes. I mean breakpoint. I was working on refining my cryptography and I was seeing "block" everywhere. ><
Spirited is offline  
Old 07/20/2011, 23:57   #7
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Why does nobody using structs and operators to return a byte array?
PHP Code:
    public unsafe struct PacketName
    
{
        
//Packet fields here
        
public int PacketLength;

        public static 
implicit operator byte[](PacketName packet)
        {
            
byte[] Packet = new byte[packet.PacketLength];
            
fixed (bytepointer Packet)
            {
            }
            return 
Packet;
        }
    } 
BaussHacker is offline  
Old 07/21/2011, 00:15   #8
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 918
Quote:
Originally Posted by BaussHacker View Post
Why does nobody using structs and operators to return a byte array?
PHP Code:
    public unsafe struct PacketName
    
{
        
//Packet fields here
        
public int PacketLength;

        public static 
implicit operator byte[](PacketName packet)
        {
            
byte[] Packet = new byte[packet.PacketLength];
            
fixed (bytepointer Packet)
            {
            }
            return 
Packet;
        }
    } 
Code:
/// <summary>
/// 0x3F6/1103 (server->client)
/// The SkillPacket is sent on login and when a player learns or levels a skill/spell.
/// </summary>
public class SkillPacket
{
	#region Packet Accessor
	/// <summary>
	/// A buffer to hold the packet.
	/// </summary>
	private byte[] data;

	/// <summary>
	/// Allows you to access the packet through the class.
	/// </summary>
	/// <param name="packetStructure">The packet structure.</param>
	/// <returns>The actual packet data.</returns>
	public static implicit operator byte[](SkillPacket packetStructure)
	{
		return packetStructure.data;
	}
	#endregion
	#region Constructors
	/// <summary>
	/// Default constructor. For creating packets - initializes the packet buffer and sets the size and type.
	/// </summary>
	public SkillPacket()
	{
		data = new byte[size];
		PBuilder.Write(size, 0, data);
		PBuilder.Write(type, 2, data);
	}

	/// <summary>
	/// Parameterized constructor. For processing packets - initializes the packet buffer with the passed packet.
	/// </summary>
	/// <param name="d">The packet to process.</param>
	public SkillPacket(byte[] d)
	{
		data = new byte[d.Length];
		d.CopyTo(data, 0);
	}
	#endregion

	/// <summary>
	/// Offset - 0.
	/// Value - 12.
	/// </summary>
	private const ushort size = 0x0C;

	/// <summary>
	/// Offset - 2.
	/// Value - 1103.
	/// </summary>
	private const ushort type = 0x44F;

	/// <summary>
	/// Amount of experience.
	/// Offset - 4.
	/// </summary>
	public uint Experience
	{
		get { return BitConverter.ToUInt32(data, 4); }
		set { PBuilder.Write(value, 4, data); }
	}

	/// <summary>
	/// The ID of the skill.
	/// Offset - 8.
	/// </summary>
	public SpellID ID
	{
		get { return (SpellID)BitConverter.ToUInt16(data, 8); }
		set { PBuilder.Write((ushort)value, 8, data); }
	}

	/// <summary>
	/// The level of the skill.
	/// Offset - 10.
	/// </summary>
	public ushort Level
	{
		get { return BitConverter.ToUInt16(data, 10); }
		set { PBuilder.Write(value, 10, data); }
	}
}
That's the way I structure packets. Easy to use, fast, and beautifully organized.
Lateralus is offline  
Old 07/21/2011, 00:31   #9


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Quote:
Originally Posted by BaussHacker View Post
Why does nobody using structs and operators to return a byte array?
PHP Code:
    public unsafe struct PacketName
    
{
        
//Packet fields here
        
public int PacketLength;

        public static 
implicit operator byte[](PacketName packet)
        {
            
byte[] Packet = new byte[packet.PacketLength];
            
fixed (bytepointer Packet)
            {
            }
            return 
Packet;
        }
    } 
Or better yet just a struct and then send that...
Korvacs is offline  
Thanks
1 User
Old 07/21/2011, 00:32   #10
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by Lateralus View Post
Code:
/// <summary>
/// 0x3F6/1103 (server->client)
/// The SkillPacket is sent on login and when a player learns or levels a skill/spell.
/// </summary>
public class SkillPacket
{
	#region Packet Accessor
	/// <summary>
	/// A buffer to hold the packet.
	/// </summary>
	private byte[] data;

	/// <summary>
	/// Allows you to access the packet through the class.
	/// </summary>
	/// <param name="packetStructure">The packet structure.</param>
	/// <returns>The actual packet data.</returns>
	public static implicit operator byte[](SkillPacket packetStructure)
	{
		return packetStructure.data;
	}
	#endregion
	#region Constructors
	/// <summary>
	/// Default constructor. For creating packets - initializes the packet buffer and sets the size and type.
	/// </summary>
	public SkillPacket()
	{
		data = new byte[size];
		PBuilder.Write(size, 0, data);
		PBuilder.Write(type, 2, data);
	}

	/// <summary>
	/// Parameterized constructor. For processing packets - initializes the packet buffer with the passed packet.
	/// </summary>
	/// <param name="d">The packet to process.</param>
	public SkillPacket(byte[] d)
	{
		data = new byte[d.Length];
		d.CopyTo(data, 0);
	}
	#endregion

	/// <summary>
	/// Offset - 0.
	/// Value - 12.
	/// </summary>
	private const ushort size = 0x0C;

	/// <summary>
	/// Offset - 2.
	/// Value - 1103.
	/// </summary>
	private const ushort type = 0x44F;

	/// <summary>
	/// Amount of experience.
	/// Offset - 4.
	/// </summary>
	public uint Experience
	{
		get { return BitConverter.ToUInt32(data, 4); }
		set { PBuilder.Write(value, 4, data); }
	}

	/// <summary>
	/// The ID of the skill.
	/// Offset - 8.
	/// </summary>
	public SpellID ID
	{
		get { return (SpellID)BitConverter.ToUInt16(data, 8); }
		set { PBuilder.Write((ushort)value, 8, data); }
	}

	/// <summary>
	/// The level of the skill.
	/// Offset - 10.
	/// </summary>
	public ushort Level
	{
		get { return BitConverter.ToUInt16(data, 10); }
		set { PBuilder.Write(value, 10, data); }
	}
}
That's the way I structure packets. Easy to use, fast, and beautifully organized.
Yes yes yes.
BaussHacker is offline  
Reply


Similar Threads Similar Threads
[Release] New character info packet
07/22/2011 - CO2 PServer Guides & Releases - 13 Replies
Many of the ppl who are upgrading to the new crypto should be getting a fuck3d up screen after login... so here goes the fix : find you Character Info packet (Dunno where it is of course...) and then update the values: public partial class Msg : Writer {
Help with Character Info Packet
06/23/2011 - CO2 Programming - 17 Replies
Ok So I'm working on a proxy, and I'm able to login and have a simple logger working. For some reason I don't seem to be receiving the 1006 packet that holds my login characters info. It must be getting through because the client is setup properly with my character name, etc... Heres a screeny of the beginning of the login. Packet Structer: http://wiki.fusionorigins.com/index.php?title=CO_P acket_CharacterInformation#Version_5295 Edit: I think the info might be in the 2079 packet,...
Get All Character Info By Account Name
03/20/2009 - Conquer Online 2 - 3 Replies
TQ is stupid enough with their new event to allow you to enter a username and display your characters, levels, and more info. No password needed. Conquer Online - Unforgettable Times - co.91.com So if you learn about an account or find out someone's password but don't know their server or something, enter the username to find out :) Happy hacking!:mofo:
Get All Character Info By Account Name
03/19/2009 - CO2 Private Server - 6 Replies
TQ is stupid enough with their new event to allow you to enter a username and display your characters, levels, and more info. No password needed. Conquer Online - Unforgettable Times - co.91.com So if you learn about an account or find out someone's password but don't know their server or something, enter the username to find out :) Happy hacking!:mofo:
EcSRO character name and info
06/28/2008 - SRO Private Server - 7 Replies
Hey I do not know a lot of people in ecsro, matter of fact just 3 atm. I made this thread to just open talk, leave your character name and info. I want to meet people ingame, if you ever see me going by say hi. My name is 59, was 56 in other server(but some b1tch took the name in this server before me). so I settled for 59. I am a pure str Glaiver wearing a garment. 5D at the moment, so I look red, can't miss me, unless you see other lv 37+ n00bz



All times are GMT +2. The time now is 15:34.


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.