mIRC Home    About    Download    Register    News    Help

Print Thread
#114585 15/03/05 05:09 PM
Joined: Mar 2005
Posts: 4
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Mar 2005
Posts: 4
I've downloaded a fantastic script, which changes normal text to ascii when typing, problem is, I dont want it to echo me, when I change it, it repeates what i say in normal text and ascii both. I wish to stop this. Also, if Anyone knows how, id like to try and make it so it only puts ascii text between " " in actions.
Here is the main part of the ascii script below.

on 1:input:*:{

.set %encode $1-
.say 5 $replace(%encode,a,å,b,ß,e,ê,y,¥,i,í,n,ñ,?,¿,o,$chr(248),f,$chr(131),t,$chr(134),c,$chr(162),s,$chr(167),u,û)
.halt
}

#114586 15/03/05 08:59 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Search your scripts for another ON INPUT if mirc is saying your text twice its likely there is another script also saying your text.

And try replacing the code you showed with this one. ascii only text between " " marks.

Code:
on 1:input:*:{
  .set %encode . $replace($1-,",")
  var %i = 2
  while (%i <= $numtok(%encode,34) {
    .set %encode $puttok(%encode, $replace($gettok(%encode,%i,34),a,å,b,ß,e,ê,y,¥,i,í,n,ñ,?,¿,o,$chr(248),f,$chr(131),t,$chr(134),c,$chr(162),s,$chr(167),u,û) ,%i,34)
    inc %i 2
  }
  .say  5 $replace($mid(%encode,3),",")
  .set %encode $1-
  ;^ this line added incase some other script uses %encode sicne its a /set
  .halt
}


* untested *

#114587 15/03/05 09:08 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Hi Dave,

while (%i <= $numtok(%encode,34)) {

smile

#114588 15/03/05 09:28 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Errrr what?
Was that a correction , I may have edited it to that seconds after posting it, i do that a few times when i see little bugs after a post. Any later and ill mark as edited.

Actually I had originally deliberitly put < since the last token wouldnt actually be between " " but just following a " but then i thought, no thats just gonna make it look silly.

#114589 15/03/05 10:05 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sorry, yes it was a correction incase the original poster came back and inserted in the code without the closing bracket. My apologies.

-Andy

#114590 15/03/05 11:06 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
lol its still in there, i thought you were commenting on the < i changed to <= , I didnt even notice the missing close ) , oh well to late to edit now.

#114591 15/03/05 11:20 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I did put the closing ) in red. smile

I wouldn't of noticed the < to <= I'm too slow. :tongue:

#114592 16/03/05 02:53 AM
Joined: Mar 2005
Posts: 4
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Mar 2005
Posts: 4
Thanks for the help smile


*Poof*
#114593 16/03/05 03:25 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You should really thank Dave, he did the coding. I was his eyes and ears. And mouth if I get hungry.

#114594 16/03/05 04:06 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
I did put the closing ) in red. smile


I just went back and squinted real hard, then adjusted the color ratio on my monitor and can just see its red now.

PS : (no joke) I have a color deficiency in the red/blue spectrum that makes alot of colors appear darker, so that red looked black to me frown
( Made work buy orange markers for highlighting bugs because I couldnt read the code under the red ones. )

#114595 16/03/05 05:09 PM
Joined: Mar 2005
Posts: 4
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Mar 2005
Posts: 4
o.o that sucks about the colors. and thanks dave ^-^


*Poof*

Link Copied to Clipboard