Valhalla Legends Forums Archive | Battle.net Bot Development | Re: Join home channel after login.

AuthorMessageTime
Eibro
[quote]Hello ok i'v made a chat bot any everything but now after it logins to Battle.net it gose to "Public chat-1" what can i add to make it join my channel eg. "inheaven"
i want it to join "inheaven" as soon as it logins to bnet[/quote]
You can't. The most you can hope for is joining a public channel on the chat protocal. Send "/join channelname" after you connect.
March 4, 2003, 6:41 PM
ILurker
............Just make it so when your logged in, it automatically sends "/join " & homechannel
not too hard
Its impossible to dodge joining public chats on startup
March 4, 2003, 7:27 PM
ILurker
well not really impossible but probably hard to do
March 4, 2003, 7:27 PM
Spht
For chat protocol, after you receive 2010 NAME from Battle.net, you could then send "/join <Home_Channel>."

For example, in Visual Basic, SOCKET.SendData "/join Clan [vL]" & vbCrLf. SOCKET being your Winsock control name, and vbCrLf being a substitute for the Enter key in the Telnet interface.
March 4, 2003, 7:29 PM
Grok
[quote][snip]
'Call Appropriate Event based on ID
   Select Case Val(strArgs(1))
       Case 1001: Event_User strArgs(3), strArgs(4), strArgs(5)
       Case 1002: Event_Join strArgs(3), strArgs(4), strArgs(5)
       Case 1003: Event_Leave strArgs(3), strArgs(4)
       Case 1004: Event_RecvWhisper strArgs(3), strArgs(4), strData2
       Case 1005: Event_Talk strArgs(3), strArgs(4), strData2
   End Select
End Sub
[snip][/quote]

ACCCK!  That's not how events are supposed to be written!!

You should declare events from a class module as public, e.g...

---  ClassBot  class code
Public Event OnTalk(Name As String, Flags As String, Chat As String)

Somewhere in the class you fire an event like this:

RaiseEvent OnTalk(name, flags, chat)

Now, to use the class, in your form or wherever, call it like this:

Private WithEvents CBot As ClassBot

..by doing that, and choosing CBot from the ojbect dropdown, you'll see the OnTalk event in the procedure dropdown.  Click it .. You'll see this code:

Private Sub CBot_OnTalk(Name As String, Flags As String, Chat As String)

End Sub

Sorry for the seguey, but intervention was required!
March 4, 2003, 7:49 PM
haZe
VaporBot, very nice chat bot, sort of outdated though, so your probably not going to go that far with it :-/
March 4, 2003, 8:40 PM
Noodlez
proper events are just leeter  :P

(i think?)
March 5, 2003, 1:51 AM

Search