Strange issue on my 5017 source...

07/30/2011 03:53 Y u k i#1
My 5017 Client refuses to accept a v5017 Char Info packet....
Client close.

I even tried it with LOTF packets... as they should work....

However, if i copy and paste a packet from UCCO it logs the char. WTF?

Tried with Different clients, different packets... nothing.
07/30/2011 06:05 Spirited#2
1. Try this:
Code:
Buffer = new byte[70 + client.Character.Name.Length + client.Character.Spouse.Length];

                *((ushort*)(arg)) = (ushort)Buffer.Length;
                *((ushort*)(arg + 2)) = 1006;
                *((uint*)(arg + 4)) = client.Character.Identity;
                *((uint*)(arg + 8)) = client.Character.Mesh;
                *((ushort*)(arg + 12)) = client.Character.Hairstyle;
                *((uint*)(arg + 14)) = client.Character.Silvers;
                *((uint*)(arg + 18)) = client.Character.CPs;
                *((ulong*)(arg + 22)) = client.Character.Experience;
                *((ushort*)(arg + 46)) = client.Character.Strength;
                *((ushort*)(arg + 48)) = client.Character.Agility;
                *((ushort*)(arg + 50)) = client.Character.Vitality;
                *((ushort*)(arg + 52)) = client.Character.Spirit;
                *((ushort*)(arg + 54)) = client.Character.Attributes;
                *((ushort*)(arg + 56)) = client.Character.Hitpoints;
                *((ushort*)(arg + 58)) = client.Character.Mana;
                *((ushort*)(arg + 60)) = client.Character.PkPoints;
                *((byte*)(arg + 62)) = client.Character.Level;
                *((byte*)(arg + 63)) = client.Character.Class;
                *((byte*)(arg + 64)) = 15;
                *((byte*)(arg + 65)) = client.Character.Reborns;
                *((byte*)(arg + 66)) = 1;
                *((byte*)(arg + 67)) = 2; 
                *((byte*)(arg + 68)) = (byte)client.Character.Name.Length;
                for (ushort i = 0; i < client.Character.Name.Length; i++)
                    *((byte*)(arg + 69 + i)) = (byte)client.Character.Name[i];
                *((byte*)(arg + 69 + client.Character.Name.Length)) = (byte)client.Character.Spouse.Length;
                for (ushort i = 0; i < client.Character.Spouse.Length; i++)
                    *((byte*)(arg + 70 + client.Character.Name.Length + i)) = (byte)client.Character.Spouse[i];
2. Make sure your length is correct at offset 0 so that it's not over reading it.
07/30/2011 07:59 12k#3
3. Are you 100% sure its not accepting the char info, and just not closing after a invalid packet after the auth info? :D
07/30/2011 08:19 BaussHacker#4
Quote:
Originally Posted by 12k View Post
3. Are you 100% sure its not accepting the char info, and just not closing after a invalid packet after the auth info? :D
Character Information Packet is at the game server, so obviously it's not the auth server.
07/30/2011 09:20 12k#5
Woops :D, well, the thought is still there tho, there are other packets that are sent after char info. Such as entity spawn isnt there?
07/30/2011 10:36 BaussHacker#6
Quote:
Originally Posted by 12k View Post
Woops :D, well, the thought is still there tho, there are other packets that are sent after char info. Such as entity spawn isnt there?
Well, since it's Character Info, that he says it's wrong with, then it's that. He already stated it works, if he used other packet structure, but not with his nor LOTF x.x
07/30/2011 10:59 Mr_PoP#7
well when it was doing that with me that was because (lookface,hair or the action) has wrong input , and the client was crashing , my suggestion is you are entering a wrong value for the hair! (1003,310,8000) try this values it might work!

and here is my codes it may help though
Code:
CharPacket::CharPacket(std::string hero_name, std::string spouse_name)
	: BasePacket(0x3ee, 68 + hero_name.length() + spouse_name.length())
{
	int pos = 61;
	this->writeInt<uint8_t>(pos++, 2);
	this->writeInt<uint8_t>(pos++, hero_name.length());
	this->writeString(pos, hero_name, hero_name.length());
	pos +=hero_name.length();
	this->writeInt<uint8_t>(pos++, spouse_name.length());
	this->writeString(pos, spouse_name, spouse_name.length());
}

    void set_HeroId(uint32_t heroId) { writeInt<uint32_t>(4, heroId); }
    void set_Appearance(uint32_t app) { writeInt<uint32_t>(8, app); }
    void set_Hair(uint32_t hair) { writeInt<uint32_t>(12, hair); }
    void set_Money(uint32_t value) { writeInt<uint32_t>(16, value); }
    void set_Experience(int32_t value) { writeInt<int32_t>(20, value); }
    void set_Strength(uint16_t value){ writeInt<uint16_t>(40, value); }
    void set_Agility(uint16_t value){ writeInt<uint16_t>(42, value); }
    void set_vitality(int32_t value){ writeInt<uint16_t>(44, value); }
    void set_spirit(int32_t value){ writeInt<uint16_t>(46, value); }
    void set_statpoints(int32_t value){ writeInt<uint16_t>(48, value); }
    void set_health(int32_t value){ writeInt<uint16_t>(50, value); }
    void set_mana(int32_t value){ writeInt<uint16_t>(52, value); }
    void set_pkpoint(int16_t pk){ writeInt<int16_t>(54, pk); }
    void set_level(int32_t value){ writeInt<uint8_t>(56, value); }
    void set_profession(int32_t value){ writeInt<uint16_t>(57, value); }
    void set_Action(uint16_t action){ writeInt<uint16_t>(59, action); }
that's from my old C++ source , Good Luck :)
07/30/2011 13:37 Mr_PoP#8
Quote:
Originally Posted by Y u k i View Post
Thanks, that solved the problem. The Hair value was wrong :S
Id never thought of that. Thanks alot!
yw anytime mate :)