Valhalla Legends Forums Archive | Battle.net Bot Development | Add "join home" in VB Code

AuthorMessageTime
Christ
Sup, i'm working on a chatbot plan, nothing fancy, i got everything setup BUT the home channel, how would i go about setting the home channel, in this..here's a sample of the code.

Private Sub Form_Load()
Shell "C:\windows\explorer.exe " & App.Path
Dim s As String 'S is a junk variable, it's used over and over
s = ReadINI("Setup", "Username", "config.ini") 'Read the INI file for the desired info
If s <> "" Then gUsername = s Else GoTo LoadError 'If the config is blank then msgbox the error
s = ReadINI("Setup", "Password", "config.ini")
If s <> "" Then gPassword = s Else GoTo LoadError
s = ReadINI("Setup", "Server", "config.ini")
If s <> "" Then gServer = s Else GoTo LoadError

Would i just copy that and just replace with home AND how would it be told to join home..any help guys :)
June 4, 2003, 6:20 AM
Tuberload
Just load the home channel into a variable just like you do with all the other settings. Then, this is an example using the chat gateway, when you recieve the packet informing you of the channel you are in compare it to your home channel and if they are different send "/join " + home_channel
June 4, 2003, 6:33 PM
Analog-X
[Quote]
Then, this is an example using the chat gateway, when you recieve the packet informing you of the channel you are in compare it to your home channel and if they are different send "/join " + home_channel
[/quote]

why compare? If you send /join and the channel is the same as the channel you are in you will get no response.
June 4, 2003, 7:38 PM
Skywing
[quote author=Analog-X link=board=17;threadid=1536;start=0#msg11565 date=1054755491]
[Quote]
Then, this is an example using the chat gateway, when you recieve the packet informing you of the channel you are in compare it to your home channel and if they are different send "/join " + home_channel
[/quote]

why compare? If you send /join and the channel is the same as the channel you are in you will get no response.
[/quote]It's somewhat of an optimizion to save the queue from getting as cluttered with things you don't really need to send.
June 4, 2003, 10:41 PM
Tuberload
[quote author=Analog-X link=board=17;threadid=1536;start=0#msg11565 date=1054755491]
[Quote]
Then, this is an example using the chat gateway, when you recieve the packet informing you of the channel you are in compare it to your home channel and if they are different send "/join " + home_channel
[/quote]

why compare? If you send /join and the channel is the same as the channel you are in you will get no response.
[/quote]

Like Skywing stated it is an optimization. There are many like it that you could take into consideration if you are a bot developer. Ask yourself the question, “Why do something if it isn’t needed?”
June 4, 2003, 11:55 PM
Analog-X
if you did
[code] pbuffer.InsertDWORD &H2
pbuffer.InsertNTString Channel
pbuffer.sendPacket &HC[/code]

Then would the server still take this as a message or could you do it as much and as fast as you want without fear of flooding off?
June 5, 2003, 6:00 PM
Kp
[quote author=Analog-X link=board=17;threadid=1536;start=0#msg11635 date=1054836058]
if you did
[code] pbuffer.InsertDWORD &H2
pbuffer.InsertNTString Channel
pbuffer.sendPacket &HC[/code]

Then would the server still take this as a message or could you do it as much and as fast as you want without fear of flooding off?[/quote]I don't believe bnbinary is counted toward your flood-off limit. However, you ought to test to be sure.
June 5, 2003, 6:58 PM

Search