• Welcome to Valhalla Legends Archive.
 
Menu

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

Messages - Flame

#1
I'm guessing you forgot this part
frmMain.sckBNCS.GetData strTemp, vbString
#2
Battle.net Bot Development / Re:Ping Spam?
September 02, 2004, 04:40 PM
Quote from: UserLoser. on September 02, 2004, 02:15 PM
Looks like a broken data handler to me.

Sounds right to me, I had the same problem a few days ago.  I must have been passing the wrong data to my parsing module, so it recognized the packet as 0x25, and echoed it back.
#3
Visual Basic Programming / Re:unneeded posts
September 01, 2004, 09:31 PM
Maybe he'll stumble on an old post about not bringing up old posts, and *hopefully* will get the point, since he doesn't seem to do anything with new threads.
#4
I find that it's usually easier to understand, debug, and improve code that you actually wrote.

If/When you write your own command function, you're going to want to call it from the part of the BNCS 0x0F Packet called EID_TALK.  If you don't know how to handle the 0x0F packet, refer to The Botdev Site, and search for an 0x0F documentation if it's still there.  I'm sure there's also some information about 0x0F in the Botdev Reference Forum.
The best idea would be to call the StartCommands function with the proper arguements... and if you can't figure those out then I suggest you hit the books.
#5
Visual Basic Programming / Re:Timer
August 29, 2004, 06:00 PM

Declare Function SetTimer Lib "user32.dll" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Declare Function KillTimer Lib "user32.dll" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long

-hWnd = Window handle to use.
-nIDEvent = Event index.  Basically if you want to set multiple timers, you're going to want to use different IDEvent numbers, if you want to kill a timer, you need to use the IDEvent in which it was originally set with.
-uElapse = Time elapsed in MS.
-lpTimerFunc = Address of the routine to call once the timer has expired.

Public Sub Main()
    SetTimer frmMain.hWnd, 1, 100, AddressOf MySub
End Sub

Public Sub MySub
    Debug.Print "Hi!"
    KillTimer frmMain.hWnd, 1
End Sub


An additional note, you can also use SetTimer to change the interval on an existing timer.
#6
CheckRevision basically returns information from the hash files to be sent during 0x51, and they would be the 2nd and 3rd DWORDs.  The CheckRevision source is available at the Botdev Source Code Download page if you want to actually see how it works.

The decoded CdKey information is sent during 0x51 as: Product, CDKEY Value 1, and Hashed Key Data, which can be found in the below structure of 0x51 (courtesy of Bnetdocs :)).

[0x51 Sent]
(DWORD)       Client Token
(DWORD)       Version
(DWORD)       Checksum
(DWORD)       Number of keys in this packet
(BOOLEAN)        Using Spawn
-- For Each Key:
(DWORD)       Key Length
(DWORD)       Product
(DWORD)       CDKEY Value 1
(DWORD)       Unknown (0)
(DWORD[5])       Hashed Key Data
-- Continued...
(STRING)       Exe Information
(STRING)       CD Key owner name


The actual hashing however, is usually done with a few functions, if you're able to find the bnetauth source, it contains the functions required for hashing, as well as the CheckRevision.  If you use BNLS though, you're not going to have to worry about the actual hashing functions.
#7

Public Sub savefile(strFile As String, strData As String)
Dim hHandle As Long
Dim ofData As OFSTRUCT
Dim lngFilesize As Long
Dim lngRead As Long
Dim overlap As OVERLAPPED

   hHandle = OpenFile(fileDB, ofData, OF_WRITE)
   lngFilesize = GetFileSize(hHandle, 0)
   WriteFile hHandle, DBdata, Len(DBdata), lngRead, overlap
   CloseHandle hHandle
   
End Sub


Where does DBdata come from?  It looks to me like it should be strData
#8
Instead of just asking for a working example, try doing it yourself, and if you run into problems ask for help.  People will be more likely to help you with things that you've attempted, and can show that you've attempted, rather than just give out free code.  This has been discussed MANY times, so also try using the Search feature for help.
#9
PSCode is very useful for these types of things, try a search there.  Basically you just need to be good with using coordinates on a blank form, and using API calls to draw the objects, then implimenting events for the object.  Of course, it all depends on what the primary function of your object is.
#10
There's a few tutorials on PSCode which show how to actually make the tooltip which are helpful.  As far as applying the tooltip to a listview, the code UserLoser posted shows exactly how it is done, except for the LVHITTESTINFO, which can be found in This document which I found off of CodeGuru not long ago.  The article basically shows every step to making these tooltips.
#11
Just a guess here, but according to the function "A" found in bnetauth.dll, the second item should be the ServerKey:
rb = A(tempb, GetTickCount(), varPass)
The postition in which GetTickCount() is located, should be where the ServerKey is found, which is received during 0x50:
ServerKey& = Val("&h" & StrToHex(StrReverse(Mid$(strData, 9, 4))))
I'm not sure how important the ServerKey is, but it's the best thing I can come up with
#12
I'm not sure if this would give the same error as what you are saying, but make sure for the usercontrol that Public = True, I ran into that problem a few times.
#13
I have been looking around to find how I can make my controls have a Windows XP look to them by using a manifest file and a few lines of code, and so far this has been successful.  However I have encountered a problem, the caption for checkboxes and option buttons seems to not display.  I have seen this before in a few other programs, and I'm not sure if it's something with my computer, or a coding error of some sort.  I've been looking at this and it seems to be a problem with the forecolor, I am not sure what the coding problem could be (if it's even is a coding problem) but if it's needed, I can post the xml coding that I used in the manifest file.  I haven't seen this problem in any other controls yet, just checkboxes and option buttons, and I've tried using system colors for the forecolor, and any other colors, but nothing seems to work.

Edit: While tinkering with this it seems that the background and forecolor properties don't change at all and both remain black no matter what I had previously set the properties to be.  It only does this when I use the manifest file, but otherwise it appears fine.
#14
Visual Basic Programming / Re:Tool Tip text
May 05, 2004, 10:06 PM
Draw the list yourself, then add your own tooltip which can support multiple lines  ;D
#15
Battle.net Bot Development / Re:Newbie Question
April 26, 2004, 09:04 PM
I know of one written by Feanor:
http://www.chaosx.net/feanor/Sources/Packet%20Logging%20Tutorial.txt

I believe there are a few packet tutorials (not sure exactly what they're about) in the documents section of vL's bot development site:
http://botdev.valhallalegends.com/documents.asp