mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2009
Posts: 2
F
Bowl of petunias
OP Offline
Bowl of petunias
F
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
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Put the following in your remotes (Alt+R)

Code:
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
W
Hoopy frood
Offline
Hoopy frood
W
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
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Please provide the source for your statement of
Quote:
"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
W
Hoopy frood
Offline
Hoopy frood
W
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 smile

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
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You're right.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Mar 2007
Posts: 218
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
/quote sends commands directly to the server i think.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
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
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Originally Posted By: vexed2
/quote sends commands directly to the server i think.


No, QUOTES Unknown command


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
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
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Yes but the argv[0] gives that code with s

check here


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
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
V
Fjord artisan
Offline
Fjord artisan
V
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
W
Hoopy frood
Offline
Hoopy frood
W
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
F
Bowl of petunias
OP Offline
Bowl of petunias
F
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
R
Hoopy frood
Offline
Hoopy frood
R
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


Link Copied to Clipboard