• Welcome to Valhalla Legends Archive.
 

Sending chr(3) and chr(4)

Started by haZe, February 16, 2003, 03:01 AM

Previous topic - Next topic

haZe

OK. I know about chr(3) and chr(4) for chat bots but answer me two questions:
What IS chr(3) and chr(4) ? What do they represent?
Also, I'm pretty sure theres a special way of sending it or is it just like this:

sckBnet.SendData chr(3) chr(4)
[/color]
once again, help would be appreciated, and plz dont post unless your going to help

warz

#1
Make a simple output program, and view the output of chr(3) and chr(4).

Yoni

#2
Use the string concatenation operator (&):

sckBnet.SendData Chr(3) & Chr(4)

Arta

#3
The first byte is the Protocol byte. It lets bnet know you're going to be using the chat protocol. If you were using a game, you'd send 0x01 instead.

I forget what the second byte does.

Kp

#4
^D turns off foreign echo.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

haZe

#5
so chr(4) turns off echo? ya lost me =/

Ickypoopy

#6
Anytime you send something, it will echo it back to you.  SO if you send "blah" it will send you "blah"

So you send ^D to turn that off ;)

haZe

#7
sckBnet.senddata ^D

ok got it 8)

Noodlez

#8
no.
sckBnet.SendData Chr(3) & Chr(4)

Yoni

#9
^D is shorthand notation for Ctrl-D, which is expressed by the byte Chr(4).

haZe

#10
thx yoni now i understand perfectly

Etheran

#11
I thought I'd just add that chr(3) is ^C.

haZe

#12
but..etheran...

QuoteThe first byte is the Protocol byte. It lets bnet know you're going to be using the chat protocol. If you were using a game, you'd send 0x01 instead.
 
I forget what the second byte does.

i thought chr(3) was 0x03..thats what arta made it sound like

Noodlez

#13
chr(3) is 0x03. the post you quoted doesn't say otherwise

Etheran

Quotebut..etheran...

 

i thought chr(3) was 0x03..thats what arta made it sound like
chr(3) translates as ascii 3(00000011), which (the last time I checked) is ctrl-C.