mIRC Home    About    Download    Register    News    Help

Print Thread
#144328 09/03/06 08:41 AM
Joined: Mar 2006
Posts: 2
H
harvik Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
H
Joined: Mar 2006
Posts: 2
hello,

Well what i'm trying to do here is halt a script that i have on certain words... and it works fine

on &*:TEXT:*drown*:#kitemaking: /halt
on &*:TEXT:*high*:#kitemaking: /halt
on &*:TEXT:*jump*:#kitemaking: /halt

now i wanna club all these words in one command instead of the above .... so if the text line has drown or high or jump in it halts the script.

Thanks you

Any help is greatly appreciated

P.S.I'm not good at regex

#144329 09/03/06 08:54 AM
Joined: Feb 2006
Posts: 95
B
blk Offline
Babel fish
Offline
Babel fish
B
Joined: Feb 2006
Posts: 95
on &*:TEXT:*:#kitemaking:{
if (drown isin $1-) || (high isin $1-) || (jump isin $1-) {
halt
}
}

Im pretty sure...


-blk-
#144330 09/03/06 02:45 PM
Joined: Feb 2006
Posts: 11
P
Pikka bird
Offline
Pikka bird
P
Joined: Feb 2006
Posts: 11
What about this one?

Code:
on &*:TEXT:*:#kitemaking:{
var %x $strip($1-) , %i $numtok(%words,44)
  while (%i) {
    if ($gettok(%words,%i,44) iswm %x) || ($gettok(%words,%i,44) isin %x) {
     ;;command here
      return
    }
    dec %i
  }
}


Don't forget /set %words drown,high,jump


get more mIRC snipets, add-ons and scripts from http://www.oyr79.com/mirc
#144331 09/03/06 03:00 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Hi. When handing code out to people you should try to use correct, documented scripts. This includes using the = sign in /var: /var %var = value

#144332 20/03/06 07:29 AM
Joined: Mar 2006
Posts: 2
H
harvik Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
H
Joined: Mar 2006
Posts: 2
doesn't seem to be working frown

anyone who can help with a working code.

thank you.

#144333 20/03/06 08:13 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
There's nothing wrong with the code that blk provided in the very first reply to your question.
If it's not working, I suggest you tell us how you know it's not working, remembering that you can't initiate your own on text events. They have to be initiated by someone else.


Link Copied to Clipboard