mIRC Home    About    Download    Register    News    Help

Print Thread
#11457 16/02/03 05:14 AM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
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
}
#11458 16/02/03 05:23 AM
Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
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 ?

#11459 16/02/03 05:28 AM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
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
}
#11460 16/02/03 05:41 AM
Joined: Dec 2002
Posts: 54
L
laz Offline
Babel fish
Offline
Babel fish
L
Joined: Dec 2002
Posts: 54
I think this is what you want:

Code:
  
set %temp $replace($$?="Convert text",a,1,b,2,c,3)

#11461 16/02/03 05:42 AM
Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
not sure if this is what you want or not ? but this is what i was meaning
Code:
 
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

#11462 16/02/03 05:44 AM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
yes thats exactally what i want, thanks



;Check for Life

if (%life == $null) {
goto getlife
}
#11463 16/02/03 05:45 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
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'.

#11464 16/02/03 05:48 AM
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
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?

#11465 16/02/03 05:48 AM
Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
ah i might have a look but i built my own was one of the first
things i scripted smile thx
one of these days when i figure out regex i could probably condense it quite a bit .. lol

#11466 16/02/03 05:54 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
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.

#11467 16/02/03 05:58 AM
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
Ok I will check it out. Its hilarious you say?

#11468 16/02/03 05:58 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
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.

#11469 16/02/03 06:04 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
yea

#11470 16/02/03 06:29 AM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
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
}
#11471 16/02/03 06:36 AM
Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
try just using %,!,& instead of the $chr

#11472 16/02/03 06:55 AM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
that was my first try, and it did the same thing



;Check for Life

if (%life == $null) {
goto getlife
}
#11473 16/02/03 08:41 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
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

Link Copied to Clipboard