Register for your free account! | Forgot your password?

You last visited: Today at 16:17

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

 

[Small Tutorial] Packets in Conquer Online

Closed Thread
 
Old   #1

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,548
Received Thanks: 3,174
[Small Tutorial] Packets in Conquer Online

Replaced with https://www.elitepvpers.com/forum/co...n-packets.html



Spirited is offline  
Thanks
24 Users
Old   #2
 
elite*gold: 0
Join Date: Nov 2009
Posts: 342
Received Thanks: 17
Great Mr.Fang


|xabi| is offline  
Old   #3
 
elite*gold: 0
Join Date: Feb 2011
Posts: 335
Received Thanks: 171
Quote:
Originally Posted by Y u k i View Post
A ushort is equal to two bytes. It holds a value between 0 and 65,535 (65536 in total)
Actually he phrased that wrong. It holds a value between -1 and 65536.
Saying it holds a value between 0 and 65,535 is saying that it can be valued as 1-65534.
Arco. is offline  
Old   #4

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,548
Received Thanks: 3,174
Quote:
Originally Posted by Arco. View Post
Actually he phrased that wrong. It holds a value between -1 and 65536.
Saying it holds a value between 0 and 65,535 is saying that it can be valued as 1-65534.
Depends on the context. You wouldn't say "pick a number between 1 and 10" to mean 2-9.
In addition to that, I stated the total amount of values (which eliminates that confusion) so there's nothing wrong about the context that I'm using it in.


Spirited is offline  
Old   #5
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 912
In the context of this post, saying "between" implies non-inclusivity.
Lateralus is offline  
Old   #6
 
elite*gold: 0
Join Date: Feb 2011
Posts: 335
Received Thanks: 171
Quote:
Originally Posted by Fаng View Post
Depends on the context. You wouldn't say "pick a number between 1 and 10" to mean 2-9.
In addition to that, I stated the total amount of values (which eliminates that confusion) so there's nothing wrong about the context that I'm using it in.
Yes, I would. That's grammar at its finest. And that doesn't eliminate any confusion, it's wrong based on your previous statement, because there would be 65533 in total.
Arco. is offline  
Old   #7
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 912
Quote:
Originally Posted by Fаng View Post
You wouldn't say "pick a number between 1 and 10" to mean 2-9.
@Arco - I would as well.

@Fang - You're supposed to say "pick a number from 1 to 10", not between, because that'd mean from 2 to 9. Who says between?
Lateralus is offline  
Old   #8
 
elite*gold: 0
Join Date: Feb 2011
Posts: 335
Received Thanks: 171
Quote:
Originally Posted by Fаng View Post
A byte holds an integer between 0 and 255 (256 total). In C++, it's called an Int8.
No. After discussing this with Evan, we both agree you are wrong. A byte in C++ is a uchar. And another part where you're wrong, UInt8 would be the correct typecast for it.
Arco. is offline  
Thanks
1 User
Old   #9

 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,382
Received Thanks: 1,043
Quote:
Originally Posted by Arco. View Post
No. After discussing this with Evan, we both agree you are wrong. A byte in C++ is a uchar. And another part where you're wrong, UInt8 would be the correct typecast for it.
True. The 'Byte' in C# is the equivalent of the 'unsigned char' if we consider that a char is implemented as a 8 bits integer.

Anyway, a byte is an integer of any size. Some implementations say that a byte is an integer of 9 bits, some others say that it's 7 bits. To avoid confusion, the C99/POSIX standard implemented the (u)intN_t definitions where it's an (un)signed N bits integer. It's not true to say that a byte is a UInt8. As we shouldn't say that an ushort is a UInt16 as a short is suppose to be at least 16 bits. When defining structure, you should use type name based on the number of bits. And you shouldn't say the number of bytes of a file, but the number of octets as an octets is defined as an 8 bits integer. You should avoid using keywords as short/int/word/byte/etc because they are all dependent of the implementation. They aren't fixed-size integer as the C99/POSIX standard.

So, to be compliant to any language, any implementation.
(U)IntN is the solution

Oh, and to give a good definition for the range of a N bits integer.
Signed: [-2^(N-1), 2^(N-1) - 1]
Unsigned: [0, 2^N - 1]
CptSky is offline  
Thanks
2 Users
Old   #10

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,548
Received Thanks: 3,174
I guess it would be unprofessional to say "shut the **** up everyone", but nobody here has a valid point that adds to this thread (except for CptSky, thank you so much for that input - it's exactly the kind of criticism that I need). Arco, you need to cut this out dude. It's not appropriate and this "competition" that you feel between us needs to stop. There is no competition between us. I wrote this thread to get proper, professional criticism, not for some 15 year old kid to grammar correct me.

I will make changes to the thread above.
Good day everyone.
Spirited is offline  
Old   #11
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 912
Quote:
Originally Posted by Fаng View Post
I guess it would be unprofessional to say "shut the **** up everyone", but nobody here has a valid point that adds to this thread (except for CptSky, thank you so much for that input - it's exactly the kind of criticism that I need). Arco, you need to cut this out dude. It's not appropriate and this "competition" that you feel between us needs to stop. There is no competition between us. I wrote this thread to get proper, professional criticism, not for some 15 year old kid to grammar correct me.

I will make changes to the thread above.
Good day everyone.
We all had valid points that added to this thread, as evidenced by the changes to the original post. Anyway, continue on.
Lateralus is offline  
Thanks
1 User
Old   #12
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 782
Quote:
Originally Posted by Korvacs
If you don't know what your talking about, then stop talking.
.
I don't have a username is offline  
Old   #13

 
elite*gold: 0
Join Date: Jul 2011
Posts: 6,548
Received Thanks: 3,174
Quote:
Originally Posted by I don't have a username View Post
.
Sorry, but if you have a better explanation then by all means go for it.
Spirited is offline  
Old   #14
 
elite*gold: 0
Join Date: Feb 2011
Posts: 335
Received Thanks: 171
Quote:
Originally Posted by Fаng View Post
Sorry, but if you have a better explanation then by all means go for it.
He's referring to you trying to reference C++.
Arco. is offline  
Old   #15
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 782
Quote:
Originally Posted by Arco. View Post
He's referring to you trying to reference C++.
That ^

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.


I don't have a username 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'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 16:17.


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.