mIRC Home    About    Download    Register    News    Help

Print Thread
#210095 04/03/09 05:35 PM
Joined: Mar 2009
Posts: 1
A
Anaris Offline OP
Mostly harmless
OP Offline
Mostly harmless
A
Joined: Mar 2009
Posts: 1
Hey there.
I am using mIRC V6.17 and I used the remote tab of the Scripting editor (while leaving one copy of my mIRC open) to create a Bot.

So far it only does few commands. Most of them are TEXT/ACTION based.

I do have some questions on the matter however:

1) I want the Bot to react differently when someone specific tells it something (Must have a certain Nick and also must be registered and identified). Can this be done? If so how?

2)I set my Bot to warn someone when he uses a foul language... However I want it to be able to count first and second offense and on the third kick the offender and message me a log of that offense.

Thanks in advance!

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
First off, I would recommend upgrading to the current version of mIRC, which is 6.35
You can do that by following this link.

Secondly, for your first query, you already have a start using the ON TEXT and ON ACTION events. What you need to add is a comparison to see if the $nick matches the nick that is allowed for the alternative commands/responses.

Lastly (at this point), your second query can be handled the easiest by referring you to sites like Hawkee and have you search the snippets section for a bad word script.
I know there are a few there, but if you don't like any of them (and don't be afraid to try different wording in the search), you can also try sites like mirc.net or mIRC Scripts.org

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Quote:
2)I set my Bot to warn someone when he uses a foul language... However I want it to be able to count first and second offense and on the third kick the offender and message me a log of that offense.

The script below will warn twice before a kick. Once a person is kicked, it will write a text file called kicklog in your mirc directory to save all the kicks you make. (note: The code is served mainly for exemplary purposes, giving you an idea is all.)
Code:
on *:KICK:#: {
hadd -m kicklog $+($knick,$chan,$cid) $knick was kicked by $+($nick,$1-)
write kicklog.txt * $hget(kicklog,$+($knick,$chan,$cid)) | hfree kicklog
}
on *:TEXT:*badword*:#: {
  hinc -m b $nick
  if ($hget(b,$nick) = 1) { msg # $nick $+ , this is your $ord($hget(b,$nick)) offense. }
  if ($hget(b,$nick) = 2) { msg # $nick $+ , this is your $ord($hget(b,$nick)) offense.  }
  if ($hget(b,$nick) > 2) { kick # $nick This is your $ord($hget(b,$nick)) offense. You're out. | hfree b }
}


Link Copied to Clipboard