• Welcome to Valhalla Legends Archive.
 

Connection help

Started by Daniel, December 29, 2003, 04:54 PM

Previous topic - Next topic

Daniel

i dont know if its my bnls id or if i did something wrong but it will go
"Attempting Connection To Battle.Net"
then just idle, any ideas ?

Kp

Quote from: Daniel on December 29, 2003, 04:54 PM
i dont know if its my bnls id or if i did something wrong but it will go
"Attempting Connection To Battle.Net"
then just idle, any ideas ?

Yes.  I think you should provide more information.

First, we aren't a product support site.  If this is someone else's client giving you trouble, go ask them about it.  If this is your program, you need to post a lot more information: when you got your BNLS ID, how you're connecting, what language, and preferably specifically what message causes you to halt.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Daniel

#2

Private Sub mnuConnect_Click()
If CleanSlateBot1.Connected = True Then
   CleanSlateBot1.Disconnect
   GoTo Connect:
End If

Connect:
AddChat "Attempting Connection To Battle.Net " & vbNewLine, vbYellow
   strProduct = GetStuff("Config", "Client")
   strUsername = GetStuff("Config", "Username")
   strPassword = GetStuff("Config", "Password")
   strCDKey = GetStuff("Config", "Cdkey")
   strServer = GetStuff("Config", "Server")
   strHomeChannel = GetStuff("Config", "homechan.Text")
   
   CleanSlateBot1.BNLSBotID = "xxxx"
   CleanSlateBot1.BNLSBotPassword = "xxxx"
   CleanSlateBot1.CDKey = strCDKey
   CleanSlateBot1.Product = strProduct
   CleanSlateBot1.HomeChannel = strHomeChannel
   CleanSlateBot1.Password = strPassword
   CleanSlateBot1.Username = strUsername
   CleanSlateBot1.ChangePassword = False
   CleanSlateBot1.Server = strServer
   CleanSlateBot1.Accept = 579728

   
CleanSlateBot1.Connect
End Sub


yes its my own bot, i was ipbanned from that ip but i checked on other realms and same thing

it pauses after saying "Attempting Connection To Battle.Net"
i thought maybe it wasnt reading my config so i added a command to test  it..


   ElseIf Msg = "/master" Then
   AddChat "The current master is: " & GetStuff("Config", "Master") & vbNewLine, vbWhite
   txtSend.Text = ""


it recognises the config from there so im all out of ideas

warz

Looks like an ip ban. You can remove that goto statement, also.

Daniel

Nope, not an ipban, i just reconnected, same thing

Daniel

this might help


Dim strCDKey As String
Dim strProduct As String
Dim strHomeChannel As String
Dim strPassword As String
Dim strUsername As String
Dim strServer As String
Dim Botplug As String
Dim strCurrentUsername As String
Dim strCurrentChannel As String
Private Sub CleanSlateBot1_BnetConnected()
AddChat "Connected!" & vbNewLine, vbGreen
End Sub

Private Sub CleanSlateBot1_BnetConnecting()
AddChat "Connecting..." & vbNewLine, vbYellow
End Sub

Private Sub CleanSlateBot1_BnetDisconnected()
AddChat "Disconnected" & vbNewLine, vbRed
End Sub

Private Sub CleanSlateBot1_BnetError(ErrorNumber As Integer, Description As String)
AddChat "Bnet error: " & ErrorNumber & " - " & Description & vbNewLine, vbRed
End Sub
Private Sub mnuConnect_Click()
If CleanSlateBot1.Connected = True Then
   CleanSlateBot1.Disconnect

End If

Connect:
AddChat "Attempting Connection To Battle.Net " & vbNewLine, vbYellow
   strProduct = GetStuff("Config", "Client")
   strUsername = GetStuff("Config", "Username")
   strPassword = GetStuff("Config", "Password")
   strCDKey = GetStuff("Config", "Cdkey")
   strServer = GetStuff("Config", "Server")
   strHomeChannel = GetStuff("Config", "homechan.Text")
   
   CleanSlateBot1.BNLSBotID = "xxxx"
   CleanSlateBot1.BNLSBotPassword = "xxxx"
   CleanSlateBot1.CDKey = strCDKey
   CleanSlateBot1.Product = strProduct
   CleanSlateBot1.HomeChannel = strHomeChannel
   CleanSlateBot1.Password = strPassword
   CleanSlateBot1.Username = strUsername
   CleanSlateBot1.ChangePassword = False
   CleanSlateBot1.Server = strServer
   CleanSlateBot1.Accept = 579728

   
CleanSlateBot1.Connect
End Sub

Private Sub mnuDisconnect_Click()
AddChat "Disconnected " & vbNewLine, vbRed
CleanSlateBot1.Disconnect
End Sub

Private Sub mnuExit_Click()
End
End Sub

Private Sub CleanSlateBot1_FlagsUpdate(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
       
       Dim intstr As Integer
       Dim lagicoN As Integer
       Dim Icon As Integer

Icon = GetIconCodeFLAGS(Message, Flags)
lagicoN = GetLagIcon(Ping, Flags)
   If InStr(1, Username, "*", vbTextCompare) <> 0 Then
       intstr = InStr(1, Username, "*", vbTextCompare)
       Username = Right(Username, Len(Username) - intstr)
   End If
   
   If (Flags And BNFLAGS_OP) = BNFLAGS_OP Then
           Icon = ICON_GAVEL
           Form1.lvChannel.ListItems.Remove Form1.lvChannel.FindItem(Username).Index
           With Form1.lvChannel.ListItems.Add(1, , Username, , Icon)
           .ListSubItems.Add 1, , , lagicoN
           End With
       Else
           With Form1.lvChannel
               .ListItems(.FindItem(Username).Index).SmallIcon = Icon
           End With
       End If
       
       Number.Text = lvChannel.ListItems.Count
       
End Sub

Private Sub CleanSlateBot1_JoinedChannel(ByVal ChannelName As String, ByVal Flags As Long, SimulatedEvent As Boolean)
AddChat "Joined channel: " & ChannelName & vbNewLine, vbYellow
lvChannel.ListItems.Clear
strCurrentChannel = ChannelName
txtChan.Text = ChannelName
End Sub

Private Sub CleanSlateBot1_LoggedOnAs(Username As String)
AddChat "Successfully logged on as: ", vbCyan, Username & vbNewLine, vbYellow
   strCurrentUsername = Username
   strUsername = Username
End Sub

Private Sub CleanSlateBot1_LogonEvent(Message As Long)
If Message = 0 Then
      AddChat "Account doesn't exist!" & vbNewLine, vbRed
  ElseIf Message = 1 Then
      AddChat "Invalid Password!" & vbNewLine, vbRed
  ElseIf Message = 2 Then
      AddChat "Login successfull" & vbNewLine, vbGreen
  ElseIf Message = 3 Then
      AddChat "Attempting to create account.." & vbNewLine, vbYellow
  ElseIf Message = 4 Then
      AddChat "Account creation was a success!" & vbNewLine, vbGreen
  End If
End Sub

Private Sub CleanSlateBot1_ServerError(ByVal Message As String, SimulatedEvent As Boolean)
AddChat Message & vbNewLine, vbRed
End Sub

Private Sub CleanSlateBot1_ServerInfo(ByVal Message As String, SimulatedEvent As Boolean)
AddChat Message & vbNewLine, vbYellow
End Sub

Private Sub CleanSlateBot1_SomethingUnknown(ByVal UnknownString As String, SimulatedEvent As Boolean)
AddChat "Umm.. an error has occured that I dunno about, bye." & vbNewLine, vbRed
End Sub

Private Sub CleanSlateBot1_UserEmote(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, SimulatedEvent As Boolean)
If Dii = True Then
       Username = Right(Username, Len(Username) - 1)
   End If
   Dim intstr As Integer
       If InStr(1, Username, "*", vbTextCompare) <> 0 Then
       intstr = InStr(1, Username, "*", vbTextCompare)
       Username = Right(Username, Len(Username) - intstr)
  End If
  AddChat "<" & Username & " " & Message & ">" & vbNewLine, vbCyan
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)
   strJSTR = Product
   strSexp = Product
   strSTAR = Product
   strd2 = Product
   strD2XP = Product
   strW2BN = Product
   strw3 = Product
   strDiablo = Product
   strW3XP = Product
Dim Icon As Integer
Icon = GetIconCode(Product, Flags)
Dim lagicoN As Integer
lagicoN = GetLagIcon(Ping, Flags)
If Icon = ICON_GAVEL Then
With Form1.lvChannel.ListItems.Add(1, Username, Username, , Icon)
   .ListSubItems.Add lvChannel.FindItem(Username).Index, , , lagicoN
   End With
End If
If Icon <> ICON_GAVEL Then
   With Form1.lvChannel.ListItems.Add(, , Username, , Icon)
   .ListSubItems.Add , , , lagicoN
   End With
End If
On Error Resume Next
UL.RemoveItem SendMessage(Form1.UL.hwnd, LB_FINDSTRING, 0, LCase(Username))
UL.AddItem LCase(Username)
Number.Text = lvChannel.ListItems.Count
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)
If Dii = True Then
       Username = Right(Username, Len(Username) - 1)
   End If
   Dim intstr As Integer
   If InStr(1, Username, "*", vbTextCompare) <> 0 Then
       intstr = InStr(1, Username, "*", vbTextCompare)
       Username = Right(Username, Len(Username) - intstr)
   End If
   
   strSexp = Product
   strSTAR = Product
   strd2 = Product
   strD2XP = Product
   strW2BN = Product
   strw3 = Product
   strDiablo = Product
   strJSTR = Product
   strW3XP = Product
   strProduct = Product

Dim Icon As Integer
Icon = GetIconCode(Product, Flags)
Dim lagicoN As Integer
lagicoN = GetLagIcon(Ping, Flags)
If Icon = ICON_GAVEL Then
   With Form1.lvChannel.ListItems.Add(1, Username, Username, , Icon)
   .ListSubItems.Add lvChannel.FindItem(Username).Index, , , lagicoN
   End With
End If
If Icon <> ICON_GAVEL Then
   With Form1.lvChannel.ListItems.Add(, , Username, , Icon)
   .ListSubItems.Add , , , lagicoN
   End With
End If


If LCase(strSexp) = "sexp" Then
   Product = "Starcraft: Broodwar"
ElseIf LCase(strSTAR) = "star" Then
   Product = "Starcraft"
ElseIf LCase(strd2) = "d2dv" Then
   Product = "Diablo II"
ElseIf LCase(strD2XP) = "d2xp" Then
   Product = "Diablo II: Lord of Destruction"
ElseIf LCase(strW2BN) = "w2bn" Then
   Product = "Warcraft II"
ElseIf LCase(strw3) = "war3" Then
   Product = "Warcraft III: Reign of Chaos"
ElseIf LCase(strDiablo) = "drtl" Then
   Product = "Diablo Retail"
ElseIf LCase(strW3XP) = "w3xp" Then
   Product = "Warcraft 3: Frozen Throne"
ElseIf LCase(strJSTR) = "jstr" Then
   Product = "Starcraft: Japanese"
End If
If Form2.chkJL = vbUnchecked Then
Exit Sub
ElseIf Form2.chkJL = vbChecked Then
AddChat Username & " has joined the channel using " & Product & " and a ping of " & Ping & "." & vbNewLine, &H808080
End If
End Sub

Private Sub CleanSlateBot1_UserLeaves(ByVal Username As String, ByVal Flags As Long, SimulatedEvent As Boolean)
Dim intstr As Integer
       If InStr(1, Username, "*", vbTextCompare) <> 0 Then
           intstr = InStr(1, Username, "*", vbTextCompare)
           Username = Right(Username, Len(Username) - intstr)
       End If
If Form2.chkJL = vbUnchecked Then
Exit Sub
ElseIf Form2.chkJL = vbChecked Then
AddChat Username & " has left the channel" & vbNewLine, &H808080
End If
On Error Resume Next
Form1.lvChannel.ListItems.Remove Form1.lvChannel.FindItem(Username).Index
Number.Text = lvChannel.ListItems.Count
On Error Resume Next
UL.RemoveItem SendMessage(Form1.UL.hwnd, LB_FINDSTRING, 0, LCase(Username))
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)
If Dii = True Then
       Username = Right(Username, Len(Username) - 1)
   End If
   Dim intstr As Integer
       If InStr(1, Username, "*", vbTextCompare) <> 0 Then
       intstr = InStr(1, Username, "*", vbTextCompare)
       Username = Right(Username, Len(Username) - intstr)
   End If
AddChat "<" & Username & ">", vbYellow, Space(1) & Message & vbNewLine, vbWhite
Dim strSend As String
End Sub

Private Sub CleanSlateBot1_VersionCheck(Message As Long)
If Message = 0 Then
      AddChat "Client Has Been Accepted!" & vbNewLine, vbGreen
  ElseIf Message = 1 Then
      AddChat "Version Check Failed!" & vbNewLine, vbRed
  ElseIf Message = 2 Then
      AddChat "Version Check Passed!" & vbNewLine, vbGreen
  ElseIf Message = 3 Then
      AddChat "Version Check Failed!" & vbNewLine, vbRed
  ElseIf Message = 4 Then
      AddChat "Version Check Passed!" & vbNewLine, vbGreen
  ElseIf Message = 5 Then
      AddChat "Version Check Passed!" & vbNewLine, vbWhite
  ElseIf Message = 6 Then
      AddChat "Cd-Key In Use By " & ExtraInfo & vbNewLine, vbRed
  End If
End Sub

Private Sub CleanSlateBot1_WhisperFromUser(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, SimulatedEvent As Boolean)
On Error Resume Next
AddWhisper "[From: " & Username & "] " & Message & vbNewLine, vbCyan
AddChat "[From: " & Username & "] " & Message & vbNewLine, vbCyan

End Sub

Private Sub CleanSlateBot1_WhisperToUser(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
   AddWhisper "[To: " & Username & "] " & Message & vbNewLine, vbCyan
   AddChat "[To: " & Username & "] " & Message & vbNewLine, vbCyan
End Sub

Private Sub mnuConfig_Click()
Form2.Show
End Sub
Private Sub txtsend_keypress(keyascii As Integer)
Dim MsG As String
Dim cHaNNeL As String
Dim LongMsg As String
LongMsg = txtSend.Text
MsG = txtSend.Text
If keyascii = 13 And txtSend.Text <> "" Then
   keyascii = 0
If MsG = "/rejoin" Then
   cHaNNeL = txtChan.Text
   CleanSlateBot1.Send "/join the void"
   CleanSlateBot1.Send "/join " & cHaNNeL
   txtSend.Text = ""
ElseIf MsG = "/ver" Then
   AddChat "?? Bot by Daniel@Lordaeron." & vbNewLine, vbWhite
   txtSend.Text = ""
ElseIf Left(MsG, 10) = ("/" & "setmaster") Then
   WriteStuff "Config", "Master", Right(MsG, (Len(MsG) - 11))
   AddChat "Master is written to: " & Right(MsG, (Len(MsG) - 11)) & "." & vbNewLine, vbGreen
   txtSend.Text = ""
ElseIf MsG = "/master" Then
   AddChat "The current master is: " & GetStuff("Config", "Master") & vbNewLine, vbWhite
   txtSend.Text = ""
ElseIf MsG = "/clearall" Then
   txtChannel.Text = ""
   txtW.Text = ""
   AddChat "Chat Cleared." & vbNewLine, vbGreen
   txtSend.Text = ""
ElseIf Left(MsG, 1) = "/" Then
   CleanSlateBot1.Send MsG
   txtSend.Text = ""
Else
   CleanSlateBot1.Send LongMsg
   AddChat "<" & strCurrentUsername & "> ", vbCyan, LongMsg & vbNewLine, vbWhite
   txtSend.Text = ""
End If
End If
End Sub


if anyone can help that would be really great!

Daniel

You mean the one with sexy backdoor? seen it, thats where i got help getting the master command from

Gangz

yea its not like he ever released it though... He happsn to be a cool friend of mine :p he testedit on me and then threw the project out public

Lobo

#8
 
   CleanSlateBot1.Disconnect
   CleanSlateBot1.Accept = 579728
   CleanSlateBot1.BNLSBotID = "xxxx"
   CleanSlateBot1.BNLSBotPassword = "xxxx"
   CleanSlateBot1.CDKey = strCDKey
   CleanSlateBot1.Product = strProduct
   CleanSlateBot1.HomeChannel = strHomeChannel
   CleanSlateBot1.Password = strPassword
   CleanSlateBot1.Username = strUsername
   CleanSlateBot1.ChangePassword = False
   CleanSlateBot1.Server = strServer

You want to make sure csb is disconnected before you even start, even it isn't connected make sure the winsock on csb is closed.

Edit: Added information
Look it's a signature.

Meh

This worked for me when i had trouble
AddChat "Attempting Connection To Battle.Net " & vbNewLine, vbYellow
   strProduct = GetStuff("Login", "Client")     Botplugin = GetStuff("Misc", "Botplug")
   strUsername = Form2.txtusername.Text
   strPassword = Form2.txtPassword.Text
   strCDKey = Form2.txtCdkey
   strServer = Form2.txtserver.Text
   strHomeChannel = Form2.txthomechan.Text
   
   CleanSlateBot1.BNLSBotID = "xxxxx"       CleanSlateBot1.BNLSBotPassword = "xxxxx"
   CleanSlateBot1.CDKey = strCDKey
   CleanSlateBot1.Product = strProduct
   CleanSlateBot1.HomeChannel = strHomeChannel
   CleanSlateBot1.Password = strPassword
   CleanSlateBot1.username = strUsername
   CleanSlateBot1.ChangePassword = False
   CleanSlateBot1.Server = strServer
   CleanSlateBot1.Accept = 579728

cleanlsatebot1.connect


Gangz

in stead of reading from other places it may be easier to just plug it inon your own just to test.