mIRC Home    About    Download    Register    News    Help

Print Thread
#185294 07/09/07 07:33 PM
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Well Hi again.

I need 1 thing when people say certain things on a channel my bot is on i want it to say in the channel where for example test was said i need it to say in that channel How are you test test nothing at all said certain just a random message i though of. I need a script where i can change things on it after it is made so i don't have to keep comming back

Thanks
Panic


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That's a pretty easy on TEXT...

Code:
on *:text:*:#: {
  if (word isin $1-) { msg $chan this }
  if (*word* iswm $1-) { msg $chan this }
  if ($1 == hi) { msg $chan this }
}


That shows 3 different ways you can check. Keep in mind possible matches when considering isin/iswm. For example, checking if "hi" is part of the entire line rather than just the first word will make it match other things, such as "this". You could also use regex on certain matches like that to check if there is a "word" that matches without considering punctuation.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2004
Posts: 18
K
Pikka bird
Offline
Pikka bird
K
Joined: Mar 2004
Posts: 18
Riamus,
Where does one learn the scripting that is done in mIRC?


Being for itself in nothingnes. Being & Nothingness. By Jean Paul Satyre.
Joined: Mar 2006
Posts: 13
Z
Pikka bird
Offline
Pikka bird
Z
Joined: Mar 2006
Posts: 13
Originally Posted By: KAHLAN
Riamus,
Where does one learn the scripting that is done in mIRC?


While you may have been asking someone else, I thought I'd give you a bit of help:
Type /help in mIRC. This is your reference for all pre-defined mIRC commands and identifiers.
You can check out scripts for examples of the general format if you want, but there are also examples in the mIRC help files.

Hope that helps some.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The best way to learn scripting in mIRC is to get a small script that someone already made that doesn't do much, then look up the commands used in /help and see how they work. Then, start by trying to write small scripts and see what you can come up with. /help is the best source of information, imo. Beyond that, ask here or in scripting channels for help. If you really want to *learn* to script, do your best to figure out how to make something work, then ask for help rather than just asking someone to do it for you. Otherwise, you get in the habit of asking for help on every single script you try to write.


Invision Support
#Invision on irc.irchighway.net
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Ok so

Code:
 on *:this is where i put text:*:#: {
  if (word isin $1-) { msg $chan text }
  if (*word* iswm $1-) { msg $chan this }
  if ($1 == hi) { msg $chan this }  <--- what the hell is that
}



Then where is it i put the text (see above)

Please note: I did want it so if something is said on its own it will do it and only for certain people like trollman118 and Panic how is that i tryed + i only want it to 1 text stuff in just one remote script

Thanks
Panic

Last edited by Panic; 08/09/07 07:20 AM.

CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You have already asked and received answers for how to make things only work for those nicks. Look at the answers from your previous posts. Just change "this" in those to whatever message you want the bot to reply with.

Read the help file.

/help on TEXT
/help /msg


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard