Author | Message | Time |
---|---|---|
sOuLz | i have made a "sample" that is not tested, for users using cleanslatebot.ocx to understand the BNLS events. like i said this source code is UNTESTED and i do not plan to update, its an example of how to use some of the Cleanslatebot.ocx events. [code] Private Sub CleanSlateBot1_BnetConnected() AddChat vbGreen, "Connected!" End Sub Private Sub CleanSlateBot1_BnetConnecting() AddChat vbYellow, "Connecting.." End Sub Private Sub CleanSlateBot1_BnetDisconnected() Cleanslatebot1.Disconnect AddChat vbRed, "Disconnected!" End Sub Private Sub CleanSlateBot1_BnetError(ErrorNumber As Integer, Description As String) AddChat vbRed, "Bnet error: " & ErrorNumber & " - " & Description Cleanslatebot1.Disconnect AddChat vbRed, "Disconnected!" End Sub Private Sub CleanSlateBot1_BNLSAuthEvent(Success As Boolean) If Success = True Then AddChat vbGreen, "BNLS Authorized!" Else AddChat vbRed, "BNLS Authorization failed!" End If End Sub Private Sub CleanSlateBot1_BNLSConnected() AddChat vbGreen, "Connected!" End Sub Private Sub CleanSlateBot1_BNLSConnecting() AddChat vbYellow, "Connecting..." End Sub Private Sub CleanSlateBot1_BNLSDisconnected() End Sub Private Sub CleanSlateBot1_BNLSError(ErrorNumber As Integer, Description As String) AddChat vbRed, "BNLS error: " & ErrorNumber & ": " & Description 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) 'add your own :P End Sub Private Sub CleanSlateBot1_JoinedChannel(ByVal ChannelName As String, ByVal flags As Long, SimulatedEvent As Boolean) AddChat vbGreen, "Joined channel: " & ChannelName & " --" End Sub Private Sub CleanSlateBot1_KeyReturn(KeyName As String, KeyValue As String) ' End Sub Private Sub CleanSlateBot1_LoggedOnAs(Username As String) AddChat vbYellow, "Successfully logged on as: ", vbGreen, Username, vbYellow, "!" End Sub Private Sub CleanSlateBot1_LogonEvent(Message As Long) If Message = 0 Then AddChat vbWhite, strTime & " ", vbRed, "Account doesn't exist!" ElseIf Message = 1 Then AddChat vbWhite, strTime & " ", vbRed, "Invalid Password!" ElseIf Message = 2 Then AddChat vbGreen, "Login successfull" ElseIf Message = 3 Then AddChat vbYellow, "Attempting to create account.." ElseIf Message = 4 Then AddChat vbGreen, "Account creation was a success!" End If End Sub Private Sub CleanSlateBot1_ServerError(ByVal Message As String, SimulatedEvent As Boolean) AddChat vbRed, Message AddChat vbRed, "<", _ vbCyan, strCurrentUsername, _ &H99CC00, ">", _ vbCyan, Space(1) & Message End If End Sub Private Sub CleanSlateBot1_ServerInfo(ByVal Message As String, SimulatedEvent As Boolean) AddChat vbYellow, Message End Sub Private Sub CleanSlateBot1_SomethingUnknown(ByVal UnknownString As String, SimulatedEvent As Boolean) AddChat vbRed, "Something unknown" 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_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, "-- ", __ vbGreen, " has joined the channel using " & Message End Sub Private Sub CleanSlateBot1_UserLeaves(ByVal Username As String, ByVal flags As Long, SimulatedEvent As Boolean) AddChat vbGreen, "-- ", vbYellow, Username, vbGreen, " has left the channel." 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 &H99CC00, "<", _ vbYellow, Username, _ &H99CC00, ">", _ vbWhite, Space(1) & Message End Sub Private Sub CleanSlateBot1_VersionCheck(Message As Long) If Message = 0 Then AddChat vbGreen, "Client has been accepted!" ElseIf Message = 1 Then AddChat vbRed, "Version check failed!" ElseIf Message = 2 Then AddChat vbGreen, "Version check passed!" ElseIf Message = 3 Then AddChat vbRed, "Version check failed!" ElseIf Message = 4 Then AddChat vbGreen, "Version check passed!" ElseIf Message = 5 Then AddChat vbGreen, "Version check passed!" ElseIf Message = 6 Then AddChat vbGreen, "Version check passed!" End If End Sub Private Sub CleanSlateBot1_WhisperFromUser(ByVal Username As String, ByVal flags As Long, ByVal Message As String, SimulatedEvent As Boolean) AddChat vbwhite, "<", _ vbYellow, "<from: " & Username, _ vbwhite, "> ", _ &H999999, 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) AddChat &H99CC00, "<", _ vbYellow, "<to: " & Username, _ &H99CC00, "> ", _ &H999999, Message End Sub [/code] | December 16, 2002, 8:07 PM |
Mesiah-Unregister | Yeah.. So wheres addchat()? :P | December 18, 2002, 1:03 AM |
Zakath | [code]void AddText( HWND hwnd, LPCTSTR TextToAdd, COLORREF color ) { SendMessage( hwnd, EM_SETSEL, -1, -1 ); mainTextFrmt.crTextColor = color; SendMessage( hwnd, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)(CHARFORMAT *)&mainTextFrmt ); SendMessage( hwnd, EM_REPLACESEL, FALSE, (LPARAM)TextToAdd ); }[/code] Hey, you never said what language it should be in. :P | December 18, 2002, 9:45 AM |
Mesiah-Unregister | Lol, thank you Zak ^^ NOW I CAN MAKE A BINARY BOT W00T! | December 18, 2002, 2:26 PM |
The_Lost_One | can u make the addchat() in vb...? | March 17, 2003, 12:23 PM |
Skywing | [quote]can u make the addchat() in vb...?[/quote] That function has been posted on the board countless times already. Perhaps you should use the search feature. | March 17, 2003, 2:11 PM |
ChR0NiC | I am slightly lost in the parts that werent finished, could you give me some examples of what might go in the incomplete parts? | March 21, 2003, 3:57 AM |
Grok | I still blame CupHead!! Programming is not equivalent to legos or jigsaw puzzles. | March 21, 2003, 9:04 AM |
St0rm.iD | Agreed. Visual Bot Studio: the lego blocks are activex. | March 21, 2003, 7:40 PM |
MrRaza | If you want the AddChat function in Visual Basic go to: http://www.valhallalegends.com/docs/rtbox.htm It's in the [vL] documents section if you didn't notice and it has some good code examples in there(note* not all of them are useful, but hey). but anyway, If you also want to add more features to the AddChat function go to: https://davnit.net/bnet/vL/?board=general_prog;action=display;num=1046960370 ;D | March 21, 2003, 11:43 PM |