mIRC Homepage
Posted By: sotdyeti Scripting help - 12/04/10 04:29 AM

Was wondering if someone could help me? Someone told me about using a script so that when you typed certain key words mIRC would display what you had put in!

An example is;

if ( $1 == kh ) { msg $active 9K3ewl15 $2- | halt }

Now this works but I also get this!

user: kh
<user> Kewl

So how do you get rid of the user:kh from showing in chat?

Any help would be appreciated!

Posted By: asdfasdf Re: Scripting help - 12/04/10 05:07 AM
That must be echoed at another part in the script's on input event, probably either somewhere right on top or at the bottom.

Remove or comment that line out.

You would need to provide the entire script (use [code][/code] tags if you do so) for us to be able to see which part exactly it is.
Posted By: Tomao Re: Scripting help - 12/04/10 06:14 AM
Looks like you're using an input event. If so, this is what you should do:
on *:input:#: {
  if ($1 == kh) {
    echo -mlctbf # < $+ $nick(#,$nick).pnick $+ > 9K3ewl15 $2-
    .msg # $1- | haltdef
Posted By: sotdyeti Re: Scripting help - 12/04/10 07:19 AM
Thanks that worked

Posted By: Riamus2 Re: Scripting help - 12/04/10 10:14 AM
Uh, Tomao... That only changes the text locally. I think the OP wants to change it in the .msg as well. So can drop the echo line and just have the msg without the "."
Posted By: s00p Re: Scripting help - 14/04/10 12:57 PM
haltdef halts default text. halt halts further processing. I believe the command required for this behaviour is halt.
© mIRC Discussion Forums