Valhalla Legends Forums Archive | Battle.net Bot Development | d2 help

AuthorMessageTime
Killa
wondering if anyone could give me the tables for d2 ingame decompression or atleast give me some information that could get me started
December 5, 2003, 1:05 AM
iago
Check the Java forum.
December 5, 2003, 2:00 AM
Killa
wonderin if anyone can help me get the functions posted here

https://davnit.net/bnet/vL/phpbbs/index.php?board=17;action=display;threadid=3357

working for the .dll packet decompression
December 6, 2003, 2:34 AM
Kp
[quote author=Killa link=board=17;threadid=4081;start=0#msg33878 date=1070678045]
wonderin if anyone can help me get the functions posted here

https://davnit.net/bnet/vL/phpbbs/index.php?board=17;action=display;threadid=3357
working for the .dll packet decompression[/quote]

What specifically is not working for you?
December 6, 2003, 2:44 AM
Killa
well more specificly i need more information on how to put the function to use. ie:do i need to do anything to the packet i receive from bnet befor passing it along to the function

or perhaps an example of the packetsize/packet decode function being put to use or even better the code posted by brand.x in ported to vb6
December 6, 2003, 2:49 AM
Killa
what would i put for this when using the function as a .dll in vb?
// outmax: [in] size of output buffer
December 6, 2003, 11:23 PM
Killa
im using

[code]
Public Declare Function GamePacketSize Lib "D2GSClient.dll" (ByRef Data As String, ByRef Size As Integer, ByRef Offset As Integer) As String

and

Public Declare Function GamePacketDecode Lib "D2GSClient.dll" (ByRef inData As String, ByVal inSize As Integer, ByRef outData As String, ByVal outMax As Integer, ByRef outSize As Integer) As Integer
[/code]

and the gamepacketdecode is returing 1(1 being successful decode) yet im getting nothing in the outdata string and the outdata size string anyone know a reason for this?

also when puting the data into the decode function can i put the data into it right when i recieve it from the server or do i need to convert the data into some other format or change it in some way first?
December 7, 2003, 1:14 AM
Killa
you sure about the ByVal because now when i try to use it i get a error msg that vb caused a error in the .dll
December 7, 2003, 3:25 AM
Killa
// indata: [in] compressed packet (without size byte)
// insize: [in] length of indata
// outdata: [out] output buffer
// outmax: [in] size of output buffer
// outsize: [out] location to store size of decoded data
// returns: 1 on successf decode, 0 if not enough room

insize=result from gamepacketsize?
outmax=?
December 7, 2003, 3:55 AM
Kp
outmax = maximum number of characters which can be written to the output buffer
December 7, 2003, 4:00 AM
Killa
whats the max length of a string then?

also back to one of my original questions can i pass the compressed packet to the functions right as i recieve them or do i need to change them to another format first?
December 7, 2003, 4:02 AM
Soul Taker
This is what I used for testing, although it would return cut-off data:
[code]
Public Declare Function GamePacketDecode Lib "kablam.dll" (ByVal indata As String, ByVal insize As Long, ByVal outdata As String, ByVal outmax As Long, ByRef outsize As Long) As Integer
Public Declare Function GamePacketSize Lib "kablam.dll" (ByVal Data As String, ByRef Size As Long, ByRef Offset As Long) As String
(thanks to K for kablam.dll!)

Dim Offset As Long, Size As Long, GPS As String, GPD As Integer
Dim Outbuff As String, maxsize As Long, outsize As Long
On Error Resume Next 'I know, I know, only used this for quick and dirty testing
GPS = GamePacketSize(strD2GSIn, Size, Offset)
Outbuff = String(Size, vbNullChar)
GPD = GamePacketDecode(Mid(strD2GSIn, Offset), Size, Outbuff, Len(Outbuff), outsize)
Debug.Print DebugOutput(Outbuff) 'GPD & " " & outsize & " " & Len(Outbuff)
[/code]
Should give you the idea, but it will give you slightly mangled data.
December 7, 2003, 6:41 PM
Killa
curious as to if anyone has gotten these functions to work correctly with 1.10,anyone?
when i attempt to use it the function doesn't seem to return anything,and if it does its only a character or two long.
December 14, 2003, 3:42 AM

Search