Valhalla Legends Forums Archive | Battle.net Bot Development | Stumped after CSb config

AuthorMessageTime
Mr.Sasquatch
Well this is my code...
[code]
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_ChannelList(ChannelName As String)
lblChannelName.Caption = ChannelName
End Sub

Private Sub CleanSlateBot1_CharacterList(CharacterName As String)
strBox = MsgBox(CharacterName, , "Character") = vbOK
End Sub

Private Sub CleanSlateBot1_Debugger(Message As String)
AddChat vbRed, "DEBUG: " & Message
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 'Declare The integers
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
Main.lvChannel.ListItems.Remove Main.lvChannel.FindItem(UserName).Index
With Main.lvChannel.ListItems.Add(1, , UserName, , icon)
.ListSubItems.Add 1, , , lagicoN
End With
Else
With Main.lvChannel
.ListItems(.FindItem(UserName).Index).SmallIcon = icon
End With
End If
End Sub

Private Sub CleanSlateBot1_JoinedChannel(ByVal ChannelName As String, ByVal Flags As Long, SimulatedEvent As Boolean)
AddChat vbYellow, "Joined " & ChannelName & " [" & Flags & "]."
lvChannel.ListItems.Add (UserName)
End Sub

Private Sub CleanSlateBot1_LoggedOnAs(UserName As String, Product As String)
AddChat vbGreen, "Logged on as " & UserName & " using " & Product & "."
imConnected = True
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_News(News As String)
AddChat vbYellows, News & vbNewLine
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_RealmConnected()
AddChat vbGreen, "Connected to Diablo II Realm."
End Sub

Private Sub CleanSlateBot1_RealmConnecting()
AddChat vbYellow, "Connecting to Diablo II Realm..."
End Sub

Private Sub CleanSlateBot1_RealmDisconnected()
AddChat vbRed, "Disconnected from Diablo II Realm."
End Sub

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

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

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

Private Sub CleanSlateBot1_SimulatedEvent(ByVal PassedControl As Integer, ByVal EventType As String)
AddChat vbYellow, PassedControl & EventType
End Sub

Private Sub CleanSlateBot1_SomethingUnknown(ByVal UnknownString As String, SimulatedEvent As Boolean)
AddChat vbRed, "Something unknown has happened...It isnt the Sasquatch's Fault...?"
End Sub


Private Sub CleanSlateBot1_UserEmote(ByVal UserName As String, ByVal Flags As Long, ByVal Message As String, SimulatedEvent As Boolean)
AddChat vbYellow, "<" & UserName & Message & ">"
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, StatUpdate As Boolean, SimulatedEvent As Boolean)
'nada
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)
AddChat vbYellow, UserName & " has joined the channel using " & Product & " with a ping of " & Ping & ". " & Message
lvChannel.ListItems.Add (UserName)
End Sub

Private Sub CleanSlateBot1_UserLeaves(ByVal UserName As String, ByVal Flags As Long, SimulatedEvent As Boolean)
AddChat vbYellow, UserName & " has left the channel."
lvChannel.ListItems.Remove (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)
AddSpeech vbWhite, "[" & Format$(Time, "Hh:Nn:Ss") & "] "
AddSpeech vbCyan, "<", _
vbWhite, UserName, _
vbCyan, "> ", _
vbWhite, Message
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

Private Sub CleanSlateBot1_WhisperFromUser(ByVal UserName As String, ByVal Flags As Long, ByVal Message As String, SimulatedEvent As Boolean)
AddWSpeech vbWhite, "[" & Format$(Time, "Hh:Nn:Ss") & "] "
AddWSpeech vbCyan, "<From: ", _
vbGray, UserName, _
vbCyan, "> ", _
vbGray, Message
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)
AddWSpeech vbWhite, "[" & Format$(Time, "Hh:Nn:Ss") & "] "
AddWSpeech vbCyan, "<To: ", _
vbWhite, UserName, _
vbCyan, "> ", _
vbWhite, Message
End Sub[/code]
My question is now how do I make it connect?
November 16, 2003, 4:47 AM
Kp
[quote author=Mr.Sasquatch link=board=17;threadid=3638;start=0#msg29430 date=1068958071]
My question is now how do I make it connect?[/quote]
CleanSlateBot1.Connect () iirc
November 16, 2003, 4:58 AM
Mr.Sasquatch
Where do I put that? [code]With CleanSlateBot1
.CDKey = "XXXXYYYYYZZZZ"
.ChangePassword = False
.Character = ""
.HomeChannel = "Clan [vL]"
.LODKey = "AAAABBBBCCCCDDDD"
.NewPassword = "None"
.Password = "YourPassword"
.Product = "PXES"
.Realm = "USEast"
.Server = "useast.battle.net"
.UseRealm = False
.Username = "YourUsername"
.UseUDP = False
End With[/code]

[Edit: deleted the BNLS ID and password lines. Do not post BNLS IDs.]
November 16, 2003, 5:01 AM
Lenny
[quote author=Mr.Sasquatch link=board=17;threadid=3638;start=0#msg29430 date=1068958071]
Well this is my code...
[/quote]

Are you sure?
You place it where ever your connect command would be....
November 16, 2003, 5:08 AM
Mr.Sasquatch
Where would you put it after what I have down so far...Like I said Im getting the hang of all of this ;D
November 16, 2003, 5:16 AM
blinkdude
add a Command Button to connect. double click on that button add the code
[code]
With CleanSlateBot1
.Accept = 579728
.CDKey = "XXXXYYYYYZZZZ"
.ChangePassword = False
.Character = ""
.HomeChannel = "Clan [vL]"
.LODKey = "AAAABBBBCCCCDDDD"
.NewPassword = "None"
.Password = "YourPassword"
.Product = "PXES"
.Realm = "USEast"
.Server = "useast.battle.net"
.UseRealm = False
.Username = "YourUsername"
.UseUDP = False
End With
[/code]
then after the code have this
[code]
CleanSlateBot1.connect
[/code]
after you make the button it will look like this ( assuming you double click on the Button
[code]
Private Sub name-of-button_Click()
With CleanSlateBot1
.Accept = 579728
.CDKey = "XXXXYYYYYZZZZ"
.ChangePassword = False
.Character = ""
.HomeChannel = "Clan [vL]"
.LODKey = "AAAABBBBCCCCDDDD"
.NewPassword = "None"
.Password = "YourPassword"
.Product = "PXES"
.Realm = "USEast"
.Server = "useast.battle.net"
.UseRealm = False
.Username = "YourUsername"
.UseUDP = False
End With
CleanSlateBot1.connect
End Sub
[/code]

[Edit: added blinkdude's missing line; removed his separate post which mentioned it; editing is restricted due to the number of people who kept deleting their own posts by editing the content to a null string]
November 16, 2003, 8:43 AM
Mr.Sasquatch
So It should look like this? [code] Private Sub name-of-button_Click()
With CleanSlateBot1
.CDKey = "XXXXYYYYYZZZZ"
.ChangePassword = False
.Character = ""
.HomeChannel = "Clan [vL]"
.LODKey = "AAAABBBBCCCCDDDD"
.NewPassword = "None"
.Password = "YourPassword"
.Product = "PXES"
.Realm = "USEast"
.Server = "useast.battle.net"
.UseRealm = False
.Username = "YourUsername"
.UseUDP = False
.Accept = 579728

End With
CleanSlateBot1.connect
End Sub[/code]

How do I create a button?
November 16, 2003, 3:21 PM
warz
Well, you drag and drop with the button tool.
November 16, 2003, 3:27 PM
hismajesty
[quote author=Mr.Sasquatch link=board=17;threadid=3638;start=0#msg29477 date=1068996066]
So It should look like this? [code] Private Sub name-of-button_Click()
With CleanSlateBot1
.CDKey = "XXXXYYYYYZZZZ"
.ChangePassword = False
.Character = ""
.HomeChannel = "Clan [vL]"
.LODKey = "AAAABBBBCCCCDDDD"
.NewPassword = "None"
.Password = "YourPassword"
.Product = "PXES"
.Realm = "USEast"
.Server = "useast.battle.net"
.UseRealm = False
.Username = "YourUsername"
.UseUDP = False
.Accept = 579728

End With
CleanSlateBot1.connect
End Sub[/code]

How do I create a button?
[/quote]

lmao, honestly..if you can't create a button you have NO business even attempting to create a bot. After reading that post, I highly doubt you wrote any of the code above (however, I didn't read the whole code.) Anyway..

[img]http://www.digitaldoozie.net/images/loserbutton.gif[/img]

Edit: eww @ warz for posting before me. :P
November 16, 2003, 3:29 PM
Soul Taker
[quote author=Mr.Sasquatch link=board=17;threadid=3632;start=0#msg29383 date=1068945483]
Well...Im new with the whole bot making process...yet I know VB for the most part...[/quote]
I feel decieved :-\
November 16, 2003, 4:06 PM
Mr.Sasquatch
Gheesh chill out...I didnt mean to type that I know where the button maker is...
November 16, 2003, 4:07 PM
Soul Taker
So, you edited your post and added that all accidentally?
November 16, 2003, 4:16 PM
Mr.Sasquatch
Damnit...I made a button but still no connect...
[code]Private Sub Command1_Click()
With CleanSlateBot1
CleanSlateBot1.BNLSBotID = "xxxxxx"
CleanSlateBot1.BNLSBotPassword = "xxxx"
CleanSlateBot1.CDKey = "xxxxxxx"
CleanSlateBot1.Product = "RATS"
CleanSlateBot1.HomeChannel = "ass"
CleanSlateBot1.Password = "xxxxx"
CleanSlateBot1.UserName = "xxxxx"
CleanSlateBot1.NewPassword = "bleh"
CleanSlateBot1.ChangePassword = False
CleanSlateBot1.Server = "useast.battle.net"
CleanSlateBot1.Accept = 579728

End With
CleanSlateBot1.Connect
End Sub[/code]

What am I doing wrong? All the info is filled in correctly
November 16, 2003, 4:18 PM
hismajesty
Why do you have
[code]With CleanSlateBot1[/code]
if you're typing out the whole thing anyway?
[code]CleanSlateBot1.username = "xxxx"[/code]

Edit: lmao @ 'button maker'
November 16, 2003, 4:34 PM
Mr.Sasquatch
BAH...I dont understand why it wont work...Everything is correct, could I perhaps send one of yall my code?
November 16, 2003, 4:57 PM
Kp
[quote author=Mr.Sasquatch link=board=17;threadid=3638;start=0#msg29506 date=1069001820]
BAH...I dont understand why it wont work...Everything is correct, could I perhaps send one of yall my code?
[/quote]It rather seems you've been doing that already. Perhaps you should follow the suggestions I've made a couple times now, debugprint all unknown values, and see if anything comes up?
November 16, 2003, 4:59 PM
Mr.Sasquatch
I did do that...Yet still no connection :( Umm can I try sending you my code?
November 16, 2003, 5:27 PM
Kp
[quote author=Mr.Sasquatch link=board=17;threadid=3638;start=15#msg29514 date=1069003677]
I did do that...Yet still no connection :( Umm can I try sending you my code?
[/quote]Of course it didn't connect. That suggestion was only so you could see *what* was happening; unknown problems are difficult to fix. You can try sending me your code, but I can't guarantee that any good will come of it.
November 16, 2003, 7:04 PM
CrAz3D
Take out the[quote]With CleanSlateBot1[/quote]

As trust(hismajesty) already stated you are being redundant in having With CSB1 & CSB1.***
November 16, 2003, 7:57 PM
Mr.Sasquatch
So instead of sayng CSB1.Username="sas"...I shout just put .username="sas" correct?
November 16, 2003, 7:59 PM
hismajesty
[quote author=Mr.Sasquatch link=board=17;threadid=3638;start=15#msg29542 date=1069012796]
So instead of sayng CSB1.Username="sas"...I shout just put .username="sas" correct?
[/quote]

If you're going to use the
[code]With CleanSlateBot1[/code]
November 16, 2003, 8:57 PM
CaPSuLeS
I don't suggest using that all. Just have it do every time you connect
with the command button. Hence the:

Code:
Private Sub command-button_Click()

Also, make sure your BNLS ID is valid and all that debugging stuff.
As they mentioned before, use the debebugger. See what's wrong. You can also try sending the code to my e-mail at kradinator@hotmail.com and let me see what I can do.
November 18, 2003, 5:55 PM
hismajesty
[quote author=CaPSuLeS link=board=17;threadid=3638;start=15#msg29929 date=1069178124]
I don't suggest using that all.[/quote]

Aye?
November 18, 2003, 7:58 PM

Search