mIRC Home    About    Download    Register    News    Help

Print Thread
Binary script #68450 19/01/04 01:37 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68451 19/01/04 02:04 AM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
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


If it ain't broken, don't fix it!
Re: Binary script #68452 19/01/04 02:05 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
what do you mean by input can you show me?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68453 19/01/04 02:06 AM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
/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


If it ain't broken, don't fix it!
Re: Binary script #68454 19/01/04 02:10 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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-

?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68455 19/01/04 02:35 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Code:
on *:INPUT:#:{
  if $left($1,1) isin 01 { echo -a $+(&lt;,$me,@binon&gt;) $bin.decode($1-) }  
}

Re: Binary script #68456 19/01/04 02:42 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68457 19/01/04 03:07 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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

Last edited by Iori; 19/01/04 03:47 AM.
Re: Binary script #68458 19/01/04 03:16 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68459 19/01/04 03:18 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
o crap i just noticed someting everytime someone talks it adds a @binon after there name how do i fix lol.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68460 19/01/04 03:19 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
never mind my eyes are playing tricks.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68461 19/01/04 03:21 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68462 19/01/04 03:24 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
See my edit above, sorry 'bout that :[/b])

Re: Binary script #68463 19/01/04 03:25 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
chang it to what?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68464 19/01/04 03:27 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
to this
Code:
on $*^:text:/^[01 ]+$/:#:{
  echo -mbflirt # $+(&lt;,$nick,@binon&gt;) $bin.decode($1-)
  haltdef
}

Re: Binary script #68465 19/01/04 03:32 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
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.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: Binary script #68466 19/01/04 03:34 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
No probs. smile

Re: Binary script #68467 19/01/04 11:09 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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