ok, i took a look on the packet in the old proxy, and the new one i sniffed
well, this is the packet i sniffed
Code:
Packet Nr 161. Server -> Client, Length : 60, PacketType: 1105
34 00 51 04 06 A1 46 00 DC 01 BA 01 15 04 04 00 ;4 Q¡F ܺ
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;
00 00 00 00 54 51 53 65 72 76 65 72 ; TQServer
and this is the packet in the old source
Code:
public static bool UseSkill(Skill S, GameUser User, uint Target, ushort X, ushort Y)
{
byte[] Data = new byte[40];
ReadWrite P = new ReadWrite(Data);
#region Encrypting
Target += 0x746F4AE6;
Target ^= User.UID;
Target ^= 0x5F2D2463;
Target = ((Target << 13) | (Target >> 19));
ulong _X = X + 0xffff22ee;
_X -= 0xffff0000;
_X = ((_X << 15) | (_X >> 1));
_X ^= 0x2ed6;
_X ^= User.UID;
X = (ushort)_X;
ulong _Y = Y + 0xffff8922;
_Y -= 0xffff0000;
_Y = ((_Y << 11) | (_Y >> 5));
_Y ^= 0xb99b;
_Y ^= User.UID;
Y = (ushort)_Y;
ushort SkillId = S.ID;
SkillId += 0xeb42;
SkillId = (ushort)(SkillId << 13 | SkillId >> 0x3);
SkillId = (ushort)(SkillId ^ User.UID);
SkillId ^= 0x915d;
#endregion
uint Time = GetStamp(User);
P.WriteInt16((ushort)(Data.Length - 8));
P.WriteInt16((ushort)0x3FE);
P.WriteInt32(Time);
P.WriteInt32(User.UID);
P.WriteInt32(Target);
P.WriteInt16(X);
P.WriteInt16(Y);
P.WriteInt32(24);
P.WriteInt16(SkillId);
P.WriteByte((byte)(S.Level ^ 33));
P.WriteByte((byte)(Time ^ 55));
P.Move(4);
P.WriteString("TQClient");
User.LastAction = DateTime.Now;
User.LastAttack = DateTime.Now;
User.ServerQueue.Enqueue(P.Get);
return true;
}
i have no idea how to update this encryption, and those weird lines
P.WriteInt16((ushort)0x3FE);
P.WriteByte((byte)(S.Level ^ 33));
P.WriteByte((byte)(Time ^ 55));