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 :
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
Then i knew which offsets i will need, so i created this :
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);
}
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?!
Each packet type is often used for many different purposes (subtypes). Many of the values will not be used in certain subtypes but the packet length remains the same simply because it's simpler that way.
EG: Here's usage instructions written in plain english.
"I'm going to tell you how to use something" (packet type)
"I'm going to give you up to 20 steps" (packet length)
"I'm telling you how to use a comb" (subtype)
"Use your fancy comb" (item UID)
"Use it on your hairz!" (target UID)
The rest of the steps are still there but are blank simply because you've done your task. They may be needed if the task is more complicated (different subtype) and so they are still there as part of the packet.
In your example it's because when you equip items the server will reply by filling in those un-used offsets with all of the item uid's you currently have equipped (updates your visible character)
(eny afhm kelma mafesh).
Translation: i don't get it
Lol.. I don't know what i have to do to explain more than this!
Quote:
Originally Posted by pro4never
Each packet type is often used for many different purposes (subtypes). Many of the values will not be used in certain subtypes but the packet length remains the same simply because it's simpler that way.
EG: Here's usage instructions written in plain english.
"I'm going to tell you how to use something" (packet type)
"I'm going to give you up to 20 steps" (packet length)
"I'm telling you how to use a comb" (subtype)
"Use your fancy comb" (item UID)
"Use it on your hairz!" (target UID)
The rest of the steps are still there but are blank simply because you've done your task. They may be needed if the task is more complicated (different subtype) and so they are still there as part of the packet.
In your example it's because when you equip items the server will reply by filling in those un-used offsets with all of the item uid's you currently have equipped (updates your visible character)
So yes, hope that helps
Thanks for explaining this part.. But that's not exactly what i want! Yes i benefit from these! But still don't understand what i want to understand! )
I guess you still didn't get it clear! And i don't know what should i do to explain it more!
About subtypes, How to know the offset of the subtype that i want (As example as i said about Quick and Batch for composing packet)!
The empty fields/offsets are called padding. In alot of cases with Conquer Pro is correct, however in some cases they are literally empty fields, there will never be any data there.
The empty fields/offsets are called padding. In alot of cases with Conquer Pro is correct, however in some cases they are literally empty fields, there will never be any data there.
How to compare between them and the needed offsets to make the packet work?!
How to know which offsets needed to make it work?! I guess that's the right question?!
Trial/Error or reversing the packets from the client.
Okay, fine. The packet that i created up!! Working but i get DC after buying the items if the amount is more than 1! if i buy with amount 1, it's working!
And i used the Packet Logger again and got the packets the same and i realized that TimeStamp1's value is not equal TimeStamp2's 2 .. I don't know.. it could be something missing?! )
Okay, fine. The packet that i created up!! Working but i get DC after buying the items if the amount is more than 1! if i buy with amount 1, it's working!
And i used the Packet Logger again and got the packets the same and i realized that TimeStamp1's value is not equal TimeStamp2's 2 .. I don't know.. it could be something missing?! )
[Release] +5500 Packets structure , client/packets constants 10/07/2012 - CO2 PServer Guides & Releases - 10 Replies edit : if u know nothing about packets go to this post first
explaining what is packets , and explaining a packet with details and everything
http://www.elitepvpers.com/forum/co2-pserver-disc ussions-questions/2162344-packets-packets-packets. html#post19074533
i start making my very own packet structure to use them on my new proxy but i thought of ripping them from the source
so yeah the following packets is ripped of trinity base source
right now im just providing the packets structure...
Anyone can explain this? 01/12/2012 - 9Dragons - 2 Replies Ok so i'm trying to find the Casting Time & Recast CE adresses for D9 TH...
I actually found them but this is what happens:
- If I activate no Recast. The first charge does dmg, the 2nd does not, and then suddenly it starts "cool downing" allthough it says Recast 0 Seconds.
- If I activate No Casting-Time. It just does no damage to the mobs...
Anyone can explain this?
Can someone explain and help me 01/06/2012 - CO2 Private Server - 7 Replies How can I allow the character † to be in a guild name as it comes up as ? currently. Is there anyway?
[Packets] Wie änder ich flyff packets? 07/16/2011 - Flyff Private Server - 19 Replies HeyHo,
Ich würde sehr gerne wissen wie man die Flyff Packets ändert...
ich denke mal Zahlen ändern werden nicht ausreichen oder?