mIRC Home    About    Download    Register    News    Help

Print Thread
F
FredJohnson
FredJohnson
F
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,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
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.
Joined: Jul 2006
Posts: 4,022
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,022
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,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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,022
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,022
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,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
You're right.

V
vexed2
vexed2
V
/quote sends commands directly to the server i think.

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
It appears to do so, like /raw

I have appended my resource materials to include this command.

Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Originally Posted By: vexed2
/quote sends commands directly to the server i think.


No, QUOTES Unknown command

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Yes but the argv[0] gives that code with s

check here

Joined: Jul 2006
Posts: 4,022
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,022
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
V
vexed2
vexed2
V
At least you understand lol

Last edited by vexed2; 29/07/09 08:39 PM.
Joined: Jul 2006
Posts: 4,022
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,022
At least ? Do you mean I have another problem ?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
F
FredJohnson
FredJohnson
F
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,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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