Need Help Writing a Script. reddit / irc ---------------------------------------------------------------------- TheGhost983 · 2013-06-09 04:19 So basically I usually chat on Quakenet. Most people tend to use their web chat, which has a "slap" function. When you click said button, it says something like this: * *Y slaps X around a bit with a large fishbot.* In one of the channels I frequent in, one of the common users has a script that goes like this whenever someone slaps him: * *X dodges the lame attempt and slaps Y*. I'm using mIRC's script editor, and I already know how to write a basic script (like when someone says test!, I'll make it say "failed or whatever). Sorry if this was a little hard to follow, but if you use Quakenet, you probably know what I'm talking about. Thanks for any help. ---------------------------------------------------------------------- omnicist · 2013-06-09 06:52 Ok, it's been roughly 15 years since I tried my hand at mIRC scripts, but I think you'll want something like this: on !1:ACTION:*trout*:#:/me dodges the lame default mIRC trout That would wait for an *action* (i.e., /me) with the word *trout* broadcast to the channel, and would respond with the command */me dodges the lame default mIRC trout* This looks right to me, but it's been awhile... [here's a bit of a guide](http://dooyoo-uk.tripod.com/mirc/events.htm). Scripting can be a blast, you can do all sorts of things with timers and user-levels and events to really customize your client. There are dozens of great irc clients as well, I like [irssi](http://www.irssi.org) which uses perl but whatever you're into is what you're into. Happy chatting! ---------------------------------------------------------------------- Zarthus · 2013-06-09 15:05 Although omniicist's script would work, it's more than likely not acceptable to not have a proper antispam to on it. You can edit the :#: int something like :#theghost: to only allow the script to work in the channel #theghost, add a comma to indicate it will work for multiple channels, e.g.: :#theghost,#theghost2,#theghost3: on *:ACTION:*trout*:#: { if (%antispam.trout.quake) return describe $chan dodges the lame default mIRC trout from $nick $+ . set -u10 %antispam.trout.quake $true } Keep in mind to ask ops in the said channel if they approve of said script before running it. I personally never learned what the !1 for was in omnicist's script, I just know that mine has always worked for me. I personally never used the mIRC user level thing. ---------------------------------------------------------------------- FiXato · 2013-06-09 17:36 I would also replace _*trout*_ with a more limited trigger string such as: *slaps*trout* so it only triggers when _slaps_ and _trout_ are in the action, so it doesn't get triggered on any sentence with trout in it, such as _/me loves trout-fishing_ I would also add a check to it to make sure your nick is mentioned, so you don't respond to just any trout slap: on *:ACTION:*slaps*trout*:#: { if (($me !isin $1-) || (%antispam.trout. [ $+ $server $+ . $+ $chan ])) return describe $chan dodges the lame default mIRC trout from $nick $+ . set -u10 %antispam.trout. $+ $server $+ . $+ $chan } Finally, as you can see, I switched out the hard-coded network anti- spam variable name for one based on the server and channel name, so the 10 second spam prevention is limited per unique channel. ---------------------------------------------------------------------- TheGhost983 · 2013-06-09 18:25 Thanks this worked or me.