mIRC Homepage
Posted By: BanJirian Need some help here - 11/10/06 01:56 PM
I just wanna request an input script that looks like this.

nick on #

abcd
samplenick
anothernick

if my msg to chan contain $nick on channel it will change like this

<frog> hi ~abcd[x] how are you?
<frog> frog slaps ~samplenick[x] with large thumb
<frog> -anothernick- this is notice for ~anothernick[x]

one more .. Is it possible to use in in query too? thanks
thanks ..
Posted By: SCNDRL Re: Need some help here - 11/10/06 03:12 PM
like this
Code:
on *:input:#:{
  if ($readini(mirc.ini,text,commandchar) !isin $1) {
    var %i 1,%q
    while $gettok($1-,%i,32) {
      if ($v1 ison $chan) { 
        %q = %q $+(~,$v1,[x])
      }
      else { %q = %q $v1 }      
      inc %i
    }
    msg $chan %q  
    haltdef  
  }
  if ($istok(/notice /me /ame /amsg,$1,32)) {
    var %i 1,%q
    while $gettok($2-,%i,32) {
      if ($v1 ison $chan) { 
        %q = %q $+(~,$v1,[x])
      }
      else { %q = %q $v1 }      
      inc %i
    }
    $1 $chan %q  
    haltdef  
  }
}
© mIRC Discussion Forums