• Welcome to Valhalla Legends Archive.
 

A question about the Warcraft III Clan System

Started by Arthas, September 29, 2003, 11:15 PM

Previous topic - Next topic

Arthas

#15
Here is what I send... yet I get no reply. This is right after I send 0x46 btw.


               pBuffer.InsertDWORD 41
               pBuffer.SendPacket sckBnet, &H7D


I got it working once before using that code, but it all of a sudden just stopped sending me it... o_O I'm confused.

Stealth

#16

pBuffer.InsertDWORD &H1
pBuffer.SendPacket &H7D


I'm using a value of 1 based off of a packetlog I ran at one point, it's been working great. Could the server be ignoring your request because your cookie isn't.. right somehow? Try sending 1.
- Stealth
Author of StealthBot

Arthas

Thanks stealth, but this is really *FUCKED* up now. Pardon my language...

Here's the scoop, now my Select Case PacketID isnt recognizing the packet unless I get a msgbox to show me the packetid's.

Here's the code:

Where PacketID = Asc(Mid(data, 2, 1))

Working:(Uncommented MsgBox)

   MsgBox hex(PacketID)
   
   Select Case PacketID
       Case &H0


Not working:(Commented MsgBox)

   'MsgBox hex(PacketID)
   
   Select Case PacketID
       Case &H0


Help. O_O

Arthas

It's as if I need a little delay somewhere... Though BNet still sends me the packet my bot wont recieve it.

SiMi

#19
Maybe some of the data recived from the winsock_dataarrival got filtered out through that sub? Best of all; try debugging!

Quote from: Arthas on September 30, 2003, 10:50 PM
It's as if I need a little delay somewhere... Though BNet still sends me the packet my bot wont recieve it.
How would you know if bnet sends you the packet if you dont get it?  :-X

Zakath

Quote from: Simi on October 01, 2003, 12:07 AM
How would you know if bnet sends you the packet if you dont get it?

A packet log, of course. You mean to tell me you've never used one in the process of writing a bot? I used mine all the time when I was first getting my packet handling set up, plus I needed it quite a bit when I was first adding support for D2 realms.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Spht

Quote from: St0rm.iD on October 01, 2003, 05:55 AM
Quote from: iago on September 30, 2003, 07:34 PM
Quote from: St0rm.iD on September 30, 2003, 06:33 PM
WHAT THE FUCK WHY WAS MY POST DELETED

It was oviously useless or offtopic, much like that one.  I would suggest also deleting that one and mine.

No, it was a link to wiki.ik0ns.com, with documentation for the packets he was inquiring about.

Maybe next time you should copy the necessary content into your post as a formulated answer, instead of just pasting a link to another server.

Arthas

#22
Here here Zakath, WPE has been my best friend ;D

Anyways, I'm still stuck. It seems I have to pause for a while when recieving 0x46(BNet News Packet) in order to "recieve" 0x7d. I've looked at my recieve 0x46 code, and there's nothing up that would trigger a sudden loss of packet recieving. Though there is a loop in my recieve 0x46 code, maybe that would do it?

Arthas

#23
Nvm...... My entire program just needs to pause for some retarded reason.

SiMi

Quote from: Zakath on October 01, 2003, 12:24 AM
Quote from: Simi on October 01, 2003, 12:07 AM
How would you know if bnet sends you the packet if you dont get it?

A packet log, of course. You mean to tell me you've never used one in the process of writing a bot? I used mine all the time when I was first getting my packet handling set up, plus I needed it quite a bit when I was first adding support for D2 realms.
No, thats not what i meant.... I meant if bnet sends the packet but you never get it on your client (they sent it but you never got it).

UserLoser


Arta

Quote from: Simi on October 01, 2003, 08:47 PM
Quote from: Zakath on October 01, 2003, 12:24 AM
Quote from: Simi on October 01, 2003, 12:07 AM
How would you know if bnet sends you the packet if you dont get it?

A packet log, of course. You mean to tell me you've never used one in the process of writing a bot? I used mine all the time when I was first getting my packet handling set up, plus I needed it quite a bit when I was first adding support for D2 realms.
No, thats not what i meant.... I meant if bnet sends the packet but you never get it on your client (they sent it but you never got it).

That would never happen. If it does, it's your program's fault. TCP/IP guarantees delivery.

MyndFyre

Something that happened to me (that might be happening to you), which could explain that sometimes you get a packet and sometimes you don't, is that bnet is lumping more than one packet into a single Send() call.

So if you're getting a load of data from the server, make sure the data length is equivalent to the packet length.  IF NOT - copy the data from data(packetLength) to data(receivedDataLength) into a new array and parse THAT.  Then repeat.  Careful - this can emulate a directly recursive method depending on how you implemented it (mine was not implemented such that it would be recursive, but it still entered an endless loop.

As Arta pointed out, TCP/IP is a reliable transport service - if a packet fails to send, the sender is notified (I think that's called a NACK) and the packet is re-sent.  A failed packet is not reported to your program.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Adron


Arthas

The case: If I dont pause, my bot dosnt recieve the packet. I packet logged 5 times to be certain, and when my bot dosnt recieve the packet... The packet is still packaged into it's own independant packet and sent to ME because my computer picks it up. I use WPE, I target my bot, packet log, the packet logger catches the packet, yet my bot dosnt.

If I pause however... I ALWAYS catch the packet. I'm going to try this Debug Output thing. Thanks for the help, but I'd appreciate some more:)

|