|
Joined: Jul 2009
Posts: 2
Bowl of petunias
|
OP
Bowl of petunias
Joined: Jul 2009
Posts: 2 |
Hey, I'm new here and don't know much at all about scripting. Basically I'm looking to make a bot that idles in a channel, and at random intervals will say a random quote (picked from a list of maybe 100 or so quotes). How do I go about doing this?
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
Put the following in your remotes (Alt+R) alias quotes {
msg #mychannel $read(quotes.txt)
.timer 1 $rand(60,360) quotes
} Every 60-360 seconds it reads from quotes.txt (create the file in your $mircdir) and msgs it to #mychannel Type /quotes to start it. * edit: renamed to /quotes
Last edited by argv0; 26/07/09 09:05 PM.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Jul 2006
Posts: 4,149
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,149 |
Just a little note since "quote" is already a mIRC command, could be a good idea to change your alias to "quotes"
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Please provide the source for your statement of "quote" is already a mIRC command since I am unable to find the command in any of my reference material. Could you be confusing quote with $qt(), which puts quotes around text so that it includes spaces, namely in file and directory names?
|
|
|
|
Joined: Jul 2006
Posts: 4,149
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,149 |
I don't have any source, just my knowledge. It's not because you don't know the command/don't have it referenced somewhere that it doesn't exists, especially in mIRC. A simple /quote in mirc or /quote bla would provide you a proof. You might want to try /help /raw as well Edit : and of course I'm not confusing with $qt
Last edited by Wims; 26/07/09 08:46 PM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Mar 2007
Posts: 218
Fjord artisan
|
Fjord artisan
Joined: Mar 2007
Posts: 218 |
/quote sends commands directly to the server i think.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
It appears to do so, like /raw
I have appended my resource materials to include this command.
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
/quote sends commands directly to the server i think. No, QUOTES Unknown command
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
The command being referenced is /quote not /quotes Note the s on the end of the command that gave you the error message.
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Yes but the argv[0] gives that code with scheck here
|
|
|
|
Joined: Jul 2006
Posts: 4,149
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,149 |
You're missing something. argv0 named is alias 'quote' and since /quote is a mirc command, I've told him it could be nice to change it to 'quotes'.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Mar 2007
Posts: 218
Fjord artisan
|
Fjord artisan
Joined: Mar 2007
Posts: 218 |
At least you understand lol
Last edited by vexed2; 29/07/09 08:39 PM.
|
|
|
|
Joined: Jul 2006
Posts: 4,149
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,149 |
At least ? Do you mean I have another problem ?
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Jul 2009
Posts: 2
Bowl of petunias
|
OP
Bowl of petunias
Joined: Jul 2009
Posts: 2 |
Testing it out, it doesn't seem to work. I get the message * /msg: insufficient parameters (line 2, remote.ini) when I try to activate it. I have my quotes.txt file saved in C:\Program Files\mIRC. Is that the right spot, or no?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
You can include the exact location of the file, in this case replace quotes.txt in the script with "C:\Program Files\mIRC\quotes.txt"
Note: The "" around the directory and filename are required, due to the space in the directory name Program Files
Another alternative is to place the file in the location returned from the command //echo -a $mircdir
|
|
|
|
|