Ghoast 0 Posted September 9, 2012 Report Share Posted September 9, 2012 I've made a bot which should insert a string of text into a block of text. I want it to insert the text after a random fullstop '.' So far I've got this: set(#blocktext - text from file set(#blocktext, $insert text(#blocktext, ". {#stringtoinsert}", $find index(#blocktext, ".")), "Global") This inserts my string after the FIRST fullstop in every block text.. However I want to randomize this and make it choose a random full stop to insert the string after. After some hours of working on it I think a solution could be to return the indexes of all the full stops and then instruct ubot to choose a random position from these numbers to insert the string after.. Any ideas? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.