Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: TeEhEiMaN on October 30, 2003, 02:49 PM

Title: Plugin icon
Post by: TeEhEiMaN on October 30, 2003, 02:49 PM
Whats the Packet to get the plugin icon instead of lag bars, in winsock arival?

thx
Title: Re:Plugin icon
Post by: Freeware on October 30, 2003, 09:03 PM
Quote from: TeEhEiMaN on October 30, 2003, 02:49 PM
Whats the Packet to get the plugin icon instead of lag bars, in winsock arival?

thx

There is a search button... :(

But incase your too lazy:


               If blnPlug = False Then
                   pBuffer.InsertNonNTString StrReverse("bnet")
                   pBuffer.SendPacket sckBnet, &H14
               End If



If blnPlug = True, then it wont send the packet, thus recieving a 'plugin' icon.
Title: Re:Plugin icon
Post by: Spht on October 30, 2003, 09:24 PM
Quote

               If blnPlug = False Then
                   pBuffer.InsertNonNTString StrReverse("bnet")
                   pBuffer.SendPacket sckBnet, &H14
               End If



That's one of the strangest ways I've seen to insert the 'bnet' DWORD. It is a DWORD, so it should be treated like one.
Title: Re:Plugin icon
Post by: iago on October 31, 2003, 01:38 AM
I've seen it treated like that before, actually.  Just like RATS, PXES, 3RAW, etc. are far too frequently treated as char[3]'s
Title: Re:Plugin icon
Post by: Arta on October 31, 2003, 08:45 AM
Strange? I've seen it like that more times than I can count ;) I did it like that myself when I was first starting, until someone kindly pointed out that it was a DWORD.
Title: Re:Plugin icon
Post by: Adron on October 31, 2003, 10:29 AM
How do you know if they are DWORD's or byte arrays?
Title: Re:Plugin icon
Post by: TeEhEiMaN on October 31, 2003, 11:46 AM
umm doesnt work gets me ip banned
Title: Re:Plugin icon
Post by: TeEhEiMaN on October 31, 2003, 12:54 PM
b.net, I put this in the winsock arival right?
Title: Re:Plugin icon
Post by: TeEhEiMaN on October 31, 2003, 12:55 PM
or maybe it doesnt ip ban me, just doesnt connect
Title: Re:Plugin icon
Post by: Zakath on October 31, 2003, 01:00 PM
I send 0x14 in the success case of the 0x51 handler, and I've never had problems with it.
Title: Re:Plugin icon
Post by: Freeware on October 31, 2003, 02:52 PM
Quote from: TeEhEiMaN on October 31, 2003, 12:55 PM
or maybe it doesnt ip ban me, just doesnt connect

you send before logging in
Title: Re:Plugin icon
Post by: Death-Merchant on November 01, 2003, 04:19 AM
Would you send it before you send your username and password?
If so, I keep getting -1 Here's the code I'm using.


If GetStuff("Lag Settings", "Plug") = "True" Then
    pbuffer.InsertNonNTString StrReverse("bnet")
    pbuffer.sendPacket &H14
End If
Title: Re:Plugin icon
Post by: Zakath on November 01, 2003, 07:20 AM
No, if "Plug" is true, don't send 0x14. That packet indicates to bnet that your client has support for UDP processing, and is actually sent by the real Starcraft + Warcraft II clients in response to a UDP packet sent by bnet during the login process. If you send 0x14, bnet gives you lag icons since you supposedly are game-capable. If you don't, you get stuck with a plug.

Incidentally, getting a ping of -1 is completely unrelated to the plug. That arises from not ponging the server when it pings you.
Title: Re:Plugin icon
Post by: Lenny on November 01, 2003, 07:31 AM
Quote from: Death-Merchant on November 01, 2003, 04:19 AM
Would you send it before you send your username and password?
If so, I keep getting -1 Here's the code I'm using.


If GetStuff("Lag Settings", "Plug") = "True" Then
    pbuffer.InsertNonNTString StrReverse("bnet")
    pbuffer.sendPacket &H14
End If


Your not sending 0x25 if your getting a -1 ms ping and also you send 0x14 after recieving 0x51
Title: Re:Plugin icon
Post by: Dyndrilliac on November 01, 2003, 09:21 AM
My understanding of the subject on ping, is that if you don't send the ping packet altogether, its -1, if you send it in the fastest possible time, it's 0, and if you delay it being sent you can achieve a high ping.  I've gotten as high as 60k ping and as low as -1 using this method.

About the plug -

       Case Chr(1)
         SendUsernamePassword
         'plug
         pBuffer.InsertNonNTString "tenb"
         pBuffer.SendPacket &H14


I have my bot logon with UDP Plug and 0ms ping, and the code above is the plug. As you can see, it occurs during logon after the SendUsernamePassword event.

Edit: Mine works, so whoever said NOT to send 0x14 is wrong.

Edit#2: Since mine occurs during logon, it isn't optional, I suggest if you WANT the plug, do it this way since it works...
Title: Re:Plugin icon
Post by: UserLoser on November 01, 2003, 11:16 AM
IMO, you shouldn't always assume that it's going to be "tenb", you should bind a UDP socket, and get the actual code :)
Title: Re:Plugin icon
Post by: Freeware on November 01, 2003, 12:06 PM
Quote from: UserLoser on November 01, 2003, 11:16 AM
IMO, you shouldn't always assume that it's going to be "tenb", you should bind a UDP socket, and get the actual code :)

Well for this case he WANTs a plugin icon, so he wouldnt have to send anything at all...
Title: Re:Plugin icon
Post by: Skywing on November 01, 2003, 12:45 PM
Quote from: Adron on October 31, 2003, 10:29 AM
How do you know if they are DWORD's or byte arrays?
I know that Blizzard uses Visual C++, that the Battle.net programmers have historically tended to cut corners to do stuff quickly, and that it's easy to declare such things as DWORDs when using cl.exe.
Title: Re:Plugin icon
Post by: Freeware on November 01, 2003, 03:18 PM
Quote from: Skywing on November 01, 2003, 12:45 PM
Quote from: Adron on October 31, 2003, 10:29 AM
How do you know if they are DWORD's or byte arrays?
I know that Blizzard uses Visual C++, that the Battle.net programmers have historically tended to cut corners to do stuff quickly, and that it's easy to declare such things as DWORDs when using cl.exe.

Windows Itself uses Dwords in storing data - hint: registry
Title: Re:Plugin icon
Post by: Skywing on November 01, 2003, 04:05 PM
Quote from: Freeware on November 01, 2003, 03:18 PM
Quote from: Skywing on November 01, 2003, 12:45 PM
Quote from: Adron on October 31, 2003, 10:29 AM
How do you know if they are DWORD's or byte arrays?
I know that Blizzard uses Visual C++, that the Battle.net programmers have historically tended to cut corners to do stuff quickly, and that it's easy to declare such things as DWORDs when using cl.exe.

Windows Itself uses Dwords in storing data - hint: registry
Your statement is fairly meaningless.  For instance, you can have binary values (byte arrays) in the registry.
Title: Re:Plugin icon
Post by: Freeware on November 01, 2003, 04:58 PM
Quote from: Skywing on November 01, 2003, 04:05 PM
Quote from: Freeware on November 01, 2003, 03:18 PM
Quote from: Skywing on November 01, 2003, 12:45 PM
Quote from: Adron on October 31, 2003, 10:29 AM
How do you know if they are DWORD's or byte arrays?
I know that Blizzard uses Visual C++, that the Battle.net programmers have historically tended to cut corners to do stuff quickly, and that it's easy to declare such things as DWORDs when using cl.exe.

Windows Itself uses Dwords in storing data - hint: registry
Your statement is fairly meaningless.  For instance, you can have binary values (byte arrays) in the registry.

I didnt say that all windows does is use dwords, i just said they do use them.
Title: Re:Plugin icon
Post by: Skywing on November 01, 2003, 05:48 PM
Quote from: Freeware on November 01, 2003, 04:58 PM
Quote from: Skywing on November 01, 2003, 04:05 PM
Quote from: Freeware on November 01, 2003, 03:18 PM
Quote from: Skywing on November 01, 2003, 12:45 PM
Quote from: Adron on October 31, 2003, 10:29 AM
How do you know if they are DWORD's or byte arrays?
I know that Blizzard uses Visual C++, that the Battle.net programmers have historically tended to cut corners to do stuff quickly, and that it's easy to declare such things as DWORDs when using cl.exe.

Windows Itself uses Dwords in storing data - hint: registry
Your statement is fairly meaningless.  For instance, you can have binary values (byte arrays) in the registry.

I didnt say that all windows does is use dwords, i just said they do use them.

So, we've established that the registry supports DWORDs and byte arrays.  Once again, I don't see how this is at all relevant to the discussion in this thread.
Title: Re:Plugin icon
Post by: Adron on November 01, 2003, 08:24 PM
I'd say we can believe that it's a DWORD, but not be sure ;)
Title: Re:Plugin icon
Post by: Skywing on November 01, 2003, 11:34 PM
Quote from: Adron on November 01, 2003, 08:24 PM
I'd say we can believe that it's a DWORD, but not be sure ;)
Actually, code in battle.snp prints it out as a doubleword.

"req.programId             = 0x%08X"

(Debug information printing out the contents of a sent SID_AUTH_INFO message).

So, it's fairly reasonable to assume that it's supposed to be treated as a doubleword.