mIRC Homepage
Posted By: Panic I am scripting Honest - 07/09/07 07:33 PM
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
Posted By: Riamus2 Re: I am scripting Honest - 08/09/07 12:52 AM
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.
Posted By: KAHLAN Re: I am scripting Honest - 08/09/07 01:32 AM
Riamus,
Where does one learn the scripting that is done in mIRC?
Posted By: ZorgonX Re: I am scripting Honest - 08/09/07 01:59 AM
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.
Posted By: Riamus2 Re: I am scripting Honest - 08/09/07 03:26 AM
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.
Posted By: Panic Re: I am scripting Honest - 08/09/07 07:17 AM
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
Posted By: Riamus2 Re: I am scripting Honest - 08/09/07 01:43 PM
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
© mIRC Discussion Forums