mIRC Homepage
Posted By: DeathfireD Binary script - 19/01/04 01:37 AM
Hi I have been working on a binary script for some time but i am running into errors like I want it so when I as in ME types something in that starts with 0 or 1 (zero or one) it will show me what i sead in binary and hae my name displaded to me as <name/binaryison> insted of <name>. so then when i talk in binary i can see it in plane english and when other people talk in it, it will come back with english this is what i have so far and here is what i have been tasting for the nick thing.

Quote:
on *:text:0*:{
if (DeathfireD isin $nick) { $bin.decode $1- }
halt {
}


Quote:

on *:TEXT:*:*:{
if (0 isin $1-) { echo < $+ $nick $+ @binon> $bin.decode $1- }
}


this is what i have been using but i want my name to change when i say something in binary and i want it to be converted.

Quote:

on 1:TEXT:0*:*:/notice $me $bin.decode( $1- )
on 1:TEXT:1*:*:/notice $me $bin.decode( $1- )
}


can anyone help if you need more info i will be happy to talk more lol.
Posted By: Doqnach Re: Binary script - 19/01/04 02:04 AM
use on input if you want to trigger your OWN text YOU type... not on text, on text is only for text other people write
Posted By: DeathfireD Re: Binary script - 19/01/04 02:05 AM
what do you mean by input can you show me?
Posted By: Doqnach Re: Binary script - 19/01/04 02:06 AM
/help on input

Quote:

on INPUT

The on INPUT event triggers when you enter text in an editbox and press enter.


Format: on <level>:INPUT:<*#?=!@>:<commands>
Example: on 1:INPUT:#mIRC:/echo You entered the text " $1- " in the #mIRC window
Posted By: DeathfireD Re: Binary script - 19/01/04 02:10 AM
ok so how would i even get that to work.
I need it only to be triggerd when i type something with 0 or 1.

on 1:INPUT:#:/echo < $+ $nick $+ @binon> $bin.decode $1-

?
Posted By: Iori Re: Binary script - 19/01/04 02:35 AM
Code:
on *:INPUT:#:{
  if $left($1,1) isin 01 { echo -a $+(&lt;,$me,@binon&gt;) $bin.decode($1-) }  
}
Posted By: DeathfireD Re: Binary script - 19/01/04 02:42 AM
ok that kinda worked if i type it in by hand it works but if im using my short cut
Quote:
.Say Something in <a href="Binary://say" target="_blank">Binary://say</a> $bin.encode( $$?"Enter your text?:" )

It dosent work.

when i do it by hand im still getting
Quote:

<D@binon> )
<D> 01010

is there a way so I dont need to see the oo's and 11's at all just <D@binon> ) ?
and 3rd Q can you make it so when someone says something in binary it will show <therenick@binon> there text?

thanks so much.
Posted By: Iori Re: Binary script - 19/01/04 03:07 AM
1. The popup
Code:
.Say Something in Binary:.msg # $bin.encode($$input(Enter your text.,e)) | echo -ati $+(&lt;,$me,@binon&gt;) $!

This will output
<D@binon> The text you entered.
and msg the channel with the binary text.

2. Typing 0011.. in the editbox
Code:
on *:INPUT:#:{
  if [color:blue]$regex($1-,/^[01 ]+$/)[/color] {
    .msg # $1-
    echo -ati $+(&lt;,$me,@binon&gt;) $bin.decode($1-)
    halt
  }
}


3. Their bintext
Code:
on $*^:text:[color:blue]/^[01 ]+$/[/color]:#:{
  echo -mbflirt # $+(&lt;,$nick,@binon&gt;) $bin.decode($1-)
  haltdef
}

Edited: changed the /^[01 ]+$/
Edit2: Changed on input
Posted By: DeathfireD Re: Binary script - 19/01/04 03:16 AM
THANK YOU SO MUch it works just liek i wanted it. now the only thing i have t figure a way to right binary over binary lol if you even get that lol but thanks amby later on ill post the full script up here.
Posted By: DeathfireD Re: Binary script - 19/01/04 03:18 AM
o crap i just noticed someting everytime someone talks it adds a @binon after there name how do i fix lol.
Posted By: DeathfireD Re: Binary script - 19/01/04 03:19 AM
never mind my eyes are playing tricks.
Posted By: DeathfireD Re: Binary script - 19/01/04 03:21 AM
wait there is an error anytime someone talks more then 2 words it shows @binon after there name so if joe sead hi there it would be

<joe@binon> and nothing els here no text shows up any way to fix?
Posted By: Iori Re: Binary script - 19/01/04 03:24 AM
See my edit above, sorry 'bout that :[/b])
Posted By: DeathfireD Re: Binary script - 19/01/04 03:25 AM
chang it to what?
Posted By: Iori Re: Binary script - 19/01/04 03:27 AM
to this
Code:
on $*^:text:/^[01 ]+$/:#:{
  echo -mbflirt # $+(&lt;,$nick,@binon&gt;) $bin.decode($1-)
  haltdef
}
Posted By: DeathfireD Re: Binary script - 19/01/04 03:32 AM
thanks your the best it works great now. tomorrow ill work on the binary over binary code. Im trying to make an ecryptshion talk like Blowfish right now i got BInary working but i go to get it so when someone types in like say 1 in an edit box thats how many times the word will be ecrypted .... if that made any sence lol. if you got any ideas please feel free to post them thanks agen for the help its running great now.
Posted By: Iori Re: Binary script - 19/01/04 03:34 AM
No probs. smile
Posted By: DaveC Re: Binary script - 19/01/04 11:09 AM
use one cypher pads there hard to break (so the story goes)

what do i mean?

work out what letters your allowed to use
A-Z,0-9, make space maybe _

now make a line with each letter say 6 times
AAAAAABBBBBBCCCCCC etc etc
now jumble them up
DJSUIEWK3S5D2_ODK8A6S etc etc
save that to a file and repeat the process 1000 times for 1000 lines in the file.
you now have a encryption and decryption key file, give it ONLY to those who are ment to have it

to encode a message like "HI DAVE!"
get the 1st letter H and the first line of the file and a random number from 1 to 6
%letter = H
%line = $read(filename,1)
%num = $rand(1,6)
now get a value from them
get the location of the %num occurance of %letter in the %line
$pos(%line,%letter,%num), that value represnts the H, repeat the process using each letter of the message and the next line of the file.
anyone decoding just looks up the corresponding letter in in each line of the identical file.
you can repeat the mesaage any number of times and it wont look the same, due to there being 6 numbers for each letter, and those numbers change for each position in the message., you end up sending thinsg like
23 567 34 125 345 7 63 43
and next time
45 45 23 32 87 432 2 45
no one can even tell you said the same thing twice


© mIRC Discussion Forums