• Welcome to Valhalla Legends Archive.

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - LivedKrad

Is there any way to call a function contained within a VB6 EXE from a VB6 DLL? I've already create a Standard DLL with VB6, with exportable functions. However now, I'd like to import functions to the DLL from the loading executable. Is this possible?
Is it possible to enable a button on another program's form? I was told that the API EnableWindow() could do this, but one of the parameters is obviously a handle. I don't know how to grab the handle of a button on a remote form. Can anyone assist?
General Discussion / Protocol garbage
February 21, 2006, 09:29 AM
If I have a new network packet that has a protocol format of eth:ip:tcp (Ethernet, IP, TCP), why would one packet contain an ethernet trailer or "footer" and another one would not? What is the purpose of this footer?
No idea if this is the wrong forum..

If I have a new network packet that has a protocol format of eth:ip:tcp (Ethernet, IP, TCP), why would one packet contain an ethernet trailer or "footer" and another one would not? What is the purpose of this footer?
Visual Basic Programming / process control
January 03, 2006, 10:52 PM
What I want to accomplish:

1. Locally execute another program. (ShellEx()?).
2. Input mouse clicks and movements into this program. (e.g.: get resolution and pixel dimensions of the remote program so as to precisely move the mouse where I want to and click), (no idea what API will allow this).
3. Monitor the network traffic of this program, specifically to see when certain messages are sent and/or received. (no idea how to do this either).
4. Send keyboard actions to this program.

It would seem to some that I have not researched this, I have. Maybe it would also seem that I have not tried to figure out how to do it, I have. Admittedly, I haven't done much delving into API, but I hope that someone here could help me.

Edit: As of reading a post, I saw something mentioned about Adron's "hooksocket". Would this be able to help me in my endeavour? I've never heard of it.
Computer Support Issues / VGA problem?
December 08, 2005, 06:51 PM
I just got my new motherboard. Replaced the processor (1.1 GHz AMD Duron), installed RAM (two 256MB DDRs), optical and hard drive, tested the PSU (voltage connection green wire to black wire), and replaced the CPU fan. Now, I plug the monitor connector to the VGA card and power cable into the power supply. I power up the computer, the computer runs smoothly, except for a small problem: I see no video. I do not have a spare card to test if it's the card, but I'm pretty sure it worked before and I did nothing to it. Any ideas guys?
Most of the messages that come in upon game join are clumped into one big message. I was wondering: does Battle.net buffer these packets together and then compress them? Or do they compress each packet and then add them to the buffer?
General Discussion / Possible motherboard problem
August 05, 2005, 04:20 AM
Recently, I came back from eating a rather good sandwich consisting of ham, cheese, and mustard, when I saw that my computer had magically powered itself down. What I naturally did was attempt to start it back up, but it was a no-go. I had previously had some trouble with the starter switch, the two wire ends weren't making contact in the wire housing. Anyway, I've been trying to figure what's wrong, and here are some things I've done:

First, I plugged the motherboard power connector into the motherboard, and attempted to start the PC by completing the starter circuit with a flathead screwdriver. The processor fan spun for about 1 and a half seconds, and did not move anymore. It did this repeatedly after doing it over again. My guess is some previous discharge? So, obviously I thought the power supply was on the fritz, but I decided to grab a paper clip and connect the green wire to a black wair on the end of the motherboard power connector, just to test and see if the power supply worked. Well, it did. The fan booted just fine and ran as a constant, additionally I hooked up the system fan and an optical drive too, they worked as well.

Can anyone offer any insight?
System: Old socket A motherboard, some SiS 735 chipset I believe. AMD (XP?) 1.1GHz processor, probably 133MHz bus, but it supports up to 266MHz. Two DIMMs, two slots for (UDRAM I'm guessing?). AGP, standard ISAs, couple of IDE inputs, and some other crap I don't know. (AMIBIOS ROM setup, and I also tried resetting the CMOS, did nothing).

Any help is appreciated.

Edit: ATX form factor.
I'm trying to do some pathing, but as some of you know the map type changes between games and so do the specific coordinates for NPC's and stuff. I was wondering if there was an OnJoin packet that specified what map style it was or what the coordinates were so I can set up the pathing according to the current map style. Anyone?
Does anyone know the maximum amount of run to location packets you can add into the sort of "queue"? It would seem, after trying to do a sort of "pathing" to Akara, the character doesn't want to go beyond four RUN packets.

Public Sub MidToAkara()
RunToLoc 5830, 4439
RunToLoc 5848, 4437
RunToLoc 5855, 4428
RunToLoc 5870, 4430
RunToLoc 5862, 4427
RunToLoc 5875, 4430
End Sub

I have to recall the MidToAkara() routine for it to run all the way to 5875, 4430. Any suggestions? Ideas?
Battle.net Bot Development / [VB] D2GS Parser
July 14, 2005, 07:25 PM
I am at the end of my sanity! I cannot for the life of me figure out why my parsing routine continually comes up with packet values higher than the highest packet (0xB3) or why it comes up with packet values that are of size 0 in the packet size table. Someone help me please, for the safety of me and others around me:

*Note: According to the decompressing functions of D2GS.dll, the compressed data is passed to the decompressor, and is output like "data" + "2F" + loads of nulled padding. (0x2F in the packet size table is considered of value 0, so technically it shouldn't be a packet and thus why it is used as a terminator).

Public Sub D2GSParserRoutine(ByVal data As String)
If data = vbNullString Then
  Exit Sub
End If
Dim pid As Byte
Dim pSize As Long
Dim tmpSize As Byte
Dim pName As String
pid = Asc(Mid$(data, 1, 1))
'AddChat2 vbWhite, DebugOutput(data)

'If pid = &HFF Then
'Call D2GSParserRoutine(Mid$(data, 2))
'Exit Sub
'End If

  If pid > 179 Then
AddChat vbWhite, "Broke on packet: 0x" & Hex(pid)
  AddChat2 vbWhite, "Last packet dump: " & DebugOutput(lastPacketDump)
AddChat2 vbWhite, "Dump: " & DebugOutput(data)
Exit Sub
  pSize = PACKET_SIZE(pid)
pName = vbNullString
End If

If pid = &H2F Then
'AddChat vbMagenta, "End of packet."
Exit Sub
End If

If pSize = &HFFFFFFFF Then

Select Case pid
  Case &HAA
   tmpSize = Asc(Mid$(data, 7, 1))
  Case &HAC
   tmpSize = Asc(Mid$(data, 13, 1))
  Case &H26
   tmpSize = Parsechat(data)
    If tmpSize = 0 Then
     Exit Sub
    End If
  Case &H5B
   AddChat &H80FF&, "Player in game: " & Mid$(data, 9, 15)
   ObjectId.numPlayers = ObjectId.numPlayers + 1
   tmpSize = Asc(Mid$(data, 2, 1))
  Case &H94
   tmpSize = 6 + ((Asc(Mid$(data, 2, 1)) * 3))
   AddChat vbCyan, "precasting.."
  Case &H9C
   tmpSize = Asc(Mid$(data, 3, 1))
  Case &H9D
   tmpSize = Asc(Mid$(data, 3, 1))
  Case &HA8
   tmpSize = Asc(Mid$(data, 7, 1))
  Case Else
   AddChat2 vbWhite, "Encountered packet with unknown size: 0x" & Hex(pid)
   AddChat2 vbWhite, "Dump: " & DebugOutput(data)
   Exit Sub
End Select

AddChat vbWhite, "Received packet: 0x" & Hex(pid)
lastPacketDump = Mid$(data, 1, tmpSize + 3)
Call D2GSParserRoutine(Mid$(data, tmpSize + 1))
End If

If pSize <> &HFFFFFFFF And pSize <> &H0 Then

Select Case pid
  Case &H1
   pName = "Game acceptance??"
  Case &H51
   Dim objectType As Byte
   Dim ObjId As Long
   pName = "World object location"
   objectType = Asc(Mid$(data, 7, 1))
   ObjId = gdword(Mid$(data, 3, 4))
         AddChat &H80FF&, "World map info: Object type " & Hex(objectType)
    If objectType = &HB Then
              AddChat &H80FF&, "Stash found within 10 paces."
              ObjectId.Stash = ObjId
              InsertDWORD &H2
              InsertDWORD ObjectId.Stash
              D2GSSend (&H13)
              Call SendChat("Opened stash, ID = " & ObjectId.Stash, vbNullString, &H1)
    End If
  Case &H5A
   pName = "Player status"
   Dim pType As Byte
   Dim character As String
   p_data = Mid$(data, 2, pSize)
   pType = getBYTE
   character = getSTRING
    Select Case pType
     Case &H0
      AddChat &HA0522D, character & " has dropped due to timeout."
     Case &H2
      AddChat &HA0522D, character & " has joined our world. Diablo's minions grow stronger! Ahh!"
     Case &H3
      AddChat &HA0522D, character & " has left our world. Diablo 2 will be better off."
    End Select
  Case &H76
   pName = "Player location (World)"
  Case &H8B
   Dim playerID As Long
   Dim status As Byte
   pName = "Player relations"
   p_data = Mid$(data, 2, 5)
   playerID = getDWORD
   status = getBYTE
    Select Case status
     Case &H2
      AddChat vbGreen, "A player wishes to party with you."
      InsertBYTE &H8
      InsertDWORD playerID
      D2GSSend (&H5E)
     Case &H1
      AddChat vbGreen, "A player has joined a party."
     Case &H0
      AddChat vbGreen, "A player is not in a party."
            InsertBYTE &H6
      InsertDWORD playerID
      D2GSSend (&H5E)
    End Select
End Select

AddChat vbWhite, "Received packet: 0x" & Hex(pid) & " *" & pName & "*"
  lastPacketDump = Mid$(data, 1, pSize + 3)
Call D2GSParserRoutine(Mid$(data, pSize + 1))
End If

If pSize = 0 Then
  AddChat vbWhite, "Received invalid packet?: 0x" & Hex(pid)
  AddChat2 vbWhite, "Last packet dump: " & DebugOutput(lastPacketDump)
   AddChat2 vbWhite, "Dump: " & DebugOutput(data)
   Exit Sub
End If

End Sub
Any idea on a practical way of developing a parser for these packets? Most of the time the packets do not come with a length value within them, and those that don't are normally a set length. The problem with that is, it seems like one would need to know the sizes of all definite existing packets before writing a suitable parser to handle packets that have no length specifiers in them.

Any ideas? *frustrated*
Has anyone here ever received packet 0x37? It may have something to do with Diablo II if anyone has any insight.
At the moment, I have code down where I am assigning a value to a ListItem object that I recently added to the listview.

Dim curItem As ListItem
Set curItem = Form1.ListView1.ListItems.Add(, , product)

I did the same process to set a ListSubItem object to curItem's subitem.

Dim cursubItem As ListSubItem
Set cursubItem = Form1.ListView1.FindItem(curItem.Text, , curIndex).ListSubItems.Add(, , Username)

The purpose of this was to provide access to previously unexposed properties of a ListView's SubItem item, and to make accessing to the already exposed ones a little easier. Now comes the problem..

I've tried and tried to set the cursubItem value  to point to an item's SubItem already in the ListView. I either am doing something wrong or I suck at life. I guess I'm going about it the wrong way, can anyone offer insight as to how to assign an item's SubItem already in the ListView to a ListSubItem object?
I didn't know if this was the appropriate place to ask questions concerning a 3rd-party library, but I'll do so anyway in hopes of getting a response.

I'm using (obviously) the BNCSutil library for local hashing. I have gotten all the way (as long of a way as it is :P) to 0x29 (SID_LOGONRESPONSE). I figured that OLS is used here because I think only NLS is used for WAR3 and W3XP? Anyway, I used ready-made function doubleHashPassword, and yet the packet still will not send correctly. I've checked the other values in the packet and the length of the packet, and made sure the header was correct. I'm assuming this is this problem.

Public Sub bldLOGON()
Debug.Print "Preparing 0x29.."
InsertDWORD clnttoken
InsertDWORD AUTHINFO.srvtoken
InsertNonNTString doubleHashPassword(uconf.pass, clnttoken, AUTHINFO.srvtoken)
InsertSTRING uconf.user
Call tmpSend(&H29, buf)
End Sub

Both the ClientToken and ServerToken values are correct as I have used them in the previous packets. Is there anything else I'm missing here? *confused*.
Yoni's Math Forum / Zero product property
March 16, 2005, 08:40 PM
128x = 6x^2: Solve with the zero product property.

I am totally confused..
Yoni's Math Forum / Intersection Points
March 09, 2005, 06:51 PM
I'm trying to find points of intersection between a cubic function and a linear function...

Suppose I have cubic function y = (x-4)^3 and linear function y = x-4.
The graph shows that there are three points of intersection, one occurring at (4,0) and the other two off of the x and y axes.

How do I find the points of intersection for the ones not lying on the x or y axes?
I'm putting together a clientban moderation option, and I have checkboxes representing each client that can be banned.

Dim tmpString As String
If chkSEXP.value = vbChecked Then
tmpString = tmpString & "SEXP:"
End If
If chkSTAR.value = vbChecked Then
tmpString = tmpString & "STAR:"
End If
If chkD2DV.value = vbChecked Then
tmpString = tmpString & "D2DV:"
End If
If chkD2XP.value = vbChecked Then
tmpString = tmpString & "D2XP:"
End If
If chkW2BN.value = vbChecked Then
tmpString = tmpString & "W2BN:"
End If
If chkWAR3.value = vbChecked Then
tmpString = tmpString & "WAR3:"
End If
If chkW3XP.value = vbChecked Then
tmpString = tmpString & "W3XP:"
End If
tmpClients() = Split(tmpString, ":")
modOpts.cbClientList = Replace(tmpString, ":", "")

Here, I develope a string that contains all of the clients that the user wishes to ban. I then split up this string to an array by delimeter ":", and add them to the array tmpClients().

Now, at the form's load event I want to check each box that applies to a desired client to ban, but I do not want to set up several unnecessary control statements to do check each box that applies. So, I set up a simple For statement to cycle through the elements:

(On form load)
Dim i As Byte
For i = 0 To UBound(tmpClients) - 1
chk(tmpClients(i)).value = vbChecked
Next i

When I compile and test however, I get a "Sub or function not defined error". Obviously this is because it's trying to read chk as a function/sub named "chk()". Yet, I don't know any other way of appending the client ID to the end of "chk" so that it matches each CheckBox. (BTW, my checkboxes are named as chkSEXP, chkSTAR, etc.)

Any ideas?
Yoni's Math Forum / absolute value inequalites
October 21, 2004, 06:05 PM
I'm having trouble following procedure for solving absolute value inequalities.

e.g. | (( x + 5 ) / 3 ) | - 3 > 6

I proceded to set the inequality up as two inequalities..

(( x + 5) / 3 ) - 3 < -6   or  (( x + 5) / 3 ) - 3 > 6

I then solved accordingly...

(( x + 5) / 3 ) < -3   or  (( x + 5) / 3 ) > 9

(x + 5) < -9  or  (x + 5) > 27

x < -14  or  x > 22

Yet, this is wrong! I can't seem to figure out what I did wrong. Help please :(
Gaming Discussion / Grr {Ghost Recon ROAR}
October 10, 2004, 12:49 PM
Ok, this is getting a little old. I'm walking through let's say, Embassy. I have my rifle on burst, yet there is ALWAYS someone 2 feet from me who kills me yet I can never find them! Is there some sort of trick??