Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: AnThRaX-SOI on April 23, 2003, 12:35 AM

Title: CleanSlateBot.OCX
Post by: AnThRaX-SOI on April 23, 2003, 12:35 AM
Yea yea I know this is a cheap way to make a bot but until I learn more I'm going to use it... I re-created my old BNLS bot and got everything going... I try to connect and it connects to bnls and then pops up an error msgbox and says "Invalid Version" and then it gives me this....
"[1:34:33 AM] Battle.net Logon Server Authorization Successful.
[1:34:33 AM] Connecting to Battle.net...
[1:34:33 AM] A Battle.net Error has occured: 10049 Address is not available from the local machine"

Can anyone explain this or has anyone had the same problem?
Title: Re:CleanSlateBot.OCX
Post by: CupHead on April 23, 2003, 09:03 AM
Read the documentation on what to set the Product property to.
Title: Re:CleanSlateBot.OCX
Post by: AnThRaX-SOI on April 23, 2003, 10:23 AM
Ok, I'll just post my code because it's all set correctly and since CleanSlateBot.OCX is posted for dl and use I will just show my code... I changed a few things and now it won't even try to connect... I'll just post the code for my entire Main.frm.


Private Sub BNLS_BnetConnected()
AddChat vbGreen, "Connected to Battle.net."
End Sub

Private Sub BNLS_BnetConnecting()
AddChat vbGreen, "Connecting to Battle.net..."
End Sub

Private Sub BNLS_BnetDisconnected()
AddChat vbRed, "Disconnected from Battle.net."
End Sub

Private Sub BNLS_BnetError(ErrorNumber As Integer, Description As String)
AddChat vbRed, "A Battle.net Error has occured: " & ErrorNumber & " " & Description
End Sub

Private Sub BNLS_BNLSAuthEvent(Success As Boolean)
If Success = True Then AddChat vbGreen, "Battle.net Logon Server Authorization Successful."
If Success = False Then AddChat vbRed, "Battle.net Logon Server BotID/Password was rejected!"
End Sub

Private Sub BNLS_BNLSConnected()
AddChat vbGreen, "Connected to Battle.net Logon Server."
End Sub

Private Sub BNLS_BNLSConnecting()
AddChat vbGreen, "Connecting to Battle.net Logon Server..."
End Sub

Private Sub BNLS_BNLSDataError(Message As Byte)
AddChat vbRed, Message
End Sub

Private Sub BNLS_BNLSDisconnected()
AddChat vbRed, "Disconnected from Battle.net Logon Server."
End Sub

Private Sub BNLS_BNLSError(ErrorNumber As Integer, Description As String)
AddChat vbRed, "A Battle.net Logon Server Error has occured: " & ErrorNumber & " " & Description
End Sub

Private Sub BNLS_JoinedChannel(ByVal ChannelName As String, ByVal Flags As Long, SimulatedEvent As Boolean)
AddChat vbBlue, "Joined channel " & ChannelName & " with the flag(s) of " & Flags
End Sub

Private Sub BNLS_LoggedOnAs(Username As String, Product As String)
AddChat vbYellow, "Logged on as " & Username & " with " & Product
End Sub

Private Sub BNLS_LogonEvent(Message As Byte)
If Message = 0 Then AddChat vbRed, "Logon Failed: Account doesn't exist."
If Message = 1 Then AddChat vbRed, "Logon Failed: Incorrect password."
If Message = 2 Then AddChat vbGreen, "Logon Successful."
If Message = 3 Then AddChat vbBlue, "Attempting to create the account."
If Message = 4 Then AddChat vbBlue, "Account Creation Successful."
End Sub

Private Sub BNLS_ServerError(ByVal Message As String, SimulatedEvent As Boolean)
AddChat vbRed, "A server error has occured: " & Message
End Sub

Private Sub BNLS_ServerInfo(ByVal Message As String, SimulatedEvent As Boolean)
AddChat vbYellow, "Server Info: " & Message
End Sub

Private Sub BNLS_UserEmote(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, SimulatedEvent As Boolean)
AddChat vbYellow, "<" & Username & " " & Message & ">"
End Sub

Private Sub BNLS_UserInChannel(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean)
AddChat vbYellow, Username & " [" & Flags & "] " & "is in the channel with " & Product & "with a ping of [" & Ping & "]."
End Sub

Private Sub BNLS_UserJoins(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, SimulatedEvent As Boolean)
AddChat vbGreen, Username & " has joined the channel using " & Product & " with a ping of [" & Ping & "]."
End Sub

Private Sub BNLS_UserLeaves(ByVal Username As String, ByVal Flags As Long, SimulatedEvent As Boolean)
AddChat vbgreed, Username & " has left the channel."
End Sub

Private Sub BNLS_UserTalk(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
AddChat vbWhite, "<", vbCyan, Username, vbWhite, ">" & Message
End Sub

Private Sub BNLS_WhisperFromUser(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, SimulatedEvent As Boolean)
AddChat vbCyan, "<From:" & Username & "> ", vbGrey, Message
End Sub

Private Sub BNLS_WhisperToUser(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
AddChat vbCyan, "<To:" & Username & "> ", vbGrey, Message
End Sub

Private Sub Form_Load()
g_strUsername = ReadINI("SOIBBot Config", "Username", FixPath(App.Path) & "Config.ini")
g_strPassword = ReadINI("SOIBBot Config", "Password", FixPath(App.Path) & "Config.ini")
g_strHomeChannel = ReadINI("SOIBBot Config", "Home Channel", FixPath(App.Path) & "Config.ini")
g_strClient = ReadINI("SOIBBot Config", "Client", FixPath(App.Path) & "Config.ini")
g_strServer = ReadINI("SOIBBot Config", "Server", FixPath(App.Path) & "Config.ini")
g_strCDKey = ReadINI("SOIBBot Config", "CD-Key", FixPath(App.Path) & "Config.ini")
   
With BNLS
.BNLSBotID = "*****"
.BNLSBotPassword = "*****"
.UseUDP = True
.Username = g_strUsername
.Password = g_strPassword
.HomeChannel = g_strHomeChannel
.Product = g_strClient
.Server = g_strServer
.CDKey = g_strCDKey
End With

Load Config
End Sub

Private Sub Form_Unload(Cancel As Integer)
Unload Config
End Sub

Private Sub mnuFile_Click()
If BNLS.Connected Then
mnuConnect.Enabled = False
mnuDisconnect.Enabled = True
mnuReconnect.Enabled = True
Else
mnuConnect.Enabled = True
mnuDisconnect.Enabled = False
mnuReconnect.Enabled = False
End If
End Sub

Private Sub mnuConnect_Click()
BNLS.Connect
End Sub

Private Sub mnuDisconnect_Click()
BNLS.Disconnect
End Sub

Private Sub mnuReconnect_Click()
mnuConnect_Click
End Sub

Private Sub mnuSetup_Click()
Config.Show
End Sub


Can anyone find what's wrong? I can't and I've messed with it for hours so that means it's just something simple I know it is!
Title: Re:CleanSlateBot.OCX
Post by: Tazo on April 23, 2003, 10:39 AM
Wheres BNLS.Accept? ^^
Title: Re:CleanSlateBot.OCX
Post by: AnThRaX-SOI on April 23, 2003, 10:43 AM
Well I just realized that the newest OCX build is up for download but CupHead's readme is still linked to the old OCX's readme, it'd probably help if I had a link to the newest readme.

And I was under the impression that .Accept wasn't any longer needed because it's public.
Title: Re:CleanSlateBot.OCX
Post by: Yoni on April 23, 2003, 10:44 AM
Quote from: AnThRaX-SOI on April 23, 2003, 10:43 AMAnd I was under the impression that .Accept wasn't any longer needed because it's public.
It's still needed even though it's public. Someone other than me knows the value.
Title: Re:CleanSlateBot.OCX
Post by: Tazo on April 23, 2003, 10:51 AM
The documentation for the newer CSB can be found here (http://cuphead.valhallalegends.com/ocx.htm). Enjoy.

p.s.
Quote
Example: CleanSlateBot1.Accept = 579728
Title: Re:CleanSlateBot.OCX
Post by: AnThRaX-SOI on April 23, 2003, 10:56 AM
Ok thanks guys! But now there is something else wrong lol...

[11:54:19 AM] Connecting to Battle.net Logon Server...
[11:54:20 AM] Connected to Battle.net Logon Server.
[11:54:20 AM] Battle.net Logon Server Authorization Successful.
[11:54:20 AM] Connecting to Battle.net...
[11:54:20 AM] Connected to Battle.net.
[11:54:21 AM] Disconnected from Battle.net Logon Server.
[11:54:21 AM] Disconnected from Battle.net.

That's what I am getting now.
Title: Re:CleanSlateBot.OCX
Post by: Tazo on April 23, 2003, 11:07 AM
Bad logins is my guess
Title: Re:CleanSlateBot.OCX
Post by: ______ on April 23, 2003, 11:14 AM
my guess is you supllied an invalid key.
<edit> and or you have a space after the cd-key. </edit>
Title: Re:CleanSlateBot.OCX
Post by: AnThRaX-SOI on April 23, 2003, 11:14 AM
Quote from: laurion on April 23, 2003, 11:07 AM
Bad logins is my guess

It's not a bad login, I use the account all the time.
Title: Re:CleanSlateBot.OCX
Post by: UnBearAble on April 23, 2003, 11:18 AM
You said " I changed a few things and now it won't even try to connect "

Well If it worked b4 you changed things... You found the problem. Next time change 1 word, then try, etc etc.
Title: Re:CleanSlateBot.OCX
Post by: tA-Kane on April 23, 2003, 02:58 PM
Quote from: UnBearAble on April 23, 2003, 11:18 AMChange 1 word, then try, etc etc.
Quote from: Grok on April 22, 2003, 12:15 PMIf it compiles and runs today, it's all they need or care about, right?
Title: Re:CleanSlateBot.OCX
Post by: Banana fanna fo fanna on April 23, 2003, 06:25 PM
+1 to Kane for having a leet avatar.
Title: Re:CleanSlateBot.OCX
Post by: tA-Kane on April 23, 2003, 08:17 PM
Quote from: St0rm.iD on April 23, 2003, 06:25 PM+1 to Kane for having a leet avatar.
-1 to St0rm for not liking Karma.
Title: Re:CleanSlateBot.OCX
Post by: Mesiah / haiseM on April 24, 2003, 12:11 AM
+1 to kane for having a funny personal text and the picture/word/byte thing in signature
+1 to st0rm for having a not so funny personal text.
Title: Re:CleanSlateBot.OCX
Post by: Camel on April 24, 2003, 11:33 AM
meh, that's a pretty bad joke. not to mention it's older than windows.
Title: Re:CleanSlateBot.OCX
Post by: tA-Kane on April 24, 2003, 01:03 PM
Quote from: Camel on April 24, 2003, 11:33 AMmeh, that's a pretty bad joke.
Shush, you! :P
Title: Re:CleanSlateBot.OCX
Post by: Camel on April 24, 2003, 01:11 PM
hey, can we stop giving camel -1 for being a jerk?  :'(

[edit] and wasn't ANSI a dos/win9x driver for adding color to dos prompts? and isn't kane a mac freak?
Title: Re:CleanSlateBot.OCX
Post by: tA-Kane on April 24, 2003, 01:15 PM
Quote from: Camel on April 24, 2003, 01:11 PMwasn't ANSI a dos/win9x driver for adding color to dos prompts?
I don't know... but ANSI to me is a bunch of standard libraries for C (eg, ANSI C).
Quote from: Camel on April 24, 2003, 01:11 PMisn't kane a mac freak?
I wouldn't call myself a "freak"... but I suppose you could sum myself up like that.
Title: Re:CleanSlateBot.OCX
Post by: Skywing on April 24, 2003, 02:57 PM
Quote from: Camel on April 24, 2003, 01:11 PM
hey, can we stop giving camel -1 for being a jerk?  :'(

[edit] and wasn't ANSI a dos/win9x driver for adding color to dos prompts? and isn't kane a mac freak?

Umm.. No.  ANSI is the American National Standards Institute.
Title: Re:CleanSlateBot.OCX
Post by: iago on April 24, 2003, 03:48 PM
That's like saying that GNU is Unix!
(if you don't get the joke, go here (http://www.acronymfinder.com/af-query.asp?p=dict&String=exact&Acronym=GNU))
Title: Re:CleanSlateBot.OCX
Post by: Camel on April 24, 2003, 07:22 PM
Quote from: iago on April 24, 2003, 03:48 PM
That's like saying that GNU is Unix!
(if you don't get the joke, go here (http://www.acronymfinder.com/af-query.asp?p=dict&String=exact&Acronym=GNU))

no, it isn't!
what's with all the jokes from 1990 lately?
Title: Re:CleanSlateBot.OCX
Post by: Banana fanna fo fanna on April 24, 2003, 07:58 PM
+1 to Kane for giving me less karma.