Hi Mangos64,

Yes you can do this with Java, using the java.util.Random class:

Random (Java Platform SE 6)

Your logic is sound, this will work perfectly in java as well as lua.


Chris