• Welcome to Valhalla Legends Archive.
 

Little Help...

Started by Mr.Sasquatch, November 15, 2003, 07:18 PM

Previous topic - Next topic

Mr.Sasquatch

Well...Im new with the whole bot making process...yet I know VB for the most part...Im readying Cupheads tutorial at http://cuphead.valhallalegends.com/tutorials/lesson1.htm and I get stumped there...At the bottom it says "When this is done, you're ready to go. Press the play button towards the top of the Visual Basic interface. (Figure 1.8) Check your home channel, because unless something went wrong... Your bot is there." Well I did everything on the page and I put the bot to go to channel bob and I went there but no bot...Any ideas, please dont be mad if it is very easy to figure out.

Dyndrilliac

Are you sure your cd key wasn't banned, or muted? That could be why.

In this case, "bob" would be a restricted channel, and your bot would not be allowed to enter.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Kp

1) Perform a /whois on your bot's name.  This will tell you if it succeeded in logging on.
2) Check that your BNLS authorization information was correct.
3) Check that you're on the right realm.  If you're on USEast and the bot connected to USWest...
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Dyndrilliac

#3
Please use code tags (I.E., "code" and "/code" with the [] around them) looking like so: Code that was [code-] Code [\code] where "\" = "/" and "-" = ""(Nothing)

Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Mr.Sasquatch

#4
Option Explicit
Public strUsername As String, strPassword As String, strHomeChannel As String, strServer As String, strCDKey As String, strRealm As String, strRealmChar As String, strProduct As String, strSend As String, mUsername As String
Private Sub CleanSlateBot1_BnetConnected()
AddChat vbGreen, "Connected to BNET!"
End Sub

Private Sub CleanSlateBot1_BnetConnecting()
AddChat vbYellow, "Connecting to BNET!"

End Sub

Private Sub CleanSlateBot1_BnetDisconnected()
AddChat vbRed, "Disconnected from BNET!"
End Sub

Private Sub CleanSlateBot1_BnetError(ErrorNumber As Integer, Description As String)
AddChat vbRed, "Error Number: " & Number & " Description: " & Description

End Sub

Private Sub CleanSlateBot1_BNLSAuthEvent(Success As Boolean)
If Success = True Then
   AddChat vbGreen, "BNLS Authorization Passed."
ElseIf Success = False Then
   AddChat vbRed, "BNLS Authorization Failed."
End If
End Sub

Private Sub CleanSlateBot1_BNLSConnected()
AddChat vbGreen, "Connected to BNLS!"
End Sub

Private Sub CleanSlateBot1_BNLSConnecting()
AddChat vbYellow, "Connecting to BNLS...."
End Sub

Private Sub CleanSlateBot1_BNLSDataError(Message As Byte)
If Message = 1 Then
   AddChat vbRed, "Bad CD key."
ElseIf Message = 2 Then
   AddChat vbRed, "Bad product version."
ElseIf Message = 3 Then
   AddChat vbRed, "Bad BNLS revision."
End If

End Sub

Private Sub CleanSlateBot1_BNLSDisconnected()
AddChat vbGreen, "Disconnected from BNLS"

End Sub

Private Sub CleanSlateBot1_BNLSError(ErrorNumber As Integer, Description As String)
AddChat vbRed, ErrorNumber & Description
End Sub

Private Sub CleanSlateBot1_LogonEvent(Message As Byte)
If Message = 0 Then
   AddChat vbRed, "Failed logon, account doesn't exist."
ElseIf Message = 1 Then
   AddChat vbRed, "Failed logon, bad password."
ElseIf Message = 2 Then
   AddChat vbGreen, "Successful logon."
ElseIf Message = 3 Then
   AddChat vbYellow, "Attempting to create the account."
ElseIf Message = 4 Then
   AddChat vbGreen, "Successfully created account."
End If

End Sub

Private Sub CleanSlateBot1_PasswordChange(Success As Boolean)
If Success = True Then
   AddChat vbGreen, "Password change successful."
ElseIf Success = False Then
   AddChat vbRed, "Password chage failed."
End If

End Sub

Private Sub CleanSlateBot1_VersionByte(VersionByte As Long)
AddChat vbYellow, "Version Byte: " & VersionByte

End Sub

Private Sub CleanSlateBot1_VersionCheck(Message As Byte, ExtraInfo As String)
If Message = 0 Then
       AddChat vbGreen, "Client version accepted!"
   ElseIf Message = 1 Then
       AddChat vbRed, "Version check failed! Bad version.. this message should not appear ever!"
   ElseIf Message = 2 Then
       AddChat vbGreen, "Version check passed!" & vbCrLf, vbRed, "CDKey invalid!"
   ElseIf Message = 3 Then
       AddChat vbRed, "Version check failed! BNLS has not been updated yet.."
   ElseIf Message = 4 Then
       AddChat vbGreen, "Version check passed!" & vbCrLf, vbRed, "Your CD-key is for another game."
   ElseIf Message = 5 Then
       AddChat vbGreen, "Version check passed!" & vbCrLf, vbRed, "Your CD-key is banned."
   ElseIf Message = 6 Then
       AddChat vbGreen, "Version check passed!" & vbCrLf, vbRed, "Your CD-key is currently in use."
   End If

End Sub

Private Sub Form_Load()
With CleanSlateBot1
   .BNLSBotID = "xxxx"
   .BNLSBotPassword = "xxxxx"
   .CDKey = "xxxxxxxx"
   .ChangePassword = False
   .Character = ""
   .HomeChannel = "ass"
   .LODKey = "AAAABBBBCCCCDDDD"
   .NewPassword = "None"
   .Password = "xxxxxx"
   .Product = "PXES"
   .Realm = "USEast"
   .Server = "useast.battle.net"
   .UseRealm = False
   .Username = "xxxxx"
   .UseUDP = False
End With
End Sub


[Edit: trimmed this post too, to try to make the thread not quite so horribly long.  Again, don't post lots of irrelevant functions.]

Dyndrilliac

#5
Are you aware that the cdkey is longer than the amount of X's you have down?

If your using SEXP(which it appears you are) the cd key should this long:

1234567891011

*Note: Incase your stupid, that key does not work :p
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Mr.Sasquatch

Yes like i said, Im using a good cd key and my account works fine...It just doesnt connect for some odd reason...

Dyndrilliac

Have you check to make your your Logon Procedures are correct?
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Mr.Sasquatch

What do you mean by that? The code looks good enough to connect with

Kp

First, don't post the entire source file.  Only post relevant pieces.  That said, your carelessness may have helped you.  In looking at your subroutines, I notice several of your if/elseif constructs don't have a terminating else.  That means, if the value is none of the ones you tested for, the function will return without doing anything -- meaning you don't know it was ever called.  Modify those functions (in particular, Vercheck/CDcheck) to output the numeric value with which they were called if none of the other checks get it (that is, "Else AddChat vbEww & errCode").
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Mr.Sasquatch

Can you maybe quote what needs to be changed and show me what to change it too? I know its asking alot but I would really appreciate it

Kp

Quote from: Mr.Sasquatch on November 15, 2003, 09:42 PM
Can you maybe quote what needs to be changed and show me what to change it too? I know its asking alot but I would really appreciate it
I could, but if you can't figure which subs are wrong from that description and the fact I pointed out a major one (Vercheck/CDcheck), I really don't think you should be doing this.  See my sig for details.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Mr.Sasquatch

#12
How about now?
Private Sub CleanSlateBot1_BnetConnected()
AddChat vbGreen, "Connected to BNET!"
End Sub

Private Sub CleanSlateBot1_BnetDisconnected()
AddChat vbRed, "Disconnected from BNET!"
End Sub

Private Sub CleanSlateBot1_BnetError(ErrorNumber As Integer, Description As String)
AddChat vbRed, "Error Number: " & Number & " Description: " & Description
End Sub

Private Sub CleanSlateBot1_BNLSAuthEvent(Success As Boolean)
If Success = True Then
   AddChat vbGreen, "BNLS Authorization Passed."
ElseIf Success = False Then
   AddChat vbRed, "BNLS Authorization Failed."
End If
End Sub

Private Sub CleanSlateBot1_BNLSConnected()
AddChat vbGreen, "Connected to BNLS!"
End Sub


Private Sub CleanSlateBot1_BNLSDataError(Message As Byte)
If Message = 1 Then
   AddChat vbRed, "Bad CD key."
ElseIf Message = 2 Then
   AddChat vbRed, "Bad product version."
ElseIf Message = 3 Then
   AddChat vbRed, "Bad NLS revision."
End If
End Sub

Private Sub CleanSlateBot1_BNLSDisconnected()
   AddChat vbRed, "Disconnected from BNLS."
End Sub

Private Sub CleanSlateBot1_BNLSError(ErrorNumber As Integer, Description As String)
   AddChat vbRed, ErrorNumber & Description
End Sub

Private Sub CleanSlateBot1_LogonEvent(Message As Byte)
If Message = 0 Then
   AddChat vbRed, "Failed logon, account doesn't exist."
ElseIf Message = 1 Then
   AddChat vbRed, "Failed logon, bad password."
ElseIf Message = 2 Then
   AddChat vbGreen, "Successful logon."
ElseIf Message = 3 Then
   AddChat vbYellow, "Attempting to create the account."
ElseIf Message = 4 Then
   AddChat vbGreen, "Successfully created account."
End If
End Sub

Private Sub CleanSlateBot1_VersionByte(VersionByte As Long)
   AddChat vbYellow, "Version Byte: " & VersionByte
End Sub

Private Sub CleanSlateBot1_VersionCheck(Message As Byte, ExtraInfo As String)
   Select Case Message
        Case 0:
        AddChat vbGreen, "Client version accepted!"
       Case 1:
       AddChat vbRed, "Version check failed! Bad version.. this message should not appear ever!"
   '...
End Select
End Sub


[Edit: trimmed out huge amounts of irrelevant code, after I told you not to post the entire source file.  Incidentally, you still didn't do what I suggested.]