just add this file to The Remotes Section of ure bot mirc
Then go into the main file an Create a txt file names Random.txt save it then
any user in the chat can add Random comments by usin !add
shows the Random comments By typing !say
Display the list using While loops !list will display the entire txt file
This is the first attempt at while loops :)
on *:TEXT:*:#: {
if ($strip($1) == !add) { /write random.txt $2- | /msg $chan 1,13 $nick Just Added $2- To The Random Comments List }
if ($strip($1) == !say) { /msg $chan 4,1 $+ $read(random.txt) }
if ($strip($1) == !list) { var %line.index = 1 | while (%line.index <= $lines(random.txt)) { /msg $nick $read(random.txt,%line.index) | inc %line.index } }
}
If you let users store and recall phrases in/from your bot you should use \"n\" in the read statement, like $read(random.txt, n). Otherwise they can take control of your bot. Another thing: if you have many phrases in random.txt, probably !list will let your bot flood. Instead of while loop and notice you could also play the file privately to the user.