Register for your free account! | Forgot your password?

You last visited: Today at 18:42

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Small Tutorial] Packets in Conquer Online

Closed Thread
 
Old   #16
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,226
Received Thanks: 2,476
Quote:
Originally Posted by I don't have a username View Post
Obviously it wouldn't be Int8 as you can't send signed integers in a packet. Well not true there is a way you can, you could do something like:
Code:
bool negative
signed integer
However it's not a real way to do it, but it's equal to the way negative values are stored in your machine.
lolwut?

Of course you can send a signed int in a packet, the fact that it doesn't look like one in the packet doesn't mean its not signed, its how the data is interpreted at the other end which matters, hell TQ even use a signed int in the character info and status change packets, that's how incorrect this statement is.

As for the article, i believe that this is probably one of the best pieces of content now on this section of the forum. Its going to help alot of new people better understand what packets actually are and how to modify them.



Korvacs is offline  
Thanks
3 Users
Old   #17
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 782
Quote:
Originally Posted by Korvacs View Post
lolwut?

Of course you can send a signed int in a packet, the fact that it doesn't look like one in the packet doesn't mean its not signed, its how the data is interpreted at the other end which matters, hell TQ even use a signed int in the character info and status change packets, that's how incorrect this statement is.

As for the article, i believe that this is probably one of the best pieces of content now on this section of the forum. Its going to help alot of new people better understand what packets actually are and how to modify them.
But signed integers are way different from unsigned, because you cannot store negative values, you store a bit along with the value. Just what I think, since it's like that in assembly programming, then I assume this works same way as you still store data in memory.

Quote:
Originally Posted by pcasm
Integers come in two flavors: unsigned and signed. Unsigned integers
(which are non-negative) are represented in a very straightforward binary
manner. The number 200 as an one byte unsigned integer would be represented
as by 11001000 (or C8 in hex).
Signed integers (which may be positive or negative) are represented in a
more complicated ways. For example, consider −56. +56 as a byte would be
represented by 00111000. On paper, one could represent −56 as −111000,
but how would this be represented in a byte in the computerís memory. How
would the minus sign be stored?
There are three general techniques that have been used to represent
signed integers in computer memory. All of these methods use the most
significant bit of the integer as a sign bit. This bit is 0 if the number is
positive and 1 if negative.


I don't have a username is offline  
Old   #18
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,226
Received Thanks: 2,476
Yes you are correct and in the event that a negative number must be sent through a packet then this method is still used, so you are still sending a signed integer through a packet. The client does this at least twice, where a negative number is legitimately used.

Im not really sure what your point is beyond that you seem to believe you cant send a negative number in a data packet...
Korvacs is offline  
Thanks
2 Users
Old   #19

 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,382
Received Thanks: 1,043
Why we couldn't send a signed integer? What is the difference between a Int8 and a UInt8? You said it. It's the first bit that is used by the signed one to determine if it's negative or positive. But when you send the two integer over internet, we convince that both of them are coded on 8 bits, an octet. And, what we send over TCP/IP is actually a buffer of octets. So, all type that can be divided in 8 bits chunk can be send. A float can be sent because it's formed of 4 octets. A signed 32 bits integer can be sent because it's formed of 4 octets. It doesn't matter what is the original type as it's only octets that is sent.

The client and the server should know how to format the raw data and it's the protocol.

Oh, and as everything is sent in octet, there is an order to respect to get the right value. With the Internet Protocol, integers should be wrote using the big endian order. And, swapped by the client/server at receive. TQ seems to don't respect that because they use the little endian order... But as they only work on little-endian architecture (Windows and now on Intel Mac), that just remove swapping.


CptSky is offline  
Thanks
2 Users
Old   #20
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,226
Received Thanks: 2,476
So yeah, all in all bauss:

Quote:
Originally Posted by Korvacs
If you don't know what your talking about, then stop talking.
Korvacs is offline  
Thanks
1 User
Old   #21
 
elite*gold: 0
Join Date: Jun 2010
Posts: 71
Received Thanks: 7
Impressive work , Keep it up <3
amonaptra is offline  
Old   #22

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,534
Received Thanks: 3,170
Quote:
Originally Posted by amonaptra View Post
Impressive work , Keep it up <3
I created a second tutorial here that (I think) does a slightly better job:
[Tutorial] Inter-Process Communications in Conquer Online [Packets] [C#]
Spirited is offline  
Old   #23
 
elite*gold: 0
Join Date: Jul 2007
Posts: 137
Received Thanks: 3
request to repost the images
zakkwilde_17 is offline  
Old   #24

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,534
Received Thanks: 3,170
Quote:
Originally Posted by zakkwilde_17 View Post
request to repost the images
No. I made a second tutorial and a third tutorial after this. Literally wrote this last week...
https://www.elitepvpers.com/forum/co...n-packets.html
Last post from 2013... come on. Request close.
Spirited is offline  
Thanks
1 User
Old   #25
Im Ruhestand







 
elite*gold: 20
The Black Market: 402/0/0
Join Date: Aug 2014
Posts: 29,627
Received Thanks: 2,876
#closed as request


wshbr is offline  
Closed Thread



« Previous Thread | Next Thread »

Similar Threads
conquer online private server tutorial?
i need a guide on how to make a private server with working links to the downloads ive been looking for a guide for 3 days and tried so many and just...
3 Replies - CO2 PServer - Discussions / Questions
Conquer Packets
ok, i hope this helps, using chocoman4k COPAC (AWESOME DUDE), u&#39;ll need to reach invalide coordinates to know your new coordinates or d/c an conn...
144 Replies - CO2 Exploits, Hacks & Tools



All times are GMT +1. The time now is 18:42.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.