mIRC Homepage
Posted By: McOwnage Help with making a script - 26/07/07 08:09 AM
ok I did not know how to search for this so I did not search but if ya can tell me what I shoiuld use in a search to find stuff on this Please do so

ok I am trying to write a script that will log people that swear BUT the people that swear are NOT in the channel but in a game and the bot puts in channel what the player said so how would i make it take the first thing after the bots name -(minus) the : and save that as the name

example

<gameBOT> player1: your a stupid swearword

I would like to make it write something like "player1 said swearword 12:34 pm" to a txt file that change on date ie

swears.20070706.log
swears.20070707.log

I would like it to read a file of swear words I define but will not trigger like on words assume as the word ass I am still trying to relearn scripting with mIRC so please be gentle (so if you can suggest anything beside the mirc help to read please do so)
Posted By: sparta Re: Help with making a script - 26/07/07 08:19 AM
/help on text

if the line looks like the one you posted, then you would grab the line written to the channel with $2- , $1- would return everything in the line, so try it:
Code:
on *:TEXT:*:#: {
  echo -a --------
  echo -a $1 -> $2 -> $3 -> $4
  echo -a --------
  echo -a $2-
  echo -a --------
  echo -a $1-
}

The code goes in to your remote, "ALT + R" in your mirc, paste it in a empty file there.

/help /write

will explain how to write the text to a file.

You grab the text by use: if (Swear-word isin $1-) { do stuff }

or you can use $2- or $3- or what ever.
© mIRC Discussion Forums