mIRC Home    About    Download    Register    News    Help

Print Thread
#220954 04/05/10 02:34 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
is this right? i cant seem to make it work

Code:
on 1:INPUT:?:{
  if (lol isin $1-) { halt
    else /say *£aughing Out £oud*
  }
}


its like when i input " lol " it will be halted and instead of lol i will message " *£aughing Out £oud* "

sigbin #220956 04/05/10 03:59 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
Code:
on 1:INPUT:?:{
  if (lol isin $1-) { halt
    else /say *£aughing Out £oud*
  }
}


That halts if there's a match. If you WANT it to do the custom laughing out loud, you'd need:

Code:
on 1:INPUT:?:{
  if (lol isin $1-) { /say *£aughing Out £oud* }
}


you have 1 condition with 2 commands and the first one is HALT, that will NEVER fire off like that


Those who fail history are doomed to repeat it
landonsandor #220958 04/05/10 06:16 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Your code will result in:
Quote:
<nick> *£aughing Out £oud*
<nick> that is funny lol


I will recommend you do it like so:
Code:
on *:input:*:{
  if ((/* !iswm $1) && (!$ctrlenter) && (!$inpaste)) {
    say $replace($1-,lol,*£aughing Out £oud*) | halt
  }
}
This will correctly result in:
Quote:
<nick> that is funny *£aughing Out £oud*

Tomao #220961 04/05/10 06:38 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz for the help people... very much appreciated

but i noticed when i change "lol" to brb it wont work? how come?


sigbin #220963 04/05/10 07:29 AM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
For example:
Code:
on *:input:*:{
  if ((/* !iswm $1) && (!$ctrlenter) && (!$inpaste)) {
    say $replace($1-,lol,*£aughing Out £oud*,be right back,brb) | halt
  }
}
This will change "be right back" to "brb"

Tomao #220977 04/05/10 12:13 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I think the OP probably wants brb to change to be right back rather than the other way around.

To the OP, in the previous code, just swap brb and be right back around.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #220979 04/05/10 12:31 PM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
I think his real problem is that he's copying the complete on INPUT event, which causes a duplicate script.

5618 #220980 04/05/10 12:37 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
True. I was just pointing out the correction for what was given so the OP doesn't try it and think that brb isn't working still.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard