The basic idea is:
- read all the data into a [text]
- choose a random starting point and take the second value of the prob list as current state
- find all lines with the current state as first value, read the second values into a list and the probabilities into an array
- use [array random] and take the corresponding value from the list as new current state
- repeat from step 3.
(In the implementation another column for counting is added, so first value becomes second and so on.)
This should also work with more probabilities and also if the probabilities don't add up to 100. They don't actually have to be percentages at all (untested).