A couple of years ago when I was mIRC, I had written a script that came out as an auto response whenever someone named me in their /me. For example they would type /me slaps Destro12 with a trout and then my auto response would kick in and say Destro12 dodges and slaps [insert nick] here with a trout instead.
Now for the life of me I cannot remember how I wrote the script and I was wondering if you all could help me with the commands I need. I have read through the mIRC FAQ and I am still not sure which combination of commands I need to make this work. Thanks a lot.
on *:action:*trigger*:#channel: {
if (something) { describe $chan response }
}
That's a basic idea of how it works. Your trigger can be whatever you want it to be. For example, "slaps" or "large trout" or whatever. The channel is the channel you want it to work in (or just # for all channels). The IF (something) part is any check you want to make. For example, seeing if ($me isin $chan). And your response is whatever you want it to be. You can use $nick to display the nick of the person you're responding to. Describe is how you script /me, so if you want an action, use that. If you want it to be a normal message, use msg instead.
This is a little advanced with regex, but works best to match your name exactly within a sentence and recognizes the singular and plural slap(s) when someone slaps you with anything:
Code:
on $@*:action:$(/(slaps?(^| )\Q $+ $replacecs($me,\E,\E\\E\Q) $+ \E(?![^\w\s\!\.\?]).*)/iS):*:{
describe $iif(#,#,$nick) dodges and $replace($regml(1),$me,$nick,slap,slaps,slapss,slaps)
}
You'll then relay to it and return the same slap to him or her. This code also works for both channel and PM.