mIRC Home    About    Download    Register    News    Help

Print Thread
#136451 28/11/05 10:33 AM
Joined: Nov 2005
Posts: 2
S
siarlas Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Nov 2005
Posts: 2
ok, I've searched and I've manually had a look and didn't find anything.
A few years back, I had some code in aliases.ini to pull quotes from a text file.
One line would quote a chosen line (e.g. <Username> Quote #12: You're not as real as you think you are) while the other would just go random (e.g. <Username> Random Quote #233: This house is protected by killer dust bunnies.)
Anyhow, took a break from mIRC for a year or two, new computer, downloaded latest mIRC. But now I can only get the random quotes to work.
These are the two lines I have in aliases.ini:

/qq /say Quote $read-1 $+ $$1(C:\Program Files\mIRC\quotes.txt)
/quote /say Random Quote $read(C:\Program Files\mIRC\quotes.txt)

They were copied from the original ini file.

Joined: Nov 2005
Posts: 105
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
Quote:

/qq /say Quote $read-1 $+ $$1(C:\Program Files\mIRC\quotes.txt)
/quote /say Random Quote $read(C:\Program Files\mIRC\quotes.txt)

They were copied from the original ini file.

I honestly Don't see how that's ever worked.
the code to read a certain line would be
Code:
/qq //msg $chan (Quote) $read(quotes.txt, $$1 $+ )

.. where in you'd use /qq LineNumber and it'd message the channel with the quote on that line number.

Joined: Jun 2005
Posts: 127
H
Vogon poet
Offline
Vogon poet
H
Joined: Jun 2005
Posts: 127
/qq /var %x = $read(quotes.txt) | say Quote $+($chr(34),$readn,:) %x
/quote /if ($read(quotes.txt,$1)) { say Random Quote $+($chr(34),$readn,:) $v1 }

Random
Quote # $1


-- HAMM3R (aka: alhammer)
http://www.HAMM3R.net
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:

One line would quote a chosen line (e.g. <Username> Quote #12: You're not as real as you think you are) while the other would just go random (e.g. <Username> Random Quote #233: This house is protected by killer dust bunnies.)


try it like this, see if it works

/qq say Quote Number $$1 $read -l $+ $$1 quotes.txt
/quote say Random Quote: quotes.txt

usage
/qq 12
posts line 12 of quotes.txt with "Quote Number (the number)" in front

/quote
posts a random line from quotes.txt with "Random Quote:" in the front.

Joined: Nov 2005
Posts: 2
S
siarlas Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Nov 2005
Posts: 2
Thank you all for your help. I ended up using MikeChat's suggestion with a minor modification.

I forgot that I had numbered each quote (e.g. #7: blah blah blah), so it came up with the quote number twice. By having just;

/qq say Quote $read -l $+ $$1 quotes.txt

it now comes up with Quote #7: blah blah blah. Perfect.

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I backspaced a few too many

/quote say Random Quote: quotes.txt
should be
/quote say Random Quote:$read(quotes.txt)


Link Copied to Clipboard