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.