Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Jaquio on May 03, 2006, 01:31 AM

Title: Receiving 0x25 an 0x50 at the same time..
Post by: Jaquio on May 03, 2006, 01:31 AM

------wskBNet_DataArrival------
Data:ÿ% »-ÿPf     [a...Œ¾JÌb ØpÖ½ ÆIX86ver0.mpq A=1481262565 B=1172659121 C=1538349130 4 A=A+S B=B-C C=C+A A=A+B
Hexed: FF 25 08 00 0B 08 BB 2D FF 50 66 00 00 00 00 00 5B 61 85 8C BE 4A CC 62 20 D8 70 D6 BD 0C C6 01 49 58 38 36 76 65 72 30 2E 6D 70 71 00 41 3D 31 34 38 31 32 36 32 35 36 35 20 42 3D 31 31 37 32 36 35 39 31 32 31 20 43 3D 31 35 33 38 33 34 39 31 33 30 20 34 20 41 3D 41 2B 53 20 42 3D 42 2D 43 20 43 3D 43 2B 41 20 41 3D 41 2B 42 00
Bytes Total:110
------wskBNet_DataArrival------


See that? I am receiving 0x25 a 0x50 at the same time, so therefore I cannot parse anything correctly..

Is there a way at all I could fix that, I have tried a few attempts but it sorta made it worse an made it get stuck in other places..

Here is what I have tried..


I didn't have this problem before why now? I did this just as I did my other bot(It's old an outdated needed to start anew). Not sure why it's happening.. Any ideas as to what could cause this?[/li]
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: MyndFyre on May 03, 2006, 02:04 AM
Are you using a data reader (or what some people call (arguably) incorrectly) a "debuffer"?  (The reason I say it's incorrect is because it entirely misses the point of what a buffer is)?  If so, use that to parse every packet and then read the data in a stream fashion.

Just keep looping as long as your buffer has more data.
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: Tazo on May 03, 2006, 05:48 AM
[Credits to Joe]
http://forum.valhallalegends.com/index.php?topic=13294.0
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: Sorc.Polgara on May 03, 2006, 03:08 PM
Quote from: MyndFyre[vL] on May 03, 2006, 02:04 AM
Are you using a data reader (or what some people call (arguably) incorrectly) a "debuffer"?  (The reason I say it's incorrect is because it entirely misses the point of what a buffer is)?  If so, use that to parse every packet and then read the data in a stream fashion.

Just keep looping as long as your buffer has more data.
Meh, I've actually recently started writing a bot with a GUI in C++ (No MFC) and I just reached the point where I'll be implementing this.
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: rabbit on May 03, 2006, 03:53 PM
Jaquio, Battle.Net packets have length markers in the headers for a reason ;)
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: Jaquio on May 03, 2006, 04:00 PM
Quote from: rabbit on May 03, 2006, 03:53 PM
Jaquio, Battle.Net packets have length markers in the headers for a reason ;)

Yea.. I not sure why I didn't use it. Feel sorta dumb now, :P, anyways thanks everyone. :)
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: Sorc.Polgara on May 04, 2006, 09:28 PM
Quote from: MyndFyre[vL] on May 03, 2006, 02:04 AM
Are you using a data reader (or what some people call (arguably) incorrectly) a "debuffer"?  (The reason I say it's incorrect is because it entirely misses the point of what a buffer is)?

... just spent an hour modifying and renaming my C++ packet buffer and packet "debuffer" classes to DataBuffer and DataReader >_<;
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: MyndFyre on May 04, 2006, 09:37 PM
Renaming them took an hour?
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: Sorc.Polgara on May 04, 2006, 11:28 PM
Quote from: MyndFyre[vL] on May 04, 2006, 09:37 PM
Renaming them took an hour?
Well... I added a couple of functions to the DataReader and I also went through and changed everything to use hungarian notation... that required some time... since everything was using Java naming conventions.
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: Jaquio on May 05, 2006, 12:32 AM
Quote from: Sorc.Polgara on May 04, 2006, 11:28 PM
Quote from: MyndFyre[vL] on May 04, 2006, 09:37 PM
Renaming them took an hour?
Well... I added a couple of functions to the DataReader and I also went through and changed everything to use hungarian notation... that required some time... since everything was using Java naming conventions.

Well see, you didn't mention that before.  :P

How was MyndFyre to know, lol.
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: warz on May 05, 2006, 12:43 AM
yay for c++
Title: Re: Receiving 0x25 an 0x50 at the same time..
Post by: raylu on May 05, 2006, 10:56 PM
Quote from: Sorc.Polgara on May 04, 2006, 11:28 PM
Quote from: MyndFyre[vL] on May 04, 2006, 09:37 PM
Renaming them took an hour?
Well... I added a couple of functions to the DataReader and I also went through and changed everything to use hungarian notation... that required some time... since everything was using Java naming conventions.
Find...and...replace?