mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2010
Posts: 6
L
LeoWong Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Nov 2010
Posts: 6
Can i know How can i do a script in mIRC where people slap me,I will slap back automatically + kick him/her

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
There are many slap back scripts available and you probably can find them easily with Google. But here's just a basic example of one.

Code:
on *:text:*:#: {
  if (*slaps $me $+ * iswm $1-) {
    describe $chan slaps $nick back.
    if ($me isop $chan) { kick $chan $nick }
  }
}


Be aware that any kind of response script like this can result in both you and the other person getting flooded off the network if both of you have a similar response script. The kick may help, but not necessarily. These kinds of scripts are often more trouble than the "fun" aspect that so many people associate with them.


Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2010
Posts: 6
L
LeoWong Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Nov 2010
Posts: 6
Just wonder where i put the code in?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
In your remotes (Alt + R)

Joined: Nov 2010
Posts: 6
L
LeoWong Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Nov 2010
Posts: 6
I done this but it does not seem to be working:(

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
It's an on ACTION event, not an on TEXT event. Try this code:
Code:
on *:ACTION:$($+(*,slaps $me,*)):#:{
  describe $chan slaps $nick back.
  if ($me isop $chan) kick $chan $nick
}



Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Oops. Good catch. Not sure how I messed that up. smirk


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard