|
Joined: Oct 2003
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Oct 2003
Posts: 143 |
ok lol i know i post to much on here for help sorry ^^;; well anyway I have this binary script i have been making and updating thanks to the help of you guys and others I know. well the other day I noticed I have a bug anytime I type a number say 1 or 23 it shows up as <nick@binon> when i dident type any binary in. The reason for that is becuse its set up to look at the first word the person uses and say if its binary or not now i tryed adding a - before the binary so it shows - 010101011 and i tryed changing it to look at the 3rd ($3-) line wich would be the 010101011 but it still dident work so here im posting the code for that part of the add-on if you guys can help me somehow add in a - before the binary and then some home make it so someone els with the add-on can see what it is please help here is the code. menu channel {
-
binary
.Binary God Keys:/bincript4
.Say Something in Binary:.msg # [color:red] -[/color] $bin.encode($$input(Enter your text.,e)) | echo -a < $+ $me $+ @binon> $!
.Binary Clock: bc.start
..&info
...&thankz: thankz
...&author: autor
...&info: Bingotinfo
..-
..&unload:unload -rs binarygodv3.0.mrc
}
menu Status {
-
Binary
.Binary God Keys:/bincript4
.Binary Clock: bc.start
..&info
...&thankz: thankz
...&author: autor
...&info: Bingotinfo
..-
..&unload:unload -rs binarygodv3.0.mrc
}
on *:INPUT:#:{
[color:red] if $left($2,1) isin 01 {
.msg # $1-
echo -a $+(<,$me,@binon>) $bin.decode($2-)
halt }
}
on $*^:text:/^\d+$/:#:{
echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($1-)[/color]
haltdef
} im sorry if i dident make sence lol. ask Q's and ill tell you more.
if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
|
|
|
|
Joined: Aug 2003
Posts: 325
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 325 |
on *:INPUT:#:{
if ($remove($1-,0,1)) { return }
echo -a $+(<,$me,@binon>) $bin.decode($1-)
.msg # $1- | halt
}
}
on $*^:text:/^[01]+$/:#:{
echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($1-)
haltdef
} Try that out and see if that works for ya.
|
|
|
|
Joined: Oct 2003
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Oct 2003
Posts: 143 |
hmmm well I dont think you notice the - in the code above it its small. basicly im trying to get the - before the binary so it wont get in the way of normal numbers.
so when I use the Say something in Binary command it will add the - before it. .Say Something in Binary:.msg # - $bin.encode($$input(Enter your text.,e)) | echo -a < $+ $me $+ @binon> $!
and i want it somehow to only read binary if it has - before it.
so basicly when i hit Say something in binary it will shoot out - 01010101 and if i just type like 1 or 0 or any number the input command wont mistake it for binary. do you get what im saying? lol im not shore what you where getting at with what you posed.
if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
|
|
|
|
Joined: Aug 2003
Posts: 325
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 325 |
on *:INPUT:#:{
if (- == $1 && $remove($2-,0,1)) { return }
echo -a $+(<,$me,@binon>) $bin.decode($2-)
.msg # $1- | halt
}
}
on $*^:text:/^-\s[01]+$/:#:{
echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($2-)
haltdef
} Try that out and see if that works for ya.
|
|
|
|
Joined: Oct 2003
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Oct 2003
Posts: 143 |
hmm dident work
ahhh now i cant type any numbers with out it saying <nick@binon> ROFL.
Last edited by DeathfireD; 13/05/04 03:24 AM.
if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
|
|
|
|
Joined: Aug 2003
Posts: 325
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 325 |
OOPS Sorry.... on *:INPUT:#:{
if (- != $1 || $remove($2-,0,1)) { return }
echo -a $+(<,$me,@binon>) $bin.decode($2-)
.msg # $1- | halt
}
}
on $*^:text:/^-\s[01]+$/:#:{
echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($2-)
haltdef
} Try that out and see if that works for ya.
|
|
|
|
Joined: Oct 2003
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Oct 2003
Posts: 143 |
haha one thing works now and the other dosent. ok well i can type numbers and it dosent show the <nick@binon> anymore but i still cant translate the binary. so far this is what i have from all the changes. its still not working. menu channel {
-
binary
.Binary God Keys:/bincript4
.Say Something in Binary:.msg # - $bin.encode($$input(Enter your text.,e)) | echo -a < $+ $me $+ @binon> $!
.Binary Clock: bc.start
..&info
...&thankz: thankz
...&author: autor
...&info: Bingotinfo
..-
..&unload:unload -rs binarygodv3.0.mrc
}
menu Status {
-
Binary
.Binary God Keys:/bincript4
.Binary Clock: bc.start
..&info
...&thankz: thankz
...&author: autor
...&info: Bingotinfo
..-
..&unload:unload -rs binarygodv3.0.mrc
}
on *:INPUT:#:{
if (- != $1 || $remove($2-,0,1)) { return }
echo -a $+(<,$me,@binon>) $bin.decode($2-)
.msg # $1- | halt
}
}
on $*^:text:/^-\s[01]+$/:#:{
echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($2-)
haltdef
}
if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
|
|
|
|
Joined: Aug 2003
Posts: 325
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 325 |
Dang it, I seem to be prone to booboos tonight, sorry... on *:INPUT:#:{
if (- != $1 || $remove($2-,0,1)) { return }
echo -a $+(<,$me,@binon>) $bin.decode($2-)
.msg # $1- | halt
}
on $*^:text:/^-\s[01]+$/:#:{
echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($2-)
haltdef
} THAT should do it.
|
|
|
|
Joined: Oct 2003
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Oct 2003
Posts: 143 |
lol OH mother of god. Well what you did works great but ya i tryed using one of my custom encription keys and ya it dosent work i get
[11:50] <asdasd> - 000002520000024500000321000000520000031200000252000002450000031000000245
lol hmm if you know whats wrong feel free to fix lol if you want i can send you the code to look threw.
if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
|
|
|
|
Joined: Aug 2003
Posts: 325
Fjord artisan
|
Fjord artisan
Joined: Aug 2003
Posts: 325 |
You said binary, and binary is nothing but 0's and 1's, so it's restricted to that. If you want it to be all decimals (0's 1's 2's etc to 9's)... on *:INPUT:#:{
if (- != $1 || $regex($2-,/\D+/)) { return }
echo -a $+(<,$me,@binon>) $bin.decode($2-)
.msg # $1- | halt
}
on $*^:text:/^-\s\d+$/:#:{
echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($2-)
haltdef
} THAT should do it.
|
|
|
|
Joined: Oct 2003
Posts: 143
Vogon poet
|
OP
Vogon poet
Joined: Oct 2003
Posts: 143 |
you truly are the best. thanks so much
and yes it is in binary till you type in encription keys then it changes it up a bit to confuse people.
Im also making it to the binary gets mixed with hex and then inverted gonna take a few weeks but should finish it. Ill add you in my special thanks dialog for the add-on you can get it on hawkee. its called Binary God should be updated soon. thanks for all your help again.
Hawkee better give me a 12 now lol they keep giving me 6's becuse of that bug you fixed lol. thanks you thanks you thanks you.
if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
|
|
|
|
|