• Welcome to Valhalla Legends Archive.
 

Stumped after CSb config

Started by Mr.Sasquatch, November 15, 2003, 10:47 PM

Previous topic - Next topic

Mr.Sasquatch

Well this is my 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

My question is now how do I make it connect?

Kp

Quote from: Mr.Sasquatch on November 15, 2003, 10:47 PM
My question is now how do I make it connect?
CleanSlateBot1.Connect () iirc
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Mr.Sasquatch

#2
Where do I put that? 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


[Edit: deleted the BNLS ID and password lines.  Do not post BNLS IDs.]

Lenny

Quote from: Mr.Sasquatch on November 15, 2003, 10:47 PM
Well this is my code...

Are you sure?
You place it where ever your connect command would be....
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

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

blinkdude

#5
add a Command Button to connect. double click on that button add the 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

then after the code have this

CleanSlateBot1.connect

after you make the button it will look like this ( assuming you double click on the Button

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


[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]
<Total-Assault@Azeroth> WTF IS THIS CLAN A BUNCH OF NERDS?
<Yoni[vL]@Azeroth> Yes.
<Grok> Yes.
<[vL]Kp> You sound surprised.
<Total-Assault> at least they admit it
&

Mr.Sasquatch

#6
So It should look like this? 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


How do I create a button?

warz

Well, you drag and drop with the button tool.

hismajesty

#8
Quote from: Mr.Sasquatch on November 16, 2003, 09:21 AM
So It should look like this? 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


How do I create a button?

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..



Edit: eww @ warz for posting before me.  :P

Soul Taker

Quote from: Mr.Sasquatch on November 15, 2003, 07:18 PM
Well...Im new with the whole bot making process...yet I know VB for the most part...
I feel decieved :-\

Mr.Sasquatch

Gheesh chill out...I didnt mean to type that I know where the button maker is...

Soul Taker

So, you edited your post and added that all accidentally?

Mr.Sasquatch

Damnit...I made a button but still no connect...
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


What am I doing wrong? All the info is filled in correctly

hismajesty

#13
Why do you have
With CleanSlateBot1
if you're typing out the whole thing anyway?
CleanSlateBot1.username = "xxxx"

Edit: lmao @ 'button maker'

Mr.Sasquatch

BAH...I dont understand why it wont work...Everything is correct, could I perhaps send one of yall my code?