A possibility for you to consider
Code:
on *:start:{
if !$hget(text) { .hmake text 100 }
if $exists(file.txt) { .hload -n text file.txt }
}
on *:text:!read:#:{
var %line = $r(1,$hget(text,0).items)
.msg $chan $hget(text,%line)
.hdel text %line
if !$hget(text,0).items { .hload -n text file.txt }
}
  


That will load your text file into a hash table, one line per item, with each item being numbered (same as the line numbers).
When the !read command is used a random item from the hash table is generated and used to get the line from the hash table.
When the hash table is empty (ie: all of the lines have been used) then it automatically refreshes itself from the text file.

In this way, it is impossible for the same line to be read twice, but it might appear so, if two (or more) lines are identical or very similar.