Packet type

03/06/2012 00:22 corbit15#1
Anybody happen to what packet 1037 is?
version 5517
03/06/2012 00:29 shadowman123#2
well nobody knows its very rediculous packet and it being Sent at Very Weird Periods of time But Almostly this is Checker for smthing cuz it was sent After i become Afk for 5 secs or so ...So i concluded that its Checker for smthing b4 u go away Maybe
03/06/2012 00:35 corbit15#3
Quote:
Originally Posted by shadowman123 View Post
well nobody knows its very rediculous packet and it being Sent at Very Weird Periods of time But Almostly this is Checker for smthing cuz it was sent After i become Afk for 5 secs or so ...So i concluded that its Checker for smthing b4 u go away Maybe
ah ok. yeah i did notice it came at random times. alright well thanks for the input.
another question, how can i get flags? such as

BlueName = 1UL << 0,
03/06/2012 00:48 shadowman123#4
Quote:
Originally Posted by corbit15 View Post
ah ok. yeah i did notice it came at random times. alright well thanks for the input.
another question, how can i get flags? such as

BlueName = 1UL << 0,
This is Offtopic But anyways FlagsNumber is the Last number so the FlashingName = 0,
03/06/2012 00:51 corbit15#5
Quote:
Originally Posted by shadowman123 View Post
This is Offtopic But anyways FlagsNumber is the Last number so the FlashingName = 0,
ah ok thanks
03/06/2012 01:05 pro4never#6
Quote:
Originally Posted by corbit15 View Post
ah ok. yeah i did notice it came at random times. alright well thanks for the input.
another question, how can i get flags? such as

BlueName = 1UL << 0,
You should learn basics of bit logic.

Each number in computers is actually a series of bits.

Int/Uint = 4 bytes
Byte = 8 bits (binary octet)
Each bit can be either 1 or 0 (on/off)

Therefor Unsigned integer (positive only) has a max value of 4294967297

This can be found by doing...
2^32 + 1

Now... why is this useful? well it means that this is really just a huge long binary string. Using bit logic we can use it to store a huge list of true and false statements... this is how status effects in conquer work.

There's a total of 16 bytes of status effects sent in every character spawn packet... This is troublesome seeing as the largest standardized data type in C# is ULong (8 bytes, max value 18,446,744,073,709,551,615). This is why most sources split it into two "pools" of effects (each a ulong).

Now... the code you just pointed out is the same as saying...

"take the value 1 and place X zeros at the end of it"

We are 'shifting' the bit over.

If we discuss this in binary terms it gives us the following..

1UL << 0 = 1
1UL << 1 = 10
1UL << 2 = 100
1UL << 3 = 1000
1UL << 4 = 10000
1UL << 5 = 100000
1UL << 6 = 1000000
1UL << 7 = 10000000
1UL << 8 = 100000000


note, I posted 8 not because I feel you're dumb and need so many examples but because there are 8 bits in one byte

Ok so this is useful for the reason that we can COMBINE the effects.


1UL << 0 + 1UL << 1 = 11
1UL << 1 + 1UL << 8 = 100000010

Etc

So... To take this back on topic, the way you 'find' these values is by trial and error. You set your status effect to be 1UL << 0 (first possible bit is active), then you try setting status effect to 1UL << 1 (second possible bit is active). You then write down what each one does and you have a list.


Ooh... or you just look in the client which has a complete list of effect name and number of bits it's shifted over but where's the fun in that?



Phew, lots of typing but hopefully someone will find this interesting or educational and hopefully... not incorrect <_< I didn't really take the time to proof read or check this, it's really off the top of my head so please let me know if I missed something or explained something wrong.
03/06/2012 01:15 Lateralus#7
Incomplete. You should also teach about different representations, like 2's complement, 1's complement, and the two others I can't remember.

Just kidding. :P Very thorough explanation.
03/06/2012 01:28 pro4never#8
You have no idea how tempted I was to break out paint and start making little diagrams of binary octets for different hex representations of letters....

Then I was like "wow... Not only am I completely off topic from where I started, this shift is pathetically dead if I'm willing to put in this much effort"

I then proceeded to cry into my keyboard.
03/06/2012 10:26 I don't have a username#9
Quote:
Originally Posted by pro4never View Post
I then proceeded to cry into my keyboard.
Everything will be okay soon.