• Welcome to Valhalla Legends Archive.
 

[VB] Creating a account

Started by Dark-Feanor, April 13, 2003, 06:29 PM

Previous topic - Next topic

Dark-Feanor

How do you create an account using VB while using hash.dll and checkrevision.dll. A script would help very much. Thanks for any help.
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

Camel

Public Sub SendCreateAccount(UserName As String, password As String)
   Dim AccountHash As String
   AccountHash = CalcHashBuf(password)

   If Len(AccountHash) = 20 Then
       SendPacket &H3D, AccountHash & UserName & Chr(0)
   Else
       Addtext ColAnError, "Account creation failed for " & UserName & " (couldn't hash password)" & vbCrLf, True
   End If
End Sub


send it right after you get 0x51 response. the server will send you 0x3D back with a DWORD indicating if the account was created or not. 0 means sucessful, see bnetdocs for the other codes.

Camel

meh, i'm feeling generous

'Packet ID: 0x3D
'Direction: Server -> Client (Recieved)
'Format: (DWORD)      Status
'(STRING)         Account name suggestion
'Remarks: Account creation result.
'
'Result:
'0: Account created
'2: Name contained invalid characters
'3: Name contained a banned word
'4: Account already exists
'6: Name did not contain enough alphanumeric characters

dxoigmn

Quote from: DaRk-FeAnOr on April 13, 2003, 06:29 PM
How do you create an account using VB while using hash.dll and checkrevision.dll. A script would help very much. Thanks for any help.

If you're using my hash.dll, there is no function exported to do what you're asking.

SNiFFeR

Might want to use BnetAuth.dll  ::)