Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Slugger69 on May 16, 2003, 10:57 PM

Title: Chat sending
Post by: Slugger69 on May 16, 2003, 10:57 PM
I fixed an ethbot and got it loaded on BNet v1.10 but when i type it sends the text on the bot screen and shows it there but i go to bnet and it isnt there. Any help?
Title: Re:Chat sending
Post by: UserLoser on May 17, 2003, 08:06 AM
With PBuffer
    .InsertNTString TextToSendToBattleNet
    .SendPacket &HE
End With

Check out http://www.valhallalegends.com/arta/bnetdocs/
Title: Re:Chat sending
Post by: Slugger69 on May 17, 2003, 08:51 AM
which script does that go under? thnks
Title: Re:Chat sending
Post by: Arta on May 17, 2003, 09:23 AM
Well, what do you think? It's hardly difficult to figure out...

When do you wanna send text to Battle.net? When the user presses Enter. So, put that in the appropriate event handler.
Title: Re:Chat sending
Post by: Yoni on May 17, 2003, 10:01 AM
Btw: Maybe you're using a muted account/cdkey?
Title: Re:Chat sending
Post by: Slugger69 on May 17, 2003, 10:09 AM
no its the key i use on bnet but i type on it shows it on the bot screen just not on bnet. i tried arta's idea but i try to talk and it says debug and it highlights
   .InsertNTString TextToSendToBattleNet
   

Title: Re:Chat sending
Post by: Yoni on May 17, 2003, 10:47 AM
Sounds violently dangerous.

Let go of VB.
Title: Re:Chat sending
Post by: Eternal on May 20, 2003, 01:50 AM
*Yoni deserves +1 for the letting go comment*
Title: Re:Chat sending
Post by: Undeference on May 20, 2003, 04:42 PM
2 possibilites I am thinking of:
1) You are displaying the text before you are sending it. With my bot, I wait to receive what I have sent before displaying it (the log will be more accurate that way). And either bnet is not sending it to people or you are not sendning it to bnet.
2)Bnet tells you what you say even when what you have said is truncated or is too long and they do not send it to everyone else. Possibly you are sending a bunch of extra characters (since you are using VB, this is likely), and you do not even know about it.
Title: Re:Chat sending
Post by: Tazo on May 20, 2003, 05:32 PM
Quote from: Undeference on May 20, 2003, 04:42 PM
2 possibilites I am thinking of:
1) You are displaying the text before you are sending it. With my bot, I wait to receive what I have sent before displaying it (the log will be more accurate that way). And either bnet is not sending it to people or you are not sendning it to bnet.
2)Bnet tells you what you say even when what you have said is truncated or is too long and they do not send it to everyone else. Possibly you are sending a bunch of extra characters (since you are using VB, this is likely), and you do not even know about it.
it would just cut off the end..
Title: Re:Chat sending
Post by: Mesiah / haiseM on May 20, 2003, 07:37 PM
yeah, and disconnected/possibly ip banned based on how big the message was...

phear 0x19...
Title: Re:Chat sending
Post by: Slugger69 on May 20, 2003, 10:05 PM
no it recieves the messages from users in the channels but i cant get the chat to send the script for text sending is:

Private Sub txtSend_KeyPress(KeyAscii As Integer)

If KeyAscii = 127 Then MsgBox "del"
If KeyAscii = 13 Then
  cmdSend_Click
  KeyAscii = 0
End Sub

My friend said this would work:

Public Sub Send(ByVal Data As String, Optional UnHide As Boolean)



Dim WaitTime As Long

If Data = "" Then Data = " "
Dim strData As String
WaitTime = RequiredDelay(Len(Data))
Dim lSendDelay As String
lSendDelay = WaitTime
   Exit Sub
If UnHide = True Then
strData = strData & Chr(1) & "1" ' a null follow by "1" to show
End If

End Sub

I hit enter after typing and it doesnt even make that text go away...
Title: Re:Chat sending
Post by: Noodlez on May 20, 2003, 10:10 PM
um.. undeference, i'm pretty sure bnet doesn't echo back what you send
Title: Re:Chat sending
Post by: Slugger69 on May 21, 2003, 01:03 PM
didnt say it did i said i can recieve chat just not send chat.
Title: Re:Chat sending
Post by: tA-Kane on May 22, 2003, 03:18 AM
Quote from: Noodlez on May 20, 2003, 10:10 PMi'm pretty sure bnet doesn't echo back what you send
Remember that the chat sessions do.

Quote from: Slugger69 on May 21, 2003, 01:03 PMi can recieve chat just not send chat.
When you try to send chat, do you get disconnected from Battle.net? If so, it's most likely that you've a malformed packet header, or a message who's length is quite beyond the message length limit. If not, then you are not actually sending the text.

Either way, you should breakpoint your sending methods/functions and follow along until you can figure it out, all of this is assuming you're not using CleanSlateBot. If you're using CleanSlateBot, then go do something which is a little more... simple.
Title: Re:Chat sending
Post by: Noodlez on May 22, 2003, 11:41 AM
Kane, I know. Undefernce said instead of directly adding chat after he sends it, he waits for bnet to send back his own message. Obviously he's using the binary protocol, and his claim that BNet sends back his own text is false.
Title: Re:Chat sending
Post by: Slugger69 on May 22, 2003, 11:02 PM
doesnt disconnect me it just doesnt send.
Title: Re:Chat sending
Post by: UserLoser on May 23, 2003, 10:31 AM
Have you tried using a packetlogger and seeing if it's even sending *anything* ?