mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2015
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2015
Posts: 10
Currently running this snippet:

Code:
msg $chan $read(Raffle.txt,n)


How do I modify it to read X amount of random lines from the text?

Would this:
Code:
on *:text:!command *:#:{ msg $chan $read(Raffle.txt,n,$2)}
work?

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Try this
Code:
on *:text:!command *:#:{ 
var %i = $2
while (%i > 0) {
.timer 1 $calc(%i) msg $chan $read(Raffle.txt,n)
dec %i
  }
}

Joined: Mar 2015
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2015
Posts: 10
Works perfect, just a question, how do I change it from
Quote:

Bot: Player 1 has won!
Bot: Player 2 has won!

to
Quote:

Bot: Player 1 Player 2 has won!

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
try
Code:
on *:text:!command *:#:{ 
var %i = $2
while (%i > 0) {
var %b = $addtok(%b,$read(Raffle.txt,n),32)
 dec %i
  }
msg # %b have won!
}


Link Copied to Clipboard