mIRC Home    About    Download    Register    News    Help

Print Thread
#130607 19/09/05 09:11 PM
C
Crazy01031979
Crazy01031979
C
Hello, I have a question, does anybody know how to make a script which reverses an action back to the person who made it. Example, if you are confused:

* Crazy does a happy little dance with defiance.

(and if defiance has a script, it will reverse it and use Crazy's nick)

* defiance does a happy little dance with Crazy.

I used to have a script that would do that, a few years ago, but no where to look, and have no idea how to write it. Any help would be greatly appreciated.

#130608 19/09/05 09:25 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
???

on *:ACTION:*:*: {
describe $chan $1- with $nick
}

#130609 19/09/05 10:03 PM
C
Crazy01031979
Crazy01031979
C
I tried that, it responds. to anyone doing an action. i only want it to do an action if it contains my nick...

here's what it did when i tried it...
[17:59] * @RickJames smacks Crazy in the face
[17:59] * @Crazy smacks Crazy in the face with RickJames
[17:59] * @Crazy smacks Crazy in the face with RickJames


i want it to just do
*@Crazy smacks RickJames in the face

#130610 19/09/05 10:13 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Try this

Code:
On *:ACTION:*:#: if ($me isin $1-) describe $chan $1 $nick back  

#130611 19/09/05 10:27 PM
C
Crazy01031979
Crazy01031979
C
that didn't work

#130612 19/09/05 10:32 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Works fine when I tested it. Try putting it on a new remote file (Alt-R -> FILE -> New)

Another way is this

Code:
 ON *:ACTION:$($+(*,$me,*)):#: describe $chan $1 $nick back 

#130613 20/09/05 01:38 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
X that wont work for him unless his nick is in the command itself because you did isin...

but the answer to your question dude if you just want it to describe to only certain things do this

on *:ACTION:*:*: {
if smacks isin $1- { describe $chan smacks $nick in the face }
}

otherwise you cant really have it seperated you can tell your script which commands you want it to respond too

#130614 20/09/05 06:05 AM
O
Om3n
Om3n
O
Of corse it can be done with regex, but did everybody forget about $replace?

on *:ACTION:*:#: {
if ($me isin $1-) describe $chan $replacexcs($1-,$me,$nick)
}

#130615 20/09/05 12:57 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Lol. Was thinking the same thing. laugh

Just a note with such a script... if both of you have it, you'll flood the channel very quickly as you keep replying to each other.

You might try a small check in there:

(Update using Om3n's script)
Code:
on *:ACTION:*:#: { 
  if ($me isin $1- && $+(%,repeatprotection.,$nick) == $null) {
    describe $chan $replacexcs($1-,$me,$nick) 
    set -u10 $+(%,repeatprotection.,$nick) on
  }
} 


That will only repeat one time every 10 seconds for each nick who does an action. That should prevent floods from repeating each other over and over. It is set up so that if 2+ people do such an action in a row, you'll still replay to each person... but you won't reply twice to the same person in less that 10 seconds.

#130616 20/09/05 04:57 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
lol, forgot about the $replace identifier.


Link Copied to Clipboard