Ok i need help..
This is the situation on the emulator.
I login, and click katar1
I send the package with the character details.
I send the second package 0x02,0x03 (i think some sort of confirmation package)
The client moves to the character select screen but shows no character.
As if i never send the first package.
This is what i use.
Code:
byte[] Header = { 0x01, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
byte[] EncryptedHeader = { 0x01, 0x00, 0x00, 0x00, 0x00 };
byte[] Key = { 0x00, 0x00 };
int CharID = 1;
string CharName = "Wizatek";
byte CharFace = 4;
byte CharHair = 1;
byte CharUnknown1 = 0;
byte CharUnknown2 = 1;
int CharLevel = 1;
Int64 CurrentEXP = 5;
Int64 MaximumEXP = 14;
int CurrentHP = 500;
int MaximumHP = 600;
int CurrentMP = 100;
int MaximumMP = 250;
byte[] Unknown1 = { 0x00, 0x03, 0xd0, 0x90 };
int Helmet_ID = 552;
int Helmet_Upgrade = 0;
int Shirt_ID = 512;
int Shirt_Upgrade = 0;
int Weapon_ID = 528;
int Weapon_Upgrade = 0;
int Pants_ID = 525;
int Pants_Upgrade = 0;
int Shield_ID = -1;
int Shield_Upgrade = 0;
int Gloves_ID = 527;
int Gloves_Upgrade = 0;
int Boots_ID = 526;
int Boots_Upgrade = 0;
int Wing_ID = -1;
int Wing_Upgrade = 0;
MemoryStream td = new MemoryStream();
td.AddByte(0x02);
td.AddByte(0x02);
td.AddInt32(CharID);
td.AddString(CharName);
td.AddByte(0x00);
td.AddByte(CharFace);
td.AddByte(CharUnknown1); //Facecolor ?
td.AddByte(CharHair);
td.AddByte(CharUnknown2); // Haircolor ?
td.AddInt32(CharLevel);
td.AddInt64(CurrentEXP);
td.AddInt64(MaximumEXP);
td.AddBytes(Unknown1);
td.AddInt32(MaximumHP);
td.AddInt32(CurrentHP);
td.AddInt32(MaximumMP);
td.AddInt32(CurrentMP);
td.AddInt32(Helmet_ID);
td.AddInt32(Helmet_Upgrade);
td.AddInt32(Shirt_ID);
td.AddInt32(Shirt_Upgrade);
td.AddInt32(Weapon_ID);
td.AddInt32(Weapon_Upgrade);
td.AddInt32(Pants_ID);
td.AddInt32(Pants_Upgrade);
td.AddInt32(Shield_ID);
td.AddInt32(Shield_Upgrade);
td.AddInt32(Gloves_ID);
td.AddInt32(Gloves_Upgrade);
td.AddInt32(Boots_ID);
td.AddInt32(Boots_Upgrade);
td.AddInt32(Wing_ID);
td.AddInt32(Wing_Upgrade);
byte[] Data = td.ToArray();
EncryptedHeader[4] = Convert.ToByte(Data.Length);
Header[11] = Convert.ToByte(Data.Length + 5 + 2);
MemoryStream Package = new MemoryStream();
Package.AddBytes(Header);
Package.AddBytes(EncryptedHeader);
Package.AddBytes(Data);
Package.AddBytes(Key);
stream.Write(Package.ToArray(), 0, Package.ToArray().Length);
log(BitConverter.ToString(Package.ToArray()).Replace("-", " "), "send");
// Confirmation Packet ?
byte[] Data2 = { 0x01, 0x81, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
stream.Write(Data2, 0, Data2.Length);
WPEPro confirmed that the package is like it should be.. but..
The second part that is strange is that it sends the first and second package as one package.
Maybe that could have something to do with it.
I been trying since yesterday on this particular situation and im kinda stuck sadly.
Packages sniffed from 777 login :
[Only registered and activated users can see links. Click Here To Register...]
Confirmation package?
[Only registered and activated users can see links. Click Here To Register...]
Here a screenshot from WPE from the packet in the script.
As u can see it sends both packages at once.
But i guess the client doesn't bother that.
[Only registered and activated users can see links. Click Here To Register...]
Result >.<
[Only registered and activated users can see links. Click Here To Register...]
I hope anyone can see what im missing here.