mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 3
L
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Aug 2004
Posts: 3
Hi Guys,

First of all i´ve never done a mirc script myself before but i wanted to ask if the following is possible.

I´d like to have some script that ignores a certain Character (I want it to ignore the Char ^) in Chat so it doesn´t even shows up when others type it.

So when someone types "Hello ^^" i want it to read "Hello" for me.

Is such a script possible and can summon gimme a hand on this?

Greetings

Lairfight

Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788

On ^*:Text:*:#:{
echo $color(normal) $chan $+(<,$nick,>) $remove($1-,^)
haltdef
}


Wont trigger when YOU talk, just others.

Eamonn.

Joined: Aug 2004
Posts: 3
L
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Aug 2004
Posts: 3
Wow thank you smile

May i ask you again if it´s possible to replace text too - like if someone writes "löl" (umlaut) to replace it with an single "lol"

Thanks again for the fast reply

LairFight


Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Replacing the text as well becomes a tad more complex.

On ^*:Text:*:#:{
[color:red]var %repline = lol^laughing out loud,moo^m00h

var %i = $numtok(%repline,44)
; Counts the number commas(items) in the variable defined above.
var %str = $remove($1-,^)
; Removes the ^ from the persons string and sets the sentence to a variable, %str
while (%i) {
; This loops around all the items in %repline
var %o = $wildtok(%str,$gettok($gettok(%repline,%i,44),1,94),0,32)
; This checks how many of a certain word are in the sentence, and as a result, how many times to replace.
while (%o) {
; Loops the above number of times.
var %str = $reptok(%str,$gettok($gettok(%repline,%i,44),1,94),$gettok($gettok(%repline,%i,44),2,94),32)
; replaces %str replacing the specific word with its replacements.
dec %o
; Decreases the loop so mIRC doesnt freeze.
}
; Ends the loop.
dec %i
; Decreases the other loop.
}
echo $color(normal) $chan $+(<,$nick,>) %str
; Outputs the final result.
haltdef
; Halts mIRCs default line from appearing.
}
[/color]

You need to edit the red line accordingly, in the format:

[ORIGINAL]^[REPLACEMENT],[ORIGINAL]^[REPLACEMENT],[ORIGINAL]^[REPLACEMENT],[ORIGINAL]^[REPLACEMENT],[ORIGINAL]^[REPLACEMENT],ect.

Eamonn.

Joined: Aug 2004
Posts: 3
L
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Aug 2004
Posts: 3
I´ll try that, thanks great forum here. :-)

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Just one thing, you should change "echo $color(normal) $chan $+(<,$nick,>) %str" to

  • echo -mbflirtc normal $chan $+(<,$nick,>) %str
to take advantage of mIRCs timestamp|highlight|strip|beep|flash|indent|switbutton coloring etc. See /help /echo for info on the -mbflirtc switches.
You can also omit the "c normal".

Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
"can" not "should" change, and you can omit all the flags if one chooses.

Eamonn.


Link Copied to Clipboard