Valhalla Legends Forums Archive | Battle.net Bot Development | -OnTalk Event-

AuthorMessageTime
new.b
hey there guys!

I need help, with the OnTalk event. Basically when another user from battle.net starts chatting I recieve numbers instead of there username and there message.

e.g. 65535
16776960
16777215

It Should Be something like ....

<UserName>: Blah blah blah blah

Basically that's all the problem and i've got everything working for me so far.

Also I'm using the source code/bot from chaosx.net titled vbbot, I think the maker is here, but i'm not sure. I'm modifying it and giving credits of course.

Thanks for any help guys & thanks in advance.
March 19, 2004, 6:10 AM
o.OV
[quote author=new.b link=board=17;threadid=5868;start=0#msg50358 date=1079676632]
hey there guys!

I need help, with the OnTalk event. Basically when another user from battle.net starts chatting I recieve numbers instead of there username and there message.

e.g. 65535
16776960
16777215

It Should Be something like ....

<UserName>: Blah blah blah blah

Basically that's all the problem and i've got everything working for me so far.

Also I'm using the source code/bot from chaosx.net titled vbbot, I think the maker is here, but i'm not sure. I'm modifying it and giving credits of course.

Thanks for any help guys & thanks in advance.
[/quote]

Paste some code.
March 19, 2004, 6:25 AM
new.b
This is what I have in the main form...
[code]Private Sub ChatBot_OnTalk(ByVal UserName As String, ByVal Flags As Long, ByVal Message As String)
'get rid of leading and trailing quotes
Message = Mid$(Message, 2)
Message = Left$(Message, Len(Message) - 1)
AddChat vbCyan, "<", _
vbYellow, UserName, _
vbCyan, ">", _
RGB(&H8B, &H5E, &HA0), ": " & Message
End Sub
[/code]

and this is on the class module ...

[code].....
Case ID_TALK
pA = Split(pA(2), " ", 3)
RaiseEvent OnTalk(pA(0), CLng("&H" & pA(1)), pA(2))
.....
[/code]

i didn't paste the whole code of the class module since everything else is working except the ontalk event.

thanks again
March 19, 2004, 6:35 AM
LoRd
You need to post more code, preferably the part where pA() is first used.
March 19, 2004, 9:14 AM
Eli_1
[quote author=new.b link=board=17;threadid=5868;start=0#msg50361 date=1079678110]
This is what I have in the main form...
[code]Private Sub ChatBot_OnTalk(ByVal UserName As String, ByVal Flags As Long, ByVal Message As String)
'get rid of leading and trailing quotes
Message = Mid$(Message, 2)
Message = Left$(Message, Len(Message) - 1)
AddChat vbCyan, "<", _
vbYellow, UserName, _
vbCyan, ">", _
RGB(&H8B, &H5E, &HA0), ": " & Message
End Sub
[/code]

and this is on the class module ...

[code].....
Case ID_TALK
pA = Split(pA(2), " ", 3)
RaiseEvent OnTalk(pA(0), CLng("&H" & pA(1)), pA(2))
.....
[/code]

i didn't paste the whole code of the class module since everything else is working except the ontalk event.

thanks again
[/quote]

this is a CHAT bot isn't it?
March 19, 2004, 12:05 PM
o.OV
the first PA is probably split(data," ",3)
and from the way he is parsing it..
you can rule out binary

I certainly don't have a clue as to
why he would be getting numbers
for name and message.
March 19, 2004, 12:12 PM
LoRd
[quote author=o.OV link=board=17;threadid=5868;start=0#msg50382 date=1079698342]
the first PA is probably split(data," ",3)
and from the way he is parsing it..
you can rule out binary

I certainly don't have a clue as to
why he would be getting numbers
for name and message.
[/quote]
Then he'd need to post what data was; no way to tell what he's doing until he posts all the required code.
March 19, 2004, 4:00 PM
iago
Those 3 numbers you posted are, in hex, 0xFFFF, 0xFFFF00, and 0xFFFFFF. I find it hard to believe that that's a coincidence.
March 19, 2004, 4:13 PM
Myndfyr
[quote author=iago link=board=17;threadid=5868;start=0#msg50410 date=1079712825]
Those 3 numbers you posted are, in hex, 0xFFFF, 0xFFFF00, and 0xFFFFFF. I find it hard to believe that that's a coincidence.
[/quote]

My thoughts exactly. Thanks for beating me to it yet again. :P
March 22, 2004, 10:56 PM

Search