|
Joined: Jan 2003
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2003
Posts: 237 |
how can I Convert text? lke heres an example:
Right Click>Convert Text
open a pop up titled "Text To Convert:" and whatever I put into that text box, will be read, and the letters will be changed accordingly, and then the new message (the converted one) will be displayed. Does anybody know what im talking about? lol
;Check for Life if (%life == $null) { goto getlife }
|
|
|
|
Joined: Dec 2002
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 332 |
you could set a %var to $$?="text to convert:" then use $replace to change what you want ? if thats not what yer lookin for can you be more specific ?
|
|
|
|
Joined: Jan 2003
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2003
Posts: 237 |
set %temp $?="Convert Text:" ;replace a with 1, be with 2, c with 3... etc convert %temp echo %temp
so if i enterd abc; it would echo 123
;Check for Life if (%life == $null) { goto getlife }
|
|
|
|
Joined: Dec 2002
Posts: 54
Babel fish
|
Babel fish
Joined: Dec 2002
Posts: 54 |
I think this is what you want:
set %temp $replace($$?="Convert text",a,1,b,2,c,3)
|
|
|
|
Joined: Dec 2002
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 332 |
not sure if this is what you want or not ? but this is what i was meaning
Menu Channel {
Text Conversion
.Convertor {
set %ttc $$?="Convert Text:"
if ( a isin %ttc ) { set %ttc $replace(%ttc,a,1) }
if ( b isin %ttc ) { set %ttc $replace(%ttc,b,2) }
if ( c isin %ttc ) { set %ttc $replace(%ttc,c,3) }
say %ttc
}
}
if i want to be cool i would learn my abc's would come out like this if i w1nt to 2e 3ool i would le1rn my 123's hope that helps
|
|
|
|
Joined: Jan 2003
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2003
Posts: 237 |
yes thats exactally what i want, thanks
;Check for Life if (%life == $null) { goto getlife }
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
By the way, mircscripts.org has a few nice talkers, if you wanna try. I especially loved the 'drunk talker'.
|
|
|
|
Joined: Dec 2002
Posts: 1,237
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,237 |
I seen that talker. What exactly does that do? I was actually afraid to download it because I wasn't sure what it did. Could you explain?
|
|
|
|
Joined: Dec 2002
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 332 |
ah i might have a look but i built my own was one of the first things i scripted thx one of these days when i figure out regex i could probably condense it quite a bit .. lol
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
Not too difficult, just paste the 'Drunk Talker' into mIRC remote and type /dr <text> in the channel... you'd love the result :tongue:. It doesn't use an on Input event, so your messages will not be interrupted at all.
|
|
|
|
Joined: Dec 2002
Posts: 1,237
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,237 |
Ok I will check it out. Its hilarious you say?
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
I love regex because it usually shortens code, and makes it faster. If you want to learn it you can start here. man.txt is also a great reference.
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
|
|
|
|
Joined: Jan 2003
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2003
Posts: 237 |
//xrn0id decode Menu Channel { tExT cRiPt .EnCrIpT tExT { set %ttc $$?="EnCrIpT tExT:" if ( a isin %ttc ) { set %ttc $replace(%ttc,a,%) } if ( b isin %ttc ) { set %ttc $replace(%ttc,b,!) } if ( c isin %ttc ) { set %ttc $replace(%ttc,c,&) } if ( d isin %ttc ) { set %ttc $replace(%ttc,d,^) } if ( e isin %ttc ) { set %ttc $replace(%ttc,e,@) } if ( f isin %ttc ) { set %ttc $replace(%ttc,f,*) } if ( g isin %ttc ) { set %ttc $replace(%ttc,g,f) } if ( h isin %ttc ) { set %ttc $replace(%ttc,h,4) } if ( i isin %ttc ) { set %ttc $replace(%ttc,i,u) } if ( j isin %ttc ) { set %ttc $replace(%ttc,j,6) } if ( k isin %ttc ) { set %ttc $replace(%ttc,k,2) } if ( l isin %ttc ) { set %ttc $replace(%ttc,l,a) } if ( m isin %ttc ) { set %ttc $replace(%ttc,m,3) } if ( n isin %ttc ) { set %ttc $replace(%ttc,n,g) } if ( o isin %ttc ) { set %ttc $replace(%ttc,o,u) } if ( p isin %ttc ) { set %ttc $replace(%ttc,p,7) } if ( q isin %ttc ) { set %ttc $replace(%ttc,q,1) } if ( r isin %ttc ) { set %ttc $replace(%ttc,r,9) } if ( s isin %ttc ) { set %ttc $replace(%ttc,s,4) } if ( t isin %ttc ) { set %ttc $replace(%ttc,t,m) } if ( u isin %ttc ) { set %ttc $replace(%ttc,u,8) } if ( v isin %ttc ) { set %ttc $replace(%ttc,v,5) } if ( w isin %ttc ) { set %ttc $replace(%ttc,w,z) } if ( x isin %ttc ) { set %ttc $replace(%ttc,x,x) } if ( y isin %ttc ) { set %ttc $replace(%ttc,y,w) } if ( z isin %ttc ) { set %ttc $replace(%ttc,z,6) } say %ttc unset %ttc } .DeCrIpT tExT { set %ttc $$?="DeCrIpT tExT:" if ( $chr(37) isin %ttc ) { set %tcc $replace(%ttc,$chr(37),a) } if ( $chr(33) isin %tcc ) { set %tcc $replace(%ttc,$chr(33),b) } if ( $chr(38) isin %tcc ) { set %tcc $replace(%ttc,$chr(38),c) } say %ttc unset %ttc }
so why does that do this?
abc > %!&
%!& > %!& (donst cover to abc)
;Check for Life if (%life == $null) { goto getlife }
|
|
|
|
Joined: Dec 2002
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 332 |
try just using %,!,& instead of the $chr
|
|
|
|
Joined: Jan 2003
Posts: 237
Fjord artisan
|
OP
Fjord artisan
Joined: Jan 2003
Posts: 237 |
that was my first try, and it did the same thing
;Check for Life if (%life == $null) { goto getlife }
|
|
|
|
Joined: Dec 2002
Posts: 1,321
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,321 |
You are also replacing some characters with characters that will, themselves, be replaced later. *tsk tsk tsk*
DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
|
|
|
|
|