|
Joined: Feb 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Feb 2005
Posts: 74 |
Please help! I need a script which can makes in the sentence a to apa, e to epe, i to ipi, o to opo and u to upu.. There's example: LITTLE to LIPITTLEPE , ARNOLD to APARNOPOLD and other words..
And i have one more problem: If someone writes !names a,b,c,d,e,f,g need to write the names in txt file like that File.txt: a b c ....
[color:red]m[color:blue]IRC[color:green] for EvEr
|
|
|
|
Joined: Dec 2004
Posts: 81
Babel fish
|
Babel fish
Joined: Dec 2004
Posts: 81 |
Your first question, you want it for when you type a sentence or when a user types a sentence? Your second question:
on *:TEXT:!names *:#channel:{
if ($numtok($2-,44)) {
var %idx = 0
while (%idx < $numtok($2-,44)) {
inc %idx
write file.txt $gettok($2-,%idx,44)
}
}
}
You'll have to edit the code: #channel - replace with an actual channel name (eg, #blah) file.txt - replace with a filename of your choice
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
1.Hapah ipi upusepe topo tapalk lipikepe thipis whepen ipi wapas lipittlepe  //var %x = $regsub(Hah i use to talk like this when i was little,/([aouie]{1,2})/g,\1p\1,%t) | echo -a %t 2.
on *:TEXT:!names *:#channel:{
tokenize 44 $2-
while ($1) {
write file.txt $1
tokenize 32 $2-
}
}
}
$maybe
|
|
|
|
Joined: Feb 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Feb 2005
Posts: 74 |
and how can i make the real text in bold...
example: artis to apartipis
Last edited by SkyD; 10/12/05 04:32 PM.
[color:red]m[color:blue]IRC[color:green] for EvEr
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
You should really ask for all of it at once, and not ask for bolding after it was thought out without it
#1 usage $wierd.txt.addon(<your text here>)
alias wierd.txt.addon { return $iif($0,$+(,$replacexcs($1,a,apa,e,epe,i,ipi,o,opo,u,upu,A,APA,E,EPE,I,IPI,O,OPO,U,UPU),)) }
#2 usage someone types !names a,b,c,d,e,f
on *:text:!names *:*:{ tokenize 44 $2- | write file.txt $* }
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
Awwww I want to figure out regex solutions  :tongue:  Anways, here's a possible fix for the bold stuff, just make sure there's no bold in the text before. //var %x = $regsub(Hah i used to talk like this when i was little,/([aouie]{1,2})/g,\1p\1,%t) | echo -a $+(,%t,)
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
For 2. you can just do:
tokenize 44 $$2 write file.txt $*
EDIT: Just noticed DaveC already used that.
Gone.
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
//echo -a $replacexcs(three,a,apa,e,epe,i,ipi,o,opo,u,upu,A,APA,E,EPE,I,IPI,O,OPO,U,UPU),) should return threepee not threpeepe like it does, guess you can only know that if you talked like this yourself :P 1As kelder said make sure theres no bold infront so just strip it from the text you sent to the regex identifier //var %x = $regsub($strip($1-,b),/([aouie]{1,2})/g,\1p\1,%t) | echo -a $+(,%t,) 2Always outdone by DaveC or FiberOPtics this is getting old 
$maybe
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
//echo -a $replacexcs(three,a,apa,e,epe,i,ipi,o,opo,u,upu,A,APA,E,EPE,I,IPI,O,OPO,U,UPU),)
should return threepee not threpeepe like it does, guess you can only know that if you talked like this yourself :P So SkyD gave us incorrect directions? becuase three -> threepee is nothing like what he said he wanted. I also wasnt sur eif the P was ment to remain in the capatilization of the vowel.
|
|
|
|
|