How can a Ripple contract use random values and reach consensus?
That contaracts wiki page may be out-of-date.
However, the loto example uses rand float which in the data access section of the wiki page is described as:


  
  this number is deterministically created based on the hash of the collection of transactions or something
  


That implies to me that it's random only in the sense that the contract itself, or any Ripple user, cannot guess what the value will be at run time, but once running all validators will use the same value.

This is similar to how some Bitcoin gambling sites work, using numbers based off the Bitcoin blockchain hash.