• Welcome to Valhalla Legends Archive.
 

Revelation Bot!

Started by Joe[x86], December 27, 2005, 12:34 AM

Previous topic - Next topic

Joe[x86]

More pretty!

Public Function GetHashes(I As Integer)
    Select Case Product
        Case "DRTL"
            Select Case I
                Case 1: GetHashes = HashPath & "\diablo.exe"
                Case 2: GetHashes = HashPath & "\storm.dll"
                Case 3: GetHashes = HashPath & "\battle.snp"
            End Select
        Case "DRTL"
            Select Case I
                Case 1: GetHashes = HashPath & "\diablo_s.exe"
                Case 2: GetHashes = HashPath & "\storm.dll"
                Case 3: GetHashes = HashPath & "\battle.snp"
            End Select
        Case "STAR", "SEXP"
            Select Case I
                Case 1: GetHashes = HashPath & "\starcraft.exe"
                Case 2: GetHashes = HashPath & "\storm.dll"
                Case 3: GetHashes = HashPath & "\battle.snp"
            End Select
        Case "JSTR"
            Select Case I
                Case 1: GetHashes = HashPath & "\starcraft_j.exe"
                Case 2: GetHashes = HashPath & "\storm.dll"
                Case 3: GetHashes = HashPath & "\battle.snp"
            End Select
        Case "SSHR"
            Select Case I
                Case 1: GetHashes = HashPath & "\starcraft_s.exe"
                Case 2: GetHashes = HashPath & "\storm.dll"
                Case 3: GetHashes = HashPath & "\battle.snp"
            End Select
        Case "W2BN"
            Select Case I
                Case 1: GetHashes = HashPath & "\WarCraft II BNE.exe"
                Case 2: GetHashes = HashPath & "\storm.dll"
                Case 3: GetHashes = HashPath & "\battle.snp"
            End Select
        Case "D2DV", "D2XP"
            Select Case I
                Case 1: GetHashes = HashPath & "\Game.exe"
                Case 2: GetHashes = HashPath & "\Bnclient.dll"
                Case 3: GetHashes = HashPath & "\D2Client.dll"
            End Select
        Case "WAR3", "W3XP"
            Select Case I
                Case 1: GetHashes = HashPath & "\war3.exe"
                Case 2: GetHashes = HashPath & "\storm.dll"
                Case 3: GetHashes = HashPath & "\game.dll"
            End Select
    End Select
End Function
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Ringo

Try it this way, its much prettyer :)

Public Const CLIENT_PX3W& = &H57335850
Public Const CLIENT_3RAW& = &H57415233
Public Const CLIENT_PX2D& = &H44325850
Public Const CLIENT_VD2D& = &H44324456
Public Const CLIENT_PXES& = &H53455850
Public Const CLIENT_RATS& = &H53544152
Public Const CLIENT_LTRD& = &H4452544C
Public Const CLIENT_NB2W& = &H5732424E
Public Const CLIENT_RTSJ& = &H4A535452
Public Const CLIENT_RHSS& = &H53534852
Public Const CLIENT_RHSD& = &H44534852

Public Function FILE_EXE$(Client&)
Select Case Client
    Case CLIENT_3RAW, CLIENT_PX3W: FILE_EXE = "war3.exe"
    Case CLIENT_VD2D, CLIENT_PX2D: FILE_EXE = "game.exe"
    Case CLIENT_RTSJ: FILE_EXE = "starcraftj.exe"
    Case CLIENT_NB2W: FILE_EXE = "WarCraft II BNE.exe"
    Case CLIENT_LTRD: FILE_EXE = "diablo.exe"
    Case CLIENT_RHSD: FILE_EXE = "diablo_s.exe"
    Case Else: FILE_EXE = "starcraft.exe"
End Select
End Function
Public Function FILE_DLL$(Client&)
Select Case Client
    Case CLIENT_VD2D, CLIENT_PX2D: FILE_DLL = "bnclient.dll"
    Case Else: FILE_DLL = "storm.dll"
End Select
End Function
Public Function FILE_SNP$(Client&)
Select Case Client
    Case CLIENT_VD2D, CLIENT_PX2D: FILE_SNP = "d2client.dll"
    Case CLIENT_3RAW, CLIENT_PX3W: FILE_SNP = "game.dll"
    Case Else: FILE_SNP = "battle.snp"
End Select
End Function

l2k-Shadow

or the traditional way:

Public Sub GetHashes(ByRef GameEXE As String, ByRef BnetDLL As String, ByRef GameDLL As String)
    Dim HashPath As String
        HashPath = App.Path & "\Hashes\" & Product
    Select Case Product
        Case "DRTL"
            GameEXE = HashPath & "\diablo.exe"
            BnetDLL = HashPath & "\storm.dll"
            GameDLL = HashPath & "\battle.snp"
        Case "STAR", "SEXP"
            GameEXE = HashPath & "\starcraft.exe"
            BnetDLL = HashPath & "\storm.dll"
            GameDLL = HashPath & "\battle.snp"
        Case "JSTR"
            GameEXE = HashPath & "\starcraft_j.exe"
            BnetDLL = HashPath & "\storm.dll"
            GameDLL = HashPath & "\battle.snp"
        Case "SSHR"
            GameEXE = HashPath & "\starcraft_s.exe"
            BnetDLL = HashPath & "\storm.dll"
            GameDLL = HashPath & "\battle.snp"
        Case "W2BN"
            GameEXE = HashPath & "\WarCraft II BNE.exe"
            BnetDLL = HashPath & "\storm.dll"
            GameDLL = HashPath & "\battle.snp"
        Case "D2DV"
            GameEXE = HashPath & "\Game.exe"
            BnetDLL = HashPath & "\Bnclient.dll"
            GameDLL = HashPath & "\D2Client.dll"
        Case "D2XP"
            'Remember D2XP and D2DV use DIFFERENT hashes
            GameEXE = HashPath & "\Game.exe"
            BnetDLL = HashPath & "\Bnclient.dll"
            GameDLL = HashPath & "\D2Client.dll"
        Case "WAR3", "W3XP"
            GameEXE = HashPath & "\war3.exe"
            BnetDLL = HashPath & "\storm.dll"
            GameDLL = HashPath & "\game.dll"
    End Select
End Sub
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

dxoigmn

Why not just let the user specify the files?

Yegg

Quote from: dxoigmn on December 29, 2005, 01:21 PM
Why not just let the user specify the files?

Maybe they set up defaults while also giving the user the power to modify these paths?

LordNevar

Quote from: dxoigmn on December 29, 2005, 01:21 PM
Why not just let the user specify the files?

Agree.
Create a browse function, this way if the user has the game they can just use the hashes in the program directory instead of manually copying them out. If they actually use the game than they will always have up-to-date hashes.

A good fortune may forbode a bad luck, which may in turn disguise a good fortune.
The greatest trick the Devil ever pulled, was convincing the world he didn't exsist.

shout

You could have it search the registry for installed clients.

Networks

Or set raw files and let the user specify a directory. $dir could be app.path, this is what I do.

Joe[x86]

Because, would your little sister know how? =)

I've revised AuthEvent and LogonEvent, while implementing them.

AUTHEVENT
DATA1  DATA2  MEANING
0x01   Any    Requesting authorization
0x02   Any    Authorization challenged
0x03   Any    Answering challenge
0x04   0x01   Passed challenge
0x04   0x02   CDKey failed
0x04   0x03   CDKey2 failed

LOGONEVENT
DATA1  DATA2  MEANING
0x01   Any    Sent login request
0x02   Any    Login request denied
0x03   Any    Login request accepted





Networks, if I understand what you're saying, thats what I'm doing. I have a hashpath box in the configuration, which defaults to . (period, points to current directory).
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

MyndFyre

Quote from: Joe on December 30, 2005, 05:41 AM
Because, would your little sister know how? =)

So have defaults and allow power users to set them however they want.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.