Hey All, i understand something in them, but i still need to know more! :)
As example we will work on sending packet to Conquer Online Server to buy an item from the shop (with Bound/Normal CPs).
The Packets received :
After Analyzing.. :
It's okay! Now for the offsets :
That's okay! Friend told me that :
Then i knew which offsets i will need, so i created this :
And it works.. That's not the problem.. The problem is i got 92 offsets! most of them value is 0! what about the others. I used just 9 offsets! "0,2,4,8,12,16,20,24,32" what about the others?!!! If my friend didn't tell me that i have to use these! I wouldn't be able to make this!
That's for Sending packets to Conquer Online Server. And i need you to explain it for Conquer Online Private Server Source too! :)
What makes me choose which Packet i need.
and for other thing.. I got the packet for compose in Conquer Online Source (Packet : 2036) It works okay! but if i want to make "Quick (+)" To work or "Batch", how to get there length?! :)
Thanks a lot! :D :D
As example we will work on sending packet to Conquer Online Server to buy an item from the shop (with Bound/Normal CPs).
The Packets received :
PHP Code:
5C 00 F1 03 97 2F A4 02 48 0B 00 00 01 9A 10 00 01 00 00 00 FA D4 BB 02 11 00 00 00 00 00 00 00 02 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 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 43 6C 69 65 6E 74
PHP Code:
ID : 1009
Size : 92
Full Size at offset 0 = 100 (+8)
That's okay! Friend told me that :
PHP Code:
Offset 0 - 0x5C
Offset 2 - 0x3F1
Offset 4 - timestamp
Offset 8 - NpcID
Offset 12 - Itemtype
Offset 16 - Flag - 0x1 to buy an item.
Offset 20 - timestamp
Offset 24 - Quantity/ amount of items to buy
Offset 32 - Flag/ Currency. - 0x2 For boundCPs
PHP Code:
public static byte[] TQClient = System.Text.ASCIIEncoding.ASCII.GetBytes("TQClient");
public void SendServer(byte[] buffer, _Player Player)
{
for (int i = buffer.Length - 8, j = 0; i < buffer.Length; i++, j++)
buffer[i] = TQClient[j];
Player.ToServer.SendData(buffer);
}
public void BuyShopBoundCPS(_Player Player, int npcid, int itemtype, int amount)
{
Game.ItemUsage usage = new Game.ItemUsage(true);
int size = 92;
byte[] buffer = new byte[size + 8];
Writer.WriteUInt16(92, 0, buffer);
Writer.WriteUInt16(1009, 2, buffer);
Writer.WriteUInt32(usage.TimeStamp1, 4, buffer);
Writer.WriteInt32(npcid, 8, buffer);//2888 Shop!
Writer.WriteInt32(itemtype, 12, buffer);
Writer.WriteUInt32(1, 16, buffer);
Writer.WriteUInt32(usage.TimeStamp2, 20, buffer);
Writer.WriteInt32(amount, 24, buffer);
Writer.WriteUInt16(2, 32, buffer);// 1 for Normal Cps, 2 for Bound Cps!
SendServer(buffer, Player);
}
That's for Sending packets to Conquer Online Server. And i need you to explain it for Conquer Online Private Server Source too! :)
What makes me choose which Packet i need.
and for other thing.. I got the packet for compose in Conquer Online Source (Packet : 2036) It works okay! but if i want to make "Quick (+)" To work or "Batch", how to get there length?! :)
Thanks a lot! :D :D