mIRC Home    About    Download    Register    News    Help

Print Thread
#75236 14/03/04 10:00 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
Hi guys you probly remember me before asking about how to have my name <nick@binison> when someone talks in binary well i finaly finished a few vershions of it. Now I have a problem. People can all see what me and another person are saying in Binary can someone help me so a dialog box comes up and askes how you want your binary to be displayed and you have to type in like inverted or something along that line mix it up a bit anyone got any ideas ill post the code up here in a few mins if no one posts anything that helps.

#75237 14/03/04 10:18 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
ok here is the full code help me out in any way you can please thanks.

Quote:

;###########################
;# Binary God V2.0 #
;# Made by DeathfireD 1/3/04 #
;###########################
;[binclock]
alias bc.start {
.timerbc -m 0 100 bc.drawtime
window -pk0od +ft @BinaryClock -1 -1 260 104
}

alias bc.drawtime {
if ($window(@BinaryClock) == $null) {
.timerbc off
halt
}
drawrect -nf @BinaryClock 0 1 1 1 180 200

set %bc.tfmt 243434444
set %bc.i 1

while (%bc.i <= $len(%bc.tfmt)) {
set %bc.z $mid(%bc.tfmt, %bc.i, 1)
while (%bc.z) {
bc.bit $bc.getbit(%bc.i, %bc.z) %bc.i %bc.z
dec %bc.z
}
inc %bc.i
}

bc.drawblobs
; Update the display
drawdot @BinaryClock

;drawtext @BinaryClock 4 Arial 10 10 65 $time - $gettok($calc($ticks / 1000),2,$asc(.))
unset %bc.*
}

alias bc.bit {
set %bc.active 2
if ($1 == 1) set %bc.active 4
set %bc.dist 0

if ($2 > 2) inc %bc.dist 20
if ($2 > 4) inc %bc.dist 20
if ($2 > 6) inc %bc.dist 20

inc %bc.dist $calc(($2 * 20) - 10)
set %bc.top $calc(70 - ($3 * 15))
drawrect -nf @BinaryClock %bc.active 1 %bc.dist %bc.top 10 10
}

alias bc.drawblobs {
drawrect -nf @BinaryClock 2 1 52 20 5 5
drawrect -nf @BinaryClock 2 1 52 45 5 5
drawrect -nf @BinaryClock 2 1 112 20 5 5
drawrect -nf @BinaryClock 2 1 112 45 5 5
drawrect -nf @BinaryClock 2 1 172 20 5 5
drawrect -nf @BinaryClock 2 1 172 45 5 5
}

alias bc.getbit {
if ($1 <= 6) {
set %bc.time $left($time,2) $+ $mid($time,4,2) $+ $right($time,2)
set %bc.val $mid($revstr($base($mid(%bc.time,$1,1),10,2)), $2, 1)
}
else {
set %bc.time $gettok($calc($ticks / 1000),2,$asc(.))
set %bc.val $mid($revstr($base($mid(%bc.time,$calc($1 - 6),1),10,2)), $2, 1)
}
if (%bc.val == $null) set %bc.val 0
return %bc.val
}

;reverse a string. used to reverse the bits into an easier order to 'use' them
alias revstr {
set %bc.str $len($1)
set %bc.ret
while (%bc.str) {
set %bc.ret %bc.ret $+ $mid($1, %bc.str,1)
dec %bc.str
}
return %bc.ret
}

menu channel,status {
Binary
.Binary Clock: bc.start
}
;[Bingod starts here]
dialog bin2new {
title "Binary God V2.0"
size -1 -1 160 120
option dbu
box "Binary God V2.0", 1, 1 3 157 114
edit "================================================Binary God V2.0 By: DeathfireD ================================================Special thanks to the mIRC.com message board team and Gene from okatu-chat. Without them I wouldent have gotten the script done and tested. If you feel you can help in anyway click the send feedback button and tell me what you can do/fix.", 2, 6 13 148 59, read multi
button "Exit", 3, 6 107 37 7, ok
link "www.o-cmembers.cjb.com", 4, 88 107 65 8
text "Please send me your feedback.", 5, 42 73 77 8
button "Click to Send me feedback", 6, 48 83 68 7
}
alias bin2new { dialog -md bin2new bin2new }

on *:dialog:bin2new:sclick:*:{
if $did == 6 { run mailto:DJOrdway@adelphia.net?subject=Binary God v1.0 input }
if $did == 4 { run http://www.o-cmembers.cjb.net }
}
alias bin.decode {
var %temp = $1-

var %output
while (%temp) {
var %char = $chr($base($left(%temp,8),2,10))

%output = %output $+ $iif(%char == $chr(32),$chr(1),%char)
%temp = $right(%temp,-8)
}

return $replace(%output,$chr(1),$chr(32))
}

alias bin.encode {
var %output
var %temp = $1-

while (%temp) {
%output = %output $+ $base($asc($left(%temp,1)),10,2,8)

%temp = $right(%temp,-1)
}

return %output
}
menu channel,Query {
-
binary
.Say Something in Binary:.msg # $bin.encode($$input(Enter your text.,e)) | echo -a < $+ $me $+ @binon> $!
.Info About Binary God
..about:/bin2new
}
menu Status {
-
Binary
..Info About Binary God
...about:bin2new
}
on 1:INPUT:?:{
if $left($1,1) isin 01 {
.msg # $1-
echo -a $+(<,$me,@binon>) $bin.decode($1-)
halt }
}
on *:INPUT:#:{
if $left($1,1) isin 01 {
.msg # $1-
echo -a $+(<,$me,@binon>) $bin.decode($1-)
halt }
}
on $1^:text:/^[01 ]+$/:?:{
echo -mbflirt $nick $+(<,$nick,@binon>) $bin.decode($1-)
haltdef
}
on $*^:text:/^[01 ]+$/:#:{
echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($1-)
haltdef
}
on 1:LOAD:/echo 12Binary God V2.0 Script By DeathfireD Loaded!
on 1:UNLOAD:/echo 4Binary God V2.0 Script By DeathfireD Unloaded!
}

#75238 15/03/04 05:00 PM
Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
It can be fun to talk in binary. Most people will not understand what you tell each other, but those who know what they are doing will be able to decode it. If you really want privacy in your conversations, either talk in a private chat or use a "strong encryption" to make your texts unreadable to those who don't know your secret key. See this Blowfish addon for an example:
http://www.mircscripts.org/comments.php?id=1591

#75239 15/03/04 07:44 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
ok you really dident read my first post. Im looking to do the same thing only in binary though. I want a magic key type thing like that so you can type in like encript "3" Decript "3" and just start talking and have it do it for me. any ideas on how to do that in my script that i have made? and any other ideas on how to make this all better. thanks


Link Copied to Clipboard