mIRC Home    About    Download    Register    News    Help

Print Thread
Action Script #161898 12/10/06 07:06 AM
Joined: Oct 2006
Posts: 11
G
giannis123 Offline OP
Pikka bird
OP Offline
Pikka bird
G
Joined: Oct 2006
Posts: 11
Is there any script tha does the following:
on NICK action something
ME action something else
on NICK says something
ME says somethingelse

p.x.
NICK goes to bed
ME is comming with you smile
<NICK> Hello!
<ME> Hello!
grin

Re: Action Script #161899 12/10/06 07:48 AM
Joined: Jan 2006
Posts: 61
C
Crash_N_Burn Offline
Babel fish
Offline
Babel fish
C
Joined: Jan 2006
Posts: 61
yes, basicly is this:

Code:
 

on *:TEXT:Hi:#:{
.msg $chan Hi you there!
}

 



Its works when someone say in the channel the "Hi" word, you or your bot will say on the channel Hi you there!.
You can remove or change the return message and the Hi by whatever you want. Basicly is this but for more information check on the mIRC Help File, the On Text section!

Thats all

*


The practice do the Master...
Re: Action Script #161900 12/10/06 02:43 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As for the action text, you need to use on ACTION instead of on TEXT.

/help on action

Example:
Code:
on *:action:*trout*:#: {
  me slaps $nick back with a trout.
}


Keep in mind that the example I gave above can cause you to be flooded off if both of you have similar slap back scripts loaded. So be careful how you use such response scripts.


Invision Support
#Invision on irc.irchighway.net
Re: Action Script #161901 26/10/06 07:52 AM
Joined: Sep 2006
Posts: 71
O
o0Chris0o Offline
Babel fish
Offline
Babel fish
O
Joined: Sep 2006
Posts: 71
hey guys..I am having problems getting this to work...it was working..then it wasn't can someone help me out ?

Code:
 on *:TEXT:night:#:{$me msg # 4G5ood09 4N5ight $nick :) }
on *:TEXT:goodnight:#:{$me msg # 4G5ood09 4N5ight $nick :) }
on *:TEXT:nite:#:{$me msg # 4G5ood09 4N5ight $nick :) }
on *:TEXT:nn:#:{$me msg # 4G5ood09 4N5ight $nick :) } 

Re: Action Script #161902 26/10/06 10:55 AM
Joined: Oct 2006
Posts: 21
S
Sam_Hamwich Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: Oct 2006
Posts: 21
Should that be "/me"?


Sam Hamwich
-Build a Better Mousetrap, and They Will Build A Smarter Mouse-
Re: Action Script #161903 26/10/06 03:34 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Remove $me from there. It's not necessary.

Code:
on *:TEXT:night:#:{ msg # 4G5ood09 4N5ight $nick :) }
on *:TEXT:goodnight:#:{ msg # 4G5ood09 4N5ight $nick :) }
on *:TEXT:nite:#:{ msg # 4G5ood09 4N5ight $nick :) }
on *:TEXT:nn:#:{ msg # 4G5ood09 4N5ight $nick :) } 


Also, keep in mind that you can merge these all into one on text event if you want to:

Code:
on *:TEXT:*:#:{
  if ($1- == night || $1- == goodnight || $1- == nite || $1- == nn) {
    msg $chan 4G5ood09 4N5ight $nick :)
  }
}


Invision Support
#Invision on irc.irchighway.net
Re: Action Script #161904 26/10/06 03:36 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Quote:
Should that be "/me"?


No. Even if he wanted to do an action, you use "describe" in a script instead of "me".

Example:
alias test { describe $active laughs. }

Use (in a channel or query):
/test


Invision Support
#Invision on irc.irchighway.net
Re: Action Script #161905 26/10/06 10:19 PM
Joined: Sep 2006
Posts: 71
O
o0Chris0o Offline
Babel fish
Offline
Babel fish
O
Joined: Sep 2006
Posts: 71
ahhh thanks Riamus adding it to one is much better thanks for the head up

Re: Action Script #161906 26/10/06 10:20 PM
Joined: Sep 2006
Posts: 71
O
o0Chris0o Offline
Babel fish
Offline
Babel fish
O
Joined: Sep 2006
Posts: 71
what if I add good night with a space? can that be done?

Re: Action Script #161907 26/10/06 10:49 PM
Joined: Sep 2006
Posts: 71
O
o0Chris0o Offline
Babel fish
Offline
Babel fish
O
Joined: Sep 2006
Posts: 71
also when someone says talk to you guys later nn or nn so in so....it doesn't work

Re: Action Script #161908 27/10/06 02:49 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
If you want it to trigger whenever a word or phrase is in the text, then use isin.

if (night isin $1-) { do this }

Keep in mind that someone could just be using the word and not meaning it for a goodnight, so it could be a problem. Also, "nn" can be part of a word. To prevent that, you could do something like:

if ($istok($1-,nn,32 ) || $istok($1-,nn!,32) || $istok($1-,nn.,32)) { do this }

That should give you enough to build on. If you have trouble, just paste what you've made and we'll help with that.


Invision Support
#Invision on irc.irchighway.net
Re: Action Script #161909 27/10/06 06:21 AM
Joined: Sep 2006
Posts: 71
O
o0Chris0o Offline
Babel fish
Offline
Babel fish
O
Joined: Sep 2006
Posts: 71
Code:
 if ($istok($1-,nn,32 ) || $istok($1-,nn!,32) || $istok($1-,nn.,32)) { do this }
 


alright how would I use that with all of the "goodnight, good night, night, nn" commands? keeping it in one simplfied code?

Re: Action Script #161910 27/10/06 09:34 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The nn part is the only part that really needs the $istok. The rest should be fine with the isin example. Just checking for night is enough for "goodnight", "good night", and "night".

To put the 2 together:

Code:
if ($istok($1-,nn,32 ) || $istok($1-,nn!,32) || $istok($1-,nn.,32) || night isin $1-) { do this }


As I said, someone could still just mention night in what they are saying. There is no real way to prevent that from triggering the script if you are going to allow it to be anywhere in the line.

Example:
This night is very cold.

There isn't a good way for the script to know that it shouldn't trigger for that unless you limit where it accepts the word night/goodnight/good night. It's usually best to have it just accept it if that's the only thing on the line.

Also, be warned that some people love to flood bots that respond to commands. Once someone knows your bot responds to that trigger, they can just keep typing it until your bot is flooded off the server. Protections for that would be wise.


Invision Support
#Invision on irc.irchighway.net