mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2016
Posts: 6
B
Blinakk Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Aug 2016
Posts: 6
Hi, I wanted to make a random quote script that writes a random message that someone ever typed in the channel.

Here is what I did:

on *:text:*:#: {
write logs.txt $nick $+ : $1-
}

on *:text:!rq*:#: {
msg # $read(logs.txt, s, $nick)
}

but it doesn't seem to work.
Thanks for the help!

Last edited by Blinakk; 16/10/16 10:24 AM.
Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
The correct way to read a random line is:

Code:
$read(logs.txt, n)


https://en.wikichip.org/wiki/mirc/text_files#Reading_a_Random_Line


twitter @keyeslol
Joined: Aug 2016
Posts: 6
B
Blinakk Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Aug 2016
Posts: 6
Done! Thanks!

Last edited by Blinakk; 17/10/16 02:37 PM.

Link Copied to Clipboard