Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: LizArD on August 28, 2004, 04:22 PM

Title: CSB Question
Post by: LizArD on August 28, 2004, 04:22 PM
*Waits for laughs and giggles to this thread*

Anyway..

I've done everything that I have should for installing CSB to the bot, and getting it to connect, however I believe I have the wrong version of CSB. For some reason it does say "[5:20:55 PM] Version check failed, bad version." however I dont believe that is a problem with CSB... A wrong game version? Im beat. cuphead.valhallalegends.com is down so I really cant check there. And the bot does connect to bnet and bnls

[5:20:54 PM] Connecting To BNLS
[5:20:54 PM] Connected To BNLS
[5:20:55 PM] Loging in BNLS
[5:20:55 PM] Connecting To useast.battle.net
[5:20:55 PM] Connected to useast.battle.net
[5:20:55 PM] Version check failed, bad version.

i've tried diablo2, starcraft, and broodwar. All the same message. Anyone got a clue?
Title: Re:CSB Question
Post by: Kp on August 28, 2004, 04:25 PM
Yes.  You're probably passing the wrong parameters to BNLS, resulting in it giving you a bad answer.
Title: Re:CSB Question
Post by: LordNevar on August 28, 2004, 04:28 PM
I'm curious to know how he's connecting to BNLS if it's unreacheable.
Title: Re:CSB Question
Post by: Meh on August 28, 2004, 04:31 PM
chances are your product codes are the wrong way round

Starcrat = RATS
Warcraft 2 = NB2W

ETC
Title: Re:CSB Question
Post by: UserLoser. on August 28, 2004, 04:54 PM
Quote from: LordNevar on August 28, 2004, 04:28 PM
I'm curious to know how he's connecting to BNLS if it's unreacheable.

Using www.valhallalegends.com works fine as BNLS server.
Title: Re:CSB Question
Post by: LordNevar on August 28, 2004, 05:03 PM
Well don't I feel like an idiot.  ::)
Title: Re:CSB Question
Post by: LizArD on August 28, 2004, 05:09 PM
Public msChannelName As String
Public ver As String
Public Nick As String
Public formwidth As Long
Public formheight As Long


Private Sub CleanSlateBot1_BnetConnected()
addText "Connected to " & CleanSlateBot1.Server, vbGreen
End Sub

Private Sub CleanSlateBot1_BnetConnecting()
addText "Connecting To " & CleanSlateBot1.Server, vbGreen

End Sub

Private Sub CleanSlateBot1_BnetDisconnected()
addText "Disconnected From " & CleanSlateBot1.Server, vbRed

End Sub

Private Sub CleanSlateBot1_BnetError(ErrorNumber As Integer, Description As String)
addText "ERROR B.NET: " & Description, vbRed

End Sub

Private Sub CleanSlateBot1_BNLSAuthEvent(Success As Boolean)
If Success Then
addText "Loging in BNLS", vbYellow
Else
addText "Unable To Login BNLS", vbYellow
End If
End Sub

Private Sub CleanSlateBot1_BNLSConnected()
addText "Connected To BNLS", vbYellow

End Sub

Private Sub CleanSlateBot1_BNLSConnecting()
addText "Connecting To BNLS", vbYellow

End Sub

Private Sub CleanSlateBot1_BNLSDisconnected()
addText "Disconnected From BNLS", vbRed

End Sub

Private Sub CleanSlateBot1_BNLSError(ErrorNumber As Integer, Description As String)
addText "ERROR BNLS: " & Description, vbRed

End Sub

Private Sub CleanSlateBot1_JoinedChannel(ByVal ChannelName As String, ByVal flags As Long, SimulatedEvent As Boolean)
msChannelName = ChannelName
frmMain.RoomList.ListItems.Clear
addText "Joined channel " & ChannelName & vbCrLf, vbYellow
End Sub


Private Sub CleanSlateBot1_LoggedOnAs(Username As String)
addText "Logged On As " & Username, vbGreen
Nick = Username
Me.Caption = "Blah " & ver & " - By: Blah" & " >> Connected [ Username: " & Username & ", Server: " & CleanSlateBot1.Server & " ]"
End Sub

Private Sub CleanSlateBot1_LogonEvent(Message As Long)

If Message = "0" Then addText "Failed logon, account doesn't exist.", vbRed
If Message = "1" Then addText "Failed logon, bad password.", vbRed
If Message = "2" Then addText "Successful logon.", vbGreen
If Message = "3" Then addText "Attempting to create the account.", vbGreen
If Message = "4" Then addText "Successfully created account.", vbGreen

End Sub

Private Sub CleanSlateBot1_ServerError(ByVal Message As String, SimulatedEvent As Boolean)
addText "Error: " & Message, vbRed

End Sub

Private Sub CleanSlateBot1_ServerInfo(ByVal Message As String, SimulatedEvent As Boolean)
addText "Info: " & Message, vbYellow

End Sub

Private Sub CleanSlateBot1_UserInChannel(ByVal Username As String, ByVal flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, SimulatedEvent As Boolean)
 Dim Icon As Integer
 Icon = GetIconCode(Product, flags)


   frmMain.RoomList.ListItems.Add , , Username, , Icon
   frmMain.RoomList.ListItems(frmMain.RoomList.ListItems.Count).ListSubItems.Add , , , Module1.GetLagIcon(Ping, flags)
   frmMain.RoomList.ListItems(frmMain.RoomList.ListItems.Count).ListSubItems.Add , , Ping

frmMain.text1.Text = msChannelName & " [" & frmMain.RoomList.ListItems.Count & "]"

   'addText Username & "Is Here, With the Ping of " & Ping & " has joined using " & Message & vbCrLf, vbGreen

End Sub

Private Sub CleanSlateBot1_UserJoins(ByVal Username As String, ByVal flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, SimulatedEvent As Boolean)
 Dim Icon As Integer
 Icon = GetIconCode(Product, flags)

   frmMain.RoomList.ListItems.Add , , Username, , Icon
   frmMain.RoomList.ListItems(frmMain.RoomList.ListItems.Count).ListSubItems.Add , , , Module1.GetLagIcon(Ping, flags)
   frmMain.RoomList.ListItems(frmMain.RoomList.ListItems.Count).ListSubItems.Add , , Ping

frmMain.text1.Text = msChannelName & " [" & frmMain.RoomList.ListItems.Count & "]"

   addText Username & "Has joined the channel, With the Ping of " & Ping & " has joined using " & Message & vbCrLf, vbGreen

End Sub

Private Sub CleanSlateBot1_UserLeaves(ByVal Username As String, ByVal flags As Long, SimulatedEvent As Boolean)
On Error Resume Next
frmMain.RoomList.ListItems.Remove frmMain.RoomList.FindItem(Username).Index
addText Username & " has left the channel" & vbNewLine, &H80000003
End Sub

Private Sub CleanSlateBot1_UserTalk(ByVal Username As String, ByVal flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
AddChat vbWhite, "<", vbYellow, Username, vbWhite, "> ", vbWhite, Message & vbCrLf, vbWhite
End Sub

Private Sub CleanSlateBot1_VersionCheck(Message As Long)

If Message = "0" Then addText "Version check and CD-Key check passed. ", vbGreen
If Message = "1" Then addText "Version check failed, bad version.", vbRed
If Message = "2" Then addText "CD-Key check failed, bad key.", vbRed
If Message = "3" Then addText "Version check failed, need updated hashes.", vbRed
If Message = "4" Then addText "CD-Key check failed, key is for another game.", vbRed
If Message = "5" Then addText "CD-Key check failed, key is banned.", vbRed
If Message = "6" Then addText "CD-Key check failed, key is in use.", vbRed

End Sub

Private Sub Form_Load()
ver = App.Major & "." & App.Revision
   formwidth = frmMain.Width
   formheight = frmMain.Height
   Me.Caption = "Blah " & ver & " - By: blah >> Disconnected"
End Sub

Private Sub Form_Resize()
On Error Resume Next

   Dim CWIDTH As Long
   Dim CHeight As Long
   
   If frmMain.WindowState = 2 Or frmMain.WindowState = 0 Then
   CWIDTH = frmMain.Width - formwidth
   CHeight = frmMain.Height - formheight
   
   txtRecieve.Width = txtRecieve.Width + CWIDTH
   txtRecieve.Height = txtRecieve.Height + CHeight

   text1.Left = text1.Left + CWIDTH
   
   RoomList.Height = RoomList.Height + CHeight
   RoomList.Left = RoomList.Left + CWIDTH

   txtSend.Width = txtSend.Width + CWIDTH
   txtSend.Top = txtSend.Top + CHeight
   
   formwidth = frmMain.Width
   formheight = frmMain.Height
   
   End If
End Sub

Private Sub mnuConnect_Click()
On Error GoTo Disconnect
CleanSlateBot1.BNLSBotID = ""
CleanSlateBot1.BNLSBotPassword = ""
CleanSlateBot1.CDKey = "KEY"
CleanSlateBot1.Product = "RATS"
CleanSlateBot1.HomeChannel = "Op Abyss"
CleanSlateBot1.Password = "pw"
CleanSlateBot1.Username = "name"
CleanSlateBot1.NewPassword = "bleh"
CleanSlateBot1.ChangePassword = False
CleanSlateBot1.Server = "useast.battle.net"
CleanSlateBot1.Accept = -65
CleanSlateBot1.Connect

Dim Connected As String
Connected = CleanSlateBot1.Connected
Exit Sub
Disconnect:
CleanSlateBot1.Disconnect
Me.Caption = "Blah " & ver & " - By: Blah >> Disconnected"
End Sub



Private Sub mnuDisconnect_Click()
CleanSlateBot1.Disconnect
Me.Caption = "Blah " & ver & " - By: Blah >> Disconnected"
End Sub

Private Sub txtSend_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
CleanSlateBot1.Send txtSend.Text
AddChat vbWhite, "<", vbCyan, Nick, vbWhite, "> ", vbWhite, txtSend.Text & vbCrLf, vbWhite
   KeyAscii = 0
   txtSend.Text = ""
End If
End Sub



I do believe there is an updated version, however.. this should work still..
Title: Re:CSB Question
Post by: Meh on August 28, 2004, 05:14 PM
your accept is wrong. use the search function it there somewhere.
Title: Re:CSB Question
Post by: LizArD on August 28, 2004, 05:17 PM
CleanSlateBot1.Accept = -65

correct?
Title: Re:CSB Question
Post by: Meh on August 28, 2004, 05:18 PM
Wrong the accept value is 579728(positive as in + not -65 thats old)
Title: Re:CSB Question
Post by: LizArD on August 28, 2004, 05:22 PM
Quote from: ChRoNiC on August 28, 2004, 05:18 PM
Quote from: LizArD on August 28, 2004, 05:17 PM
CleanSlateBot1.Accept = -65

correct?

Quote from: Meh on August 28, 2004, 05:14 PM
your accept is wrong. use the search function it there somewhere.

No it's incorrect !!


sorry to confuse u, I was just wondering if that was the right part of code, I obviously knew the number was wrong.
Title: Re:CSB Question
Post by: Meh on August 28, 2004, 05:23 PM
OK, did it work?
Title: Re:CSB Question
Post by: LizArD on August 28, 2004, 05:23 PM
I updated it so it is now

CleanSlateBot1.Accept = "579728"

and now when i press connect it does.. well nothing
Title: Re:CSB Question
Post by: Meh on August 28, 2004, 05:27 PM
Where does it stop. If its stoping at connecting to BNLS then it wont work as BNLS is down.
Title: Re:CSB Question
Post by: ChR0NiC on August 28, 2004, 05:28 PM
Quote from: LizArD on August 28, 2004, 05:23 PM
I updated it so it is now

CleanSlateBot1.Accept = "579728"

and now when i press connect it does.. well nothing

Don't put the Accept in quotes.
Title: Re:CSB Question
Post by: LizArD on August 28, 2004, 05:28 PM
no, it doesn't do ANYTHING it doesn't even start to connect, aka when i hit connect, the screen does not move
Title: Re:CSB Question
Post by: LordNevar on August 28, 2004, 05:31 PM
But as "Userloser" pointed out you can use www.valhallalegends.com, if you use that than you can connect, I just updated my bot by adding bnls server selection, and It's working just fine now.
Title: Re:CSB Question
Post by: Meh on August 28, 2004, 05:33 PM
You may want to change the OCX then to Chronics as he "May" give u support on it, where as cuphead is possibly still banged up and there is no support. If your worried about changing loads of code then just use find and replace function.
Title: Re:CSB Question
Post by: LordNevar on August 28, 2004, 05:33 PM
That's cause you don't have BNLS Error controls, which means you don't see the response that BNLS conection refused, or whatever the error is.
Title: Re:CSB Question
Post by: LizArD on August 28, 2004, 05:35 PM
yes but shouldn't it even make a peep of action when you click connect.. It should of said "trying to connect to bnet" then bnls etc ? =(


--- where would I get chr0nics ?
Title: Re:CSB Question
Post by: Meh on August 28, 2004, 05:37 PM
Try not having the accept value.
CleanSlateBot1.CDKey = "KEY"
CleanSlateBot1.Product = "RATS"
CleanSlateBot1.HomeChannel = "Op Abyss"
CleanSlateBot1.Password = "pw"
CleanSlateBot1.Username = "name"
CleanSlateBot1.Server = "useast.battle.net"
CleanSlateBot1.Connect

That may be all you need. Worked for me when I used CSB.

His topic is in the trash can. Its most updated I think. There is a link to his site.
Title: Re:CSB Question
Post by: LizArD on August 28, 2004, 05:43 PM
still nothing when I remove the 'accept' it seems like it only likes the "-65" version because when I but it back at that, it shows it connecting, just not with the other.
Title: Re:CSB Question
Post by: Meh on August 28, 2004, 05:44 PM
try just using what i suggested above.
Title: Re:CSB Question
Post by: LizArD on August 28, 2004, 05:46 PM
still nothing, think we can talk in bnet? getting annoying refreshing every 10 seconds =\ acctname Matthew channel im in, matthew =o
Title: Re:CSB Question
Post by: FrOzeN on August 29, 2004, 12:08 AM
just tested this and works fine:
   With CleanSlateBot1
       .Disconnect
       .Accept = 579728
       .CDKey = "KEY"
       .HomeChannel = "Clan Fa"
       .Password = "PASS"
       .Product = "PXES"
       .Server = "uswest.battle.net"
       .Username = "USER"
       .Connect
   End With


also remove this its a pointless sub
Private Sub CleanSlateBot1_BNLSDisconnected()
addText "Disconnected From BNLS", vbRed
End Sub
Title: Re:CSB Question
Post by: Warrior on August 29, 2004, 12:40 AM
He could want it to show that BNLS disengaged after connecting to Battle.net I find it useful.
Title: Re:CSB Question
Post by: LordNevar on August 29, 2004, 08:01 AM
What version of CSB are you using?????
Title: Re:CSB Question
Post by: LizArD on August 29, 2004, 01:45 PM

Private Sub CleanSlateBot1_LoggedOnAs(Username As String)
addText "Logged On As " & Username, vbGreen
Nick = Username
Me.Caption = "blahblah " & ver & " - By: blah" & " >> Connected [ Username: " & Username & ", Server: " & CleanSlateBot1.Server & " ]"
End Sub


highlights
Private Sub CleanSlateBot1_LoggedOnAs(Username As String)

compile error saying:

"Proedure declaration does not match description of the event or procedure having the same name"

anyone?