|
Joined: May 2005
Posts: 106
Vogon poet
|
OP
Vogon poet
Joined: May 2005
Posts: 106 |
i have the following script but it ain't work ing y
on 1:INPUT:#: {
if (Status !isin $active && $left($1-,1) != /) {
%chk = $1-
%chk = $replace(%chk,a,ä)
%chk = $replace(%chk,b,ß)
%chk = $replace(%chk,b,ß)
%chk = $replace(%chk,c,©)
%chk = $replace(%chk,d,D)
%chk = $replace(%chk,e,ë)
%chk = $replace(%chk,f,F)
%chk = $replace(%chk,g,¶)
%chk = $replace(%chk,h,h)
%chk = $replace(%chk,i,í)
%chk = $replace(%chk,j,j)
%chk = $replace(%chk,k,k)
%chk = $replace(%chk,l,£)
%chk = $replace(%chk,m,m)
%chk = $replace(%chk,n,ñ)
%chk = $replace(%chk,o,ó)
%chk = $replace(%chk,p,P)
%chk = $replace(%chk,q,q)
%chk = $replace(%chk,r,®)
%chk = $replace(%chk,s,¶)
%chk = $replace(%chk,t,t)
%chk = $replace(%chk,u,µ)
%chk = $replace(%chk,v,v)
%chk = $replace(%chk,w,w)
%chk = $replace(%chk,x,x)
%chk = $replace(%chk,y,¥)
%chk = $replace(%chk,z,z)
}
}
and thats the way the scout leader burns
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Try..
on 1:INPUT:*: {
if (Status !isin $active) && ($left($1-,1) != /) {
%chk = $1-
%chk = $replace(%chk,a,ä)
%chk = $replace(%chk,b,ß)
%chk = $replace(%chk,b,ß)
%chk = $replace(%chk,c,©)
%chk = $replace(%chk,d,D)
%chk = $replace(%chk,e,ë)
%chk = $replace(%chk,f,F)
%chk = $replace(%chk,g,¶)
%chk = $replace(%chk,h,h)
%chk = $replace(%chk,i,í)
%chk = $replace(%chk,j,j)
%chk = $replace(%chk,k,k)
%chk = $replace(%chk,l,£)
%chk = $replace(%chk,m,m)
%chk = $replace(%chk,n,ñ)
%chk = $replace(%chk,o,ó)
%chk = $replace(%chk,p,P)
%chk = $replace(%chk,q,q)
%chk = $replace(%chk,r,®)
%chk = $replace(%chk,s,¶)
%chk = $replace(%chk,t,t)
%chk = $replace(%chk,u,µ)
%chk = $replace(%chk,v,v)
%chk = $replace(%chk,w,w)
%chk = $replace(%chk,x,x)
%chk = $replace(%chk,y,¥)
%chk = $replace(%chk,z,z)
}
msg $active %chk
halt
}
-Andy
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
on 1:INPUT:#: {
if (Status !isin $active && $left($1-,1) != /) {
%chk = $1-
%chk = $replace(%chk,a,ä)
%chk = $replace(%chk,b,ß)
%chk = $replace(%chk,b,ß)
%chk = $replace(%chk,c,©)
%chk = $replace(%chk,d,D)
%chk = $replace(%chk,e,ë)
%chk = $replace(%chk,f,F)
%chk = $replace(%chk,g,¶)
%chk = $replace(%chk,h,h)
%chk = $replace(%chk,i,í)
%chk = $replace(%chk,j,j)
%chk = $replace(%chk,k,k)
%chk = $replace(%chk,l,£)
%chk = $replace(%chk,m,m)
%chk = $replace(%chk,n,ñ)
%chk = $replace(%chk,o,ó)
%chk = $replace(%chk,p,P)
%chk = $replace(%chk,q,q)
%chk = $replace(%chk,r,®)
%chk = $replace(%chk,s,¶)
%chk = $replace(%chk,t,t)
%chk = $replace(%chk,u,µ)
%chk = $replace(%chk,v,v)
%chk = $replace(%chk,w,w)
%chk = $replace(%chk,x,x)
%chk = $replace(%chk,y,¥)
%chk = $replace(%chk,z,z)
msg $active %chk
halt
}
} hehe Snooop's code  -EDIT- Argh, Andy beat me :tongue:
Last edited by xDaeMoN; 11/07/05 02:41 AM.
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
You guys know you can do multiple replacements in one $replace call, right?
Also there's no point in replacing a string with the same string, like with t, v, x etc.
say $replace($1-,a,ä,b,ß,c,©,d,D,e,ë,f,F,g,¶,i,í,l,£,n,ñ,o,ó,p,P,r,®,s,¶,u,µ,y,¥)
Gone.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Yes, but I didn't want to sit here doing the whole $replace() call, I saw it best to just add in the actual /MSG command.  -Andy
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
There's an error in your code btw, you're setting %chk to $1- only if the if condition was satisfied. However you've put the msg part out of that if statement, which means if the if statement wasnt satisfied, it will either msg $null or the previous value of %chk, which I'm sure he doesnt want 
Gone.
|
|
|
|
Joined: May 2005
Posts: 106
Vogon poet
|
OP
Vogon poet
Joined: May 2005
Posts: 106 |
yep good old snoop can never make a thing work jk
and thats the way the scout leader burns
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
Since were all having shoots at each other ill join in! Can i ask a question? Well actually im going to anyway. Why is it that you dont want it to work in channels with the word Status in them ? Thats a pretty wierd restriction? <snicker snicker> umm what else can i have a go at //tokenize 32 this is a test | say $replace($1-,a,ä,b,ß,c,©,d,D,e,ë,f,F,g,¶,i,í,l,£,n,ñ,o,ó,p,P,hk,r,®,s,¶,u,µ,y,¥) * Invalid parameters: $replace ummm umm ok someone find the holes in this.... (there is one) on *:input:#:{ input.event $1- } | ; remove if not wanted in this event
on *:input:?:{ input.event $1- } | ; remove if not wanted in this event
on *:input:=:{ input.event $1- } | ; remove if not wanted in this event
on *:input:!:{ input.event $1- } | ; remove if not wanted in this event
alias -l input.event {
if ((!$halted) && (!$ctrlenter) && (!$inpaste) && (!$istok(/ $readini($mircini, text, commandchar), $left($1, 1), 32))) {
say $replace($1-,a,ä,b,ß,c,©,d,D,e,ë,f,F,g,¶,i,í,l,£,n,ñ,o,ó,p,P,r,®,s,¶,u,µ,y,¥)
haltdef
}
}
|
|
|
|
|