mIRC Home    About    Download    Register    News    Help

Print Thread
#239004 17/09/12 12:23 AM
Joined: Sep 2012
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Sep 2012
Posts: 10
I want if someone type Hello you . That i response to that.

on *:TEXT:*Hello you .*:#: {
/msg $chan texttexttextt.

Someone can help me to response on a sense.

Joined: Sep 2012
Posts: 6
X
Xar Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
X
Joined: Sep 2012
Posts: 6
That code works fine...

Xar #239006 17/09/12 01:09 AM
Joined: Sep 2012
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Sep 2012
Posts: 10
But if someone types Hello you . with space it doesnt work.

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
That code only work if the string "hello you ." is somewhere in the line, if you don't want the space, don't put it..


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #239027 17/09/12 05:43 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I believe it's "everywhere" in the line.

Joined: Sep 2012
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Sep 2012
Posts: 10
Yes but it doesnt respond if someone write it but when i do it without space than it wil response

Code like this

Code:
on *:TEXT:*Hello you .*:#: {
  /msg $chan texttexttextt. veremicem $chan  . 
}
on *:TEXT:*Whenever say this than respond*:#: {
  .timermsg 1 $rand(4,15) /msg $chan ok i respond
}

Etc. etc.

Last edited by BlaDieBLa; 17/09/12 06:47 PM.
Joined: Sep 2012
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Sep 2012
Posts: 10
New i was thinking i the problem the $rand array. Or does $rand stand for random, i think it's my timer . Any one ?

Joined: Sep 2012
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Sep 2012
Posts: 10
^^

Joined: Sep 2012
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Sep 2012
Posts: 10
Code:
on *:TEXT:*Hello you .*:#: {
  /msg $chan texttexttextt. veremicem $chan  . 
}
on *:TEXT:*Whenever say this than respond*:#: {
  /msg $chan ok i respond
}


This works now, how do i add a random timer(delay) between 2 and 6 seconds ?

Last edited by BlaDieBLa; 18/09/12 09:03 PM.
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Originally Posted By: BlaDieBLa
This works now, how do i add a random timer(delay) between 2 and 6 seconds ?
You already know it judging upon the post you've made above. Use $rand(2,6) or $r(2,6) interchangeably.

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
"everywhere" would mean the string is only be composed of occurence of the string "hello you .", the wildcard at the start and at the end means that the string can appear anywhere in the line, but it has to be there.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Sep 2012
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Sep 2012
Posts: 10
Code:
.timermsg 1 $rand(4,15) /msg Answer.... 

like this ?


Link Copied to Clipboard