mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 20
E
eger Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Mar 2004
Posts: 20
heya
i would like a script that would automaticly post (repeat) some text from few channels to a new channel
example we have 3 chan #chan1 #chan2 #chan3 and #targetchan
when a person on #chan1 would say" "trigger word" and some text after it" it would say it on #targetchan on #chan1 it was just said "trigger word" and some text after it"

hope i did not complicate it too much
tnx smile

Joined: Dec 2003
Posts: 219
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2003
Posts: 219
Hi!

If you check the mIRC's help and search for on TEXT, you'll find everything you need:

Code:
/set %channel #chan1,#chan2,#chan3
/set %target #targetchan
/set %trigger trigger word *
; the "*" is needed

; and in the remote section :
on *:TEXT:%trigger:%channel:{
  /msg %target $nick has said $1- on channel $chan
}


Joined: Mar 2004
Posts: 20
E
eger Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Mar 2004
Posts: 20
thanks works nice but i have spoted a problem
some text has colors or is bold and its not included
how would i solve that ?

Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Code:
/set %channel #chan1,#chan2,#chan3
/set %target #targetchan
/set %trigger trigger word *
; the "*" is needed
; and in the remote section:
on *:TEXT:*:%channel:{
  if ( %trigger !iswm $strip($1-) ) { return }
  /msg %target $nick has said $1- on channel $chan
}


try that

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Why is the * needed? smile

Thanks, Zyzzy.


"All we are saying is give peace a chance" -- John Lennon
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Needed where?

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
/set %trigger trigger word [color:red]*[/color]


There smile


"All we are saying is give peace a chance" -- John Lennon
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
replace "trigger word" with the word that is to trigger it.. "*" means "anything" that matches after it. It's a wildcard.

trigger: hello *
hits: hello out there, hello all

trigger: howdy (without the *)
hit: howdy
NON hits: howdy (with a space or ANYTHING else after the word "howdy")

it's necessary for it to work properly.
smile
iswm = is wild match

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Oh, i see... *duh*

Thanks! laugh

Zyzzy.


"All we are saying is give peace a chance" -- John Lennon
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
no "duh" to it. I learn stuff here that I look back at it and smack myself saying, "duh! - I should have known that!"

smile

It's no biggie.

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
laugh


"All we are saying is give peace a chance" -- John Lennon

Link Copied to Clipboard