Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: mentalCo. on June 09, 2004, 04:16 PM

Title: [c++]quick and simple packet question
Post by: mentalCo. on June 09, 2004, 04:16 PM
ok what would a packet look like that sent the text "hello" into a channel.  like the actual data sent.
Title: Re:[c++]quick and simple packet question
Post by: hismajesty on June 09, 2004, 04:27 PM
FF 0E 0A 00 48 65 6C 6F 00     ....Hello.

Edit: Forgot an 'L' when posting, fixed down below.
Title: Re:[c++]quick and simple packet question
Post by: mentalCo. on June 09, 2004, 04:28 PM
EXACTLY what i was looking for.  thanks mate.
Title: Re:[c++]quick and simple packet question
Post by: UserLoser. on June 09, 2004, 06:30 PM
Quote from: hismajesty[yL] on June 09, 2004, 04:27 PM
FF 0E 0A 00 48 65 6C 6F 00     ....Hello.

Try again
Title: Re:[c++]quick and simple packet question
Post by: iago on June 09, 2004, 07:32 PM
Quote from: UserLoser. on June 09, 2004, 06:30 PM
Quote from: hismajesty[yL] on June 09, 2004, 04:27 PM
FF 0E 0A 00 48 65 6C 6F 00     ....Hello.

Try again

Looks like a counting mistake :)

Correct would be:
FF 0E 09 00 48 65 6C 6F 00     ....Hello.

<edit> actually, the size isn't wrong, you missed an L in the hex :P
Title: Re:[c++]quick and simple packet question
Post by: hismajesty on June 09, 2004, 08:09 PM
FF 0E 0A 00 48 65 6C 6C 6F 00    ....Hello.
Title: Re:[c++]quick and simple packet question
Post by: mentalCo. on June 09, 2004, 09:22 PM
is there an easy way to convert text to hex.  also to convert the size of the text into a hex value?  i just put together some sloppy ass code that just does text.  using c++ of course.
Title: Re:[c++]quick and simple packet question
Post by: R.a.B.B.i.T on June 09, 2004, 09:33 PM
Just convert the strlen of the string (or character array) into hex, not too hard.

I forget the conversion call though.. -.-
Title: Re:[c++]quick and simple packet question
Post by: mentalCo. on June 09, 2004, 09:36 PM
nvm i got it.  thanks people.  cool forums.  ill let everyone have my source to my bot when im done with it to learn.
Title: Re:[c++]quick and simple packet question
Post by: BaDDBLooD on June 09, 2004, 09:52 PM
Quote from: mentalCo. on June 09, 2004, 09:36 PM
nvm i got it.  thanks people.  cool forums.  ill let everyone have my source to my bot when im done with it to learn.

that'd be nice.. maybe you could put some Comments?
Title: Re:[c++]quick and simple packet question
Post by: iago on June 10, 2004, 07:12 AM
Quote from: BaDDBLooD on June 09, 2004, 09:52 PM
Quote from: mentalCo. on June 09, 2004, 09:36 PM
nvm i got it.  thanks people.  cool forums.  ill let everyone have my source to my bot when im done with it to learn.

that'd be nice.. maybe you could put some Comments?

Commenting code? Unheard of!