• Welcome to Valhalla Legends Archive.
 

I need help...

Started by NetNX, January 23, 2004, 03:33 PM

Previous topic - Next topic

NetNX

   Case &H6
           Dim d As String, mpqend As String
           d = data
           Servers = Val("&h" & StrToHex(StrReverse(Mid(data, 9, 4))))
           MPQName = Mid(d, InStr(d, "I"), Len(d) - InStr(InStr(d, "I"), d, Chr(0)))
           mpqend = InStr(InStr(d, "I"), d, Chr(0))
           MPQName = Left(MPQName, InStr(MPQName, Chr(0)) - 1)
           hash = Mid(d, mpqend + 1, InStr(mpqend + 1, d, Chr(0)) - 1)
           hash = Left(hash, InStr(hash, Chr(0)) - 1)
           Dim Result As Long
           Dim exeinfo As String
           InsertNonNTString "68XI" & varproduct
           InsertDWORD "&H" & GetVerByte()
           exeinfo = Space(256)
           Select Case varproduct
               Case "RATS", "PXES"
                   Result = z(App.Path & "\star\Starcraft.exe", App.Path & "\star\storm.dll", App.Path & "\star\battle.snp", hash, version, checksum, exeinfo, MPQName)
               Case "NB2W"
                   Result = z(App.Path & "\war2\Warcraft II BNE.exe", App.Path & "\war2\storm.dll", App.Path & "\war2\battle.snp", hash, version, checksum, exeinfo, MPQName)
               Case "VD2D"
                   Result = z(App.Path & "\d2dv\game.exe", App.Path & "\d2dv\bnclient.dll", App.Path & "\d2dv\d2client.dll", hash, version, checksum, exeinfo, MPQName)
               Case Else
                   MsgBox "Invalid Version", vbCritical, "Error"
           End Select
           InsertDWORD version
           InsertDWORD checksum
           NullTruncString exeinfo
           InsertNTString exeinfo
           If exeinfo = Space(256) Then
               Clear
               AddChat vbRed, "Hashes not found"
               Form1.sckBnet.Close
               Exit Sub
           End If
           sendPacket 7

Then this shit returns the packet 0 witch means that i have invalid hashes... ive tryed the old hashes and the ones straight from my d2 folder .... its not working and i have no idea
i have the ver byte set as "0A"

[Kp edit: added code tags.  This should have been done by the original poster.  Repeat offenses may result in message deletion.]

UserLoser.

If you're using D2DV, I don't think you can use those packets.. You'd have to use the 0x50/0x51/0x3A sequence

NetNX

yea this will teach me not to mooch off other peoples source code :-/
cuz now i have a control i used in 1/2 my programs that wont support d2 :-/
i gota fix this....
anyway it connects to starcraft just fine and it sends 0x50 right as it logs on and i see bits and pieces of 0x051 in there and i have no idea what 0x0A dose

Soul Taker

Quote from: NetNX on January 25, 2004, 01:10 AM
yea this will teach me not to mooch off other peoples source code :-/
cuz now i have a control i used in 1/2 my programs that wont support d2 :-/
i gota fix this....
anyway it connects to starcraft just fine and it sends 0x50 right as it logs on and i see bits and pieces of 0x051 in there and i have no idea what 0x0A dose
0xA enters chat.

NetNX

**smacks himself in forehead** Oooooooooooooooooooooooooooooooooh.... ;D silly me